diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-06-04 22:03:21 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-06-04 22:03:21 +0000 |
commit | fb153c5570dfe197913239fce5677df7f45edeac (patch) | |
tree | 60282707b193abf4a5830c39f43c7288ff5729ff | |
parent | d4c9173888e86582681bcb45a0fa8e397e83dbc8 (diff) | |
download | rockbox-fb153c5570dfe197913239fce5677df7f45edeac.tar.gz rockbox-fb153c5570dfe197913239fce5677df7f45edeac.zip |
output debugf() nicely for simulator builds too
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@895 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/debug.c | 6 | ||||
-rw-r--r-- | firmware/debug.h | 2 |
2 files changed, 2 insertions, 6 deletions
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) | |||
215 | 215 | ||
216 | void debugf(char *fmt, ...) | 216 | void debugf(char *fmt, ...) |
217 | { | 217 | { |
218 | #ifdef DEBUG | ||
219 | va_list ap; | 218 | va_list ap; |
220 | |||
221 | va_start( ap, fmt ); | 219 | va_start( ap, fmt ); |
222 | vsnprintf( debugmembuf, sizeof(debugmembuf), fmt, ap ); | 220 | vfprintf( stderr, fmt, ap ); |
223 | va_end( ap ); | 221 | va_end( ap ); |
224 | printf( "%s", debugmembuf ); | ||
225 | #endif | ||
226 | } | 222 | } |
227 | #endif | 223 | #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,...); | |||
25 | #ifdef __GNUC__ | 25 | #ifdef __GNUC__ |
26 | 26 | ||
27 | /* */ | 27 | /* */ |
28 | #ifdef DEBUG | 28 | #if defined(DEBUG) || defined(SIMULATOR) |
29 | #define DEBUGF(...) debugf(__VA_ARGS__) | 29 | #define DEBUGF(...) debugf(__VA_ARGS__) |
30 | #else | 30 | #else |
31 | #define DEBUGF(...) | 31 | #define DEBUGF(...) |