X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fcl65%2Ferror.h;h=5517d91f212fc54dbdc428e8adbae47d3167ee76;hb=d02c1cc41719c5d8a3a3ff42be29ef69ebae1533;hp=e029eb5c3f0e88cf51a4a33f42ffcda9b72c3d8b;hpb=53dd513176425872128ef26031d00952ef7a0628;p=cc65 diff --git a/src/cl65/error.h b/src/cl65/error.h index e029eb5c3..5517d91f2 100644 --- a/src/cl65/error.h +++ b/src/cl65/error.h @@ -6,10 +6,10 @@ /* */ /* */ /* */ -/* (C) 1998 Ullrich von Bassewitz */ -/* Wacholderweg 14 */ -/* D-70597 Stuttgart */ -/* EMail: uz@musoftware.de */ +/* (C) 1998-2003 Ullrich von Bassewitz */ +/* Römerstrasse 52 */ +/* D-70794 Filderstadt */ +/* EMail: uz@cc65.org */ /* */ /* */ /* This software is provided 'as-is', without any expressed or implied */ @@ -38,45 +38,21 @@ -/*****************************************************************************/ -/* Data */ -/*****************************************************************************/ - - - -/* Messages for internal compiler errors */ -extern const char _MsgCheckFailed []; -extern const char _MsgPrecondition []; -extern const char _MsgFail []; - - - /*****************************************************************************/ /* Code */ /*****************************************************************************/ -void Warning (const char* Format, ...); +void Warning (const char* Format, ...) attribute((format(printf,1,2))); /* Print a warning message */ -void Error (const char* Format, ...); +void Error (const char* Format, ...) attribute((noreturn, format(printf,1,2))); /* Print an error message and die */ -void Internal (const char* Format, ...); +void Internal (const char* Format, ...) attribute((noreturn, format(printf,1,2))); /* Print an internal error message and die */ -#define CHECK(c) \ - if (!(c)) \ - Internal (_MsgCheckFailed, #c, c, __FILE__, __LINE__) - -#define PRECONDITION(c) \ - if (!(c)) \ - Internal (_MsgPrecondition, #c, c, __FILE__, __LINE__) - -#define FAIL(s) \ - Internal (_MsgFail, s, __FILE__, __LINE__) - /* End of error.h */