comparison main.c @ 38:b156910b59b2

Wrap free() in dofree() to allow instrumenting it for debugging.
author David A. Holland
date Sat, 30 Mar 2013 21:02:25 -0400
parents 70902cac4170
children 337110e7240a
comparison
equal deleted inserted replaced
37:70902cac4170 38:b156910b59b2
165 macro_define_plain(&cm->where, cm->macro, 165 macro_define_plain(&cm->where, cm->macro,
166 &cm->where2, cm->expansion); 166 &cm->where2, cm->expansion);
167 } else { 167 } else {
168 macro_undef(cm->macro); 168 macro_undef(cm->macro);
169 } 169 }
170 free(cm); 170 dofree(cm);
171 } 171 }
172 array_setsize(&commandline_macros, 0); 172 array_setsize(&commandline_macros, 0);
173 } 173 }
174 174
175 static 175 static
285 file_readquote(&cf->where, cf->name); 285 file_readquote(&cf->where, cf->name);
286 mode.do_output = save; 286 mode.do_output = save;
287 } else { 287 } else {
288 file_readquote(&cf->where, cf->name); 288 file_readquote(&cf->where, cf->name);
289 } 289 }
290 free(cf); 290 dofree(cf);
291 } 291 }
292 array_setsize(&commandline_files, 0); 292 array_setsize(&commandline_files, 0);
293 } 293 }
294 294
295 //////////////////////////////////////////////////////////// 295 ////////////////////////////////////////////////////////////
924 commandline_macros_cleanup(); 924 commandline_macros_cleanup();
925 incpath_cleanup(); 925 incpath_cleanup();
926 926
927 num = stringarray_num(&freestrings); 927 num = stringarray_num(&freestrings);
928 for (i=0; i<num; i++) { 928 for (i=0; i<num; i++) {
929 free(stringarray_get(&freestrings, i)); 929 dofree(stringarray_get(&freestrings, i));
930 } 930 }
931 stringarray_setsize(&freestrings, 0); 931 stringarray_setsize(&freestrings, 0);
932 stringarray_cleanup(&freestrings); 932 stringarray_cleanup(&freestrings);
933 } 933 }
934 934