From da51ac27f1849ad94753277650435ae482a0423f Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 29 Nov 2015 12:00:05 -0500 Subject: Split out parsing code. --- main.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 main.c (limited to 'main.c') 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 * + * * + * 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 + +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; +} -- cgit v1.2.3