X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fld65%2Ferror.h;h=a29a0822986f6fd91deffff9571d75e37d25d264;hb=a152fe71c59ce2ee49886ab582bd9122ff8620ac;hp=9f213abe2ea53da82328a77219543cf83eadbf14;hpb=53dd513176425872128ef26031d00952ef7a0628;p=cc65 diff --git a/src/ld65/error.h b/src/ld65/error.h index 9f213abe2..a29a08229 100644 --- a/src/ld65/error.h +++ b/src/ld65/error.h @@ -1,15 +1,15 @@ /*****************************************************************************/ /* */ -/* global.h */ +/* error.h */ /* */ /* Error handling for the ld65 linker */ /* */ /* */ /* */ -/* (C) 1998 Ullrich von Bassewitz */ -/* Wacholderweg 14 */ -/* D-70597 Stuttgart */ -/* EMail: uz@musoftware.de */ +/* (C) 1998-2000 Ullrich von Bassewitz */ +/* Wacholderweg 14 */ +/* D-70597 Stuttgart */ +/* EMail: uz@musoftware.de */ /* */ /* */ /* This software is provided 'as-is', without any expressed or implied */ @@ -38,16 +38,8 @@ -/*****************************************************************************/ -/* Data */ -/*****************************************************************************/ - - - -/* Messages for internal compiler errors */ -extern const char _MsgCheckFailed []; -extern const char _MsgPrecondition []; -extern const char _MsgFail []; +/* common */ +#include "attrib.h" @@ -57,27 +49,16 @@ extern const char _MsgFail []; -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((format(printf,1,2))); /* Print an error message and die */ -void Internal (const char* Format, ...); +void Internal (const char* Format, ...) attribute((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 */