This commit is contained in:
parent
a30edadac9
commit
2063898739
1 changed files with 29 additions and 0 deletions
29
src/macros.h
Normal file
29
src/macros.h
Normal 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); }
|
||||
|
||||
|
Loading…
Reference in a new issue