blob: 4b8fbf8ae13cfd876e2af818eb5b0b04f03ce97f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#ifndef _ASSERT_H
#define _ASSERT_H 1
#ifdef NDEBUG
#define assert(ignore)((void)0)
#else
#include <stdio.h>
#define assert(condition) \
if(!(condition)) { \
fprintf(stderr, "%s:%s:%s: Assertion '%s' failed!\n", \
__FILE__, __LINE__, __FUNCTION__, #condition); \
abort(); \
}
#endif
#endif
|