initial commit
This commit is contained in:
16
include/debug.h
Normal file
16
include/debug.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef DEBUG_H
|
||||
#define DEBUG_H
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
extern int g_debug; // Global debug flag
|
||||
|
||||
#define DEBUG_LOG(fmt, ...) \
|
||||
do { \
|
||||
if (g_debug) { \
|
||||
fprintf(stderr, "[DEBUG] " fmt "\n", ##__VA_ARGS__); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#endif // DEBUG_H
|
||||
|
||||
Reference in New Issue
Block a user