summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/main.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2017-02-10 15:44:32 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2017-02-10 15:44:32 +0000
commit7f969bf19ad8ff56e129dbd4b3e03d227c24a547 (patch)
tree6e9abbbb11714dbdf3f43cb085b38bd1806f64e2 /usr.bin/mandoc/main.c
parent37cfc122d8f82dee764b443a9f148b88077efa80 (diff)
In -Ttree output mode, show the BROKEN node flag and
provide a -Onoval output option to show the unvalidated tree.
Diffstat (limited to 'usr.bin/mandoc/main.c')
-rw-r--r--usr.bin/mandoc/main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/mandoc/main.c b/usr.bin/mandoc/main.c
index caa4b2d26f1..d46edf42a0c 100644
--- a/usr.bin/mandoc/main.c
+++ b/usr.bin/mandoc/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.184 2017/02/09 17:19:07 schwarze Exp $ */
+/* $OpenBSD: main.c,v 1.185 2017/02/10 15:44:31 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2012, 2014-2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -712,7 +712,8 @@ parse(struct curparse *curp, int fd, const char *file)
if (man == NULL)
return;
if (man->macroset == MACROSET_MDOC) {
- mdoc_validate(man);
+ if (curp->outtype != OUTT_TREE || !curp->outopts->noval)
+ mdoc_validate(man);
switch (curp->outtype) {
case OUTT_HTML:
html_mdoc(curp->outdata, man);
@@ -735,7 +736,8 @@ parse(struct curparse *curp, int fd, const char *file)
}
}
if (man->macroset == MACROSET_MAN) {
- man_validate(man);
+ if (curp->outtype != OUTT_TREE || !curp->outopts->noval)
+ man_validate(man);
switch (curp->outtype) {
case OUTT_HTML:
html_man(curp->outdata, man);