X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fconf.c;h=2293cdae84a836ab7b22e0d6504e2003c80d228f;hb=8e6f42243848d33e5044ae6b47596245e3609bbe;hp=b29b768285fb8add587f7443ee155a78180e748c;hpb=8e980d3d2841276a15dea2dfe4f7cd2b62e5a7dc;p=libucw.git diff --git a/lib/conf.c b/lib/conf.c index b29b7682..2293cdae 100644 --- a/lib/conf.c +++ b/lib/conf.c @@ -1,8 +1,8 @@ /* - * Sherlock Library -- Reading of configuration files + * UCW Library -- Reading of configuration files * * (c) 2001 Robert Spalek - * (c) 2003 Martin Mares + * (c) 2003--2005 Martin Mares * * This software may be freely distributed and used according to the terms * of the GNU Lesser General Public License. @@ -11,7 +11,7 @@ #include "lib/lib.h" #include "lib/chartype.h" #include "lib/fastbuf.h" -#include "lib/pools.h" +#include "lib/mempool.h" #include "lib/conf.h" @@ -28,6 +28,10 @@ static struct cfitem *cfsection; struct mempool *cfpool; +#ifndef DEFAULT_CONFIG +#define DEFAULT_CONFIG NULL +#endif + byte *cfdeffile = DEFAULT_CONFIG; static void CONSTRUCTOR @@ -42,6 +46,12 @@ cfg_malloc(uns size) return mp_alloc(cfpool, size); } +void * +cfg_malloc_zero(uns size) +{ + return mp_alloc_zero(cfpool, size); +} + byte * cfg_strdup(byte *s) {