RN/RRN Patch 49

Stan Barber rrn at lib.tmc.edu
Sat Nov 24 16:03:51 AEST 1990


Description:
	This is an official patch for rn 4.3. This is patch 49.

	If you need the other patches, you can get them via the Archive Server
	by sending mail to "archive-server at bcm.tmc.edu" with the subject line
	of the form "send public rn.XX.patch". Note that only patches 41 and
	later are available from this resource at this time.

	The fully patched rn kit is also available via anonymous ftp from
	lib.tmc.edu and gazette.bcm.tmc.edu. Look in public/rn.

	This patch fixes the following problems or adds the following new
	features:

	Reversed a patch from number 48 that broke the handling of the
	-e flag. Added a fix that deals with long lines not getting cleared
	before the line in reused.

	Changes to all .SH files that didn't have . ./config.sh at their
	first executed command.

	Added support for hiding hosts behind the domain in addresses.

	Some minor changes to make POSIX compliant machines happier.

This version has been sucessfully compiled and used as rrn on the following
systems:
	Sun 3/4 running SunOS 4.1
	Solboune 5/600 running OS/SMP 4.0D
	Generic 386/33 running Interactive Unix 3.2

This version has been run as rn on a VAX running Ultrix 3.1 and on a Solbourne
running OS/SMP 4.0D

Fix:
	cd to your rn source directory and patch away

Index: Configure
Prereq: 4.3.2.31
*** Configure	Thu Nov 22 22:49:33 1990
--- ../new/Configure	Fri Nov 23 09:38:30 1990
***************
*** 3,9
  # If these # comments don't work, trim them.  Don't worry about the other
  # shell scripts, Configure will trim # comments from them for you.
  #
! # $Header: Configure,v 4.3.2.31 90/11/10 00:08:08 sob Exp $
  #
  # $Log:	Configure,v $
  # Revision 4.3.2.31  90/11/10  00:08:08  sob

--- 3,9 -----
  # If these # comments don't work, trim them.  Don't worry about the other
  # shell scripts, Configure will trim # comments from them for you.
  #
! # $Header: Configure,v 4.3.2.34 90/11/22 17:49:31 sob Exp $
  #
  # $Log:	Configure,v $
  # Revision 4.3.2.34  90/11/22  17:49:31  sob
***************
*** 6,11
  # $Header: Configure,v 4.3.2.31 90/11/10 00:08:08 sob Exp $
  #
  # $Log:	Configure,v $
  # Revision 4.3.2.31  90/11/10  00:08:08  sob
  # This one appears to work for Interactive Unix.
  # 

--- 6,24 -----
  # $Header: Configure,v 4.3.2.34 90/11/22 17:49:31 sob Exp $
  #
  # $Log:	Configure,v $
+ # 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.2 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.
  # 
***************
*** 237,242
  serverfile=''
  NNTPSRC=''
  CONFIG=''
  
  echo "Beginning of configuration questions for rn kit."
  : Eunice requires " " instead of "", can you believe it

--- 250,257 -----
  serverfile=''
  NNTPSRC=''
  CONFIG=''
+ hidden=''
+ addcflags=''
  
  echo "Beginning of configuration questions for rn kit."
  : Eunice requires " " instead of "", can you believe it
***************
*** 340,345
  EOH
  echo $n "[Type carriage return to continue] $c"
  . myread
  : get old answers, if there is a config file out there
  if test -f config.sh; then
      echo " "

--- 355,363 -----
  EOH
  echo $n "[Type carriage return to continue] $c"
  . myread
+ : n and c get changed by config.sh -- so save them
+ Xn=$n
+ Xc=$c
  : get old answers, if there is a config file out there
  if test -f config.sh; then
      echo " "
***************
*** 346,351
      echo "(Fetching default answers from your old config.sh file...)"
      . config.sh
  fi
  
  : get list of predefined functions in a handy place
  echo " "

--- 364,372 -----
      echo "(Fetching default answers from your old config.sh file...)"
      . config.sh
  fi
+ : n and c get changed by config.sh -- restore them
+ n=$Xn
+ c=$Xc
  
  : get list of predefined functions in a handy place
  echo " "
***************
*** 361,368
  	    echo "Your C library is in /usr/lib/libc.a, of all places."
  	    libc=/usr/lib/libc.a
  	else
! 	    if test -f "$libc"; then
! 		echo "Your C library is in $libc, like you said before."
  	    else
  		cat <<'EOM'
   

--- 382,390 -----
  	    echo "Your C library is in /usr/lib/libc.a, of all places."
  	    libc=/usr/lib/libc.a
  	else
! 	    if test -f /lib/clib; then
! 		echo "Your C library is in /lib/clib.  How nonstandard, must be Apollo."
! 		libc=/lib/clib
  	    else
  		if test -f "$libc"; then
  		    echo "Your C library is in $libc, like you said before."
***************
*** 364,370
  	    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. Perhaps you can find

--- 386,395 -----
  		echo "Your C library is in /lib/clib.  How nonstandard, must be Apollo."
  		libc=/lib/clib
  	    else
! 		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. Perhaps you can find
***************
*** 371,379
  out by reading `man 3 intro' if you have the 'man' facility installed.
  
  EOM
! 	    echo $n "What is the full name of your C library? $c"
! 	    . myread
! 	    libc="$ans"
  	    fi
  	fi
      fi

--- 396,405 -----
  out by reading `man 3 intro' if you have the 'man' facility installed.
  
  EOM
! 		    echo $n "What is the full name of your C library? $c"
! 		    . myread
! 		    libc="$ans"
! 		fi
  	    fi
  	fi
      fi
***************
*** 383,394
  if ar t $libc >libc.list 2>/dev/null; then
      echo "done"
  else
!     if $contains SIGAPOLLO /usr/include/signal.h >/dev/null 2>&1; then
! 	cat <<'EOM'
!  (AHA, you are
! an Apollo user. In case you didn't already know, the pathname of your
! EOM
! 	echo $n "C library ought to be /lib/clib)...$c"
  	if nm -g $libc | sed -e 's/$/.o/' >libc.list; then
  	    echo "done"
  	else

--- 409,415 -----
  if ar t $libc >libc.list 2>/dev/null; then
      echo "done"
  else
!      if test $libc = /lib/clib; then
  	if nm -g $libc | sed -e 's/$/.o/' >libc.list; then
  	    echo "done"
  	else
***************
*** 633,638
      getuidgid=undef
  fi
  
  : see if sh knows # comments
  echo " "
  echo "Checking your sh to see if it knows about # comments..."

--- 654,683 -----
      getuidgid=undef
  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"
+     addcflags="-DR_UNIQ -DUSG"
+     # -DR_UNIQ and -DUSG are needed for ~nntp/common/clientlib.c
+ fi
+ 
  : see if sh knows # comments
  echo " "
  echo "Checking your sh to see if it knows about # comments..."
***************
*** 1000,1006
  	esac
  fi
  
! : get organizaton name
  longshots='/usr/src/new /usr/src/local /usr/local/src'
  case "$orgname" in
  '') if xxx=`loc news/src/defs.h x $longshots`; then

--- 1045,1066 -----
  	esac
  fi
  
! case $hidden in
! define)	dflt=y;;
! *)	dflt=n;;
! esac
! $echo "Do you want your site ($sitename) "
! $echo $n "to be hidden in domain '$domain'? [$dflt] $c"
! . myread
! case $ans in
! y*)	hidden=define
! 	sitename=$domain
! 	;;
! *)	hidden=undef
! 	;;
! esac
! 
! : get organization name
  longshots='/usr/src/new /usr/src/local /usr/local/src'
  case "$orgname" in
  '') if xxx=`loc news/src/defs.h x $longshots`; then
***************
*** 1204,1210
      ;;
    *)
      $echo " "
