diff options
| author | Dave Chapman <dave@dchapman.com> | 2005-06-18 19:19:12 +0000 |
|---|---|---|
| committer | Dave Chapman <dave@dchapman.com> | 2005-06-18 19:19:12 +0000 |
| commit | 33001cb4f00a52c0d8ea9ba695f7d310eefd9901 (patch) | |
| tree | 2d2fec112c59904a81e9e6e69bd0eea4910a8ee2 /apps | |
| parent | 961c9a3e4103e766f52ff1d7c2af2db6119c72ec (diff) | |
| download | rockbox-33001cb4f00a52c0d8ea9ba695f7d310eefd9901.zip rockbox-33001cb4f00a52c0d8ea9ba695f7d310eefd9901.tar.gz rockbox-33001cb4f00a52c0d8ea9ba695f7d310eefd9901.tar.bz2 rockbox-33001cb4f00a52c0d8ea9ba695f7d310eefd9901.tar.xz | |
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
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/plugin.c | 4 | ||||
| -rw-r--r-- | apps/plugin.h | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/apps/plugin.c b/apps/plugin.c index 90b64ef..a44482d 100644 --- a/apps/plugin.c +++ b/apps/plugin.c @@ -327,6 +327,10 @@ static const struct plugin_api rockbox_api = { /* new stuff at the end, sort into place next time the API gets incompatible */ +#ifdef ROCKBOX_HAS_LOGF + logf, +#endif + }; #if CONFIG_HWCODEC == MASNONE diff --git a/apps/plugin.h b/apps/plugin.h index 3990ffe..dbfdca5 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) */ |