summaryrefslogtreecommitdiffstats
path: root/firmware/debug.c
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2002-05-02 14:05:51 +0000
committerBjörn Stenberg <bjorn@haxx.se>2002-05-02 14:05:51 +0000
commit697dd70ac4832243f6460452f955d19da56ba590 (patch)
tree6efaf5db0ee2554a4f9daf4e02c1a4c9736c9c33 /firmware/debug.c
parentbca0f0f5ea8bb29d503a917eb4ef467202c7318c (diff)
downloadrockbox-697dd70ac4832243f6460452f955d19da56ba590.tar.gz
rockbox-697dd70ac4832243f6460452f955d19da56ba590.tar.bz2
rockbox-697dd70ac4832243f6460452f955d19da56ba590.zip
Changed debug to DEBUGF and panic to panicf.
Also some linking changes. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@383 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/debug.c')
-rw-r--r--firmware/debug.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/firmware/debug.c b/firmware/debug.c
index 9d2a6997a0..ae0fbe72c6 100644
--- a/firmware/debug.c
+++ b/firmware/debug.c
@@ -167,7 +167,7 @@ static char *mem2hex (char *mem, char *buf, int count)
return (buf);
}
-void debug(char *msg)
+static void debug(char *msg)
{
debugbuf[0] = 'O';
@@ -177,29 +177,27 @@ void debug(char *msg)
void debugf(char *fmt, ...)
{
+#ifdef DEBUG
va_list ap;
va_start(ap, fmt);
vsnprintf(debugmembuf, sizeof(debugmembuf), fmt, ap);
va_end(ap);
debug(debugmembuf);
+#endif
}
#else
-void debug( const char *message )
-{
- printf( message );
-}
-
void debugf(char *fmt, ...)
{
+#ifdef DEBUG
va_list ap;
va_start( ap, fmt );
vsnprintf( debugmembuf, sizeof(debugmembuf), fmt, ap );
va_end( ap );
printf( debugmembuf );
+#endif
}
#endif
-