4 * This code is published under the terms of the Acess licence.
5 * See the file COPYING for details.
7 * config.h - Config Header
12 #include <stdbool.h> // Because C
14 // === HELPER MACROS ===
16 #define EXPSTR(x) _EXPSTR(x)
18 #define ASSERT(cnd) do{if(!(cnd)){fprintf(stderr, "ASSERT failed at "__FILE__":"EXPSTR(__LINE__)" - "EXPSTR(cnd)"\n");exit(-1);}}while(0)
22 // --- Config Database ---
23 extern int Config_ParseFile(const char *Filename);
25 extern void Config_AddValue(const char *Key, const char *Value);
27 extern int Config_GetValueCount(const char *KeyName);
28 extern const char *Config_GetValue_Idx(const char *KeyName, int Index);
30 extern bool Config_GetValue_Str(const char *KeyName, const char** ValPtr);
31 extern bool Config_GetValue_Bool(const char *KeyName, bool* ValPtr);
32 extern bool Config_GetValue_Int(const char *KeyName, int* ValPtr);