source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mandoc: Remove the implicit display feature of .Lk because it was
@ 2018-01-13  5:23 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2018-01-13  5:23 UTC (permalink / raw)
  To: source

Log Message:
-----------
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>.

Modified Files:
--------------
    mandoc:
        mdoc_man.c
        mdoc_term.c
    mandoc/regress/mdoc/Lk:
        noarg.out_ascii

Revision Data
-------------
Index: mdoc_man.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/mdoc_man.c,v
retrieving revision 1.122
retrieving revision 1.123
diff -Lmdoc_man.c -Lmdoc_man.c -u -p -r1.122 -r1.123
--- mdoc_man.c
+++ mdoc_man.c
@@ -1547,7 +1547,6 @@ static int
 pre_lk(DECL_ARGS)
 {
 	const struct roff_node *link, *descr, *punct;
-	int display;
 
 	if ((link = n->child) == NULL)
 		return 0;
@@ -1570,12 +1569,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();
@@ -1585,8 +1578,6 @@ pre_lk(DECL_ARGS)
 		print_word(punct->string);
 		punct = punct->next;
 	}
-	if (display)
-		print_line(".RE", MMAN_nl);
 	return 0;
 }
 
Index: mdoc_term.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/mdoc_term.c,v
retrieving revision 1.364
retrieving revision 1.365
diff -Lmdoc_term.c -Lmdoc_term.c -u -p -r1.364 -r1.365
--- mdoc_term.c
+++ mdoc_term.c
@@ -1940,7 +1940,6 @@ static int
 termp_lk_pre(DECL_ARGS)
 {
 	const struct roff_node *link, *descr, *punct;
-	int display;
 
 	if ((link = n->child) == NULL)
 		return 0;
@@ -1966,11 +1965,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);
@@ -1981,8 +1975,6 @@ termp_lk_pre(DECL_ARGS)
 		term_word(p, punct->string);
 		punct = punct->next;
 	}
-	if (display)
-		term_newln(p);
 	return 0;
 }
 
Index: noarg.out_ascii
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Lk/noarg.out_ascii,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lregress/mdoc/Lk/noarg.out_ascii -Lregress/mdoc/Lk/noarg.out_ascii -u -p -r1.4 -r1.5
--- regress/mdoc/Lk/noarg.out_ascii
+++ regress/mdoc/Lk/noarg.out_ascii
@@ -5,9 +5,8 @@ N\bNA\bAM\bME\bE
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
      multiple arguments _\bt_\bh_\be _\bb_\bs_\bd_\b._\bl_\bv _\bp_\br_\bo_\bj_\be_\bc_\bt: h\bht\btt\btp\bp:\b:/\b//\b/w\bww\bww\bw.\b.b\bbs\bsd\bd.\b.l\blv\bv/\b/, _\bG_\bN_\bU _\bt_\br_\bo_\bf_\bf:
-           h\bht\btt\btp\bp:\b:/\b//\b/w\bww\bww\bw.\b.g\bgn\bnu\bu.\b.o\bor\brg\bg/\b/s\bso\bof\bft\btw\bwa\bar\bre\be/\b/g\bgr\bro\bof\bff\bf/\b/,
-     two arguments _\bm_\ba_\bn_\bd_\bo_\bc_\b,: h\bht\btt\btp\bp:\b:/\b//\b/m\bmd\bdo\boc\bcm\bml\bl.\b.b\bbs\bsd\bd.\b.l\blv\bv/\b/ one argument
-     h\bht\btt\btp\bp:\b:/\b//\b/w\bww\bww\bw.\b.o\bop\bpe\ben\bnb\bbs\bsd\bd.\b.o\bor\brg\bg/\b/,\b, no argument
+     h\bht\btt\btp\bp:\b:/\b//\b/w\bww\bww\bw.\b.g\bgn\bnu\bu.\b.o\bor\brg\bg/\b/s\bso\bof\bft\btw\bwa\bar\bre\be/\b/g\bgr\bro\bof\bff\bf/\b/, two arguments _\bm_\ba_\bn_\bd_\bo_\bc_\b,:
+     h\bht\btt\btp\bp:\b:/\b//\b/m\bmd\bdo\boc\bcm\bml\bl.\b.b\bbs\bsd\bd.\b.l\blv\bv/\b/ one argument h\bht\btt\btp\bp:\b:/\b//\b/w\bww\bww\bw.\b.o\bop\bpe\ben\bnb\bbs\bsd\bd.\b.o\bor\brg\bg/\b/,\b, no argument
 
      end of test document
 
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv

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

only message in thread, other threads:[~2018-01-13  5:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-13  5:23 mandoc: Remove the implicit display feature of .Lk because it was schwarze

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).