summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/plugin.c3
-rw-r--r--apps/plugin.h4
2 files changed, 6 insertions, 1 deletions
diff --git a/apps/plugin.c b/apps/plugin.c
index 6366580a56..020bf61b1a 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -33,6 +33,7 @@
33 33
34#ifdef SIMULATOR 34#ifdef SIMULATOR
35#include <dlfcn.h> 35#include <dlfcn.h>
36#include <debug.h>
36#define PREFIX(_x_) x11_ ## _x_ 37#define PREFIX(_x_) x11_ ## _x_
37#else 38#else
38#define PREFIX(_x_) _x_ 39#define PREFIX(_x_) _x_
@@ -118,6 +119,7 @@ static struct plugin_api rockbox_api = {
118 srand, 119 srand,
119 rand, 120 rand,
120 splash, 121 splash,
122 qsort,
121}; 123};
122 124
123int plugin_load(char* plugin, void* parameter) 125int plugin_load(char* plugin, void* parameter)
@@ -144,6 +146,7 @@ int plugin_load(char* plugin, void* parameter)
144 if (!pd) { 146 if (!pd) {
145 snprintf(buf, sizeof buf, "Can't open %s", plugin); 147 snprintf(buf, sizeof buf, "Can't open %s", plugin);
146 splash(HZ*2, 0, true, buf); 148 splash(HZ*2, 0, true, buf);
149 DEBUGF("dlopen(%s): %s\n",path,dlerror());
147 dlclose(pd); 150 dlclose(pd);
148 return -1; 151 return -1;
149 } 152 }
diff --git a/apps/plugin.h b/apps/plugin.h
index 3b79edefc6..45acfaf5d7 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -37,7 +37,7 @@
37#include "lcd.h" 37#include "lcd.h"
38 38
39/* increase this every time the api struct changes */ 39/* increase this every time the api struct changes */
40#define PLUGIN_API_VERSION 1 40#define PLUGIN_API_VERSION 2
41 41
42/* plugin return codes */ 42/* plugin return codes */
43enum plugin_status { 43enum plugin_status {
@@ -149,6 +149,8 @@ struct plugin_api {
149 void (*srand)(unsigned int seed); 149 void (*srand)(unsigned int seed);
150 int (*rand)(void); 150 int (*rand)(void);
151 void (*splash)(int ticks, int keymask, bool center, char *fmt, ...); 151 void (*splash)(int ticks, int keymask, bool center, char *fmt, ...);
152 void (*qsort)(void *base, size_t nmemb, size_t size,
153 int(*compar)(const void *, const void *));
152}; 154};
153 155
154/* defined by the plugin loader (plugin.c) */ 156/* defined by the plugin loader (plugin.c) */