aboutsummaryrefslogtreecommitdiffstats
path: root/src/confparser.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/confparser.h')
-rw-r--r--src/confparser.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/confparser.h b/src/confparser.h
index ebcf0c7..10e7e18 100644
--- a/src/confparser.h
+++ b/src/confparser.h
@@ -18,15 +18,16 @@
#include "clparser.h"
-#define CONFIG_VARIABLES_TABLE \
- X(vc_dir, " version_control_dir = %s ", "Version Control directory") \
- X(scrt_dir, " secret_dir = %s " , "Secret directory") \
- X(home_dir, " home_dir = %s " , "Home directory")
+/* name | match str | desc | optional */
+#define CONFIG_VARIABLES_TABLE \
+ X(vc_dir, " version_control_dir = %s ", "Version Control directory", 0) \
+ X(scrt_dir, " secret_dir = %s " , "Secret directory", 1) \
+ X(home_dir, " home_dir = %s " , "Home directory", 0)
enum ConfingVariables {
CV_NO_VAL_OR_COMMENT,
CV_WRONG_VAL,
-#define X(var, str, name) CV_##var,
+#define X(var, str, name, optional) CV_##var,
CONFIG_VARIABLES_TABLE
#undef X
};
@@ -34,7 +35,7 @@ typedef enum ConfingVariables ConfVar;
typedef struct ConfigValues Conf;
struct ConfigValues {
-#define X(var, str, name) char* var;
+#define X(var, str, name, optional) char* var;
CONFIG_VARIABLES_TABLE
#undef X
};