From 8d3be8030ebb731b726197826704f612b6fd237a Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Mon, 11 Oct 1993 20:17:28 +0000 Subject: [PATCH] * messages.c (as_fatal): Do mention that it's the assembler that got the fatal error. --- gas/ChangeLog | 5 +++++ gas/messages.c | 59 ++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 53 insertions(+), 11 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index dcd4506ee26..63b29365645 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +Mon Oct 11 16:14:43 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) + + * messages.c (as_fatal): Do mention that it's the assembler that + got the fatal error. + Fri Oct 8 14:09:35 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * config/tc-mips.c (mips_gprmask, mips_cprmask): New variables to diff --git a/gas/messages.c b/gas/messages.c index ef07fc4ac1f..80c1d859677 100644 --- a/gas/messages.c +++ b/gas/messages.c @@ -36,6 +36,8 @@ #endif /* NO_VARARGS */ #endif /* NO_STDARG */ +extern char *strerror (); + /* * Despite the rest of the comments in this file, (FIXME-SOON), * here is the current scheme for error messages etc: @@ -128,10 +130,6 @@ as_perror (gripe, filename) char *gripe; /* Unpunctuated error theme. */ char *filename; { -#ifndef HAVE_STRERROR - extern char *strerror (); -#endif /* HAVE_STRERROR */ - as_where (); fprintf (stderr, gripe, filename); fprintf (stderr, ": %s\n", strerror (errno)); @@ -206,7 +204,7 @@ as_warn (const char *Format,...) va_list args; char buffer[200]; - if (!flagseen['W']) + if (!flag_suppress_warnings) { ++warning_count; as_where (); @@ -232,7 +230,7 @@ as_warn (Format, va_alist) va_list args; char buffer[200]; - if (!flagseen['W']) + if (!flag_suppress_warnings) { ++warning_count; as_where (); @@ -253,8 +251,7 @@ as_warn (Format, va_alist) as_warn (Format, args) char *Format; { - /* -W supresses warning messages. */ - if (!flagseen['W']) + if (!flag_suppress_warnings) { ++warning_count; as_where (); @@ -354,7 +351,7 @@ as_fatal (const char *Format,...) as_where (); va_start (args, Format); - fprintf (stderr, "FATAL:"); + fprintf (stderr, "Assembler fatal error:"); vfprintf (stderr, Format, args); (void) putc ('\n', stderr); va_end (args); @@ -372,7 +369,7 @@ as_fatal (Format, va_alist) as_where (); va_start (args); - fprintf (stderr, "FATAL:"); + fprintf (stderr, "Assembler fatal error:"); vfprintf (stderr, Format, args); (void) putc ('\n', stderr); va_end (args); @@ -385,7 +382,7 @@ as_fatal (Format, args) char *Format; { as_where (); - fprintf (stderr, "FATAL:"); + fprintf (stderr, "Assembler fatal error:"); _doprnt (Format, &args, stderr); (void) putc ('\n', stderr); /* as_where(); */ @@ -395,4 +392,44 @@ as_fatal (Format, args) #endif /* not NO_VARARGS */ #endif /* not NO_STDARG */ +void +fprint_value (file, val) + FILE *file; + valueT val; +{ + if (sizeof (val) <= sizeof (long)) + { + fprintf (file, "%ld", val); + return; + } +#ifdef BFD_ASSEMBLER + if (sizeof (val) <= sizeof (bfd_vma)) + { + fprintf_vma (file, val); + return; + } +#endif + abort (); +} + +void +sprint_value (buf, val) + char *buf; + valueT val; +{ + if (sizeof (val) <= sizeof (long)) + { + sprintf (buf, "%ld", val); + return; + } +#ifdef BFD_ASSEMBLER + if (sizeof (val) <= sizeof (bfd_vma)) + { + sprintf_vma (buf, val); + return; + } +#endif + abort (); +} + /* end of messages.c */ -- 2.30.2