Update of /cvsroot/fink/dists/10.7/stable/main/finkinfo/sci
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv11916

Modified Files:
        clipper.info 
Added Files:
        clipper.patch 
Log Message:
clipper bug fix for cif file i/o bug causing coot to seg fault

--- NEW FILE: clipper.patch ---
--- clipper-2.1.20130601/clipper/cif/cif_data_io.cpp    2012-03-07 
03:59:51.000000000 -0800
+++ clipper-2.1-fixup/clipper/cif/cif_data_io.cpp       2012-07-16 
07:18:48.000000000 -0700
@@ -66,8 +66,7 @@
 {
    mode = NONE;
 
-   // Argh, bug. It's things like this that make me dislike object
-   // oriented programming - "Magic happens behind your back".  The
+   // The
    // problem was that we were trying to import into f_phi_i in
    // close_read() when f_phi_i had not been initialised by calling
    // import_hkl_data for it (because it comes from a function that
@@ -80,7 +79,11 @@
    f_sigf_i = NULL;
    f_phi_i  = NULL;
    rfree_i  = NULL;
-      
+   d_sigd_i     = NULL;
+   ABCD_i       = NULL;
+   I_sigI_i     = NULL;
+   f_sigf_ano_i = NULL;
+   
    // set these when we find them....
    clipper_cell_set_flag = 0; 
    clipper_reso_set_flag = 0; 
@@ -184,9 +187,13 @@
      Message::message( Message_fatal( "CIFfile: no file open for read" ) );
 
   // make sure the data list is sized
-  if ( f_sigf_i != NULL ) f_sigf_i->update();
-  if (  f_phi_i != NULL )  f_phi_i->update();
-  if (  rfree_i != NULL )  rfree_i->update();
+  if ( f_sigf_i     != NULL ) f_sigf_i->update();
+  if (  f_phi_i     != NULL )  f_phi_i->update();
+  if (  rfree_i     != NULL )  rfree_i->update();
+  if ( d_sigd_i     != NULL ) d_sigd_i->update();
+  if (   ABCD_i     != NULL )   ABCD_i->update();
+  if ( I_sigI_i     != NULL ) I_sigI_i->update();
+  if ( f_sigf_ano_i != NULL ) f_sigf_ano_i->update();
 
   int ret_val = 0;
   int n_calc_data = 0; 
@@ -288,29 +295,32 @@
                }
 
                // RFree flag
-               char *s = mmCIFLoop->GetString("status", j, ierr_rfree_flag);
-               if (! ierr_rfree_flag) { 
-                  x1[0] = -1;
-                  if (s) {
-                     // std::cout << "read status :" << s << ":" << std::endl;
-                     if (strncmp(s, "o", 1)) {
-                        x1[0] = 1;
-                     } else {
-                        if (strncmp(s, "f", 1)) {
-                           x1[0] = 0;
+               if (rfree_i) { 
+                  char *s = mmCIFLoop->GetString("status", j, ierr_rfree_flag);
+                  if (! ierr_rfree_flag) { 
+                     x1[0] = -1; 
+                     if (s) {
+                        // std::cout << "read status :" << s << ":" << 
std::endl;
+                        // could be also "x"; not observed, just listed
+                        if (! strncmp(s, "o", 1)) {
+                           x1[0] = 1;
+                        } else {
+                           if (! strncmp(s, "f", 1)) {
+                              x1[0] = 0;
+                           }
                         }
                      }
+                     // 
+                     // Every output reflection gets one of these, even if
+                     // it is set to -1.  Is that the correct thing to do?
+                     // I have looked at over 200 recent sf mmCIFs and if
+                     // the contain conventional data then they all have
+                     // the status flag.
+                     //
+                     // However, SFS from EM data do not
+                     // 
+                     rfree_i->data_import( HKL(h,k,l), x1);
                   }
-                  // 
-                  // Every output reflection gets one of these, even if
-                  // it is set to -1.  Is that the correct thing to do?
-                  // I have looked at over 200 recent sf mmCIFs and if
-                  // the contain conventional data then they all have
-                  // the status flag.
-                  //
-                  // However, SFS from EM data do not
-                  // 
-                  rfree_i->data_import( HKL(h,k,l), x1);
                }
 
                

Index: clipper.info
===================================================================
RCS file: /cvsroot/fink/dists/10.7/stable/main/finkinfo/sci/clipper.info,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- clipper.info        9 Aug 2013 04:09:02 -0000       1.6
+++ clipper.info        28 Aug 2013 16:10:17 -0000      1.7
@@ -1,7 +1,7 @@
 Package: clipper
 Epoch: 1
 Version: 2.1.20130601
-Revision: 1
+Revision: 2
 GCC:4.0
 BuildDepends: <<
 fftw (>= 2.1.5-1010) | fftw-mpi (>= 2.1.5-1010), 
@@ -19,6 +19,8 @@
 Source: ftp://ftp.ccp4.ac.uk/opensource/%n-%v.tar.gz
 Source-MD5: 2e0d3faec7cc5a1eb377392122e6e254
 SourceDirectory: %n-%v
+PatchFile: %n.patch 
+Patchfile-MD5: 986698b06772d70cfd2fe06f296f8210
 DocFiles: README AUTHORS COPYING ChangeLog
 Description: Object-oriented crystallographic libraries
 DescDetail: <<


------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.cvs

Reply via email to