From 33001cb4f00a52c0d8ea9ba695f7d310eefd9901 Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Sat, 18 Jun 2005 19:19:12 +0000 Subject: Add logf to the plugin interface (use the LOGF macro) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6749 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugin.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'apps/plugin.h') diff --git a/apps/plugin.h b/apps/plugin.h index 3990ffeed4..dbfdca516e 100644 --- a/apps/plugin.h +++ b/apps/plugin.h @@ -60,6 +60,7 @@ #endif #ifdef PLUGIN + #if defined(DEBUG) || defined(SIMULATOR) #undef DEBUGF #define DEBUGF rb->debugf @@ -69,6 +70,14 @@ #define DEBUGF(...) #define LDEBUGF(...) #endif + +#ifdef ROCKBOX_HAS_LOGF +#undef LOGF +#define LOGF rb->logf +#else +#define LOGF(...) +#endif + #endif #ifdef SIMULATOR @@ -381,6 +390,9 @@ struct plugin_api { /* new stuff at the end, sort into place next time the API gets incompatible */ +#ifdef ROCKBOX_HAS_LOGF + void (*logf)(const char *fmt, ...); +#endif }; /* defined by the plugin loader (plugin.c) */ -- cgit v1.2.3