=================================================================== RCS file: /cvs/mandoc/mdoc_term.c,v retrieving revision 1.205 retrieving revision 1.206 diff -u -p -r1.205 -r1.206 --- mandoc/mdoc_term.c 2010/12/25 23:27:50 1.205 +++ mandoc/mdoc_term.c 2011/01/01 12:18:37 1.206 @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.205 2010/12/25 23:27:50 kristaps Exp $ */ +/* $Id: mdoc_term.c,v 1.206 2011/01/01 12:18:37 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * Copyright (c) 2010 Ingo Schwarze @@ -312,12 +312,20 @@ print_mdoc_node(DECL_ARGS) memset(&npair, 0, sizeof(struct termpair)); npair.ppair = pair; + + switch (n->type) { + case (MDOC_TEXT): + term_word(p, n->string); + break; + case (MDOC_TBL): + break; + default: + if (termacts[n->tok].pre && ENDBODY_NOT == n->end) + chld = (*termacts[n->tok].pre) + (p, &npair, m, n); + break; + } - if (MDOC_TEXT == n->type) - term_word(p, n->string); - else if (termacts[n->tok].pre && ENDBODY_NOT == n->end) - chld = (*termacts[n->tok].pre)(p, &npair, m, n); - /* * Keeps only work until the end of a line. If a keep was * invoked in a prior line, revert it to PREKEEP. @@ -353,8 +361,14 @@ print_mdoc_node(DECL_ARGS) term_fontpopq(p, font); - if (MDOC_TEXT != n->type && termacts[n->tok].post && - ! (MDOC_ENDED & n->flags)) { + switch (n->type) { + case (MDOC_TEXT): + break; + case (MDOC_TBL): + break; + default: + if ( ! termacts[n->tok].post || MDOC_ENDED & n->flags) + break; (void)(*termacts[n->tok].post)(p, &npair, m, n); /* @@ -372,6 +386,7 @@ print_mdoc_node(DECL_ARGS) */ if (ENDBODY_NOSPACE == n->end) p->flags |= TERMP_NOSPACE; + break; } if (MDOC_EOS & n->flags)