[go: up one dir, main page]

Menu

[r1]: / include / assert.h  Maximize  Restore  History

Download this file

23 lines (15 with data), 442 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
/* assert.h - Assert macro for CMOC
By Pierre Sarrazin <http://sarrazip.com/>.
This file is in the public domain.
*/
#ifndef _ASSERT_H
#define _ASSERT_H
#include <cmoc.h>
#ifdef NDEBUG
#define assert(cond)
#else
#define assert(cond) do { if (!(cond)) { \
printf("***ASSERT FAILED: %s:%u: %s\n", __FILE__, __LINE__, #cond); \
for (;;); } } while (0)
#endif
#endif /* _ASSERT_H */