summaryrefslogtreecommitdiffstats
path: root/firmware/debug.c
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2002-10-20 22:50:58 +0000
committerBjörn Stenberg <bjorn@haxx.se>2002-10-20 22:50:58 +0000
commitb7b48fea02fdac51071eef084a980cee4bcba221 (patch)
treeca2e1f55fd67cda98b395eb0259d14426865af4f /firmware/debug.c
parent1df1e51a030e3a7c87f7e882f67b3c7588353300 (diff)
downloadrockbox-b7b48fea02fdac51071eef084a980cee4bcba221.tar.gz
rockbox-b7b48fea02fdac51071eef084a980cee4bcba221.tar.bz2
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.c11
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)
}
#endif /* end of DEBUG section */
+#ifdef __GNUC__
void debugf(char *fmt, ...)
+#endif
{
#ifdef DEBUG
va_list ap;
@@ -223,4 +225,13 @@ void debugf(char *fmt, ...)
vfprintf( stderr, fmt, ap );
va_end( ap );
}
+
+void ldebugf(char* file, int line, char *fmt, ...)
+{
+ va_list ap;
+ va_start( ap, fmt );
+ fprintf( stderr, "%s:%d ", file, line );
+ vfprintf( stderr, fmt, ap );
+ va_end( ap );
+}
#endif