!     case "$usgname" in
      define)
  	dflt=y;;
      undef)

--- 1264,1270 -----
      ;;
    *)
      $echo " "
!     case "$usgnam" in
      define)
  	dflt=y;;
      undef)
***************
*** 1333,1340
      $echo $n "Is this correct? [y] $c"
      . myread
      case $ans in
! 	n*|f*) memcpy=undef ;;
! 	*)     memcpy=define ;;
      esac
  fi
  

--- 1393,1400 -----
      $echo $n "Is this correct? [y] $c"
      . myread
      case $ans in
! 	n*|f*) memcpy='undef' ;;
! 	*)     memcpy='define' ;;
      esac
  fi
  
***************
*** 1703,1708
  	usendir=define
  	ndirc='ndir.c'
  	ndiro='ndir.o'
      fi
  fi
  

--- 1763,1769 -----
  	usendir=define
  	ndirc='ndir.c'
  	ndiro='ndir.o'
+ 	dirtype=direct
      fi
  fi
  
***************
*** 2052,2058
      if usg && $test -f $libexp/recmail; then
  	mailer=$libexp/recmail
      else
! 	mailer=/bin/mail
      fi
  fi
  $echo "Mail sender is $mailer"

--- 2113,2123 -----
      if usg && $test -f $libexp/recmail; then
  	mailer=$libexp/recmail
      else
! 	if s5uniq && $test -f /usr/bin/mailx; then
! 	    mailer=/usr/bin/mailx
! 	else
! 	    mailer=/bin/mail
! 	fi
      fi
  fi
  $echo "Mail sender is $mailer"
***************
*** 2421,2426
  serverfile='$serverfile'
  NNTPSRC='$NNTPSRC'
  CONFIG=true
  EOT
  
  : create config.h file

--- 2486,2493 -----
  serverfile='$serverfile'
  NNTPSRC='$NNTPSRC'
  CONFIG=true
+ hidden='$hidden'
+ addcflags='$addcflags'
  EOT
  
  : create config.h file
Index: Makefile.SH
Prereq: 4.3.2.10
*** Makefile.SH	Thu Nov 22 22:50:16 1990
--- ../new/Makefile.SH	Fri Nov 23 09:39:07 1990
***************
*** 3,9
  esac
  echo "Extracting Makefile (with variable substitutions)"
  cat >Makefile <<!GROK!THIS!
! # $Header: Makefile.SH,v 4.3.2.10 90/05/04 00:44:51 sob Exp $
  #
  # $Log:	Makefile.SH,v $
  # Revision 4.3.2.10  90/05/04  00:44:51  sob

--- 3,9 -----
  esac
  echo "Extracting Makefile (with variable substitutions)"
  cat >Makefile <<!GROK!THIS!
! # $Header: Makefile.SH,v 4.3.2.11 90/11/22 13:57:53 sob Exp $
  #
  # $Log:	Makefile.SH,v $
  # Revision 4.3.2.11  90/11/22  13:57:53  sob
***************
*** 6,11
  # $Header: Makefile.SH,v 4.3.2.10 90/05/04 00:44:51 sob Exp $
  #
  # $Log:	Makefile.SH,v $
  # Revision 4.3.2.10  90/05/04  00:44:51  sob
  # Added socketlib to list of libs.
  # 

--- 6,14 -----
  # $Header: Makefile.SH,v 4.3.2.11 90/11/22 13:57:53 sob Exp $
  #
  # $Log:	Makefile.SH,v $
+ # 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.
  # 
***************
*** 56,62
  manext = $manext
  #NNTPNNTPDIR = $NNTPSRC
  #NNTPNNTPINC = $rrninclude
! CFLAGS = $iandd -O $include
  LDFLAGS = $iandd
  NDIRC = $ndirc
  NDIRO = $ndiro

--- 59,65 -----
  manext = $manext
  #NNTPNNTPDIR = $NNTPSRC
  #NNTPNNTPINC = $rrninclude
! CFLAGS = $iandd $addcflags -O $include
  LDFLAGS = $iandd
  NDIRC = $ndirc
  NDIRO = $ndiro
***************
*** 102,107
  add3 = loc makedepend makedir mbox.saver newsetup
  add4 = newsgroups newsnews ng.help norm.saver pager.help
  add5 = pdp11 rn subs.help usg v7 ultrix sun hp-ux sgi xenix server.h
  
  addedbyconf = $(add1) $(add2) $(add3) $(add4) $(add5)
  

--- 105,111 -----
  add3 = loc makedepend makedir mbox.saver newsetup
  add4 = newsgroups newsnews ng.help norm.saver pager.help
  add5 = pdp11 rn subs.help usg v7 ultrix sun hp-ux sgi xenix server.h
+ add6 = all pyr grimble .falseactive Pnews.header s5uniq
  
  addedbyconf = $(add1) $(add2) $(add3) $(add4) $(add5) $(add6)
  
***************
*** 103,109
  add4 = newsgroups newsnews ng.help norm.saver pager.help
  add5 = pdp11 rn subs.help usg v7 ultrix sun hp-ux sgi xenix server.h
  
! addedbyconf = $(add1) $(add2) $(add3) $(add4) $(add5)
  
  # grrr
  SHELL = /bin/sh

--- 107,113 -----
  add5 = pdp11 rn subs.help usg v7 ultrix sun hp-ux sgi xenix server.h
  add6 = all pyr grimble .falseactive Pnews.header s5uniq
  
! addedbyconf = $(add1) $(add2) $(add3) $(add4) $(add5) $(add6)
  
  # grrr
  SHELL = /bin/sh
Index: Pnews.SH
Prereq: 4.3.2.9
*** Pnews.SH	Thu Nov 22 22:49:59 1990
--- ../new/Pnews.SH	Fri Nov 23 09:39:02 1990
***************
*** 4,10
  echo "Extracting Pnews (with variable substitutions)"
  $spitshell >Pnews <<!GROK!THIS!
  $startsh
! # $Header: Pnews.SH,v 4.3.2.9 90/11/06 00:54:52 sob Exp $
  #
  # $Log:	Pnews.SH,v $
  # Revision 4.3.2.9  90/11/06  00:54:52  sob

--- 4,10 -----
  echo "Extracting Pnews (with variable substitutions)"
  $spitshell >Pnews <<!GROK!THIS!
  $startsh
! # $Header: Pnews.SH,v 4.3.2.10 90/11/22 13:45:40 sob Exp $
  #
  # $Log:	Pnews.SH,v $
  # Revision 4.3.2.10  90/11/22  13:45:40  sob
***************
*** 7,12
  # $Header: Pnews.SH,v 4.3.2.9 90/11/06 00:54:52 sob Exp $
  #
  # $Log:	Pnews.SH,v $
  # Revision 4.3.2.9  90/11/06  00:54:52  sob
  # Added ./ to be beginning of config.sh
  # 

--- 7,16 -----
  # $Header: Pnews.SH,v 4.3.2.10 90/11/22 13:45:40 sob Exp $
  #
  # $Log:	Pnews.SH,v $
+ # Revision 4.3.2.10  90/11/22  13:45:40  sob
+ # Added support for making news posting appear to come from the domain
+ # itself instead of individual hosts withing a domain.
+ # 
  # Revision 4.3.2.9  90/11/06  00:54:52  sob
  # Added ./ to be beginning of config.sh
  # 
***************
*** 89,94
  # where important rn things are kept
  rnlib="$rnlib"
  ;;
  esac
  
  # your organization name

--- 93,105 -----
  # where important rn things are kept
  rnlib="$rnlib"
  ;;
+ esac
+ 
+ case $hidden in
+ define)	sitename="$domain"
+ 	;;
+ *)
+ 	;;
  esac
  
  # your organization name
