From 49e4a4d1fd64da045182f6ccd38753feb364f9c5 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 29 Nov 1998 21:59:37 +0000 Subject: Created new functions for allocating configuration data: o cfg_alloc(size) -- generic memory allocation o cfg_allocu(size) -- unaligned memory allocation o cfg_allocz(size) -- zeroed memory allocation o cfg_strcpy(str) -- allocate a copy of a string Also fixed a bug in lexing of string literals. --- conf/conf.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'conf/conf.h') diff --git a/conf/conf.h b/conf/conf.h index 6a0a328..93d1edd 100644 --- a/conf/conf.h +++ b/conf/conf.h @@ -11,9 +11,16 @@ #include "lib/resource.h" +/* Pools */ + extern pool *cfg_pool; extern mempool *cfg_mem; +#define cfg_alloc(size) mp_alloc(cfg_mem, size) +#define cfg_allocu(size) mp_allocu(cfg_mem, size) +#define cfg_allocz(size) mp_allocz(cfg_mem, size) +char *cfg_strcpy(char *c); + /* Lexer */ extern int (*cf_read_hook)(byte *buf, unsigned int max); -- cgit v1.2.3