From: fredrik Date: Sun, 13 Nov 2005 01:25:01 +0000 (+0000) Subject: Add wpfind. X-Git-Tag: 0.1~77 X-Git-Url: http://git.dolda2000.com/gitweb/?p=doldaconnect.git;a=commitdiff_plain;h=a2761258409c929d70fc23735dc7c1c47fe296c4 Add wpfind. git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@514 959494ce-11ee-0310-bf91-de5d638817bd --- diff --git a/daemon/utils.c b/daemon/utils.c index 1175970..8f66370 100644 --- a/daemon/utils.c +++ b/daemon/utils.c @@ -777,3 +777,13 @@ void freewcspair(struct wcspair *pair, struct wcspair **list) free(pair->val); free(pair); } + +wchar_t *wpfind(struct wcspair *list, wchar_t *key) +{ + for(; list != NULL; list = list->next) + { + if(!wcscmp(list->key, key)) + return(list->val); + } + return(NULL); +}