#! /bin/sh
#
# This is a self-applying patch in a shell script.
# It has this form because some of the files are generated,
# and thus no history is available for them;
# they need to be deleted before the patch is applied.
#
# Change directory to the appropriate place
# before applying running this shell script.
#
# Don't forget the -p0 option if you apply this patch manually.
#
# ------------------------------------------------------------

#
# Before you apply this patch,
# please delete the following files:
#
rm -f README BUILDING CHANGES MANIFEST Makefile

#
# Now patch the files...
#	(Don't forget the -p0 option.)
#
patch -p0 << 'fubar'
Index: common/patchlevel.h
Prereq: "1.3.D013"
***************
*** 1 ****
! #define PATCHLEVEL "1.3.D013"
--- 1 ----
! #define PATCHLEVEL "1.4.D013"
Index: README
***************
*** 0 ****
--- 1,198 ----
+ 
+ 
+ 
+ readme(cook)					     readme(cook)
+ 
+ 
+ NAME
+        cook - a	file construction tool
+ 
+ DESCRIPTION
+        Put simply, the cook program is yet another make-oid.
+ 
+        The cook	program	is a tool for constructing files.  It is
+        given a set of files to create, and recipes of how to
+        create them.  In	any non-trivial	program	there will be
+        prerequisites to	performing the actions necessary to
+        creating	any file, such as include files.  The cook
+        program provides	a mechanism to define these.
+ 
+        When a program is being developed or maintained,	the
+        programmer will typically change	one file of several which
+        comprise	the program.  The cook program examines	the last-
+        modified	times of the files to see when the prerequisites
+        of a file have changed, implying	that the file needs to be
+        recreated as it is logically out	of date.
+ 
+        The cook	program	also provides a	facility for implicit
+        recipes,	allowing users to specify how to form a	file with
+        a given suffix from a file with a different suffix.  For
+        example,	to create filename.o from filename.c
+ 
+ HISTORY
+        The cook	program	was originally developed (starting in
+        1988) because I was marooned on an operating system
+        without anything	even vaguely resembling	make(1).  Since	I
+        had to write my own, I added a few improvements.	 When I
+        finally escaped back to UNIX, it	took only two days to
+        port cook to SystemV.  I	have since deleted all code for
+        that original operating system, although	clues to its
+        identity	are still present.  There is no	prize for
+        guessing	what it	was.
+ 
+        After I had cook	up on UNIX, the	progress the world had
+        made caught up with me.	It was gratifying that many of
+        the features other make-oid authors had thought necessary
+        were either already present, or easily and seamlessly
+        added.
+ 
+ ARCHIVE	SITE
+        The latest version of cook is available by anonymous ftp
+        from:
+ 	   Host:   ftp.cse.nau.edu (134.114.64.70)
+ 	   Dir:	   /pub/Aegis
+ 	   File:   README	      #	what is	in this	directory
+ 	   File:   cook.1.4.tar.Z     #	the complete source
+ 	   File:   cook.1.4.patch.Z   #	patch to take 1.3 to 1.4
+ 	   File:   cook.1.4.ps.Z      #	PostScript of the Manual
+ 
+        To use anonymous	ftp, give "anonymous" as the user name
+        (omit the quotes) and your email	address	as the password.
+ 
+ 
+ 
+ 								1
+ 
+ 
+ 
+ 
+ 
+ readme(cook)					     readme(cook)
+ 
+ 
+        My grateful thanks to Paul Balyoz <pab@ftp.cse.nau.edu>
+        for his generosity in providing this archive space.
+ 
+        This directory also contains a few other	pieces of
+        software	written	by me.	Please have a look if you are
+        interested.
+ 
+        For those of you	without	ftp, I recommend the use of an
+        ftp-by-email server.  Here is a list of a few (there are
+        many more):
+ 	      mail-server@pit-manager.mit.edu
+ 	      ftpmail@decwrl.dec.com
+ 	      ftpmail@cs.uow.edu.au
+ 
+        In general, you can get a help message about how	to use
+        each system by sending email with a subject of "help" and
+        a message body containing just the word "help".
+ 
+ MAILING	LIST
+        A mailing list has been created so that users of	cook may
+        exchange	ideas about how	to use the cook	program.
+        Discussion may include, but is not limited to: bugs,
+        enhancements, and applications.	The list is not
+        moderated.
+ 
+        The address of the mailing list is
+ 	      cook-users@bmr.gov.au
+ 
+        To subscribe to this mailing list, send an email	message
+        to majordomo@bmr.gov.au with a message body containing the
+        single line
+ 	      subscribe	cook-users
+        Please note that	bmr.gov.au is an Internet site,	so if you
+        have an address which is	not readily derived from your
+        mail headers (majordomo is only a Perl program, after all)
+        you will	need to	use a message of the form:
+ 	      subscribe	cook-users address
+        where address is	an email address which makes sense from
+        an Internet site.
+ 
+        The software which handles this mailing list CANNOT send
+        you a copy of the cook program.	Please use ftp or ftp-by-
+        email, instead.
+ 
+ NEW IN THIS RELEASE
+        A number	of features have been added to cook with this
+        release.	 A few of them are detailed here:
+ 
+        * The cook program is now known to work on more systems.
+        Most changes were aimed at improving portability, or
+        avoiding	problems specific to some systems.
+ 
+        * The GNU long option name convention is	now understood.
+        Option names for	cook were always long, so this mostly
+ 
+ 
+ 
+ 								2
+ 
+ 
+ 
+ 
+ 
+ readme(cook)					     readme(cook)
+ 
+ 
+        consists	of ignoring the	extra leading '-'.  The
+        "--foo=bar" convention is also understood for options with
+        arguments.
+ 
+        * Tests which fail now tell you what it was they	were
+        testing for.  This will give the	user some idea of what is
+        happening.
+ 
+        Plus the	usual crop of bug fixes	and tinkering.	For
+        excruciating detail, and	also acknowlegements of	those who
+        generously sent me feedback, please see the CHANGES file
+        included	in this	distribution.
+ 
+ BUILDING COOK
+        Full instructions for building the cook program may be
+        found in	the BUILDING file included in this distribution.
+ 
+ COPYRIGHT
+        cook version 1.4.D013
+        Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993	Peter
+        Miller.
+        All rights reserved.
+ 
+        This program is free software; you can redistribute it
+        and/or modify it	under the terms	of the GNU General Public
+        License as published by the Free	Software Foundation;
+        either version 2	of the License,	or (at your option) any
+        later version.
+ 
+        This program is distributed in the hope that it will be
+        useful, but WITHOUT ANY WARRANTY; without even the implied
+        warranty	of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+        PURPOSE.	 See the GNU General Public License for	more
+        details.
+ 
+        You should have received	a copy of the GNU General Public
+        License along with this program;	if not,	write to the Free
+        Software	Foundation, Inc., 675 Mass Ave,	Cambridge, MA
+        02139, USA.
+ 
+        It should be in the LICENSE file	included with this
+        distribution.
+ 
+ AUTHOR
+        Peter Miller   UUCP	 uunet!munnari!bmr.gov.au!pmiller
+        /\/\*	      Internet	 pmiller@bmr.gov.au
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 								3
+ 
+ 
Index: BUILDING
***************
*** 0 ****
--- 1,330 ----
+ 
+ 
+ 
+ building(cook)					   building(cook)
+ 
+ 
+ NAME
+ 	cook - a file construction tool
+ 
+ SPACE REQUIREMENTS
+ 	You will need about 5MB	to unpack and build the	cook
+ 	program.  Your milage may vary.
+ 
+ SITE CONFIGURATION
+ 	The file common/conf.h needs to	be created to match your
+ 	site.  Select an appropriate file from the conf
+ 	directory.  The	files in this directory	are named for the
+ 	various	systems	encountered to date by the author.  The
+ 	file most closely resembling your system should	be copied
+ 	into the common/conf.h file.  You can copy it or use a
+ 	symbolic link; copying is recommended because you may
+ 	need to	edit.
+ 
+ 	A file which may require editing is the	Makefile file.
+ 	The first few lines contain comments describing	what may
+ 	require	changing.  In general these changes will relate
+ 	to the name of your favorite C compiler, and where it
+ 	keeps its include files.
+ 
+ KNOWN SYSTEMS
+ 	This distribution of cook is known to build on the
+ 	following systems:
+ 
+ 	SCO 3.2
+ 		You will need to set the compiler to rcc in the
+ 		Makefile file.
+ 
+ 	SunOS 4.1
+ 		The native cc(1) and also gcc(1) are known to
+ 		work.  The appropriate configuration is	contained
+ 		in the conf/SunOS-4.1 file.
+ 
+ 	ConvexOS 10.0
+ 		The native cc(1) is known to work.  The
+ 		appropriate configuration is contained in the
+ 		conf/ConvexOS-10 file.
+ 
+ 	dgux 5.4.1
+ 		The native cc (1) compiler is known to work.  The
+ 		appropriate configuration is contained in the
+ 		conf/dgux-5.4.1	file.
+ 
+ 	Pyramid	SMP DC/OSx 1.0-92b023
+ 		This system is revolting!  The Berkeley	cc (1)
+ 		compiler variant is known to work.  The
+ 		appropriate configuration is contained in the
+ 		conf/dcosx file.  Make sure you	read the Makefile
+ 		file very carefully.
+ 
+ 
+ 
+ 
+ 
+ 								1
+ 
+ 
+ 
+ 
+ 
+ building(cook)					   building(cook)
+ 
+ 
+ 	ULTRIX 4.2
+ 		The native cc (1) compiler is known to work.  The
+ 		appropriate configuration is contained in the
+ 		conf/ULTRIX-4.2	file.  Make sure you set the
+ 		SHELL macro in the Makefile file.
+ 
+ 	If any of the above systems do not work	for you, after
+ 	you have double-checked	everything, the	author wants to
+ 	know.
+ 
+ UNKNOWN	SYSTEMS
+ 	Please let the author know of any other	systems	you get
+ 	cook working on, and the modifications necessary.  Please
+ 	include	the changes to the Makefile file, the relevant
+ 	common/conf.h file used, and the output	of the "uname
+ 	-rs" command.
+ 
+ 	The cook program was developed using gcc, however this is
+ 	not the	default	in the Makefile	file.  The cook	program
+ 	source attempts	to use ANSI C features without
+ 	compromising the ability to be compiled	on older C
+ 	compilers.  Functions mandated by the ANSI C standard are
+ 	used, because many systems provided them, one way or
+ 	another.  Please let the author	know of	any others you
+ 	think should be	added to the common/ansi.c file.
+ 
+ 	You may	need to	use some ANSI C	header files which the
+ 	cook code uses,	but which some systems (as yet)	fail to
+ 	provide.  You will find	lines at the top of the	Makefile
+ 	file similar to
+ 		H = -I/usr/include -Ih
+ 	Change this to suit your system	and your compiler.  The
+ 	"h" directory must be searched last as it is intended to
+ 	suplement your system, not replace it.
+ 
+ 	You will need to check the include files in the	"h"
+ 	directory to see that they are suitable	for your system.
+ 	You may	want to	delete any that	your system already has.
+ 
+ BUILDING COOK
+ 	All you	should need to do is use the
+ 		% make
+ 		...lots	of output...
+ 		%
+ 	command	and wait.  When	this finishes you should see a
+ 	directory called bin containing	three files: cook, c_incl
+ 	and find_libs.	The c_incl program is a	utility
+ 	distributed with cook which examines C files and
+ 	determines all the files it includes directly and
+ 	indirectly.  The find_libs program is a	utility
+ 	distributed with cook which tracks doen	the names of
+ 	library	files, given cc-style library options (-L and
+ 	-l).
+ 
+ 
+ 
+ 
+ 								2
+ 
+ 
+ 
+ 
+ 
+ building(cook)					   building(cook)
+ 
+ 
+ TESTING
+ 	The cook program comes with a test suite.  To run this
+ 	test suite, use	the command
+ 		% make sure
+ 		...lots	of output...
+ 		Passed All Tests
+ 		%
+ 
+ 	The tests take a few seconds each, with	a few very fast,
+ 	and a couple very slow,	but it varies greatly depending
+ 	on your	CPU.
+ 
+ 	If all went well, the message
+ 		Passed All Tests
+ 	should appear at the end of the	make.
+ 
+ INSTALLING COOK
+ 	Put the	cook program and utilities somewhere where users
+ 	will automatically pick	it up, such as in the
+ 	/usr/local/bin directory.  Use the command
+ 		# cp bin/* /usr/local/bin
+ 		#
+ 
+ 	The manuals can	be installed using the commands
+ 		# sh man1/install.sh /usr/local/man/man1
+ 		#
+ 	This is	very site-specific.  You can install the manuals
+ 	in a different directory by using a different last
+ 	argument.
+ 
+ 	By default, cook is configured to use /usr/local/lib/cook
+ 	as the place it	stores various system recipe files
+ 		# mkdir	/usr/local/lib/cook
+ 		# cp lib/* /usr/local/lib/cook
+ 		#
+ 	These paths are	only example, where to install things
+ 	tends to be very system	specific, and I	won't even try to
+ 	guess.	Control	of the placement of this directory may be
+ 	found in the first few lines of	the Makefile file.
+ 
+ 	All of the above install can be	done automatically, using
+ 	the "make install" command.  Control of	the directories
+ 	used may be found in the first few lines of the	Makefile
+ 	file.
+ 
+ PRINTED	MANUALS
+ 	This distribution contains the sources to all of the
+ 	documentation for cook.	 The author used the GNU groff
+ 	package	and a postscript printer to prepare the
+ 	documentation.	If you do not have this	software, you
+ 	will need to substitute	commands appropriate to	your
+ 	site.
+ 
+ 	To print copies	of the README and BUILDING files, the
+ 
+ 
+ 
+ 								3
+ 
+ 
+ 
+ 
+ 
+ building(cook)					   building(cook)
+ 
+ 
+ 	following commands may be used
+ 		% cd aux
+ 		% groff	-s -t -man *.man | lpr
+ 		% cd ..
+ 		%
+ 	This will produce about	4 pages.  The "-s" flag	means
+ 	preprocess with	soelim(1), and the "-t"	flag means
+ 	preprocess with	tbl(1).
+ 
+ 	To print copies	of the manual entries, the following
+ 	commands may be	used
+ 		% cd man1
+ 		% groff	-s -t -man *.1 | lpr
+ 		% cd ..
+ 		%
+ 	This will produce about	8 pages.  The "-s" flag	means
+ 	preprocess with	soelim(1), and the "-t"	flag means
+ 	preprocess with	tbl(1).
+ 
+ 	To print a copy	of the Reference Manual, the following
+ 	commands may be	used
+ 		% cd doc
+ 		% groff	-s -t -mm refman.t | lpr
+ 		% cd ..
+ 		%
+ 	This will produce about	35 pages.  The "-s" flag means
+ 	preprocess with	soelim(1), the "-t" flag means preprocess
+ 	with tbl(1).  Alternatively, you could get a PostScript
+ 	copy of	the Reference Manual from the archive site.
+ 
+ GETTING	HELP
+ 	If you need assistance with the	cook program, please do
+ 	not hesitate to	contact	the author at
+ 		Peter Miller <pmiller@bmr.gov.au>
+ 	Any and	all feedback is	welcome.
+ 
+ 	When reporting problems, please	include	the version
+ 	number given by	the
+ 		% cook -version
+ 		cook version a.b.cccc
+ 		...
+ 		%
+ 	command.
+ 
+ 	In the common/main.h file, there is a define of	DEBUG in
+ 	comments.  If the comments are removed,	extensive
+ 	debugging is turned on.	 This causes some performance
+ 	loss, but performs much	run-time checking and adds the
+ 	-TRACIng command line option.
+ 
+ 	When the -TRACing option is followed by	one or more file
+ 	names, it turns	on execution traces in those source
+ 	files.	It is best to put this option on the end of the
+ 	command, so that the names of the files	to be traced are
+ 
+ 
+ 
+ 								4
+ 
+ 
+ 
+ 
+ 
+ building(cook)					   building(cook)
+ 
+ 
+ 	not confused with any other filenames or strings on the
+ 	command	line.
+ 
+ COPYRIGHT
+ 	cook version 1.4.D013
+ 	Copyright (C) 1988, 1989, 1990,	1991, 1992, 1993 Peter
+ 	Miller.
+ 	All rights reserved.
+ 
+ 	The cook package is distributed	in the hope that it will
+ 	be useful, but WITHOUT ANY WARRANTY; without even the
+ 	implied	warranty of MERCHANTABILITY or FITNESS FOR A
+ 	PARTICULAR PURPOSE.  See the GNU General Public	License
+ 	for more details.
+ 
+ 	It should be in	the LICENSE file included with this
+ 	distribution.
+ 
+ AUTHOR
+ 	Peter Miller   UUCP	  uunet!munnari!bmr.gov.au!pmiller
+ 	/\/\*	       Internet	  pmiller@bmr.gov.au
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 								5
+ 
+ 
Index: CHANGES
***************
*** 0 ****
--- 1,1244 ----
+ 
+ 
+ 
+ Project "cook.1.4"						  Page 1
+ List of Changes					Sat Mar 27 23:14:17 1993
+ 
+ Change	State		Description
+ ------- -------		-------------
+    1	completed	New release derived from cook.1.3.
+    2	completed	cope with missing files better in c_incl
+    3	completed	inprove failure messages from tests
+    4	completed	getenv name conflict
+    5	completed	more convex improvements
+    6	completed	fix copyright notices
+    7	completed	fix license version
+    8	completed	use _ty suffix, not _t suffix
+    9	completed	add GNU style long option names
+   10	completed	sundry improvements
+   11	completed	ports to more platforms
+   12	completed	improve the manual pages
+   13	being_		note ConvexOS as a known port
+ 	integrated
+ 
+ 
+ 
+ Project "cook.1.4", Change 1					  Page 1
+ Change Details					Sat Mar 27 23:14:19 1993
+ 
+ NAME
+ 	Project "cook.1.4", Delta 1, Change 1.
+ 
+ SUMMARY
+ 	New release derived from cook.1.3.
+ 
+ DESCRIPTION
+ 	New release derived from cook.1.3.
+ 
+ 	This change is exempt from testing.  This change is exempt from
+ 	testing against the baseline.
+ 
+ CAUSE
+ 	This change was caused by internal_enhancement.
+ 
+ FILES
+ 	Type	Action	Edit	File Name
+ 	------- ------- ------- -----------
+ 	source	create	1	COPYING
+ 	source	create	1	aux/BUILDING.man
+ 	source	create	1	aux/CHANGES.sh
+ 	source	create	1	aux/Howto.cook
+ 	source	create	1	aux/MANIFEST.sh
+ 	source	create	1	aux/Makefile.awk
+ 	source	create	1	aux/Makefile.sh
+ 	source	create	1	aux/README.man
+ 	source	create	1	aux/patches.sh
+ 	source	create	1	c_incl/cache.c
+ 	source	create	1	c_incl/cache.h
+ 	source	create	1	c_incl/lang_c.c
+ 	source	create	1	c_incl/lang_roff.c
+ 	source	create	1	c_incl/main.c
+ 	source	create	1	c_incl/os.c
+ 	source	create	1	c_incl/os.h
+ 	source	create	1	c_incl/sniff.c
+ 	source	create	1	c_incl/sniff.h
+ 	source	create	1	common/ansi.c
+ 	source	create	1	common/arglex.c
+ 	source	create	1	common/arglex.h
+ 	source	create	1	common/error.c
+ 	source	create	1	common/error.h
+ 	source	create	1	common/help.c
+ 	source	create	1	common/help.h
+ 	source	create	1	common/main.h
+ 	source	create	1	common/mem.c
+ 	source	create	1	common/mem.h
+ 	source	create	1	common/s-v-arg.h
+ 	source	create	1	common/str.c
+ 	source	create	1	common/str.h
+ 	source	create	1	common/trace.c
+ 	source	create	1	common/trace.h
+ 	source	create	1	common/version.c
+ 	source	create	1	common/version.h
+ 	source	create	1	common/word.c
+ 	source	create	1	common/word.h
+ 	source	create	1	conf/ConvexOS-10
+ 	source	create	1	conf/SunOS-4.1.2
+ 
+ 
+ 
+ Project "cook.1.4", Change 1					  Page 2
+ Change Details					Sat Mar 27 23:14:19 1993
+ 
+ 	Type	Action	Edit	File Name
+ 	------- ------- ------- -----------
+ 	source	create	1	conf/SunOS-4.1.3
+ 	source	create	1	conf/SysV-4.0
+ 	source	create	1	conf/dgux-5.4.1
+ 	source	create	1	config
+ 	source	create	1	cook/builtin.c
+ 	source	create	1	cook/builtin.h
+ 	source	create	1	cook/cook.c
+ 	source	create	1	cook/cook.h
+ 	source	create	1	cook/env.c
+ 	source	create	1	cook/env.h
+ 	source	create	1	cook/expr.c
+ 	source	create	1	cook/expr.h
+ 	source	create	1	cook/glob.c
+ 	source	create	1	cook/glob.h
+ 	source	create	1	cook/hashline.h
+ 	source	create	1	cook/hashline.y
+ 	source	create	1	cook/id.c
+ 	source	create	1	cook/id.h
+ 	source	create	1	cook/lex.c
+ 	source	create	1	cook/lex.h
+ 	source	create	1	cook/listing.c
+ 	source	create	1	cook/listing.h
+ 	source	create	1	cook/main.c
+ 	source	create	1	cook/match.c
+ 	source	create	1	cook/match.h
+ 	source	create	1	cook/option.c
+ 	source	create	1	cook/option.h
+ 	source	create	1	cook/os.c
+ 	source	create	1	cook/os.h
+ 	source	create	1	cook/parse.h
+ 	source	create	1	cook/parse.y
+ 	source	create	1	cook/stmt.c
+ 	source	create	1	cook/stmt.h
+ 	source	create	1	cooktime/date.h
+ 	source	create	1	cooktime/date.y
+ 	source	create	1	cooktime/main.c
+ 	source	create	1	doc/builtin
+ 	source	create	1	doc/cmdline
+ 	source	create	1	doc/conditions
+ 	source	create	1	doc/glossary
+ 	source	create	1	doc/history
+ 	source	create	1	doc/how
+ 	source	create	1	doc/intro
+ 	source	create	1	doc/intro.aa
+ 	source	create	1	doc/intro.bb
+ 	source	create	1	doc/language
+ 	source	create	1	doc/match
+ 	source	create	1	doc/option
+ 	source	create	1	doc/refman.t
+ 	source	create	1	doc/system
+ 	source	create	1	doc/variables
+ 	source	create	1	find_libs/main.c
+ 	source	create	1	find_libs/os.c
+ 	source	create	1	find_libs/os.h
+ 	source	create	1	h/float.h
+ 
+ 
+ 
+ Project "cook.1.4", Change 1					  Page 3
+ Change Details					Sat Mar 27 23:14:19 1993
+ 
+ 	Type	Action	Edit	File Name
+ 	------- ------- ------- -----------
+ 	source	create	1	h/limits.h
+ 	source	create	1	h/stdarg.h-min
+ 	source	create	1	h/stddef.h
+ 	source	create	1	h/stdlib.h
+ 	source	create	1	h/string.h
+ 	source	create	1	h/time.h
+ 	source	create	1	lib/as
+ 	source	create	1	lib/bison
+ 	source	create	1	lib/c
+ 	source	create	1	lib/gcc
+ 	source	create	1	lib/home
+ 	source	create	1	lib/lex
+ 	source	create	1	lib/library
+ 	source	create	1	lib/print
+ 	source	create	1	lib/program
+ 	source	create	1	lib/sccs
+ 	source	create	1	lib/text
+ 	source	create	1	lib/usr
+ 	source	create	1	lib/usr.local
+ 	source	create	1	lib/yacc
+ 	source	create	1	lib/yacc_many
+ 	source	create	1	man1/c_incl.1
+ 	source	create	1	man1/cook.1
+ 	source	create	1	man1/cooktime.1
+ 	source	create	1	man1/find_libs.1
+ 	source	create	1	man1/roffpp.1
+ 	source	create	1	roffpp/main.c
+ 	source	create	1	roffpp/preprocess.c
+ 	source	create	1	roffpp/preprocess.h
+ 	test	create	1	test/00/t0001a.sh
+ 	test	create	1	test/00/t0002a.sh
+ 	test	create	1	test/00/t0003a.sh
+ 	test	create	1	test/00/t0004a.sh
+ 	test	create	1	test/00/t0005a.sh
+ 	test	create	1	test/00/t0006a.sh
+ 	test	create	1	test/00/t0007a.sh
+ 	test	create	1	test/00/t0008a.sh
+ 	test	create	1	test/00/t0009a.sh
+ 	test	create	1	test/00/t0010a.sh
+ 	test	create	1	test/00/t0011a.sh
+ 	test	create	1	test/00/t0012a.sh
+ 	test	create	1	test/00/t0013a.sh
+ 	test	create	1	test/00/t0014a.sh
+ 	test	create	1	test/00/t0015a.sh
+ 	test	create	1	test/00/t0016a.sh
+ 	test	create	1	test/00/t0017a.sh
+ 	test	create	1	test/00/t0018a.sh
+ 	test	create	1	test/00/t0019a.sh
+ 	test	create	1	test/00/t0020a.sh
+ 	test	create	1	test/00/t0021a.sh
+ 	test	create	1	test/00/t0022a.sh
+ 	test	create	1	test/00/t0023a.sh
+ 	test	create	1	test/00/t0024a.sh
+ 	test	create	1	test/00/t0025a.sh
+ 	test	create	1	test/00/t0026a.sh
+ 
+ 
+ 
+ Project "cook.1.4", Change 1					  Page 4
+ Change Details					Sat Mar 27 23:14:19 1993
+ 
+ 	Type	Action	Edit	File Name
+ 	------- ------- ------- -----------
+ 	test	create	1	test/00/t0027a.sh
+ 	test	create	1	test/00/t0028a.sh
+ 	test	create	1	test/00/t0029a.sh
+ 	test	create	1	test/00/t0030a.sh
+ 	test	create	1	test/00/t0031a.sh
+ 	test	create	1	test/00/t0032a.sh
+ 	test	create	1	test/00/t0033a.sh
+ 	test	create	1	test/00/t0034a.sh
+ 	test	create	1	test/00/t0035a.sh
+ 	test	create	1	test/00/t0036a.sh
+ 	test	create	1	test/00/t0037a.sh
+ 	test	create	1	test/00/t0038a.sh
+ 	test	create	1	test/00/t0039a.sh
+ 	test	create	1	test/00/t0040a.sh
+ 	test	create	1	test/00/t0041a.sh
+ 
+ HISTORY
+ 	What		When		Who	Comment
+ 	------		------		-----	---------
+ 	new_change	Thu Jan	 7	pmiller
+ 			16:27:56 1993	1
+ 	develop_begin	Thu Jan	 7	pmiller
+ 			16:27:56 1993	1
+ 	develop_end	Thu Jan	 7	pmiller
+ 			16:27:56 1993	1
+ 	review_pass	Thu Jan	 7	pmiller
+ 			16:27:56 1993	1
+ 	integrate_begin Thu Jan	 7	pmiller
+ 			16:27:56 1993	1
+ 	integrate_pass	Thu Jan	 7	pmiller
+ 			16:32:29 1993	1
+ 
+ 
+ 
+ Project "cook.1.4", Change 2					  Page 1
+ Change Details					Sat Mar 27 23:14:20 1993
+ 
+ NAME
+ 	Project "cook.1.4", Delta 2, Change 2.
+ 
+ SUMMARY
+ 	cope with missing files better in c_incl
+ 
+ DESCRIPTION
+ 	cope with missing files better in c_incl
+ 
+ 	This change is exempt from testing.  This change is exempt from
+ 	testing against the baseline.
+ 
+ CAUSE
+ 	This change was caused by internal_bug.
+ 
+ FILES
+ 	Type	Action	Edit	File Name
+ 	------- ------- ------- -----------
+ 	source	modify	2	c_incl/sniff.c
+ 
+ HISTORY
+ 	What		When		Who	Comment
+ 	------		------		-----	---------
+ 	new_change	Thu Jan 14	pmiller
+ 			14:32:13 1993
+ 	develop_begin	Thu Jan 14	pmiller Elapsed time: 0.054
+ 			14:32:20 1993		days.
+ 	develop_end	Thu Jan 14	pmiller
+ 			14:56:35 1993
+ 	review_pass	Thu Jan 14	pmiller
+ 			14:56:41 1993
+ 	integrate_begin Thu Jan 14	pmiller Elapsed time: 0.078
+ 			14:57:19 1993		days.
+ 	integrate_pass	Thu Jan 14	pmiller
+ 			15:32:31 1993
+ 
+ 
+ 
+ Project "cook.1.4", Change 3					  Page 1
+ Change Details					Sat Mar 27 23:14:21 1993
+ 
+ NAME
+ 	Project "cook.1.4", Delta 3, Change 3.
+ 
+ SUMMARY
+ 	inprove failure messages from tests
+ 
+ DESCRIPTION
+ 	1. Tests need to say what failed when they fail.
+ 	2. tests should not assume /tmp is not a symlink.
+ 
+ 	My thanks to J. Cazander, Philips Electronic Design & Tools,
+ 	The Netherlands, for this suggestion.
+ 
+ 	This change is exempt from testing against the baseline.
+ 
+ CAUSE
+ 	This change was caused by external_enhancement.
+ 
+ FILES
+ 	Type	Action	Edit	File Name
+ 	------- ------- ------- -----------
+ 	source	modify	2	config
+ 	test	modify	2	test/00/t0001a.sh
+ 	test	modify	2	test/00/t0002a.sh
+ 	test	modify	2	test/00/t0003a.sh
+ 	test	modify	2	test/00/t0004a.sh
+ 	test	modify	2	test/00/t0005a.sh
+ 	test	modify	2	test/00/t0006a.sh
+ 	test	modify	2	test/00/t0007a.sh
+ 	test	modify	2	test/00/t0008a.sh
+ 	test	modify	2	test/00/t0009a.sh
+ 	test	modify	2	test/00/t0010a.sh
+ 	test	modify	2	test/00/t0011a.sh
+ 	test	modify	2	test/00/t0012a.sh
+ 	test	modify	2	test/00/t0013a.sh
+ 	test	modify	2	test/00/t0014a.sh
+ 	test	modify	2	test/00/t0015a.sh
+ 	test	modify	2	test/00/t0016a.sh
+ 	test	modify	2	test/00/t0017a.sh
+ 	test	modify	2	test/00/t0018a.sh
+ 	test	modify	2	test/00/t0019a.sh
+ 	test	modify	2	test/00/t0020a.sh
+ 	test	modify	2	test/00/t0021a.sh
+ 	test	modify	2	test/00/t0022a.sh
+ 	test	modify	2	test/00/t0023a.sh
+ 	test	modify	2	test/00/t0024a.sh
+ 	test	modify	2	test/00/t0025a.sh
+ 	test	modify	2	test/00/t0026a.sh
+ 	test	modify	2	test/00/t0027a.sh
+ 	test	modify	2	test/00/t0028a.sh
+ 	test	modify	2	test/00/t0029a.sh
+ 	test	modify	2	test/00/t0030a.sh
+ 	test	modify	2	test/00/t0031a.sh
+ 	test	modify	2	test/00/t0032a.sh
+ 	test	modify	2	test/00/t0033a.sh
+ 	test	modify	2	test/00/t0034a.sh
+ 	test	modify	2	test/00/t0035a.sh
+ 
+ 
+ 
+ Project "cook.1.4", Change 3					  Page 2
+ Change Details					Sat Mar 27 23:14:21 1993
+ 
+ 	Type	Action	Edit	File Name
+ 	------- ------- ------- -----------
+ 	test	modify	2	test/00/t0036a.sh
+ 	test	modify	2	test/00/t0037a.sh
+ 	test	modify	2	test/00/t0038a.sh
+ 	test	modify	2	test/00/t0039a.sh
+ 	test	modify	2	test/00/t0040a.sh
+ 	test	modify	2	test/00/t0041a.sh
+ 
+ HISTORY
+ 	What		When		Who	Comment
+ 	------		------		-----	---------
+ 	new_change	Sat Jan 30	pmiller
+ 			21:52:55 1993
+ 	develop_begin	Sat Jan 30	pmiller Elapsed time: 0.122
+ 			21:53:03 1993		days.
+ 	develop_end	Sat Jan 30	pmiller
+ 			22:48:05 1993
+ 	review_pass	Sat Jan 30	pmiller
+ 			22:50:03 1993
+ 	integrate_begin Sat Jan 30	pmiller
+ 			22:50:52 1993
+ 	integrate_pass	Sat Jan 30	pmiller
+ 			23:00:48 1993
+ 
+ 
+ 
+ Project "cook.1.4", Change 4					  Page 1
+ Change Details					Sat Mar 27 23:14:21 1993
+ 
+ NAME
+ 	Project "cook.1.4", Delta 4, Change 4.
+ 
+ SUMMARY
+ 	getenv name conflict
+ 
+ DESCRIPTION
+ 	The name getenv is defined in system includ files, and
+ 	conflicts with the arguments used in the cook implementation.
+ 
+ 	My thanks to Adam Krolnik <krolnik@magnum.convex.com> for
+ 	reporting this problem.
+ 
+ 	This change is exempt from testing.  This change is exempt from
+ 	testing against the baseline.
+ 
+ CAUSE
+ 	This change was caused by external_bug.
+ 
+ FILES
+ 	Type	Action	Edit	File Name
+ 	------- ------- ------- -----------
+ 	source	modify	3	config
+ 	source	modify	2	cook/env.c
+ 	source	modify	2	cook/env.h
+ 	source	modify	2	cook/stmt.c
+ 
+ HISTORY
+ 	What		When		Who	Comment
+ 	------		------		-----	---------
+ 	new_change	Thu Feb 18	pmiller
+ 			14:53:49 1993
+ 	develop_begin	Thu Feb 18	pmiller Elapsed time: 0.115
+ 			14:54:41 1993		days.
+ 	develop_end	Thu Feb 18	pmiller
+ 			15:46:37 1993
+ 	review_pass	Thu Feb 18	pmiller
+ 			15:46:45 1993
+ 	integrate_begin Thu Feb 18	pmiller Elapsed time: 0.865
+ 			15:47:15 1993		days.
+ 	integrate_pass	Thu Feb 18	pmiller
+ 			22:16:39 1993
+ 
+ 
+ 
+ Project "cook.1.4", Change 5					  Page 1
+ Change Details					Sat Mar 27 23:14:22 1993
+ 
+ NAME
+ 	Project "cook.1.4", Delta 5, Change 5.
+ 
+ SUMMARY
+ 	more convex improvements
+ 
+ DESCRIPTION
+ 	There are some bugs in the Convex include files, and some
+ 	errors in the source of cook, which prevent it building
+ 	successfully.
+ 
+ 	My thanks to Adam Krolnik <krolnik@magnum.convex.com> for
+ 	reporting this problem.
+ 
+ 	This change is exempt from testing.  This change is exempt from
+ 	testing against the baseline.
+ 
+ CAUSE
+ 	This change was caused by external_bug.
+ 
+ FILES
+ 	Type	Action	Edit	File Name
+ 	------- ------- ------- -----------
+ 	source	modify	2	aux/BUILDING.man
+ 	source	modify	2	cook/expr.c
+ 	source	modify	2	cook/os.c
+ 	source	modify	2	cooktime/main.c
+ 
+ HISTORY
+ 	What		When		Who	Comment
+ 	------		------		-----	---------
+ 	new_change	Fri Feb 19	pmiller
+ 			16:30:01 1993
+ 	develop_begin	Fri Feb 19	pmiller Elapsed time: 0.155
+ 			16:30:16 1993		days.
+ 	develop_end	Fri Feb 19	pmiller Elapsed time: 0.552
+ 			17:39:58 1993		days.
+ 	review_pass	Fri Feb 19	pmiller
+ 			21:48:33 1993
+ 	integrate_begin Fri Feb 19	pmiller
+ 			21:49:12 1993
+ 	integrate_pass	Fri Feb 19	pmiller
+ 			21:57:28 1993
+ 
+ 
+ 
+ Project "cook.1.4", Change 6					  Page 1
+ Change Details					Sat Mar 27 23:14:23 1993
+ 
+ NAME
+ 	Project "cook.1.4", Delta 6, Change 6.
+ 
+ SUMMARY
+ 	fix copyright notices
+ 
+ DESCRIPTION
+ 	fix copyright notices
+ 
+ 	This change is exempt from testing against the baseline.
+ 
+ CAUSE
+ 	This change was caused by internal_enhancement.
+ 
+ FILES
+ 	Type	Action	Edit	File Name
+ 	------- ------- ------- -----------
+ 	source	modify	3	aux/BUILDING.man
+ 	source	modify	2	aux/CHANGES.sh
+ 	source	modify	2	aux/Howto.cook
+ 	source	modify	2	aux/MANIFEST.sh
+ 	source	modify	2	aux/Makefile.awk
+ 	source	modify	2	aux/Makefile.sh
+ 	source	modify	2	aux/README.man
+ 	source	modify	2	aux/patches.sh
+ 	source	modify	2	c_incl/cache.c
+ 	source	modify	2	c_incl/cache.h
+ 	source	modify	2	c_incl/lang_c.c
+ 	source	modify	2	c_incl/lang_roff.c
+ 	source	modify	2	c_incl/main.c
+ 	source	modify	2	c_incl/os.c
+ 	source	modify	2	c_incl/os.h
+ 	source	modify	3	c_incl/sniff.c
+ 	source	modify	2	c_incl/sniff.h
+ 	source	modify	2	common/ansi.c
+ 	source	modify	2	common/arglex.c
+ 	source	modify	2	common/arglex.h
+ 	source	modify	2	common/error.c
+ 	source	modify	2	common/error.h
+ 	source	modify	2	common/help.c
+ 	source	modify	2	common/help.h
+ 	source	modify	2	common/main.h
+ 	source	modify	2	common/mem.c
+ 	source	modify	2	common/mem.h
+ 	source	modify	2	common/s-v-arg.h
+ 	source	modify	2	common/str.c
+ 	source	modify	2	common/str.h
+ 	source	modify	2	common/trace.c
+ 	source	modify	2	common/trace.h
+ 	source	modify	2	common/version.c
+ 	source	modify	2	common/version.h
+ 	source	modify	2	common/word.c
+ 	source	modify	2	common/word.h
+ 	source	modify	2	conf/ConvexOS-10
+ 	source	modify	2	conf/SunOS-4.1.2
+ 	source	modify	2	conf/SunOS-4.1.3
+ 	source	modify	2	conf/SysV-4.0
+ 
+ 
+ 
+ Project "cook.1.4", Change 6					  Page 2
+ Change Details					Sat Mar 27 23:14:23 1993
+ 
+ 	Type	Action	Edit	File Name
+ 	------- ------- ------- -----------
+ 	source	modify	2	conf/dgux-5.4.1
+ 	source	modify	4	config
+ 	source	modify	2	cook/builtin.c
+ 	source	modify	2	cook/builtin.h
+ 	source	modify	2	cook/cook.c
+ 	source	modify	2	cook/cook.h
+ 	source	modify	3	cook/env.c
+ 	source	modify	3	cook/env.h
+ 	source	modify	3	cook/expr.c
+ 	source	modify	2	cook/expr.h
+ 	source	modify	2	cook/glob.c
+ 	source	modify	2	cook/glob.h
+ 	source	modify	2	cook/hashline.h
+ 	source	modify	2	cook/hashline.y
+ 	source	modify	2	cook/id.c
+ 	source	modify	2	cook/id.h
+ 	source	modify	2	cook/lex.c
+ 	source	modify	2	cook/lex.h
+ 	source	modify	2	cook/listing.c
+ 	source	modify	2	cook/listing.h
+ 	source	modify	2	cook/main.c
+ 	source	modify	2	cook/match.c
+ 	source	modify	2	cook/match.h
+ 	source	modify	2	cook/option.c
+ 	source	modify	2	cook/option.h
+ 	source	modify	3	cook/os.c
+ 	source	modify	2	cook/os.h
+ 	source	modify	2	cook/parse.h
+ 	source	modify	2	cook/parse.y
+ 	source	modify	3	cook/stmt.c
+ 	source	modify	2	cook/stmt.h
+ 	source	modify	2	doc/builtin
+ 	source	modify	2	doc/cmdline
+ 	source	modify	2	doc/conditions
+ 	source	modify	2	doc/glossary
+ 	source	modify	2	doc/history
+ 	source	modify	2	doc/how
+ 	source	modify	2	doc/intro
+ 	source	modify	2	doc/intro.aa
+ 	source	modify	2	doc/intro.bb
+ 	source	modify	2	doc/language
+ 	source	modify	2	doc/match
+ 	source	modify	2	doc/option
+ 	source	modify	2	doc/refman.t
+ 	source	modify	2	doc/system
+ 	source	modify	2	doc/variables
+ 	source	modify	2	find_libs/main.c
+ 	source	modify	2	find_libs/os.c
+ 	source	modify	2	find_libs/os.h
+ 	source	modify	2	man1/c_incl.1
+ 	source	modify	2	man1/cook.1
+ 	source	modify	2	man1/cooktime.1
+ 	source	modify	2	man1/find_libs.1
+ 	source	create	1	man1/install.sh
+ 	source	modify	2	man1/roffpp.1
+ 
+ 
+ 
+ Project "cook.1.4", Change 6					  Page 3
+ Change Details					Sat Mar 27 23:14:23 1993
+ 
+ 	Type	Action	Edit	File Name
+ 	------- ------- ------- -----------
+ 	source	modify	2	roffpp/main.c
+ 	source	modify	2	roffpp/preprocess.c
+ 	source	modify	2	roffpp/preprocess.h
+ 	test	modify	3	test/00/t0001a.sh
+ 	test	modify	3	test/00/t0002a.sh
+ 	test	modify	3	test/00/t0003a.sh
+ 	test	modify	3	test/00/t0004a.sh
+ 	test	modify	3	test/00/t0005a.sh
+ 	test	modify	3	test/00/t0006a.sh
+ 	test	modify	3	test/00/t0007a.sh
+ 	test	modify	3	test/00/t0008a.sh
+ 	test	modify	3	test/00/t0009a.sh
+ 	test	modify	3	test/00/t0010a.sh
+ 	test	modify	3	test/00/t0011a.sh
+ 	test	modify	3	test/00/t0012a.sh
+ 	test	modify	3	test/00/t0013a.sh
+ 	test	modify	3	test/00/t0014a.sh
+ 	test	modify	3	test/00/t0015a.sh
+ 	test	modify	3	test/00/t0016a.sh
+ 	test	modify	3	test/00/t0017a.sh
+ 	test	modify	3	test/00/t0018a.sh
+ 	test	modify	3	test/00/t0019a.sh
+ 	test	modify	3	test/00/t0020a.sh
+ 	test	modify	3	test/00/t0021a.sh
+ 	test	modify	3	test/00/t0022a.sh
+ 	test	modify	3	test/00/t0023a.sh
+ 	test	modify	3	test/00/t0024a.sh
+ 	test	modify	3	test/00/t0025a.sh
+ 	test	modify	3	test/00/t0026a.sh
+ 	test	modify	3	test/00/t0027a.sh
+ 	test	modify	3	test/00/t0028a.sh
+ 	test	modify	3	test/00/t0029a.sh
+ 	test	modify	3	test/00/t0030a.sh
+ 	test	modify	3	test/00/t0031a.sh
+ 	test	modify	3	test/00/t0032a.sh
+ 	test	modify	3	test/00/t0033a.sh
+ 	test	modify	3	test/00/t0034a.sh
+ 	test	modify	3	test/00/t0035a.sh
+ 	test	modify	3	test/00/t0036a.sh
+ 	test	modify	3	test/00/t0037a.sh
+ 	test	modify	3	test/00/t0038a.sh
+ 	test	modify	3	test/00/t0039a.sh
+ 	test	modify	3	test/00/t0040a.sh
+ 	test	modify	3	test/00/t0041a.sh
+ 
+ HISTORY
+ 	What		When		Who	Comment
+ 	------		------		-----	---------
+ 	new_change	Mon Mar 22	pmiller
+ 			12:49:07 1993
+ 	develop_begin	Mon Mar 22	pmiller Elapsed time: 0.000
+ 			12:49:24 1993		days.
+ 	develop_end	Mon Mar 22	pmiller
+ 			21:35:50 1993
+ 	review_pass	Mon Mar 22	pmiller
+ 
+ 
+ 
+ Project "cook.1.4", Change 6					  Page 4
+ Change Details					Sat Mar 27 23:14:23 1993
+ 
+ 	What		When		Who	Comment
+ 	------		------		-----	---------
+ 			21:35:57 1993
+ 	integrate_begin Mon Mar 22	pmiller Elapsed time: 0.074
+ 			21:36:51 1993		days.
+ 	integrate_pass	Mon Mar 22	pmiller
+ 			22:10:07 1993
+ 
+ 
+ 
+ Project "cook.1.4", Change 7					  Page 1
+ Change Details					Sat Mar 27 23:14:24 1993
+ 
+ NAME
+ 	Project "cook.1.4", Delta 7, Change 7.
+ 
+ SUMMARY
+ 	fix license version
+ 
+ DESCRIPTION
+ 	fix license version
+ 
+ 	This change is exempt from testing against the baseline.
+ 
+ CAUSE
+ 	This change was caused by internal_enhancement.
+ 
+ FILES
+ 	Type	Action	Edit	File Name
+ 	------- ------- ------- -----------
+ 	source	remove	1	COPYING
+ 	source	create	1	LICENSE
+ 	source	modify	4	aux/BUILDING.man
+ 	source	modify	3	aux/CHANGES.sh
+ 	source	modify	3	aux/Howto.cook
+ 	source	modify	3	aux/MANIFEST.sh
+ 	source	modify	3	aux/Makefile.awk
+ 	source	modify	3	aux/Makefile.sh
+ 	source	modify	3	aux/README.man
+ 	source	modify	3	aux/patches.sh
+ 	source	modify	3	c_incl/cache.c
+ 	source	modify	3	c_incl/cache.h
+ 	source	modify	3	c_incl/lang_c.c
+ 	source	modify	3	c_incl/lang_roff.c
+ 	source	modify	3	c_incl/main.c
+ 	source	modify	3	c_incl/os.c
+ 	source	modify	3	c_incl/os.h
+ 	source	modify	4	c_incl/sniff.c
+ 	source	modify	3	c_incl/sniff.h
+ 	source	modify	3	common/ansi.c
+ 	source	modify	3	common/arglex.c
+ 	source	modify	3	common/arglex.h
+ 	source	modify	3	common/error.c
+ 	source	modify	3	common/error.h
+ 	source	modify	3	common/help.c
+ 	source	modify	3	common/help.h
+ 	source	modify	3	common/main.h
+ 	source	modify	3	common/mem.c
+ 	source	modify	3	common/mem.h
+ 	source	modify	3	common/s-v-arg.h
+ 	source	modify	3	common/str.c
+ 	source	modify	3	common/str.h
+ 	source	modify	3	common/trace.c
+ 	source	modify	3	common/trace.h
+ 	source	modify	3	common/version.c
+ 	source	modify	3	common/version.h
+ 	source	modify	3	common/word.c
+ 	source	modify	3	common/word.h
+ 	source	modify	3	conf/ConvexOS-10
+ 	source	modify	3	conf/SunOS-4.1.2
+ 
+ 
+ 
+ Project "cook.1.4", Change 7					  Page 2
+ Change Details					Sat Mar 27 23:14:24 1993
+ 
+ 	Type	Action	Edit	File Name
+ 	------- ------- ------- -----------
+ 	source	modify	3	conf/SunOS-4.1.3
+ 	source	modify	3	conf/SysV-4.0
+ 	source	modify	3	conf/dgux-5.4.1
+ 	source	modify	5	config
+ 	source	modify	3	cook/builtin.c
+ 	source	modify	3	cook/builtin.h
+ 	source	modify	3	cook/cook.c
+ 	source	modify	3	cook/cook.h
+ 	source	modify	4	cook/env.c
+ 	source	modify	4	cook/env.h
+ 	source	modify	4	cook/expr.c
+ 	source	modify	3	cook/expr.h
+ 	source	modify	3	cook/glob.c
+ 	source	modify	3	cook/glob.h
+ 	source	modify	3	cook/hashline.h
+ 	source	modify	3	cook/hashline.y
+ 	source	modify	3	cook/id.c
+ 	source	modify	3	cook/id.h
+ 	source	modify	3	cook/lex.c
+ 	source	modify	3	cook/lex.h
+ 	source	modify	3	cook/listing.c
+ 	source	modify	3	cook/listing.h
+ 	source	modify	3	cook/main.c
+ 	source	modify	3	cook/match.c
+ 	source	modify	3	cook/match.h
+ 	source	modify	3	cook/option.c
+ 	source	modify	3	cook/option.h
+ 	source	modify	4	cook/os.c
+ 	source	modify	3	cook/os.h
+ 	source	modify	3	cook/parse.h
+ 	source	modify	3	cook/parse.y
+ 	source	modify	4	cook/stmt.c
+ 	source	modify	3	cook/stmt.h
+ 	source	modify	2	cooktime/date.h
+ 	source	modify	2	cooktime/date.y
+ 	source	modify	3	cooktime/main.c
+ 	source	modify	3	doc/builtin
+ 	source	modify	3	doc/cmdline
+ 	source	modify	3	doc/conditions
+ 	source	modify	3	doc/glossary
+ 	source	modify	3	doc/history
+ 	source	modify	3	doc/how
+ 	source	modify	3	doc/intro
+ 	source	modify	3	doc/intro.aa
+ 	source	modify	3	doc/intro.bb
+ 	source	modify	3	doc/language
+ 	source	modify	3	doc/match
+ 	source	modify	3	doc/option
+ 	source	modify	3	doc/refman.t
+ 	source	modify	3	doc/system
+ 	source	modify	3	doc/variables
+ 	source	modify	3	find_libs/main.c
+ 	source	modify	3	find_libs/os.c
+ 	source	modify	3	find_libs/os.h
+ 	source	modify	3	man1/c_incl.1
+ 
+ 
+ 
+ Project "cook.1.4", Change 7					  Page 3
+ Change Details					Sat Mar 27 23:14:24 1993
+ 
+ 	Type	Action	Edit	File Name
+ 	------- ------- ------- -----------
+ 	source	modify	3	man1/cook.1
+ 	source	modify	3	man1/cooktime.1
+ 	source	modify	3	man1/find_libs.1
+ 	source	modify	2	man1/install.sh
+ 	source	modify	3	man1/roffpp.1
+ 	source	modify	3	roffpp/main.c
+ 	source	modify	3	roffpp/preprocess.c
+ 	source	modify	3	roffpp/preprocess.h
+ 	test	modify	4	test/00/t0001a.sh
+ 	test	modify	4	test/00/t0002a.sh
+ 	test	modify	4	test/00/t0003a.sh
+ 	test	modify	4	test/00/t0004a.sh
+ 	test	modify	4	test/00/t0005a.sh
+ 	test	modify	4	test/00/t0006a.sh
+ 	test	modify	4	test/00/t0007a.sh
+ 	test	modify	4	test/00/t0008a.sh
+ 	test	modify	4	test/00/t0009a.sh
+ 	test	modify	4	test/00/t0010a.sh
+ 	test	modify	4	test/00/t0011a.sh
+ 	test	modify	4	test/00/t0012a.sh
+ 	test	modify	4	test/00/t0013a.sh
+ 	test	modify	4	test/00/t0014a.sh
+ 	test	modify	4	test/00/t0015a.sh
+ 	test	modify	4	test/00/t0016a.sh
+ 	test	modify	4	test/00/t0017a.sh
+ 	test	modify	4	test/00/t0018a.sh
+ 	test	modify	4	test/00/t0019a.sh
+ 	test	modify	4	test/00/t0020a.sh
+ 	test	modify	4	test/00/t0021a.sh
+ 	test	modify	4	test/00/t0022a.sh
+ 	test	modify	4	test/00/t0023a.sh
+ 	test	modify	4	test/00/t0024a.sh
+ 	test	modify	4	test/00/t0025a.sh
+ 	test	modify	4	test/00/t0026a.sh
+ 	test	modify	4	test/00/t0027a.sh
+ 	test	modify	4	test/00/t0028a.sh
+ 	test	modify	4	test/00/t0029a.sh
+ 	test	modify	4	test/00/t0030a.sh
+ 	test	modify	4	test/00/t0031a.sh
+ 	test	modify	4	test/00/t0032a.sh
+ 	test	modify	4	test/00/t0033a.sh
+ 	test	modify	4	test/00/t0034a.sh
+ 	test	modify	4	test/00/t0035a.sh
+ 	test	modify	4	test/00/t0036a.sh
+ 	test	modify	4	test/00/t0037a.sh
+ 	test	modify	4	test/00/t0038a.sh
+ 	test	modify	4	test/00/t0039a.sh
+ 	test	modify	4	test/00/t0040a.sh
+ 	test	modify	4	test/00/t0041a.sh
+ 
+ HISTORY
+ 	What		When		Who	Comment
+ 	------		------		-----	---------
+ 	new_change	Mon Mar 22	pmiller
+ 			22:15:10 1993
+ 
+ 
+ 
+ Project "cook.1.4", Change 7					  Page 4
+ Change Details					Sat Mar 27 23:14:24 1993
+ 
+ 	What		When		Who	Comment
+ 	------		------		-----	---------
+ 	develop_begin	Mon Mar 22	pmiller Elapsed time: 0.000
+ 			22:15:20 1993		days.
+ 	develop_end	Tue Mar 23	pmiller
+ 			09:07:47 1993
+ 	review_pass	Tue Mar 23	pmiller
+ 			09:15:14 1993
+ 	integrate_begin Tue Mar 23	pmiller Elapsed time: 0.086
+ 			09:15:53 1993		days.
+ 	integrate_pass	Tue Mar 23	pmiller
+ 			09:54:45 1993
+ 
+ 
+ 
+ Project "cook.1.4", Change 8					  Page 1
+ Change Details					Sat Mar 27 23:14:25 1993
+ 
+ NAME
+ 	Project "cook.1.4", Delta 8, Change 8.
+ 
+ SUMMARY
+ 	use _ty suffix, not _t suffix
+ 
+ DESCRIPTION
+ 	The ANSI C and POSIX standards reserve the _t suffix.  The most
+ 	unlikely collisions have been observed.
+ 
+ 	This change is exempt from testing.  This change is exempt from
+ 	testing against the baseline.
+ 
+ CAUSE
+ 	This change was caused by internal_enhancement.
+ 
+ FILES
+ 	Type	Action	Edit	File Name
+ 	------- ------- ------- -----------
+ 	source	modify	4	c_incl/cache.c
+ 	source	modify	4	c_incl/cache.h
+ 	source	modify	4	c_incl/lang_c.c
+ 	source	modify	4	c_incl/lang_roff.c
+ 	source	modify	4	c_incl/main.c
+ 	source	modify	5	c_incl/sniff.c
+ 	source	modify	4	c_incl/sniff.h
+ 	source	modify	4	common/arglex.c
+ 	source	modify	4	common/arglex.h
+ 	source	modify	4	common/error.c
+ 	source	modify	4	common/error.h
+ 	source	modify	4	common/str.c
+ 	source	modify	4	common/str.h
+ 	source	modify	4	common/trace.c
+ 	source	modify	4	common/version.c
+ 	source	modify	4	common/word.c
+ 	source	modify	4	common/word.h
+ 	source	modify	4	cook/builtin.c
+ 	source	modify	4	cook/cook.c
+ 	source	modify	4	cook/cook.h
+ 	source	modify	5	cook/expr.c
+ 	source	modify	4	cook/expr.h
+ 	source	modify	4	cook/glob.c
+ 	source	modify	4	cook/hashline.y
+ 	source	modify	4	cook/id.c
+ 	source	modify	4	cook/id.h
+ 	source	modify	4	cook/lex.c
+ 	source	modify	4	cook/lex.h
+ 	source	modify	4	cook/listing.c
+ 	source	modify	4	cook/main.c
+ 	source	modify	4	cook/match.c
+ 	source	modify	4	cook/match.h
+ 	source	modify	4	cook/option.c
+ 	source	modify	4	cook/option.h
+ 	source	modify	5	cook/os.c
+ 	source	modify	4	cook/os.h
+ 	source	modify	4	cook/parse.h
+ 	source	modify	4	cook/parse.y
+ 
+ 
+ 
+ Project "cook.1.4", Change 8					  Page 2
+ Change Details					Sat Mar 27 23:14:25 1993
+ 
+ 	Type	Action	Edit	File Name
+ 	------- ------- ------- -----------
+ 	source	modify	5	cook/stmt.c
+ 	source	modify	4	cook/stmt.h
+ 	source	modify	4	cooktime/main.c
+ 	source	modify	4	find_libs/main.c
+ 	source	modify	4	roffpp/main.c
+ 	source	modify	4	roffpp/preprocess.c
+ 
+ HISTORY
+ 	What		When		Who	Comment
+ 	------		------		-----	---------
+ 	new_change	Tue Mar 23	pmiller
+ 			12:10:52 1993
+ 	develop_begin	Tue Mar 23	pmiller Elapsed time: 1.090
+ 			12:11:04 1993		days.
+ 	develop_end	Wed Mar 24	pmiller
+ 			12:51:44 1993
+ 	review_pass	Wed Mar 24	pmiller
+ 			12:52:03 1993
+ 	integrate_begin Wed Mar 24	pmiller Elapsed time: 0.128
+ 			12:52:43 1993		days.
+ 	integrate_pass	Wed Mar 24	pmiller
+ 			13:50:27 1993
+ 
+ 
+ 
+ Project "cook.1.4", Change 9					  Page 1
+ Change Details					Sat Mar 27 23:14:27 1993
+ 
+ NAME
+ 	Project "cook.1.4", Delta 9, Change 9.
+ 
+ SUMMARY
+ 	add GNU style long option names
+ 
+ DESCRIPTION
+ 	All command oine option names in cook are long, so this is not
+ 	very useful.  The double '--' is replaced with a single '-'.
+ 	The --foo=bar syntax is also supported
+ 
+ 	This change is exempt from testing.  This change is exempt from
+ 	testing against the baseline.
+ 
+ CAUSE
+ 	This change was caused by internal_enhancement.
+ 
+ FILES
+ 	Type	Action	Edit	File Name
+ 	------- ------- ------- -----------
+ 	source	modify	5	c_incl/main.c
+ 	source	modify	5	common/arglex.c
+ 	source	modify	5	common/arglex.h
+ 	source	modify	4	common/help.c
+ 	source	modify	5	common/version.c
+ 	source	modify	5	cook/main.c
+ 	source	modify	5	cooktime/main.c
+ 	source	modify	5	find_libs/main.c
+ 	source	modify	5	roffpp/main.c
+ 
+ HISTORY
+ 	What		When		Who	Comment
+ 	------		------		-----	---------
+ 	new_change	Wed Mar 24	pmiller
+ 			13:54:14 1993
+ 	develop_begin	Wed Mar 24	pmiller Elapsed time: 0.000
+ 			13:54:23 1993		days.
+ 	develop_end	Wed Mar 24	pmiller
+ 			22:35:19 1993
+ 	review_pass	Wed Mar 24	pmiller
+ 			22:35:26 1993
+ 	integrate_begin Wed Mar 24	pmiller
+ 			22:36:09 1993
+ 	integrate_pass	Wed Mar 24	pmiller
+ 			22:45:34 1993
+ 
+ 
+ 
+ Project "cook.1.4", Change 10					  Page 1
+ Change Details					Sat Mar 27 23:14:32 1993
+ 
+ NAME
+ 	Project "cook.1.4", Delta 10, Change 10.
+ 
+ SUMMARY
+ 	sundry improvements
+ 
+ DESCRIPTION
+ 	Several improvements were made to "polish" the program in
+ 	preparation for posting another rev.
+ 	1. improve the README file
+ 	2. improve the BUILDING file
+ 	3. improve the tar file
+ 	4. Improve the Makefile file
+ 
+ 	This change is exempt from testing.  This change is exempt from
+ 	testing against the baseline.
+ 
+ CAUSE
+ 	This change was caused by internal_enhancement.
+ 
+ FILES
+ 	Type	Action	Edit	File Name
+ 	------- ------- ------- -----------
+ 	source	modify	5	aux/BUILDING.man
+ 	source	modify	4	aux/Howto.cook
+ 	source	modify	4	aux/Makefile.sh
+ 	source	modify	4	aux/README.man
+ 	source	modify	6	config
+ 
+ HISTORY
+ 	What		When		Who	Comment
+ 	------		------		-----	---------
+ 	new_change	Wed Mar 24	pmiller
+ 			22:47:28 1993
+ 	develop_begin	Wed Mar 24	pmiller Elapsed time: 0.000
+ 			22:47:33 1993		days.
+ 	develop_end	Thu Mar 25	pmiller
+ 			10:12:20 1993
+ 	review_pass	Thu Mar 25	pmiller
+ 			10:12:26 1993
+ 	integrate_begin Thu Mar 25	pmiller Elapsed time: 0.094
+ 			10:12:56 1993		days.
+ 	integrate_pass	Thu Mar 25	pmiller
+ 			10:55:13 1993
+ 
+ 
+ 
+ Project "cook.1.4", Change 11					  Page 1
+ Change Details					Sat Mar 27 23:14:34 1993
+ 
+ NAME
+ 	Project "cook.1.4", Delta 11, Change 11.
+ 
+ SUMMARY
+ 	ports to more platforms
+ 
+ DESCRIPTION
+ 	Add support for Pyramid, and correct some small problems found
+ 	while poting.
+ 
+ 	This change is exempt from testing against the baseline.
+ 
+ CAUSE
+ 	This change was caused by internal_enhancement.
+ 
+ FILES
+ 	Type	Action	Edit	File Name
+ 	------- ------- ------- -----------
+ 	source	modify	6	aux/BUILDING.man
+ 	source	modify	5	aux/Makefile.sh
+ 	source	modify	4	conf/ConvexOS-10
+ 	source	modify	4	conf/SunOS-4.1.2
+ 	source	modify	4	conf/SunOS-4.1.3
+ 	source	modify	4	conf/SysV-4.0
+ 	source	create	1	conf/ULTRIX-4.2
+ 	source	create	1	conf/dcosx
+ 	source	modify	4	conf/dgux-5.4.1
+ 	source	modify	5	cook/glob.c
+ 	source	modify	6	cook/os.c
+ 	source	modify	3	cooktime/date.y
+ 	test	modify	5	test/00/t0041a.sh
+ 
+ HISTORY
+ 	What		When		Who	Comment
+ 	------		------		-----	---------
+ 	new_change	Thu Mar 25	pmiller
+ 			12:05:16 1993
+ 	develop_begin	Thu Mar 25	pmiller Elapsed time: 0.226
+ 			12:05:31 1993		days.
+ 	develop_end	Thu Mar 25	pmiller
+ 			13:47:26 1993
+ 	develop_end_	Thu Mar 25	pmiller
+ 	undo		13:48:50 1993
+ 	develop_end	Thu Mar 25	pmiller
+ 			13:50:24 1993
+ 	review_pass	Thu Mar 25	pmiller
+ 			13:51:41 1993
+ 	integrate_begin Thu Mar 25	pmiller Elapsed time: 0.000
+ 			13:52:38 1993		days.
+ 	integrate_pass	Thu Mar 25	pmiller
+ 			21:49:11 1993
+ 
+ 
+ 
+ Project "cook.1.4", Change 12					  Page 1
+ Change Details					Sat Mar 27 23:14:37 1993
+ 
+ NAME
+ 	Project "cook.1.4", Delta 12, Change 12.
+ 
+ SUMMARY
+ 	improve the manual pages
+ 
+ DESCRIPTION
+ 	Correct some small problems and make some minor improvements,
+ 	including:
+ 	1. put a better email address in the shar files.
+ 	2. have the manual entries explain abbreviations better
+ 	3. have the help within the commands reflect the man pages
+ 
+ 	This change is exempt from testing.  This change is exempt from
+ 	testing against the baseline.
+ 
+ CAUSE
+ 	This change was caused by internal_enhancement.
+ 
+ FILES
+ 	Type	Action	Edit	File Name
+ 	------- ------- ------- -----------
+ 	source	modify	5	aux/Howto.cook
+ 	source	modify	6	c_incl/main.c
+ 	source	modify	7	config
+ 	source	modify	6	cook/main.c
+ 	source	modify	6	cooktime/main.c
+ 	source	modify	6	find_libs/main.c
+ 	source	modify	4	man1/c_incl.1
+ 	source	modify	4	man1/cook.1
+ 	source	modify	4	man1/cooktime.1
+ 	source	create	1	man1/copyright.so
+ 	source	modify	4	man1/find_libs.1
+ 	source	modify	3	man1/install.sh
+ 	source	create	1	man1/o__rules.so
+ 	source	modify	4	man1/roffpp.1
+ 	source	modify	6	roffpp/main.c
+ 
+ HISTORY
+ 	What		When		Who	Comment
+ 	------		------		-----	---------
+ 	new_change	Thu Mar 25	pmiller
+ 			21:51:15 1993
+ 	develop_begin	Thu Mar 25	pmiller Elapsed time: 1.115
+ 			21:51:19 1993		days.
+ 	develop_end	Fri Mar 26	pmiller
+ 			22:42:58 1993
+ 	review_pass	Fri Mar 26	pmiller
+ 			22:43:05 1993
+ 	integrate_begin Fri Mar 26	pmiller Elapsed time: 0.061
+ 			22:43:40 1993		days.
+ 	integrate_pass	Fri Mar 26	pmiller
+ 			23:11:17 1993
+ 
+ 
+ 
+ Project "cook.1.4", Change 13					  Page 1
+ Change Details					Sat Mar 27 23:14:39 1993
+ 
+ NAME
+ 	Project "cook.1.4", Delta 13, Change 13.
+ 
+ SUMMARY
+ 	note ConvexOS as a known port
+ 
+ DESCRIPTION
+ 	Checks that ConvexOS works, note comments in Makefile
+ 
+ 	This change is exempt from testing.  This change is exempt from
+ 	testing against the baseline.
+ 
+ CAUSE
+ 	This change was caused by internal_enhancement.
+ 
+ STATE
+ 	This change is in 'being_integrated' state.
+ 
+ FILES
+ 	Type	Action	Edit	File Name
+ 	------- ------- ------- -----------
+ 	source	modify	6	aux/BUILDING.man
+ 	source	modify	5	aux/Makefile.sh
+ 	source	modify	4	aux/README.man
+ 
+ HISTORY
+ 	What		When		Who	Comment
+ 	------		------		-----	---------
+ 	new_change	Fri Mar 26	pmiller
+ 			23:22:24 1993
+ 	develop_begin	Fri Mar 26	pmiller Elapsed time: 0.962
+ 			23:22:33 1993		days.
+ 	develop_end	Sat Mar 27	pmiller
+ 			23:05:24 1993
+ 	review_pass	Sat Mar 27	pmiller
+ 			23:05:34 1993
+ 	integrate_begin Sat Mar 27	pmiller
+ 			23:06:04 1993
Index: MANIFEST
***************
*** 0 ****
--- 1,178 ----
+ 
+ 
+ README	Blurb about cook
+ BUILDING	Instructions how to build, test and install cook
+ CHANGES	Change history of this release of cook
+ LICENSE	GNU General Public License
+ MANIFEST	This file
+ Makefile	Instructions to make(1) how to build and test cook
+ aux/BUILDING.man	 source of the BUILDING file
+ aux/CHANGES.sh	 shell script to generate CHANGES file
+ aux/Howto.cook	 instructions to cook, how to build project
+ aux/MANIFEST.sh	 shell script to generate the MANIFEST file
+ aux/Makefile.awk	 helper file for generating Makefile file
+ aux/Makefile.sh	 shell script to generate Makefile file
+ aux/README.man	 source of the README file
+ aux/patches.sh	 shell script to generate the patch file
+ c_incl/cache.c	 functions to manipulate include file cache
+ c_incl/cache.h	 interface definition for c_incl/cache.c
+ c_incl/lang_c.c	 functions to scan C language files
+ c_incl/lang_roff.c	 functions to scan *roff source files
+ c_incl/main.c	 operating system entry point, and command line argument parsing
+ c_incl/os.c	 functions to isolate operating system interface
+ c_incl/os.h	 interface definition for c_incl/os.c
+ c_incl/sniff.c	 functions to scan source files looking for include files
+ c_incl/sniff.h	 interface definition for c_incl/sniff.c
+ common/ansi.c	 functions to implement missing ANSI C mandated functions
+ common/arglex.c	 functions to perform lexical analysis on command line arguments
+ common/arglex.h	 interface definition for common/arglex.c
+ common/error.c	 functions to report errors
+ common/error.h	 interface definition for common/error.c
+ common/help.c	 functions to provide consistent -Help behaviour
+ common/help.h	 interface definition for comon/help.c
+ common/main.h	 common defined, including DEBUG define
+ common/mem.c	 functions to manipulate dynamic memory
+ common/mem.h	 interface definition for common/mem.c
+ common/patchlevel.h	The patch level of this distribution.
+ common/s-v-arg.h	 isolate varargs.h vs stdarg differences
+ common/str.c	 functions to manipulate shared strings
+ common/str.h	 interface definition for common/str.c
+ common/trace.c	 functions to report execution traces
+ common/trace.h	 interface definition for common/trace.c
+ common/version.c	 functions to provide common -VERSion behaviour
+ common/version.h	 interface definition for common/version.c
+ common/word.c	 functions to manipulate lists of strings
+ common/word.h	 interface definition for common/word.c
+ conf/ConvexOS-10	 configuration for ConvexOS 10.0
+ conf/SunOS-4.1.2	 configuration for SunOS 4.1.2
+ conf/SunOS-4.1.3	 configuration for SunOS 4.1.3
+ conf/SysV-4.0	 configuration for generic SVR4 system
+ conf/ULTRIX-4.2	 configuration for ULTRIX 4.2
+ conf/dcosx	 configuration for Pyramid SMP DC/OSx 1.0-92b023
+ conf/dgux-5.4.1	 configuration for dgux 5.4.1
+ config	 instructions to aegis, per-project configuration
+ cook/builtin.c	 functions to implement the builtin functions
+ cook/builtin.h	 interface definition for cook/builtin.c
+ cook/cook.c	 functions to cook targets
+ cook/cook.h	 interface definition for cook/cook.c
+ cook/env.c	 functions to manipulate environment variables
+ cook/env.h	 interface definition for cook/env.c
+ cook/expr.c	 functions to manipulate expression trees
+ cook/expr.h	 interface definition for cook/expr.c
+ cook/glob.c	 functions to perform shell-style file pattern matching
+ cook/glob.h	 interface definition for cook/glob.c
+ cook/hashline.h	 interface definition for cook/hashline.y
+ cook/hashline.y	 functions to parse #directive lines in cookbooks
+ cook/id.c	 functions to manipulate the symbol table
+ cook/id.h	 interface definition for cook/id.c
+ cook/lex.c	 functions to perform lexical analysis on cookbooks
+ cook/lex.h	 interface definition for cook/lex.c
+ cook/listing.c	 functions to open and close the listing file
+ cook/listing.h	 interface definition for cook/listing.c
+ cook/main.c	 operating system start point, and command line argument parsing
+ cook/match.c	 functions to perform recipe pattern matching
+ cook/match.h	 interface definition for cook/match.c
+ cook/option.c	 functions to manage command line options
+ cook/option.h	 interface definition for cook/option.c
+ cook/os.c	 functions to isolate operating system interface
+ cook/os.h	 interface definition for cook/os.c
+ cook/parse.h	 interface definition for cook/parse.y
+ cook/parse.y	 functions to parse cookbooks
+ cook/stmt.c	 functions to manage statement trees
+ cook/stmt.h	 interface definition for cook/stmt.c
+ cooktime/date.h	 interface definition for cooktime/date.y
+ cooktime/date.y	 functions to parse dates
+ cooktime/main.c	 operating system start point, and parse command line arguments
+ doc/builtin	 Reference Manual, Built-In Functions
+ doc/cmdline	 Reference Manual, The Command Line
+ doc/conditions	 Reference Manual, License
+ doc/glossary	 Reference Manual, Glosary
+ doc/history	 Reference Manual, Ancient History
+ doc/how	 Reference Manual, Actions when Cooking
+ doc/intro	 Reference Manual, Introduction
+ doc/intro.aa	 Reference Manual, Cook from the Outside
+ doc/intro.bb	 Reference Manual, Cook from a Cookbook
+ doc/language	 Reference Manual, Cookbook Lanuage Definition
+ doc/match	 Reference Manual, File name patterns
+ doc/option	 Reference Manual, Option Precedence
+ doc/refman.t	 Reference Manual
+ doc/system	 Reference Manual, Supplied Cookbooks
+ doc/variables	 Reference Manual, Predefined Variables
+ doc/version.so	The patch level of this distribution.
+ find_libs/main.c	 operating system start point, and parse command line options
+ find_libs/os.c	 functions to isolate operating system interface
+ find_libs/os.h	 interface definition for find_libs/os.c
+ h/float.h	 minimal float.h replacement
+ h/limits.h	 minimal limits.h replacement
+ h/stdarg.h-min	 minimal stdarg.h replacement
+ h/stddef.h	 minimal stddef.h replacement
+ h/stdlib.h	 minimum stdlib.h replacement
+ h/string.h	 minimal string.h replacement
+ h/time.h	 minimal time.h suplement
+ lib/as	 cookbook for using assembler
+ lib/bison	 cookbook for using bison
+ lib/c	 cookbook for using C
+ lib/gcc	 cookbook for using gcc
+ lib/home	 cookbook for locations in home directory
+ lib/lex	 cookbook for using lex
+ lib/library	 cookbook for constructing libraries
+ lib/print	 cookbook for printing files
+ lib/program	 cookbook for constructing programs
+ lib/sccs	 cookbook for using SCCS
+ lib/text	 cookbook for formatting documents
+ lib/usr	 cookbook for locations in system directories
+ lib/usr.local	 cookbook for locations in local system directories
+ lib/yacc	 cookbook for using yacc
+ lib/yacc_many	 cookbook for using yacc more than once in same program
+ man1/c_incl.1	 manual entry for c_incl
+ man1/cook.1	 manual entry for the cook command
+ man1/cooktime.1	 manual entry for the cooktime command
+ man1/copyright.so	 copyright notice for manual entries
+ man1/find_libs.1	 manual entry for the find_libs command
+ man1/install.sh	 shell script to install section 1 manual pages
+ man1/o__rules.so	 description of option up/down case convention
+ man1/roffpp.1	 manual entry for the roffpp command
+ roffpp/main.c	 operating system start point, and parse command line arguments
+ roffpp/preprocess.c	 functions to eliminate include files
+ roffpp/preprocess.h	 interface definition for roffpp/preprocess.c
+ test/00/t0001a.sh	 test the "and" builtin function
+ test/00/t0002a.sh	 test "catenate" builtin function
+ test/00/t0003a.sh	 test "collect" builtin function
+ test/00/t0004a.sh	 test "collect_lines" builtin function
+ test/00/t0005a.sh	 test the "count" builtin function
+ test/00/t0006a.sh	 test the "defined" builtin function
+ test/00/t0007a.sh	 test the "dirname" builtin function
+ test/00/t0008a.sh	 test the "downcase" builtin function
+ test/00/t0009a.sh	 test the "entryname" builtin function
+ test/00/t0010a.sh	 test the "execute" builtin function
+ test/00/t0011a.sh	 test the "exists" builtin function
+ test/00/t0012a.sh	 test the "find_command" builtin function
+ test/00/t0013a.sh	 test the "fromto" builtin function
+ test/00/t0014a.sh	 test the "getenv" builtin function
+ test/00/t0015a.sh	 test the "glob" builtin function
+ test/00/t0016a.sh	 test the "match" builtin function
+ test/00/t0017a.sh	 test the "head" builtin function
+ test/00/t0018a.sh	 test the "if" builtin function
+ test/00/t0019a.sh	 test the "in" builtin function
+ test/00/t0020a.sh	 test the "match_mask" builtin function
+ test/00/t0021a.sh	 test the "mtime" builtin function
+ test/00/t0022a.sh	 test the "not" builtin function
+ test/00/t0023a.sh	 test the "or" builtin function
+ test/00/t0024a.sh	 test the "pathname" builtin function
+ test/00/t0025a.sh	 test the "prepost" builtin function
+ test/00/t0026a.sh	 test the "quote" builtin function
+ test/00/t0027a.sh	 test the "stringset" builtin function
+ test/00/t0028a.sh	 test the "tail" builtin function
+ test/00/t0029a.sh	 test the cook -Book option
+ test/00/t0030a.sh	 test the "-version" command line option
+ test/00/t0031a.sh	 test the os_stat_cache() function
+ test/00/t0032a.sh	 test the "sort" builtin function
+ test/00/t0033a.sh	 test the c_incl program
+ test/00/t0034a.sh	 test the "%0" pattern replacement - it may be empty
+ test/00/t0035a.sh	 test the %0 pattern, it must not match absolute paths
+ test/00/t0036a.sh	 test the %1, etc, patterns
+ test/00/t0037a.sh	 test the c_incl -no_cache option
+ test/00/t0038a.sh	 test roffpp functionality
+ test/00/t0039a.sh	 test the c_incl -Roff option
+ test/00/t0040a.sh	 test the cooktime program
+ test/00/t0041a.sh	 Test the "resolve" builtin function
Index: Makefile
***************
*** 0 ****
--- 1,523 ----
+ #
+ # You may need to change this for your system.
+ # The ``h'' directory supplements your system, not replacing it.
+ # The first variation is for gcc when it isn't the native complier,
+ # the second variation is for systems with missing ANSI C include files,
+ # the third variation is for conforming ANSI C implementations.
+ #
+ # H = -I/usr/local/lib/gcc-include -I/usr/include -Ih
+ # H = -I/usr/include -Ih
+ H =
+ # H =				# SunOS
+ # H =				# ConvexOS
+ # H =				# dgux
+ # H =				# dcosx
+ # H =				# ULTRIX
+ 
+ #
+ # the name of the compiler to use
+ #
+ CC = cc
+ # CC = gcc
+ # CC = cc			# SunOS
+ # CC = cc			# ConvexOS
+ # CC = rcc			# SCO
+ # CC = cc			# dgux
+ # CC = /usr/ucb/cc		# dcosx
+ # CC = cc			# ULTRIX
+ 
+ #
+ # The compiler flags to use, except for include path.
+ #
+ CFLAGS = -O
+ # CFLAGS = -g
+ # CFLAGS = -O			# SunOS
+ # CFLAGS = -O			# ConvexOS
+ # CFLAGS = -O			# dgux
+ # CFLAGS = -O -Xt -U__STDC__	# dcosx
+ # CFLAGS = -O -Wall -ansi	# gcc
+ # CFLAGS = -O			# ULTRIX
+ 
+ #
+ # where to put the library directory
+ #
+ LIB = /usr/local/lib/cook
+ 
+ #
+ # where to put the executables
+ #
+ BIN = /usr/local/bin
+ 
+ #
+ # where to put the manuals
+ #
+ MAN = /usr/local/man
+ 
+ #
+ # Which yacc to use
+ #
+ YACC = yacc
+ # YACC = bison -y		# GNU
+ # YACC = byacc			# Berkeley yacc
+ 
+ #
+ # extra libraries required for your system
+ #
+ LIBRARIES =
+ # LIBRARIES =			# SunOS
+ # LIBRARIES =			# ConvexOS
+ # LIBRARIES =			# dgux
+ # LIBRARIES = -lucb		# dcosx
+ # LIBRARIES =			# ULTRIX
+ # LIBRARIES = -lbsd
+ 
+ #
+ # shell to use to run tests and commands
+ #	Make sure there are no spaces after the definition,
+ #	many falavours of make(1) can't cope with them.
+ #
+ SHELL = /bin/sh
+ # SHELL = /bin/sh		# SunOS
+ # SHELL = /bin/sh		# ConvexOS
+ # SHELL = /bin/sh		# dgux
+ # SHELL = /bin/sh		# dcosx
+ # SHELL = /bin/sh5		# ULTRIX
+ 
+ # You should not need to alter anything below this point.
+ #------------------------------------------------------------
+ 
+ all: bin/cook bin/c_incl bin/find_libs bin/roffpp bin/cooktime
+ 
+ 
+ c_incl/cache.o: c_incl/cache.c common/arglex.h common/main.h \
+ 		c_incl/cache.h common/str.h common/s-v-arg.h \
+ 		common/word.h common/error.h common/mem.h c_incl/os.h 
+ 	$(CC) $(CFLAGS) -Ic_incl -Icommon $(H) -c c_incl/cache.c
+ 	mv cache.o c_incl
+ 
+ c_incl/lang_c.o: c_incl/lang_c.c common/error.h common/main.h \
+ 		common/mem.h c_incl/sniff.h common/trace.h \
+ 		common/word.h common/str.h common/s-v-arg.h 
+ 	$(CC) $(CFLAGS) -Ic_incl -Icommon $(H) -c c_incl/lang_c.c
+ 	mv lang_c.o c_incl
+ 
+ c_incl/lang_roff.o: c_incl/lang_roff.c common/error.h common/main.h \
+ 		common/mem.h c_incl/sniff.h common/trace.h \
+ 		common/word.h common/str.h common/s-v-arg.h 
+ 	$(CC) $(CFLAGS) -Ic_incl -Icommon $(H) -c c_incl/lang_roff.c
+ 	mv lang_roff.o c_incl
+ 
+ c_incl/main.o: c_incl/main.c common/arglex.h common/main.h \
+ 		c_incl/cache.h common/str.h common/s-v-arg.h \
+ 		common/word.h common/error.h common/help.h \
+ 		c_incl/sniff.h common/trace.h common/version.h 
+ 	$(CC) $(CFLAGS) -Ic_incl -Icommon $(H) -c c_incl/main.c
+ 	mv main.o c_incl
+ 
+ c_incl/os.o: c_incl/os.c common/error.h common/main.h c_incl/os.h
+ 	$(CC) $(CFLAGS) -Ic_incl -Icommon $(H) -c c_incl/os.c
+ 	mv os.o c_incl
+ 
+ c_incl/sniff.o: c_incl/sniff.c c_incl/cache.h common/main.h \
+ 		common/str.h common/s-v-arg.h common/word.h \
+ 		common/error.h common/mem.h c_incl/os.h c_incl/sniff.h \
+ 		common/trace.h 
+ 	$(CC) $(CFLAGS) -Ic_incl -Icommon $(H) -c c_incl/sniff.c
+ 	mv sniff.o c_incl
+ 
+ common/ansi.o: common/ansi.c common/main.h
+ 	$(CC) $(CFLAGS) -Icommon $(H) -c common/ansi.c
+ 	mv ansi.o common
+ 
+ common/arglex.o: common/arglex.c common/main.h common/arglex.h \
+ 		common/error.h common/word.h common/str.h \
+ 		common/s-v-arg.h common/mem.h common/trace.h 
+ 	$(CC) $(CFLAGS) -Icommon $(H) -c common/arglex.c
+ 	mv arglex.o common
+ 
+ common/error.o: common/error.c common/arglex.h common/main.h \
+ 		common/error.h common/s-v-arg.h 
+ 	$(CC) $(CFLAGS) -Icommon $(H) -c common/error.c
+ 	mv error.o common
+ 
+ common/help.o: common/help.c common/arglex.h common/main.h \
+ 		common/error.h common/help.h common/patchlevel.h 
+ 	$(CC) $(CFLAGS) -Icommon $(H) -c common/help.c
+ 	mv help.o common
+ 
+ common/mem.o: common/mem.c common/mem.h common/main.h common/error.h
+ 	$(CC) $(CFLAGS) -Icommon $(H) -c common/mem.c
+ 	mv mem.o common
+ 
+ common/str.o: common/str.c common/error.h common/main.h common/mem.h \
+ 		common/s-v-arg.h common/str.h 
+ 	$(CC) $(CFLAGS) -Icommon $(H) -c common/str.c
+ 	mv str.o common
+ 
+ common/trace.o: common/trace.c common/error.h common/main.h \
+ 		common/mem.h common/arglex.h common/s-v-arg.h \
+ 		common/str.h common/trace.h 
+ 	$(CC) $(CFLAGS) -Icommon $(H) -c common/trace.c
+ 	mv trace.o common
+ 
+ common/version.o: common/version.c common/arglex.h common/main.h \
+ 		common/error.h common/help.h common/str.h \
+ 		common/s-v-arg.h common/version.h 
+ 	$(CC) $(CFLAGS) -Icommon $(H) -c common/version.c
+ 	mv version.o common
+ 
+ common/word.o: common/word.c common/error.h common/main.h common/mem.h \
+ 		common/str.h common/s-v-arg.h common/word.h 
+ 	$(CC) $(CFLAGS) -Icommon $(H) -c common/word.c
+ 	mv word.o common
+ 
+ cook/builtin.o: cook/builtin.c cook/builtin.h common/main.h cook/cook.h \
+ 		cook/expr.h common/str.h common/s-v-arg.h common/word.h \
+ 		cook/stmt.h common/error.h cook/glob.h cook/id.h \
+ 		cook/match.h common/mem.h cook/option.h cook/os.h 
+ 	$(CC) $(CFLAGS)  -Icook -Icommon $(H) -c cook/builtin.c
+ 	mv builtin.o cook
+ 
+ cook/cook.o: cook/cook.c cook/cook.h common/main.h cook/expr.h \
+ 		common/str.h common/s-v-arg.h common/word.h cook/stmt.h \
+ 		common/error.h cook/id.h cook/match.h common/mem.h \
+ 		cook/option.h cook/os.h common/trace.h 
+ 	$(CC) $(CFLAGS)  -Icook -Icommon $(H) -c cook/cook.c
+ 	mv cook.o cook
+ 
+ cook/env.o: cook/env.c common/main.h cook/env.h common/mem.h \
+ 		common/error.h 
+ 	$(CC) $(CFLAGS)  -Icook -Icommon $(H) -c cook/env.c
+ 	mv env.o cook
+ 
+ cook/expr.o: cook/expr.c cook/builtin.h common/main.h cook/cook.h \
+ 		cook/expr.h common/str.h common/s-v-arg.h common/word.h \
+ 		cook/stmt.h common/error.h cook/id.h cook/lex.h \
+ 		cook/match.h common/mem.h cook/option.h common/trace.h 
+ 	$(CC) $(CFLAGS)  -Icook -Icommon $(H) -c cook/expr.c
+ 	mv expr.o cook
+ 
+ cook/glob.o: cook/glob.c cook/glob.h common/main.h common/word.h \
+ 		common/str.h common/s-v-arg.h common/trace.h \
+ 		common/mem.h common/error.h 
+ 	$(CC) $(CFLAGS)  -Icook -Icommon $(H) -c cook/glob.c
+ 	mv glob.o cook
+ 
+ cook/hashline.gen.c cook/hashline.gen.h: cook/hashline.y
+ 	$(YACC) -d cook/hashline.y
+ 	sed -e 's/[yY][yY]/hashline_/g' y.tab.c > cook/hashline.gen.c
+ 	sed -e 's/[yY][yY]/hashline_/g' y.tab.h > cook/hashline.gen.h
+ 	rm y.tab.c y.tab.h
+ 
+ cook/hashline.gen.o: cook/hashline.gen.c common/error.h common/main.h \
+ 		cook/expr.h common/str.h common/s-v-arg.h common/word.h \
+ 		cook/hashline.h cook/lex.h common/mem.h cook/option.h \
+ 		cook/os.h common/trace.h 
+ 	$(CC) $(CFLAGS) -Icook -Icommon $(H) -c cook/hashline.gen.c
+ 	mv hashline.gen.o cook/hashline.gen.o
+ 
+ cook/id.o: cook/id.c common/error.h common/main.h common/help.h \
+ 		cook/id.h common/str.h common/s-v-arg.h common/word.h \
+ 		common/mem.h cook/option.h 
+ 	$(CC) $(CFLAGS)  -Icook -Icommon $(H) -c cook/id.c
+ 	mv id.o cook
+ 
+ cook/lex.o: cook/lex.c common/error.h common/main.h cook/expr.h \
+ 		common/str.h common/s-v-arg.h common/word.h \
+ 		cook/hashline.h cook/id.h cook/lex.h common/mem.h \
+ 		cook/option.h cook/stmt.h common/trace.h \
+ 		cook/parse.gen.h cook/hashline.gen.h 
+ 	$(CC) $(CFLAGS)  -Icook -Icommon $(H) -c cook/lex.c
+ 	mv lex.o cook
+ 
+ cook/listing.o: cook/listing.c common/error.h common/main.h \
+ 		cook/listing.h cook/os.h common/str.h common/s-v-arg.h \
+ 		common/word.h cook/option.h common/trace.h 
+ 	$(CC) $(CFLAGS)  -Icook -Icommon $(H) -c cook/listing.c
+ 	mv listing.o cook
+ 
+ cook/main.o: cook/main.c common/arglex.h common/main.h cook/builtin.h \
+ 		cook/cook.h cook/expr.h common/str.h common/s-v-arg.h \
+ 		common/word.h cook/stmt.h cook/env.h common/error.h \
+ 		common/help.h cook/id.h cook/lex.h cook/listing.h \
+ 		cook/option.h cook/parse.h common/trace.h \
+ 		common/version.h 
+ 	$(CC) $(CFLAGS)  -Icook -Icommon $(H) -c cook/main.c
+ 	mv main.o cook
+ 
+ cook/match.o: cook/match.c common/main.h common/str.h common/s-v-arg.h \
+ 		cook/match.h common/word.h common/error.h common/mem.h \
+ 		common/trace.h 
+ 	$(CC) $(CFLAGS)  -Icook -Icommon $(H) -c cook/match.c
+ 	mv match.o cook
+ 
+ cook/option.o: cook/option.c common/main.h cook/option.h common/str.h \
+ 		common/s-v-arg.h common/word.h common/error.h cook/os.h \
+ 		common/mem.h 
+ 	$(CC) $(CFLAGS) -D'LIBDIR="$(LIB)"' -Icook -Icommon $(H) -c \
+ 		cook/option.c 
+ 	mv option.o cook
+ 
+ cook/os.o: cook/os.c common/error.h common/main.h cook/id.h \
+ 		common/str.h common/s-v-arg.h common/word.h \
+ 		common/mem.h cook/option.h cook/os.h common/trace.h 
+ 	$(CC) $(CFLAGS)  -Icook -Icommon $(H) -c cook/os.c
+ 	mv os.o cook
+ 
+ cook/parse.gen.c cook/parse.gen.h: cook/parse.y
+ 	$(YACC) -d cook/parse.y
+ 	sed -e 's/[yY][yY]/parse_/g' y.tab.c > cook/parse.gen.c
+ 	sed -e 's/[yY][yY]/parse_/g' y.tab.h > cook/parse.gen.h
+ 	rm y.tab.c y.tab.h
+ 
+ cook/parse.gen.o: cook/parse.gen.c cook/cook.h common/main.h \
+ 		cook/expr.h common/str.h common/s-v-arg.h common/word.h \
+ 		cook/stmt.h cook/id.h cook/lex.h common/mem.h \
+ 		cook/option.h cook/parse.h common/trace.h 
+ 	$(CC) $(CFLAGS) -Icook -Icommon $(H) -c cook/parse.gen.c
+ 	mv parse.gen.o cook/parse.gen.o
+ 
+ cook/stmt.o: cook/stmt.c cook/cook.h common/main.h cook/expr.h \
+ 		common/str.h common/s-v-arg.h common/word.h cook/stmt.h \
+ 		cook/env.h common/error.h cook/id.h cook/match.h \
+ 		common/mem.h cook/option.h cook/os.h common/trace.h 
+ 	$(CC) $(CFLAGS)  -Icook -Icommon $(H) -c cook/stmt.c
+ 	mv stmt.o cook
+ 
+ cooktime/date.gen.c cooktime/date.gen.h: cooktime/date.y
+ 	$(YACC) -d cooktime/date.y
+ 	sed -e 's/[yY][yY]/date_/g' y.tab.c > cooktime/date.gen.c
+ 	sed -e 's/[yY][yY]/date_/g' y.tab.h > cooktime/date.gen.h
+ 	rm y.tab.c y.tab.h
+ 
+ cooktime/date.gen.o: cooktime/date.gen.c cooktime/date.h common/main.h \
+ 		common/s-v-arg.h common/trace.h 
+ 	$(CC) $(CFLAGS) -Icooktime -Icommon $(H) -c cooktime/date.gen.c
+ 	mv date.gen.o cooktime/date.gen.o
+ 
+ cooktime/main.o: cooktime/main.c common/arglex.h common/main.h \
+ 		cooktime/date.h common/error.h common/help.h \
+ 		common/str.h common/s-v-arg.h common/trace.h \
+ 		common/version.h common/word.h 
+ 	$(CC) $(CFLAGS) -Icooktime -Icommon $(H) -c cooktime/main.c
+ 	mv main.o cooktime
+ 
+ find_libs/main.o: find_libs/main.c common/arglex.h common/main.h \
+ 		common/error.h common/help.h common/mem.h \
+ 		find_libs/os.h common/str.h common/s-v-arg.h \
+ 		common/version.h 
+ 	$(CC) $(CFLAGS) -Ifind_libs -Icommon $(H) -c find_libs/main.c
+ 	mv main.o find_libs
+ 
+ find_libs/os.o: find_libs/os.c common/error.h common/main.h \
+ 		find_libs/os.h 
+ 	$(CC) $(CFLAGS) -Ifind_libs -Icommon $(H) -c find_libs/os.c
+ 	mv os.o find_libs
+ 
+ roffpp/main.o: roffpp/main.c common/arglex.h common/main.h \
+ 		common/error.h common/help.h roffpp/preprocess.h \
+ 		common/str.h common/s-v-arg.h common/trace.h \
+ 		common/version.h 
+ 	$(CC) $(CFLAGS) -Iroffpp -Icommon $(H) -c roffpp/main.c
+ 	mv main.o roffpp
+ 
+ roffpp/preprocess.o: roffpp/preprocess.c common/error.h common/main.h \
+ 		common/mem.h roffpp/preprocess.h common/str.h \
+ 		common/s-v-arg.h common/trace.h common/word.h 
+ 	$(CC) $(CFLAGS) -Iroffpp -Icommon $(H) -c roffpp/preprocess.c
+ 	mv preprocess.o roffpp
+ 
+ t0001a: all test/00/t0001a.sh
+ 	$(SHELL) test/00/t0001a.sh
+ 
+ t0002a: all test/00/t0002a.sh
+ 	$(SHELL) test/00/t0002a.sh
+ 
+ t0003a: all test/00/t0003a.sh
+ 	$(SHELL) test/00/t0003a.sh
+ 
+ t0004a: all test/00/t0004a.sh
+ 	$(SHELL) test/00/t0004a.sh
+ 
+ t0005a: all test/00/t0005a.sh
+ 	$(SHELL) test/00/t0005a.sh
+ 
+ t0006a: all test/00/t0006a.sh
+ 	$(SHELL) test/00/t0006a.sh
+ 
+ t0007a: all test/00/t0007a.sh
+ 	$(SHELL) test/00/t0007a.sh
+ 
+ t0008a: all test/00/t0008a.sh
+ 	$(SHELL) test/00/t0008a.sh
+ 
+ t0009a: all test/00/t0009a.sh
+ 	$(SHELL) test/00/t0009a.sh
+ 
+ t0010a: all test/00/t0010a.sh
+ 	$(SHELL) test/00/t0010a.sh
+ 
+ t0011a: all test/00/t0011a.sh
+ 	$(SHELL) test/00/t0011a.sh
+ 
+ t0012a: all test/00/t0012a.sh
+ 	$(SHELL) test/00/t0012a.sh
+ 
+ t0013a: all test/00/t0013a.sh
+ 	$(SHELL) test/00/t0013a.sh
+ 
+ t0014a: all test/00/t0014a.sh
+ 	$(SHELL) test/00/t0014a.sh
+ 
+ t0015a: all test/00/t0015a.sh
+ 	$(SHELL) test/00/t0015a.sh
+ 
+ t0016a: all test/00/t0016a.sh
+ 	$(SHELL) test/00/t0016a.sh
+ 
+ t0017a: all test/00/t0017a.sh
+ 	$(SHELL) test/00/t0017a.sh
+ 
+ t0018a: all test/00/t0018a.sh
+ 	$(SHELL) test/00/t0018a.sh
+ 
+ t0019a: all test/00/t0019a.sh
+ 	$(SHELL) test/00/t0019a.sh
+ 
+ t0020a: all test/00/t0020a.sh
+ 	$(SHELL) test/00/t0020a.sh
+ 
+ t0021a: all test/00/t0021a.sh
+ 	$(SHELL) test/00/t0021a.sh
+ 
+ t0022a: all test/00/t0022a.sh
+ 	$(SHELL) test/00/t0022a.sh
+ 
+ t0023a: all test/00/t0023a.sh
+ 	$(SHELL) test/00/t0023a.sh
+ 
+ t0024a: all test/00/t0024a.sh
+ 	$(SHELL) test/00/t0024a.sh
+ 
+ t0025a: all test/00/t0025a.sh
+ 	$(SHELL) test/00/t0025a.sh
+ 
+ t0026a: all test/00/t0026a.sh
+ 	$(SHELL) test/00/t0026a.sh
+ 
+ t0027a: all test/00/t0027a.sh
+ 	$(SHELL) test/00/t0027a.sh
+ 
+ t0028a: all test/00/t0028a.sh
+ 	$(SHELL) test/00/t0028a.sh
+ 
+ t0029a: all test/00/t0029a.sh
+ 	$(SHELL) test/00/t0029a.sh
+ 
+ t0030a: all test/00/t0030a.sh
+ 	$(SHELL) test/00/t0030a.sh
+ 
+ t0031a: all test/00/t0031a.sh
+ 	$(SHELL) test/00/t0031a.sh
+ 
+ t0032a: all test/00/t0032a.sh
+ 	$(SHELL) test/00/t0032a.sh
+ 
+ t0033a: all test/00/t0033a.sh
+ 	$(SHELL) test/00/t0033a.sh
+ 
+ t0034a: all test/00/t0034a.sh
+ 	$(SHELL) test/00/t0034a.sh
+ 
+ t0035a: all test/00/t0035a.sh
+ 	$(SHELL) test/00/t0035a.sh
+ 
+ t0036a: all test/00/t0036a.sh
+ 	$(SHELL) test/00/t0036a.sh
+ 
+ t0037a: all test/00/t0037a.sh
+ 	$(SHELL) test/00/t0037a.sh
+ 
+ t0038a: all test/00/t0038a.sh
+ 	$(SHELL) test/00/t0038a.sh
+ 
+ t0039a: all test/00/t0039a.sh
+ 	$(SHELL) test/00/t0039a.sh
+ 
+ t0040a: all test/00/t0040a.sh
+ 	$(SHELL) test/00/t0040a.sh
+ 
+ t0041a: all test/00/t0041a.sh
+ 	$(SHELL) test/00/t0041a.sh
+ 
+ CookObj = cook/builtin.o cook/cook.o cook/env.o cook/expr.o cook/glob.o \
+ 		cook/hashline.gen.o cook/id.o cook/lex.o cook/listing.o \
+ 		cook/main.o cook/match.o cook/option.o cook/os.o \
+ 		cook/parse.gen.o cook/stmt.o 
+ 
+ CommonObj = common/ansi.o common/arglex.o common/error.o common/help.o \
+ 		common/mem.o common/str.o common/trace.o \
+ 		common/version.o common/word.o 
+ 
+ CInclObj = c_incl/cache.o c_incl/lang_c.o c_incl/lang_roff.o \
+ 		c_incl/main.o c_incl/os.o c_incl/sniff.o 
+ 
+ FindLibsObj = find_libs/main.o find_libs/os.o
+ 
+ RoffppObj = roffpp/main.o roffpp/preprocess.o
+ 
+ CooktimeObj = cooktime/date.gen.o cooktime/main.o
+ 
+ bin/cook: $(CookObj) $(CommonObj)
+ 	-if [ ! -d bin ]; then mkdir bin; fi
+ 	$(CC) -o bin/cook $(CookObj) $(CommonObj) $(LIBRARIES)
+ 
+ bin/c_incl: $(CInclObj) $(CommonObj)
+ 	-if [ ! -d bin ]; then mkdir bin; fi
+ 	$(CC) -o bin/c_incl $(CInclObj) $(CommonObj) $(LIBRARIES)
+ 
+ bin/find_libs: $(FindLibsObj) $(CommonObj)
+ 	-if [ ! -d bin ]; then mkdir bin; fi
+ 	$(CC) -o bin/find_libs $(FindLibsObj) $(CommonObj) $(LIBRARIES)
+ 
+ bin/roffpp: $(RoffppObj) $(CommonObj)
+ 	-if [ ! -d bin ]; then mkdir bin; fi
+ 	$(CC) -o bin/roffpp $(RoffppObj) $(CommonObj) $(LIBRARIES)
+ 
+ bin/cooktime: $(CooktimeObj) $(CommonObj)
+ 	-if [ ! -d bin ]; then mkdir bin; fi
+ 	$(CC) -o bin/cooktime $(CooktimeObj) $(CommonObj) $(LIBRARIES)
+ 
+ sure: t0001a t0002a t0003a t0004a t0005a t0006a t0007a t0008a t0009a \
+ 		t0010a t0011a t0012a t0013a t0014a t0015a t0016a t0017a \
+ 		t0018a t0019a t0020a t0021a t0022a t0023a t0024a t0025a \
+ 		t0026a t0027a t0028a t0029a t0030a t0031a t0032a t0033a \
+ 		t0034a t0035a t0036a t0037a t0038a t0039a t0040a t0041a 
+ 	@echo Passed All Tests
+ 
+ clean:
+ 	rm -f core c_incl/cache.o c_incl/lang_c.o c_incl/lang_roff.o \
+ 		c_incl/main.o c_incl/os.o c_incl/sniff.o common/ansi.o \
+ 		common/arglex.o common/error.o common/help.o \
+ 		common/mem.o common/str.o common/trace.o \
+ 		common/version.o common/word.o cook/builtin.o \
+ 		cook/cook.o cook/env.o cook/expr.o cook/glob.o \
+ 		cook/hashline.gen.c cook/hashline.gen.h \
+ 		cook/hashline.gen.o cook/id.o cook/lex.o cook/listing.o \
+ 		cook/main.o cook/match.o cook/option.o cook/os.o \
+ 		cook/parse.gen.c cook/parse.gen.h cook/parse.gen.o \
+ 		cook/stmt.o cooktime/date.gen.c cooktime/date.gen.h \
+ 		cooktime/date.gen.o cooktime/main.o find_libs/main.o \
+ 		find_libs/os.o roffpp/main.o roffpp/preprocess.o 
+ 
+ clobber: clean
+ 	rm -f bin/cook bin/c_incl bin/find_libs bin/roffpp bin/cooktime
+ 
+ install: all
+ 	chmod a+x bin/*
+ 	cp bin/* $(BIN)
+ 	$(SHELL) man1/install.sh $(MAN)/man1
+ 	-mkdir $(LIB)
+ 	-chmod a+rx $(LIB)
+ 	chmod a+r lib/*
+ 	cp lib/* $(LIB)
Index: LICENSE
***************
*** 0 ****
--- 1,339 ----
+ 		    GNU GENERAL PUBLIC LICENSE
+ 		       Version 2, June 1991
+ 
+  Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                           675 Mass Ave, Cambridge, MA 02139, USA
+  Everyone is permitted to copy and distribute verbatim copies
+  of this license document, but changing it is not allowed.
+ 
+ 			    Preamble
+ 
+   The licenses for most software are designed to take away your
+ freedom to share and change it.  By contrast, the GNU General Public
+ License is intended to guarantee your freedom to share and change free
+ software--to make sure the software is free for all its users.  This
+ General Public License applies to most of the Free Software
+ Foundation's software and to any other program whose authors commit to
+ using it.  (Some other Free Software Foundation software is covered by
+ the GNU Library General Public License instead.)  You can apply it to
+ your programs, too.
+ 
+   When we speak of free software, we are referring to freedom, not
+ price.  Our General Public Licenses are designed to make sure that you
+ have the freedom to distribute copies of free software (and charge for
+ this service if you wish), that you receive source code or can get it
+ if you want it, that you can change the software or use pieces of it
+ in new free programs; and that you know you can do these things.
+ 
+   To protect your rights, we need to make restrictions that forbid
+ anyone to deny you these rights or to ask you to surrender the rights.
+ These restrictions translate to certain responsibilities for you if you
+ distribute copies of the software, or if you modify it.
+ 
+   For example, if you distribute copies of such a program, whether
+ gratis or for a fee, you must give the recipients all the rights that
+ you have.  You must make sure that they, too, receive or can get the
+ source code.  And you must show them these terms so they know their
+ rights.
+ 
+   We protect your rights with two steps: (1) copyright the software, and
+ (2) offer you this license which gives you legal permission to copy,
+ distribute and/or modify the software.
+ 
+   Also, for each author's protection and ours, we want to make certain
+ that everyone understands that there is no warranty for this free
+ software.  If the software is modified by someone else and passed on, we
+ want its recipients to know that what they have is not the original, so
+ that any problems introduced by others will not reflect on the original
+ authors' reputations.
+ 
+   Finally, any free program is threatened constantly by software
+ patents.  We wish to avoid the danger that redistributors of a free
+ program will individually obtain patent licenses, in effect making the
+ program proprietary.  To prevent this, we have made it clear that any
+ patent must be licensed for everyone's free use or not licensed at all.
+ 
+   The precise terms and conditions for copying, distribution and
+ modification follow.
+ 
+ 		    GNU GENERAL PUBLIC LICENSE
+    TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+ 
+   0. This License applies to any program or other work which contains
+ a notice placed by the copyright holder saying it may be distributed
+ under the terms of this General Public License.  The "Program", below,
+ refers to any such program or work, and a "work based on the Program"
+ means either the Program or any derivative work under copyright law:
+ that is to say, a work containing the Program or a portion of it,
+ either verbatim or with modifications and/or translated into another
+ language.  (Hereinafter, translation is included without limitation in
+ the term "modification".)  Each licensee is addressed as "you".
+ 
+ Activities other than copying, distribution and modification are not
+ covered by this License; they are outside its scope.  The act of
+ running the Program is not restricted, and the output from the Program
+ is covered only if its contents constitute a work based on the
+ Program (independent of having been made by running the Program).
+ Whether that is true depends on what the Program does.
+ 
+   1. You may copy and distribute verbatim copies of the Program's
+ source code as you receive it, in any medium, provided that you
+ conspicuously and appropriately publish on each copy an appropriate
+ copyright notice and disclaimer of warranty; keep intact all the
+ notices that refer to this License and to the absence of any warranty;
+ and give any other recipients of the Program a copy of this License
+ along with the Program.
+ 
+ You may charge a fee for the physical act of transferring a copy, and
+ you may at your option offer warranty protection in exchange for a fee.
+ 
+   2. You may modify your copy or copies of the Program or any portion
+ of it, thus forming a work based on the Program, and copy and
+ distribute such modifications or work under the terms of Section 1
+ above, provided that you also meet all of these conditions:
+ 
+     a) You must cause the modified files to carry prominent notices
+     stating that you changed the files and the date of any change.
+ 
+     b) You must cause any work that you distribute or publish, that in
+     whole or in part contains or is derived from the Program or any
+     part thereof, to be licensed as a whole at no charge to all third
+     parties under the terms of this License.
+ 
+     c) If the modified program normally reads commands interactively
+     when run, you must cause it, when started running for such
+     interactive use in the most ordinary way, to print or display an
+     announcement including an appropriate copyright notice and a
+     notice that there is no warranty (or else, saying that you provide
+     a warranty) and that users may redistribute the program under
+     these conditions, and telling the user how to view a copy of this
+     License.  (Exception: if the Program itself is interactive but
+     does not normally print such an announcement, your work based on
+     the Program is not required to print an announcement.)
+ 
+ These requirements apply to the modified work as a whole.  If
+ identifiable sections of that work are not derived from the Program,
+ and can be reasonably considered independent and separate works in
+ themselves, then this License, and its terms, do not apply to those
+ sections when you distribute them as separate works.  But when you
+ distribute the same sections as part of a whole which is a work based
+ on the Program, the distribution of the whole must be on the terms of
+ this License, whose permissions for other licensees extend to the
+ entire whole, and thus to each and every part regardless of who wrote it.
+ 
+ Thus, it is not the intent of this section to claim rights or contest
+ your rights to work written entirely by you; rather, the intent is to
+ exercise the right to control the distribution of derivative or
+ collective works based on the Program.
+ 
+ In addition, mere aggregation of another work not based on the Program
+ with the Program (or with a work based on the Program) on a volume of
+ a storage or distribution medium does not bring the other work under
+ the scope of this License.
+ 
+   3. You may copy and distribute the Program (or a work based on it,
+ under Section 2) in object code or executable form under the terms of
+ Sections 1 and 2 above provided that you also do one of the following:
+ 
+     a) Accompany it with the complete corresponding machine-readable
+     source code, which must be distributed under the terms of Sections
+     1 and 2 above on a medium customarily used for software interchange; or,
+ 
+     b) Accompany it with a written offer, valid for at least three
+     years, to give any third party, for a charge no more than your
+     cost of physically performing source distribution, a complete
+     machine-readable copy of the corresponding source code, to be
+     distributed under the terms of Sections 1 and 2 above on a medium
+     customarily used for software interchange; or,
+ 
+     c) Accompany it with the information you received as to the offer
+     to distribute corresponding source code.  (This alternative is
+     allowed only for noncommercial distribution and only if you
+     received the program in object code or executable form with such
+     an offer, in accord with Subsection b above.)
+ 
+ The source code for a work means the preferred form of the work for
+ making modifications to it.  For an executable work, complete source
+ code means all the source code for all modules it contains, plus any
+ associated interface definition files, plus the scripts used to
+ control compilation and installation of the executable.  However, as a
+ special exception, the source code distributed need not include
+ anything that is normally distributed (in either source or binary
+ form) with the major components (compiler, kernel, and so on) of the
+ operating system on which the executable runs, unless that component
+ itself accompanies the executable.
+ 
+ If distribution of executable or object code is made by offering
+ access to copy from a designated place, then offering equivalent
+ access to copy the source code from the same place counts as
+ distribution of the source code, even though third parties are not
+ compelled to copy the source along with the object code.
+ 
+   4. You may not copy, modify, sublicense, or distribute the Program
+ except as expressly provided under this License.  Any attempt
+ otherwise to copy, modify, sublicense or distribute the Program is
+ void, and will automatically terminate your rights under this License.
+ However, parties who have received copies, or rights, from you under
+ this License will not have their licenses terminated so long as such
+ parties remain in full compliance.
+ 
+   5. You are not required to accept this License, since you have not
+ signed it.  However, nothing else grants you permission to modify or
+ distribute the Program or its derivative works.  These actions are
+ prohibited by law if you do not accept this License.  Therefore, by
+ modifying or distributing the Program (or any work based on the
+ Program), you indicate your acceptance of this License to do so, and
+ all its terms and conditions for copying, distributing or modifying
+ the Program or works based on it.
+ 
+   6. Each time you redistribute the Program (or any work based on the
+ Program), the recipient automatically receives a license from the
+ original licensor to copy, distribute or modify the Program subject to
+ these terms and conditions.  You may not impose any further
+ restrictions on the recipients' exercise of the rights granted herein.
+ You are not responsible for enforcing compliance by third parties to
+ this License.
+ 
+   7. If, as a consequence of a court judgment or allegation of patent
+ infringement or for any other reason (not limited to patent issues),
+ conditions are imposed on you (whether by court order, agreement or
+ otherwise) that contradict the conditions of this License, they do not
+ excuse you from the conditions of this License.  If you cannot
+ distribute so as to satisfy simultaneously your obligations under this
+ License and any other pertinent obligations, then as a consequence you
+ may not distribute the Program at all.  For example, if a patent
+ license would not permit royalty-free redistribution of the Program by
+ all those who receive copies directly or indirectly through you, then
+ the only way you could satisfy both it and this License would be to
+ refrain entirely from distribution of the Program.
+ 
+ If any portion of this section is held invalid or unenforceable under
+ any particular circumstance, the balance of the section is intended to
+ apply and the section as a whole is intended to apply in other
+ circumstances.
+ 
+ It is not the purpose of this section to induce you to infringe any
+ patents or other property right claims or to contest validity of any
+ such claims; this section has the sole purpose of protecting the
+ integrity of the free software distribution system, which is
+ implemented by public license practices.  Many people have made
+ generous contributions to the wide range of software distributed
+ through that system in reliance on consistent application of that
+ system; it is up to the author/donor to decide if he or she is willing
+ to distribute software through any other system and a licensee cannot
+ impose that choice.
+ 
+ This section is intended to make thoroughly clear what is believed to
+ be a consequence of the rest of this License.
+ 
+   8. If the distribution and/or use of the Program is restricted in
+ certain countries either by patents or by copyrighted interfaces, the
+ original copyright holder who places the Program under this License
+ may add an explicit geographical distribution limitation excluding
+ those countries, so that distribution is permitted only in or among
+ countries not thus excluded.  In such case, this License incorporates
+ the limitation as if written in the body of this License.
+ 
+   9. The Free Software Foundation may publish revised and/or new versions
+ of the General Public License from time to time.  Such new versions will
+ be similar in spirit to the present version, but may differ in detail to
+ address new problems or concerns.
+ 
+ Each version is given a distinguishing version number.  If the Program
+ specifies a version number of this License which applies to it and "any
+ later version", you have the option of following the terms and conditions
+ either of that version or of any later version published by the Free
+ Software Foundation.  If the Program does not specify a version number of
+ this License, you may choose any version ever published by the Free Software
+ Foundation.
+ 
+   10. If you wish to incorporate parts of the Program into other free
+ programs whose distribution conditions are different, write to the author
+ to ask for permission.  For software which is copyrighted by the Free
+ Software Foundation, write to the Free Software Foundation; we sometimes
+ make exceptions for this.  Our decision will be guided by the two goals
+ of preserving the free status of all derivatives of our free software and
+ of promoting the sharing and reuse of software generally.
+ 
+ 			    NO WARRANTY
+ 
+   11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+ PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+ OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+ REPAIR OR CORRECTION.
+ 
+   12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+ OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGES.
+ 
+ 		     END OF TERMS AND CONDITIONS
+ 
+ 	Appendix: How to Apply These Terms to Your New Programs
+ 
+   If you develop a new program, and you want it to be of the greatest
+ possible use to the public, the best way to achieve this is to make it
+ free software which everyone can redistribute and change under these terms.
+ 
+   To do so, attach the following notices to the program.  It is safest
+ to attach them to the start of each source file to most effectively
+ convey the exclusion of warranty; and each file should have at least
+ the "copyright" line and a pointer to where the full notice is found.
+ 
+     <one line to give the program's name and a brief idea of what it does.>
+     Copyright (C) 19yy  <name of author>
+ 
+     This program is free software; you can redistribute it and/or modify
+     it under the terms of the GNU General Public License as published by
+     the Free Software Foundation; either version 2 of the License, or
+     (at your option) any later version.
+ 
+     This program is distributed in the hope that it will be useful,
+     but WITHOUT ANY WARRANTY; without even the implied warranty of
+     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+     GNU General Public License for more details.
+ 
+     You should have received a copy of the GNU General Public License
+     along with this program; if not, write to the Free Software
+     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ 
+ Also add information on how to contact you by electronic and paper mail.
+ 
+ If the program is interactive, make it output a short notice like this
+ when it starts in an interactive mode:
+ 
+     Gnomovision version 69, Copyright (C) 19yy name of author
+     Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+     This is free software, and you are welcome to redistribute it
+     under certain conditions; type `show c' for details.
+ 
+ The hypothetical commands `show w' and `show c' should show the appropriate
+ parts of the General Public License.  Of course, the commands you use may
+ be called something other than `show w' and `show c'; they could even be
+ mouse-clicks or menu items--whatever suits your program.
+ 
+ You should also get your employer (if you work as a programmer) or your
+ school, if any, to sign a "copyright disclaimer" for the program, if
+ necessary.  Here is a sample; alter the names:
+ 
+   Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+   `Gnomovision' (which makes passes at compilers) written by James Hacker.
+ 
+   <signature of Ty Coon>, 1 April 1989
+   Ty Coon, President of Vice
+ 
+ This General Public License does not permit incorporating your program into
+ proprietary programs.  If your program is a subroutine library, you may
+ consider it more useful to permit linking proprietary applications with the
+ library.  If this is what you want to do, use the GNU Library General
+ Public License instead of this License.
Index: aux/BUILDING.man
***************
*** 1,12 ****
  '\" t
  .\"	cook - file construction tool
! .\"	Copyright (c) 1992-1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 1, or (at your option)
! .\"	any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  '\" t
  .\"	cook - file construction tool
! .\"	Copyright (C) 1992, 1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 2 of the License, or
! .\"	(at your option) any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 20,27 ****
  .\" MANIFEST: source of the BUILDING file
  .\"
  .TH building cook
! .hy 0
! .ad l
  .SH NAME
  cook \- a file construction tool
  .SH SPACE REQUIREMENTS
--- 20,28 ----
  .\" MANIFEST: source of the BUILDING file
  .\"
  .TH building cook
! .if n .hy 0
! .if n .ad l
! .if n .nr IN 8n
  .SH NAME
  cook \- a file construction tool
  .SH SPACE REQUIREMENTS
***************
*** 29,36 ****
--- 30,52 ----
  .I cook
  program.
  Your milage may vary.
+ .br
  .ne 1i
  .SH SITE CONFIGURATION
+ The file
+ .I common/conf.h
+ needs to be created to match your site.
+ Select an appropriate file from the
+ .I conf
+ directory.
+ The files in this directory are named for the various systems
+ encountered to date by the author.
+ The file most closely resembling your system should be copied into the
+ .I common/conf.h
+ file.
+ You can copy it or use a symbolic link;
+ copying is recommended because you may need to edit.
+ .PP
  A file which may require editing is the
  .I Makefile
  file.
***************
*** 38,43 ****
--- 54,60 ----
  In general these changes will relate to the name of your favorite
  C compiler,
  and where it keeps its include files.
+ .br
  .ne 1i
  .SH KNOWN SYSTEMS
  This distribution of
***************
*** 59,64 ****
--- 76,84 ----
  and also
  .IR gcc (1)
  are known to work.
+ The appropriate configuration is contained in the
+ .I conf/SunOS-4.1
+ file.
  .TP 8n
  ConvexOS 10.0
  .br
***************
*** 65,80 ****
  The native
  .IR cc (1)
  is known to work.
! .TP dgux 5.4.1
  .br
! The
! .I gcc (1)
  compiler is known to work.
  .PP
  Please let the author know of any other systems you get
  .I cook
  working on,
  and the modifications necessary.
  .PP
  The
  .I cook
--- 85,145 ----
  The native
  .IR cc (1)
  is known to work.
! The appropriate configuration is contained in the
! .I conf/ConvexOS-10
! file.
! .TP
! dgux 5.4.1
  .br
! The native
! .I cc (1)
  compiler is known to work.
+ The appropriate configuration is contained in the
+ .I conf/dgux-5.4.1
+ file.
+ .TP
+ Pyramid SMP DC/OSx 1.0-92b023
+ .br
+ This system is revolting!
+ The Berkeley
+ .I cc (1)
+ compiler variant is known to work.
+ The appropriate configuration is contained in the
+ .I conf/dcosx
+ file.
+ Make sure you read the
+ .I Makefile
+ file very carefully.
+ .TP
+ ULTRIX 4.2
+ .br
+ The native
+ .I cc (1)
+ compiler is known to work.
+ The appropriate configuration is contained in the
+ .I conf/ULTRIX-4.2
+ file.
+ Make sure you set the
+ .I SHELL
+ macro in the
+ .I Makefile
+ file.
  .PP
+ If any of the above systems do not work for you,
+ after you have double-checked everything,
+ the author wants to know.
+ .SH UNKNOWN SYSTEMS
  Please let the author know of any other systems you get
  .I cook
  working on,
  and the modifications necessary.
+ Please include the changes to the
+ .I Makefile
+ file,
+ the relevant
+ .I common/conf.h
+ file used,
+ and the output of the "uname -rs" command.
  .PP
  The
  .I cook
***************
*** 85,91 ****
  The
  .I cook
  program source attempts to use ANSI C features without compromising the ability
! to be compilted on older C compilers.
  Functions mandated by the ANSI C standard are used,
  because many systems provided them, one way or another.
  Please let the author know of any others you think should
--- 150,156 ----
  The
  .I cook
  program source attempts to use ANSI C features without compromising the ability
! to be compiled on older C compilers.
  Functions mandated by the ANSI C standard are used,
  because many systems provided them, one way or another.
  Please let the author know of any others you think should
***************
*** 101,107 ****
--- 166,174 ----
  .I Makefile
  file similar to
  .RS
+ .ft CW
  H = -I/usr/include -Ih
+ .ft R
  .RE
  Change this to suit your system and your compiler.
  The "h" directory must be searched last as it is
***************
*** 111,125 ****
  You will need to check the include files in the "h" directory
  to see that they are suitable for your system.
  You may want to delete any that your system already has.
  .ne 1i
  .SH BUILDING COOK
  All you should need to do is use the
  .RS
! % \fBmake\fP
! .br
  \fI\&...lots of output...\fP
- .br
  %
  .RE
  command and wait.
  When this finishes you should see a directory called
--- 178,195 ----
  You will need to check the include files in the "h" directory
  to see that they are suitable for your system.
  You may want to delete any that your system already has.
+ .br
  .ne 1i
  .SH BUILDING COOK
  All you should need to do is use the
  .RS
! .ft CW
! .nf
! % make
  \fI\&...lots of output...\fP
  %
+ .fi
+ .ft R
  .RE
  command and wait.
  When this finishes you should see a directory called
***************
*** 141,146 ****
--- 211,217 ----
  .I cook
  which tracks doen the names of library files,
  given cc-style library options (-L and -l).
+ .br
  .ne 1i
  .SH TESTING
  The
***************
*** 148,159 ****
  program comes with a test suite.
  To run this test suite, use the command
  .RS
  .nf
! % \fBmake sure\fP
  \fI\&...lots of output...\fP
  Passed All Tests
  %
  .fi
  .RE
  .PP
  The tests take a few seconds each,
--- 219,232 ----
  program comes with a test suite.
  To run this test suite, use the command
  .RS
+ .ft CW
  .nf
! % make sure
  \fI\&...lots of output...\fP
  Passed All Tests
  %
  .fi
+ .ft R
  .RE
  .PP
  The tests take a few seconds each,
***************
*** 163,171 ****
--- 236,247 ----
  .PP
  If all went well, the message
  .RS
+ .ft CW
  Passed All Tests
+ .ft R
  .RE
  should appear at the end of the make.
+ .br
  .ne 1i
  .SH INSTALLING COOK
  Put the
***************
*** 176,192 ****
  directory.
  Use the command
  .RS
! # \fBcp bin/* /usr/local/bin\fP
! .br
  #
  .RE
  .PP
  The manuals can be installed using the commands
  .RS
! # \fBcp man1/* /usr/man/man1\fP
! .br
  #
  .RE
  .PP
  By default,
  .I cook
--- 252,277 ----
  directory.
  Use the command
  .RS
! .ft CW
! .nf
! # cp bin/* /usr/local/bin
  #
+ .fi
+ .ft R
  .RE
  .PP
  The manuals can be installed using the commands
  .RS
! .ft CW
! .nf
! # sh man1/install.sh \fI/usr/local/man/man1\fP
  #
+ .fi
+ .ft R
  .RE
+ This is very site-specific.
+ You can install the manuals in a different directory
+ by using a different last argument.
  .PP
  By default,
  .I cook
***************
*** 194,202 ****
  .I /usr/local/lib/cook
  as the place it stores various system recipe files
  .RS
! # \fBcp -r lib /usr/local/lib/cook\fP
! .br
  #
  .RE
  These paths are only example, where to install things tends
  to be very system specific, and I won't even try to guess.
--- 279,291 ----
  .I /usr/local/lib/cook
  as the place it stores various system recipe files
  .RS
! .ft CW
! .nf
! # mkdir /usr/local/lib/cook
! # cp lib/* /usr/local/lib/cook
  #
+ .fi
+ .ft R
  .RE
  These paths are only example, where to install things tends
  to be very system specific, and I won't even try to guess.
***************
*** 204,210 ****
--- 293,377 ----
  few lines of the
  .I Makefile
  file.
+ .PP
+ All of the above install can be done automatically,
+ using the "\f(CWmake install\fP" command.
+ Control of the directories used may be found in the first
+ few lines of the
+ .I Makefile
+ file.
+ .br
  .ne 1i
+ .SH PRINTED MANUALS
+ This distribution contains the sources to
+ all of the documentation for
+ .IR cook .
+ The author used the GNU groff package
+ and a postscript printer to prepare the documentation.
+ If you do not have this software,
+ you will need to substitute commands appropriate to your site.
+ .PP
+ To print copies of the
+ .I README
+ and
+ .I BUILDING
+ files,
+ the following commands may be used
+ .RS
+ .ft CW
+ .nf
+ % cd aux
+ % groff -s -t -man *.man | lpr
+ % cd ..
+ %
+ .fi
+ .ft R
+ .RE
+ This will produce about 4 pages.
+ The "-s" flag means preprocess with
+ .IR soelim (1),
+ and the "-t" flag means preprocess with
+ .IR tbl (1).
+ .PP
+ To print copies of the manual entries,
+ the following commands may be used
+ .RS
+ .ft CW
+ .nf
+ % cd man1
+ % groff -s -t -man *.1 | lpr
+ % cd ..
+ %
+ .fi
+ .ft R
+ .RE
+ This will produce about 8 pages.
+ The "-s" flag means preprocess with
+ .IR soelim (1),
+ and the "-t" flag means preprocess with
+ .IR tbl (1).
+ .PP
+ To print a copy of the Reference Manual,
+ the following commands may be used
+ .RS
+ .ft CW
+ .nf
+ % cd doc
+ % groff -s -t -mm refman.t | lpr
+ % cd ..
+ %
+ .fi
+ .ft R
+ .RE
+ This will produce about 35 pages.
+ The "-s" flag means preprocess with
+ .IR soelim (1),
+ the "-t" flag means preprocess with
+ .IR tbl (1).
+ Alternatively,
+ you could get a PostScript copy of the Reference Manual from the archive site.
+ .br
+ .ne 1i
  .SH GETTING HELP
  If you need assistance with the
  .I cook
***************
*** 211,217 ****
--- 378,386 ----
  program,
  please do not hesitate to contact the author at
  .RS
+ .ft CW
  Peter Miller <pmiller@bmr.gov.au>
+ .ft R
  .RE
  Any and all feedback is welcome.
  .PP
***************
*** 219,233 ****
  please include the version number
  given by the
  .RS
  % cook -version
! .br
  %
  .RE
  command.
  .PP
  In the
  .I common/main.h
! file, the is a define of
  .I DEBUG
  in comments.
  If the comments are removed,
--- 388,407 ----
  please include the version number
  given by the
  .RS
+ .ft CW
+ .nf
  % cook -version
! cook version \fIa.b.cccc\fP
! \&...
  %
+ .fi
+ .ft R
  .RE
  command.
  .PP
  In the
  .I common/main.h
! file, there is a define of
  .I DEBUG
  in comments.
  If the comments are removed,
***************
*** 237,253 ****
  and adds the
  .B -TRACIng
  command line option.
! When followed by one or more file names,
! this turns on execution traces in those files.
! .ne 1i
  .SH COPYRIGHT
- The
  .I cook
! program is
  Copyright
! .if n (c)
  .if t \(co
! 1988-1993 Peter Miller.
  .br
  All rights reserved.
  .PP
--- 411,435 ----
  and adds the
  .B -TRACIng
  command line option.
! .PP
! When the
! .B -TRACing
! option is followed by one or more file names,
! it turns on execution traces in those source files.
! It is best to put this option on the end of the command,
! so that the names of the files to be traced are not confused
! with any other filenames or strings on the command line.
! .br
! .ne 2i
  .SH COPYRIGHT
  .I cook
! version
! .so ../doc/version.so
! .br
  Copyright
! .if n (C)
  .if t \(co
! 1988, 1989, 1990, 1991, 1992, 1993 Peter Miller.
  .br
  All rights reserved.
  .PP
***************
*** 258,267 ****
  without even the implied warranty of MERCHANTABILITY or
  FITNESS FOR A PARTICULAR PURPOSE.
  See the GNU General Public License for more details.
  .SH AUTHOR
  .TS
  tab(;);
  l l l.
  Peter Miller;UUCP;uunet!munnari!bmr.gov.au!pmiller
! /\e/\e*;CSNET;pmiller@bmr.gov.au
  .TE
--- 440,455 ----
  without even the implied warranty of MERCHANTABILITY or
  FITNESS FOR A PARTICULAR PURPOSE.
  See the GNU General Public License for more details.
+ .PP
+ It should be in the
+ .I LICENSE
+ file included with this distribution.
+ .br
+ .ne 1i
  .SH AUTHOR
  .TS
  tab(;);
  l l l.
  Peter Miller;UUCP;uunet!munnari!bmr.gov.au!pmiller
! \f(CW/\e/\e*\fP;Internet;pmiller@bmr.gov.au
  .TE
Index: aux/CHANGES.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1992-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: aux/Howto.cook
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1991-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 69,75 ****
  vs_file = common/patchlevel.h;
  change_files =
  	[collect aegis -l chafil -ter -p [project] -c [change]]
! 	[vs_file]
  	;
  project_files =
  	[collect aegis -l profil -ter -p [project] -c [change]]
--- 69,75 ----
  vs_file = common/patchlevel.h;
  change_files =
  	[collect aegis -l chafil -ter -p [project] -c [change]]
! 	[vs_file] doc/version.so
  	;
  project_files =
  	[collect aegis -l profil -ter -p [project] -c [change]]
***************
*** 254,259 ****
--- 254,262 ----
  if [exists [vs_file]] then
  	rm [vs_file]
  		set clearstat;
+ if [exists doc/version.so] then
+ 	rm doc/version.so
+ 		set clearstat;
  
  #endif
  
***************
*** 265,270 ****
--- 268,282 ----
  	echo "'#define PATCHLEVEL \""[version]"\"'" > [vs_file]
  		set clearstat;
  }
+ if [not [exists doc/version.so]] then
+ {
+ 	if [not [exists doc]] then
+ 		mkdir doc
+ 			set clearstat;
+ 	echo "'"[version]"'" > doc/version.so
+ 		set clearstat;
+ 	cooktime -m 2-Jan-70 doc/version.so;
+ }
  
  
  /*
***************
*** 303,308 ****
--- 315,321 ----
  			set clearstat;
  	/* assumes shar.3.49 available */
  	shar -n[project] -a -c -oarchive/Part -L50
+ 		-s "'Peter Miller <pmiller@bmr.gov.au>'"
  		[resolve [source_file_order]];
  	compress -v archive/Part.*;
  }
***************
*** 315,321 ****
  	if [exists [target]] then
  		rm [target]
  			set clearstat;
! 	tar cf - [resolve [source_file_order]] | compress > [target];
  }
  
  CHANGES: aux/CHANGES.sh [vs_file]
--- 328,337 ----
  	if [exists [target]] then
  		rm [target]
  			set clearstat;
! 	tar cf - [resolve [source_file_order]] |
! 	tardy -unu 0 -gnu 0 -una Peter -gna Miller -p [project] -ms 0644 -mc 022
! 		> archive/[project].tar;
! 	compress -v archive/[project].tar;
  }
  
  CHANGES: aux/CHANGES.sh [vs_file]
***************
*** 332,338 ****
  		rm [target]
  			set clearstat;
  	roffpp [prepost "-I" "/doc" [search_list]] [resolve [need]]
! 		| tbl | nroff -man > [target];
  }
  
  /*
--- 348,354 ----
  		rm [target]
  			set clearstat;
  	roffpp [prepost "-I" "/doc" [search_list]] [resolve [need]]
! 		| groff -Tascii -t -P-hub -man > [target];
  }
  
  /*
***************
*** 379,385 ****
  		rm [target]
  			set clearstat;
  	roffpp [prepost "-I" "/man%1" [search_list]] [resolve man%1/%2.%1]
! 		| tbl | nroff -man > [target];
  }
  
  
--- 395,401 ----
  		rm [target]
  			set clearstat;
  	roffpp [prepost "-I" "/man%1" [search_list]] [resolve man%1/%2.%1]
! 		| groff -Tascii -t -P-h -man > [target];
  }
  
  
Index: aux/MANIFEST.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 28,34 ****
  	MANIFEST)
  		info="This file"
  		;;
! 	COPYING)
  		info="GNU General Public License"
  		;;
  	README)
--- 28,34 ----
  	MANIFEST)
  		info="This file"
  		;;
! 	LICENSE)
  		info="GNU General Public License"
  		;;
  	README)
***************
*** 44,49 ****
--- 44,52 ----
  		info="Instructions to make(1) how to build and test cook"
  		;;
  	common/patchlevel.h)
+ 		info="The patch level of this distribution."
+ 		;;
+ 	doc/version.so)
  		info="The patch level of this distribution."
  		;;
  	*)
Index: aux/Makefile.awk
***************
*** 1,12 ****
  #
  #	cook - a program construction tool
! #	Copyright (c) 1991-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  #
  #	cook - a program construction tool
! #	Copyright (C) 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: aux/Makefile.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 38,44 ****
--- 38,48 ----
  echo  "# H = -I/usr/local/lib/gcc-include -I/usr/include -Ih"
  echo  "# H = -I/usr/include -Ih"
  echo  "H ="
+ echo  "# H =				# SunOS"
+ echo  "# H =				# ConvexOS"
  echo  "# H =				# dgux"
+ echo  "# H =				# dcosx"
+ echo  "# H =				# ULTRIX"
  echo  ""
  echo  "#"
  echo  "# the name of the compiler to use"
***************
*** 45,52 ****
  echo  "#"
  echo  "CC = cc"
  echo  "# CC = gcc"
  echo  "# CC = rcc			# SCO"
! echo  "# CC = gcc			# dgux"
  echo
  echo  "#"
  echo  "# The compiler flags to use, except for include path."
--- 49,60 ----
  echo  "#"
  echo  "CC = cc"
  echo  "# CC = gcc"
+ echo  "# CC = cc			# SunOS"
+ echo  "# CC = cc			# ConvexOS"
  echo  "# CC = rcc			# SCO"
! echo  "# CC = cc			# dgux"
! echo  "# CC = /usr/ucb/cc		# dcosx"
! echo  "# CC = cc			# ULTRIX"
  echo
  echo  "#"
  echo  "# The compiler flags to use, except for include path."
***************
*** 53,60 ****
  echo  "#"
  echo  "CFLAGS = -O"
  echo  "# CFLAGS = -g"
! echo  "# CFLAGS = -O -Wall -ansi	# gcc"
  echo  "# CFLAGS = -O			# dgux"
  echo  ""
  echo  "#"
  echo  "# where to put the library directory"
--- 61,72 ----
  echo  "#"
  echo  "CFLAGS = -O"
  echo  "# CFLAGS = -g"
! echo  "# CFLAGS = -O			# SunOS"
! echo  "# CFLAGS = -O			# ConvexOS"
  echo  "# CFLAGS = -O			# dgux"
+ echo  "# CFLAGS = -O -Xt -U__STDC__	# dcosx"
+ echo  "# CFLAGS = -O -Wall -ansi	# gcc"
+ echo  "# CFLAGS = -O			# ULTRIX"
  echo  ""
  echo  "#"
  echo  "# where to put the library directory"
***************
*** 62,67 ****
--- 74,89 ----
  echo  "LIB = /usr/local/lib/cook"
  echo  ""
  echo  "#"
+ echo  "# where to put the executables"
+ echo  "#"
+ echo  "BIN = /usr/local/bin"
+ echo  ""
+ echo  "#"
+ echo  "# where to put the manuals"
+ echo  "#"
+ echo  "MAN = /usr/local/man"
+ echo  ""
+ echo  "#"
  echo  "# Which yacc to use"
  echo  "#"
  echo  "YACC = yacc"
***************
*** 72,79 ****
--- 94,118 ----
  echo  "# extra libraries required for your system"
  echo  "#"
  echo  "LIBRARIES ="
+ echo  "# LIBRARIES =			# SunOS"
+ echo  "# LIBRARIES =			# ConvexOS"
+ echo  "# LIBRARIES =			# dgux"
+ echo  "# LIBRARIES = -lucb		# dcosx"
+ echo  "# LIBRARIES =			# ULTRIX"
  echo  "# LIBRARIES = -lbsd"
  echo  ""
+ echo  "#"
+ echo  "# shell to use to run tests and commands"
+ echo  "#	Make sure there are no spaces after the definition,"
+ echo  "#	many falavours of make(1) can't cope with them."
+ echo  "#"
+ echo  "SHELL = /bin/sh"
+ echo  "# SHELL = /bin/sh		# SunOS"
+ echo  "# SHELL = /bin/sh		# ConvexOS"
+ echo  "# SHELL = /bin/sh		# dgux"
+ echo  "# SHELL = /bin/sh		# dcosx"
+ echo  "# SHELL = /bin/sh5		# ULTRIX"
+ echo  ""
  echo  "# You should not need to alter anything below this point."
  echo  "#------------------------------------------------------------"
  echo  ""
***************
*** 198,204 ****
  		root=`basename $file .sh`
  		echo ""
  		echo "${root}: all $file"
! 		echo "	sh $file"
  		test_files="$test_files ${root}"
  		;;
  
--- 237,243 ----
  		root=`basename $file .sh`
  		echo ""
  		echo "${root}: all $file"
! 		echo "	$(SHELL) $file"
  		test_files="$test_files ${root}"
  		;;
  
***************
*** 208,254 ****
  done
  
  echo ""
! echo "cookObj =" $cook_files
  
  echo ""
! echo "commonObj =" $common_files
  
  echo ""
! echo "c_inclObj =" $c_incl_files
  
  echo ""
! echo "find_libsObj =" $find_libs_files
  
  echo ""
! echo "roffppObj =" $roffpp_files
  
  echo ""
! echo "cooktimeObj =" $cooktime_files
  
  echo ""
! echo "bin/cook: $(cookObj) $(commonObj)"
  echo "	-if [ ! -d bin ]; then mkdir bin; fi"
! echo "	$(CC) -o bin/cook $(cookObj) $(commonObj) $(LIBRARIES)"
  
  echo ""
! echo "bin/c_incl: $(c_inclObj) $(commonObj)"
  echo "	-if [ ! -d bin ]; then mkdir bin; fi"
! echo "	$(CC) -o bin/c_incl $(c_inclObj) $(commonObj) $(LIBRARIES)"
  
  echo ""
! echo "bin/find_libs: $(find_libsObj) $(commonObj)"
  echo "	-if [ ! -d bin ]; then mkdir bin; fi"
! echo "	$(CC) -o bin/find_libs $(find_libsObj) $(commonObj) $(LIBRARIES)"
  
  echo ""
! echo "bin/roffpp: $(roffppObj) $(commonObj)"
  echo "	-if [ ! -d bin ]; then mkdir bin; fi"
! echo "	$(CC) -o bin/roffpp $(roffppObj) $(commonObj) $(LIBRARIES)"
  
  echo ""
! echo "bin/cooktime: $(cooktimeObj) $(commonObj)"
  echo "	-if [ ! -d bin ]; then mkdir bin; fi"
! echo "	$(CC) -o bin/cooktime $(cooktimeObj) $(commonObj) $(LIBRARIES)"
  
  echo ""
  echo "sure:" $test_files
--- 247,293 ----
  done
  
  echo ""
! echo "CookObj =" $cook_files
  
  echo ""
! echo "CommonObj =" $common_files
  
  echo ""
! echo "CInclObj =" $c_incl_files
  
  echo ""
! echo "FindLibsObj =" $find_libs_files
  
  echo ""
! echo "RoffppObj =" $roffpp_files
  
  echo ""
! echo "CooktimeObj =" $cooktime_files
  
  echo ""
! echo "bin/cook: $(CookObj) $(CommonObj)"
  echo "	-if [ ! -d bin ]; then mkdir bin; fi"
! echo "	$(CC) -o bin/cook $(CookObj) $(CommonObj) $(LIBRARIES)"
  
  echo ""
! echo "bin/c_incl: $(CInclObj) $(CommonObj)"
  echo "	-if [ ! -d bin ]; then mkdir bin; fi"
! echo "	$(CC) -o bin/c_incl $(CInclObj) $(CommonObj) $(LIBRARIES)"
  
  echo ""
! echo "bin/find_libs: $(FindLibsObj) $(CommonObj)"
  echo "	-if [ ! -d bin ]; then mkdir bin; fi"
! echo "	$(CC) -o bin/find_libs $(FindLibsObj) $(CommonObj) $(LIBRARIES)"
  
  echo ""
! echo "bin/roffpp: $(RoffppObj) $(CommonObj)"
  echo "	-if [ ! -d bin ]; then mkdir bin; fi"
! echo "	$(CC) -o bin/roffpp $(RoffppObj) $(CommonObj) $(LIBRARIES)"
  
  echo ""
! echo "bin/cooktime: $(CooktimeObj) $(CommonObj)"
  echo "	-if [ ! -d bin ]; then mkdir bin; fi"
! echo "	$(CC) -o bin/cooktime $(CooktimeObj) $(CommonObj) $(LIBRARIES)"
  
  echo ""
  echo "sure:" $test_files
***************
*** 261,265 ****
--- 300,314 ----
  echo ""
  echo "clobber: clean"
  echo "	rm -f bin/cook bin/c_incl bin/find_libs bin/roffpp bin/cooktime"
+ 
+ echo ""
+ echo "install: all"
+ echo "	chmod a+x bin/*"
+ echo "	cp bin/* $(BIN)"
+ echo "	$(SHELL) man1/install.sh $(MAN)/man1"
+ echo "	-mkdir $(LIB)"
+ echo "	-chmod a+rx $(LIB)"
+ echo "	chmod a+r lib/*"
+ echo "	cp lib/* $(LIB)"
  
  exit 0
Index: aux/README.man
***************
*** 1,12 ****
  '\" t
  .\"	cook - a file construction tool
! .\"	Copyright (c) 1992-1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 1, or (at your option)
! .\"	any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  '\" t
  .\"	cook - a file construction tool
! .\"	Copyright (C) 1992, 1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 2 of the License, or
! .\"	(at your option) any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 62,68 ****
  .IR filename .o
  from
  .IR filename .c
! .PP
  .SH HISTORY
  The
  .I cook
--- 62,69 ----
  .IR filename .o
  from
  .IR filename .c
! .br
! .ne 1i
  .SH HISTORY
  The
  .I cook
***************
*** 87,144 ****
  features other make-oid authors had thought necessary were
  either already present,
  or easily and seamlessly added.
  .PP
! The
  .I cook
! program was written with portability in mind.
! This does not mean that it is entirely portable,
! unfortunately.
  The
  .I cook
! program has been tested on SystemV R2 and SystemV
! R3 and SunOS R4.
! It should also be portable to others.
  .PP
! If you have any trouble getting
  .I cook
! working,
! please e-mail me so I know where I went wrong.
  .SH BUILDING COOK
! Full instruction for building the
  .I cook
  program may be found in the
  .I BUILDING
  file included in this distribution.
  .SH COPYRIGHT
- The
  .I cook
! program is
  Copyright
  .if t \(co
! .if n (c)
! 1988-1993 Peter Miller.
  .br
  All rights reserved.
  .PP
! This program is free software; you can redistribute it
  and/or modify it under the terms of the GNU General Public
! License as published by the Free Software Foundation; either
! version 1, or (at your option) any later version.
  .PP
! This program is distributed in the hope that it will be
! useful, but WITHOUT ANY WARRANTY; without even the implied
  warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
! PURPOSE.  See the GNU General Public License for more
! details.
  .PP
  You should have received a copy of the GNU General Public
  License along with this program; if not, write to the Free
  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
  02139, USA.
  .SH AUTHOR
  .TS
  tab(;);
  l l l.
  Peter Miller;UUCP;uunet!munnari!bmr.gov.au!pmiller
! /\e/\e*;CSNET;pmiller@bmr.gov.au
  .TE
--- 88,270 ----
  features other make-oid authors had thought necessary were
  either already present,
  or easily and seamlessly added.
+ .br
+ .ne 1i
+ .SH ARCHIVE SITE
+ The latest version of
+ .I cook
+ is available by anonymous ftp from:
+ .RS 4m
+ .TS
+ tab(;);
+ l l s
+ l l l.
+ Host:;ftp.cse.nau.edu (134.114.64.70)
+ Dir:;/pub/Aegis
+ File:;README;# what is in this directory
+ File:;cook.1.4.tar.Z;# the complete source
+ File:;cook.1.4.patch.Z;# patch to take 1.3 to 1.4
+ File:;cook.1.4.ps.Z;# PostScript of the Manual
+ .TE
+ .RE
  .PP
! To use anonymous ftp,
! give "anonymous" as the user name (omit the quotes)
! and your email address as the password.
! .PP
! My grateful thanks to Paul Balyoz <pab@ftp.cse.nau.edu>
! for his generosity in providing this archive space.
! .PP
! This directory also contains a few other pieces of software written by me.
! Please have a look if you are interested.
! .PP
! For those of you without ftp,
! I recommend the use of an ftp-by-email server.
! Here is a list of a few (there are many more):
! .RS
! .nf
! mail-server@pit-manager.mit.edu
! ftpmail@decwrl.dec.com
! ftpmail@cs.uow.edu.au
! .fi
! .RE
! .PP
! In general, you can get a help message about how to use each system
! by sending email with a subject of "help"
! and a message body containing just the word "help".
! .br
! .ne 1i
! .SH MAILING LIST
! A mailing list has been created so that users of
  .I cook
! may exchange ideas about how to use the
! .I cook
! program.
! Discussion may include,
! but is not limited to:
! bugs, enhancements, and applications.
! The list is not moderated.
! .PP
! The address of the mailing list is
! .RS
! .ft CW
! cook-users@bmr.gov.au
! .ft R
! .RE
! .PP
! To subscribe to this mailing list,
! send an email message to \f(CWmajordomo@bmr.gov.au\fP with
! a message body containing the single line
! .RS
! .ft CW
! subscribe cook-users
! .ft R
! .RE
! Please note that \f(CWbmr.gov.au\fP is an Internet site,
! so if you have an address which is not readily derived from
! your mail headers (majordomo is only a Perl program, after all)
! you will need to use a message of the form:
! .RS
! .ft CW
! subscribe cook-users \fIaddress\fP
! .ft R
! .RE
! where \fIaddress\fP is an email address which
! makes sense from an Internet site.
! .PP
! The software which handles this mailing list
! .if n CANNOT
! .if t .B cannot
! send you a copy of the
! .I cook
! program.
! Please use ftp or ftp-by-email, instead.
! .br
! .ne 1i
! .SH NEW IN THIS RELEASE
! A number of features have been added to
! .I cook
! with this release.
! A few of them are detailed here:
! .PP
! .if t \(bu
! .if n *
  The
  .I cook
! program is now known to work on more systems.
! Most changes were aimed at improving portability,
! or avoiding problems specific to some systems.
  .PP
! .if t \(bu
! .if n *
! The GNU long option name convention is now understood.
! Option names for
  .I cook
! were always long,
! so this mostly consists of ignoring the extra leading '-'.
! The "--foo=bar" convention is also understood for options with arguments.
! .PP
! .if t \(bu
! .if n *
! Tests which fail now tell you what it was they were testing for.
! This will give the user some idea of what is happening.
! .PP
! Plus the usual crop of bug fixes and tinkering.
! For excruciating detail,
! and also acknowlegements of those who generously sent me feedback,
! please see the
! .I CHANGES
! file included in this distribution.
! .br
! .ne 1i
  .SH BUILDING COOK
! Full instructions for building the
  .I cook
  program may be found in the
  .I BUILDING
  file included in this distribution.
+ .br
+ .ne 1i
  .SH COPYRIGHT
  .I cook
! version
! .so ../doc/version.so
! .br
  Copyright
  .if t \(co
! .if n (C)
! 1988, 1989, 1990, 1991, 1992, 1993 Peter Miller.
  .br
  All rights reserved.
  .PP
! This program is free software;
! you can redistribute it
  and/or modify it under the terms of the GNU General Public
! License as published by the Free Software Foundation;
! either version 2 of the License,
! or (at your option) any later version.
  .PP
! This program is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY;
! without even the implied
  warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
! PURPOSE.
! See the GNU General Public License for more details.
  .PP
  You should have received a copy of the GNU General Public
  License along with this program; if not, write to the Free
  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
  02139, USA.
+ .PP
+ It should be in the
+ .I LICENSE
+ file included with this distribution.
+ .br
+ .ne 1i
  .SH AUTHOR
  .TS
  tab(;);
  l l l.
  Peter Miller;UUCP;uunet!munnari!bmr.gov.au!pmiller
! \f(CW/\e/\e*\fP;Internet;pmiller@bmr.gov.au
  .TE
Index: aux/patches.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: c_incl/cache.c
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1991-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 31,49 ****
  typedef struct node node;
  struct node
  {
! 	cache_t		cache;
  	node		*next;
  };
  
  
! static	node	**hash_table;
! static	hash_t	hash_modulus;
! static	hash_t	hash_cutover;
! static	hash_t	hash_cutover_mask;
! static	hash_t	hash_cutover_split_mask;
! static	hash_t	hash_split;
! static	hash_t	hash_load;
! static	int	need_to_write;
  
  
  /*
--- 31,49 ----
  typedef struct node node;
  struct node
  {
! 	cache_ty	cache;
  	node		*next;
  };
  
  
! static	node		**hash_table;
! static	str_hash_ty	hash_modulus;
! static	str_hash_ty	hash_cutover;
! static	str_hash_ty	hash_cutover_mask;
! static	str_hash_ty	hash_cutover_split_mask;
! static	str_hash_ty	hash_split;
! static	str_hash_ty	hash_load;
! static	int		need_to_write;
  
  
  /*
***************
*** 66,72 ****
  void
  cache_initialize()
  {
! 	hash_t	j;
  
  	assert(!hash_modulus);
  	hash_modulus = 1<<8; /* MUST be a power of 2 */
--- 66,72 ----
  void
  cache_initialize()
  {
! 	str_hash_ty	j;
  
  	assert(!hash_modulus);
  	hash_modulus = 1<<8; /* MUST be a power of 2 */
***************
*** 106,115 ****
  static void
  split()
  {
! 	node	*p;
! 	node	**ipp;
! 	node	*p2;
! 	hash_t  index;
  
  	/*
  	 * get the list to be split across buckets 
--- 106,115 ----
  static void
  split()
  {
! 	node		*p;
! 	node		**ipp;
! 	node		*p2;
! 	str_hash_ty	index;
  
  	/*
  	 * get the list to be split across buckets 
***************
*** 160,166 ****
   *	cache_search - search for a variable
   *
   * SYNOPSIS
!  *	int cache_search(string_t *filename);
   *
   * DESCRIPTION
   *	The cache_search function is used to search for
--- 160,166 ----
   *	cache_search - search for a variable
   *
   * SYNOPSIS
!  *	int cache_search(string_ty *filename);
   *
   * DESCRIPTION
   *	The cache_search function is used to search for
***************
*** 179,189 ****
   *	by a wl_free() call.
   */
  
! cache_t *
  cache_search(filename)
! 	string_t	*filename;
  {
! 	hash_t		index;
  	node		*p;
  
  	/*
--- 179,189 ----
   *	by a wl_free() call.
   */
  
! cache_ty *
  cache_search(filename)
! 	string_ty	*filename;
  {
! 	str_hash_ty	index;
  	node		*p;
  
  	/*
***************
*** 247,253 ****
  
  static void
  build_filename(buffer)
! 	char	*buffer;
  {
  	sprintf(buffer, ".%src", progname);
  }
--- 247,253 ----
  
  static void
  build_filename(buffer)
! 	char		*buffer;
  {
  	sprintf(buffer, ".%src", progname);
  }
***************
*** 279,287 ****
  
  static int
  fread_sane(fp, buf, buflen)
! 	FILE	*fp;
! 	void	*buf;
! 	size_t	buflen;
  {
  	if (fread(buf, 1, buflen, fp) != buflen)
  		return -1;
--- 279,287 ----
  
  static int
  fread_sane(fp, buf, buflen)
! 	FILE		*fp;
! 	void		*buf;
! 	size_t		buflen;
  {
  	if (fread(buf, 1, buflen, fp) != buflen)
  		return -1;
***************
*** 294,300 ****
   *	cache_read_string - read a string from a file
   *
   * SYNOPSIS
!  *	string_t *cache_read_string(FILE *fp));
   *
   * DESCRIPTION
   *	The cache_read_string function is used to read a string
--- 294,300 ----
   *	cache_read_string - read a string from a file
   *
   * SYNOPSIS
!  *	string_ty *cache_read_string(FILE *fp));
   *
   * DESCRIPTION
   *	The cache_read_string function is used to read a string
***************
*** 310,318 ****
   *	Must be symmetric with cache_write string below.
   */
  
! static string_t *cache_read_string _((FILE *));
  
! static string_t *
  cache_read_string(fp)
  	FILE		*fp;
  {
--- 310,318 ----
   *	Must be symmetric with cache_write string below.
   */
  
! static string_ty *cache_read_string _((FILE *));
  
! static string_ty *
  cache_read_string(fp)
  	FILE		*fp;
  {
***************
*** 363,370 ****
  cache_read_item(fp)
  	FILE		*fp;
  {
! 	string_t	*s;
! 	cache_t		*cp;
  	size_t		nitems;
  	size_t		j;
  
--- 363,370 ----
  cache_read_item(fp)
  	FILE		*fp;
  {
! 	string_ty	*s;
! 	cache_ty	*cp;
  	size_t		nitems;
  	size_t		j;
  
***************
*** 407,416 ****
  void
  cache_read()
  {
! 	hash_t	nitems;
! 	hash_t	j;
! 	FILE	*fp;
! 	char	filename[256];
  
  	/*
  	 * open the cache file.
--- 407,416 ----
  void
  cache_read()
  {
! 	str_hash_ty	nitems;
! 	str_hash_ty	j;
! 	FILE		*fp;
! 	char		filename[256];
  
  	/*
  	 * open the cache file.
***************
*** 471,479 ****
  
  static int
  fwrite_sane(fp, buf, buflen)
! 	FILE	*fp;
! 	void	*buf;
! 	size_t	buflen;
  {
  	if (fwrite(buf, 1, buflen, fp) != buflen)
  		return -1;
--- 471,479 ----
  
  static int
  fwrite_sane(fp, buf, buflen)
! 	FILE		*fp;
! 	void		*buf;
! 	size_t		buflen;
  {
  	if (fwrite(buf, 1, buflen, fp) != buflen)
  		return -1;
***************
*** 486,492 ****
   *	cache_write_string - write a string to a file
   *
   * SYNOPSIS
!  *	int cache_write_string(FILE *fp, string_t *s);
   *
   * DESCRIPTION
   *	The cache_write_string function is used to write a string to a file.
--- 486,492 ----
   *	cache_write_string - write a string to a file
   *
   * SYNOPSIS
!  *	int cache_write_string(FILE *fp, string_ty *s);
   *
   * DESCRIPTION
   *	The cache_write_string function is used to write a string to a file.
***************
*** 502,513 ****
   *	Must be symmetric with cache_read_string above.
   */
  
! static int cache_write_string _((FILE *, string_t *));
  
  static int
  cache_write_string(fp, s)
  	FILE		*fp;
! 	string_t	*s;
  {
  	if (fwrite_sane(fp, &s->str_length, sizeof(s->str_length)))
  		return -1;
--- 502,513 ----
   *	Must be symmetric with cache_read_string above.
   */
  
! static int cache_write_string _((FILE *, string_ty *));
  
  static int
  cache_write_string(fp, s)
  	FILE		*fp;
! 	string_ty	*s;
  {
  	if (fwrite_sane(fp, &s->str_length, sizeof(s->str_length)))
  		return -1;
***************
*** 522,528 ****
   *	cache_write_item - write cache item to cache file
   *
   * SYNOPSIS
!  *	int cache_write_item(FILE *fp, cache_t *cp);
   *
   * DESCRIPTION
   *	The cache_write_item function is used to write a cache
--- 522,528 ----
   *	cache_write_item - write cache item to cache file
   *
   * SYNOPSIS
!  *	int cache_write_item(FILE *fp, cache_ty *cp);
   *
   * DESCRIPTION
   *	The cache_write_item function is used to write a cache
***************
*** 539,552 ****
   *	Must be symmetric with cache_read_item above.
   */
  
! static int cache_write_item _((FILE *, cache_t *));
  
  static int
  cache_write_item(fp, cp)
! 	FILE	*fp;
! 	cache_t	*cp;
  {
! 	size_t	j;
  
  	if (cache_write_string(fp, cp->filename))
  		return -1;
--- 539,552 ----
   *	Must be symmetric with cache_read_item above.
   */
  
! static int cache_write_item _((FILE *, cache_ty *));
  
  static int
  cache_write_item(fp, cp)
! 	FILE		*fp;
! 	cache_ty	*cp;
  {
! 	size_t		j;
  
  	if (cache_write_string(fp, cp->filename))
  		return -1;
***************
*** 579,588 ****
  void
  cache_write()
  {
! 	node	*p;
! 	FILE	*fp;
! 	char	filename[256];
! 	hash_t	index;
  
  	/*
  	 * don't change the file if we don't have to
--- 579,588 ----
  void
  cache_write()
  {
! 	node		*p;
! 	FILE		*fp;
! 	char		filename[256];
! 	str_hash_ty	index;
  
  	/*
  	 * don't change the file if we don't have to
Index: c_incl/cache.h
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1991-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 30,45 ****
  #include <str.h>
  #include <word.h>
  
! typedef struct cache_t cache_t;
! struct cache_t
  {
! 	string_t	*filename;
  	struct stat	st;
  	wlist		ingredients;
  };
  
  void cache_initialize _((void));
! cache_t *cache_search _((string_t *filename));
  void cache_read _((void));
  void cache_write _((void));
  void cache_update_notify _((void));
--- 30,45 ----
  #include <str.h>
  #include <word.h>
  
! typedef struct cache_ty cache_ty;
! struct cache_ty
  {
! 	string_ty	*filename;
  	struct stat	st;
  	wlist		ingredients;
  };
  
  void cache_initialize _((void));
! cache_ty *cache_search _((string_ty *filename));
  void cache_read _((void));
  void cache_write _((void));
  void cache_update_notify _((void));
Index: c_incl/lang_c.c
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1992-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 61,67 ****
  {
  	int		right;
  	char		*filename;
! 	string_t	*path;
  
  	/*
  	 * see if it is a #include directive
--- 61,67 ----
  {
  	int		right;
  	char		*filename;
! 	string_ty	*path;
  
  	/*
  	 * see if it is a #include directive
***************
*** 232,238 ****
  }
  
  
! sniff_t lang_c =
  {
  	lang_c_scan,
  	lang_c_prepare,
--- 232,238 ----
  }
  
  
! sniff_ty lang_c =
  {
  	lang_c_scan,
  	lang_c_prepare,
Index: c_incl/lang_roff.c
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1992-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 60,66 ****
  	wlist		*type2;
  {
  	char		*filename;
! 	string_t	*path;
  
  	/*
  	 * see if it is a .so directive
--- 60,66 ----
  	wlist		*type2;
  {
  	char		*filename;
! 	string_ty	*path;
  
  	/*
  	 * see if it is a .so directive
***************
*** 205,211 ****
  }
  
  
! sniff_t lang_roff =
  {
  	lang_roff_scan,
  	lang_roff_prepare,
--- 205,211 ----
  }
  
  
! sniff_ty lang_roff =
  {
  	lang_roff_scan,
  	lang_roff_prepare,
Index: c_incl/main.c
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1991-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 64,90 ****
  "	%s -VERSion",
  "",
  "DESCRIPTION",
! "	The %s program is used to traverse source files looking",
! "	for include dependencies suitable for [collect]ion by cook.",
  "",
! "	Several input languages are supported, see the options list",
! "	for details.",
  "",
  "OPTIONS",
  "	The following options are understood.",
  "",
  "	-C",
! "		The source file is a C source file.  It is assumed",
! "		that it will have the dependencies resolved by the",
! "		cpp(1) command.  The same include semantics as the",
! "		cpp(1) command will be employed.  This is the",
! "		default.",
  "",
  "	-Roff",
  "		The source file is a *roff source file.  It is",
! "		assumed that it will have the dependencies resolved",
! "		by the roffpp(1) command.  The same include",
! "		semantics as the roffpp(1) command will be employed.",
  "",
  "	-Verbose",
  "		Tell what is happening.",
--- 64,92 ----
  "	%s -VERSion",
  "",
  "DESCRIPTION",
! "	The %s program is used to traverse source files",
! "	looking for include dependencies suitable for",
! "	[collect]ion by cook.",
  "",
! "	Several input languages are supported, see the options",
! "	list for details.",
  "",
  "OPTIONS",
  "	The following options are understood.",
  "",
  "	-C",
! "		The source file is a C source file.  It is",
! "		assumed that it will have the dependencies",
! "		resolved by the cpp(1) command.  The same include",
! "		semantics as the cpp(1) command will be employed.",
! "		This is the default.",
  "",
  "	-Roff",
  "		The source file is a *roff source file.  It is",
! "		assumed that it will have the dependencies",
! "		resolved by the roffpp(1) command.  The same",
! "		include semantics as the roffpp(1) command will",
! "		be employed.",
  "",
  "	-Verbose",
  "		Tell what is happening.",
***************
*** 93,116 ****
  "		Specify include path, a la cc(1).",
  "",
  "	-Absent_Local_Ignore",
! "		For files included using a #include ''filename.h''",
! "		directive, ignore the file if it cannot be found.",
  "",
  "	-Absent_Local_Mention",
! "		For files included using a #include ''filename.h''",
! "		directive, print the file name even if the file",
! "		cannot be found.  This is the default (it probably",
! "		needs to be built).",
  "",
  "	-Absent_Local_Error",
! "		For files included using a #include ''filename.h''",
! "		directive, print a fatal error if the file cannot be",
! "		found.",
  "",
  "	-Absent_System_Ignore",
  "		For files included with a #include <filename.h>",
  "		directive, ignore the file if it cannot be found.",
! "		This is the default (it was probably ifdef'ed out).",
  "",
  "	-Absent_System_Mention",
  "		For files included with a #include <filename.h>",
--- 95,120 ----
  "		Specify include path, a la cc(1).",
  "",
  "	-Absent_Local_Ignore",
! "		For files included using a #include",
! "		''filename.h'' directive, ignore the file if it",
! "		cannot be found.",
  "",
  "	-Absent_Local_Mention",
! "		For files included using a #include",
! "		''filename.h'' directive, print the file name",
! "		even if the file cannot be found.  This is the",
! "		default (it probably needs to be built).",
  "",
  "	-Absent_Local_Error",
! "		For files included using a #include",
! "		''filename.h'' directive, print a fatal error if",
! "		the file cannot be found.",
  "",
  "	-Absent_System_Ignore",
  "		For files included with a #include <filename.h>",
  "		directive, ignore the file if it cannot be found.",
! "		This is the default (it was probably ifdef'ed",
! "		out).",
  "",
  "	-Absent_System_Mention",
  "		For files included with a #include <filename.h>",
***************
*** 119,126 ****
  "",
  "	-Absent_System_Error",
  "		For files included with a #include <filename.h>",
! "		directive, print a fatal error if the file cannot be",
! "		found.",
  "",
  "	-Absent_Program_Ignore",
  "		If the file named on the command line cannot be",
--- 123,130 ----
  "",
  "	-Absent_System_Error",
  "		For files included with a #include <filename.h>",
! "		directive, print a fatal error if the file cannot",
! "		be found.",
  "",
  "	-Absent_Program_Ignore",
  "		If the file named on the command line cannot be",
***************
*** 145,178 ****
  "	-No_Cache",
  "		This option may be used to turn caching off.",
  "",
! "	Any other options will generate an error.  Abbreviations are",
! "	in upper case, but the options are case-independent.",
  "",
  "CACHING",
! "	The caching mechanism use by the %s program caches the",
! "	results of searching files for include files (in a file",
! "	called .%src in the current directory).  The cache is",
! "	only refreshed when a file changes.",
  "",
  "	The use of this cache has been shown to dramatically",
! "	increase the performance of the %s program.  Typically,",
! "	only a small proportions files in a project change between",
! "	builds, resulting in a very high cache hit rate.",
  "",
  "	When using caching, always use the same command line",
! "	options, otherwise weird and wonderful things will happen.",
  "",
! "	The .%src file is a binary file.  If you wish to rebuild",
! "	the cache, simply delete this file with the rm(1) command.",
! "	Being a binary file, the .%src file is not portable",
! "	across machines or operating systems, so you will need to",
! "	delete it when you move your sources.  It is a binary file",
! "	for performance.",
  "",
  "EXIT STATUS",
  "	The %s command will exit with a status of 1 on any",
! "	error.  The %s command will only exit with a status of 0",
! "	if there are no errors.",
  "",
  "COPYRIGHT",
  "	%C",
--- 149,205 ----
  "	-No_Cache",
  "		This option may be used to turn caching off.",
  "",
! "	Any other options will generate an error.",
  "",
+ "	All options may be abbreviated; the abbreviation is",
+ "	documented as the upper case letters, all lower case",
+ "	letters and underscores (_) are optional.  You must use",
+ "	consecutive sequences of optional letters.",
+ "",
+ "	All options are case insensitive, you may type them in",
+ "	upper case or lower case or a combination of both, case",
+ "	is not important.",
+ "",
+ "	For example: the arguments \"-help\", \"-HEL\" and \"-h\" are",
+ "	all interpreted to mean the -Help option.  The argument",
+ "	\"-hlp\" will not be understood, because consecutive",
+ "	optional characters were not supplied.",
+ "",
+ "	Options and other command line arguments may be mixed",
+ "	arbitrarily on the command line.",
+ "",
+ "	The GNU long option names are understood.  Since all",
+ "	option names for %s are long, this means ignoring the",
+ "	extra leading '-'.  The \"--option=value\" convention is",
+ "	also understood.",
+ "",
  "CACHING",
! "	The caching mechanism use by the %s program caches",
! "	the results of searching files for include files (in a",
! "	file called .%src in the current directory).  The",
! "	cache is only refreshed when a file changes.",
  "",
  "	The use of this cache has been shown to dramatically",
! "	increase the performance of the %s program.",
! "	Typically, only a small proportions files in a project",
! "	change between builds, resulting in a very high cache hit",
! "	rate.",
  "",
  "	When using caching, always use the same command line",
! "	options, otherwise weird and wonderful things will",
! "	happen.",
  "",
! "	The .%src file is a binary file.  If you wish to",
! "	rebuild the cache, simply delete this file with the rm(1)",
! "	command.  Being a binary file, the .%src file is not",
! "	portable across machines or operating systems, so you",
! "	will need to delete it when you move your sources.  It is",
! "	a binary file for performance.",
  "",
  "EXIT STATUS",
  "	The %s command will exit with a status of 1 on any",
! "	error.  The %s command will only exit with a status",
! "	of 0 if there are no errors.",
  "",
  "COPYRIGHT",
  "	%C",
***************
*** 197,204 ****
  	arglex_token_absent_system_error,
  	arglex_token_absent_system_ignore,
  	arglex_token_absent_system_mention,
! 	arglex_token_include_long,
! 	arglex_token_include_short,
  	arglex_token_no_cache,
  	arglex_token_no_system,
  	arglex_token_lang_c,
--- 224,230 ----
  	arglex_token_absent_system_error,
  	arglex_token_absent_system_ignore,
  	arglex_token_absent_system_mention,
! 	arglex_token_include,
  	arglex_token_no_cache,
  	arglex_token_no_system,
  	arglex_token_lang_c,
***************
*** 206,232 ****
  	arglex_token_verbose
  };
  
! static	arglex_table_t	argtab[] =
  {
! 	{ "-Absent",		arglex_token_absent_local_ignore,	},
! 	{ "-Absent_Local_Error", arglex_token_absent_local_error,	},
! 	{ "-Absent_Local_Ignore", arglex_token_absent_local_ignore,	},
! 	{ "-Absent_Local_Mention", arglex_token_absent_local_mention,	},
! 	{ "-Absent_Program_Error", arglex_token_absent_program_error,	},
! 	{ "-Absent_Program_Ignore", arglex_token_absent_program_ignore,	},
! 	{ "-Absent_System_Error", arglex_token_absent_system_error,	},
! 	{ "-Absent_System_Ignore", arglex_token_absent_system_ignore,	},
! 	{ "-Absent_System_Mention", arglex_token_absent_system_mention,	},
! 	{ "-C",			arglex_token_lang_c,			},
! 	{ "-Empty_If_Absent",	arglex_token_absent_program_ignore,	},
! 	{ "-\\I*",		arglex_token_include_short,		},
! 	{ "-Include",		arglex_token_include_long,		},
! 	{ "-No_Cache",		arglex_token_no_cache,			},
! 	{ "-No_System",		arglex_token_no_system,			},
! 	{ "-Roff",		arglex_token_lang_roff,			},
! 	{ "-System_absent",	arglex_token_absent_system_ignore,	},
! 	{ "-Verbose",		arglex_token_verbose,			},
! 	{ 0, 0, }, /* end marker */
  };
  
  
--- 232,314 ----
  	arglex_token_verbose
  };
  
! static	arglex_table_ty	argtab[] =
  {
! 	{
! 		"-Absent",
! 		(arglex_token_ty)arglex_token_absent_local_ignore,
! 	},
! 	{
! 		"-Absent_Local_Error",
! 		(arglex_token_ty)arglex_token_absent_local_error,
! 	},
! 	{
! 		"-Absent_Local_Ignore",
! 		(arglex_token_ty)arglex_token_absent_local_ignore,
! 	},
! 	{
! 		"-Absent_Local_Mention",
! 		(arglex_token_ty)arglex_token_absent_local_mention,
! 	},
! 	{
! 		"-Absent_Program_Error",
! 		(arglex_token_ty)arglex_token_absent_program_error,
! 	},
! 	{
! 		"-Absent_Program_Ignore",
! 		(arglex_token_ty)arglex_token_absent_program_ignore,
! 	},
! 	{
! 		"-Absent_System_Error",
! 		(arglex_token_ty)arglex_token_absent_system_error,
! 	},
! 	{
! 		"-Absent_System_Ignore",
! 		(arglex_token_ty)arglex_token_absent_system_ignore,
! 	},
! 	{
! 		"-Absent_System_Mention",
! 		(arglex_token_ty)arglex_token_absent_system_mention,
! 	},
! 	{
! 		"-C",
! 		(arglex_token_ty)arglex_token_lang_c,
! 	},
! 	{
! 		"-Empty_If_Absent",
! 		(arglex_token_ty)arglex_token_absent_program_ignore,
! 	},
! 	{
! 		"-\\I*",
! 		(arglex_token_ty)arglex_token_include,
! 	},
! 	{
! 		"-Include",
! 		(arglex_token_ty)arglex_token_include,
! 	},
! 	{
! 		"-No_Cache",
! 		(arglex_token_ty)arglex_token_no_cache,
! 	},
! 	{
! 		"-No_System",
! 		(arglex_token_ty)arglex_token_no_system,
! 	},
! 	{
! 		"-Roff",
! 		(arglex_token_ty)arglex_token_lang_roff,
! 	},
! 	{
! 		"-System_absent",
! 		(arglex_token_ty)arglex_token_absent_system_ignore,
! 	},
! 	{
! 		"-Verbose",
! 		(arglex_token_ty)arglex_token_verbose,
! 	},
! 
! 	/* end marker */
! 	{ 0, (arglex_token_ty)0, },
  };
  
  
***************
*** 234,246 ****
  
  int
  main(argc, argv)
! 	int	argc;
! 	char	**argv;
  {
! 	char	*source;
! 	int	no_system;
! 	int	no_cache;
! 	sniff_t	*language;
  
  	arglex_init(argc, argv, argtab);
  	str_initialize();
--- 316,328 ----
  
  int
  main(argc, argv)
! 	int		argc;
! 	char		**argv;
  {
! 	char		*source;
! 	int		no_system;
! 	int		no_cache;
! 	sniff_ty	*language;
  
  	arglex_init(argc, argv, argtab);
  	str_initialize();
***************
*** 345,357 ****
  			option.o_absent_program = absent_error;
  			break;
  
! 		case arglex_token_include_short:
! 			sniff_include(arglex_value.alv_string);
! 			break;
! 
! 		case arglex_token_include_long:
  			if (arglex() != arglex_token_string)
! 				usage();
  			sniff_include(arglex_value.alv_string);
  			break;
  
--- 427,435 ----
  			option.o_absent_program = absent_error;
  			break;
  
! 		case arglex_token_include:
  			if (arglex() != arglex_token_string)
! 				fatal("-Include requires a string argument");
  			sniff_include(arglex_value.alv_string);
  			break;
  
***************
*** 382,388 ****
  #ifdef DEBUG
  		case arglex_token_tracing:
  			if (arglex() != arglex_token_string)
! 				usage();
  			for (;;)
  			{
  				trace_enable(arglex_value.alv_string);
--- 460,466 ----
  #ifdef DEBUG
  		case arglex_token_tracing:
  			if (arglex() != arglex_token_string)
! 				fatal("-TRACIng requires one or more string arguments");
  			for (;;)
  			{
  				trace_enable(arglex_value.alv_string);
Index: c_incl/os.c
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1990-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: c_incl/os.h
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1990-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: c_incl/sniff.c
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1991-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 33,48 ****
  #include <word.h>
  #include <trace.h>
  
! option_t option;
  
  static	wlist	srl;
  static	wlist	visited;
! static	sniff_t	*lang;
  
  
  void
  sniff_language(lp)
! 	sniff_t		*lp;
  {
  	trace(("sniff_language(lp = %08lX)\n{\n"/*}*/, lp));
  	assert(lp);
--- 33,48 ----
  #include <word.h>
  #include <trace.h>
  
! option_ty option;
  
  static	wlist	srl;
  static	wlist	visited;
! static	sniff_ty	*lang;
  
  
  void
  sniff_language(lp)
! 	sniff_ty	*lp;
  {
  	trace(("sniff_language(lp = %08lX)\n{\n"/*}*/, lp));
  	assert(lp);
***************
*** 56,62 ****
   *	sniff_include
   *
   * SYNOPSIS
!  *	void sniff_include(string_t *path);
   *
   * DESCRIPTION
   *	The sniff_include function is used to add to
--- 56,62 ----
   *	sniff_include
   *
   * SYNOPSIS
!  *	void sniff_include(string_ty *path);
   *
   * DESCRIPTION
   *	The sniff_include function is used to add to
***************
*** 70,76 ****
  sniff_include(path)
  	char		*path;
  {
! 	string_t	*s;
  
  	assert(path);
  	trace(("sniff_include(path = \"%s\")\n{\n"/*}*/, path));
--- 70,76 ----
  sniff_include(path)
  	char		*path;
  {
! 	string_ty	*s;
  
  	assert(path);
  	trace(("sniff_include(path = \"%s\")\n{\n"/*}*/, path));
***************
*** 131,141 ****
   *	It doesn't understand symbolic links.
   */
  
! static string_t *flatten _((string_t *));
  
! static string_t *
  flatten(s)
! 	string_t	*s;
  {
  	static size_t	tmplen;
  	static char	*tmp;
--- 131,141 ----
   *	It doesn't understand symbolic links.
   */
  
! static string_ty *flatten _((string_ty *));
  
! static string_ty *
  flatten(s)
! 	string_ty	*s;
  {
  	static size_t	tmplen;
  	static char	*tmp;
***************
*** 273,279 ****
   *	resolve
   *
   * SYNOPSIS
!  *	string_t *resolve(string_t *filename, string_t *extra);
   *
   * DESCRIPTION
   *	The resolve function is used to resolve an include
--- 273,279 ----
   *	resolve
   *
   * SYNOPSIS
!  *	string_ty *resolve(string_ty *filename, string_ty *extra);
   *
   * DESCRIPTION
   *	The resolve function is used to resolve an include
***************
*** 284,302 ****
   *	extra	- extra first search element, if not NULL
   *
   * RETURNS
!  *	string_t *; name of path, or NULL if unmentionable
   */
  
! static string_t *resolve _((string_t *filename, string_t *extra));
  
! static string_t *
  resolve(filename, extra)
! 	string_t	*filename;
! 	string_t	*extra;
  {
! 	string_t	*s;
  	size_t		j;
! 	string_t	*result;
  
  	/*
  	 * If the name is absolute, irrespecitive of
--- 284,302 ----
   *	extra	- extra first search element, if not NULL
   *
   * RETURNS
!  *	string_ty *; name of path, or NULL if unmentionable
   */
  
! static string_ty *resolve _((string_ty *filename, string_ty *extra));
  
! static string_ty *
  resolve(filename, extra)
! 	string_ty	*filename;
! 	string_ty	*extra;
  {
! 	string_ty	*s;
  	size_t		j;
! 	string_ty	*result;
  
  	/*
  	 * If the name is absolute, irrespecitive of
***************
*** 419,425 ****
   *	sniffer - search file for include dependencies
   *
   * SYNOPSIS
!  *	void sniffer(string_t *pathname);
   *
   * DESCRIPTION
   *	The sniffer function is used to walk a file looking
--- 419,425 ----
   *	sniffer - search file for include dependencies
   *
   * SYNOPSIS
!  *	void sniffer(string_ty *pathname);
   *
   * DESCRIPTION
   *	The sniffer function is used to walk a file looking
***************
*** 434,447 ****
   *	Uses the cache where possible to speed things up.
   */
  
! static void sniffer _((string_t *));
  
  static void
  sniffer(filename)
! 	string_t	*filename;
  {
  	FILE		*fp;
! 	cache_t		*cp;
  	struct stat	st;
  	size_t		j;
  
--- 434,447 ----
   *	Uses the cache where possible to speed things up.
   */
  
! static void sniffer _((string_ty *));
  
  static void
  sniffer(filename)
! 	string_ty	*filename;
  {
  	FILE		*fp;
! 	cache_ty	*cp;
  	struct stat	st;
  	size_t		j;
  
***************
*** 458,465 ****
  		 * here for failure to open/find a file
  		 */
  		absent:
! 		if (errno != ENOENT)
  			nfatal("%s", filename->str_text);
  
  		/*
  		 * zap the stat info,
--- 458,476 ----
  		 * here for failure to open/find a file
  		 */
  		absent:
! 		switch (errno)
! 		{
! 		case ENOENT:
! 			break;
! 
! 		case ENOTDIR:
! 		case EACCES:
! 			nerror("%s (warning)", filename->str_text);
! 			break;
! 
! 		default:
  			nfatal("%s", filename->str_text);
+ 		}
  
  		/*
  		 * zap the stat info,
***************
*** 508,514 ****
  		 */
  		if (type2.wl_nwords)
  		{
! 			string_t	*parent;
  			char		*ep;
  			char		*sp;
  
--- 519,525 ----
  		 */
  		if (type2.wl_nwords)
  		{
! 			string_ty	*parent;
  			char		*ep;
  			char		*sp;
  
***************
*** 520,526 ****
  				parent = str_from_c(".");
  			for (j = 0; j < type2.wl_nwords; ++j)
  			{
! 				string_t	*path;
  
  				path = resolve(type2.wl_word[j], parent);
  				if (path)
--- 531,537 ----
  				parent = str_from_c(".");
  			for (j = 0; j < type2.wl_nwords; ++j)
  			{
! 				string_ty	*path;
  
  				path = resolve(type2.wl_word[j], parent);
  				if (path)
***************
*** 537,545 ****
  		 */
  		for (j = 0; j < type1.wl_nwords; ++j)
  		{
! 			string_t	*path;
  
! 			path = resolve(type1.wl_word[j], (string_t *)0);
  			if (path)
  			{
  				wl_append_unique(&cp->ingredients, path);
--- 548,556 ----
  		 */
  		for (j = 0; j < type1.wl_nwords; ++j)
  		{
! 			string_ty	*path;
  
! 			path = resolve(type1.wl_word[j], (string_ty *)0);
  			if (path)
  			{
  				wl_append_unique(&cp->ingredients, path);
***************
*** 561,567 ****
  	wl_append_unique(&visited, filename);
  	for (j = 0; j < cp->ingredients.wl_nwords; ++j)
  	{
! 		string_t	*s;
  
  		s = cp->ingredients.wl_word[j];
  		if (!wl_member(&visited, s))
--- 572,578 ----
  	wl_append_unique(&visited, filename);
  	for (j = 0; j < cp->ingredients.wl_nwords; ++j)
  	{
! 		string_ty	*s;
  
  		s = cp->ingredients.wl_word[j];
  		if (!wl_member(&visited, s))
***************
*** 600,606 ****
  sniff(filename)
  	char		*filename;
  {
! 	string_t	*s;
  
  	assert(filename);
  	trace(("sniff(filename = \"%s\")\n{\n"/*}*/, filename));
--- 611,617 ----
  sniff(filename)
  	char		*filename;
  {
! 	string_ty	*s;
  
  	assert(filename);
  	trace(("sniff(filename = \"%s\")\n{\n"/*}*/, filename));
Index: c_incl/sniff.h
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1991-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 37,44 ****
  	absent_error
  };
  
! typedef struct option_t option_t;
! struct option_t
  {
  	int	o_verbose;
  	int	o_absent_local;
--- 37,44 ----
  	absent_error
  };
  
! typedef struct option_ty option_ty;
! struct option_ty
  {
  	int	o_verbose;
  	int	o_absent_local;
***************
*** 45,68 ****
  	int	o_absent_system;
  	int	o_absent_program;
  };
! extern option_t option;
  
  struct wlist;
  
! typedef struct sniff_t sniff_t;
! struct sniff_t
  {
  	int (*scan)_((FILE *, struct wlist *, struct wlist *));
  	void (*prepare)_((void));
  };
  
! extern	sniff_t	lang_c;
! extern	sniff_t	lang_roff;
  
  void sniff _((char *));
  void sniff_include _((char *));
  long sniff_include_count _((void));
  void sniff_prepare _((void));
! void sniff_language _((sniff_t *));
  
  #endif /* SNIFF_H */
--- 45,68 ----
  	int	o_absent_system;
  	int	o_absent_program;
  };
! extern option_ty option;
  
  struct wlist;
  
! typedef struct sniff_ty sniff_ty;
! struct sniff_ty
  {
  	int (*scan)_((FILE *, struct wlist *, struct wlist *));
  	void (*prepare)_((void));
  };
  
! extern	sniff_ty	lang_c;
! extern	sniff_ty	lang_roff;
  
  void sniff _((char *));
  void sniff_include _((char *));
  long sniff_include_count _((void));
  void sniff_prepare _((void));
! void sniff_language _((sniff_ty *));
  
  #endif /* SNIFF_H */
Index: common/ansi.c
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1991-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: common/arglex.c
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1990-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 25,55 ****
  #include <string.h>
  #include <ctype.h>
  
- #ifdef DEBUG
- #undef DEBUG
- #endif
- 
  #include <main.h>
  #include <arglex.h>
  #include <error.h>
  #include <word.h>
  #include <mem.h>
  
! static arglex_table_t table[] =
  {
  	{ "-",			arglex_token_stdio,		},
  	{ "-Help",		arglex_token_help,		},
  	{ "-TRACIng",		arglex_token_tracing,		},
  	{ "-VERSion",		arglex_token_version,		},
- 	{ 0, 0, }, /* end marker */
  };
  
  static int	argc;
  static char	**argv;
! arglex_value_t	arglex_value;
! arglex_token_t	arglex_token;
  char		*progname;
! static arglex_table_t *utable;
  static	char	*partial;
  
  
--- 25,51 ----
  #include <string.h>
  #include <ctype.h>
  
  #include <main.h>
  #include <arglex.h>
  #include <error.h>
  #include <word.h>
  #include <mem.h>
+ #include <trace.h>
  
! static arglex_table_ty table[] =
  {
  	{ "-",			arglex_token_stdio,		},
  	{ "-Help",		arglex_token_help,		},
  	{ "-TRACIng",		arglex_token_tracing,		},
  	{ "-VERSion",		arglex_token_version,		},
  };
  
  static int	argc;
  static char	**argv;
! arglex_value_ty	arglex_value;
! arglex_token_ty	arglex_token;
  char		*progname;
! static arglex_table_ty *utable;
  static	char	*partial;
  
  
***************
*** 78,88 ****
  	return bp;
  }
  
  void
  arglex_init(ac, av, tp)
  	int	ac;
  	char	**av;
! 	arglex_table_t *tp;
  {
  	progname = basename(av[0]);
  
--- 74,105 ----
  	return bp;
  }
  
+ 
+ /*
+  * NAME
+  *	arglex_init
+  *
+  * SYNOPSIS
+  *	void arglex_init(int ac, char **av, arglex_table-t *tp);
+  *
+  * DESCRIPTION
+  *	The arglex_init function is used to initialize the
+  *	command line processing.
+  *
+  * ARGUMENTS
+  *	ac	- aergument count, from main
+  *	av	- argument values, from main
+  *	tp	- pointer to table of options
+  *
+  * CAVEAT
+  *	Must be called before the arglex() function.
+  */
+ 
  void
  arglex_init(ac, av, tp)
  	int	ac;
  	char	**av;
! 	arglex_table_ty *tp;
  {
  	progname = basename(av[0]);
  
***************
*** 92,99 ****
  }
  
  
  int
! argcmp(formal, actual)
  	char	*formal;
  	char	*actual;
  {
--- 109,165 ----
  }
  
  
+ /*
+  * NAME
+  *	arglex_compare
+  *
+  * SYNOPSIS
+  *	int arglex_compare(char *formal, char *actual);
+  *
+  * DESCRIPTION
+  *	The arglex_compare function is used to compare
+  *	a command line string with a formal spec of the option,
+  *	to see if they compare equal.
+  *
+  *	The actual is case-insensitive.  Uppercase in the formal
+  *	means a mandatory character, while lower case means optional.
+  *	Any number of consecutive optional characters may be supplied
+  *	by actual, but none may be skipped, unless all are skipped to
+  *	the next non-lower-case letter.
+  *
+  *	The underscore (_) is like a lower-case minus,
+  *	it matches "", "-" and "_".
+  *
+  *	The "*" in a pattern matches everything to the end of the line,
+  *	anything after the "*" is ignored.  The rest of the line is pointed
+  *	to by the "partial" variable as a side-effect (else it will be 0).
+  *	This rather ugly feature is to support "-I./dir" type options.
+  *
+  *	A backslash in a pattern nominates an exact match required,
+  *	case must matche excatly here.
+  *	This rather ugly feature is to support "-I./dir" type options.
+  *
+  *	For example: "-project" and "-P' both match "-Project",
+  *	as does "-proJ", but "-prj" does not.
+  *
+  *	For example: "-devDir" and "-d_d' both match "-Development_Directory",
+  *	but "-dvlpmnt_drctry" does not.
+  *
+  *	For example: to match include path specifications, use a pattern
+  *	such as "-\\I*", and the partial global variable will have the
+  *	path in it on return.
+  *
+  * ARGUMENTS
+  *	formal	- the "pattern" for the option
+  *	actual	- what the user supplied
+  *
+  * RETURNS
+  *	int;	zero if no match,
+  *		non-zero if they do match.
+  */
+ 
  int
! arglex_compare(formal, actual)
  	char	*formal;
  	char	*actual;
  {
***************
*** 101,111 ****
  	char	ac;
  	int	result;
  
! 	/* trace(("argcmp(formal = \"%s\", actual = \"%s\")\n{\n", formal, actual)); */
  	for (;;)
  	{
! 		/* trace_string(formal); */
! 		/* trace_string(actual); */
  		ac = *actual++;
  		if (isupper(ac))
  			ac = tolower(ac);
--- 167,178 ----
  	char	ac;
  	int	result;
  
! 	trace(("arglex_compare(formal = \"%s\", actual = \"%s\")\n{\n",
! 		formal, actual));
  	for (;;)
  	{
! 		trace_string(formal);
! 		trace_string(actual);
  		ac = *actual++;
  		if (isupper(ac))
  			ac = tolower(ac);
***************
*** 114,120 ****
  		{
  		case 0:
  			result = !ac;
! 			goto ret;
  			
  		case '_':
  			if (ac == '-')
--- 181,187 ----
  		{
  		case 0:
  			result = !ac;
! 			goto done;
  			
  		case '_':
  			if (ac == '-')
***************
*** 130,139 ****
  			/*
  			 * optional characters
  			 */
! 			if (ac == fc && argcmp(formal, actual))
  			{
  				result = 1;
! 				goto ret;
  			}
  			/*
  			 * skip forward to next
--- 197,206 ----
  			/*
  			 * optional characters
  			 */
! 			if (ac == fc && arglex_compare(formal, actual))
  			{
  				result = 1;
! 				goto done;
  			}
  			/*
  			 * skip forward to next
***************
*** 159,175 ****
  			if (!ac)
  			{
  				result = 0;
! 				goto ret;
  			}
  			partial = actual - 1;
  			result = 1;
! 			goto ret;
  
  		case '\\':
  			if (actual[-1] != *formal++)
  			{
  				result = 0;
! 				goto ret;
  			}
  			break;
  
--- 226,242 ----
  			if (!ac)
  			{
  				result = 0;
! 				goto done;
  			}
  			partial = actual - 1;
  			result = 1;
! 			goto done;
  
  		case '\\':
  			if (actual[-1] != *formal++)
  			{
  				result = 0;
! 				goto done;
  			}
  			break;
  
***************
*** 189,205 ****
  			if (fc != ac)
  			{
  				result = 0;
! 				goto ret;
  			}
  			break;
  		}
  	}
! ret:
! 	/* trace(("return %d;\n}\n", result)); */
  	return result;
  }
  
  
  static int is_a_number _((char *));
  
  static int
--- 256,301 ----
  			if (fc != ac)
  			{
  				result = 0;
! 				goto done;
  			}
  			break;
  		}
  	}
! 	done:
! 	trace(("return %d;\n}\n", result));
  	return result;
  }
  
  
+ /*
+  * NAME
+  *	is_a_number
+  *
+  * SYNOPSIS
+  *	int is_a_number(char *s);
+  *
+  * DESCRIPTION
+  *	The is_a_number function is used to determine if the
+  *	argument is a number.
+  *
+  *	The value is placed in arglex_value.alv_number as
+  *	a side effect.
+  *
+  *	Negative and positive signs are accepted.
+  *	The C conventions for decimal, octal and hexadecimal are understood.
+  *
+  *	There may be no white space anywhere in the string,
+  *	and the string must end after the last digit.
+  *	Trailing garbage will be interpreted to mean it is not a string.
+  *
+  * ARGUMENTS
+  *	s	- string to be tested and evaluated
+  *
+  * RETURNS
+  *	int;	zero if not a number,
+  *		non-zero if is a number.
+  */
+ 
  static int is_a_number _((char *));
  
  static int
***************
*** 210,222 ****
  	int		sign;
  
  	n = 0;
! 	if (*s == '-')
  	{
  		++s;
  		sign = -1;
! 	}
! 	else
  		sign = 1;
  	switch (*s)
  	{
  	case '0':
--- 306,327 ----
  	int		sign;
  
  	n = 0;
! 	switch (*s)
  	{
+ 	case '-':
  		++s;
  		sign = -1;
! 		break;
! 
! 	case '+':
! 		++s;
  		sign = 1;
+ 		break;
+ 
+ 	default:
+ 		sign = 1;
+ 		break;
+ 	}
  	switch (*s)
  	{
  	case '0':
***************
*** 288,323 ****
  }
  
  
! arglex_token_t
  arglex()
  {
! 	arglex_table_t	*tp;
  	int		j;
! 	arglex_table_t	*hit[20];
  	int		nhit;
  
! 	/* trace(("arglex()\n{\n")); */
! 	if (argc <= 0)
  	{
! 		arglex_token = arglex_token_eoln;
! 		arglex_value.alv_string = "";
! 		goto ret;
  	}
! 	arglex_value.alv_string = argv[0];
! 	argc--;
! 	argv++;
  
! 	if (is_a_number(arglex_value.alv_string))
  	{
  		arglex_token = arglex_token_number;
! 		goto ret;
  	}
  
  	nhit = 0;
  	partial = 0;
! 	for (tp = table; tp->name; tp++)
  	{
! 		if (argcmp(tp->name, arglex_value.alv_string))
  			hit[nhit++] = tp;
  	}
  	if (utable)
--- 393,503 ----
  }
  
  
! /*
!  * NAME
!  *	arglex
!  *
!  * SYNOPSIS
!  *	arglex_token_ty arglex(void);
!  *
!  * DESCRIPTION
!  *	The arglex function is used to perfom lexical analysis
!  *	on the command line arguments.
!  *
!  *	Unrecognised options are returned as arglex_token_option
!  *	for anything starting with a '-', or
!  *	arglex_token_string otherwise.
!  *
!  * RETURNS
!  *	The next token in the token stream.
!  *	When the end is reached, arglex_token_eoln is returned forever.
!  *
!  * CAVEAT
!  *	Must call arglex_init befor this function is called.
!  */
! 
! arglex_token_ty
  arglex()
  {
! 	arglex_table_ty	*tp;
  	int		j;
! 	arglex_table_ty	*hit[20];
  	int		nhit;
+ 	char		*arg;
+ 	static char	*pushback[3];
+ 	static int	pushback_depth;
  
! 	trace(("arglex()\n{\n"/*}*/));
! 	if (pushback_depth)
  	{
! 		/*
! 		 * the second half of a "-foo=bar" style argument.
! 		 */
! 		arg = pushback[--pushback_depth];
  	}
! 	else
! 	{
! 		if (argc <= 0)
! 		{
! 			arglex_token = arglex_token_eoln;
! 			arg = "";
! 			goto done;
! 		}
! 		arg = argv[0];
! 		argc--;
! 		argv++;
  
! 		/*
! 		 * See if it looks like a GNU "-foo=bar" option.
! 		 * Split it at the '=' to make it something the
! 		 * rest of the code understands.
! 		 */
! 		if (arg[0] == '-' && arg[1] != '=')
! 		{
! 			char	*eqp;
! 
! 			eqp = strchr(arg, '=');
! 			if (eqp)
! 			{
! 				pushback[pushback_depth++] = eqp + 1;
! 				*eqp = 0;
! 			}
! 		}
! 
! 		/*
! 		 * Turn the GNU-style leading "--"
! 		 * into "-" if necessary.
! 		 */
! 		if
! 		(
! 			arg[0] == '-'
! 		&&
! 			arg[1] == '-'
! 		&&
! 			arg[2]
! 		&&
! 			!is_a_number(arg + 1)
! 		)
! 			++arg;
! 	}
! 
! 	/*
! 	 * see if it is a number
! 	 */
! 	if (is_a_number(arg))
  	{
  		arglex_token = arglex_token_number;
! 		goto done;
  	}
  
+ 	/*
+ 	 * scan the tables to see what it matches
+ 	 */
  	nhit = 0;
  	partial = 0;
! 	for (tp = table; tp < ENDOF(table); tp++)
  	{
! 		if (arglex_compare(tp->name, arg))
  			hit[nhit++] = tp;
  	}
  	if (utable)
***************
*** 324,350 ****
  	{
  		for (tp = utable; tp->name; tp++)
  		{
! 			if (argcmp(tp->name, arglex_value.alv_string))
  				hit[nhit++] = tp;
  		}
  	}
  	switch (nhit)
  	{
  	case 0:
  		break;
  
  	case 1:
  		if (partial)
! 			arglex_value.alv_string = partial;
! 		else
! 			arglex_value.alv_string = hit[0]->name;
  		arglex_token = hit[0]->token;
! 		goto ret;
  
  	default:
  		{
! 			string_t	*s1;
! 			string_t	*s2;
  
  			s1 = str_from_c(hit[0]->name);
  			for (j = 1; j < nhit; ++j)
--- 504,540 ----
  	{
  		for (tp = utable; tp->name; tp++)
  		{
! 			if (arglex_compare(tp->name, arg))
  				hit[nhit++] = tp;
  		}
  	}
+ 
+ 	/*
+ 	 * deal with unknown or ambiguous options
+ 	 */
  	switch (nhit)
  	{
  	case 0:
+ 		/*
+ 		 * not found in the tables
+ 		 */
+ 		if (*arg == '-')
+ 			arglex_token = arglex_token_option;
+ 		else
+ 			arglex_token = arglex_token_string;
  		break;
  
  	case 1:
  		if (partial)
! 			pushback[pushback_depth++] = partial;
! 		arg = hit[0]->name;
  		arglex_token = hit[0]->token;
! 		break;
  
  	default:
  		{
! 			string_ty	*s1;
! 			string_ty	*s2;
  
  			s1 = str_from_c(hit[0]->name);
  			for (j = 1; j < nhit; ++j)
***************
*** 356,375 ****
  			fatal
  			(
  				"option \"%s\" ambiguous (%s)",
! 				arglex_value.alv_string,
  				s1->str_text
  			);
  		}
  	}
  
! 	/* not found in the table */
! 	if (arglex_value.alv_string[0] == '-')
! 		arglex_token = arglex_token_option;
! 	else
! 		arglex_token = arglex_token_string;
! 
! ret:
! 	/* trace(("return %d; / * \"%s\" * /\n}\n", arglex_token, arglex_value.alv_string)); */
  	return arglex_token;
  }
  
--- 546,564 ----
  			fatal
  			(
  				"option \"%s\" ambiguous (%s)",
! 				arg,
  				s1->str_text
  			);
  		}
  	}
  
! 	/*
! 	 * here for all exits
! 	 */
! 	done:
! 	arglex_value.alv_string = arg;
! 	trace(("return %d; /* \"%s\" */\n", arglex_token, arg));
! 	trace((/*{*/"}\n"));
  	return arglex_token;
  }
  
***************
*** 379,385 ****
   *      arglex_init_from_env - initialize analyzer
   *
   *  SYNOPSIS
!  *      void arglex_init_from_env(arglex_table_t *);
   *
   *  DESCRIPTION
   *      The arglex_init_from_env function is used to initialize the command
--- 568,574 ----
   *      arglex_init_from_env - initialize analyzer
   *
   *  SYNOPSIS
!  *      void arglex_init_from_env(arglex_table_ty *);
   *
   *  DESCRIPTION
   *      The arglex_init_from_env function is used to initialize the command
***************
*** 395,401 ****
  void
  arglex_init_from_env(av0, table)
  	char	*av0;
! 	arglex_table_t *table;
  {
  	char	*cp1;
  	char	*cp2;
--- 584,590 ----
  void
  arglex_init_from_env(av0, table)
  	char	*av0;
! 	arglex_table_ty *table;
  {
  	char	*cp1;
  	char	*cp2;
***************
*** 402,408 ****
  	size_t	ac;
  	char	**av;
  
! 	/* tracing(TRACING_LEVEL_FUNC, ("arglex_init_from_env() entry")); */
  	av0 = basename(av0);
  	cp1 = mem_alloc(strlen(av0) + 1);
  	strcpy(cp1, av0);
--- 591,597 ----
  	size_t	ac;
  	char	**av;
  
! 	trace(("arglex_init_from_env()\n{\n"));
  	av0 = basename(av0);
  	cp1 = mem_alloc(strlen(av0) + 1);
  	strcpy(cp1, av0);
***************
*** 419,425 ****
  	cp2 = getenv(cp1);
  	free(cp1);
  	if (!cp2)
! 		goto ret;
  
  	/* make a copy so we don't damage the environment copy */
  	cp1 = mem_alloc(strlen(cp2) + 1);
--- 608,614 ----
  	cp2 = getenv(cp1);
  	free(cp1);
  	if (!cp2)
! 		goto done;
  
  	/* make a copy so we don't damage the environment copy */
  	cp1 = mem_alloc(strlen(cp2) + 1);
***************
*** 438,446 ****
  			*cp1++ = 0;
  		*(char **)enlarge(&ac, (char **)&av, sizeof(char *)) = cp2;
  	}
! ret:
  	arglex_init(ac, av, table);
! 	/* tracing(TRACING_LEVEL_FUNC, ("arglex_init_from_env() exit")); */
  }
  
  void
--- 627,635 ----
  			*cp1++ = 0;
  		*(char **)enlarge(&ac, (char **)&av, sizeof(char *)) = cp2;
  	}
! 	done:
  	arglex_init(ac, av, table);
! 	trace((/*{*/"}\n"));
  }
  
  void
Index: common/arglex.h
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1991-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 25,31 ****
  
  #include <main.h>
  
! enum arglex_token_t
  {
  	arglex_token_eoln = -20,
  	arglex_token_help,
--- 25,31 ----
  
  #include <main.h>
  
! enum arglex_token_ty
  {
  	arglex_token_eoln = -20,
  	arglex_token_help,
***************
*** 36,65 ****
  	arglex_token_tracing,
  	arglex_token_version
  };
! typedef enum arglex_token_t arglex_token_t;
  
! typedef struct arglex_value_t arglex_value_t;
! struct arglex_value_t
  {
  	char	*alv_string;
  	long	alv_number;
  };
  
! typedef struct arglex_table_t arglex_table_t;
! struct arglex_table_t
  {
  	char	*name;
  	int	token;
  };
  
! extern arglex_token_t arglex_token;
! extern arglex_value_t arglex_value;
  extern char *progname;
  
! void arglex_init _((int argc, char **argv, arglex_table_t *table));
! arglex_token_t arglex _((void));
! int argcmp _((char *formal, char *actual));
! void arglex_init_from_env _((char *argv0, arglex_table_t *table));
  void arglex_set_progname _((char *argv0));
  
  #endif /* ARGLEX_H */
--- 36,65 ----
  	arglex_token_tracing,
  	arglex_token_version
  };
! typedef enum arglex_token_ty arglex_token_ty;
  
! typedef struct arglex_value_ty arglex_value_ty;
! struct arglex_value_ty
  {
  	char	*alv_string;
  	long	alv_number;
  };
  
! typedef struct arglex_table_ty arglex_table_ty;
! struct arglex_table_ty
  {
  	char	*name;
  	int	token;
  };
  
! extern arglex_token_ty arglex_token;
! extern arglex_value_ty arglex_value;
  extern char *progname;
  
! void arglex_init _((int argc, char **argv, arglex_table_ty *table));
! arglex_token_ty arglex _((void));
! int arglex_compare _((char *formal, char *actual));
! void arglex_init_from_env _((char *argv0, arglex_table_ty *table));
  void arglex_set_progname _((char *argv0));
  
  #endif /* ARGLEX_H */
Index: common/error.c
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1991-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 418,424 ****
   *	quit_handler
   *
   * SYNOPSIS
!  *	int quit_handler(quit_t);
   *
   * DESCRIPTION
   *	The quit_handler function registers the function pointed to by func,
--- 418,424 ----
   *	quit_handler
   *
   * SYNOPSIS
!  *	int quit_handler(quit_ty);
   *
   * DESCRIPTION
   *	The quit_handler function registers the function pointed to by func,
***************
*** 425,436 ****
   *	to be called without arguments at normal program termination.
   */
  
! static	quit_t	quit_list[32];
  static	int	quit_list_length;
  
  void
  quit_handler(f)
! 	quit_t	f;
  {
  	assert(quit_list_length < SIZEOF(quit_list));
  	quit_list[quit_list_length++] = f;
--- 425,436 ----
   *	to be called without arguments at normal program termination.
   */
  
! static	quit_ty	quit_list[32];
  static	int	quit_list_length;
  
  void
  quit_handler(f)
! 	quit_ty	f;
  {
  	assert(quit_list_length < SIZEOF(quit_list));
  	quit_list[quit_list_length++] = f;
Index: common/error.h
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1990-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 41,48 ****
  # define assert(c)
  #endif
  
! typedef void (*quit_t)_((void));
! void quit_handler _((quit_t));
  void quit _((int));
  
  #endif /* ERROR_H */
--- 41,48 ----
  # define assert(c)
  #endif
  
! typedef void (*quit_ty)_((void));
! void quit_handler _((quit_ty));
  void quit _((int));
  
  #endif /* ERROR_H */
Index: common/help.c
***************
*** 1,12 ****
  /*
   *	cook - a program construction tool
!  *	Copyright (c) 1991-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - a program construction tool
!  *	Copyright (C) 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 36,42 ****
  
  static char *cr[] =
  {
! 	"%s version %v, Copyright (c) 1988-1993 Peter Miller.",
  	"All rights reserved.",
  	"",
  	"The %s program comes with ABSOLUTELY NO WARRANTY;",
--- 36,43 ----
  
  static char *cr[] =
  {
! 	"%s version %v",
! 	"Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993 Peter Miller.",
  	"All rights reserved.",
  	"",
  	"The %s program comes with ABSOLUTELY NO WARRANTY;",
***************
*** 48,55 ****
  
  static char *au[] =
  {
! 	"Peter Miller\tUUCP\tuunet!munnari!bmr.gov.au!pmiller",
! 	"/\\/\\*\t\tCSNET\tpmiller@bmr.gov.au",
  };
  
  
--- 49,56 ----
  
  static char *au[] =
  {
! 	"Peter Miller   UUCP     uunet!munnari!bmr.gov.au!pmiller",
! 	"/\\/\\*          Internet pmiller@bmr.gov.au",
  };
  
  
***************
*** 144,150 ****
--- 145,158 ----
  	 * if necessary
  	 */
  	if (usage && arglex() != arglex_token_eoln)
+ 	{
+ 		error
+ 		(
+ 			"misplaced \"%s\" command line argument",
+ 			arglex_value.alv_string
+ 		);
  		usage();
+ 	}
  
  	/*
  	 * if output is to the terminal,
Index: common/help.h
***************
*** 1,12 ****
  /*
   *	cook - a program construction tool
!  *	Copyright (c) 1991-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - a program construction tool
!  *	Copyright (C) 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: common/main.h
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1991-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: common/mem.c
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1990-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: common/mem.h
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1991-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: common/s-v-arg.h
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: common/str.c
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1991-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 48,62 ****
   */
  #define MAX_WIDTH 509
  
! string_t *str_true;
! string_t *str_false;
! static string_t **hash_table;
! static hash_t hash_modulus;
! static hash_t hash_cutover;
! static hash_t hash_cutover_mask;
! static hash_t hash_cutover_split_mask;
! static hash_t hash_split;
! static hash_t hash_load;
  
  #define MAX_HASH_LEN 20
  
--- 48,62 ----
   */
  #define MAX_WIDTH 509
  
! string_ty *str_true;
! string_ty *str_false;
! static string_ty **hash_table;
! static str_hash_ty hash_modulus;
! static str_hash_ty hash_cutover;
! static str_hash_ty hash_cutover_mask;
! static str_hash_ty hash_cutover_split_mask;
! static str_hash_ty hash_split;
! static str_hash_ty hash_load;
  
  #define MAX_HASH_LEN 20
  
***************
*** 66,92 ****
   *	hash_generate - hash string to number
   *
   * SYNOPSIS
!  *	hash_t hash_generate(char *s, size_t n);
   *
   * DESCRIPTION
   *	The hash_generate function is used to make a number from a string.
   *
   * RETURNS
!  *	hash_t - the magic number
   *
   * CAVEAT
   *	Only the last MAX_HASH_LEN characters are used.
!  *	It is important that hash_t be unsigned (int or long).
   */
  
! static hash_t hash_generate _((char *, size_t));
  
! static hash_t
  hash_generate(s, n)
! 	char	*s;
! 	size_t	n;
  {
! 	hash_t	retval;
  
  	if (n > MAX_HASH_LEN)
  	{
--- 66,92 ----
   *	hash_generate - hash string to number
   *
   * SYNOPSIS
!  *	str_hash_ty hash_generate(char *s, size_t n);
   *
   * DESCRIPTION
   *	The hash_generate function is used to make a number from a string.
   *
   * RETURNS
!  *	str_hash_ty - the magic number
   *
   * CAVEAT
   *	Only the last MAX_HASH_LEN characters are used.
!  *	It is important that str_hash_ty be unsigned (int or long).
   */
  
! static str_hash_ty hash_generate _((char *, size_t));
  
! static str_hash_ty
  hash_generate(s, n)
! 	char		*s;
! 	size_t		n;
  {
! 	str_hash_ty	retval;
  
  	if (n > MAX_HASH_LEN)
  	{
***************
*** 109,115 ****
   *	str_valid - test a string
   *
   * SYNOPSIS
!  *	int str_valid(string_t *s);
   *
   * DESCRIPTION
   *	The str_valid function is used to test if a pointer points to a valid
--- 109,115 ----
   *	str_valid - test a string
   *
   * SYNOPSIS
!  *	int str_valid(string_ty *s);
   *
   * DESCRIPTION
   *	The str_valid function is used to test if a pointer points to a valid
***************
*** 126,132 ****
  
  int
  str_valid(s)
! 	string_t	*s;
  {
  	return
  	(
--- 126,132 ----
  
  int
  str_valid(s)
! 	string_ty	*s;
  {
  	return
  	(
***************
*** 162,168 ****
  void
  str_initialize()
  {
! 	hash_t	j;
  
  	hash_modulus = 1 << 8; /* MUST be a power of 2 */
  	hash_cutover = hash_modulus;
--- 162,168 ----
  void
  str_initialize()
  {
! 	str_hash_ty	j;
  
  	hash_modulus = 1 << 8; /* MUST be a power of 2 */
  	hash_cutover = hash_modulus;
***************
*** 170,176 ****
  	hash_cutover_mask = hash_cutover - 1;
  	hash_cutover_split_mask = (hash_cutover * 2) - 1;
  	hash_load = 0;
! 	hash_table = (string_t **)mem_alloc(hash_modulus * sizeof(string_t *));
  	for (j = 0; j < hash_modulus; ++j)
  		hash_table[j] = 0;
  
--- 170,176 ----
  	hash_cutover_mask = hash_cutover - 1;
  	hash_cutover_split_mask = (hash_cutover * 2) - 1;
  	hash_load = 0;
! 	hash_table = (string_ty **)mem_alloc(hash_modulus * sizeof(string_ty *));
  	for (j = 0; j < hash_modulus; ++j)
  		hash_table[j] = 0;
  
***************
*** 201,209 ****
  static void
  split()
  {
! 	string_t	*p;
! 	string_t	*p2;
! 	hash_t		index;
  
  	/*
  	 * get the list to be split across buckets 
--- 201,209 ----
  static void
  split()
  {
! 	string_ty	*p;
! 	string_ty	*p2;
! 	str_hash_ty	index;
  
  	/*
  	 * get the list to be split across buckets 
***************
*** 218,224 ****
  	mem_change_size
  	(
  		(char **)&hash_table,
! 		hash_modulus * sizeof(string_t *)
  	);
  	hash_table[hash_modulus - 1] = 0;
  	hash_split = hash_modulus - hash_cutover;
--- 218,224 ----
  	mem_change_size
  	(
  		(char **)&hash_table,
! 		hash_modulus * sizeof(string_ty *)
  	);
  	hash_table[hash_modulus - 1] = 0;
  	hash_split = hash_modulus - hash_cutover;
***************
*** 253,259 ****
   *	str_from_c - make string from C string
   *
   * SYNOPSIS
!  *	string_t *str_from_c(char*);
   *
   * DESCRIPTION
   *	The str_from_c function is used to make a string from a null terminated
--- 253,259 ----
   *	str_from_c - make string from C string
   *
   * SYNOPSIS
!  *	string_ty *str_from_c(char*);
   *
   * DESCRIPTION
   *	The str_from_c function is used to make a string from a null terminated
***************
*** 260,266 ****
   *	C string.
   *
   * RETURNS
!  *	string_t* - a pointer to a string in dynamic memory.  Use str_free when
   *	finished with.
   *
   * CAVEAT
--- 260,266 ----
   *	C string.
   *
   * RETURNS
!  *	string_ty * - a pointer to a string in dynamic memory.  Use str_free when
   *	finished with.
   *
   * CAVEAT
***************
*** 267,275 ****
   *	The contents of the structure pointed to MUST NOT be altered.
   */
  
! string_t *
  str_from_c(s)
! 	char	*s;
  {
  	return str_n_from_c(s, strlen(s));
  }
--- 267,275 ----
   *	The contents of the structure pointed to MUST NOT be altered.
   */
  
! string_ty *
  str_from_c(s)
! 	char		*s;
  {
  	return str_n_from_c(s, strlen(s));
  }
***************
*** 280,286 ****
   *	str_n_from_c - make string
   *
   * SYNOPSIS
!  *	string_t *str_n_from_c(char *s, size_t n);
   *
   * DESCRIPTION
   *	The str_n_from_c function is used to make a string from an array of
--- 280,286 ----
   *	str_n_from_c - make string
   *
   * SYNOPSIS
!  *	string_ty *str_n_from_c(char *s, size_t n);
   *
   * DESCRIPTION
   *	The str_n_from_c function is used to make a string from an array of
***************
*** 287,293 ****
   *	characters.  No null terminator is assumed.
   *
   * RETURNS
!  *	string_t* - a pointer to a string in dynamic memory.  Use str_free when
   *	finished with.
   *
   * CAVEAT
--- 287,293 ----
   *	characters.  No null terminator is assumed.
   *
   * RETURNS
!  *	string_ty * - a pointer to a string in dynamic memory.  Use str_free when
   *	finished with.
   *
   * CAVEAT
***************
*** 294,307 ****
   *	The contents of the structure pointed to MUST NOT be altered.
   */
  
! string_t *
  str_n_from_c(s, length)
  	char		*s;
  	size_t		length;
  {
! 	hash_t		hash;
! 	hash_t		index;
! 	string_t	*p;
  
  	hash = hash_generate(s, length);
  
--- 294,307 ----
   *	The contents of the structure pointed to MUST NOT be altered.
   */
  
! string_ty *
  str_n_from_c(s, length)
  	char		*s;
  	size_t		length;
  {
! 	str_hash_ty	hash;
! 	str_hash_ty	index;
! 	string_ty	*p;
  
  	hash = hash_generate(s, length);
  
***************
*** 330,336 ****
  		}
  	}
  
! 	p = (string_t *)mem_alloc(sizeof(string_t) + length);
  	p->str_hash = hash;
  	p->str_length = length;
  	p->str_references = 1;
--- 330,336 ----
  		}
  	}
  
! 	p = (string_ty *)mem_alloc(sizeof(string_ty) + length);
  	p->str_hash = hash;
  	p->str_length = length;
  	p->str_references = 1;
***************
*** 351,363 ****
   *	str_copy - make a copy of a string
   *
   * SYNOPSIS
!  *	string_t *str_copy(string_t *s);
   *
   * DESCRIPTION
   *	The str_copy function is used to make a copy of a string.
   *
   * RETURNS
!  *	string_t* - a pointer to a string in dynamic memory.  Use str_free when
   *	finished with.
   *
   * CAVEAT
--- 351,363 ----
   *	str_copy - make a copy of a string
   *
   * SYNOPSIS
!  *	string_ty *str_copy(string_ty *s);
   *
   * DESCRIPTION
   *	The str_copy function is used to make a copy of a string.
   *
   * RETURNS
!  *	string_ty * - a pointer to a string in dynamic memory.  Use str_free when
   *	finished with.
   *
   * CAVEAT
***************
*** 364,372 ****
   *	The contents of the structure pointed to MUST NOT be altered.
   */
  
! string_t *
  str_copy(s)
! 	string_t	*s;
  {
  	s->str_references++;
  	return s;
--- 364,372 ----
   *	The contents of the structure pointed to MUST NOT be altered.
   */
  
! string_ty *
  str_copy(s)
! 	string_ty	*s;
  {
  	s->str_references++;
  	return s;
***************
*** 378,384 ****
   *	str_free - release a string
   *
   * SYNOPSIS
!  *	void str_free(string_t *s);
   *
   * DESCRIPTION
   *	The str_free function is used to indicate that a string hash been
--- 378,384 ----
   *	str_free - release a string
   *
   * SYNOPSIS
!  *	void str_free(string_ty *s);
   *
   * DESCRIPTION
   *	The str_free function is used to indicate that a string hash been
***************
*** 393,402 ****
  
  void
  str_free(s)
! 	string_t	*s;
  {
! 	hash_t		index;
! 	string_t	**spp;
  
  	assert(str_valid(s));
  	if (s->str_references > 1)
--- 393,402 ----
  
  void
  str_free(s)
! 	string_ty	*s;
  {
! 	str_hash_ty	index;
! 	string_ty	**spp;
  
  	assert(str_valid(s));
  	if (s->str_references > 1)
***************
*** 434,440 ****
   *	str_catenate - join two strings
   *
   * SYNOPSIS
!  *	string_t *str_catenate(string_t *, string_t *);
   *
   * DESCRIPTION
   *	The str_catenate function is used to concatenate two strings to form a
--- 434,440 ----
   *	str_catenate - join two strings
   *
   * SYNOPSIS
!  *	string_ty *str_catenate(string_ty *, string_ty *);
   *
   * DESCRIPTION
   *	The str_catenate function is used to concatenate two strings to form a
***************
*** 441,447 ****
   *	new string.
   *
   * RETURNS
!  *	string_t* - a pointer to a string in dynamic memory.  Use str_free when
   *	finished with.
   *
   * CAVEAT
--- 441,447 ----
   *	new string.
   *
   * RETURNS
!  *	string_ty * - a pointer to a string in dynamic memory.  Use str_free when
   *	finished with.
   *
   * CAVEAT
***************
*** 448,461 ****
   *	The contents of the structure pointed to MUST NOT be altered.
   */
  
! string_t *
  str_catenate(s1, s2)
! 	string_t	*s1;
! 	string_t	*s2;
  {
  	static char	*tmp;
  	static size_t	tmplen;
! 	string_t	*s;
  	size_t		length;
  
  	length = s1->str_length + s2->str_length;
--- 448,461 ----
   *	The contents of the structure pointed to MUST NOT be altered.
   */
  
! string_ty *
  str_catenate(s1, s2)
! 	string_ty	*s1;
! 	string_ty	*s2;
  {
  	static char	*tmp;
  	static size_t	tmplen;
! 	string_ty	*s;
  	size_t		length;
  
  	length = s1->str_length + s2->str_length;
***************
*** 486,492 ****
   *	str_cat_three - join three strings
   *
   * SYNOPSIS
!  *	string_t *str_cat_three(string_t *, string_t *, string_t *);
   *
   * DESCRIPTION
   *	The str_cat_three function is used to concatenate three strings to form
--- 486,492 ----
   *	str_cat_three - join three strings
   *
   * SYNOPSIS
!  *	string_ty *str_cat_three(string_ty *, string_ty *, string_ty *);
   *
   * DESCRIPTION
   *	The str_cat_three function is used to concatenate three strings to form
***************
*** 493,499 ****
   *	a new string.
   *
   * RETURNS
!  *	string_t* - a pointer to a string in dynamic memory.  Use str_free when
   *	finished with.
   *
   * CAVEAT
--- 493,499 ----
   *	a new string.
   *
   * RETURNS
!  *	string_ty * - a pointer to a string in dynamic memory.  Use str_free when
   *	finished with.
   *
   * CAVEAT
***************
*** 500,514 ****
   *	The contents of the structure pointed to MUST NOT be altered.
   */
  
! string_t *
  str_cat_three(s1, s2, s3)
! 	string_t	*s1;
! 	string_t	*s2;
! 	string_t	*s3;
  {
  	static char	*tmp;
  	static size_t	tmplen;
! 	string_t	*s;
  	size_t		length;
  
  	length = s1->str_length + s2->str_length + s3->str_length;
--- 500,514 ----
   *	The contents of the structure pointed to MUST NOT be altered.
   */
  
! string_ty *
  str_cat_three(s1, s2, s3)
! 	string_ty	*s1;
! 	string_ty	*s2;
! 	string_ty	*s3;
  {
  	static char	*tmp;
  	static size_t	tmplen;
! 	string_ty	*s;
  	size_t		length;
  
  	length = s1->str_length + s2->str_length + s3->str_length;
***************
*** 545,551 ****
   *	str_equal - test equality of strings
   *
   * SYNOPSIS
!  *	int str_equal(string_t *, string_t *);
   *
   * DESCRIPTION
   *	The str_equal function is used to test if two strings are equal.
--- 545,551 ----
   *	str_equal - test equality of strings
   *
   * SYNOPSIS
!  *	int str_equal(string_ty *, string_ty *);
   *
   * DESCRIPTION
   *	The str_equal function is used to test if two strings are equal.
***************
*** 562,569 ****
  
  int
  str_equal(s1, s2)
! 	string_t	*s1;
! 	string_t	*s2;
  {
  	return (s1 == s2);
  }
--- 562,569 ----
  
  int
  str_equal(s1, s2)
! 	string_ty	*s1;
! 	string_ty	*s2;
  {
  	return (s1 == s2);
  }
***************
*** 576,582 ****
   *	str_upcase - upcase a string
   *
   * SYNOPSIS
!  *	string_t *str_upcase(string_t *);
   *
   * DESCRIPTION
   *	The str_upcase function is used to form a string which is an upper case 
--- 576,582 ----
   *	str_upcase - upcase a string
   *
   * SYNOPSIS
!  *	string_ty *str_upcase(string_ty *);
   *
   * DESCRIPTION
   *	The str_upcase function is used to form a string which is an upper case 
***************
*** 583,589 ****
   *	form of the supplied string.
   *
   * RETURNS
!  *	string_t* - a pointer to a string in dynamic memory.  Use str_free when
   *	finished with.
   *
   * CAVEAT
--- 583,589 ----
   *	form of the supplied string.
   *
   * RETURNS
!  *	string_ty * - a pointer to a string in dynamic memory.  Use str_free when
   *	finished with.
   *
   * CAVEAT
***************
*** 590,602 ****
   *	The contents of the structure pointed to MUST NOT be altered.
   */
  
! string_t *
  str_upcase(s)
! 	string_t	*s;
  {
  	static char	*tmp;
  	static size_t	tmplen;
! 	string_t	*retval;
  	char		*cp1;
  	char		*cp2;
  
--- 590,602 ----
   *	The contents of the structure pointed to MUST NOT be altered.
   */
  
! string_ty *
  str_upcase(s)
! 	string_ty	*s;
  {
  	static char	*tmp;
  	static size_t	tmplen;
! 	string_ty	*retval;
  	char		*cp1;
  	char		*cp2;
  
***************
*** 634,640 ****
   *	str_downcase - lowercase string
   *
   * SYNOPSIS
!  *	string_t *str_downcase(string_t *);
   *
   * DESCRIPTION
   *	The str_downcase function is used to form a string which is a lowercase
--- 634,640 ----
   *	str_downcase - lowercase string
   *
   * SYNOPSIS
!  *	string_ty *str_downcase(string_ty *);
   *
   * DESCRIPTION
   *	The str_downcase function is used to form a string which is a lowercase
***************
*** 641,647 ****
   *	form of the supplied string.
   *
   * RETURNS
!  *	string_t* - a pointer to a string in dynamic memory.  Use str_free when
   *	finished with.
   *
   * CAVEAT
--- 641,647 ----
   *	form of the supplied string.
   *
   * RETURNS
!  *	string_ty * - a pointer to a string in dynamic memory.  Use str_free when
   *	finished with.
   *
   * CAVEAT
***************
*** 648,660 ****
   *	The contents of the structure pointed to MUST NOT be altered.
   */
  
! string_t *
  str_downcase(s)
! 	string_t	*s;
  {
  	static char	*tmp;
  	static size_t	tmplen;
! 	string_t	*retval;
  	char		*cp1;
  	char		*cp2;
  
--- 648,660 ----
   *	The contents of the structure pointed to MUST NOT be altered.
   */
  
! string_ty *
  str_downcase(s)
! 	string_ty	*s;
  {
  	static char	*tmp;
  	static size_t	tmplen;
! 	string_ty	*retval;
  	char		*cp1;
  	char		*cp2;
  
***************
*** 692,698 ****
   *	str_bool - get boolean value
   *
   * SYNOPSIS
!  *	int str_bool(string_t *s);
   *
   * DESCRIPTION
   *	The str_bool function is used to determine the boolean value of the
--- 692,698 ----
   *	str_bool - get boolean value
   *
   * SYNOPSIS
!  *	int str_bool(string_ty *s);
   *
   * DESCRIPTION
   *	The str_bool function is used to determine the boolean value of the
***************
*** 706,712 ****
  
  int
  str_bool(s)
! 	string_t	*s;
  {
  	char		*cp;
  
--- 706,712 ----
  
  int
  str_bool(s)
! 	string_ty	*s;
  {
  	char		*cp;
  
***************
*** 726,732 ****
   *	str_field - extract a field from a string
   *
   * SYNOPSIS
!  *	string_t *str_field(string_t *, char separator, int field_number);
   *
   * DESCRIPTION
   *	The str_field functipon is used to erxtract a field from a string.
--- 726,732 ----
   *	str_field - extract a field from a string
   *
   * SYNOPSIS
!  *	string_ty *str_field(string_ty *, char separator, int field_number);
   *
   * DESCRIPTION
   *	The str_field functipon is used to erxtract a field from a string.
***************
*** 738,746 ****
   *	pointer return.  The null string is considered to have one empty field.
   */
  
! string_t *
  str_field(s, sep, fldnum)
! 	string_t	*s;
  	int		sep;
  	int		fldnum;
  {
--- 738,746 ----
   *	pointer return.  The null string is considered to have one empty field.
   */
  
! string_ty *
  str_field(s, sep, fldnum)
! 	string_ty	*s;
  	int		sep;
  	int		fldnum;
  {
***************
*** 768,793 ****
   *	str_format - analog of sprintf
   *
   * SYNOPSIS
!  *	string_t *str_format(char *, ...);
   *
   * DESCRIPTION
   *	The str_format function is used to create new strings
   *	using a format specification similar to printf(3).
!  *	The "%S" specifier is used to mean a ``string_t *'' string.
   *
   * RETURNS
!  *	string_t* - a pointer to a string in dynamic memory.  Use str_free when
   *	finished with.
   */
  
  
! string_t *
  str_format(fmt sva_last)
  	char		*fmt;
  	sva_last_decl
  {
  	va_list		ap;
! 	string_t	*result;
  
  	sva_init(ap, fmt);
  	result = str_vformat(fmt, ap);
--- 768,793 ----
   *	str_format - analog of sprintf
   *
   * SYNOPSIS
!  *	string_ty *str_format(char *, ...);
   *
   * DESCRIPTION
   *	The str_format function is used to create new strings
   *	using a format specification similar to printf(3).
!  *	The "%S" specifier is used to mean a ``string_ty *'' string.
   *
   * RETURNS
!  *	string_ty * - a pointer to a string in dynamic memory.  Use str_free when
   *	finished with.
   */
  
  
! string_ty *
  str_format(fmt sva_last)
  	char		*fmt;
  	sva_last_decl
  {
  	va_list		ap;
! 	string_ty	*result;
  
  	sva_init(ap, fmt);
  	result = str_vformat(fmt, ap);
***************
*** 801,814 ****
  
  static void
  build_fake(fake, flag, width, precision, qualifier, specifier)
! 	char	*fake;
! 	int	flag;
! 	int	width;
! 	int	precision;
! 	int	qualifier;
! 	int	specifier;
  {
! 	char	*fp;
  
  	fp = fake;
  	*fp++ = '%';
--- 801,814 ----
  
  static void
  build_fake(fake, flag, width, precision, qualifier, specifier)
! 	char		*fake;
! 	int		flag;
! 	int		width;
! 	int		precision;
! 	int		qualifier;
! 	int		specifier;
  {
! 	char		*fp;
  
  	fp = fake;
  	*fp++ = '%';
***************
*** 829,835 ****
  }
  
  
! string_t *
  str_vformat(fmt, ap)
  	char		*fmt;
  	va_list		ap;
--- 829,835 ----
  }
  
  
! string_ty *
  str_vformat(fmt, ap)
  	char		*fmt;
  	va_list		ap;
***************
*** 1247,1256 ****
  
  		case 'S':
  			{
! 				string_t	*a;
  				size_t		len;
  
! 				a = va_arg(ap, string_t *);
  				len = a->str_length;
  				if (!prec_set)
  					prec = len;
--- 1247,1256 ----
  
  		case 'S':
  			{
! 				string_ty	*a;
  				size_t		len;
  
! 				a = va_arg(ap, string_ty *);
  				len = a->str_length;
  				if (!prec_set)
  					prec = len;
Index: common/str.h
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1990-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 26,61 ****
  #include <main.h>
  #include <s-v-arg.h>
  
! typedef unsigned long hash_t;
  
! typedef struct string_t string_t;
! struct string_t
  {
! 	hash_t		str_hash;
! 	string_t	*str_next;
  	long		str_references;
  	size_t		str_length;
  	char		str_text[1];
  };
  
! extern string_t *str_true;
! extern string_t *str_false;
  
  void str_initialize _((void));
! string_t *str_from_c _((char *));
! string_t *str_n_from_c _((char *, size_t));
! string_t *str_copy _((string_t *));
! void str_free _((string_t *));
! string_t *str_catenate _((string_t *, string_t *));
! string_t *str_cat_three _((string_t *, string_t *, string_t *));
! int str_bool _((string_t *));
! string_t *str_upcase _((string_t *));
! string_t *str_downcase _((string_t *));
  void str_dump _((void));
! char *str_repn _((string_t *));
! string_t *str_field _((string_t *s, int sep, int fldnum));
! string_t *str_format _((char *, ...));
! string_t *str_vformat _((char *, va_list));
  
  #define str_equal(s1, s2) ((s1) == (s2))
  
--- 26,61 ----
  #include <main.h>
  #include <s-v-arg.h>
  
! typedef unsigned long str_hash_ty;
  
! typedef struct string_ty string_ty;
! struct string_ty
  {
! 	str_hash_ty	str_hash;
! 	string_ty	*str_next;
  	long		str_references;
  	size_t		str_length;
  	char		str_text[1];
  };
  
! extern string_ty *str_true;
! extern string_ty *str_false;
  
  void str_initialize _((void));
! string_ty *str_from_c _((char *));
! string_ty *str_n_from_c _((char *, size_t));
! string_ty *str_copy _((string_ty *));
! void str_free _((string_ty *));
! string_ty *str_catenate _((string_ty *, string_ty *));
! string_ty *str_cat_three _((string_ty *, string_ty *, string_ty *));
! int str_bool _((string_ty *));
! string_ty *str_upcase _((string_ty *));
! string_ty *str_downcase _((string_ty *));
  void str_dump _((void));
! char *str_repn _((string_ty *));
! string_ty *str_field _((string_ty *s, int sep, int fldnum));
! string_ty *str_format _((char *, ...));
! string_ty *str_vformat _((char *, va_list));
  
  #define str_equal(s1, s2) ((s1) == (s2))
  
Index: common/trace.c
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1990-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 35,58 ****
  #define INDENT 2
  #define PAGE_WIDTH 79
  
! typedef struct known_t known_t;
! struct known_t
  {
! 	string_t	*filename;
  	int		flag;
  	int		*flag_p;
! 	known_t		*next;
  };
  
! static	string_t	*file_name;
  static	int		line_number;
  static	int		page_width;
! static	known_t		*known;
  
  
! static string_t *basename _((char *));
  
! static string_t *
  basename(file)
  	char		*file;
  {
--- 35,58 ----
  #define INDENT 2
  #define PAGE_WIDTH 79
  
! typedef struct known_ty known_ty;
! struct known_ty
  {
! 	string_ty	*filename;
  	int		flag;
  	int		*flag_p;
! 	known_ty	*next;
  };
  
! static	string_ty	*file_name;
  static	int		line_number;
  static	int		page_width;
! static	known_ty	*known;
  
  
! static string_ty *basename _((char *));
  
! static string_ty *
  basename(file)
  	char		*file;
  {
***************
*** 78,85 ****
  	char		*file;
  	int		*result;
  {
! 	string_t	*s;
! 	known_t		*kp;
  
  	s = basename(file);
  	for (kp = known; kp; kp = kp->next)
--- 78,85 ----
  	char		*file;
  	int		*result;
  {
! 	string_ty	*s;
! 	known_ty	*kp;
  
  	s = basename(file);
  	for (kp = known; kp; kp = kp->next)
***************
*** 92,98 ****
  	}
  	if (!kp)
  	{
! 		kp = (known_t *)mem_alloc(sizeof(known_t));
  		kp->filename = s;
  		kp->next = known;
  		kp->flag = 2; /* disabled */
--- 92,98 ----
  	}
  	if (!kp)
  	{
! 		kp = (known_ty *)mem_alloc(sizeof(known_ty));
  		kp->filename = s;
  		kp->next = known;
  		kp->flag = 2; /* disabled */
***************
*** 109,115 ****
  	char		*file;
  	int		line;
  {
! 	string_t	*s;
  
  	/*
  	 * take new name fist, because will probably be same as last
--- 109,115 ----
  	char		*file;
  	int		line;
  {
! 	string_ty	*s;
  
  	/*
  	 * take new name fist, because will probably be same as last
***************
*** 243,250 ****
  trace_enable(file)
  	char		*file;
  {
! 	string_t	*s;
! 	known_t		*kp;
  
  	s = basename(file);
  	for (kp = known; kp; kp = kp->next)
--- 243,250 ----
  trace_enable(file)
  	char		*file;
  {
! 	string_ty	*s;
! 	known_ty	*kp;
  
  	s = basename(file);
  	for (kp = known; kp; kp = kp->next)
***************
*** 257,263 ****
  	}
  	if (!kp)
  	{
! 		kp = (known_t *)mem_alloc(sizeof(known_t));
  		kp->filename = s;
  		kp->flag_p = 0;
  		kp->next = known;
--- 257,263 ----
  	}
  	if (!kp)
  	{
! 		kp = (known_ty *)mem_alloc(sizeof(known_ty));
  		kp->filename = s;
  		kp->flag_p = 0;
  		kp->next = known;
***************
*** 402,408 ****
  	char		*name;
  	char		*vp;
  {
! 	char	*s;
  	long		count;
  
  	trace_printf("%s = ", name);
--- 402,408 ----
  	char		*name;
  	char		*vp;
  {
! 	char		*s;
  	long		count;
  
  	trace_printf("%s = ", name);
Index: common/trace.h
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1990-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: common/version.c
***************
*** 1,12 ****
  /*
   *	cook - a program construction tool
!  *	Copyright (c) 1991-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - a program construction tool
!  *	Copyright (C) 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 54,167 ****
  "		    GNU GENERAL PUBLIC LICENSE",
  "   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION",
  "",
! "  0. This License Agreement applies to any program or other work which",
! "contains a notice placed by the copyright holder saying it may be",
! "distributed under the terms of this General Public License.  The",
! "\"Program\", below, refers to any such program or work, and a \"work based",
! "on the Program\" means either the Program or any work containing the",
! "Program or a portion of it, either verbatim or with modifications.  Each",
! "licensee is addressed as \"you\".",
  "",
! "  1. You may copy and distribute verbatim copies of the Program's source",
! "code as you receive it, in any medium, provided that you conspicuously and",
! "appropriately publish on each copy an appropriate copyright notice and",
! "disclaimer of warranty; keep intact all the notices that refer to this",
! "General Public License and to the absence of any warranty; and give any",
! "other recipients of the Program a copy of this General Public License",
! "along with the Program.  You may charge a fee for the physical act of",
! "transferring a copy.",
  "",
! "  2. You may modify your copy or copies of the Program or any portion of",
! "it, and copy and distribute such modifications under the terms of Paragraph",
! "1 above, provided that you also do the following:",
  "",
! "    a) cause the modified files to carry prominent notices stating that",
! "    you changed the files and the date of any change; and",
  "",
! "    b) cause the whole of any work that you distribute or publish, that",
! "    in whole or in part contains the Program or any part thereof, either",
! "    with or without modifications, to be licensed at no charge to all",
! "    third parties under the terms of this General Public License (except",
! "    that you may choose to grant warranty protection to some or all",
! "    third parties, at your option).",
  "",
! "    c) If the modified program normally reads commands interactively when",
! "    run, you must cause it, when started running for such interactive use",
! "    in the simplest and most usual way, to print or display an",
! "    announcement including an appropriate copyright notice and a notice",
! "    that there is no warranty (or else, saying that you provide a",
! "    warranty) and that users may redistribute the program under these",
! "    conditions, and telling the user how to view a copy of this General",
! "    Public License.",
  "",
! "    d) You may charge a fee for the physical act of transferring a",
! "    copy, and you may at your option offer warranty protection in",
! "    exchange for a fee.",
  "",
! "Mere aggregation of another independent work with the Program (or its",
! "derivative) on a volume of a storage or distribution medium does not bring",
! "the other work under the scope of these terms.",
  "",
! "  3. You may copy and distribute the Program (or a portion or derivative of",
! "it, under Paragraph 2) in object code or executable form under the terms of",
! "Paragraphs 1 and 2 above provided that you also do one of the following:",
  "",
! "    a) accompany it with the complete corresponding machine-readable",
! "    source code, which must be distributed under the terms of",
! "    Paragraphs 1 and 2 above; or,",
  "",
! "    b) accompany it with a written offer, valid for at least three",
! "    years, to give any third party free (except for a nominal charge",
! "    for the cost of distribution) a complete machine-readable copy of the",
! "    corresponding source code, to be distributed under the terms of",
! "    Paragraphs 1 and 2 above; or,",
  "",
! "    c) accompany it with the information you received as to where the",
! "    corresponding source code may be obtained.  (This alternative is",
  "    allowed only for noncommercial distribution and only if you",
! "    received the program in object code or executable form alone.)",
  "",
! "Source code for a work means the preferred form of the work for making",
! "modifications to it.  For an executable file, complete source code means",
! "all the source code for all modules it contains; but, as a special",
! "exception, it need not include source code for modules which are standard",
! "libraries that accompany the operating system on which the executable",
! "file runs, or for standard header files or definitions files that",
! "accompany that operating system.",
  "",
! "  4. You may not copy, modify, sublicense, distribute or transfer the",
! "Program except as expressly provided under this General Public License.",
! "Any attempt otherwise to copy, modify, sublicense, distribute or transfer",
! "the Program is void, and will automatically terminate your rights to use",
! "the Program under this License.  However, parties who have received",
! "copies, or rights to use copies, from you under this General Public",
! "License will not have their licenses terminated so long as such parties",
! "remain in full compliance.",
  "",
! "  5. By copying, distributing or modifying the Program (or any work based",
! "on the Program) you indicate your acceptance of this license to do so,",
! "and all its terms and conditions.",
  "",
  "  6. Each time you redistribute the Program (or any work based on the",
! "Program), the recipient automatically receives a license from the original",
! "licensor to copy, distribute or modify the Program subject to these",
! "terms and conditions.  You may not impose any further restrictions on the",
! "recipients' exercise of the rights granted herein.",
  "",
! "  7. The Free Software Foundation may publish revised and/or new versions",
  "of the General Public License from time to time.  Such new versions will",
  "be similar in spirit to the present version, but may differ in detail to",
  "address new problems or concerns.",
  "",
  "Each version is given a distinguishing version number.  If the Program",
! "specifies a version number of the license which applies to it and \"any",
  "later version\", you have the option of following the terms and conditions",
  "either of that version or of any later version published by the Free",
  "Software Foundation.  If the Program does not specify a version number of",
! "the license, you may choose any version ever published by the Free Software",
  "Foundation.",
  "",
! "  8. If you wish to incorporate parts of the Program into other free",
  "programs whose distribution conditions are different, write to the author",
  "to ask for permission.  For software which is copyrighted by the Free",
  "Software Foundation, write to the Free Software Foundation; we sometimes",
--- 54,248 ----
  "		    GNU GENERAL PUBLIC LICENSE",
  "   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION",
  "",
! "  0. This License applies to any program or other work which contains",
! "a notice placed by the copyright holder saying it may be distributed",
! "under the terms of this General Public License.  The \"Program\", below,",
! "refers to any such program or work, and a \"work based on the Program\"",
! "means either the Program or any derivative work under copyright law:",
! "that is to say, a work containing the Program or a portion of it,",
! "either verbatim or with modifications and/or translated into another",
! "language.  (Hereinafter, translation is included without limitation in",
! "the term \"modification\".)  Each licensee is addressed as \"you\".",
  "",
! "Activities other than copying, distribution and modification are not",
! "covered by this License; they are outside its scope.  The act of",
! "running the Program is not restricted, and the output from the Program",
! "is covered only if its contents constitute a work based on the",
! "Program (independent of having been made by running the Program).",
! "Whether that is true depends on what the Program does.",
  "",
! "  1. You may copy and distribute verbatim copies of the Program's",
! "source code as you receive it, in any medium, provided that you",
! "conspicuously and appropriately publish on each copy an appropriate",
! "copyright notice and disclaimer of warranty; keep intact all the",
! "notices that refer to this License and to the absence of any warranty;",
! "and give any other recipients of the Program a copy of this License",
! "along with the Program.",
  "",
! "You may charge a fee for the physical act of transferring a copy, and",
! "you may at your option offer warranty protection in exchange for a fee.",
  "",
! "  2. You may modify your copy or copies of the Program or any portion",
! "of it, thus forming a work based on the Program, and copy and",
! "distribute such modifications or work under the terms of Section 1",
! "above, provided that you also meet all of these conditions:",
  "",
! "    a) You must cause the modified files to carry prominent notices",
! "    stating that you changed the files and the date of any change.",
  "",
! "    b) You must cause any work that you distribute or publish, that in",
! "    whole or in part contains or is derived from the Program or any",
! "    part thereof, to be licensed as a whole at no charge to all third",
! "    parties under the terms of this License.",
  "",
! "    c) If the modified program normally reads commands interactively",
! "    when run, you must cause it, when started running for such",
! "    interactive use in the most ordinary way, to print or display an",
! "    announcement including an appropriate copyright notice and a",
! "    notice that there is no warranty (or else, saying that you provide",
! "    a warranty) and that users may redistribute the program under",
! "    these conditions, and telling the user how to view a copy of this",
! "    License.  (Exception: if the Program itself is interactive but",
! "    does not normally print such an announcement, your work based on",
! "    the Program is not required to print an announcement.)",
  "",
! "These requirements apply to the modified work as a whole.  If",
! "identifiable sections of that work are not derived from the Program,",
! "and can be reasonably considered independent and separate works in",
! "themselves, then this License, and its terms, do not apply to those",
! "sections when you distribute them as separate works.  But when you",
! "distribute the same sections as part of a whole which is a work based",
! "on the Program, the distribution of the whole must be on the terms of",
! "this License, whose permissions for other licensees extend to the",
! "entire whole, and thus to each and every part regardless of who wrote it.",
  "",
! "Thus, it is not the intent of this section to claim rights or contest",
! "your rights to work written entirely by you; rather, the intent is to",
! "exercise the right to control the distribution of derivative or",
! "collective works based on the Program.",
  "",
! "In addition, mere aggregation of another work not based on the Program",
! "with the Program (or with a work based on the Program) on a volume of",
! "a storage or distribution medium does not bring the other work under",
! "the scope of this License.",
  "",
! "  3. You may copy and distribute the Program (or a work based on it,",
! "under Section 2) in object code or executable form under the terms of",
! "Sections 1 and 2 above provided that you also do one of the following:",
! "",
! "    a) Accompany it with the complete corresponding machine-readable",
! "    source code, which must be distributed under the terms of Sections",
! "    1 and 2 above on a medium customarily used for software interchange; or,",
! "",
! "    b) Accompany it with a written offer, valid for at least three",
! "    years, to give any third party, for a charge no more than your",
! "    cost of physically performing source distribution, a complete",
! "    machine-readable copy of the corresponding source code, to be",
! "    distributed under the terms of Sections 1 and 2 above on a medium",
! "    customarily used for software interchange; or,",
! "",
! "    c) Accompany it with the information you received as to the offer",
! "    to distribute corresponding source code.  (This alternative is",
  "    allowed only for noncommercial distribution and only if you",
! "    received the program in object code or executable form with such",
! "    an offer, in accord with Subsection b above.)",
  "",
! "The source code for a work means the preferred form of the work for",
! "making modifications to it.  For an executable work, complete source",
! "code means all the source code for all modules it contains, plus any",
! "associated interface definition files, plus the scripts used to",
! "control compilation and installation of the executable.  However, as a",
! "special exception, the source code distributed need not include",
! "anything that is normally distributed (in either source or binary",
! "form) with the major components (compiler, kernel, and so on) of the",
! "operating system on which the executable runs, unless that component",
! "itself accompanies the executable.",
  "",
! "If distribution of executable or object code is made by offering",
! "access to copy from a designated place, then offering equivalent",
! "access to copy the source code from the same place counts as",
! "distribution of the source code, even though third parties are not",
! "compelled to copy the source along with the object code.",
  "",
! "  4. You may not copy, modify, sublicense, or distribute the Program",
! "except as expressly provided under this License.  Any attempt",
! "otherwise to copy, modify, sublicense or distribute the Program is",
! "void, and will automatically terminate your rights under this License.",
! "However, parties who have received copies, or rights, from you under",
! "this License will not have their licenses terminated so long as such",
! "parties remain in full compliance.",
  "",
+ "  5. You are not required to accept this License, since you have not",
+ "signed it.  However, nothing else grants you permission to modify or",
+ "distribute the Program or its derivative works.  These actions are",
+ "prohibited by law if you do not accept this License.  Therefore, by",
+ "modifying or distributing the Program (or any work based on the",
+ "Program), you indicate your acceptance of this License to do so, and",
+ "all its terms and conditions for copying, distributing or modifying",
+ "the Program or works based on it.",
+ "",
  "  6. Each time you redistribute the Program (or any work based on the",
! "Program), the recipient automatically receives a license from the",
! "original licensor to copy, distribute or modify the Program subject to",
! "these terms and conditions.  You may not impose any further",
! "restrictions on the recipients' exercise of the rights granted herein.",
! "You are not responsible for enforcing compliance by third parties to",
! "this License.",
  "",
! "  7. If, as a consequence of a court judgment or allegation of patent",
! "infringement or for any other reason (not limited to patent issues),",
! "conditions are imposed on you (whether by court order, agreement or",
! "otherwise) that contradict the conditions of this License, they do not",
! "excuse you from the conditions of this License.  If you cannot",
! "distribute so as to satisfy simultaneously your obligations under this",
! "License and any other pertinent obligations, then as a consequence you",
! "may not distribute the Program at all.  For example, if a patent",
! "license would not permit royalty-free redistribution of the Program by",
! "all those who receive copies directly or indirectly through you, then",
! "the only way you could satisfy both it and this License would be to",
! "refrain entirely from distribution of the Program.",
! "",
! "If any portion of this section is held invalid or unenforceable under",
! "any particular circumstance, the balance of the section is intended to",
! "apply and the section as a whole is intended to apply in other",
! "circumstances.",
! "",
! "It is not the purpose of this section to induce you to infringe any",
! "patents or other property right claims or to contest validity of any",
! "such claims; this section has the sole purpose of protecting the",
! "integrity of the free software distribution system, which is",
! "implemented by public license practices.  Many people have made",
! "generous contributions to the wide range of software distributed",
! "through that system in reliance on consistent application of that",
! "system; it is up to the author/donor to decide if he or she is willing",
! "to distribute software through any other system and a licensee cannot",
! "impose that choice.",
! "",
! "This section is intended to make thoroughly clear what is believed to",
! "be a consequence of the rest of this License.",
! "",
! "  8. If the distribution and/or use of the Program is restricted in",
! "certain countries either by patents or by copyrighted interfaces, the",
! "original copyright holder who places the Program under this License",
! "may add an explicit geographical distribution limitation excluding",
! "those countries, so that distribution is permitted only in or among",
! "countries not thus excluded.  In such case, this License incorporates",
! "the limitation as if written in the body of this License.",
! "",
! "  9. The Free Software Foundation may publish revised and/or new versions",
  "of the General Public License from time to time.  Such new versions will",
  "be similar in spirit to the present version, but may differ in detail to",
  "address new problems or concerns.",
  "",
  "Each version is given a distinguishing version number.  If the Program",
! "specifies a version number of this License which applies to it and \"any",
  "later version\", you have the option of following the terms and conditions",
  "either of that version or of any later version published by the Free",
  "Software Foundation.  If the Program does not specify a version number of",
! "this License, you may choose any version ever published by the Free Software",
  "Foundation.",
  "",
! "  10. If you wish to incorporate parts of the Program into other free",
  "programs whose distribution conditions are different, write to the author",
  "to ask for permission.  For software which is copyrighted by the Free",
  "Software Foundation, write to the Free Software Foundation; we sometimes",
***************
*** 180,202 ****
  {
  	static char *text[] =
  	{
! "			NO WARRANTY",
  "",
! "  9. BECAUSE THE %s PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY",
! "FOR THE %s PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN",
  "OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES",
! "PROVIDE THE %s PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED",
  "OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF",
  "MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS",
  "TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE",
! "%s PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,",
  "REPAIR OR CORRECTION.",
  "",
! "  10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING",
  "WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR",
! "REDISTRIBUTE THE %s PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,",
  "INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING",
! "OUT OF THE USE OR INABILITY TO USE THE %s PROGRAM (INCLUDING BUT NOT LIMITED",
  "TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY",
  "YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER",
  "PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE",
--- 261,283 ----
  {
  	static char *text[] =
  	{
! "			    NO WARRANTY",
  "",
! "  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY",
! "FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN",
  "OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES",
! "PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED",
  "OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF",
  "MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS",
  "TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE",
! "PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,",
  "REPAIR OR CORRECTION.",
  "",
! "  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING",
  "WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR",
! "REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,",
  "INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING",
! "OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED",
  "TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY",
  "YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER",
  "PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE",
***************
*** 218,225 ****
  }
  
  
! typedef struct table_t table_t;
! struct table_t
  {
  	char	*name;
  	void	(*func)_((void));
--- 299,306 ----
  }
  
  
! typedef struct table_ty table_ty;
! struct table_ty
  {
  	char	*name;
  	void	(*func)_((void));
***************
*** 226,232 ****
  };
  
  
! static	table_t	table[] =
  {
  	{ "Copyright",		version_copyright,	},
  	{ "Redistribution",	version_redistribution,	},
--- 307,313 ----
  };
  
  
! static table_ty table[] =
  {
  	{ "Copyright",		version_copyright,	},
  	{ "Redistribution",	version_redistribution,	},
***************
*** 245,266 ****
  	if (arglex_token == arglex_token_string)
  	{
  		int		nhit;
! 		table_t		*tp;
! 		string_t	*s1;
! 		string_t	*s2;
! 		table_t		*hit[SIZEOF(table)];
  		int		j;
  
  		nhit = 0;
  		for (tp = table; tp < ENDOF(table); ++tp)
  		{
! 			if (argcmp(tp->name, arglex_value.alv_string))
  				hit[nhit++] = tp;
  		}
  		switch (nhit)
  		{
  		case 0:
! 			fatal("version information name \"%s\" unknown", arglex_value.alv_string);
  	
  		case 1:
  			break;
--- 326,351 ----
  	if (arglex_token == arglex_token_string)
  	{
  		int		nhit;
! 		table_ty	*tp;
! 		string_ty	*s1;
! 		string_ty	*s2;
! 		table_ty	*hit[SIZEOF(table)];
  		int		j;
  
  		nhit = 0;
  		for (tp = table; tp < ENDOF(table); ++tp)
  		{
! 			if (arglex_compare(tp->name, arglex_value.alv_string))
  				hit[nhit++] = tp;
  		}
  		switch (nhit)
  		{
  		case 0:
! 			fatal
! 			(
! 				"version information name \"%s\" unknown",
! 				arglex_value.alv_string
! 			);
  	
  		case 1:
  			break;
***************
*** 281,287 ****
--- 366,379 ----
  	else
  		func = version_copyright;
  	if (arglex_token != arglex_token_eoln)
+ 	{
+ 		error
+ 		(
+ 			"misplaced \"%s\" command line argument",
+ 			arglex_value.alv_string
+ 		);
  		version_usage();
+ 	}
  
  	func();
  	/* trace((/ *{* /"}\n")); */
Index: common/version.h
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1990-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: common/word.c
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1990-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 37,75 ****
  
  
  /*
!  *  NAME
   *	wl_append - append to a word list
   *
!  *  SYNOPSIS
!  *	void wl_append(wlist *wlp, string_t *wp);
   *
!  *  DESCRIPTION
   *	Wl_append is used to append to a word list.
   *
!  *  CAVEAT
   *	The word being appended IS copied.
   */
  
  void
  wl_append(wlp, w)
!     wlist   *wlp;
!     string_t *w;
  {
!     assert(wlp);
!     assert(w);
!     *(string_t**)enlarge(&wlp->wl_nwords, (char**)&wlp->wl_word, sizeof(string_t *)) = str_copy(w);
  }
  
  void
  wl_prepend(wlp, w)
  	wlist		*wlp;
! 	string_t	*w;
  {
  	long		j;
  
  	assert(wlp);
  	assert(w);
! 	enlarge(&wlp->wl_nwords, (char**)&wlp->wl_word, sizeof(string_t *));
  	for (j = wlp->wl_nwords - 1; j > 0; --j)
  		wlp->wl_word[j] = wlp->wl_word[j - 1];
  	wlp->wl_word[0] = str_copy(w);
--- 37,82 ----
  
  
  /*
!  * NAME
   *	wl_append - append to a word list
   *
!  * SYNOPSIS
!  *	void wl_append(wlist *wlp, string_ty *wp);
   *
!  * DESCRIPTION
   *	Wl_append is used to append to a word list.
   *
!  * CAVEAT
   *	The word being appended IS copied.
   */
  
  void
  wl_append(wlp, w)
! 	wlist		*wlp;
! 	string_ty	*w;
  {
! 	assert(wlp);
! 	assert(w);
! 	*(string_ty**)
! 	enlarge
! 	(
! 		&wlp->wl_nwords,
! 		(char**)&wlp->wl_word,
! 		sizeof(string_ty *)
! 	) =
! 		str_copy(w);
  }
  
  void
  wl_prepend(wlp, w)
  	wlist		*wlp;
! 	string_ty	*w;
  {
  	long		j;
  
  	assert(wlp);
  	assert(w);
! 	enlarge(&wlp->wl_nwords, (char**)&wlp->wl_word, sizeof(string_ty *));
  	for (j = wlp->wl_nwords - 1; j > 0; --j)
  		wlp->wl_word[j] = wlp->wl_word[j - 1];
  	wlp->wl_word[0] = str_copy(w);
***************
*** 77,93 ****
  
  
  /*
!  *  NAME
   *	wl_free - free a word list
   *
!  *  SYNOPSIS
   *	void wl_free(wlist *wlp);
   *
!  *  DESCRIPTION
   *	Wl_free is used to free the contents of a word list
   *	when it is finished with.
   *
!  *  CAVEAT
   *	It is assumed that the contents of the word list were all
   *	created using strdup() or similar, and grown using wl_append().
   */
--- 84,100 ----
  
  
  /*
!  * NAME
   *	wl_free - free a word list
   *
!  * SYNOPSIS
   *	void wl_free(wlist *wlp);
   *
!  * DESCRIPTION
   *	Wl_free is used to free the contents of a word list
   *	when it is finished with.
   *
!  * CAVEAT
   *	It is assumed that the contents of the word list were all
   *	created using strdup() or similar, and grown using wl_append().
   */
***************
*** 94,124 ****
  
  void
  wl_free(wlp)
!     wlist   *wlp;
  {
!     int	    j;
  
!     for (j = 0; j < wlp->wl_nwords; j++)
! 	str_free(wlp->wl_word[j]);
!     if (wlp->wl_nwords)
! 	free(wlp->wl_word);
!     wlp->wl_nwords = 0;
!     wlp->wl_word = 0;
  }
  
  
  /*
!  *  NAME
   *	wl_member - word list membership
   *
!  *  SYNOPSIS
!  *	int wl_member(wlist *wlp, string_t *wp);
   *
!  *  DESCRIPTION
   *	Wl_member is used to determine if the given word is
   *	contained in the given word list.
   *
!  *  RETURNS
   *	A zero if the word is not in the list,
   *	and a non-zero if it is.
   */
--- 101,131 ----
  
  void
  wl_free(wlp)
! 	wlist		*wlp;
  {
! 	int		j;
  
! 	for (j = 0; j < wlp->wl_nwords; j++)
! 		str_free(wlp->wl_word[j]);
! 	if (wlp->wl_nwords)
! 		free(wlp->wl_word);
! 	wlp->wl_nwords = 0;
! 	wlp->wl_word = 0;
  }
  
  
  /*
!  * NAME
   *	wl_member - word list membership
   *
!  * SYNOPSIS
!  *	int wl_member(wlist *wlp, string_ty *wp);
   *
!  * DESCRIPTION
   *	Wl_member is used to determine if the given word is
   *	contained in the given word list.
   *
!  * RETURNS
   *	A zero if the word is not in the list,
   *	and a non-zero if it is.
   */
***************
*** 125,156 ****
  
  int
  wl_member(wlp, w)
!     wlist   *wlp;
!     string_t *w;
  {
!     int	    j;
  
!     for (j = 0; j < wlp->wl_nwords; j++)
! 	if (str_equal(wlp->wl_word[j], w))
! 	    return 1;
!     return 0;
  }
  
  
  /*
!  *  NAME
   *	wl_copy - copy a word list
   *
!  *  SYNOPSIS
   *	void wl_copy(wlist *to, wlist *from);
   *
!  *  DESCRIPTION
   *	Wl_copy is used to copy word lists.
   *
!  *  RETURNS
   *	A copy of the 'to' word list is placed in 'from'.
   *
!  *  CAVEAT
   *	It is the responsibility of the caller to ensure that the
   *	new word list is freed when finished with, by a call to wl_free().
   */
--- 132,163 ----
  
  int
  wl_member(wlp, w)
! 	wlist		*wlp;
! 	string_ty	*w;
  {
! 	int		j;
  
! 	for (j = 0; j < wlp->wl_nwords; j++)
! 		if (str_equal(wlp->wl_word[j], w))
! 			return 1;
! 	return 0;
  }
  
  
  /*
!  * NAME
   *	wl_copy - copy a word list
   *
!  * SYNOPSIS
   *	void wl_copy(wlist *to, wlist *from);
   *
!  * DESCRIPTION
   *	Wl_copy is used to copy word lists.
   *
!  * RETURNS
   *	A copy of the 'to' word list is placed in 'from'.
   *
!  * CAVEAT
   *	It is the responsibility of the caller to ensure that the
   *	new word list is freed when finished with, by a call to wl_free().
   */
***************
*** 157,364 ****
  
  void
  wl_copy(to, from)
!     wlist   *to;
!     wlist   *from;
  {
!     int	    j;
  
!     wl_zero(to);
!     for (j = 0; j < from->wl_nwords; j++)
! 	wl_append(to, str_copy(from->wl_word[j]));
  }
  
  
  /*
!  *  NAME
   *	wl2str - form a string from a word list
   *
!  *  SYNOPSIS
!  *	string_t *wl2str(wlist *wlp, int start, int stop);
   *
!  *  DESCRIPTION
   *	Wl2str is used to form a string from a word list.
   *
!  *  RETURNS
   *	A pointer to the newly formed string in dynamic memory.
   *
!  *  CAVEAT
   *	It is the responsibility of the caller to ensure that the
   *	new string is freed when finished with, by a call to free().
   */
  
! string_t *
  wl2str(wl, start, stop)
!     wlist   *wl;
!     int     start;
!     int     stop;
  {
!     int	    j;
!     static char *tmp;
!     static size_t tmplen;
!     size_t  length;
!     char    *pos;
!     string_t *s;
  
!     length = 0;
!     for (j = start; j <= stop && j < wl->wl_nwords; j++)
!     {
! 	s = wl->wl_word[j];
! 	if (s->str_length)
  	{
! 	    if (length)
! 	        ++length;
! 	    length += s->str_length;
  	}
-     }
  
!     if (!tmp)
!     {
! 	tmplen = length;
! 	if (tmplen < 16)
! 	    tmplen = 16;
!         tmp = mem_alloc(tmplen);
!     }
!     else
!     {
! 	if (tmplen < length)
  	{
! 	    tmplen = length;
!             mem_change_size(&tmp, tmplen);
  	}
!     }
  
!     pos = tmp;
!     for (j = start; j <= stop && j < wl->wl_nwords; j++)
!     {
! 	s = wl->wl_word[j];
! 	if (s->str_length)
  	{
! 	    if (pos != tmp)
! 	        *pos++ = ' ';
! 	    memcpy(pos, s->str_text, s->str_length);
! 	    pos += s->str_length;
  	}
-     }
  
!     s = str_n_from_c(tmp, length);
!     return s;
  }
  
  
  /*
!  *  NAME
   *	str2wl - string to word list
   *
!  *  SYNOPSIS
!  *	void str2wl(wlist *wlp, string_t *s);
   *
!  *  DESCRIPTION
   *	Str2wl is used to form a word list from a string.
   *
!  *  RETURNS
   *	The string is broken on spaces into words,
   *	using strndup() and wl_append().
   *
!  *  CAVEAT
   *	Quoting is not understood.
   */
  
  void
  str2wl(wlp, s)
!     wlist   *wlp;
!     string_t *s;
  {
!     char    *cp;
!     char    *cp1;
  
!     wl_zero(wlp);
!     cp = s->str_text;
!     while (*cp)
!     {
! 	string_t *w;
  
! 	while (*cp == ' ')
! 	    cp++;
! 	if (!*cp)
! 	    break;
! 	cp1 = cp;
! 	while (*cp && *cp != ' ')
! 	    cp++;
! 	w = str_n_from_c(cp1, cp - cp1);
! 	wl_append(wlp, w);
! 	str_free(w);
!     }
  }
  
  
  /*
!  *  NAME
   *	wl_insert - a insert a word into a list
   *
!  *  SYNOPSIS
!  *	void wl_insert(wlist *wlp, string_t *wp);
   *
!  *  DESCRIPTION
   *	Wl_insert is similar to wl_append, however it does not
   *	append the word unless it is not already in the list.
   *
!  *  CAVEAT
   *	If the word is inserted it is copied.
   */
  
  void
  wl_append_unique(wlp, wp)
!     wlist   *wlp;
!     string_t *wp;
  {
!     int	    j;
  
!     for (j = 0; j < wlp->wl_nwords; j++)
! 	if (str_equal(wlp->wl_word[j], wp))
! 	    return;
!     wl_append(wlp, wp);
  }
  
  
  /*
!  *  NAME
!  *      wl_delete - remove list member
   *
!  *  SYNOPSIS
!  *      void wl_delete(wlist *wlp, string_t *wp);
   *
!  *  DESCRIPTION
!  *      The wl_delete function is used to delete a member of a word list.
   *
!  *  RETURNS
!  *      void
   */
  
  void
  wl_delete(wlp, wp)
!     wlist   *wlp;
!     string_t *wp;
  {
!     int     j;
!     int     k;
  
!     for (j = 0; j < wlp->wl_nwords; ++j)
!     {
! 	if (str_equal(wlp->wl_word[j], wp))
  	{
! 	    wlp->wl_nwords--;
! 	    for (k = j; k < wlp->wl_nwords; ++k)
! 		wlp->wl_word[k] = wlp->wl_word[k + 1];
! 	    str_free(wp);
! 	    break;
  	}
-     }
  }
  
  void
  wl_zero(wlp)
!     wlist   *wlp;
  {
!     wlp->wl_nwords = 0;
!     wlp->wl_word = 0;
  }
--- 164,371 ----
  
  void
  wl_copy(to, from)
! 	wlist		*to;
! 	wlist		*from;
  {
! 	int		j;
  
! 	wl_zero(to);
! 	for (j = 0; j < from->wl_nwords; j++)
! 		wl_append(to, str_copy(from->wl_word[j]));
  }
  
  
  /*
!  * NAME
   *	wl2str - form a string from a word list
   *
!  * SYNOPSIS
!  *	string_ty *wl2str(wlist *wlp, int start, int stop);
   *
!  * DESCRIPTION
   *	Wl2str is used to form a string from a word list.
   *
!  * RETURNS
   *	A pointer to the newly formed string in dynamic memory.
   *
!  * CAVEAT
   *	It is the responsibility of the caller to ensure that the
   *	new string is freed when finished with, by a call to free().
   */
  
! string_ty *
  wl2str(wl, start, stop)
! 	wlist		*wl;
! 	int		start;
! 	int		stop;
  {
! 	int		j;
! 	static char	*tmp;
! 	static size_t	tmplen;
! 	size_t		length;
! 	char		*pos;
! 	string_ty	*s;
  
! 	length = 0;
! 	for (j = start; j <= stop && j < wl->wl_nwords; j++)
  	{
! 		s = wl->wl_word[j];
! 		if (s->str_length)
! 		{
! 			if (length)
! 				++length;
! 			length += s->str_length;
! 		}
  	}
  
! 	if (!tmp)
  	{
! 		tmplen = length;
! 		if (tmplen < 16)
! 			tmplen = 16;
! 		tmp = mem_alloc(tmplen);
  	}
! 	else
! 	{
! 		if (tmplen < length)
! 		{
! 			tmplen = length;
! 			mem_change_size(&tmp, tmplen);
! 		}
! 	}
  
! 	pos = tmp;
! 	for (j = start; j <= stop && j < wl->wl_nwords; j++)
  	{
! 		s = wl->wl_word[j];
! 		if (s->str_length)
! 		{
! 			if (pos != tmp)
! 				*pos++ = ' ';
! 			memcpy(pos, s->str_text, s->str_length);
! 			pos += s->str_length;
! 		}
  	}
  
! 	s = str_n_from_c(tmp, length);
! 	return s;
  }
  
  
  /*
!  * NAME
   *	str2wl - string to word list
   *
!  * SYNOPSIS
!  *	void str2wl(wlist *wlp, string_ty *s);
   *
!  * DESCRIPTION
   *	Str2wl is used to form a word list from a string.
   *
!  * RETURNS
   *	The string is broken on spaces into words,
   *	using strndup() and wl_append().
   *
!  * CAVEAT
   *	Quoting is not understood.
   */
  
  void
  str2wl(wlp, s)
! 	wlist		*wlp;
! 	string_ty	*s;
  {
! 	char		*cp;
! 	char		*cp1;
  
! 	wl_zero(wlp);
! 	cp = s->str_text;
! 	while (*cp)
! 	{
! 		string_ty *w;
  
! 		while (*cp == ' ')
! 			cp++;
! 		if (!*cp)
! 			break;
! 		cp1 = cp;
! 		while (*cp && *cp != ' ')
! 			cp++;
! 		w = str_n_from_c(cp1, cp - cp1);
! 		wl_append(wlp, w);
! 		str_free(w);
! 	}
  }
  
  
  /*
!  * NAME
   *	wl_insert - a insert a word into a list
   *
!  * SYNOPSIS
!  *	void wl_insert(wlist *wlp, string_ty *wp);
   *
!  * DESCRIPTION
   *	Wl_insert is similar to wl_append, however it does not
   *	append the word unless it is not already in the list.
   *
!  * CAVEAT
   *	If the word is inserted it is copied.
   */
  
  void
  wl_append_unique(wlp, wp)
! 	wlist		*wlp;
! 	string_ty	*wp;
  {
! 	int		j;
  
! 	for (j = 0; j < wlp->wl_nwords; j++)
! 		if (str_equal(wlp->wl_word[j], wp))
! 			return;
! 	wl_append(wlp, wp);
  }
  
  
  /*
!  * NAME
!  *	wl_delete - remove list member
   *
!  * SYNOPSIS
!  *	void wl_delete(wlist *wlp, string_ty *wp);
   *
!  * DESCRIPTION
!  *	The wl_delete function is used to delete a member of a word list.
   *
!  * RETURNS
!  *	void
   */
  
  void
  wl_delete(wlp, wp)
! 	wlist		*wlp;
! 	string_ty	*wp;
  {
! 	int		j;
! 	int		k;
  
! 	for (j = 0; j < wlp->wl_nwords; ++j)
  	{
! 		if (str_equal(wlp->wl_word[j], wp))
! 		{
! 			wlp->wl_nwords--;
! 			for (k = j; k < wlp->wl_nwords; ++k)
! 				wlp->wl_word[k] = wlp->wl_word[k + 1];
! 			str_free(wp);
! 			break;
! 		}
  	}
  }
  
  void
  wl_zero(wlp)
! 	wlist		*wlp;
  {
! 	wlp->wl_nwords = 0;
! 	wlp->wl_word = 0;
  }
Index: common/word.h
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1991-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 29,46 ****
  typedef struct wlist wlist;
  struct	wlist
  {
!     size_t   wl_nwords;
!     string_t **wl_word;
  };
  
! int wl_member _((wlist *, string_t *));
! string_t *wl2str _((wlist *, int, int));
! void str2wl _((wlist *, string_t *));
! void wl_append _((wlist *, string_t *));
! void wl_prepend _((wlist *, string_t *));
! void wl_append_unique _((wlist *, string_t *));
  void wl_copy _((wlist *, wlist *));
! void wl_delete _((wlist *, string_t *));
  void wl_free _((wlist *));
  void wl_zero _((wlist *));
  
--- 29,46 ----
  typedef struct wlist wlist;
  struct	wlist
  {
! 	size_t		wl_nwords;
! 	string_ty	**wl_word;
  };
  
! int wl_member _((wlist *, string_ty *));
! string_ty *wl2str _((wlist *, int, int));
! void str2wl _((wlist *, string_ty *));
! void wl_append _((wlist *, string_ty *));
! void wl_prepend _((wlist *, string_ty *));
! void wl_append_unique _((wlist *, string_ty *));
  void wl_copy _((wlist *, wlist *));
! void wl_delete _((wlist *, string_ty *));
  void wl_free _((wlist *));
  void wl_zero _((wlist *));
  
Index: conf/ConvexOS-10
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1992-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 61,65 ****
--- 61,73 ----
   */
  /* #define CONF_getpgrp_arg 0 */
  #define CONF_getpgrp_arg
+  
+ /*
+  * Define this symbol to be the pathname of your shell.
+  * Leave it as a Bourne shell whenever possible.
+  * Some systems have different versions of the Bourne shell,
+  * with and without functions; choose the one *with* functions if so.
+  */
+ #define CONF_SHELL "/bin/sh"
  
  #endif /* CONF_H */
Index: conf/SunOS-4.1.2
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1992-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 60,64 ****
--- 60,72 ----
   */
  #define CONF_getpgrp_arg 0
  /* #define CONF_getpgrp_arg */
+  
+ /*
+  * Define this symbol to be the pathname of your shell.
+  * Leave it as a Bourne shell whenever possible.
+  * Some systems have different versions of the Bourne shell,
+  * with and without functions; choose the one *with* functions if so.
+  */
+ #define CONF_SHELL "/bin/sh"
  
  #endif /* CONF_H */
Index: conf/SunOS-4.1.3
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1992-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 60,64 ****
--- 60,72 ----
   */
  #define CONF_getpgrp_arg 0
  /* #define CONF_getpgrp_arg */
+  
+ /*
+  * Define this symbol to be the pathname of your shell.
+  * Leave it as a Bourne shell whenever possible.
+  * Some systems have different versions of the Bourne shell,
+  * with and without functions; choose the one *with* functions if so.
+  */
+ #define CONF_SHELL "/bin/sh"
  
  #endif /* CONF_H */
Index: conf/SysV-4.0
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1992-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 59,63 ****
--- 59,71 ----
   */
  /* #define CONF_getpgrp_arg 0 */
  #define CONF_getpgrp_arg
+  
+ /*
+  * Define this symbol to be the pathname of your shell.
+  * Leave it as a Bourne shell whenever possible.
+  * Some systems have different versions of the Bourne shell,
+  * with and without functions; choose the one *with* functions if so.
+  */
+ #define CONF_SHELL "/bin/sh"
  
  #endif /* CONF_H */
Index: conf/ULTRIX-4.2
***************
*** 0 ****
--- 1,71 ----
+ /*
+  *	cook - file construction tool
+  *	Copyright (C) 1992, 1993 Peter Miller.
+  *	All rights reserved.
+  *
+  *	This program is free software; you can redistribute it and/or modify
+  *	it under the terms of the GNU General Public License as published by
+  *	the Free Software Foundation; either version 2 of the License, or
+  *	(at your option) any later version.
+  *
+  *	This program is distributed in the hope that it will be useful,
+  *	but WITHOUT ANY WARRANTY; without even the implied warranty of
+  *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  *	GNU General Public License for more details.
+  *
+  *	You should have received a copy of the GNU General Public License
+  *	along with this program; if not, write to the Free Software
+  *	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  *
+  * MANIFEST: configuration for ULTRIX 4.2
+  */
+ 
+ #ifndef CONF_H
+ #define CONF_H
+ 
+ /*
+  * Define this symbol if your system does NOT
+  * have the ANSI C strerror system call, and
+  * does not define strerror in <string.h>.
+  *
+ #define CONF_NO_strerror
+  */
+ 
+ /*
+  * Define this symbol if your system does NOT
+  * have the POSIX tcgetpgrp system call.
+  *
+ #define CONF_NO_tcgetpgrp
+  */
+ 
+ /*
+  * Define this symbol if your system does NOT
+  * have the stdarg.h include file mandated by ANSI C.
+  */
+ #define CONF_NO_stdarg
+ 
+ /*
+  * Define one of these symbols to indicate which
+  * universe your UNIX is derived from.
+  * If you have a choice, define both.
+  */
+ #define BSD
+ #define SYSV
+ 
+ /*
+  * Define this symbol as an appropriate arguemnt to
+  * the getpgrp system call for your system.
+  * Ignore if your system does not have a getpgrp system call.
+  */
+ /* #define CONF_getpgrp_arg 0 */
+ #define CONF_getpgrp_arg
+  
+ /*
+  * Define this symbol to be the pathname of your shell.
+  * Leave it as a Bourne shell whenever possible.
+  * Some systems have different versions of the Bourne shell,
+  * with and without functions; choose the one *with* functions if so.
+  */
+ #define CONF_SHELL "/bin/sh5"
+ 
+ #endif /* CONF_H */
Index: conf/dcosx
***************
*** 0 ****
--- 1,87 ----
+ /*
+  *	cook - file construction tool
+  *	Copyright (C) 1992, 1993 Peter Miller.
+  *	All rights reserved.
+  *
+  *	This program is free software; you can redistribute it and/or modify
+  *	it under the terms of the GNU General Public License as published by
+  *	the Free Software Foundation; either version 2 of the License, or
+  *	(at your option) any later version.
+  *
+  *	This program is distributed in the hope that it will be useful,
+  *	but WITHOUT ANY WARRANTY; without even the implied warranty of
+  *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  *	GNU General Public License for more details.
+  *
+  *	You should have received a copy of the GNU General Public License
+  *	along with this program; if not, write to the Free Software
+  *	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  *
+  * MANIFEST: configuration for Pyramid SMP DC/OSx 1.0-92b023
+  */
+ 
+ #ifndef CONF_H
+ #define CONF_H
+ 
+ /*
+  * Define this symbol if your system does NOT
+  * have the ANSI C strerror system call, and
+  * does not define strerror in <string.h>.
+  *
+ #define CONF_NO_strerror
+  */
+ 
+ /*
+  * Define this symbol if your system does NOT
+  * have the POSIX tcgetpgrp system call.
+  *
+ #define CONF_NO_tcgetpgrp
+  */
+ 
+ /*
+  * Define this symbol if your system does NOT
+  * have the stdarg.h include file mandated by ANSI C.
+  */
+ #define CONF_NO_stdarg
+ 
+ /*
+  * Define one of these symbols to indicate which
+  * universe your UNIX is derived from.
+  * If you have a choice, define both.
+  */
+ /* #define BSD */
+ #define SYSV
+ 
+ /*
+  * Define this symbol as an appropriate arguemnt to
+  * the getpgrp system call for your system.
+  * Ignore if your system does not have a getpgrp system call.
+  */
+ /* #define CONF_getpgrp_arg 0 */
+ #define CONF_getpgrp_arg
+ 
+ /*
+  * On the pyramid the author used to test cook,
+  * the readdir function returned a structure that
+  * had the name starting in the wrong place.
+  * Maybe a version later than 1.0-92b023 has fixed it.
+  */
+ #define CONF_pyramid_broken_readdir
+ 
+ /*
+  * On the pyramid the author used to test cook,
+  * the ftime function returned a timezone that
+  * had the seconds included, making it 60 times too large.
+  * Maybe a version later than 1.0-92b023 has fixed it.
+  */
+ #define CONF_pyramid_broken_ftime
+  
+ /*
+  * Define this symbol to be the pathname of your shell.
+  * Leave it as a Bourne shell whenever possible.
+  * Some systems have different versions of the Bourne shell,
+  * with and without functions; choose the one *with* functions if so.
+  */
+ #define CONF_SHELL "/bin/sh"
+ 
+ #endif /* CONF_H */
Index: conf/dgux-5.4.1
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1992-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 61,65 ****
--- 61,73 ----
   */
  /* #define CONF_getpgrp_arg 0 */
  #define CONF_getpgrp_arg
+  
+ /*
+  * Define this symbol to be the pathname of your shell.
+  * Leave it as a Bourne shell whenever possible.
+  * Some systems have different versions of the Bourne shell,
+  * with and without functions; choose the one *with* functions if so.
+  */
+ #define CONF_SHELL "/bin/sh"
  
  #endif /* CONF_H */
Index: config
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1991-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 24,36 ****
   * how to build the project
   *	(actually, how to do an integration build)
   * mandatory
-  *
-  * %1 = project name
-  * %3 = change number
-  * %3 = identifying string, in the form "Dnnn"
-  *	where 'nnn' is the build number.
   */
! build_command = "cook -b %(aux/Howto.cook) project=%1 change=%2 version=%3 -nl";
  
  /*
   * When do -Integrate_Begin, link the baseline to the integration directory,
--- 24,33 ----
   * how to build the project
   *	(actually, how to do an integration build)
   * mandatory
   */
! build_command =
! 	"cook -b ${source aux/Howto.cook} project=$project \
! change=$change version=$version -nl";
  
  /*
   * When do -Integrate_Begin, link the baseline to the integration directory,
***************
*** 43,95 ****
  
  /*
   * create a new history
-  *	%1 = source file
-  *	%2 = history file
   * always executed as the project owner
   */
! history_create_command = "sc %F2 -create -i %1 -p %P2 -r";
  
  /*
   * get a file from history
-  *	%1 = history file
-  *	%2 = edit number
-  *	%3 = destination file
   * may be executed by developers
   */
! history_get_command = "sc %F1 -e '%2' -o %3 -p %P1";
  
  /*
   * add a new change to the history
-  *	%1 = source file
-  *	%2 = history file
   * always executed as the project owner
   */
! history_put_command = "sc %F2 -u -i %1 -p %P2 -r";
  
  /*
   * query the topmost edit of a history file
-  *	%1 = history file
   * Result to be printed on stdout.
   * may be executed by developers
   */
! history_query_command = "sc %F1 -l 0 -p %P1 -q";
  
  /*
   * difference of 2 files
-  *	%1 = earlier file
-  *	%2 = later file	
-  *	%3 = output file
   */
! diff_command = "fcomp -w %1 %2 -o %3";
  
  /*
   * difference of 3 files
-  *	%1 = earliest file
-  *	%2 = one competing edit
-  *	%3 = another competing edit
-  *	%4 = output file
   */
! diff3_command = "fmerge %1 %2 %3 -o %4";
  
  /*
   * whenever files are added to or removed from the change,
--- 40,83 ----
  
  /*
   * create a new history
   * always executed as the project owner
   */
! history_create_command =
! 	"fhist ${b $history} -create -i $input -p ${d $history} -r";
  
  /*
   * get a file from history
   * may be executed by developers
   */
! history_get_command =
! 	"fhist ${b $history} -e '$edit' -o $output -p ${d $history}";
  
  /*
   * add a new change to the history
   * always executed as the project owner
   */
! history_put_command =
! 	"fhist ${b $history} -u -i $input -p ${d $history} -r";
  
  /*
   * query the topmost edit of a history file
   * Result to be printed on stdout.
   * may be executed by developers
   */
! history_query_command =
! 	"fhist ${b $history} -l 0 -p ${d $history} -q";
  
  /*
   * difference of 2 files
   */
! diff_command =
! 	"fcomp -w -s $original $input -o $output";
  
  /*
   * difference of 3 files
   */
! diff3_command =
! 	"fmerge $original $mostRecent $input -o $output";
  
  /*
   * whenever files are added to or removed from the change,
***************
*** 107,119 ****
  		body ="\
  /*\n\
   *	cook - file construction tool\n\
!  *	Copyright (c) 1993 Peter Miller.\n\
   *	All rights reserved.\n\
   *\n\
   *	This program is free software; you can redistribute it and/or modify\n\
   *	it under the terms of the GNU General Public License as published by\n\
!  *	the Free Software Foundation; either version 1, or (at your option)\n\
!  *	any later version.\n\
   *\n\
   *	This program is distributed in the hope that it will be useful,\n\
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
--- 95,107 ----
  		body ="\
  /*\n\
   *	cook - file construction tool\n\
!  *	Copyright (C) ${date %Y} Peter Miller.\n\
   *	All rights reserved.\n\
   *\n\
   *	This program is free software; you can redistribute it and/or modify\n\
   *	it under the terms of the GNU General Public License as published by\n\
!  *	the Free Software Foundation; either version 2 of the License, or\n\
!  *	(at your option) any later version.\n\
   *\n\
   *	This program is distributed in the hope that it will be useful,\n\
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
***************
*** 124,130 ****
   *	along with this program; if not, write to the Free Software\n\
   *	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\
   *\n\
!  * MANIFEST: functions to ...\n\
   */\n";
  	},
  	{
--- 112,118 ----
   *	along with this program; if not, write to the Free Software\n\
   *	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\
   *\n\
!  * MANIFEST: functions to manipulate ${basename $fn .c}s\n\
   */\n";
  	},
  	{
***************
*** 132,144 ****
  		body = "\
  /*\n\
   *	cook - file construction tool\n\
!  *	Copyright (c) 1993 Peter Miller.\n\
   *	All rights reserved.\n\
   *\n\
   *	This program is free software; you can redistribute it and/or modify\n\
   *	it under the terms of the GNU General Public License as published by\n\
!  *	the Free Software Foundation; either version 1, or (at your option)\n\
!  *	any later version.\n\
   *\n\
   *	This program is distributed in the hope that it will be useful,\n\
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
--- 120,132 ----
  		body = "\
  /*\n\
   *	cook - file construction tool\n\
!  *	Copyright (C) ${date %Y} Peter Miller.\n\
   *	All rights reserved.\n\
   *\n\
   *	This program is free software; you can redistribute it and/or modify\n\
   *	it under the terms of the GNU General Public License as published by\n\
!  *	the Free Software Foundation; either version 2 of the License, or\n\
!  *	(at your option) any later version.\n\
   *\n\
   *	This program is distributed in the hope that it will be useful,\n\
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
***************
*** 149,163 ****
   *	along with this program; if not, write to the Free Software\n\
   *	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\
   *\n\
!  * MANIFEST: interface definition for file_name.c\n\
   */\n\
  \n\
! #ifndef file.name_H\n\
! #define file.name_H\n\
  \n\
  #include <main.h>\n\
  \n\
! #endif /* file.name_H */\n";
  	},
  	{
  		pattern = [ "test/*/*.sh" ];
--- 137,151 ----
   *	along with this program; if not, write to the Free Software\n\
   *	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\
   *\n\
!  * MANIFEST: interface definition for ${basename $fn .c}\n\
   */\n\
  \n\
! #ifndef ${upcase ${id $fn}}\n\
! #define ${upcase ${id $fn}}\n\
  \n\
  #include <main.h>\n\
  \n\
! #endif /* ${upcase ${id $fn}} */\n";
  	},
  	{
  		pattern = [ "test/*/*.sh" ];
***************
*** 165,177 ****
  #! /bin/sh\n\
  #\n\
  #	cook - file construction tool\n\
! #	Copyright (c) 1993 Peter Miller.\n\
  #	All rights reserved.\n\
  #\n\
  #	This program is free software; you can redistribute it and/or modify\n\
  #	it under the terms of the GNU General Public License as published by\n\
! #	the Free Software Foundation; either version 1, or (at your option)\n\
! #	any later version.\n\
  #\n\
  #	This program is distributed in the hope that it will be useful,\n\
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
--- 153,165 ----
  #! /bin/sh\n\
  #\n\
  #	cook - file construction tool\n\
! #	Copyright (C) ${date %Y} Peter Miller.\n\
  #	All rights reserved.\n\
  #\n\
  #	This program is free software; you can redistribute it and/or modify\n\
  #	it under the terms of the GNU General Public License as published by\n\
! #	the Free Software Foundation; either version 2 of the License, or\n\
! #	(at your option) any later version.\n\
  #\n\
  #	This program is distributed in the hope that it will be useful,\n\
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
***************
*** 182,202 ****
  #	along with this program; if not, write to the Free Software\n\
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\
  #\n\
- # ----------------------------------------------------------------------\n\
- #\n\
  # MANIFEST: Test the ??? functionality\n\
  #\n\
  \n\
! work=/tmp/$$\n\
  PAGER=cat\n\
  export PAGER\n\
  \n\
  fail()\n\
  {\n\
  	set +x\n\
! 	echo FAILED 1>&2\n\
! 	find $work -type d -user $USER -exec chmod u+w {} \\;\n\
! 	rm -rf $work\n\
  	exit 1\n\
  }\n\
  pass()\n\
--- 170,192 ----
  #	along with this program; if not, write to the Free Software\n\
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\
  #\n\
  # MANIFEST: Test the ??? functionality\n\
  #\n\
  \n\
! work=/tmp/$$$$\n\
  PAGER=cat\n\
  export PAGER\n\
  \n\
+ here=`pwd`\n\
+ if test $$? -ne 0 ; then exit 1; fi\n\
+ \n\
  fail()\n\
  {\n\
  	set +x\n\
! 	echo 'FAILED test of the ??? functionality' 1>&2\n\
! 	cd $$here\n\
! 	find $$work -type d -user $$USER -exec chmod u+w {} \\;\n\
! 	rm -rf $$work\n\
  	exit 1\n\
  }\n\
  pass()\n\
***************
*** 203,226 ****
  {\n\
  	set +x\n\
  	echo PASSED 1>&2\n\
! 	find $work -type d -user $USER -exec chmod u+w {} \\;\n\
! 	rm -rf $work\n\
  	exit 0\n\
  }\n\
  trap \"fail\" 1 2 3 15\n\
  \n\
! here=`pwd`\n\
! if test $? -ne 0 ; then exit 1; fi\n\
! mkdir $work\n\
! if test $? -ne 0 ; then exit 1; fi\n\
! cd $work\n\
! if test $? -ne 0 ; then fail; fi\n\
  \n\
  #\n\
  # put your test here\n\
  #\n\
! $here/myprog\n\
! if test $? -ne 0 ; then fail; fi\n\
  \n\
  #\n\
  # Only definite negatives are possible.\n\
--- 193,215 ----
  {\n\
  	set +x\n\
  	echo PASSED 1>&2\n\
! 	cd $$here\n\
! 	find $$work -type d -user $$USER -exec chmod u+w {} \\;\n\
! 	rm -rf $$work\n\
  	exit 0\n\
  }\n\
  trap \"fail\" 1 2 3 15\n\
  \n\
! mkdir $$work\n\
! if test $$? -ne 0 ; then exit 1; fi\n\
! cd $$work\n\
! if test $$? -ne 0 ; then fail; fi\n\
  \n\
  #\n\
  # put your test here\n\
  #\n\
! $$here/myprog\n\
! if test $$? -ne 0 ; then fail; fi\n\
  \n\
  #\n\
  # Only definite negatives are possible.\n\
***************
*** 235,247 ****
  #! /bin/sh\n\
  #\n\
  #	cook - file construction tool\n\
! #	Copyright (c) 1993 Peter Miller.\n\
  #	All rights reserved.\n\
  #\n\
  #	This program is free software; you can redistribute it and/or modify\n\
  #	it under the terms of the GNU General Public License as published by\n\
! #	the Free Software Foundation; either version 1, or (at your option)\n\
! #	any later version.\n\
  #\n\
  #	This program is distributed in the hope that it will be useful,\n\
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
--- 224,236 ----
  #! /bin/sh\n\
  #\n\
  #	cook - file construction tool\n\
! #	Copyright (C) ${date %Y} Peter Miller.\n\
  #	All rights reserved.\n\
  #\n\
  #	This program is free software; you can redistribute it and/or modify\n\
  #	it under the terms of the GNU General Public License as published by\n\
! #	the Free Software Foundation; either version 2 of the License, or\n\
! #	(at your option) any later version.\n\
  #\n\
  #	This program is distributed in the hope that it will be useful,\n\
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
***************
*** 252,258 ****
  #	along with this program; if not, write to the Free Software\n\
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\
  #\n\
! # MANIFEST: shell script to ...\n\
  #\n\
  \n\
  exit 0\n";
--- 241,247 ----
  #	along with this program; if not, write to the Free Software\n\
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\
  #\n\
! # MANIFEST: shell script to ${basename $fn .sh}\n\
  #\n\
  \n\
  exit 0\n";
***************
*** 262,274 ****
  		body = "\
  '\\\" t\n\
  .\\\"	cook - file construction tool\n\
! .\\\"	Copyright (c) 1993 Peter Miller.\n\
  .\\\"	All rights reserved.\n\
  .\\\"\n\
  .\\\"	This program is free software; you can redistribute it and/or modify\n\
  .\\\"	it under the terms of the GNU General Public License as published by\n\
! .\\\"	the Free Software Foundation; either version 1, or (at your option)\n\
! .\\\"	any later version.\n\
  .\\\"\n\
  .\\\"	This program is distributed in the hope that it will be useful,\n\
  .\\\"	but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
--- 251,263 ----
  		body = "\
  '\\\" t\n\
  .\\\"	cook - file construction tool\n\
! .\\\"	Copyright (C) ${date %Y} Peter Miller.\n\
  .\\\"	All rights reserved.\n\
  .\\\"\n\
  .\\\"	This program is free software; you can redistribute it and/or modify\n\
  .\\\"	it under the terms of the GNU General Public License as published by\n\
! .\\\"	the Free Software Foundation; either version 2 of the License, or\n\
! .\\\"	(at your option) any later version.\n\
  .\\\"\n\
  .\\\"	This program is distributed in the hope that it will be useful,\n\
  .\\\"	but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
***************
*** 279,307 ****
  .\\\"	along with this program; if not, write to the Free Software\n\
  .\\\"	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\
  .\\\"\n\
! .\\\" MANIFEST: manual entry for ...\n\
  .\\\"\n\
  .TH cook 1\n\
  .if n .ad l\n\
  .if n .hy 0\n\
  .SH NAME\n\
! cook \\- file construction tool\n\
  .SH SYNOPSIS\n\
! .B cook\n\
  [\n\
  .IR option \\&...\n\
  ]\n\
  .IR filename \\&...\n\
  .br\n\
! .B cook\n\
  .B -Help\n\
  .br\n\
! .B cook\n\
  .B -VERSion\n\
  .SH DESCRIPTION\n\
  The\n\
! .I cook\n\
  program is used to\n\
  .SH OPTIONS\n\
  The following options are understood:\n\
  .TP 8n\n\
--- 268,300 ----
  .\\\"	along with this program; if not, write to the Free Software\n\
  .\\\"	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\
  .\\\"\n\
! .\\\" MANIFEST: manual entry for the ${basename $fn .1} command\n\
  .\\\"\n\
  .TH cook 1\n\
+ .ds n) cook\n\
  .if n .ad l\n\
  .if n .hy 0\n\
+ .if n .nr IN 8n\n\
  .SH NAME\n\
! \\*(n) \\- file construction tool\n\
  .SH SYNOPSIS\n\
! .B \\*(n)\n\
  [\n\
  .IR option \\&...\n\
  ]\n\
  .IR filename \\&...\n\
  .br\n\
! .B \\*(n)\n\
  .B -Help\n\
  .br\n\
! .B \\*(n)\n\
  .B -VERSion\n\
  .SH DESCRIPTION\n\
  The\n\
! .I \\*(n)\n\
  program is used to\n\
+ .br\n\
+ .ne 1i\n\
  .SH OPTIONS\n\
  The following options are understood:\n\
  .TP 8n\n\
***************
*** 308,356 ****
  .B -Help\n\
  .br\n\
  Provide some help with using the\n\
! .I cook\n\
  program.\n\
  .TP 8n\n\
  .B -VERSion\n\
  .br\n\
  Print the version of the\n\
! .I cook\n\
  program being executed.\n\
  .PP\n\
  All other options will produce a diagnostic error.\n\
! Options may be abbreviated,\n\
! the minimum abbreviation is shown in upper-case.\n\
! Options are case insensitive.\n\
! Options and file names may be mixed arbitrarily on the command line.\n\
! .SH EXIT STATUS\n\
! The\n\
! .I cook\n\
! program will exit with a status of 1 on any error.\n\
! The\n\
! .I cook\n\
! program will only exit with a status of 0 if there are no errors.\n\
! .SH COPYRIGHT\n\
! .if t .ds c) \\(co\n\
! .if n .ds c) (c)\n\
! The\n\
! .I cook\n\
! program is Copyright \\*(c) 1988-1993 Peter Miller.\n\
! .br\n\
! All rights reserved.\n\
! .PP\n\
! The\n\
! .I cook\n\
! program comes with ABSOLUTELY NO WARRANTY;\n\
! for details use the '\\fIcook -VERSion Warranty\\fP' command.\n\
! This is free software\n\
! and you are welcome to redistribute it under certain conditions;\n\
! for details use the '\\fIcook -VERSion Redistribution\\fP' command.\n\
! .SH AUTHOR\n\
! .nf\n\
! .ta 8n 16n 24n\n\
! Peter Miller\tUUCP\tuunet!munnari!bmr.gov.au!pmiller\n\
! /\\/\\*\t\tCSNET\tpmiller@bmr.gov.au\n\
! .fi\n";
  	},
  	{
  		pattern = [ "*.so", "*.ms", "*.me" ];
--- 301,318 ----
  .B -Help\n\
  .br\n\
  Provide some help with using the\n\
! .I \\*(n)\n\
  program.\n\
  .TP 8n\n\
  .B -VERSion\n\
  .br\n\
  Print the version of the\n\
! .I \\*(n)\n\
  program being executed.\n\
  .PP\n\
  All other options will produce a diagnostic error.\n\
! .so o__rules.so\n\
! .so copyright.so\n";
  	},
  	{
  		pattern = [ "*.so", "*.ms", "*.me" ];
***************
*** 357,369 ****
  		body = "\
  .\\\"\n\
  .\\\"	cook - file construction tool\n\
! .\\\"	Copyright (c) 1993 Peter Miller.\n\
  .\\\"	All rights reserved.\n\
  .\\\"\n\
  .\\\"	This program is free software; you can redistribute it and/or modify\n\
  .\\\"	it under the terms of the GNU General Public License as published by\n\
! .\\\"	the Free Software Foundation; either version 1, or (at your option)\n\
! .\\\"	any later version.\n\
  .\\\"\n\
  .\\\"	This program is distributed in the hope that it will be useful,\n\
  .\\\"	but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
--- 319,331 ----
  		body = "\
  .\\\"\n\
  .\\\"	cook - file construction tool\n\
! .\\\"	Copyright (C) ${date %Y} Peter Miller.\n\
  .\\\"	All rights reserved.\n\
  .\\\"\n\
  .\\\"	This program is free software; you can redistribute it and/or modify\n\
  .\\\"	it under the terms of the GNU General Public License as published by\n\
! .\\\"	the Free Software Foundation; either version 2 of the License, or\n\
! .\\\"	(at your option) any later version.\n\
  .\\\"\n\
  .\\\"	This program is distributed in the hope that it will be useful,\n\
  .\\\"	but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
***************
*** 374,380 ****
  .\\\"	along with this program; if not, write to the Free Software\n\
  .\\\"	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\
  .\\\"\n\
! .\\\" MANIFEST: document describing...\n\
  .\\\"\n";
  	},
  	{
--- 336,342 ----
  .\\\"	along with this program; if not, write to the Free Software\n\
  .\\\"	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\
  .\\\"\n\
! .\\\" MANIFEST: document describing ${basename $fn}\n\
  .\\\"\n";
  	},
  	{
***************
*** 382,394 ****
  		body = "\
  #\n\
  #	cook - file construction tool\n\
! #	Copyright (c) 1993 Peter Miller.\n\
  #	All rights reserved.\n\
  #\n\
  #	This program is free software; you can redistribute it and/or modify\n\
  #	it under the terms of the GNU General Public License as published by\n\
! #	the Free Software Foundation; either version 1, or (at your option)\n\
! #	any later version.\n\
  #\n\
  #	This program is distributed in the hope that it will be useful,\n\
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
--- 344,356 ----
  		body = "\
  #\n\
  #	cook - file construction tool\n\
! #	Copyright (C) ${date %Y} Peter Miller.\n\
  #	All rights reserved.\n\
  #\n\
  #	This program is free software; you can redistribute it and/or modify\n\
  #	it under the terms of the GNU General Public License as published by\n\
! #	the Free Software Foundation; either version 2 of the License, or\n\
! #	(at your option) any later version.\n\
  #\n\
  #	This program is distributed in the hope that it will be useful,\n\
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
Index: cook/builtin.c
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1991-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 64,71 ****
  #include <word.h>
  
  
! typedef struct func_t func_t;
! struct func_t
  {
  	char	*f_name;
  	bifp	f_code;
--- 64,71 ----
  #include <word.h>
  
  
! typedef struct func_ty func_ty;
! struct func_ty
  {
  	char	*f_name;
  	bifp	f_code;
***************
*** 107,114 ****
  {
  	int		j;
  	int		cond;
! 	static string_t	*str_then;
! 	static string_t	*str_else;
  
  	assert(result);
  	assert(args);
--- 107,114 ----
  {
  	int		j;
  	int		cond;
! 	static string_ty	*str_then;
! 	static string_ty	*str_else;
  
  	assert(result);
  	assert(args);
***************
*** 220,226 ****
  	}
  	for (j = 1; j < args->wl_nwords; j++)
  	{
! 		string_t *s;
  
  		s = str_upcase(args->wl_word[j]);
  		wl_append(result, s);
--- 220,226 ----
  	}
  	for (j = 1; j < args->wl_nwords; j++)
  	{
! 		string_ty *s;
  
  		s = str_upcase(args->wl_word[j]);
  		wl_append(result, s);
***************
*** 274,280 ****
  	}
  	for (j = 1; j < args->wl_nwords; j++)
  	{
! 		string_t	*s;
  
  		s = str_downcase(args->wl_word[j]);
  		wl_append(result, s);
--- 274,280 ----
  	}
  	for (j = 1; j < args->wl_nwords; j++)
  	{
! 		string_ty	*s;
  
  		s = str_downcase(args->wl_word[j]);
  		wl_append(result, s);
***************
*** 329,335 ****
  	}
  	for (j = 1; j < args->wl_nwords; j++)
  	{
! 		string_t	*s;
  
  		s = os_dirname(args->wl_word[j]);
  		if (!s)
--- 329,335 ----
  	}
  	for (j = 1; j < args->wl_nwords; j++)
  	{
! 		string_ty	*s;
  
  		s = os_dirname(args->wl_word[j]);
  		if (!s)
***************
*** 386,392 ****
  	}
  	for (j = 1; j < args->wl_nwords; j++)
  	{
! 		string_t	*s;
  
  		s = os_entryname(args->wl_word[j]);
  		if (!s)
--- 386,392 ----
  	}
  	for (j = 1; j < args->wl_nwords; j++)
  	{
! 		string_ty	*s;
  
  		s = os_entryname(args->wl_word[j]);
  		if (!s)
***************
*** 443,449 ****
  	}
  	for (j = 1; j < args->wl_nwords; j++)
  	{
! 		string_t	*s;
  
  		s = os_pathname(args->wl_word[j]);
  		if (!s)
--- 443,449 ----
  	}
  	for (j = 1; j < args->wl_nwords; j++)
  	{
! 		string_ty	*s;
  
  		s = os_pathname(args->wl_word[j]);
  		if (!s)
***************
*** 511,517 ****
  		else
  		{
  			struct tm	*tm;
! 			string_t	*s;
  
  			tm = localtime(&mtime);
  			s =
--- 511,517 ----
  		else
  		{
  			struct tm	*tm;
! 			string_ty	*s;
  
  			tm = localtime(&mtime);
  			s =
***************
*** 578,584 ****
  	}
  	for (j = 3; j < args->wl_nwords; j++)
  	{
! 		string_t	*s;
  
  		s =
  			str_cat_three
--- 578,584 ----
  	}
  	for (j = 3; j < args->wl_nwords; j++)
  	{
! 		string_ty	*s;
  
  		s =
  			str_cat_three
***************
*** 843,849 ****
  {
  	wlist		wl;
  	int		j;
! 	string_t	*s;
  
  	assert(result);
  	assert(args);
--- 843,849 ----
  {
  	wlist		wl;
  	int		j;
! 	string_ty	*s;
  
  	assert(result);
  	assert(args);
***************
*** 860,866 ****
  	wl_zero(&wl);
  	for (j = 1; j < args->wl_nwords; j++)
  		wl_append(&wl, args->wl_word[j]);
! 	j = os_execute(&wl, (string_t *)0);
  	wl_free(&wl);
  	if (j < 0)
  		return -1;
--- 860,866 ----
  	wl_zero(&wl);
  	for (j = 1; j < args->wl_nwords; j++)
  		wl_append(&wl, args->wl_word[j]);
! 	j = os_execute(&wl, (string_ty *)0);
  	wl_free(&wl);
  	if (j < 0)
  		return -1;
***************
*** 902,908 ****
  	wlist		*args;
  {
  	int		j;
! 	match_t		*field;
  
  	assert(result);
  	assert(args);
--- 902,908 ----
  	wlist		*args;
  {
  	int		j;
! 	match_ty	*field;
  
  	assert(result);
  	assert(args);
***************
*** 963,969 ****
  	wlist		*args;
  {
  	int		j;
! 	match_t		*field;
  
  	assert(result);
  	assert(args);
--- 963,969 ----
  	wlist		*args;
  {
  	int		j;
! 	match_ty	*field;
  
  	assert(result);
  	assert(args);
***************
*** 1022,1028 ****
  	wlist		*args;
  {
  	int		j;
! 	match_t		*field;
  
  	assert(result);
  	assert(args);
--- 1022,1028 ----
  	wlist		*args;
  {
  	int		j;
! 	match_ty	*field;
  
  	assert(result);
  	assert(args);
***************
*** 1041,1047 ****
  		field = match(args->wl_word[1], args->wl_word[j]);
  		if (field)
  		{
! 			string_t	*s;
  
  			s = reconstruct(args->wl_word[2], field);
  			wl_append(result, s);
--- 1041,1047 ----
  		field = match(args->wl_word[1], args->wl_word[j]);
  		if (field)
  		{
! 			string_ty	*s;
  
  			s = reconstruct(args->wl_word[2], field);
  			wl_append(result, s);
***************
*** 1165,1171 ****
  	static size_t	tmplen;
  	size_t		length;
  	char		*pos;
! 	string_t	*s;
  
  	assert(result);
  	assert(args);
--- 1165,1171 ----
  	static size_t	tmplen;
  	size_t		length;
  	char		*pos;
! 	string_ty	*s;
  
  	assert(result);
  	assert(args);
***************
*** 1238,1244 ****
  	wlist		*result;
  	wlist		*args;
  {
! 	string_t	*s;
  
  	assert(result);
  	assert(args);
--- 1238,1244 ----
  	wlist		*result;
  	wlist		*args;
  {
! 	string_ty	*s;
  
  	assert(result);
  	assert(args);
***************
*** 1341,1347 ****
  	for (j = 1; j < args->wl_nwords; ++j)
  	{
  		char		*cp;
! 		string_t	*s;
  
  		cp = getenv(args->wl_word[j]->str_text);
  		if (!cp)
--- 1341,1347 ----
  	for (j = 1; j < args->wl_nwords; ++j)
  	{
  		char		*cp;
! 		string_ty	*s;
  
  		cp = getenv(args->wl_word[j]->str_text);
  		if (!cp)
***************
*** 1386,1392 ****
  	wlist		*args;
  {
  	int		j;
! 	string_t	*paths;
  	char		*cp;
  
  	assert(result);
--- 1386,1392 ----
  	wlist		*args;
  {
  	int		j;
! 	string_ty	*paths;
  	char		*cp;
  
  	assert(result);
***************
*** 1405,1412 ****
  	paths = str_from_c(cp);
  	for (j = 1; j < args->wl_nwords; ++j)
  	{
! 		string_t	*s;
! 		string_t	*s2;
  
  		s = args->wl_word[j];
  		if (strchr(s->str_text, '/'))
--- 1405,1412 ----
  	paths = str_from_c(cp);
  	for (j = 1; j < args->wl_nwords; ++j)
  	{
! 		string_ty	*s;
! 		string_ty	*s2;
  
  		s = args->wl_word[j];
  		if (strchr(s->str_text, '/'))
***************
*** 1422,1428 ****
  		}
  		else
  		{
! 			string_t	*f;
  			int		n;
  
  			for (n = 0; ; ++n)
--- 1422,1428 ----
  		}
  		else
  		{
! 			string_ty	*f;
  			int		n;
  
  			for (n = 0; ; ++n)
***************
*** 1490,1496 ****
  	wlist		*args;
  {
  	FILE		*fp;
! 	string_t	*s;
  	char		*delim;
  	int		status;
  
--- 1490,1496 ----
  	wlist		*args;
  {
  	FILE		*fp;
! 	string_ty	*s;
  	char		*delim;
  	int		status;
  
***************
*** 1604,1617 ****
  	wlist		*args;
  {
  	int		j;
! 	static string_t	*name;
! 	static string_t	*machine;
  	static struct utsname uts;
  	static char	uts_defined;
! 	static string_t	*uts_system;
! 	static string_t	*uts_node;
! 	static string_t	*uts_release;
! 	static string_t	*uts_version;
  
  	if (!uts_defined)
  	{
--- 1604,1617 ----
  	wlist		*args;
  {
  	int		j;
! 	static string_ty	*name;
! 	static string_ty	*machine;
  	static struct utsname uts;
  	static char	uts_defined;
! 	static string_ty	*uts_system;
! 	static string_ty	*uts_node;
! 	static string_ty	*uts_release;
! 	static string_ty	*uts_version;
  
  	if (!uts_defined)
  	{
***************
*** 1637,1648 ****
  		wl_append(args, name);
  	for (j = 1; j < args->wl_nwords; j++)
  	{
! 		string_t	*x;
  
  		x = args->wl_word[j];
  		if (str_equal(name, x))
  		{
! 			static string_t	*s;
  			if (!s)
  			{
  #if defined(sun) || defined(__sun__)
--- 1637,1648 ----
  		wl_append(args, name);
  	for (j = 1; j < args->wl_nwords; j++)
  	{
! 		string_ty	*x;
  
  		x = args->wl_word[j];
  		if (str_equal(name, x))
  		{
! 			static string_ty	*s;
  			if (!s)
  			{
  #if defined(sun) || defined(__sun__)
***************
*** 1658,1664 ****
  		}
  		else if (str_equal(uts_system, x))
  		{
! 			static string_t *s;
  			if (!s)
  				s = str_from_c(uts.sysname);
  			wl_append(result, s);
--- 1658,1664 ----
  		}
  		else if (str_equal(uts_system, x))
  		{
! 			static string_ty *s;
  			if (!s)
  				s = str_from_c(uts.sysname);
  			wl_append(result, s);
***************
*** 1665,1671 ****
  		}
  		else if (str_equal(uts_node, x))
  		{
! 			static string_t *s;
  			if (!s)
  				s = str_from_c(uts.nodename);
  			wl_append(result, s);
--- 1665,1671 ----
  		}
  		else if (str_equal(uts_node, x))
  		{
! 			static string_ty *s;
  			if (!s)
  				s = str_from_c(uts.nodename);
  			wl_append(result, s);
***************
*** 1672,1678 ****
  		}
  		else if (str_equal(uts_release, x))
  		{
! 			static string_t *s;
  			if (!s)
  				s = str_from_c(uts.release);
  			wl_append(result, s);
--- 1672,1678 ----
  		}
  		else if (str_equal(uts_release, x))
  		{
! 			static string_ty *s;
  			if (!s)
  				s = str_from_c(uts.release);
  			wl_append(result, s);
***************
*** 1679,1685 ****
  		}
  		else if (str_equal(uts_version, x))
  		{
! 			static string_t *s;
  			if (!s)
  				s = str_from_c(uts.version);
  			wl_append(result, s);
--- 1679,1685 ----
  		}
  		else if (str_equal(uts_version, x))
  		{
! 			static string_ty *s;
  			if (!s)
  				s = str_from_c(uts.version);
  			wl_append(result, s);
***************
*** 1686,1692 ****
  		}
  		else if (str_equal(machine, x))
  		{
! 			static string_t *s;
  			if (!s)
  				s = str_from_c(uts.machine);
  			wl_append(result, s);
--- 1686,1692 ----
  		}
  		else if (str_equal(machine, x))
  		{
! 			static string_ty *s;
  			if (!s)
  				s = str_from_c(uts.machine);
  			wl_append(result, s);
***************
*** 1714,1720 ****
  static wlist    stringset_args;
  static size_t   stringset_pos;
  static int      stringset_token;
! static string_t *stringset_token_value;
  
  
  static void stringset_lex _((void));
--- 1714,1720 ----
  static wlist    stringset_args;
  static size_t   stringset_pos;
  static int      stringset_token;
! static string_ty *stringset_token_value;
  
  
  static void stringset_lex _((void));
***************
*** 1722,1729 ****
  static void
  stringset_lex()
  {
! 	static string_t *minus;
! 	static string_t *star;
  
  	if (!minus)
  		minus = str_from_c("-");
--- 1722,1729 ----
  static void
  stringset_lex()
  {
! 	static string_ty *minus;
! 	static string_ty *star;
  
  	if (!minus)
  		minus = str_from_c("-");
***************
*** 1778,1784 ****
  		wlist		lhs;
  		wlist		rhs;
  		int		j;
! 		string_t	*s;
  
  		stringset_lex();
  		wl_zero(&rhs);
--- 1778,1784 ----
  		wlist		lhs;
  		wlist		rhs;
  		int		j;
! 		string_ty	*s;
  
  		stringset_lex();
  		wl_zero(&rhs);
***************
*** 1883,1889 ****
  	char		*cp1;
  	char		*cp2;
  	char		*cp3;
! 	string_t	*s;
  	static char	special[] = "\bb\ff\nn\rr\tt";
  
  	assert(result);
--- 1883,1889 ----
  	char		*cp1;
  	char		*cp2;
  	char		*cp3;
! 	string_ty	*s;
  	static char	special[] = "\bb\ff\nn\rr\tt";
  
  	assert(result);
***************
*** 2081,2091 ****
  	const void	*va;
  	const void	*vb;
  {
! 	string_t	*a;
! 	string_t	*b;
  
! 	a = *(string_t **)va;
! 	b = *(string_t **)vb;
  	return strcmp(a->str_text, b->str_text);
  }
  
--- 2081,2091 ----
  	const void	*va;
  	const void	*vb;
  {
! 	string_ty	*a;
! 	string_ty	*b;
  
! 	a = *(string_ty **)va;
! 	b = *(string_ty **)vb;
  	return strcmp(a->str_text, b->str_text);
  }
  
***************
*** 2133,2139 ****
   *	func - table of built-in functions
   *
   * SYNOPSIS
!  *	func_t func[];
   *
   * DESCRIPTION
   *	Func is a table of function names and pointers
--- 2133,2139 ----
   *	func - table of built-in functions
   *
   * SYNOPSIS
!  *	func_ty func[];
   *
   * DESCRIPTION
   *	Func is a table of function names and pointers
***************
*** 2140,2146 ****
   *	for the built-in functions of cook.
   */
  
! static	func_t func[] =
  {
  	{ "and",		func_and,		},
  	{ "cando",		func_cando,		},
--- 2140,2146 ----
   *	for the built-in functions of cook.
   */
  
! static	func_ty func[] =
  {
  	{ "and",		func_and,		},
  	{ "cando",		func_cando,		},
***************
*** 2200,2207 ****
  void
  builtin_initialize()
  {
! 	func_t		*fp;
! 	string_t	*s;
  
  	for (fp = func; fp < ENDOF(func); ++fp)
  	{
--- 2200,2207 ----
  void
  builtin_initialize()
  {
! 	func_ty		*fp;
! 	string_ty	*s;
  
  	for (fp = func; fp < ENDOF(func); ++fp)
  	{
Index: cook/builtin.h
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1990-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: cook/cook.c
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1990-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 117,123 ****
  
  static void
  interrupt(n)
! 	int	n;
  {
  	desist++;
  	error("interrupted by %s", signal_name(n));
--- 117,123 ----
  
  static void
  interrupt(n)
! 	int		n;
  {
  	desist++;
  	error("interrupted by %s", signal_name(n));
***************
*** 177,183 ****
  
  static char *
  cook_status_name(n)
! 	int	n;
  {
  	static char *name[] =
  	{
--- 177,183 ----
  
  static char *
  cook_status_name(n)
! 	int		n;
  {
  	static char *name[] =
  	{
***************
*** 197,203 ****
  
  #endif
  
! static int cooker _((string_t *, int, int)); /* forward */
  
  
  /*
--- 197,203 ----
  
  #endif
  
! static int cooker _((string_ty *, int, int)); /* forward */
  
  
  /*
***************
*** 225,231 ****
  cook_search_list(slp)
  	wlist		*slp;
  {
! 	string_t	*s;
  
  	/*
  	 * make sure the variable exists
--- 225,231 ----
  cook_search_list(slp)
  	wlist		*slp;
  {
! 	string_ty	*s;
  
  	/*
  	 * make sure the variable exists
***************
*** 275,281 ****
   *	cook_mtime
   *
   * SYNOPSIS
!  *	long cook_mtime(string_t *path);
   *
   * DESCRIPTION
   *	The cook_mtime function is used to scan the search path for
--- 275,281 ----
   *	cook_mtime
   *
   * SYNOPSIS
!  *	long cook_mtime(string_ty *path);
   *
   * DESCRIPTION
   *	The cook_mtime function is used to scan the search path for
***************
*** 291,301 ****
   *	The user must design rules using the [resolve] function.
   */
  
! static long cook_mtime _((string_t *path));
  
  static long
  cook_mtime(path)
! 	string_t	*path;
  {
  	long		result;
  
--- 291,301 ----
   *	The user must design rules using the [resolve] function.
   */
  
! static long cook_mtime _((string_ty *path));
  
  static long
  cook_mtime(path)
! 	string_ty	*path;
  {
  	long		result;
  
***************
*** 311,318 ****
  		cook_search_list(&sl);
  		for (j = 0; j < sl.wl_nwords; ++j)
  		{
! 			string_t	*s1;
! 			string_t	*s2;
  			long		t;
  
  			s1 = sl.wl_word[j];
--- 311,318 ----
  		cook_search_list(&sl);
  		for (j = 0; j < sl.wl_nwords; ++j)
  		{
! 			string_ty	*s1;
! 			string_ty	*s2;
  			long		t;
  
  			s1 = sl.wl_word[j];
***************
*** 341,347 ****
   *	cook_mtime_adjust
   *
   * SYNOPSIS
!  *	int cook_mtime(string_t *path);
   *
   * DESCRIPTION
   *	The cook_mtime_adjust function is used to adjust the mtime of
--- 341,347 ----
   *	cook_mtime_adjust
   *
   * SYNOPSIS
!  *	int cook_mtime(string_ty *path);
   *
   * DESCRIPTION
   *	The cook_mtime_adjust function is used to adjust the mtime of
***************
*** 357,367 ****
   *	The user must design rules using the [resolve] function.
   */
  
! static int cook_mtime_adjust _((string_t *));
  
  static int
  cook_mtime_adjust(path)
! 	string_t	*path;
  {
  	int		result;
  
--- 357,367 ----
   *	The user must design rules using the [resolve] function.
   */
  
! static int cook_mtime_adjust _((string_ty *));
  
  static int
  cook_mtime_adjust(path)
! 	string_ty	*path;
  {
  	int		result;
  
***************
*** 417,423 ****
  	result = 0;
  	for (j = 1; j < input->wl_nwords; ++j)
  	{
! 		string_t	*arg;
  
  		arg = input->wl_word[j];
  		if (arg->str_text[0] == '/')
--- 417,423 ----
  	result = 0;
  	for (j = 1; j < input->wl_nwords; ++j)
  	{
! 		string_ty	*arg;
  
  		arg = input->wl_word[j];
  		if (arg->str_text[0] == '/')
***************
*** 430,437 ****
  			done = 0;
  			for (k = 0; k < sl.wl_nwords; ++k)
  			{
! 				string_t	*s1;
! 				string_t	*s2;
  				long		t;
  	
  				s1 = sl.wl_word[k];
--- 430,437 ----
  			done = 0;
  			for (k = 0; k < sl.wl_nwords; ++k)
  			{
! 				string_ty	*s1;
! 				string_ty	*s2;
  				long		t;
  	
  				s1 = sl.wl_word[k];
***************
*** 473,480 ****
   *	chef - the bit that does the cooking
   *
   * SYNOPSIS
!  *	int chef(string_t *target, int dkwinge, recipe *rp,
!  *		time_t age, int forced, int build);
   *
   * DESCRIPTION
   *	The chef function is used to evaluate a recipe.
--- 473,480 ----
   *	chef - the bit that does the cooking
   *
   * SYNOPSIS
!  *	int chef(string_ty *target, int dkwinge, recipe *rp,
!  *		time_ty age, int forced, int build);
   *
   * DESCRIPTION
   *	The chef function is used to evaluate a recipe.
***************
*** 488,512 ****
   *	The recipe flags apply to expression evaluations for ingredients, too.
   */
  
! static int chef _((string_t *, int, recipe *, time_t, int, int));
  
  static int
  chef(target, dkwinge, rp, age, forced, build)
! 	string_t *target;
! 	int	dkwinge;
! 	recipe	*rp;
! 	time_t	age;
! 	int	forced;
! 	int	build;
  {
! 	int	j;
! 	int	k;
! 	int	best;
! 	char	*recipe_type_name;
! 	wlist 	friends;
! 	wlist	need;
! 	wlist	younger;
! 	match_t *field;
  
  	trace(("chef(target = %08lX, dkwinge = %d, rp = %08lX, age = %ld, forced = %d, build = %d)\n{\n"/*}*/, target, dkwinge, rp, age, forced, build));
  	trace_string(target->str_text);
--- 488,512 ----
   *	The recipe flags apply to expression evaluations for ingredients, too.
   */
  
! static int chef _((string_ty *, int, recipe *, time_t, int, int));
  
  static int
  chef(target, dkwinge, rp, age, forced, build)
! 	string_ty	*target;
! 	int		dkwinge;
! 	recipe		*rp;
! 	time_t		age;
! 	int		forced;
! 	int		build;
  {
! 	int		j;
! 	int		k;
! 	int		best;
! 	char		*recipe_type_name;
! 	wlist 		friends;
! 	wlist		need;
! 	wlist		younger;
! 	match_ty	*field;
  
  	trace(("chef(target = %08lX, dkwinge = %d, rp = %08lX, age = %ld, forced = %d, build = %d)\n{\n"/*}*/, target, dkwinge, rp, age, forced, build));
  	trace_string(target->str_text);
***************
*** 570,576 ****
  		}
  		for (k = 0; k < wl.wl_nwords; ++k)
  		{
! 			string_t *target2;
  			int	best2;
  	
  			target2 = wl.wl_word[k];
--- 570,576 ----
  		}
  		for (k = 0; k < wl.wl_nwords; ++k)
  		{
! 			string_ty *target2;
  			int	best2;
  	
  			target2 = wl.wl_word[k];
***************
*** 653,659 ****
  		}
  		for (k = 0; k < wl.wl_nwords; ++k)
  		{
! 			string_t *target2;
  			int	best2;
  	
  			target2 = wl.wl_word[k];
--- 653,659 ----
  		}
  		for (k = 0; k < wl.wl_nwords; ++k)
  		{
! 			string_ty *target2;
  			int	best2;
  	
  			target2 = wl.wl_word[k];
***************
*** 866,872 ****
   *	cook - cook a target
   *
   * SYNOPSIS
!  *	int cooker(string_t *target, int dkwinge, int build);
   *
   * DESCRIPTION
   *	The cooker function is used to find and perform the actions required
--- 866,872 ----
   *	cook - cook a target
   *
   * SYNOPSIS
!  *	int cooker(string_ty *target, int dkwinge, int build);
   *
   * DESCRIPTION
   *	The cooker function is used to find and perform the actions required
***************
*** 882,904 ****
   *	COOK_DONTKNOW	don't know how to cook the given target
   */
  
! static int cooker _((string_t *, int, int));
  
  static int
  cooker(target, dkwinge, build)
! 	string_t *target;	/* file which we want to cook */
! 	int	dkwinge;	/* complain if don't know how to */
! 	int	build;		/* build if true, EWOULDBUILD if false */
  {
! 	time_t	age;		/* age of the target file */
! 	int	j;		/* looping temporary */
! 	int	best;		/* return status */
! 	int	best2;
! 	int	outofdate;
! 	int	used_explicit_recipe;
! 	int	used_ingredients_recipe;
! 	int	used_implicit_recipe;
! 	wlist	target_list;
  
  	trace(("cooker(target = %08lX, dkwinge = %d, build = %d)\n{\n"/*}*/, target, dkwinge, build));
  	trace_string(target->str_text);
--- 882,904 ----
   *	COOK_DONTKNOW	don't know how to cook the given target
   */
  
! static int cooker _((string_ty *, int, int));
  
  static int
  cooker(target, dkwinge, build)
! 	string_ty	*target;	/* file which we want to cook */
! 	int		dkwinge;	/* complain if don't know how to */
! 	int		build;		/* build if true, EWOULDBUILD if not */
  {
! 	time_t		age;		/* age of the target file */
! 	int		j;		/* looping temporary */
! 	int		best;		/* return status */
! 	int		best2;
! 	int		outofdate;
! 	int		used_explicit_recipe;
! 	int		used_ingredients_recipe;
! 	int		used_implicit_recipe;
! 	wlist		target_list;
  
  	trace(("cooker(target = %08lX, dkwinge = %d, build = %d)\n{\n"/*}*/, target, dkwinge, build));
  	trace_string(target->str_text);
***************
*** 974,980 ****
  			best2 = COOK_BACKTRACK;
  		else
  		{
! 			match_push((match_t*)0);
  			best2 = chef(target, dkwinge, &explicit.rl_recipe[j], age, outofdate, build);
  			match_pop();
  		}
--- 974,980 ----
  			best2 = COOK_BACKTRACK;
  		else
  		{
! 			match_push((match_ty *)0);
  			best2 = chef(target, dkwinge, &explicit.rl_recipe[j], age, outofdate, build);
  			match_pop();
  		}
***************
*** 1015,1021 ****
  			best2 = COOK_BACKTRACK;
  		else
  		{
! 			match_push((match_t*)0);
  			best2 = chef(target, dkwinge, &explicit.rl_recipe[j], age, outofdate, build);
  			match_pop();
  		}
--- 1015,1021 ----
  			best2 = COOK_BACKTRACK;
  		else
  		{
! 			match_push((match_ty *)0);
  			best2 = chef(target, dkwinge, &explicit.rl_recipe[j], age, outofdate, build);
  			match_pop();
  		}
***************
*** 1045,1051 ****
  	 */
  	for (j = 0; j < implicit.rl_nrecipes; j++)
  	{
! 		match_t *mbuf;
  
  		if (desist)
  		{
--- 1045,1051 ----
  	 */
  	for (j = 0; j < implicit.rl_nrecipes; j++)
  	{
! 		match_ty *mbuf;
  
  		if (desist)
  		{
***************
*** 1141,1148 ****
  
  void
  rl_append(rlp, rp)
! 	rlist	*rlp;
! 	recipe	*rp;
  {
  	trace(("rl_append(rlp = %08lX, rp = %08lX)\n{\n"/*}*/, rlp, rp));
  	assert(rlp);
--- 1141,1148 ----
  
  void
  rl_append(rlp, rp)
! 	rlist		*rlp;
! 	recipe		*rp;
  {
  	trace(("rl_append(rlp = %08lX, rp = %08lX)\n{\n"/*}*/, rlp, rp));
  	assert(rlp);
***************
*** 1159,1165 ****
   *	cook_flags - set them
   *
   * SYNOPSIS
!  *	void cook_flags(int mask, option_levelk_t level);
   *
   * DESCRIPTION
   *	The cook_flags function is used to take a flags variable and set the
--- 1159,1165 ----
   *	cook_flags - set them
   *
   * SYNOPSIS
!  *	void cook_flags(int mask, option_levelk_ty level);
   *
   * DESCRIPTION
   *	The cook_flags function is used to take a flags variable and set the
***************
*** 1174,1181 ****
  
  void
  cook_flags(mask, level)
! 	int	mask;
! 	int	level;
  {
  	trace(("cook_flags(mask = 0x%04X, level = %d)\n{\n"/*}*/, mask, level));
  	if (mask & RF_ERROK)
--- 1174,1181 ----
  
  void
  cook_flags(mask, level)
! 	int		mask;
! 	int		level;
  {
  	trace(("cook_flags(mask = 0x%04X, level = %d)\n{\n"/*}*/, mask, level));
  	if (mask & RF_ERROK)
***************
*** 1227,1236 ****
  
  int
  cook(wlp)
! 	wlist	*wlp;
  {
! 	int	retval;
! 	int	j;
  
  	/*
  	 * set interrupts to catch
--- 1227,1236 ----
  
  int
  cook(wlp)
! 	wlist		*wlp;
  {
! 	int		retval;
! 	int		j;
  
  	/*
  	 * set interrupts to catch
***************
*** 1277,1283 ****
   *	isit_uptodate - test construct files
   *
   * SYNOPSIS
!  *	int isit_uptodate(string_t *target);
   *
   * DESCRIPTION
   *	The isit_uptodate function is used test if the giben target
--- 1277,1283 ----
   *	isit_uptodate - test construct files
   *
   * SYNOPSIS
!  *	int isit_uptodate(string_ty *target);
   *
   * DESCRIPTION
   *	The isit_uptodate function is used test if the giben target
***************
*** 1296,1304 ****
  
  int
  isit_uptodate(target)
! 	string_t *target;
  {
! 	int	retval;
  
  	/*
  	 * set interrupts to catch
--- 1296,1304 ----
  
  int
  isit_uptodate(target)
! 	string_ty	*target;
  {
! 	int		retval;
  
  	/*
  	 * set interrupts to catch
***************
*** 1344,1350 ****
   *	cando - test construct files
   *
   * SYNOPSIS
!  *	int cando(string_t *target);
   *
   * DESCRIPTION
   *	The cando function is used to test if the given target is cookable.
--- 1344,1350 ----
   *	cando - test construct files
   *
   * SYNOPSIS
!  *	int cando(string_ty *target);
   *
   * DESCRIPTION
   *	The cando function is used to test if the given target is cookable.
***************
*** 1362,1370 ****
  
  int
  cando(target)
! 	string_t *target;
  {
! 	int	retval;
  
  	/*
  	 * set interrupts to catch
--- 1362,1370 ----
  
  int
  cando(target)
! 	string_ty	*target;
  {
! 	int		retval;
  
  	/*
  	 * set interrupts to catch
Index: cook/cook.h
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1990-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 33,54 ****
  typedef struct recipe recipe;
  struct	recipe
  {
!     wlist   r_target;
!     elist   r_need;
!     elist   r_need2;
!     int	    r_flags;
!     stmt    *r_action;
!     stmt    *r_use_action;
!     int	    r_tag;	/* for tracing and debugging */
!     expr    *r_precondition;
!     int	r_multiple;
  };
  
  typedef struct rlist rlist;
  struct	rlist
  {
!     size_t  rl_nrecipes;
!     recipe  *rl_recipe;
  };
  
  extern	rlist	explicit;
--- 33,54 ----
  typedef struct recipe recipe;
  struct	recipe
  {
! 	wlist		r_target;
! 	elist		r_need;
! 	elist		r_need2;
! 	int		r_flags;
! 	stmt		*r_action;
! 	stmt		*r_use_action;
! 	int		r_tag;		/* for tracing and debugging */
! 	expr		*r_precondition;
! 	int		r_multiple;
  };
  
  typedef struct rlist rlist;
  struct	rlist
  {
! 	size_t		rl_nrecipes;
! 	recipe		*rl_recipe;
  };
  
  extern	rlist	explicit;
***************
*** 86,93 ****
  void rl_append _((rlist *, recipe *));
  void cook_flags _((int, int));
  int recipe_tag _((void));
! int isit_uptodate _((string_t *));
! int cando _((string_t *));
  int cook_mtime_resolve _((wlist *, wlist *));
  
  #endif /* COOK_H */
--- 86,93 ----
  void rl_append _((rlist *, recipe *));
  void cook_flags _((int, int));
  int recipe_tag _((void));
! int isit_uptodate _((string_ty *));
! int cando _((string_ty *));
  int cook_mtime_resolve _((wlist *, wlist *));
  
  #endif /* COOK_H */
Index: cook/env.c
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1990-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 30,187 ****
  #include <error.h>
  
  
! extern char     **environ;
! static size_t   nenvirons;
  
  
  /*
!  *  NAME
!  *      env_initialize - start up environment
   *
!  *  SYNOPSIS
!  *      void env_initialize(void);
   *
!  *  DESCRIPTION
!  *      The env_initialize function is used to copy all of the environment
!  *      variables into dynamic memory, so that they may be altered by the
!  *      setenv and unsetenv commands.
!  *
!  *  RETURNS
!  *      void
   */
  
  void
  env_initialize()
  {
!     int     j;
!     char    **old;
  
!     nenvirons = 0;
!     for (j = 0; environ[j]; ++j)
! 	++nenvirons;
!     old = environ;
!     environ = (char **)mem_alloc((nenvirons + 1) * sizeof(char *));
!     for (j = 0; j < nenvirons; ++j)
!     {
! 	char    *cp;
! 	char    *was;
  
! 	was = old[j];
! 	cp = mem_alloc(strlen(was) + 1);
! 	strcpy(cp, was);
! 	environ[j] = cp;
!     }
!     environ[nenvirons] = 0;
!     setenv("SHELL", "/bin/sh");
  }
  
  
  /*
!  *  NAME
!  *      setenv - set environment variable
   *
!  *  SYNOPSIS
!  *      void setenv(char *name, char *value);
   *
!  *  DESCRIPTION
!  *      The setenv function is used to set the given environment variable to
!  *      the given value.
   *
!  *  RETURNS
!  *      void
!  *
!  *  CAVEAT
!  *      Assumes that the env_initialize function has already been called.
   */
  
  void
! setenv(name, value)
!     char    *name;
!     char    *value;
  {
!     size_t  name_len;
!     int     j;
!     char    *cp;
  
!     cp = 0;
!     name_len = strlen(name);
!     for (j = 0; j < nenvirons; ++j)
!     {
! 	cp = environ[j];
! 	assert(cp);
! 	if
! 	(
! 	    (cp[name_len] == '=' || !cp[name_len])
! 	&&
! 	    !strncmp(cp, name, name_len)
! 	)
! 	    break;
!     }
!     if (environ[j])
!     {
! 	environ[j] = 0;
! 	if (cp)
! 		free(cp);
!     }
!     else
!     {
! 	mem_change_size((char **)&environ, (nenvirons + 2) * sizeof(char *));
! 	environ[++nenvirons] = 0;
!     }
!     cp = (char *)mem_alloc(name_len + strlen(value) + 2);
!     strcpy(cp, name);
!     cp[name_len] = '=';
!     strcpy(cp + name_len + 1, value);
!     environ[j] = cp;
  }
  
  
  /*
!  *  NAME
!  *      unsetenv - remove environment variable
   *
!  *  SYNOPSIS
!  *      void unsetenv(char *name);
   *
!  *  DESCRIPTION
!  *      The unsetenv function is used to remove the named variable from the
!  *      environment.
   *
!  *  RETURNS
!  *      void
   *
!  *  CAVEAT
!  *      Assumes that the env_initialize function has been called already.
   */
  
  void
! unsetenv(name)
!     char    *name;
  {
!     size_t  name_len;
!     int     j;
!     char    *cp;
  
!     name_len = strlen(name);
!     cp = 0;
!     for (j = 0; j < nenvirons; ++j)
!     {
! 	cp = environ[j];
! 	assert(cp);
! 	if
! 	(
! 	    (cp[name_len] == '=' || !cp[name_len])
! 	&&
! 	    !strncmp(cp, name, name_len)
! 	)
! 	    break;
!     }
!     if (!environ[j])
! 	return;
!     environ[j] = 0;
!     if (cp)
!     	free(cp);
!     --nenvirons;
!     for ( ; j < nenvirons; ++j)
! 	environ[j] = environ[j + 1];
  }
--- 30,185 ----
  #include <error.h>
  
  
! extern	char	**environ;
! static	size_t	nenvirons;
  
  
  /*
!  * NAME
!  *	env_initialize - start up environment
   *
!  * SYNOPSIS
!  *	void env_initialize(void);
   *
!  * DESCRIPTION
!  *	The env_initialize function is used to copy all of the environment
!  *	variables into dynamic memory, so that they may be altered by the
!  *	setenv and unsetenv commands.
   */
  
  void
  env_initialize()
  {
! 	int		j;
! 	char	**old;
  
! 	nenvirons = 0;
! 	for (j = 0; environ[j]; ++j)
! 		++nenvirons;
! 	old = environ;
! 	environ = (char **)mem_alloc((nenvirons + 1) * sizeof(char *));
! 	for (j = 0; j < nenvirons; ++j)
! 	{
! 		char	*cp;
! 		char	*was;
  
! 		was = old[j];
! 		cp = mem_alloc(strlen(was) + 1);
! 		strcpy(cp, was);
! 		environ[j] = cp;
! 	}
! 	environ[nenvirons] = 0;
! 	env_set("SHELL", "/bin/sh");
  }
  
  
  /*
!  * NAME
!  *	setenv - set environment variable
   *
!  * SYNOPSIS
!  *	void setenv(char *name, char *value);
   *
!  * DESCRIPTION
!  *	The setenv function is used to set the given environment variable to
!  *	the given value.
   *
!  * CAVEAT
!  *	Assumes that the env_initialize function has already been called.
   */
  
  void
! env_set(name, value)
! 	char		*name;
! 	char		*value;
  {
! 	size_t		name_len;
! 	int		j;
! 	char		*cp;
  
! 	cp = 0;
! 	name_len = strlen(name);
! 	for (j = 0; j < nenvirons; ++j)
! 	{
! 		cp = environ[j];
! 		assert(cp);
! 		if
! 		(
! 			(cp[name_len] == '=' || !cp[name_len])
! 		&&
! 			!strncmp(cp, name, name_len)
! 		)
! 			break;
! 	}
! 	if (environ[j])
! 	{
! 		environ[j] = 0;
! 		if (cp)
! 			free(cp);
! 	}
! 	else
! 	{
! 		mem_change_size
! 		(
! 			(char **)&environ,
! 			(nenvirons + 2) * sizeof(char *)
! 		);
! 		environ[++nenvirons] = 0;
! 	}
! 	cp = (char *)mem_alloc(name_len + strlen(value) + 2);
! 	strcpy(cp, name);
! 	cp[name_len] = '=';
! 	strcpy(cp + name_len + 1, value);
! 	environ[j] = cp;
  }
  
  
  /*
!  * NAME
!  *	unsetenv - remove environment variable
   *
!  * SYNOPSIS
!  *	void unsetenv(char *name);
   *
!  * DESCRIPTION
!  *	The unsetenv function is used to remove the named variable from the
!  *	environment.
   *
!  * RETURNS
!  *	void
   *
!  * CAVEAT
!  *	Assumes that the env_initialize function has been called already.
   */
  
  void
! env_unset(name)
! 	char		*name;
  {
! 	size_t		name_len;
! 	int		j;
! 	char		*cp;
  
! 	name_len = strlen(name);
! 	cp = 0;
! 	for (j = 0; j < nenvirons; ++j)
! 	{
! 		cp = environ[j];
! 		assert(cp);
! 		if
! 		(
! 			(cp[name_len] == '=' || !cp[name_len])
! 		&&
! 			!strncmp(cp, name, name_len)
! 		)
! 			break;
! 	}
! 	if (!environ[j])
! 		return;
! 	environ[j] = 0;
! 	if (cp)
! 		free(cp);
! 	--nenvirons;
! 	for ( ; j < nenvirons; ++j)
! 		environ[j] = environ[j + 1];
  }
Index: cook/env.h
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1990-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 26,32 ****
  #include <main.h>
  
  void env_initialize _((void));
! void setenv _((char *name, char *value));
! void unsetenv _((char *name));
  
  #endif /* ENV_H */
--- 26,32 ----
  #include <main.h>
  
  void env_initialize _((void));
! void env_set _((char *name, char *value));
! void env_unset _((char *name));
  
  #endif /* ENV_H */
Index: cook/expr.c
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1990-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 37,72 ****
  #include <mem.h>
  #include <option.h>
  #include <stmt.h>
  #include <trace.h>
  #include <word.h>
  
- #ifdef CONF_NO_stdarg
- #include <varargs.h>
- #else
- #include <stdarg.h>
- #endif
  
- 
  static  position     *expr_context;
  
  
  /*
!  *  NAME
   *	expr_alloc - allocate a pointer structure
   *
!  *  SYNOPSIS
   *	expr *expr_alloc(void);
   *
!  *  DESCRIPTION
   *	The expr_alloc function is used to allocate an expression node
!  *      structure in dynamic memory.  It will initially be filled with zeros.
   *	The e_op field is defined as being non-zero to allow detection
   *	of some classes of missuse of the expression nodes.
   *
!  *  RETURNS
   *	A pointer to a "expr" in dynamic memory.
   *
!  *  CAVEAT
   *	The expression node is allocated in dynamic memory,
   *	it is the callers responsibility to ensure that it is freed
   *	when it is finished with, by a call to expr_free().
--- 37,67 ----
  #include <mem.h>
  #include <option.h>
  #include <stmt.h>
+ #include <s-v-arg.h>
  #include <trace.h>
  #include <word.h>
  
  
  static  position     *expr_context;
  
  
  /*
!  * NAME
   *	expr_alloc - allocate a pointer structure
   *
!  * SYNOPSIS
   *	expr *expr_alloc(void);
   *
!  * DESCRIPTION
   *	The expr_alloc function is used to allocate an expression node
!  *	structure in dynamic memory.  It will initially be filled with zeros.
   *	The e_op field is defined as being non-zero to allow detection
   *	of some classes of missuse of the expression nodes.
   *
!  * RETURNS
   *	A pointer to a "expr" in dynamic memory.
   *
!  * CAVEAT
   *	The expression node is allocated in dynamic memory,
   *	it is the callers responsibility to ensure that it is freed
   *	when it is finished with, by a call to expr_free().
***************
*** 75,135 ****
  expr *
  expr_alloc()
  {
!     expr    *ep;
  
!     trace(("expr_alloc()\n{\n"/*}*/));
!     ep = (expr *)mem_alloc_clear(sizeof(expr));
!     ep->e_references = 1;
!     ep->e_position.pos_name = str_copy(lex_cur_file());
!     ep->e_position.pos_line = lex_cur_line();
!     trace(("return %08lX;\n", ep));
!     trace((/*{*/"}\n"));
!     return ep;
  }
  
  
  /*
!  *  NAME
!  *      expr_copy - copy and expression
   *
!  *  SYNOPSIS
!  *      expr *expr_copy(expr *);
   *
!  *  DESCRIPTION
!  *      The expr_copy function is used to make a copy of an expression tree.
   *
!  *  RETURNS
!  *      The expr_copy function returns a pointer to the root of the copied
!  *      expression tree.
   *
!  *  CAVEAT
!  *      The result is in dynamic memory, used expr_free to dispose of it when
!  *      finished with.
   */
  
  expr *
  expr_copy(ep)
!     expr    *ep;
  {
!     trace(("expr_copy(ep = %08X)\n{\n"/*}*/, ep));
!     ep->e_references++;
!     trace(("return %08lX;\n", ep));
!     trace((/*{*/"}\n"));
!     return ep;
  }
  
  
  /*
!  *  NAME
   *	expr_free - free expression tree
   *
!  *  SYNOPSIS
   *	void expr_free(expr *ep);
   *
!  *  DESCRIPTION
   *	The expr_free function is used to free expression trees.
   *
!  *  CAVEAT
   *	It is assumed that the expression trees are all
   *	dynamically allocated.  Use expr_alloc() to allocate them.
   */
--- 70,130 ----
  expr *
  expr_alloc()
  {
! 	expr	*ep;
  
! 	trace(("expr_alloc()\n{\n"/*}*/));
! 	ep = (expr *)mem_alloc_clear(sizeof(expr));
! 	ep->e_references = 1;
! 	ep->e_position.pos_name = str_copy(lex_cur_file());
! 	ep->e_position.pos_line = lex_cur_line();
! 	trace(("return %08lX;\n", ep));
! 	trace((/*{*/"}\n"));
! 	return ep;
  }
  
  
  /*
!  * NAME
!  *	expr_copy - copy and expression
   *
!  * SYNOPSIS
!  *	expr *expr_copy(expr *);
   *
!  * DESCRIPTION
!  *	The expr_copy function is used to make a copy of an expression tree.
   *
!  * RETURNS
!  *	The expr_copy function returns a pointer to the root of the copied
!  *	expression tree.
   *
!  * CAVEAT
!  *	The result is in dynamic memory, used expr_free to dispose of it when
!  *	finished with.
   */
  
  expr *
  expr_copy(ep)
! 	expr	*ep;
  {
! 	trace(("expr_copy(ep = %08X)\n{\n"/*}*/, ep));
! 	ep->e_references++;
! 	trace(("return %08lX;\n", ep));
! 	trace((/*{*/"}\n"));
! 	return ep;
  }
  
  
  /*
!  * NAME
   *	expr_free - free expression tree
   *
!  * SYNOPSIS
   *	void expr_free(expr *ep);
   *
!  * DESCRIPTION
   *	The expr_free function is used to free expression trees.
   *
!  * CAVEAT
   *	It is assumed that the expression trees are all
   *	dynamically allocated.  Use expr_alloc() to allocate them.
   */
***************
*** 136,185 ****
  
  void
  expr_free(ep)
!     expr *   ep;
  {
!     trace(("expr_free(ep = %08X)\n{\n"/*}*/, ep));
!     assert(ep);
!     ep->e_references--;
!     if (ep->e_references > 0)
! 	goto ret;
!     str_free(ep->e_position.pos_name);
!     switch ((int)ep->e_op)
!     {
!     default:
! 	fatal("illegal expression opcode %d (bug)", ep->e_op);
  
!     case OP_CAT:
! 	expr_free(ep->e_left);
! 	expr_free(ep->e_right);
! 	break;
  
!     case OP_FUNC:
! 	el_free(&ep->e_list);
! 	break;
  
!     case OP_WORD:
! 	str_free(ep->e_word);
! 	break;
!     }
!     mem_free((char *)ep);
  ret:
!     trace((/*{*/"}\n"));
  }
  
  
  /*
!  *  NAME
   *	el_free - free expression lists
   *
!  *  SYNOPSIS
   *	void el_free(elist *elp);
   *
!  *  DESCRIPTION
   *	The el_free function is used to free expression lists,
   *	it calls expr_free for each expression in the list.
   *
!  *  CAVEAT
   *	It is assumed that the expressions are dynamically allocated,
   *	and that the expression list was grown using el_append().
   *	The actual structure pointed to is NOT assumed to be in dynamic memory
--- 131,180 ----
  
  void
  expr_free(ep)
! 	expr	*ep;
  {
! 	trace(("expr_free(ep = %08X)\n{\n"/*}*/, ep));
! 	assert(ep);
! 	ep->e_references--;
! 	if (ep->e_references > 0)
! 		goto ret;
! 	str_free(ep->e_position.pos_name);
! 	switch ((int)ep->e_op)
! 	{
! 	default:
! 		fatal("illegal expression opcode %d (bug)", ep->e_op);
  
! 	case OP_CAT:
! 		expr_free(ep->e_left);
! 		expr_free(ep->e_right);
! 		break;
  
! 	case OP_FUNC:
! 		el_free(&ep->e_list);
! 		break;
  
! 	case OP_WORD:
! 		str_free(ep->e_word);
! 		break;
! 	}
! 	mem_free((char *)ep);
  ret:
! 	trace((/*{*/"}\n"));
  }
  
  
  /*
!  * NAME
   *	el_free - free expression lists
   *
!  * SYNOPSIS
   *	void el_free(elist *elp);
   *
!  * DESCRIPTION
   *	The el_free function is used to free expression lists,
   *	it calls expr_free for each expression in the list.
   *
!  * CAVEAT
   *	It is assumed that the expressions are dynamically allocated,
   *	and that the expression list was grown using el_append().
   *	The actual structure pointed to is NOT assumed to be in dynamic memory
***************
*** 188,261 ****
  
  void
  el_free(elp)
!     elist   *elp;
  {
!     int	    j;
  
!     trace(("el_free(elp = %08X)\n{\n"/*}*/, elp));
!     for (j = 0; j < elp->el_nexprs; j++)
! 	expr_free(elp->el_expr[j]);
!     if (elp->el_nexprs)
!         mem_free((char *)elp->el_expr);
!     elp->el_nexprs = 0;
!     elp->el_expr = 0;
!     trace((/*{*/"}\n"));
  }
  
  
  /*
!  *  NAME
!  *      el_copy - copy expression list
   *
!  *  SYNOPSIS
!  *      void el_copy(elist *to, elist *from);
   *
!  *  DESCRIPTION
!  *      The el_copy function is used to copy the list of expression trees
!  *      pointed to by `from' into the expression list pointed to by `to'.
   *
!  *  RETURNS
!  *      void
   *
!  *  CAVEAT
!  *      The el_free function must be used to dispose of the list when
!  *      finished with.
   */
  
  void
  el_copy(to, from)
!     elist   *to;
!     elist   *from;
  {
!     int     j;
  
!     trace(("el_copy(to = %08X, from = %08X)\n{\n"/*}*/, to, from));
!     el_zero(to);
!     if (!from->el_nexprs)
! 	return;
!     for (j = 0; j < from->el_nexprs; j++)
! 	el_append(to, from->el_expr[j]);
!     trace((/*{*/"}\n"));
  }
  
  
  /*
!  *  NAME
   *	expr_eval - evaluate an expression
   *
!  *  SYNOPSIS
   *	int expr_eval(wlist *result, expr *ep);
   *
!  *  DESCRIPTION
   *	The expr_eval function is used to evaluate an expression.
   *
!  *  RETURNS
   *	The results of the expression evaluation are appended to
   *	the word list pointed to by 'results' argument using wl_append.
   *
!  *      The functiuon result is -1 for evaluation errors, 0 for no error.
   *
!  *  CAVEAT
   *	It is assumed that the results wordlist has been initialised
   *	before it was passed to expr_eval().
   *
--- 183,256 ----
  
  void
  el_free(elp)
! 	elist	*elp;
  {
! 	int	j;
  
! 	trace(("el_free(elp = %08X)\n{\n"/*}*/, elp));
! 	for (j = 0; j < elp->el_nexprs; j++)
! 		expr_free(elp->el_expr[j]);
! 	if (elp->el_nexprs)
! 		mem_free((char *)elp->el_expr);
! 	elp->el_nexprs = 0;
! 	elp->el_expr = 0;
! 	trace((/*{*/"}\n"));
  }
  
  
  /*
!  * NAME
!  *	el_copy - copy expression list
   *
!  * SYNOPSIS
!  *	void el_copy(elist *to, elist *from);
   *
!  * DESCRIPTION
!  *	The el_copy function is used to copy the list of expression trees
!  *	pointed to by `from' into the expression list pointed to by `to'.
   *
!  * RETURNS
!  *	void
   *
!  * CAVEAT
!  *	The el_free function must be used to dispose of the list when
!  *	finished with.
   */
  
  void
  el_copy(to, from)
! 	elist	*to;
! 	elist	*from;
  {
! 	int	j;
  
! 	trace(("el_copy(to = %08X, from = %08X)\n{\n"/*}*/, to, from));
! 	el_zero(to);
! 	if (!from->el_nexprs)
! 		return;
! 	for (j = 0; j < from->el_nexprs; j++)
! 		el_append(to, from->el_expr[j]);
! 	trace((/*{*/"}\n"));
  }
  
  
  /*
!  * NAME
   *	expr_eval - evaluate an expression
   *
!  * SYNOPSIS
   *	int expr_eval(wlist *result, expr *ep);
   *
!  * DESCRIPTION
   *	The expr_eval function is used to evaluate an expression.
   *
!  * RETURNS
   *	The results of the expression evaluation are appended to
   *	the word list pointed to by 'results' argument using wl_append.
   *
!  *	The functiuon result is -1 for evaluation errors, 0 for no error.
   *
!  * CAVEAT
   *	It is assumed that the results wordlist has been initialised
   *	before it was passed to expr_eval().
   *
***************
*** 266,469 ****
  
  int
  expr_eval(result, ep)
!     wlist   *result;
!     expr    *ep;
  {
!     int     retval;
  
!     trace(("expr_eval(result = %08X, ep = %08X)\n{\n"/*}*/, result, ep));
!     assert(ep);
!     switch ((int)ep->e_op)
!     {
!     default:
! 	error
! 	(
! 	    "%s: %d: illegal expression opcode %d (bug)",
! 	    ep->e_position.pos_name->str_text,
! 	    ep->e_position.pos_line,
! 	    ep->e_op
! 	);
!         expr_eval_fails:
! 	option_set_errors();
! 	retval = -1;
! 	goto ret;
! 
!     case OP_WORD:
  	{
! 	    match_t *field;
  
! 	    /*
! 	     *	If a wildcard mapping is in force (we are performing
! 	     *	actions bound to an implicit recipe) the word will be
! 	     *	mapped before it is returned.
! 	     */
! 	    field = match_top();
! 	    if (field)
! 	    {
! 		string_t *s;
  
! 		s = reconstruct(ep->e_word, field);
! 		wl_append(result, s);
! 		str_free(s);
! 	    }
! 	    else
! 	        wl_append(result, ep->e_word);
! 	}
! 	break;
  
!     case OP_FUNC:
! 	{
! 	    wlist    wl;
! 
! 	    if (el2wl(&wl, &ep->e_list))
! 	    {
! 		wl_free(&wl);
! 		goto expr_eval_fails;
! 	    }
! 	    switch (wl.wl_nwords)
! 	    {
! 	    case 0:
  		break;
  
! 	    case 1:
  		{
! 		    wlist   value;
  
! 		    if (id_search(wl.wl_word[0], ID_CLASS_VARIABLE, &value))
! 		    {
! 		        int     j;
  
! 			for (j = 0; j < value.wl_nwords; j++)
! 			    wl_append(result, value.wl_word[j]);
! 			wl_free(&value);
! 			break;
! 		    }
  
! 		    /*
! 		     *	If the variable is not found,
! 		     *	fall through into the function case
! 		     */
! 		}
  
! 	    default:
! 		{
! 		    bifp    code;
  
! 		    if (!id_search(wl.wl_word[0], ID_CLASS_BUILTIN, &code))
! 		    {
! 		        error
! 	  	        (
! 		            "%s: %d: undefined %s \"%s\"",
! 	    		    ep->e_position.pos_name->str_text,
! 	    		    ep->e_position.pos_line,
! 		            wl.wl_nwords >= 2 ? "function" : "variable",
! 		            wl.wl_word[0]->str_text
! 		        );
! 		        goto expr_eval_fails;
! 		    }
! 		    expr_context = &ep->e_position;
! 		    if ((*code)(result, &wl))
! 			goto expr_eval_fails;
  		}
  		break;
- 	    }
- 	    wl_free(&wl);
- 	}
- 	break;
  
!     case OP_CAT:
! 	{
! 	    wlist   left;
! 	    wlist   right;
! 	    int	    j;
  
! 	    /*
! 	     *	Form the two word lists.
! 	     *	Tack the last word of the left list
! 	     *	onto the first word of the right list.
! 	     *
! 	     *	There are other conceivable ways to do this,
! 	     *	but this definition gives the fewest surprises.
! 	     */
! 	    wl_zero(&left);
! 	    if (expr_eval(&left, ep->e_left))
! 	    {
! 		wl_free(&left);
! 		goto expr_eval_fails;
! 	    }
! 	    wl_zero(&right);
! 	    if (expr_eval(&right, ep->e_right))
! 	    {
! 		wl_free(&left);
! 		wl_free(&right);
! 		goto expr_eval_fails;
! 	    }
! 	    switch ((left.wl_nwords ? 1 : 0) | (right.wl_nwords ? 2 : 0))
! 	    {
! 	    case 0:
! 		/* both lists empty */
! 		break;
  
! 	    case 1:
! 		/* right list empty */
! 		for (j = 0; j < left.wl_nwords; j++)
! 		    wl_append(result, left.wl_word[j]);
! 		break;
  
! 	    case 2:
! 		/* left list empty */
! 		for (j = 0; j < right.wl_nwords; j++)
! 		    wl_append(result, right.wl_word[j]);
! 		break;
  
! 	    case 3:
! 		{
! 		    string_t *s;
  
!                     /* at least one word in each list */
!                     for (j = 0; j < left.wl_nwords - 1; j++)
!                         wl_append(result, left.wl_word[j]);
!                     s = str_catenate(left.wl_word[j], right.wl_word[0]);
!                     wl_append(result, s);
!                     str_free(s);
!                     for (j = 1; j < right.wl_nwords; j++)
!                         wl_append(result, right.wl_word[j]);
  		}
  		break;
- 	    }
- 	    wl_free(&left);
- 	    wl_free(&right);
  	}
! 	break;
!     }
!     retval = 0;
  ret:
!     trace(("return %d;\n", retval));
!     trace((/*{*/"}\n"));
!     return retval;
  }
  
  
  /*
!  *  NAME
   *	el_append - append to an expression list
   *
!  *  SYNOPSIS
   *	void el_append(elist *el, expr *e);
   *
!  *  DESCRIPTION
   *	The el_append function is used to append an expression to an expression
!  *      list.
   *
!  *  RETURNS
   *	void
   *
!  *  CAVEAT
   *	The expression has not been copied, so do not hand it
   *	to expr_free after you append it.
   *
   *	It is assumed that the elist has been previously initialised by a
!  *          elist el;
   *	    el_zero(&el);
   *	statement (or similar) before this function is called.
   */
--- 261,464 ----
  
  int
  expr_eval(result, ep)
! 	wlist	*result;
! 	expr	*ep;
  {
! 	int	retval;
  
! 	trace(("expr_eval(result = %08X, ep = %08X)\n{\n"/*}*/, result, ep));
! 	assert(ep);
! 	switch ((int)ep->e_op)
  	{
! 	default:
! 		error
! 		(
! 			"%s: %d: illegal expression opcode %d (bug)",
! 			ep->e_position.pos_name->str_text,
! 			ep->e_position.pos_line,
! 			ep->e_op
! 		);
! 		expr_eval_fails:
! 		option_set_errors();
! 		retval = -1;
! 		goto ret;
  
! 	case OP_WORD:
! 		{
! 			match_ty *field;
  
! 			/*
! 			 * If a wildcard mapping is in force (we are performing
! 			 * actions bound to an implicit recipe) the word will be
! 			 * mapped before it is returned.
! 			 */
! 			field = match_top();
! 			if (field)
! 			{
! 				string_ty *s;
  
! 				s = reconstruct(ep->e_word, field);
! 				wl_append(result, s);
! 				str_free(s);
! 			}
! 			else
! 				wl_append(result, ep->e_word);
! 		}
  		break;
  
! 	case OP_FUNC:
  		{
! 			wlist	 wl;
  
! 			if (el2wl(&wl, &ep->e_list))
! 			{
! 				wl_free(&wl);
! 				goto expr_eval_fails;
! 			}
! 			switch (wl.wl_nwords)
! 			{
! 			case 0:
! 				break;
  
! 			case 1:
! 				{
! 					wlist	value;
  
! 					if (id_search(wl.wl_word[0], ID_CLASS_VARIABLE, &value))
! 					{
! 						int		j;
  
! 						for (j = 0; j < value.wl_nwords; j++)
! 							wl_append(result, value.wl_word[j]);
! 						wl_free(&value);
! 						break;
! 					}
  
! 					/*
! 					 * If the variable is not found,
! 					 * fall through into the function case
! 					 */
! 				}
! 
! 			default:
! 				{
! 					bifp	code;
! 
! 					if (!id_search(wl.wl_word[0], ID_CLASS_BUILTIN, &code))
! 					{
! 						error
! 						(
! 							"%s: %d: undefined %s \"%s\"",
! 							ep->e_position.pos_name->str_text,
! 							ep->e_position.pos_line,
! 							wl.wl_nwords >= 2 ? "function" : "variable",
! 							wl.wl_word[0]->str_text
! 						);
! 						goto expr_eval_fails;
! 					}
! 					expr_context = &ep->e_position;
! 					if ((*code)(result, &wl))
! 						goto expr_eval_fails;
! 				}
! 				break;
! 			}
! 			wl_free(&wl);
  		}
  		break;
  
! 	case OP_CAT:
! 		{
! 			wlist	left;
! 			wlist	right;
! 			int	j;
  
! 			/*
! 			 * Form the two word lists.
! 			 * Tack the last word of the left list
! 			 * onto the first word of the right list.
! 			 *
! 			 * There are other conceivable ways to do this,
! 			 * but this definition gives the fewest surprises.
! 			 */
! 			wl_zero(&left);
! 			if (expr_eval(&left, ep->e_left))
! 			{
! 				wl_free(&left);
! 				goto expr_eval_fails;
! 			}
! 			wl_zero(&right);
! 			if (expr_eval(&right, ep->e_right))
! 			{
! 				wl_free(&left);
! 				wl_free(&right);
! 				goto expr_eval_fails;
! 			}
! 			switch ((left.wl_nwords ? 1 : 0) | (right.wl_nwords ? 2 : 0))
! 			{
! 			case 0:
! 				/* both lists empty */
! 				break;
  
! 			case 1:
! 				/* right list empty */
! 				for (j = 0; j < left.wl_nwords; j++)
! 					wl_append(result, left.wl_word[j]);
! 				break;
  
! 			case 2:
! 				/* left list empty */
! 				for (j = 0; j < right.wl_nwords; j++)
! 					wl_append(result, right.wl_word[j]);
! 				break;
  
! 			case 3:
! 				{
! 					string_ty *s;
  
! 					/* at least one word in each list */
! 					for (j = 0; j < left.wl_nwords - 1; j++)
! 						wl_append(result, left.wl_word[j]);
! 					s = str_catenate(left.wl_word[j], right.wl_word[0]);
! 					wl_append(result, s);
! 					str_free(s);
! 					for (j = 1; j < right.wl_nwords; j++)
! 						wl_append(result, right.wl_word[j]);
! 				}
! 				break;
! 			}
! 			wl_free(&left);
! 			wl_free(&right);
  		}
  		break;
  	}
! 	retval = 0;
  ret:
! 	trace(("return %d;\n", retval));
! 	trace((/*{*/"}\n"));
! 	return retval;
  }
  
  
  /*
!  * NAME
   *	el_append - append to an expression list
   *
!  * SYNOPSIS
   *	void el_append(elist *el, expr *e);
   *
!  * DESCRIPTION
   *	The el_append function is used to append an expression to an expression
!  *	list.
   *
!  * RETURNS
   *	void
   *
!  * CAVEAT
   *	The expression has not been copied, so do not hand it
   *	to expr_free after you append it.
   *
   *	It is assumed that the elist has been previously initialised by a
!  *	    elist el;
   *	    el_zero(&el);
   *	statement (or similar) before this function is called.
   */
***************
*** 470,504 ****
  
  void
  el_append(el, e)
!     elist   *el;
!     expr    *e;
  {
!     trace(("el_append(el = %08X, e = %08X)\n{\n"/*}*/, el, e));
!     assert(el);
!     assert(e);
!     assert(!el->el_nexprs || !!el->el_expr);
!     *(expr **)enlarge(&el->el_nexprs, (char**)&el->el_expr, sizeof(expr *)) = expr_copy(e);
!     trace((/*{*/"}\n"));
  }
  
  
  /*
!  *  NAME
   *	el2wl - expression list to word list
   *
!  *  SYNOPSIS
   *	int el2wl(wlist *wl, elist *el);
   *
!  *  DESCRIPTION
   *	The el2wl function is used to turn an expression list into a word list.
   *
!  *  RETURNS
   *	The word list is initialised before it is used to
   *	store the results of evaluating the expressions.
   *
   *	The function return value is -1 for errors and 0 for success.
   *
!  *  CAVEAT
   *	The results returned by this function are allocated in dynamic memory.
   *	It is the responsibility of the caller to free them when finished with,
   *	by a call to wl_free().
--- 465,499 ----
  
  void
  el_append(el, e)
! 	elist	*el;
! 	expr	*e;
  {
! 	trace(("el_append(el = %08X, e = %08X)\n{\n"/*}*/, el, e));
! 	assert(el);
! 	assert(e);
! 	assert(!el->el_nexprs || !!el->el_expr);
! 	*(expr **)enlarge(&el->el_nexprs, (char**)&el->el_expr, sizeof(expr *)) = expr_copy(e);
! 	trace((/*{*/"}\n"));
  }
  
  
  /*
!  * NAME
   *	el2wl - expression list to word list
   *
!  * SYNOPSIS
   *	int el2wl(wlist *wl, elist *el);
   *
!  * DESCRIPTION
   *	The el2wl function is used to turn an expression list into a word list.
   *
!  * RETURNS
   *	The word list is initialised before it is used to
   *	store the results of evaluating the expressions.
   *
   *	The function return value is -1 for errors and 0 for success.
   *
!  * CAVEAT
   *	The results returned by this function are allocated in dynamic memory.
   *	It is the responsibility of the caller to free them when finished with,
   *	by a call to wl_free().
***************
*** 506,588 ****
  
  int
  el2wl(wlp, elp)
!     wlist   *wlp;
!     elist   *elp;
  {
!     int	    j;
!     int     retval;
  
!     trace(("el2wl(wlp = %08X, elp = %08X)\n{\n"/*}*/, wlp, elp));
!     retval = 0;
!     wl_zero(wlp);
!     for (j = 0; j < elp->el_nexprs; j++)
!     {
! 	if (expr_eval(wlp, elp->el_expr[j]))
  	{
! 	    retval = -1;
! 	    break;
  	}
!     }
!     trace(("return %d;\n", retval));
!     trace((/*{*/"}\n"));
!     return retval;
  }
  
  
  /*
!  *  NAME
!  *      expr_eveal_condition - evaluate condition
   *
!  *  SYNOPSIS
!  *      int expr_eval_condition(expr *);
   *
!  *  DESCRIPTION
!  *      The expr_eval_condition function is used to evaluate an expression to
!  *      yeild a true/false result.  The expression is evaluated into a word
!  *      list.  A false result is if all of the resulting strings are empty or
!  *      0, true otherwise.
   *
!  *  RETURNS
!  *      The expr_eval_condition function returns 0 if the condition is false,
!  *      and nonzero if it is true.  The value -1 is returned on error.
   *
!  *  CAVEAT
!  *      The str_bool function is used to test the booean value of a string;
!  *      changeing the behaviour of that function will change the behaviour of
!  *      this one.
   */
  
  int
  expr_eval_condition(ep)
!     expr    *ep;
  {
!     wlist   wl;
!     int     j;
!     int     result;
  
!     trace(("expr_eval_condition(ep = %08X)\n{\n"/*}*/, ep));
!     assert(ep);
!     wl_zero(&wl);
!     if (expr_eval(&wl, ep))
!     {
! 	result = -1;
! 	goto ret;
!     }
!     for (j = 0; j < wl.wl_nwords; ++j)
!     {
! 	if (str_bool(wl.wl_word[j]))
  	{
! 	    wl_free(&wl);
! 	    result = 1;
! 	    goto ret;
  	}
!     }
!     wl_free(&wl);
!     result = 0;
  ret:
!     trace(("return %d;\n", result));
!     trace((/*{*/"}\n"));
!     return result;
  }
  
  
--- 501,583 ----
  
  int
  el2wl(wlp, elp)
! 	wlist	*wlp;
! 	elist	*elp;
  {
! 	int	j;
! 	int	retval;
  
! 	trace(("el2wl(wlp = %08X, elp = %08X)\n{\n"/*}*/, wlp, elp));
! 	retval = 0;
! 	wl_zero(wlp);
! 	for (j = 0; j < elp->el_nexprs; j++)
  	{
! 		if (expr_eval(wlp, elp->el_expr[j]))
! 		{
! 			retval = -1;
! 			break;
! 		}
  	}
! 	trace(("return %d;\n", retval));
! 	trace((/*{*/"}\n"));
! 	return retval;
  }
  
  
  /*
!  * NAME
!  *	expr_eveal_condition - evaluate condition
   *
!  * SYNOPSIS
!  *	int expr_eval_condition(expr *);
   *
!  * DESCRIPTION
!  *	The expr_eval_condition function is used to evaluate an expression to
!  *	yeild a true/false result.  The expression is evaluated into a word
!  *	list.  A false result is if all of the resulting strings are empty or
!  *	0, true otherwise.
   *
!  * RETURNS
!  *	The expr_eval_condition function returns 0 if the condition is false,
!  *	and nonzero if it is true.  The value -1 is returned on error.
   *
!  * CAVEAT
!  *	The str_bool function is used to test the booean value of a string;
!  *	changeing the behaviour of that function will change the behaviour of
!  *	this one.
   */
  
  int
  expr_eval_condition(ep)
! 	expr	*ep;
  {
! 	wlist	wl;
! 	int	j;
! 	int	result;
  
! 	trace(("expr_eval_condition(ep = %08X)\n{\n"/*}*/, ep));
! 	assert(ep);
! 	wl_zero(&wl);
! 	if (expr_eval(&wl, ep))
  	{
! 		result = -1;
! 		goto ret;
  	}
! 	for (j = 0; j < wl.wl_nwords; ++j)
! 	{
! 		if (str_bool(wl.wl_word[j]))
! 		{
! 			wl_free(&wl);
! 			result = 1;
! 			goto ret;
! 		}
! 	}
! 	wl_free(&wl);
! 	result = 0;
  ret:
! 	trace(("return %d;\n", result));
! 	trace((/*{*/"}\n"));
! 	return result;
  }
  
  
***************
*** 610,617 ****
  
  void
  el_zero(elp)
!     elist   *elp;
  {
!     elp->el_nexprs = 0;
!     elp->el_expr = 0;
  }
--- 605,612 ----
  
  void
  el_zero(elp)
! 	elist	*elp;
  {
! 	elp->el_nexprs = 0;
! 	elp->el_expr = 0;
  }
Index: cook/expr.h
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1990-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 29,69 ****
  /*
   *  e_op values
   */
! enum expr_op_t
  {
      OP_CAT = 1,
      OP_FUNC,
      OP_WORD
  };
! typedef enum expr_op_t expr_op_t;
  
  typedef struct elist elist;
  struct	elist
  {
!     size_t	el_nexprs;
!     struct expr **el_expr;
  };
  
  typedef struct position position;
  struct	position
  {
!     string_t *pos_name;
!     int	    pos_line;
  };
  
  typedef struct expr expr;
  struct expr
  {
!     expr_op_t e_op;
!     long    e_references;
!     position e_position;
!     union
!     {
! 	string_t *e__word;
! 	elist	e__list;
! 	expr	*e__arg[2];
!     }
! 	e__u;
  };
  #define e_word	e__u.e__word
  #define e_list	e__u.e__list
--- 29,69 ----
  /*
   *  e_op values
   */
! enum expr_op_ty
  {
      OP_CAT = 1,
      OP_FUNC,
      OP_WORD
  };
! typedef enum expr_op_ty expr_op_ty;
  
  typedef struct elist elist;
  struct	elist
  {
! 	size_t		el_nexprs;
! 	struct expr	**el_expr;
  };
  
  typedef struct position position;
  struct	position
  {
! 	string_ty	*pos_name;
! 	int		pos_line;
  };
  
  typedef struct expr expr;
  struct expr
  {
! 	expr_op_ty	e_op;
! 	long		e_references;
! 	position	e_position;
! 	union
! 	{
! 		string_ty	*e__word;
! 		elist		e__list;
! 		expr		*e__arg[2];
! 	}
! 		e__u;
  };
  #define e_word	e__u.e__word
  #define e_list	e__u.e__list
Index: cook/glob.c
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1991-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 28,34 ****
  #include <errno.h>
  #include <stdlib.h>
  
! #include <main.h>
  #include <glob.h>
  #include <trace.h>
  #include <mem.h>
--- 28,34 ----
  #include <errno.h>
  #include <stdlib.h>
  
! #include <conf.h>
  #include <glob.h>
  #include <trace.h>
  #include <mem.h>
***************
*** 327,333 ****
  				tmp_char(*cp);
  			if (!*cp)
  			{
! 				string_t *s;
  
  				s = str_n_from_c(tmp, tmp_len);
  				wl_append(where, s);
--- 327,333 ----
  				tmp_char(*cp);
  			if (!*cp)
  			{
! 				string_ty *s;
  
  				s = str_n_from_c(tmp, tmp_len);
  				wl_append(where, s);
***************
*** 358,378 ****
  			tmp_len = n;
  			for (;;)
  			{
  				dep = readdir(dp);
  				if (!dep)
  					break;
  				if
  				(
! 					dep->d_name[0] == '.'
  				&&
  					(
! 						!dep->d_name[1]
  					||
! 						(dep->d_name[1] == '.' && !dep->d_name[2])
  					)  
  				)
  					continue;
! 				switch (gmatch(formal, formal_end, dep->d_name))
  				{
  				case 0:
  					continue;
--- 358,384 ----
  			tmp_len = n;
  			for (;;)
  			{
+ 				char	*np;
+ 
  				dep = readdir(dp);
  				if (!dep)
  					break;
+ 				np = dep->d_name;
+ #ifdef CONF_pyramid_broken_readdir
+ 				np -= 2;
+ #endif
  				if
  				(
! 					np[0] == '.'
  				&&
  					(
! 						!np[1]
  					||
! 						(np[1] == '.' && !np[2])
  					)  
  				)
  					continue;
! 				switch (gmatch(formal, formal_end, np))
  				{
  				case 0:
  					continue;
***************
*** 381,391 ****
  					retval = -1;
  					goto ret;
  				}
! 				for (cp = dep->d_name; *cp; ++cp)
  					tmp_char(*cp);
  				if (!*formal_end)
  				{
! 					string_t *s;
  
  					s = str_n_from_c(tmp, tmp_len);
  					wl_append(where, s);
--- 387,397 ----
  					retval = -1;
  					goto ret;
  				}
! 				for (cp = np; *cp; ++cp)
  					tmp_char(*cp);
  				if (!*formal_end)
  				{
! 					string_ty *s;
  
  					s = str_n_from_c(tmp, tmp_len);
  					wl_append(where, s);
***************
*** 419,425 ****
   *	cmp - compare strings
   *
   * SYNOPSIS
!  *	int cmp(string_t **, string_t **);
   *
   * DESCRIPTION
   *	The cmp function is used to compare two strings.
--- 425,431 ----
   *	cmp - compare strings
   *
   * SYNOPSIS
!  *	int cmp(string_ty **, string_ty **);
   *
   * DESCRIPTION
   *	The cmp function is used to compare two strings.
***************
*** 438,448 ****
  	const void	*va;
  	const void	*vb;
  {
! 	string_t	*a;
! 	string_t	*b;
  
! 	a = *(string_t **)va;
! 	b = *(string_t **)vb;
  	return strcmp(a->str_text, b->str_text);
  }
  
--- 444,454 ----
  	const void	*va;
  	const void	*vb;
  {
! 	string_ty	*a;
! 	string_ty	*b;
  
! 	a = *(string_ty **)va;
! 	b = *(string_ty **)vb;
  	return strcmp(a->str_text, b->str_text);
  }
  
***************
*** 487,493 ****
  			retval = -1;
  			break;
  		}
! 		qsort(result->wl_word + start, result->wl_nwords - start, sizeof(string_t*), cmp);
  	}
  	trace(("return %d;\n", retval));
  	trace((/*{*/"}\n"));
--- 493,499 ----
  			retval = -1;
  			break;
  		}
! 		qsort(result->wl_word + start, result->wl_nwords - start, sizeof(string_ty *), cmp);
  	}
  	trace(("return %d;\n", retval));
  	trace((/*{*/"}\n"));
Index: cook/glob.h
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1990-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: cook/hashline.h
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1992-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: cook/hashline.y
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1991-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 79,85 ****
   *	open_include - open an include file
   *
   * SYNOPSIS
!  *	void open_include(string_t *filename);
   *
   * DESCRIPTION
   *	The open_include function is used to search for a given file name in
--- 79,85 ----
   *	open_include - open an include file
   *
   * SYNOPSIS
!  *	void open_include(string_ty *filename);
   *
   * DESCRIPTION
   *	The open_include function is used to search for a given file name in
***************
*** 89,99 ****
   *	void
   */
  
! static void open_include_once _((string_t *));
  
  static void
  open_include_once(filename)
! 	string_t	*filename;
  {
  	if (!wl_member(&done_once, filename))
  		lex_open(filename);
--- 89,99 ----
   *	void
   */
  
! static void open_include_once _((string_ty *));
  
  static void
  open_include_once(filename)
! 	string_ty	*filename;
  {
  	if (!wl_member(&done_once, filename))
  		lex_open(filename);
***************
*** 100,114 ****
  }
  
  
! static void open_include _((string_t *, int));
  
  static void
  open_include(filename, local)
! 	string_t	*filename;
  	int		local;
  {
  	int		j;
! 	string_t	*path;
  
  	trace(("open_include(filename = %08lX, local = %d) entry",
  		filename, local));
--- 100,114 ----
  }
  
  
! static void open_include _((string_ty *, int));
  
  static void
  open_include(filename, local)
! 	string_ty	*filename;
  	int		local;
  {
  	int		j;
! 	string_ty	*path;
  
  	trace(("open_include(filename = %08lX, local = %d) entry",
  		filename, local));
***************
*** 117,123 ****
  	{
  		if (local)
  		{
! 			string_t	*s;
  
  			s = lex_cur_file();
  			if (strchr(s->str_text, '/'))
--- 117,123 ----
  	{
  		if (local)
  		{
! 			string_ty	*s;
  
  			s = lex_cur_file();
  			if (strchr(s->str_text, '/'))
***************
*** 284,290 ****
  	expr		*ep;
  {
  	wlist		result;
! 	string_t	*s;
  
  	if (stack && !stack->pass)
  		return;
--- 284,290 ----
  	expr		*ep;
  {
  	wlist		result;
! 	string_ty	*s;
  
  	if (stack && !stack->pass)
  		return;
***************
*** 649,655 ****
  hash_pragma(elp)
  	elist		*elp;
  {
! 	static string_t	*once;
  
  	trace(("hash_if(elp = %08lX)\n{\n"/*}*/, elp));
  	if (stack && !stack->pass)
--- 649,655 ----
  hash_pragma(elp)
  	elist		*elp;
  {
! 	static string_ty	*once;
  
  	trace(("hash_if(elp = %08lX)\n{\n"/*}*/, elp));
  	if (stack && !stack->pass)
***************
*** 725,731 ****
  {
  	expr		*lv_expr;
  	elist		lv_elist;
! 	string_t	*lv_word;
  }
  
  %type	<lv_elist>	elist
--- 725,731 ----
  {
  	expr		*lv_expr;
  	elist		lv_elist;
! 	string_ty	*lv_word;
  }
  
  %type	<lv_elist>	elist
Index: cook/id.c
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1990-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 42,51 ****
  
  
  #define HEADER				\
! 	string_t	*id_name;	\
! 	hash_t		id_hash;	\
  	id		*id_next;	\
! 	id_class_t	id_class;
  
  typedef struct id id;
  struct id
--- 42,51 ----
  
  
  #define HEADER				\
! 	string_ty	*id_name;	\
! 	str_hash_ty	id_hash;	\
  	id		*id_next;	\
! 	id_class_ty	id_class;
  
  typedef struct id id;
  struct id
***************
*** 81,98 ****
  	int		id_value;
  };
  
! 	string_t	*id_need;
! 	string_t	*id_younger;
! 	string_t	*id_target;
! 	string_t	*id_friend;
! 	string_t	*id_search_list;
  static	id		**hash_table;
! static	hash_t		hash_modulus;
! static	hash_t		hash_cutover;
! static	hash_t		hash_cutover_mask;
! static	hash_t		hash_cutover_split_mask;
! static	hash_t		hash_split;
! static	hash_t		hash_load;
  
  
  /*
--- 81,98 ----
  	int		id_value;
  };
  
! 	string_ty	*id_need;
! 	string_ty	*id_younger;
! 	string_ty	*id_target;
! 	string_ty	*id_friend;
! 	string_ty	*id_search_list;
  static	id		**hash_table;
! static	str_hash_ty	hash_modulus;
! static	str_hash_ty	hash_cutover;
! static	str_hash_ty	hash_cutover_mask;
! static	str_hash_ty	hash_cutover_split_mask;
! static	str_hash_ty	hash_split;
! static	str_hash_ty	hash_load;
  
  
  /*
***************
*** 115,123 ****
  void
  id_initialize()
  {
! 	hash_t		j;
  	wlist		wl;
! 	string_t	*s;
  
  	id_need = str_from_c("need");
  	id_younger = str_from_c("younger");
--- 115,123 ----
  void
  id_initialize()
  {
! 	str_hash_ty	j;
  	wlist		wl;
! 	string_ty	*s;
  
  	id_need = str_from_c("need");
  	id_younger = str_from_c("younger");
***************
*** 213,219 ****
  	id		*p;
  	id		**ipp;
  	id		*p2;
! 	hash_t		index;
  
  	/*
  	 * get the list to be split across buckets 
--- 213,219 ----
  	id		*p;
  	id		**ipp;
  	id		*p2;
! 	str_hash_ty	index;
  
  	/*
  	 * get the list to be split across buckets 
***************
*** 342,348 ****
   *	id_search - search for a variable
   *
   * SYNOPSIS
!  *	int id_search(string_t *name, wlist *value);
   *
   * DESCRIPTION
   *	Id_search is used to reference a variable.
--- 342,348 ----
   *	id_search - search for a variable
   *
   * SYNOPSIS
!  *	int id_search(string_ty *name, wlist *value);
   *
   * DESCRIPTION
   *	Id_search is used to reference a variable.
***************
*** 363,374 ****
  /*VARARGS2*/
  int
  id_search(name, class, arg)
! 	string_t	*name;
! 	id_class_t	class;
  	void		*arg;
  {
! 	hash_t		myhash;
! 	hash_t		index;
  	id		*p;
  
  	myhash = name->str_hash + (int)class;
--- 363,374 ----
  /*VARARGS2*/
  int
  id_search(name, class, arg)
! 	string_ty	*name;
! 	id_class_ty	class;
  	void		*arg;
  {
! 	str_hash_ty	myhash;
! 	str_hash_ty	index;
  	id		*p;
  
  	myhash = name->str_hash + (int)class;
***************
*** 516,522 ****
   *	size_by_class - determine symbol size
   *
   * SYNOPSIS
!  *	void size_by_class(id_class_t class);
   *
   * DESCRIPTION
   *	The size_by_class function is used to determine the correct size to
--- 516,522 ----
   *	size_by_class - determine symbol size
   *
   * SYNOPSIS
!  *	void size_by_class(id_class_ty class);
   *
   * DESCRIPTION
   *	The size_by_class function is used to determine the correct size to
***************
*** 529,539 ****
   *	Never malloc(sizeof(id)) as this will be too small.
   */
  
! static size_t size_by_class _((id_class_t));
  
  static size_t
  size_by_class(class)
! 	id_class_t	class;
  {
  	switch ((int)class)
  	{
--- 529,539 ----
   *	Never malloc(sizeof(id)) as this will be too small.
   */
  
! static size_t size_by_class _((id_class_ty));
  
  static size_t
  size_by_class(class)
! 	id_class_ty	class;
  {
  	switch ((int)class)
  	{
***************
*** 563,569 ****
   *	id_assign - assign a variable
   *
   * SYNOPSIS
!  *	void id_assign(string_t *name, id_class_t class, ...);
   *
   * DESCRIPTION
   *	Id_assign is used to assign a value to a given variable.
--- 563,569 ----
   *	id_assign - assign a variable
   *
   * SYNOPSIS
!  *	void id_assign(string_ty *name, id_class_ty class, ...);
   *
   * DESCRIPTION
   *	Id_assign is used to assign a value to a given variable.
***************
*** 577,588 ****
  /*VARARGS2*/
  void
  id_assign(name, class, arg)
! 	string_t	*name;
! 	id_class_t	class;
  	void		*arg;
  {
! 	hash_t		myhash;
! 	hash_t		index;
  	id		*p;
  
  	myhash = name->str_hash + (int)class;
--- 577,588 ----
  /*VARARGS2*/
  void
  id_assign(name, class, arg)
! 	string_ty	*name;
! 	id_class_ty	class;
  	void		*arg;
  {
! 	str_hash_ty	myhash;
! 	str_hash_ty	index;
  	id		*p;
  
  	myhash = name->str_hash + (int)class;
***************
*** 619,625 ****
   *	id_assign_push - assign a variable, remembering old value
   *
   * SYNOPSIS
!  *	void id_assign_push(string_t *name, id_class_t class, ...);
   *
   * DESCRIPTION
   *	Id_assign is used to assign a value to a given variable.
--- 619,625 ----
   *	id_assign_push - assign a variable, remembering old value
   *
   * SYNOPSIS
!  *	void id_assign_push(string_ty *name, id_class_ty class, ...);
   *
   * DESCRIPTION
   *	Id_assign is used to assign a value to a given variable.
***************
*** 633,644 ****
  /*VARARGS2*/
  void
  id_assign_push(name, class, arg)
! 	string_t	*name;
! 	id_class_t	class;
  	void		*arg;
  {
! 	hash_t		myhash;
! 	hash_t		index;
  	id		*p;
  
  	myhash = name->str_hash + (int)class;
--- 633,644 ----
  /*VARARGS2*/
  void
  id_assign_push(name, class, arg)
! 	string_ty	*name;
! 	id_class_ty	class;
  	void		*arg;
  {
! 	str_hash_ty	myhash;
! 	str_hash_ty	index;
  	id		*p;
  
  	myhash = name->str_hash + (int)class;
***************
*** 665,671 ****
   *	id_delete - delete a variable
   *
   * SYNOPSIS
!  *	void id_delete(string_t *name, id_class_t class);
   *
   * DESCRIPTION
   *	Id_delete is used to delete variables.
--- 665,671 ----
   *	id_delete - delete a variable
   *
   * SYNOPSIS
!  *	void id_delete(string_ty *name, id_class_ty class);
   *
   * DESCRIPTION
   *	Id_delete is used to delete variables.
***************
*** 677,687 ****
  
  void
  id_delete(name, class)
! 	string_t	*name;
! 	id_class_t	class;
  {
! 	hash_t		myhash;
! 	hash_t		index;
  	id		**idpp;
  
  	myhash = name->str_hash + (int)class;
--- 677,687 ----
  
  void
  id_delete(name, class)
! 	string_ty	*name;
! 	id_class_ty	class;
  {
! 	str_hash_ty	myhash;
! 	str_hash_ty	index;
  	id		**idpp;
  
  	myhash = name->str_hash + (int)class;
***************
*** 763,769 ****
  			case ID_CLASS_VARIABLE:
  				{
  					id_wlist	*ip;
! 					string_t	*str;
  		
  					ip = (id_wlist*)p;
  					str = wl2str(&ip->id_value, 0, 32767);
--- 763,769 ----
  			case ID_CLASS_VARIABLE:
  				{
  					id_wlist	*ip;
! 					string_ty	*str;
  		
  					ip = (id_wlist*)p;
  					str = wl2str(&ip->id_value, 0, 32767);
Index: cook/id.h
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1990-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 27,33 ****
  #include <str.h>
  #include <word.h>
  
! enum id_class_t
  {
  	ID_CLASS_ALREADY,
  	ID_CLASS_BUILTIN,
--- 27,33 ----
  #include <str.h>
  #include <word.h>
  
! enum id_class_ty
  {
  	ID_CLASS_ALREADY,
  	ID_CLASS_BUILTIN,
***************
*** 37,56 ****
  	ID_CLASS_STAT,
  	ID_CLASS_VARIABLE
  };
! typedef enum id_class_t id_class_t;
  
  typedef int (*bifp)_((wlist *, wlist *));
  
! extern string_t *id_need;
! extern string_t *id_younger;
! extern string_t *id_friend;
! extern string_t *id_target;
! extern string_t *id_search_list;
  
  extern void id_initialize _((void));
! extern int id_search _((string_t *, id_class_t, void *));
! extern void id_assign _((string_t *, id_class_t, void *));
! extern void id_assign_push _((string_t *, id_class_t, void *));
! extern void id_delete _((string_t *, id_class_t));
  
  #endif /* ID_H */
--- 37,56 ----
  	ID_CLASS_STAT,
  	ID_CLASS_VARIABLE
  };
! typedef enum id_class_ty id_class_ty;
  
  typedef int (*bifp)_((wlist *, wlist *));
  
! extern string_ty *id_need;
! extern string_ty *id_younger;
! extern string_ty *id_friend;
! extern string_ty *id_target;
! extern string_ty *id_search_list;
  
  extern void id_initialize _((void));
! extern int id_search _((string_ty *, id_class_ty, void *));
! extern void id_assign _((string_ty *, id_class_ty, void *));
! extern void id_assign_push _((string_ty *, id_class_ty, void *));
! extern void id_delete _((string_ty *, id_class_ty));
  
  #endif /* ID_H */
Index: cook/lex.c
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1990-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 62,69 ****
  #define EOLN 32766
  
  
! typedef struct meta_t meta_t;
! struct meta_t
  {
  	int		m_type;		/* meta character "type" info	*/
  	int		m_char;		/* meta character actual value	*/
--- 62,69 ----
  #define EOLN 32766
  
  
! typedef struct meta_ty meta_ty;
! struct meta_ty
  {
  	int		m_type;		/* meta character "type" info	*/
  	int		m_char;		/* meta character actual value	*/
***************
*** 70,83 ****
  	int		m_flag;		/* meta character flags		*/
  };
  
! typedef struct lex_t lex_t;
! struct lex_t
  {
! 	string_t	*l_name;	/* name of file being analysed	*/
  	FILE		*l_file;	/* open file structure of the file */
  	int		l_line;		/* the line number we are up to	*/
! 	meta_t		l_mback;	/* backup for meta chars	*/
! 	lex_t		*l_chain;	/* file this one is an insert from */
  	short		l_bol;
  };
  
--- 70,83 ----
  	int		m_flag;		/* meta character flags		*/
  };
  
! typedef struct lex_ty lex_ty;
! struct lex_ty
  {
! 	string_ty	*l_name;	/* name of file being analysed	*/
  	FILE		*l_file;	/* open file structure of the file */
  	int		l_line;		/* the line number we are up to	*/
! 	meta_ty		l_mback;	/* backup for meta chars	*/
! 	lex_ty		*l_chain;	/* file this one is an insert from */
  	short		l_bol;
  };
  
***************
*** 90,96 ****
  	int		sa_inuse;
  };
  
! static	lex_t		*root;		/* root of insert list		*/
  static	stracc		saroot;		/* root of string accum list	*/
  static	int		errcnt;		/* count of errors to date	*/
  static	int		mode;		/* what lex mode we are in	*/
--- 90,96 ----
  	int		sa_inuse;
  };
  
! static	lex_ty		*root;		/* root of insert list		*/
  static	stracc		saroot;		/* root of string accum list	*/
  static	int		errcnt;		/* count of errors to date	*/
  static	int		mode;		/* what lex mode we are in	*/
***************
*** 117,131 ****
  void
  lex_initialize()
  {
! 	typedef struct keyword_t keyword_t;
! 	struct keyword_t
  	{
  		char		*k_name;
  		int		k_token;
! 		id_class_t	k_class;
  	};
  
! 	static keyword_t keyword[] =
  	{
  		{ ":",		COLON,		ID_CLASS_PARSE_KEYWORD,	},
  		{ ";",		SEMICOLON,	ID_CLASS_PARSE_KEYWORD,	},
--- 117,131 ----
  void
  lex_initialize()
  {
! 	typedef struct keyword_ty keyword_ty;
! 	struct keyword_ty
  	{
  		char		*k_name;
  		int		k_token;
! 		id_class_ty	k_class;
  	};
  
! 	static keyword_ty keyword[] =
  	{
  		{ ":",		COLON,		ID_CLASS_PARSE_KEYWORD,	},
  		{ ";",		SEMICOLON,	ID_CLASS_PARSE_KEYWORD,	},
***************
*** 154,166 ****
  		{ "{"/*}*/,	LBRACE,		ID_CLASS_PARSE_KEYWORD,	},
  		{ /*{*/"}",	RBRACE,		ID_CLASS_PARSE_KEYWORD,	},
  	};
! 	keyword_t	*kp;
  
  	trace(("init_reserved()\n{\n"/*}*/));
  	passing = 1;
  	for (kp = keyword; kp < ENDOF(keyword); ++kp)
  	{
! 		string_t	*s;
  
  		s = str_from_c(kp->k_name);
  		id_assign(s, kp->k_class, &kp->k_token);
--- 154,166 ----
  		{ "{"/*}*/,	LBRACE,		ID_CLASS_PARSE_KEYWORD,	},
  		{ /*{*/"}",	RBRACE,		ID_CLASS_PARSE_KEYWORD,	},
  	};
! 	keyword_ty	*kp;
  
  	trace(("init_reserved()\n{\n"/*}*/));
  	passing = 1;
  	for (kp = keyword; kp < ENDOF(keyword); ++kp)
  	{
! 		string_ty	*s;
  
  		s = str_from_c(kp->k_name);
  		id_assign(s, kp->k_class, &kp->k_token);
***************
*** 175,181 ****
   *	lex_open - open a file for lexical analysis
   *
   * SYNOPSIS
!  *	void lex_open(string_t *filename);
   *
   * DESCRIPTION
   *	Lex_open opens a file for lexical analysis
--- 175,181 ----
   *	lex_open - open a file for lexical analysis
   *
   * SYNOPSIS
!  *	void lex_open(string_ty *filename);
   *
   * DESCRIPTION
   *	Lex_open opens a file for lexical analysis
***************
*** 187,195 ****
  
  void
  lex_open(filename)
! 	string_t	*filename;
  {
! 	lex_t		*new;
  
  	trace(("lex_open(filename = %08lX)\n{\n"/*}*/, filename));
  	trace_string(filename->str_text);
--- 187,195 ----
  
  void
  lex_open(filename)
! 	string_ty	*filename;
  {
! 	lex_ty		*new;
  
  	trace(("lex_open(filename = %08lX)\n{\n"/*}*/, filename));
  	trace_string(filename->str_text);
***************
*** 201,207 ****
  			return;
  		}
  	}
! 	new = (lex_t *)mem_alloc_clear(sizeof(lex_t));
  	new->l_name = str_copy(filename);
  	new->l_file = fopen(filename->str_text, "r");
  	if (!new->l_file)
--- 201,207 ----
  			return;
  		}
  	}
! 	new = (lex_ty *)mem_alloc_clear(sizeof(lex_ty));
  	new->l_name = str_copy(filename);
  	new->l_file = fopen(filename->str_text, "r");
  	if (!new->l_file)
***************
*** 231,237 ****
  void
  lex_close()
  {
! 	lex_t		*old;
  
  	trace(("lex_close()\n{\n"/*}*/));
  	assert(root);
--- 231,237 ----
  void
  lex_close()
  {
! 	lex_ty		*old;
  
  	trace(("lex_close()\n{\n"/*}*/));
  	assert(root);
***************
*** 434,440 ****
   *	sa_close - finish accumulating a string
   *
   * SYNOPSIS
!  *	string_t *sa_close(void);
   *
   * DESCRIPTION
   *	Sa_close finished accumulating a string and
--- 434,440 ----
   *	sa_close - finish accumulating a string
   *
   * SYNOPSIS
!  *	string_ty *sa_close(void);
   *
   * DESCRIPTION
   *	Sa_close finished accumulating a string and
***************
*** 448,459 ****
   *	finished with, by a call to str_free().
   */
  
! static string_t *sa_close _((void));
  
! static string_t *
  sa_close()
  {
! 	string_t	*val;
  
  	trace(("sa_close()\n{\n"/*}*/));
  	assert(saroot.sa_inuse);
--- 448,459 ----
   *	finished with, by a call to str_free().
   */
  
! static string_ty *sa_close _((void));
  
! static string_ty *
  sa_close()
  {
! 	string_ty	*val;
  
  	trace(("sa_close()\n{\n"/*}*/));
  	assert(saroot.sa_inuse);
***************
*** 523,536 ****
  
  /*
   * NAME
!  *	meta_repn - mata_t representation
   *
   * SYNOPSIS
!  *	char *meta_repn(meta_t*);
   *
   * DESCRIPTION
   *	The meta_repn function is used to produce a readable representation of
!  *	a mata_t value.
   *
   * RETURNS
   *	char* - a pointer to ta C string.
--- 523,536 ----
  
  /*
   * NAME
!  *	meta_repn - mata_ty representation
   *
   * SYNOPSIS
!  *	char *meta_repn(meta_ty*);
   *
   * DESCRIPTION
   *	The meta_repn function is used to produce a readable representation of
!  *	a mata_ty value.
   *
   * RETURNS
   *	char* - a pointer to ta C string.
***************
*** 541,551 ****
  
  #ifdef DEBUG
  
! static char *meta_repn _((meta_t *));
  
  static char *
  meta_repn(val)
! 	meta_t		*val;
  {
  	static char *type[] =
  	{
--- 541,551 ----
  
  #ifdef DEBUG
  
! static char *meta_repn _((meta_ty *));
  
  static char *
  meta_repn(val)
! 	meta_ty		*val;
  {
  	static char *type[] =
  	{
***************
*** 611,617 ****
   *	meta - fetch and classify a character
   *
   * SYNOPSIS
!  *	void meta(meta_t*);
   *
   * DESCRIPTION
   *	Meta fetches and classifies a character from the input stream.
--- 611,617 ----
   *	meta - fetch and classify a character
   *
   * SYNOPSIS
!  *	void meta(meta_ty*);
   *
   * DESCRIPTION
   *	Meta fetches and classifies a character from the input stream.
***************
*** 624,634 ****
   *	Lex_open must have been called previously.
   */
  
! static void meta _((meta_t *));
  
  static void
  meta(val)
! 	meta_t		*val;
  {
  	trace(("meta(val = %08lX)\n{\n"/*}*/, val));
  	assert(root);
--- 624,634 ----
   *	Lex_open must have been called previously.
   */
  
! static void meta _((meta_ty *));
  
  static void
  meta(val)
! 	meta_ty		*val;
  {
  	trace(("meta(val = %08lX)\n{\n"/*}*/, val));
  	assert(root);
***************
*** 861,867 ****
   *	meta_undo - push back a character
   *
   * SYNOPSIS
!  *	void meta_undo(meta_t*);
   *
   * DESCRIPTION
   *	Meta_undo is used to temporarily push back a character
--- 861,867 ----
   *	meta_undo - push back a character
   *
   * SYNOPSIS
!  *	void meta_undo(meta_ty*);
   *
   * DESCRIPTION
   *	Meta_undo is used to temporarily push back a character
***************
*** 871,881 ****
   *	Only one character may be pushed back at any one time.
   */
  
! static void meta_undo _((meta_t *));
  
  static void
  meta_undo(val)
! 	meta_t		*val;
  {
  	assert(root);
  	assert(!root->l_mback.m_type);
--- 871,881 ----
   *	Only one character may be pushed back at any one time.
   */
  
! static void meta_undo _((meta_ty *));
  
  static void
  meta_undo(val)
! 	meta_ty		*val;
  {
  	assert(root);
  	assert(!root->l_mback.m_type);
***************
*** 1039,1047 ****
  static int
  tokenize()
  {
! 	meta_t		c;
  	int		tok;
! 	static meta_t	last;
  	static int	dataended;
  
  	trace(("tokenize()\n{\n"/*}*/));
--- 1039,1047 ----
  static int
  tokenize()
  {
! 	meta_ty		c;
  	int		tok;
! 	static meta_ty	last;
  	static int	dataended;
  
  	trace(("tokenize()\n{\n"/*}*/));
***************
*** 1354,1360 ****
   *	lex_cur_file - name current file
   *
   * SYNOPSIS
!  *	string_t *lex_cur_file(void);
   *
   * DESCRIPTION
   *	The lex_cur_file function is used to get the name of the current
--- 1354,1360 ----
   *	lex_cur_file - name current file
   *
   * SYNOPSIS
!  *	string_ty *lex_cur_file(void);
   *
   * DESCRIPTION
   *	The lex_cur_file function is used to get the name of the current
***************
*** 1361,1373 ****
   *	file being analyzed by lex.
   *
   * RETURNS
!  *	string_t* - pointer to string with name in it
   *
   * CAVEAT
   *	Does not take a copy, so don't use str_free()
   */
  
! string_t *
  lex_cur_file()
  {
  	assert(root);
--- 1361,1373 ----
   *	file being analyzed by lex.
   *
   * RETURNS
!  *	string_ty* - pointer to string with name in it
   *
   * CAVEAT
   *	Does not take a copy, so don't use str_free()
   */
  
! string_ty *
  lex_cur_file()
  {
  	assert(root);
***************
*** 1438,1445 ****
  				if (tok == DATA)
  				{
  					int	winged;
! 					meta_t	last;
! 					meta_t	c;
  	
  					/*
  					 * This is a special.  Gobble the rest
--- 1438,1445 ----
  				if (tok == DATA)
  				{
  					int	winged;
! 					meta_ty	last;
! 					meta_ty	c;
  	
  					/*
  					 * This is a special.  Gobble the rest
Index: cook/lex.h
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1990-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 30,40 ****
  int lex_cur_line _((void));
  int lex_mode _((int));
  int parse_lex _((void));
! string_t *lex_cur_file _((void));
  void lex_close _((void));
  void lex_error _((char*, ...));
  void lex_initialize _((void));
! void lex_open _((string_t*));
  void lex_passing _((int));
  void lex_trace _((char*, ...));
  
--- 30,40 ----
  int lex_cur_line _((void));
  int lex_mode _((int));
  int parse_lex _((void));
! string_ty *lex_cur_file _((void));
  void lex_close _((void));
  void lex_error _((char*, ...));
  void lex_initialize _((void));
! void lex_open _((string_ty *));
  void lex_passing _((int));
  void lex_trace _((char*, ...));
  
Index: cook/listing.c
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1991-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 163,171 ****
  void
  log_open()
  {
! 	string_t	*entryname;
! 	string_t	*dirname;
! 	string_t	*fullpath;
  	time_t		clock;
  	struct tm	*tm;
  
--- 163,171 ----
  void
  log_open()
  {
! 	string_ty	*entryname;
! 	string_ty	*dirname;
! 	string_ty	*fullpath;
  	time_t		clock;
  	struct tm	*tm;
  
Index: cook/listing.h
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1990-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: cook/main.c
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1991-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 47,59 ****
  	arglex_token_no_action,
  	arglex_token_book,
  	arglex_token_no_book,
- 	arglex_token_debug,
  	arglex_token_errok,
  	arglex_token_no_errok,
  	arglex_token_force,
  	arglex_token_no_force,
! 	arglex_token_include_long,
! 	arglex_token_include_short,
  	arglex_token_log,
  	arglex_token_no_log,
  	arglex_token_metering,
--- 47,57 ----
  	arglex_token_no_action,
  	arglex_token_book,
  	arglex_token_no_book,
  	arglex_token_errok,
  	arglex_token_no_errok,
  	arglex_token_force,
  	arglex_token_no_force,
! 	arglex_token_include,
  	arglex_token_log,
  	arglex_token_no_log,
  	arglex_token_metering,
***************
*** 72,111 ****
  	arglex_token_no_tty
  };
  
! static arglex_table_t argtab[] =
  {
! 	{ "-Action",		arglex_token_action,		},
! 	{ "-No_Action",		arglex_token_no_action,		},
! 	{ "-Book",		arglex_token_book,		},
! 	{ "-No_Book",		arglex_token_no_book,		},
! 	{ "-Continue",		arglex_token_persevere,		},
! 	{ "-No_Continue",	arglex_token_no_persevere,	},
! #ifdef DEBUG
! 	{ "-Debug",		arglex_token_debug,		},
! #endif
! 	{ "-Errok",		arglex_token_errok,		},
! 	{ "-No_Errok",		arglex_token_no_errok,		},
! 	{ "-Forced",		arglex_token_force,		},
! 	{ "-No_Forced",		arglex_token_no_force,		},
! 	{ "-LOg",		arglex_token_log,		},
! 	{ "-List",		arglex_token_log,		},
! 	{ "-No_LOg",		arglex_token_no_log,		},
! 	{ "-No_List",		arglex_token_no_log,		},
! 	{ "-Meter",		arglex_token_metering,		},
! 	{ "-No_Meter",		arglex_token_no_metering,	},
! 	{ "-Precious",		arglex_token_precious,		},
! 	{ "-No_Precious",	arglex_token_no_precious,	},
! 	{ "-Silent",		arglex_token_silent,		},
! 	{ "-No_Silent",		arglex_token_no_silent,		},
! 	{ "-Touch",		arglex_token_touch,		},
! 	{ "-No_Touch",		arglex_token_no_touch,		},
! 	{ "-TRace",		arglex_token_trace,		},
! 	{ "-No_TRace",		arglex_token_no_trace,		},
! 	{ "-TEerminal",		arglex_token_tty,		},
! 	{ "-No_TEerminal",	arglex_token_no_tty,		},
! 	{ "-Include",		arglex_token_include_long,	},
! 	{ "-I*",		arglex_token_include_short,	},
! 	{ 0, 0, }, /* end marker */
  };
  
  
--- 70,106 ----
  	arglex_token_no_tty
  };
  
! static arglex_table_ty argtab[] =
  {
! 	{ "-Action",		(arglex_token_ty)arglex_token_action,	},
! 	{ "-No_Action",		(arglex_token_ty)arglex_token_no_action, },
! 	{ "-Book",		(arglex_token_ty)arglex_token_book,	},
! 	{ "-No_Book",		(arglex_token_ty)arglex_token_no_book,	},
! 	{ "-Continue",		(arglex_token_ty)arglex_token_persevere, },
! 	{ "-No_Continue",	(arglex_token_ty)arglex_token_no_persevere, },
! 	{ "-Errok",		(arglex_token_ty)arglex_token_errok,	},
! 	{ "-No_Errok",		(arglex_token_ty)arglex_token_no_errok,	},
! 	{ "-Forced",		(arglex_token_ty)arglex_token_force,	},
! 	{ "-No_Forced",		(arglex_token_ty)arglex_token_no_force,	},
! 	{ "-LOg",		(arglex_token_ty)arglex_token_log,	},
! 	{ "-List",		(arglex_token_ty)arglex_token_log,	},
! 	{ "-No_LOg",		(arglex_token_ty)arglex_token_no_log,	},
! 	{ "-No_List",		(arglex_token_ty)arglex_token_no_log,	},
! 	{ "-Meter",		(arglex_token_ty)arglex_token_metering,	},
! 	{ "-No_Meter",		(arglex_token_ty)arglex_token_no_metering, },
! 	{ "-Precious",		(arglex_token_ty)arglex_token_precious,	},
! 	{ "-No_Precious",	(arglex_token_ty)arglex_token_no_precious, },
! 	{ "-Silent",		(arglex_token_ty)arglex_token_silent,	},
! 	{ "-No_Silent",		(arglex_token_ty)arglex_token_no_silent, },
! 	{ "-Touch",		(arglex_token_ty)arglex_token_touch,	},
! 	{ "-No_Touch",		(arglex_token_ty)arglex_token_no_touch,	},
! 	{ "-TRace",		(arglex_token_ty)arglex_token_trace,	},
! 	{ "-No_TRace",		(arglex_token_ty)arglex_token_no_trace,	},
! 	{ "-TErminal",		(arglex_token_ty)arglex_token_tty,	},
! 	{ "-No_TErminal",	(arglex_token_ty)arglex_token_no_tty,	},
! 	{ "-Include",		(arglex_token_ty)arglex_token_include,	},
! 	{ "-\\I*",		(arglex_token_ty)arglex_token_include,	},
! 	{ 0, (arglex_token_ty)0, }, /* end marker */
  };
  
  
***************
*** 165,207 ****
  "",
  "SYNOPSIS",
  "	%s [ <option>... ][ <filename>... ]",
  "",
  "DESCRIPTION",
! "	%s is a tool for constructing files.  It is given a set of",
! "	files to create, and instructions detailing how to construct",
! "	them.  In any non-trivial program there will be",
! "	prerequisites to performing the actions necessary to",
! "	creating any file, such as extraction from a source-control",
! "	system.  %s provides a mechanism to define these.",
  "",
  "	When a program is being developed or maintained, the",
! "	programmer will typically change one file of several which",
! "	comprise the program.  %s examines the last-modified times",
! "	of the files to see when the prerequisites of a file have",
! "	changed, implying that the file needs to be recreated as it",
! "	is logically out of date.",
  "",
! "	%s also provides a facility for implicit recipes, allowing",
! "	users to specify how to form a file with a given suffix from",
! "	a file with a different suffix.  For example, to create",
! "	filename.o from filename.c",
  "",
  "	Options and filenames may be arbitrarily mixed on the",
  "	command line; no processing is done until all options and",
  "	filenames on the command line have been scanned.",
  "",
! "	%s will attempt to create the named files from the recipes",
! "	given to it.  The recipes are contained in a file called",
! "	Howto.%s in the currect directory.  This file may, in",
! "	turn, include other files containing additional recipes.",
  "",
! "	If no filenames are given on the command line the targets of",
! "	the first recipe defined are cooked.",
  "",
  "OPTIONS",
  "	The valid options for %s are listed below.  Any other",
! "	options (words on the command line beginning with `-') will",
! "	cause a diagnostic message to be issued.",
  "",
  "	-Action",
  "		Execute the commands given in the recipes.  This",
--- 160,207 ----
  "",
  "SYNOPSIS",
  "	%s [ <option>... ][ <filename>... ]",
+ "	%s -Help",
+ "	%s -VERSion",
  "",
  "DESCRIPTION",
! "	The %s program is a tool for constructing files.  It is",
! "	given a set of files to create, and instructions",
! "	detailing how to construct them.  In any non-trivial",
! "	program there will be prerequisites to performing the",
! "	actions necessary to creating any file, such as",
! "	extraction from a source-control system.  The %s",
! "	program provides a mechanism to define these.",
  "",
  "	When a program is being developed or maintained, the",
! "	programmer will typically change one file of several",
! "	which comprise the program.  The %s program examines",
! "	the last-modified times of the files to see when the",
! "	prerequisites of a file have changed, implying that the",
! "	file needs to be recreated as it is logically out of",
! "	date.",
  "",
! "	The %s program also provides a facility for implicit",
! "	recipes, allowing users to specify how to form a file",
! "	with a given suffix from a file with a different suffix.",
! "	For example, to create filename.o from filename.c",
  "",
  "	Options and filenames may be arbitrarily mixed on the",
  "	command line; no processing is done until all options and",
  "	filenames on the command line have been scanned.",
  "",
! "	The %s program will attempt to create the named files",
! "	from the recipes given to it.  The recipes are contained",
! "	in a file called Howto.%s in the currect directory.",
! "	This file may, in turn, include other files containing",
! "	additional recipes.",
  "",
! "	If no filenames are given on the command line the targets",
! "	of the first recipe defined are cooked.",
  "",
  "OPTIONS",
  "	The valid options for %s are listed below.  Any other",
! "	options (words on the command line beginning with `-')",
! "	will cause a diagnostic message to be issued.",
  "",
  "	-Action",
  "		Execute the commands given in the recipes.  This",
***************
*** 210,218 ****
  "	-No_Action",
  "		Do not execute the commands given in the recipes.",
  "",
! "	-Book <filename>",
  "		Tells %s to used the named cookbook, rather than",
! "		the default ``Howto.cook''.",
  "",
  "	-Continue",
  "		If cooking a target should fail, continue with",
--- 210,218 ----
  "	-No_Action",
  "		Do not execute the commands given in the recipes.",
  "",
! "       -Book <filename>",
  "		Tells %s to used the named cookbook, rather than",
! "		the default ``Howto.cook'' file.",
  "",
  "	-Continue",
  "		If cooking a target should fail, continue with",
***************
*** 243,249 ****
  "",
  "	-No_Force",
  "		Perform the actions of the recipes if any of the",
! "		ingredients are logically out of date.  This is",
  "		the default.",
  "",
  "	-Help",
--- 243,249 ----
  "",
  "	-No_Force",
  "		Perform the actions of the recipes if any of the",
! "		ingredients are logically out of date. This is",
  "		the default.",
  "",
  "	-Help",
***************
*** 252,261 ****
  "",
  "	-Include <filename>",
  "		Search the named directory before the standard",
! "		places for included cookbooks.  Each directory so",
  "		named will be scanned in the order given.  The",
  "		standard places are $HOME/.%s then",
! "		/usr/local/lib/%s.",
  "",
  "	-List",
  "		Causes %s to automatically redirect the stdout",
--- 252,261 ----
  "",
  "	-Include <filename>",
  "		Search the named directory before the standard",
! "		places for included cookbooks. Each directory so",
  "		named will be scanned in the order given.  The",
  "		standard places are $HOME/.%s then",
! "		/usr/local/lib/cook.",
  "",
  "	-List",
  "		Causes %s to automatically redirect the stdout",
***************
*** 273,284 ****
  "		unless %s is executing in the background.",
  "",
  "	-No_List",
! "		No automatic redirection of the session of the",
  "		session will be made.",
  "",
  "	-Meter",
! "		After each command is executed, print a summary of",
! "		the command's CPU usage.",
  "",
  "	-No_Meter",
  "		Do not print a CPU usage summary after each",
--- 273,290 ----
  "		unless %s is executing in the background.",
  "",
  "	-No_List",
! "		No automatic redirection of the output of the",
  "		session will be made.",
  "",
+ "	-No_List <filename>",
+ "		No automatic redirection of the output of the",
+ "		session will be made, however subsequent -List",
+ "		options will default to listing to the named",
+ "		file.",
+ "",
  "	-Meter",
! "		After each command is executed, print a summary",
! "		of the command's CPU usage.",
  "",
  "	-No_Meter",
  "		Do not print a CPU usage summary after each",
***************
*** 285,296 ****
  "		command.  This is the default.",
  "",
  "	-Precious",
! "		When commands in the body of a recipe fail, no not",
! "		delete the targets of the recipe.",
  "",
  "	-No_Precious",
! "		When commands in the body of a recipe fail, delete",
! "		the targets of the recipe.  This is the default.",
  "",
  "	-Silent",
  "		Do not echo commands before they are executed.",
--- 291,303 ----
  "		command.  This is the default.",
  "",
  "	-Precious",
! "		When commands in the body of a recipe fail, do",
! "		not delete the targets of the recipe.",
  "",
  "	-No_Precious",
! "		When commands in the body of a recipe fail,",
! "		delete the targets of the recipe.  This is the",
! "		default.",
  "",
  "	-Silent",
  "		Do not echo commands before they are executed.",
***************
*** 311,317 ****
  "	-No_Touch",
  "		Execute the actions bound to recipes, rather than",
  "		update the last-modified times of the target",
! "		files.  This is the default.",
  "",
  "	-TErminal",
  "		When listing, also send the output stream to the",
--- 318,324 ----
  "	-No_Touch",
  "		Execute the actions bound to recipes, rather than",
  "		update the last-modified times of the target",
! "		files. This is the default.",
  "",
  "	-TErminal",
  "		When listing, also send the output stream to the",
***************
*** 321,354 ****
  "		When listing, do not send the output to the",
  "		terminal.",
  "",
- "	-VERSion",
- "		Give version information.",
- "",
  "	name=value",
! "		Assign the value to the named variable.  The value",
! "		may contain spaces if you can convince the shell",
! "		to pass them through.",
  "",
- "	In the above descriptions, a shorter form is indicated by",
- "	the uppercase letters; for example, the -No_Touch option may",
- "	be abbreviated to -nt.  %s is case insensitive to the",
- "	options, so you may arbitrarily mix cases within the",
- "	options.",
- "",
- "	Two options are provided for tracing the inferences %s",
- "	makes when attempting to cook a target.",
- "",
  "	-TRace",
! "		%s will emit copious amounts of information",
! "		about the inferences it is making when cooking",
! "		targets.  This option may be used when you think",
! "		%s is acting strangely, or are just curious.",
  "",
  "	-No_TRace",
! "		%s will not emit information about the",
! "		inferences it is making when cooking targets.",
! "		This is the default.",
  "",
  "EXIT STATUS",
  "	The %s command will exit with a status of 1 on any",
  "	error.  The %s command will only exit with a status of",
--- 328,375 ----
  "		When listing, do not send the output to the",
  "		terminal.",
  "",
  "	name=value",
! "		Assign the value to the named variable.  The",
! "		value may contain spaces if you can convince the",
! "		shell to pass them through.",
  "",
  "	-TRace",
! "		Two options are provided for tracing the",
! "		inferences %s makes when attempting to %s a",
! "		target.  The -TRace option will cause %s will",
! "		emit copious amounts of information about the",
! "		inferences it is making when cooking targets.",
! "		This option may be used when you think %s is",
! "		acting strangely, or are just curious.",
  "",
  "	-No_TRace",
! "		This option may be used to cause %s will not",
! "		emit information about the inferences it is",
! "		making when cooking targets.  This is the",
! "		default.",
  "",
+ "	All options may be abbreviated; the abbreviation is",
+ "	documented as the upper case letters, all lower case",
+ "	letters and underscores (_) are optional.  You must use",
+ "	consecutive sequences of optional letters.",
+ "",
+ "	All options are case insensitive, you may type them in",
+ "	upper case or lower case or a combination of both, case",
+ "	is not important.",
+ "",
+ "	For example: the arguments \"-help\", \"-HEL\" and \"-h\" are",
+ "	all interpreted to mean the -Help option.  The argument",
+ "	\"-hlp\" will not be understood, because consecutive",
+ "	optional characters were not supplied.",
+ "",
+ "	Options and other command line arguments may be mixed",
+ "	arbitrarily on the command line.",
+ "",
+ "	The GNU long option names are understood.  Since all",
+ "	option names for %s are long, this means ignoring the",
+ "	extra leading '-'.  The \"--option=value\" convention is",
+ "	also understood.",
+ "",
  "EXIT STATUS",
  "	The %s command will exit with a status of 1 on any",
  "	error.  The %s command will only exit with a status of",
***************
*** 370,376 ****
   *	argparse - parse command line
   *
   * SYNOPSIS
!  *	void argparse(option_level_t);
   *
   * DESCRIPTION
   *	The argparse function is used to parse command lines.
--- 391,397 ----
   *	argparse - parse command line
   *
   * SYNOPSIS
!  *	void argparse(option_level_ty);
   *
   * DESCRIPTION
   *	The argparse function is used to parse command lines.
***************
*** 379,391 ****
   *	void
   */
  
! static void argparse _((option_level_t));
  
  static void
  argparse(level)
! 	option_level_t	level;
  {
! 	option_number_t	type = -1;
  
  	switch (arglex())
  	{
--- 400,412 ----
   *	void
   */
  
! static void argparse _((option_level_ty));
  
  static void
  argparse(level)
! 	option_level_ty	level;
  {
! 	option_number_ty	type = -1;
  
  	switch (arglex())
  	{
***************
*** 409,440 ****
  		switch (arglex_token)
  		{
  		default:
! 			error("argument \"%s\" unknown", arglex_value.alv_string);
  			usage();
  
  #ifdef DEBUG
! 		case arglex_token_debug:
! 			while (arglex() == arglex_token_string)
  				trace_enable(arglex_value.alv_string);
  			continue;
  #endif
  
! 		case arglex_token_include_short:
  			{
! 				string_t *s;
  
- 				s = str_from_c(arglex_value.alv_string);
- 				wl_append_unique(&option.o_search_path, s);
- 				str_free(s);
- 			}
- 			break;
- 
- 		case arglex_token_include_long:
- 			{
- 				string_t *s;
- 
  				if (arglex() != arglex_token_string)
! 					usage();
  				s = str_from_c(arglex_value.alv_string);
  				wl_append_unique(&option.o_search_path, s);
  				str_free(s);
--- 430,461 ----
  		switch (arglex_token)
  		{
  		default:
! 			error
! 			(
! 				"misplaced \"%s\" command line argument",
! 				arglex_value.alv_string
! 			);
  			usage();
  
  #ifdef DEBUG
! 		case arglex_token_tracing:
! 			if (arglex() != arglex_token_string)
! 				fatal("-TRACIng requires one or more string arguments");
! 			for (;;)
! 			{
  				trace_enable(arglex_value.alv_string);
+ 				if (arglex() != arglex_token_string)
+ 					break;
+ 			}
  			continue;
  #endif
  
! 		case arglex_token_include:
  			{
! 				string_ty *s;
  
  				if (arglex() != arglex_token_string)
! 					fatal("-Include requires a string argument");
  				s = str_from_c(arglex_value.alv_string);
  				wl_append_unique(&option.o_search_path, s);
  				str_free(s);
***************
*** 567,573 ****
  				cp = strchr(arglex_value.alv_string, '=');
  				if (!cp)
  				{
! 					string_t	*s;
  	
  					s = str_from_c(arglex_value.alv_string);
  					wl_append(&option.o_target, s);
--- 588,594 ----
  				cp = strchr(arglex_value.alv_string, '=');
  				if (!cp)
  				{
! 					string_ty	*s;
  	
  					s = str_from_c(arglex_value.alv_string);
  					wl_append(&option.o_target, s);
***************
*** 576,583 ****
  				else
  				{
  					wlist		wl;
! 					string_t	*name;
! 					string_t	*value;
  	
  					name = str_n_from_c(
  						arglex_value.alv_string,
--- 597,604 ----
  				else
  				{
  					wlist		wl;
! 					string_ty	*name;
! 					string_ty	*value;
  	
  					name = str_n_from_c(
  						arglex_value.alv_string,
Index: cook/match.c
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1991-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 63,72 ****
  #include <trace.h>
  
  
! #define ABSENT_MARKER ((string_t*)-1)
  
! static match_t *match_free_list;
! static match_t *stack;
  
  
  /*
--- 63,72 ----
  #include <trace.h>
  
  
! #define ABSENT_MARKER ((string_ty *)-1)
  
! static match_ty *match_free_list;
! static match_ty *stack;
  
  
  /*
***************
*** 88,95 ****
  
  static void
  illegal_pattern(s, why)
! 	char	*s;
! 	int	why;
  {
  	if (why < 0)
  	{
--- 88,95 ----
  
  static void
  illegal_pattern(s, why)
! 	char		*s;
! 	int		why;
  {
  	if (why < 0)
  	{
***************
*** 111,117 ****
   *	match_alloc - allocate match structure
   *
   * SYNOPSIS
!  *	match_t *match_alloc(void);
   *
   * DESCRIPTION
   *	The match_alloc function is used to allocate a match structure.
--- 111,117 ----
   *	match_alloc - allocate match structure
   *
   * SYNOPSIS
!  *	match_ty *match_alloc(void);
   *
   * DESCRIPTION
   *	The match_alloc function is used to allocate a match structure.
***************
*** 118,124 ****
   *	The returned structure will be all zeros.
   *
   * RETURNS
!  *	match_t* - a pointer to the match structure in dynamic memory
   *
   * CAVEAT
   *	When finished with it should be disposed of by calling the match_free
--- 118,124 ----
   *	The returned structure will be all zeros.
   *
   * RETURNS
!  *	match_ty * - a pointer to the match structure in dynamic memory
   *
   * CAVEAT
   *	When finished with it should be disposed of by calling the match_free
***************
*** 125,137 ****
   *	function.
   */
  
! static match_t *match_alloc _((void));
  
! static match_t *
  match_alloc()
  {
! 	match_t *result;
! 	int	j;
  
  	if (match_free_list)
  	{
--- 125,137 ----
   *	function.
   */
  
! static match_ty *match_alloc _((void));
  
! static match_ty *
  match_alloc()
  {
! 	match_ty	*result;
! 	int		j;
  
  	if (match_free_list)
  	{
***************
*** 139,145 ****
  		match_free_list = result->next;
  	}
  	else
! 		result = (match_t *)mem_alloc(sizeof(match_t));
  	for (j = 0; j < SIZEOF(result->fill); ++j)
  		result->fill[j] = 0;
  	result->next = 0;
--- 139,145 ----
  		match_free_list = result->next;
  	}
  	else
! 		result = (match_ty *)mem_alloc(sizeof(match_ty));
  	for (j = 0; j < SIZEOF(result->fill); ++j)
  		result->fill[j] = 0;
  	result->next = 0;
***************
*** 152,158 ****
   *	match_free - dispose of match structure
   *
   * SYNOPSIS
!  *	void match_free(match_t*);
   *
   * DESCRIPTION
   *	The match_free function is used to dispose of a match structure
--- 152,158 ----
   *	match_free - dispose of match structure
   *
   * SYNOPSIS
!  *	void match_free(match_ty *);
   *
   * DESCRIPTION
   *	The match_free function is used to dispose of a match structure
***************
*** 164,172 ****
  
  void
  match_free(field)
! 	match_t *field;
  {
! 	int	j;
  
  	trace(("match_free(field = %08X)\n{\n"/*}*/, field));
  	for (j = 0; j < SIZEOF(field->fill); ++j)
--- 164,172 ----
  
  void
  match_free(field)
! 	match_ty	*field;
  {
! 	int		j;
  
  	trace(("match_free(field = %08X)\n{\n"/*}*/, field));
  	for (j = 0; j < SIZEOF(field->fill); ++j)
***************
*** 188,194 ****
   *	matcher - match pattern to string
   *
   * SYNOPSIS
!  *	int matcher(char *original_patn, char *patn, char *str, match_t *field);
   *
   * DESCRIPTION
   *	The matcher function is used to match up a pattern with a string,
--- 188,194 ----
   *	matcher - match pattern to string
   *
   * SYNOPSIS
!  *	int matcher(char *original_patn, char *patn, char *str, match_ty *field);
   *
   * DESCRIPTION
   *	The matcher function is used to match up a pattern with a string,
***************
*** 201,207 ****
   *	The field structure is not allocated here.
   */
  
! static int matcher _((char *, char *, char *, match_t *));
  
  static int
  matcher(op, p, s, field)
--- 201,207 ----
   *	The field structure is not allocated here.
   */
  
! static int matcher _((char *, char *, char *, match_ty *));
  
  static int
  matcher(op, p, s, field)
***************
*** 208,217 ****
  	char		*op;	/* original pattern */
  	char		*p;
  	char		*s;
! 	match_t		*field;
  {
  	size_t		index;
! 	string_t	*sp;
  	int		result;
  
  	trace(("matcher(op = %08lX, p = %08lX, s = %08lX, field = %08X)\n{\n"/*}*/, op, p, s, field));
--- 208,217 ----
  	char		*op;	/* original pattern */
  	char		*p;
  	char		*s;
! 	match_ty	*field;
  {
  	size_t		index;
! 	string_ty	*sp;
  	int		result;
  
  	trace(("matcher(op = %08lX, p = %08lX, s = %08lX, field = %08X)\n{\n"/*}*/, op, p, s, field));
***************
*** 343,349 ****
   *	match - attempt to
   *
   * SYNOPSIS
!  *	match_t *match(string_t *pattern, string_t *string);
   *
   * DESCRIPTION
   *	The match function is used to match a pattern with a string.
--- 343,349 ----
   *	match - attempt to
   *
   * SYNOPSIS
!  *	match_ty *match(string_ty *pattern, string_ty *string);
   *
   * DESCRIPTION
   *	The match function is used to match a pattern with a string.
***************
*** 350,356 ****
   *	The matching fields are filled in in the returned structure.
   *
   * RETURNS
!  *	match_t *: a pointer to a match structure in dynamic memory with the
   *	match fields set as appropriate.  A NULL pointer is returned if the
   *	string does not match the pattern.
   *
--- 350,356 ----
   *	The matching fields are filled in in the returned structure.
   *
   * RETURNS
!  *	match_ty *: a pointer to a match structure in dynamic memory with the
   *	match fields set as appropriate.  A NULL pointer is returned if the
   *	string does not match the pattern.
   *
***************
*** 358,369 ****
   *	The match structure should be releaseed by calling match_free.,
   */
  
! match_t *
  match(pattern, string)
! 	string_t *pattern;
! 	string_t *string;
  {
! 	match_t *field;
  
  	trace(("match(pattern = %08lX, string = %08lX)\n{\n"/*}*/, pattern, string));
  	trace_string(pattern->str_text);
--- 358,369 ----
   *	The match structure should be releaseed by calling match_free.,
   */
  
! match_ty *
  match(pattern, string)
! 	string_ty	*pattern;
! 	string_ty	*string;
  {
! 	match_ty	*field;
  
  	trace(("match(pattern = %08lX, string = %08lX)\n{\n"/*}*/, pattern, string));
  	trace_string(pattern->str_text);
***************
*** 385,391 ****
   *	reconstruct - make string from pattern
   *
   * SYNOPSIS
!  *	string_t *reconstruct(string_t *pattern, match_t *field);
   *
   * DESCRIPTION
   *	The reconstruct function is used to rebuild a string from a replacement
--- 385,391 ----
   *	reconstruct - make string from pattern
   *
   * SYNOPSIS
!  *	string_ty *reconstruct(string_ty *pattern, match_ty *field);
   *
   * DESCRIPTION
   *	The reconstruct function is used to rebuild a string from a replacement
***************
*** 392,398 ****
   *	pattern and the match field values.
   *
   * RETURNS
!  *	string_t*
   *
   * CAVEAT
   *	It is a fatal error for the pattern to reference fields not set by the
--- 392,398 ----
   *	pattern and the match field values.
   *
   * RETURNS
!  *	string_ty *
   *
   * CAVEAT
   *	It is a fatal error for the pattern to reference fields not set by the
***************
*** 399,414 ****
   *	pattern match which created the fields match structure.
   */
  
! string_t *
  reconstruct(pattern, field)
! 	string_t	*pattern;
! 	match_t		*field;
  {
  	static char	*tmp;
  	static size_t	tmplen;
  	size_t		length;
  	char		*p;
! 	string_t	*s;
  	char		*pos;
  	int		index;
  
--- 399,414 ----
   *	pattern match which created the fields match structure.
   */
  
! string_ty *
  reconstruct(pattern, field)
! 	string_ty	*pattern;
! 	match_ty	*field;
  {
  	static char	*tmp;
  	static size_t	tmplen;
  	size_t		length;
  	char		*p;
! 	string_ty	*s;
  	char		*pos;
  	int		index;
  
***************
*** 496,502 ****
   *	match_push - patch match fields
   *
   * SYNOPSIS
!  *	void match_push(match_t *field);
   *
   * DESCRIPTION
   *	The match_push function is used to push a pattern onto the stack of
--- 496,502 ----
   *	match_push - patch match fields
   *
   * SYNOPSIS
!  *	void match_push(match_ty *field);
   *
   * DESCRIPTION
   *	The match_push function is used to push a pattern onto the stack of
***************
*** 509,515 ****
  
  void
  match_push(field)
! 	match_t *field;
  {
  	trace(("match_push(field = %08X)\n{\n"/*}*/, field));
  	if (!field)
--- 509,515 ----
  
  void
  match_push(field)
! 	match_ty	*field;
  {
  	trace(("match_push(field = %08X)\n{\n"/*}*/, field));
  	if (!field)
***************
*** 528,547 ****
   *	match_top - top of match stack
   *
   * SYNOPSIS
!  *	match_t *match_top(void);
   *
   * DESCRIPTION
   *	The match function is used to indicate the top of the match stack.
   *
   * RETURNS
!  *	match_t* - a pointer to a match strcuture, or NULL if the stack is
   *	empty, or a NULL was pashed to mak an exlpicit recipe.
   */
  
! match_t *
  match_top()
  {
! 	match_t *result;
  
  	if (stack && stack->fill[0] == ABSENT_MARKER)
  		result = 0;
--- 528,547 ----
   *	match_top - top of match stack
   *
   * SYNOPSIS
!  *	match_ty *match_top(void);
   *
   * DESCRIPTION
   *	The match function is used to indicate the top of the match stack.
   *
   * RETURNS
!  *	match_ty * - a pointer to a match strcuture, or NULL if the stack is
   *	empty, or a NULL was pashed to mak an exlpicit recipe.
   */
  
! match_ty *
  match_top()
  {
! 	match_ty	*result;
  
  	if (stack && stack->fill[0] == ABSENT_MARKER)
  		result = 0;
***************
*** 556,562 ****
   *	match_pop - shorten stack
   *
   * SYNOPSIS
!  *	match_t *match_pop(void);
   *
   * DESCRIPTION
   *	The match_pop function is used to pop a match structure from the match
--- 556,562 ----
   *	match_pop - shorten stack
   *
   * SYNOPSIS
!  *	match_ty *match_pop(void);
   *
   * DESCRIPTION
   *	The match_pop function is used to pop a match structure from the match
***************
*** 563,569 ****
   *	stack.
   *
   * RETURNS
!  *	match_t* - a pointer to a match strcuture, or NULL if the stack is
   *	empty, or a NULL was pashed to mak an exlpicit recipe.
   *
   * CAVEAT
--- 563,569 ----
   *	stack.
   *
   * RETURNS
!  *	match_ty * - a pointer to a match strcuture, or NULL if the stack is
   *	empty, or a NULL was pashed to mak an exlpicit recipe.
   *
   * CAVEAT
***************
*** 570,579 ****
   *	It is an error for the stack to be empty.
   */
  
! match_t *
  match_pop()
  {
! 	match_t *field;
  
  	trace(("match_pop()\n{\n"/*}*/));
  	assert(stack);
--- 570,579 ----
   *	It is an error for the stack to be empty.
   */
  
! match_ty *
  match_pop()
  {
! 	match_ty	*field;
  
  	trace(("match_pop()\n{\n"/*}*/));
  	assert(stack);
***************
*** 595,601 ****
   *	wl_match - find a pattern in a word list
   *
   * SYNOPSIS
!  *	match_t *wl_match(wlist *pattern, string_t *target);
   *
   * DESCRIPTION
   *	Wl_match is used to determine whether any one of the words in
--- 595,601 ----
   *	wl_match - find a pattern in a word list
   *
   * SYNOPSIS
!  *	match_ty *wl_match(wlist *pattern, string_ty *target);
   *
   * DESCRIPTION
   *	Wl_match is used to determine whether any one of the words in
***************
*** 613,625 ****
   *	by a call to match_free();
   */
  
! match_t *
  wl_match(pattern, target)
  	wlist		*pattern;
! 	string_t	*target;
  {
  	int		j;
! 	match_t		*retval;
  
  	for (j = 0; j < pattern->wl_nwords; j++)
  	{
--- 613,625 ----
   *	by a call to match_free();
   */
  
! match_ty *
  wl_match(pattern, target)
  	wlist		*pattern;
! 	string_ty	*target;
  {
  	int		j;
! 	match_ty	*retval;
  
  	for (j = 0; j < pattern->wl_nwords; j++)
  	{
***************
*** 636,642 ****
   *	wl_reconstruct - reconstruct a word list
   *
   * SYNOPSIS
!  *	void wl_reconstruct(wlist *to, wlist *from, match_t *field)
   *
   * DESCRIPTION
   *	Wl_reconstruct is used to reconstruct an entire word list,
--- 636,642 ----
   *	wl_reconstruct - reconstruct a word list
   *
   * SYNOPSIS
!  *	void wl_reconstruct(wlist *to, wlist *from, match_ty *field)
   *
   * DESCRIPTION
   *	Wl_reconstruct is used to reconstruct an entire word list,
***************
*** 653,668 ****
  
  void
  wl_reconstruct(to, from, field)
! 	wlist	*to;
! 	wlist	*from;
! 	match_t	*field;
  {
! 	int			j;
  
  	wl_zero(to);
  	for (j = 0; j < from->wl_nwords; j++)
  	{
! 		string_t *s;
  
  		s = reconstruct(from->wl_word[j], field);
  		wl_append(to, s);
--- 653,668 ----
  
  void
  wl_reconstruct(to, from, field)
! 	wlist		*to;
! 	wlist		*from;
! 	match_ty	*field;
  {
! 	int		j;
  
  	wl_zero(to);
  	for (j = 0; j < from->wl_nwords; j++)
  	{
! 		string_ty *s;
  
  		s = reconstruct(from->wl_word[j], field);
  		wl_append(to, s);
Index: cook/match.h
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1990-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1990, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 28,47 ****
  
  #define MATCH_CHAR '%'
  
! typedef struct match_t match_t;
! struct match_t
  {
!     string_t *fill[11];
!     match_t  *next;
  };
  
! match_t *match _((string_t *, string_t *));
! string_t *reconstruct _((string_t *, match_t *));
! void match_push _((match_t *));
! match_t *match_pop _((void));
! match_t *match_top _((void));
! void match_free _((match_t *));
! match_t *wl_match _((wlist *, string_t *));
! void wl_reconstruct _((wlist *, wlist *, match_t *));
  
  #endif /* MATCH_H */
--- 28,47 ----
  
  #define MATCH_CHAR '%'
  
! typedef struct match_ty match_ty;
! struct match_ty
  {
! 	string_ty	*fill[11];
! 	match_ty	*next;
  };
  
! match_ty *match _((string_ty *, string_ty *));
! string_ty *reconstruct _((string_ty *, match_ty *));
! void match_push _((match_ty *));
! match_ty *match_pop _((void));
! match_ty *match_top _((void));
! void match_free _((match_ty *));
! match_ty *wl_match _((wlist *, string_ty *));
! void wl_reconstruct _((wlist *, wlist *, match_ty *));
  
  #endif /* MATCH_H */
Index: cook/option.c
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1991-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 50,56 ****
  #include <mem.h>
  
  
! option_t option;
  
  
  /*
--- 50,56 ----
  #include <mem.h>
  
  
! option_ty option;
  
  
  /*
***************
*** 58,64 ****
   *	option_set - set an option
   *
   * SYNOPSIS
!  *	void option_set(option_number_t num, option_level_t lvl, int state);
   *
   * DESCRIPTION
   *	The option_set function is used to set the given option at the given
--- 58,64 ----
   *	option_set - set an option
   *
   * SYNOPSIS
!  *	void option_set(option_number_ty num, option_level_ty lvl, int state);
   *
   * DESCRIPTION
   *	The option_set function is used to set the given option at the given
***************
*** 70,77 ****
  
  void
  option_set(o, level, state)
! 	option_number_t	o;
! 	option_level_t	level;
  	int		state;
  {
  	assert((int)o >= 0 && (int)o < (int)OPTION_max);
--- 70,77 ----
  
  void
  option_set(o, level, state)
! 	option_number_ty	o;
! 	option_level_ty	level;
  	int		state;
  {
  	assert((int)o >= 0 && (int)o < (int)OPTION_max);
***************
*** 87,93 ****
   *	option_already - see if an option is already set
   *
   * SYNOPSIS
!  *	int option_already(option_number_t num, option_level_t lvl);
   *
   * DESCRIPTION
   *	The option_already function is used to test if a given option at a
--- 87,93 ----
   *	option_already - see if an option is already set
   *
   * SYNOPSIS
!  *	int option_already(option_number_ty num, option_level_ty lvl);
   *
   * DESCRIPTION
   *	The option_already function is used to test if a given option at a
***************
*** 99,106 ****
  
  int
  option_already(o, level)
! 	option_number_t	o;
! 	option_level_t	level;
  {
  	assert((int)o >= 0 && (int)o < (int)OPTION_max);
  	return ((option.o_flag[(size_t)o] >> (2 * (int)level)) & 1) != 0;
--- 99,106 ----
  
  int
  option_already(o, level)
! 	option_number_ty	o;
! 	option_level_ty	level;
  {
  	assert((int)o >= 0 && (int)o < (int)OPTION_max);
  	return ((option.o_flag[(size_t)o] >> (2 * (int)level)) & 1) != 0;
***************
*** 112,118 ****
   *	option_undo - remove option setting
   *
   * SYNOPSIS
!  *	void option_undo(option_number_t num, option_level_t lvl);
   *
   * DESCRIPTION
   *	The option_undo function is used to is used to remove the option
--- 112,118 ----
   *	option_undo - remove option setting
   *
   * SYNOPSIS
!  *	void option_undo(option_number_ty num, option_level_ty lvl);
   *
   * DESCRIPTION
   *	The option_undo function is used to is used to remove the option
***************
*** 124,131 ****
  
  void
  option_undo(o, level)
! 	option_number_t	o;
! 	option_level_t	level;
  {
  	assert((int)o >= 0 && (int)o < (int)OPTION_max);
  	option.o_flag[(size_t)o] &= ~(3 << (2 * (int)level));
--- 124,131 ----
  
  void
  option_undo(o, level)
! 	option_number_ty	o;
! 	option_level_ty	level;
  {
  	assert((int)o >= 0 && (int)o < (int)OPTION_max);
  	option.o_flag[(size_t)o] &= ~(3 << (2 * (int)level));
***************
*** 137,143 ****
   *	option_undo_level - remove options settings
   *
   * SYNOPSIS
!  *	void option_undo_level(option_level_t lvl);
   *
   * DESCRIPTION
   *	The option_undo_level function is used to remove the settings for all
--- 137,143 ----
   *	option_undo_level - remove options settings
   *
   * SYNOPSIS
!  *	void option_undo_level(option_level_ty lvl);
   *
   * DESCRIPTION
   *	The option_undo_level function is used to remove the settings for all
***************
*** 149,160 ****
  
  void
  option_undo_level(level)
! 	option_level_t	level;
  {
  	int		o;
  
  	for (o = 0; o < (int)OPTION_max; ++o)
! 		option_undo((option_number_t)o, level);
  }
  
  
--- 149,160 ----
  
  void
  option_undo_level(level)
! 	option_level_ty	level;
  {
  	int		o;
  
  	for (o = 0; o < (int)OPTION_max; ++o)
! 		option_undo((option_number_ty)o, level);
  }
  
  
***************
*** 163,169 ****
   *	option_test - test an option
   *
   * SYNOPSIS
!  *	int option_test(option_number_t num);
   *
   * DESCRIPTION
   *	The option_test function is used to test the setting of an option.
--- 163,169 ----
   *	option_test - test an option
   *
   * SYNOPSIS
!  *	int option_test(option_number_ty num);
   *
   * DESCRIPTION
   *	The option_test function is used to test the setting of an option.
***************
*** 175,181 ****
  
  int
  option_test(o)
! 	option_number_t	o;
  {
  	unsigned	*op;
  	unsigned	mask;
--- 175,181 ----
  
  int
  option_test(o)
! 	option_number_ty	o;
  {
  	unsigned	*op;
  	unsigned	mask;
***************
*** 213,220 ****
  void
  option_tidy_up()
  {
! 	string_t	*s;
! 	string_t	*s1;
  
  	/*
  	 * user's library
--- 213,220 ----
  void
  option_tidy_up()
  {
! 	string_ty	*s;
! 	string_ty	*s1;
  
  	/*
  	 * user's library
Index: cook/option.h
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1990-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 29,87 ****
  #include <word.h>
  
  /*
!  *  option levels, highest to lowest
!  *  (room for 16 levels in a 32 bit unsigned)
   */
! enum option_level_t
  {
!     OPTION_LEVEL_ERROR,
!     OPTION_LEVEL_COMMAND_LINE,
!     OPTION_LEVEL_EXECUTE,
!     OPTION_LEVEL_RECIPE,
!     OPTION_LEVEL_COOKBOOK,
!     OPTION_LEVEL_ENVIRONMENT,
!     OPTION_LEVEL_DEFAULT
  };
! typedef enum option_level_t option_level_t;
  
! enum option_number_t
  {
!     OPTION_PERSEVERE,	/* keep trying if have errors   */
!     OPTION_SILENT,	/* do not echo any command	    */
!     OPTION_ERROK,	/* ignore error returns from commands   */
!     OPTION_ACTION,	/* do not execute the command   */
!     OPTION_TOUCH,	/* do not execute the command, just touch the targets */
!     OPTION_FORCE,	/* always execute the commands  */
!     OPTION_PRECIOUS,	/* do not delete failed targets */
!     OPTION_TERMINAL,	/* enable tty output when logging */
!     OPTION_TRACE,	/* emit tracing information */
!     OPTION_CMDFILE,	/* generate a command file */
!     OPTION_METER,	/* meter each command */
!     OPTION_LOGGING,
!     OPTION_BOOK,
!     OPTION_INVALIDATE_STAT_CACHE,
!     OPTION_max
  };
! typedef enum option_number_t option_number_t;
  
! typedef struct option_t option_t;
! struct option_t
  {
!     unsigned o_flag[OPTION_max];
!     wlist    o_target;
!     string_t *o_book;
!     string_t *o_logfile;
!     wlist    o_search_path;
  };
  
! extern option_t option;
! extern char *progname;
  
! int option_already _((option_number_t, option_level_t));
! int option_test _((option_number_t));
! void option_set _((option_number_t, option_level_t, int));
! void option_undo _((option_number_t, option_level_t));
! void option_undo_level _((option_level_t));
  void option_set_errors _((void));
  void option_tidy_up _((void));
  
--- 29,87 ----
  #include <word.h>
  
  /*
!  * option levels, highest to lowest
!  * (room for 16 levels in a 32 bit unsigned)
   */
! enum option_level_ty
  {
! 	OPTION_LEVEL_ERROR,
! 	OPTION_LEVEL_COMMAND_LINE,
! 	OPTION_LEVEL_EXECUTE,
! 	OPTION_LEVEL_RECIPE,
! 	OPTION_LEVEL_COOKBOOK,
! 	OPTION_LEVEL_ENVIRONMENT,
! 	OPTION_LEVEL_DEFAULT
  };
! typedef enum option_level_ty option_level_ty;
  
! enum option_number_ty
  {
! 	OPTION_PERSEVERE,	/* keep trying if have errors */
! 	OPTION_SILENT,		/* do not echo any command */
! 	OPTION_ERROK,		/* ignore error returns from commands */
! 	OPTION_ACTION,		/* do not execute the command */
! 	OPTION_TOUCH,		/* do not execute the command, just touch */
! 	OPTION_FORCE,		/* always execute the commands */
! 	OPTION_PRECIOUS,	/* do not delete failed targets */
! 	OPTION_TERMINAL,	/* enable tty output when logging */
! 	OPTION_TRACE,		/* emit tracing information */
! 	OPTION_CMDFILE,		/* generate a command file */
! 	OPTION_METER,		/* meter each command */
! 	OPTION_LOGGING,
! 	OPTION_BOOK,
! 	OPTION_INVALIDATE_STAT_CACHE,
! 	OPTION_max
  };
! typedef enum option_number_ty option_number_ty;
  
! typedef struct option_ty option_ty;
! struct option_ty
  {
! 	unsigned	o_flag[OPTION_max];
! 	wlist		 o_target;
! 	string_ty	*o_book;
! 	string_ty	*o_logfile;
! 	wlist		 o_search_path;
  };
  
! extern	option_ty	option;
! extern	char		*progname;
  
! int option_already _((option_number_ty, option_level_ty));
! int option_test _((option_number_ty));
! void option_set _((option_number_ty, option_level_ty, int));
! void option_undo _((option_number_ty, option_level_ty));
! void option_undo_level _((option_level_ty));
  void option_set_errors _((void));
  void option_tidy_up _((void));
  
Index: cook/os.c
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1991-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 31,37 ****
  #include <limits.h>
  #include <errno.h>
  #include <stdio.h>
- #include <time.h>
  #include <signal.h>
  #include <unistd.h>
  #include <utime.h>
--- 31,36 ----
***************
*** 71,77 ****
   *	stat_cache - stat() with caching
   *
   * SYNOPSIS
!  *	int stat_cache(string_t *path, struct stat *result);
   *
   * DESCRIPTION
   *	The stat_cache function is used to perform the same as the stat()
--- 70,76 ----
   *	stat_cache - stat() with caching
   *
   * SYNOPSIS
!  *	int stat_cache(string_ty *path, struct stat *result);
   *
   * DESCRIPTION
   *	The stat_cache function is used to perform the same as the stat()
***************
*** 86,96 ****
   *	Errors, other than ENOENT, result in a fatal diagnostic.
   */
  
! static int stat_cache _((string_t *, struct stat *));
  
  static int
  stat_cache(path, result)
! 	string_t	*path;
  	struct stat	*result;
  {
  	if (id_search(path, ID_CLASS_STAT, result))
--- 85,95 ----
   *	Errors, other than ENOENT, result in a fatal diagnostic.
   */
  
! static int stat_cache _((string_ty *, struct stat *));
  
  static int
  stat_cache(path, result)
! 	string_ty	*path;
  	struct stat	*result;
  {
  	if (id_search(path, ID_CLASS_STAT, result))
***************
*** 159,165 ****
   *	os_mtime - return the last-modified time of a file
   *
   * SYNOPSIS
!  *	time_t os_mtime(string_t *path);
   *
   * DESCRIPTION
   *	Os_mtime returns the time the named file was last modified.
--- 158,164 ----
   *	os_mtime - return the last-modified time of a file
   *
   * SYNOPSIS
!  *	time_t os_mtime(string_ty *path);
   *
   * DESCRIPTION
   *	Os_mtime returns the time the named file was last modified.
***************
*** 171,177 ****
  
  time_t
  os_mtime(path)
! 	string_t	*path;
  {
  	struct stat	buf;
  
--- 170,176 ----
  
  time_t
  os_mtime(path)
! 	string_ty	*path;
  {
  	struct stat	buf;
  
***************
*** 187,193 ****
   *	os_mtime_adjust - indicate change
   *
   * SYNOPSIS
!  *	int os_mtime_adjust(string_t *path);
   *
   * DESCRIPTION
   *	The os_mtime_adjust function is used to adjust the value in the stat
--- 186,192 ----
   *	os_mtime_adjust - indicate change
   *
   * SYNOPSIS
!  *	int os_mtime_adjust(string_ty *path);
   *
   * DESCRIPTION
   *	The os_mtime_adjust function is used to adjust the value in the stat
***************
*** 201,207 ****
  
  int
  os_mtime_adjust(path)
! 	string_t	*path;
  {
  	struct stat	buf;
  	struct tm	*tm;
--- 200,206 ----
  
  int
  os_mtime_adjust(path)
! 	string_ty	*path;
  {
  	struct stat	buf;
  	struct tm	*tm;
***************
*** 236,242 ****
   *	os_clear_stat - invalidate cache
   *
   * SYNOPSIS
!  *	int os_clear_stat(string_t *path);
   *
   * DESCRIPTION
   *	The os_clear_stat function is used to invalidate the the stat
--- 235,241 ----
   *	os_clear_stat - invalidate cache
   *
   * SYNOPSIS
!  *	int os_clear_stat(string_ty *path);
   *
   * DESCRIPTION
   *	The os_clear_stat function is used to invalidate the the stat
***************
*** 255,261 ****
  
  int
  os_clear_stat(path)
! 	string_t	*path;
  {
  	id_delete(path, ID_CLASS_STAT);
  	return 0;
--- 254,260 ----
  
  int
  os_clear_stat(path)
! 	string_ty	*path;
  {
  	id_delete(path, ID_CLASS_STAT);
  	return 0;
***************
*** 267,273 ****
   *	os_touch - update the modify time of the file
   *
   * SYNOPSIS
!  *	int os_touch(string_t *path);
   *
   * DESCRIPTION
   *	Os_touch updates the last-modified time of the file to the present.
--- 266,272 ----
   *	os_touch - update the modify time of the file
   *
   * SYNOPSIS
!  *	int os_touch(string_ty *path);
   *
   * DESCRIPTION
   *	Os_touch updates the last-modified time of the file to the present.
***************
*** 279,285 ****
  
  int
  os_touch(path)
! 	string_t	*path;
  {
  	struct stat	buf;
  	struct utimbuf	ut;
--- 278,284 ----
  
  int
  os_touch(path)
! 	string_ty	*path;
  {
  	struct stat	buf;
  	struct utimbuf	ut;
***************
*** 310,316 ****
   *	os_delete - delete a file
   *
   * SYNOPSIS
!  *	int os_delete(string_t *path);
   *
   * DESCRIPTION
   *	Os_delete deletes the named file.
--- 309,315 ----
   *	os_delete - delete a file
   *
   * SYNOPSIS
!  *	int os_delete(string_ty *path);
   *
   * DESCRIPTION
   *	Os_delete deletes the named file.
***************
*** 322,328 ****
  
  int
  os_delete(path)
! 	string_t	*path;
  {
  	struct stat	buf;
  
--- 321,327 ----
  
  int
  os_delete(path)
! 	string_ty	*path;
  {
  	struct stat	buf;
  
***************
*** 631,637 ****
   *	os_execute - execute a command
   *
   * SYNOPSIS
!  *	int os_execute(wlist *args, string_t *input);
   *
   * DESCRIPTION
   *	Os_execute performs the given command.
--- 630,636 ----
   *	os_execute - execute a command
   *
   * SYNOPSIS
!  *	int os_execute(wlist *args, string_ty *input);
   *
   * DESCRIPTION
   *	Os_execute performs the given command.
***************
*** 643,649 ****
  int
  os_execute(args, input)
  	wlist		*args;
! 	string_t	*input;
  {
  	int		j;
  	FILE		*fp;
--- 642,648 ----
  int
  os_execute(args, input)
  	wlist		*args;
! 	string_ty	*input;
  {
  	int		j;
  	FILE		*fp;
***************
*** 692,704 ****
  		{
  			if (strchr("#|=^();&<>*?[]:$`'\"\\\n", *s))
  			{
! 				string_t	*str;
  				wlist		newcmd;
  				char		*cp;
  
  				cp = getenv("SHELL");
  				if (!cp || !*cp)
! 					cp = "sh";
  				wl_zero(&newcmd);
  				str = str_from_c(cp);
  				wl_append(&newcmd, str);
--- 691,703 ----
  		{
  			if (strchr("#|=^();&<>*?[]:$`'\"\\\n", *s))
  			{
! 				string_ty	*str;
  				wlist		newcmd;
  				char		*cp;
  
  				cp = getenv("SHELL");
  				if (!cp || !*cp)
! 					cp = CONF_SHELL;
  				wl_zero(&newcmd);
  				str = str_from_c(cp);
  				wl_append(&newcmd, str);
***************
*** 734,740 ****
   *	os_exists - tests for the existence of a file
   *
   * SYNOPSIS
!  *	int os_exists(string_t *path);
   *
   * DESCRIPTION
   *	The os_exists function is used to determine the existence of a file.
--- 733,739 ----
   *	os_exists - tests for the existence of a file
   *
   * SYNOPSIS
!  *	int os_exists(string_ty *path);
   *
   * DESCRIPTION
   *	The os_exists function is used to determine the existence of a file.
***************
*** 745,751 ****
  
  int
  os_exists(path)
! 	string_t	*path;
  {
  	struct stat	buf;
  
--- 744,750 ----
  
  int
  os_exists(path)
! 	string_ty	*path;
  {
  	struct stat	buf;
  
***************
*** 760,766 ****
   *	os_accdir - return the directory path of the users account
   *
   * SYNOPSIS
!  *	string_t *os_accdir(void);
   *
   * DESCRIPTION
   *	The full pathname of the user's account is returned.
--- 759,765 ----
   *	os_accdir - return the directory path of the users account
   *
   * SYNOPSIS
!  *	string_ty *os_accdir(void);
   *
   * DESCRIPTION
   *	The full pathname of the user's account is returned.
***************
*** 774,784 ****
   *	Use str_free() when you are done with the value returned.
   */
  
! string_t *
  os_accdir()
  {
  	static char	home[] = "HOME";
! 	static string_t	*s;
  
  	if (!s)
  	{
--- 773,783 ----
   *	Use str_free() when you are done with the value returned.
   */
  
! string_ty *
  os_accdir()
  {
  	static char	home[] = "HOME";
! 	static string_ty	*s;
  
  	if (!s)
  	{
***************
*** 802,808 ****
   *	os_curdir - full current directory path
   *
   * SYNOPSIS
!  *	string_t *os_curdir(void);
   *
   * DESCRIPTION
   *	Os_curdir is used to determine the full pathname
--- 801,807 ----
   *	os_curdir - full current directory path
   *
   * SYNOPSIS
!  *	string_ty *os_curdir(void);
   *
   * DESCRIPTION
   *	Os_curdir is used to determine the full pathname
***************
*** 816,825 ****
   *	Use str_free() when you are done with the value returned.
   */
  
! string_t *
  os_curdir()
  {
! 	static string_t	*s;
  
  	if (!s)
  	{
--- 815,824 ----
   *	Use str_free() when you are done with the value returned.
   */
  
! string_ty *
  os_curdir()
  {
! 	static string_ty	*s;
  
  	if (!s)
  	{
***************
*** 842,848 ****
   *	os_pathname - determine full file name
   *
   * SYNOPSIS
!  *	string_t *os_pathname(string_t *path);
   *
   * DESCRIPTION
   *	Os_pathname is used to determine the full path name
--- 841,847 ----
   *	os_pathname - determine full file name
   *
   * SYNOPSIS
!  *	string_ty *os_pathname(string_ty *path);
   *
   * DESCRIPTION
   *	Os_pathname is used to determine the full path name
***************
*** 855,863 ****
   *	Use str_free() when you are done with the value returned.
   */
  
! string_t *
  os_pathname(path)
! 	string_t	*path;
  {
  	static char	*tmp;
  	static size_t	tmplen;
--- 854,862 ----
   *	Use str_free() when you are done with the value returned.
   */
  
! string_ty *
  os_pathname(path)
! 	string_ty	*path;
  {
  	static char	*tmp;
  	static size_t	tmplen;
***************
*** 869,875 ****
  	char		link[2000];
  	int		nbytes;
  	wlist		loop;
! 	string_t	*s;
  #endif
  
  	/*
--- 868,874 ----
  	char		link[2000];
  	int		nbytes;
  	wlist		loop;
! 	string_ty	*s;
  #endif
  
  	/*
***************
*** 879,885 ****
  	trace_string(path->str_text);
  	if (path->str_text[0] != '/')
  	{
! 		string_t	*cwd;
  
  		cwd = os_curdir();
  		assert(cwd);
--- 878,884 ----
  	trace_string(path->str_text);
  	if (path->str_text[0] != '/')
  	{
! 		string_ty	*cwd;
  
  		cwd = os_curdir();
  		assert(cwd);
***************
*** 1001,1007 ****
  		}
  		else
  		{
! 			string_t	*newpath;
  
  			if (nbytes == 0)
  			{
--- 1000,1006 ----
  		}
  		else
  		{
! 			string_ty	*newpath;
  
  			if (nbytes == 0)
  			{
***************
*** 1079,1085 ****
   *	os_entryname - take path apart
   *
   * SYNOPSIS
!  *	string_t *os_entryname(string_t *path);
   *
   * DESCRIPTION
   *	Os_entryname is used to extract the entry part
--- 1078,1084 ----
   *	os_entryname - take path apart
   *
   * SYNOPSIS
!  *	string_ty *os_entryname(string_ty *path);
   *
   * DESCRIPTION
   *	Os_entryname is used to extract the entry part
***************
*** 1092,1100 ****
   *	Use str_free() when you are done with the return value.
   */
  
! string_t *
  os_entryname(path)
! 	string_t	*path;
  {
  	char		*cp;
  
--- 1091,1099 ----
   *	Use str_free() when you are done with the return value.
   */
  
! string_ty *
  os_entryname(path)
! 	string_ty	*path;
  {
  	char		*cp;
  
***************
*** 1117,1123 ****
   *	os_dirname - take path apart
   *
   * SYNOPSIS
!  *	string_t *os_dirname(string_t *path);
   *
   * DESCRIPTION
   *	Os_dirname is used to extract the directory part
--- 1116,1122 ----
   *	os_dirname - take path apart
   *
   * SYNOPSIS
!  *	string_ty *os_dirname(string_ty *path);
   *
   * DESCRIPTION
   *	Os_dirname is used to extract the directory part
***************
*** 1131,1139 ****
   *	Use str_free() when you are done with the value returned.
   */
  
! string_t *
  os_dirname(path)
! 	string_t	*path;
  {
  	char		*cp;
  
--- 1130,1138 ----
   *	Use str_free() when you are done with the value returned.
   */
  
! string_ty *
  os_dirname(path)
! 	string_ty	*path;
  {
  	char		*cp;
  
***************
*** 1320,1326 ****
   *	os_legal_path - test if path is legal
   *
   * SYNOPSIS
!  *	int os_legal_path(string_t *path);
   *
   * DESCRIPTION
   *	The os_legal_path function is used to test if each of the components of
--- 1319,1325 ----
   *	os_legal_path - test if path is legal
   *
   * SYNOPSIS
!  *	int os_legal_path(string_ty *path);
   *
   * DESCRIPTION
   *	The os_legal_path function is used to test if each of the components of
***************
*** 1332,1338 ****
  
  int
  os_legal_path(str)
! 	string_t	*str;
  {
  	char		*s;
  	char		*ep;
--- 1331,1337 ----
  
  int
  os_legal_path(str)
! 	string_ty	*str;
  {
  	char		*s;
  	char		*ep;
Index: cook/os.h
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1990-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 28,49 ****
  #include <str.h>
  #include <word.h>
  
! time_t os_mtime _((string_t*));
! int os_mtime_adjust _((string_t*));
! int os_touch _((string_t*));
! int os_execute _((wlist *cmd, string_t *input));
! int os_exists _((string_t*));
! string_t *os_accdir _((void));
! string_t *os_curdir _((void));
! string_t *os_dirname _((string_t*));
! string_t *os_entryname _((string_t*));
! string_t *os_pathname _((string_t*));
! int os_legal_path _((string_t*));
! int os_delete _((string_t*));
  void os_meter_begin _((void));
  void os_meter_end _((void));
  char *signal_name _((int));
! int os_clear_stat _((string_t *));
  int exit_status _((char *, int));
  
  #endif /* OS_H */
--- 28,49 ----
  #include <str.h>
  #include <word.h>
  
! time_t os_mtime _((string_ty *));
! int os_mtime_adjust _((string_ty *));
! int os_touch _((string_ty *));
! int os_execute _((wlist *cmd, string_ty *input));
! int os_exists _((string_ty *));
! string_ty *os_accdir _((void));
! string_ty *os_curdir _((void));
! string_ty *os_dirname _((string_ty *));
! string_ty *os_entryname _((string_ty *));
! string_ty *os_pathname _((string_ty *));
! int os_legal_path _((string_ty *));
! int os_delete _((string_ty *));
  void os_meter_begin _((void));
  void os_meter_end _((void));
  char *signal_name _((int));
! int os_clear_stat _((string_ty *));
  int exit_status _((char *, int));
  
  #endif /* OS_H */
Index: cook/parse.h
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1992-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 25,33 ****
  
  #include <main.h>
  
! struct string_t;
  
! void parse _((struct string_t *));
  void parse_initialize _((void));
  
  #endif /* PARSE_H */
--- 25,33 ----
  
  #include <main.h>
  
! struct string_ty;
  
! void parse _((struct string_ty *));
  void parse_initialize _((void));
  
  #endif /* PARSE_H */
Index: cook/parse.y
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1990-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 90,103 ****
  void
  parse_initialize()
  {
! 	typedef struct table_t table_t;
! 	struct table_t
  	{
  		char	*t_name;
  		int	t_mask;
  	};
  
! 	static table_t table[] =
  	{
  		{ "errok",		RF_ERROK,		},
  		{ "noerrok",		RF_ERROK_OFF,		},
--- 90,103 ----
  void
  parse_initialize()
  {
! 	typedef struct table_ty table_ty;
! 	struct table_ty
  	{
  		char	*t_name;
  		int	t_mask;
  	};
  
! 	static table_ty table[] =
  	{
  		{ "errok",		RF_ERROK,		},
  		{ "noerrok",		RF_ERROK_OFF,		},
***************
*** 115,126 ****
  		{ "noclearstat",	RF_CLEARSTAT_OFF,	},
  	};
  
! 	table_t *tp;
  
  	trace(("parse_initialize()\n{\n"/*}*/));
  	for (tp = table; tp < ENDOF(table); ++tp)
  	{
! 		string_t *s;
  
  		s = str_from_c(tp->t_name);
  		id_assign(s, ID_CLASS_FLAGS, &tp->t_mask);
--- 115,126 ----
  		{ "noclearstat",	RF_CLEARSTAT_OFF,	},
  	};
  
! 	table_ty *tp;
  
  	trace(("parse_initialize()\n{\n"/*}*/));
  	for (tp = table; tp < ENDOF(table); ++tp)
  	{
! 		string_ty *s;
  
  		s = str_from_c(tp->t_name);
  		id_assign(s, ID_CLASS_FLAGS, &tp->t_mask);
***************
*** 135,141 ****
   *	parse - read and process a cookbook
   *
   *  SYNOPSIS
!  *	void parse(string_t *filename);
   *
   *  DESCRIPTION
   *	Parse reads and processes a cookbook.
--- 135,141 ----
   *	parse - read and process a cookbook
   *
   *  SYNOPSIS
!  *	void parse(string_ty *filename);
   *
   *  DESCRIPTION
   *	Parse reads and processes a cookbook.
***************
*** 147,153 ****
  
  void
  parse(filename)
! 	string_t *filename;
  {
  	int yyparse _((void)); /* forward */
  
--- 147,153 ----
  
  void
  parse(filename)
! 	string_ty *filename;
  {
  	int yyparse _((void)); /* forward */
  
***************
*** 171,177 ****
  	expr		*lv_expr;
  	stmt		*lv_stmt;
  	elist		lv_elist;
! 	string_t	*lv_word;
  	int		lv_flag;
  	position	lv_position;
  }
--- 171,177 ----
  	expr		*lv_expr;
  	stmt		*lv_stmt;
  	elist		lv_elist;
! 	string_ty	*lv_word;
  	int		lv_flag;
  	position	lv_position;
  }
Index: cook/stmt.c
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1990-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 63,76 ****
  stmt *
  stmt_alloc()
  {
!     stmt    *sp;
  
!     trace(("stmt_alloc()\n{\n"/*}*/));
!     sp = (stmt *)mem_alloc_clear(sizeof(stmt));
!     sp->s_references = 1;
!     trace(("return %08lX;\n", sp));
!     trace((/*{*/"}\n"));
!     return sp;
  }
  
  
--- 63,76 ----
  stmt *
  stmt_alloc()
  {
! 	stmt		*sp;
  
! 	trace(("stmt_alloc()\n{\n"/*}*/));
! 	sp = (stmt *)mem_alloc_clear(sizeof(stmt));
! 	sp->s_references = 1;
! 	trace(("return %08lX;\n", sp));
! 	trace((/*{*/"}\n"));
! 	return sp;
  }
  
  
***************
*** 94,106 ****
  
  stmt *
  stmt_copy(sp)
!     stmt    *sp;
  {
!     trace(("stmt_copy(sp = %08X)\n{\n"/*}*/, sp));
!     sp->s_references++;
!     trace(("return %08X;\n", sp));
!     trace((/*{*/"}\n"));
!     return sp;
  }
  
  
--- 94,106 ----
  
  stmt *
  stmt_copy(sp)
! 	stmt		*sp;
  {
! 	trace(("stmt_copy(sp = %08X)\n{\n"/*}*/, sp));
! 	sp->s_references++;
! 	trace(("return %08X;\n", sp));
! 	trace((/*{*/"}\n"));
! 	return sp;
  }
  
  
***************
*** 120,191 ****
  
  void
  stmt_free(sp)
!     stmt    *sp;
  {
!     trace(("stmt_free(sp = %08X)\n{\n"/*}*/, sp));
!     assert(sp);
!     sp->s_references--;
!     if (sp->s_references > 0)
! 	goto ret;
!     assert(sp->s_references == 0);
!     switch ((int)sp->s_op)
!     {
!     default:
! 	fatal("bad statement selector %d (bug)", sp->s_op);
  
!     case OP_ASSIGN:
! 	el_free(&sp->s_assign.a_name);
! 	el_free(&sp->s_assign.a_value);
! 	break;
  
!     case OP_COMMAND:
! 	el_free(&sp->s_cmd.c_args);
! 	if (sp->s_cmd.c_input)
! 	    expr_free(sp->s_cmd.c_input);
! 	break;
  
!     case OP_TOUCH:
!     case OP_UNSETENV:
! 	el_free(&sp->s_cmd.c_args);
! 	break;
  
!     case OP_COMPOUND:
! 	sl_free(&sp->s_list);
! 	break;
  
!     case OP_SET:
!     case OP_LOOPSTOP:
!     case OP_NOP:
!     case OP_FAIL:
!     case OP_FAIL_DK:
! 	break;
  
!     case OP_IF:
! 	expr_free(sp->s_if.sif_cond);
! 	stmt_free(sp->s_if.sif_true);
!         stmt_free(sp->s_if.sif_false);
! 	break;
  
!     case OP_LOOP:
! 	stmt_free(sp->s_loop);
! 	break;
  
!     case OP_RECIPE:
! 	el_free(&sp->s_recipe.sr_target);
! 	el_free(&sp->s_recipe.sr_need);
! 	el_free(&sp->s_recipe.sr_need2);
! 	if (sp->s_recipe.sr_precondition)
! 	    expr_free(sp->s_recipe.sr_precondition);
! 	if (sp->s_recipe.sr_action)
! 	    stmt_free(sp->s_recipe.sr_action);
! 	if (sp->s_recipe.sr_use_action)
! 	    stmt_free(sp->s_recipe.sr_use_action);
! 	str_free(sp->s_recipe.sr_position.pos_name);
! 	break;
!     }
!     mem_free((char *)sp);
  ret:
!     trace((/*{*/"}\n"));
  }
  
  
--- 120,191 ----
  
  void
  stmt_free(sp)
! 	stmt		*sp;
  {
! 	trace(("stmt_free(sp = %08X)\n{\n"/*}*/, sp));
! 	assert(sp);
! 	sp->s_references--;
! 	if (sp->s_references > 0)
! 		goto ret;
! 	assert(sp->s_references == 0);
! 	switch ((int)sp->s_op)
! 	{
! 	default:
! 		fatal("bad statement selector %d (bug)", sp->s_op);
  
! 	case OP_ASSIGN:
! 		el_free(&sp->s_assign.a_name);
! 		el_free(&sp->s_assign.a_value);
! 		break;
  
! 	case OP_COMMAND:
! 		el_free(&sp->s_cmd.c_args);
! 		if (sp->s_cmd.c_input)
! 			expr_free(sp->s_cmd.c_input);
! 		break;
  
! 	case OP_TOUCH:
! 	case OP_UNSETENV:
! 		el_free(&sp->s_cmd.c_args);
! 		break;
  
! 	case OP_COMPOUND:
! 		sl_free(&sp->s_list);
! 		break;
  
! 	case OP_SET:
! 	case OP_LOOPSTOP:
! 	case OP_NOP:
! 	case OP_FAIL:
! 	case OP_FAIL_DK:
! 		break;
  
! 	case OP_IF:
! 		expr_free(sp->s_if.sif_cond);
! 		stmt_free(sp->s_if.sif_true);
! 		stmt_free(sp->s_if.sif_false);
! 		break;
  
! 	case OP_LOOP:
! 		stmt_free(sp->s_loop);
! 		break;
  
! 	case OP_RECIPE:
! 		el_free(&sp->s_recipe.sr_target);
! 		el_free(&sp->s_recipe.sr_need);
! 		el_free(&sp->s_recipe.sr_need2);
! 		if (sp->s_recipe.sr_precondition)
! 			expr_free(sp->s_recipe.sr_precondition);
! 		if (sp->s_recipe.sr_action)
! 			stmt_free(sp->s_recipe.sr_action);
! 		if (sp->s_recipe.sr_use_action)
! 			stmt_free(sp->s_recipe.sr_use_action);
! 		str_free(sp->s_recipe.sr_position.pos_name);
! 		break;
! 	}
! 	mem_free((char *)sp);
  ret:
! 	trace((/*{*/"}\n"));
  }
  
  
***************
*** 219,639 ****
  
  int
  stmt_eval(sp)
!     stmt    *sp;
  {
!     int	    status;
  
!     trace(("stmt_eval(sp = %08X)\n{\n"/*}*/, sp));
!     assert(sp);
!     if (desist)
!     {
! 	status = STMT_ERROR;
! 	goto ret;
!     }
!     status = STMT_OK;
!     switch ((int)sp->s_op)
!     {
!     default:
! 	error("bad statement selector %d (bug)", sp->s_op);
! 	option_set_errors();
! 	status = STMT_ERROR;
! 	break;
! 
!     case OP_ASSIGN:
  	{
- 	    wlist    name;
- 	    wlist    value;
- 	    static string_t *setenv_word;
- 	    static string_t *mtime_word;
- 
- 	    /*
- 	     *	The grammar has the assignment as an expression list.
- 	     *	Evaluate the expression list into a word list.
- 	     *	This word list is the value to assign.
- 	     */
- 	    if (!setenv_word)
- 		setenv_word = str_from_c("setenv");
- 	    if (!mtime_word)
- 		mtime_word = str_from_c("mtime");
- 	    wl_zero(&name);
- 	    if (el2wl(&name, &sp->s_assign.a_name))
- 	    {
  		status = STMT_ERROR;
! 		break;
! 	    }
! 	    switch (name.wl_nwords)
! 	    {
! 	    case 0:
! 		error("lefthand side of assignment is empty");
  		option_set_errors();
  		status = STMT_ERROR;
  		break;
  
! 	    case 1:
! 	        if (el2wl(&value, &sp->s_assign.a_value))
! 	        {
! 		    status = STMT_ERROR;
! 		    break;
! 	        }
! 	        id_assign(name.wl_word[0], ID_CLASS_VARIABLE, &value);
! 		wl_free(&value);
  		break;
  
! 	    case 2:
! 		if (str_equal(name.wl_word[0], setenv_word))
  		{
! 		    string_t *s;
  
! 	            if (el2wl(&value, &sp->s_assign.a_value))
! 	            {
! 		        status = STMT_ERROR;
! 		        break;
! 	            }
! 	    	    s = wl2str(&value, 0, 32767);
! 		    wl_free(&value);
! 	            setenv(name.wl_word[1]->str_text, s->str_text);
! 		    str_free(s);
! 		    break;
  		}
! #if 0
! 		if (str_equal(name.wl_word[0], mtime_word))
  		{
! 	            mtime_pattern(name.wl_word[1], &sp->s_assign.a_value);
! 		    break;
! 		}
! #endif
! 		/* fall through... */
  
! 	    default:
! 		error("lefthand side of assignment is more than one word");
! 		option_set_errors();
! 		status = STMT_ERROR;
! 		break;
! 	    }
! 	    wl_free(&name);
! 	}
! 	break;
  
!     case OP_UNSETENV:
! 	{
! 	    wlist   wl;
! 	    int     j;
  
! 	    wl_zero(&wl);
! 	    if (el2wl(&wl, &sp->s_cmd.c_args))
! 	    {
! 		status = STMT_ERROR;
  		break;
- 	    }
- 	    if (!wl.wl_nwords)
- 	    {
- 		error("unsetenv was given no words");
- 		option_set_errors();
- 		status = STMT_ERROR;
- 	    }
- 	    for (j = 0; j < wl.wl_nwords; ++j)
- 		unsetenv(wl.wl_word[j]->str_text);
- 	    wl_free(&wl);
- 	}
- 	break;
  
!     case OP_COMMAND:
! 	{
! 	    wlist   wl;
! 	    int	    metering;
  
! 	    /*
! 	     *	The grammar has the command as an expression list.
! 	     *	Evaluate the expression list into a word list.
! 	     *	This word list is the command to execute.
! 	     */
! 	    if (el2wl(&wl, &sp->s_cmd.c_args))
! 	    {
  		status = STMT_ERROR;
  		break;
- 	    }
- 	    cook_flags(sp->s_cmd.c_flags, OPTION_LEVEL_EXECUTE);
- 	    if (!option_test(OPTION_SILENT))
- 	    {
- 		string_t *cp;
  
! 		/*
! 		 *  If the command has not been silenced,
! 		 *  form it into a string and echo it.
! 		 */
! 		cp = wl2str(&wl, 0, 32767);
! 		error("%s", cp->str_text);
! 		str_free(cp);
! 		metering = option_test(OPTION_METER);
! 	    }
! 	    else
! 	    {
! 		/* no metering if silent */
! 		metering = 0;
! 	    }
! 	    if (option_test(OPTION_ACTION))
! 	    {
! 		string_t *s;
  
! 		if (sp->s_cmd.c_input)
  		{
! 		    wlist    input;
  
! 		    wl_zero(&input);
! 		    if (expr_eval(&input, sp->s_cmd.c_input))
! 		    {
! 			status = STMT_ERROR;
! 			break;
! 		    }
! 		    s = wl2str(&input, 0, 32767);
! 		    wl_free(&input);
  		}
! 		else
! 		    s = 0;
! 		if (metering)
! 		    os_meter_begin();
! 		switch (os_execute(&wl, s))
  		{
  		case -1:
! 		    status = STMT_ERROR;
! 		    break;
  
  		case 0:
! 		    break;
  
  		default:
! 		    if (!option_test(OPTION_ERROK))
! 		        status = STMT_ERROR;
! 		    break;
  		}
! 		if (metering)
! 		    os_meter_end();
! 		if (s)
! 		    str_free(s);
! 	    }
!     	    if (option_test(OPTION_INVALIDATE_STAT_CACHE))
!     	    {
! 		int     j;
  
! 	        for (j = 0; j < wl.wl_nwords; ++j)
! 	            if (os_clear_stat(wl.wl_word[j]))
! 			status = STMT_ERROR;
!             }
! 	    wl_free(&wl);
! 	    option_undo_level(OPTION_LEVEL_EXECUTE);
! 	}
! 	break;
  
!     case OP_SET:
!         cook_flags(sp->s_cmd.c_flags, OPTION_LEVEL_COOKBOOK);
! 	break;
  
!     case OP_FAIL:
! 	status = STMT_ERROR;
! 	break;
  
!     case OP_FAIL_DK:
! 	status = STMT_BACKTRACK;
! 	break;
  
!     case OP_COMPOUND:
! 	{
! 	    int	    j;
  
! 	    for (j = 0; j < sp->s_list.sl_nstmts; j++)
! 	    {
! 		status = stmt_eval(sp->s_list.sl_stmt[j]);
! 		if (status != STMT_OK)
! 		    break;
! 	    }
! 	}
! 	break;
  
!     case OP_IF:
! 	switch (expr_eval_condition(sp->s_if.sif_cond))
! 	{
! 	case -1:
! 	    status = STMT_ERROR;
! 	    break;
  
! 	case 0:
! 	    status = stmt_eval(sp->s_if.sif_false);
! 	    break;
! 
! 	default:
! 	    status = stmt_eval(sp->s_if.sif_true);
! 	    break;
! 	}
! 	break;
! 
!     case OP_LOOP:
! 	do
! 	    status = stmt_eval(sp->s_loop);
! 	while
! 	    (status == STMT_OK);
! 	if (status == STMT_LSTOP)
! 	    status = STMT_OK;
! 	break;
! 
!     case OP_LOOPSTOP:
! 	status = STMT_LSTOP;
! 	break;
! 
!     case OP_NOP:
! 	break;
! 
!     case OP_RECIPE:
! 	{
! 	    recipe  r;
! 	    int     j;
! 	    int     imp;
! 
! 	    /*
! 	     *	A recipe in the grammar has expression lists for
! 	     *	both targets and prerequisites.  These must be evaluated
! 	     *	into word lists when the recipes are instanciated.
! 	     */
! 	    if (el2wl(&r.r_target, &sp->s_recipe.sr_target))
! 	    {
! 		status = STMT_ERROR;
  		break;
- 	    }
- 	    if (r.r_target.wl_nwords == 0)
- 	    {
- 		error
- 		(
- 		    "%s: %d: attempt to instanciate recipe with no targets",
- 		    sp->s_recipe.sr_position.pos_name->str_text,
- 		    sp->s_recipe.sr_position.pos_line
- 		);
- 		option_set_errors();
- 		status = STMT_ERROR;
- 		break;
- 	    }
- 	    el_copy(&r.r_need, &sp->s_recipe.sr_need);
- 	    el_copy(&r.r_need2, &sp->s_recipe.sr_need2);
- 	    r.r_precondition =
- 		(
- 		    sp->s_recipe.sr_precondition
- 		?
- 		    expr_copy(sp->s_recipe.sr_precondition)
- 		:
- 		    (expr*)0
- 		);
- 	    r.r_flags = sp->s_recipe.sr_flags;
- 	    r.r_action =
- 		(
- 		    sp->s_recipe.sr_action
- 		?
- 		    stmt_copy(sp->s_recipe.sr_action)
- 		:
- 		    (stmt*)0
- 		);
- 	    r.r_use_action =
- 		(
- 		    sp->s_recipe.sr_use_action
- 		?
- 		    stmt_copy(sp->s_recipe.sr_use_action)
- 		:
- 		    (stmt*)0
- 		);
- 	    r.r_tag = recipe_tag();
- 	    r.r_multiple = sp->s_recipe.sr_multiple;
  
! 	    /*
! 	     *  is it implicit or explicit?
! 	     */
! 	    imp = 0;
! 	    for (j = 0; j < r.r_target.wl_nwords; ++j)
! 	    {
! 		if (strchr(r.r_target.wl_word[j]->str_text, MATCH_CHAR))
  		{
! 		    imp = 1;
! 		    break;
! 		}
! 	    }
  
! 	    /*
! 	     *  add it to the list
! 	     */
! 	    if (imp)
! 	    {
! 	        rl_append(&implicit, &r);
! #if 0
! 		if (!r.r_need.el_nexprs)
! 		{
! 		    error
! 		    (
! 			"%s: %d: implicit recipe must have action",
! 		        sp->s_recipe.sr_position.pos_name->str_text,
! 		        sp->s_recipe.sr_position.pos_line
! 		    );
! 		    option_set_errors();
! 		}
! #endif
! 	    }
! 	    else
! 	        rl_append(&explicit, &r);
  
! 	    /*
! 	     *  emit trace information, if enabled
! 	     */
! 	    if (option_test(OPTION_TRACE))
! 	    {
! 		error
! 		(
! 		    "%s: %d: %s recipe %d instanciated (trace)",
! 		    sp->s_recipe.sr_position.pos_name->str_text,
! 		    sp->s_recipe.sr_position.pos_line,
! 		    imp ? "implicit" : "explicit",
! 		    r.r_tag
! 		);
! 	    }
! 	}
! 	break;
  
!     case OP_TOUCH:
! 	{
! 	    wlist    wl;
! 
! 	    /*
! 	     *	The grammar has the command as an expression list.
! 	     *	Evaluate the expression list into a word list.
! 	     *	This word list is the command to execute.
! 	     */
! 	    if (el2wl(&wl, &sp->s_cmd.c_args))
! 	    {
! 		status = STMT_ERROR;
  		break;
- 	    }
- 	    if (!option_test(OPTION_SILENT))
- 	    {
- 		string_t *s;
- 
- 		/*
- 		 *  If the command has not been silenced,
- 		 *  form it into a string and echo it.
- 		 */
- 		s = wl2str(&wl, 0, 32767);
- 		error("touch %s", s->str_text);
- 		str_free(s);
- 	    }
- 	    if (option_test(OPTION_ACTION))
- 	    {
- 		int	j;
- 
- 		for (j = 0; j < wl.wl_nwords; j++)
- 		    if (os_touch(wl.wl_word[j]))
- 			status = STMT_ERROR;
- 	    }
- 	    wl_free(&wl);
  	}
- 	break;
-     }
  ret:
!     trace(("return %d;\n", status));
!     trace((/*{*/"}\n"));
!     return status;
  }
  
  
--- 219,660 ----
  
  int
  stmt_eval(sp)
! 	stmt		*sp;
  {
! 	int		status;
  
! 	trace(("stmt_eval(sp = %08X)\n{\n"/*}*/, sp));
! 	assert(sp);
! 	if (desist)
  	{
  		status = STMT_ERROR;
! 		goto ret;
! 	}
! 	status = STMT_OK;
! 	switch ((int)sp->s_op)
! 	{
! 	default:
! 		error("bad statement selector %d (bug)", sp->s_op);
  		option_set_errors();
  		status = STMT_ERROR;
  		break;
  
! 	case OP_ASSIGN:
! 		{
! 			wlist		name;
! 			wlist		value;
! 			static string_ty	*setenv_word;
! 			static string_ty	*mtime_word;
! 
! 			/*
! 			 * The grammar has the assignment as an expression list.
! 			 * Evaluate the expression list into a word list.
! 			 * This word list is the value to assign.
! 			 */
! 			if (!setenv_word)
! 				setenv_word = str_from_c("setenv");
! 			if (!mtime_word)
! 				mtime_word = str_from_c("mtime");
! 			wl_zero(&name);
! 			if (el2wl(&name, &sp->s_assign.a_name))
! 			{
! 				status = STMT_ERROR;
! 				break;
! 			}
! 			switch (name.wl_nwords)
! 			{
! 			case 0:
! 				error("lefthand side of assignment is empty");
! 				option_set_errors();
! 				status = STMT_ERROR;
! 				break;
! 
! 			case 1:
! 				if (el2wl(&value, &sp->s_assign.a_value))
! 				{
! 					status = STMT_ERROR;
! 					break;
! 				}
! 				id_assign
! 				(
! 					name.wl_word[0],
! 					ID_CLASS_VARIABLE,
! 					&value
! 				);
! 				wl_free(&value);
! 				break;
! 
! 			case 2:
! 				if (str_equal(name.wl_word[0], setenv_word))
! 				{
! 					string_ty *s;
! 
! 					if (el2wl(&value, &sp->s_assign.a_value))
! 					{
! 						status = STMT_ERROR;
! 						break;
! 					}
! 					s = wl2str(&value, 0, 32767);
! 					wl_free(&value);
! 					env_set
! 					(
! 						name.wl_word[1]->str_text,
! 						s->str_text
! 					);
! 					str_free(s);
! 					break;
! 				}
! #if 0
! 				if (str_equal(name.wl_word[0], mtime_word))
! 				{
! 					mtime_pattern
! 					(
! 						name.wl_word[1],
! 						&sp->s_assign.a_value
! 					);
! 					break;
! 				}
! #endif
! 				/* fall through... */
! 
! 			default:
! 				error
! 				(
! 			     "lefthand side of assignment is more than one word"
! 				);
! 				option_set_errors();
! 				status = STMT_ERROR;
! 				break;
! 			}
! 			wl_free(&name);
! 		}
  		break;
  
! 	case OP_UNSETENV:
  		{
! 			wlist		wl;
! 			int		j;
  
! 			wl_zero(&wl);
! 			if (el2wl(&wl, &sp->s_cmd.c_args))
! 			{
! 				status = STMT_ERROR;
! 				break;
! 			}
! 			if (!wl.wl_nwords)
! 			{
! 				error("unsetenv was given no words");
! 				option_set_errors();
! 				status = STMT_ERROR;
! 			}
! 			for (j = 0; j < wl.wl_nwords; ++j)
! 				env_unset(wl.wl_word[j]->str_text);
! 			wl_free(&wl);
  		}
! 		break;
! 
! 	case OP_COMMAND:
  		{
! 			wlist	wl;
! 			int		metering;
  
! 			/*
! 			 * The grammar has the command as an expression list.
! 			 * Evaluate the expression list into a word list.
! 			 * This word list is the command to execute.
! 			 */
! 			if (el2wl(&wl, &sp->s_cmd.c_args))
! 			{
! 				status = STMT_ERROR;
! 				break;
! 			}
! 			cook_flags(sp->s_cmd.c_flags, OPTION_LEVEL_EXECUTE);
! 			if (!option_test(OPTION_SILENT))
! 			{
! 				string_ty *cp;
  
! 				/*
! 				 * If the command has not been silenced,
! 				 * form it into a string and echo it.
! 				 */
! 				cp = wl2str(&wl, 0, 32767);
! 				error("%s", cp->str_text);
! 				str_free(cp);
! 				metering = option_test(OPTION_METER);
! 			}
! 			else
! 			{
! 				/* no metering if silent */
! 				metering = 0;
! 			}
! 			if (option_test(OPTION_ACTION))
! 			{
! 				string_ty *s;
  
! 				if (sp->s_cmd.c_input)
! 				{
! 					wlist	 input;
! 
! 					wl_zero(&input);
! 					if (expr_eval(&input, sp->s_cmd.c_input))
! 					{
! 						status = STMT_ERROR;
! 						break;
! 					}
! 					s = wl2str(&input, 0, 32767);
! 					wl_free(&input);
! 				}
! 				else
! 					s = 0;
! 				if (metering)
! 					os_meter_begin();
! 				switch (os_execute(&wl, s))
! 				{
! 				case -1:
! 					status = STMT_ERROR;
! 					break;
! 
! 				case 0:
! 					break;
! 
! 				default:
! 					if (!option_test(OPTION_ERROK))
! 						status = STMT_ERROR;
! 					break;
! 				}
! 				if (metering)
! 					os_meter_end();
! 				if (s)
! 					str_free(s);
! 			}
! 			if (option_test(OPTION_INVALIDATE_STAT_CACHE))
! 			{
! 				int		j;
! 
! 				for (j = 0; j < wl.wl_nwords; ++j)
! 					if (os_clear_stat(wl.wl_word[j]))
! 						status = STMT_ERROR;
! 			}
! 			wl_free(&wl);
! 			option_undo_level(OPTION_LEVEL_EXECUTE);
! 		}
  		break;
  
! 	case OP_SET:
! 		cook_flags(sp->s_cmd.c_flags, OPTION_LEVEL_COOKBOOK);
! 		break;
  
! 	case OP_FAIL:
  		status = STMT_ERROR;
  		break;
  
! 	case OP_FAIL_DK:
! 		status = STMT_BACKTRACK;
! 		break;
  
! 	case OP_COMPOUND:
  		{
! 			int		j;
  
! 			for (j = 0; j < sp->s_list.sl_nstmts; j++)
! 			{
! 				status = stmt_eval(sp->s_list.sl_stmt[j]);
! 				if (status != STMT_OK)
! 					break;
! 			}
  		}
! 		break;
! 
! 	case OP_IF:
! 		switch (expr_eval_condition(sp->s_if.sif_cond))
  		{
  		case -1:
! 			status = STMT_ERROR;
! 			break;
  
  		case 0:
! 			status = stmt_eval(sp->s_if.sif_false);
! 			break;
  
  		default:
! 			status = stmt_eval(sp->s_if.sif_true);
! 			break;
  		}
! 		break;
  
! 	case OP_LOOP:
! 		do
! 			status = stmt_eval(sp->s_loop);
! 		while
! 			(status == STMT_OK);
! 		if (status == STMT_LSTOP)
! 			status = STMT_OK;
! 		break;
  
! 	case OP_LOOPSTOP:
! 		status = STMT_LSTOP;
! 		break;
  
! 	case OP_NOP:
! 		break;
  
! 	case OP_RECIPE:
! 		{
! 			recipe		r;
! 			int		j;
! 			int		imp;
  
! 			/*
! 			 * A recipe in the grammar has expression lists for
! 			 * both targets and prerequisites.  These must be
! 			 * evaluated into word lists when the recipes are
! 			 * instanciated.
! 			 */
! 			if (el2wl(&r.r_target, &sp->s_recipe.sr_target))
! 			{
! 				status = STMT_ERROR;
! 				break;
! 			}
! 			if (r.r_target.wl_nwords == 0)
! 			{
! 				error
! 				(
! 			"%s: %d: attempt to instanciate recipe with no targets",
! 					sp->s_recipe.sr_position.pos_name
! 						->str_text,
! 					sp->s_recipe.sr_position.pos_line
! 				);
! 				option_set_errors();
! 				status = STMT_ERROR;
! 				break;
! 			}
! 			el_copy(&r.r_need, &sp->s_recipe.sr_need);
! 			el_copy(&r.r_need2, &sp->s_recipe.sr_need2);
! 			r.r_precondition =
! 				(
! 					sp->s_recipe.sr_precondition
! 				?
! 					expr_copy(sp->s_recipe.sr_precondition)
! 				:
! 					(expr*)0
! 				);
! 			r.r_flags = sp->s_recipe.sr_flags;
! 			r.r_action =
! 				(
! 					sp->s_recipe.sr_action
! 				?
! 					stmt_copy(sp->s_recipe.sr_action)
! 				:
! 					(stmt*)0
! 				);
! 			r.r_use_action =
! 				(
! 					sp->s_recipe.sr_use_action
! 				?
! 					stmt_copy(sp->s_recipe.sr_use_action)
! 				:
! 					(stmt*)0
! 				);
! 			r.r_tag = recipe_tag();
! 			r.r_multiple = sp->s_recipe.sr_multiple;
  
! 			/*
! 			 * is it implicit or explicit?
! 			 */
! 			imp = 0;
! 			for (j = 0; j < r.r_target.wl_nwords; ++j)
! 			{
! 				if (strchr(r.r_target.wl_word[j]->str_text, MATCH_CHAR))
! 				{
! 					imp = 1;
! 					break;
! 				}
! 			}
  
! 			/*
! 			 * add it to the list
! 			 */
! 			if (imp)
! 			{
! 				rl_append(&implicit, &r);
! #if 0
! 				if (!r.r_need.el_nexprs)
! 				{
! 					error
! 					(
! 				     "%s: %d: implicit recipe must have action",
! 						sp->s_recipe.sr_position
! 							.pos_name->str_text,
! 						sp->s_recipe.sr_position
! 							.pos_line
! 					);
! 					option_set_errors();
! 				}
! #endif
! 			}
! 			else
! 				rl_append(&explicit, &r);
  
! 			/*
! 			 * emit trace information, if enabled
! 			 */
! 			if (option_test(OPTION_TRACE))
! 			{
! 				error
! 				(
! 				    "%s: %d: %s recipe %d instanciated (trace)",
! 					sp->s_recipe.sr_position.pos_name
! 						->str_text,
! 					sp->s_recipe.sr_position.pos_line,
! 					imp ? "implicit" : "explicit",
! 					r.r_tag
! 				);
! 			}
! 		}
  		break;
  
! 	case OP_TOUCH:
  		{
! 			wlist	 wl;
  
! 			/*
! 			 * The grammar has the command as an expression list.
! 			 * Evaluate the expression list into a word list.
! 			 * This word list is the command to execute.
! 			 */
! 			if (el2wl(&wl, &sp->s_cmd.c_args))
! 			{
! 				status = STMT_ERROR;
! 				break;
! 			}
! 			if (!option_test(OPTION_SILENT))
! 			{
! 				string_ty *s;
  
! 				/*
! 				 * If the command has not been silenced,
! 				 * form it into a string and echo it.
! 				 */
! 				s = wl2str(&wl, 0, 32767);
! 				error("touch %s", s->str_text);
! 				str_free(s);
! 			}
! 			if (option_test(OPTION_ACTION))
! 			{
! 				int		j;
  
! 				for (j = 0; j < wl.wl_nwords; j++)
! 					if (os_touch(wl.wl_word[j]))
! 						status = STMT_ERROR;
! 			}
! 			wl_free(&wl);
! 		}
  		break;
  	}
  ret:
! 	trace(("return %d;\n", status));
! 	trace((/*{*/"}\n"));
! 	return status;
  }
  
  
***************
*** 650,667 ****
  
  void
  sl_append(sl, s)
!     slist   *sl;
!     stmt    *s;
  {
!     trace(("sl_append(sl = %08X, s = %08X)\n{\n"/*}*/, sl, s));
!     *(stmt **)
!     enlarge
!     (
! 	&sl->sl_nstmts,
! 	(char**)&sl->sl_stmt,
! 	sizeof(stmt *)
!     ) = stmt_copy(s);
!     trace((/*{*/"}\n"));
  }
  
  
--- 671,688 ----
  
  void
  sl_append(sl, s)
! 	slist		*sl;
! 	stmt		*s;
  {
! 	trace(("sl_append(sl = %08X, s = %08X)\n{\n"/*}*/, sl, s));
! 	*(stmt **)
! 	enlarge
! 	(
! 		&sl->sl_nstmts,
! 		(char**)&sl->sl_stmt,
! 		sizeof(stmt *)
! 	) = stmt_copy(s);
! 	trace((/*{*/"}\n"));
  }
  
  
***************
*** 681,704 ****
  
  void
  sl_free(sl)
!     slist   *sl;
  {
!     int     j;
  
!     trace(("sl_free(sl = %08X)\n{\n"/*}*/, sl));
!     for (j = 0; j < sl->sl_nstmts; ++j)
! 	stmt_free(sl->sl_stmt[j]);
!     if (sl->sl_nstmts)
! 	mem_free((char *)sl->sl_stmt);
!     sl->sl_nstmts = 0;
!     sl->sl_stmt = 0;
!     trace((/*{*/"}\n"));
  }
  
  void
  sl_zero(slp)
!     slist   *slp;
  {
!     slp->sl_nstmts = 0;
!     slp->sl_stmt = 0;
  }
--- 702,725 ----
  
  void
  sl_free(sl)
! 	slist		*sl;
  {
! 	int		j;
  
! 	trace(("sl_free(sl = %08X)\n{\n"/*}*/, sl));
! 	for (j = 0; j < sl->sl_nstmts; ++j)
! 		stmt_free(sl->sl_stmt[j]);
! 	if (sl->sl_nstmts)
! 		mem_free((char *)sl->sl_stmt);
! 	sl->sl_nstmts = 0;
! 	sl->sl_stmt = 0;
! 	trace((/*{*/"}\n"));
  }
  
  void
  sl_zero(slp)
! 	slist		*slp;
  {
! 	slp->sl_nstmts = 0;
! 	slp->sl_stmt = 0;
  }
Index: cook/stmt.h
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1990-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 28,129 ****
  #include <expr.h>
  
  /*
!  *  s_op values
   */
! enum stmt_op_t
  {
!     OP_ASSIGN = 1,
!     OP_COMMAND,
!     OP_COMPOUND,
!     OP_FAIL,
!     OP_FAIL_DK,
!     OP_IF,
!     OP_LOOP,
!     OP_LOOPSTOP,
!     OP_NOP,
!     OP_RECIPE,
!     OP_SET,
!     OP_TOUCH,
!     OP_UNSETENV
  };
! typedef enum stmt_op_t stmt_op_t;
  
  typedef struct assign assign;
! struct	assign
  {
!     elist   a_name;
!     elist   a_value;
  };
  
  typedef struct slist slist;
! struct	slist
  {
!     size_t	    sl_nstmts;
!     struct stmt	    **sl_stmt;
  };
  
  typedef struct srecipe srecipe;
! struct	srecipe
  {
!     elist       sr_target;
!     elist       sr_need;
!     elist       sr_need2;
!     int	        sr_flags;
!     struct stmt *sr_action;
!     struct stmt *sr_use_action;
!     position    sr_position;
!     expr	*sr_precondition;
!     int		sr_multiple;
  };
  
  typedef struct command command;
! struct	command
  {
!     elist   c_args;
!     int	    c_flags;
!     expr    *c_input;
  };
  
  typedef struct sif sif;
! struct	sif
  {
!     expr        *sif_cond;
!     struct stmt *sif_true;
!     struct stmt *sif_false;
  };
  
  typedef struct stmt stmt;
! struct	stmt
  {
!     stmt_op_t s_op;
!     long    s_references;
!     union
!     {
! 	assign	s__assign;
! 	command	s__cmd;
! 	slist	s__list;
! 	sif	s__if;
! 	stmt	*s__loop;
! 	srecipe	s__recipe;
! 	expr	*s__include;
!     }
!         s__u;
  };
! #define s_assign    s__u.s__assign
! #define s_cmd	    s__u.s__cmd
! #define s_if	    s__u.s__if
! #define s_list	    s__u.s__list
! #define s_loop	    s__u.s__loop
! #define s_recipe    s__u.s__recipe
! #define s_include   s__u.s__include
  
  /*
!  *  return values for stmt_eval()
   */
! #define STMT_OK	    0
! #define STMT_LSTOP  -1
! #define STMT_RET    -2
! #define STMT_ERROR  -3
  #define STMT_BACKTRACK -4
  
  stmt *stmt_alloc _((void));
--- 28,129 ----
  #include <expr.h>
  
  /*
!  * s_op values
   */
! enum stmt_op_ty
  {
! 	OP_ASSIGN = 1,
! 	OP_COMMAND,
! 	OP_COMPOUND,
! 	OP_FAIL,
! 	OP_FAIL_DK,
! 	OP_IF,
! 	OP_LOOP,
! 	OP_LOOPSTOP,
! 	OP_NOP,
! 	OP_RECIPE,
! 	OP_SET,
! 	OP_TOUCH,
! 	OP_UNSETENV
  };
! typedef enum stmt_op_ty stmt_op_ty;
  
  typedef struct assign assign;
! struct assign
  {
! 	elist		a_name;
! 	elist		a_value;
  };
  
  typedef struct slist slist;
! struct slist
  {
! 	size_t		sl_nstmts;
! 	struct stmt	**sl_stmt;
  };
  
  typedef struct srecipe srecipe;
! struct srecipe
  {
! 	elist		sr_target;
! 	elist		sr_need;
! 	elist		sr_need2;
! 	int		sr_flags;
! 	struct stmt	*sr_action;
! 	struct stmt	*sr_use_action;
! 	position	sr_position;
! 	expr		*sr_precondition;
! 	int		sr_multiple;
  };
  
  typedef struct command command;
! struct command
  {
! 	elist		c_args;
! 	int		c_flags;
! 	expr		*c_input;
  };
  
  typedef struct sif sif;
! struct sif
  {
! 	expr		*sif_cond;
! 	struct stmt	*sif_true;
! 	struct stmt	*sif_false;
  };
  
  typedef struct stmt stmt;
! struct stmt
  {
! 	stmt_op_ty	s_op;
! 	long		s_references;
! 	union
! 	{
! 		assign		s__assign;
! 		command		s__cmd;
! 		slist		s__list;
! 		sif		s__if;
! 		stmt		*s__loop;
! 		srecipe		s__recipe;
! 		expr		*s__include;
! 	}
! 		s__u;
  };
! #define s_assign	s__u.s__assign
! #define s_cmd		s__u.s__cmd
! #define s_if		s__u.s__if
! #define s_list		s__u.s__list
! #define s_loop		s__u.s__loop
! #define s_recipe	s__u.s__recipe
! #define s_include	s__u.s__include
  
  /*
!  * return values for stmt_eval()
   */
! #define STMT_OK		0
! #define STMT_LSTOP	-1
! #define STMT_RET	-2
! #define STMT_ERROR	-3
  #define STMT_BACKTRACK -4
  
  stmt *stmt_alloc _((void));
Index: cooktime/date.h
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1992-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: cooktime/date.y
***************
*** 1,11 ****
  /*
!  * neo - usenet NNTP server and client
!  * Copyright (c) 1991-1993 Peter Miller
   * All rights reserved.
   *	Peter Miller <pmiller@bmr.gov.au>
   *
   * This code is derived from code which is
!  * Copyright (c) 1986 Steven M. Bellovin
   *	Steven Bellovin <smb@cs.unc.edu>
   *
   * MANIFEST: functions to parse dates
--- 1,11 ----
  /*
!  * cook - file construction tool
!  * Copyright (C) 1991, 1992, 1993 Peter Miller
   * All rights reserved.
   *	Peter Miller <pmiller@bmr.gov.au>
   *
   * This code is derived from code which is
!  * Copyright (C) 1986 Steven M. Bellovin
   *	Steven Bellovin <smb@cs.unc.edu>
   *
   * MANIFEST: functions to parse dates
***************
*** 63,69 ****
  static	int	mm;
  static	int	ss;
  static	int	merid;
! static	int	daylight;
  static	int	dayord;
  static	int	dayreq;
  static	int	month;
--- 63,69 ----
  static	int	mm;
  static	int	ss;
  static	int	merid;
! static	int	day_light_flag;
  static	int	dayord;
  static	int	dayreq;
  static	int	month;
***************
*** 994,1001 ****
  	dateflag = 0;
  	dayflag = 0;
  	relflag = 0;
  	ourzone = now->timezone;
! 	daylight = MAYBE;
  	hh = 0;
  	mm = 0;
  	ss = 0;
--- 994,1005 ----
  	dateflag = 0;
  	dayflag = 0;
  	relflag = 0;
+ #ifdef CONF_pyramid_broken_ftime
+ 	ourzone = now->timezone / 60;
+ #else
  	ourzone = now->timezone;
! #endif
! 	day_light_flag = MAYBE;
  	hh = 0;
  	mm = 0;
  	ss = 0;
***************
*** 1036,1042 ****
  				ss,
  				merid,
  				ourzone,
! 				daylight
  			);
  		if (result < 0)
  			goto done;
--- 1040,1046 ----
  				ss,
  				merid,
  				ourzone,
! 				day_light_flag
  			);
  		if (result < 0)
  			goto done;
***************
*** 1291,1297 ****
  			hh = $1;
  			mm = $3;
  			merid = 24;
! 			daylight = STANDARD;
  			$4 = -$4;
  			ourzone = $4 % 100 + 60 * $4 / 100;
  		}
--- 1295,1301 ----
  			hh = $1;
  			mm = $3;
  			merid = 24;
! 			day_light_flag = STANDARD;
  			$4 = -$4;
  			ourzone = $4 % 100 + 60 * $4 / 100;
  		}
***************
*** 1315,1321 ****
  			mm = $3;
  			ss = $5;
  			merid = 24;
! 			daylight = STANDARD;
  			$6 = -$6;
  			ourzone = $6 % 100 + 60 * $6 / 100;
  		}
--- 1319,1325 ----
  			mm = $3;
  			ss = $5;
  			merid = 24;
! 			day_light_flag = STANDARD;
  			$6 = -$6;
  			ourzone = $6 % 100 + 60 * $6 / 100;
  		}
***************
*** 1325,1336 ****
  	: ZONE
  		{
  			ourzone = $1;
! 			daylight = STANDARD;
  		}
  	| DAYZONE
  		{
  			ourzone = $1;
! 			daylight = DAYLIGHT;
  		}
  	;
  
--- 1329,1340 ----
  	: ZONE
  		{
  			ourzone = $1;
! 			day_light_flag = STANDARD;
  		}
  	| DAYZONE
  		{
  			ourzone = $1;
! 			day_light_flag = DAYLIGHT;
  		}
  	;
  
Index: cooktime/main.c
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1992-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 24,31 ****
  #include <stdio.h>
  #include <string.h>
  #include <stdlib.h>
- #include <utime.h>
  #include <sys/types.h>
  #include <sys/stat.h>
  
  #include <arglex.h>
--- 24,31 ----
  #include <stdio.h>
  #include <string.h>
  #include <stdlib.h>
  #include <sys/types.h>
+ #include <utime.h>
  #include <sys/stat.h>
  
  #include <arglex.h>
***************
*** 64,114 ****
  "SYNOPSIS",
  "	%s [ <option>... ] <filename>...",
  "	%s -Help",
  "",
  "DESCRIPTION",
  "	The %s program is used to set the modified time or",
! "	access time of a file.  This can be used to defende against",
! "	unwanted logical dependencies when making 'minor' changes to",
! "	files.",
  "",
  "	If no option is specified, the default action is as if",
! "	'-Modify now' was specified.",
  "",
  "OPTIONS",
  "	The following options are understood.",
  "",
  "	-Access <date>",
! "		This option may be used to set the last-access time",
! "		of the files.  The date is relatively free-format;",
! "		rember to use quotes to insulate spaces from the",
! "		shell.",
  "",
  "	-Modify <date>",
! "		This option may be used to set the last-modify time",
! "		of the files.  The date is relatively free-format;",
! "		rember to use quotes to insulate spaces from the",
! "		shell.",
  "",
  "	-Report",
! "		When use alone, produces a listing of access times",
! "		and modify times for the named files.  When used",
! "		with -Access or -Modify, produces a listing of the",
! "		changes made.",
  "",
  "	-Help",
  "		Give some information on how to use the %s",
  "		command.",
  "",
! "	Any other option will generate a disgnostic error.  Options",
! "	may be abbreviated, the minimum abbreviation is shown un",
! "	upper-case.  Options are case-insensitive.  Options and file",
! "	names may be mixed arbitrarily on the command line, no",
! "	action will be taken until all dates are scanned.",
  "",
  "EXIT STATUS",
  "	The %s command will exit with a status of 1 on any",
! "	error.  The %s command will only exit with a status of",
! "	0 if there are no errors.",
  "",
  "COPYRIGHT",
  "	%C",
--- 64,133 ----
  "SYNOPSIS",
  "	%s [ <option>... ] <filename>...",
  "	%s -Help",
+ "	%s -VERSion",
  "",
  "DESCRIPTION",
  "	The %s program is used to set the modified time or",
! "	access time of a file. This can be used to defend",
! "	against unwanted logical dependencies when making \"minor\"",
! "	changes to files.",
  "",
  "	If no option is specified, the default action is as if",
! "	\"-Modify now\" was specified.",
  "",
  "OPTIONS",
  "	The following options are understood.",
  "",
  "	-Access <date>",
! "		This option may be used to set the last-access",
! "		time of the files.  The date is relatively free-",
! "		format; rember to use quotes to insulate spaces",
! "		from the shell.",
  "",
  "	-Modify <date>",
! "		This option may be used to set the last-modify",
! "		time of the files.  The date is relatively free-",
! "		format; rember to use quotes to insulate spaces",
! "		from the shell.",
  "",
  "	-Report",
! "		When use alone, produces a listing of access",
! "		times and modify times for the named files.  When",
! "		used with -Access or -Modify, produces a listing",
! "		of the changes made.",
  "",
  "	-Help",
  "		Give some information on how to use the %s",
  "		command.",
  "",
! "	Any other option will generate a disgnostic error.",
  "",
+ "	All options may be abbreviated; the abbreviation is",
+ "	documented as the upper case letters, all lower case",
+ "	letters and underscores (_) are optional.  You must use",
+ "	consecutive sequences of optional letters.",
+ "",
+ "	All options are case insensitive, you may type them in",
+ "	upper case or lower case or a combination of both, case",
+ "	is not important.",
+ "",
+ "	For example: the arguments \"-help\", \"-HEL\" and \"-h\" are",
+ "	all interpreted to mean the -Help option.  The argument",
+ "	\"-hlp\" will not be understood, because consecutive",
+ "	optional characters were not supplied.",
+ "",
+ "	Options and other command line arguments may be mixed",
+ "	arbitrarily on the command line.",
+ "",
+ "	The GNU long option names are understood.  Since all",
+ "	option names for %s are long, this means ignoring",
+ "	the extra leading '-'. The \"--option=value\" convention",
+ "	is also understood.",
+ "",
  "EXIT STATUS",
  "	The %s command will exit with a status of 1 on any",
! "	error. The %s command will only exit with a status",
! "	of 0 if there are no errors.",
  "",
  "COPYRIGHT",
  "	%C",
***************
*** 130,141 ****
  	arglex_token_report
  };
  
! static	arglex_table_t	argtab[] =
  {
! 	{ "-Access",		arglex_token_access,	},
! 	{ "-Modify",		arglex_token_modify,	},
! 	{ "-Report",		arglex_token_report,	},
! 	{ 0, 0, }, /* end marker */
  };
  
  
--- 149,160 ----
  	arglex_token_report
  };
  
! static	arglex_table_ty	argtab[] =
  {
! 	{ "-Access",	(arglex_token_ty)arglex_token_access,	},
! 	{ "-Modify",	(arglex_token_ty)arglex_token_modify,	},
! 	{ "-Report",	(arglex_token_ty)arglex_token_report,	},
! 	{ 0, (arglex_token_ty)0, }, /* end marker */
  };
  
  
***************
*** 147,153 ****
  	char		**argv;
  {
  	wlist		filename;
! 	string_t	*s;
  	size_t		j;
  	int		mtime_set;
  	long		mtime;
--- 166,172 ----
  	char		**argv;
  {
  	wlist		filename;
! 	string_ty	*s;
  	size_t		j;
  	int		mtime_set;
  	long		mtime;
***************
*** 212,218 ****
  			if (atime_set)
  				goto duplicate;
  			if (arglex() != arglex_token_string)
! 				usage();
  			atime_set = 1;
  			atime = date_scan(arglex_value.alv_string);
  			if (atime < 0)
--- 231,237 ----
  			if (atime_set)
  				goto duplicate;
  			if (arglex() != arglex_token_string)
! 				fatal("-Access requires a string argument");
  			atime_set = 1;
  			atime = date_scan(arglex_value.alv_string);
  			if (atime < 0)
***************
*** 227,233 ****
  			if (mtime_set)
  				goto duplicate;
  			if (arglex() != arglex_token_string)
! 				usage();
  			mtime_set = 1;
  			mtime = date_scan(arglex_value.alv_string);
  			if (mtime < 0)
--- 246,252 ----
  			if (mtime_set)
  				goto duplicate;
  			if (arglex() != arglex_token_string)
! 				fatal("-Modify requires a string argument");
  			mtime_set = 1;
  			mtime = date_scan(arglex_value.alv_string);
  			if (mtime < 0)
***************
*** 241,247 ****
  #ifdef DEBUG
  		case arglex_token_tracing:
  			if (arglex() != arglex_token_string)
! 				usage();
  			for (;;)
  			{
  				trace_enable(arglex_value.alv_string);
--- 260,266 ----
  #ifdef DEBUG
  		case arglex_token_tracing:
  			if (arglex() != arglex_token_string)
! 				fatal("-TRACIng requires one or more string arguments");
  			for (;;)
  			{
  				trace_enable(arglex_value.alv_string);
Index: doc/builtin
***************
*** 1,12 ****
  .\"
  .\"	cook - file construction tool
! .\"	Copyright (c) 1990-1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 1, or (at your option)
! .\"	any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  .\"
  .\"	cook - file construction tool
! .\"	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 2 of the License, or
! .\"	(at your option) any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: doc/cmdline
***************
*** 1,12 ****
  .\"
  .\"	cook - file construction tool
! .\"	Copyright (c) 1990-1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 1, or (at your option)
! .\"	any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  .\"
  .\"	cook - file construction tool
! .\"	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 2 of the License, or
! .\"	(at your option) any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: doc/conditions
***************
*** 1,12 ****
  .\"
  .\"	cook - file construction tool
! .\"	Copyright (c) 1990-1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 1, or (at your option)
! .\"	any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  .\"
  .\"	cook - file construction tool
! .\"	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 2 of the License, or
! .\"	(at your option) any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 20,43 ****
  .\" MANIFEST: Reference Manual, License
  .\"	
  .H 1 "License"
- The
  .B cook
! program is Copyright
  .if n (C)
  .if t \(co
! 1988-1993 Peter Miller.
  All rights reserved.
  .P
! This program is free software; you can redistribute it
  and/or modify it under the terms of the GNU General Public
! License as published by the Free Software Foundation; either
! version 1, or (at your option) any later version.
  .P
! This program is distributed in the hope that it will be
! useful, but WITHOUT ANY WARRANTY; without even the implied
! warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
! PURPOSE.  See the GNU General Public License for more
! details.
  .P
  You should have received a copy of the GNU General Public
  License along with this program; if not, write to the Free
--- 20,48 ----
  .\" MANIFEST: Reference Manual, License
  .\"	
  .H 1 "License"
  .B cook
! version
! .so version.so
! .br
! Copyright
  .if n (C)
  .if t \(co
! 1988, 1989, 1990, 1991, 1992, 1993 Peter Miller.
! .br
  All rights reserved.
  .P
! This program is free software;
! you can redistribute it
  and/or modify it under the terms of the GNU General Public
! License as published by the Free Software Foundation;
! either version 2 of the License,
! or (at your option) any later version.
  .P
! This program is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY;
! without even the implied
! warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
! See the GNU General Public License for more details.
  .P
  You should have received a copy of the GNU General Public
  License along with this program; if not, write to the Free
Index: doc/glossary
***************
*** 1,12 ****
  .\"
  .\"	cook - file construction tool
! .\"	Copyright (c) 1990-1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 1, or (at your option)
! .\"	any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  .\"
  .\"	cook - file construction tool
! .\"	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 2 of the License, or
! .\"	(at your option) any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: doc/history
***************
*** 1,12 ****
  .\"
  .\"	cook - file construction tool
! .\"	Copyright (c) 1990-1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 1, or (at your option)
! .\"	any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  .\"
  .\"	cook - file construction tool
! .\"	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 2 of the License, or
! .\"	(at your option) any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: doc/how
***************
*** 1,12 ****
  .\"
  .\"	cook - file construction tool
! .\"	Copyright (c) 1990-1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 1, or (at your option)
! .\"	any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  .\"
  .\"	cook - file construction tool
! .\"	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 2 of the License, or
! .\"	(at your option) any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: doc/intro
***************
*** 1,12 ****
  .\"
  .\"	cook - file construction tool
! .\"	Copyright (c) 1990-1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 1, or (at your option)
! .\"	any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  .\"
  .\"	cook - file construction tool
! .\"	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 2 of the License, or
! .\"	(at your option) any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: doc/intro.aa
***************
*** 1,12 ****
  .\"
  .\"	cook - file construction tool
! .\"	Copyright (c) 1990-1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 1, or (at your option)
! .\"	any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  .\"
  .\"	cook - file construction tool
! .\"	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 2 of the License, or
! .\"	(at your option) any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: doc/intro.bb
***************
*** 1,12 ****
  .\"
  .\"	cook - file construction tool
! .\"	Copyright (c) 1990-1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 1, or (at your option)
! .\"	any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  .\"
  .\"	cook - file construction tool
! .\"	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 2 of the License, or
! .\"	(at your option) any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: doc/language
***************
*** 1,12 ****
  .\"
  .\"	cook - file construction tool
! .\"	Copyright (c) 1990-1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 1, or (at your option)
! .\"	any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  .\"
  .\"	cook - file construction tool
! .\"	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 2 of the License, or
! .\"	(at your option) any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: doc/match
***************
*** 1,12 ****
  .\"
  .\"	cook - file construction tool
! .\"	Copyright (c) 1990-1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 1, or (at your option)
! .\"	any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  .\"
  .\"	cook - file construction tool
! .\"	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 2 of the License, or
! .\"	(at your option) any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: doc/option
***************
*** 1,12 ****
  .\"
  .\"	cook - file construction tool
! .\"	Copyright (c) 1990-1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 1, or (at your option)
! .\"	any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  .\"
  .\"	cook - file construction tool
! .\"	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 2 of the License, or
! .\"	(at your option) any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: doc/refman.t
***************
*** 1,12 ****
  .\"
  .\"	cook - file construction tool
! .\"	Copyright (c) 1990-1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 1, or (at your option)
! .\"	any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  .\"
  .\"	cook - file construction tool
! .\"	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 2 of the License, or
! .\"	(at your option) any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 23,29 ****
  .\"
  .TL
  cook
! .br
  a file construction tool
  .AF ""
  .AU "Peter Miller" "PM"
--- 23,29 ----
  .\"
  .TL
  cook
! .sp
  a file construction tool
  .AF ""
  .AU "Peter Miller" "PM"
Index: doc/system
***************
*** 1,12 ****
  .\"
  .\"	cook - file construction tool
! .\"	Copyright (c) 1990-1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 1, or (at your option)
! .\"	any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  .\"
  .\"	cook - file construction tool
! .\"	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 2 of the License, or
! .\"	(at your option) any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: doc/variables
***************
*** 1,12 ****
  .\"
  .\"	cook - file construction tool
! .\"	Copyright (c) 1990-1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 1, or (at your option)
! .\"	any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  .\"
  .\"	cook - file construction tool
! .\"	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 2 of the License, or
! .\"	(at your option) any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: find_libs/main.c
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1991-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 57,69 ****
  "	%s - find pathnames of libraries",
  "",
  "SYNOPSIS",
! "	%s [ -L<path> ... ] -l<name> ...",
! "	%s -help",
  "",
  "DESCRIPTION",
! "	The %s program is used to find the actual pathname of",
! "	a library specified on a cc(1) command line.  This allows",
! "	cook(1) to know these dependencies.",
  "",
  "OPTIONS",
  "	The following options are understood.",
--- 57,70 ----
  "	%s - find pathnames of libraries",
  "",
  "SYNOPSIS",
! "	%s [ -L<path> ... ][ -l<name> ... ]",
! "	%s -Help",
! "	%s -VERSion",
  "",
  "DESCRIPTION",
! "	The %s program is used to find the actual pathname",
! "	of a library specified on a cc(1) command line.  This",
! "	allows cook(1) to know these dependencies.",
  "",
  "OPTIONS",
  "	The following options are understood.",
***************
*** 72,81 ****
  "		Specify a path to search for libraries on.  If",
  "		more than one is specified, they will be scanned",
  "		in the order given before the standard /usr/lib",
! "		and /lib places.",
  "",
  "	-l<name>",
! "		Name a library to be searched for.",
  "",
  "	-Help",
  "		Give some information on how to use the %s",
--- 73,86 ----
  "		Specify a path to search for libraries on.  If",
  "		more than one is specified, they will be scanned",
  "		in the order given before the standard /usr/lib",
! "		and /lib places.  This is like the same argument",
! "		to cc(1), and the usual %s option",
! "		abbreviation rules do not apply.",
  "",
  "	-l<name>",
! "		Name a library to be searched for.  This is like",
! "		the same argument to cc(1), and the usual",
! "		%s option abbreviation rules do not apply.",
  "",
  "	-Help",
  "		Give some information on how to use the %s",
***************
*** 82,97 ****
  "		command.",
  "",
  "	-VERSion",
! "		Give version information.",
  "",
! "	With the exception of the '-L' and '-l' options,",
! "	the abreviation for the option is shown in upper case;",
! "	the options are actually case-insensitive.",	
  "",
  "EXIT STATUS",
  "	The %s command will exit with a status of 1 on any",
! "	error.  The %s command will only exit with a status of",
! "	0 if there are no errors.",
  "",
  "COPYRIGHT",
  "	%C",
--- 87,123 ----
  "		command.",
  "",
  "	-VERSion",
! "		Tell the version of the %s command",
! "		currently executing.",
  "",
! "	All other options will result in a diagnostic error.",
  "",
+ "	All options may be abbreviated; the abbreviation is",
+ "	documented as the upper case letters, all lower case",
+ "	letters and underscores (_) are optional.  You must use",
+ "	consecutive sequences of optional letters.",
+ "",
+ "	All options are case insensitive, you may type them in",
+ "	upper case or lower case or a combination of both, case",
+ "	is not important.",
+ "",
+ "	For example: the arguments \"-help\", \"-HEL\" and \"-h\" are",
+ "	all interpreted to mean the -Help option.  The argument",
+ "	\"-hlp\" will not be understood, because consecutive",
+ "	optional characters were not supplied.",
+ "",
+ "	Options and other command line arguments may be mixed",
+ "	arbitrarily on the command line.",
+ "",
+ "	The GNU long option names are understood.  Since all",
+ "	option names for %s are long, this means ignoring",
+ "	the extra leading '-'.  The \"--option=value\" convention",
+ "	is also understood.",
+ "",
  "EXIT STATUS",
  "	The %s command will exit with a status of 1 on any",
! "	error.  The %s command will only exit with a",
! "	status of 0 if there are no errors.",
  "",
  "COPYRIGHT",
  "	%C",
***************
*** 107,124 ****
  enum
  {
  	arglex_token_path,
! 	arglex_token_path_long,
! 	arglex_token_search,
! 	arglex_token_search_long
  };
  
! static arglex_table_t argtab[] =
  {
! 	{ "-\\L*",	arglex_token_path,		},
! 	{ "-\\L",	arglex_token_path_long,		},
! 	{ "-\\l*",	arglex_token_search,		},
! 	{ "-\\l",	arglex_token_search_long,	},
! 	{ 0, 0, }, /* end marker */
  };
  
  
--- 133,148 ----
  enum
  {
  	arglex_token_path,
! 	arglex_token_search
  };
  
! static arglex_table_ty argtab[] =
  {
! 	{ "-\\L*",	(arglex_token_ty)arglex_token_path,	},
! 	{ "-\\L",	(arglex_token_ty)arglex_token_path,	},
! 	{ "-\\l*",	(arglex_token_ty)arglex_token_search,	},
! 	{ "-\\l",	(arglex_token_ty)arglex_token_search,	},
! 	{ 0, (arglex_token_ty)0, }, /* end marker */
  };
  
  
***************
*** 214,228 ****
  		switch (arglex_token)
  		{
  		default:
! 			fatal("argument \"%s\" unknown", arglex_value.alv_string);
  	
- 	
- 		case arglex_token_search_long:
- 			if (arglex() != arglex_token_string)
- 				usage();
- 			/* fall through... */
- 	
  		case arglex_token_search:
  			for (k = 0; k < nsyspaths; ++k)
  				path[npaths++] = syspath[k];
  			for (k = 0; k < npaths; ++k)
--- 238,253 ----
  		switch (arglex_token)
  		{
  		default:
! 			error
! 			(
! 				"misplaced \"%s\" command line argument",
! 				arglex_value.alv_string
! 			);
! 			usage();
  	
  		case arglex_token_search:
+ 			if (arglex() != arglex_token_string)
+ 				fatal("-l requires a string argument");
  			for (k = 0; k < nsyspaths; ++k)
  				path[npaths++] = syspath[k];
  			for (k = 0; k < npaths; ++k)
***************
*** 251,262 ****
  			npaths -= nsyspaths;
  			break;
  	
- 		case arglex_token_path_long:
- 			if (arglex() != arglex_token_string)
- 				usage();
- 			/* fall through... */
- 	
  		case arglex_token_path:
  			path[npaths++] = arglex_value.alv_string;
  			break;
  		}
--- 276,284 ----
  			npaths -= nsyspaths;
  			break;
  	
  		case arglex_token_path:
+ 			if (arglex() != arglex_token_string)
+ 				fatal("-L requires a string argument");
  			path[npaths++] = arglex_value.alv_string;
  			break;
  		}
Index: find_libs/os.c
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1990-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: find_libs/os.h
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1990-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: man1/c_incl.1
***************
*** 1,12 ****
  '\" t
  .\"	cook - file construction tool
! .\"	Copyright (c) 1991-1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 1, or (at your option)
! .\"	any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  '\" t
  .\"	cook - file construction tool
! .\"	Copyright (C) 1991, 1992, 1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 2 of the License, or
! .\"	(at your option) any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 20,44 ****
  .\" MANIFEST: manual entry for c_incl
  .\" 
  .TH C_INCL 1
! .ad l
! .hy 0
  .SH NAME
! c_incl - determine dependencies
  .SH SYNOPSIS
! .B c_incl
  [
  .IR option ...
  ]
  .I filename
  .br
! .B c_incl
  .B -Help
  .br
! .B c_incl
  .B -VERSion
  .SH DESCRIPTION
  The
! .I c_incl
  program
  is used to traverse source files looking for include dependencies
  suitable for \f(CW[collect]\fPion by cook.
--- 20,46 ----
  .\" MANIFEST: manual entry for c_incl
  .\" 
  .TH C_INCL 1
! .ds n) c_incl
! .if n .ad l
! .if n .hy 0
! .if n .nr IN 8n
  .SH NAME
! \*(n) - determine dependencies
  .SH SYNOPSIS
! .B \*(n)
  [
  .IR option ...
  ]
  .I filename
  .br
! .B \*(n)
  .B -Help
  .br
! .B \*(n)
  .B -VERSion
  .SH DESCRIPTION
  The
! .I \*(n)
  program
  is used to traverse source files looking for include dependencies
  suitable for \f(CW[collect]\fPion by cook.
***************
*** 45,50 ****
--- 47,54 ----
  .PP
  Several input languages are supported,
  see the options list for details.
+ .br
+ .ne 1i
  .SH OPTIONS
  The following options are understood.
  .TP 8n
***************
*** 138,149 ****
  .B -Help
  .br
  Give information on how to use
! .IR c_incl .
  .TP 8n
  .B -VERSion
  .br
  Tell what version of
! .I c_incl
  is being run.
  .TP 8n
  .B -No_System
--- 142,153 ----
  .B -Help
  .br
  Give information on how to use
! .IR \*(n) .
  .TP 8n
  .B -VERSion
  .br
  Tell what version of
! .I \*(n)
  is being run.
  .TP 8n
  .B -No_System
***************
*** 158,176 ****
  This option may be used to turn caching off.
  .PP
  Any other options will generate an error.
! Abbreviations are in upper case, but the options are case-independent.
  .SH CACHING
  The caching mechanism use by the
! .I c_incl
  program caches the results of searching files
  for include files (in a file called
! .I .c_inclrc
  in the current directory).
  The cache is only refreshed when a file changes.
  .PP
  The use of this cache has been shown to dramatically increase the
  performance of the
! .I c_incl
  program.
  Typically,
  only a small proportions files in a project change between builds,
--- 162,182 ----
  This option may be used to turn caching off.
  .PP
  Any other options will generate an error.
! .so o__rules.so
! .br
! .ne 1i
  .SH CACHING
  The caching mechanism use by the
! .I \*(n)
  program caches the results of searching files
  for include files (in a file called
! .I .\*(n)rc
  in the current directory).
  The cache is only refreshed when a file changes.
  .PP
  The use of this cache has been shown to dramatically increase the
  performance of the
! .I \*(n)
  program.
  Typically,
  only a small proportions files in a project change between builds,
***************
*** 181,187 ****
  otherwise weird and wonderful things will happen.
  .PP
  The
! .I .c_inclrc
  file is a binary file.
  If you wish to rebuild the cache,
  simply delete this file with the
--- 187,193 ----
  otherwise weird and wonderful things will happen.
  .PP
  The
! .I .\*(n)rc
  file is a binary file.
  If you wish to rebuild the cache,
  simply delete this file with the
***************
*** 189,226 ****
  command.
  Being a binary file,
  the
! .I .c_inclrc
  file is not portable across machines or operating systems,
  so you will need to delete it when you move your sources.
  It is a binary file for performance.
! .SH EXIT STATUS
! The 
! .I c_incl
! command will exit with a status of 1 on any error.
! The 
! .I c_incl
! command will only exit with a status of 0 if there are no errors.
! .SH COPYRIGHT
! The
! .I c_incl
! command is Copyright
! .if n (c)
! .if t \(co
! 1988-1993 Peter Miller.
! .br
! All rights reserved.
! .PP
! The 
! .I c_incl
! program is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY;
! without even the implied warranty
! of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
! See the GNU General Public License for more details.
! .SH AUTHOR
! .TS
! tab(;);
! l l l.
! Peter Miller;UUCP;uunet!munnari!bmr.gov.au!pmiller
! /\e/\e*;CSNET;pmiller@bmr.gov.au
! .TE
--- 195,202 ----
  command.
  Being a binary file,
  the
! .I .\*(n)rc
  file is not portable across machines or operating systems,
  so you will need to delete it when you move your sources.
  It is a binary file for performance.
! .so copyright.so
Index: man1/cook.1
***************
*** 1,12 ****
  '\" t
  .\"	cook - file construction tool
! .\"	Copyright (c) 1991-1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 1, or (at your option)
! .\"	any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  '\" t
  .\"	cook - file construction tool
! .\"	Copyright (C) 1991, 1992, 1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 2 of the License, or
! .\"	(at your option) any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 17,38 ****
  .\"	along with this program; if not, write to the Free Software
  .\"	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  .\"
! .\" MANIFEST: manual entry for cook
  .\" 
  .TH COOK 1
  .SH NAME
! cook \- a file construction tool
  .SH SYNOPSIS
! .B cook
  [
  .IR option ...
! ]
! [
  .IR filename ...
  ]
  .SH DESCRIPTION
! .I Cook
! is a tool for constructing files.
  It is given a set of files to create,
  and instructions detailing how to construct them.
  In any non-trivial program
--- 17,48 ----
  .\"	along with this program; if not, write to the Free Software
  .\"	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  .\"
! .\" MANIFEST: manual entry for the cook command
  .\" 
  .TH COOK 1
+ .ds n) cook
+ .if n .hy 0
+ .if n .ad l
+ .if n .nr IN 8n
  .SH NAME
! \*(n) \- a file construction tool
  .SH SYNOPSIS
! .B \*(n)
  [
  .IR option ...
! ][
  .IR filename ...
  ]
+ .br
+ .B \*(n)
+ .B -Help
+ .br
+ .B \*(n)
+ .B -VERSion
  .SH DESCRIPTION
! The
! .I \*(n)
! program is a tool for constructing files.
  It is given a set of files to create,
  and instructions detailing how to construct them.
  In any non-trivial program
***************
*** 39,58 ****
  there will be prerequisites to performing
  the actions necessary to creating any file,
  such as extraction from a source-control system.
! .I Cook
! provides a mechanism to define these.
  .PP
  When a program is being developed or maintained,
  the programmer will typically change one file of several
  which comprise the program.
! .I Cook
! examines the last-modified times of the files to see when
  the prerequisites of a file have changed,
  implying that the file
  needs to be recreated as it is logically out of date.
  .PP
! .I Cook
! also provides a facility for implicit recipes,
  allowing users to specify how to form a file with a given suffix from
  a file with a different suffix.
  For example,
--- 49,71 ----
  there will be prerequisites to performing
  the actions necessary to creating any file,
  such as extraction from a source-control system.
! The
! .I \*(n)
! program provides a mechanism to define these.
  .PP
  When a program is being developed or maintained,
  the programmer will typically change one file of several
  which comprise the program.
! The
! .I \*(n)
! program examines the last-modified times of the files to see when
  the prerequisites of a file have changed,
  implying that the file
  needs to be recreated as it is logically out of date.
  .PP
! The
! .I \*(n)
! program also provides a facility for implicit recipes,
  allowing users to specify how to form a file with a given suffix from
  a file with a different suffix.
  For example,
***************
*** 65,72 ****
  no processing is done until all options and filenames
  on the command line have been scanned.
  .PP
! .I Cook
! will attempt to create the named files from the recipes
  given to it.
  The recipes are contained in a file called
  .I Howto.cook
--- 78,86 ----
  no processing is done until all options and filenames
  on the command line have been scanned.
  .PP
! The
! .I \*(n)
! program will attempt to create the named files from the recipes
  given to it.
  The recipes are contained in a file called
  .I Howto.cook
***************
*** 77,139 ****
  .IR filename s
  are given on the command line
  the targets of the first recipe defined are cooked.
  .SH OPTIONS
  The valid options for
! .I cook
  are listed below.
  Any other options
  (words on the command line beginning with `\fB-\fP')
  will cause a diagnostic message to be issued.
! .TP 1i
  .B -Action
  Execute the commands given in the recipes.
  This is the default.
! .TP
! .B -NoAction
  Do not execute the commands given in the recipes.
! .TP
  .B -Continue
  If cooking a target should fail,
  continue with other recipes for which the failed target is not an ingredient,
  directly or indirectly.
! .TP
! .B -NoContinue
  If cooking a target should fail,
! .I cook
  will exit.
  This is the default.
! .TP
  .B -Errok
  When a command is executed,
  the exit code will be ignored.
! .TP
! .B -NoErrok
  When a command is executed,
  if the exit code is positive
  it will be deemed to fail,
  and thus the recipe containing it to have failed.
  This is the default.
! .TP
  .B -Force
  Always perform the actions of recipes,
  irrespective of the last-modified times of any of the ingredients.
  This option is useful if something beyond the scope of the cookbook
  has been modified;
  for example, a bug fix in a compiler.
! .TP
! .B -NoForce
  Perform the actions of the recipes
  if any of the ingredients are logically out of date.
  This is the default.
! .TP
  .B -Help
  Provide information about how to execute
! .I cook
  on 
  .IR stdout ,
  and perform no other function.
! .TP
  .BI -Include " filename"
  Search the named directory before the standard places for
  included cookbooks.
  Each directory so named will be scanned in the order given.
--- 91,170 ----
  .IR filename s
  are given on the command line
  the targets of the first recipe defined are cooked.
+ .br
+ .ne 1i
  .SH OPTIONS
  The valid options for
! .I \*(n)
  are listed below.
  Any other options
  (words on the command line beginning with `\fB-\fP')
  will cause a diagnostic message to be issued.
! .TP 8n
  .B -Action
+ .br
  Execute the commands given in the recipes.
  This is the default.
! .TP 8n
! .B -No_Action
! .br
  Do not execute the commands given in the recipes.
! .TP 8n
! \fB-Book\fP \fIfilename\fP
! .br
! Tells \*(n) to used the named cookbook,
! rather than the default ``Howto.cook'' file.
! .TP 8n
  .B -Continue
+ .br
  If cooking a target should fail,
  continue with other recipes for which the failed target is not an ingredient,
  directly or indirectly.
! .TP 8n
! .B -No_Continue
! .br
  If cooking a target should fail,
! .I \*(n)
  will exit.
  This is the default.
! .TP 8n
  .B -Errok
+ .br
  When a command is executed,
  the exit code will be ignored.
! .TP 8n
! .B -No_Errok
! .br
  When a command is executed,
  if the exit code is positive
  it will be deemed to fail,
  and thus the recipe containing it to have failed.
  This is the default.
! .TP 8n
  .B -Force
+ .br
  Always perform the actions of recipes,
  irrespective of the last-modified times of any of the ingredients.
  This option is useful if something beyond the scope of the cookbook
  has been modified;
  for example, a bug fix in a compiler.
! .TP 8n
! .B -No_Force
! .br
  Perform the actions of the recipes
  if any of the ingredients are logically out of date.
  This is the default.
! .TP 8n
  .B -Help
+ .br
  Provide information about how to execute
! .I \*(n)
  on 
  .IR stdout ,
  and perform no other function.
! .TP 8n
  .BI -Include " filename"
+ .br
  Search the named directory before the standard places for
  included cookbooks.
  Each directory so named will be scanned in the order given.
***************
*** 141,150 ****
  .I $HOME/.cook
  then
  .IR /usr/local/lib/cook .
! .TP
  .B -List
  Causes
! .I cook
  to automatically redirect the
  .I stdout
  and
--- 172,182 ----
  .I $HOME/.cook
  then
  .IR /usr/local/lib/cook .
! .TP 8n
  .B -List
+ .br
  Causes
! .I \*(n)
  to automatically redirect the
  .I stdout
  and
***************
*** 152,158 ****
  of the session.
  Output will continue to come to the terminal,
  unless 
! .I cook
  is executing in the background.
  The name of the file will be the name of the cookbook with any suffix
  removed and "\f(CW.list\fP" appended;
--- 184,190 ----
  of the session.
  Output will continue to come to the terminal,
  unless 
! .I \*(n)
  is executing in the background.
  The name of the file will be the name of the cookbook with any suffix
  removed and "\f(CW.list\fP" appended;
***************
*** 159,168 ****
  this will usually be
  .IR Howto.list .
  This is the default.
! .TP
  .BI -List " filename"
  Causes 
! .I cook
  to automatically redirect the
  .I stdout 
  and
--- 191,201 ----
  this will usually be
  .IR Howto.list .
  This is the default.
! .TP 8n
  .BI -List " filename"
+ .br
  Causes 
! .I \*(n)
  to automatically redirect the
  .I stdout 
  and
***************
*** 170,212 ****
  of the session into the named file.
  Output will continue to come to the terminal,
  unless 
! .I cook
  is executing in the background.
! .TP
! .B -NoList
! No automatic redirection of the session of the session will be made.
! .TP
! .BI -NoList " filename"
! No automatic redirection of the session of the session will be made,
  however subsequent
  .B -List
  options will default to listing to the named file.
! .TP
  .B -Meter
  After each command is executed,
  print a summary of the command's CPU usage.
! .TP
! .B -NoMeter
  Do not print a CPU usage summary after each command.
  This is the default.
! .TP
  .B -Precious
  When commands in the body of a recipe fail,
! no not delete the targets of the recipe.
! .TP
! .B -NoPrecious
  When commands in the body of a recipe fail,
  delete the targets of the recipe.
  This is the default.
! .TP
  .B -Silent
  Do not echo commands before they are executed.
! .TP
! .B -NoSilent
  Echo commands before they are executed.
  This is the default.
! .TP
  .B -Touch
  Update the last-modified times of the
  target files,
  rather than execute the actions bound to recipes.
--- 203,254 ----
  of the session into the named file.
  Output will continue to come to the terminal,
  unless 
! .I \*(n)
  is executing in the background.
! .TP 8n
! .B -No_List
! .br
! No automatic redirection of the output of the session will be made.
! .TP 8n
! .BI -No_List " filename"
! .br
! No automatic redirection of the output of the session will be made,
  however subsequent
  .B -List
  options will default to listing to the named file.
! .TP 8n
  .B -Meter
+ .br
  After each command is executed,
  print a summary of the command's CPU usage.
! .TP 8n
! .B -No_Meter
! .br
  Do not print a CPU usage summary after each command.
  This is the default.
! .TP 8n
  .B -Precious
+ .br
  When commands in the body of a recipe fail,
! do not delete the targets of the recipe.
! .TP 8n
! .B -No_Precious
! .br
  When commands in the body of a recipe fail,
  delete the targets of the recipe.
  This is the default.
! .TP 8n
  .B -Silent
+ .br
  Do not echo commands before they are executed.
! .TP 8n
! .B -No_Silent
! .br
  Echo commands before they are executed.
  This is the default.
! .TP 8n
  .B -Touch
+ .br
  Update the last-modified times of the
  target files,
  rather than execute the actions bound to recipes.
***************
*** 216,301 ****
  but has no significance;
  for example,
  adding a comment to a widely used include file.
! .TP
! .B -NoTouch
  Execute the actions bound to recipes,
  rather than update the last-modified times of the target files.
  This is the default.
! .TP
! .B -TTy
  When listing,
  also send the output stream to the terminal.
  This is the default.
! .TP
! .B -NoTTy
  When listing,
  do not send the output to the terminal.
! .TP
  .IB name = value
  Assign the
  .I value
  to the named variable.
  The value may contain spaces
  if you can convince the shell to pass them through.
! .PP
! In the above descriptions,
! a shorter form is indicated by the uppercase letters;
! for example,
! the
! .B -NoTouch
! option may be abbreviated to
! .BR -nt .
! .I Cook
! is case insensitive to the options,
! so you may arbitrarily mix cases within the options.
! .PP
  Two options are provided for
  tracing the inferences
! .B cook 
  makes when attempting to cook a target.
! .TP 1i
  .B -TRace
! .I Cook
  will emit copious amounts of information
  about the inferences it is making when cooking targets.
  This option may be used when you think 
! .B cook
  is acting strangely,
  or are just curious.
! .TP
! .B -NoTRace
! .I Cook
  will not emit information
  about the inferences it is making when cooking targets.
  This is the default.
! .SH EXIT STATUS
! The 
! .I cook
! command will exit with a status of 1 on any error.
! The 
! .I cook
! command will only exit with a status of 0 if there are no errors.
! .SH COPYRIGHT
! The
! .I cook
! command is Copyright
! .if n (c)
! .if t \(co
! 1988-1993 Peter Miller.
! .br
! All rights reserved.
! .PP
! The 
! .I cook
! program is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY;
! without even the implied warranty
! of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
! See the GNU General Public License for more details.
! .SH AUTHOR
! .TS
! center,tab(;);
! l l l.
! Peter Miller;UUCP;uunet!munnari!bmr.gov.au!pmiller
! /\e/\e*;CSNET;pmiller@bmr.gov.au
! .TE
--- 258,312 ----
  but has no significance;
  for example,
  adding a comment to a widely used include file.
! .TP 8n
! .B -No_Touch
! .br
  Execute the actions bound to recipes,
  rather than update the last-modified times of the target files.
  This is the default.
! .TP 8n
! .B -TErminal
! .br
  When listing,
  also send the output stream to the terminal.
  This is the default.
! .TP 8n
! .B -No_TErminal
! .br
  When listing,
  do not send the output to the terminal.
! .TP 8n
  .IB name = value
+ .br
  Assign the
  .I value
  to the named variable.
  The value may contain spaces
  if you can convince the shell to pass them through.
! .TP 8n
! .B -TRace
! .br
  Two options are provided for
  tracing the inferences
! .B \*(n) 
  makes when attempting to cook a target.
! The
  .B -TRace
! option will cause
! .I \*(n)
  will emit copious amounts of information
  about the inferences it is making when cooking targets.
  This option may be used when you think 
! .B \*(n)
  is acting strangely,
  or are just curious.
! .TP 8n
! .B -No_TRace
! .br
! This option may be used to cause
! .I \*(n)
  will not emit information
  about the inferences it is making when cooking targets.
  This is the default.
! .so o__rules.so
! .so copyright.so
Index: man1/cooktime.1
***************
*** 1,12 ****
  '\" t
  .\"	cook - file construction tool
! .\"	Copyright (c) 1991-1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 1, or (at your option)
! .\"	any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  '\" t
  .\"	cook - file construction tool
! .\"	Copyright (C) 1991, 1992, 1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 2 of the License, or
! .\"	(at your option) any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 17,46 ****
  .\"	along with this program; if not, write to the Free Software
  .\"	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  .\"
! .\" MANIFEST: manual entry for cooktime
  .\" 
! .TH cooktime 1 cook
  .SH NAME
! cooktime \- set file times
  .SH SYNOPSIS
! .B cooktime
  [
  .IR option \&...
  ]
  .IR filename \&...
  .br
! .B cooktime
  .B -Help
  .SH DESCRIPTION
  The
! .I cooktime
  program is used to
  set the modified time or access time of a file.
! This can be used to defende against unwanted
  logical dependencies when making "minor" changes to files.
  .PP
  If no option is specified,
  the default action is as if "\fI\-Modify now\fP" was specified.
  .SH OPTIONS
  The following options are understood.
  .TP 8n
--- 17,55 ----
  .\"	along with this program; if not, write to the Free Software
  .\"	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  .\"
! .\" MANIFEST: manual entry for the cooktime command
  .\" 
! .TH COOKTIME 1
! .ds n) cooktime
! .if n .hy 0
! .if n .ad l
! .if n .nr IN 8n
  .SH NAME
! \*(n) \- set file times
  .SH SYNOPSIS
! .B \*(n)
  [
  .IR option \&...
  ]
  .IR filename \&...
  .br
! .B \*(n)
  .B -Help
+ .br
+ .B \*(n)
+ .B -VERSion
  .SH DESCRIPTION
  The
! .I \*(n)
  program is used to
  set the modified time or access time of a file.
! This can be used to defend against unwanted
  logical dependencies when making "minor" changes to files.
  .PP
  If no option is specified,
  the default action is as if "\fI\-Modify now\fP" was specified.
+ .br
+ .ne 1i
  .SH OPTIONS
  The following options are understood.
  .TP 8n
***************
*** 68,110 ****
  .B -Help
  .br
  Give some information on how to use the
! .I cooktime
  command.
  .PP
  Any other option will generate a disgnostic error.
! Options may be abbreviated,
! the minimum abbreviation is shown un upper-case.
! Options are case-insensitive.
! Options and file names may be mixed arbitrarily on the command line,
! no action will be taken until all dates are scanned.
! .SH EXIT STATUS
! The 
! .I cooktime
! command will exit with a status of 1 on any error.
! The 
! .I cooktime
! command will only exit with a status of 0 if there are no errors.
! .SH COPYRIGHT
! The
! .I cooktime
! command is Copyright
! .if n (c)
! .if t \(co
! 1988-1993 Peter Miller.
! .br
! All rights reserved.
! .PP
! The 
! .I cooktime
! program is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY;
! without even the implied warranty
! of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
! See the GNU General Public License for more details.
! .SH AUTHOR
! .TS
! center,tab(;);
! l l l.
! Peter Miller;UUCP;uunet!munnari!bmr.gov.au!pmiller
! /\e/\e*;CSNET;pmiller@bmr.gov.au
! .TE
--- 77,85 ----
  .B -Help
  .br
  Give some information on how to use the
! .I \*(n)
  command.
  .PP
  Any other option will generate a disgnostic error.
! .so o__rules.so
! .so copyright.so
Index: man1/copyright.so
***************
*** 0 ****
--- 1,60 ----
+ .\"
+ .\"	cook - file construction tool
+ .\"	Copyright (C) 1993 Peter Miller.
+ .\"	All rights reserved.
+ .\"
+ .\"	This program is free software; you can redistribute it and/or modify
+ .\"	it under the terms of the GNU General Public License as published by
+ .\"	the Free Software Foundation; either version 2 of the License, or
+ .\"	(at your option) any later version.
+ .\"
+ .\"	This program is distributed in the hope that it will be useful,
+ .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
+ .\"	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ .\"	GNU General Public License for more details.
+ .\"
+ .\"	You should have received a copy of the GNU General Public License
+ .\"	along with this program; if not, write to the Free Software
+ .\"	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ .\"
+ .\" MANIFEST: copyright notice for manual entries
+ .\"
+ .br
+ .ne 1i
+ .SH EXIT STATUS
+ The 
+ .I \*(n)
+ command will exit with a status of 1 on any error.
+ The 
+ .I \*(n)
+ command will only exit with a status of 0 if there are no errors.
+ .br
+ .ne 1i
+ .SH COPYRIGHT
+ .I \*(n)
+ version
+ .so ../doc/version.so
+ .br
+ Copyright
+ .if n (C)
+ .if t \(co
+ 1988, 1989, 1990, 1991, 1992, 1993 Peter Miller.
+ .br
+ All rights reserved.
+ .PP
+ The
+ .I \*(n)
+ program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY;
+ without even the implied warranty
+ of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the GNU General Public License for more details.
+ .br
+ .ne 1i
+ .SH AUTHOR
+ .TS
+ center,tab(;);
+ l l l.
+ Peter Miller;UUCP;uunet!munnari!bmr.gov.au!pmiller
+ /\e/\e*;Internet;pmiller@bmr.gov.au
+ .TE
Index: man1/find_libs.1
***************
*** 1,12 ****
  '\" t
  .\"	cook - file construction tool
! .\"	Copyright (c) 1991-1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 1, or (at your option)
! .\"	any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  '\" t
  .\"	cook - file construction tool
! .\"	Copyright (C) 1991, 1992, 1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 2 of the License, or
! .\"	(at your option) any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 17,43 ****
  .\"	along with this program; if not, write to the Free Software
  .\"	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  .\"
! .\" MANIFEST: manual entry for find_libs
  .\" 
! .TH FIND_LIBS 1 cook
  .SH NAME
! find_libs \- find pathnames of libraries
  .SH SYNOPSIS
! .B find_libs
  [
  .BI -L path
  \&...
! ]
! [
  .BI -l name
  \&...
  ]
  .br
! .B find_libs
! .B -help
  .SH DESCRIPTION
  The
! .I find_libs
  program is used to find the actual pathname of a library
  specified on a
  .IR cc (1)
--- 17,49 ----
  .\"	along with this program; if not, write to the Free Software
  .\"	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  .\"
! .\" MANIFEST: manual entry for the find_libs command
  .\" 
! .TH FIND_LIBS 1
! .ds n) find_libs
! .if n .hy 0
! .if n .ad l
! .if n .nr IN 8n
  .SH NAME
! \*(n) \- find pathnames of libraries
  .SH SYNOPSIS
! .B \*(n)
  [
  .BI -L path
  \&...
! ][
  .BI -l name
  \&...
  ]
  .br
! .B \*(n)
! .B -Help
! .br
! .B \*(n)
! .B -VERSion
  .SH DESCRIPTION
  The
! .I \*(n)
  program is used to find the actual pathname of a library
  specified on a
  .IR cc (1)
***************
*** 45,54 ****
  This allows 
  .IR cook (1)
  to know these dependencies.
  .SH OPTIONS
  The following options are understood.
! .TP 1i
  .BI -L path
  Specify a path to search for libraries on.
  If more than one is specified,
  they will be scanned in the order given before the standard
--- 51,63 ----
  This allows 
  .IR cook (1)
  to know these dependencies.
+ .br
+ .ne 1i
  .SH OPTIONS
  The following options are understood.
! .TP 8n
  .BI -L path
+ .br
  Specify a path to search for libraries on.
  If more than one is specified,
  they will be scanned in the order given before the standard
***************
*** 56,102 ****
  and
  .I /lib
  places.
! .TP 
  .BI -l name
  Name a library to be searched for.
! .TP
! .B -help
  Give some information on how to use the
! .I find_libs
  command.
! .PP
! All other options are ignored.
! They are assumed to be 
! .IR ld (1)
! arguments.
! .SH EXIT STATUS
! The 
! .I find_libs
! command will exit with a status of 1 on any error.
! The 
! .I find_libs
! command will only exit with a status of 0 if there are no errors.
! .SH COPYRIGHT
! The
! .I find_libs
! command is Copyright
! .if n (c)
! .if t \(co
! 1988-1993 Peter Miller.
  .br
! All rights reserved.
  .PP
! The 
! .I find_libs
! program is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY;
! without even the implied warranty
! of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
! See the GNU General Public License for more details.
! .SH AUTHOR
! .TS
! center,tab(;);
! l l l.
! Peter Miller;UUCP;uunet!munnari!bmr.gov.au!pmiller
! /\e/\e*;CSNET;pmiller@bmr.gov.au
! .TE
--- 65,93 ----
  and
  .I /lib
  places.
! This is like the same argument to
! .IR cc (1),
! and the usual \*(n) option abbreviation rules do not apply.
! .TP 8n
  .BI -l name
+ .br
  Name a library to be searched for.
! This is like the same argument to
! .IR cc (1),
! and the usual \*(n) option abbreviation rules do not apply.
! .TP 8n
! .B -Help
! .br
  Give some information on how to use the
! .I \*(n)
  command.
! .TP 8n
! .B -VERSion
  .br
! Tell the version of the
! .I \*(n)
! command currently executing.
  .PP
! All other options will result in a diagnostic error.
! .so o__rules.so
! .so copyright.so
Index: man1/install.sh
***************
*** 0 ****
--- 1,39 ----
+ #! /bin/sh
+ #
+ #	cook - file construction tool
+ #	Copyright (C) 1993 Peter Miller.
+ #	All rights reserved.
+ #
+ #	This program is free software; you can redistribute it and/or modify
+ #	it under the terms of the GNU General Public License as published by
+ #	the Free Software Foundation; either version 2 of the License, or
+ #	(at your option) any later version.
+ #
+ #	This program is distributed in the hope that it will be useful,
+ #	but WITHOUT ANY WARRANTY; without even the implied warranty of
+ #	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ #	GNU General Public License for more details.
+ #
+ #	You should have received a copy of the GNU General Public License
+ #	along with this program; if not, write to the Free Software
+ #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ #
+ # MANIFEST: shell script to install section 1 manual pages
+ #
+ case $# in
+ 1)
+ 	;;
+ *)
+ 	echo "usage: $0 somewhere/man1" 1>&2
+ 	exit 1
+ 	;;
+ esac
+ 
+ set -e
+ cd man1
+ for file in *.1
+ do
+ 	echo "soelim $file > $1/$file"
+ 	soelim $file > $1/$file
+ done
+ exit 0
Index: man1/o__rules.so
***************
*** 0 ****
--- 1,48 ----
+ .\"
+ .\"	cook - file construction tool
+ .\"	Copyright (C) 1993 Peter Miller.
+ .\"	All rights reserved.
+ .\"
+ .\"	This program is free software; you can redistribute it and/or modify
+ .\"	it under the terms of the GNU General Public License as published by
+ .\"	the Free Software Foundation; either version 2 of the License, or
+ .\"	(at your option) any later version.
+ .\"
+ .\"	This program is distributed in the hope that it will be useful,
+ .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
+ .\"	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ .\"	GNU General Public License for more details.
+ .\"
+ .\"	You should have received a copy of the GNU General Public License
+ .\"	along with this program; if not, write to the Free Software
+ .\"	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ .\"
+ .\" MANIFEST: description of option up/down case convention
+ .\"
+ .PP
+ All options may be abbreviated;
+ the abbreviation is documented as the upper case letters,
+ all lower case letters and underscores (_) are optional.
+ You must use consecutive sequences of optional letters.
+ .PP
+ All options are case insensitive,
+ you may type them in upper case or lower case or a combination of both,
+ case is not important.
+ .PP
+ For example:
+ the arguments "-help", "-HEL" and "-h" are
+ all interpreted to mean the \fB-Help\fP option.
+ The argument "-hlp" will not be understood,
+ because consecutive optional characters were not supplied.
+ .PP
+ Options and other command line arguments may be
+ mixed arbitrarily on the command line.
+ .br
+ .ne 4
+ .PP
+ The GNU long option names are understood.
+ Since all option names for
+ .I \*(n)
+ are long,
+ this means ignoring the extra leading '-'.
+ The "\fB--\fIoption\fB=\fIvalue\fR" convention is also understood.
Index: man1/roffpp.1
***************
*** 1,12 ****
  '\" t
  .\"	cook - file construction tool
! .\"	Copyright (c) 1991-1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 1, or (at your option)
! .\"	any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  '\" t
  .\"	cook - file construction tool
! .\"	Copyright (C) 1991, 1992, 1993 Peter Miller.
  .\"	All rights reserved.
  .\"
  .\"	This program is free software; you can redistribute it and/or modify
  .\"	it under the terms of the GNU General Public License as published by
! .\"	the Free Software Foundation; either version 2 of the License, or
! .\"	(at your option) any later version.
  .\"
  .\"	This program is distributed in the hope that it will be useful,
  .\"	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 17,31 ****
  .\"	along with this program; if not, write to the Free Software
  .\"	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  .\"
! .\" MANIFEST: manual entry for roffpp
  .\" 
! .TH roffpp cook
! .ad l
! .hy 0
  .SH NAME
! roffpp \- replace \&.so requests within *roff sources
  .SH SYNOPSIS
! .B roffpp
  [
  .IR option ...
  ][
--- 17,33 ----
  .\"	along with this program; if not, write to the Free Software
  .\"	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  .\"
! .\" MANIFEST: manual entry for the roffpp command
  .\" 
! .TH ROFFPP 1
! .ds n) roffpp
! .if n .ad l
! .if n .hy 0
! .if n .nr IN 8n
  .SH NAME
! \*(n) \- replace \&.so requests within *roff sources
  .SH SYNOPSIS
! .B \*(n)
  [
  .IR option ...
  ][
***************
*** 34,47 ****
  .I outfile
  ]]
  .br
! .B roffpp
  .B -Help
  .br
! .B roffpp
  .B -VERSion
  .SH DESCRIPTION
  The
! .I roffpp
  command may be used to
  copies the input file to the output file,
  including files named using
--- 36,49 ----
  .I outfile
  ]]
  .br
! .B \*(n)
  .B -Help
  .br
! .B \*(n)
  .B -VERSion
  .SH DESCRIPTION
  The
! .I \*(n)
  command may be used to
  copies the input file to the output file,
  including files named using
***************
*** 63,69 ****
  .I \&.nx
  directive is not understood.
  The
! .I roffpp
  program is not a general *roff interpreter,
  so many constructs will be beyond it,
  fortunately, most of them have nothing to do with include files.
--- 65,71 ----
  .I \&.nx
  directive is not understood.
  The
! .I \*(n)
  program is not a general *roff interpreter,
  so many constructs will be beyond it,
  fortunately, most of them have nothing to do with include files.
***************
*** 74,80 ****
  for *roff to interpret at a later time.
  .PP
  The
! .I roffpp
  program also allows the user to specify an include search path.
  This allows, for example, common files to be kept in a central location.
  .PP
--- 76,82 ----
  for *roff to interpret at a later time.
  .PP
  The
! .I \*(n)
  program also allows the user to specify an include search path.
  This allows, for example, common files to be kept in a central location.
  .PP
***************
*** 110,121 ****
  as appropriate.
  .PP
  The output attempts to keep file names and line numbers in sync
! by setting the
! .I f.
! string and the
! .I c.
! number register at the beginning of each file
! and after the end of each included file.
  .SH OPTIONS
  The following options are understood.
  .TP 8n
--- 112,128 ----
  as appropriate.
  .PP
  The output attempts to keep file names and line numbers in sync
! by using the
! .B \&.lf
! directive.
! The
! .B \&.lf
! directive is also understood as input.
! This is compatible with
! .IR groff (1)
! and the other GNU text utilities included in the groff package.
! .br
! .ne 1i
  .SH OPTIONS
  The following options are understood.
  .TP 8n
***************
*** 130,176 ****
  .B -Help
  .br
  Give information on how to use
! .IR roffpp .
  .TP 8n
  .B -VERSion
  .br
  Tell what version of
! .I roffpp
  is being run.
  .PP
  Any other option will generate a diagnostic error.
! All options are case-independent.
! Options may be abbriviated,
! the minimum abbreviation is shown in upper case.
! Options and filenames may be mixed arbitrarily on the command line.
! .SH EXIT STATUS
! The 
! .I roffpp
! command will exit with a status of 1 on any error.
! The 
! .I roffpp
! command will only exit with a status of 0 if there are no errors.
! .SH COPYRIGHT
! The
! .I roffpp
! command is Copyright
! .if n (c)
! .if t \(co
! 1988-1993 Peter Miller.
! .br
! All rights reserved.
! .PP
! The 
! .I roffpp
! program is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY;
! without even the implied warranty
! of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
! See the GNU General Public License for more details.
! .SH AUTHOR
! .TS
! tab(;);
! l l l.
! Peter Miller;UUCP;uunet!munnari!bmr.gov.au!pmiller
! /\e/\e*;CSNET;pmiller@bmr.gov.au
! .TE
--- 137,150 ----
  .B -Help
  .br
  Give information on how to use
! .IR \*(n) .
  .TP 8n
  .B -VERSion
  .br
  Tell what version of
! .I \*(n)
  is being run.
  .PP
  Any other option will generate a diagnostic error.
! .so o__rules.so
! .so copyright.so
Index: roffpp/main.c
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1991-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1991, 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 62,70 ****
  "	%s -VERSion",
  "",
  "DESCRIPTION",
! "	The %s command may be used to copies the input file to",
! "	the output file, including files named using .so directives",
! "	along the way, and removing the .so directives.",
  "",
  "	This is useful when processing large multi-file documents",
  "	with filters such as tbl(1) or eqn(1) which do not",
--- 62,71 ----
  "	%s -VERSion",
  "",
  "DESCRIPTION",
! "	The %s command may be used to copies the input file",
! "	to the output file, including files named using .so",
! "	directives along the way, and removing the .so",
! "	directives.",
  "",
  "	This is useful when processing large multi-file documents",
  "	with filters such as tbl(1) or eqn(1) which do not",
***************
*** 72,119 ****
  "	understood.  The %s program is not a general *roff",
  "	interpreter, so many constructs will be beyond it,",
  "	fortunately, most of them have nothing to do with include",
! "	files.  Include files which cannot be found, probably from",
! "	uninterpreted *roff constructs, if the files really does",
! "	exist, will simply be passed through unchanged, for *roff to",
! "	interpret at a later time.",
  "",
  "	The %s program also allows the user to specify an",
! "	include search path.  This allows, for example, common files",
! "	to be kept in a central location.",
  "",
  "	Only directives of the form",
! "	     .so filename",
  "	are processed.  If the directive is introduced using the",
! "	single quote form, or the dot is not the first character of",
! "	the line, the directive will be ignored.",
  "",
! "	Any extra arguments on the line are ignored, and quoting is",
! "	not understood.  All characters are interpreted literally.",
  "",
  "	Examples of directives which will be ignored include",
! "	     'so /usr/lib/tmac/tmac.an",
! "	     .if n .so yuck",
  "	This list is not exhaustive.",
  "",
  "	The special file name `-' on the command line means the",
  "	standard input or standard output, as appropriate.  Files",
! "	which are omitted are also assumed to be the standard input",
! "	or standard output, as appropriate.",
  "",
! "	The output attempts to keep file names and line numbers in",
! "	sync by setting the f. string and the c. number register at",
! "	the beginning of each file and after the end of each",
! "	included file.",
  "",
  "OPTIONS",
  "	The following options are understood.",
  "",
  "	-I<path>",
! "		Specify include path, a la cc(1).  Include paths are",
! "		searched in the order specified.  The include search",
! "		path defaults to the current directory if and only",
! "		if the user does not specify any include search",
! "		paths.",
  "",
  "	-Help",
  "		Give information on how to use %s.",
--- 73,122 ----
  "	understood.  The %s program is not a general *roff",
  "	interpreter, so many constructs will be beyond it,",
  "	fortunately, most of them have nothing to do with include",
! "	files.  Include files which cannot be found, probably",
! "	from uninterpreted *roff constructs, if the files really",
! "	does exist, will simply be passed through unchanged, for",
! "	*roff to interpret at a later time.",
  "",
  "	The %s program also allows the user to specify an",
! "	include search path.  This allows, for example, common",
! "	files to be kept in a central location.",
  "",
  "	Only directives of the form",
! "		.so filename",
  "	are processed.  If the directive is introduced using the",
! "	single quote form, or the dot is not the first character",
! "	of the line, the directive will be ignored.",
  "",
! "	Any extra arguments on the line are ignored, and quoting",
! "	is not understood.  All characters are interpreted",
! "	literally.",
  "",
  "	Examples of directives which will be ignored include",
! "		'so /usr/lib/tmac/tmac.an",
! "		.if n .so yuck",
  "	This list is not exhaustive.",
  "",
  "	The special file name `-' on the command line means the",
  "	standard input or standard output, as appropriate.  Files",
! "	which are omitted are also assumed to be the standard",
! "	input or standard output, as appropriate.",
  "",
! "	The output attempts to keep file names and line numbers",
! "	in sync by using the .lf directive.  The .lf directive is",
! "	also understood as input.  This is compatible with",
! "	groff(1) and the other GNU text utilities included in the",
! "	groff package.",
  "",
  "OPTIONS",
  "	The following options are understood.",
  "",
  "	-I<path>",
! "		Specify include path, a la cc(1).  Include paths",
! "		are searched in the order specified.  The include",
! "		search path defaults to the current directory if",
! "		and only if the user does not specify any include",
! "		search paths.",
  "",
  "	-Help",
  "		Give information on how to use %s.",
***************
*** 121,135 ****
  "	-VERSion",
  "		Tell what version of %s is being run.",
  "",
! "	Any other option will generate a diagnostic error.  All",
! "	options are case-independent.  Options may be abbriviated,",
! "	the minimum abbreviation is shown in upper case.  Options",
! "	and filenames may be mixed arbitrarily on the command line.",
  "",
  "EXIT STATUS",
  "	The %s command will exit with a status of 1 on any",
! "	error.  The %s command will only exit with a status of 0",
! "	if there are no errors.",
  "",
  "COPYRIGHT",
  "	%C",
--- 124,157 ----
  "	-VERSion",
  "		Tell what version of %s is being run.",
  "",
! "	Any other option will generate a diagnostic error.",
  "",
+ "	All options may be abbreviated; the abbreviation is",
+ "	documented as the upper case letters, all lower case",
+ "	letters and underscores (_) are optional.  You must use",
+ "	consecutive sequences of optional letters.",
+ "",
+ "	All options are case insensitive, you may type them in",
+ "	upper case or lower case or a combination of both, case",
+ "	is not important.",
+ "",
+ "	For example: the arguments \"-help\", \"-HEL\" and \"-h\" are",
+ "	all interpreted to mean the -Help option.  The argument",
+ "	\"-hlp\" will not be understood, because consecutive",
+ "	optional characters were not supplied.",
+ "",
+ "	Options and other command line arguments may be mixed",
+ "	arbitrarily on the command line.",
+ "",
+ "	The GNU long option names are understood.  Since all",
+ "	option names for %s are long, this means ignoring the",
+ "	extra leading '-'.  The \"--option=value\" convention is",
+ "	also understood.",
+ "",
  "EXIT STATUS",
  "	The %s command will exit with a status of 1 on any",
! "	error.  The %s command will only exit with a status",
! "	of 0 if there are no errors.",
  "",
  "COPYRIGHT",
  "	%C",
***************
*** 144,158 ****
  
  enum
  {
! 	arglex_token_include,
! 	arglex_token_include_long
  };
  
! static arglex_table_t argtab[] =
  {
! 	{ "-\\I*",	arglex_token_include,		},
! 	{ "-Include",	arglex_token_include_long,	},
! 	{ 0, 0, }, /* end marker */
  };
  
  
--- 166,179 ----
  
  enum
  {
! 	arglex_token_include
  };
  
! static arglex_table_ty argtab[] =
  {
! 	{ "-\\I*",	(arglex_token_ty)arglex_token_include,	},
! 	{ "-Include",	(arglex_token_ty)arglex_token_include,	},
! 	{ 0, (arglex_token_ty)0, }, /* end marker */
  };
  
  
***************
*** 215,226 ****
  				fatal("too many file names specified");
  			break;
  	
- 		case arglex_token_include_long:
- 			if (arglex() != arglex_token_string)
- 				usage();
- 			/* fall through... */
- 	
  		case arglex_token_include:
  			preprocess_include(arglex_value.alv_string);
  			break;
  
--- 236,244 ----
  				fatal("too many file names specified");
  			break;
  	
  		case arglex_token_include:
+ 			if (arglex() != arglex_token_string)
+ 				fatal("-Include requires a string argument");
  			preprocess_include(arglex_value.alv_string);
  			break;
  
***************
*** 227,233 ****
  #ifdef DEBUG
  		case arglex_token_tracing:
  			if (arglex() != arglex_token_string)
! 				usage();
  			for (;;)
  			{
  				trace_enable(arglex_value.alv_string);
--- 245,251 ----
  #ifdef DEBUG
  		case arglex_token_tracing:
  			if (arglex() != arglex_token_string)
! 				fatal("-TRACIng requires ore or more string arguments");
  			for (;;)
  			{
  				trace_enable(arglex_value.alv_string);
Index: roffpp/preprocess.c
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1992-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 56,62 ****
  preprocess_include(path)
  	char		*path;
  {
! 	string_t	*s;
  
  	trace(("preprocess_include(path = \"%s\")\n{\n"/*}*/, path));
  	s = str_from_c(path);
--- 56,62 ----
  preprocess_include(path)
  	char		*path;
  {
! 	string_ty	*s;
  
  	trace(("preprocess_include(path = \"%s\")\n{\n"/*}*/, path));
  	s = str_from_c(path);
***************
*** 86,92 ****
   *		non-zero if it is a .so directive
   */
  
! static void scan _((string_t *)); /* forward */
  
  static int source _((char *));
  
--- 86,92 ----
   *		non-zero if it is a .so directive
   */
  
! static void scan _((string_ty *)); /* forward */
  
  static int source _((char *));
  
***************
*** 94,104 ****
  source(line)
  	char		*line;
  {
! 	string_t	*filename;
  	size_t		j;
  	int		result;
  	char		*ep;
! 	static string_t	*dot;
  
  	/*
  	 * see if this is a .so directive
--- 94,104 ----
  source(line)
  	char		*line;
  {
! 	string_ty	*filename;
  	size_t		j;
  	int		result;
  	char		*ep;
! 	static string_ty *dot;
  
  	/*
  	 * see if this is a .so directive
***************
*** 143,150 ****
  		dot = str_from_c(".");
  	for (j = 0; j < search.wl_nwords; ++j)
  	{
! 		string_t	*s;
! 		string_t	*dir;
  
  		dir = search.wl_word[j];
  		if (str_equal(dir, dot))
--- 143,150 ----
  		dot = str_from_c(".");
  	for (j = 0; j < search.wl_nwords; ++j)
  	{
! 		string_ty	*s;
! 		string_ty	*dir;
  
  		dir = search.wl_word[j];
  		if (str_equal(dir, dot))
***************
*** 182,188 ****
   *	lf_directive
   *
   * SYNOPSIS
!  *	int lf_directive(char *line, string_t **ifn, long *lino);
   *
   * DESCRIPTION
   *	The lf_directive function is used to test if a line of text is
--- 182,188 ----
   *	lf_directive
   *
   * SYNOPSIS
!  *	int lf_directive(char *line, string_ty **ifn, long *lino);
   *
   * DESCRIPTION
   *	The lf_directive function is used to test if a line of text is
***************
*** 198,214 ****
   *		non-zero if it is a .so directive
   */
  
! static int lf_directive _((char *line, string_t **ifn, long *lino));
  
  static int
  lf_directive(line, ifn, lino)
  	char		*line;
! 	string_t	**ifn;
  	long		*lino;
  {
  	int		result;
  	long		n;
! 	string_t	*s;
  	char		*ep;
  
  	/*
--- 198,214 ----
   *		non-zero if it is a .so directive
   */
  
! static int lf_directive _((char *line, string_ty **ifn, long *lino));
  
  static int
  lf_directive(line, ifn, lino)
  	char		*line;
! 	string_ty	**ifn;
  	long		*lino;
  {
  	int		result;
  	long		n;
! 	string_ty	*s;
  	char		*ep;
  
  	/*
***************
*** 286,297 ****
   *	line	- num number in the input file
   */
  
! static void resync _((FILE *, string_t *, long));
  
  static void
  resync(ofp, file, line)
  	FILE		*ofp;
! 	string_t	*file;
  	long		line;
  {
  	fprintf(ofp, ".lf %ld %s\n", line, file->str_text);
--- 286,297 ----
   *	line	- num number in the input file
   */
  
! static void resync _((FILE *, string_ty *, long));
  
  static void
  resync(ofp, file, line)
  	FILE		*ofp;
! 	string_ty	*file;
  	long		line;
  {
  	fprintf(ofp, ".lf %ld %s\n", line, file->str_text);
***************
*** 314,324 ****
   *	path	- name of file to scan
   */
  
! static void scan _((string_t *));
  
  static void
  scan(ifn)
! 	string_t	*ifn;
  {
  	FILE		*ifp;
  	size_t		pos;
--- 314,324 ----
   *	path	- name of file to scan
   */
  
! static void scan _((string_ty *));
  
  static void
  scan(ifn)
! 	string_ty	*ifn;
  {
  	FILE		*ifp;
  	size_t		pos;
***************
*** 326,332 ****
  	static char	*line;
  	long		lino;
  	int		c;
! 	string_t	*ifn2;
  
  	trace(("scan(ifn = \"%s\")\n{\n"/*}*/, ifn ? ifn->str_text : "-"));
  	if (ifn)
--- 326,332 ----
  	static char	*line;
  	long		lino;
  	int		c;
! 	string_ty	*ifn2;
  
  	trace(("scan(ifn = \"%s\")\n{\n"/*}*/, ifn ? ifn->str_text : "-"));
  	if (ifn)
***************
*** 422,428 ****
  	char		*ifile;
  	char		*ofile;
  {
! 	string_t	*s;
  
  	/*
  	 * default the search path iff the user specified nothing
--- 422,428 ----
  	char		*ifile;
  	char		*ofile;
  {
! 	string_ty	*s;
  
  	/*
  	 * default the search path iff the user specified nothing
Index: roffpp/preprocess.h
***************
*** 1,12 ****
  /*
   *	cook - file construction tool
!  *	Copyright (c) 1992-1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 1, or (at your option)
!  *	any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,12 ----
  /*
   *	cook - file construction tool
!  *	Copyright (C) 1992, 1993 Peter Miller.
   *	All rights reserved.
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
!  *	the Free Software Foundation; either version 2 of the License, or
!  *	(at your option) any later version.
   *
   *	This program is distributed in the hope that it will be useful,
   *	but WITHOUT ANY WARRANTY; without even the implied warranty of
Index: test/00/t0001a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the "and" builtin function
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of builtin function "and"' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0002a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test "catenate" builtin function
  #
  
--- 18,23 ----
***************
*** 28,34 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 26,32 ----
  
  fail()
  {
! 	echo 'FAILED test of builtin function "catenate"' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0003a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test "collect" builtin function
  #
  
--- 18,23 ----
***************
*** 28,34 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 26,32 ----
  
  fail()
  {
! 	echo 'FAILED test of builtin function "collect"' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0004a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test "collect_lines" builtin function
  #
  
--- 18,23 ----
***************
*** 28,34 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 26,32 ----
  
  fail()
  {
! 	echo 'FAILED test of the builtin function "collect_lines"' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0005a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the "count" builtin function
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of builtin function "count"' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0006a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the "defined" builtin function
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of builtin function "defined"' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0007a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the "dirname" builtin function
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of builtin function "dirname"' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
***************
*** 46,57 ****
  cat > Howto.cook <<foobar
  test:
  {
! 	if [not [in [dir x] $tmp]] then fail;
  	if [not [in [dir x/y] x]] then fail;
  	if [not [in [dir /] /]] then fail;
  	if [not [in [dir /foo] /]] then fail;
  	if [not [in [dir /foo/bar] /foo]] then fail;
! 	if [not [in [dirname x] $tmp]] then fail;
  	if [not [in [dirname x/y] x]] then fail;
  	if [not [in [dirname /] /]] then fail;
  	if [not [in [dirname /foo] /]] then fail;
--- 44,55 ----
  cat > Howto.cook <<foobar
  test:
  {
! 	if [not [in [dir x] [pathname $tmp]]] then fail;
  	if [not [in [dir x/y] x]] then fail;
  	if [not [in [dir /] /]] then fail;
  	if [not [in [dir /foo] /]] then fail;
  	if [not [in [dir /foo/bar] /foo]] then fail;
! 	if [not [in [dirname x] [pathname $tmp]]] then fail;
  	if [not [in [dirname x/y] x]] then fail;
  	if [not [in [dirname /] /]] then fail;
  	if [not [in [dirname /foo] /]] then fail;
Index: test/00/t0008a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the "downcase" builtin function
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of builtin function "downcase"' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0009a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the "entryname" builtin function
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of builtin function "entryname"' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0010a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the "execute" builtin function
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of builtin function "execute"' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0011a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the "exists" builtin function
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of builtin function "exists"' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0012a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the "find_command" builtin function
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of builtin function "find_command"' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0013a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the "fromto" builtin function
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of builtin function "fromto"' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0014a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the "getenv" builtin function
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of builtin function "getenv"' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0015a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the "glob" builtin function
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of builtin function "glob"' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0016a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the "match" builtin function
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of builtin function "match"' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0017a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the "head" builtin function
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of builtin function "head"' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0018a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the "if" builtin function
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of builtin funrction "if"' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0019a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the "in" builtin function
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of builtin function "in"' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0020a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the "match_mask" builtin function
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of builtin function "match_mask"' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0021a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the "mtime" builtin function
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of builtin function "mtime"' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0022a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the "not" builtin function
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of builtin function "not"' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0023a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the "or" builtin function
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of builtin function "or"' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0024a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the "pathname" builtin function
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of builtin function "pathname"' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
***************
*** 46,53 ****
  cat > Howto.cook <<foobar
  test:
  {
! 	if [not [in [pathname .] $tmp]] then fail;
! 	if [not [in [pathname x] $tmp/x]] then fail;
  	if [not [in [pathname /] /]] then fail;
  	if [not [in [pathname /////usr/bin//////././//.///] /usr/bin]]
  		then fail;
--- 44,51 ----
  cat > Howto.cook <<foobar
  test:
  {
! 	if [not [in [pathname .] [pathname $tmp]]] then fail;
! 	if [not [in [pathname x] [pathname $tmp/x]]] then fail;
  	if [not [in [pathname /] /]] then fail;
  	if [not [in [pathname /////usr/bin//////././//.///] /usr/bin]]
  		then fail;
Index: test/00/t0025a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the "prepost" builtin function
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of builtin function "prepost"' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0026a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the "quote" builtin function
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of builtin function "quote"' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0027a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the "stringset" builtin function
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of builtin function "stringset"' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0028a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the "tail" builtin function
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of builtin function "tail"' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0029a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,33 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
! # ----------------------------------------------------------------------
  #
- # MANIFEST: test the "and" builtin function
- #
  tmp=/tmp/$$
  here=`pwd`
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 18,31 ----
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
! # MANIFEST: test the cook -Book option
  #
  tmp=/tmp/$$
  here=`pwd`
  
  fail()
  {
! 	echo 'FAILED test of the cook -Book option' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0030a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the "-version" command line option
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of the -VERSion command line option' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0031a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the os_stat_cache() function
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of the os_stat_chache() function of cook' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0032a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the "sort" builtin function
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of the builtin function "sort"' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0033a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1992 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,31 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the c_incl program
  #
  
  fail()
  {
! 	echo FAILED 1>&2
  	exit 1
  }
  pass()
--- 18,29 ----
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
  # MANIFEST: test the c_incl program
  #
  
  fail()
  {
! 	echo 'FAILED test of the c_incl program' 1>&2
  	exit 1
  }
  pass()
Index: test/00/t0034a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the "%0" pattern replacement - it may be empty
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of the "%0" pattern replacement' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0035a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the %0 pattern, it must not match absolute paths
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of the "%0" pattern' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0036a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the %1, etc, patterns
  # they may not match the empty string
  #
--- 18,23 ----
***************
*** 28,34 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 26,32 ----
  
  fail()
  {
! 	echo 'FAILED test of "%n" patterns' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0037a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the c_incl -no_cache option
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of the c_incl -No_Cache option' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0038a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test roffpp functionality
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 28,34 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 26,32 ----
  
  fail()
  {
! 	echo 'FAILED test of roffpp command' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0039a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the c_incl -Roff option
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of c_incl -Roff option' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0040a.sh
***************
*** 1,13 ****
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1990-1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
  #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: test the cooktime program
  #
  tmp=/tmp/$$
--- 18,23 ----
***************
*** 27,33 ****
  
  fail()
  {
! 	echo FAILED 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
--- 25,31 ----
  
  fail()
  {
! 	echo 'FAILED test of the cooktime program' 1>&2
  	cd $here
  	rm -rf $tmp
  	exit 1
Index: test/00/t0041a.sh
***************
*** 1,13 ****
! #!/bin/sh
  #
  #	cook - file construction tool
! #	Copyright (c) 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 1, or (at your option)
! #	any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
--- 1,13 ----
! #! /bin/sh
  #
  #	cook - file construction tool
! #	Copyright (C) 1993 Peter Miller.
  #	All rights reserved.
  #
  #	This program is free software; you can redistribute it and/or modify
  #	it under the terms of the GNU General Public License as published by
! #	the Free Software Foundation; either version 2 of the License, or
! #	(at your option) any later version.
  #
  #	This program is distributed in the hope that it will be useful,
  #	but WITHOUT ANY WARRANTY; without even the implied warranty of
***************
*** 18,25 ****
  #	along with this program; if not, write to the Free Software
  #	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  #
- # ----------------------------------------------------------------------
- #
  # MANIFEST: Test the "resolve" builtin function
  #
  
--- 18,23 ----
***************
*** 27,36 ****
  PAGER=cat
  export PAGER
  
  fail()
  {
  	set +x
! 	echo FAILED 1>&2
  	find $work -type d -user $USER -exec chmod u+w {} \;
  	rm -rf $work
  	exit 1
--- 25,38 ----
  PAGER=cat
  export PAGER
  
+ here=`pwd`
+ if test $? -ne 0 ; then exit 1; fi
+ 
  fail()
  {
  	set +x
! 	echo 'FAILED test of the builtin function "resolve"' 1>&2
! 	cd $here
  	find $work -type d -user $USER -exec chmod u+w {} \;
  	rm -rf $work
  	exit 1
***************
*** 39,44 ****
--- 41,47 ----
  {
  	set +x
  	echo PASSED 1>&2
+ 	cd $here
  	find $work -type d -user $USER -exec chmod u+w {} \;
  	rm -rf $work
  	exit 0
***************
*** 45,52 ****
  }
  trap "fail" 1 2 3 15
  
- here=`pwd`
- if test $? -ne 0 ; then exit 1; fi
  mkdir $work
  if test $? -ne 0 ; then exit 1; fi
  cd $work
--- 48,53 ----
fubar
