summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-01-05 21:30:57 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-01-05 21:30:57 +0000
commit9d6fb9755eb783170cb75e0c1aa8155a18d1b534 (patch)
tree0c418d228f09cf24b9ee639d0bd9165af966becb
parent1998a669af0f018d690bf60eb599b73942465a3c (diff)
downloadmandoc-9d6fb9755eb783170cb75e0c1aa8155a18d1b534.tar.gz
Cope with the mparse_alloc() interface change.
-rw-r--r--mandocdb.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/mandocdb.c b/mandocdb.c
index e605e954..a4f39c14 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -288,6 +288,7 @@ static const struct mdoc_handler mdocs[MDOC_MAX] = {
};
static const char *progname;
+static int quick; /* 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. */
@@ -329,7 +330,7 @@ main(int argc, char *argv[])
op = OP_DEFAULT;
dir = NULL;
- 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 +353,9 @@ main(int argc, char *argv[])
dir = optarg;
op = OP_UPDATE;
break;
+ case ('Q'):
+ quick = 1;
+ break;
case ('t'):
dup2(STDOUT_FILENO, STDERR_FILENO);
if (op) {
@@ -394,7 +398,8 @@ 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_AUTO,
+ MANDOCLEVEL_FATAL, NULL, NULL, quick);
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);