Article View: news.software.readers
Article #3301Trn-2.5 released
From: Wayne Davison
Date: Wed, 10 Feb 1993 18:55
Date: Wed, 10 Feb 1993 18:55
422 lines
17304 bytes
17304 bytes
I've decided to release version 2.5 of trn even though trn 3.0 is just a
few weeks away from it's intended release due to a couple crash problems
found in version 2.4 (one has been around since early rn days, though,
but it is just now showing up due to 6-digit article numbers).
Appended is the patch to bring trn 2.4 up to version 2.5. You'll also
find this patch and the full tar source on ftp.uu.net:
ftp.uu.net:/news/readers/trn/trn-2.5.patch.Z
ftp.uu.net:/news/readers/trn/trn-2.5.tar.Z
** Note: This file has some really long lines in it. **
If you get a corrupted version either grab the file from uunet or ask
me for a uuencoded copy.
See the newly-updated NEW file below for a list of the fixes. I just
noticed that the fix for the "intrp buffer overflow" when saving mail
format articles isn't mentioned in the NEW file, however it IS fixed.
Wayne Davison
davison@borland.com
---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
Index:patchlevel
Prereq: v2.4
@@ -1,1 +1,1 @@
-trn v2.4
+trn v2.5
Index:NEW
@@ -1,6 +1,146 @@
- TRN 2.3 vs TRN 1.0.3:
-
[If you're upgrading from trn 1.x, at least read the ** LOOK ** section.]
+====== Trn 2.5 ======
+
+Enhancements:
+
+Bug fixes:
+ o Added a missing comment on the bcmp line in config.h.SH that
+ was causing problems with the RENAME definition.
+ o Changed the newsrc-handling code to allocate the strings with
+ room for numbers with 6 digits.
+ o Fixed a possible crash bug when entering a group that is really
+ empty but the active file indicates there are articles to read.
+ o Trn includes a Reply-To header in your article/mail if the REPLYTO
+ environment variable is set (the manpage documented this, but trn
+ didn't do it).
+ o Fixed the inclusion of inn's nntp.h file when using inn's clientlib.
+ o Documented the 'Z' command in the manpage.
+
+====== Trn 2.4 ======
+
+Areas of enhancement/bug fixes:
+
+ o The reference line trimming has been modified to save the first
+ reference on the line (just in case it is the root article).
+ o Made trn/mthreads more supportive of systems that don't update their
+ min field in the active file.
+ o If no SIGEMT is available, use signal 0 instead.
+ o If SYSTYPE is defined to a bsd* value, use the sh from /SYSTYPE/bin.
+ o Changed the variable "daylight" in getdate.y to avoid conflict with
+ a global variable of the same name on certain systems.
+ o Restored the newsgroup-growth tracking while in the group.
+ o Support for AIX returning an non-zero value > 255 from isupper().
+ o Fixed various glitches with strcmp/bcmp, strchr/index, <stdlib.h>,
+ and <string.h>.
+ o Fixed the missing "line" reference in mthreads.
+ o Fixed the void*/char* mismatch in the rawget_server definition.
+ o Fixed the -c command-line option.
+
+====== Trn 2.3 ======
+
+New commands:
+
+ Z supersede the current article using it's text as the
+ initial text for the new article (article level)
+ ( and ) move to an article's previous/next sibling, including
+ "cousin" siblings (article level)
+ c The thread selector now allows you type type 'c'/'y'
+ to catchup the group without chasing xrefs.
+
+New command-line options:
+
+ -b read articles in a breadth-first descent of the
+ article tree.
+ -j tell trn to pass control characters through the
+ pager unharmed.
+
+Fixes for trn:
+ o Trn would sometimes put bogus Reference lines in new articles.
+ o Fixed a problem in the KILL file processing of new articles
+ that arrive while within the group.
+ o The default extract directory is now correctly set to a
+ group's SAVEDIR when entering a group.
+ o Relative paths that contain a slash are not bumped out of
+ SAVEDIR when saving articles.
+ o You can now 'g'o to a group name that starts with a number.
+ o Trn opens the correct article when it is pre-fetching.
+ o Turned off subject-prefetch in a threaded group.
+ o Fixed a bug in the subject-search code that would result in
+ very slow search times if a group had lots of missing articles.
+ o When using the 'k'ill thread command in the thread selector, it
+ no longer tries to chases xrefs for each keypress -- instead it
+ batches all the killing until after you're done selecting.
+ o Added Geoff Collyer's hdbm hasing routines to make scaning the
+ active file faster (e.g. when bogus groups are discovered).
+ o Various small fixes, including all the missing tweaks from
+ rn's last patch.
+
+Fixes/enhancements for mthreads:
+ o Fixed a couple bugs in the free code when attempting to ignore a
+ damaged thread file.
+ o Added an intelligent name-squishing algorithm.
+ o The NNTP version knows how to use the LISTGROUP command for the
+ extra-expire pass.
+ o Other small fixes and minor speed tweaking.
+
+Configure updates:
+ o Added detection/query for INN.
+ o Fixes to support more nm output formats.
+ o Configure now checks for DGUX.
+ o Fixed Configure's understanding of Domain/OS (hopefully).
+
+Misc:
+ o The HINTS file was corrected and an additional hint added.
+
+NNTP changes for v1.5.11[t]:
+ o Added LISTGROUP command (for mthreads).
+ o The NEWGROUPS command is now filtered to remove groups you don't
+ have permission to access.
+ o Fixed LONG_THREAD_NAMES support.
+ o All clientlib changed have been removed and put into local code.
+ This allows trn to use the XTHREAD call using a wider variety of
+ clientlibs, including the one that comes with INN.
+
+====== Trn 2.2 ======
+
+Bug fixes:
+
+ o More upgrade notes for trn 1.x users (see ** LOOK ** in NEW).
+ o Enhanced the article-reading code to not remember our side-trip
+ to the end of the group between thread selections (to fix '-').
+ o Extended trrn's handling of new articles (we fetch the active file
+ more consistently, and listen to what the GROUP command tells us).
+ o Enhanced the thread selector to mention when new articles have
+ cropped up since the last visit to the selector.
+ o Changed strftime to use size_t and added a check for size_t in
+ Configure to make sure it is defined. Also made it a bit more
+ portable by using gettimeofday() and timezone() in some instances.
+ o Fixed a problem with the "total" structure not getting zero'ed in
+ mthreads (causing bogus 'E'rrors on null groups).
+ o Fixed a reference to tmpbuf in intrp.c that was bogus.
+ o Fixed a problem with using N and Y with the newgroup code and then
+ trying to use the 'a' command.
+ o Fixed an instance where having trrn get ahead of the active file
+ might declare a group as being reset when it wasn't.
+ o Reorganized the checks for Apollo's C library to make sure it doesn't
+ find the Domain OS version.
+ o Added a check for Xenix 386's C library.
+ o Made the Configure PATH more portable.
+ o Fixed the arguments prototypes to int_catcher() and swinch_catcher().
+ o Fixed the insert-my-subject-before-my-sibling code to not do this
+ when the sibling's subject is the same as the parent.
+ o Fixed a bug in the RELAY code (which I'm suprised is still being used).
+ o Twiddled the mthreads.8 manpage.
+ o mthreads.8 is now installed and the destination is prompted for in
+ Configure, since it might be different from the .1 destination.
+ o Fixed a typo in newsnews.SH and the README.
+
+====== Trn 2.1 ======
+
+Minor portability fixes and comment twiddles.
+
+====== Trn 2.0 ======
+
New commands:
@@ -214,6 +354,6 @@
mounted partition) goes away, trn shuts down gracefully now.
-
Configure improvements:
+
o Now uses nm to read contents of libc. ar is used if nm fails.
o The file config.h is now generated from config.h.SH instead of
@@ -233,6 +373,6 @@
to read the system name from.
-
General improvements:
+
o Makes use of POSIX capabilities if present.
o ANSI C Compatible
Index:common.h
@@ -625,5 +625,5 @@
# ifndef MAILHEADER /* % */
# ifdef CONDSUB
-# define MAILHEADER "To: %t\nSubject: Re: %S\nNewsgroups: %n\nIn-Reply-To: %i\n%(%[references]!=^$?References\\: %[references]\n)Organization: %o\nCc: \nBcc: \n\n"
+# define MAILHEADER "To: %t\nSubject: Re: %S\n%(%{REPLYTO}=^$?:Reply-To: %{REPLYTO}\n)Newsgroups: %n\nIn-Reply-To: %i\n%(%[references]!=^$?References\\: %[references]\n)Organization: %o\nCc: \nBcc: \n\n"
# else
# define MAILHEADER "To: %t\nSubject: Re: %S\nNewsgroups: %n\nIn-Reply-To: %i\nReferences: %[references]\nCc: \nBcc: \n\n"
@@ -651,5 +651,5 @@
#ifndef NEWSHEADER /* % */
# ifdef CONDSUB
-# define NEWSHEADER "Newsgroups: %(%F=^$?%C:%F)\nSubject: %(%S=^$?%\"\n\nSubject: \":Re: %S)\nSummary: \nExpires: \n%(%R=^$?:References: %R\n)Sender: \nFollowup-To: \nDistribution: %(%i=^$?%\"Distribution: \":%D)\nOrganization: %o\nKeywords: %[keywords]\n\n"
+# define NEWSHEADER "Newsgroups: %(%F=^$?%C:%F)\nSubject: %(%S=^$?%\"\n\nSubject: \":Re: %S)\nSummary: \nExpires: \n%(%R=^$?:References: %R\n)Sender: \nFollowup-To: \n%(%{REPLYTO}=^$?:Reply-To: %{REPLYTO}\n)Distribution: %(%i=^$?%\"Distribution: \":%D)\nOrganization: %o\nKeywords: %[keywords]\n\n"
# else
# define NEWSHEADER "Newsgroups: %F\nSubject: Re: %S\nSummary: \nExpires: \nReferences: %R\nSender: \nFollowup-To: \nDistribution: %D\nOrganization: %o\nKeywords: %[keywords]\n\n"
@@ -663,15 +663,7 @@
#ifndef PIPESAVER /* % */
# ifdef CONDSUB
-# ifdef SERVER
-# define PIPESAVER "%(%B=^0$?<%P/rrn%a.%$:tail +%Bc %P/rrn%a.%$ |) %b"
-# else
-# define PIPESAVER "%(%B=^0$?<%A:tail +%Bc %A |) %b"
-# endif
+# define PIPESAVER "%(%B=^0$?<%A:tail +%Bc %A |) %b"
# else
-# ifdef SERVER
-# define PIPESAVER "tail +%Bc %P/rrn%a.%$ | %b"
-# else
-# define PIPESAVER "tail +%Bc %A | %b"
-# endif
+# define PIPESAVER "tail +%Bc %A | %b"
# endif
#endif
@@ -678,17 +670,9 @@
#ifndef EXSAVER
-# ifdef SERVER
-# define EXSAVER "tail +%Bc %P/rrn%a.%$ | %e"
-# else
-# define EXSAVER "tail +%Bc %A | %e"
-# endif
+# define EXSAVER "tail +%Bc %A | %e"
#endif
#ifndef NORMSAVER /* % and ~ */
-# ifdef SERVER
-# define NORMSAVER "%X/norm.saver %P/rrn%a.%$ %P %c %a %B %C \"%b\""
-# else
-# define NORMSAVER "%X/norm.saver %A %P %c %a %B %C \"%b\""
-# endif
+# define NORMSAVER "%X/norm.saver %A %P %c %a %B %C \"%b\""
#endif
@@ -695,23 +679,11 @@
#ifndef MBOXSAVER /* % and ~ */
# ifdef MININACT /* 2.10.2 site? */
-# ifdef SERVER
-# define MBOXSAVER "%X/mbox.saver %P/rrn%a.%$ %P %c %a %B %C \"%b\" \"From %T %`LANG= date`\""
-# else
-# define MBOXSAVER "%X/mbox.saver %A %P %c %a %B %C \"%b\" \"From %T %`LANG= date`\""
-# endif
+# define MBOXSAVER "%X/mbox.saver %A %P %c %a %B %C \"%b\" \"From X %`LANG= date`\""
# else
# ifdef CONDSUB
-# ifdef SERVER
-# define MBOXSAVER "%X/mbox.saver %P/rrn%a.%$ %P %c %a %B %C \"%b\" \"From %T %(%[date]=^\\(\\w*\\), \\(\\w*\\)-\\(\\w*\\)-\\(\\w*\\) \\([^ ]*\\)?%1 %3 %(%2=..?%2: %2) %5 19%4)\""
-# else
-# define MBOXSAVER "%X/mbox.saver %A %P %c %a %B %C \"%b\" \"From %T %(%[date]=^\\(\\w*\\), \\(\\w*\\)-\\(\\w*\\)-\\(\\w*\\) \\([^ ]*\\)?%1 %3 %(%2=..?%2: %2) %5 19%4)\""
-# endif
+# define MBOXSAVER "%X/mbox.saver %A %P %c %a %B %C \"%b\" \"From X %(%[date]=^\\(\\w*\\), \\(\\w*\\)-\\(\\w*\\)-\\(\\w*\\) \\([^ ]*\\)?%1 %3 %(%2=..?%2: %2) %5 19%4)\""
/* header munging with a vengeance */
# else
-# ifdef SERVER
-# define MBOXSAVER "%X/mbox.saver %P/rrn%a.%$ %P %c %a %B %C \"%b\" \"From %T %[posted]\""
-# else
-# define MBOXSAVER "%X/mbox.saver %A %P %c %a %B %C \"%b\" \"From %T %[posted]\""
-# endif
+# define MBOXSAVER "%X/mbox.saver %A %P %c %a %B %C \"%b\" \"From X %[posted]\""
# endif
# endif
@@ -762,5 +734,5 @@
/* how to supersede an article */
#ifndef SUPERSEDEHEADER
-# define SUPERSEDEHEADER "Newsgroups: %n\nSubject: %S\nSummary: %[summary]\nExpires: %[expires]\nReferences: %[references]\nSupersedes: %i\nSender: %[sender]\nFollowup-To: %[followup-to]\nDistribution: %D\nOrganization: %o\nKeywords: %[keywords]\n\n"
+# define SUPERSEDEHEADER "Newsgroups: %n\nSubject: %S\nSummary: %[summary]\nExpires: %[expires]\nReferences: %[references]\nSupersedes: %i\nSender: %[sender]\nFollowup-To: %[followup-to]\nDistribution: %D\nOrganization: %o\nKeywords: %[keywords]\n\n"
#endif
@@ -910,9 +882,5 @@
/* miscellania */
-#ifdef linux
-long int fseek();
-#else
int fseek();
-#endif
long atol(), ftell();
EXT bool in_ng INIT(FALSE); /* current state of rn */
Index:config.h.SH
@@ -142,5 +142,5 @@
#$memcpy bcopy(s,d,n) memcpy((char*)d,(char*)s,(int)n) /* Different */
#$memcpy bzero(d,n) memset((char*)d,0,(int)n) /* flavors. */
-#$memcpy bcmp(s,s2,n) memcmp((char*)s,(char*)s2,(int)n)
+#$memcpy bcmp(s,s2,n) memcmp((char*)s,(char*)s2,(int)n) /**/
#$rename RENAME /* is rename() a system call? */
#$ftruncate FTRUNCATE /* is ftruncate() available? */
Index:intrp.c
@@ -1138,5 +1138,6 @@
break;
}
- while (*src == ' ' || *src == ',') src++;
+ while (*src == ' ' || *src == '\t' || *src == '\n' || *src == ',')
+ src++;
if (*src && --destsize > 0)
*dest++ = ' ';
Index:rcln.c
@@ -148,5 +148,5 @@
*(rcline[ngnum] + rcnums[ngnum] - 1) = rcchar[ngnum];
#endif
- mbuf = safemalloc((MEM_SIZE)(strlen(s) + (s-rcline[ngnum]) + 8));
+ mbuf = safemalloc((MEM_SIZE)(strlen(s) + (s-rcline[ngnum]) + 6+2+1));
strcpy(mbuf,rcline[ngnum]); /* make new rc line */
if (maxt && lastnum && artnum == lastnum+1)
@@ -269,5 +269,5 @@
*(rcline[ngnum] + rcnums[ngnum] - 1) = rcchar[ngnum];
#endif
- mbuf = safemalloc((MEM_SIZE)(curlen + (artnum?15:2)));
+ mbuf = safemalloc((MEM_SIZE)(curlen + (artnum?17:2)));
*s = '\0';
strcpy(mbuf,rcline[ngnum]); /* make new rc line */
@@ -372,5 +372,5 @@
length = strlen(nums);
if (length >= 60)
- mybuf = safemalloc((MEM_SIZE)(length+5));
+ mybuf = safemalloc((MEM_SIZE)(length+6));
strcpy(mybuf,nums);
mybuf[length++] = ',';
@@ -456,8 +456,8 @@
}
/* s now points to what should follow first range */
- if (s - rcline[ngnum] > rcnums[ngnum] + 10)
+ if (s - rcline[ngnum] > rcnums[ngnum] + 11)
mbuf = rcline[ngnum];
else {
- mbuf = safemalloc((MEM_SIZE)(rcnums[ngnum] + strlen(s) + 10));
+ mbuf = safemalloc((MEM_SIZE)(rcnums[ngnum] + strlen(s) + 11));
strcpy(mbuf,rcline[ngnum]);
}
Index:rn.c
@@ -33,5 +33,5 @@
static char rnid[] = "@(#)$Id: rn.c,v 4.4.3.1 1991/11/22 04:12:14 davison Trn $";
-static char patchlevel[] = "Trn-2.4 based on rn-4.4PL4";
+static char patchlevel[] = "Trn-2.5 based on rn-4.4PL4";
/* $Log: rn.c,v $
Index:rt-select.c
@@ -949,7 +949,9 @@
article_count = selected_count = selected_root_cnt = 0;
- if (!(artp = p_articles)) {
+ if (!total.article) {
+ unthreaded = toread[ng];
return 0;
}
+ artp = p_articles;
art_limit = artp + total.article;
root_limit = upper_limit(artp, 0);
Index:server.h.SH
@@ -36,5 +36,9 @@
extern void close_server ANSI((void));
-#include "$NNTPSRC/common/nntp.h"
+# ifdef HAVE_INN
+# include "$NNTPSRC/include/nntp.h"
+# else
+# include "$NNTPSRC/common/nntp.h"
+# endif
EXT char ser_line[NNTP_STRLEN];
Index:trn.1
@@ -782,4 +782,7 @@
.Ip z 8
Supersede the current article, but only if you are the contributor.
+.Ip Z 8
+Just like the \*(L"z\*(R" command, except the current article is included
+as the default text for the new article.
.Ip c 8
Catch up in this newsgroup; i.e., mark all articles as read.
@@ -1759,5 +1762,5 @@
Organization: %o
.sp 1
-%i cancelled from rn.
+%i cancelled from within trn.
.Ip DOTDIR 8
Where to find your dot files, if they aren't in your home directory.
@@ -2091,6 +2094,4 @@
Default:
.Sp
-From: %L@%H (%N)
-.br
Newsgroups: %n
.br
@@ -2097,4 +2098,16 @@
Subject: %S
.br
+Summary: %[summary]
+.br
+Expires: %[expires]
+.br
+References: %[references]
+.br
+Supersedes: %i
+.br
+Sender: %[sender]
+.br
+Followup-To: %[followup-to]
+.br
Distribution: %D
.br
@@ -2101,5 +2114,5 @@
Organization: %o
.br
-Supersedes: %i
+Keywords: %[keywords]
.Ip TERM 8
Determines which termcap entry to use, unless TERMCAP contains the entry.
---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
Technical Details
Message-ID:
<C28xvo.3Ln@borland.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.sources.bugs.mbox.zip!sparky!uunet!news.claremont.edu!bridge2!sgiblab!gatekeeper.us.oracle.com!decwrl!borland.com!davisonShow Full Headers
Complete Article Headers
Message-ID: <C28xvo.3Ln@borland.com> Subject: Trn-2.5 released Date: Wed, 10 Feb 1993 18:55:00 +0000 From: davison@borland.com (Wayne Davison) Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.sources.bugs.mbox.zip!sparky!uunet!news.claremont.edu!bridge2!sgiblab!gatekeeper.us.oracle.com!decwrl!borland.com!davison Newsgroups: news.software.readers,news.software.b,comp.sources.bugs Organization: Borland International Lines: 421