From 44596b84b2e6592395aecd1061f5e589c417763a Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 1 Aug 2014 21:24:17 +0000 Subject: 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. --- man.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'man.c') 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; -- cgit