chiark / gitweb /
some debugging message improvements
authorian <ian>
Sun, 27 Jul 2008 14:26:40 +0000 (14:26 +0000)
committerian <ian>
Sun, 27 Jul 2008 14:26:40 +0000 (14:26 +0000)
hostside/realtime.h

index ef68f8b496f0e9b93dd27d7f34144a67e6143274..05e1c7561200c9adc972962f8356941a6358b5bd 100644 (file)
@@ -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 ----------*/