Remove building with NOCRYPTO option
[minix.git] / minix / include / ddekit / assert.h
blobe5450c9c5739cc612009c6edb4da3f056bfb13db
1 #ifndef _ddekit_assert_h
2 #define _ddekit_assert_h
3 #include <ddekit/ddekit.h>
5 #include <ddekit/printf.h>
6 #include <ddekit/panic.h>
8 /** \file ddekit/assert.h */
10 /** Assert that an expression is true and panic if not.
11 * \ingroup DDEKit_util
13 #define ddekit_assert(expr) do \
14 { \
15 if (!(expr)) { \
16 ddekit_print("\033[31;1mDDE: Assertion failed: "#expr"\033[0m\n"); \
17 ddekit_printf(" File: %s:%d\n",__FILE__,__LINE__); \
18 ddekit_printf(" Function: %s()\n", __FUNCTION__); \
19 ddekit_panic("Assertion failed."); \
20 }} while (0);
21 #define Assert ddekit_assert
23 #endif