=================================================================== RCS file: /cvs/mandoc/mandocdb.c,v retrieving revision 1.49.2.10 retrieving revision 1.49.2.12 diff -u -p -r1.49.2.10 -r1.49.2.12 --- mandoc/mandocdb.c 2013/11/21 01:53:48 1.49.2.10 +++ mandoc/mandocdb.c 2014/03/19 22:09:29 1.49.2.12 @@ -1,4 +1,4 @@ -/* $Id: mandocdb.c,v 1.49.2.10 2013/11/21 01:53:48 schwarze Exp $ */ +/* $Id: mandocdb.c,v 1.49.2.12 2014/03/19 22:09:29 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2011, 2012 Ingo Schwarze @@ -288,6 +288,7 @@ static const struct mdoc_handler mdocs[MDOC_MAX] = { }; static const char *progname; +static int mparse_options; /* abort the parse early */ static int use_all; /* Use all directories and files. */ static int verb; /* Output verbosity level. */ static int warnings; /* Potential problems in manuals. */ @@ -328,8 +329,9 @@ main(int argc, char *argv[]) hash = NULL; op = OP_DEFAULT; dir = NULL; + mparse_options = MPARSE_SO; - while (-1 != (ch = getopt(argc, argv, "aC:d:tu:vW"))) + while (-1 != (ch = getopt(argc, argv, "aC:d:Qtu:vW"))) switch (ch) { case ('a'): use_all = 1; @@ -352,6 +354,9 @@ main(int argc, char *argv[]) dir = optarg; op = OP_UPDATE; break; + case ('Q'): + mparse_options |= MPARSE_QUICK; + break; case ('t'): dup2(STDOUT_FILENO, STDERR_FILENO); if (op) { @@ -394,7 +399,7 @@ main(int argc, char *argv[]) info.lorder = 4321; info.flags = R_DUP; - mp = mparse_alloc(MPARSE_AUTO, MANDOCLEVEL_FATAL, NULL, NULL, NULL); + mp = mparse_alloc(mparse_options, MANDOCLEVEL_FATAL, NULL, NULL); memset(&buf, 0, sizeof(struct buf)); memset(&dbuf, 0, sizeof(struct buf)); @@ -595,7 +600,7 @@ out: usage: fprintf(stderr, - "usage: %s [-avvv] [-C file] | dir ... | -t file ...\n" + "usage: %s [-aQvvv] [-C file] | dir ... | -t file ...\n" " -d dir [file ...] | " "-u dir [file ...]\n", progname);