diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-05-06 11:25:44 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-05-06 11:25:44 +0000 |
commit | c84439aec3f08c4de8f4adc45e5f6d709d496b5e (patch) | |
tree | 18a51d7c4d44a446460382f0f8481010ef27937e /firmware/debug.c | |
parent | 00f090ff1cab0247129f75ba28e4b4a3118505d5 (diff) | |
download | rockbox-c84439aec3f08c4de8f4adc45e5f6d709d496b5e.tar.gz rockbox-c84439aec3f08c4de8f4adc45e5f6d709d496b5e.zip |
make debugf() do properly when SIMULATOR is defined, ignore the CRT_DISPLAY
and use the symbol we'll always have defined when running on host
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@474 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/debug.c')
-rw-r--r-- | firmware/debug.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/firmware/debug.c b/firmware/debug.c index ae0fbe72c6..42b04ba605 100644 --- a/firmware/debug.c +++ b/firmware/debug.c | |||
@@ -25,7 +25,7 @@ | |||
25 | char debugmembuf[100]; | 25 | char debugmembuf[100]; |
26 | char debugbuf[200]; | 26 | char debugbuf[200]; |
27 | 27 | ||
28 | #ifndef CRT_DISPLAY /* allow non archos platforms to display output */ | 28 | #ifndef SIMULATOR /* allow non archos platforms to display output */ |
29 | 29 | ||
30 | static int debug_tx_ready(void) | 30 | static int debug_tx_ready(void) |
31 | { | 31 | { |
@@ -187,17 +187,15 @@ void debugf(char *fmt, ...) | |||
187 | #endif | 187 | #endif |
188 | } | 188 | } |
189 | 189 | ||
190 | #else | 190 | #else /* SIMULATOR code coming up */ |
191 | 191 | ||
192 | void debugf(char *fmt, ...) | 192 | void debugf(char *fmt, ...) |
193 | { | 193 | { |
194 | #ifdef DEBUG | ||
195 | va_list ap; | 194 | va_list ap; |
196 | 195 | ||
197 | va_start( ap, fmt ); | 196 | va_start( ap, fmt ); |
198 | vsnprintf( debugmembuf, sizeof(debugmembuf), fmt, ap ); | 197 | vsnprintf( debugmembuf, sizeof(debugmembuf), fmt, ap ); |
199 | va_end( ap ); | 198 | va_end( ap ); |
200 | printf( debugmembuf ); | 199 | printf( "%s", debugmembuf ); |
201 | #endif | ||
202 | } | 200 | } |
203 | #endif | 201 | #endif |