Index: Rnmail.SH
Prereq: 4.3.2.1
*** Rnmail.SH	Thu Nov 22 22:50:14 1990
--- ../new/Rnmail.SH	Fri Nov 23 09:39:18 1990
***************
*** 1,5
  case $CONFIG in
!     '') . config.sh ;;
  esac
  echo "Extracting Rnmail (with variable substitutions)"
  $spitshell >Rnmail <<!GROK!THIS!

--- 1,5 -----
  case $CONFIG in
!     '') . ./config.sh ;;
  esac
  echo "Extracting Rnmail (with variable substitutions)"
  $spitshell >Rnmail <<!GROK!THIS!
***************
*** 4,10
  echo "Extracting Rnmail (with variable substitutions)"
  $spitshell >Rnmail <<!GROK!THIS!
  $startsh
! # $Header: Rnmail.SH,v 4.3.2.1 89/11/06 00:30:54 sob Locked $
  # 
  # $Log:	Rnmail.SH,v $
  # Revision 4.3.2.1  89/11/06  00:30:54  sob

--- 4,10 -----
  echo "Extracting Rnmail (with variable substitutions)"
  $spitshell >Rnmail <<!GROK!THIS!
  $startsh
! # $Header: Rnmail.SH,v 4.3.2.2 90/11/22 14:00:21 sob Exp $
  # 
  # $Log:	Rnmail.SH,v $
  # Revision 4.3.2.2  90/11/22  14:00:21  sob
***************
*** 7,12
  # $Header: Rnmail.SH,v 4.3.2.1 89/11/06 00:30:54 sob Locked $
  # 
  # $Log:	Rnmail.SH,v $
  # Revision 4.3.2.1  89/11/06  00:30:54  sob
  # Added RRN support from NNTP 1.5
  # 

--- 7,16 -----
  # $Header: Rnmail.SH,v 4.3.2.2 90/11/22 14:00:21 sob Exp $
  # 
  # $Log:	Rnmail.SH,v $
+ # Revision 4.3.2.2  90/11/22  14:00:21  sob
+ # Support added for hiding all hosts within a domain such that mail appears
+ # to come for user at domainname only.
+ # 
  # Revision 4.3.2.1  89/11/06  00:30:54  sob
  # Added RRN support from NNTP 1.5
  # 
***************
*** 51,56
  	;;
  undef) sitename="$sitename" ;;
  esac
  # your organization name
  orgname="$orgname"
  # what pager you use--if you have kernal paging use cat

--- 55,68 -----
  	;;
  undef) sitename="$sitename" ;;
  esac
+ 
+ case $hidden in
+ define)	sitename="$domain"
+ 	;;
+ *)
+ 	;;
+ esac
+ 
  # your organization name
  orgname="$orgname"
  # what pager you use--if you have kernal paging use cat
Index: art.help.SH
Prereq: 4.3
*** art.help.SH	Thu Nov 22 22:50:21 1990
--- ../new/art.help.SH	Fri Nov 23 09:39:25 1990
***************
*** 1,5
  case $CONFIG in
!     '') . config.sh ;;
  esac
  echo "Extracting art.help (with variable substitutions)"
  $spitshell >art.help <<!GROK!THIS!

--- 1,5 -----
  case $CONFIG in
!     '') . ./config.sh ;;
  esac
  echo "Extracting art.help (with variable substitutions)"
  $spitshell >art.help <<!GROK!THIS!
***************
*** 4,10
  echo "Extracting art.help (with variable substitutions)"
  $spitshell >art.help <<!GROK!THIS!
  $startsh
! # $Header: art.help.SH,v 4.3 85/05/01 11:35:34 lwall Exp $
  # 
  # $Log:	art.help.SH,v $
  # Revision 4.3  85/05/01  11:35:34  lwall

--- 4,10 -----
  echo "Extracting art.help (with variable substitutions)"
  $spitshell >art.help <<!GROK!THIS!
  $startsh
! # $Header: art.help.SH,v 4.3.2.1 90/11/22 16:16:23 sob Exp $
  # 
  # $Log:	art.help.SH,v $
  Revision 4.3.2.1  90/11/22  16:16:23  sob
***************
*** 7,12
  # $Header: art.help.SH,v 4.3 85/05/01 11:35:34 lwall Exp $
  # 
  # $Log:	art.help.SH,v $
  # Revision 4.3  85/05/01  11:35:34  lwall
  # Baseline for release with 4.3bsd.
  # 

--- 7,15 -----
  # $Header: art.help.SH,v 4.3.2.1 90/11/22 16:16:23 sob Exp $
  # 
  # $Log:	art.help.SH,v $
+ # Revision 4.3.2.1  90/11/22  16:16:23  sob
+ # Changed . config.sh to . ./config.sh
+ # 
  # Revision 4.3  85/05/01  11:35:34  lwall
  # Baseline for release with 4.3bsd.
  # 
Index: makedir.SH
Prereq: 4.3
*** makedir.SH	Thu Nov 22 22:50:31 1990
--- ../new/makedir.SH	Fri Nov 23 09:39:36 1990
***************
*** 1,5
  case $CONFIG in
!     '') . config.sh ;;
  esac
  echo "Extracting makedir (with variable substitutions)"
  $spitshell >makedir <<!GROK!THIS!

--- 1,5 -----
  case $CONFIG in
!     '') . ./config.sh ;;
  esac
  echo "Extracting makedir (with variable substitutions)"
  $spitshell >makedir <<!GROK!THIS!
***************
*** 4,10
  echo "Extracting makedir (with variable substitutions)"
  $spitshell >makedir <<!GROK!THIS!
  $startsh
! # $Header: makedir.SH,v 4.3 85/05/01 11:42:31 lwall Exp $
  # 
  # $Log:	makedir.SH,v $
  # Revision 4.3  85/05/01  11:42:31  lwall

--- 4,10 -----
  echo "Extracting makedir (with variable substitutions)"
  $spitshell >makedir <<!GROK!THIS!
  $startsh
! # $Header: makedir.SH,v 4.3.2.1 90/11/22 14:02:49 sob Exp $
  # 
  # $Log:	makedir.SH,v $
  # Revision 4.3.2.1  90/11/22  14:02:49  sob
***************
*** 7,12
  # $Header: makedir.SH,v 4.3 85/05/01 11:42:31 lwall Exp $
  # 
  # $Log:	makedir.SH,v $
  # Revision 4.3  85/05/01  11:42:31  lwall
  # Baseline for release with 4.3bsd.
  # 

--- 7,15 -----
  # $Header: makedir.SH,v 4.3.2.1 90/11/22 14:02:49 sob Exp $
  # 
  # $Log:	makedir.SH,v $
+ # 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: mbox.saver.SH
Prereq: 4.3.2.2
*** mbox.saver.SH	Thu Nov 22 22:49:41 1990
--- ../new/mbox.saver.SH	Fri Nov 23 09:39:33 1990
***************
*** 1,5
  case $CONFIG in
!     '') . config.sh ;;
  esac
  echo "Extracting mbox.saver (with variable substitutions)"
  $spitshell >mbox.saver <<!GROK!THIS!

--- 1,5 -----
  case $CONFIG in
!     '') . ./config.sh ;;
  esac
  echo "Extracting mbox.saver (with variable substitutions)"
  $spitshell >mbox.saver <<!GROK!THIS!
***************
*** 4,10
  echo "Extracting mbox.saver (with variable substitutions)"
  $spitshell >mbox.saver <<!GROK!THIS!
  $startsh
! # $Header: mbox.saver.SH,v 4.3.2.2 90/03/17 20:44:54 sob Exp $
  # 
  # $Log:	mbox.saver.SH,v $
  # Revision 4.3.2.2  90/03/17  20:44:54  sob

--- 4,10 -----
  echo "Extracting mbox.saver (with variable substitutions)"
  $spitshell >mbox.saver <<!GROK!THIS!
  $startsh
