From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-1.sys.kth.se (smtp-1.sys.kth.se [130.237.32.175]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id o5RFpASq032681 for ; Sun, 27 Jun 2010 11:51:11 -0400 (EDT) Received: from smtp-1.sys.kth.se (localhost [127.0.0.1]) by smtp-1.sys.kth.se (Postfix) with ESMTP id 53B3D1571BF for ; Sun, 27 Jun 2010 17:51:04 +0200 (CEST) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-1.sys.kth.se ([127.0.0.1]) by smtp-1.sys.kth.se (smtp-1.sys.kth.se [127.0.0.1]) (amavisd-new, port 10024) with LMTP id TX+ywxAOjbgz for ; Sun, 27 Jun 2010 17:50: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-1.sys.kth.se (Postfix) with ESMTP id 0C5A51558ED for ; Sun, 27 Jun 2010 17:50:49 +0200 (CEST) Message-ID: <4C2775AB.5050909@bsd.lv> Date: Sun, 27 Jun 2010 18:00:43 +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: mdocml: Churn-ish check-in getting mdoc_parseln() and man_parseln() to References: <201006261536.o5QFacau021968@krisdoz.my.domain> <20100626200900.GC23805@iris.usta.de> In-Reply-To: <20100626200900.GC23805@iris.usta.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Ingo, > This must not be const. Registers should be written only by libroff (they're roff constructs). It's up to libmdoc and libman if they want to cue the front-ends by looking at both their internal state and the registers. This will be apparent by the next commit that implements the cue for SYNOPSIS formatting. > .Sh SYNOPSIS implies .nr nS 1, > any other .Sh implies .nr nS 0. > > Apart from that, it might be possible to get your approach working. > The decisive point will be implementing the frontend cues. That'll be in the next patch. I'm committing a big fat clean-up right now that stuffs regset into struct mdoc/man/roff, because it must reach deep into the system and I'm tired of changing function prototypes. > The nice thing about my patch is that the backend and the frontend > can use identical roff_reg_(get|set)* functions, so some functions > can be shared between mdoc_validate and mdoc_term. True, but I don't want the front-ends looking at raw registers. In general, the compilers should tell the front-ends exactly what to do with flags and cached data: I want dumb front-ends in terms of semantics. > With your approach, you must be careful to not implement the same > thing twice, once in the backend using the roff register data > structure, then the same logic in the frontend using a different > cues data structure. > > So, i shall not merge this yet, but wait how it goes. :) Thanks for the comments! Keep an eye peeled. Kristaps -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv