summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2018-01-13 05:20:11 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2018-01-13 05:20:11 +0000
commitce5c1bf0d8930bf344de65e53fac7f262266a6ff (patch)
tree4a35ab204571da7b54bd37eca911e0f58a762e49 /usr.bin/mandoc
parent8cdfea18cdd951bf479d1644d46f13fd7015a91a (diff)
Remove the implicit display feature of .Lk because it was inconsistent
across output devices, counter-intuitive, and resulted in ugly output for many real-world manual pages. Always format even long links in-line. I already committed a similar change to groff. OK jmc@, bentley@, and the original author of the feature, Werner Lemberg <wl@gnu.org>.
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r--usr.bin/mandoc/mdoc_man.c11
-rw-r--r--usr.bin/mandoc/mdoc_term.c10
2 files changed, 2 insertions, 19 deletions
diff --git a/usr.bin/mandoc/mdoc_man.c b/usr.bin/mandoc/mdoc_man.c
index d89a4d65f9d..777bb5c1e1e 100644
--- a/usr.bin/mandoc/mdoc_man.c
+++ b/usr.bin/mandoc/mdoc_man.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mdoc_man.c,v 1.120 2017/06/14 22:50:37 schwarze Exp $ */
+/* $OpenBSD: mdoc_man.c,v 1.121 2018/01/13 05:20:10 schwarze Exp $ */
/*
* Copyright (c) 2011-2017 Ingo Schwarze <schwarze@openbsd.org>
*
@@ -1545,7 +1545,6 @@ static int
pre_lk(DECL_ARGS)
{
const struct roff_node *link, *descr, *punct;
- int display;
if ((link = n->child) == NULL)
return 0;
@@ -1568,12 +1567,6 @@ pre_lk(DECL_ARGS)
}
/* Link target. */
- display = man_strlen(link->string) >= 26;
- if (display) {
- print_line(".RS", MMAN_Bk_susp);
- print_word("6n");
- outflags |= MMAN_nl;
- }
font_push('B');
print_word(link->string);
font_pop();
@@ -1583,8 +1576,6 @@ pre_lk(DECL_ARGS)
print_word(punct->string);
punct = punct->next;
}
- if (display)
- print_line(".RE", MMAN_nl);
return 0;
}
diff --git a/usr.bin/mandoc/mdoc_term.c b/usr.bin/mandoc/mdoc_term.c
index 3adb397fcfa..cda505642e4 100644
--- a/usr.bin/mandoc/mdoc_term.c
+++ b/usr.bin/mandoc/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mdoc_term.c,v 1.263 2017/06/14 17:50:43 schwarze Exp $ */
+/* $OpenBSD: mdoc_term.c,v 1.264 2018/01/13 05:20:10 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012-2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -1938,7 +1938,6 @@ static int
termp_lk_pre(DECL_ARGS)
{
const struct roff_node *link, *descr, *punct;
- int display;
if ((link = n->child) == NULL)
return 0;
@@ -1964,11 +1963,6 @@ termp_lk_pre(DECL_ARGS)
}
/* Link target. */
- display = term_strlen(p, link->string) >= 26;
- if (display) {
- term_newln(p);
- p->tcol->offset += term_len(p, p->defindent + 1);
- }
term_fontpush(p, TERMFONT_BOLD);
term_word(p, link->string);
term_fontpop(p);
@@ -1979,8 +1973,6 @@ termp_lk_pre(DECL_ARGS)
term_word(p, punct->string);
punct = punct->next;
}
- if (display)
- term_newln(p);
return 0;
}