summaryrefslogtreecommitdiffstats
path: root/firmware/logf.c
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2006-11-10 08:03:33 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2006-11-10 08:03:33 +0000
commit0dd7ea2d712944b21ede9f57bebd1009b03932e6 (patch)
treedc6065067aa862cc6a71c206b67554270fe507bd /firmware/logf.c
parentae221f140231cb2fd4833443d7810dfce03c606a (diff)
downloadrockbox-0dd7ea2d712944b21ede9f57bebd1009b03932e6.tar.gz
rockbox-0dd7ea2d712944b21ede9f57bebd1009b03932e6.tar.bz2
rockbox-0dd7ea2d712944b21ede9f57bebd1009b03932e6.zip
Support building tagcache db natively on PC using the core of the
Rockbox tagcache database engine. Only host endian support at the moment and no command line parameters. Mainly for developers for debugging at the moment. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11497 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/logf.c')
-rw-r--r--firmware/logf.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/firmware/logf.c b/firmware/logf.c
index fc57bd85bf..2056db5cc4 100644
--- a/firmware/logf.c
+++ b/firmware/logf.c
@@ -27,7 +27,6 @@
#include <string.h>
#include <stdio.h>
#include <stdarg.h>
-#include <sprintf.h>
#include "config.h"
#include "lcd-remote.h"
#include "logf.h"
@@ -36,9 +35,11 @@
/* Only provide all this if asked to */
#ifdef ROCKBOX_HAS_LOGF
+#ifndef __PCTOOL__
unsigned char logfbuffer[MAX_LOGF_LINES][MAX_LOGF_ENTRY];
int logfindex;
bool logfwrap;
+#endif
#ifdef HAVE_REMOTE_LCD
static void displayremote(void)
@@ -77,7 +78,18 @@ static void displayremote(void)
#define displayremote()
#endif
-void logf(const char *format, ...)
+#ifdef __PCTOOL__
+void _logf(const char *format, ...)
+{
+ char buf[1024];
+ va_list ap;
+ va_start(ap, format);
+
+ vsnprintf(buf, sizeof buf, format, ap);
+ printf("DEBUG: %s\n", buf);
+}
+#else
+void _logf(const char *format, ...)
{
int len;
unsigned char *ptr;
@@ -104,5 +116,6 @@ void logf(const char *format, ...)
displayremote();
}
+#endif
#endif