Some more debug macros
This commit is contained in:
parent
572bee19cc
commit
0659cf73f6
@ -10,6 +10,10 @@ void kmain()
|
||||
|
||||
debug("Hello from debug printing function!\n");
|
||||
debug("A number:%d\n", 12345);
|
||||
debug_info("Here's some info\n");
|
||||
debug_ok("This thing worked well!\n");
|
||||
debug_warning("Careful!\n");
|
||||
debug_error("Something went wrong!\n");
|
||||
for(;;);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user