From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id 408f250d for ; Sat, 13 Jan 2018 00:23:21 -0500 (EST) Date: Sat, 13 Jan 2018 00:23:21 -0500 (EST) Message-Id: <7849894963565948228.enqueue@fantadrom.bsd.lv> X-Mailinglist: mandoc-source Reply-To: source@mandoc.bsd.lv MIME-Version: 1.0 From: schwarze@mandoc.bsd.lv To: source@mandoc.bsd.lv Subject: mandoc: Remove the implicit display feature of .Lk because it was X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 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 . 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 @@ NNAAMMEE DDEESSCCRRIIPPTTIIOONN multiple arguments _t_h_e _b_s_d_._l_v _p_r_o_j_e_c_t: hhttttpp::////wwwwww..bbssdd..llvv//, _G_N_U _t_r_o_f_f: - hhttttpp::////wwwwww..ggnnuu..oorrgg//ssooffttwwaarree//ggrrooffff//, - two arguments _m_a_n_d_o_c_,: hhttttpp::////mmddooccmmll..bbssdd..llvv// one argument - hhttttpp::////wwwwww..ooppeennbbssdd..oorrgg//,, no argument + hhttttpp::////wwwwww..ggnnuu..oorrgg//ssooffttwwaarree//ggrrooffff//, two arguments _m_a_n_d_o_c_,: + hhttttpp::////mmddooccmmll..bbssdd..llvv// one argument hhttttpp::////wwwwww..ooppeennbbssdd..oorrgg//,, no argument end of test document -- To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv