From 41d4bc0ed807c1b91e3b11af64a987ab6948660f Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Mon, 4 Apr 2011 16:21:51 +0000 Subject: Clean up superfluous variables in `Xr' handling in -Tascii. --- mdoc_term.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/mdoc_term.c b/mdoc_term.c index a74c5173..c709e334 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1296,33 +1296,33 @@ termp_bl_post(DECL_ARGS) term_newln(p); } - /* ARGSUSED */ static int termp_xr_pre(DECL_ARGS) { - const struct mdoc_node *nn; - if (NULL == n->child) + if (NULL == (n = n->child)) return(0); - assert(MDOC_TEXT == n->child->type); - nn = n->child; + assert(MDOC_TEXT == n->type); + term_word(p, n->string); - term_word(p, nn->string); - if (NULL == (nn = nn->next)) + if (NULL == (n = n->next)) return(0); + p->flags |= TERMP_NOSPACE; term_word(p, "("); p->flags |= TERMP_NOSPACE; - term_word(p, nn->string); + + assert(MDOC_TEXT == n->type); + term_word(p, n->string); + p->flags |= TERMP_NOSPACE; term_word(p, ")"); return(0); } - /* * This decides how to assert whitespace before any of the SYNOPSIS set * of macros (which, as in the case of Ft/Fo and Ft/Fn, may contain -- cgit