This commit is contained in:
glenux 2006-03-06 15:17:16 +00:00
parent a30edadac9
commit 2063898739

29
src/macros.h Normal file
View file

@ -0,0 +1,29 @@
#define COLOR_RED "\x1B[31m"
#define COLOR_GREEN "\x1B[32m"
#define COLOR_YELLOW "\x1B[33m"
#define COLOR_NORMAL "\x1B[0m"
/**************************************************************************
* * Quelques macros
* */
#define pDEBUG(...) if (DEBUG){ \
printf("%s%s%s at %s:%d -- %s",\
COLOR_GREEN,\
__func__,\
COLOR_NORMAL,\
__FILE__,\
__LINE__,\
COLOR_YELLOW); \
printf(__VA_ARGS__); \
printf("%s",COLOR_NORMAL); }
#define pnDEBUG(...) if (DEBUG){ \
printf("%s",COLOR_YELLOW); \
printf(__VA_ARGS__); \
printf("%s",COLOR_NORMAL); \
fflush(stdout); }