diff options
author | John Millaway <john43@users.sourceforge.net> | 2006-02-14 03:32:28 +0000 |
---|---|---|
committer | John Millaway <john43@users.sourceforge.net> | 2006-02-14 03:32:28 +0000 |
commit | d5b8d4db354f0b8f19091aa960a911fdf55bc3b0 (patch) | |
tree | 98a2ed43fefdea189c29d19b14cfc6d856e3f793 /filter.c | |
parent | 9d660e2b9b934f82b90072a7be69301799d44c40 (diff) |
Patch for full file system failure.
Diffstat (limited to 'filter.c')
-rw-r--r-- | filter.c | 22 |
1 files changed, 20 insertions, 2 deletions
@@ -293,12 +293,23 @@ int filter_tee_header (struct filter *chain) fputs ("m4_undefine( [[M4_YY_IN_HEADER]])m4_dnl\n", to_h); fflush (to_h); - fclose (to_h); + if (ferror (to_h)) + lerrsf (_("error writing output file %s"), + (char *) chain->extra); + + else if (fclose (to_h)) + lerrsf (_("error closing output file %s"), + (char *) chain->extra); } fflush (to_c); - fclose (to_c); + if (ferror (to_c)) + lerrsf (_("error writing output file %s"), + outfilename ? outfilename : "<stdout>"); + else if (fclose (to_c)) + lerrsf (_("error closing output file %s"), + outfilename ? outfilename : "<stdout>"); while (wait (0) > 0) ; @@ -380,6 +391,13 @@ int filter_fix_linedirs (struct filter *chain) lineno++; } fflush (stdout); + if (ferror (stdout)) + lerrsf (_("error writing output file %s"), + outfilename ? outfilename : "<stdout>"); + + else if (fclose (stdout)) + lerrsf (_("error closing output file %s"), + outfilename ? outfilename : "<stdout>"); return 0; } |