System: dist version 1.0
Patch #: 3
Priority: MEDIUM-LOW
Subject: Fixed a slight Configure botch, and added RCS headers
From: lwall@jpl-devvax.jpl.nasa.gov (Larry Wall)
From: Rich Salz <rsalz@pineapple.bbn.com>

Description:
	Configure picked out too many .SH files if .SH was mentioned
	in the comments of MANIFEST.

	The pat files had no RCS headers.

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

	If patch indicates that patchlevel is the wrong version, you may need
	to apply one or more previous patches, or the patch may already
	have been applied.  See the patchlevel.h file to find out what has or
	has not been applied.  In any event, don't continue with the patch.

	If you are missing previous patches they can be obtained from me:

	Larry Wall
	lwall@jpl-devvax.jpl.nasa.gov

	If you send a mail message of the following form it will greatly speed
	processing:

	Subject: Command
	@SH mailpatch PATH dist 1.0 LIST
		   ^ note the c

	where PATH is a return path FROM ME TO YOU in Internet notation, and
	LIST is the number of one or more patches you need, separated by spaces,
	commas, and/or hyphens.  Saying 35- says everything from 35 to the end.

	You can also get the patches via anonymous FTP from
	jpl-devvax.jpl.nasa.gov (128.149.8.43).

Index: patchlevel.h
Prereq: 2
1c1
< #define PATCHLEVEL 2
---
> #define PATCHLEVEL 3
 
Index: Configure
Prereq: 1.0
*** Configure.old	Thu Jan 28 17:09:18 1988
--- Configure	Thu Jan 28 17:09:19 1988
***************
*** 8,14 ****
  # and edit it to reflect your system.  Some packages may include samples
  # of config.h for certain machines, so you might look for one of those.)
  #
! # $Header: Configure,v 1.0 87/05/22 12:05:59 lwall Exp $
  #
  # Yes, you may rip this off to use in other distribution packages.
  # (Note: this Configure script was generated automatically.  Rather than
--- 8,14 ----
  # and edit it to reflect your system.  Some packages may include samples
  # of config.h for certain machines, so you might look for one of those.)
  #
! # $Header: Configure,v 1.0.1.1 88/01/28 17:02:37 lwall Exp $
  #
  # Yes, you may rip this off to use in other distribution packages.
  # (Note: this Configure script was generated automatically.  Rather than
***************
*** 101,107 ****
  trap 'echo " "; rm -f $rmlist; exit 1' 1 2 3
  attrlist="mc68000 sun gcos unix ibm gimpel interdata tss os mert pyr"
  attrlist="$attrlist vax pdp11 i8086 z8000 u3b2 u3b5 u3b20 u3b200"
! attrlist="$attrlist ns32000 ns16000 iAPX286"
  pth="/usr/ucb /bin /usr/bin /usr/local /usr/local/bin /usr/lbin /etc /usr/lib"
  defvoidused=7
  
--- 101,107 ----
  trap 'echo " "; rm -f $rmlist; exit 1' 1 2 3
  attrlist="mc68000 sun gcos unix ibm gimpel interdata tss os mert pyr"
  attrlist="$attrlist vax pdp11 i8086 z8000 u3b2 u3b5 u3b20 u3b200"
! attrlist="$attrlist ns32000 ns16000 iAPX286 mc300 mc500 mc700 sparc"
  pth="/usr/ucb /bin /usr/bin /usr/local /usr/local/bin /usr/lbin /etc /usr/lib"
  defvoidused=7
  
***************
*** 191,198 ****
  
  Much effort has been expended to ensure that this shell script will run
  on any Unix system.  If despite that it blows up on you, your best bet is
! to edit Configure and run it again. Also, let me (lwall@sdcrdcf.UUCP) know
! how I blew it.  If you can't run Configure for some reason, you'll have
  to generate a config.sh file by hand.
  
  This installation script affects things in two ways: 1) it may do direct
--- 191,198 ----
  
  Much effort has been expended to ensure that this shell script will run
  on any Unix system.  If despite that it blows up on you, your best bet is