! # $Header: mbox.saver.SH,v 4.3.2.3 90/11/22 14:28:27 sob Exp $
  # 
  # $Log:	mbox.saver.SH,v $
  # Revision 4.3.2.3  90/11/22  14:28:27  sob
***************
*** 7,12
  # $Header: mbox.saver.SH,v 4.3.2.2 90/03/17 20:44:54 sob Exp $
  # 
  # $Log:	mbox.saver.SH,v $
  # Revision 4.3.2.2  90/03/17  20:44:54  sob
  # Modify Article header to place the colon after Article.
  # 

--- 7,15 -----
  # $Header: mbox.saver.SH,v 4.3.2.3 90/11/22 14:28:27 sob Exp $
  # 
  # $Log:	mbox.saver.SH,v $
+ # 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: newsetup.SH
Prereq: 4.3.2.7
*** newsetup.SH	Thu Nov 22 22:50:16 1990
--- ../new/newsetup.SH	Fri Nov 23 09:38:37 1990
***************
*** 5,11
  $spitshell >newsetup <<!GROK!THIS!
  $startsh
  
! # $Header: newsetup.SH,v 4.3.2.7 90/03/17 20:34:48 sob Exp $
  # 
  # $Log:	newsetup.SH,v $
  # Revision 4.3.2.7  90/03/17  20:34:48  sob

--- 5,11 -----
  $spitshell >newsetup <<!GROK!THIS!
  $startsh
  
! # $Header: newsetup.SH,v 4.3.2.8 90/11/22 13:26:55 sob Exp $
  # 
  # $Log:	newsetup.SH,v $
  # Revision 4.3.2.8  90/11/22  13:26:55  sob
***************
*** 8,13
  # $Header: newsetup.SH,v 4.3.2.7 90/03/17 20:34:48 sob Exp $
  # 
  # $Log:	newsetup.SH,v $
  # Revision 4.3.2.7  90/03/17  20:34:48  sob
  # Remove the /tmp/n.* files created when generating the .newsrc.
  # 

--- 8,16 -----
  # $Header: newsetup.SH,v 4.3.2.8 90/11/22 13:26:55 sob Exp $
  # 
  # $Log:	newsetup.SH,v $
+ # Revision 4.3.2.8  90/11/22  13:26:55  sob
+ # Purged unneeded code.
+ # 
  # Revision 4.3.2.7  90/03/17  20:34:48  sob
  # Remove the /tmp/n.* files created when generating the .newsrc.
  # 
***************
*** 68,151
  #NORMAL~*) active=\`$filexp \$active\` ;;
  #NORMALesac
  
- : NOTE: SED WILL NOT TAKE MORE THAN 9 WFILES, SO BEWARE   
- 
- $sort <\$active | $sed >/tmp/n.tmp\$\$	\\
- 	-e 's/^\([^ ]*\) .*\$/\1:/'	\\
- 	-e '/^control:/{'		\\
-  	-e "  s/:/!/"	\\
- 	-e "  w /tmp/n.test\$\$"	\\
- 	-e '  d'			\\
- 	-e '}'				\\
- 	-e '/^junk:/{'			\\
-  	-e "  s/:/!/"	\\
- 	-e "  w /tmp/n.test\$\$"	\\
- 	-e '  d'			\\
- 	-e '}'				\\
- 	-e '/test:/{'			\\
-  	-e "  s/:/!/"	\\
- 	-e "  w /tmp/n.test\$\$"	\\
- 	-e '  d'			\\
- 	-e '}'				\\
- 	-e "/^\$locorg\./{"		\\
- 	-e "  w /tmp/n.\$locorg\$\$"	\\
- 	-e '  d'			\\
- 	-e '}'				\\
- 	-e "/^\$organization\./{"	\\
- 	-e "  w /tmp/n.\$organization\$\$"	\\
- 	-e '  d'			\\
- 	-e '}'				\\
- 	-e "/^\$city\./{"		\\
- 	-e "  w /tmp/n.\$city\$\$"	\\
- 	-e '  d'			\\
- 	-e '}'				\\
- 	-e "/^\$cntry\./{" 		\\
- 	-e "  w /tmp/n.\$cntry\$\$"	\\
- 	-e '  d'			\\
- 	-e '}'				\\
- 	-e "/^\$state\./{" 		\\
- 	-e "  w /tmp/n.\$state\$\$"	\\
- 	-e '  d'			\\
- 	-e '}'
- 
- $sed </tmp/n.tmp\$\$ >/tmp/n.local\$\$	\\
- 	-e "/^\$cont\./{" 		\\
- 	-e "  w /tmp/n.\$cont\$\$"	\\
- 	-e '  d'			\\
- 	-e '}'
- 
- $sed </tmp/n.tmp\$\$ >/tmp/n.local\$\$	\\
- 	-e "/^to\./{"			\\
- 	-e "  s/:/!/"	\\
- 	-e "  w /tmp/n.to\$\$"		\\
- 	-e '  d'			\\
- 	-e '}'				\\
- 	-e "/^comp\./{"			\\
- 	-e "  w /tmp/n.comp\$\$"	\\
- 	-e '  d'			\\
- 	-e '}'				\\
- 	-e "/^news\./{"			\\
- 	-e "  w /tmp/n.news\$\$"	\\
- 	-e '  d'			\\
- 	-e '}'				\\
- 	-e "/^rec\./{"			\\
- 	-e "  w /tmp/n.rec\$\$"		\\
- 	-e '  d'			\\
- 	-e '}'				\\
- 	-e "/^sci\./{"			\\
- 	-e "  w /tmp/n.sci\$\$"		\\
- 	-e '  d'			\\
- 	-e '}'				\\
- 	-e "/^soc\./{"			\\
- 	-e "  w /tmp/n.soc\$\$"		\\
- 	-e '  d'			\\
- 	-e '}'				\\
- 	-e "/\./{"			\\
- 	-e "  w /tmp/n.misc\$\$"	\\
- 	-e '  d'			\\
- 	-e '}'
- 
- 
  if $test -s \$dotdir/.newsrc ; then
      $echo "Saving your current .newsrc as .oldnewsrc..."
      $mv -f \$dotdir/.newsrc \$dotdir/.oldnewsrc

--- 71,76 -----
  #NORMAL~*) active=\`$filexp \$active\` ;;
  #NORMALesac
  
  if $test -s \$dotdir/.newsrc ; then
      $echo "Saving your current .newsrc as .oldnewsrc..."
      $mv -f \$dotdir/.newsrc \$dotdir/.oldnewsrc
***************
*** 155,160
  
  $sed <\$active '
  	/^to\./d
  	s/ .*//
  	s/^/ /
  	s/^ '\$locorg'\./01&/

--- 80,86 -----
  
  $sed <\$active '
  	/^to\./d
+ 	/ [^mny][^ ]*$/d
  	s/ .*//
  	s/^/ /
  	s/^ '\$locorg'\./01&/
Index: ng.help.SH
Prereq: 4.3
*** ng.help.SH	Thu Nov 22 22:50:26 1990
--- ../new/ng.help.SH	Fri Nov 23 09:39:30 1990
***************
*** 1,5
  case $CONFIG in
!     '') . config.sh ;;
  esac
  echo "Extracting ng.help (with variable substitutions)"
  $spitshell >ng.help <<!GROK!THIS!

--- 1,5 -----
  case $CONFIG in
!     '') . ./config.sh ;;
  esac
  echo "Extracting ng.help (with variable substitutions)"
  $spitshell >ng.help <<!GROK!THIS!
***************
*** 4,10
  echo "Extracting ng.help (with variable substitutions)"
  $spitshell >ng.help <<!GROK!THIS!
  $startsh
! # $Header: ng.help.SH,v 4.3 85/05/01 11:44:34 lwall Exp $
  # 
  # $Log:	ng.help.SH,v $
  # Revision 4.3  85/05/01  11:44:34  lwall

