home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
unix
/
volume26
/
cook-1.4
/
part02
< prev
next >
Wrap
Text File
|
1993-05-03
|
101KB
|
3,537 lines
Newsgroups: comp.sources.unix
From: pmiller@bmr.gov.au (Peter Miller)
Subject: v26i210: cook-1.4 - a file construction tool (like "make"), Part02/11
Sender: unix-sources-moderator@efficacy.home.vix.com
Approved: WhoAmI@efficacy.home.vix.com
Submitted-By: pmiller@bmr.gov.au (Peter Miller)
Posting-Number: Volume 26, Issue 210
Archive-Name: cook-1.4/part02
#! /bin/sh
# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:
# "End of archive 2 (of 11)."
# Contents: aux/MANIFEST.sh c_incl/os.c c_incl/sniff.h common/ansi.c
# common/arglex.h common/error.h common/s-v-arg.h common/str.h
# common/word.h conf/ConvexOS-10 conf/SunOS-4.1.2 conf/SunOS-4.1.3
# conf/SysV-4.0 conf/ULTRIX-4.2 conf/dgux-5.4.1 cook/expr.h
# cook/id.h cook/lex.h cook/match.h cook/os.h doc/conditions
# doc/history doc/intro doc/refman.t doc/variables find_libs/os.c
# lib/bison lib/lex man1/copyright.so man1/find_libs.1
# man1/o__rules.so test/00/t0002a.sh test/00/t0005a.sh
# test/00/t0007a.sh test/00/t0009a.sh test/00/t0015a.sh
# test/00/t0018a.sh test/00/t0024a.sh test/00/t0027a.sh
# test/00/t0030a.sh test/00/t0031a.sh test/00/t0032a.sh
# test/00/t0034a.sh test/00/t0037a.sh test/00/t0039a.sh
# test/00/t0040a.sh
# Wrapped by vixie@efficacy.home.vix.com on Tue May 4 01:36:35 1993
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'aux/MANIFEST.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'aux/MANIFEST.sh'\"
else
echo shar: Extracting \"'aux/MANIFEST.sh'\" \(1589 characters\)
sed "s/^X//" >'aux/MANIFEST.sh' <<'END_OF_FILE'
X#! /bin/sh
X#
X# cook - file construction tool
X# Copyright (C) 1993 Peter Miller.
X# All rights reserved.
X#
X# This program is free software; you can redistribute it and/or modify
X# it under the terms of the GNU General Public License as published by
X# the Free Software Foundation; either version 2 of the License, or
X# (at your option) any later version.
X#
X# This program is distributed in the hope that it will be useful,
X# but WITHOUT ANY WARRANTY; without even the implied warranty of
X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X# GNU General Public License for more details.
X#
X# You should have received a copy of the GNU General Public License
X# along with this program; if not, write to the Free Software
X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X#
X# MANIFEST: shell script to generate the MANIFEST file
X#
Xecho
Xecho
Xfor f in $*
Xdo
X case $f in
X MANIFEST)
X info="This file"
X ;;
X LICENSE)
X info="GNU General Public License"
X ;;
X README)
X info="Blurb about cook"
X ;;
X BUILDING)
X info="Instructions how to build, test and install cook"
X ;;
X CHANGES)
X info="Change history of this release of cook"
X ;;
X Makefile)
X info="Instructions to make(1) how to build and test cook"
X ;;
X common/patchlevel.h)
X info="The patch level of this distribution."
X ;;
X doc/version.so)
X info="The patch level of this distribution."
X ;;
X *)
X info=`awk '
X/[ ]MANIFEST:[ ]/ {
X for (j = 1; j < NF; ++j)
X if ($j == "MANIFEST:")
X break;
X for (k = j + 1; k <= NF; ++k)
X printf(" %s", $k);
X printf("\n");
X exit;
X}' $f`
X ;;
X esac
X echo "$f $info"
Xdone
Xexit 0
END_OF_FILE
if test 1589 -ne `wc -c <'aux/MANIFEST.sh'`; then
echo shar: \"'aux/MANIFEST.sh'\" unpacked with wrong size!
fi
# end of 'aux/MANIFEST.sh'
fi
if test -f 'c_incl/os.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'c_incl/os.c'\"
else
echo shar: Extracting \"'c_incl/os.c'\" \(1396 characters\)
sed "s/^X//" >'c_incl/os.c' <<'END_OF_FILE'
X/*
X * cook - file construction tool
X * Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
X * All rights reserved.
X *
X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by
X * the Free Software Foundation; either version 2 of the License, or
X * (at your option) any later version.
X *
X * This program is distributed in the hope that it will be useful,
X * but WITHOUT ANY WARRANTY; without even the implied warranty of
X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X * GNU General Public License for more details.
X *
X * You should have received a copy of the GNU General Public License
X * along with this program; if not, write to the Free Software
X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X *
X * MANIFEST: functions to isolate operating system interface
X */
X
X#include <sys/types.h>
X#include <sys/stat.h>
X#include <errno.h>
X
X#include <error.h>
X#include <os.h>
X
X/*
X * NAME
X * os_exists - tests for the existence of a file
X *
X * SYNOPSIS
X * int os_exists(char *filename);
X *
X * DESCRIPTION
X * Os_returns 1 if the file exists, 0 if it does not.
X */
X
Xint
Xos_exists(filename)
X char *filename;
X{
X struct stat st;
X
X if (stat(filename, &st))
X {
X switch (errno)
X {
X case ENOENT:
X case ENOTDIR:
X break;
X
X default:
X nfatal("%s", filename);
X }
X return 0;
X }
X return 1;
X}
END_OF_FILE
if test 1396 -ne `wc -c <'c_incl/os.c'`; then
echo shar: \"'c_incl/os.c'\" unpacked with wrong size!
fi
# end of 'c_incl/os.c'
fi
if test -f 'c_incl/sniff.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'c_incl/sniff.h'\"
else
echo shar: Extracting \"'c_incl/sniff.h'\" \(1590 characters\)
sed "s/^X//" >'c_incl/sniff.h' <<'END_OF_FILE'
X/*
X * cook - file construction tool
X * Copyright (C) 1991, 1992, 1993 Peter Miller.
X * All rights reserved.
X *
X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by
X * the Free Software Foundation; either version 2 of the License, or
X * (at your option) any later version.
X *
X * This program is distributed in the hope that it will be useful,
X * but WITHOUT ANY WARRANTY; without even the implied warranty of
X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X * GNU General Public License for more details.
X *
X * You should have received a copy of the GNU General Public License
X * along with this program; if not, write to the Free Software
X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X *
X * MANIFEST: interface definition for c_incl/sniff.c
X */
X
X#ifndef SNIFF_H
X#define SNIFF_H
X
X#ifdef __GUNC__
X #pragma once
X#endif
X
X#include <stdio.h>
X#include <main.h>
X
Xenum
X{
X absent_ignore,
X absent_mention,
X absent_error
X};
X
Xtypedef struct option_ty option_ty;
Xstruct option_ty
X{
X int o_verbose;
X int o_absent_local;
X int o_absent_system;
X int o_absent_program;
X};
Xextern option_ty option;
X
Xstruct wlist;
X
Xtypedef struct sniff_ty sniff_ty;
Xstruct sniff_ty
X{
X int (*scan)_((FILE *, struct wlist *, struct wlist *));
X void (*prepare)_((void));
X};
X
Xextern sniff_ty lang_c;
Xextern sniff_ty lang_roff;
X
Xvoid sniff _((char *));
Xvoid sniff_include _((char *));
Xlong sniff_include_count _((void));
Xvoid sniff_prepare _((void));
Xvoid sniff_language _((sniff_ty *));
X
X#endif /* SNIFF_H */
END_OF_FILE
if test 1590 -ne `wc -c <'c_incl/sniff.h'`; then
echo shar: \"'c_incl/sniff.h'\" unpacked with wrong size!
fi
# end of 'c_incl/sniff.h'
fi
if test -f 'common/ansi.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'common/ansi.c'\"
else
echo shar: Extracting \"'common/ansi.c'\" \(1991 characters\)
sed "s/^X//" >'common/ansi.c' <<'END_OF_FILE'
X/*
X * cook - file construction tool
X * Copyright (C) 1991, 1992, 1993 Peter Miller.
X * All rights reserved.
X *
X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by
X * the Free Software Foundation; either version 2 of the License, or
X * (at your option) any later version.
X *
X * This program is distributed in the hope that it will be useful,
X * but WITHOUT ANY WARRANTY; without even the implied warranty of
X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X * GNU General Public License for more details.
X *
X * You should have received a copy of the GNU General Public License
X * along with this program; if not, write to the Free Software
X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X *
X * MANIFEST: functions to implement missing ANSI C mandated functions
X *
X * This file contains functions for use with non-ANSI conforming systems
X * to implement absent ANSI functionality.
X */
X
X#include <stddef.h>
X#include <stdlib.h>
X#include <string.h>
X#include <stdio.h>
X
X#include <conf.h>
X#include <main.h>
X
X
X/*
X * NAME
X * strerror - string for error number
X *
X * SYNOPSIS
X * char *strerror(int errnum);
X *
X * DESCRIPTION
X * The strerror function maps the error number in errnum to an error
X * message string.
X *
X * RETURNS
X * The strerror function returns a pointer to the string, the contents of
X * which are implementation-defined. The array pointed to shall not be
X * modified by the program, but may be overwritten by a subsequent call to
X * the strerror function.
X *
X * CAVEAT
X * Unknown errors will be rendered in the form "Error %d", where %d will
X * be replaced by a decimal representation of the error number.
X */
X
X#ifdef CONF_NO_strerror
X
Xchar *
Xstrerror(n)
X int n;
X{
X extern int sys_nerr;
X extern char *sys_errlist[];
X static char buffer[16];
X
X if (n < 1 || n > sys_nerr)
X {
X sprintf(buffer, "Error %d", n);
X return buffer;
X }
X return sys_errlist[n];
X}
X
X#endif
END_OF_FILE
if test 1991 -ne `wc -c <'common/ansi.c'`; then
echo shar: \"'common/ansi.c'\" unpacked with wrong size!
fi
# end of 'common/ansi.c'
fi
if test -f 'common/arglex.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'common/arglex.h'\"
else
echo shar: Extracting \"'common/arglex.h'\" \(1778 characters\)
sed "s/^X//" >'common/arglex.h' <<'END_OF_FILE'
X/*
X * cook - file construction tool
X * Copyright (C) 1991, 1992, 1993 Peter Miller.
X * All rights reserved.
X *
X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by
X * the Free Software Foundation; either version 2 of the License, or
X * (at your option) any later version.
X *
X * This program is distributed in the hope that it will be useful,
X * but WITHOUT ANY WARRANTY; without even the implied warranty of
X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X * GNU General Public License for more details.
X *
X * You should have received a copy of the GNU General Public License
X * along with this program; if not, write to the Free Software
X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X *
X * MANIFEST: interface definition for common/arglex.c
X */
X
X#ifndef ARGLEX_H
X#define ARGLEX_H
X
X#include <main.h>
X
Xenum arglex_token_ty
X{
X arglex_token_eoln = -20,
X arglex_token_help,
X arglex_token_number,
X arglex_token_option,
X arglex_token_stdio,
X arglex_token_string,
X arglex_token_tracing,
X arglex_token_version
X};
Xtypedef enum arglex_token_ty arglex_token_ty;
X
Xtypedef struct arglex_value_ty arglex_value_ty;
Xstruct arglex_value_ty
X{
X char *alv_string;
X long alv_number;
X};
X
Xtypedef struct arglex_table_ty arglex_table_ty;
Xstruct arglex_table_ty
X{
X char *name;
X int token;
X};
X
Xextern arglex_token_ty arglex_token;
Xextern arglex_value_ty arglex_value;
Xextern char *progname;
X
Xvoid arglex_init _((int argc, char **argv, arglex_table_ty *table));
Xarglex_token_ty arglex _((void));
Xint arglex_compare _((char *formal, char *actual));
Xvoid arglex_init_from_env _((char *argv0, arglex_table_ty *table));
Xvoid arglex_set_progname _((char *argv0));
X
X#endif /* ARGLEX_H */
END_OF_FILE
if test 1778 -ne `wc -c <'common/arglex.h'`; then
echo shar: \"'common/arglex.h'\" unpacked with wrong size!
fi
# end of 'common/arglex.h'
fi
if test -f 'common/error.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'common/error.h'\"
else
echo shar: Extracting \"'common/error.h'\" \(1440 characters\)
sed "s/^X//" >'common/error.h' <<'END_OF_FILE'
X/*
X * cook - file construction tool
X * Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
X * All rights reserved.
X *
X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by
X * the Free Software Foundation; either version 2 of the License, or
X * (at your option) any later version.
X *
X * This program is distributed in the hope that it will be useful,
X * but WITHOUT ANY WARRANTY; without even the implied warranty of
X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X * GNU General Public License for more details.
X *
X * You should have received a copy of the GNU General Public License
X * along with this program; if not, write to the Free Software
X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X *
X * MANIFEST: interface definition for common/error.c
X */
X
X#ifndef ERROR_H
X#define ERROR_H
X
X#include <main.h>
X
Xvoid error _((char *, ...));
Xvoid fatal _((char *, ...));
Xvoid nerror _((char *, ...));
Xvoid nfatal _((char *, ...));
X
X#ifdef DEBUG
X# if defined(__STDC__) || defined(__stdc__)
X# define assert(c) cook_assert((c) != 0, #c, __FILE__, __LINE__)
X# else
X# define assert(c) cook_assert((c) != 0, "c", __FILE__, __LINE__)
X# endif
Xvoid cook_assert _((int, char *, char *, int));
X#else
X# define assert(c)
X#endif
X
Xtypedef void (*quit_ty)_((void));
Xvoid quit_handler _((quit_ty));
Xvoid quit _((int));
X
X#endif /* ERROR_H */
END_OF_FILE
if test 1440 -ne `wc -c <'common/error.h'`; then
echo shar: \"'common/error.h'\" unpacked with wrong size!
fi
# end of 'common/error.h'
fi
if test -f 'common/s-v-arg.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'common/s-v-arg.h'\"
else
echo shar: Extracting \"'common/s-v-arg.h'\" \(1856 characters\)
sed "s/^X//" >'common/s-v-arg.h' <<'END_OF_FILE'
X/*
X * cook - file construction tool
X * Copyright (C) 1993 Peter Miller.
X * All rights reserved.
X *
X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by
X * the Free Software Foundation; either version 2 of the License, or
X * (at your option) any later version.
X *
X * This program is distributed in the hope that it will be useful,
X * but WITHOUT ANY WARRANTY; without even the implied warranty of
X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X * GNU General Public License for more details.
X *
X * You should have received a copy of the GNU General Public License
X * along with this program; if not, write to the Free Software
X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X *
X * MANIFEST: isolate varargs.h vs stdarg differences
X */
X
X#ifndef S_V_ARG_H
X#define S_V_ARG_H
X
X/*
X * This file contains insulation from whether <varargs.h> is being used
X * or whether <stdarg.h> is being used. Incompatibilities are hidden behind
X * three macros:
X * sva_last - last argument in variable arg func defn
X * sva_last_decl - declaration for last arg
X * sva_start - hides whether nth is used or not
X * These macros are non-syntactic (ugh!) but they sure make things prettier.
X *
X * Do not directly include either <stdarg.h> or <varargs.h> in the code,
X * always use this header <s-v-arg.h> instead.
X *
X * Never refer directly to va_start, va_arg, or va_dcl directly in the code.
X * Direct references to va_list, va_arg and va_end are OK.
X */
X
X#include <conf.h>
X
X#ifdef CONF_NO_stdarg
X
X#include <varargs.h>
X
X#define sva_last ,va_alist
X#define sva_last_decl va_dcl
X#define sva_init(ap, nth) va_start(ap)
X
X#else
X
X#include <stdarg.h>
X
X#define sva_last
X#define sva_last_decl
X#define sva_init(ap, nth) va_start(ap, nth)
X
X#endif
X
X#endif /* S_V_ARG_H */
END_OF_FILE
if test 1856 -ne `wc -c <'common/s-v-arg.h'`; then
echo shar: \"'common/s-v-arg.h'\" unpacked with wrong size!
fi
# end of 'common/s-v-arg.h'
fi
if test -f 'common/str.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'common/str.h'\"
else
echo shar: Extracting \"'common/str.h'\" \(1888 characters\)
sed "s/^X//" >'common/str.h' <<'END_OF_FILE'
X/*
X * cook - file construction tool
X * Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
X * All rights reserved.
X *
X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by
X * the Free Software Foundation; either version 2 of the License, or
X * (at your option) any later version.
X *
X * This program is distributed in the hope that it will be useful,
X * but WITHOUT ANY WARRANTY; without even the implied warranty of
X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X * GNU General Public License for more details.
X *
X * You should have received a copy of the GNU General Public License
X * along with this program; if not, write to the Free Software
X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X *
X * MANIFEST: interface definition for common/str.c
X */
X
X#ifndef STR_H
X#define STR_H
X
X#include <main.h>
X#include <s-v-arg.h>
X
Xtypedef unsigned long str_hash_ty;
X
Xtypedef struct string_ty string_ty;
Xstruct string_ty
X{
X str_hash_ty str_hash;
X string_ty *str_next;
X long str_references;
X size_t str_length;
X char str_text[1];
X};
X
Xextern string_ty *str_true;
Xextern string_ty *str_false;
X
Xvoid str_initialize _((void));
Xstring_ty *str_from_c _((char *));
Xstring_ty *str_n_from_c _((char *, size_t));
Xstring_ty *str_copy _((string_ty *));
Xvoid str_free _((string_ty *));
Xstring_ty *str_catenate _((string_ty *, string_ty *));
Xstring_ty *str_cat_three _((string_ty *, string_ty *, string_ty *));
Xint str_bool _((string_ty *));
Xstring_ty *str_upcase _((string_ty *));
Xstring_ty *str_downcase _((string_ty *));
Xvoid str_dump _((void));
Xchar *str_repn _((string_ty *));
Xstring_ty *str_field _((string_ty *s, int sep, int fldnum));
Xstring_ty *str_format _((char *, ...));
Xstring_ty *str_vformat _((char *, va_list));
X
X#define str_equal(s1, s2) ((s1) == (s2))
X
X#endif /* STR_H */
END_OF_FILE
if test 1888 -ne `wc -c <'common/str.h'`; then
echo shar: \"'common/str.h'\" unpacked with wrong size!
fi
# end of 'common/str.h'
fi
if test -f 'common/word.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'common/word.h'\"
else
echo shar: Extracting \"'common/word.h'\" \(1435 characters\)
sed "s/^X//" >'common/word.h' <<'END_OF_FILE'
X/*
X * cook - file construction tool
X * Copyright (C) 1991, 1992, 1993 Peter Miller.
X * All rights reserved.
X *
X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by
X * the Free Software Foundation; either version 2 of the License, or
X * (at your option) any later version.
X *
X * This program is distributed in the hope that it will be useful,
X * but WITHOUT ANY WARRANTY; without even the implied warranty of
X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X * GNU General Public License for more details.
X *
X * You should have received a copy of the GNU General Public License
X * along with this program; if not, write to the Free Software
X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X *
X * MANIFEST: interface definition for common/word.c
X */
X
X#ifndef WORD_H
X#define WORD_H
X
X#include <stddef.h>
X#include <str.h>
X
Xtypedef struct wlist wlist;
Xstruct wlist
X{
X size_t wl_nwords;
X string_ty **wl_word;
X};
X
Xint wl_member _((wlist *, string_ty *));
Xstring_ty *wl2str _((wlist *, int, int));
Xvoid str2wl _((wlist *, string_ty *));
Xvoid wl_append _((wlist *, string_ty *));
Xvoid wl_prepend _((wlist *, string_ty *));
Xvoid wl_append_unique _((wlist *, string_ty *));
Xvoid wl_copy _((wlist *, wlist *));
Xvoid wl_delete _((wlist *, string_ty *));
Xvoid wl_free _((wlist *));
Xvoid wl_zero _((wlist *));
X
X#endif /* WORD_H */
END_OF_FILE
if test 1435 -ne `wc -c <'common/word.h'`; then
echo shar: \"'common/word.h'\" unpacked with wrong size!
fi
# end of 'common/word.h'
fi
if test -f 'conf/ConvexOS-10' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'conf/ConvexOS-10'\"
else
echo shar: Extracting \"'conf/ConvexOS-10'\" \(2018 characters\)
sed "s/^X//" >'conf/ConvexOS-10' <<'END_OF_FILE'
X/*
X * cook - file construction tool
X * Copyright (C) 1992, 1993 Peter Miller.
X * All rights reserved.
X *
X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by
X * the Free Software Foundation; either version 2 of the License, or
X * (at your option) any later version.
X *
X * This program is distributed in the hope that it will be useful,
X * but WITHOUT ANY WARRANTY; without even the implied warranty of
X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X * GNU General Public License for more details.
X *
X * You should have received a copy of the GNU General Public License
X * along with this program; if not, write to the Free Software
X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X *
X * MANIFEST: configuration for ConvexOS 10.0
X */
X
X#ifndef CONF_H
X#define CONF_H
X
X/*
X * Define this symbol if your system does NOT
X * have the ANSI C strerror system call, and
X * does not define strerror in <string.h>.
X *
X#define CONF_NO_strerror
X */
X
X/*
X * Define this symbol if your system does NOT
X * have the POSIX tcgetpgrp system call.
X *
X#define CONF_NO_tcgetpgrp
X */
X
X/*
X * Define this symbol if your system does NOT
X * have the stdarg.h include file mandated by ANSI C.
X */
X#ifndef __STDC__
X#define CONF_NO_stdarg
X#endif
X
X/*
X * Define one of these symbols to indicate which
X * universe your UNIX is derived from.
X * If you have a choice, define both.
X */
X#define BSD
X/* #define SYSV */
X
X/*
X * Define this symbol as an appropriate arguemnt to
X * the getpgrp system call for your system.
X * Ignore if your system does not have a getpgrp system call.
X */
X/* #define CONF_getpgrp_arg 0 */
X#define CONF_getpgrp_arg
X
X/*
X * Define this symbol to be the pathname of your shell.
X * Leave it as a Bourne shell whenever possible.
X * Some systems have different versions of the Bourne shell,
X * with and without functions; choose the one *with* functions if so.
X */
X#define CONF_SHELL "/bin/sh"
X
X#endif /* CONF_H */
END_OF_FILE
if test 2018 -ne `wc -c <'conf/ConvexOS-10'`; then
echo shar: \"'conf/ConvexOS-10'\" unpacked with wrong size!
fi
# end of 'conf/ConvexOS-10'
fi
if test -f 'conf/SunOS-4.1.2' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'conf/SunOS-4.1.2'\"
else
echo shar: Extracting \"'conf/SunOS-4.1.2'\" \(2013 characters\)
sed "s/^X//" >'conf/SunOS-4.1.2' <<'END_OF_FILE'
X/*
X * cook - file construction tool
X * Copyright (C) 1992, 1993 Peter Miller.
X * All rights reserved.
X *
X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by
X * the Free Software Foundation; either version 2 of the License, or
X * (at your option) any later version.
X *
X * This program is distributed in the hope that it will be useful,
X * but WITHOUT ANY WARRANTY; without even the implied warranty of
X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X * GNU General Public License for more details.
X *
X * You should have received a copy of the GNU General Public License
X * along with this program; if not, write to the Free Software
X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X *
X * MANIFEST: configuration for SunOS 4.1.2
X */
X
X#ifndef CONF_H
X#define CONF_H
X
X/*
X * Define this symbol if your system does NOT
X * have the ANSI C strerror system call, and
X * does not define strerror in <string.h>.
X */
X#define CONF_NO_strerror
X
X/*
X * Define this symbol if your system does NOT
X * have the POSIX tcgetpgrp system call.
X *
X#define CONF_NO_tcgetpgrp
X */
X
X/*
X * Define this symbol if your system does NOT
X * have the stdarg.h include file mandated by ANSI C.
X */
X#ifndef __STDC__
X#define CONF_NO_stdarg
X#endif
X
X/*
X * Define one of these symbols to indicate which
X * universe your UNIX is derived from.
X * If you have a choice, define both.
X */
X#define BSD
X/* #define SYSV */
X
X/*
X * Define this symbol as an appropriate arguemnt to
X * the getpgrp system call for your system.
X * Ignore if your system does not have a getpgrp system call.
X */
X#define CONF_getpgrp_arg 0
X/* #define CONF_getpgrp_arg */
X
X/*
X * Define this symbol to be the pathname of your shell.
X * Leave it as a Bourne shell whenever possible.
X * Some systems have different versions of the Bourne shell,
X * with and without functions; choose the one *with* functions if so.
X */
X#define CONF_SHELL "/bin/sh"
X
X#endif /* CONF_H */
END_OF_FILE
if test 2013 -ne `wc -c <'conf/SunOS-4.1.2'`; then
echo shar: \"'conf/SunOS-4.1.2'\" unpacked with wrong size!
fi
# end of 'conf/SunOS-4.1.2'
fi
if test -f 'conf/SunOS-4.1.3' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'conf/SunOS-4.1.3'\"
else
echo shar: Extracting \"'conf/SunOS-4.1.3'\" \(2013 characters\)
sed "s/^X//" >'conf/SunOS-4.1.3' <<'END_OF_FILE'
X/*
X * cook - file construction tool
X * Copyright (C) 1992, 1993 Peter Miller.
X * All rights reserved.
X *
X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by
X * the Free Software Foundation; either version 2 of the License, or
X * (at your option) any later version.
X *
X * This program is distributed in the hope that it will be useful,
X * but WITHOUT ANY WARRANTY; without even the implied warranty of
X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X * GNU General Public License for more details.
X *
X * You should have received a copy of the GNU General Public License
X * along with this program; if not, write to the Free Software
X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X *
X * MANIFEST: configuration for SunOS 4.1.3
X */
X
X#ifndef CONF_H
X#define CONF_H
X
X/*
X * Define this symbol if your system does NOT
X * have the ANSI C strerror system call, and
X * does not define strerror in <string.h>.
X */
X#define CONF_NO_strerror
X
X/*
X * Define this symbol if your system does NOT
X * have the POSIX tcgetpgrp system call.
X *
X#define CONF_NO_tcgetpgrp
X */
X
X/*
X * Define this symbol if your system does NOT
X * have the stdarg.h include file mandated by ANSI C.
X */
X#ifndef __STDC__
X#define CONF_NO_stdarg
X#endif
X
X/*
X * Define one of these symbols to indicate which
X * universe your UNIX is derived from.
X * If you have a choice, define both.
X */
X#define BSD
X/* #define SYSV */
X
X/*
X * Define this symbol as an appropriate arguemnt to
X * the getpgrp system call for your system.
X * Ignore if your system does not have a getpgrp system call.
X */
X#define CONF_getpgrp_arg 0
X/* #define CONF_getpgrp_arg */
X
X/*
X * Define this symbol to be the pathname of your shell.
X * Leave it as a Bourne shell whenever possible.
X * Some systems have different versions of the Bourne shell,
X * with and without functions; choose the one *with* functions if so.
X */
X#define CONF_SHELL "/bin/sh"
X
X#endif /* CONF_H */
END_OF_FILE
if test 2013 -ne `wc -c <'conf/SunOS-4.1.3'`; then
echo shar: \"'conf/SunOS-4.1.3'\" unpacked with wrong size!
fi
# end of 'conf/SunOS-4.1.3'
fi
if test -f 'conf/SysV-4.0' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'conf/SysV-4.0'\"
else
echo shar: Extracting \"'conf/SysV-4.0'\" \(2018 characters\)
sed "s/^X//" >'conf/SysV-4.0' <<'END_OF_FILE'
X/*
X * cook - file construction tool
X * Copyright (C) 1992, 1993 Peter Miller.
X * All rights reserved.
X *
X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by
X * the Free Software Foundation; either version 2 of the License, or
X * (at your option) any later version.
X *
X * This program is distributed in the hope that it will be useful,
X * but WITHOUT ANY WARRANTY; without even the implied warranty of
X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X * GNU General Public License for more details.
X *
X * You should have received a copy of the GNU General Public License
X * along with this program; if not, write to the Free Software
X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X *
X * MANIFEST: configuration for generic SVR4 system
X */
X
X#ifndef CONF_H
X#define CONF_H
X
X/*
X * Define this symbol if your system does NOT
X * have the ANSI C strerror system call, and
X * does not define strerror in <string.h>.
X */
X#define CONF_NO_strerror
X
X/*
X * Define this symbol if your system does NOT
X * have the POSIX tcgetpgrp system call.
X */
X#define CONF_NO_tcgetpgrp
X
X/*
X * Define this symbol if your system does NOT
X * have the stdarg.h include file mandated by ANSI C.
X */
X#ifndef __STDC__
X#define CONF_NO_stdarg
X#endif
X
X/*
X * Define one of these symbols to indicate which
X * universe your UNIX is derived from.
X * If you have a choice, define both.
X */
X/* #define BSD */
X#define SYSV
X
X/*
X * Define this symbol as an appropriate arguemnt to
X * the getpgrp system call for your system.
X * Ignore if your system does not have a getpgrp system call.
X */
X/* #define CONF_getpgrp_arg 0 */
X#define CONF_getpgrp_arg
X
X/*
X * Define this symbol to be the pathname of your shell.
X * Leave it as a Bourne shell whenever possible.
X * Some systems have different versions of the Bourne shell,
X * with and without functions; choose the one *with* functions if so.
X */
X#define CONF_SHELL "/bin/sh"
X
X#endif /* CONF_H */
END_OF_FILE
if test 2018 -ne `wc -c <'conf/SysV-4.0'`; then
echo shar: \"'conf/SysV-4.0'\" unpacked with wrong size!
fi
# end of 'conf/SysV-4.0'
fi
if test -f 'conf/ULTRIX-4.2' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'conf/ULTRIX-4.2'\"
else
echo shar: Extracting \"'conf/ULTRIX-4.2'\" \(1986 characters\)
sed "s/^X//" >'conf/ULTRIX-4.2' <<'END_OF_FILE'
X/*
X * cook - file construction tool
X * Copyright (C) 1992, 1993 Peter Miller.
X * All rights reserved.
X *
X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by
X * the Free Software Foundation; either version 2 of the License, or
X * (at your option) any later version.
X *
X * This program is distributed in the hope that it will be useful,
X * but WITHOUT ANY WARRANTY; without even the implied warranty of
X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X * GNU General Public License for more details.
X *
X * You should have received a copy of the GNU General Public License
X * along with this program; if not, write to the Free Software
X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X *
X * MANIFEST: configuration for ULTRIX 4.2
X */
X
X#ifndef CONF_H
X#define CONF_H
X
X/*
X * Define this symbol if your system does NOT
X * have the ANSI C strerror system call, and
X * does not define strerror in <string.h>.
X *
X#define CONF_NO_strerror
X */
X
X/*
X * Define this symbol if your system does NOT
X * have the POSIX tcgetpgrp system call.
X *
X#define CONF_NO_tcgetpgrp
X */
X
X/*
X * Define this symbol if your system does NOT
X * have the stdarg.h include file mandated by ANSI C.
X */
X#define CONF_NO_stdarg
X
X/*
X * Define one of these symbols to indicate which
X * universe your UNIX is derived from.
X * If you have a choice, define both.
X */
X#define BSD
X#define SYSV
X
X/*
X * Define this symbol as an appropriate arguemnt to
X * the getpgrp system call for your system.
X * Ignore if your system does not have a getpgrp system call.
X */
X/* #define CONF_getpgrp_arg 0 */
X#define CONF_getpgrp_arg
X
X/*
X * Define this symbol to be the pathname of your shell.
X * Leave it as a Bourne shell whenever possible.
X * Some systems have different versions of the Bourne shell,
X * with and without functions; choose the one *with* functions if so.
X */
X#define CONF_SHELL "/bin/sh5"
X
X#endif /* CONF_H */
END_OF_FILE
if test 1986 -ne `wc -c <'conf/ULTRIX-4.2'`; then
echo shar: \"'conf/ULTRIX-4.2'\" unpacked with wrong size!
fi
# end of 'conf/ULTRIX-4.2'
fi
if test -f 'conf/dgux-5.4.1' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'conf/dgux-5.4.1'\"
else
echo shar: Extracting \"'conf/dgux-5.4.1'\" \(2015 characters\)
sed "s/^X//" >'conf/dgux-5.4.1' <<'END_OF_FILE'
X/*
X * cook - file construction tool
X * Copyright (C) 1992, 1993 Peter Miller.
X * All rights reserved.
X *
X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by
X * the Free Software Foundation; either version 2 of the License, or
X * (at your option) any later version.
X *
X * This program is distributed in the hope that it will be useful,
X * but WITHOUT ANY WARRANTY; without even the implied warranty of
X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X * GNU General Public License for more details.
X *
X * You should have received a copy of the GNU General Public License
X * along with this program; if not, write to the Free Software
X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X *
X * MANIFEST: configuration for dgux 5.4.1
X */
X
X#ifndef CONF_H
X#define CONF_H
X
X/*
X * Define this symbol if your system does NOT
X * have the ANSI C strerror system call, and
X * does not define strerror in <string.h>.
X *
X#define CONF_NO_strerror
X */
X
X/*
X * Define this symbol if your system does NOT
X * have the POSIX tcgetpgrp system call.
X *
X#define CONF_NO_tcgetpgrp
X */
X
X/*
X * Define this symbol if your system does NOT
X * have the stdarg.h include file mandated by ANSI C.
X */
X#ifndef __STDC__
X#define CONF_NO_stdarg
X#endif
X
X/*
X * Define one of these symbols to indicate which
X * universe your UNIX is derived from.
X * If you have a choice, define both.
X */
X/* #define BSD */
X#define SYSV
X
X/*
X * Define this symbol as an appropriate arguemnt to
X * the getpgrp system call for your system.
X * Ignore if your system does not have a getpgrp system call.
X */
X/* #define CONF_getpgrp_arg 0 */
X#define CONF_getpgrp_arg
X
X/*
X * Define this symbol to be the pathname of your shell.
X * Leave it as a Bourne shell whenever possible.
X * Some systems have different versions of the Bourne shell,
X * with and without functions; choose the one *with* functions if so.
X */
X#define CONF_SHELL "/bin/sh"
X
X#endif /* CONF_H */
END_OF_FILE
if test 2015 -ne `wc -c <'conf/dgux-5.4.1'`; then
echo shar: \"'conf/dgux-5.4.1'\" unpacked with wrong size!
fi
# end of 'conf/dgux-5.4.1'
fi
if test -f 'cook/expr.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'cook/expr.h'\"
else
echo shar: Extracting \"'cook/expr.h'\" \(1922 characters\)
sed "s/^X//" >'cook/expr.h' <<'END_OF_FILE'
X/*
X * cook - file construction tool
X * Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
X * All rights reserved.
X *
X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by
X * the Free Software Foundation; either version 2 of the License, or
X * (at your option) any later version.
X *
X * This program is distributed in the hope that it will be useful,
X * but WITHOUT ANY WARRANTY; without even the implied warranty of
X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X * GNU General Public License for more details.
X *
X * You should have received a copy of the GNU General Public License
X * along with this program; if not, write to the Free Software
X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X *
X * MANIFEST: interface definition for cook/expr.c
X */
X
X#ifndef EXPR_H
X#define EXPR_H
X
X#include <str.h>
X#include <word.h>
X
X/*
X * e_op values
X */
Xenum expr_op_ty
X{
X OP_CAT = 1,
X OP_FUNC,
X OP_WORD
X};
Xtypedef enum expr_op_ty expr_op_ty;
X
Xtypedef struct elist elist;
Xstruct elist
X{
X size_t el_nexprs;
X struct expr **el_expr;
X};
X
Xtypedef struct position position;
Xstruct position
X{
X string_ty *pos_name;
X int pos_line;
X};
X
Xtypedef struct expr expr;
Xstruct expr
X{
X expr_op_ty e_op;
X long e_references;
X position e_position;
X union
X {
X string_ty *e__word;
X elist e__list;
X expr *e__arg[2];
X }
X e__u;
X};
X#define e_word e__u.e__word
X#define e_list e__u.e__list
X#define e_left e__u.e__arg[0]
X#define e_right e__u.e__arg[1]
X
Xexpr *expr_alloc _((void));
Xexpr *expr_copy _((expr *));
Xvoid expr_free _((expr *));
Xint expr_eval _((wlist *, expr *));
Xvoid el_append _((elist *, expr *));
Xvoid el_free _((elist *));
Xvoid el_copy _((elist *, elist *));
Xint el2wl _((wlist *, elist *));
Xint expr_eval_condition _((expr *));
Xvoid expr_error _((char *, ...));
Xvoid el_zero _((elist *));
X
X#endif /* EXPR_H */
END_OF_FILE
if test 1922 -ne `wc -c <'cook/expr.h'`; then
echo shar: \"'cook/expr.h'\" unpacked with wrong size!
fi
# end of 'cook/expr.h'
fi
if test -f 'cook/id.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'cook/id.h'\"
else
echo shar: Extracting \"'cook/id.h'\" \(1640 characters\)
sed "s/^X//" >'cook/id.h' <<'END_OF_FILE'
X/*
X * cook - file construction tool
X * Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
X * All rights reserved.
X *
X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by
X * the Free Software Foundation; either version 2 of the License, or
X * (at your option) any later version.
X *
X * This program is distributed in the hope that it will be useful,
X * but WITHOUT ANY WARRANTY; without even the implied warranty of
X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X * GNU General Public License for more details.
X *
X * You should have received a copy of the GNU General Public License
X * along with this program; if not, write to the Free Software
X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X *
X * MANIFEST: interface definition for cook/id.c
X */
X
X#ifndef ID_H
X#define ID_H
X
X#include <main.h>
X#include <str.h>
X#include <word.h>
X
Xenum id_class_ty
X{
X ID_CLASS_ALREADY,
X ID_CLASS_BUILTIN,
X ID_CLASS_FLAGS,
X ID_CLASS_HASH_KEYWORD,
X ID_CLASS_PARSE_KEYWORD,
X ID_CLASS_STAT,
X ID_CLASS_VARIABLE
X};
Xtypedef enum id_class_ty id_class_ty;
X
Xtypedef int (*bifp)_((wlist *, wlist *));
X
Xextern string_ty *id_need;
Xextern string_ty *id_younger;
Xextern string_ty *id_friend;
Xextern string_ty *id_target;
Xextern string_ty *id_search_list;
X
Xextern void id_initialize _((void));
Xextern int id_search _((string_ty *, id_class_ty, void *));
Xextern void id_assign _((string_ty *, id_class_ty, void *));
Xextern void id_assign_push _((string_ty *, id_class_ty, void *));
Xextern void id_delete _((string_ty *, id_class_ty));
X
X#endif /* ID_H */
END_OF_FILE
if test 1640 -ne `wc -c <'cook/id.h'`; then
echo shar: \"'cook/id.h'\" unpacked with wrong size!
fi
# end of 'cook/id.h'
fi
if test -f 'cook/lex.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'cook/lex.h'\"
else
echo shar: Extracting \"'cook/lex.h'\" \(1396 characters\)
sed "s/^X//" >'cook/lex.h' <<'END_OF_FILE'
X/*
X * cook - file construction tool
X * Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
X * All rights reserved.
X *
X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by
X * the Free Software Foundation; either version 2 of the License, or
X * (at your option) any later version.
X *
X * This program is distributed in the hope that it will be useful,
X * but WITHOUT ANY WARRANTY; without even the implied warranty of
X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X * GNU General Public License for more details.
X *
X * You should have received a copy of the GNU General Public License
X * along with this program; if not, write to the Free Software
X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X *
X * MANIFEST: interface definition for cook/lex.c
X */
X
X#ifndef LEX_H
X#define LEX_H
X
X#include <main.h>
X#include <str.h>
X
Xint hashline_lex _((void));
Xint lex_cur_line _((void));
Xint lex_mode _((int));
Xint parse_lex _((void));
Xstring_ty *lex_cur_file _((void));
Xvoid lex_close _((void));
Xvoid lex_error _((char*, ...));
Xvoid lex_initialize _((void));
Xvoid lex_open _((string_ty *));
Xvoid lex_passing _((int));
Xvoid lex_trace _((char*, ...));
X
X/*
X * lex_mode() arguments
X */
X#define LM_NORMAL 0
X#define LM_DATA 1
X#define LM_SQUOTE 2
X#define LM_DQUOTE 3
X
X#endif /* LEX_H */
END_OF_FILE
if test 1396 -ne `wc -c <'cook/lex.h'`; then
echo shar: \"'cook/lex.h'\" unpacked with wrong size!
fi
# end of 'cook/lex.h'
fi
if test -f 'cook/match.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'cook/match.h'\"
else
echo shar: Extracting \"'cook/match.h'\" \(1407 characters\)
sed "s/^X//" >'cook/match.h' <<'END_OF_FILE'
X/*
X * cook - file construction tool
X * Copyright (C) 1990, 1992, 1993 Peter Miller.
X * All rights reserved.
X *
X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by
X * the Free Software Foundation; either version 2 of the License, or
X * (at your option) any later version.
X *
X * This program is distributed in the hope that it will be useful,
X * but WITHOUT ANY WARRANTY; without even the implied warranty of
X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X * GNU General Public License for more details.
X *
X * You should have received a copy of the GNU General Public License
X * along with this program; if not, write to the Free Software
X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X *
X * MANIFEST: interface definition for cook/match.c
X */
X
X#ifndef MATCH_H
X#define MATCH_H
X
X#include <main.h>
X#include <word.h>
X
X#define MATCH_CHAR '%'
X
Xtypedef struct match_ty match_ty;
Xstruct match_ty
X{
X string_ty *fill[11];
X match_ty *next;
X};
X
Xmatch_ty *match _((string_ty *, string_ty *));
Xstring_ty *reconstruct _((string_ty *, match_ty *));
Xvoid match_push _((match_ty *));
Xmatch_ty *match_pop _((void));
Xmatch_ty *match_top _((void));
Xvoid match_free _((match_ty *));
Xmatch_ty *wl_match _((wlist *, string_ty *));
Xvoid wl_reconstruct _((wlist *, wlist *, match_ty *));
X
X#endif /* MATCH_H */
END_OF_FILE
if test 1407 -ne `wc -c <'cook/match.h'`; then
echo shar: \"'cook/match.h'\" unpacked with wrong size!
fi
# end of 'cook/match.h'
fi
if test -f 'cook/os.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'cook/os.h'\"
else
echo shar: Extracting \"'cook/os.h'\" \(1586 characters\)
sed "s/^X//" >'cook/os.h' <<'END_OF_FILE'
X/*
X * cook - file construction tool
X * Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
X * All rights reserved.
X *
X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by
X * the Free Software Foundation; either version 2 of the License, or
X * (at your option) any later version.
X *
X * This program is distributed in the hope that it will be useful,
X * but WITHOUT ANY WARRANTY; without even the implied warranty of
X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X * GNU General Public License for more details.
X *
X * You should have received a copy of the GNU General Public License
X * along with this program; if not, write to the Free Software
X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X *
X * MANIFEST: interface definition for cook/os.c
X */
X
X#ifndef OS_H
X#define OS_H
X
X#include <time.h>
X#include <main.h>
X#include <str.h>
X#include <word.h>
X
Xtime_t os_mtime _((string_ty *));
Xint os_mtime_adjust _((string_ty *));
Xint os_touch _((string_ty *));
Xint os_execute _((wlist *cmd, string_ty *input));
Xint os_exists _((string_ty *));
Xstring_ty *os_accdir _((void));
Xstring_ty *os_curdir _((void));
Xstring_ty *os_dirname _((string_ty *));
Xstring_ty *os_entryname _((string_ty *));
Xstring_ty *os_pathname _((string_ty *));
Xint os_legal_path _((string_ty *));
Xint os_delete _((string_ty *));
Xvoid os_meter_begin _((void));
Xvoid os_meter_end _((void));
Xchar *signal_name _((int));
Xint os_clear_stat _((string_ty *));
Xint exit_status _((char *, int));
X
X#endif /* OS_H */
END_OF_FILE
if test 1586 -ne `wc -c <'cook/os.h'`; then
echo shar: \"'cook/os.h'\" unpacked with wrong size!
fi
# end of 'cook/os.h'
fi
if test -f 'doc/conditions' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'doc/conditions'\"
else
echo shar: Extracting \"'doc/conditions'\" \(1702 characters\)
sed "s/^X//" >'doc/conditions' <<'END_OF_FILE'
X.\"
X.\" cook - file construction tool
X.\" Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
X.\" All rights reserved.
X.\"
X.\" This program is free software; you can redistribute it and/or modify
X.\" it under the terms of the GNU General Public License as published by
X.\" the Free Software Foundation; either version 2 of the License, or
X.\" (at your option) any later version.
X.\"
X.\" This program is distributed in the hope that it will be useful,
X.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
X.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X.\" GNU General Public License for more details.
X.\"
X.\" You should have received a copy of the GNU General Public License
X.\" along with this program; if not, write to the Free Software
X.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X.\"
X.\" MANIFEST: Reference Manual, License
X.\"
X.H 1 "License"
X.B cook
Xversion
X.so version.so
X.br
XCopyright
X.if n (C)
X.if t \(co
X1988, 1989, 1990, 1991, 1992, 1993 Peter Miller.
X.br
XAll rights reserved.
X.P
XThis program is free software;
Xyou can redistribute it
Xand/or modify it under the terms of the GNU General Public
XLicense as published by the Free Software Foundation;
Xeither version 2 of the License,
Xor (at your option) any later version.
X.P
XThis program is distributed in the hope that it will be useful,
Xbut WITHOUT ANY WARRANTY;
Xwithout even the implied
Xwarranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
XSee the GNU General Public License for more details.
X.P
XYou should have received a copy of the GNU General Public
XLicense along with this program; if not, write to the Free
XSoftware Foundation, Inc., 675 Mass Ave, Cambridge, MA
X02139, USA.
END_OF_FILE
if test 1702 -ne `wc -c <'doc/conditions'`; then
echo shar: \"'doc/conditions'\" unpacked with wrong size!
fi
# end of 'doc/conditions'
fi
if test -f 'doc/history' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'doc/history'\"
else
echo shar: Extracting \"'doc/history'\" \(1884 characters\)
sed "s/^X//" >'doc/history' <<'END_OF_FILE'
X.\"
X.\" cook - file construction tool
X.\" Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
X.\" All rights reserved.
X.\"
X.\" This program is free software; you can redistribute it and/or modify
X.\" it under the terms of the GNU General Public License as published by
X.\" the Free Software Foundation; either version 2 of the License, or
X.\" (at your option) any later version.
X.\"
X.\" This program is distributed in the hope that it will be useful,
X.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
X.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X.\" GNU General Public License for more details.
X.\"
X.\" You should have received a copy of the GNU General Public License
X.\" along with this program; if not, write to the Free Software
X.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X.\"
X.\" MANIFEST: Reference Manual, Ancient History
X.\"
X.H 1 "Ancient History"
X.B Cook
Xwas originally developed because I was marooned on an operating
Xsystem without anything even vaguely resembling
Xmake.
XThis was in 1988.
XSince I had to write my own,
XI added a few improvements.
XWhen I finally escaped back to \s-4UNIX\s+4,
Xit took only two days to port
X.B cook
Xto SystemV.
XI have since deleted all code for that original operating system,
Xalthough clues to its identity are still present.
X.P
XAfter I had
X.B cook
Xup on \s-4UNIX\s+4,
Xthe progress the world had made caught up with me.
XIt was gratifying that
Xmany of the features other make-oid authors had thought necessary
Xwere either already present,
Xor easily and seamlessly added.
X.P
X.B Cook
Xwas written with portability in mind.
XThis does not means it is entirely portable,
Xunfortunately.
X.B Cook
Xhas been tested on
XSystemV R2 and SystemV R3
Xand SunOS R4.
XIt should also be portable to others.
X.P
XIf you have any trouble getting
X.B cook
Xworking,
Xplease e-mail me so I know where I went wrong.
END_OF_FILE
if test 1884 -ne `wc -c <'doc/history'`; then
echo shar: \"'doc/history'\" unpacked with wrong size!
fi
# end of 'doc/history'
fi
if test -f 'doc/intro' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'doc/intro'\"
else
echo shar: Extracting \"'doc/intro'\" \(2213 characters\)
sed "s/^X//" >'doc/intro' <<'END_OF_FILE'
X.\"
X.\" cook - file construction tool
X.\" Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
X.\" All rights reserved.
X.\"
X.\" This program is free software; you can redistribute it and/or modify
X.\" it under the terms of the GNU General Public License as published by
X.\" the Free Software Foundation; either version 2 of the License, or
X.\" (at your option) any later version.
X.\"
X.\" This program is distributed in the hope that it will be useful,
X.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
X.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X.\" GNU General Public License for more details.
X.\"
X.\" You should have received a copy of the GNU General Public License
X.\" along with this program; if not, write to the Free Software
X.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X.\"
X.\" MANIFEST: Reference Manual, Introduction
X.\"
X.H 1 "Introduction"
X.B Cook
Xis a tool for constructing files.
XIt is given a set of files to create,
Xand instructions detailing how to construct them.
XIn any non-trivial program
Xthere will be prerequisites to performing
Xthe actions necessary to creating any file,
Xsuch as extraction from a source-control system.
X.B Cook
Xprovides a mechanism to define these.
X.P
XWhen a program is being developed or maintained,
Xthe programmer will typically change one file of several
Xwhich comprise the program.
X.B Cook
Xexamines the last-modified times of the files to see when
Xthe prerequisites of a file have changed,
Ximplying that the file
Xneeds to be recreated as it is logically out of date.
X.P
X.B Cook
Xalso provides a facility for implicit recipes,
Xallowing users to specify how to form a file with a given suffix from
Xa file with a different suffix.
XFor example,
Xto create
X.IB filename .o
Xfrom
X.IB filename .c
X.H 2 "How to Use this Manual"
XThis manual is divided into two parts.
X.P
XThe first part is tutorial introduction to
X.BR cook .
XThis part runs from chapter 4 to chapter 5.
X.P
XThe second part is for reference and details precisely how
X.B cook
Xworks.
XThis part runs from chapter 6 to chapter 14.
X.P
XUsers familiar with other programs similar to
X.B cook
Xare advised to skim the tutorial part before diving into the reference part.
END_OF_FILE
if test 2213 -ne `wc -c <'doc/intro'`; then
echo shar: \"'doc/intro'\" unpacked with wrong size!
fi
# end of 'doc/intro'
fi
if test -f 'doc/refman.t' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'doc/refman.t'\"
else
echo shar: Extracting \"'doc/refman.t'\" \(1883 characters\)
sed "s/^X//" >'doc/refman.t' <<'END_OF_FILE'
X.\"
X.\" cook - file construction tool
X.\" Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
X.\" All rights reserved.
X.\"
X.\" This program is free software; you can redistribute it and/or modify
X.\" it under the terms of the GNU General Public License as published by
X.\" the Free Software Foundation; either version 2 of the License, or
X.\" (at your option) any later version.
X.\"
X.\" This program is distributed in the hope that it will be useful,
X.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
X.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X.\" GNU General Public License for more details.
X.\"
X.\" You should have received a copy of the GNU General Public License
X.\" along with this program; if not, write to the Free Software
X.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X.\"
X.\" MANIFEST: Reference Manual
X.\"
X.\" must be formatted using "groff -s -t -mm refman.t | lpr"
X.\"
X.TL
Xcook
X.sp
Xa file construction tool
X.AF ""
X.AU "Peter Miller" "PM"
X.AT "Software Engineer"
X.AS
XThis document describes
X.BR cook ,
Xa maintenance tool designed to construct files.
X.B Cook
Xmay be used to maintain consistency between executable files and the
Xassociated source files that are used to generate them.
XThe consistency is designated by the relative
Xlast-modified times of files
Xand is thus automatically adjusted each time a file is edited,
Xcompiled or otherwise modified.
X.B Cook
Xvalidates the consistency of a system of
Xfiles and executes all commands necessary to maintain that
Xconsistency.
X.AE
X.MT 4 1
X.nr Hb 9
X.de eB
X.br
X.ft CW
X.in +0.5i
X.ta 8n 16n 24n 32n 40n 48n
X.nf
X..
X.de eE
X.br
X.ft R
X.fi
X.in -0.5i
X..
X.SK
X.PH "'Cook''Cook'"
X.PF "'Page %''Page %'"
X.nr Ej 1
X.so intro
X.so history
X.so conditions
X.so intro.aa
X.so intro.bb
X.so cmdline
X.so language
X.so builtin
X.so variables
X.so how
X.so option
X.so match
X.so system
X.so glossary
X.TC
END_OF_FILE
if test 1883 -ne `wc -c <'doc/refman.t'`; then
echo shar: \"'doc/refman.t'\" unpacked with wrong size!
fi
# end of 'doc/refman.t'
fi
if test -f 'doc/variables' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'doc/variables'\"
else
echo shar: Extracting \"'doc/variables'\" \(2183 characters\)
sed "s/^X//" >'doc/variables' <<'END_OF_FILE'
X.\"
X.\" cook - file construction tool
X.\" Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
X.\" All rights reserved.
X.\"
X.\" This program is free software; you can redistribute it and/or modify
X.\" it under the terms of the GNU General Public License as published by
X.\" the Free Software Foundation; either version 2 of the License, or
X.\" (at your option) any later version.
X.\"
X.\" This program is distributed in the hope that it will be useful,
X.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
X.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X.\" GNU General Public License for more details.
X.\"
X.\" You should have received a copy of the GNU General Public License
X.\" along with this program; if not, write to the Free Software
X.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X.\"
X.\" MANIFEST: Reference Manual, Predefined Variables
X.\"
X.H 1 "Predefined Variables"
XA number of variables are defined by
X.B cook
Xat run-time.
X.H 2 need
XThe ingredients of the recipe currently being cooked.
X.H 2 "search_list"
XThis variable may be set to a list of directories to be searched for
Xtargets and ingredients.
XThis list is initially the current directory (.)
Xand will always have the current directory prepended if it is not present.
XThis is useful when taking partial copies of a source
Xto perform controlled updates.
XUse the
X.I "resolve"
Xbuiltin function to determine what file name cook actually found.
XThe targets of recipes are always cooked into the current directory.
X.H 2 self
XThe name
X.B cook
Xwas invoked as,
Xusually "cook".
XBe careful what you call cook,
Xbecause anything with the string "cook" in it will be changed,
Xincluding (but not limited to) file suffixes and environment variable names.
X.H 2 target
XThe target of the recipe currently being cooked.
XSpecifically,
Xthe target which caused the recipe to be invoked.
X.H 2 targets
XThe targets of the recipe currently being cooked.
XThis includes all targets of the recipe,
Xshould there be more than one.
X.H 2 younger
XThe subset of the ingredients of the recipe currently being cooked
Xwhich are younger than the target.
X.H 2 version
XThe version of
X.B cook
Xcurrently executing.
END_OF_FILE
if test 2183 -ne `wc -c <'doc/variables'`; then
echo shar: \"'doc/variables'\" unpacked with wrong size!
fi
# end of 'doc/variables'
fi
if test -f 'find_libs/os.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'find_libs/os.c'\"
else
echo shar: Extracting \"'find_libs/os.c'\" \(1396 characters\)
sed "s/^X//" >'find_libs/os.c' <<'END_OF_FILE'
X/*
X * cook - file construction tool
X * Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
X * All rights reserved.
X *
X * This program is free software; you can redistribute it and/or modify
X * it under the terms of the GNU General Public License as published by
X * the Free Software Foundation; either version 2 of the License, or
X * (at your option) any later version.
X *
X * This program is distributed in the hope that it will be useful,
X * but WITHOUT ANY WARRANTY; without even the implied warranty of
X * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X * GNU General Public License for more details.
X *
X * You should have received a copy of the GNU General Public License
X * along with this program; if not, write to the Free Software
X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X *
X * MANIFEST: functions to isolate operating system interface
X */
X
X#include <sys/types.h>
X#include <sys/stat.h>
X#include <errno.h>
X
X#include <error.h>
X#include <os.h>
X
X/*
X * NAME
X * os_exists - tests for the existence of a file
X *
X * SYNOPSIS
X * int os_exists(char *filename);
X *
X * DESCRIPTION
X * Os_returns 1 if the file exists, 0 if it does not.
X */
X
Xint
Xos_exists(filename)
X char *filename;
X{
X struct stat st;
X
X if (stat(filename, &st))
X {
X switch (errno)
X {
X case ENOENT:
X case ENOTDIR:
X break;
X
X default:
X nfatal("%s", filename);
X }
X return 0;
X }
X return 1;
X}
END_OF_FILE
if test 1396 -ne `wc -c <'find_libs/os.c'`; then
echo shar: \"'find_libs/os.c'\" unpacked with wrong size!
fi
# end of 'find_libs/os.c'
fi
if test -f 'lib/bison' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'lib/bison'\"
else
echo shar: Extracting \"'lib/bison'\" \(2006 characters\)
sed "s/^X//" >'lib/bison' <<'END_OF_FILE'
X/*
X * NAME
X * bison - how to use bison
X *
X * DESCRIPTION
X * This cookbook describes how to use bison.
X *
X * You will have to add "-d" to the [bison_flags] variable
X * if you want %.h files generated.
X *
X * If a y.output file is constructed, it will be moved to %.list
X *
X * RECIPES
X * %.c %.h: %.y applied if -d in [bison_flags]
X * %.c: %.y applied if -d not in [bison_flags]
X *
X * VARIABLES
X * bison_src bison source files in the current directory.
X * dot_src Source files constructable in the current directory
X * (unioned with existing setting, if necessary).
X * dot_obj Object files constructable in the current directory
X * (unioned with existing setting, if necessary).
X * dot_clean Files which may be removed from the current directory
X * in a clean target.
X * dot_lint_obj Lint object files constructable in the current directory
X * (unioned with existing setting, if necessary).
X *
X * MANIFEST: cookbook for using bison
X */
X
X#pragma once
X
X#include "c"
X
Xif [not [defined bison]] then
X bison = bison;
Xif [not [defined bison_flags]] then
X bison_flags = ;
Xbison_src = [glob *.y];
Xcc_src = [stringset [cc_src] - [fromto %.y %.c [bison_src]]];
Xdot_src =
X [stringset
X [dot_src] [bison_src]
X -
X [fromto %.y %.c [bison_src]] [fromto %.y %.s [bison_src]]
X ];
Xdot_obj = [stringset [dot_obj] [fromto %.y %.o [bison_src]]];
Xdot_clean =
X [stringset
X [dot_clean]
X [fromto %.y %.c [bison_src]]
X [fromto %.y %.output [bison_src]]
X [fromto %.y %.tab.c [bison_src]]
X [fromto %.y %.tab.h [bison_src]]
X [fromto %.y %.ln [bison_src]]
X [fromto %.y %.s [bison_src]]
X ];
Xdot_lint_obj = [stringset [dot_lint_obj] [fromto %.y %.ln [bison_src]]];
X
X%.c %.h: %.y if [in -d [bison_flags]]
X {
X if [exists %.output] then
X rm -f %.output
X set clearstat;
X [bison] [bison_flags] %.y;
X mv %.tab.c %.c;
X mv %.tab.h %.h;
X }
X
X%.c: %.y if [not [in -d [bison_flags]]]
X {
X if [exists %.output] then
X rm -f %.output
X set clearstat;
X [bison] [bison_flags] %.y;
X mv %.tab.c %.c;
X }
END_OF_FILE
if test 2006 -ne `wc -c <'lib/bison'`; then
echo shar: \"'lib/bison'\" unpacked with wrong size!
fi
# end of 'lib/bison'
fi
if test -f 'lib/lex' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'lib/lex'\"
else
echo shar: Extracting \"'lib/lex'\" \(1524 characters\)
sed "s/^X//" >'lib/lex' <<'END_OF_FILE'
X/*
X * NAME
X * lex - the lex cookbook
X *
X * DESCRIPTION
X * This cookbook describes how to work with lex files.
X *
X * RECIPES
X * %.l: %.c make C source files from lex source files
X *
X * VARIABLES
X * lex The lex command
X * Not altered if already defined.
X * lex_flags Options to pass to the lex command
X * Not altered if already defined.
X * The default is empty.
X * lex_src lex source files in the current directory.
X * dot_src Source files constructable in the current directory
X * (unioned with existing setting, if necessary).
X * dot_obj Object files constructable in the current directory
X * (unioned with existing setting, if necessary).
X * dot_clean Files which may be removed from the current directory
X * in a clean target.
X * dot_lint_obj Lint object files constructable in the current directory
X * (unioned with existing setting, if necessary).
X *
X * MANIFEST: cookbook for using lex
X */
X
X#pragma once
X
X#include "c"
X
Xif [not [defined lex]] then
X lex = lex;
Xif [not [defined lex_flags]] then
X lex_flags = ;
Xlex_src = [glob *.l];
Xdot_src =
X [stringset
X [dot_src] [lex_src]
X -
X [fromto %.l %.c [lex_src]]
X [fromto %.l %.s [lex_src]]
X ];
Xdot_obj = [stringset [dot_obj] [fromto %.l %.o [lex_src]]];
Xdot_clean =
X [stringset
X [dot_clean]
X [fromto %.l %.c [lex_src]]
X [fromto %.l %.ln [lex_src]]
X [fromto %.l %.s [lex_src]]
X lex.yy.c
X ];
Xdot_lint_obj = [stringset [dot_lint_obj] [fromto %.l %.ln [lex_src]]];
X
X%.c: %.l
X {
X [lex] [lex_flags] %.l;
X mv lex.yy.c %.c;
X }
END_OF_FILE
if test 1524 -ne `wc -c <'lib/lex'`; then
echo shar: \"'lib/lex'\" unpacked with wrong size!
fi
# end of 'lib/lex'
fi
if test -f 'man1/copyright.so' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'man1/copyright.so'\"
else
echo shar: Extracting \"'man1/copyright.so'\" \(1601 characters\)
sed "s/^X//" >'man1/copyright.so' <<'END_OF_FILE'
X.\"
X.\" cook - file construction tool
X.\" Copyright (C) 1993 Peter Miller.
X.\" All rights reserved.
X.\"
X.\" This program is free software; you can redistribute it and/or modify
X.\" it under the terms of the GNU General Public License as published by
X.\" the Free Software Foundation; either version 2 of the License, or
X.\" (at your option) any later version.
X.\"
X.\" This program is distributed in the hope that it will be useful,
X.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
X.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X.\" GNU General Public License for more details.
X.\"
X.\" You should have received a copy of the GNU General Public License
X.\" along with this program; if not, write to the Free Software
X.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X.\"
X.\" MANIFEST: copyright notice for manual entries
X.\"
X.br
X.ne 1i
X.SH EXIT STATUS
XThe
X.I \*(n)
Xcommand will exit with a status of 1 on any error.
XThe
X.I \*(n)
Xcommand will only exit with a status of 0 if there are no errors.
X.br
X.ne 1i
X.SH COPYRIGHT
X.I \*(n)
Xversion
X.so ../doc/version.so
X.br
XCopyright
X.if n (C)
X.if t \(co
X1988, 1989, 1990, 1991, 1992, 1993 Peter Miller.
X.br
XAll rights reserved.
X.PP
XThe
X.I \*(n)
Xprogram is distributed in the hope that it will be useful,
Xbut WITHOUT ANY WARRANTY;
Xwithout even the implied warranty
Xof MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
XSee the GNU General Public License for more details.
X.br
X.ne 1i
X.SH AUTHOR
X.TS
Xcenter,tab(;);
Xl l l.
XPeter Miller;UUCP;uunet!munnari!bmr.gov.au!pmiller
X/\e/\e*;Internet;pmiller@bmr.gov.au
X.TE
END_OF_FILE
if test 1601 -ne `wc -c <'man1/copyright.so'`; then
echo shar: \"'man1/copyright.so'\" unpacked with wrong size!
fi
# end of 'man1/copyright.so'
fi
if test -f 'man1/find_libs.1' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'man1/find_libs.1'\"
else
echo shar: Extracting \"'man1/find_libs.1'\" \(2074 characters\)
sed "s/^X//" >'man1/find_libs.1' <<'END_OF_FILE'
X'\" t
X.\" cook - file construction tool
X.\" Copyright (C) 1991, 1992, 1993 Peter Miller.
X.\" All rights reserved.
X.\"
X.\" This program is free software; you can redistribute it and/or modify
X.\" it under the terms of the GNU General Public License as published by
X.\" the Free Software Foundation; either version 2 of the License, or
X.\" (at your option) any later version.
X.\"
X.\" This program is distributed in the hope that it will be useful,
X.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
X.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X.\" GNU General Public License for more details.
X.\"
X.\" You should have received a copy of the GNU General Public License
X.\" along with this program; if not, write to the Free Software
X.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X.\"
X.\" MANIFEST: manual entry for the find_libs command
X.\"
X.TH FIND_LIBS 1
X.ds n) find_libs
X.if n .hy 0
X.if n .ad l
X.if n .nr IN 8n
X.SH NAME
X\*(n) \- find pathnames of libraries
X.SH SYNOPSIS
X.B \*(n)
X[
X.BI -L path
X\&...
X][
X.BI -l name
X\&...
X]
X.br
X.B \*(n)
X.B -Help
X.br
X.B \*(n)
X.B -VERSion
X.SH DESCRIPTION
XThe
X.I \*(n)
Xprogram is used to find the actual pathname of a library
Xspecified on a
X.IR cc (1)
Xcommand line.
XThis allows
X.IR cook (1)
Xto know these dependencies.
X.br
X.ne 1i
X.SH OPTIONS
XThe following options are understood.
X.TP 8n
X.BI -L path
X.br
XSpecify a path to search for libraries on.
XIf more than one is specified,
Xthey will be scanned in the order given before the standard
X.I /usr/lib
Xand
X.I /lib
Xplaces.
XThis is like the same argument to
X.IR cc (1),
Xand the usual \*(n) option abbreviation rules do not apply.
X.TP 8n
X.BI -l name
X.br
XName a library to be searched for.
XThis is like the same argument to
X.IR cc (1),
Xand the usual \*(n) option abbreviation rules do not apply.
X.TP 8n
X.B -Help
X.br
XGive some information on how to use the
X.I \*(n)
Xcommand.
X.TP 8n
X.B -VERSion
X.br
XTell the version of the
X.I \*(n)
Xcommand currently executing.
X.PP
XAll other options will result in a diagnostic error.
X.so o__rules.so
X.so copyright.so
END_OF_FILE
if test 2074 -ne `wc -c <'man1/find_libs.1'`; then
echo shar: \"'man1/find_libs.1'\" unpacked with wrong size!
fi
# end of 'man1/find_libs.1'
fi
if test -f 'man1/o__rules.so' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'man1/o__rules.so'\"
else
echo shar: Extracting \"'man1/o__rules.so'\" \(1736 characters\)
sed "s/^X//" >'man1/o__rules.so' <<'END_OF_FILE'
X.\"
X.\" cook - file construction tool
X.\" Copyright (C) 1993 Peter Miller.
X.\" All rights reserved.
X.\"
X.\" This program is free software; you can redistribute it and/or modify
X.\" it under the terms of the GNU General Public License as published by
X.\" the Free Software Foundation; either version 2 of the License, or
X.\" (at your option) any later version.
X.\"
X.\" This program is distributed in the hope that it will be useful,
X.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
X.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X.\" GNU General Public License for more details.
X.\"
X.\" You should have received a copy of the GNU General Public License
X.\" along with this program; if not, write to the Free Software
X.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X.\"
X.\" MANIFEST: description of option up/down case convention
X.\"
X.PP
XAll options may be abbreviated;
Xthe abbreviation is documented as the upper case letters,
Xall lower case letters and underscores (_) are optional.
XYou must use consecutive sequences of optional letters.
X.PP
XAll options are case insensitive,
Xyou may type them in upper case or lower case or a combination of both,
Xcase is not important.
X.PP
XFor example:
Xthe arguments "-help", "-HEL" and "-h" are
Xall interpreted to mean the \fB-Help\fP option.
XThe argument "-hlp" will not be understood,
Xbecause consecutive optional characters were not supplied.
X.PP
XOptions and other command line arguments may be
Xmixed arbitrarily on the command line.
X.br
X.ne 4
X.PP
XThe GNU long option names are understood.
XSince all option names for
X.I \*(n)
Xare long,
Xthis means ignoring the extra leading '-'.
XThe "\fB--\fIoption\fB=\fIvalue\fR" convention is also understood.
END_OF_FILE
if test 1736 -ne `wc -c <'man1/o__rules.so'`; then
echo shar: \"'man1/o__rules.so'\" unpacked with wrong size!
fi
# end of 'man1/o__rules.so'
fi
if test -f 'test/00/t0002a.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'test/00/t0002a.sh'\"
else
echo shar: Extracting \"'test/00/t0002a.sh'\" \(1370 characters\)
sed "s/^X//" >'test/00/t0002a.sh' <<'END_OF_FILE'
X#! /bin/sh
X#
X# cook - file construction tool
X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
X# All rights reserved.
X#
X# This program is free software; you can redistribute it and/or modify
X# it under the terms of the GNU General Public License as published by
X# the Free Software Foundation; either version 2 of the License, or
X# (at your option) any later version.
X#
X# This program is distributed in the hope that it will be useful,
X# but WITHOUT ANY WARRANTY; without even the implied warranty of
X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X# GNU General Public License for more details.
X#
X# You should have received a copy of the GNU General Public License
X# along with this program; if not, write to the Free Software
X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X#
X# MANIFEST: test "catenate" builtin function
X#
X
Xtmp=/tmp/$$
Xhere=`pwd`
X
Xfail()
X{
X echo 'FAILED test of builtin function "catenate"' 1>&2
X cd $here
X rm -rf $tmp
X exit 1
X}
Xpass()
X{
X cd $here
X rm -rf $tmp
X exit 0
X}
Xtrap "fail" 1 2 3 15
X
Xmkdir $tmp
Xcd $tmp
X
Xcat > Howto.cook <<foobar
Xtest:
X{
X if [catenate] then fail;
X if [not [in [catenate x] x]] then fail;
X if [not [in [catenate x y] xy]] then fail;
X if [not [in [catenate x y z] xyz]] then fail;
X}
Xfoobar
Xif test $? -ne 0 ; then fail; fi
X
X$here/bin/cook -nl
Xif test $? -ne 0 ; then fail; fi
X
X# probably OK
Xpass
END_OF_FILE
if test 1370 -ne `wc -c <'test/00/t0002a.sh'`; then
echo shar: \"'test/00/t0002a.sh'\" unpacked with wrong size!
fi
# end of 'test/00/t0002a.sh'
fi
if test -f 'test/00/t0005a.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'test/00/t0005a.sh'\"
else
echo shar: Extracting \"'test/00/t0005a.sh'\" \(1455 characters\)
sed "s/^X//" >'test/00/t0005a.sh' <<'END_OF_FILE'
X#! /bin/sh
X#
X# cook - file construction tool
X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
X# All rights reserved.
X#
X# This program is free software; you can redistribute it and/or modify
X# it under the terms of the GNU General Public License as published by
X# the Free Software Foundation; either version 2 of the License, or
X# (at your option) any later version.
X#
X# This program is distributed in the hope that it will be useful,
X# but WITHOUT ANY WARRANTY; without even the implied warranty of
X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X# GNU General Public License for more details.
X#
X# You should have received a copy of the GNU General Public License
X# along with this program; if not, write to the Free Software
X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X#
X# MANIFEST: test the "count" builtin function
X#
Xtmp=/tmp/$$
Xhere=`pwd`
X
Xfail()
X{
X echo 'FAILED test of builtin function "count"' 1>&2
X cd $here
X rm -rf $tmp
X exit 1
X}
Xpass()
X{
X cd $here
X rm -rf $tmp
X exit 0
X}
Xtrap "fail" 1 2 3 15
X
Xmkdir $tmp
Xcd $tmp
X
Xcat > Howto.cook <<foobar
Xtest:
X{
X if [not [in [count] 0]] then fail;
X if [not [in [count 1] 1]] then fail;
X if [not [in [count 1 2] 2]] then fail;
X if [not [in [count 1 2 3] 3]] then fail;
X if [not [in [count 1 2 3 4] 4]] then fail;
X if [not [in [count 1 2 3 4 5] 5]] then fail;
X}
Xfoobar
Xif test $? -ne 0 ; then fail; fi
X
X$here/bin/cook -nl
Xif test $? -ne 0 ; then fail; fi
X
X# probably OK
Xpass
END_OF_FILE
if test 1455 -ne `wc -c <'test/00/t0005a.sh'`; then
echo shar: \"'test/00/t0005a.sh'\" unpacked with wrong size!
fi
# end of 'test/00/t0005a.sh'
fi
if test -f 'test/00/t0007a.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'test/00/t0007a.sh'\"
else
echo shar: Extracting \"'test/00/t0007a.sh'\" \(1651 characters\)
sed "s/^X//" >'test/00/t0007a.sh' <<'END_OF_FILE'
X#! /bin/sh
X#
X# cook - file construction tool
X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
X# All rights reserved.
X#
X# This program is free software; you can redistribute it and/or modify
X# it under the terms of the GNU General Public License as published by
X# the Free Software Foundation; either version 2 of the License, or
X# (at your option) any later version.
X#
X# This program is distributed in the hope that it will be useful,
X# but WITHOUT ANY WARRANTY; without even the implied warranty of
X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X# GNU General Public License for more details.
X#
X# You should have received a copy of the GNU General Public License
X# along with this program; if not, write to the Free Software
X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X#
X# MANIFEST: test the "dirname" builtin function
X#
Xtmp=/tmp/$$
Xhere=`pwd`
X
Xfail()
X{
X echo 'FAILED test of builtin function "dirname"' 1>&2
X cd $here
X rm -rf $tmp
X exit 1
X}
Xpass()
X{
X cd $here
X rm -rf $tmp
X exit 0
X}
Xtrap "fail" 1 2 3 15
X
Xmkdir $tmp
Xcd $tmp
X
Xcat > Howto.cook <<foobar
Xtest:
X{
X if [not [in [dir x] [pathname $tmp]]] then fail;
X if [not [in [dir x/y] x]] then fail;
X if [not [in [dir /] /]] then fail;
X if [not [in [dir /foo] /]] then fail;
X if [not [in [dir /foo/bar] /foo]] then fail;
X if [not [in [dirname x] [pathname $tmp]]] then fail;
X if [not [in [dirname x/y] x]] then fail;
X if [not [in [dirname /] /]] then fail;
X if [not [in [dirname /foo] /]] then fail;
X if [not [in [dirname /foo/bar] /foo]] then fail;
X}
Xfoobar
Xif test $? -ne 0 ; then fail; fi
X
X$here/bin/cook -nl
Xif test $? -ne 0 ; then fail; fi
X
X# probably OK
Xpass
END_OF_FILE
if test 1651 -ne `wc -c <'test/00/t0007a.sh'`; then
echo shar: \"'test/00/t0007a.sh'\" unpacked with wrong size!
fi
# end of 'test/00/t0007a.sh'
fi
if test -f 'test/00/t0009a.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'test/00/t0009a.sh'\"
else
echo shar: Extracting \"'test/00/t0009a.sh'\" \(1430 characters\)
sed "s/^X//" >'test/00/t0009a.sh' <<'END_OF_FILE'
X#! /bin/sh
X#
X# cook - file construction tool
X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
X# All rights reserved.
X#
X# This program is free software; you can redistribute it and/or modify
X# it under the terms of the GNU General Public License as published by
X# the Free Software Foundation; either version 2 of the License, or
X# (at your option) any later version.
X#
X# This program is distributed in the hope that it will be useful,
X# but WITHOUT ANY WARRANTY; without even the implied warranty of
X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X# GNU General Public License for more details.
X#
X# You should have received a copy of the GNU General Public License
X# along with this program; if not, write to the Free Software
X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X#
X# MANIFEST: test the "entryname" builtin function
X#
Xtmp=/tmp/$$
Xhere=`pwd`
X
Xfail()
X{
X echo 'FAILED test of builtin function "entryname"' 1>&2
X cd $here
X rm -rf $tmp
X exit 1
X}
Xpass()
X{
X cd $here
X rm -rf $tmp
X exit 0
X}
Xtrap "fail" 1 2 3 15
X
Xmkdir $tmp
Xcd $tmp
X
Xcat > Howto.cook <<foobar
Xtest:
X{
X if [not [in [entryname x] x]] then fail;
X if [not [in [entryname x/y] y]] then fail;
X if [entryname /] then fail;
X if [not [in [entryname /foo] foo]] then fail;
X if [not [in [entryname /foo/bar] bar]] then fail;
X}
Xfoobar
Xif test $? -ne 0 ; then fail; fi
X
X$here/bin/cook -nl
Xif test $? -ne 0 ; then fail; fi
X
X# probably OK
Xpass
END_OF_FILE
if test 1430 -ne `wc -c <'test/00/t0009a.sh'`; then
echo shar: \"'test/00/t0009a.sh'\" unpacked with wrong size!
fi
# end of 'test/00/t0009a.sh'
fi
if test -f 'test/00/t0015a.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'test/00/t0015a.sh'\"
else
echo shar: Extracting \"'test/00/t0015a.sh'\" \(1486 characters\)
sed "s/^X//" >'test/00/t0015a.sh' <<'END_OF_FILE'
X#! /bin/sh
X#
X# cook - file construction tool
X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
X# All rights reserved.
X#
X# This program is free software; you can redistribute it and/or modify
X# it under the terms of the GNU General Public License as published by
X# the Free Software Foundation; either version 2 of the License, or
X# (at your option) any later version.
X#
X# This program is distributed in the hope that it will be useful,
X# but WITHOUT ANY WARRANTY; without even the implied warranty of
X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X# GNU General Public License for more details.
X#
X# You should have received a copy of the GNU General Public License
X# along with this program; if not, write to the Free Software
X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X#
X# MANIFEST: test the "glob" builtin function
X#
Xtmp=/tmp/$$
Xhere=`pwd`
X
Xfail()
X{
X echo 'FAILED test of builtin function "glob"' 1>&2
X cd $here
X rm -rf $tmp
X exit 1
X}
Xpass()
X{
X cd $here
X rm -rf $tmp
X exit 0
X}
Xtrap "fail" 1 2 3 15
X
Xmkdir $tmp
Xcd $tmp
X
Xfor f in a.c b.c c.c d.c e.c a.o f.o
Xdo
X cp /dev/null $f
Xdone
X
Xcp /dev/null a.c
X
Xcat > Howto.cook <<foobar
Xtest:
X{
X if [not [in [count [glob "*"]] 8]] then fail;
X if [not [in [count [glob "*.c"]] 5]] then fail;
X if [not [in [count [glob "*.o"]] 2]] then fail;
X if [not [in [count [glob "a.[abc]"]] 1]] then fail;
X}
Xfoobar
Xif test $? -ne 0 ; then fail; fi
X
X$here/bin/cook -nl
Xif test $? -ne 0 ; then fail; fi
X
X# probably OK
Xpass
END_OF_FILE
if test 1486 -ne `wc -c <'test/00/t0015a.sh'`; then
echo shar: \"'test/00/t0015a.sh'\" unpacked with wrong size!
fi
# end of 'test/00/t0015a.sh'
fi
if test -f 'test/00/t0018a.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'test/00/t0018a.sh'\"
else
echo shar: Extracting \"'test/00/t0018a.sh'\" \(1394 characters\)
sed "s/^X//" >'test/00/t0018a.sh' <<'END_OF_FILE'
X#! /bin/sh
X#
X# cook - file construction tool
X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
X# All rights reserved.
X#
X# This program is free software; you can redistribute it and/or modify
X# it under the terms of the GNU General Public License as published by
X# the Free Software Foundation; either version 2 of the License, or
X# (at your option) any later version.
X#
X# This program is distributed in the hope that it will be useful,
X# but WITHOUT ANY WARRANTY; without even the implied warranty of
X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X# GNU General Public License for more details.
X#
X# You should have received a copy of the GNU General Public License
X# along with this program; if not, write to the Free Software
X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X#
X# MANIFEST: test the "if" builtin function
X#
Xtmp=/tmp/$$
Xhere=`pwd`
X
Xfail()
X{
X echo 'FAILED test of builtin funrction "if"' 1>&2
X cd $here
X rm -rf $tmp
X exit 1
X}
Xpass()
X{
X cd $here
X rm -rf $tmp
X exit 0
X}
Xtrap "fail" 1 2 3 15
X
Xmkdir $tmp
Xcd $tmp
X
Xcat > Howto.cook <<foobar
Xtest:
X{
X if [not [in ["if" 1 "then" aa "else" bb] aa]] then fail;
X if [not ["if" 1 "then" aa]] then fail;
X if [not [in ["if" 0 "then" aa "else" bb] bb]] then fail;
X if ["if" 0 "then" aa] then fail;
X}
Xfoobar
Xif test $? -ne 0 ; then fail; fi
X
X$here/bin/cook -nl
Xif test $? -ne 0 ; then fail; fi
X
X# probably OK
Xpass
END_OF_FILE
if test 1394 -ne `wc -c <'test/00/t0018a.sh'`; then
echo shar: \"'test/00/t0018a.sh'\" unpacked with wrong size!
fi
# end of 'test/00/t0018a.sh'
fi
if test -f 'test/00/t0024a.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'test/00/t0024a.sh'\"
else
echo shar: Extracting \"'test/00/t0024a.sh'\" \(1445 characters\)
sed "s/^X//" >'test/00/t0024a.sh' <<'END_OF_FILE'
X#! /bin/sh
X#
X# cook - file construction tool
X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
X# All rights reserved.
X#
X# This program is free software; you can redistribute it and/or modify
X# it under the terms of the GNU General Public License as published by
X# the Free Software Foundation; either version 2 of the License, or
X# (at your option) any later version.
X#
X# This program is distributed in the hope that it will be useful,
X# but WITHOUT ANY WARRANTY; without even the implied warranty of
X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X# GNU General Public License for more details.
X#
X# You should have received a copy of the GNU General Public License
X# along with this program; if not, write to the Free Software
X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X#
X# MANIFEST: test the "pathname" builtin function
X#
Xtmp=/tmp/$$
Xhere=`pwd`
X
Xfail()
X{
X echo 'FAILED test of builtin function "pathname"' 1>&2
X cd $here
X rm -rf $tmp
X exit 1
X}
Xpass()
X{
X cd $here
X rm -rf $tmp
X exit 0
X}
Xtrap "fail" 1 2 3 15
X
Xmkdir $tmp
Xcd $tmp
X
Xcat > Howto.cook <<foobar
Xtest:
X{
X if [not [in [pathname .] [pathname $tmp]]] then fail;
X if [not [in [pathname x] [pathname $tmp/x]]] then fail;
X if [not [in [pathname /] /]] then fail;
X if [not [in [pathname /////usr/bin//////././//.///] /usr/bin]]
X then fail;
X}
Xfoobar
Xif test $? -ne 0 ; then fail; fi
X
X$here/bin/cook -nl
Xif test $? -ne 0 ; then fail; fi
X
X# probably OK
Xpass
END_OF_FILE
if test 1445 -ne `wc -c <'test/00/t0024a.sh'`; then
echo shar: \"'test/00/t0024a.sh'\" unpacked with wrong size!
fi
# end of 'test/00/t0024a.sh'
fi
if test -f 'test/00/t0027a.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'test/00/t0027a.sh'\"
else
echo shar: Extracting \"'test/00/t0027a.sh'\" \(1385 characters\)
sed "s/^X//" >'test/00/t0027a.sh' <<'END_OF_FILE'
X#! /bin/sh
X#
X# cook - file construction tool
X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
X# All rights reserved.
X#
X# This program is free software; you can redistribute it and/or modify
X# it under the terms of the GNU General Public License as published by
X# the Free Software Foundation; either version 2 of the License, or
X# (at your option) any later version.
X#
X# This program is distributed in the hope that it will be useful,
X# but WITHOUT ANY WARRANTY; without even the implied warranty of
X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X# GNU General Public License for more details.
X#
X# You should have received a copy of the GNU General Public License
X# along with this program; if not, write to the Free Software
X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X#
X# MANIFEST: test the "stringset" builtin function
X#
Xtmp=/tmp/$$
Xhere=`pwd`
X
Xfail()
X{
X echo 'FAILED test of builtin function "stringset"' 1>&2
X cd $here
X rm -rf $tmp
X exit 1
X}
Xpass()
X{
X cd $here
X rm -rf $tmp
X exit 0
X}
Xtrap "fail" 1 2 3 15
X
Xmkdir $tmp
Xcd $tmp
X
Xcat > Howto.cook <<foobar
Xtest:
X{
X if [not [in [count [stringset a a b]] 2]] then fail;
X if [not [in [count [stringset a - a b]] 0]] then fail;
X if [not [in [count [stringset a "*" a b]] 1]] then fail;
X}
Xfoobar
Xif test $? -ne 0 ; then fail; fi
X
X$here/bin/cook -nl
Xif test $? -ne 0 ; then fail; fi
X
X# probably OK
Xpass
END_OF_FILE
if test 1385 -ne `wc -c <'test/00/t0027a.sh'`; then
echo shar: \"'test/00/t0027a.sh'\" unpacked with wrong size!
fi
# end of 'test/00/t0027a.sh'
fi
if test -f 'test/00/t0030a.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'test/00/t0030a.sh'\"
else
echo shar: Extracting \"'test/00/t0030a.sh'\" \(1925 characters\)
sed "s/^X//" >'test/00/t0030a.sh' <<'END_OF_FILE'
X#! /bin/sh
X#
X# cook - file construction tool
X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
X# All rights reserved.
X#
X# This program is free software; you can redistribute it and/or modify
X# it under the terms of the GNU General Public License as published by
X# the Free Software Foundation; either version 2 of the License, or
X# (at your option) any later version.
X#
X# This program is distributed in the hope that it will be useful,
X# but WITHOUT ANY WARRANTY; without even the implied warranty of
X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X# GNU General Public License for more details.
X#
X# You should have received a copy of the GNU General Public License
X# along with this program; if not, write to the Free Software
X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X#
X# MANIFEST: test the "-version" command line option
X#
Xtmp=/tmp/$$
Xhere=`pwd`
X
Xfail()
X{
X echo 'FAILED test of the -VERSion command line option' 1>&2
X cd $here
X rm -rf $tmp
X exit 1
X}
Xpass()
X{
X cd $here
X rm -rf $tmp
X exit 0
X}
Xtrap "fail" 1 2 3 15
X
Xmkdir $tmp
Xcd $tmp
X
X$here/bin/cook -help > /dev/null
Xif test $? -ne 0 ; then fail; fi
X
X$here/bin/cook -vers > /dev/null
Xif test $? -ne 0 ; then fail; fi
X
X$here/bin/cook -vers r | cat
Xif test $? -ne 0 ; then fail; fi
X
X$here/bin/cook -vers w | cat
Xif test $? -ne 0 ; then fail; fi
X
X$here/bin/c_incl -help > /dev/null
Xif test $? -ne 0 ; then fail; fi
X
X$here/bin/c_incl -vers > /dev/null
Xif test $? -ne 0 ; then fail; fi
X
X$here/bin/c_incl -vers r > /dev/null
Xif test $? -ne 0 ; then fail; fi
X
X$here/bin/c_incl -vers w > /dev/null
Xif test $? -ne 0 ; then fail; fi
X
X$here/bin/find_libs -help > /dev/null
Xif test $? -ne 0 ; then fail; fi
X
X$here/bin/find_libs -vers > /dev/null
Xif test $? -ne 0 ; then fail; fi
X
X$here/bin/find_libs -vers r > /dev/null
Xif test $? -ne 0 ; then fail; fi
X
X$here/bin/find_libs -vers w > /dev/null
Xif test $? -ne 0 ; then fail; fi
X
X# probably OK
Xpass
END_OF_FILE
if test 1925 -ne `wc -c <'test/00/t0030a.sh'`; then
echo shar: \"'test/00/t0030a.sh'\" unpacked with wrong size!
fi
# end of 'test/00/t0030a.sh'
fi
if test -f 'test/00/t0031a.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'test/00/t0031a.sh'\"
else
echo shar: Extracting \"'test/00/t0031a.sh'\" \(1621 characters\)
sed "s/^X//" >'test/00/t0031a.sh' <<'END_OF_FILE'
X#! /bin/sh
X#
X# cook - file construction tool
X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
X# All rights reserved.
X#
X# This program is free software; you can redistribute it and/or modify
X# it under the terms of the GNU General Public License as published by
X# the Free Software Foundation; either version 2 of the License, or
X# (at your option) any later version.
X#
X# This program is distributed in the hope that it will be useful,
X# but WITHOUT ANY WARRANTY; without even the implied warranty of
X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X# GNU General Public License for more details.
X#
X# You should have received a copy of the GNU General Public License
X# along with this program; if not, write to the Free Software
X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X#
X# MANIFEST: test the os_stat_cache() function
X#
Xtmp=/tmp/$$
Xhere=`pwd`
X
Xfail()
X{
X echo 'FAILED test of the os_stat_chache() function of cook' 1>&2
X cd $here
X rm -rf $tmp
X exit 1
X}
Xpass()
X{
X cd $here
X rm -rf $tmp
X exit 0
X}
Xtrap "fail" 1 2 3 15
X
Xmkdir $tmp
Xcd $tmp
X
Xmkdir a a/b a/b/c
Xcp /dev/null a/fubar
X
Xcat > Howto.cook <<foobar
Xtest: test1 test2 test3 test4 test5 test6 test7;
Xtest1: { if [not [exists Howto.cook]] then fail; }
Xtest2: { if [exists snot] then fail; }
Xtest3: { if [not [exists a/fubar]] then fail; }
Xtest4: { if [exists a/fubar/b/c] then fail; }
Xtest5: { if [not [exists a]] then fail; }
Xtest6: { if [not [exists a/b]] then fail; }
Xtest7: { if [not [exists a/b/c]] then fail; }
Xfoobar
Xif test $? -ne 0 ; then fail; fi
X
X$here/bin/cook -nl -tr
Xif test $? -ne 0 ; then fail; fi
X
X# probably OK
Xpass
END_OF_FILE
if test 1621 -ne `wc -c <'test/00/t0031a.sh'`; then
echo shar: \"'test/00/t0031a.sh'\" unpacked with wrong size!
fi
# end of 'test/00/t0031a.sh'
fi
if test -f 'test/00/t0032a.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'test/00/t0032a.sh'\"
else
echo shar: Extracting \"'test/00/t0032a.sh'\" \(1545 characters\)
sed "s/^X//" >'test/00/t0032a.sh' <<'END_OF_FILE'
X#! /bin/sh
X#
X# cook - file construction tool
X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
X# All rights reserved.
X#
X# This program is free software; you can redistribute it and/or modify
X# it under the terms of the GNU General Public License as published by
X# the Free Software Foundation; either version 2 of the License, or
X# (at your option) any later version.
X#
X# This program is distributed in the hope that it will be useful,
X# but WITHOUT ANY WARRANTY; without even the implied warranty of
X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X# GNU General Public License for more details.
X#
X# You should have received a copy of the GNU General Public License
X# along with this program; if not, write to the Free Software
X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X#
X# MANIFEST: test the "sort" builtin function
X#
Xtmp=/tmp/$$
Xhere=`pwd`
X
Xfail()
X{
X echo 'FAILED test of the builtin function "sort"' 1>&2
X cd $here
X rm -rf $tmp
X exit 1
X}
Xpass()
X{
X cd $here
X rm -rf $tmp
X exit 0
X}
Xtrap "fail" 1 2 3 15
X
Xmkdir $tmp
Xcd $tmp
X
Xcat > Howto.cook <<foobar
Xtest:
X{
X if [sort] then fail;
X if [not [in [catenate [sort a]] a]] then fail;
X if [not [in [catenate [sort a b]] ab]] then fail;
X if [not [in [catenate [sort b a]] ab]] then fail;
X if [not [in [catenate [sort a b c]] abc]] then fail;
X if [not [in [catenate [sort c a b]] abc]] then fail;
X if [not [in [catenate [sort b c a]] abc]] then fail;
X}
Xfoobar
Xif test $? -ne 0 ; then fail; fi
X
X$here/bin/cook -nl
Xif test $? -ne 0 ; then fail; fi
X
X# probably OK
Xpass
END_OF_FILE
if test 1545 -ne `wc -c <'test/00/t0032a.sh'`; then
echo shar: \"'test/00/t0032a.sh'\" unpacked with wrong size!
fi
# end of 'test/00/t0032a.sh'
fi
if test -f 'test/00/t0034a.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'test/00/t0034a.sh'\"
else
echo shar: Extracting \"'test/00/t0034a.sh'\" \(1606 characters\)
sed "s/^X//" >'test/00/t0034a.sh' <<'END_OF_FILE'
X#! /bin/sh
X#
X# cook - file construction tool
X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
X# All rights reserved.
X#
X# This program is free software; you can redistribute it and/or modify
X# it under the terms of the GNU General Public License as published by
X# the Free Software Foundation; either version 2 of the License, or
X# (at your option) any later version.
X#
X# This program is distributed in the hope that it will be useful,
X# but WITHOUT ANY WARRANTY; without even the implied warranty of
X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X# GNU General Public License for more details.
X#
X# You should have received a copy of the GNU General Public License
X# along with this program; if not, write to the Free Software
X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X#
X# MANIFEST: test the "%0" pattern replacement - it may be empty
X#
Xtmp=/tmp/$$
Xhere=`pwd`
X
Xfail()
X{
X echo 'FAILED test of the "%0" pattern replacement' 1>&2
X cd $here
X rm -rf $tmp
X exit 1
X}
Xpass()
X{
X cd $here
X rm -rf $tmp
X exit 0
X}
Xtrap "fail" 1 2 3 15
X
Xmkdir $tmp
Xcd $tmp
X
Xmkdir a a/b a/b/c
Xif test $? -ne 0 ; then fail; fi
X
Xcat > a.c << 'foo'
Xvoid
Xmain()
X{
X exit(0);
X}
Xfoo
Xif test $? -ne 0 ; then fail; fi
X
Xln a.c a/b.c
Xif test $? -ne 0 ; then fail; fi
X
Xln a.c a/b/c.c
Xif test $? -ne 0 ; then fail; fi
X
Xln a.c a/b/c/d.c
Xif test $? -ne 0 ; then fail; fi
X
Xcat > Howto.cook << 'foobar'
Xtest: a.o a/b.o a/b/c.o a/b/c/d.o;
X
X%0%1.o: %0%1.c
X{
X cc -c %0%1.c;
X if %0 then
X mv %1.o %0%1.o;
X}
Xfoobar
Xif test $? -ne 0 ; then fail; fi
X
X$here/bin/cook -nl
Xif test $? -ne 0 ; then fail; fi
X
X# probably OK
Xpass
END_OF_FILE
if test 1606 -ne `wc -c <'test/00/t0034a.sh'`; then
echo shar: \"'test/00/t0034a.sh'\" unpacked with wrong size!
fi
# end of 'test/00/t0034a.sh'
fi
if test -f 'test/00/t0037a.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'test/00/t0037a.sh'\"
else
echo shar: Extracting \"'test/00/t0037a.sh'\" \(1697 characters\)
sed "s/^X//" >'test/00/t0037a.sh' <<'END_OF_FILE'
X#! /bin/sh
X#
X# cook - file construction tool
X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
X# All rights reserved.
X#
X# This program is free software; you can redistribute it and/or modify
X# it under the terms of the GNU General Public License as published by
X# the Free Software Foundation; either version 2 of the License, or
X# (at your option) any later version.
X#
X# This program is distributed in the hope that it will be useful,
X# but WITHOUT ANY WARRANTY; without even the implied warranty of
X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X# GNU General Public License for more details.
X#
X# You should have received a copy of the GNU General Public License
X# along with this program; if not, write to the Free Software
X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X#
X# MANIFEST: test the c_incl -no_cache option
X#
Xtmp=/tmp/$$
Xhere=`pwd`
X
Xfail()
X{
X echo 'FAILED test of the c_incl -No_Cache option' 1>&2
X cd $here
X rm -rf $tmp
X exit 1
X}
Xpass()
X{
X cd $here
X rm -rf $tmp
X exit 0
X}
Xtrap "fail" 1 2 3 15
X
Xmkdir $tmp
Xcd $tmp
X
Xcat > main.c << 'foobar'
X#include <stdio.h>
X
Xvoid
Xmain()
X{
X printf("Hello World!\n");
X exit(0);
X}
Xfoobar
Xif test $? -ne 0 ; then fail; fi
X
X$here/bin/c_incl main.c > test.tmp
Xif test $? -ne 0 ; then fail; fi
X
Xgrep stdio test.tmp > test.out
Xif test $? -ne 0 ; then fail; fi
X
Xcat > test.ok << 'foobar'
X/usr/include/stdio.h
Xfoobar
Xif test $? -ne 0 ; then fail; fi
X
Xcmp test.ok test.out
Xif test $? -ne 0 ; then fail; fi
X
X$here/bin/c_incl -nc -ns main.c > test.out
Xif test $? -ne 0 ; then fail; fi
X
Xcat > test.ok << 'foobar'
Xfoobar
Xif test $? -ne 0 ; then fail; fi
X
Xcmp test.ok test.out
Xif test $? -ne 0 ; then fail; fi
X
X
X# probably OK
Xpass
END_OF_FILE
if test 1697 -ne `wc -c <'test/00/t0037a.sh'`; then
echo shar: \"'test/00/t0037a.sh'\" unpacked with wrong size!
fi
# end of 'test/00/t0037a.sh'
fi
if test -f 'test/00/t0039a.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'test/00/t0039a.sh'\"
else
echo shar: Extracting \"'test/00/t0039a.sh'\" \(1435 characters\)
sed "s/^X//" >'test/00/t0039a.sh' <<'END_OF_FILE'
X#! /bin/sh
X#
X# cook - file construction tool
X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
X# All rights reserved.
X#
X# This program is free software; you can redistribute it and/or modify
X# it under the terms of the GNU General Public License as published by
X# the Free Software Foundation; either version 2 of the License, or
X# (at your option) any later version.
X#
X# This program is distributed in the hope that it will be useful,
X# but WITHOUT ANY WARRANTY; without even the implied warranty of
X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X# GNU General Public License for more details.
X#
X# You should have received a copy of the GNU General Public License
X# along with this program; if not, write to the Free Software
X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X#
X# MANIFEST: test the c_incl -Roff option
X#
Xtmp=/tmp/$$
Xhere=`pwd`
X
Xfail()
X{
X echo 'FAILED test of c_incl -Roff option' 1>&2
X cd $here
X rm -rf $tmp
X exit 1
X}
Xpass()
X{
X cd $here
X rm -rf $tmp
X exit 0
X}
Xtrap "fail" 1 2 3 15
X
Xmkdir $tmp
Xcd $tmp
X
Xcat > test.in << 'foobar'
Xone
X.so test2.in
Xthree
Xfoobar
Xif test $? -ne 0 ; then fail; fi
X
Xcat > test2.in << 'foobar'
Xtwo
Xfoobar
Xif test $? -ne 0 ; then fail; fi
X
X$here/bin/c_incl -r test.in > test.out
Xif test $? -ne 0 ; then fail; fi
X
Xcat > test.ok << 'foobar'
Xtest2.in
Xfoobar
Xif test $? -ne 0 ; then fail; fi
X
Xcmp test.ok test.out
Xif test $? -ne 0 ; then fail; fi
X
X# probably OK
Xpass
END_OF_FILE
if test 1435 -ne `wc -c <'test/00/t0039a.sh'`; then
echo shar: \"'test/00/t0039a.sh'\" unpacked with wrong size!
fi
# end of 'test/00/t0039a.sh'
fi
if test -f 'test/00/t0040a.sh' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'test/00/t0040a.sh'\"
else
echo shar: Extracting \"'test/00/t0040a.sh'\" \(1503 characters\)
sed "s/^X//" >'test/00/t0040a.sh' <<'END_OF_FILE'
X#! /bin/sh
X#
X# cook - file construction tool
X# Copyright (C) 1990, 1991, 1992, 1993 Peter Miller.
X# All rights reserved.
X#
X# This program is free software; you can redistribute it and/or modify
X# it under the terms of the GNU General Public License as published by
X# the Free Software Foundation; either version 2 of the License, or
X# (at your option) any later version.
X#
X# This program is distributed in the hope that it will be useful,
X# but WITHOUT ANY WARRANTY; without even the implied warranty of
X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X# GNU General Public License for more details.
X#
X# You should have received a copy of the GNU General Public License
X# along with this program; if not, write to the Free Software
X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X#
X# MANIFEST: test the cooktime program
X#
Xtmp=/tmp/$$
Xhere=`pwd`
X
Xfail()
X{
X echo 'FAILED test of the cooktime program' 1>&2
X cd $here
X rm -rf $tmp
X exit 1
X}
Xpass()
X{
X cd $here
X rm -rf $tmp
X exit 0
X}
Xtrap "fail" 1 2 3 15
X
Xmkdir $tmp
Xcd $tmp
X
XPAGER=cat
Xexport PAGER
X
Xcp /dev/null victim
Xif test $? -ne 0 ; then fail; fi
X
X$here/bin/cooktime -help > /dev/null
Xif test $? -ne 0 ; then fail; fi
X
X$here/bin/cooktime -version > /dev/null
Xif test $? -ne 0 ; then fail; fi
X
X$here/bin/cooktime victim -r
Xif test $? -ne 0 ; then fail; fi
X
X$here/bin/cooktime victim -m 2-jan-70 -r
Xif test $? -ne 0 ; then fail; fi
X
X$here/bin/cooktime victim -a 8-jan-75 -r
Xif test $? -ne 0 ; then fail; fi
X
X# probably OK
Xpass
END_OF_FILE
if test 1503 -ne `wc -c <'test/00/t0040a.sh'`; then
echo shar: \"'test/00/t0040a.sh'\" unpacked with wrong size!
fi
# end of 'test/00/t0040a.sh'
fi
echo shar: End of archive 2 \(of 11\).
cp /dev/null ark2isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 10 11 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 11 archives.
rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
echo You still need to unpack the following archives:
echo " " ${MISSING}
fi
## End of shell archive.
exit 0