From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp1.rz.uni-karlsruhe.de (Debian-exim@smtp1.rz.uni-karlsruhe.de [129.13.185.217]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id p0GK2FkN025937 for ; Sun, 16 Jan 2011 15:02:17 -0500 (EST) Received: from hekate.usta.de (asta-nat.asta.uni-karlsruhe.de [172.22.63.82]) by smtp1.rz.uni-karlsruhe.de with esmtp (Exim 4.63 #1) id 1PeYnj-0004sz-I7; Sun, 16 Jan 2011 21:02:11 +0100 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1PeYnj-00025S-H4 for tech@mdocml.bsd.lv; Sun, 16 Jan 2011 21:02:11 +0100 Received: from iris.usta.de ([172.24.96.5] helo=usta.de) by donnerwolke.usta.de with esmtp (Exim 4.69) (envelope-from ) id 1PeYnj-0003GR-Fn for tech@mdocml.bsd.lv; Sun, 16 Jan 2011 21:02:11 +0100 Received: from schwarze by usta.de with local (Exim 4.72) (envelope-from ) id 1PeYnj-0001Iw-Er for tech@mdocml.bsd.lv; Sun, 16 Jan 2011 21:02:11 +0100 Date: Sun, 16 Jan 2011 21:02:11 +0100 From: Ingo Schwarze To: tech@mdocml.bsd.lv Subject: Re: mdocml: Make -man -Tascii not break within literal lines Message-ID: <20110116200211.GA11566@iris.usta.de> References: <201101121523.p0CFNQNx028921@krisdoz.my.domain> <20110116035342.GE28336@iris.usta.de> <4D32C0C4.4030207@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: <4D32C0C4.4030207@bsd.lv> User-Agent: Mutt/1.5.21 (2010-09-15) Hi Kristaps, Kristaps Dzonsons wrote on Sun, Jan 16, 2011 at 10:56:20AM +0100: > >Index: man_term.c > >=================================================================== > >RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man_term.c,v > >retrieving revision 1.97 > >diff -u -p -r1.97 man_term.c > >--- man_term.c 12 Jan 2011 15:23:25 -0000 1.97 > >+++ man_term.c 16 Jan 2011 03:49:36 -0000 > >@@ -1,6 +1,6 @@ > > /* $Id: man_term.c,v 1.97 2011/01/12 15:23:25 kristaps Exp $ */ > > /* > >- * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons > >+ * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons > > * Copyright (c) 2010, 2011 Ingo Schwarze > > * > > * Permission to use, copy, modify, and distribute this software for any > >@@ -864,7 +864,7 @@ print_man_node(DECL_ARGS) > > */ > > if ('\0' == *n->string) { > > term_vspace(p); > >- break; > >+ return; > > } else if (' ' == *n->string&& MAN_LINE& n->flags) > > term_newln(p); > > Ingo, great catch! Is it doing the same in -Thtml? No, in man_html.c, function print_man_node(), the comparable place in the code already does return. > You may want to check -mdoc too (in both cases)... > They all use the same logic. In mdoc_term.c, the function print_mdoc_node() does not contain any return statement at all, so it is OK that the leading space case doesn't, either. In mdoc_html.c, function print_mdoc_node(), the return is at the end of the MDOC_TEXT case, which correctly covers both the leading space and the regular case. Thus, the logic is _slightly_ different in all four files, and man_term.c was the only one affected. I'm going to merge the fix to bsd.lv right now. Yours, Ingo -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv