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 | 9478246fdbadd15d72ff995eadbe78fe9ca4bbb0 (patch) | |
tree | d352a1f893f6afc63536d98b7bc4595eeef2c0f5 /man.c | |
parent | bf5632c30654b3560633b58019d13b37260ca137 (diff) | |
download | mandoc-9478246fdbadd15d72ff995eadbe78fe9ca4bbb0.tar.gz mandoc-9478246fdbadd15d72ff995eadbe78fe9ca4bbb0.tar.zst mandoc-9478246fdbadd15d72ff995eadbe78fe9ca4bbb0.zip |
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 | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* $Id: man.c,v 1.136 2014/08/01 17:27:44 schwarze Exp $ */ +/* $Id: man.c,v 1.137 2014/08/01 21:24:17 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2013, 2014 Ingo Schwarze <schwarze@openbsd.org> @@ -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; |