1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#include <features.h> /* debug levels: */ enum { DEBUG_EVENT = 010, DEBUG_PROCESS = 020, DEBUG_FUNCTION = 040 }; void debug_(int level, const char *file, int line, const char *fmt, ...) __attribute__((format(printf,4,5))); int xinfdump(long, void *, int); # define debug(level, expr...) debug_(level, __FILE__, __LINE__, expr)