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 o6VHvJYO005973 for ; Sat, 31 Jul 2010 13:57:21 -0400 (EDT) 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 1OfGJB-0005kx-LQ; Sat, 31 Jul 2010 19:57:17 +0200 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.71) (envelope-from ) id 1OfGJB-0008VH-KV for tech@mdocml.bsd.lv; Sat, 31 Jul 2010 19:57:17 +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 1OfGJB-0007vG-Jk for tech@mdocml.bsd.lv; Sat, 31 Jul 2010 19:57:17 +0200 Received: from schwarze by usta.de with local (Exim 4.71) (envelope-from ) id 1OfGJB-0002q5-Iw for tech@mdocml.bsd.lv; Sat, 31 Jul 2010 19:57:17 +0200 Date: Sat, 31 Jul 2010 19:57:17 +0200 From: Ingo Schwarze To: tech@mdocml.bsd.lv Subject: Re: mdocml: Fix how `Bd -unfilled' and `Bd -literal' break lines. Message-ID: <20100731175717.GA9242@iris.usta.de> References: <201007270838.o6R8c4KT001163@krisdoz.my.domain> 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: <201007270838.o6R8c4KT001163@krisdoz.my.domain> User-Agent: Mutt/1.5.20 (2009-06-14) Hi Kristaps, kristaps@mdocml.bsd.lv wrote on Tue, Jul 27, 2010 at 04:38:04AM -0400: > Log Message: > ----------- > Fix how `Bd -unfilled' and `Bd -literal' break lines. This unbreaks > displays to work as old groff shows them; however, new groff still does > some fancy shit. What exactly is this supposed to fix? > Modified Files: > -------------- > mdocml: > mdoc_term.c > mdoc_html.c I don't care that much about the HTML part, so i'm snipping that, but i disagree with the following chunk: [...] > Index: mdoc_term.c > =================================================================== > RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_term.c,v > retrieving revision 1.178 > retrieving revision 1.179 > diff -Lmdoc_term.c -Lmdoc_term.c -u -p -r1.178 -r1.179 > --- mdoc_term.c > +++ mdoc_term.c [...] > @@ -1654,12 +1653,9 @@ termp_bd_pre(DECL_ARGS) > p->rmargin = p->maxrmargin = TERM_MAXMARGIN; > > for (nn = n->child; nn; nn = nn->next) { > - p->flags |= TERMP_NOSPACE; > + if (nn->prev && nn->prev->line < nn->line) > + term_newln(p); > print_mdoc_node(p, pair, m, nn); > - if (NULL == nn->prev || > - nn->prev->line < nn->line || > - NULL == nn->next) > - term_flushln(p); > } > > p->tabwidth = tabwidth; For me, this breaks .Bd -literal vertical and horizontal spacing in multiple ways, see mdoc/Bd/blank.in char/space/tab.in in the OpenBSD regression suite. To be precise, i see at least the following problems: * Removing the TERMP_NOSPACE adds an additional space character at the beginning of display lines which we don't want. * Changing term_flushln to term_newln has the effect of ignoring blank lines, but blank lines must be preserved in -literal mode. * Removing the NULL == nn->next clause kills trailing blank lines in -literal displays. Even these must be preserved. So, for now, i'm not merging any of the changes of this chunk to OpenBSD. Yours, Ingo -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv