]> git.cameronkatri.com Git - mandoc.git/blobdiff - mdoc_term.c
Clarified EXIT STATUS sections. Discussed among schwarze@, Thomas, and
[mandoc.git] / mdoc_term.c
index 6181cb87ff7e2009d5f0d2f244fce914b4a1417b..ba16bbc260adf471d75c12c46f297beaa26f7a08 100644 (file)
@@ -1,4 +1,4 @@
-/*     $Id: mdoc_term.c,v 1.180 2010/08/07 17:11:17 schwarze Exp $ */
+/*     $Id: mdoc_term.c,v 1.183 2010/08/21 14:04:13 schwarze Exp $ */
 /*
  * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
  * Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -2119,23 +2119,25 @@ termp_li_pre(DECL_ARGS)
 static int
 termp_lk_pre(DECL_ARGS)
 {
-       const struct mdoc_node *nn;
+       const struct mdoc_node *nn, *sv;
 
        term_fontpush(p, TERMFONT_UNDER);
-       nn = n->child;
+
+       nn = sv = n->child;
 
        if (NULL == nn->next)
                return(1);
 
-       term_word(p, nn->string);
+       for (nn = nn->next; nn; nn = nn->next) 
+               term_word(p, nn->string);
+
        term_fontpop(p);
 
        p->flags |= TERMP_NOSPACE;
        term_word(p, ":");
 
        term_fontpush(p, TERMFONT_BOLD);
-       for (nn = nn->next; nn; nn = nn->next) 
-               term_word(p, nn->string);
+       term_word(p, sv->string);
        term_fontpop(p);
 
        return(0);