1 /* assert.h that calls abort as Exit(-1)
2 for applications that do not care about Exit, regular assert may be used */
4 #include <basic/Exit.h>
6 #ifndef Already_Included_Assert
7 #define Already_Included_Assert 1
11 #if !defined(NDEBUG) || defined(ASSERTIONS_ANYWAY)
13 # define assert(ex) ((void)((ex) || (fprintf(stderr,"\n\nAssertion \"%s\" failed: file \"%s\", line %d\n", #ex, __FILE__, __LINE__), Exit(-2), 0)))
15 # define assert(ex) ((void)0)
18 #endif /* Already_Included_Assert */