--- 4,10 -----
  echo "Extracting ng.help (with variable substitutions)"
  $spitshell >ng.help <<!GROK!THIS!
  $startsh
! # $Header: ng.help.SH,v 4.3.2.1 90/11/22 16:17:54 sob Exp $
  # 
  # $Log:	ng.help.SH,v $
  Revision 4.3.2.1  90/11/22  16:17:54  sob
***************
*** 7,12
  # $Header: ng.help.SH,v 4.3 85/05/01 11:44:34 lwall Exp $
  # 
  # $Log:	ng.help.SH,v $
  # Revision 4.3  85/05/01  11:44:34  lwall
  # Baseline for release with 4.3bsd.
  # 

--- 7,15 -----
  # $Header: ng.help.SH,v 4.3.2.1 90/11/22 16:17:54 sob Exp $
  # 
  # $Log:	ng.help.SH,v $
+ # Revision 4.3.2.1  90/11/22  16:17:54  sob
+ # Changed . config.sh to . ./config.sh
+ # 
  # Revision 4.3  85/05/01  11:44:34  lwall
  # Baseline for release with 4.3bsd.
  # 
Index: norm.saver.SH
Prereq: 4.3.2.1
*** norm.saver.SH	Thu Nov 22 22:50:32 1990
--- ../new/norm.saver.SH	Fri Nov 23 09:39:36 1990
***************
*** 1,5
  case $CONFIG in
!     '') . config.sh ;;
  esac
  echo "Extracting norm.saver (with variable substitutions)"
  $spitshell >norm.saver <<!GROK!THIS!

--- 1,5 -----
  case $CONFIG in
!     '') . ./config.sh ;;
  esac
  echo "Extracting norm.saver (with variable substitutions)"
  $spitshell >norm.saver <<!GROK!THIS!
***************
*** 4,10
  echo "Extracting norm.saver (with variable substitutions)"
  $spitshell >norm.saver <<!GROK!THIS!
  $startsh
! # $Header: norm.saver.SH,v 4.3.2.1 89/11/28 00:08:01 sob Locked $
  # 
  # $Log:	norm.saver.SH,v $
  # Revision 4.3.2.1  89/11/28  00:08:01  sob

--- 4,10 -----
  echo "Extracting norm.saver (with variable substitutions)"
  $spitshell >norm.saver <<!GROK!THIS!
  $startsh
! # $Header: norm.saver.SH,v 4.3.2.2 90/11/22 15:44:06 sob Exp $
  # 
  # $Log:	norm.saver.SH,v $
  # Revision 4.3.2.2  90/11/22  15:44:06  sob
***************
*** 7,12
  # $Header: norm.saver.SH,v 4.3.2.1 89/11/28 00:08:01 sob Locked $
  # 
  # $Log:	norm.saver.SH,v $
  # Revision 4.3.2.1  89/11/28  00:08:01  sob
  # Branch for RN/RRN combo.
  # 

--- 7,15 -----
  # $Header: norm.saver.SH,v 4.3.2.2 90/11/22 15:44:06 sob Exp $
  # 
  # $Log:	norm.saver.SH,v $
+ # Revision 4.3.2.2  90/11/22  15:44:06  sob
+ # Changed . config.sh to . ./config.sh
+ # 
  # Revision 4.3.2.1  89/11/28  00:08:01  sob
  # Branch for RN/RRN combo.
  # 
Index: pager.help.SH
Prereq: 4.3
*** pager.help.SH	Thu Nov 22 22:50:28 1990
--- ../new/pager.help.SH	Fri Nov 23 09:39:31 1990
***************
*** 1,5
  case $CONFIG in
!     '') . config.sh ;;
  esac
  echo "Extracting pager.help (with variable substitutions)"
  $spitshell >pager.help <<!GROK!THIS!

--- 1,5 -----
  case $CONFIG in
!     '') . ./config.sh ;;
  esac
  echo "Extracting pager.help (with variable substitutions)"
  $spitshell >pager.help <<!GROK!THIS!
***************
*** 4,10
  echo "Extracting pager.help (with variable substitutions)"
  $spitshell >pager.help <<!GROK!THIS!
  $startsh
! # $Header: pager.help.SH,v 4.3 85/05/01 11:45:31 lwall Exp $
  #
  # $Log:	pager.help.SH,v $
  # Revision 4.3  85/05/01  11:45:31  lwall

--- 4,10 -----
  echo "Extracting pager.help (with variable substitutions)"
  $spitshell >pager.help <<!GROK!THIS!
  $startsh
! # $Header: pager.help.SH,v 4.3.2.1 90/11/22 17:15:25 sob Exp $
  #
  # $Log:	pager.help.SH,v $
  # Revision 4.3.2.1  90/11/22  17:15:25  sob
***************
*** 7,12
  # $Header: pager.help.SH,v 4.3 85/05/01 11:45:31 lwall Exp $
  #
  # $Log:	pager.help.SH,v $
  # Revision 4.3  85/05/01  11:45:31  lwall
  # Baseline for release with 4.3bsd.
  # 

--- 7,15 -----
  # $Header: pager.help.SH,v 4.3.2.1 90/11/22 17:15:25 sob Exp $
  #
  # $Log:	pager.help.SH,v $
+ # Revision 4.3.2.1  90/11/22  17:15:25  sob
+ # Changed . config.sh to . ./config.sh
+ # 
  # Revision 4.3  85/05/01  11:45:31  lwall
  # Baseline for release with 4.3bsd.
  # 
Index: rn.c
Prereq: 4.3.2.5
*** rn.c	Thu Nov 22 22:49:55 1990
--- ../new/rn.c	Fri Nov 23 09:38:59 1990
***************
*** 9,16
   *      RRN/RN: 11/01/89
  */
  
! static char rnid[] = "@(#)$Header: rn.c,v 4.3.2.5 90/11/06 01:19:43 sob Exp $";
! static char patchlevel[] = "Patch #: 48";
  
  /* $Log:	rn.c,v $
   * Revision 4.3.2.5  90/11/06  01:19:43  sob

--- 9,16 -----
   *      RRN/RN: 11/01/89
  */
  
! static char rnid[] = "@(#)$Header: rn.c,v 4.3.2.6 90/11/22 13:55:23 sob Exp $";
! static char patchlevel[] = "Patch #: 49";
  
  /* $Log:	rn.c,v $
   * Revision 4.3.2.6  90/11/22  13:55:23  sob
***************
*** 13,18
  static char patchlevel[] = "Patch #: 48";
  
  /* $Log:	rn.c,v $
   * Revision 4.3.2.5  90/11/06  01:19:43  sob
   * Checkpoint for patch 48
   * 

--- 13,21 -----
  static char patchlevel[] = "Patch #: 49";
  
  /* $Log:	rn.c,v $
+  * Revision 4.3.2.6  90/11/22  13:55:23  sob
+  * Checkpoint for patch #49
+  * 
   * Revision 4.3.2.5  90/11/06  01:19:43  sob
   * Checkpoint for patch 48
   * 
Index: subs.help.SH
Prereq: 4.3.2.1
*** subs.help.SH	Thu Nov 22 22:50:25 1990
--- ../new/subs.help.SH	Fri Nov 23 09:39:30 1990
***************
*** 1,5
  case $CONFIG in
!     '') . config.sh ;;
  esac
  echo "Extracting subs.help (with variable substitutions)"
  $spitshell >subs.help <<!GROK!THIS!

--- 1,5 -----
  case $CONFIG in
!     '') . ./config.sh ;;
  esac
  echo "Extracting subs.help (with variable substitutions)"
  $spitshell >subs.help <<!GROK!THIS!
***************
*** 4,10
  echo "Extracting subs.help (with variable substitutions)"
  $spitshell >subs.help <<!GROK!THIS!
  $startsh
! # $Header: subs.help.SH,v 4.3.2.1 89/11/26 18:38:47 sob Locked $
  # 
  # $Log:	subs.help.SH,v $
  # Revision 4.3.2.1  89/11/26  18:38:47  sob

--- 4,10 -----
  echo "Extracting subs.help (with variable substitutions)"
  $spitshell >subs.help <<!GROK!THIS!
  $startsh
! # $Header: subs.help.SH,v 4.3.2.2 90/11/22 17:08:57 sob Exp $
  # 
  # $Log:	subs.help.SH,v $
  # Revision 4.3.2.2  90/11/22  17:08:57  sob
***************
*** 7,14
  # $Header: subs.help.SH,v 4.3.2.1 89/11/26 18:38:47 sob Locked $
  # 
  # $Log:	subs.help.SH,v $
! # Revision 4.3.2.1  89/11/26  18:38:47  sob
! # *** empty log message ***
  # 
  # Revision 4.3  85/05/01  11:50:50  lwall
  # Baseline for release with 4.3bsd.

--- 7,14 -----
  # $Header: subs.help.SH,v 4.3.2.2 90/11/22 17:08:57 sob Exp $
  # 
  # $Log:	subs.help.SH,v $
! # Revision 4.3.2.2  90/11/22  17:08:57  sob
! # Changed . config.sh to . ./config.sh
  # 
  # Revision 4.3  85/05/01  11:50:50  lwall
  # Baseline for release with 4.3bsd.
Index: common.h
Prereq: 4.3.2.19
*** common.h.orig	Fri Nov 23 10:28:27 1990
--- ../../rn/common.h	Fri Nov 23 10:40:04 1990
***************
*** 1,4
! /* $Header: common.h,v 4.3.2.19 90/11/09 23:15:12 sob Exp $
   * 
   * $Log:	common.h,v $
   * Revision 4.3.2.19  90/11/09  23:15:12  sob

--- 1,4 -----
! /* $Header: common.h,v 4.3.2.21 90/11/23 10:39:49 sob Exp $
   * 
   * $Log:	common.h,v $
   * Revision 4.3.2.21  90/11/23  10:39:49  sob
***************
*** 1,6
  /* $Header: common.h,v 4.3.2.19 90/11/09 23:15:12 sob Exp $
   * 
   * $Log:	common.h,v $
   * Revision 4.3.2.19  90/11/09  23:15:12  sob
   * Added sys/stream.h since sys/ptem.h depends on it.
   * 

--- 1,13 -----
  /* $Header: common.h,v 4.3.2.21 90/11/23 10:39:49 sob Exp $
   * 
   * $Log:	common.h,v $
+  * 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.
   * 
***************
*** 97,103
  #include <signal.h>
  #ifdef IOCTL
  #include <sys/ioctl.h>
! #endif IOCTL
  
  #ifdef FCNTL
  #   include <fcntl.h>

--- 104,110 -----
  #include <signal.h>
  #ifdef IOCTL
  #include <sys/ioctl.h>
! #endif
  
  #ifdef FCNTL
  #   include <fcntl.h>
***************
*** 143,148
  /* some handy defs */
  
  #define bool char
  #define TRUE (1)
  #define FALSE (0)
  #define Null(t) ((t)0)

--- 150,156 -----
  /* some handy defs */
  
  #define bool char
+ #ifndef TRUE
  #define TRUE (1)
  #endif
  #ifndef FALSE
***************
*** 144,149
  
  #define bool char
  #define TRUE (1)
  #define FALSE (0)
  #define Null(t) ((t)0)
  #define Nullch Null(char *)

--- 152,159 -----
  #define bool char
  #ifndef TRUE
  #define TRUE (1)
+ #endif
+ #ifndef FALSE
  #define FALSE (0)
  #endif
  #define Null(t) ((t)0)
***************
*** 145,150
  #define bool char
  #define TRUE (1)
  #define FALSE (0)
  #define Null(t) ((t)0)
  #define Nullch Null(char *)
  #define Nullfp Null(FILE *)

--- 155,161 -----
  #endif
  #ifndef FALSE
  #define FALSE (0)
+ #endif
  #define Null(t) ((t)0)
  #define Nullch Null(char *)
  #define Nullfp Null(FILE *)
***************
*** 386,392
  #   ifdef TERSE
  #	define IF(c) if (c)
  #	define ELSE else
! #   else !TERSE
  #	define IF(c)
  #	define ELSE
  #   endif

--- 397,403 -----
  #   ifdef TERSE
  #	define IF(c) if (c)
  #	define ELSE else
! #   else
  #	define IF(c)
  #	define ELSE
  #   endif
***************
*** 390,396
  #	define IF(c)
  #	define ELSE
  #   endif
! #else !VERBOSE
  #   ifndef TERSE
  #	define TERSE
  #   endif

--- 401,407 -----
  #	define IF(c)
  #	define ELSE
  #   endif
! #else /* !VERBOSE */
  #   ifndef TERSE
  #	define TERSE
  #   endif
***************
*** 663,669
  #           define MBOXSAVER "%X/mbox.saver %P/rrn%a.%$ %P %c %a %B %C \"%b\" \"From %T %`date`\""
  #       else
  #	    define MBOXSAVER "%X/mbox.saver %A %P %c %a %B %C \"%b\" \"From %T %`date`\""
! #	endif SERVER
  #   else
  #	ifdef CONDSUB
  #           ifdef SERVER

--- 674,680 -----
  #           define MBOXSAVER "%X/mbox.saver %P/rrn%a.%$ %P %c %a %B %C \"%b\" \"From %T %`date`\""
  #       else
  #	    define MBOXSAVER "%X/mbox.saver %A %P %c %a %B %C \"%b\" \"From %T %`date`\""
! #	endif
  #   else
  #	ifdef CONDSUB
  #           ifdef SERVER
***************
*** 667,673
  #   else
  #	ifdef CONDSUB
  #           ifdef SERVER
! #               define MBOXSAVER "%X/mbox.saver %P/rrn%a.%$ %P %c %a %B %C \"%b\
   \"From %T %(%[date]=^\\(\\w*\\), \\(\\w*\\)-\\(\\w*\\)-\\(\\w*\\) \\([^ ]*\\)?
  %1 %3 %(%2=..?%2: %2) %5 19%4)\""
  #           else

--- 678,684 -----
  #   else
  #	ifdef CONDSUB
  #           ifdef SERVER
! #               define MBOXSAVER "%X/mbox.saver %P/rrn%a.%$ %P %c %a %B %C \"%b\"\
   \"From %T %(%[date]=^\\(\\w*\\), \\(\\w*\\)-\\(\\w*\\)-\\(\\w*\\) \\([^ ]*\\)?
  %1 %3 %(%2=..?%2: %2) %5 19%4)\""
  #           else
***************
*** 809,816
  EXT bool muck_up_clear INIT(FALSE);			/* -loco */
  EXT bool erase_screen INIT(FALSE);			/* -e */
  #ifdef CLEAREOL
! EXT bool can_home_clear INIT(FALSE);		/* fancy -e -- PWP */
! #endif CLEAREOL
  EXT bool findlast INIT(FALSE);			/* -r */
  EXT bool typeahead INIT(FALSE);			/* -T */
  #ifdef VERBOSE

--- 820,827 -----
  EXT bool muck_up_clear INIT(FALSE);			/* -loco */
  EXT bool erase_screen INIT(FALSE);			/* -e */
  #ifdef CLEAREOL
! EXT bool can_home_clear INIT(FALSE);		/* fancy -e */
! #endif
  EXT bool findlast INIT(FALSE);			/* -r */
  EXT bool typeahead INIT(FALSE);			/* -T */
  #ifdef VERBOSE
Index: term.c
Prereq: 4.3.2.10
*** term.c	Thu Nov 22 22:49:47 1990
--- ../new/term.c	Fri Nov 23 09:38:50 1990
***************
*** 1,4
! /* $Header: term.c,v 4.3.2.10 90/11/05 23:41:29 sob Exp $
   *
   * $Log:	term.c,v $
   * Revision 4.3.2.10  90/11/05  23:41:29  sob

--- 1,4 -----
! /* $Header: term.c,v 4.3.2.11 90/11/22 13:34:06 sob Exp $
   *
   * $Log:	term.c,v $
   * Revision 4.3.2.11  90/11/22  13:34:06  sob
***************
*** 1,6
  /* $Header: term.c,v 4.3.2.10 90/11/05 23:41:29 sob Exp $
   *
   * $Log:	term.c,v $
   * Revision 4.3.2.10  90/11/05  23:41:29  sob
   * Now it's gone.
   * 

--- 1,9 -----
  /* $Header: term.c,v 4.3.2.11 90/11/22 13:34:06 sob Exp $
   *
   * $Log:	term.c,v $
+  * Revision 4.3.2.11  90/11/22  13:34:06  sob
+  * Added a change to circfill to make it work with POSIX-compliant OSes.
+  * 
   * Revision 4.3.2.10  90/11/05  23:41:29  sob
   * Now it's gone.
   * 
***************
*** 206,212
      CD = Tgetstr("cd");			/* clear to end of display */
      if (!*CE || !*CD || (!*CM && !*HO))	/* can we CE, CD, and home? */
  	can_home_clear = FALSE;		/*  no, so disable use of clear eol */
! #endif CLEAREOL
      SO = Tgetstr("so");			/* begin standout */
      SE = Tgetstr("se");			/* end standout */
      if ((SG = tgetnum("sg"))<0)

--- 209,215 -----
      CD = Tgetstr("cd");			/* clear to end of display */
      if (!*CE || !*CD || (!*CM && !*HO))	/* can we CE, CD, and home? */
  	can_home_clear = FALSE;		/*  no, so disable use of clear eol */
! #endif /* CLEAREOL */
      SO = Tgetstr("so");			/* begin standout */
      SE = Tgetstr("se");			/* end standout */
      if ((SG = tgetnum("sg"))<0)
***************
*** 346,352
      map = (KEYMAP*)safemalloc(sizeof(KEYMAP));
  #else
      map = Null(KEYMAP*);
! #endif lint
      for (i=127; i>=0; --i) {
  	map->km_ptr[i].km_km = Null(KEYMAP*);
  	map->km_type[i] = KM_NOTHIN;

--- 349,355 -----
      map = (KEYMAP*)safemalloc(sizeof(KEYMAP));
  #else
      map = Null(KEYMAP*);
! #endif /* lint */
      for (i=127; i>=0; --i) {
  	map->km_ptr[i].km_km = Null(KEYMAP*);
  	map->km_type[i] = KM_NOTHIN;
***************
*** 620,625
  {
      register int Howmany = read(devtty,circlebuf+nextin,1);
  
      if (Howmany) {
  	nextin += Howmany;
  	nextin %= PUSHSIZE;

--- 623,630 -----
  {
      register int Howmany = read(devtty,circlebuf+nextin,1);
  
+     if (Howmany < 0 && errno == EAGAIN)	/* POSIX sez this is how it works */
+ 	Howmany = 0;
      if (Howmany) {
  	nextin += Howmany;
  	nextin %= PUSHSIZE;
***************
*** 626,633
      }
      return Howmany;
  }
! #endif PENDING
! #endif FIONREAD
  
  void
  pushchar(c)

--- 631,638 -----
      }
      return Howmany;
  }
! #endif /* PENDING */
! #endif /* FIONREAD */
  
  void
  pushchar(c)
***************
*** 643,649
      circlebuf[nextout] = c;
  }
  
! #else PUSHBACK
  #ifndef read_tty
  /* read a character from the terminal, with hacks for O_NDELAY reads */
  

--- 648,654 -----
      circlebuf[nextout] = c;
  }
  
! #else /* PUSHBACK */
  #ifndef read_tty
  /* read a character from the terminal, with hacks for O_NDELAY reads */
  
***************
*** 665,672
  	return size;
      }
  }
! #endif read_tty
! #endif PUSHBACK
  
  /* print an underlined string, one way or another */
  

--- 670,677 -----
  	return size;
      }
  }
! #endif /* read_tty */
! #endif /* PUSHBACK */
  
  /* print an underlined string, one way or another */
  
***************
*** 1061,1067
  	tputs (HO, 1, putchr);	/* home via HO */
      }
  }
! #endif CLEAREOL
  
  
  void

--- 1066,1072 -----
  	tputs (HO, 1, putchr);	/* home via HO */
      }
  }
! #endif
  
  
  void
Index: term.h
Prereq: 4.3.2.4
*** term.h	Thu Nov 22 22:50:10 1990
--- ../new/term.h	Fri Nov 23 09:39:14 1990
***************
*** 1,4
! /* $Header: term.h,v 4.3.2.4 90/11/05 23:54:49 sob Exp $
   *
   * $Log:	term.h,v $
   * Revision 4.3.2.4  90/11/05  23:54:49  sob

--- 1,4 -----
! /* $Header: term.h,v 4.3.2.5 90/11/22 13:48:09 sob Exp $
   *
   * $Log:	term.h,v $
   * Revision 4.3.2.5  90/11/22  13:48:09  sob
***************
*** 1,6
  /* $Header: term.h,v 4.3.2.4 90/11/05 23:54:49 sob Exp $
   *
   * $Log:	term.h,v $
   * Revision 4.3.2.4  90/11/05  23:54:49  sob
   * changed maybe_eol to test when erase_screen is FALSE intstead of TRUE.
   * 

--- 1,9 -----
  /* $Header: term.h,v 4.3.2.5 90/11/22 13:48:09 sob Exp $
   *
   * $Log:	term.h,v $
+  * Revision 4.3.2.5  90/11/22  13:48:09  sob
+  * Backed out change in Patch 48.
+  * 
   * Revision 4.3.2.4  90/11/05  23:54:49  sob
   * changed maybe_eol to test when erase_screen is FALSE intstead of TRUE.
   * 
***************
*** 35,42
  #define input_pending() (nextin!=nextout || (ioctl(0, FIONREAD, &iocount),(int)iocount))
  #else
  #define input_pending() bizarre
! #endif lint
! #else FIONREAD
  #ifdef RDCHK
  #define input_pending() (rdchk(0) > 0)		/* boolean only */
  #else /*  RDCHK */

--- 38,45 -----
  #define input_pending() (nextin!=nextout || (ioctl(0, FIONREAD, &iocount),(int)iocount))
  #else
  #define input_pending() bizarre
! #endif /* lint */
! #else /* FIONREAD */
  #ifdef RDCHK
  #define input_pending() (rdchk(0) > 0)		/* boolean only */
  #else /*  RDCHK */
***************
*** 46,52
  #define input_pending() (nextin!=nextout || circfill())
  #else
  #define input_pending() bizarre
! #endif lint
  #endif /* RDCHK */
  #endif FIONREAD
  #else PENDING

--- 49,55 -----
  #define input_pending() (nextin!=nextout || circfill())
  #else
  #define input_pending() bizarre
! #endif /* lint */
  #endif /* RDCHK */
  #endif /* FIONREAD */
  #else /* PENDING */
***************
*** 48,55
  #define input_pending() bizarre
  #endif lint
  #endif /* RDCHK */
! #endif FIONREAD
! #else PENDING
  #ifndef lint
  #define input_pending() (nextin!=nextout)
  #else

--- 51,58 -----
  #define input_pending() bizarre
  #endif /* lint */
  #endif /* RDCHK */
! #endif /* FIONREAD */
! #else /* PENDING */
  #ifndef lint
  #define input_pending() (nextin!=nextout)
  #else
***************
*** 54,62
  #define input_pending() (nextin!=nextout)
  #else
  #define input_pending() bizarre
! #endif lint
! #endif PENDING
! #else PUSHBACK
  #ifdef PENDING
  #ifdef FIONREAD	/* must have FIONREAD or O_NDELAY for input_pending() */
  #define read_tty(addr,size) read(0,addr,size)

--- 57,65 -----
  #define input_pending() (nextin!=nextout)
  #else
  #define input_pending() bizarre
! #endif /* lint */
! #endif /* PENDING */
! #else /* PUSHBACK */
  #ifdef PENDING
  #ifdef FIONREAD	/* must have FIONREAD or O_NDELAY for input_pending() */
  #define read_tty(addr,size) read(0,addr,size)
***************
*** 64,70
  #define input_pending() (ioctl(0, FIONREAD, &iocount),(int)iocount)
  #else
  #define input_pending() bizarre
! #endif lint
  EXT long iocount INIT(0);
  
  #else FIONREAD

--- 67,73 -----
  #define input_pending() (ioctl(0, FIONREAD, &iocount),(int)iocount)
  #else
  #define input_pending() bizarre
! #endif /* lint */
  EXT long iocount INIT(0);
  
  #else /* FIONREAD */
***************
*** 67,73
  #endif lint
  EXT long iocount INIT(0);
  
! #else FIONREAD
  
  #ifdef RDCHK
  #define input_pending() (rdchk(0) > 0)		/* boolean only */

--- 70,76 -----
  #endif /* lint */
  EXT long iocount INIT(0);
  
! #else /* FIONREAD */
  
  #ifdef RDCHK
  #define input_pending() (rdchk(0) > 0)		/* boolean only */
***************
*** 80,86
  #define input_pending() (is_input || (is_input=read(devtty,&pending_ch,1)))
  #else
  #define input_pending() bizarre
! #endif lint
  #endif /*  RDCHK */
  #endif FIONREAD
  #else PENDING

--- 83,89 -----
  #define input_pending() (is_input || (is_input=read(devtty,&pending_ch,1)))
  #else
  #define input_pending() bizarre
! #endif /* lint */
  #endif /*  RDCHK */
  #endif /* FIONREAD */
  #else /* PENDING */
***************
*** 82,89
  #define input_pending() bizarre
  #endif lint
  #endif /*  RDCHK */
! #endif FIONREAD
! #else PENDING
  #define read_tty(addr,size) read(0,addr,size)
  #define input_pending() (FALSE)
  #endif PENDING

--- 85,92 -----
  #define input_pending() bizarre
  #endif /* lint */
  #endif /*  RDCHK */
! #endif /* FIONREAD */
! #else /* PENDING */
  #define read_tty(addr,size) read(0,addr,size)
  #define input_pending() (FALSE)
  #endif /* PENDING */
***************
*** 86,93
  #else PENDING
  #define read_tty(addr,size) read(0,addr,size)
  #define input_pending() (FALSE)
! #endif PENDING
! #endif PUSHBACK
  
  /* stuff wanted by terminal mode diddling routines */
  

--- 89,96 -----
  #else /* PENDING */
  #define read_tty(addr,size) read(0,addr,size)
  #define input_pending() (FALSE)
! #endif /* PENDING */
! #endif /* PUSHBACK */
  
  /* stuff wanted by terminal mode diddling routines */
  
***************
*** 132,138
  EXT int lflusho INIT(LFLUSHO);
  #else
  EXT long lflusho INIT(LFLUSHO);
! #endif lint
  #define unflush_output() (ioctl(_tty_ch,TIOCLBIC,&lflusho))
  #else
  #define unflush_output()

--- 135,141 -----
  EXT int lflusho INIT(LFLUSHO);
  #else
  EXT long lflusho INIT(LFLUSHO);
! #endif /* lint */
  #define unflush_output() (ioctl(_tty_ch,TIOCLBIC,&lflusho))
  #else
  #define unflush_output()
***************
*** 136,143
  #define unflush_output() (ioctl(_tty_ch,TIOCLBIC,&lflusho))
  #else
  #define unflush_output()
! #endif LFLUSHO
! #endif TERMIO
  
  #ifdef TIOCSTI
  #ifdef lint

--- 139,146 -----
  #define unflush_output() (ioctl(_tty_ch,TIOCLBIC,&lflusho))
  #else
  #define unflush_output()
! #endif /* LFLUSHO */
! #endif /* TERMIO */
  
  #ifdef TIOCSTI
  #ifdef lint
***************
*** 144,150
  #define forceme(c) ioctl(_tty_ch,TIOCSTI,Null(long*))	/* ghad! */
  #else
  #define forceme(c) ioctl(_tty_ch,TIOCSTI,c) /* pass character in " " */
! #endif lint
  #else
  #define forceme(c)
  #endif

--- 147,153 -----
  #define forceme(c) ioctl(_tty_ch,TIOCSTI,Null(long*))	/* ghad! */
  #else
  #define forceme(c) ioctl(_tty_ch,TIOCSTI,c) /* pass character in " " */
! #endif /* lint */
  #else
  #define forceme(c)
  #endif
***************
*** 167,173
  EXT char *CM INIT(Nullch);		/* cursor motion */
  EXT char *HO INIT(Nullch);		/* home cursor */
  EXT char *CD INIT(Nullch);		/* clear to end of display */
! #endif CLEAREOL
  EXT char *SO INIT(Nullch);		/* begin standout mode */
  EXT char *SE INIT(Nullch);		/* end standout mode */
  EXT int SG INIT(0);		/* blanks left by SO and SE */

--- 170,176 -----
  EXT char *CM INIT(Nullch);		/* cursor motion */
  EXT char *HO INIT(Nullch);		/* home cursor */
  EXT char *CD INIT(Nullch);		/* clear to end of display */
! #endif /* CLEAREOL */
  EXT char *SO INIT(Nullch);		/* begin standout mode */
  EXT char *SE INIT(Nullch);		/* end standout mode */
  EXT int SG INIT(0);		/* blanks left by SO and SE */
***************
*** 191,197
  #ifdef CLEAREOL
  #define clear_rest() tputs(CD,LINES,putchr) FLUSH
  #define maybe_eol() if(!erase_screen&&can_home_clear)tputs(CE,1,putchr) FLUSH
! #endif CLEAREOL
  #define underline() tputs(US,1,putchr) FLUSH
  #define un_underline() tputs(UE,1,putchr) FLUSH
  #define underchar() tputs(UC,0,putchr) FLUSH

--- 194,200 -----
  #ifdef CLEAREOL
  #define clear_rest() tputs(CD,LINES,putchr) FLUSH
  #define maybe_eol() if(!erase_screen&&can_home_clear)tputs(CE,1,putchr) FLUSH
! #endif /* CLEAREOL */
  #define underline() tputs(US,1,putchr) FLUSH
  #define un_underline() tputs(UE,1,putchr) FLUSH
  #define underchar() tputs(UC,0,putchr) FLUSH
***************
*** 237,243
  void	reprint();
  #ifdef CLEAREOL
  void	home_cursor();
! #endif CLEAREOL
  #ifdef SIGWINCH
  int	winch_catcher();
  #endif /* SIGWINCH */

--- 240,246 -----
  void	reprint();
  #ifdef CLEAREOL
  void	home_cursor();
! #endif
  #ifdef SIGWINCH
  int	winch_catcher();
  #endif /* SIGWINCH */
*** patchlevel	Thu Nov 22 22:49:27 1990
--- ../new/patchlevel	Fri Nov 23 09:38:31 1990
***************
*** 1,2
! Patch #: 48
  

--- 1,2 -----
! Patch #: 49
  



More information about the Comp.sources.bugs mailing list