🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
1 messages
1 total messages Started by rrn Sat, 07 Dec 1991 23:38
Patch kit for rn 4.4 (patch 2)
#759
Author: rrn
Date: Sat, 07 Dec 1991 23:38
3627 lines
94437 bytes
This is rn 4.4 patch number 2.

Please note that rn 4.4 on lib.tmc.edu, gazette.bcm.tmc.edu, bcm.tmc.edu
and tmc.edu have all been updated to rn 4.4.2 and have this patch installed.

Description:
	1. Configure contained an error in producing the CONTROL-A character.
	It now does this correctly.
	2. AIX is now supported.
	3. The clientlib object is now placed in the rn directory instead
	of the nntp source tree. 
	4. Problems with searching for the occurance of characters that 
	are also used as part of regular expressions have been corrected.
	5. Some documentation errors have been corrected.
	6. The uudecode routines are now more error free.

Install this patch using Larry Wall's patch program.


Index: Configure
Prereq: 4.4.1.1
*** Configure	Fri Dec  6 23:49:03 1991
--- ../rn4.4.2/Configure	Sun Dec  1 12:10:51 1991
***************
*** 15,21
  # If these # comments don't work, trim them.  Don't worry about the other
  # shell scripts, Configure will trim # comments from them for you.
  #
! # $Id: Configure,v 4.4.1.1 1991/09/25 19:38:08 sob Exp sob $
  #
  # $Log: Configure,v $
  # Revision 4.4.1.1  1991/09/25  19:38:08  sob

--- 15,21 -----
  # If these # comments don't work, trim them.  Don't worry about the other
  # shell scripts, Configure will trim # comments from them for you.
  #
! # $Id: Configure,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  #
  # $Log: Configure,v $
  # Revision 4.4.2.1  1991/12/01  18:05:42  sob
***************
*** 18,23
  # $Id: Configure,v 4.4.1.1 1991/09/25 19:38:08 sob Exp sob $
  #
  # $Log: Configure,v $
  # Revision 4.4.1.1  1991/09/25  19:38:08  sob
  # various fixed
  #

--- 18,26 -----
  # $Id: Configure,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  #
  # $Log: Configure,v $
+ # Revision 4.4.2.1  1991/12/01  18:05:42  sob
+ # Patchlevel 2 changes
+ #
  # Revision 4.4.1.1  1991/09/25  19:38:08  sob
  # various fixed
  #
***************
*** 28,34
  
  # Yes, you may rip this off to use in other distribution packages.
  
! CTRL=`echo a | tr a '\011'`
  
  bopt=''
  n=''

--- 31,37 -----
  
  # Yes, you may rip this off to use in other distribution packages.
  
! CTRLA=`echo a | tr a '\001'`
  
  bopt=''
  n=''
***************
*** 63,69
  nametype=''
  cc=''
  iandd=''
- include=''
  rrninclude=''
  termlib=''
  jobslib=''

--- 66,71 -----
  nametype=''
  cc=''
  iandd=''
  rrninclude=''
  termlib=''
  jobslib=''
***************
*** 260,266
  if test -f ./config.sh; then
      echo " "
      dflt=y
!     rp="I see a config.sh file.  Did Configure make it on THIS system? [$dflt]"
      echo $n "$rp $c"
      . myread
      case "$ans" in

--- 262,268 -----
  if test -f ./config.sh; then
      echo " "
      dflt=y
!     rp="I see a config.sh file.  Do you want to use it to set the defaults? [$dflt]"
      echo $n "$rp $c"
      . myread
      case "$ans" in
***************
*** 315,321
      fi
  fi
  
! if test -d /usr/bsd43 ; then
      echo " "
      echo "It appears that you might be running on a MIPS RISC/os box."
      echo $n "Should I pass the -B option to nm [y]? $c"

--- 317,323 -----
      fi
  fi
  
! if test -d /usr/bsd43 -o -d /usr/bsd ; then
      echo " "
      echo "It appears that you might be running on a RISC/os box."
      echo $n "Should I pass the -B option to nm [y]? $c"
***************
*** 317,323
  
  if test -d /usr/bsd43 ; then
      echo " "
!     echo "It appears that you might be running on a MIPS RISC/os box."
      echo $n "Should I pass the -B option to nm [y]? $c"
      . myread
      case $ans in

--- 319,325 -----
  
  if test -d /usr/bsd43 -o -d /usr/bsd ; then
      echo " "
!     echo "It appears that you might be running on a RISC/os box."
      echo $n "Should I pass the -B option to nm [y]? $c"
      . myread
      case $ans in
***************
*** 325,330
  	*)     bopt='-B' ;;
      esac
  fi
  
  echo " "
  echo $n "Extracting names from $libc for later perusal...$c"

--- 327,338 -----
  	*)     bopt='-B' ;;
      esac
  fi
+ if test -f /bin/smit ; then
+     echo " "
+     echo "It appears that you might be running on an IBM RS/6000 box."
+     echo "We'll be using 'nm -B' to get the symbol lists."
+     bopt='-B'
+ fi
  
  echo " "
  echo $n "Extracting names from $libc for later perusal...$c"
***************
*** 590,596
  rm sgi.c
  if sgi; then
      echo "Silicon Graphics must have built this..."
! 	include=-I/usr/include/bsd
  fi
  
  : check for XENIX

--- 598,606 -----
  rm sgi.c
  if sgi; then
      echo "Silicon Graphics must have built this..."
! 	if test -f /usr/lib/libsun.a ; then
!  		socketlib=-lsun
!  	fi
  fi
  
  : check for XENIX
***************
*** 641,646
  if next; then
      echo "My, you really ARE on a NeXT."
      addcflags='-bsd'
  fi
  
  if bsd; then

--- 651,657 -----
  if next; then
      echo "My, you really ARE on a NeXT."
      addcflags='-bsd'
+     test=test
  fi
  
  if bsd; then
***************
*** 746,752
  : find out where common programs are
  echo " "
  echo "Locating common programs..."
! pth="/usr/ucb /bin /usr/bin /usr/local /usr/local/bin /usr/lbin /etc /usr/lib /usr/etc /usr/5bin"
  cat <<EOSC >loc
  $startsh
  thing=\$1

--- 757,763 -----
  : find out where common programs are
  echo " "
  echo "Locating common programs..."
! pth="/usr/ucb /bin /usr/bin /usr/local /usr/local/bin /usr/lbin /etc /usr/lib /usr/etc /usr/5bin /usr/bsd /usr/bsd43"
  cat <<EOSC >loc
  $startsh
  thing=\$1
***************
*** 1511,1518
  ans=`loc libcurses.a x /usr/lib /usr/local/lib /lib`
  case "$ans" in
  /*)
!     ar t $ans >grimble
!     if $contains tputs grimble >/dev/null 2>&1; then
  	termlib='-lcurses'
  	havetlib=define
  	$echo "Terminfo library found."

--- 1522,1528 -----
  ans=`loc libcurses.a x /usr/lib /usr/local/lib /lib`
  case "$ans" in
  /*)
!     if test -f /bin/smit; then
  	termlib='-lcurses'
  	havetlib=define
  	$echo "Using -lcurses and assuming terminfo, since this looks like AIX."
***************
*** 1515,1521
      if $contains tputs grimble >/dev/null 2>&1; then
  	termlib='-lcurses'
  	havetlib=define
! 	$echo "Terminfo library found."
      else
  	ans=x
      fi

--- 1525,1531 -----
      if test -f /bin/smit; then
  	termlib='-lcurses'
  	havetlib=define
! 	$echo "Using -lcurses and assuming terminfo, since this looks like AIX."
      else
  	ar t $ans >grimble
  	if $contains tputs grimble >/dev/null 2>&1; then
***************
*** 1517,1523
  	havetlib=define
  	$echo "Terminfo library found."
      else
! 	ans=x
      fi
      ;;
  esac

--- 1527,1540 -----
  	havetlib=define
  	$echo "Using -lcurses and assuming terminfo, since this looks like AIX."
      else
! 	ar t $ans >grimble
! 	if $contains tputs grimble >/dev/null 2>&1; then
! 	    termlib='-lcurses'
! 	    havetlib=define
! 	    $echo "Terminfo library found."
! 	else
! 	    ans=x
! 	fi
      fi
      ;;
  esac
***************
*** 1633,1640
  
  : see if the system has sigblock
  if $contains '^sigblock$' libc.list >/dev/null 2>&1 ; then
!     $echo "sigblock() found."
!     sigblock=define
  else
      sigblock=undef
  fi

--- 1650,1662 -----
  
  : see if the system has sigblock
  if $contains '^sigblock$' libc.list >/dev/null 2>&1 ; then
!      if sgi; then
!          $echo "sigblock() found -- but should not use it on Silicon Graphics"
!          sigblock=undef
!     else
! 	$echo "sigblock() found."
!         sigblock=define
!     fi
  else
      sigblock=undef
  fi
***************
*** 1697,1708
      $echo "YP may be running -- will use getpwent(), just in case."
      getpwent='define'
  else
! : see if there is a getpw
! if $contains '^getpw$' libc.list >/dev/null 2>&1 ; then
!     $echo "getpw() found."
!     getpwent='undef'
! else
!     $echo "No getpw() found--will use getpwent() instead."
      getpwent='define'
  fi
  fi

--- 1719,1727 -----
      $echo "YP may be running -- will use getpwent(), just in case."
      getpwent='define'
  else
! : see if there is a getpwent
! if $contains '^getpwent$' libc.list >/dev/null 2>&1 ; then
!     $echo "getpwent() found."
      getpwent='define'
  else
      $echo "No getpwent() found--will use getpw() instead."
***************
*** 1704,1709
  else
      $echo "No getpw() found--will use getpwent() instead."
      getpwent='define'
  fi
  fi
  

--- 1723,1731 -----
  if $contains '^getpwent$' libc.list >/dev/null 2>&1 ; then
      $echo "getpwent() found."
      getpwent='define'
+ else
+     $echo "No getpwent() found--will use getpw() instead."
+     getpwent='undef'
  fi
  fi
  
***************
*** 1710,1715
  : default
  sigret=int
  : determine type of signal function
  if stardent; then
  	sigret=void
  else

--- 1732,1743 -----
  : default
  sigret=int
  : determine type of signal function
+ if sgi; then
+ 	sigret=void
+ else
+ if next; then
+ 	sigret=int
+ else
  if stardent; then
  	sigret=void
  else
***************
*** 1713,1720
  if stardent; then
  	sigret=void
  else
! if [ -f /usr/include/signal.h ]
! then
  	$cpp /usr/include/signal.h >sigtest
  else
  if [ -f /usr/include/sys/signal.h ]

--- 1741,1747 -----
  if stardent; then
  	sigret=void
  else
! if test -f /usr/include/signal.h ; then
  	$cpp /usr/include/signal.h >sigtest
  else
  if test -f /usr/include/sys/signal.h ; then
***************
*** 1717,1724
  then
  	$cpp /usr/include/signal.h >sigtest
  else
! if [ -f /usr/include/sys/signal.h ]
! then
  	$cpp /usr/include/sys/signal.h >sigtest
  fi
  fi

--- 1744,1750 -----
  if test -f /usr/include/signal.h ; then
  	$cpp /usr/include/signal.h >sigtest
  else
! if test -f /usr/include/sys/signal.h ; then
  	$cpp /usr/include/sys/signal.h >sigtest
  fi
  fi
***************
*** 1727,1732
  	sigret=void
  fi
  fi
  $echo "signal() returns $sigret on this system."
  : see how we will look up site name
  douname=undef

--- 1753,1760 -----
  	sigret=void
  fi
  fi
+ fi
+ fi
  $echo "signal() returns $sigret on this system."
  : see how we will look up site name
  douname=undef
***************
*** 1919,1925
  isrrn=''
  while $test -z "$isrrn" ; do
      $echo " "
!     $echo $n "Do you want to build the NNTP versions of rn (rrn)? [$dflt] $c"
      . myread
      case "$ans" in
      '') ans="$dflt";;

--- 1947,1953 -----
  isrrn=''
  while $test -z "$isrrn" ; do
      $echo " "
!     $echo $n "Do you want to build the NNTP version of rn (rrn)? [$dflt] $c"
      . myread
      case "$ans" in
      '') ans="$dflt";;
***************
*** 1989,2008
  	    fi
  	done
  	NNTPSRC="$ans"
- cat > server.h <<EOF_SERVE
- #ifdef SERVER
- 
- extern	char	*getserverbyfile ANSI((char *));
- extern	int	server_init ANSI((char *));
- extern	void	put_server ANSI((char *));
- extern	int	get_server ANSI((char *,int));
- extern	void	close_server ANSI((void));
- 
- #include "$NNTPSRC/common/nntp.h"
- EXT 	char ser_line[NNTP_STRLEN];
- #endif
- EOF_SERVE
- 
      esac
  
  done

--- 2017,2022 -----
  	    fi
  	done
  	NNTPSRC="$ans"
      esac
  
  done
***************
*** 2648,2654
  serverfile='$serverfile'
  NNTPSRC='$NNTPSRC'
  CONFIG=true
- CTRLA='$CTRLA'
  EOT
  CONFIG=true
  $rm -f libc.list .distlist kit*isdone 

--- 2662,2667 -----
  serverfile='$serverfile'
  NNTPSRC='$NNTPSRC'
  CONFIG=true
  EOT
  CONFIG=true
  $rm -f libc.list .distlist kit*isdone 
Index: Makefile.SH
Prereq: 4.4.1.1
*** Makefile.SH	Fri Dec  6 23:49:49 1991
--- ../rn4.4.2/Makefile.SH	Sun Dec  1 12:06:24 1991
***************
*** 2,9
      '') . ./config.sh ;;
  esac
  echo "Extracting Makefile (with variable substitutions)"
! cat >Makefile <<!GROK!THIS!
! # $Id: Makefile.SH,v 4.4.1.1 1991/09/25 19:38:08 sob Exp sob $
  #
  # This software is Copyright 1991 by Stan Barber. 
  #

--- 2,9 -----
      '') . ./config.sh ;;
  esac
  echo "Extracting Makefile (with variable substitutions)"
! $cat >Makefile <<!GROK!THIS!
! # $Id: Makefile.SH,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  #
  # This software is Copyright 1991 by Stan Barber. 
  #
***************
*** 18,23
  # is at the user's own risk. 
  #
  # $Log: Makefile.SH,v $
  # Revision 4.4.1.1  1991/09/25  19:38:08  sob
  # Changed some install directives
  #

--- 18,26 -----
  # is at the user's own risk. 
  #
  # $Log: Makefile.SH,v $
+ # Revision 4.4.2.1  1991/12/01  18:05:42  sob
+ # Changed clientlib to be built in the rn tree instead of the nntp tree.
+ #
  # Revision 4.4.1.1  1991/09/25  19:38:08  sob
  # Changed some install directives
  #
***************
*** 42,48
  libs = $ndirlib $termlib $jobslib $socketlib -lm
  mlibs = $jobslib
  !GROK!THIS!
! cat >>Makefile <<'!NO!SUBS!'
  #NNTPnntp=getactive
  public = rn newsetup newsgroups Pnews Rnmail
  private = norm.saver mbox.saver makedir	filexp Pnews.header $(nntp)

--- 45,51 -----
  libs = $ndirlib $termlib $jobslib $socketlib -lm
  mlibs = $jobslib
  !GROK!THIS!
! $cat >>Makefile <<'!NO!SUBS!'
  #NNTPnntp=getactive
  public = rn newsetup newsgroups Pnews Rnmail
  private = norm.saver mbox.saver makedir	filexp Pnews.header $(nntp)
***************
*** 54,60
  h2 = common.h final.h head.h help.h init.h intrp.h kfile.h last.h 
  h3 = ng.h ngdata.h ngsrch.h ngstuff.h only.h rcln.h rcstuff.h
  h4 = respond.h rn.h search.h sw.h term.h util.h uudecode.h
- #NNTPh5 = server.h
  
  h = $(h1) $(h2) $(h3) $(h4) $(h5)
  

--- 57,62 -----
  h2 = common.h final.h head.h help.h init.h intrp.h kfile.h last.h 
  h3 = ng.h ngdata.h ngsrch.h ngstuff.h only.h rcln.h rcstuff.h
  h4 = respond.h rn.h search.h sw.h term.h util.h uudecode.h
  
  h = $(h1) $(h2) $(h3) $(h4)
  
***************
*** 56,62
  h4 = respond.h rn.h search.h sw.h term.h util.h uudecode.h
  #NNTPh5 = server.h
  
! h = $(h1) $(h2) $(h3) $(h4) $(h5)
  
  c1 = addng.c art.c artio.c artsrch.c autosub.c backpage.c bits.c cheat.c
  c2 = final.c head.c help.c init.c intrp.c kfile.c last.c $(NDIRC) ng.c

--- 58,64 -----
  h3 = ng.h ngdata.h ngsrch.h ngstuff.h only.h rcln.h rcstuff.h
  h4 = respond.h rn.h search.h sw.h term.h util.h uudecode.h
  
! h = $(h1) $(h2) $(h3) $(h4)
  
  c1 = addng.c art.c artio.c artsrch.c autosub.c backpage.c bits.c cheat.c
  c2 = final.c head.c help.c init.c intrp.c kfile.c last.c $(NDIRC) ng.c
***************
*** 70,76
  obj2 = final.o head.o help.o init.o intrp.o kfile.o last.o $(NDIRO) ng.o
  obj3 = ngdata.o ngsrch.o ngstuff.o only.o rcln.o rcstuff.o respond.o rn.o
  obj4 = search.o sw.o term.o util.o uudecode.o
! #NNTPobj5 =  $(NNTPDIR)/common/clientlib.o
  
  obj = $(obj1) $(obj2) $(obj3) $(obj4) $(obj5)
  

--- 72,78 -----
  obj2 = final.o head.o help.o init.o intrp.o kfile.o last.o $(NDIRO) ng.o
  obj3 = ngdata.o ngsrch.o ngstuff.o only.o rcln.o rcstuff.o respond.o rn.o
  obj4 = search.o sw.o term.o util.o uudecode.o
! #NNTPobj5 =  clientlib.o
  
  obj = $(obj1) $(obj2) $(obj3) $(obj4) $(obj5)
  
***************
*** 88,93
  # grrr
  SHELL = /bin/sh
  
  .c.o:
  	$(CC) -c $(CFLAGS) $*.c
  

--- 90,96 -----
  # grrr
  SHELL = /bin/sh
  
+ 
  .c.o:
  	$(CC) -c $(CFLAGS) $*.c
  
***************
*** 98,105
  	$(CC) $(LDFLAGS) $(obj) $(libs) -o rn
  
  
! #NNTPgetactive: getactive.o $(NNTPDIR)/common/clientlib.o
! #NNTP	$(CC) $(LDFLAGS) getactive.o $(NNTPDIR)/common/clientlib.o -o getactive $(libs)
  
  # Eek! This is gross.
  $(NNTPDIR)/common/clientlib.o:

--- 101,108 -----
  	$(CC) $(LDFLAGS) $(obj) $(libs) -o rn
  
  
! #NNTPgetactive: getactive.o clientlib.o
! #NNTP	$(CC) $(LDFLAGS) getactive.o clientlib.o -o getactive $(libs)
  
  #NNTPclientlib.o:
  #NNTP	$(CC) -c $(CFLAGS) $(NNTPINC) $(NNTPDIR)/common/clientlib.c
***************
*** 101,110
  #NNTPgetactive: getactive.o $(NNTPDIR)/common/clientlib.o
  #NNTP	$(CC) $(LDFLAGS) getactive.o $(NNTPDIR)/common/clientlib.o -o getactive $(libs)
  
! # Eek! This is gross.
! $(NNTPDIR)/common/clientlib.o:
! 	$(CC) -c $(CFLAGS) $(NNTPINC) $(NNTPDIR)/common/clientlib.c
! 	mv clientlib.o $(NNTPDIR)/common/clientlib.o
  
  # if a .h file depends on another .h file...
  $(h):

--- 104,111 -----
  #NNTPgetactive: getactive.o clientlib.o
  #NNTP	$(CC) $(LDFLAGS) getactive.o clientlib.o -o getactive $(libs)
  
! #NNTPclientlib.o:
! #NNTP	$(CC) -c $(CFLAGS) $(NNTPINC) $(NNTPDIR)/common/clientlib.c
  
  # if a .h file depends on another .h file...
  $(h):
***************
*** 117,124
  #NNTP	- ln -s rn $(rnbin)/rrn
  	- if test `pwd` != $(rnbin); then cp $(public) $(rnbin); fi
  	- if test `pwd` != $(rnbin); then cd $(rnbin); chmod 755 $(public); strip rn ; fi
- #	- if test ! -x makedir; then chmod 755 makedir; fi
- 	- chmod 755 makedir
  	- ./makedir `./filexp $(rnlib)`
  	- if test `pwd` != `./filexp $(rnlib)`; then cp INIT $(private) `./filexp $(rnlib)`; fi
  #NNTP	- if test `pwd` != `./filexp $(rnlib)`; then strip `./filexp $(rnlib)`/getactive ; fi

--- 118,123 -----
  #NNTP	- ln -s rn $(rnbin)/rrn
  	- if test `pwd` != $(rnbin); then cp $(public) $(rnbin); fi
  	- if test `pwd` != $(rnbin); then cd $(rnbin); chmod 755 $(public); strip rn ; fi
  	- ./makedir `./filexp $(rnlib)`
  	- if test `pwd` != `./filexp $(rnlib)`; then cp INIT $(private) `./filexp $(rnlib)`; fi
  #NNTP	- if test `pwd` != `./filexp $(rnlib)`; then strip `./filexp $(rnlib)`/getactive ; fi
***************
*** 136,142
  
  realclean:
  	rm -f rn *.o core $(addedbyconf) 
! #NNTP	rm -f $(NNTPDIR)/common/clientlib.o getactive
  
  # The following lint has practically everything turned on.  Unfortunately,
  # you have to wade through a lot of mumbo jumbo that can't be suppressed.

--- 135,141 -----
  
  realclean:
  	rm -f rn *.o core $(addedbyconf) 
! #NNTP	rm -f clientlib.o getactive
  
  # The following lint has practically everything turned on.  Unfortunately,
  # you have to wade through a lot of mumbo jumbo that can't be suppressed.
***************
*** 148,154
  lint_rn:
  	lint $(lintflags) $(defs) $(c) > rn.fuzz
  
! depend:
  	./makedepend
  
  # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE

--- 147,153 -----
  lint_rn:
  	lint $(lintflags) $(defs) $(c) > rn.fuzz
  
! depend: config.h Makefile
  	./makedepend
  
  # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
***************
*** 152,157
  	./makedepend
  
  # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
  $(obj):
  	@ echo "You haven't done a "'"make depend" yet!'; exit 1
  !NO!SUBS!

--- 151,158 -----
  	./makedepend
  
  # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
+ config.h: config.h.SH config.sh ; sh config.h.SH
+ Makefile: Makefile.SH config.sh ; sh Makefile.SH
  $(obj):
  	@ echo "You haven't done a "'"make depend" yet!'; exit 1
  !NO!SUBS!
Index: NEW
*** NEW	Fri Dec  6 23:49:55 1991
--- ../rn4.4.2/NEW	Sun Dec  1 12:13:55 1991
***************
*** 1,3
  		    NEW FEATURES OF RN 4.4 vs RN 4.3
  
  New or modified commands

--- 1,22 -----
+ 		    NEW FEATURES OF RN 4.4.2 vs RN 4.4
+ New % interpolation
+ 	%E		the last directory to which extracted files were
+ 			placed.
+ 
+ Configure improvements
+ 	Configure knows about AIX and can build a version of rn that works
+ 	correctly on AIX.
+ 	Configure is generally smarter about getting symbols out of various
+ 	type of archive files.
+ 	The server.h include file is now generated outside of Configure via
+ 	server.h.SH shell script.
+ 
+ General improvements
+ 	rn no longer incorrectly interprets a . in a header line as a meta-
+ 	character.
+ 	The memory management in the newrc array managment code is now much
+ 	better.
+ 
  		    NEW FEATURES OF RN 4.4 vs RN 4.3
  
  New or modified commands
Index: Pnews.SH
Prereq: 4.4
*** Pnews.SH	Fri Dec  6 23:49:31 1991
--- ../rn4.4.2/Pnews.SH	Sun Dec  1 12:07:40 1991
***************
*** 4,10
  echo "Extracting Pnews (with variable substitutions)"
  $spitshell >Pnews <<!GROK!THIS!
  $startsh
! # $Id: Pnews.SH,v 4.4 1991/09/09 20:18:23 sob Exp sob $
  #
  # $Log: Pnews.SH,v $
  # Revision 4.4  1991/09/09  20:18:23  sob

--- 4,10 -----
  echo "Extracting Pnews (with variable substitutions)"
  $spitshell >Pnews <<!GROK!THIS!
  $startsh
! # $Id: Pnews.SH,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  #
  # $Log: Pnews.SH,v $
  # Revision 4.4.2.1  1991/12/01  18:05:42  sob
***************
*** 7,12
  # $Id: Pnews.SH,v 4.4 1991/09/09 20:18:23 sob Exp sob $
  #
  # $Log: Pnews.SH,v $
  # Revision 4.4  1991/09/09  20:18:23  sob
  # release 4.4
  #

--- 7,15 -----
  # $Id: Pnews.SH,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  #
  # $Log: Pnews.SH,v $
+ # Revision 4.4.2.1  1991/12/01  18:05:42  sob
+ # Patchlevel 2
+ #
  # Revision 4.4  1991/09/09  20:18:23  sob
  # release 4.4
  #
***************
*** 638,645
  
  follow=""
  
! case $# in
! 0)
      title=h
      while $test "$title" = h ; do
  	$echo ""

--- 641,653 -----
  
  follow=""
  
! # LCP 16-Oct-91 Subject line is required.  Make it a little more
! # difficult to omit.  Added "while : ; do", ... "done", and "if"
! # at end of while loop.
! while :
! do
!   case $# in
!   0)
      title=h
      while $test "$title" = h ; do
  	$echo ""
***************
*** 658,664
  	esac
      done
      ;;
! *)
      title="$*"
      ;;
  esac

--- 666,672 -----
  	esac
      done
      ;;
!   *)
      title="$*"
      # LCP 16-Oct-91 Added "set" and "shift".  Must insure $# is 0
      # in case the title is all white space and we make another
***************
*** 660,665
      ;;
  *)
      title="$*"
      ;;
  esac
  

--- 668,678 -----
      ;;
    *)
      title="$*"
+     # LCP 16-Oct-91 Added "set" and "shift".  Must insure $# is 0
+     # in case the title is all white space and we make another
+     # pass thru this loop.
+     set X
+     shift
      ;;
    esac
    if expr "X$title" : "^X[    ]*$" > /dev/null 2>&1
***************
*** 661,667
  *)
      title="$*"
      ;;
! esac
  
  # now build a file with a header for them to edit
  

--- 674,692 -----
      set X
      shift
      ;;
!   esac
!   if expr "X$title" : "^X[    ]*$" > /dev/null 2>&1
!   then
!     $cat <<'EOH'
! 
! Articles without a "Subject:" line will not be accepted by the News
! system.  Please give a Title/Subject line for your article.
! EOH
!   else
!      break
!   fi
! done
! 
  
  # now build a file with a header for them to edit
  
Index: addng.c
Prereq: 4.4
*** addng.c	Fri Dec  6 23:49:52 1991
--- ../rn4.4.2/addng.c	Sun Dec  1 12:08:44 1991
***************
*** 1,4
! /* $Id: addng.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
   *
   * $Log: addng.c,v $
   * Revision 4.4  1991/09/09  20:18:23  sob

--- 1,4 -----
! /* $Id: addng.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   *
   * $Log: addng.c,v $
   * Revision 4.4.2.1  1991/12/01  18:05:42  sob
***************
*** 1,6
  /* $Id: addng.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
   *
   * $Log: addng.c,v $
   * Revision 4.4  1991/09/09  20:18:23  sob
   * release 4.4
   *

--- 1,9 -----
  /* $Id: addng.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   *
   * $Log: addng.c,v $
+  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
+  * Patchlevel 2 changes
+  *
   * Revision 4.4  1991/09/09  20:18:23  sob
   * release 4.4
   *
***************
*** 52,57
  {
      char *tmpname;
      register char *s, *status;
      long birthof();
  
      tmpname = savestr(filexp(RNEWNAME));

--- 55,61 -----
  {
      char *tmpname;
      register char *s, *status;
+     register NG_NUM ngnum;
      long birthof();
  
      tmpname = savestr(filexp(RNEWNAME));
***************
*** 77,82
  	        /* since = groups are refiling to another group, just
  		   ignore their existence */
  		continue;
  	    if (find_ng(buf) == nextrcline &&
  		    (checkinlist ?
  			(inlist(buf)) :

--- 81,87 -----
  	        /* since = groups are refiling to another group, just
  		   ignore their existence */
  		continue;
+ #ifdef OLD_ADD_METHOD
  	    if (find_ng(buf) == nextrcline &&
  		    (checkinlist ?
  			(inlist(buf)) :
***************
*** 82,87
  			(inlist(buf)) :
  			(birthof(buf,(ART_NUM)atol(s)) > lasttime)
  		    )
  		) {
  					/* if not in .newsrc and younger */
  					/* than the last time we checked */

--- 87,99 -----
  			(inlist(buf)) :
  			(birthof(buf,(ART_NUM)atol(s)) > lasttime)
  		    )
+ #else
+ 	    if (checkinlist ?
+ 		(inlist(buf) && ((ngnum = find_ng(buf)) == nextrcline
+ 				 || toread[ngnum] == TR_UNSUB))
+ 	      : (find_ng(buf) == nextrcline
+ 		 && birthof(buf,(ART_NUM)atol(s)) > lasttime)
+ #endif
  		) {
  					/* if not in .newsrc and younger */
  					/* than the last time we checked */
Index: art.c
Prereq: 4.4
*** art.c	Fri Dec  6 23:49:24 1991
--- ../rn4.4.2/art.c	Sun Dec  1 12:08:47 1991
***************
*** 1,4
! /* $Id: art.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
   *
   *
   * 

--- 1,4 -----
! /* $Id: art.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   *
   *
   * 
***************
*** 243,248
  		htype[SUBJ_LINE].ht_flags & HT_MAGIC) {
  			    /* is this the subject? */
  		int length;
  
  		length = strlen(art_buf)-1;
  		artline++;

--- 243,249 -----
  		htype[SUBJ_LINE].ht_flags & HT_MAGIC) {
  			    /* is this the subject? */
  		int length;
+ 		char sp;
  
  		length = strlen(art_buf)-1;
  		artline++;
***************
*** 262,269
  		    vwtary(artline,vrdary(artline-1)+COLS);
  		    artline++;
  		}
- 		s = art_buf + 8;
- 		*s++ = '\0';	/* make into 2 strings */
  #ifdef CLEAREOL
  		maybe_eol();	
  #endif /* CLEAREOL */

--- 263,268 -----
  		    vwtary(artline,vrdary(artline-1)+COLS);
  		    artline++;
  		}
  #ifdef CLEAREOL
  		maybe_eol();	
  #endif /* CLEAREOL */
***************
*** 267,274
  #ifdef CLEAREOL
  		maybe_eol();	
  #endif /* CLEAREOL */
! 		fputs(art_buf,stdout) FLUSH;
! 				/* print up through : */
  		if (!UG)
  		    putchar(' ');
  		underprint(s);	/* print subject underlined */

--- 266,290 -----
  #ifdef CLEAREOL
  		maybe_eol();	
  #endif /* CLEAREOL */
! 		/* Find the point where the subject text starts. */
! 		s = art_buf;
! 		if (!isspace(*s)) {
! 		    /* This is the first subject line, not a continuation
! 		       line.  Skip past the "Subject:" */
! 		    s += 8;
! 		}
! 		/* Skip past any whitespace. */
! 		while (isspace(*s)) ++s;
! 
! 		/* Split the string in two at the whitespace. */
! 		sp = *(s-1);
! 		*(s-1) = '\0';
! 
! 		fputs(art_buf, stdout) FLUSH;
! 
! 		/* On an UGly terminal, the start-underline magic cookie
! 		   takes up space, so we steal a space from the subject
! 		   line.  This is not quite right for tabs; oh well. */
  		if (!UG)
  		    putchar(sp);
  
***************
*** 270,276
  		fputs(art_buf,stdout) FLUSH;
  				/* print up through : */
  		if (!UG)
! 		    putchar(' ');
  		underprint(s);	/* print subject underlined */
  		putchar('\n') FLUSH;	/* and finish the line */
  	    }

