diff options
author | Martin Mares <mj@ucw.cz> | 1998-11-29 21:59:37 +0000 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 1998-11-29 21:59:37 +0000 |
commit | 49e4a4d1fd64da045182f6ccd38753feb364f9c5 (patch) | |
tree | b92509e77cf0ba1bfdf87a58625591bafabd9ff5 /conf/conf.h | |
parent | 5cd462f291b45a6a33168cdfbc4ba55ee068af65 (diff) |
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.
Diffstat (limited to 'conf/conf.h')
-rw-r--r-- | conf/conf.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/conf/conf.h b/conf/conf.h index 6a0a328d..93d1edd7 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); |