Article View: news.software.nntp
Article #41255Re: NoCeM & INN2.3
From: greg andruk
Date: Wed, 03 Nov 1999 00:00
Date: Wed, 03 Nov 1999 00:00
39 lines
2836 bytes
2836 bytes
Russ Allbery <rra@stanford.edu> wrote: [header parsing code] > Take a look at the binary search trees that innd builds. I think I need > to continue supporting that in any rewrite, although I don't see any real > reason to use a tree; a binary search on an array should work just as > well. I have a search by name in there now, but it's not a binary search. The number of headers in the vast majority of articles is small enough that I'm thinking the serial scan on the first chars, followed by a compare on a potential match, might be plenty fast enough. Sorting costs too, after all. The #defined constants for direct access to the first instance of a "known" header are still supported, so this all should work out happily, I think. > My initial idea was to have the caller allocate an array of header > structs, pre-sorted in the right order to do a binary search, and then > pass the header parsing code that and the article headers and have it > fill in the header content for each of the headers found. I've got something like this going, basically a big tangle of pointers gets built to allow search by name, retrieval from the traditional INN-style header struct, and reassembly into their original order via writev() or simliar. Callas to add and delete header lines are in there too. This API will solve the problem of getting "unknown" heaeders into the filters, too. > With maybe some extra fluff for required headers, duplicate headers, and > the like. That's incorporated into the traditional-style struct. Basically, I took the ARTHEADER and HEADER from innd and nnrpd and merged them, with two sets of HTstd and friends, one each for transit and posting.
Technical Details
Message-ID:
<87ogdavort.fsf@slip-32-100-243-27.ma.us.prserv.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<3819A774.9C57FDCA@boerde.de> <7vei02$1n3@bigred.inka.de> <ylu2n8cokb.fsf@windlord.stanford.edu> <7vhcis$oq9@bigred.inka.de> <yl7lk3llie.fsf@windlord.stanford.edu> <7vicf1$1dh$1@inn.do.mms.mt.nec.co.jp> <ylg0yppcjo.fsf@windlord.stanford.edu> <87yachwck5.fsf@slip-32-100-243-27.ma.us.prserv.net> <ylyachnwki.fsf@windlord.stanford.edu> <87u2n5wa1n.fsf@slip-32-100-243-27.ma.us.prserv.net> <yl66zlnugn.fsf@windlord.stanford.edu> <87puxtw8os.fsf@slip-32-100-243-27.ma.us.prserv.net> <yl7ljy6hbv.fsf@windlord.stanford.edu>Show Full Headers
Complete Article Headers
Message-ID: <87ogdavort.fsf@slip-32-100-243-27.ma.us.prserv.net> Subject: Re: NoCeM & INN2.3 Date: Wed, 03 Nov 1999 00:00:00 +0000 From: greg andruk <gerglery@usa.net> References: <3819A774.9C57FDCA@boerde.de> <7vei02$1n3@bigred.inka.de> <ylu2n8cokb.fsf@windlord.stanford.edu> <7vhcis$oq9@bigred.inka.de> <yl7lk3llie.fsf@windlord.stanford.edu> <7vicf1$1dh$1@inn.do.mms.mt.nec.co.jp> <ylg0yppcjo.fsf@windlord.stanford.edu> <87yachwck5.fsf@slip-32-100-243-27.ma.us.prserv.net> <ylyachnwki.fsf@windlord.stanford.edu> <87u2n5wa1n.fsf@slip-32-100-243-27.ma.us.prserv.net> <yl66zlnugn.fsf@windlord.stanford.edu> <87puxtw8os.fsf@slip-32-100-243-27.ma.us.prserv.net> <yl7ljy6hbv.fsf@windlord.stanford.edu> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 544259600 X-Complaints-To: abuse@prserv.net X-Trace: 4 Nov 1999 04:55:41 GMT, 32.100.55.193 Organization: meow X-Meow: meow Newsgroups: news.software.nntp