Some more debug macros
This commit is contained in:
1 parent
572bee19cc
commit
0659cf73f6
2 files changed
+16
No files matched your search
@@ -4,8 +4,20 @@
|
||||
|
||||
#ifndef NDEBUG
|
||||
#define debug(...) debug_printf(__VA_ARGS__)
|
||||
#define debug_info(...) \
|
||||
do{debug("[INFO] "); debug(__VA_ARGS__);}while(0)
|
||||
#define debug_ok(...) \
|
||||
do{debug("[OK] "); debug(__VA_ARGS__);}while(0)
|
||||
#define debug_warning(...) \
|
||||
do{debug("[WARNING] "); debug(__VA_ARGS__);}while(0)
|
||||
#define debug_error(...) \
|
||||
do{debug("[ERROR] "); debug(__VA_ARGS__);}while(0)
|
||||
#else
|
||||
#define debug(...)
|
||||
#define debug_info(...)
|
||||
#define debug_ok(...)
|
||||
#define debug_warning(...)
|
||||
#define debug_error(...)
|
||||
#endif
|
||||
|
||||
void debug_putch(char c);
|
||||
|
||||
Reference in new issue
Block a user