X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/7afe8a4e9da86c2e69030ba80f8fb4412d0e1307..9d70ad9e783183f60b7bf9ded3496003a1298237:/mdoclint.c?ds=sidebyside diff --git a/mdoclint.c b/mdoclint.c index b7247c12..c22a9911 100644 --- a/mdoclint.c +++ b/mdoclint.c @@ -1,4 +1,4 @@ - /* $Id: mdoclint.c,v 1.1 2009/02/23 13:05:06 kristaps Exp $ */ + /* $Id: mdoclint.c,v 1.2 2009/03/06 14:13:47 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons * @@ -28,12 +28,14 @@ int main(int argc, char *argv[]) { 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);