1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-06-13 09:29:35 +00:00
8bitworkshop/src/worker/lib/williams/assert.h

21 lines
442 B
C
Raw Normal View History

2022-02-18 17:53:33 +00:00
/* 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 */