aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/main.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-02-10 15:45:28 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-02-10 15:45:28 +0000
commita4aa2b1f59e2f2354dd17be89ef5ebc595a4bfc0 (patch)
tree8a0ac896c2f0126a6b24dfe59abd0846bfa12747 /main.c
parent85cca7a5afcdad576c72653fa8e0373ddde2dbe6 (diff)
downloadmandoc-a4aa2b1f59e2f2354dd17be89ef5ebc595a4bfc0.tar.gz
mandoc-a4aa2b1f59e2f2354dd17be89ef5ebc595a4bfc0.tar.zst
mandoc-a4aa2b1f59e2f2354dd17be89ef5ebc595a4bfc0.zip
In -Ttree output mode, show the BROKEN node flag and
provide a -Onoval output option to show the unvalidated tree.
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/main.c b/main.c
index 1b1b5b73..460fd05d 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.280 2017/01/27 13:47:10 schwarze Exp $ */
+/* $Id: main.c,v 1.281 2017/02/10 15:45:28 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2012, 2014-2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -742,7 +742,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);
@@ -765,7 +766,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);