ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/freemol/trunk/src/mengine/src/read_sdf.c
(Generate patch)
# Line 74 | Line 74
74         }
75       }
76      /*     now write the concord file */
77 + /*
78      if (files.append)
79          wfile = fopen_path(Savebox.path,Savebox.fname,"a");
80      else
81          wfile = fopen_path(Savebox.path,Savebox.fname,"w");
82 + */
83 +        wfile = stdout;
84  
85      j = strlen(Struct_Title);
86      for (i=0; i < j; i++)
# Line 146 | Line 149
149  
150      fprintf(wfile,"\n");
151      fprintf(wfile,"$$$$\n");
152 <    fclose(wfile);
152 > //    fclose(wfile);
153   }
154   /* ===================================  */
155   // fast read - assume file is open and positioned
# Line 168 | Line 171
171       Ret_Val = TRUE;
172       got_title = FALSE;
173       xPlus = yPlus = zPlus = FALSE;
174 <     FetchRecord(rfile,inputline);
175 <     sscanf(inputline,"SDF %s",Struct_Title);
174 >     if ( 0 == FetchRecord(rfile,inputline) )return -1;
175 > //   sscanf(inputline,"SDF %s",Struct_Title);
176 >     strncpy(Struct_Title, inputline, sizeof(Struct_Title));
177       got_title = TRUE;
178       /*     if (strlen(inputline) > 4)
179       {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines