aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 5c01fe0..27c5349 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,10 +1,10 @@
#include "opt.h"
#include "err.h"
+#include "calendar.h"
+#include "print.h"
#include "../reqs/simple-xdg-bdirs/simple-xdg-bdirs.h"
-#include "calendar.h"
-
#include <stdbool.h>
#include <unistd.h>
@@ -115,6 +115,12 @@ int main(int argc, char **argv)
exit(EXIT_FAILURE);
/* output commands */
+ if (cmd == OPT_COMMAND_CONSOLE)
+ print_console(&cal);
+ else
+ print_script(&cal);
+
+ calendar_wipe(&cal);
return 0;
}