Use the CHECK macros from the common dir
git-svn-id: svn://svn.cc65.org/cc65/trunk@251 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -41,22 +41,6 @@
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Data */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
/* Messages for internal compiler errors */
|
||||
const char _MsgCheckFailed [] =
|
||||
"Check failed: `%s' (= %d), file `%s', line %u\n";
|
||||
const char _MsgPrecondition [] =
|
||||
"Precondition violated: `%s' (= %d), file `%s', line %u\n";
|
||||
const char _MsgFail [] =
|
||||
"%s, file `%s', line %u\n";
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Code */
|
||||
/*****************************************************************************/
|
||||
|
||||
@@ -43,19 +43,6 @@
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Data */
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
|
||||
/* Messages for internal compiler errors */
|
||||
extern const char _MsgCheckFailed [];
|
||||
extern const char _MsgPrecondition [];
|
||||
extern const char _MsgFail [];
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Code */
|
||||
/*****************************************************************************/
|
||||
@@ -71,17 +58,6 @@ void Error (const char* Format, ...) attribute((format(printf,1,2)));
|
||||
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 */
|
||||
|
||||
Reference in New Issue
Block a user