aboutsummaryrefslogtreecommitdiffstatshomepage
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
commitc98359b4b81cf2d518b929ed45409e33dfddbc52 (patch)
tree5ee78ada161b53b149d7e78a39a2478cd56a5d9b
parentb4c02539d6c107a035f3d29adde090072ba7fa02 (diff)
downloadmandoc-c98359b4b81cf2d518b929ed45409e33dfddbc52.tar.gz
mandoc-c98359b4b81cf2d518b929ed45409e33dfddbc52.tar.zst
mandoc-c98359b4b81cf2d518b929ed45409e33dfddbc52.zip
Cope with the mparse_alloc() interface change.
-rw-r--r--mandocdb.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/mandocdb.c b/mandocdb.c
index a7491caf..eeb9696d 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -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.11 2014/01/05 21:30:57 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011, 2012 Ingo Schwarze <schwarze@openbsd.org>
@@ -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);