From 1c43ee6d4cade51460b22846088a7ba614764a3d Mon Sep 17 00:00:00 2001 From: ian Date: Sun, 27 Jul 2008 14:26:40 +0000 Subject: [PATCH] some debugging message improvements --- hostside/realtime.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hostside/realtime.h b/hostside/realtime.h index ef68f8b..05e1c75 100644 --- a/hostside/realtime.h +++ b/hostside/realtime.h @@ -242,16 +242,19 @@ void ouvprintf_only(const char *fmt, va_list al) void ouprintf_only(const char *fmt, ...) __attribute__((format(printf,1,2))); +extern unsigned long eventcounter; /* for debugging use only ! */ void debug_count_event(const char *what); #define DEBUGP(a,k) (dflags_##a & DBIT_##a##_##k) +#define DPRINTFA ouprintf_only + #define COND_DPRINTF(cond, a,k, fmt, ...) \ - ((cond) ? ouprintf_only("debug " #a "/" #k " : " fmt,##__VA_ARGS__) : (void)0) + ((cond) ? DPRINTFA("debug " #a "/" #k " : " fmt,##__VA_ARGS__) : (void)0) #define DPRINTF(a,k,f,...) COND_DPRINTF(DEBUGP(a,k),a,k,f,##__VA_ARGS__) #define DPRINTF1(a,k,f,...) COND_DPRINTF((DP)=DEBUGP(a,k), a,k,f,##__VA_ARGS__) -#define DPRINTF2(f,...) ((DP) ? ouprintf_only(f,##__VA_ARGS__) : (void)0) +#define DPRINTF2(f,...) ((DP) ? DPRINTFA(f,##__VA_ARGS__) : (void)0) /*---------- tbi ----------*/ -- 2.30.2