-void
-output_file_close (filename)
- char *filename;
-{
- if (EOF == fclose (stdoutput))
- {
- as_perror (_("FATAL: Can't close %s"), filename);
- exit (EXIT_FAILURE);
- }
- stdoutput = NULL; /* Trust nobody! */
-}
-
-void
-output_file_append (where, length, filename)
- char *where;
- long length;
- char *filename;
-{
- for (; length; length--, where++)
- {
- (void) putc (*where, stdoutput);
- if (ferror (stdoutput))
- /* if ( EOF == (putc( *where, stdoutput )) ) */
- {
- as_perror (_("Failed to emit an object byte"), filename);
- as_fatal (_("Can't continue"));
- }
- }
+ if (! res)
+ as_fatal (_("can't close %s: %s"), filename,
+ bfd_errmsg (bfd_get_error ()));