Thread View: news.software.readers
2 messages
2 total messages
Started by Gary
Sun, 09 Feb 1997 00:00
1,000,000 articles problem with TRN 3.4.1
Author: Gary
Date: Sun, 09 Feb 1997 00:00
Date: Sun, 09 Feb 1997 00:00
14 lines
825 bytes
825 bytes
I am unable to read newsgroups that have more than 999,999,999 articles. I'm using TRN 3.4.1 Any suggestions? TIA. -- ---------------------------------+--------------------------------------------- Gary - gmg@ari.net |
Re: 1,000,000 articles problem with TRN 3.4.1 [patch]
Author: Arjan de Vet
Date: Mon, 10 Feb 1997 00:00
Date: Mon, 10 Feb 1997 00:00
70 lines
2992 bytes
2992 bytes
In article <5djilc$6da@ari.ari.net>, Gary <gmg@mtolympus.ari.net> wrote:
>I am unable to read newsgroups that have more than 999,999,999 articles.
You mean 999,999 I think.
>I'm using TRN 3.4.1
>
>Any suggestions?
This bug has recently been fixed in trn 4.0 beta. I include the patch
below but I'm not sure it works for trn 3.4.1, the code may have changed a
lot.
Arjan
-----------------------------------------------------------------------------
Index: rcln.c
@@ -30,4 +30,6 @@
#include "rcln.h"
+#define MAX_DIGITS 7
+
void
rcln_init()
@@ -174,5 +176,5 @@
morenum = isdigit(*s); /* will it need a comma after? */
*(np->rcline + np->numoffset - 1) = np->subscribechar;
- mbuf = safemalloc((MEM_SIZE)(strlen(s) + (s - np->rcline) + 6+2+1));
+ mbuf = safemalloc((MEM_SIZE)(strlen(s)+(s - np->rcline)+MAX_DIGITS+2+1));
strcpy(mbuf,np->rcline); /* make new rc line */
if (maxt && lastnum && artnum == lastnum+1)
@@ -297,5 +299,5 @@
}
*(np->rcline + np->numoffset - 1) = np->subscribechar;
- mbuf = safemalloc((MEM_SIZE)(curlen + (artnum?(6+1)*2+1:1+1)));
+ mbuf = safemalloc((MEM_SIZE)(curlen+(artnum?(MAX_DIGITS+1)*2+1:1+1)));
*s = '\0';
strcpy(mbuf,np->rcline); /* make new rc line */
@@ -400,6 +402,6 @@
nums = np->rcline + np->numoffset;
length = strlen(nums);
- if (length+5+1 > sizeof tmpbuf)
- mybuf = safemalloc((MEM_SIZE)(length+5+1));
+ if (length+MAX_DIGITS+1 > sizeof tmpbuf)
+ mybuf = safemalloc((MEM_SIZE)(length+MAX_DIGITS+1));
strcpy(mybuf,nums);
mybuf[length++] = ',';
@@ -487,6 +489,5 @@
if (lastnum != 1) {
if (3+(int)strlen(s) > (int)strlen(np->rcline+np->numoffset)) {
- mbuf = safemalloc((MEM_SIZE)(np->numoffset + 3 +
- strlen(s) + 1));
+ mbuf = safemalloc((MEM_SIZE)(np->numoffset+3+strlen(s)+1));
strcpy(mbuf, np->rcline);
sprintf(mbuf+np->numoffset," 1-%s",s);
@@ -501,8 +502,8 @@
}
/* s now points to what should follow first range */
- if (s - np->rcline > np->numoffset + 6+4+1)
+ if (s - np->rcline > np->numoffset + MAX_DIGITS+4+1)
mbuf = np->rcline;
else {
- mbuf = safemalloc((MEM_SIZE)(np->numoffset + strlen(s) + 6+4+1));
+ mbuf = safemalloc((MEM_SIZE)(np->numoffset+strlen(s)+MAX_DIGITS+4+1));
strcpy(mbuf,np->rcline);
}
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads