summaryrefslogtreecommitdiffstats
path: root/mdoc_validate.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-05-05 15:17:32 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-05-05 15:17:32 +0000
commit59ff183bfbf2ef15bb6bae96290e8347aef13fb0 (patch)
tree44bdd5ee7af707828e02619c5b92b76ff63f5a20 /mdoc_validate.c
parent3f8e564abc73c1abd2c1286b5e767b2b101aae57 (diff)
downloadmandoc-59ff183bfbf2ef15bb6bae96290e8347aef13fb0.tar.gz
Move .sp to the roff modules. Enough infrastructure is in place
now that this actually saves code: -70 LOC.
Diffstat (limited to 'mdoc_validate.c')
-rw-r--r--mdoc_validate.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c
index 50ccab6d..fe4204be 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -227,7 +227,6 @@ static const v_post __mdoc_valids[MDOC_MAX - MDOC_Dd] = {
post_en, /* En */
post_xx, /* Dx */
NULL, /* %Q */
- post_par, /* sp */
NULL, /* %U */
NULL, /* Ta */
};
@@ -328,6 +327,7 @@ mdoc_node_validate(struct roff_man *mdoc)
if (n->tok < ROFF_MAX) {
switch(n->tok) {
case ROFF_br:
+ case ROFF_sp:
post_par(mdoc);
break;
default:
@@ -2096,10 +2096,10 @@ post_par(POST_ARGS)
struct roff_node *np;
np = mdoc->last;
- if (np->tok != ROFF_br && np->tok != MDOC_sp)
+ if (np->tok != ROFF_br && np->tok != ROFF_sp)
post_prevpar(mdoc);
- if (np->tok == MDOC_sp) {
+ if (np->tok == ROFF_sp) {
if (np->child != NULL && np->child->next != NULL)
mandoc_vmsg(MANDOCERR_ARG_EXCESS, mdoc->parse,
np->child->next->line, np->child->next->pos,
@@ -2115,7 +2115,7 @@ post_par(POST_ARGS)
return;
} else if (np->tok != MDOC_Pp && np->tok != MDOC_Lp &&
(mdoc->last->tok != ROFF_br ||
- (np->tok != MDOC_sp && np->tok != ROFF_br)))
+ (np->tok != ROFF_sp && np->tok != ROFF_br)))
return;
mandoc_vmsg(MANDOCERR_PAR_SKIP, mdoc->parse,