Trn patch #2 (part 1 of 2)

davison%borla at kithrup.com davison%borla at kithrup.com
Sun Jan 20 20:10:01 AEST 1991


Here is patch #2 for trn (producing v1.0.2).  Part 1 of 2  ** Please apply **

To extract this from trn, type "e dir" where dir is the directory you want
the patch placed.  Otherwise, delete everything through the first cut line
and run it through sh.  After unpacking part 2 of this patch in a similar
manner, follow the directions in the file patch2a.
-- 
 \  /| / /|\/ /| /(_)     Wayne Davison
(_)/ |/ /\|/ / |/  \      0004475895 at mcimail.com (preferred)
   (W   A  Y   N   e)     davison at dri.com (...!uunet!drivax!davison)
----8<------8<------8<------8<-----cut here----->8------>8------>8------>8----
#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create:
#	unipatch.c
#	patch2a
# This archive created: Fri Jan 19 20:00:42 1991
export PATH; PATH=/bin:/usr/bin:$PATH
echo shar: "extracting 'unipatch.c'" '(1358 characters)'
if test -f 'unipatch.c'
then
	echo shar: "will not over-write existing file 'unipatch.c'"
else
cat << \SHAR_EOF > 'unipatch.c'
/*
A filter to turn a unidiff into a degenerate context diff (no '!'s)
for patch. Author: davison at dri.com (uunet!drivax!davison).
*/
#include <stdio.h>
#define ERR(a) {fputs(a,stderr);exit(1);}
struct Ln {
	struct Ln *lk;
	char t;
	char s[1];
} r,*h,*ln;
char *malloc();
main()
{
char bf[2048],*cp,ch;
long os,ol,ns,nl,ne,lncnt=0;
for(;;){
 for(;;){
	if(!fgets(bf,sizeof bf,stdin)) exit(0);
	lncnt++;
	if(!strncmp(bf,"@@ -",4)) break;
	fputs(bf,stdout);
 }
 if(sscanf(bf+4,"%ld,%ld +%ld,%ld %c",&os,&ol,&ns,&nl,&ch)!=5||ch!='@')
	goto bad;
 r.lk=0, h= &r, ne=ns+nl-1;
 printf("***************\n*** %ld,%ld ****\n",os,os+ol-(os>0));
 while(ol||nl){
	if(!fgets(bf,sizeof bf,stdin)){
		if(nl>2) ERR("Unexpected end of file.\n");
		strcpy(bf," \n");
	}
	lncnt++;
	if(*bf=='\t'||*bf=='\n')
		ch=' ', cp=bf;
	else
		ch= *bf, cp=bf+1;
	switch(ch){
	case'-':if(!ol--) goto bad;
		printf("- %s",cp);
		break;
	case'=':ch=' ';
	case' ':if(!ol--) goto bad;
		printf("  %s",cp);
	case'+':if(!nl--) goto bad;
		ln = (struct Ln*)malloc(sizeof(*ln)+strlen(cp));
		if(!ln) ERR("Out of memory!\n");
		ln->lk=0, ln->t=ch, strcpy(ln->s,cp);
		h->lk=ln, h=ln;
		break;
	default:
	bad:	fprintf(stderr,"Malformed unidiff at line %ld: ",lncnt);
		ERR(bf);
	}
 }
 printf("--- %ld,%ld ----\n",ns,ne);
 for(ln=r.lk;ln;ln=h){
	printf("%c %s",ln->t,ln->s);
	h=ln->lk;
	free(ln);
 }
}
}
SHAR_EOF
fi
echo shar: "extracting 'patch2a'" '(62588 characters)'
if test -f 'patch2a'
then
	echo shar: "will not over-write existing file 'patch2a'"
else
cat << \SHAR_EOF > 'patch2a'
Trn patch #2 PART 1 OF 2.

To apply this patch you must either have patch version 12u (or above) or use
the filter "unipatch" (included).  You can get the latest version of patch
from prep.ai.mit.edu (pub/gnu/patch-2.0.12u2.tar.Z), gatekeeper.dec.com,
osu-cis, uunet (~/gnu/patch-2.0.12u2.tar.Z), etc, or you can mail me for
diffs to convert patch v12 to patch v12u2.  Those wishing to create their
own unidiffs can grab gnudiff v1.15 from their favorite archive, or a "unify"
conversion utility from me.

To apply this patch without an upgraded version of patch, put unipatch.c,
patch2a and patch2b into the same directory as your trn source.  Then type:

	cc -o unipatch unipatch.c

to compile unipatch.  Finally, use it to pipe the patch files to patch:

	cat patch2a patch2b | unipatch | patch

This patch includes all the changes made in rn patches 48 through 54 that
weren't already in trn.  (Thanx Guy Harris!)  It also fixes a few bugs:

   o	Fixed the endless writing to the log file in certain exception-
	handling circumstances.  This is usually caused by a corrupt
	thread file.  If mthreads has to abort, it will output the last
	group it was processing to the log file so that you can manually
	remove the offending thread file if needed.  See also the -z option.

   o	Fixed an mthreads daemon problem where a shrinking active file would
	cause active2 to be truncated on each following pass.

   o	Fixed an mthreads bug that got the high/low counts wrong for groups
	not yet in the active2 file.  This could cause a delay in the
	creation of thread files for new groups until more articles arrived
	for it.

   o	Enhanced Configure to check for tzset/timezone in a better manner.
	The confirmation prompts for this are also better.

There are also a couple new options for mthreads: -s causes it to sleep one
second between each article it processes (-ss sleeps two seconds, etc), and
-z tells mthreads to 'zap' (erase) a thread file that it believes to be
corrupted.  It is also possible to get each group's name put into the log
file for debugging (-D) or to be very verbose (-vvvv).

I've also included a few portability changes from my dos port (in progress)
that I thought would be worth while.  If anyone is interested in running
trn under dos, I have mthreads working and trn reading news, but no replies
or file saves (both done with pesky shell files).  Contact me if you'd like
to help port/test and I'll send you a diff of changes.  You must already
posses trn v1.0.2 (the result of this patch) or get it from somewhere else.

Finally, a special thanks to those of you who have sent me bug reports and
fixes for trn.  I appreciate your input AND your patience in the last few
months.  Enjoy!
-- 
 \  /| / /|\/ /| /(_)     Wayne Davison
(_)/ |/ /\|/ / |/  \      0004475895 at mcimail.com (preferred)
   (W   A  Y   N   e)     davison at dri.com (...!uunet!drivax!davison)

