summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-04-04 16:21:51 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-04-04 16:21:51 +0000
commit988f06d4304a171332f90881f14c10b54dad514a (patch)
tree806471527805406fa249c0c80efa8cf59ffbeae5
parentad92e664dabe64a7f625ea4f57463e6bc8935da4 (diff)
downloadmandoc-988f06d4304a171332f90881f14c10b54dad514a.tar.gz
mandoc-988f06d4304a171332f90881f14c10b54dad514a.tar.zst
mandoc-988f06d4304a171332f90881f14c10b54dad514a.zip
Clean up superfluous variables in `Xr' handling in -Tascii.
-rw-r--r--mdoc_term.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index f6f966a2..bdbbd8b4 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.224 2011/04/04 16:15:58 kristaps Exp $ */
+/* $Id: mdoc_term.c,v 1.225 2011/04/04 16:21:51 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -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