diff options
author | Björn Stenberg <bjorn@haxx.se> | 2002-10-20 22:50:58 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2002-10-20 22:50:58 +0000 |
commit | b7b48fea02fdac51071eef084a980cee4bcba221 (patch) | |
tree | ca2e1f55fd67cda98b395eb0259d14426865af4f /firmware/debug.c | |
parent | 1df1e51a030e3a7c87f7e882f67b3c7588353300 (diff) | |
download | rockbox-b7b48fea02fdac51071eef084a980cee4bcba221.tar.gz rockbox-b7b48fea02fdac51071eef084a980cee4bcba221.zip |
Snapshot of file writing code. Bugs remain. Only short names are supported yet.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2726 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/debug.c')
-rw-r--r-- | firmware/debug.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/firmware/debug.c b/firmware/debug.c index 83eb149706..2ebcd86778 100644 --- a/firmware/debug.c +++ b/firmware/debug.c | |||
@@ -195,7 +195,9 @@ static void debug(char *msg) | |||
195 | } | 195 | } |
196 | #endif /* end of DEBUG section */ | 196 | #endif /* end of DEBUG section */ |
197 | 197 | ||
198 | #ifdef __GNUC__ | ||
198 | void debugf(char *fmt, ...) | 199 | void debugf(char *fmt, ...) |
200 | #endif | ||
199 | { | 201 | { |
200 | #ifdef DEBUG | 202 | #ifdef DEBUG |
201 | va_list ap; | 203 | va_list ap; |
@@ -223,4 +225,13 @@ void debugf(char *fmt, ...) | |||
223 | vfprintf( stderr, fmt, ap ); | 225 | vfprintf( stderr, fmt, ap ); |
224 | va_end( ap ); | 226 | va_end( ap ); |
225 | } | 227 | } |
228 | |||
229 | void ldebugf(char* file, int line, char *fmt, ...) | ||
230 | { | ||
231 | va_list ap; | ||
232 | va_start( ap, fmt ); | ||
233 | fprintf( stderr, "%s:%d ", file, line ); | ||
234 | vfprintf( stderr, fmt, ap ); | ||
235 | va_end( ap ); | ||
236 | } | ||
226 | #endif | 237 | #endif |