From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-2.sys.kth.se (smtp-2.sys.kth.se [130.237.32.160]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id o5QDiwEK014038 for ; Sat, 26 Jun 2010 09:44:59 -0400 (EDT) Received: from smtp-2.sys.kth.se (localhost [127.0.0.1]) by smtp-2.sys.kth.se (Postfix) with ESMTP id F187C14DC41 for ; Sat, 26 Jun 2010 15:44:52 +0200 (CEST) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-2.sys.kth.se ([127.0.0.1]) by smtp-2.sys.kth.se (smtp-2.sys.kth.se [127.0.0.1]) (amavisd-new, port 10024) with LMTP id rdFmcTgFnM-0 for ; Sat, 26 Jun 2010 15:44:51 +0200 (CEST) X-KTH-Auth: kristaps [130.237.221.96] X-KTH-mail-from: kristaps@bsd.lv X-KTH-rcpt-to: tech@mdocml.bsd.lv Received: from [130.237.221.96] (ctime.pdc.kth.se [130.237.221.96]) by smtp-2.sys.kth.se (Postfix) with ESMTP id 852C414CE06 for ; Sat, 26 Jun 2010 15:44:51 +0200 (CEST) Message-ID: <4C2606A4.8050203@bsd.lv> Date: Sat, 26 Jun 2010 15:54:44 +0200 From: Kristaps Dzonsons User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090707) X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 To: tech@mdocml.bsd.lv Subject: Re: [PATCH] implement .Bk References: <20100626133824.GB22002@iris.usta.de> In-Reply-To: <20100626133824.GB22002@iris.usta.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit > yesterday night, i arrived at Edmonton for the c2k10, the OpenBSD > yearly general hackathon. I plan to spend this week on mandoc. > > Here is the first patch i hacked up on the plane, > implementing proper .Bk support. > It is based on OpenBSD-current and can probably go in more or less > as it is after merging bsd.lv HEAD into OpenBSD. I like it with one nit noted in-line. Also, can you document this in mdoc.7? Other than that, ok kristaps. > if ( ! (TERMP_NOSPACE & p->flags)) { > - bufferc(p, ' '); > - if (TERMP_SENTENCE & p->flags) > + if (TERMP_KEEP & p->flags) > + bufferc(p, ASCII_NBRSP); > + else { > + if (TERMP_PREKEEP & p->flags) > + p->flags |= TERMP_KEEP; > bufferc(p, ' '); > + if (TERMP_SENTENCE & p->flags) > + bufferc(p, ' '); > + } In general, I try to have the "else" not have braces---most of the code is structured as such. Can you flip this to if ( ! (TERMP_KEEP & p->flags)) { multi-line } else buffer(p, ASCII_NBRSP); I'm pretty dumb in this regard: seeing the else-brace without the if-brace just plain confuses me. Good work! Kristaps -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv