30 lines
597 B
C
30 lines
597 B
C
|
|
#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); }
|
|
|
|
|