From 236dae9fb3183b9c1d8bc6f77614797d65800987 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Fri, 6 Mar 2009 14:13:47 +0000 Subject: Strings abstracted into dynamically-created C files. Added -V option. Deprecated README files. --- mdoctree.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'mdoctree.c') diff --git a/mdoctree.c b/mdoctree.c index a4147c8b..acc0a03b 100644 --- a/mdoctree.c +++ b/mdoctree.c @@ -1,4 +1,4 @@ - /* $Id: mdoctree.c,v 1.4 2009/02/23 12:45:19 kristaps Exp $ */ + /* $Id: mdoctree.c,v 1.5 2009/03/06 14:13:47 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons * @@ -31,13 +31,15 @@ static void doprint(const struct mdoc_node *, int); int main(int argc, char *argv[]) { - struct mmain *p; + struct mmain *p; + int c; const struct mdoc *mdoc; p = mmain_alloc(); - if ( ! mmain_getopt(p, argc, argv, NULL, NULL, NULL, NULL)) - mmain_exit(p, 1); + c = mmain_getopt(p, argc, argv, NULL, NULL, NULL, NULL); + if (1 != c) + mmain_exit(p, -1 == c ? 1 : 0); if (NULL == (mdoc = mmain_mdoc(p))) mmain_exit(p, 1); -- cgit v1.2.3