! to edit Configure and run it again. Also, let me (lwall@jpl-devvax.jpl.nasa.gov)
! know how I blew it.  If you can't run Configure for some reason, you'll have
  to generate a config.sh file by hand.
  
  This installation script affects things in two ways: 1) it may do direct
***************
*** 897,903 ****
  
  echo " "
  echo "Doing variable substitutions on .SH files..."
! set `$grep '\.SH' <MANIFEST | awk '{print $1}'`
  for file in $*; do
      case "$file" in
      */*)
--- 897,910 ----
  
  echo " "
  echo "Doing variable substitutions on .SH files..."
! set x `awk '{print $1}' <MANIFEST | $grep '\.SH'`
! shift
! case $# in
! 0) set x *.SH; shift;;
! esac
! if test ! -f $1; then
!     shift
! fi
  for file in $*; do
      case "$file" in
      */*)
 
Index: mcon/U/Finish.U
Prereq: 1.0.1.1
*** mcon/U/Finish.U.old	Thu Jan 28 17:09:49 1988
--- mcon/U/Finish.U	Thu Jan 28 17:09:49 1988
***************
*** 1,4 ****
! ?RCS:$Header: Finish.U,v 1.0.1.1 88/01/21 22:53:02 lwall Exp $
  ?X: 
  ?X: This unit is the very last one in the Configure script.  It runs all the
  ?X: SH files, which among other things produce config.h and (usually) Makefile.
--- 1,4 ----
! ?RCS:$Header: Finish.U,v 1.0.1.2 88/01/28 17:06:19 lwall Exp $
  ?X: 
  ?X: This unit is the very last one in the Configure script.  It runs all the
  ?X: SH files, which among other things produce config.h and (usually) Makefile.
***************
*** 5,10 ****
--- 5,13 ----
  ?X: It offers to do a make depend if the Makefile contains that target.
  ?X: 
  ?RCS:$Log:	Finish.U,v $
+ ?RCS: Revision 1.0.1.2  88/01/28  17:06:19  lwall
+ ?RCS: patch3: made smarter about SH lines in MANIFEST.
+ ?RCS: 
  ?RCS: Revision 1.0.1.1  88/01/21  22:53:02  lwall
  ?RCS: Now doesn't blow up if MANIFEST isn't there.
  ?RCS: 
***************
*** 29,35 ****
  
  echo " "
  echo "Doing variable substitutions on .SH files..."
! set x `$grep '\.SH' <MANIFEST | awk '{print $1}'`
  shift
  case $# in
  0) set x *.SH; shift;;
--- 32,38 ----
  
  echo " "
  echo "Doing variable substitutions on .SH files..."
! set x `awk '{print $1}' <MANIFEST | $grep '\.SH'`
  shift
  case $# in
  0) set x *.SH; shift;;
 
Index: kit/Makefile.SH
Prereq: 1.0
*** kit/Makefile.SH.old	Thu Jan 28 17:09:30 1988
--- kit/Makefile.SH	Thu Jan 28 17:09:30 1988
***************
*** 17,25 ****
  esac
  echo "Extracting Makefile (with variable substitutions)"
  cat >Makefile <<!GROK!THIS!
! # $Header: Makefile.SH,v 1.0 87/05/22 12:06:37 lwall Exp $
  #
  # $Log:	Makefile.SH,v $
  # Revision 1.0  87/05/22  12:06:37  lwall
  # Initial revision
  # 
--- 17,28 ----
  esac
  echo "Extracting Makefile (with variable substitutions)"
  cat >Makefile <<!GROK!THIS!
! # $Header: Makefile.SH,v 1.0.1.1 88/01/28 17:04:39 lwall Exp $
  #
  # $Log:	Makefile.SH,v $
+ # Revision 1.0.1.1  88/01/28  17:04:39  lwall
+ # Added range.c
+ # 
  # Revision 1.0  87/05/22  12:06:37  lwall
  # Initial revision
  # 
***************
*** 35,41 ****
  
  CC = cc
  public = makedist
! private = kitlists
  manpages = makedist.man
  util = Makefile
  
--- 38,44 ----
  
  CC = cc
  public = makedist
! private = kitlists range
  manpages = makedist.man
  util = Makefile
  
***************
*** 58,63 ****
--- 61,69 ----
  
  kitlists: $(obj)
  	$(CC) $(LDFLAGS) $(obj) $(libs) -o kitlists
+ 
+ range: range.c
+ 	$(CC) $(LDFLAGS) range.c $(libs) -o range
  
  # won't work with csh
  install: $(public)
 
Index: kit/kittrailer
Prereq: 1.0
*** kit/kittrailer.old	Thu Jan 28 17:09:38 1988
--- kit/kittrailer	Thu Jan 28 17:09:38 1988
***************
*** 1,18 ****
  #! /bin/sh
! # $Header: kittrailer,v 1.0 87/05/22 12:07:03 lwall Exp $
  #
  # $Log:	kittrailer,v $
  # Revision 1.0  87/05/22  12:07:03  lwall
  # Initial revision
  # 
- # Revision 4.3.1.1  85/05/10  11:34:59  lwall
- # Branch for patches.
- # 
- # Revision 4.3  85/05/01  11:42:11  lwall
- # Baseline for release with 4.3bsd.
- # 
  
! rangelist=`range 1 $3`
  cat >>$1 <<EOT
  echo ""
  echo "End of kit $2 (of $3)"
--- 1,15 ----
  #! /bin/sh
! # $Header: kittrailer,v 1.0.1.1 88/01/28 17:04:57 lwall Exp $
  #
  # $Log:	kittrailer,v $
+ # Revision 1.0.1.1  88/01/28  17:04:57  lwall
+ # Now gets range from $DIST.
+ # 
  # Revision 1.0  87/05/22  12:07:03  lwall
  # Initial revision
  # 
  
! rangelist=`$DIST/range 1 $3`
  cat >>$1 <<EOT
  echo ""
  echo "End of kit $2 (of $3)"
 
Index: pat/pat.SH
*** pat/pat.SH.old	Thu Jan 28 17:09:55 1988
--- pat/pat.SH	Thu Jan 28 17:09:56 1988
***************
*** 16,27 ****
  */*) cd `expr X$0 : 'X\(.*\)/'` ;;
  esac
  echo "Extracting pat (with variable substitutions)"
- : This section of the file will have variable substitutions done on it.
- : Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
- : Protect any dollar signs and backticks that you do not want interpreted
- : by putting a backslash in front.
  $spitshell >pat <<!GROK!THIS!
  $startsh
  n='$n'
  c='$c'
  echo='$echo'
--- 16,31 ----
  */*) cd `expr X$0 : 'X\(.*\)/'` ;;
  esac
  echo "Extracting pat (with variable substitutions)"
  $spitshell >pat <<!GROK!THIS!
  $startsh
+ 
+ # $Header: pat.SH,v 1.0.1.3 88/01/28 17:06:42 lwall Exp $
+ #
+ # $Log:	pat.SH,v $
+ # Revision 1.0.1.3  88/01/28  17:06:42  lwall
+ # Added RCS header and cleanup of bugs directory.
+ # 
+ 
  n='$n'
  c='$c'
  echo='$echo'
***************
*** 57,62 ****
--- 61,67 ----
  	-e '	chop;' \
  	-e '	if (!$mani{$_}) {' \
  	-e '		next if m|^MANIFEST.new$|;' \
+ 	-e '		next if m|^Wanted$|;' \
  	-e '		next if m|^bugs|;' \
  	-e '		next if m|^RCS/|;' \
  	-e '		next if m|/RCS/|;' \
***************
*** 69,74 ****
--- 74,80 ----
  	-e '		next if m|^\.|;' \
  	-e '		next if m|/\.|;' \
  	-e '		next if m|\.o$|;' \
+ 	-e '		next if m|\.old$|;' \
  	-e '		next if $mani{$_ . ".SH"};' \
  	-e '		next if m|(.*)\.c$| && $mani{$1 . ".y"};' \
  	-e '	}' \
