[net.news.b] rn bugs #18-19

lwall@sdcrdcf.UUCP (Larry Wall) (10/24/84)

#!/bin/sh
: make a subdirectory, cd to it, and run this through sh.
echo 'If this kit is complete, "End of kit" will echo at the end'
echo Extracting index
cat >index <<'!STUFFY!FUNK!'
bug1:	Subject: %i and %R use old Article-I.D. line
bug2:	Subject: rn may get confused about minimum article numbers
bug3:	Subject: rn on System V--circular dependency
bug4:	Subject: 2.10.2 disables checkexpired() optimization.
bug5:	Subject: Xref patch for 2.10.1 inews is wrong.
bug6:	Subject: articles saved to mailbox start with "From: " instead of "From ".
bug7:	Subject: core dump on portable rn
bug8:	Subject: <sys/ioctl> not found on V7
bug9:	Subject: int vs. long
bug10:	Subject: %d vs %ld
bug11:	Subject: R and F may not include article.
bug12:	Subject: missing free() on pdp11's
bug13:	Subject: switch bugs
bug14:	Subject: missing ; if DEBUGGING not defined
bug15:	Subject: (Mail) happens inappropriately.
bug16:	Subject: & substitution in fullname incorrect
bug17:	Subject: null junk files and checkgroups that want to remove everything
bug18:	Subject: rn does switches before looking up baud rate
bug19:	Subject: Pnews can say misleading things about distributions.
!STUFFY!FUNK!
echo Extracting bug18
cat >bug18 <<'!STUFFY!FUNK!'
System: rn version 4.1
Bug #: 18
Subject: rn does switches before looking up baud rate
Index: init.c
From: pur-ee!Physics:crl  (Charles LaBrec)

Description:
	In init.c, initialize() calls sw_init() before term_init().  The
	problem is that the baud rate is picked up in term_init(), so that
	if you try to use the baud rate-dependent form of a switch, 9600
	baud is always assumed (ospeed is 0).  

Fix:	Move the call to term_init() to a place before sw_init().

	Install either init.c.18-c (diff -c) by hand or init.c.18-e (diff -e)
	using ed.  The -e version must be applied only to a stock revision
	4.1 init.c.

!STUFFY!FUNK!
echo Extracting init.c.18-c
cat >init.c.18-c <<'!STUFFY!FUNK!'
*** /tmp/,RCSt1001458	Mon Oct 22 14:42:06 1984
--- /tmp/,RCSt2001458	Mon Oct 22 14:42:08 1984
***************
*** 1,4
! /* $Header: init.c,v 4.1 84/09/24 11:56:37 lwall Exp $
   *
   * $Log:	init.c,v $
   * Revision 4.1  84/09/24  11:56:37  lwall

--- 1,4 -----
! /* $Header: init.c,v 4.1.1.2 84/10/22 14:40:14 lwall Exp $
   *
   * $Log:	init.c,v $
   * Revision 4.1.1.2  84/10/22  14:40:14  lwall
***************
*** 1,6
  /* $Header: init.c,v 4.1 84/09/24 11:56:37 lwall Exp $
   *
   * $Log:	init.c,v $
   * Revision 4.1  84/09/24  11:56:37  lwall
   * Real baseline.
   * 

--- 1,12 -----
  /* $Header: init.c,v 4.1.1.2 84/10/22 14:40:14 lwall Exp $
   *
   * $Log:	init.c,v $
+  * Revision 4.1.1.2  84/10/22  14:40:14  lwall
+  * Moved term_init() earlier than sw_init() so ospeed gets set for switches.
+  * 
+  * Revision 4.1.1.1  84/09/25  13:22:45  lwall
+  * Branch for sdcrdcf changes.
+  * 
   * Revision 4.1  84/09/24  11:56:37  lwall
   * Real baseline.
   * 
***************
*** 58,63
      tcbuf = safemalloc(1024);		/* make temp buffer for termcap and */
  					/* other initialization stuff */
      
      /* decode switches */
  
      sw_init(argc,argv,tcbuf);               /* must not do % interps! */

--- 64,75 -----
      tcbuf = safemalloc(1024);		/* make temp buffer for termcap and */
  					/* other initialization stuff */
      
+     /* init terminal */
+     
+     term_init(tcbuf);			/* must precede sw_init() so that */
+ 					/* ospeed is set for baud-rate */
+ 					/* switches. */
+ 
      /* decode switches */
  
      sw_init(argc,argv,tcbuf);               /* must not do % interps! */
***************
*** 78,84
  	finalize(1);
      }
  
!     /* init signals, status flags and terminal stuff */
  
      final_init();
      term_init(tcbuf);

--- 90,96 -----
  	finalize(1);
      }
  
!     /* init signals, status flags */
  
      final_init();
      
***************
*** 81,87
      /* init signals, status flags and terminal stuff */
  
      final_init();
-     term_init(tcbuf);
      
      /* get info on last rn run, if any */
  

--- 93,98 -----
      /* init signals, status flags */
  
      final_init();
      
      /* get info on last rn run, if any */
  
!STUFFY!FUNK!
echo Extracting init.c.18-e
sed >init.c.18-e <<'!STUFFY!FUNK!' -e 's/X//'
X84d
X81c
X    /* init signals, status flags */
X.
X60a
X    /* init terminal */
X    
X    term_init(tcbuf);			/* must precede sw_init() so that */
X					/* ospeed is set for baud-rate */
X					/* switches. */
X
X.
X3a
X * Revision 4.1.1.2  84/10/22  14:40:14  lwall
X * Moved term_init() earlier than sw_init() so ospeed gets set for switches.
X * 
X * Revision 4.1.1.1  84/09/25  13:22:45  lwall
X * Branch for sdcrdcf changes.
X * 
X.
X1c
X/* $Header: init.c,v 4.1.1.2 84/10/22 14:40:14 lwall Exp $
X.
!STUFFY!FUNK!
echo Extracting bug19
cat >bug19 <<'!STUFFY!FUNK!'
System: rn version 4.1
Bug #: 19
Subject: Pnews can say misleading things about distributions.
Index: Pnews.SH

Description:
	When posting to a local newsgroup, Pnews still prompts for
	Distribution with a default of "net".  When Pnews is invoked with a
	-h, an explicit Distribution of "net" gives warnings as if the
	distribution is the current machine rather than the world.  Also,
	the wrong distribution warning may get selected if one distribution
	name is a prefix of another.

Fix:	Install either Pnews.SH.19-c (diff -c) by hand or Pnews.SH.19-e
	(diff -e) using ed.  (The -e version must be applied only to a
	revision 4.1.1.2 Pnews.SH (with patch #16 applied).)  Then run
	Pnews.SH and reinstall Pnews.
!STUFFY!FUNK!
echo Extracting Pnews.SH.19-c
cat >Pnews.SH.19-c <<'!STUFFY!FUNK!'
*** /tmp/,RCSt1002457	Mon Oct 22 15:18:14 1984
--- /tmp/,RCSt2002457	Mon Oct 22 15:18:20 1984
***************
*** 4,10
  echo "Extracting Pnews (with variable substitutions)"
  $spitshell >Pnews <<!GROK!THIS!
  $startsh
! # $Header: Pnews.SH,v 4.1.1.2 84/10/15 17:28:28 lwall Exp $
  #
  # $Log:	Pnews.SH,v $
  # Revision 4.1.1.2  84/10/15  17:28:28  lwall

--- 4,10 -----
  echo "Extracting Pnews (with variable substitutions)"
  $spitshell >Pnews <<!GROK!THIS!
  $startsh
! # $Header: Pnews.SH,v 4.1.1.3 84/10/22 15:16:35 lwall Exp $
  #
  # $Log:	Pnews.SH,v $
  # Revision 4.1.1.3  84/10/22  15:16:35  lwall
***************
*** 7,12
  # $Header: Pnews.SH,v 4.1.1.2 84/10/15 17:28:28 lwall Exp $
  #
  # $Log:	Pnews.SH,v $
  # Revision 4.1.1.2  84/10/15  17:28:28  lwall
  # Fixed & fullname substitution for bsd names.
  # 

--- 7,15 -----
  # $Header: Pnews.SH,v 4.1.1.3 84/10/22 15:16:35 lwall Exp $
  #
  # $Log:	Pnews.SH,v $
+ # Revision 4.1.1.3  84/10/22  15:16:35  lwall
+ # Cleaned up distribution code some.
+ # 
  # Revision 4.1.1.2  84/10/15  17:28:28  lwall
  # Fixed & fullname substitution for bsd names.
  # 
***************
*** 156,161
  	ng=`$echo "$ng" | $sed 's/[, ] */,/g'`
  	;;
      esac
  
      dist=h
      while $test "$dist" = h ; do

--- 159,172 -----
  	ng=`$echo "$ng" | $sed 's/[, ] */,/g'`
  	;;
      esac
+     case $ng in
+     net.*|fa.*|mod.*)
+ 	defdist=net
+ 	;;
+     *)
+ 	defdist=`expr "X$ng" : 'X\([a-z]*\)'`
+ 	;;
+     esac
  
      dist=h
      while $test "$dist" = h ; do
***************
*** 171,177
  	Everywhere:		net,mod,fa
  
  EOM
! 	$echo $n "Distribution (net): $c"
  	read dist
  	case $dist in
  	h)

--- 182,188 -----
  	Everywhere:		net,mod,fa
  
  EOM
! 	$echo $n "Distribution ($defdist): $c"
  	read dist
  	case $dist in
  	'') dist=$defdist ;;
***************
*** 174,179
  	$echo $n "Distribution (net): $c"
  	read dist
  	case $dist in
  	h)
  	    $cat <<'EOH'
  

--- 185,193 -----
  	$echo $n "Distribution ($defdist): $c"
  	read dist
  	case $dist in
+ 	'') dist=$defdist ;;
+ 	esac
+ 	case $dist in
  	h)
  	    $cat <<'EOH'
  
***************
*** 295,300
  	;;
      esac
      ;;
  esac
  shift
  

--- 309,317 -----
  	;;
      esac
      ;;
+ *)
+     set $1 $2.whatever
+     ;;
  esac
  shift
  
***************
*** 317,323
  net.*)
      $echo 'This program posts news to many hundreds of machines throughout the world.'
      ;;
! $cont*)
      $echo 'This program posts news to many machines throughout the continent.'
      ;;
  $cntry*)

--- 334,340 -----
  net.*)
      $echo 'This program posts news to many hundreds of machines throughout the world.'
      ;;
! $cont.*)
      $echo 'This program posts news to many machines throughout the continent.'
      ;;
  $cntry.*)
***************
*** 320,326
  $cont*)
      $echo 'This program posts news to many machines throughout the continent.'
      ;;
! $cntry*)
      $echo 'This program posts news to many machines throughout the country.'
      ;;
  $state*)

--- 337,343 -----
  $cont.*)
      $echo 'This program posts news to many machines throughout the continent.'
      ;;
! $cntry.*)
      $echo 'This program posts news to many machines throughout the country.'
      ;;
  $state.*)
***************
*** 323,329
  $cntry*)
      $echo 'This program posts news to many machines throughout the country.'
      ;;
! $state*)
      $echo 'This program posts news to many machines throughout the state.'
      ;;
  $city*)

--- 340,346 -----
  $cntry.*)
      $echo 'This program posts news to many machines throughout the country.'
      ;;
! $state.*)
      $echo 'This program posts news to many machines throughout the state.'
      ;;
  $city.*)
***************
*** 326,332
  $state*)
      $echo 'This program posts news to many machines throughout the state.'
      ;;
! $city*)
      $echo 'This program posts news to many machines throughout the city.'
      ;;
  $org*)

--- 343,349 -----
  $state.*)
      $echo 'This program posts news to many machines throughout the state.'
      ;;
! $city.*)
      $echo 'This program posts news to many machines throughout the city.'
      ;;
  $org.*)
***************
*** 329,335
  $city*)
      $echo 'This program posts news to many machines throughout the city.'
      ;;
! $org*)
      $echo 'This program posts news to machines throughout the organization.'
      ;;
  $loc*)

--- 346,352 -----
  $city.*)
      $echo 'This program posts news to many machines throughout the city.'
      ;;
! $org.*)
      $echo 'This program posts news to machines throughout the organization.'
      ;;
  $loc.*)
***************
*** 332,338
  $org*)
      $echo 'This program posts news to machines throughout the organization.'
      ;;
! $loc*)
      $echo 'This program posts news to machines throughout the local organization.'
      ;;
  *.*)

--- 349,355 -----
  $org.*)
      $echo 'This program posts news to machines throughout the organization.'
      ;;
! $loc.*)
      $echo 'This program posts news to machines throughout the local organization.'
      ;;
  *.*)
!STUFFY!FUNK!
echo Extracting Pnews.SH.19-e
sed >Pnews.SH.19-e <<'!STUFFY!FUNK!' -e 's/X//'
X335c
X$loc.*)
X.
X332c
X$org.*)
X.
X329c
X$city.*)
X.
X326c
X$state.*)
X.
X323c
X$cntry.*)
X.
X320c
X$cont.*)
X.
X297a
X*)
X    set $1 $2.whatever
X    ;;
X.
X176a
X	'') dist=$defdist ;;
X	esac
X	case $dist in
X.
X174c
X	$echo $n "Distribution ($defdist): $c"
X.
X158a
X    case $ng in
X    net.*|fa.*|mod.*)
X	defdist=net
X	;;
X    *)
X	defdist=`expr "X$ng" : 'X\([a-z]*\)'`
X	;;
X    esac
X.
X9a
X# Revision 4.1.1.3  84/10/22  15:16:35  lwall
X# Cleaned up distribution code some.
X# 
X.
X7c
X# $Header: Pnews.SH,v 4.1.1.3 84/10/22 15:16:35 lwall Exp $
X.
!STUFFY!FUNK!
echo ""
echo "End of kit"
: I do not append .signature, but someone might mail this.
exit