Article View: demon.ip.developers
Article #127Newshistory checking
From: Terrance Richard Boyes
Date: Tue, 13 Jul 1999 00:00
Date: Tue, 13 Jul 1999 00:00
40 lines
2164 bytes
2164 bytes
I'm looking for an efficient way to check for duplicate Message-IDs
in a large NewsHistory file against the output of NEWNEWS (or XOVER
after extracting the Message-ID).
Using REXX, I'd do something like
/* read history file */
do until eof(historyfile)
MESSAGEID=ReadLn()
NewsHistory.MESSAGEID=1
end
....
/* get message ids */
....
/* check for dupes */
if NewsHistory.MESSAGEID~=1 then
/* download article */
...
In awk (I guess Perl has simialr capabilities)
# read history file
while (getline < "historyfile" > 0)
NewsHistory[$1]=1
As in those languages it's much quicker than scanning through
an array.
Any thoughts on the best way to do it in C ?
NB a pointer to some source what I want will do just as well as
a detailed answer ;)
--
<URL:http://www.pierrot.co.uk/> Team AMIGA
A morsel of genuine history is a thing so rare as to be always valuable.
- Thomas Jefferson
Technical Details
Message-ID:
<19990713.200500.0AA80202.PEaa@pierrot.co.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10bb05,75d5f9974c0fd91a,start X-Google-Attributes: gid10bb05,public From: tez@pierrot.co.uk (Terrance Richard Boyes) Subject: Newshistory checking Date: 1999/07/13 Message-ID: <19990713.200500.0AA80202.PEaa@pierrot.co.uk> X-Deja-AN: 500643554 X-PGP-Fingerprint: 20 66 0F E8 85 64 9C 2C 6F 82 6F 19 6C 2F 6A 1D X-Cancel-Lock: TEZT:671879b28046441a576ac1c6d75b2fcf a5e14b87929f5b4227f6bd4a548fe181 X-PGP-Keyfile: <URL:http://www.pierrot.co.uk/pgpauth/> X-PGP-Auth: pub 512/3A14C4B9 1999/04/22 Tez Boyes <tez@pierrot.co.uk> iQBVAwUBN4uqAkXush46FMS5AQFaSAH/de1am5yL3pbF5cfgwRAZU5i4Bj1yauv0 sLjfgeqKmcuX8DBEsmsmHqKrqZnprz/b5oyMGHDzgTTa6TKC2kSnmA== =AQb1 X-NaMLServ: $VER: v0.9b <tez@pierrot.co.uk> X-Complaints-To: abuse@demon.net X-Mail2News-Path: news.demon.net!finch-post-10.mail.demon.net!pierrot.demon.co.uk!pierrot.co.uk!tez@pierrot.co.uk X-Trace: mail2news.demon.co.uk 931896346 mail2news:755 mail2news mail2news.demon.co.uk Organization: ECL.Net User-Agent: tin/pre-1.4-980618 (AMIGA) X-Lan-Trace: news.pierrot.lan 19990713.200500 news:PEaa IDENT tez@ami060.pierrot.lan Newsgroups: demon.ip.developers