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 o93GnhLT026202 for ; Sun, 3 Oct 2010 12:49:45 -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 13F3A157A0A; Sun, 3 Oct 2010 18:49:38 +0200 (CEST) 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 777AVE9IW9qE; Sun, 3 Oct 2010 18:49:36 +0200 (CEST) X-KTH-Auth: kristaps [85.8.61.46] X-KTH-mail-from: kristaps@bsd.lv Received: from lappy.cust.alltele.se (h85-8-61-46.dynamic.se.alltele.net [85.8.61.46]) by smtp-1.sys.kth.se (Postfix) with ESMTP id 572F3157A06; Sun, 3 Oct 2010 18:49:33 +0200 (CEST) Message-ID: <4CA8B41C.7020300@bsd.lv> Date: Sun, 03 Oct 2010 18:49:32 +0200 From: Kristaps Dzonsons User-Agent: Thunderbird 2.0.0.23 (X11/20100318) X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 To: Ingo Schwarze , tech@mdocml.bsd.lv Subject: Re: mdocml: Unify mdoc and man enums and structs into mandoc.h. References: <201010021014.o92AEcOr023027@krisdoz.my.domain> <20101002175621.GB19515@iris.usta.de> In-Reply-To: <20101002175621.GB19515@iris.usta.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit >> Log Message: >> ----------- >> Unify mdoc and man enums and structs into mandoc.h. >> This is part of the slow process of logically splitting >> formatting frontend and parser backend without pollution. > > Hmm, i fear i don't understand this. > Given the relation "depends on" shown as "<-", > i would expect the following dependencies: > > frontends (html.h, term.h) <- general & output utils > backends (*man.h, *mdoc.h) <- general utils > preprocessor (roff.h) <- general utils > output utils (chars.h, out.h) <- none > general utils (*mandoc.h) <- none > > But i don't understand why two different frontends or two > different backends should depend on each other, or why including > one might make it necessary to include the other. > > Sorry, i'm lacking the tiome right now to look deeper into this... Ingo, cross-posting to tech@.... I want to make a simple mandoc.h and libmandoc.a that has all the ingredients for writing front-ends, such as a fancier makewhatis and apropos, or man.cgi or whatnot. To begin with: roff.h, mdoc.h, and man.h -> mandoc.h; libmdoc.a, libroff.a, and libman.a (and associated stuff) being merged into a single libmandoc.a. Then libmdoc.h, libman.h, and libroff.h being merged into libmandoc.h, used internally within libmandoc.a. This will reduce structural complexity that's been bothering me for a while. Once this is done, I will abstract and push the fdesc() function into the library: it implements parts of the grammar (such as escaped newlines) that should be internal to the library. Another push is to get the escape routines in one place; right now, the functionality is duplicated. Restructuring is a necessary precondition before I do so. Thoughts? Kristaps -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv