diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-08-01 21:24:17 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-08-01 21:24:17 +0000 |
commit | 44596b84b2e6592395aecd1061f5e589c417763a (patch) | |
tree | 5d37b7fddb2337c8ed100bc5568b9747dfb14e30 /man.c | |
parent | 41b01a2448e5d5de474613c0bf5aff6cfcb30316 (diff) | |
download | mandoc-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.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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; |