From fb153c5570dfe197913239fce5677df7f45edeac Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 4 Jun 2002 22:03:21 +0000 Subject: output debugf() nicely for simulator builds too git-svn-id: svn://svn.rockbox.org/rockbox/trunk@895 a1c6a512-1295-4272-9138-f99709370657 --- firmware/debug.c | 6 +----- firmware/debug.h | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'firmware') diff --git a/firmware/debug.c b/firmware/debug.c index 21583cd4be..00c37cc84c 100644 --- a/firmware/debug.c +++ b/firmware/debug.c @@ -215,13 +215,9 @@ void debug_init(void) void debugf(char *fmt, ...) { -#ifdef DEBUG va_list ap; - va_start( ap, fmt ); - vsnprintf( debugmembuf, sizeof(debugmembuf), fmt, ap ); + vfprintf( stderr, fmt, ap ); va_end( ap ); - printf( "%s", debugmembuf ); -#endif } #endif diff --git a/firmware/debug.h b/firmware/debug.h index 6825566951..876b8511a6 100644 --- a/firmware/debug.h +++ b/firmware/debug.h @@ -25,7 +25,7 @@ extern void debugf(char* fmt,...); #ifdef __GNUC__ /* */ -#ifdef DEBUG +#if defined(DEBUG) || defined(SIMULATOR) #define DEBUGF(...) debugf(__VA_ARGS__) #else #define DEBUGF(...) -- cgit v1.2.3