]> Pileus Git - lackey/blobdiff - cals/dummy.c
Add simple config file parser
[lackey] / cals / dummy.c
index 1926bdbff99f299fdf2fc4e69bd9ef86d7b37628..4e55adef9823db5bba27c84657e60154df78dee9 100644 (file)
@@ -18,6 +18,7 @@
 #include <stdlib.h>
 
 #include "util.h"
+#include "conf.h"
 #include "date.h"
 #include "cal.h"
 
@@ -46,6 +47,13 @@ static todo_t todo = {
 
 static int     enable;
 
+/* Config parser */
+void dummy_config(const char *group, const char *name, const char *key, const char *value)
+{
+       if (match(group, "dummy") && match(key, "enable"))
+               enable = get_bool(value);
+}
+
 /* Event functions */
 event_t *dummy_events(date_t start, date_t end)
 {