diff options
Diffstat (limited to 'src/confparser.h')
-rw-r--r-- | src/confparser.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/confparser.h b/src/confparser.h index fad65d1..076cb0f 100644 --- a/src/confparser.h +++ b/src/confparser.h @@ -24,33 +24,35 @@ typedef enum ConfingVariables ConfVar; -#define X(var, str, name) CV_##var, enum ConfingVariables { CV_NO_VAL_OR_COMMENT, +#define X(var, str, name) CV_##var, CONFIG_VARIABLES_TABLE -}; #undef X +}; typedef enum ConfigParserResults ConfigParserResult; -#define X(var, str, name) \ - CPR_WRONG_##var, enum ConfigParserResults { CPR_OK, CPR_NO_CONFIG_FILE, CPR_WRONG_CONFIG, +#define X(var, str, name) \ + CPR_WRONG_##var, CONFIG_VARIABLES_TABLE -}; #undef X +}; typedef struct ConfigValues Conf; -#define X(var, str, name) char* var; struct ConfigValues { ConfigParserResult result; +#define X(var, str, name) char* var; CONFIG_VARIABLES_TABLE -}; #undef X +}; +/* Parse the configuration file and fill the conf struct */ extern int config_file_parse(Conf *conf, UserOpt *opt); extern int init_create_config_file(UserOpt *opt); + #endif // CONFPARSER_H |