- fprintf (stderr, "%s:%u: ", file, line);
-}
-
-/* Like perror(3), but with more info. */
-
-void
-as_perror (const char *gripe, /* Unpunctuated error theme. */
- const char *filename)
-{
- const char *errtxt;
- int saved_errno = errno;
-
- as_show_where ();
- fprintf (stderr, gripe, filename);
- errno = saved_errno;
-#ifdef BFD_ASSEMBLER
- errtxt = bfd_errmsg (bfd_get_error ());
-#else
- errtxt = xstrerror (errno);
-#endif
- fprintf (stderr, ": %s\n", errtxt);
- errno = 0;
-#ifdef BFD_ASSEMBLER
- bfd_set_error (bfd_error_no_error);
-#endif
+ {
+ if (line != 0)
+ fprintf (stderr, "%s:%u: ", file, line);
+ else
+ fprintf (stderr, "%s: ", file);
+ }