From 697dd70ac4832243f6460452f955d19da56ba590 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Stenberg?= Date: Thu, 2 May 2002 14:05:51 +0000 Subject: Changed debug to DEBUGF and panic to panicf. Also some linking changes. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@383 a1c6a512-1295-4272-9138-f99709370657 --- firmware/debug.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'firmware/debug.h') diff --git a/firmware/debug.h b/firmware/debug.h index dc3053c..adedfd9 100644 --- a/firmware/debug.h +++ b/firmware/debug.h @@ -19,7 +19,23 @@ #ifndef DEBUG_H #define DEBUG_H -void debug(char *msg); -void debugf(char *fmt, ...); +extern void debugf(char* fmt,...); + +#ifdef __GNUC__ + +/* GCC handles ellipses in macros, which + means we can avoid the call completely */ +#ifdef DEBUG +#define DEBUGF(fmt,args...) debugf(fmt, ## args) +#else +#define DEBUGF(fmt,args...) +#endif + +#else + +void DEBUGF debugf + +#endif /* GCC */ + #endif -- cgit v1.1