+#include <stdio.h>
+#include <stdlib.h>
+#include <signal.h>
+
+#include "util.h"
+#include "args.h"
+#include "conf.h"
+#include "date.h"
+#include "cal.h"
+#include "view.h"
+#include "print.h"
+#include "daemon.h"
+
+/* Config parser */
+static void on_config(const char *group, const char *name, const char *key, const char *value)
+{
+ date_config(group, name, key, value);
+ cal_config(group, name, key, value);
+ view_config(group, name, key, value);
+ daemon_config(group, name, key, value);
+}
+
+/* Control-C handler, so we don't hose the therminal */
+static void on_sigint(int signum)
+{
+ if (PRINT)
+ print_exit();
+ else if (DAEMON)
+ daemon_exit();
+ else
+ view_exit();
+ exit(0);
+}
+
+/* Main */