summaryrefslogtreecommitdiffstats
path: root/man_validate.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-05-04 17:48:28 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-05-04 17:48:28 +0000
commit5fbabdf032b370e99e8685958b6e15eb3b2ff0f7 (patch)
tree56bbeb9f07b66610d5173e36db18df3fba402155 /man_validate.c
parent90c0bcfc5ca59192e72f849591c6ec10e8048bf0 (diff)
downloadmandoc-5fbabdf032b370e99e8685958b6e15eb3b2ff0f7.tar.gz
Parser reorg:
Generate the first node on the roff level: .br Fix some column numbers in diagnostic messages while here.
Diffstat (limited to 'man_validate.c')
-rw-r--r--man_validate.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/man_validate.c b/man_validate.c
index 3cf82f92..c038b887 100644
--- a/man_validate.c
+++ b/man_validate.c
@@ -75,7 +75,6 @@ static const v_check __man_valids[MAN_MAX - MAN_TH] = {
NULL, /* I */
NULL, /* IR */
NULL, /* RI */
- post_vs, /* br */
post_vs, /* sp */
NULL, /* nf */
NULL, /* fi */
@@ -126,6 +125,17 @@ man_node_validate(struct roff_man *man)
case ROFFT_TBL:
break;
default:
+ if (n->tok < ROFF_MAX) {
+ switch (n->tok) {
+ case ROFF_br:
+ post_vs(man, n);
+ break;
+ default:
+ abort();
+ }
+ break;
+ }
+ assert(n->tok >= MAN_TH && n->tok < MAN_MAX);
cp = man_valids + n->tok;
if (*cp)
(*cp)(man, n);