***************
*** 83,88 ****
--- 89,97 ----
  case "$1" in
  -a) set `awk '{print $1}' MANIFEST.new`;;
  esac
+ 
+ rm -f bugs/*.[1-9]
+ rm -f bugs/*.[1-9][0-9]
  
  patcil -p $*
  patdiff $*
 
Index: pat/patbase.SH
*** pat/patbase.SH.old	Thu Jan 28 17:10:01 1988
--- pat/patbase.SH	Thu Jan 28 17:10:01 1988
***************
*** 17,22 ****
--- 17,30 ----
  echo "Extracting patbase (with variable substitutions)"
  $spitshell >patbase <<!GROK!THIS!
  $startsh
+ 
+ # $Header: patbase.SH,v 1.0.1.2 88/01/28 17:07:29 lwall Exp $
+ #
+ # $Log:	patbase.SH,v $
+ # Revision 1.0.1.2  88/01/28  17:07:29  lwall
+ # patch3: added RCS header
+ # 
+ 
  PT=`pwd`
  !GROK!THIS!
  
 
Index: pat/patcil.SH
*** pat/patcil.SH.old	Thu Jan 28 17:10:08 1988
--- pat/patcil.SH	Thu Jan 28 17:10:09 1988
***************
*** 16,21 ****
--- 16,29 ----
  echo "Extracting patcil (with variable substitutions)"
  $spitshell >patcil <<!GROK!THIS!
  $startsh
+ 
+ # $Header: patcil.SH,v 1.0.1.4 88/01/28 17:07:42 lwall Exp $
+ #
+ # $Log:	patcil.SH,v $
+ # Revision 1.0.1.4  88/01/28  17:07:42  lwall
+ # patch3: added RCS header
+ # 
+ 
  PT=`pwd`
  c='$c'
  n='$n'
 
Index: pat/patdiff.SH
Prereq: 1.0.1.4
*** pat/patdiff.SH.old	Thu Jan 28 17:10:14 1988
--- pat/patdiff.SH	Thu Jan 28 17:10:15 1988
***************
*** 17,22 ****
--- 17,30 ----
  echo "Extracting patdiff (with variable substitutions)"
  $spitshell >patdiff <<!GROK!THIS!
  $startsh
+ 
+ # $Header: patdiff.SH,v 1.0.1.5 88/01/28 17:07:58 lwall Exp $
+ #
+ # $Log:	patdiff.SH,v $
+ # Revision 1.0.1.5  88/01/28  17:07:58  lwall
+ # patch3: added RCS header and turned > to >> in case of duplicate filesnames.
+ # 
+ 
  PT=`pwd`
  !GROK!THIS!
  
***************
*** 135,141 ****
  		    echo "Prereq: $lastpat"
  		fi
  		rm -f .sed
! 	    ) >bugs/$fname.$bnum
  	    case "$mydiff" in
  	    '')
  		(rcsdiff -c -rlastpat -r$new $files | \
--- 143,149 ----
  		    echo "Prereq: $lastpat"
  		fi
  		rm -f .sed
! 	    ) >> bugs/$fname.$bnum
  	    case "$mydiff" in
  	    '')
  		(rcsdiff -c -rlastpat -r$new $files | \
 
Index: pat/patmake.SH
*** pat/patmake.SH.old	Thu Jan 28 17:10:20 1988
--- pat/patmake.SH	Thu Jan 28 17:10:21 1988
***************
*** 16,27 ****
  */*) cd `expr X$0 : 'X\(.*\)/'` ;;
  esac
  echo "Extracting patmake (with variable substitutions)"
- : This section of the file will have variable substitutions done on it.
- : Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
- : Protect any dollar signs and backticks that you do not want interpreted
- : by putting a backslash in front.
  $spitshell >patmake <<!GROK!THIS!
  $startsh
  defeditor='$defeditor'
  !GROK!THIS!
  
