Article View: news.software.nntp
Article #71104Re: [NNTP] LISTGROUP
From: Curt Welch
Date: Wed, 20 Apr 2005 22:10
Date: Wed, 20 Apr 2005 22:10
35 lines
2772 bytes
2772 bytes
Russ Allbery <rra@stanford.edu> wrote: > Curt Welch <curt@kcwc.com> writes: > > > I'm guessing INN didn't turn 100-85 into 100- because they did an > > absolute test for matching the high value. My guess is that they have > > a range parser which considers the second value invalid since it was > > too low and treates it like it doesn't exist. > > /* Parse range. */ > *p++ = '\0'; > rp->Low = atol(av[1]); > if (*p == '\0' || (rp->High = atol(p)) < rp->Low) > /* "XHDR 234-0 header" gives everything to the end. */ That comment sheds some light on how this probably came to be. The idea of using 0 as a special value to mean "the end" might have been thought up before the idea of using a missing second number. And they just choose to code it so all the h<l cases were the same as the 0 case. This is the first time I've ever seen the idea that a 0 value means "the end". It's certainly consistent with the behavior of routines like atol(). I wonder if this convention comes from further back in the history of NNTP or if other servers special case a value of 0 to work that way? > rp->High = ARThigh; > else if (rp->High > ARThigh) > rp->High = ARThigh; > if (rp->Low < ARTlow) > rp->Low = ARTlow; > p--; > *p = '-'; -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com http://NewsReader.Com/
Technical Details
Message-ID:
<20050420181015.333$LH@newsreader.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!feed4.newsreader.com!newsreader.com!newsh.newsreader.com!ellis.newsreader.com!not-for-mailReferences:
<87is2mz13d.fsf@windlord.stanford.edu> <Pine.WNT.4.63.0504181529350.3216@Tomobiki-Cho.CAC.Washington.EDU> <20050419205322.158$D1@newsreader.com> <87y8bei7d2.fsf@windlord.stanford.edu> <20050419220813.904$pf@newsreader.com> <pan.2005.04.20.08.42.21.253185@fanfan.staff.proxad.net> <20050420134321.436$PG@newsreader.com> <87r7h51fjn.fsf@windlord.stanford.edu>Show Full Headers
Complete Article Headers
Message-ID: <20050420181015.333$LH@newsreader.com>
Subject: Re: [NNTP] LISTGROUP
Date: Wed, 20 Apr 2005 22:10:15 +0000
From: curt@kcwc.com (Curt Welch)
References: <87is2mz13d.fsf@windlord.stanford.edu> <Pine.WNT.4.63.0504181529350.3216@Tomobiki-Cho.CAC.Washington.EDU> <20050419205322.158$D1@newsreader.com> <87y8bei7d2.fsf@windlord.stanford.edu> <20050419220813.904$pf@newsreader.com> <pan.2005.04.20.08.42.21.253185@fanfan.staff.proxad.net> <20050420134321.436$PG@newsreader.com> <87r7h51fjn.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.20140818.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!feed4.newsreader.com!newsreader.com!newsh.newsreader.com!ellis.newsreader.com!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.nntp
X-Trace: NewsReader.Com fPMZYFY3xK2_874Ys@Mte3xIAAQZKZdxU1Q7IcfRAXx@u2ThfS
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,
?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5
%IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
X-Url: http://CurtWelch.Com/
User-Agent: NewsReader.Com
Lines: 35