diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-04-04 16:27:03 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-04-04 16:27:03 +0000 |
commit | 6f352eb77aabefaf6c1af62970d9f56cea660afd (patch) | |
tree | aa69496998209a59ebad7bd9f651f751cfa099f4 | |
parent | 41d4bc0ed807c1b91e3b11af64a987ab6948660f (diff) | |
download | mandoc-6f352eb77aabefaf6c1af62970d9f56cea660afd.tar.gz |
Last low-hanging removal of superfluous variable assignments.
-rw-r--r-- | mdoc_term.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/mdoc_term.c b/mdoc_term.c index c709e334..d08c3b29 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1536,24 +1536,31 @@ termp_ft_pre(DECL_ARGS) static int termp_fn_pre(DECL_ARGS) { - const struct mdoc_node *nn; + int pretty; + + pretty = MDOC_SYNPRETTY & n->flags; synopsis_pre(p, n); + if (NULL == (n = n->child)) + return(0); + + assert(MDOC_TEXT == n->type); term_fontpush(p, TERMFONT_BOLD); - term_word(p, n->child->string); + term_word(p, n->string); term_fontpop(p); p->flags |= TERMP_NOSPACE; term_word(p, "("); p->flags |= TERMP_NOSPACE; - for (nn = n->child->next; nn; nn = nn->next) { + for (n = n->next; n; n = n->next) { + assert(MDOC_TEXT == n->type); term_fontpush(p, TERMFONT_UNDER); - term_word(p, nn->string); + term_word(p, n->string); term_fontpop(p); - if (nn->next) { + if (n->next) { p->flags |= TERMP_NOSPACE; term_word(p, ","); } @@ -1562,7 +1569,7 @@ termp_fn_pre(DECL_ARGS) p->flags |= TERMP_NOSPACE; term_word(p, ")"); - if (MDOC_SYNPRETTY & n->flags) { + if (pretty) { p->flags |= TERMP_NOSPACE; term_word(p, ";"); } |