diff options
author | gramanas <anastasis.gramm2@gmail.com> | 2018-04-22 05:47:33 +0300 |
---|---|---|
committer | gramanas <anastasis.gramm2@gmail.com> | 2018-04-22 05:47:33 +0300 |
commit | eeca7f0151d85d563d1db229e3b7ca936323ffa2 (patch) | |
tree | 32e57172bd786daed9ac4251b3c5edf09c49d242 /src/confparser.h | |
parent | 3560d8be4b833e888e8386a3dc641fa164b4b808 (diff) | |
download | ck-eeca7f0151d85d563d1db229e3b7ca936323ffa2.tar.gz ck-eeca7f0151d85d563d1db229e3b7ca936323ffa2.tar.bz2 ck-eeca7f0151d85d563d1db229e3b7ca936323ffa2.zip |
First steps towards adding to the db
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 |