Article View: news.software.readers
Article #65289[slrn] sorting "file (2/23)" and "file (10/23)"
From: Jurriaan (note: this is a workin...
Date: Tue, 05 Sep 2000 18:48
Date: Tue, 05 Sep 2000 18:48
27 lines
1970 bytes
1970 bytes
basically, that doesn't work, since headers are compared as ascii.
However, this one-line patch seems to do it right, at least here.
==============================================================
while (1)
{
register unsigned char cha, chb;
while (*sa == ' ') sa++;
while (*sb == ' ') sb++;
/* compare things like part (2/21) and part (21/21) against each other */
/* and sort correctly! do this here, since part (3/25) should not be */
/* sorted after part (25/25), even if 3 > 2. */
if (atoi(sa) != atoi(sb)) return (int)(atoi(sa) - atoi(sb));
==============================================================
It is left as an exercise to the reader to determine where this patch is
added... (partly because my art.c is badly polluted with other patches)
Good luck,
Jurriaan
--
I am Richard Stallman of Borg. Assimilation should be free!
GNU/Linux 2.2.18pre2 SMP 6 users load av: 0.24 0.14 0.09
Technical Details
Message-ID:
<slrn8rafuh.7p7._hate_spam_thunder7@middle.of.nowhere>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!sn-east!supernews.com!news-feed.riddles.org.uk!freenix!skynet.be!newsfeeds.belnet.be!news.belnet.be!transit.news.xs4all.nl!newsfeed.xs4all.nl!xs4all!no_spam_hereShow Full Headers
Complete Article Headers
Message-ID: <slrn8rafuh.7p7._hate_spam_thunder7@middle.of.nowhere> Subject: [slrn] sorting "file (2/23)" and "file (10/23)" Date: Tue, 05 Sep 2000 18:48:37 +0000 From: no_spam_here@rivierenland.xs4all.nl (Jurriaan (note: this is a working address!)) 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!sn-east!supernews.com!news-feed.riddles.org.uk!freenix!skynet.be!newsfeeds.belnet.be!news.belnet.be!transit.news.xs4all.nl!newsfeed.xs4all.nl!xs4all!no_spam_here Newsgroups: news.software.readers Organization: XS4ALL Internet BV Lines: 26 NNTP-Posting-Host: rivierenland.xs4all.nl X-Trace: news1.xs4all.nl 968179717 13573 194.109.14.47 (5 Sep 2000 18:48:37 GMT) X-Complaints-To: abuse@xs4all.nl NNTP-Posting-Date: 5 Sep 2000 18:48:37 GMT User-Agent: slrn/0.9.6.2 (GNU/Linux)