#if defined DBG #define DEBUG_PRINT(...) printf("[DBG]: "); \ printf(__VA_ARGS__); \ putchar('\n') #else #define DEBUG_PRINT(...) noop #endif
Inspired from stackoverflow: https://stackoverflow.com/questions/20639632/how-to-wrap-printf-into-a-function-or-macro
This can be put into some sort of util.h