1989-05-16 13:13:53 +00:00
|
|
|
/*
|
|
|
|
* assert.h - diagnostics
|
|
|
|
*
|
|
|
|
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
|
|
|
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
|
|
|
*/
|
|
|
|
/* $Header$ */
|
|
|
|
|
1990-01-29 10:09:00 +00:00
|
|
|
void __bad_assertion(const char *_expr, const char *_file, int _line);
|
1989-05-16 13:13:53 +00:00
|
|
|
|
|
|
|
#undef assert
|
|
|
|
|
1989-09-29 15:46:33 +00:00
|
|
|
#if defined(NDEBUG)
|
1989-05-16 13:13:53 +00:00
|
|
|
#define assert(ignore) ((void)0)
|
|
|
|
#else
|
1989-09-29 15:46:33 +00:00
|
|
|
#define assert(expr) ((expr)? (void)0 : __bad_assertion( #expr, __FILE__, __LINE__))
|
1989-05-16 13:13:53 +00:00
|
|
|
#endif /* NDEBUG */
|