From 8062bce835681d8200666ad183fe8cf3f6d87468 Mon Sep 17 00:00:00 2001 From: Arnavion Date: Thu, 4 Dec 2014 04:06:38 -0800 Subject: Fix some obvious type warnings. --- plugins/mpcinfo/functions.c | 101 +++++++++++++++++++------------------------- 1 file changed, 44 insertions(+), 57 deletions(-) (limited to 'plugins/mpcinfo/functions.c') diff --git a/plugins/mpcinfo/functions.c b/plugins/mpcinfo/functions.c index ff2d563e..de2e8a40 100644 --- a/plugins/mpcinfo/functions.c +++ b/plugins/mpcinfo/functions.c @@ -14,54 +14,25 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -/* -typedef int (*MYPROC)(HWND,HWND,char*,char*,BOOL,BOOL); - -int dllProc(char *name, char *data){ - HINSTANCE hinstLib; - hinstLib = LoadLibrary("mpcinfo"); - //MYPROC proc; - int res; - if (hinstLib != NULL){ - //proc = ; - if ((MYPROC) GetProcAddress(hinstLib, name)!=NULL){ - res=(MYPROC)(NULL,NULL,data,NULL,TRUE,TRUE); - } - else{fprintf(stderr,"can't get proc: %s\n",name);res=-2;} - } - else{fprintf(stderr,"can't access dll\n");return -1;} - FreeLibrary(hinstLib); - return res; -} -*/ - -/* -int dllProc(char *name, char *data) +char *split(char *text, char separator) { - static HMODULE lib = NULL; - if (!lib) + int pos = -1; + size_t i; + for (i = 0; i < strlen(text); i++) { - lib = LoadLibraryA ("mpcinfo"); - if (!lib) - { - return FALSE; + if (text[i] == separator) { + pos = i; + i = strlen(text) + 1; } - FreeLibrary (lib); } - return TRUE; -} -*/ + if (pos == -1) + { + return text; + } -char *split(char *text, char seperator){ - //if (DEBUG==1) putlog("splitting"); - int i;int pos=-1; - for (i=0;i