source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Cope with the mparse_alloc() interface change.
@ 2014-01-05 21:30 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2014-01-05 21:30 UTC (permalink / raw)
  To: source

Log Message:
-----------
Cope with the mparse_alloc() interface change.

Tags:
----
VERSION_1_12

Modified Files:
--------------
    mdocml:
        mandocdb.c

Revision Data
-------------
Index: mandocdb.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandocdb.c,v
retrieving revision 1.49.2.10
retrieving revision 1.49.2.11
diff -Lmandocdb.c -Lmandocdb.c -u -p -r1.49.2.10 -r1.49.2.11
--- mandocdb.c
+++ mandocdb.c
@@ -288,6 +288,7 @@ static	const struct mdoc_handler mdocs[M
 };
 
 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);
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-01-05 21:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-05 21:30 mdocml: Cope with the mparse_alloc() interface change schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).