Index: patchlevel
Prereq: v1.0.1
@@ -1,1 +1,1 @@
-Trn v1.0.1
+Trn v1.0.2
Index: Configure
@@ -4,7 +4,10 @@
=# shell scripts, Configure will trim # comments from them for you.
=#
-# $Header: Configure,v 4.3.3.2 90/08/20 16:09:59 davison Trn $
+# $Header: Configure,v 4.3.3.3 91/01/16 02:00:36 davison Trn $
=#
=# $Log:	Configure,v $
+# Revision 4.3.3.3  91/01/16  02:00:36  davison
+# Integrated rn patches 48-54 and tweaked sitename handling.
+# 
=# Revision 4.3.3.2  90/08/20  16:09:59  davison
=# Added MMDF support, revised sitename/domain/signal/tzset/PATH.
@@ -13,4 +16,48 @@
=# Initial Trn Release
=# 
+# Revision 4.3.2.37  90/12/30  03:46:54  sob
+# Changed "hidden" to "hiddennet" to be like nntp and bnews.
+# Made it possible to cancel articles if hiddennet is defined.
+# 
+# Revision 4.3.2.36  90/12/30  03:31:17  sob
+# Better NeXT support and some other problems corrected.
+# 
+# Revision 4.3.2.35  90/12/04  02:51:20  sob
+# Removed redundant "addcflags" label
+# 
+# Revision 4.3.2.34  90/11/22  17:49:31  sob
+# Fixed bug in "hidden" code.
+# 
+# Revision 4.3.2.33  90/11/22  13:42:44  sob
+# Added support for the Uniq System V.3 OS (courtesy of a3 at rivm.nl &
+# frans at rivm.nl).
+# Added support for making all mail and news appear to come from the domain
+# itself instead of individual hosts within a domain.
+# 
+# Revision 4.3.2.32  90/11/22  13:30:37  sob
+# Fixes to make using the supplied ndir.c work correctly.
+# Fixes to make building rn on an Apollo work correctly.
+# 
+# Revision 4.3.2.31  90/11/10  00:08:08  sob
+# This one appears to work for Interactive Unix.
+# 
+# Revision 4.3.2.30  90/11/09  23:29:16  sob
+# Added a few line for making rrn under Interactive Unix easier.
+# 
+# Revision 4.3.2.29  90/11/05  23:26:21  sob
+# Added detection of /usr/include/sys/ptem.h for more recent versions
+# of System V.
+# 
+# Revision 4.3.2.28  90/11/04  03:35:01  sob
+# Added better detection for getwd() and getcwd(). This will hopefully be
+# the last hurrah of this problem (naive, aren't I?)
+# 
+# Revision 4.3.2.27  90/10/06  11:54:56  sob
+# Added check for memcpy/bcopy.
+# 
+# Revision 4.3.2.26  90/10/01  01:39:43  sob
+# Altered the FLAGS for SCO Xenix 286. The old one are commented out. Let's
+# see if this works better.
+# 
=# Revision 4.3.2.25  90/05/12  17:34:53  sob
=# Still more XENIX fixes and fixes for using socketlib when rrn and not when
@@ -146,4 +193,5 @@
=grep=''
=egrep=''
+nidump=''
=ypmatch=''
=contains=''
@@ -201,5 +249,4 @@
=truncate=''
=chsize=''
-sysptem=''
=tzset=''
=threaddef=''
@@ -216,4 +263,5 @@
=fcntl=''
=ioctl=''
+ptem=''
=normsig=''
=sigblock=''
@@ -221,4 +269,5 @@
=getuidgid=''
=getcwd=''
+getwd=''
=havetlib=''
=getpwent=''
@@ -233,4 +282,5 @@
=NNTPSRC=''
=CONFIG=''
+hiddennet=''
=
=echo "Beginning of configuration questions for trn."
@@ -325,5 +375,5 @@
=on any Unix system.  If despite that it blows up on you, your best bet is to
=edit Configure and run it again.  (Trying to install trn without having run
-Configure is well nigh impossible.)  Also, tell Wayne (davison at drivax.UUCP)
+Configure is well nigh impossible.)  Also, tell Wayne (davison at dri.com)
=how he blew it.
=
@@ -336,4 +386,6 @@
=echo $n "[Type carriage return to continue] $c"
=. myread
+Xn=$n
+Xc=$c
=: get old answers, if there is a config file out there
=if test -f config.sh; then
@@ -340,6 +392,8 @@
=    echo " "
=    echo "(Fetching default answers from your old config.sh file...)"
-    . config.sh
+    . ./config.sh
=fi
+n=$Xn
+c=$Xc
=
=: get list of predefined functions in a handy place
@@ -357,15 +411,22 @@
=	    libc=/usr/lib/libc.a
=	else
-	    if test -f "$libc"; then
-		echo "Your C library is in $libc, like you said before."
+	    if test -f /lib/clib; then
+		echo "Your C library is in /lib/clib.  How nonstandard, must be Apollo."
+		libc=/lib/clib
=	    else
-		cat <<'EOM'
+		if test -f "$libc"; then
+		    echo "Your C library is in $libc, like you said before."
+		else
+		    cat <<'EOM'
= 
=I can't seem to find your C library.  I've looked for /lib/libc.a and
-/usr/lib/libc.a, but neither of those are there.  What is the full name
+/usr/lib/libc.a, but neither of those are there. Perhaps you can find
+out by reading `man 3 intro' if you have the 'man' facility installed.
+
=EOM
-	    echo $n "of your C library? $c"
-	    . myread
-	    libc="$ans"
+		    echo $n "What is the full name of your C library? $c"
+		    . myread
+		    libc="$ans"
+		fi
=	    fi
=	fi
@@ -374,10 +435,20 @@
=echo " "
=echo $n "Extracting names from $libc for later perusal...$c"
-if ar t $libc > libc.list; then
+if ar t $libc >libc.list 2>/dev/null; then
=    echo "done"
=else
-    echo " "
-    echo "The archiver doesn't think $libc is a reasonable library."
-    exit 1
+     if test $libc = /lib/clib; then
+	if nm -g $libc | sed -e 's/$/.o/' >libc.list; then
+	    echo "done"
+	else
+	    echo " "
+	    echo "Apparently $libc is not an object module. Try again."
+	    exit 1
+	fi
+    else
+	echo " "
+	echo "The archiver doesn't think $libc is a reasonable library."
+	exit 1
+    fi
=fi
=: make some quick guesses about what we are up against
@@ -384,5 +455,5 @@
=echo " "
=echo $n "Hmm...  $c"
-if $contains SIGTSTP /usr/include/signal.h >/dev/null 2>&1 ; then
+if $contains sigvec.o libc.list >/dev/null 2>&1 ; then
=    echo "Looks kind of like a BSD system, but we'll see..."
=    echo exit 0 >bsd
@@ -390,11 +461,10 @@
=    echo exit 1 >v7
=else
-    if $contains SIGTSTP /usr/include/sys/signal.h >/dev/null 2>&1 ; then
-	echo "Looks sort of like a BSD system, but we'll see..."
-	echo exit 0 >bsd
+    if $contains dup2.o libc.list >/dev/null 2>&1 ; then
+	echo "Looks sort of like a V7 system, but we'll see..."
+	echo exit 1 >bsd
=	echo exit 1 >usg
-	echo exit 1 >v7
+	echo exit 0 >v7
=    else
-	if $contains fcntl.o libc.list >/dev/null 2>&1 ; then
=	    echo "Looks kind of like a USG system, but we'll see..."
=	    echo exit 1 >bsd
@@ -401,11 +471,12 @@
=	    echo exit 0 >usg
=	    echo exit 1 >v7
-	else
-	    echo "Looks kind of like a version 7 system, but we'll see..."
-	    echo exit 1 >bsd
-	    echo exit 1 >usg
-	    echo exit 0 >v7
-	fi
=    fi
+fi
+:
+if test -f /etc/inittab; then
+    echo "You have an inittab file. You must be a USG system!"
+    echo exit 1 >bsd
+    echo exit 0 >usg
+    echo exit 1 >v7
=fi
=if $contains vmssystem.o libc.list >/dev/null 2>&1 ; then
@@ -599,4 +670,21 @@
=fi
=
+: check for NeXT
+cat <<'EOT' >next.c
+#ifdef NeXT
+exit 0
+#else
+exit 1
+#endif
+EOT
+$cpp next.c | grep exit >next
+chmod 755 next
+$eunicefix next
+rm next.c
+if next; then
+    echo "My, you really ARE on a NeXT."
+    addcflags='-bsd'
+fi
+
=if bsd; then
=    getuidgid=define
@@ -605,4 +693,28 @@
=fi
=
+cat <<'EOT' > s5uniq
+if test -f /bin/uname
+then
+    case `uname -r -m` in
+	"5.3 vax-"*)
+		if [ -f /usr/lib/libnet.a \
+		  -a -f /usr/lib/libhdb.a \
+		  -a -f /usr/lib/libbbn.a \
+		  -a -f /usr/lib/libstr.a ]
+		then
+			exit 0
+		fi;;
+    esac
+fi
+exit 1
+EOT
+chmod 755 s5uniq
+if s5uniq; then
+    echo "This looks like Uniq.  What a pity."
+    socketlib="-lnet -lhdb -lbbn -lstr"
+    rrninclude="-DR_UNIQ -DUSG"
+    # -DR_UNIQ and -DUSG are needed for ~nntp/common/clientlib.c
+fi
+
=: see if sh knows # comments
=echo " "
@@ -697,5 +809,5 @@
=$eunicefix loc
=loclist="expr sed echo cat rm mv cp tail tr mkdir sort uniq grep"
-trylist="test inews egrep more pg Mcc ypmatch"
+trylist="test inews egrep more pg Mcc nidump ypmatch"
=for file in $loclist; do
=    xxx=`loc $file $file $pth`
@@ -779,4 +891,5 @@
=    if $test $status  -ne 0 ; then
=	$echo "YP installed, but not operational. We won't use it."
+	ypmatch=""
=    else
=    	$echo "YP installed and operational."
@@ -785,4 +898,7 @@
=    ;;
=esac
+if $test "$nidump" = "nidump"; then
+    nidump=""
+fi
=if $test "$ypmatch" = "ypmatch"; then
=    ypmatch=""
@@ -837,4 +953,6 @@
=	if $test "$ypmatch" != ""; then
= 		dir=\`$ypmatch \$name passwd 2>/dev/null | $sed "s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/"'\`
+	elif $test "$nidump" != ""; then
+	    dir=\`$nidump passwd / | $sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}'\`
=	fi
=	if $test "\$dir" = ""; then
@@ -895,5 +1013,5 @@
=$echo 'Maybe "hostname" will work...'
=if ans=`sh -c hostname 2>&1` ; then
-    sitename=$ans
+    thissite=$ans
=    hostcmd=hostname
=else
@@ -900,5 +1018,5 @@
=    $echo 'No, maybe "uuname -l" will work...'
=    if ans=`sh -c 'uuname -l' 2>&1` ; then
-	sitename=$ans
+	thissite=$ans
=	hostcmd='uuname -l'
=    else
@@ -905,5 +1023,5 @@
=	$echo 'Strange.  Maybe "uname -n" will work...'
=	if ans=`sh -c 'uname -n' 2>&1` ; then
-	    sitename=$ans
+	    thissite=$ans
=	    hostcmd='uname -n'
=	else
@@ -910,5 +1028,5 @@
=	    $echo 'Oh well, maybe I can mine it out of whoami.h...'
=	    if ans=`sh -c $contains' sysname /usr/include/whoami.h' 2>&1` ; then
-		sitename=`$echo "$ans" | $sed 's/^.*"\(.*\)"/\1/'`
+		thissite=`$echo "$ans" | $sed 's/^.*"\(.*\)"/\1/'`
=		hostcmd="sed -n -e '"'/sysname/s/^.*\"\\(.*\\)\"/\1/{'"' -e p -e q -e '}' </usr/include/whoami.h"
=	    else
@@ -917,5 +1035,7 @@
=		    hostcmd=''
=		    ;;
-		*)  $echo "Well, you said $sitename before...";;
+		*)  $echo "Well, you said $sitename before..."
+		    thissite="$sitename"
+		    ;;
=		esac
=	    fi
@@ -924,11 +1044,11 @@
=fi
=: you do not want to know about this
-set $sitename
-sitename=$1
+set $thissite
+thissite=$1
=
=: translate upper to lower case. This is mostly to help UUCP work right.
-case $sitename in
+case $thissite in
=    *[A-Z]*)
-	sitename=`$echo $sitename | tr '[A-Z]' '[a-z]'`
+	thissite=`$echo $thissite | tr '[A-Z]' '[a-z]'`
=	$echo "(Normalizing case in your site name)"
=	;;
@@ -936,12 +1056,15 @@
=
=: verify site name and allow them to override it
-if $test "$sitename" ; then
-    $echo 'Your site name appears to be "'$sitename'".'
+if $test "$thissite" ; then
+    $echo 'Your site name appears to be "'$thissite'".'
=else
-    sitename='unknown'
+    thissite='unknown'
=fi
=case "$hostfile" in
=/*) dflt="$hostfile" ;;
-*)   dflt="$sitename" ;;
+*)  case "$sitename" in
+    '') dflt="$thissite" ;;
+    *)  dflt="$sitename" ;;
+    esac
=esac
=$cat <<'EOM'
@@ -974,5 +1097,6 @@
=	;;
=    *)  hostfile=''
-	if $test "X$sitename" = "X$ans" ; then
+	if $test "X$thissite" = "X$ans" ; then
+	    sitename="$thissite"
=	    $echo "Using the site name derived by $hostcmd:  $sitename."
=	else
@@ -994,5 +1118,23 @@
=fi
=
-: get organizaton name
+case $hiddennet in
+define)	dflt=y;;
+*)	dflt=n;;
+esac
+$echo "Do you want your site ($sitename) to be hidden in"
+$echo $n "domain '$domain'? [$dflt] $c"
+. myread
+case $ans in
+  '') ans=$dflt ;;
+esac
+case $ans in
+y*)	hiddennet=define
+	sitename=$domain
+	;;
+*)	hiddennet=undef
+	;;
+esac
+
+: get organization name
=longshots='/usr/src/new /usr/src/local /usr/local/src'
=case "$orgname" in
@@ -1197,5 +1339,5 @@
=  *)
=    $echo " "
-    case "$usgname" in
+    case "$usgnam" in
=    define)
=	dflt=y;;
@@ -1334,10 +1476,11 @@
=fi
=
-: check for tzset.
+: check for S5-style timezone handling - current offset from GMT in
+: external variable "timezone" rather than gotten with "ftime".
=$echo " "
-if $contains tzset libc.list >/dev/null 2>&1 ||
-   $contains mktime libc.list >/dev/null 2>&1 ||
-   $contains tzset /usr/include/time.h >/dev/null 2>&1 ; then
-    $echo "Your system appears to use tzset() rather than ftime()."
+if $contains tzname /usr/include/time.h >/dev/null 2>&1 ; then
+    $echo "Your system appears to get the current timezone's offset"
+    $echo "from GMT from the external variable timezone rather than"
+    $echo "by calling ftime() or gettimeofday()."
=    $echo $n "Is this correct? [y] $c"
=    . myread
@@ -1347,5 +1490,7 @@
=    esac
=else
-    $echo "Your system appears to use ftime() rather than tzset()."
+    $echo "Your system appears to get the current timezone's offset"
+    $echo "from GMT by calling ftime() or gettimeofday() rather than"
+    $echo "from the external variable timezone."
=    $echo $n "Is this correct? [y] $c"
=    . myread
@@ -1368,5 +1513,5 @@
=so the first character is F.  On other systems there are magic cookies like
=control codes between articles, so one of those would be first.  For example,
-MMDF messages are seperated with lines of 4 control-A's.  On your system, if a
+MMDF messages are separated with lines of 4 control-A's.  On your system, if a
=EOM
=$echo $n "file is in mailbox format, what is the first character of that file? [$dflt] $c"
@@ -1475,12 +1620,4 @@
=fi
=
-: check for a ptem file
-if $test -r /usr/include/sys/ptem.h ; then
-    sysptem=define
-    $echo "ptem.h found."
-else
-    sysptem=undef
-fi
-
=: see if this is a termio system
=ultrix ; ultrix=$?
@@ -1518,4 +1655,12 @@
=fi
=
+: see if ptem.h exists
+if $test -r /usr/include/sys/ptem.h ; then
+    ptem=define
+    $echo "sys/ptem.h found."
+else
+    ptem=undef
+fi
+
=: see if the system has sigblock
=if $contains sigblock.o libc.list >/dev/null 2>&1 ; then
@@ -1530,4 +1675,5 @@
=    $echo "getwd() found."
=    getcwd=undef
+    getwd=define
=else
=: see if the system has getcwd
@@ -1535,6 +1681,8 @@
=    $echo "getcwd() found."
=    getcwd=define
+    getwd=undef
=else
=    getcwd=undef
+    getwd=undef
=fi
=fi
@@ -1545,6 +1693,11 @@
=    novfork='undef'
=else
-    $echo "No vfork() found--will use fork() instead."
-    novfork='define'
+    if next; then
+	$echo "I know NeXTs have vfork()!"
+	novfork='undef'
+    else
+	$echo "No vfork() found--will use fork() instead."
+	novfork='define'
+    fi
=fi
=
@@ -1694,5 +1847,6 @@
=	iandd="-M3e"
=    else
-	iandd="-M2let8 -LARGE -F 3000"
+:	iandd="-M2let8 -LARGE -F 3000"
+	iandd="-Ml2et32 -LARGE -F B000"
=    fi
=    jobslib=-lx
@@ -1707,4 +1861,8 @@
=fi
=fi
+: No Steve jokes...
+if next; then
+    jobslib='-lsys_s'
+fi
=: see if there are directory access routines out there
=if $test -r /usr/lib/libndir.a || $test -r /usr/local/lib/libndir.a ; then
@@ -1903,7 +2061,8 @@
=
=done
-: hack for Unisys NET-5000
+: hack for Unisys NET-5000 and Interactive V/386
=case "$isrrn" in
=define) 
+: NET-5000
=    if $test -d /usr/include/NET-5000 ; then
=	$echo "I sense you are on a Unisys 5000 computer...poor soul."
@@ -1911,4 +2070,9 @@
=	socketlib=-lsocket
=    fi
+: Interactive Unix
+    if $test -f /usr/lib/libinet.a ; then
+	rrninclude="-DUSG"
+	socketlib=-linet
+    fi
=    ;;
=*) ;;
@@ -2189,5 +2353,9 @@
=	    mailer=$libexp/recmail
=	else
-	    mailer=/bin/mail
+	    if s5uniq && $test -f /usr/bin/mailx; then
+		mailer=/usr/bin/mailx
+	    else
+		mailer=/bin/mail
+	    fi
=	fi
=    fi
@@ -2479,4 +2647,5 @@
=grep='$grep'
=egrep='$egrep'
+nidump='$nidump'
=ypmatch='$ypmatch'
=contains='$contains'
@@ -2492,4 +2661,5 @@
=socketlib='$socketlib'
=getcwd='$getcwd'
+getwd='$getwd'
=dirtype='$dirtype'
=ndirlib='$ndirlib'
@@ -2535,5 +2705,4 @@
=truncate='$truncate'
=chsize='$chsize'
-sysptem='$sysptem'
=tzset='$tzset'
=threaddef='$threaddef'
@@ -2550,4 +2719,5 @@
=fcntl='$fcntl'
=ioctl='$ioctl'
+ptem='$ptem'
=normsig='$normsig'
=sigblock='$sigblock'
@@ -2567,4 +2737,5 @@
=CONFIG=true
=CTRLA='$CTRLA'
+hiddennet='$hiddennet'
=EOT
=
@@ -2615,5 +2786,5 @@
=$usehostfile#define HOSTFILE "$hostfile"
=
-/* OURDOMAIN is added to the site name if no "." is in it. */
+/* domain name for the site */
=#define OURDOMAIN "$domain"
=
@@ -2678,5 +2849,4 @@
=#$truncate	TRUNCATE	/* is truncate() available? */
=#$chsize	CHSIZE		/* is chsize() available? */
-#$sysptem	SYS_PTEM	/* is /usr/include/sys/ptem.h needed? */
=#$tzset	TZSET		/* modern timezone functions? */
=$novoid#define void int	/* is void to be avoided? */
@@ -2685,4 +2855,5 @@
=#$eunice	VMS		/* not currently used, here just in case */
=#$getcwd	GETCWD		/* do we have getcwd()? */
+#$getwd		GETWD		/* do we have getwd()? */
=#$usendir	USENDIR		/* include ndir.c? */
=#$libndir	LIBNDIR		/* include /usr/include/ndir.h? */
@@ -2704,4 +2875,5 @@
=#$fcntl	FCNTL		/* should we include fcntl.h? */
=#$ioctl	IOCTL		/* are ioctl args all defined in one place? */
+#$ptem		PTEM		/* has the ptem.h include file ? */
=#$normsig	NORMSIG		/* use signal rather than sigset? */
=#$sigblock	SIGBLOCK	/* use sigblock and sigsetmask */
@@ -2717,4 +2889,5 @@
=#$isrrn	SERVER		/* rrn server code */
=$isrrn2#define SERVER_FILE	"$serverfile"	/* news server file */
+#$hiddennet	HIDDENNET	/* hide the host inside the domain? */
=EOT
=
Index: addng.c
@@ -1,5 +1,8 @@
-/* $Header: addng.c,v 4.3.3.2 90/08/20 16:27:06 davison Trn $
+/* $Header: addng.c,v 4.3.3.3 91/01/16 02:20:43 davison Trn $
= *
= * $Log:	addng.c,v $
+ * Revision 4.3.3.3  91/01/16  02:20:43  davison
+ * Integrated rn patches 48-54.
+ * 
= * Revision 4.3.3.2  90/08/20  16:27:06  davison
= * Allow breaking out of ng adding.  Don't add 'X'ed groups.
@@ -8,10 +11,13 @@
= * Initial Trn Release
= * 
+ * Revision 4.3.2.6  90/11/22  16:06:35  sob
+ * Changes to make pickly C preprocessors happier.
+ * 
+ * Revision 4.3.2.5  90/09/04  23:29:51  sob
+ * Added fix for bithof() from bug report by kwthomas at nsslsun.gcn.uoknor.edu
+ * 
= * Revision 4.3.2.4  90/03/17  17:11:36  sob
= * Added support for CNEWS active file flags.
= * 
- * Revision 4.3.2.4  89/12/20  00:30:00  tale
- * Added support for C News active file flags.
- *
= * Revision 4.3.2.3  89/11/08  02:33:28  sob
= * Added include for server.h
@@ -68,5 +74,5 @@
=    long birthof();
=
-    tmpname = savestr(filexp("/tmp/rnew.%$"));
+    tmpname = savestr(filexp(RNEWNAME));
=    tmpfp = fopen(tmpname,"w");
=    if (tmpfp == Nullfp) {
@@ -78,4 +84,7 @@
=	if (int_count) {
=	    int_count = 0;
+	    fclose(tmpfp);
+	    UNLINK(tmpname);
+	    free(tmpname);
=	    return FALSE;
=	}
@@ -151,12 +160,11 @@
=#ifdef SERVER
=    int x,tot,min,max;
-    if (ngsize < 2) {
-          sprintf(tst,"GROUP %s",ngnam);
-          put_server(tst);
-          (void) get_server(tst, sizeof(tst));
-          if (*tst != CHAR_OK) return(0); /* not a real group */
-          (void) sscanf(tst,"%d%d%d%d",&x,&tot,&min,&max);
-          if (tot == 1 && min == 1 && max == 1) return(time(Null(long *)));
-     } else return(0);
+    sprintf(tst,"GROUP %s",ngnam);
+    put_server(tst);
+    (void) get_server(tst, sizeof(tst));
+    if (*tst != CHAR_OK) return(0); /* not a real group */
+    (void) sscanf(tst,"%d%d%d%d",&x,&tot,&min,&max);
+    if (tot > 0) return(time(Null(long *)));
+    else return(0);
=#else /* not SERVER */
=
Index: addng.h
@@ -1,5 +1,8 @@
-/* $Header: addng.h,v 4.3 85/05/01 11:34:48 lwall Exp $
+/* $Header: addng.h,v 4.3.3.1 91/01/16 02:20:45 davison Trn $
= *
= * $Log:	addng.h,v $
+ * Revision 4.3.3.1  91/01/16  02:20:45  davison
+ * Added optional prototyping.
+ * 
= * Revision 4.3  85/05/01  11:34:48  lwall
= * Baseline for release with 4.3bsd.
@@ -7,8 +10,8 @@
= */
=
-void	addng_init();
+void	addng_init ANSI((void));
=#ifdef FINDNEWNG
-    bool	newlist();
-    long	birthof();
-    bool	scanactive();
+    bool	newlist ANSI((bool,bool));
+    long	birthof ANSI((char *,ART_NUM));
+    bool	scanactive ANSI((void));
=#endif
Index: art.c
@@ -1,5 +1,8 @@
-/* $Header: art.c,v 4.3.3.2 90/08/20 16:05:33 davison Trn $
+/* $Header: art.c,v 4.3.3.3 91/01/16 02:20:45 davison Trn $
= *
= * $Log:	art.c,v $
+ * Revision 4.3.3.3  91/01/16  02:20:45  davison
+ * Integrated rn patches 48-54.
+ * 
= * Revision 4.3.3.2  90/08/20  16:05:33  davison
= * Fixed bug in backpage code.
@@ -8,4 +11,23 @@
= * Initial Trn Release
= * 
+ * Revision 4.3.2.9  90/12/10  01:34:42  sob
+ * "8 bit clean" mods and fixes for rn -e -L problems.
+ * 
+ * Revision 4.3.2.8  90/12/04  02:49:12  sob
+ * Added long lost commands control-P and control-N back into rn.
+ * 
+ * Revision 4.3.2.7  90/11/22  13:48:59  sob
+ * Added changes that will hopefully fix the "long lines" bug.
+ * 
+ * Revision 4.3.2.6  90/10/01  21:14:36  sob
+ * Shifted to fileno to increase portability.
+ * 
+ * Revision 4.3.2.5  90/10/01  21:05:22  sob
+ * Removed an extra closing paren.
+ * 
+ * Revision 4.3.2.4  90/10/01  02:01:53  sob
+ * Fix provided by earle at sun.com to alter rn's assumption of how to turn
+ * off underline mode when at the end of a line.
+ * 
= * Revision 4.3.2.3  90/04/21  14:43:27  sob
= * Revised previous patch insure that it does not decrement below zero.
@@ -115,4 +137,5 @@
=    bool notesfiles = FALSE;		/* might there be notesfiles junk? */
=    char oldmode = mode;
+    char *ctime();
=
=#ifdef INNERSEARCH
@@ -120,5 +143,6 @@
=#endif
=
-    if (fstat(artfp->_file,&filestat))
+/*  if (fstat(artfp->_file,&filestat)) ... does not work on Apollos */
+    if (fstat(fileno(artfp),&filestat))
=			    /* get article file stats */
=	return DA_CLEAN;
@@ -202,5 +226,5 @@
=			printf(" (%ld more",(long)i);
=			if (dmcount)
-			    printf(" + %ld Marked to return)",(long)dmcount);
+			    printf(" + %ld Marked to return",(long)dmcount);
=			putchar(')');
=		    }
@@ -387,5 +411,5 @@
=		for (outpos = 0; outpos < COLS; ) {
=				    /* while line has room */
-		    if (*bufptr >= ' ') {	/* normal char? */
+		    if (*(unsigned char *)bufptr >= ' ') { /* normal char? */
=#ifdef ULSMARTS
=			if (*bufptr == '_') {
@@ -532,11 +556,13 @@
=		    }
=#ifdef CLEAREOL
-/* #ifdef INNERSEARCH
-		    if (outputok)
+#ifdef INNERSEARCH
+		    if (outputok) 
=#endif
-		    maybe_eol(); */	/* comment this out for now
-						    until I am sure it is
-						    needed*/
-
+ 		    {
+ 		      /* force movement onto the new line so CE will work */
+ 		      putchar(' ');
+ 		      backspace();
+ 		      maybe_eol();
+ 		    }
=#endif /* CLEAREOL */
=		}
@@ -599,4 +625,7 @@
=	printf("--MORE--(%ld%%)",(long)(artpos*100/artsize));
=	un_standout();	/* leave standout mode */
+#ifdef CLEAREOL
+ 	maybe_eol();
+#endif
=	fflush(stdout);
=/* reinp_pager:     			/* unused, commented for lint */
@@ -910,5 +939,5 @@
=	reread = FALSE;
=	do_hiding = TRUE;
-	if (index("nNpP",*buf) == Nullch &&
+	if (index("nNpP\016\018",*buf) == Nullch &&
=	  index("wWsSe:!&|/?123456789.",*buf) != Nullch) {
=	    setdfltcmd();
@@ -941,4 +970,7 @@
=
=#endif /* CLEAREOL */
+	    carriage_return();	/* Resets kernel's tab column counter to 0 */
+	    fflush(stdout);
+
=	    if (*blinebeg != '\f'
=#ifdef CUSTOMLINES
Index: art.h
@@ -1,5 +1,8 @@
-/* $Header: art.h,v 4.3 85/05/01 11:35:29 lwall Exp $
+/* $Header: art.h,v 4.3.3.1 91/01/16 02:20:48 davison Trn $
= *
= * $Log:	art.h,v $
+ * Revision 4.3.3.1  91/01/16  02:20:48  davison
+ * Added optional prototyping.
+ * 
= * Revision 4.3  85/05/01  11:35:29  lwall
= * Baseline for release with 4.3bsd.
@@ -14,6 +17,6 @@
=#define DA_TOEND 3
=
-void	art_init();
-int	do_article();
-int	page_switch();
-bool	innermore();
+void	art_init ANSI((void));
+int	do_article ANSI((void));
+int	page_switch ANSI((void));
+bool	innermore ANSI((void));
Index: artio.c
@@ -1,5 +1,8 @@
-/* $Header: artio.c,v 4.3.3.2 90/08/20 16:25:50 davison Trn $
+/* $Header: artio.c,v 4.3.3.3 91/01/16 02:20:48 davison Trn $
= *
= * $Log:	artio.c,v $
+ * Revision 4.3.3.3  91/01/16  02:20:48  davison
+ * Integrated rn patches 48-54.
+ * 
= * Revision 4.3.3.2  90/08/20  16:25:50  davison
= * Fixed bug in artopen ==> nntpopen interaction.
@@ -8,4 +11,7 @@
= * Initial Trn Release
= * 
+ * Revision 4.3.2.6  90/11/22  16:06:57  sob
+ * Changes to make pickly C preprocessors happier.
+ * 
= * Revision 4.3.2.5  90/03/22  23:04:04  sob
= * Fixes provided by Wayne Davison <drivax!davison>
@@ -74,5 +80,5 @@
=	char *s;
=
-	if (fstat(artfp->_file,&filestat))
+	if (fstat(fileno(artfp),&filestat))
=	    return artfp;
=	if (filestat.st_size < (sizeof tmpbuf)) {
@@ -100,5 +106,5 @@
=
=#ifdef SERVER
-static long our_pid;
+static long our_pid=0;
=
=FILE *
Index: artio.h
@@ -1,5 +1,8 @@
-/* $Header: artio.h,v 4.3.3.1 90/07/21 20:12:10 davison Trn $
+/* $Header: artio.h,v 4.3.3.2 91/01/16 02:20:49 davison Trn $
= *
= * $Log:	artio.h,v $
+ * Revision 4.3.3.2  91/01/16  02:20:49  davison
+ * Added optional prototyping.
+ * 
= * Revision 4.3.3.1  90/07/21  20:12:10  davison
= * Initial Trn Release
@@ -27,7 +30,7 @@
=#ifdef SERVER
=EXT ART_PART openpart INIT(0);	/* how much of that article do we have? */
-FILE	*nntpopen();		/* get an article unless already retrieved */
-
-void	nntpclose();
+FILE	*nntpopen ANSI((ART_NUM,ART_PART));
+				/* get an article unless already retrieved */
+void	nntpclose ANSI((void));
=/* MUST be in increasing order of completeness! */
=#define GET_STATUS	1		/* test for existence only */
@@ -36,4 +39,4 @@
=#endif
=
-void	artio_init();
-FILE	*artopen();		/* open an article unless already opened */
+void	artio_init ANSI((void));
+FILE	*artopen ANSI((ART_NUM));  /* open an article unless already opened */
Index: artsrch.h
@@ -1,5 +1,8 @@
-/* $Header: artsrch.h,v 4.3 85/05/01 11:35:55 lwall Exp $
+/* $Header: artsrch.h,v 4.3.3.1 91/01/16 02:21:37 davison Trn $
= *
= * $Log:	artsrch.h,v $
+ * Revision 4.3.3.1  91/01/16  02:21:37  davison
+ * Added optional prototyping.
+ * 
= * Revision 4.3  85/05/01  11:35:55  lwall
= * Baseline for release with 4.3bsd.
@@ -34,7 +37,8 @@
=#endif
=
-void	artsrch_init();
+void	artsrch_init ANSI((void));
=#ifdef ARTSEARCH
-    int		art_search();
-    bool	wanted();	/* return TRUE if current article matches pattern */
+    int		art_search ANSI((char *, int, int));
+    bool	wanted ANSI((COMPEX *, ART_NUM, char));
+			/* return TRUE if current article matches pattern */
=#endif
Index: backpage.c
@@ -1,7 +1,13 @@
-/* $Header: backpage.c,v 4.3.3.1 90/06/20 22:36:17 davison Trn $
+/* $Header: backpage.c,v 4.3.3.2 91/01/16 02:29:46 davison Trn $
= *
= * $Log:	backpage.c,v $
+ * Revision 4.3.3.2  91/01/16  02:29:46  davison
+ * Integrated rn patches 48-54.
+ * 
= * Revision 4.3.3.1  90/06/20  22:36:17  davison
= * Initial Trn Release
+ * 
+ * Revision 4.3.2.1  90/11/22  16:08:00  sob
+ * Made changes to accomodate picky C precompilers
= * 
= * Revision 4.3  85/05/01  11:36:03  lwall
Index: backpage.h
@@ -1,5 +1,8 @@
-/* $Header: backpage.h,v 4.3 85/05/01 11:36:11 lwall Exp $
+/* $Header: backpage.h,v 4.3.3.1 91/01/16 02:29:47 davison Trn $
= *
= * $Log:	backpage.h,v $
+ * Revision 4.3.3.1  91/01/16  02:29:47  davison
+ * Added optional prototyping.
+ * 
= * Revision 4.3  85/05/01  11:36:11  lwall
= * Baseline for release with 4.3bsd.
@@ -15,5 +18,5 @@
=EXT long oldoffset INIT(-1);		/* offset to block currently in window */
=
-void	backpage_init();
-ART_POS	vrdary();
-void	vwtary();
+void	backpage_init ANSI((void));
+ART_POS	vrdary ANSI((ART_LINE));
+void	vwtary ANSI((ART_LINE,ART_POS));
Index: bits.c
@@ -1,8 +1,17 @@
-/* $Header: bits.c,v 4.3.3.1 90/06/20 22:36:24 davison Trn $
+/* $Header: bits.c,v 4.3.3.2 91/01/16 02:29:48 davison Trn $
= *
= * $Log:	bits.c,v $
+ * Revision 4.3.3.2  91/01/16  02:29:48  davison
+ * Integrated rn patches 48-54.
+ * 
= * Revision 4.3.3.1  90/06/20  22:36:24  davison
= * Initial Trn Release
= * 
+ * Revision 4.3.2.5  90/11/22  13:47:16  sob
+ * Altered #endifs to make System V compiliers happy.
+ * 
+ * Revision 4.3.2.4  90/10/06  11:55:33  sob
+ * Added fix for DBM support.
+ * 
= * Revision 4.3.2.3  89/11/28  01:52:02  sob
= * Removed some lint.
@@ -399,4 +408,5 @@
=	register ART_NUM x;
=	char tmpbuf[128];
+	long pos;
=
=#ifdef DBM
@@ -430,6 +440,7 @@
=	if (rhs.dptr == NULL)		/* if null, nothing there */
=	    goto wild_goose;
-	fseek (hist_file, *((long *)rhs.dptr), 0);
-					/* datum returned is position in hist file */
+	bcopy((void *)rhs.dptr,(void *)&pos, 4);
+	fseek (hist_file, pos, 0);
+				/* datum returned is position in hist file */
=	fgets (xref_buf, BUFSIZ, hist_file);
=#ifdef DEBUGGING
Index: bits.h
@@ -1,8 +1,14 @@
-/* $Header: bits.h,v 4.3.3.1 90/06/20 22:36:35 davison Trn $
+/* $Header: bits.h,v 4.3.3.2 91/01/16 02:29:50 davison Trn $
= *
= * $Log:	bits.h,v $
+ * Revision 4.3.3.2  91/01/16  02:29:50  davison
+ * Added optional prototyping.
+ * 
= * Revision 4.3.3.1  90/06/20  22:36:35  davison
= * Initial Trn Release
= * 
+ * Revision 4.3.2.1  90/11/22  15:46:42  sob
+ * Made changes to make pickly preprocessors happier.
+ * 
= * Revision 4.3.1.2  86/11/03  09:49:58  lwall
= * Added firstbit variable.
@@ -55,21 +61,21 @@
=#endif
=
-void	bits_init();
-void	checkpoint_rc();
-void	restore_ng();
-void	onemore();
-void	oneless();
-void	unmark_as_read();
+void	bits_init ANSI((void));
+void	checkpoint_rc ANSI((void));
+void	restore_ng ANSI((void));
+void	onemore ANSI((ART_NUM));
+void	oneless ANSI((ART_NUM));
+void	unmark_as_read ANSI((void));
=#ifdef USETHREADS
-void	set_read();
-void	set_unread();
+void	set_read ANSI((ART_NUM,int));
+void	set_unread ANSI((ART_NUM,int));
=#endif
-void	delay_unmark();
-void	mark_as_read();
-void	check_first();
+void	delay_unmark ANSI((ART_NUM));
+void	mark_as_read ANSI((void));
+void	check_first ANSI((ART_NUM));
=#ifdef DELAYMARK
-    void	yankback();
+    void	yankback ANSI((void));
=#endif
-int	chase_xrefs();
-int	initctl();
-void	grow_ctl();
+int	chase_xrefs ANSI((ART_NUM,int));
+int	initctl ANSI((void));
+void	grow_ctl ANSI((ART_NUM));
Index: cheat.h
@@ -1,5 +1,8 @@
-/* $Header: cheat.h,v 4.3 85/05/01 11:36:58 lwall Exp $
+/* $Header: cheat.h,v 4.3.3.1 91/01/16 02:32:16 davison Trn $
= *
= * $Log:	cheat.h,v $
+ * Revision 4.3.3.1  91/01/16  02:32:16  davison
+ * Added optional prototyping.
+ * 
= * Revision 4.3  85/05/01  11:36:58  lwall
= * Baseline for release with 4.3bsd.
@@ -18,5 +21,5 @@
=#endif
=
-void	cheat_init();
-void	look_ahead();
-void	collect_subjects();
+void	cheat_init ANSI((void));
+void	look_ahead ANSI((void));
+void	collect_subjects ANSI((void));
Index: common.h
@@ -1,5 +1,8 @@
-/* $Header: common.h,v 4.3.3.2 90/08/20 16:28:32 davison Trn $
+/* $Header: common.h,v 4.3.3.3 91/01/16 02:00:32 davison Trn $
= * 
= * $Log:	common.h,v $
+ * Revision 4.3.3.3  91/01/16  16:28:32  davison
+ * integrated rn patches 48-54 and tweaked defines a bit.
+ * 
= * Revision 4.3.3.2  90/08/20  16:28:32  davison
= * Tweaked a couple rn's into trn's.
@@ -8,4 +11,36 @@
= * Initial Trn Release
= * 
+ * Revision 4.3.2.23  90/12/30  23:58:59  sob
+ * Fixed CANCELHEADER.
+ * 
+ * Revision 4.3.2.22  90/12/04  02:51:59  sob
+ * removed _SYS_TYPE.H label
+ * 
+ * Revision 4.3.2.21  90/11/23  10:39:49  sob
+ * cleaned up more cruft.
+ * 
+ * Revision 4.3.2.20  90/11/22  13:18:28  sob
+ * Conditionalized TRUE and FALSE to compensate for AIX which has its own
+ * definitions.
+ * 
+ * Revision 4.3.2.19  90/11/09  23:15:12  sob
+ * Added sys/stream.h since sys/ptem.h depends on it.
+ * 
+ * Revision 4.3.2.18  90/11/06  00:11:04  sob
+ * Attempt to deal with USG C compilers that can't cope with mutiple
+ * includes of the same include file.
+ * 
+ * Revision 4.3.2.17  90/11/05  23:29:37  sob
+ * Added the include of /usr/include/sys/ptem.h if defined in config.h.
+ * 
+ * Revision 4.3.2.16  90/11/04  03:34:32  sob
+ * Changed and moved GETWD to Configure.
+ * 
+ * Revision 4.3.2.15  90/10/01  02:07:36  sob
+ * Increased LBUFLEN from 512 to 1024 per request of ken at csis.dit.csiro.au.
+ * 
+ * Revision 4.3.2.14  90/10/01  01:56:06  sob
+ * Fixed problem with the call to MBOXSAVER reported by news at twwells.com.
+ * 
= * Revision 4.3.2.13  90/05/08  22:05:37  sob
= * Added quick startup (-q) flag.
@@ -66,9 +101,4 @@
= */
=
-#include "config.h"	/* generated by installation script */
-#ifdef WHOAMI
-#    include <whoami.h>
-#endif
-
=#include <stdio.h>
=#include <sys/types.h>
@@ -75,5 +105,8 @@
=#include <sys/stat.h>
=#include <ctype.h>
-
+#include "config.h"	/* generated by installation script */
+#ifdef WHOAMI
+#    include <whoami.h>
+#endif
=#ifndef isalnum
=#   define isalnum(c) (isalpha(c) || isdigit(c))
@@ -100,6 +133,15 @@
=#endif
=
+#ifdef PTEM
+#include <sys/stream.h>
+#include <sys/ptem.h>
+#endif
+
=#define BITSPERBYTE 8
+#ifdef pdp11
=#define LBUFLEN 512	/* line buffer length */
+#else
+#define LBUFLEN 1024	/* line buffer length */
+#endif
=			/* (don't worry, .newsrc lines can exceed this) */
=#ifdef pdp11
@@ -121,6 +163,10 @@
=
=#define bool char
+#ifndef TRUE
=#define TRUE (1)
+#endif
+#ifndef FALSE
=#define FALSE (0)
+#endif
=#define Null(t) ((t)0)
=#define Nullch Null(char *)
@@ -294,5 +340,4 @@
=#define TILDENAME	/* allow ~logname expansion */
=#define SETENV		/* allow command line environment variable setting */
-#define GETWD		/* use our getwd() instead of piped in pwd */
=#define MAKEDIR		/* use our makedir() instead of shell script */
=#define MEMHELP		/* keep help messages in memory */
@@ -453,14 +498,23 @@
=#endif
=
-#ifdef THREAD_DIR
+#ifdef USETHREADS
+# ifdef THREAD_DIR
=#   ifdef LONG_THREAD_NAMES
=#	undef SUFFIX
=#   else
+#     ifndef SUFFIX
=#	define SUFFIX ".th"
+#     endif
=#   endif
-#else
+# else
=#   define THREAD_DIR	SPOOL
-#   define SUFFIX	"/.thread"
+#   ifndef SUFFIX
+#     define SUFFIX	"/.thread"
+#   endif
=#   undef LONG_THREAD_NAMES
+# endif
+# ifndef NEW_THREAD
+#   define NEW_THREAD ".new"
+# endif
=#endif
=
@@ -538,4 +592,9 @@
=#endif
=
+/* where to compile a new newsgroup list */
+#ifndef RNEWNAME
+#   define RNEWNAME "/tmp/rnew.%$"
+#endif
+
=/* file to pass header to followup article poster */
=#ifndef HEADNAME		/* % and ~ */
@@ -740,7 +799,7 @@
=#ifndef CANCELHEADER
=#ifdef INTERNET
-#   define CANCELHEADER "Newsgroups: %n\nSubject: cmsg cancel %i\nReferences: %R\nDistribution: %D\nOrganization: %o\n\nThis message was cancelled from within trn.\n"
+#   define CANCELHEADER "From: %L@%H (%N)\nNewsgroups: %n\nSubject: cmsg cancel %i\nReferences: %R\nDistribution: %D\nOrganization: %o\n\nThis message was cancelled from within trn.\n"
=#else
-#   define CANCELHEADER "Newsgroups: %n\nSubject: cmsg cancel %i\nReferences: %R\nDistribution: %D\nOrganization: %o\n"
+#   define CANCELHEADER "From:%L@%H.UUCP (%N)\nNewsgroups: %n\nSubject: cmsg cancel %i\nReferences: %R\nDistribution: %D\nOrganization: %o\n"
=#endif
=#endif
@@ -751,4 +810,22 @@
=#endif
=
+/* how to open binary format files */
+#ifndef FOPEN_RB
+#   define FOPEN_RB "r"
+#endif
+#ifndef FOPEN_WB
+#   define FOPEN_WB "w"
+#endif
+
+/* what to do with ansi prototypes -- '()' == ignore, 'x' == use */
+#ifndef ANSI
+#   define ANSI(x) ()
+#endif
+
+/* how many characters is a newline in a text file? */
+#ifndef NL_SIZE
+#   define NL_SIZE 1
+#endif
+
=/* some important types */
=
@@ -837,5 +914,5 @@
=#endif
=#ifdef CLEAREOL
-EXT bool can_home_clear INIT(FALSE);		/* fancy -e -- PWP */
+EXT bool can_home_clear INIT(FALSE);		/* fancy -e */
=#endif
=EXT bool findlast INIT(FALSE);			/* -r */
Index: final.c
@@ -1,8 +1,14 @@
-/* $Header: final.c,v 4.3.3.1 90/06/20 22:36:57 davison Trn $
+/* $Header: final.c,v 4.3.3.2 91/01/16 02:38:15 davison Trn $
= *
= * $Log:	final.c,v $
+ * Revision 4.3.3.2  91/01/16  02:38:15  davison
+ * Integrated rn patches 48-54.
+ * 
= * Revision 4.3.3.1  90/06/20  22:36:57  davison
= * Initial Trn Release
= * 
+ * Revision 4.3.2.9  90/11/22  16:08:34  sob
+ * Added changes to accomodate pick C preprocessors.
+ * 
= * Revision 4.3.2.8  90/04/14  19:37:14  sob
= * Added better support for the NeXT.
@@ -60,15 +66,25 @@
=
=    sigset(SIGINT, int_catcher);	/* always catch interrupts */
+#ifdef SIGHUP
=    sigset(SIGHUP, sig_catcher);	/* and hangups */
+#endif
=#ifndef lint
+#ifdef SIGEMT
=    sigignore(SIGEMT);
+#endif
=#endif /* lint */
=
=    sigset(SIGILL, sig_catcher);
+#ifdef SIGTRAP
=    sigset(SIGTRAP, sig_catcher);
+#endif
=    sigset(SIGFPE, sig_catcher);
+#ifdef SIGBUS
=    sigset(SIGBUS, sig_catcher);
+#endif
=    sigset(SIGSEGV, sig_catcher);
+#ifdef SIGSYS
=    sigset(SIGSYS, sig_catcher);
+#endif
=    sigset(SIGTERM, sig_catcher);
=#ifdef SIGXCPU
@@ -115,5 +131,5 @@
=/* come here on interrupt */
=
-int
+SIGRET
=int_catcher()
={
@@ -134,5 +150,5 @@
=/* come here on signal other than interrupt, stop, or cont */
=
-int
+SIGRET
=sig_catcher(signo)
={
@@ -192,5 +208,7 @@
=	write_rc();			/* then do so */
=    rc_changed = FALSE;
+#ifdef SIGHUP
=    if (signo != SIGHUP)
+#endif
=#ifdef VERBOSE
=	IF(verbose)
@@ -203,5 +221,7 @@
=#endif
=    switch (signo) {
+#ifdef SIGBUS
=    case SIGBUS:
+#endif
=    case SIGILL:
=    case SIGSEGV:
@@ -214,5 +234,5 @@
=/* come here on stop signal */
=
-int
+SIGRET
=stop_catcher(signo)
=int signo;
Index: final.h
@@ -1,5 +1,8 @@
-/* $Header: final.h,v 4.3.3.1 90/06/20 22:37:04 davison Trn $
+/* $Header: final.h,v 4.3.3.2 91/01/16 02:38:16 davison Trn $
= * 
= * $Log:	final.h,v $
+ * Revision 4.3.3.2  91/01/16  02:38:16  davison
+ * Added optional prototyping.
+ * 
= * Revision 4.3.3.1  90/06/20  22:37:04  davison
= * Initial Trn Release
@@ -25,11 +28,10 @@
=/* signal catching routines */
=
-int	int_catcher();
-int	sig_catcher();
+SIGRET	int_catcher ANSI((void));
+SIGRET	sig_catcher ANSI((int));
=#ifdef SIGTSTP
-    int	stop_catcher();
-    int	cont_catcher();
+ SIGRET	stop_catcher ANSI((int));
=#endif
=
-void	final_init();
-void	finalize();
+void	final_init ANSI((void));
+void	finalize ANSI((int));
Index: head.c
@@ -1,8 +1,17 @@
-/* $Header: head.c,v 4.3.3.1 90/07/21 20:19:26 davison Trn $
+/* $Header: head.c,v 4.3.3.2 91/01/16 02:41:15 davison Trn $
= *
= * $Log:	head.c,v $
+ * Revision 4.3.3.2  91/01/16  02:41:15  davison
+ * Integrated rn patches 48-54.
+ * 
= * Revision 4.3.3.1  90/07/21  20:19:26  davison
= * Initial Trn Release
= * 
+ * Revision 4.3.2.7  90/11/22  13:49:50  sob
+ * Added changes to make System V compilers happy.
+ * 
+ * Revision 4.3.2.6  90/10/01  01:59:10  sob
+ * Fixed possible core dump problem reported by geoff at desint.uucp
+ * 
= * Revision 4.3.2.5  90/03/22  23:04:22  sob
= * Fixes provided by Wayne Davison <drivax!davison>
@@ -376,12 +385,12 @@
=	if (*tmp_buf == ' ' || *tmp_buf == '\t')
=	    t = tmp_buf;
-	else
-	    t = index(tmp_buf,':')+1;
-	if (t == Nullch)
-	    break;
=	else {
-	    while (*t == ' ' || *t == '\t') t++;
-	    safecat(newbuf,t,size);
+	    t = index(tmp_buf,':');
+	    if (t == Nullch)
+		break;
+	    t++;
=	}
+	while (*t == ' ' || *t == '\t') t++;
+	safecat(newbuf,t,size);
=    }
=    return newbuf;
Index: head.h
@@ -1,5 +1,8 @@
-/* $Header: head.h,v 4.3.3.1 90/06/20 22:37:18 davison Trn $
+/* $Header: head.h,v 4.3.3.2 91/01/16 02:41:17 davison Trn $
= *
= * $Log:	head.h,v $
+ * Revision 4.3.3.2  91/01/16  02:41:17  davison
+ * Added optional prototyping.
+ * 
= * Revision 4.3.3.1  90/06/20  22:37:18  davison
= * Initial Trn Release
@@ -114,11 +117,15 @@
=#endif
=
-void	head_init();
-int	set_line_type();
-void	start_header();
-bool    parseline();
+void	head_init ANSI((void));
+int	set_line_type ANSI((char *,char *));
+void	start_header ANSI((ART_NUM));
+bool    parseline ANSI((char *,int,int));
=#ifdef ASYNC_PARSE
-    int		parse_maybe();
+    int		parse_maybe ANSI((ART_NUM));
+#endif
+char	*fetchsubj ANSI((ART_NUM,bool,bool));
+char	*fetchlines ANSI((ART_NUM,int));
+
+#ifdef DEBUGGING
+int	dumpheader ANSI((char *));
=#endif
-char	*fetchsubj();
-char	*fetchlines();
Index: help.h
@@ -1,5 +1,8 @@
-/* $Header: help.h,v 4.3.3.1 90/06/20 22:37:34 davison Trn $
+/* $Header: help.h,v 4.3.3.2 91/01/16 02:41:20 davison Trn $
= *
= * $Log:	help.h,v $
+ * Revision 4.3.3.2  91/01/16  02:41:20  davison
+ * Added optional prototyping.
+ * 
= * Revision 4.3.3.1  90/06/20  22:37:34  davison
= * Initial Trn Release
@@ -10,12 +13,12 @@
= */
=
-void	help_init();
-int	help_ng();
-int	help_art();
-int	help_page();
+void	help_init ANSI((void));
+int	help_ng ANSI((void));
+int	help_art ANSI((void));
+int	help_page ANSI((void));
=#ifdef ESCSUBS
-    int	help_subs();
+    int	help_subs ANSI((void));
=#endif
=#ifdef USETHREADS
-    int help_select();
+    int help_select ANSI((void));
=#endif
Index: init.c
@@ -1,8 +1,18 @@
-/* $Header: init.c,v 4.3.3.1 90/06/20 22:37:39 davison Trn $
+/* $Header: init.c,v 4.3.3.2 91/01/16 02:43:39 davison Trn $
= *
= * $Log:	init.c,v $
+ * Revision 4.3.3.2  91/01/16  02:43:39  davison
+ * Integrated rn patches 48-54.  Twiddled 'rn' to 'trn'.
+ * 
= * Revision 4.3.3.1  90/06/20  22:37:39  davison
= * Initial Trn Release
= * 
+ * Revision 4.3.2.8  90/11/22  13:51:39  sob
+ * Removed some cruft trailing the #endif directive to make more compilers
+ * happy.
+ * 
+ * Revision 4.3.2.7  90/10/30  22:42:23  sob
+ * Used fileno() instead of _file to increase portability.
+ * 
= * Revision 4.3.2.6  90/05/08  22:05:55  sob
= * Added quick startup (-q) flag.
@@ -218,5 +228,6 @@
=
=#ifdef FINDNEWNG
-    fstat(actfp->_file,&filestat);	/* did active file grow? */
+/*  fstat(actfp->_file,&filestat);	... does not work on Apollos */
+    fstat(fileno(actfp),&filestat);	/* did active file grow? */
=	/*
=	 * Skip this check if the -q flag was given.
@@ -244,5 +255,5 @@
=#ifdef FASTNEW
=	if (!munged) {			/* maybe just do tail of file? */
-	    fseek(actfp,lastactsiz-1,0);
+	    fseek(actfp,lastactsiz-NL_SIZE,0);
=	    fgets(buf,LBUFLEN,actfp);
=	    munged = (*buf != '\n');
@@ -292,5 +303,5 @@
=#ifdef VERBOSE
=	    IF(verbose)
-		printf("You seem to have left an rn running, process %d.\n",
+		printf("You seem to have left a trn running, process %d.\n",
=		    processnum) FLUSH;
=	    ELSE
@@ -297,5 +308,5 @@
=#endif
=#ifdef TERSE
-		printf("Rn left running, #%d.\n", processnum) FLUSH;
+		printf("Trn left running, #%d.\n", processnum) FLUSH;
=#endif
=	    if (kill(processnum, SIGEMT)) {
@@ -332,5 +343,5 @@
=		IF(verbose)
=		    fputs("\n\
-You may not have two copies of rn running simultaneously.  Goodbye.\n\
+You may not have two copies of [t]rn running simultaneously.  Goodbye.\n\
=",stdout) FLUSH;
=		ELSE
@@ -360,5 +371,6 @@
=
=    if ((tmpfp = fopen(newsnewsname,"r")) != Nullfp) {
-	fstat(tmpfp->_file,&filestat);
+/*	fstat(tmpfp->_file,&filestat);   .... does not work on Apollos */
+	fstat(fileno(tmpfp),&filestat);
=	if (filestat.st_mtime > lasttime) {
=	    while (fgets(buf,sizeof(buf),tmpfp) != Nullch)
Index: init.h
@@ -1,5 +1,8 @@
-/* $Header: init.h,v 4.3 85/05/01 11:40:46 lwall Exp $
+/* $Header: init.h,v 4.3.3.1 91/01/16 02:43:40 davison Trn $
= *
= * $Log:	init.h,v $
+ * Revision 4.3.3.1  91/01/16  02:43:40  davison
+ * Added optional prototyping.
+ * 
= * Revision 4.3  85/05/01  11:40:46  lwall
= * Baseline for release with 4.3bsd.
@@ -9,6 +12,5 @@
=EXT char *lockname INIT(nullstr);
=
-bool	initialize();
-void	lock_check();
-void	newsnews_check();
-void	version_check();
+bool	initialize ANSI((int,char **));
+void	lock_check ANSI((void));
+void	newsnews_check ANSI((void));
Index: intrp.c
@@ -1,5 +1,8 @@
-/* $Header: intrp.c,v 4.3.3.2 90/08/20 16:29:08 davison Trn $
+/* $Header: intrp.c,v 4.3.3.3 91/01/16 02:43:42 davison Trn $
= *
= * $Log:	intrp.c,v $
+ * Revision 4.3.3.3  91/01/16  02:43:42  davison
+ * Integrated rn patches 48-54.
+ * 
= * Revision 4.3.3.2  90/08/20  16:29:08  davison
= * Added HOSTFILE handling.  Add OURDOMAIN if site has no '.'
@@ -8,4 +11,27 @@
= * Initial Trn Release
= * 
+ * Revision 4.3.2.11  90/12/31  11:47:44  sob
+ * NEWSADMIN could not cancel articles because it was not getting set.
+ *
+ * Revision 4.3.2.10  90/12/31  00:02:55  sob
+ * Moved HIDDENET to remove unneeded cruft.
+ * 
+ * Revision 4.3.2.9  90/12/30  03:48:11  sob
+ * Changed "hidden" to "hiddennet" to be like nntp and bnews.
+ * Made it possible to cancel articles if hiddennet is defined.
+ * 
+ * Revision 4.3.2.8  90/11/22  13:52:27  sob
+ * Made changes to keep preprocessors from complaining.
+ * 
+ * Revision 4.3.2.7  90/11/05  23:59:33  sob
+ * moved the definition of tmpbuf such that it get defined before it is used.
+ * 
+ * Revision 4.3.2.6  90/11/03  18:52:31  sob
+ * Fixed bug in the definition of the nodename using the uname() system call.
+ * 
+ * Revision 4.3.2.5  90/10/01  01:31:18  sob
+ * Fixed problem with struct utsname reported by jrallen at devildog.att.com
+ * when rn is compiled on the Amdahl 5890 UTS 2.0 system.
+ * 
= * Revision 4.3.2.4  90/04/23  00:31:20  sob
= * Removed unneeded atoi call.
@@ -64,4 +90,5 @@
=
=/* name of this site */
+#ifndef HIDDENNET
=#ifdef GETHOSTNAME
=    char *hostname;
@@ -71,7 +98,7 @@
=#   ifdef DOUNAME
=#	include <sys/utsname.h>
-	struct utsname uts;
+	struct utsname utsn;
=#	undef SITENAME
-#	define SITENAME uts.nodename
+#	define SITENAME utsn.nodename
=#   else /* !DOUNAME */
=#	ifdef PHOSTNAME
@@ -87,4 +114,5 @@
=#   endif /* DOUNAME */
=#endif /* GETHOSTNAME */
+#endif /*HIDDENNET */
=
=#ifdef TILDENAME
@@ -95,11 +123,9 @@
=char *realname INIT(Nullch);	/* real name of sender from /etc/passwd */
=
-char *dointerp();
-char *getrealname();
=#ifdef CONDSUB
-char *skipinterp();
+char *skipinterp ANSI((char *,char *));
=#endif
=
-static void abort_interp();
+static void abort_interp ANSI((void));
=
=void
@@ -113,4 +139,15 @@
=    /* get environmental stuff */
=
+#ifdef NEWSADMIN
+#ifdef GETPWENT
+    {
+	struct passwd *getpwnam();
+	struct passwd *pwd = getpwnam(NEWSADMIN);
+
+	if (pwd != NULL)
+	    newsuid = pwd->pw_uid;
+    }
+#endif	/* GETPWENT */
+#endif	/* NEWSADMIN */
=    /* get home directory */
=
@@ -155,4 +192,5 @@
=    /* name of this site (%H) */
=
+#ifndef HIDDENNET
=#ifdef HOSTFILE
=    if ((tmpfp = fopen(HOSTFILE,"r")) == NULL) {
@@ -172,5 +210,5 @@
=#ifdef DOUNAME
=    /* get sysname */
-    uname(&uts);
+    uname(&utsn);
=#else
=#ifdef PHOSTNAME
@@ -188,9 +226,8 @@
=	pclose(pipefp);
=    }
-#endif
-#endif
-#endif
-#endif
-#ifdef OURDOMAIN
+#endif	/* PHOSTNAME */
+#endif	/* DOUNAME */
+#endif	/* GETHOSTNAME */
+#endif	/* HOSTFILE */
=    if (index(SITENAME,'.') == NULL) {
=	sprintf(buf, "%s.%s", SITENAME, OURDOMAIN);
@@ -197,6 +234,8 @@
=	sitename = savestr(buf);
=    } else
-#endif
=	sitename = savestr(SITENAME);
+#else
+    sitename = savestr(OURDOMAIN);
+#endif
=}
=
@@ -1092,4 +1131,5 @@
={
=    char *s, *c;
+    char tmpbuf[512];
=
=#ifdef PASSNAMES
@@ -1099,5 +1139,4 @@
=    s = pwd->pw_gecos;
=#else
-    char tmpbuf[512];
=    int i;
=
@@ -1156,2 +1195,4 @@
=    sig_catcher(0);
=}
+
+
Index: intrp.h
@@ -1,5 +1,8 @@
-/* $Header: intrp.h,v 4.3.3.1 90/06/20 22:38:00 davison Trn $
+/* $Header: intrp.h,v 4.3.3.2 91/01/16 02:43:45 davison Trn $
= *
= * $Log:	intrp.h,v $
+ * Revision 4.3.3.2  91/01/16  02:43:45  davison
+ * Added optional prototyping.
+ * 
= * Revision 4.3.3.1  90/06/20  22:38:00  davison
= * Initial Trn Release
@@ -24,8 +27,8 @@
=#endif
=
-void    intrp_init();
-char	*filexp();
-char	*dointerp();
-void	interp();
-void	refscpy();
-char	*getrealname();
+void    intrp_init ANSI((char *));
+char	*filexp ANSI((char *));
+char	*dointerp ANSI((char *,int,char *,char *));
+void	interp ANSI((char *,int,char *));
+void	refscpy ANSI((char *,int,char *));
+char	*getrealname ANSI((int));
Index: kfile.c
@@ -1,9 +1,15 @@
-/* $Header: kfile.c,v 4.3.3.1 90/06/20 22:38:06 davison Trn $
+/* $Header: kfile.c,v 4.3.3.2 91/01/16 02:46:28 davison Trn $
= *
= * $Log:	kfile.c,v $
+ * Revision 4.3.3.2  91/01/16  02:46:28  davison
+ * Integrated rn patches 48-54.
+ * 
= * Revision 4.3.3.1  90/06/20  22:38:06  davison
= * Initial Trn Release
= * 
- * Revision 1.2  90/03/22  23:04:41  sob
+ * Revision 4.3.2.2  90/11/22  16:09:54  sob
+ * Added changes to accomodate picky C preprocessors
+ * 
+ * Revision 4.3.2.1  90/03/22  23:04:41  sob
= * Fixes provided by Wayne Davison <drivax!davison>
= * 
Index: kfile.h
@@ -1,5 +1,8 @@
-/* $Header: kfile.h,v 4.3 85/05/01 11:42:00 lwall Exp $
+/* $Header: kfile.h,v 4.3.3.1 91/01/16 02:46:29 davison Trn $
= *
= * $Log:	kfile.h,v $
+ * Revision 4.3.3.1  91/01/16  02:46:29  davison
+ * Added optional prototyping.
+ * 
= * Revision 4.3  85/05/01  11:42:00  lwall
= * Baseline for release with 4.3bsd.
@@ -16,10 +19,9 @@
=#endif
=
-void	kfile_init();
-int	do_kfile();
-void	kill_unwanted();
-int	edit_kfile();
-void	open_kfile();
-void    kf_append();
-void	setthru();
-
+void	kfile_init ANSI((void));
+int	do_kfile ANSI((FILE *,int));
+void	kill_unwanted ANSI((ART_NUM,char *,int));
+int	edit_kfile ANSI((void));
+void	open_kfile ANSI((int));
+void    kf_append ANSI((char *));
+void	setthru ANSI((ART_NUM));
Index: last.c
@@ -1,5 +1,8 @@
-/* $Header: last.c,v 4.3.2.1 89/12/20 23:23:07 sob Exp $
+/* $Header: last.c,v 4.3.3.1 91/01/16 02:47:15 davison Trn $
= *
= * $Log:	last.c,v $
+ * Revision 4.3.3.1  91/01/16  02:47:15  davison
+ * Integrated rn patches 48-54.
+ * 
= * Revision 4.3.2.1  89/12/20  23:23:07  sob
= * .rnlast sometimes is a null file. This gives bogus information when
Index: last.h
@@ -1,5 +1,8 @@
-/* $Header: last.h,v 4.3 85/05/01 11:42:22 lwall Exp $
+/* $Header: last.h,v 4.3.3.1 91/01/16 02:47:16 davison Trn $
= *
= * $Log:	last.h,v $
+ * Revision 4.3.3.1  91/01/16  02:47:16  davison
+ * Added optional prototyping.
+ * 
= * Revision 4.3  85/05/01  11:42:22  lwall
= * Baseline for release with 4.3bsd.
@@ -11,4 +14,4 @@
=EXT long lastactsiz INIT(0);	/* size of active file when rn last started up */
=
-void	last_init();
-void    writelast();
+void	last_init ANSI((char *));
+void    writelast ANSI((void));
Index: makedepend.SH
@@ -5,10 +5,16 @@
=$spitshell >makedepend <<!GROK!THIS!
=$startsh
-# $Header: makedepend.SH,v 4.3.3.1 90/06/20 22:38:14 davison Trn $
+# $Header: makedepend.SH,v 4.3.3.2 91/01/16 02:48:09 davison Trn $
=#
=# $Log:	makedepend.SH,v $
+# Revision 4.3.3.2  91/01/16  02:48:09  davison
+# Integrated rn patches 48-54.
+# 
=# Revision 4.3.3.1  90/06/20  22:38:14  davison
=# Initial Trn Release
=# 
+# Revision 4.3.2.3  90/10/30  22:46:14  sob
+# Made minor changes to the send command to work better on Apollos.
+# 
=# Revision 4.3.2.2  90/04/21  14:24:58  sob
=# Added a fix to deal with XENIX cc -E output.
@@ -59,5 +65,5 @@
=    echo "Updating Makefile..."
=    echo "# If this runs make out of memory, delete /usr/include lines." >>Makefile.new
-    $cat .deptmp >>Makefile.new
+    $sed -e 's/\\\$/\$\$/g' .deptmp >>Makefile.new
=else
=    $echo "You don't seem to have a proper C preprocessor.  Using grep instead."
Index: makedir.SH
@@ -5,7 +5,13 @@
=$spitshell >makedir <<!GROK!THIS!
=$startsh
-# $Header: makedir.SH,v 4.3 85/05/01 11:42:31 lwall Exp $
+# $Header: makedir.SH,v 4.3.3.1 91/01/16 02:48:09 davison Trn $
=# 
=# $Log:	makedir.SH,v $
+# Revision 4.3.3.1  91/01/16  02:48:09  davison
+# Integrated rn patches 48-54.
+# 
+# Revision 4.3.2.1  90/11/22  14:02:49  sob
+# changes . config.sh to . ./config.sh
+# 
=# Revision 4.3  85/05/01  11:42:31  lwall
=# Baseline for release with 4.3bsd.
Index: Makefile.SH
@@ -4,10 +4,16 @@
=echo "Extracting Makefile (with variable substitutions)"
=cat >Makefile <<!GROK!THIS!
-# $Header: Makefile.SH,v 4.3.3.1 90/07/28 18:14:56 davison Trn $
+# $Header: makefile.SH,v 4.3.3.2 91/01/16 02:48:10 davison Trn $
=#
-# $Log:	Makefile.SH,v $
+# $Log:	makefile.SH,v $
+# Revision 4.3.3.2  91/01/16  02:48:10  davison
+# Integrated rn patches 48-54.
+# 
=# Revision 4.3.3.1  90/07/28  18:14:56  davison
=# Initial Trn Release
=# 
+# Revision 4.3.2.11  90/11/22  13:57:53  sob
+# Added support for additional CFLAGS and better cleanup.
+# 
=# Revision 4.3.2.10  90/05/04  00:44:51  sob
=# Added socketlib to list of libs.
@@ -60,5 +66,5 @@
=#NNTPNNTPDIR = $NNTPSRC
=#NNTPNNTPINC = $rrninclude
-CFLAGS = $iandd -O $include
+CFLAGS = $iandd $addcflags -O $include
=LDFLAGS = $iandd
=NDIRC = $ndirc
@@ -111,7 +117,8 @@
=add3 = loc makedepend makedir mbox.saver newsetup
=add4 = newsgroups newsnews norm.saver
-add5 = pdp11 usg v7 ultrix sun hp-ux pyr sgi xenix server.h
+add5 = pdp11 usg v7 ultrix sun hp-ux sgi xenix server.h
+add6 = all pyr grimble .falseactive Pnews.header s5uniq
=
-addedbyconf = $(add1) $(add2) $(add3) $(add4) $(add5)
+addedbyconf = $(add1) $(add2) $(add3) $(add4) $(add5) $(add6)
=
=# grrr
Index: mbox.saver.SH
@@ -11,4 +11,7 @@
=# Added support for MMDF format mailboxes.
=# 
+# Revision 4.3.2.3  90/11/22  14:28:27  sob
+# Changed . config.sh to . ./config.sh
+# 
=# Revision 4.3.2.2  90/03/17  20:44:54  sob
=# Modify Article header to place the colon after Article.
Index: mt.check.SH
@@ -5,7 +5,10 @@
=$spitshell >mt.check <<!GROK!THIS!
=$startsh
-# $Header: mt.check.SH,v 4.3.3.2 90/08/20 16:42:10 davison Trn $
+# $Header: mt.check.SH,v 4.3.3.3 91/01/16 02:50:10 davison Trn $
=#
=# $Log:	mt.check.SH,v $
+# Revision 4.3.3.3  91/01/16  02:50:10  davison
+# Added missing grok line at eof.
+# 
=# Revision 4.3.3.2  90/08/20  16:42:10  davison
=# Changed email address.
@@ -59,2 +62,3 @@
=
=exit 0
+!GROK!THIS!
Index: mt-lint.h
@@ -1,5 +1,8 @@
-/* $Header: mt-lint.h,v 4.3.3.1 90/06/20 22:55:11 davison Trn $
+/* $Header: mt-lint.h,v 4.3.3.2 91/01/16 02:49:11 davison Trn $
=**
=** $Log:	mt-lint.h,v $
+** Revision 4.3.3.2  91/01/16  02:49:11  davison
+** Changed Free() to safefree().
+** 
=** Revision 4.3.3.1  90/06/20  22:55:11  davison
=** Initial Trn Release
@@ -49,4 +52,4 @@
=#define safemalloc(x)	(NULL)
=#define free(x)		(x = NULL)
-#define Free(x)		(*x = NULL)
+#define safefree(x)	(*x = NULL)
=#define signal(x,y)
Index: mt-process.c
@@ -1,5 +1,8 @@
-/* $Header: mt-process.c,v 4.3.3.2 90/08/20 16:40:31 davison Trn $
+/* $Header: mt-process.c,v 4.3.3.3 91/01/18 19:13:20 davison Trn $
=**
=** $Log:	mt-process.c,v $
+** Revision 4.3.3.3  91/01/18  19:13:20  davison
+** Removed the code that tried to exclude certain message ids.  Added -s option
+** 
=** Revision 4.3.3.2  90/08/20  16:40:31  davison
=** Added check of caught_interrupt flag into main loops.
@@ -31,7 +34,5 @@
=char author_str[20];
=
-extern int log_verbosity;
-
-extern time_t getdate();
+extern int log_verbosity, slow_down;
=
=DOMAIN *next_domain;
@@ -87,4 +88,7 @@
=	}
=#ifdef SERVER
+	if( slow_down ) {
+	    sleep( slow_down );
+	}
=	sprintf( buff, "HEAD %ld", (long)i );
=	put_server( buff );
@@ -882,5 +886,4 @@
=register char *start, *end;
={
-    int lower_case;
=    char *mid;
=
@@ -904,18 +907,5 @@
=	return 0;					/* RETURN */
=    }
-    /* Try to weed-out non-ids (user at domain) by looking for lower-case without
-    ** digits in the unique portion.  B news ids are all digits; standard C
-    ** news are digits with mixed case; and Zeeff message ids are any mixture
-    ** of digits, certain punctuation characters and upper-case.
-    */
-    lower_case = 0;
-    do {
-	if( *start <= '9' && *start >= '0' ) {
-	    return 1;					/* RETURN */
-	}
-	lower_case = lower_case || (*start >= 'a' && *start <= 'z');
-    } while( ++start < mid );
-
-    return !lower_case;
+    return 1;
=}
=
Index: mt-read.c
@@ -1,5 +1,8 @@
-/* $Header: mt-read.c,v 4.3.3.1 90/07/24 23:51:12 davison Trn $
+/* $Header: mt-read.c,v 4.3.3.2 91/01/16 02:49:15 davison Trn $
=**
=** $Log:	mt-read.c,v $
+** Revision 4.3.3.2  91/01/16  02:49:15  davison
+** Changed Free() to safefree().  Tweaked fopen for possible binary open mode.
+** 
=** Revision 4.3.3.1  90/07/24  23:51:12  davison
=** Initial Trn Release
@@ -28,5 +31,5 @@
=    unk_domain.link = Null(DOMAIN*);
=
-    if( (fp_in = fopen( filename, "r" )) == Nullfp ) {
+    if( (fp_in = fopen( filename, FOPEN_RB )) == Nullfp ) {
=	bzero( &total, sizeof (TOTAL) );
=	return 0;
@@ -56,15 +59,15 @@
=	return 1;
=    }
-    /* Something failed.  Free takes care of checking if we're partially
+    /* Something failed.  Safefree takes care of checking if we're partially
=    ** allocated.  Any linked-list structures we created were freed before
=    ** we got here.
=    */
-    Free( &strings );
-    Free( &subject_cnts );
-    Free( &author_cnts );
-    Free( &root_array );
-    Free( &subject_array );
-    Free( &article_array );
-    Free( &ids );
+    safefree( &strings );
+    safefree( &subject_cnts );
+    safefree( &author_cnts );
+    safefree( &root_array );
+    safefree( &subject_array );
+    safefree( &article_array );
+    safefree( &ids );
=    fclose( fp_in );
=    return 0;
@@ -484,5 +487,5 @@
=/* Free some memory if it hasn't already been freed. */
=void
-Free( pp )
+safefree( pp )
=char **pp;
={
Index: mt-write.c
@@ -1,5 +1,8 @@
-/* $Header: mt-write.c,v 4.3.3.1 90/07/24 23:51:18 davison Trn $
+/* $Header: mt-write.c,v 4.3.3.2 91/01/16 02:49:17 davison Trn $
=**
=** $Log:	mt-write.c,v $
+** Revision 4.3.3.2  91/01/16  02:49:17  davison
+** Tweaked fopen for possible binary open mode.
+** 
=** Revision 4.3.3.1  90/07/24  23:51:18  davison
=** Initial Trn Release
@@ -37,5 +40,5 @@
=	log_error( "Unable to create path: `%s'.\n", filename );
=	failure = 2;
-    } else if( (fp_out = fopen( filename, "w" )) == Nullfp ) {
+    } else if( (fp_out = fopen( filename, FOPEN_WB )) == Nullfp ) {
=	log_error( "Unable to create file: `%s'.\n", filename );
=	failure = 2;
Index: mthreads.1
@@ -1,5 +1,8 @@
-''' $Header: mthreads.1,v 4.3.3.2 90/08/20 16:42:32 davison Trn $
+''' $Header: mthreads.1,v 4.3.3.3 91/01/18 19:27:39 davison Trn $
=''' 
=''' $Log:	mthreads.1,v $
+''' Revision 4.3.3.3  91/01/18  19:27:39  davison
+''' Added commands -s and -z.
+''' 
=''' Revision 4.3.3.2  90/08/20  16:42:32  davison
=''' Document new command-line interface.
@@ -136,4 +139,5 @@
=specifies a debugging mode where only the groups mentioned on the
=command-line are processed \*(-- all other groups are left unchanged.
+It also outputs each group's name into the log file before it is processed.
=.TP 5
=.B \-d
@@ -187,4 +191,12 @@
=actually doing any of the processing right away.
=.TP 5
+.B -s
+tells mthreads to sleep one second before processing each article.
+This is useful if your NNTP server cannot handle mthreads running at
+full speed.
+For each additional
+.B -s
+specified, mthreads sleeps an additional second.
+.TP 5
=.B -v
=selects additional levels of verbosity in the log file.
@@ -195,4 +207,10 @@
=to get extra reference line problems logged into the file.
=Add a second and a third for even more (useless?) information.
+A fourth will cause mthreads to output each group's name into the log file
+before it is processed.
+.TP 5
+.B -z
+tells mthreads to 'zap' any thread file it believes to be corrupt.
+This will allow the file to be regenerated from scratch on the next pass.
=.TP 5
=.B hierarchy_list
Index: mthreads.h
@@ -1,5 +1,8 @@
-/* $Header: mthreads.h,v 4.3.3.2 90/08/20 16:44:29 davison Trn $
+/* $Header: mthreads.h,v 4.3.3.3 91/01/16 03:16:33 davison Trn $
=**
=** $Log:	mthreads.h,v $
+** Revision 4.3.3.3  91/01/16  03:16:33  davison
+** Added optional prototyping.
+** 
=** Revision 4.3.3.2  90/08/20  16:44:29  davison
=** New entries for new command-line interface.
@@ -21,5 +24,5 @@
=EXT int expired_articles, expired_count;
=EXT bool extra_expire INIT(FALSE);
-EXT bool caught_interrupt INIT(FALSE);
+EXT int caught_interrupt INIT(0);
=
=EXT char *strings INIT(0);
@@ -47,20 +50,28 @@
=#endif
=
-int ngmatch(), onepatmatch();
-
-void log_entry(), log_error();
+int ngmatch ANSI((char *,char *));
+int onepatmatch ANSI((char *,char *));
=
-void mybytemap();
-int read_data(), write_data();
-void dont_read_data(), process_data();
+void log_entry();
+void log_error();
+
+void mybytemap ANSI((BMAP *));
+int read_data ANSI((void));
+int write_data ANSI((char *));
+void dont_read_data(int);
+
+void process_articles ANSI((ART_NUM,ART_NUM));
=
-void process_articles();
+char *thread_name ANSI((char *));
+char *file_exp ANSI((char *));
+char *savestr ANSI((char *));
=
-char *thread_name(), *file_exp(), *savestr();
-
=#ifndef lint
-char *safemalloc();
-void free(), Free();
+char *safemalloc ANSI((MEM_SIZE));
+void free();
+void safefree();
=#endif
+
+time_t getdate ANSI((char *,time_t,long));
=
=#define Nullart Null(ARTICLE*)
Index: ndir.c
@@ -1,7 +1,16 @@
-/* $Header: ndir.c,v 4.3.3.1 90/06/20 22:38:20 davison Trn $
+/* $Header: ndir.c,v 4.3.3.2 91/01/16 03:18:03 davison Trn $
= *
= * $Log:	ndir.c,v $
+ * Revision 4.3.3.2  91/01/16  03:18:03  davison
+ * Integrated rn patches 48-54.
+ * 
= * Revision 4.3.3.1  90/06/20  22:38:20  davison
= * Initial Trn Release
+ * 
+ * Revision 4.3.1.6  90/11/22  16:08:50  sob
+ * Added changes to accomodate pick C preprocessors.
+ * 
+ * Revision 4.3.1.5  90/03/22  23:04:47  sob
+ * Fixes provided by Wayne Davison <drivax!davison>
= * 
= * Revision 4.3.1.3  85/05/23  11:19:24  lwall
SHAR_EOF
fi
exit 0
#	End of shell archive
----8<------8<------8<------8<-----the end------>8------>8------>8------>8----



More information about the Comp.sources.bugs mailing list