Move Regex functions into common code and header
[tpg/opendispense2.git] / src / common / config.h
1 /*
2  * OpenDispense2
3  *
4  * This code is published under the terms of the Acess licence.
5  * See the file COPYING for details.
6  *
7  * config.h - Config Header
8  */
9 #ifndef _CONFIG_H_
10 #define _CONFIG_H_
11
12 // === HELPER MACROS ===
13 #define _EXPSTR(x)      #x
14 #define EXPSTR(x)       _EXPSTR(x)
15
16 #define ASSERT(cnd) do{if(!(cnd)){fprintf(stderr, "ASSERT failed at "__FILE__":"EXPSTR(__LINE__)" - "EXPSTR(cnd)"\n");exit(-1);}}while(0)
17
18
19
20 // --- Config Database ---
21 extern void     Config_ParseFile(const char *Filename);
22 extern void     Config_AddValue(const char *Key, const char *Value);
23 extern int      Config_GetValueCount(const char *KeyName);
24 extern const char       *Config_GetValue(const char *KeyName, int Index);
25 extern int      Config_GetValue_Bool(const char *KeyName, int Index);
26 extern int      Config_GetValue_Int(const char *KeyName, int Index);
27
28 #endif

UCC git Repository :: git.ucc.asn.au