From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from scc-mailout.scc.kit.edu (scc-mailout.scc.kit.edu [129.13.185.201]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id p68INROk031715 for ; Fri, 8 Jul 2011 14:23:30 -0400 (EDT) Received: from hekate.usta.de (asta-nat.asta.uni-karlsruhe.de [172.22.63.82]) by scc-mailout-01 with esmtp (Exim 4.72 #1) id 1QfFi1-0006wC-UM; Fri, 08 Jul 2011 20:23:26 +0200 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1QfFi1-0003vU-Uj for tech@mdocml.bsd.lv; Fri, 08 Jul 2011 20:23:25 +0200 Received: from iris.usta.de ([172.24.96.5] helo=usta.de) by donnerwolke.usta.de with esmtp (Exim 4.69) (envelope-from ) id 1QfFi1-00035E-Ti for tech@mdocml.bsd.lv; Fri, 08 Jul 2011 20:23:25 +0200 Received: from schwarze by usta.de with local (Exim 4.72) (envelope-from ) id 1QfFi1-00030o-I0 for tech@mdocml.bsd.lv; Fri, 08 Jul 2011 20:23:25 +0200 Date: Fri, 8 Jul 2011 20:23:25 +0200 From: Ingo Schwarze To: tech@mdocml.bsd.lv Subject: Re: Improved handling of literals in -man. Message-ID: <20110708182325.GB28744@iris.usta.de> References: <4E1701C4.5070007@bsd.lv> X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E1701C4.5070007@bsd.lv> User-Agent: Mutt/1.5.21 (2010-09-15) Hi Kristaps, Kristaps Dzonsons wrote on Fri, Jul 08, 2011 at 03:10:28PM +0200: > Enclosed is a patch that considerably simplifies and improves the > handling of literals in -man. Err, no. It considerably breaks literal handling and removes functionality. Here is a (possibly partial) list of what breaks: /usr/src/regress/usr.bin/mandoc/man/nf/indent - Long lines now wrap even in literal mode. /usr/src/regress/usr.bin/mandoc/man/nf/indent /usr/src/regress/usr.bin/mandoc/man/nf/args /usr/src/regress/usr.bin/mandoc/man/IP/literal /usr/src/regress/usr.bin/mandoc/man/TP/literal - Regular text right after .fi ends up one the same line as the last line of the text in the literal block. c2ph(1): - Lines containing nothing but "\&" get lost. Actually, there is also one thing this seems to fix: .ft B .nf some text .fi .ft P That's supposed to produce bold literal text, which currently mandoc does not do. See cvs(1) for an example, search for "1 month ago". At the end of the day, this patch causes so much noise that i'm giving up on doing a full regression report. I don't really feel like reading through a 150 thousand line diff right now. :-o Yours, Ingo P.S. Here you are testing the same condition twice: > + if ( ! (MANT_LITERAL & mt->fl)) { > + if (' ' == *n->string && MAN_LINE & n->flags) > + term_newln(p); > + } else if (MANT_LITERAL & mt->fl) > + if (n->prev && n->prev->line != n->line) > + term_newln(p); Looks like: if (!foo) ...; else if (foo) ... -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv