Trying to create a macro which can be used for print debug messages when DEBUG is defined, like the following pseudo code:
#define DEBUG 1 #define debug_prin
#define debug_print(FMT, ARGS...) do { \ if (DEBUG) \ fprintf(stderr, "%s:%d " FMT "\n", __FUNCTION__, __LINE__, ## ARGS); \ } while (0)