- /* JF write out the output file */
- if (!complain_message_count)
- {
- /* Output the main file. */
- FILE *ftab = xfopen (tabfile, "w");
- size_t size = obstack_object_size (&table_obstack);
- fwrite (obstack_finish (&table_obstack), 1, size, ftab);
- xfclose (ftab);
-
- /* Output the header file is wanted. */
- if (defines_flag)
- {
- FILE *fdefs = xfopen (defsfile, "w");
- size_t size = obstack_object_size (&defines_obstack);
- fwrite (obstack_finish (&defines_obstack), 1, size, fdefs);
- xfclose (fdefs);
- }
- }
+ /* Output the main file. */
+ obstack_save (&table_obstack, tabfile);
+
+ /* Output the header file if wanted. */
+ if (defines_flag)
+ obstack_save (&defines_obstack, defsfile);