Don't use `atexit'.

* src/files.c (obstack_save): New function.
(done): Rename as...
(output_files): this.
Use `obstack_save'.
* src/main.c (main): Don't use `atexit' to register `done', since
it no longer has to remove tmp files, just call `output_files'
when there are no errors.
This commit is contained in:
Akim Demaille
2000-11-03 16:52:45 +00:00
parent 0dbb648e3f
commit d8880f69ff
11 changed files with 329 additions and 75 deletions

View File

@@ -50,9 +50,6 @@ main (int argc, char *argv[])
lineno = 0;
getargs (argc, argv);
/* Be ready to clean up if we exit. */
atexit (done);
open_files ();
/* Read the input. Copy some parts of it to FGUARD, FACTION, FTABLE
@@ -93,6 +90,9 @@ main (int argc, char *argv[])
free_nullable ();
free_derives ();
if (!complain_message_count)
output_files ();
exit (complain_message_count ? 1 : 0);
}