2013-05-05 18:18:41 +02:00
|
|
|
#ifndef _SASSERT_H
|
|
|
|
#define _SASSERT_H
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "_ansi.h"
|
|
|
|
|
|
|
|
#undef sassert
|
|
|
|
|
|
|
|
#ifdef NDEBUG /* required by ANSI standard */
|
2013-06-12 19:21:00 +02:00
|
|
|
#define sassert(e,msg) ((void)0)
|
2013-05-05 18:18:41 +02:00
|
|
|
#else
|
2013-08-11 22:41:39 +02:00
|
|
|
// Causes a blue screen of death if e is not true with the msg "msg" displayed
|
2013-06-12 19:21:00 +02:00
|
|
|
#define sassert(e,msg) ((e) ? (void)0 : __sassert(__FILE__, __LINE__, #e, msg))
|
2013-05-05 18:18:41 +02:00
|
|
|
|
|
|
|
#endif /* NDEBUG */
|
|
|
|
|
|
|
|
void __sassert(const char *fileName, int lineNumber, const char* conditionString, const char* message);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif //_SASSERT_H
|