summaryrefslogtreecommitdiffstats
path: root/conf/conf.h
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1998-11-29 22:59:37 +0100
committerMartin Mares <mj@ucw.cz>1998-11-29 22:59:37 +0100
commit49e4a4d1fd64da045182f6ccd38753feb364f9c5 (patch)
treeb92509e77cf0ba1bfdf87a58625591bafabd9ff5 /conf/conf.h
parent5cd462f291b45a6a33168cdfbc4ba55ee068af65 (diff)
downloadbird-49e4a4d1fd64da045182f6ccd38753feb364f9c5.tar
bird-49e4a4d1fd64da045182f6ccd38753feb364f9c5.zip
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.h7
1 files changed, 7 insertions, 0 deletions
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);