Article View: news.software.readers
Article #72167Re: GNKSA questions (Noworyta News Reader)
From: Filip Noworyta
Date: Fri, 16 Feb 2001 17:47
Date: Fri, 16 Feb 2001 17:47
53 lines
3059 bytes
3059 bytes
js@phil.uu.nl (Jeroen Scheerder), Fri, 16 Feb 2001 09:20:39 +0100:
>It's actually not *that* hard to implement. In a high-level language
>you typically use high-level string (or pattern matching) constructs.
>In a low-level language the fact that you can do it "in place" (since
>you'll only remove mids) helps a lot.
>
>pcode:
>
> if refhdrtoolong(refhdr) {
> second = skipfirstone(refhdr)
> while refhdrtoolong(refhdr) {
> removeonemsgid(second)
> }
> }
I use rather low-level C language, so it's not THAT easy, but 1. I
really love (this word tells all) algorithms, 2. for this problem I used
high-level AnsiString type. BTW: to programmers - char* i _much_
faster for bigger files/buffers, for example for decoding/encoding big
attachments.
>The "refhdrtoolong" and "skipfirstone" and "removeonemsgid" functions
>shouldn't be too hard, although you should take some care in that last
>one to make sure it keeps a duplicate space around where msids are
>dropped, and that it never removes the last msgid.
Well, you underestimate me - there are much harder problems in
programming a newsreader than removing some msgids from references :) The
algorithms are my passion and "Introduction to algorithms" by Cormen,
Leiserson, Rivest, MIT, was one of the best books I have ever read.
>Things also get a lot simpler if you remove any broken msgids (as per
>7e) first; actually, writing a routine that checks whether or not a
>given msgid is syntactically correct may be a bit tougher than expected.
I don't remove broken msgids in this version :(
>You may want to reread that bit of the RFCs. They define it better, and
>in more detail, than I can do in a few lines of a usenet articles.
[...]
Thanks for help!
One more thing: this is really hard work and I'm also working on a
e-mail part of my newsreader. Now I must stop sitting 20 cm from monitor
14 hours a day! :)
--
Filip Noworyta
| new newsreader and mail client
| Noworyta News Reader 1.4
| http://kyd.net/newsreader
Technical Details
Message-ID:
<96jp4p$lenkr$1@ID-70408.news.dfncis.de>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!pa112.katowice.cvx.ppp.tpnet.PL!not-for-mailReferences:
<96h44a$l0j9k$1@ID-70408.news.dfncis.de> <1eowzjh.syj5m47vz1fgN@gnksa.org>Show Full Headers
Complete Article Headers
Message-ID: <96jp4p$lenkr$1@ID-70408.news.dfncis.de> Subject: Re: GNKSA questions (Noworyta News Reader) Date: Fri, 16 Feb 2001 17:47:36 GMT From: Filip Noworyta <filnow@kki.net.pl> References: <96h44a$l0j9k$1@ID-70408.news.dfncis.de> <1eowzjh.syj5m47vz1fgN@gnksa.org> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!130.133.1.3!fu-berlin.de!uni-berlin.de!pa112.katowice.cvx.ppp.tpnet.PL!not-for-mail Newsgroups: news.software.readers Lines: 52 Reply-To: pro@space.pl NNTP-Posting-Host: pa112.katowice.cvx.ppp.tpnet.pl (213.76.8.112) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: fu-berlin.de 982345697 22503067 213.76.8.112 (16 [70408]) User-Agent: Noworyta News Reader 1.4