Rn bug patch #19 (REPOSTED)

Jonathan Biggar jonab at sdcrdcf.UUCP
Sat Nov 17 10:04:56 AEST 1984


System: rn version 4.1
Bug #: 19
Priority: LOW
Subject: Pnews can say misleading things about distributions.
Index: Pnews.SH
Prereq: 4.1.1.2

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:	From rn, say "| patch -d DIR", where DIR is your rn source directory.
	Outside of rn, say "cd DIR; patch <thisarticle".  If you don't have
	the patch program, apply the following by hand, or get patch.

	This patch must be applied only to a revision 4.1.1.2 Pnews.SH
	(with patch #16 applied).  Then run Pnews.SH and reinstall Pnews.

*** /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.'
      ;;
  *.*)



More information about the Comp.sources.bugs mailing list