summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2015-11-29 12:00:05 -0500
committerTavian Barnes <tavianator@tavianator.com>2015-11-29 12:00:05 -0500
commitda51ac27f1849ad94753277650435ae482a0423f (patch)
treed194bda63df14c5ec6bd32601d8a7db189f6c39e /main.c
parentf81be72020a886b5eca21bc1d8a5b0d62b9954d9 (diff)
downloadbfs-da51ac27f1849ad94753277650435ae482a0423f.tar.xz
Split out parsing code.
Diffstat (limited to 'main.c')
-rw-r--r--main.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/main.c b/main.c
new file mode 100644
index 0000000..b74219f
--- /dev/null
+++ b/main.c
@@ -0,0 +1,27 @@
+/*********************************************************************
+ * bfs *
+ * Copyright (C) 2015 Tavian Barnes <tavianator@tavianator.com> *
+ * *
+ * This program is free software. It comes without any warranty, to *
+ * the extent permitted by applicable law. You can redistribute it *
+ * and/or modify it under the terms of the Do What The Fuck You Want *
+ * To Public License, Version 2, as published by Sam Hocevar. See *
+ * the COPYING file or http://www.wtfpl.net/ for more details. *
+ *********************************************************************/
+
+#include "bfs.h"
+#include <stdlib.h>
+
+int main(int argc, char *argv[]) {
+ int ret = EXIT_FAILURE;
+
+ cmdline *cl = parse_cmdline(argc, argv);
+ if (cl) {
+ if (eval_cmdline(cl) == 0) {
+ ret = EXIT_SUCCESS;
+ }
+ }
+
+ free_cmdline(cl);
+ return ret;
+}