|
|
|
@ -1,4 +1,4 @@ |
|
|
|
|
/* $Id: errwarn.c,v 1.23 2001/08/30 03:45:26 peter Exp $
|
|
|
|
|
/* $Id: errwarn.c,v 1.24 2001/09/16 05:39:35 peter Exp $
|
|
|
|
|
* Error and warning reporting and related functions. |
|
|
|
|
* |
|
|
|
|
* Copyright (C) 2001 Peter Johnson |
|
|
|
@ -45,7 +45,7 @@ |
|
|
|
|
#include "globals.h" |
|
|
|
|
#include "errwarn.h" |
|
|
|
|
|
|
|
|
|
RCSID("$Id: errwarn.c,v 1.23 2001/08/30 03:45:26 peter Exp $"); |
|
|
|
|
RCSID("$Id: errwarn.c,v 1.24 2001/09/16 05:39:35 peter Exp $"); |
|
|
|
|
|
|
|
|
|
/* Total error count for entire assembler run.
|
|
|
|
|
* Assembler should exit with EXIT_FAILURE if this is >= 0 on finish. */ |
|
|
|
@ -126,7 +126,11 @@ InternalError(unsigned int line, char *file, char *message) |
|
|
|
|
{ |
|
|
|
|
fprintf(stderr, _("INTERNAL ERROR at %s, line %d: %s\n"), file, line, |
|
|
|
|
message); |
|
|
|
|
#ifdef HAVE_ABORT |
|
|
|
|
abort(); |
|
|
|
|
#else |
|
|
|
|
exit(EXIT_FAILURE); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* Report a fatal error. These are unrecoverable (such as running out of
|
|
|
|
@ -135,7 +139,11 @@ void |
|
|
|
|
Fatal(fatal_num num) |
|
|
|
|
{ |
|
|
|
|
fprintf(stderr, "%s %s\n", _("FATAL:"), gettext(fatal_msgs[num])); |
|
|
|
|
#ifdef HAVE_ABORT |
|
|
|
|
abort(); |
|
|
|
|
#else |
|
|
|
|
exit(EXIT_FAILURE); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* Register an error. Uses argtypes as described above to specify the
|
|
|
|
|