Nebula debug macros.
n_assert() - the vanilla assert() Macro n_verify() - like assert() except that the statement in parens is simply evaluated, unchecked, if __NEBULA_NO_ASSERT is set n_assert2() - an assert() plus a message from the programmer
- Copyright
- (C) 2002 RadonLabs GmbH (C) 2013-2020 Individual contributors, see AUTHORS file
|
#define | n_message n_confirm |
|
#define | n_assert(exp) { if (!(exp)) n_barf(#exp, __FILE__, __LINE__); } |
|
#define | n_assert2(exp, msg) { if (!(exp)) n_barf2(#exp, msg, __FILE__, __LINE__); } |
|
#define | n_assert_msg(exp, msg) n_assert2(exp, msg) |
|
#define | n_assert_fmt(exp, msg, ...) { if (!(exp)) n_barf_fmt(#exp, msg, __FILE__, __LINE__, __VA_ARGS__); } |
|
#define | n_warn(exp) { if (!(exp)) n_cough(#exp, __FILE__, __LINE__); } |
|
#define | n_warn2(exp, msg) { if (!(exp)) n_cough2(#exp, msg, __FILE__, __LINE__); } |
|
#define | n_warn_fmt(exp, msg, ...) { if (!(exp)) n_cough_fmt(#exp, msg, __FILE__, __LINE__, __VA_ARGS__); } |
|
#define | n_crash(msg) { n_error("*** NEBULA CRASH ***\n%s(%d)\nmessage: %s\n", __FILE__, __LINE__, msg); } |
|
#define | n_static_assert(exp) { int _x[ 2*((exp) != 0)-1 ]; (void)(_x[0]=0);} |
|
|
void | n_printf (const char *,...) __attribute__((format(printf |
|
void void | n_error (const char *,...) __attribute__((format(printf |
|
void void void | n_dbgout (const char *,...) __attribute__((format(printf |
|
void void void void | n_warning (const char *,...) __attribute__((format(printf |
|
void void void void void | n_confirm (const char *,...) __attribute__((format(printf |
|
void void void void void void | n_sleep (double) |
| Put process to sleep.
|
|
void | n_barf (const char *, const char *, int) |
| This function is called by n_assert() when the assertion fails.
|
|
void | n_barf2 (const char *, const char *, const char *, int) |
| This function is called by n_assert2() when the assertion fails.
|
|
void | n_barf_fmt (const char *, const char *, const char *, int,...) |
|
void | n_cough (const char *, const char *, int) |
| This function is called by n_assert() when the assertion fails.
|
|
void | n_cough2 (const char *, const char *, const char *, int) |
| This function is called by n_assert2() when the assertion fails.
|
|
void | n_cough_fmt (const char *, const char *, const char *, int,...) |
|
void | n_break () |
|