X-Git-Url: http://git.dolda2000.com/gitweb/?a=blobdiff_plain;f=include%2Futils.h;h=1c634d81529f4bf382f1e7a4ce5834de7b45f7c0;hb=302a260054ea38d3cb97be6d1a3010082c09265d;hp=d09f17255047f7a57fe776e11a8e001a6ab1e7c7;hpb=c660fffadc2878be45ad247c43025f0502fc4696;p=doldaconnect.git diff --git a/include/utils.h b/include/utils.h index d09f172..1c634d8 100644 --- a/include/utils.h +++ b/include/utils.h @@ -1,6 +1,6 @@ /* * Dolda Connect - Modular multiuser Direct Connect-style client - * Copyright (C) 2004 Fredrik Tolf (fredrik@dolda2000.com) + * Copyright (C) 2004 Fredrik Tolf * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -31,6 +31,11 @@ struct wcspair { wchar_t *val; }; +struct strpair { + struct strpair *next; + char *key; + char *val; +}; /* "Safe" functions */ #ifdef DAEMON @@ -101,6 +106,9 @@ char *base32decode(char *data, size_t *datalen); void _freeparr(void **arr); int _parrlen(void **arr); char *findfile(char *name, char *homedir, int filldef); +struct strpair *newstrpair(char *key, char *val, struct strpair **list); +void freestrpair(struct strpair *pair, struct strpair **list); +char *spfind(struct strpair *list, char *key); struct wcspair *newwcspair(wchar_t *key, wchar_t *val, struct wcspair **list); void freewcspair(struct wcspair *pair, struct wcspair **list); wchar_t *wpfind(struct wcspair *list, wchar_t *key);