source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Clean up superfluous variables in `Xr' handling in -Tascii.
@ 2011-04-04 16:21 kristaps
  0 siblings, 0 replies; only message in thread
From: kristaps @ 2011-04-04 16:21 UTC (permalink / raw)
  To: source

Log Message:
-----------
Clean up superfluous variables in `Xr' handling in -Tascii.

Modified Files:
--------------
    mdocml:
        mdoc_term.c

Revision Data
-------------
Index: mdoc_term.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_term.c,v
retrieving revision 1.224
retrieving revision 1.225
diff -Lmdoc_term.c -Lmdoc_term.c -u -p -r1.224 -r1.225
--- mdoc_term.c
+++ mdoc_term.c
@@ -1296,32 +1296,32 @@ 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
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-04-04 16:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-04 16:21 mdocml: Clean up superfluous variables in `Xr' handling in -Tascii kristaps

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).