--- 286,293 -----
  		   takes up space, so we steal a space from the subject
  		   line.  This is not quite right for tabs; oh well. */
  		if (!UG)
! 		    putchar(sp);
! 
  		underprint(s);	/* print subject underlined */
  		putchar('\n') FLUSH;	/* and finish the line */
  	    }
Index: artsrch.c
Prereq: 4.4
*** artsrch.c	Fri Dec  6 23:49:45 1991
--- ../rn4.4.2/artsrch.c	Sun Dec  1 12:08:58 1991
***************
*** 1,4
! /* $Id: artsrch.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
   *
   * $Log: artsrch.c,v $
   * Revision 4.4  1991/09/09  20:18:23  sob

--- 1,4 -----
! /* $Id: artsrch.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   *
   * $Log: artsrch.c,v $
   * Revision 4.4.2.1  1991/12/01  18:05:42  sob
***************
*** 1,6
  /* $Id: artsrch.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
   *
   * $Log: artsrch.c,v $
   * Revision 4.4  1991/09/09  20:18:23  sob
   * release 4.4
   *

--- 1,9 -----
  /* $Id: artsrch.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   *
   * $Log: artsrch.c,v $
+  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
+  * Patchlevel 2 changes
+  *
   * Revision 4.4  1991/09/09  20:18:23  sob
   * release 4.4
   *
***************
*** 133,139
  	pattern = patbuf+1;
  	strcpy(pattern,": *");
  	h = pattern + strlen(pattern);
! 	interp(h,patbufsiz - (h-patbuf),"%s");	/* fetch current subject */
  	if (cmdchr == 'K') {
  	    saltaway = TRUE;
  	    cmdchr = 'k';

--- 136,142 -----
  	pattern = patbuf+1;
  	strcpy(pattern,": *");
  	h = pattern + strlen(pattern);
! 	interp(h,patbufsiz - (h-patbuf),"%\\s");  /* fetch current subject */
  	if (cmdchr == 'K') {
  	    saltaway = TRUE;
  	    cmdchr = 'k';
***************
*** 160,171
  	}
  	else if (!srchahead)
  	    srchahead = -1;
! 	h[24] = '\0';		/* compensate for notesfiles */
! 	while (*h) {
! 	    if (index("/\\[.^*$'\"",*h) != Nullch)
! 		*h++ = '.';
! 	    else
! 		h++;
  	}
  #ifdef DEBUGGING
  	if (debug) {

--- 163,174 -----
  	}
  	else if (!srchahead)
  	    srchahead = -1;
! 	{			/* compensate for notesfiles */
! 	    register int i;
! 	    for (i = 24; *h && i--; h++)
! 		if (*h == '\\')
! 		    h++;
! 	    *h = '\0';
  	}
  #ifdef DEBUGGING
  	if (debug) {
Index: cheat.c
Prereq: 4.4
*** cheat.c	Fri Dec  6 23:49:56 1991
--- ../rn4.4.2/cheat.c	Sun Dec  1 12:09:09 1991
***************
*** 1,4
! /* $Id: cheat.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
   *
   * $Log: cheat.c,v $
   * Revision 4.4  1991/09/09  20:18:23  sob

--- 1,4 -----
! /* $Id: cheat.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   *
   * $Log: cheat.c,v $
   * Revision 4.4.2.1  1991/12/01  18:05:42  sob
***************
*** 1,6
  /* $Id: cheat.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
   *
   * $Log: cheat.c,v $
   * Revision 4.4  1991/09/09  20:18:23  sob
   * release 4.4
   *

--- 1,9 -----
  /* $Id: cheat.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   *
   * $Log: cheat.c,v $
+  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
+  * Patchlevel 2 changes
+  *
   * Revision 4.4  1991/09/09  20:18:23  sob
   * release 4.4
   *
***************
*** 66,78
  	pattern = buf+1;
  	strcpy(pattern,": *");
  	h = pattern + strlen(pattern);
! 	interp(h,(sizeof buf) - (h-buf),"%s");
! 	h[24] = '\0';		/* compensate for notesfiles */
! 	while (*h) {
! 	    if (index("\\[.^*$'\"",*h) != Nullch)
! 		*h++ = '.';
! 	    else
! 		h++;
  	}
  #ifdef DEBUGGING
  	if (debug & DEB_SEARCH_AHEAD) {

--- 69,81 -----
  	pattern = buf+1;
  	strcpy(pattern,": *");
  	h = pattern + strlen(pattern);
! 	interp(h,(sizeof buf) - (h-buf),"%\\s");
! 	{			/* compensate for notesfiles */
! 	    register int i;
! 	    for (i = 24; *h && i--; h++)
! 		if (*h == '\\')
! 		    h++;
! 	    *h = '\0';
  	}
  #ifdef DEBUGGING
  	if (debug & DEB_SEARCH_AHEAD) {
Index: common.h
Prereq: 4.4
*** common.h	Fri Dec  6 23:49:10 1991
--- ../rn4.4.2/common.h	Sun Dec  1 12:10:08 1991
***************
*** 1,4
! /* $Id: common.h,v 4.4 1991/09/09 20:18:23 sob Exp sob $
   * 
   * $Log: common.h,v $
   * Revision 4.4  1991/09/09  20:18:23  sob

--- 1,4 -----
! /* $Id: common.h,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   * 
   * $Log: common.h,v $
   * Revision 4.4.2.1  1991/12/01  18:05:42  sob
***************
*** 1,6
  /* $Id: common.h,v 4.4 1991/09/09 20:18:23 sob Exp sob $
   * 
   * $Log: common.h,v $
   * Revision 4.4  1991/09/09  20:18:23  sob
   * release 4.4
   *

--- 1,9 -----
  /* $Id: common.h,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   * 
   * $Log: common.h,v $
+  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
+  * Patchlevel 2 changes
+  *
   * Revision 4.4  1991/09/09  20:18:23  sob
   * release 4.4
   *
***************
*** 135,140
   *	%C	Current newsgroup, dot form
   *	%d	%P/%c
   *	%D	Old Distribution: line
   *	%f	Old From: line or Reply-To: line
   *	%F	Newsgroups to followup to from Newsgroups: and Followup-To:
   *	%h	Name of header file to pass to mail or news poster

--- 138,145 -----
   *	%C	Current newsgroup, dot form
   *	%d	%P/%c
   *	%D	Old Distribution: line
+  *	%e	Extract program
+  *	%E	Extract destination directory
   *	%f	Old From: line or Reply-To: line
   *	%F	Newsgroups to followup to from Newsgroups: and Followup-To:
   *	%h	Name of header file to pass to mail or news poster
***************
*** 163,168
   *	%z	Size of current article in bytes.
   *	%~	Home directory
   *	%.	Directory containing . files
   *	%$	current process number
   *	%{name} Environment variable "name".  %{name-default} form allowed.
   *	%[name]	Header line beginning with "Name: ", without "Name: " 

--- 168,174 -----
   *	%z	Size of current article in bytes.
   *	%~	Home directory
   *	%.	Directory containing . files
+  *	%#	count of articles saved in current command (from 1 to n)
   *	%$	current process number
   *	%{name} Environment variable "name".  %{name-default} form allowed.
   *	%[name]	Header line beginning with "Name: ", without "Name: " 
Index: config.h.SH
Prereq: 4.4
*** config.h.SH	Fri Dec  6 23:49:47 1991
--- ../rn4.4.2/config.h.SH	Sun Dec  1 12:08:04 1991
***************
*** 1,30
  : create config.h file
  echo "Extracting config.h (with variable substitutions)"
  . ./config.sh
! case "$strchr" in
! define)	strchr='';;
! *)	strchr='/*';;
! esac
! case "$memcpy" in
! define)	memcpy='';;
! *)	memcpy='/*';;
! esac
! case "$novoid" in
! define)	novoid='';;
! *)	novoid='/*';;
! esac
! case "$novfork" in
! define)	novfork='';;
! *)	novfork='/*';;
! esac
! case "$phostname" in
! define)	phostname='';;
! *)	phostname='/*';;
! esac
! case "$isrrn" in
! define)	isrrn2='';;
! *)	isrrn2='/*';;
! esac
  case "$hostfile" in
  '')	usehostfile='/*';;
  *)	usehostfile='';;

--- 1,7 -----
  : create config.h file
  echo "Extracting config.h (with variable substitutions)"
  . ./config.sh
! 
  case "$hostfile" in
  '')	usehostfile='undef';;
  *)	usehostfile='define';;
***************
*** 26,33
  *)	isrrn2='/*';;
  esac
  case "$hostfile" in
! '')	usehostfile='/*';;
! *)	usehostfile='';;
  esac
  $cat <<EOT >config.h
  /* config.h

--- 3,10 -----
  . ./config.sh
  
  case "$hostfile" in
! '')	usehostfile='undef';;
! *)	usehostfile='define';;
  esac
  
  $sed 's,^#undef,/*#undef,' >config.h <<EOT
***************
*** 29,35
  '')	usehostfile='/*';;
  *)	usehostfile='';;
  esac
! $cat <<EOT >config.h
  /* config.h
   * This file was produced by running the config.h.SH script, which
   * gets its values from config.sh, which is generally produced by

--- 6,13 -----
  '')	usehostfile='undef';;
  *)	usehostfile='define';;
  esac
! 
! $sed 's,^#undef,/*#undef,' >config.h <<EOT
  /* config.h
   * This file was produced by running the config.h.SH script, which
   * gets its values from config.sh, which is generally produced by
***************
*** 38,44
   * Feel free to modify any of this as the need arises.  Note, however,
   * that running config.h.SH again will wipe out any changes you've made.
   * For a more permanent change edit config.sh and rerun config.h.SH.
!  * $Id: config.h.SH,v 4.4 1991/09/09 20:18:23 sob Exp sob $
   *
   * $Log: config.h.SH,v $
  # Revision 4.4  1991/09/09  20:18:23  sob

--- 16,22 -----
   * Feel free to modify any of this as the need arises.  Note, however,
   * that running config.h.SH again will wipe out any changes you've made.
   * For a more permanent change edit config.sh and rerun config.h.SH.
!  * $Id: config.h.SH,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   *
   * $Log: config.h.SH,v $
  # Revision 4.4.2.1  1991/12/01  18:05:42  sob
***************
*** 41,46
   * $Id: config.h.SH,v 4.4 1991/09/09 20:18:23 sob Exp sob $
   *
   * $Log: config.h.SH,v $
  # Revision 4.4  1991/09/09  20:18:23  sob
  # release 4.4
  #

--- 19,27 -----
   * $Id: config.h.SH,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   *
   * $Log: config.h.SH,v $
+ # Revision 4.4.2.1  1991/12/01  18:05:42  sob
+ # Fixed problems with CTRLA flag.
+ #
  # Revision 4.4  1991/09/09  20:18:23  sob
  # release 4.4
  #
***************
*** 62,68
  
  /* name of the site.  May be overridden by HOSTFILE, gethostname, uname, etc. */
  #define SITENAME "$sitename"
! $usehostfile#define HOSTFILE "$hostfile"
  
  /* domain name for the site */
  #define OURDOMAIN "$domain"

--- 43,49 -----
  
  /* name of the site.  May be overridden by HOSTFILE, gethostname, uname, etc. */
  #define SITENAME "$sitename"
! #$usehostfile HOSTFILE "$hostfile"	/* */
  
  /* domain name for the site */
  #define OURDOMAIN "$domain"
***************
*** 112,121
  #define CONTDIST "$contpref"
  
  
! $strchr#define index   strchr	/* cultural */
! $strchr#define rindex  strrchr	/*  differences? */
! $memcpy#define bcopy(s,d,n)	memcpy((char*)d,(char*)s,(int)n)	/* Different */
! $memcpy#define bzero(d,n)	memset((char*)d,0,(int)n)		/*  flavors. */
  #$rename	RENAME		/* is rename() a system call? */
  #$truncate	TRUNCATE	/* is truncate() available? */
  #$chsize	CHSIZE		/* is chsize() available? */

--- 93,102 -----
  #define CONTDIST "$contpref"
  
  
! #$strchr index   strchr	/* cultural */
! #$strchr rindex  strrchr	/*  differences? */
! #$memcpy bcopy(s,d,n)	memcpy((char*)d,(char*)s,(int)n)	/* Different */
! #$memcpy bzero(d,n)	memset((char*)d,0,(int)n)		/*  flavors. */
  #$rename	RENAME		/* is rename() a system call? */
  #$truncate	TRUNCATE	/* is truncate() available? */
  #$chsize	CHSIZE		/* is chsize() available? */
***************
*** 120,127
  #$truncate	TRUNCATE	/* is truncate() available? */
  #$chsize	CHSIZE		/* is chsize() available? */
  #$tzset	TZSET		/* modern timezone functions? */
! $novoid#define void int	/* is void to be avoided? */
! $novfork#define vfork fork	/* is vfork too virtual? */
  #$sunos4	SUNOS4		/* running SunOS 4.X? */
  #$eunice	EUNICE		/* no linking? */
  #$eunice	VMS		/* not currently used, here just in case */

--- 101,108 -----
  #$truncate	TRUNCATE	/* is truncate() available? */
  #$chsize	CHSIZE		/* is chsize() available? */
  #$tzset	TZSET		/* modern timezone functions? */
! #$novoid void int	/* is void to be avoided? */
! #$novfork vfork fork	/* is vfork too virtual? */
  #$sunos4	SUNOS4		/* running SunOS 4.X? */
  #$eunice	EUNICE		/* no linking? */
  #$eunice	VMS		/* not currently used, here just in case */
***************
*** 157,163
  #$internet	INTERNET	/* does our mailer do INTERNET addressing? */
  #$gethostname	GETHOSTNAME	/* do we have a gethostname function? */
  #$douname	DOUNAME		/* do we have a uname function? */
! $phostname#define PHOSTNAME "$hostcmd"	/* how to get host name with popen */
  #$norelay	NORELAY		/* 2.10.3 doesn't have Relay-Version line */
  #$isrrn	SERVER		/* rrn server code */
  $isrrn2#define SERVER_FILE	"$serverfile"	/* news server file */

--- 138,144 -----
  #$internet	INTERNET	/* does our mailer do INTERNET addressing? */
  #$gethostname	GETHOSTNAME	/* do we have a gethostname function? */
  #$douname	DOUNAME		/* do we have a uname function? */
! #$phostname	PHOSTNAME "$hostcmd"	/* how to get host name with popen */
  #$norelay	NORELAY		/* 2.10.3 doesn't have Relay-Version line */
  #$isrrn	SERVER		/* rrn server code */
  #$isrrn	SERVER_FILE	"$serverfile"	/* news server file */
***************
*** 160,164
  $phostname#define PHOSTNAME "$hostcmd"	/* how to get host name with popen */
  #$norelay	NORELAY		/* 2.10.3 doesn't have Relay-Version line */
  #$isrrn	SERVER		/* rrn server code */
! $isrrn2#define SERVER_FILE	"$serverfile"	/* news server file */
  EOT

--- 141,145 -----
  #$phostname	PHOSTNAME "$hostcmd"	/* how to get host name with popen */
  #$norelay	NORELAY		/* 2.10.3 doesn't have Relay-Version line */
  #$isrrn	SERVER		/* rrn server code */
! #$isrrn	SERVER_FILE	"$serverfile"	/* news server file */
  EOT
Index: final.c
Prereq: 4.4
*** final.c	Fri Dec  6 23:49:48 1991
--- ../rn4.4.2/final.c	Sun Dec  1 12:09:11 1991
***************
*** 1,4
! /* $Id: final.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
   *
   * $Log: final.c,v $
   * Revision 4.4  1991/09/09  20:18:23  sob

--- 1,4 -----
! /* $Id: final.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   *
   * $Log: final.c,v $
   * Revision 4.4.2.1  1991/12/01  18:05:42  sob
***************
*** 1,6
  /* $Id: final.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
   *
   * $Log: final.c,v $
   * Revision 4.4  1991/09/09  20:18:23  sob
   * release 4.4
   *

--- 1,9 -----
  /* $Id: final.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   *
   * $Log: final.c,v $
+  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
+  * Patchlevel 2 changes
+  *
   * Revision 4.4  1991/09/09  20:18:23  sob
   * release 4.4
   *
***************
*** 81,89
  finalize(status)
  int status;
  {
- #ifdef SERVER
-     char artname[MAXFILENAME];
- #endif /* SERVER */
      termlib_reset();
      if (bizarre)
  	resetty();

--- 84,89 -----
  finalize(status)
  int status;
  {
      termlib_reset();
      if (bizarre)
  	resetty();
Index: help.c
Prereq: 4.4
*** help.c	Fri Dec  6 23:49:34 1991
--- ../rn4.4.2/help.c	Sun Dec  1 12:09:16 1991
***************
*** 1,4
! /* $Id: help.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
   *
   * $Log: help.c,v $
   * Revision 4.4  1991/09/09  20:18:23  sob

--- 1,4 -----
! /* $Id: help.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   *
   * $Log: help.c,v $
   * Revision 4.4.2.1  1991/12/01  18:05:42  sob
***************
*** 1,6
  /* $Id: help.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
   *
   * $Log: help.c,v $
   * Revision 4.4  1991/09/09  20:18:23  sob
   * release 4.4
   *

--- 1,9 -----
  /* $Id: help.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   *
   * $Log: help.c,v $
+  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
+  * Patchlevel 2 changes
+  *
   * Revision 4.4  1991/09/09  20:18:23  sob
   * release 4.4
   *
***************
*** 288,295
  d	Full name of newsgroup directory (%P/%c)\n\
  D	Distribution line from current article\n\
  e	The last command executed to extract data from an article\n\
! E	The number of extra (unselected) articles, not counting the current\n\
! 	one if it is unselected\n\
  ",NOMARKING)) ||
      (cmd = print_lines("\
  f	Who the current article is from\n\

--- 291,297 -----
  d	Full name of newsgroup directory (%P/%c)\n\
  D	Distribution line from current article\n\
  e	The last command executed to extract data from an article\n\
! E	The last extraction directory\n\
  ",NOMARKING)) ||
      (cmd = print_lines("\
  f	Who the current article is from\n\
***************
*** 328,335
  t	New To line derived from From and Reply-To (Internet format)\n\
  T	New To line derived from Path\n\
  u	Number of unread articles\n\
! U	Number of unread articles not counting the current article (when\n\
! 	threads are selected, the count only reflects selected articles)\n\
  x	News library directory\n\
  X	Rn library directory\n\
  z	Length of current article in bytes\n\

--- 330,336 -----
  t	New To line derived from From and Reply-To (Internet format)\n\
  T	New To line derived from Path\n\
  u	Number of unread articles\n\
! U	Number of unread articles not counting the current article\n\
  x	News library directory\n\
  X	Rn library directory\n\
  z	Length of current article in bytes\n\
***************
*** 333,339
  x	News library directory\n\
  X	Rn library directory\n\
  z	Length of current article in bytes\n\
- Z	Number of selected threads\n\
  ",NOMARKING)) ||
      (cmd = print_lines("\
  ~	Your home directory\n\

--- 334,339 -----
  x	News library directory\n\
  X	Rn library directory\n\
  z	Length of current article in bytes\n\
  ",NOMARKING)) ||
      (cmd = print_lines("\
  ~	Your home directory\n\
***************
*** 338,344
      (cmd = print_lines("\
  ~	Your home directory\n\
  .	Directory containing . files\n\
! #	A counter in multiple-article commands\n\
  $	Current process number\n\
  /	Last search string\n\
  ESC	Run preceding command through % interpretation\n\

--- 338,344 -----
      (cmd = print_lines("\
  ~	Your home directory\n\
  .	Directory containing . files\n\
! #	A counter in multi-article saves\n\
  $	Current process number\n\
  /	Last search string\n\
  ESC	Run preceding command through % interpretation\n\
Index: intrp.c
Prereq: 4.4
*** intrp.c	Fri Dec  6 23:49:15 1991
--- ../rn4.4.2/intrp.c	Sun Dec  1 12:09:20 1991
***************
*** 1,4
! /* $Id: intrp.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
   *
   * $Log: intrp.c,v $
   * Revision 4.4  1991/09/09  20:18:23  sob

--- 1,4 -----
! /* $Id: intrp.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   *
   * $Log: intrp.c,v $
   * Revision 4.4.2.1  1991/12/01  18:05:42  sob
***************
*** 1,6
  /* $Id: intrp.c,v 4.4 1991/09/09 20:18:23 sob Exp sob $
   *
   * $Log: intrp.c,v $
   * Revision 4.4  1991/09/09  20:18:23  sob
   * release 4.4
   *

--- 1,9 -----
  /* $Id: intrp.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   *
   * $Log: intrp.c,v $
+  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
+  * Patchlevel 2 changes
+  *
   * Revision 4.4  1991/09/09  20:18:23  sob
   * release 4.4
   *
***************
*** 36,41
  #include "INTERN.h"
  #include "intrp.h"
  
  char orgname[] = ORGNAME;
  
  /* name of this site */

--- 39,46 -----
  #include "INTERN.h"
  #include "intrp.h"
  
+ static char * regexp_specials = "^$.*[\\/?";
+ 
  char orgname[] = ORGNAME;
  
  /* name of this site */
***************
*** 139,145
      /* get the real name of the person (%N) */
      /* Must be done after logname is read in because BERKNAMES uses that */
  
!     strcpy(tcbuf,getrealname(getuid()));
      realname = savestr(tcbuf);
  
      /* name of header file (%h) */

--- 144,150 -----
      /* get the real name of the person (%N) */
      /* Must be done after logname is read in because BERKNAMES uses that */
  
!     strcpy(tcbuf,getrealname((long)getuid()));
      realname = savestr(tcbuf);
  
      /* name of header file (%h) */
***************
*** 248,254
  		tildename = savestr(scrbuf);
  #ifdef GETPWENT		/* getpwnam() is not the paragon of efficiency */
  		{
! 		    struct passwd *getpwnam();
  		    struct passwd *pwd = getpwnam(tildename);
  		    if ( pwd == NULL){
  			printf("%s is an unknown user",tildename) FLUSH;

--- 253,261 -----
  		tildename = savestr(scrbuf);
  #ifdef GETPWENT		/* getpwnam() is not the paragon of efficiency */
  		{
! #ifdef notdef
! 		    struct passwd *getpwnam ANSI((char*));
! #endif
  		    struct passwd *pwd = getpwnam(tildename);
  		    if ( pwd == NULL){
  			printf("%s is an unknown user. Using default.\n",tildename) FLUSH;
***************
*** 251,258
  		    struct passwd *getpwnam();
  		    struct passwd *pwd = getpwnam(tildename);
  		    if ( pwd == NULL){
! 			printf("%s is an unknown user",tildename) FLUSH;
! 			sig_catcher(0);
  		    }
  		    sprintf(scrbuf,"%s%s",pwd->pw_dir,s);
  		    tildedir = savestr(pwd->pw_dir);

--- 258,265 -----
  #endif
  		    struct passwd *pwd = getpwnam(tildename);
  		    if ( pwd == NULL){
! 			printf("%s is an unknown user. Using default.\n",tildename) FLUSH;
! 			return(Nullch);
  		    }
  		    sprintf(scrbuf,"%s%s",pwd->pw_dir,s);
  		    tildedir = savestr(pwd->pw_dir);
***************
*** 428,433
      char scrbuf[512];
      bool upper = FALSE;
      bool lastcomp = FALSE;
      int metabit = 0;
  
      while (*pattern && (!stoppers || !index(stoppers,*pattern))) {

--- 435,441 -----
      char scrbuf[512];
      bool upper = FALSE;
      bool lastcomp = FALSE;
+     bool re_quote = FALSE;
      int metabit = 0;
  
      while (*pattern && (!stoppers || !index(stoppers,*pattern))) {
***************
*** 438,443
  	if (*pattern == '%' && pattern[1]) {
  	    upper = FALSE;
  	    lastcomp = FALSE;
  	    for (s=Nullch; !s; ) {
  		switch (*++pattern) {
  		case '^':

--- 446,452 -----
  	if (*pattern == '%' && pattern[1]) {
  	    upper = FALSE;
  	    lastcomp = FALSE;
+ 	    re_quote = FALSE;
  	    for (s=Nullch; !s; ) {
  		switch (*++pattern) {
  		case '^':
***************
*** 446,451
  		case '_':
  		    lastcomp = TRUE;
  		    break;
  		case '/':
  #ifdef ARTSRCH
  		    s = scrbuf;

--- 455,463 -----
  		case '_':
  		    lastcomp = TRUE;
  		    break;
+ 		case '\\':
+ 		    re_quote = TRUE;
+ 		    break;
  		case '/':
  #ifdef ARTSRCH
  		    s = scrbuf;
***************
*** 630,635
  		case 'e':
  		    s = (extractprog ? extractprog : "-");
  		    break;
  		case 'f':			/* from line */
  #ifdef ASYNC_PARSE
  		    parse_maybe(art);

--- 642,650 -----
  		case 'e':
  		    s = (extractprog ? extractprog : "-");
  		    break;
+ 		case 'E':
+ 		    s = extractdest;
+ 		    break;
  		case 'f':			/* from line */
  #ifdef ASYNC_PARSE
  		    parse_maybe(art);
***************
*** 878,889
  		if (islower(*t))
  		    *t = toupper(*t);
  	    }
! 	    i = metabit;		/* maybe get into register */
! 	    if (s == dest) {
! 		while (*dest) {
! 		    if (--destsize <= 0)
! 			abort_interp();
! 		    *dest++ |= i;
  		}
  	    }
  	    else {

--- 893,914 -----
  		if (islower(*t))
  		    *t = toupper(*t);
  	    }
! 	    /* Do we have room left? */
! 	    i = strlen(s);
! 	    if (destsize <= i)
! 		abort_interp();
! 	    destsize -= i;	/* adjust the size now. */
! 
! 	    /* A maze of twisty little conditions, all alike... */
! 	    if (metabit) {
! 		/* set meta bit while copying. */
! 		i = metabit;		/* maybe get into register */
! 		if (s == dest) {
! 		    while (*dest)
! 			*dest++ |= i;
! 		} else {
! 		    while (*s)
! 			*dest++ = *s++ | i;
  		}
  
  	    } else if (re_quote) {
***************
*** 885,892
  			abort_interp();
  		    *dest++ |= i;
  		}
! 	    }
! 	    else {
  		while (*s) {
  		    if (--destsize <= 0)
  			abort_interp();

--- 910,925 -----
  		    while (*s)
  			*dest++ = *s++ | i;
  		}
! 
! 	    } else if (re_quote) {
! 		/* put a backslash before regexp specials while copying. */
! 		if (s == dest) {
! 		    /* copy out so we can copy in. */
! 		    safecpy(scrbuf, s, sizeof scrbuf);
! 		    s = scrbuf;
! 		    if (i > sizeof scrbuf)	/* we truncated, ack! */
! 			destsize += i - sizeof scrbuf;
! 		}
  		while (*s) {
  		    if (index(regexp_specials, *s)) {
  			if (--destsize <= 0)
***************
*** 888,896
  	    }
  	    else {
  		while (*s) {
! 		    if (--destsize <= 0)
! 			abort_interp();
! 		    *dest++ = *s++ | i;
  		}
  	    }
  	}

--- 921,932 -----
  			destsize += i - sizeof scrbuf;
  		}
  		while (*s) {
! 		    if (index(regexp_specials, *s)) {
! 			if (--destsize <= 0)
! 			    abort_interp();
! 			*dest++ = '\\';
! 		    }
! 		    *dest++ = *s++;
  		}
  
  	    } else {
***************
*** 892,897
  			abort_interp();
  		    *dest++ = *s++ | i;
  		}
  	    }
  	}
  	else {

--- 928,942 -----
  		    }
  		    *dest++ = *s++;
  		}
+ 
+ 	    } else {
+ 		/* straight copy. */
+ 		if (s == dest) {
+ 		    dest += i;
+ 		} else {
+ 		    while (*s)
+ 			*dest++ = *s++;
+ 		}
  	    }
  	}
  	else {
***************
*** 1046,1052
  
  char *
  getrealname(uid)
! int uid;
  {
      char *s, *c;
      char tmpbuf[512];

--- 1091,1097 -----
  
  char *
  getrealname(uid)
! long uid;
  {
      char *s, *c;
      char tmpbuf[512];
***************
*** 1050,1056
  {
      char *s, *c;
      char tmpbuf[512];
- 
  #ifdef PASSNAMES
  #ifdef GETPWENT
  #ifndef convex

--- 1095,1100 -----
  {
      char *s, *c;
      char tmpbuf[512];
  #ifdef PASSNAMES
  #ifdef GETPWENT
  #ifdef notdef
***************
*** 1053,1060
  
  #ifdef PASSNAMES
  #ifdef GETPWENT
! #ifndef convex
!     struct passwd *getpwuid();
  #endif
      struct passwd *pwd = getpwuid(uid);
      

--- 1097,1104 -----
      char tmpbuf[512];
  #ifdef PASSNAMES
  #ifdef GETPWENT
! #ifdef notdef
!     struct passwd *getpwuid ANSI((uid_t));
  #endif
      struct passwd *pwd = getpwuid(uid);
      
***************
*** 1061,1067
      s = pwd->pw_gecos;
  #else
      int i;
- 
      getpw(uid, tmpbuf);
      for (s=tmpbuf, i=GCOSFIELD-1; i; i--) {
  	if (s)

--- 1105,1110 -----
      s = pwd->pw_gecos;
  #else
      int i;
      getpw(uid, tmpbuf);
      for (s=tmpbuf, i=GCOSFIELD-1; i; i--) {
  	if (s)
Index: intrp.h
Prereq: 4.4
*** intrp.h	Fri Dec  6 23:50:08 1991
--- ../rn4.4.2/intrp.h	Sun Dec  1 12:10:23 1991
***************
*** 1,4
! /* $Id: intrp.h,v 4.4 1991/09/09 20:18:23 sob Exp sob $
   *
   * $Log: intrp.h,v $
   * Revision 4.4  1991/09/09  20:18:23  sob

--- 1,4 -----
! /* $Id: intrp.h,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   *
   * $Log: intrp.h,v $
   * Revision 4.4.2.1  1991/12/01  18:05:42  sob
***************
*** 1,6
  /* $Id: intrp.h,v 4.4 1991/09/09 20:18:23 sob Exp sob $
   *
   * $Log: intrp.h,v $
   * Revision 4.4  1991/09/09  20:18:23  sob
   * release 4.4
   *

--- 1,9 -----
  /* $Id: intrp.h,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   *
   * $Log: intrp.h,v $
+  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
+  * Patchlevel 2 changes
+  *
   * Revision 4.4  1991/09/09  20:18:23  sob
   * release 4.4
   *
***************
*** 39,42
  char	*dointerp ANSI((char *,int,char *,char *));
  void	interp ANSI((char *,int,char *));
  void	refscpy ANSI((char *,int,char *));
! char	*getrealname ANSI((int));

--- 42,45 -----
  char	*dointerp ANSI((char *,int,char *,char *));
  void	interp ANSI((char *,int,char *));
  void	refscpy ANSI((char *,int,char *));
! char	*getrealname ANSI((long));
Index: newsetup.SH
Prereq: 4.4.1.1
*** newsetup.SH	Fri Dec  6 23:49:56 1991
--- ../rn4.4.2/newsetup.SH	Sun Dec  1 12:08:17 1991
***************
*** 5,11
  $spitshell >newsetup <<!GROK!THIS!
  $startsh
  #
! # $Id: newsetup.SH,v 4.4.1.1 1991/09/25 19:38:08 sob Exp sob $
  # 
  # $Log: newsetup.SH,v $
  # Revision 4.4.1.1  1991/09/25  19:38:08  sob

--- 5,11 -----
  $spitshell >newsetup <<!GROK!THIS!
  $startsh
  #
! # $Id: newsetup.SH,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  # 
  # $Log: newsetup.SH,v $
  # Revision 4.4.2.1  1991/12/01  18:05:42  sob
***************
*** 8,13
  # $Id: newsetup.SH,v 4.4.1.1 1991/09/25 19:38:08 sob Exp sob $
  # 
  # $Log: newsetup.SH,v $
  # Revision 4.4.1.1  1991/09/25  19:38:08  sob
  # various fixed
  #

--- 8,19 -----
  # $Id: newsetup.SH,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  # 
  # $Log: newsetup.SH,v $
+ # Revision 4.4.2.1  1991/12/01  18:05:42  sob
+ # Fixed problems with CTRLA flag.
+ #
+ # Revision 4.4.1.2  1991/11/09  20:54:14  sob
+ # Changes from eggert@twinsun.com to get rid of old code.
+ #
  # Revision 4.4.1.1  1991/09/25  19:38:08  sob
  # various fixed
  #
***************
*** 102,111
  ' >\$newsrc
  
  #NNTP$rm -f \$active
- $rm -f /tmp/n.misc\$\$ /tmp/n.sci\$\$ /tmp/n.soc\$\$ /tmp/n.news\$\$ /tmp/n.comp\$\$
- $rm -f /tmp/n.\$cont\$\$ /tmp/n.\$city\$\$ /tmp/n.\$cntry\$\$ /tmp/n.\$state\$\$
- $rm -f /tmp/n.to\$\$ /tmp/n.\$organization\$\$ /tmp/n.\$locorg\$\$ /tmp/n.test\$\$
- $rm -f /tmp/n.tmp\$\$ /tmp/n.local\$\$ /tmp/n.rec\$\$
  
  $cat <<'EOH'
  Done.

--- 108,113 -----
  ' >\$newsrc
  
  #NNTP$rm -f \$active
  
  $cat <<'EOH'
  Done.
Index: newsgroups.SH
Prereq: 4.4.1.1
*** newsgroups.SH	Fri Dec  6 23:49:57 1991
--- ../rn4.4.2/newsgroups.SH	Sun Dec  1 12:08:33 1991
***************
*** 4,10
  echo "Extracting newsgroups (with variable substitutions)"
  $spitshell >newsgroups <<!GROK!THIS!
  $startsh
! # $Id: newsgroups.SH,v 4.4.1.1 1991/09/25 19:38:08 sob Exp sob $
  # 
  # $Log: newsgroups.SH,v $
  # Revision 4.4.1.1  1991/09/25  19:38:08  sob

--- 4,10 -----
  echo "Extracting newsgroups (with variable substitutions)"
  $spitshell >newsgroups <<!GROK!THIS!
  $startsh
! # $Id: newsgroups.SH,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  # 
  # $Log: newsgroups.SH,v $
  # Revision 4.4.2.1  1991/12/01  18:05:42  sob
***************
*** 7,12
  # $Id: newsgroups.SH,v 4.4.1.1 1991/09/25 19:38:08 sob Exp sob $
  # 
  # $Log: newsgroups.SH,v $
  # Revision 4.4.1.1  1991/09/25  19:38:08  sob
  # various fixed
  #

--- 7,15 -----
  # $Id: newsgroups.SH,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  # 
  # $Log: newsgroups.SH,v $
+ # Revision 4.4.2.1  1991/12/01  18:05:42  sob
+ # Patchlevel 2 changes
+ #
  # Revision 4.4.1.1  1991/09/25  19:38:08  sob
  # various fixed
  #
Index: ngdata.c
Prereq: 4.4.1.1
*** ngdata.c	Fri Dec  6 23:49:39 1991
--- ../rn4.4.2/ngdata.c	Sun Dec  1 12:09:28 1991
***************
*** 1,4
! /* $Id: ngdata.c,v 4.4.1.1 1991/09/25 19:38:08 sob Exp sob $
   *
   * $Log: ngdata.c,v $
   * Revision 4.4.1.1  1991/09/25  19:38:08  sob

--- 1,4 -----
! /* $Id: ngdata.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   *
   * $Log: ngdata.c,v $
   * Revision 4.4.2.1  1991/12/01  18:05:42  sob
***************
*** 1,6
  /* $Id: ngdata.c,v 4.4.1.1 1991/09/25 19:38:08 sob Exp sob $
   *
   * $Log: ngdata.c,v $
   * Revision 4.4.1.1  1991/09/25  19:38:08  sob
   * Some adaptions for CNEWS
   *

--- 1,9 -----
  /* $Id: ngdata.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   *
   * $Log: ngdata.c,v $
+  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
+  * Patchlevel 2 changes
+  *
   * Revision 4.4.1.1  1991/09/25  19:38:08  sob
   * Some adaptions for CNEWS
   *
***************
*** 43,70
  {
      char *cp;
  
- /* The following is only for systems that do not zero globals properly */
- #ifdef ZEROGLOB
- # ifdef CACHEFIRST
-   {
-     int i;
-     for (i=0; i<maxrcline; i++)
- 	abs1st[i] = 0;
-   }
- # endif
- #endif	/* ZEROGLOB */
- 
- /* The following is only for systems that do not zero globals properly */
- #ifdef ZEROGLOB
- # ifdef CACHEFIRST
-   {
-     int i;
-     for (i=0; i<MAXRCLINE; i++)
- 	abs1st[i] = 0;
-   }
- # endif
- #endif	/* ZEROGLOB */
- 
      /* open the active file */
  
  #ifdef SERVER

--- 46,51 -----
  {
      char *cp;
  
      /* open the active file */
  
  #ifdef SERVER
***************
*** 252,261
  ART_NUM ngsize;
  {
      ART_NUM a1st;
- #ifndef MININACT
-     ART_NUM x,y;
- #endif
- 
  #ifdef CACHEFIRST
      if (a1st = abs1st[ngnum])
  	return a1st;

--- 233,238 -----
  ART_NUM ngsize;
  {
      ART_NUM a1st;
  #ifdef CACHEFIRST
      if (a1st = abs1st[ngnum])
  	return a1st;
***************
*** 268,273
      return abs1st;
  # endif
  #else
      getngsize(ngnum); /* set moderated as side effect */
      sprintf(ser_line,"GROUP %s",rcline[ngnum]);
      put_server(ser_line);

--- 245,251 -----
      return abs1st;
  # endif
  #else
+     ART_NUM x,y;
      getngsize(ngnum); /* set moderated as side effect */
      sprintf(ser_line,"GROUP %s",rcline[ngnum]);
      put_server(ser_line);
***************
*** 297,303
  {
      return(floor);		/* dirname not used */
  }
! #else
  ART_NUM
  getabsfirst(ngnum,ngsize)
  register NG_NUM ngnum;

--- 275,283 -----
  {
      return(floor);		/* dirname not used */
  }
! 
! #else /*SERVER*/
! 
  ART_NUM
  getabsfirst(ngnum,ngsize)
  register NG_NUM ngnum;
Index: rcstuff.c
Prereq: 4.4
*** rcstuff.c	Fri Dec  6 23:49:08 1991
--- ../rn4.4.2/rcstuff.c	Sun Dec  1 12:09:37 1991
***************
*** 1,4
! /* $Id: rcstuff.c,v 4.4 1991/09/09 20:27:37 sob Exp sob $
   *
   * $Log: rcstuff.c,v $
   * Revision 4.4  1991/09/09  20:27:37  sob

--- 1,4 -----
! /* $Id: rcstuff.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   *
   * $Log: rcstuff.c,v $
   * Revision 4.4.2.1  1991/12/01  18:05:42  sob
***************
*** 1,6
  /* $Id: rcstuff.c,v 4.4 1991/09/09 20:27:37 sob Exp sob $
   *
   * $Log: rcstuff.c,v $
   * Revision 4.4  1991/09/09  20:27:37  sob
   * release 4.4
   *

--- 1,9 -----
  /* $Id: rcstuff.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   *
   * $Log: rcstuff.c,v $
+  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
+  * Patchlevel 2 changes
+  *
   * Revision 4.4  1991/09/09  20:27:37  sob
   * release 4.4
   *
***************
*** 63,69
      char *cp;
  #endif /* SERVER */
      bool found = FALSE;
!     maxrcline = 1500;
      /* make filenames */
  
  #ifdef SERVER

--- 66,72 -----
      char *cp;
  #endif /* SERVER */
      bool found = FALSE;
! 
      /* make filenames */
  
  #ifdef SERVER
***************
*** 94,112
  	writesoft = TRUE;
  
      /* allocate memory for rc file globals */
! #ifdef CACHEFIRST
!     abs1st = (ART_NUM *) safemalloc(maxrcline * sizeof(ART_NUM));
!     for (i=0; i<maxrcline; i++)
! 	abs1st[i] = 0;
! #endif
! #if defined(DEBUGGING) 
!     ngmax = (ART_NUM *) safemalloc(maxrcline * sizeof(ART_NUM));
! #endif
!     rcline = (char **) safemalloc(maxrcline * sizeof(char*));
!     toread = (ART_UNREAD *) safemalloc(maxrcline * sizeof(ART_UNREAD));
!     rcchar = (char *) safemalloc(maxrcline * sizeof(char));
!     rcnums = (char *) safemalloc(maxrcline * sizeof(char));
!     softptr = (ACT_POS *) safemalloc(maxrcline * sizeof(ACT_POS));
  
      /* read in the .newsrc file */
  

--- 97,103 -----
  	writesoft = TRUE;
  
      /* allocate memory for rc file globals */
!     grow_rc_arrays(1500);
  
      /* read in the .newsrc file */
  
***************
*** 122,131
  	    nextrcline--;		/* compensate for loop increment */
  	    continue;
  	}
! 	if (newng >= maxrcline) {	/* check for overflow */
! 	    maxrcline += 500;
! 	    grow_rc_arrays( maxrcline );
! 	}
  	if (tmpfp != Nullfp && fgets(tmpbuf,10,tmpfp) != Nullch)
  	    softptr[newng] = atol(tmpbuf);
  	else

--- 113,120 -----
  	    nextrcline--;		/* compensate for loop increment */
  	    continue;
  	}
! 	if (newng >= maxrcline)		/* check for overflow */
! 	    grow_rc_arrays(maxrcline + 500);
  	if (tmpfp != Nullfp && fgets(tmpbuf,10,tmpfp) != Nullch)
  	    softptr[newng] = atol(tmpbuf);
  	else
***************
*** 332,341
  	    }
  #else /* not SERVER */
  
! 	if (ng >= maxrcline) {		/* check for overflow */
! 	    maxrcline += 25;
! 	    grow_rc_arrays( maxrcline );
! 	}
  
  	if ((softptr[ng] = findact(buf,ngname,strlen(ngname),0L)) < 0 ) {
  

--- 321,328 -----
  	    }
  #else /* not SERVER */
  
! 	if (ng >= maxrcline)		/* check for overflow */
! 	    grow_rc_arrays(maxrcline + 25);
  
  	if ((softptr[ng] = findact(buf,ngname,strlen(ngname),0L)) < 0 ) {
  
***************
*** 367,373
  	ELSE
  #endif
  #ifdef TERSE
! 	    sprintf(promptbuf,"\nSubscribe %s? [ynY] ",ngname);
  #endif
  reask_add:
  	in_char(promptbuf,'A');

--- 354,360 -----
  	ELSE
  #endif
  #ifdef TERSE
! 	    sprintf(promptbuf,"\nSubscribe %s? [ynYN] ",ngname);
  #endif
  reask_add:
  	in_char(promptbuf,'A');
***************
*** 485,494
      register NG_NUM newng = nextrcline++;
  					/* increment max rcline index */
  
!     if (newng >= maxrcline) {		/* check for overflow */
! 	maxrcline += 25;
! 	grow_rc_arrays( maxrcline );
!     }
  
      rcnums[newng] = strlen(ngn) + 1;
      rcline[newng] = safemalloc((MEM_SIZE)(rcnums[newng] + 1));

--- 472,479 -----
      register NG_NUM newng = nextrcline++;
  					/* increment max rcline index */
  
!     if (newng >= maxrcline)		/* check for overflow */
! 	grow_rc_arrays(maxrcline + 25);
  
      rcnums[newng] = strlen(ngn) + 1;
      rcline[newng] = safemalloc((MEM_SIZE)(rcnums[newng] + 1));
***************
*** 1051,1057
  #endif
  }
  
! static void grow_rc_arrays( newsize )
  int newsize;
  {
  #ifdef CACHEFIRST

--- 1036,1055 -----
  #endif
  }
  
! static char *
! grow(ptr, elem, size)
! char *ptr;
! int elem;
! int size;
! {
!     if (ptr != NULL)
! 	return saferealloc(ptr, (MEM_SIZE)elem * size);
!     else
! 	return safemalloc((MEM_SIZE)elem * size);
! }
! 
! static void
! grow_rc_arrays(newsize)
  int newsize;
  {
  #ifdef CACHEFIRST
***************
*** 1055,1061
  int newsize;
  {
  #ifdef CACHEFIRST
!     abs1st = (ART_NUM *) saferealloc(abs1st, newsize * sizeof(ART_NUM));
  #endif
  #if defined(DEBUGGING)
      ngmax = (ART_NUM *) saferealloc(ngmax, newsize * sizeof(ART_NUM));

--- 1053,1063 -----
  int newsize;
  {
  #ifdef CACHEFIRST
!     register int i;
! 
!     abs1st = (ART_NUM *) grow((char*)abs1st, newsize, sizeof(ART_NUM));
!     for (i=maxrcline; i < newsize; i++)
! 	abs1st[i] = 0;
  #endif
  #if defined(DEBUGGING)
      ngmax = (ART_NUM *) grow((char*)ngmax, newsize, sizeof(ART_NUM));
***************
*** 1058,1064
      abs1st = (ART_NUM *) saferealloc(abs1st, newsize * sizeof(ART_NUM));
  #endif
  #if defined(DEBUGGING)
!     ngmax = (ART_NUM *) saferealloc(ngmax, newsize * sizeof(ART_NUM));
  #endif
      rcline = (char **) saferealloc(rcline, newsize * sizeof(char*));
      toread = (ART_UNREAD *) saferealloc(toread, newsize * sizeof(ART_UNREAD));

--- 1060,1066 -----
  	abs1st[i] = 0;
  #endif
  #if defined(DEBUGGING)
!     ngmax = (ART_NUM *) grow((char*)ngmax, newsize, sizeof(ART_NUM));
  #endif
      rcline = (char **) grow((char*)rcline, newsize, sizeof(char*));
      toread = (ART_UNREAD *) grow((char*)toread, newsize, sizeof(ART_UNREAD));
***************
*** 1060,1069
  #if defined(DEBUGGING)
      ngmax = (ART_NUM *) saferealloc(ngmax, newsize * sizeof(ART_NUM));
  #endif
!     rcline = (char **) saferealloc(rcline, newsize * sizeof(char*));
!     toread = (ART_UNREAD *) saferealloc(toread, newsize * sizeof(ART_UNREAD));
!     rcchar = (char *) saferealloc(rcchar, newsize * sizeof(char));
!     rcnums = (char *) saferealloc(rcnums, newsize * sizeof(char));
!     softptr = (ACT_POS *) saferealloc(softptr, newsize * sizeof(ACT_POS));
      return;
  }

--- 1062,1072 -----
  #if defined(DEBUGGING)
      ngmax = (ART_NUM *) grow((char*)ngmax, newsize, sizeof(ART_NUM));
  #endif
!     rcline = (char **) grow((char*)rcline, newsize, sizeof(char*));
!     toread = (ART_UNREAD *) grow((char*)toread, newsize, sizeof(ART_UNREAD));
!     rcchar = (char *) grow(rcchar, newsize, sizeof(char));
!     rcnums = (char *) grow(rcnums, newsize, sizeof(char));
!     softptr = (ACT_POS *) grow((char*)softptr, newsize, sizeof(ACT_POS));
!     maxrcline = newsize;
      return;
  }
Index: rcstuff.h
Prereq: 4.4
*** rcstuff.h	Fri Dec  6 23:50:02 1991
--- ../rn4.4.2/rcstuff.h	Sun Dec  1 12:10:36 1991
***************
*** 1,4
! /* $Id: rcstuff.h,v 4.4 1991/09/09 20:27:37 sob Exp sob $
   *
   * $Log: rcstuff.h,v $
   * Revision 4.4  1991/09/09  20:27:37  sob

--- 1,4 -----
! /* $Id: rcstuff.h,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   *
   * $Log: rcstuff.h,v $
   * Revision 4.4.2.1  1991/12/01  18:05:42  sob
***************
*** 1,6
  /* $Id: rcstuff.h,v 4.4 1991/09/09 20:27:37 sob Exp sob $
   *
   * $Log: rcstuff.h,v $
   * Revision 4.4  1991/09/09  20:27:37  sob
   * release 4.4
   *

--- 1,9 -----
  /* $Id: rcstuff.h,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   *
   * $Log: rcstuff.h,v $
+  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
+  * Patchlevel 2 changes
+  *
   * Revision 4.4  1991/09/09  20:27:37  sob
   * release 4.4
   *
***************
*** 36,41
  EXT ACT_POS *softptr INIT(NULL);
  			/* likely ptr to active file entry for newsgroup */
  EXT bool paranoid INIT(FALSE);	/* did we detect some inconsistency in .newsrc? */
  
  EXT	int	maxrcline;      /* current maximum # of lines in .newsrc */
  bool	rcstuff_init ANSI((void));

--- 39,45 -----
  EXT ACT_POS *softptr INIT(NULL);
  			/* likely ptr to active file entry for newsgroup */
  EXT bool paranoid INIT(FALSE);	/* did we detect some inconsistency in .newsrc? */
+ EXT int maxrcline INIT(0);	/* current maximum # of lines in .newsrc */
  
  bool	rcstuff_init ANSI((void));
  bool	get_ng ANSI((char *,bool));	/* return TRUE if newsgroup can be found or added */
***************
*** 37,43
  			/* likely ptr to active file entry for newsgroup */
  EXT bool paranoid INIT(FALSE);	/* did we detect some inconsistency in .newsrc? */
  
- EXT	int	maxrcline;      /* current maximum # of lines in .newsrc */
  bool	rcstuff_init ANSI((void));
  bool	get_ng ANSI((char *,bool));	/* return TRUE if newsgroup can be found or added */
  NG_NUM	add_newsgroup ANSI((char *,char));

--- 41,46 -----
  EXT bool paranoid INIT(FALSE);	/* did we detect some inconsistency in .newsrc? */
  EXT int maxrcline INIT(0);	/* current maximum # of lines in .newsrc */
  
  bool	rcstuff_init ANSI((void));
  bool	get_ng ANSI((char *,bool));	/* return TRUE if newsgroup can be found or added */
  NG_NUM	add_newsgroup ANSI((char *,char));
***************
*** 52,55
  void	newsrc_check ANSI((void));
  void	write_rc ANSI((void));
  void	get_old_rc ANSI((void));
- 

--- 55,57 -----
  void	newsrc_check ANSI((void));
  void	write_rc ANSI((void));
  void	get_old_rc ANSI((void));
Index: respond.c
Prereq: 4.4.1.1
*** respond.c	Fri Dec  6 23:49:30 1991
--- ../rn4.4.2/respond.c	Sun Dec  1 12:09:41 1991
***************
*** 1,4
! /* $Id: respond.c,v 4.4.1.1 1991/09/25 19:38:08 sob Exp sob $
   *
   * $Log: respond.c,v $
   * Revision 4.4.1.1  1991/09/25  19:38:08  sob

--- 1,4 -----
! /* $Id: respond.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   *
   * $Log: respond.c,v $
   * Revision 4.4.2.1  1991/12/01  18:05:42  sob
***************
*** 1,6
  /* $Id: respond.c,v 4.4.1.1 1991/09/25 19:38:08 sob Exp sob $
   *
   * $Log: respond.c,v $
   * Revision 4.4.1.1  1991/09/25  19:38:08  sob
   * Some adaptions for CNEWS
   *

--- 1,9 -----
  /* $Id: respond.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   *
   * $Log: respond.c,v $
+  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
+  * Patchlevel 2 changes
+  *
   * Revision 4.4.1.1  1991/09/25  19:38:08  sob
   * Some adaptions for CNEWS
   *
***************
*** 33,38
  #include "rn.h"
  #include "artio.h"
  #include "final.h"
  #include "uudecode.h"
  #include "INTERN.h"
  #include "respond.h"

--- 36,42 -----
  #include "rn.h"
  #include "artio.h"
  #include "final.h"
+ #include "bits.h"
  #include "uudecode.h"
  #include "INTERN.h"
  #include "respond.h"
***************
*** 111,118
  	    s = buf;
  	}
  	else {
! 	    if (savedest)
! 		strcpy(s, savedest);
  	    if (custom_extract)
  		cmdstr = extractprog;
  	    else

--- 115,122 -----
  	    s = buf;
  	}
  	else {
! 	    if (extractdest)
! 		strcpy(s, extractdest);
  	    if (custom_extract)
  		cmdstr = extractprog;
  	    else
***************
*** 146,152
  	}
  	if (uu_out != Nullfp) {
  	    printf("Continuing %s:%s\n", uu_fname,
! 		cmd != '\0' && strNE(savedest,s) ?
  		 " (Ignoring conflicting directory)" : nullstr ) FLUSH;
  	    uudecode(artfp);
  	}

--- 150,156 -----
  	}
  	if (uu_out != Nullfp) {
  	    printf("Continuing %s:%s\n", uu_fname,
! 		cmd != '\0' && strNE(extractdest,s) ?
  		 " (Ignoring conflicting directory)" : nullstr ) FLUSH;
  	    uudecode(artfp);
  	}
***************
*** 151,159
  	    uudecode(artfp);
  	}
  	else {
! 	    if (savedest)
! 		free(savedest);
! 	    s = savedest = savestr(s);	/* make it handy for %b */
  	    if (makedir(s, MD_DIR)) {	/* ensure directory exists */
  		int_count++;
  		return SAVE_DONE;

--- 155,163 -----
  	    uudecode(artfp);
  	}
  	else {
! 	    if (extractdest)
! 		free(extractdest);
! 	    s = extractdest = savestr(s); /* make it handy for %E */
  	    if (makedir(s, MD_DIR)) {	/* ensure directory exists */
  		int_count++;
  		return SAVE_DONE;
***************
*** 222,228
  		    cnt = 0;
  		    fseek(artfp,(long)-strlen(art_buf)-NL_SIZE+1,1);
  		    savefrom = ftell(artfp);
! 		    uud_start(s);
  		    uudecode(artfp);
  		    break;
  		}

--- 226,232 -----
  		    cnt = 0;
  		    fseek(artfp,(long)-strlen(art_buf)-NL_SIZE+1,1);
  		    savefrom = ftell(artfp);
! 		    uud_start(extractdest);
  		    uudecode(artfp);
  		    break;
  		}
***************
*** 380,391
  	    if (tmpfd == -1)
  		mailbox = FALSE;
  	    else {
! 		read(tmpfd,buf,LBUFLEN);
! 		c = buf;
! 		if (!isspace(MBOXCHAR))
! 		    while (isspace(*c))
! 			c++;
! 		mailbox = (*c == MBOXCHAR);
  		close(tmpfd);
  	    }
  	}

--- 384,398 -----
  	    if (tmpfd == -1)
  		mailbox = FALSE;
  	    else {
! 		if (read(tmpfd,buf,LBUFLEN)) {
! 		    c = buf;
! 		    if (!isspace(MBOXCHAR))   /* if non-zero, */
! 			while (isspace(*c))   /* check the first character */
! 			    c++;
! 		    mailbox = (*c == MBOXCHAR);
! 		} else {
! 		    mailbox = mbox_always;    /* if zero length, recheck -M */
! 		}
  		close(tmpfd);
  	    }
  	}
Index: respond.h
Prereq: 4.4
*** respond.h	Fri Dec  6 23:50:11 1991
--- ../rn4.4.2/respond.h	Sun Dec  1 12:10:38 1991
***************
*** 1,4
! /* $Id: respond.h,v 4.4 1991/09/09 20:27:37 sob Exp sob $
   *
   * $Log: respond.h,v $
   * Revision 4.4  1991/09/09  20:27:37  sob

--- 1,4 -----
! /* $Id: respond.h,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   *
   * $Log: respond.h,v $
   * Revision 4.4.2.1  1991/12/01  18:05:42  sob
***************
*** 1,6
  /* $Id: respond.h,v 4.4 1991/09/09 20:27:37 sob Exp sob $
   *
   * $Log: respond.h,v $
   * Revision 4.4  1991/09/09  20:27:37  sob
   * release 4.4
   *

--- 1,9 -----
  /* $Id: respond.h,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   *
   * $Log: respond.h,v $
+  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
+  * Patchlevel 2 changes
+  *
   * Revision 4.4  1991/09/09  20:27:37  sob
   * release 4.4
   *
***************
*** 20,25
   */
  
  EXT char *savedest INIT(Nullch);	/* value of %b */
  EXT char *extractprog INIT(Nullch);	/* value of %e */
  EXT ART_POS savefrom INIT(0);		/* value of %B */
  EXT char *headname INIT(Nullch);

--- 23,29 -----
   */
  
  EXT char *savedest INIT(Nullch);	/* value of %b */
+ EXT char *extractdest INIT(Nullch);	/* value of %E */
  EXT char *extractprog INIT(Nullch);	/* value of %e */
  EXT ART_POS savefrom INIT(0);		/* value of %B */
  EXT char *headname INIT(Nullch);
Index: rn.1
Prereq: 4.4.1.1
*** rn.1	Fri Dec  6 23:48:56 1991
--- ../rn4.4.2/rn.1	Mon Nov 18 20:26:42 1991
***************
*** 1,4
! .\" $Id: rn.1,v 4.4.1.1 1991/09/25 19:36:48 sob Exp sob $
  .\" 
  .\" This software is Copyright 1991 by Stan Barber. 
  .\"

--- 1,4 -----
! .\" $Id: rn.1,v 4.4 1991/11/08 16:23:39 sob Exp $
  .\" 
  .\" This software is Copyright 1991 by Stan Barber. 
  .\"
***************
*** 31,38
  ..
  .\"
  .\"     Set up \*(-- to give an unbreakable dash;
- .\"     string Tr holds user defined translation string.
- .\"     Bell System Logo is used as a dummy character.
  .\"
  .tr \(bs-|\(bv\*(Tr
  .ie n \{\

--- 31,36 -----
  ..
  .\"
  .\"     Set up \*(-- to give an unbreakable dash;
  .\"
  .tr \(bs-|\(bv\*(Tr
  .ie n \{\
***************
*** 291,297
  Escape to a subshell.
  One exclamation mark (!) leaves you in your own news directory.
  A double exclamation mark (!!) leaves you in the spool
! directory for news, which on most systems is /usr/spool/news that don't use NNTP.
  The environment variable SHELL will be used if defined.
  If
  .I command

--- 289,295 -----
  Escape to a subshell.
  One exclamation mark (!) leaves you in your own news directory.
  A double exclamation mark (!!) leaves you in the spool
! directory for news, which on most systems is /usr/spool/news if NNTP is not being used.
  The environment variable SHELL will be used if defined.
  If
  .I command
***************
*** 426,432
  Scan forward for article containing
  .I pattern
  in the subject.
! See the section on Regular Expressions.
  Together with the escape substitution facility described later, it becomes
  easy to search for various attributes of the current article, such as
  subject, article ID, author name, etc.

--- 424,430 -----
  Scan forward for article containing
  .I pattern
  in the subject.
! See the Regular Expressions section.
  Together with the escape substitution facility described later, it becomes
  easy to search for various attributes of the current article, such as
  subject, article ID, author name, etc.
***************
*** 1147,1156
  Current article number.
  .Ip %A 8
  Full name of current article (%P/%c/%a).
- (On a Eunice system with the LINKART option, %P/%c/%a returns the name of
- the article in the current newsgroup, while %A returns the real name of
- the article, which may be different if the current article was posted to
- multiple newsgroups.)
  .Ip %b 8
  Destination of last save command, often a mailbox.
  .Ip %B 8

--- 1145,1150 -----
  Current article number.
  .Ip %A 8
  Full name of current article (%P/%c/%a).
  .Ip %b 8
  Destination of last save command, often a mailbox.
  .Ip %B 8
***************
*** 1168,1173
  \*(L"Distribution:\*(R" line from the current article.
  .Ip %e 8
  The last command executed to extract an article.
  .Ip %f 8
  \*(L"From:\*(R" line from the current article, or the \*(L"Reply-To:\*(R"
  line if there is one.

--- 1162,1169 -----
  \*(L"Distribution:\*(R" line from the current article.
  .Ip %e 8
  The last command executed to extract an article.
+ .Ip %E 8
+ The last directory where an extracted file went.
  .Ip %f 8
  \*(L"From:\*(R" line from the current article, or the \*(L"Reply-To:\*(R"
  line if there is one.
***************
*** 1310,1315
  \*(L"%^C\*(R" produces something like \*(L"Net.jokes\*(R".
  Inserting \*(L'_\*(R' causes the first letter following the last
  \&\*(L'/\*(R' to be capitalized: \*(L"%_c\*(R" produces \*(L"net/Jokes\*(R".
  .SH ENVIRONMENT
  The following environment variables are paid attention to by
  .IR rn .

--- 1306,1316 -----
  \*(L"%^C\*(R" produces something like \*(L"Net.jokes\*(R".
  Inserting \*(L'_\*(R' causes the first letter following the last
  \&\*(L'/\*(R' to be capitalized: \*(L"%_c\*(R" produces \*(L"net/Jokes\*(R".
+ .PP
+ Inserting \*(L'\\\*(R' will insert a backslash before
+ any characters that would be magic in a regular expression:
+ \*L"%\\C\*(R" produces \*(L"net\\.jokes\*(R".
+ This is called regexp quoting.
  .SH ENVIRONMENT
  The following environment variables are paid attention to by
  .IR rn .
Index: rn.c
Prereq: 4.4.1.1
*** rn.c	Fri Dec  6 23:49:26 1991
--- ../rn4.4.2/rn.c	Sun Dec  1 12:11:30 1991
***************
*** 24,31
   * is at the user's own risk. 
   */
  
! static char rnid[] = "@(#)$Id: rn.c,v 4.4.1.1 1991/09/25 19:38:08 sob Exp sob $";
! static char patchlevel[] = "Patchlevel 1";
  
  /* $Log: rn.c,v $
   * Revision 4.4.1.1  1991/09/25  19:38:08  sob

--- 24,31 -----
   * is at the user's own risk. 
   */
  
! static char rnid[] = "@(#)$Id: rn.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $";
! static char patchlevel[] = "Patchlevel 2";
  
  /* $Log: rn.c,v $
   * Revision 4.4.2.1  1991/12/01  18:05:42  sob
***************
*** 28,33
  static char patchlevel[] = "Patchlevel 1";
  
  /* $Log: rn.c,v $
   * Revision 4.4.1.1  1991/09/25  19:38:08  sob
   * Updated patchlevel message
   *

--- 28,36 -----
  static char patchlevel[] = "Patchlevel 2";
  
  /* $Log: rn.c,v $
+  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
+  * Patchlevel 2 changes
+  *
   * Revision 4.4.1.1  1991/09/25  19:38:08  sob
   * Updated patchlevel message
   *
***************
*** 94,100
      /* loop through all unread news */
  
      {
- 	char promptbuf[80];
  	bool special = FALSE;		/* temporarily allow newsgroup */
  					/*   with no unread news? */
  	bool retry;			/* cycle back to top of list? */

--- 97,102 -----
      /* loop through all unread news */
  
      {
  	bool special = FALSE;		/* temporarily allow newsgroup */
  					/*   with no unread news? */
  	bool retry;			/* cycle back to top of list? */
***************
*** 154,170
  		    }
  #endif
  		    dfltcmd = (retry ? "npq" : "qnp");
- #ifdef VERBOSE
- 		    IF(verbose)
- 			sprintf(promptbuf,
- 			    "\n******** End of newsgroups--what next? [%s] ",
- 			    dfltcmd);
- 		    ELSE
- #endif
- #ifdef TERSE
- 			sprintf(promptbuf,
- 			    "\n**** End--next? [%s] ", dfltcmd);
- #endif
  		}
  		else {
  		    bool shoe_fits;	/* newsgroup matches restriction? */

--- 156,161 -----
  		    }
  #endif
  		    dfltcmd = (retry ? "npq" : "qnp");
  		}
  		else {
  		    bool shoe_fits;	/* newsgroup matches restriction? */
***************
*** 189,208
  		    }
      reprompt_newsgroup:
  		    dfltcmd = "ynq";
- #ifdef VERBOSE
- 		    IF(verbose)
- 			sprintf(promptbuf,
- 			    "\n******** %3ld unread article%s in %s--read now? [%s] ",
- 			    (long)toread[ng], (toread[ng]==TR_ONE ? nullstr : "s"),
- 			    ngname, dfltcmd);	/* format prompt string */
- 		    ELSE
- #endif
- #ifdef TERSE
- 			sprintf(promptbuf,
- 			    "\n**** %3ld in %s--read? [%s] ",
- 			    (long)toread[ng],
- 			    ngname,dfltcmd);	/* format prompt string */
- #endif
  		}
  		special = FALSE;	/* go back to normal mode */
  		if (ng != current_ng) {

--- 180,185 -----
  		    }
      reprompt_newsgroup:
  		    dfltcmd = "ynq";
  		}
  		special = FALSE;	/* go back to normal mode */
  		if (ng != current_ng) {
***************
*** 212,218
  		}
      reask_newsgroup:
  		unflush_output();	/* disable any ^O in effect */
! 		fputs(promptbuf,stdout) FLUSH;/* print prompt */
  		fflush(stdout);
      reinp_newsgroup:
  		eat_typeahead();

--- 189,218 -----
  		}
      reask_newsgroup:
  		unflush_output();	/* disable any ^O in effect */
! 		if (ng >= nextrcline) {
! #ifdef VERBOSE
! 		    IF(verbose)
! 			printf("\n******** End of newsgroups--what next? [%s] ",
! 			    dfltcmd);
! 		    ELSE
! #endif
! #ifdef TERSE
! 			printf("\n**** End--next? [%s] ", dfltcmd);
! #endif
! 		} else {
! #ifdef VERBOSE
! 		    IF(verbose)
! 			printf("\n******** %3ld unread article%s in %s--read now? [%s] ",
! 			    (long)toread[ng], (toread[ng]==TR_ONE ? nullstr : "s"),
! 			    ngname, dfltcmd);
! 		    ELSE
! #endif
! #ifdef TERSE
! 			printf("\n**** %3ld in %s--read? [%s] ",
! 			    (long)toread[ng],
! 			    ngname,dfltcmd);
! #endif
! 		}
  		fflush(stdout);
      reinp_newsgroup:
  		eat_typeahead();
***************
*** 245,250
  		    break;
  		case '-':
  		    ng = recent_ng;	/* recall previous newsgroup */
  		    special = TRUE;	/* don't skip it if toread==0 */
  		    break;
  		case 'q': case 'Q': case 'x':	/* quit? */

--- 245,253 -----
  		    break;
  		case '-':
  		    ng = recent_ng;	/* recall previous newsgroup */
+ 		    if (ng < nextrcline)
+ 			if (!get_ng(rcline[ng],FALSE))
+ 			    ng = current_ng;
  		    special = TRUE;	/* don't skip it if toread==0 */
  		    break;
  		case 'q': case 'Q': case 'x':	/* quit? */
***************
*** 472,478
  		case '&':
  		    if (switcheroo()) /* get rest of command */
  			goto reinp_newsgroup;	/* if rubbed out, try something else */
! 		    goto reask_newsgroup;
  		case 'l': {		/* list other newsgroups */
  		    if (!finish_command(TRUE)) /* get rest of command */
  			goto reinp_newsgroup;	/* if rubbed out, try something else */

--- 475,481 -----
  		case '&':
  		    if (switcheroo()) /* get rest of command */
  			goto reinp_newsgroup;	/* if rubbed out, try something else */
! 		    goto reprompt_newsgroup;
  		case 'l': {		/* list other newsgroups */
  		    if (!finish_command(TRUE)) /* get rest of command */
  			goto reinp_newsgroup;	/* if rubbed out, try something else */
*** /dev/null	Sat Dec  7 05:01:53 1991
--- ../rn4.4.2/server.h.SH	Sun Nov 10 13:33:48 1991
***************
*** 0

--- 1,41 -----
+ :
+ case $CONFIG in
+     '') . ./config.sh ;;
+ esac
+ if $test $isrrn = define 
+ then
+ $echo "Extracting server.h (with variable substitutions)"
+ $cat >server.h <<!GROK!THIS!
+ /*
+  * $Id$
+  * 
+  * $Log$
+  * 
+  * 
+  * This software is Copyright 1991 by Stan Barber. 
+  * 
+  * Permission is hereby granted to copy, reproduce, redistribute or otherwise
+  * use this software as long as: there is no monetary profit gained
+  * specifically from the use or reproduction of this software, it is not
+  * sold, rented, traded or otherwise marketed, and this copyright notice is
+  * included prominently in any copy made. 
+  *
+  * The author make no claims as to the fitness or correctness of this software
+  * for any use whatsoever, and it is provided as is. Any use of this software
+  *is at the user's own risk. 
+  */
+ #ifdef SERVER
+ 
+ extern  char    *getserverbyfile ANSI((char *));
+ extern  int     server_init ANSI((char *));
+ extern  void    put_server ANSI((char *));
+ extern  int     get_server ANSI((char *,int));
+ extern  void    close_server ANSI((void));
+ 
+ #include "$NNTPSRC/common/nntp.h"
+ EXT     char ser_line[NNTP_STRLEN];
+ #endif
+ !GROK!THIS!
+ else
+ 	rm -f server.h
+ fi
Index: term.c
Prereq: 4.4
*** term.c	Fri Dec  6 23:49:22 1991
--- ../rn4.4.2/term.c	Sun Dec  1 12:09:50 1991
***************
*** 1,4
! /* $Id: term.c,v 4.4 1991/09/09 20:27:37 sob Exp sob $
   *
   * $Log: term.c,v $
   * Revision 4.4  1991/09/09  20:27:37  sob

--- 1,4 -----
! /* $Id: term.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   *
   * $Log: term.c,v $
   * Revision 4.4.2.1  1991/12/01  18:05:42  sob
***************
*** 1,6
  /* $Id: term.c,v 4.4 1991/09/09 20:27:37 sob Exp sob $
   *
   * $Log: term.c,v $
   * Revision 4.4  1991/09/09  20:27:37  sob
   * release 4.4
   *

--- 1,9 -----
  /* $Id: term.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   *
   * $Log: term.c,v $
+  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
+  * Patchlevel 2 changes
+  *
   * Revision 4.4  1991/09/09  20:27:37  sob
   * release 4.4
   *
***************
*** 1119,1125
  void
  termlib_init()
  {
! #ifdef HAVETERMLIB
  	if (TI && *TI)
  		tputs (TI,1,putchr);
  #endif

--- 1122,1128 -----
  void
  termlib_init()
  {
! #ifdef USETITE
  	if (TI && *TI)
  		tputs (TI,1,putchr);
  #endif
***************
*** 1128,1134
  void
  termlib_reset()
  {
! #ifdef HAVETERMLIB
  	if (TE && *TE)
  		tputs (TE,1,putchr);
  #endif

--- 1131,1137 -----
  void
  termlib_reset()
  {
! #ifdef USETITE
  	if (TE && *TE)
  		tputs (TE,1,putchr);
  #endif
Index: uudecode.c
Prereq: 4.4
*** uudecode.c	Fri Dec  6 23:49:39 1991
--- ../rn4.4.2/uudecode.c	Sun Dec  1 12:09:54 1991
***************
*** 1,4
! /* $Id: uudecode.c,v 4.4 1991/09/09 20:27:37 sob Exp sob $
   *
   * $Log: uudecode.c,v $
   * Revision 4.4  1991/09/09  20:27:37  sob

--- 1,4 -----
! /* $Id: uudecode.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   *
   * $Log: uudecode.c,v $
   * Revision 4.4.2.1  1991/12/01  18:05:42  sob
***************
*** 1,6
  /* $Id: uudecode.c,v 4.4 1991/09/09 20:27:37 sob Exp sob $
   *
   * $Log: uudecode.c,v $
   * Revision 4.4  1991/09/09  20:27:37  sob
   * release 4.4
   *

--- 1,9 -----
  /* $Id: uudecode.c,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
   *
   * $Log: uudecode.c,v $
+  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
+  * Patchlevel 2 changes
+  *
   * Revision 4.4  1991/09/09  20:27:37  sob
   * release 4.4
   *
***************
*** 31,37
  #include "uudecode.h"
  
  #define MAXCHAR 256
! #define NORMLEN 60	/* allows for 80 encoded chars per line */
  
  #define SEQMAX 'z'
  #define SEQMIN 'a'

--- 34,40 -----
  #include "uudecode.h"
  
  #define MAXCHAR 256
! #define NORMLEN 64	/* allows for 84 encoded chars per line */
  
  #define SEQMAX 'z'
  #define SEQMIN 'a'
***************
*** 127,133
  			return -1;
  		    }
  		}
! 		printf("INCOMPLETE FILE: %s -- removed\n", dest);
  		sleep(2);
  		fclose(uu_out);
  		uu_out = Nullfp;

--- 130,136 -----
  			return -1;
  		    }
  		}
! 		uud_end();
  		sleep(2);
  		Xflag = FALSE;
  		expecting_part = 0;
***************
*** 129,136
  		}
  		printf("INCOMPLETE FILE: %s -- removed\n", dest);
  		sleep(2);
- 		fclose(uu_out);
- 		uu_out = Nullfp;
  		Xflag = FALSE;
  		expecting_part = 0;
  		unlink(dest);

--- 132,137 -----
  		}
  		uud_end();
  		sleep(2);
  		Xflag = FALSE;
  		expecting_part = 0;
  	    }
***************
*** 133,139
  		uu_out = Nullfp;
  		Xflag = FALSE;
  		expecting_part = 0;
- 		unlink(dest);
  	    }
  	    state = FIND_BEGIN;
  	    /* fall thru */

--- 134,139 -----
  		sleep(2);
  		Xflag = FALSE;
  		expecting_part = 0;
  	    }
  	    state = FIND_BEGIN;
  	    /* fall thru */
***************
*** 253,258
      register int blen;		/* binary length (from decoded file) */
      register int rlen;		/* calculated input line length */
      register int len;		/* actual input line length */
  
      if (Xflag) {
  	if (*buff == 'X')

--- 253,260 -----
      register int blen;		/* binary length (from decoded file) */
      register int rlen;		/* calculated input line length */
      register int len;		/* actual input line length */
+     register int dash;		/* number of '-'s encountered on a line */
+ 				/* If it's too high, we reject the line */
  
  #   define REJECT(buf,rlen,len) /* Comment for makedepend to	 \
  				** ignore the backslash above */ \
***************
*** 254,259
      register int rlen;		/* calculated input line length */
      register int len;		/* actual input line length */
  
      if (Xflag) {
  	if (*buff == 'X')
  	    buff++;

--- 256,268 -----
      register int dash;		/* number of '-'s encountered on a line */
  				/* If it's too high, we reject the line */
  
+ #   define REJECT(buf,rlen,len) /* Comment for makedepend to	 \
+ 				** ignore the backslash above */ \
+ 	((*buf == 'M' && len > rlen + 5) \
+ 	 || (*buf != 'M' && len != rlen && len != rlen+1) \
+ 	 || (strnEQ(buf, "BEGIN", 5)) \
+ 	 || (strnEQ(buf, "END", 3)))
+ 
      if (Xflag) {
  	if (*buff == 'X')
  	    buff++;
***************
*** 261,267
  	    *buff = 'x';	/* force a mis-parse of a non-x'ed line */
      }
      len = strlen(buff);
!     if (--len < 0)
  	return state;
  
      buff[len] = '\0';

--- 270,276 -----
  	    *buff = 'x';	/* force a mis-parse of a non-x'ed line */
      }
      len = strlen(buff);
!     if (--len <= 0)
  	return state;
  
      buff[len] = '\0';
***************
*** 301,307
      }
  
      rlen = cdlen[blen];
!     if (state == SKIP_LEADING && len != rlen && len != rlen+1)
  	return SKIP_LEADING;
  
      /*

--- 310,316 -----
      }
  
      rlen = cdlen[blen];
!     if (state == SKIP_LEADING && REJECT(buff,rlen,len))
  	return SKIP_LEADING;
  
      /*
***************
*** 310,316
      if (blen == 0)
  	return state;
  
!     if (len > rlen + 5)
  	return SKIP_TRAILING;
  
      /*

--- 319,325 -----
      if (blen == 0)
  	return state;
  
!     if (REJECT(buff,rlen,len))
  	return SKIP_TRAILING;
  
      /*
***************
*** 322,328
      /*
       * Verify
       */
!     for (n = rlen, bp = buff; --n >= 0; bp++)
  	if (trtbl[*bp] < 0) {
  	    if (state == SKIP_LEADING)
  		return SKIP_LEADING;

--- 331,337 -----
      /*
       * Verify
       */
!     for (n = rlen, bp = buff, dash = 0; --n >= 0; bp++) {
  	if (trtbl[*bp] < 0) {
  	    if (state == SKIP_LEADING)
  		return SKIP_LEADING;
***************
*** 328,333
  		return SKIP_LEADING;
  	    return DECODE_ERROR;
  	}
  
      /*
       * Check for uuencodes that append a 'z' to each line....

--- 337,350 -----
  		return SKIP_LEADING;
  	    return DECODE_ERROR;
  	}
+ 	if (*bp == '-')
+ 	    dash++;
+     }
+     if (dash * 100 / rlen > 33)		/* more than 1/3 dashes? */
+ 	if (state == SKIP_LEADING)
+ 	    return SKIP_LEADING;	/* -> reject */
+ 	else
+ 	    return SKIP_TRAILING;
  
      /*
       * Check for uuencodes that append a 'z' to each line....
***************
*** 423,429
      register int c, n = 0;
      register char *cpt;
  
!     for (c = 0; c <= MAXCHAR; c++)
  	chtbl[c] = -1;
  
      for (;;) {

--- 440,446 -----
      register int c, n = 0;
      register char *cpt;
  
!     for (c = 0; c < MAXCHAR; c++)
  	chtbl[c] = -1;
  
      for (;;) {
Index: patchlevel
Prereq: 1
*** patchlevel	Fri Dec  6 23:49:04 1991
--- ../rn4.4.2/patchlevel	Sun Dec  1 12:11:38 1991
***************
*** 1
! Patch:  1

--- 1 -----
! Patch:  2
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