diff options
Diffstat (limited to 'mandocdb.c')
-rw-r--r-- | mandocdb.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -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); |