--- 16,31 ----
  */*) cd `expr X$0 : 'X\(.*\)/'` ;;
  esac
  echo "Extracting patmake (with variable substitutions)"
  $spitshell >patmake <<!GROK!THIS!
  $startsh
+ 
+ # $Header: patmake.SH,v 1.0.1.3 88/01/28 17:08:35 lwall Exp $
+ #
+ # $Log:	patmake.SH,v $
+ # Revision 1.0.1.3  88/01/28  17:08:35  lwall
+ # patch3: added RCS header
+ # 
+ 
  defeditor='$defeditor'
  !GROK!THIS!
  
 
Index: pat/patpost.SH
*** pat/patpost.SH.old	Thu Jan 28 17:10:26 1988
--- pat/patpost.SH	Thu Jan 28 17:10:26 1988
***************
*** 16,27 ****
  */*) cd `expr X$0 : 'X\(.*\)/'` ;;
  esac
  echo "Extracting patpost (with variable substitutions)"
- : This section of the file will have variable substitutions done on it.
- : Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
- : Protect any dollar signs and backticks that you do not want interpreted
- : by putting a backslash in front.
  $spitshell >patpost <<!GROK!THIS!
  $startsh
  inews='${inews-/usr/lib/news/inews}'
  orgname='$orgname'
  !GROK!THIS!
--- 16,31 ----
  */*) cd `expr X$0 : 'X\(.*\)/'` ;;
  esac
  echo "Extracting patpost (with variable substitutions)"
  $spitshell >patpost <<!GROK!THIS!
  $startsh
+ 
+ # $Header: patpost.SH,v 1.0.1.3 88/01/28 17:08:49 lwall Exp $
+ #
+ # $Log:	patpost.SH,v $
+ # Revision 1.0.1.3  88/01/28  17:08:49  lwall
+ # patch3: added RCS header
+ # 
+ 
  inews='${inews-/usr/lib/news/inews}'
  orgname='$orgname'
  !GROK!THIS!
 
Index: pat/patsend.SH
*** pat/patsend.SH.old	Thu Jan 28 17:10:31 1988
--- pat/patsend.SH	Thu Jan 28 17:10:32 1988
***************
*** 16,27 ****
  */*) cd `expr X$0 : 'X\(.*\)/'` ;;
  esac
  echo "Extracting patsend (with variable substitutions)"
- : This section of the file will have variable substitutions done on it.
- : Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
- : Protect any dollar signs and backticks that you do not want interpreted
- : by putting a backslash in front.
  $spitshell >patsend <<!GROK!THIS!
  $startsh
  orgname='$orgname'
  PT=`pwd`
  !GROK!THIS!
--- 16,31 ----
  */*) cd `expr X$0 : 'X\(.*\)/'` ;;
  esac
  echo "Extracting patsend (with variable substitutions)"
  $spitshell >patsend <<!GROK!THIS!
  $startsh
+ 
+ # $Header: patsend.SH,v 1.0.1.2 88/01/28 17:09:02 lwall Exp $
+ #
+ # $Log:	patsend.SH,v $
+ # Revision 1.0.1.2  88/01/28  17:09:02  lwall
+ # patch3: added RCS header
+ # 
+ 
  orgname='$orgname'
  PT=`pwd`
  !GROK!THIS!
 
Index: kit/range.c
*** kit/range.c.old	Thu Jan 28 17:09:43 1988
--- kit/range.c	Thu Jan 28 17:09:44 1988
***************
*** 0 ****
--- 1,25 ----
+ #include <stdio.h>
+ main(argc,argv)
+ int argc;
+ char **argv;
+ {
+     register int i;
+     register int min, max;
+ 
+     if (argc < 2)
+ 	exit(1);
+     if (argc == 2) {
+ 	min = 1;
+ 	max = atoi(argv[1]);
+     }
+     else {
+ 	min = atoi(argv[1]);
+ 	max = atoi(argv[2]);
+     }
+     for (i=min; i<=max; i++) {
+ 	printf("%d",i);
+ 	if (i != max)
+ 	    putchar(' ');
+     }
+     putchar('\n');
+ }
