diff options
author | Ken Raeburn <raeburn@cygnus> | 1993-10-11 20:17:28 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@cygnus> | 1993-10-11 20:17:28 +0000 |
commit | 8d3be8030ebb731b726197826704f612b6fd237a (patch) | |
tree | 332d056125ddb0c3103fc41f2eb38ac5d8d88468 /gas/messages.c | |
parent | 7da354f4ac77ad398d20a8f486e93acb6496cea7 (diff) | |
download | gdb-8d3be8030ebb731b726197826704f612b6fd237a.zip gdb-8d3be8030ebb731b726197826704f612b6fd237a.tar.gz gdb-8d3be8030ebb731b726197826704f612b6fd237a.tar.bz2 |
* messages.c (as_fatal): Do mention that it's the assembler that
got the fatal error.
Diffstat (limited to 'gas/messages.c')
-rw-r--r-- | gas/messages.c | 59 |
1 files changed, 48 insertions, 11 deletions
diff --git a/gas/messages.c b/gas/messages.c index ef07fc4..80c1d85 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 */ |