summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2010-08-18 01:45:23 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2010-08-18 01:45:23 +0000
commit7c6bdbd1035714c3b18567788718f23c4b388784 (patch)
tree56eb2455dc1101b23efd84e243a296138f06d9e6
parentfe6f510c837ac452a682d6e495123dd14ddc9c32 (diff)
Correctly print .Lk arguments in -Tascii.
Issue reported by Aldis Berzoja, fix by kristaps@.
-rw-r--r--usr.bin/mandoc/mdoc_term.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/usr.bin/mandoc/mdoc_term.c b/usr.bin/mandoc/mdoc_term.c
index 951fc4ebe00..0c27386a917 100644
--- a/usr.bin/mandoc/mdoc_term.c
+++ b/usr.bin/mandoc/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.100 2010/08/04 18:52:55 schwarze Exp $ */
+/* $Id: mdoc_term.c,v 1.101 2010/08/18 01:45:22 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -2115,23 +2115,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);