summaryrefslogtreecommitdiffstats
path: root/man.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-08-01 21:24:17 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-08-01 21:24:17 +0000
commit44596b84b2e6592395aecd1061f5e589c417763a (patch)
tree5d37b7fddb2337c8ed100bc5568b9747dfb14e30 /man.c
parent41b01a2448e5d5de474613c0bf5aff6cfcb30316 (diff)
downloadmandoc-44596b84b2e6592395aecd1061f5e589c417763a.tar.gz
Simplify man(7) validation:
Drop pre-handlers, they were almost unused. Drop the needless complexity of allowing more than one post-handler. This saves one internal interface function, one static function, one private struct definition, sixteen static arrays, and 45 lines of code. No functional change.
Diffstat (limited to 'man.c')
-rw-r--r--man.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/man.c b/man.c
index e3bedb7a..7e04d1f2 100644
--- a/man.c
+++ b/man.c
@@ -186,10 +186,11 @@ man_node_append(struct man *man, struct man_node *p)
assert(p->parent);
p->parent->nchild++;
- if ( ! man_valid_pre(man, p))
- return(0);
-
switch (p->type) {
+ case MAN_BLOCK:
+ if (p->tok == MAN_SH || p->tok == MAN_SS)
+ man->flags &= ~MAN_LITERAL;
+ break;
case MAN_HEAD:
assert(MAN_BLOCK == p->parent->type);
p->parent->head = p;