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 pAG0qLfV008735 for ; Tue, 15 Nov 2011 19:52:21 -0500 (EST) Received: from mailscan-1.sys.kth.se (mailscan-1.sys.kth.se [130.237.32.91]) by smtp-2.sys.kth.se (Postfix) with ESMTP id 4090F14D7CC for ; Wed, 16 Nov 2011 01:52:16 +0100 (CET) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-2.sys.kth.se ([130.237.32.160]) by mailscan-1.sys.kth.se (mailscan-1.sys.kth.se [130.237.32.91]) (amavisd-new, port 10024) with LMTP id ZX+pxkgS1wIA for ; Wed, 16 Nov 2011 01:52:15 +0100 (CET) X-KTH-Auth: kristaps [77.201.233.73] X-KTH-mail-from: kristaps@bsd.lv X-KTH-rcpt-to: tech@mdocml.bsd.lv Received: from [192.168.1.57] (73.233.201.77.rev.sfr.net [77.201.233.73]) by smtp-2.sys.kth.se (Postfix) with ESMTP id 4EE0014D7CB for ; Wed, 16 Nov 2011 01:52:15 +0100 (CET) Message-ID: <4EC3093E.3030504@bsd.lv> Date: Wed, 16 Nov 2011 01:52:14 +0100 From: Kristaps Dzonsons User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 To: tech@mdocml.bsd.lv Subject: Re: mandocdb: full set of search types References: <20111116003919.GD30189@iris.usta.de> In-Reply-To: <20111116003919.GD30189@iris.usta.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 16/11/2011 01:39, Ingo Schwarze wrote: > Hi, > > we are close to going into production. I have talked to espie@, > and he is d'accord with putting small pieces into > /usr/src/libexec/makewhatis/Makewhatis.pm > to call out to mandocdb(8) for automated updates of the mandoc.db > files alongside the updates of the whatis.db files when installing > and removing packages, such that people running -current can easily > start testing the new apropos. > > We will keep the old makewhatis/apropos-combo in place until the new > system is reasonably feature-complete and clearly better than the > old one, then install the new apropos in place of the old one and > finally remove the old components. > > Before enabling mandocdb in pkg_add(8), i'd like to get the database > format complete, such that we don't force people to rebuild the > databases after upgrading to new snapshots. > > Here is a patch defining TYPE_ flags for all macros that i can > imagine might be worth searching for (maybe even a few more, but i'd > rather have too many than too few). I have left out all obsolete > macros and most physical formatting macros. > > This requires switching the mask to 64 bits. During the switch, > i have replaced the very error-prone handling of the key database > values by a new struct db_val; some memcpy() calls by normal > assignments; and some magical constants by sizeof() constructs. > > OK to put this in, or do you see anything that is missing? > > > Right now, i will start to implement the new search types. Hi Ingo, Just a word or two before I sleep. This approach is sound and I've no issues with a quick look over the patch, but will wait til tomorrow to do so in earnest. But first, before mandocdb gets production, the database should be checked for endian-neutrality. Second, we'd long ago mentioned splitting SYNOPSIS-invoked macros (Fl, Fn, etc.) for querying on their SYNOPSIS or non-SYNOPSIS usage. I think an elegant method is to encode the section within the keyword database, which allows for apropos Fn~mdoc -a -s SYNOPSIS or whatever `-s' replacement operator. How does that sound? This sounds a lot more reasonable than encoding separate Fn, Nm, etc. macros for SYNOPSIS and non-SYNOPSIS invocation. Thoughts? Kristaps -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv