The function print_progress uses the pointer infile.
If fclose is called before print_progress then the build process
can fail to build the files:
doc/C/cde.dti/CDEDOC/dtsearch/CDEDOC.d99
doc/C/cde.dti/CDEDOC/dtsearch/dtsearch.ocf
doc/C/cde.dti/cde.oli
To fix the issue move the call fclose(infile) after print_progress()
} /* end main record loop */
- fclose (infile);
if (need_final_progress_msg)
print_progress ();
+ fclose (infile);
write_dbrec ();
/* If all input records were discarded, complete processing