	Shell Extension Installation
		22 Mar 80
		25 Apr 80
		8 Jun 80

The shell extensions are contained in three directories.
They are this directory and its subdirectories "dot" and
"scripts".  All member files are text.  See the file "DOC"
for a description of the extensions.  "scripts" contains "ed"
scripts for generating modified sources from S. R. Bourne's
"sh" sources (version 7) as WE recieved them from Bell Labs.
"dot" contains some sample dot files which may be usefull.
The file "LS" contains the result of:
	ls -l *

At our installation we have both UNIX v7 and UNIX 32v.  They
came with similar "sh" sources.  Below is a summary obtained
from "wc".

		  Lines  Words   Bytes
	args.c	    135	   300	  2214 
	blok.c	    111	   243	  1972 
	brkincr.h     2	     6	    43 
	builtin.c     2	     2	    23 
	cmd.c	    406	   774	  6163 
	ctype.c	    108	   562	  1907 
	ctype.h	     90	   276	  2290 
	defs.h	    287	   678	  4572 
	dup.h	     10	    19	    97 
	error.c	     83	   168	  1093 
	expand.c    190	   427	  2976 
	fault.c	    109	   184	  1357 
	io.c	    133	   233	  1863 
	mac.h	     60	   156	   876 
	macro.c	    233	   524	  4067 
v7	main.c	    174	   393	  3079 
32v	main.c	    173	   385	  3014 
v7	makefile     34	    99	   572 
32v	Makefile     33	    92	   542 
	mode.h	    205	   474	  3203 
	msg.c	    136	   407	  2672 
	name.c	    320	   591	  4561 
	name.h	     25	    47	   311 
	print.c	     97	   188	  1076 
	service.c   365	   780	  5736 
	setbrk.c     17	    26	   167 
	stak.c	     81	   151	  1201 
	stak.h	     76	   262	  1593 
	string.c     55	   104	   586 
	sym.h	     46	   120	   763 
v7	timeout.h    10	    19	    95 
32v	timeout.h    10	    19	    98 
	word.c	    124	   300	  2318 
*	xec.c	    421	   819	  8353 
v7	total	   4145	  9332	 67799 
32v	total	   4143	  9317	 67707 

Since I provide a "Makefile", the differences between
those originals doesn't matter.  There is no "ed" script
to modify "timeout.h", so those differences don't matter.
The same "ed" script works for both of the variants of
"main.c".
If your sources differ from ours, you should determine
the differences (lots of luck) and make appropriate
alterations.  All such changes should be suspect,
but if the line counts agree, you might attempt to
generate the sources and examine the changed code.
To generate this shell follow these steps.

Step 1:
	Read this document.

Step 2:
	Move ("tar") these files and directories to
	a clean directory, preferably on the same device
	as the original sources.
	Change your current working directory to the
	new directory and perform all commands from there.

Step 3:
	Find out where the originals (brought into agreement
	with ours) are located.  "xec.c" has a star by it in 
	the above list, because our originals seem to be missing
	a semicolon.  Our compiler complains, but generates
	good code.  The scripts do not require that it be fixed,
	but if it is fixed there may be no additional lines.
	To fix it add a semicolon (";") to the end of line 205
	(two lines after "case SYSUMASK:").  This should increase
	the number of bytes by one to 8354.  If you have write
	permission on the file and it is "/usr/src/cmd/sh/xec.c"
	then typing the following should fix it.
		ed /usr/src/cmd/sh/xec.c <scripts/xec.fix

Step 4:
	Edit "MAKSRC", "SAVE", and "RESTORE" such that
	the variable "SYS" is assigned the path name of
	the directory containing the originals.  These
	files were provided with:
		SYS=/usr/src/cmd/sh
	To generate new sources in this directory type:
		MAKSRC
	"RESTORE" can be used to make an individual source
	by typing:
		RESTORE file
	"SAVE" can be used to update scripts (in the event
	of local changes), by typing:
		SAVE file
	You should now have all required sources in this
	directory.  One corresponds to each of the original
	source files along with "extend.h" and "extend.c".
	If you were to compile as is the C pre-processor's
	symbol table might overflow.  Providing an abbreviated
	"errno.h" might alleviate that.  An abbreviated
	"errno.h" should also have been generated by MAKSRC.

Step 5:
	If you don't want code for the special run time systems
	(e.g. you don't have any of them) you can exclude them
	by changing the "Makefile" variable setting from
		RTS = -DRTS
	to
		RTS =
	If you leave the "Makefile" as is everything should
	work properly and it shouldn't be very
	costly (~(1 read + 1 seek)/command file).
	The initial toggle values (for the toggle command)
	are controlled by C pre-processor parameters.
	If they are undefined, then they become "1" (i.e. "on").
	"Makefile" variables are provided to define these
	parameters.  The value "off" is represented by "0" (i.e. zero).
	The value "on" is represented by "1" (or any non-zero int).
	The "Makefile" is provided with:
		IMPLCD = 1
		SLASH = 1

Step 6:
	If you have the program "make" type:
		make 2>err
	otherwise examine "Makefile" and perform the
	appropriate steps.
	You should probably examine "err" which is apt
	to have many warnings in it.  The new shell is "sh".
	Put it somewhere safe.

Step 7:
	To get rid of modified sources and object files try:
		sh CLEANUP
