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.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'firmware/debug.c') diff --git a/firmware/debug.c b/firmware/debug.c index 9d2a699..ae0fbe7 100644 --- a/firmware/debug.c +++ b/firmware/debug.c @@ -167,7 +167,7 @@ static char *mem2hex (char *mem, char *buf, int count) return (buf); } -void debug(char *msg) +static void debug(char *msg) { debugbuf[0] = 'O'; @@ -177,29 +177,27 @@ void debug(char *msg) void debugf(char *fmt, ...) { +#ifdef DEBUG va_list ap; va_start(ap, fmt); vsnprintf(debugmembuf, sizeof(debugmembuf), fmt, ap); va_end(ap); debug(debugmembuf); +#endif } #else -void debug( const char *message ) -{ - printf( message ); -} - void debugf(char *fmt, ...) { +#ifdef DEBUG va_list ap; va_start( ap, fmt ); vsnprintf( debugmembuf, sizeof(debugmembuf), fmt, ap ); va_end( ap ); printf( debugmembuf ); +#endif } #endif - -- cgit v1.1