21 static void debugprintf(const char *format, ...)
25 const char *p="%s:%d ";
26 size_t plen = strlen(p);
28 f = (char *)malloc(plen + strlen(format) + 1);
31 memcpy(f + plen, format, strlen(format) + 1);
32 vfprintf(stderr, f, ap);
36 static void dummyprintf(const char *format, ...)
43 #define DEBUGP debugprintf
45 #define DEBUGP(args...) do { fprintf(stderr, "%s:%d ", __FILE__, __LINE__); fprintf(stderr, ## args); } while(0)
49 #define DEBUGP dummyprintf
51 #define DEBUGP(args...)