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.202]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id pAGHO9IV005330 for ; Wed, 16 Nov 2011 12:24:10 -0500 (EST) Received: from hekate.usta.de (asta-nat.asta.uni-karlsruhe.de [172.22.63.82]) by scc-mailout-02.scc.kit.edu with esmtp (Exim 4.72 #1) id 1RQjDU-0004GI-HZ; Wed, 16 Nov 2011 18:24:08 +0100 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1RQjDU-0008Pm-JI; Wed, 16 Nov 2011 18:24:08 +0100 Received: from iris.usta.de ([172.24.96.5] helo=usta.de) by donnerwolke.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1RQjDU-0005W1-G6; Wed, 16 Nov 2011 18:24:08 +0100 Received: from schwarze by usta.de with local (Exim 4.72) (envelope-from ) id 1RQjDU-0005dj-4J; Wed, 16 Nov 2011 18:24:08 +0100 Date: Wed, 16 Nov 2011 18:24:07 +0100 From: Ingo Schwarze To: Joerg Sonnenberger Cc: tech@mdocml.bsd.lv Subject: Re: Fix for BLINE removal Message-ID: <20111116172407.GP31182@iris.usta.de> References: <20111116141239.GA15654@britannica.bec.de> 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: <20111116141239.GA15654@britannica.bec.de> User-Agent: Mutt/1.5.21 (2010-09-15) Hi Joerg, Joerg Sonnenberger wrote on Wed, Nov 16, 2011 at 03:12:39PM +0100: > the attached patch fixes the BLINE removal logic in man(7) for cases > like > > .TP 8 > .SH foo > > This is one of the most popular issues with man pages in pkgsrc right > now. Comments? I can confirm both the problem and the fix, i see no regressions, and have just committed your patch to OpenBSD. If you want to commit to bsd.lv, that's OK schwarze@. Thanks! Ingo > Index: man.c > =================================================================== > RCS file: /home/joerg/cvsroot/mdocml/man.c,v > retrieving revision 1.113 > diff -u -p -r1.113 man.c > --- man.c 7 Nov 2011 01:24:40 -0000 1.113 > +++ man.c 16 Nov 2011 14:11:00 -0000 > @@ -556,10 +556,15 @@ man_pmacro(struct man *m, int ln, char * > if ((m->flags & MAN_BLINE) && > (MAN_BSCOPE & man_macros[tok].flags)) { > n = m->last; > - assert(MAN_TEXT != n->type); > > - /* Remove element that didn't end BLINE, if any. */ > + /* Might be a text node like 8 in > + * .TP 8 > + * .SH foo > + */ > + if (MAN_TEXT == n->type) > + n = n->parent; > > + /* Remove element that didn't end BLINE, if any. */ > if ( ! (MAN_BSCOPE & man_macros[n->tok].flags)) > n = n->parent; -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv