version 1.24, 2012/10/18 17:54:43 |
version 1.25, 2015/09/27 16:58:16 |
|
|
|
|
int fatal_errors = 0; |
int fatal_errors = 0; |
|
|
static void ParseVErrorInternal(const Location *, int, const char *, va_list); |
static void ParseVErrorInternal(const Location *, int, const char *, va_list) |
|
__attribute__((__format__ (printf, 3, 0))); |
/*- |
/*- |
* Error -- |
* Error -- |
* Print an error message given its format. |
* Print an error message given its format. |
*/ |
*/ |
/* VARARGS */ |
|
void |
void |
Error(char *fmt, ...) |
Error(const char *fmt, ...) |
{ |
{ |
va_list ap; |
va_list ap; |
|
|
|
|
* Side Effects: |
* Side Effects: |
* The program exits |
* The program exits |
*/ |
*/ |
/* VARARGS */ |
|
void |
void |
Fatal(char *fmt, ...) |
Fatal(const char *fmt, ...) |
{ |
{ |
va_list ap; |
va_list ap; |
|
|
|
|
* Side Effects: |
* Side Effects: |
* All children are killed indiscriminately and the program Lib_Exits |
* All children are killed indiscriminately and the program Lib_Exits |
*/ |
*/ |
/* VARARGS */ |
|
void |
void |
Punt(char *fmt, ...) |
Punt(const char *fmt, ...) |
{ |
{ |
if (fmt) { |
if (fmt) { |
va_list ap; |
va_list ap; |
|
|
* Side Effects: |
* Side Effects: |
* "fatals" is incremented if the level is PARSE_FATAL. |
* "fatals" is incremented if the level is PARSE_FATAL. |
*/ |
*/ |
/* VARARGS */ |
|
static void |
static void |
ParseVErrorInternal(const Location *origin, int type, const char *fmt, |
ParseVErrorInternal(const Location *origin, int type, const char *fmt, |
va_list ap) |
va_list ap) |
|
|
* External interface to ParseVErrorInternal; uses the default filename |
* External interface to ParseVErrorInternal; uses the default filename |
* Line number. |
* Line number. |
*/ |
*/ |
/* VARARGS */ |
|
void |
void |
Parse_Error(int type, const char *fmt, ...) |
Parse_Error(int type, const char *fmt, ...) |
{ |
{ |