ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/xyz2pov/src/pov_writer.c
(Generate patch)

Comparing trunk/xyz2pov/src/pov_writer.c (file contents):
Revision 61 by mmeineke, Thu Aug 1 21:12:33 2002 UTC vs.
Revision 508 by mmeineke, Tue Apr 29 15:21:34 2003 UTC

# Line 22 | Line 22 | void clean_bonds(void);
22    
23   void clean_bonds(void);
24  
25 + void initBondList(void){
26 +  bl_head = NULL;
27 + }
28  
29   void pov_write(FILE *out_file, struct coords *the_coords, int n_atoms,
30                 int d_hydrogens, int d_bonds, int d_atoms){
# Line 79 | Line 82 | void pov_write(FILE *out_file, struct coords *the_coor
82              "\n"
83              "\n");
84      
85 <    make_bonds(the_coords, n_atoms);
85 >    if( bl_head == NULL ) make_bonds(the_coords, n_atoms);
86      
87      current_bond = bl_head->next;
88      
# Line 130 | Line 133 | void pov_write(FILE *out_file, struct coords *the_coor
133        current_bond = current_bond->next;
134      }
135    
136 <    clean_bonds();
136 >    if( regenerateBonds )clean_bonds();
137    }
138   }
139  
# Line 209 | Line 212 | void clean_bonds(){
212      }
213      
214      bl_head->next = NULL;
215 +    free( bl_head );
216 +    bl_head = NULL;
217   }
218  
219  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines