1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Dave Chapman 2005-06-18 19:19:12 +00:00
parent 961c9a3e41
commit 33001cb4f0
2 changed files with 16 additions and 0 deletions

View file

@ -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

View file

@ -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) */