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 p2LMYJ73019823 for ; Mon, 21 Mar 2011 18:34:20 -0400 (EDT) Received: from mailscan-1.sys.kth.se (mailscan-1.sys.kth.se [130.237.32.91]) by smtp-1.sys.kth.se (Postfix) with ESMTP id 39C9D155B81; Mon, 21 Mar 2011 23:34:13 +0100 (CET) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-1.sys.kth.se ([130.237.32.175]) by mailscan-1.sys.kth.se (mailscan-1.sys.kth.se [130.237.32.91]) (amavisd-new, port 10024) with LMTP id cHkp5y7b1zH4; Mon, 21 Mar 2011 23:34:11 +0100 (CET) X-KTH-Auth: kristaps [85.8.61.153] X-KTH-mail-from: kristaps@bsd.lv Received: from h85-8-61-153.dynamic.se.alltele.net (h85-8-61-153.dynamic.se.alltele.net [85.8.61.153]) by smtp-1.sys.kth.se (Postfix) with ESMTP id DFB8A155AF2; Mon, 21 Mar 2011 23:34:09 +0100 (CET) Message-ID: <4D87D261.300@bsd.lv> Date: Mon, 21 Mar 2011 23:34:09 +0100 From: Kristaps Dzonsons User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 To: Ingo Schwarze CC: tech@mdocml.bsd.lv Subject: Re: [PATCH] Massive restructuring into mandoc.h/libmandoc.a. References: <4D878CF0.2060306@bsd.lv> <20110321215744.GA16603@iris.usta.de> In-Reply-To: <20110321215744.GA16603@iris.usta.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit >> This considerably simplifies the spaghetti-mess of inclusions, > > Hmm, i'm looking at the details right now. > > I'm not sure yet, i have a suspicion this might be overdone; > but maybe it is not. Expect some real feedback shortly, > hopefully tonight, or tomorrow night at the latest. Ingo, keep me posted (I hope you don't mind my cross-posting back to tech@, as this includes some motivations for the recent changes). In terms of being overdone, consider: (1) Collapsing libmdoc, libman, and libroff into libmandoc. I'm motivated by the wrongness of the existing approach: maintaining separable libmdoc, libman, and libroff compilers ignores the reality that Real Manuals are always mixing them. The more we work on libroff, in particular, the more it's going to have to work with the underlying compilers. Consider, if you will, how to handle in-line equations without calling into the EQN parser from libmdoc or libman (".Qq $a+b$" comes to mind). This will only get worse. (2) Collapsing main.c parsing into read.c and thus libmandoc. The notion of "libmdoc" and "libman" as standalone parsers is a horrible lie. A significant amount of parse complexity, such as pasting together CPP-escaped lines and validating ASCIIness, occured in main.c. Not even to mention (1), and the reality that mdoc and man rarely occur on their own, making the roff_parsln() and mdoc/man_parse dance part of the document syntax itself. (3) Collapsing mdoc.h and man.h into libmandoc.h/mandoc.h. Two things. First off, see (2). The parse() functions in both of these headers were lies. Second of all, and allowing for that, what do we get by having both mdoc.h and man.h in terms of their type definitions? All this allows is for the two pairs, mdoc_XXXX.c and man_XXXX.c, to have their own inclusions. Big f. deal: everybody else imports both anyway! It's artificial to split them and, although this isn't OpenBSD's problem, it puts an unnecessary burden on distributing libmandoc.a (requiring mdoc.h and man.h hanger-ons) for use by other utilities. That's pretty much all these patches accomplish. The rest is the Makefile being re-written, which I've wanted to do for ages. Kristaps -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv