X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=src%2Fcommon%2Fconfig.h;h=34d7dc684e1f078abf04dcb5e4307cd11fe37a10;hb=9caffbc7ed251136bab144a957058e7d9f470b00;hp=1e7583ed91a03fe1588bdfa97950ed3b4d8f2628;hpb=6d657891a5410b7d93cc90f376a3ef27b72b20f6;p=tpg%2Fopendispense2.git diff --git a/src/common/config.h b/src/common/config.h index 1e7583e..34d7dc6 100644 --- a/src/common/config.h +++ b/src/common/config.h @@ -9,9 +9,7 @@ #ifndef _CONFIG_H_ #define _CONFIG_H_ -#include -extern void CompileRegex(regex_t *Regex, const char *Pattern, int Flags); -extern int RunRegex(regex_t *regex, const char *string, int nMatches, regmatch_t *matches, const char *errorMessage); +#include // Because C // === HELPER MACROS === #define _EXPSTR(x) #x @@ -22,11 +20,15 @@ extern int RunRegex(regex_t *regex, const char *string, int nMatches, regmatch_t // --- Config Database --- -extern void Config_ParseFile(const char *Filename); +extern int Config_ParseFile(const char *Filename); + extern void Config_AddValue(const char *Key, const char *Value); + extern int Config_GetValueCount(const char *KeyName); -extern const char *Config_GetValue(const char *KeyName, int Index); -extern int Config_GetValue_Bool(const char *KeyName, int Index); -extern int Config_GetValue_Int(const char *KeyName, int Index); +extern const char *Config_GetValue_Idx(const char *KeyName, int Index); + +extern bool Config_GetValue_Str(const char *KeyName, const char** ValPtr); +extern bool Config_GetValue_Bool(const char *KeyName, bool* ValPtr); +extern bool Config_GetValue_Int(const char *KeyName, int* ValPtr); #endif