From uunet!rsalz Tue May 19 14:14:21 1992
Received: from uunet.UUCP by sparky.IMD.Sterling.COM (5.65c/IDA-1.4.4)
	id AA03486; Tue, 19 May 1992 14:14:17 -0500
Return-Path: <uunet!rsalz>
Received: by rodan.UU.NET (5.61/UUNET-mail-drop)
	id AA17555; Tue, 19 May 92 14:35:01 -0400
Date: Tue, 19 May 92 14:35:01 -0400
From: uunet!rsalz (Rich Salz)
Message-Id: <9205191835.AA17555@rodan.UU.NET>
To: kent@imd.sterling.com
Subject: cshar/Part03
Status: O

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then feed it
# into a shell via "sh file" or similar.  To overwrite existing files,
# type "sh file -c".
# The tool that generated this appeared in the comp.sources.unix newsgroup;
# send mail to comp-sources-unix@uunet.uu.net if you want that tool.
# Contents:  Makefile config.3b1 config.5r3 config.bsd config.dos
#   config.hpx config.vms manipull.man
# Wrapped by rsalz@rodan on Tue Apr  7 23:54:47 1992
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
echo If this archive is complete, you will see the following message:
echo '          "shar: End of archive 3 (of 6)."'
if test -f 'Makefile' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Makefile'\"
else
  echo shar: Extracting \"'Makefile'\" \(6592 characters\)
  sed "s/^X//" >'Makefile' <<'END_OF_FILE'
X##
X##  SOURCE-SHIPPING TOOLS MAKEFILE
X##  $Header: Makefile,v 2.1 88/06/03 11:38:35 rsalz Locked $
X##
X
X##  Grrr...
XSHELL	= /bin/sh
X
X##  Which one are you editing?
XCONFIG	= config.bsd
X
X##  Put -D options here, if they're not in your config.h
XDEFS	=
X
X##  Flags for the Compiler, the linker, and lint
X#CC	=
XCFLAGS	= $(DEFS) -g
XLINKF	=
XLINTF	= $(DEFS) -a -b -h
X
X##  How to remove a file, create one, or make one read-only
XREMOVE	= rm -f
X#REMOVE	= -rm /f
XTOUCH	= -touch
XREAD_ONLY	= chmod 444
X#READ_ONLY	= echo Do not edit
X
X##  Prolog -- first file that should be linked in.
XPROLOG	=
X
X##  Microsoft C, v5.0.
X##  NOTE:  You will have to rename *.o to *.obj, and add .exe in a few
X##  places.  This makefile is ugly enough; I refuse to do it.
X#CC	= cl
X#MODEL	= S
X#CFLAGS	= -A$(MODEL) -Zid -Od -W3
X#CFLAGS	= -A$(MODEL) -O
X#LINKF	= -link /stack:0x4000 /noe
X#PROLOG	= c:\msc\lib\$(MODEL)setargv.obj
X#.c.obj:
X#	$(CC) $(CFLAGS) -c $*.c
X
X##  If the directory library is built into the shar library, edit these
X##  two lines.
X#DIRSRC	= dir###.c
X#DIROBJ	= dir###.o
XDIRSRC	=
XDIROBJ	=
X
X##  If the directory library is somewhere else, use this.
X#DIRLIB	= -lndir
XDIRLIB	=
X
X##  The shar package has a local library that it builds.  Define its name.
XMYLIB	= lib.a
X#MYLIB	= lib.lib
X
X##  Specify how to make the library
XMKLIB	= ar cr $(MYLIB) $(LIB_OBJ)
X#MKLIB	= ar cr $(MYLIB) `lorder $(LIB_OBJ) | tsort`
X#MKLIB	= archive -u $(MYLIB) $(LIB_OBJ)
X#MKLIB	= lib unix -+glue -+parser -+lcwd -+lexec -+lfiles -+lhost \
X#		-+llib -+lmem -+luser -+uuencode -+wildmat -+dirmsd;
X
X##  Specify how to finish off the library.
XRANLIB	= ranlib $(MYLIB)
X#RANLIB	= @echo
X#RANLIB = genlib lib.lib $(MYLIB)
X
X##  Where executables are installed.
XDESTDIR	=
XBINDIR	= $(DESTDIR)/usr/local/bin
X
X##  The programs.  You might not want to install everything.
XUUSTUFF	= uuencode uudecode
XPROGRAMS= findsrc makekit maniscan manipull shar unshar shell $(UUSTUFF)
X
X##  The "foo" manpage will get put in $(MANDIR)/foo.$(MANEXT)
XMANDIR	= /usr/man/man1
XMANEXT	= 1
X#MANDIR	= /usr/man/u_man/manl
X#MANEXT	= 1L
X#MANDIR	= /usr/man/local/man1
X#MANEXT	= 1
X#MANDIR	= /usr/man/man.M
X#MANEXT	= M
X
X##  Documentation.  You might not want to install everything.
XMANPAGES= findsrc.man makekit.man maniscan.man manipull.man \
X	shar.man unshar.man shell.man uuencode.man uudecode.man
X##  For systems without nroff manpages are nearly useless.  But see the
X##  "doc" target before giving this package to one of those systems.
X#MANPAGES=
X
X##
X##  END OF MAIN CONFIGURATION SECTION
X##
X
X##  UNOS needs this default rule, can you believe it?
X#.SUFFIXES	:	.o
X#.c.o		:
X#	$(CC) $(CFLAGS) -c $<
X
X##  Header files.
XHDRS	= shar.h config.h
X
X##  If you want to keep lpt-formatted manpages around, use this.
XDOCPAGES= findsrc.doc makekit.doc maniscan.doc manipull.doc \
X	shar.doc unshar.doc shell.doc uuencode.doc uudecode.doc
X.SUFFIXES	:	.doc .man
X.man.doc	:
X	@$(REMOVE) $@
X	sh dodoc.sh $*
X	@$(READ_ONLY) $@
X
X##  Our library of utility functions.
XLIB_SRC	= glue.c parser.c lcwd.c lexec.c lfiles.c lhost.c llib.c \
X	lmem.c luser.c uuencode.c wildmat.c $(DIRSRC)
XLIB_OBJ	= glue.o parser.o lcwd.o lexec.o lfiles.o lhost.o llib.o \
X	lmem.o luser.o uuencode.o wildmat.o $(DIROBJ)
X
X
Xall		:	$(PROGRAMS) $(MANPAGES)
X	$(TOUCH) all
X
Xdoc		:	dodoc.sh $(DOCPAGES)
X	$(TOUCH) doc
X
X##  You might want to change these actions.  It would be nice if everyone
X##  had the same install program.
Xinstall		:	all install_bin install_man
X	$(TOUCH) install
X
Xinstall_bin	: $(PROGRAMS)
X	cd $(BINDIR) ; $(REMOVE) $(PROGRAMS)
X	cp $(PROGRAMS) $(BINDIR)
X	cd $(BINDIR) ; strip $(PROGRAMS) ; chmod 755 $(PROGRAMS)
X#	cd $(BINDIR) ; /etc/chown root $(PROGRAMS)
X	$(TOUCH) install_bin
X
Xinstall_man	: $(MANPAGES)
X	if test `pwd` != $(MANDIR) ; then \
X	    for I in $(MANPAGES) ; do \
X		cp $$I $(MANDIR)/`basename $$I .man`.$(MANEXT); \
X	    done ; \
X	fi
X	$(TOUCH) install_man
X
Xclobber clean	:
X	$(REMOVE) *.[oa] *.doc *.BAK $(PROGRAMS) unshar2
X	$(REMOVE) lint lib.ln tags core foo a.out
X	$(REMOVE) Part?? all install install_bin install_man doc clean
X#	$(REMOVE) *.obj *.lib *.exe
X
X
X##  Header hacking.
X$(LIB_OBJ)	:	$(HDRS)
Xconfig.h	:	$(CONFIG)
X	@$(REMOVE) config.h
X	cp $(CONFIG) config.h
X	@$(READ_ONLY) config.h
X
X
X##  Programs.
Xfindsrc		:	findsrc.o $(MYLIB)
X	@$(REMOVE) findsrc
X	$(CC) $(CFLAGS) -o findsrc \
X		$(PROLOG) findsrc.o $(MYLIB) $(DIRLIB) $(LINKF)
X
Xmakekit		:	makekit.o $(MYLIB)
X	@$(REMOVE) makekit
X	$(CC) $(CFLAGS) -o makekit \
X		$(PROLOG) makekit.o $(MYLIB) $(DIRLIB) $(LINKF)
X
Xmaniscan	:	maniscan.o $(MYLIB)
X	@$(REMOVE) maniscan
X	$(CC) $(CFLAGS) -o maniscan \
X		$(PROLOG) maniscan.o $(MYLIB) $(DIRLIB) $(LINKF)
X
Xmanipull	:	manipull.o $(MYLIB)
X	@$(REMOVE) manipull
X	$(CC) $(CFLAGS) -o manipull \
X		$(PROLOG) manipull.o $(MYLIB) $(DIRLIB) $(LINKF)
X
Xshar		:	shar.o $(MYLIB)
X	@$(REMOVE) shar
X	$(CC) $(CFLAGS) -o shar \
X		$(PROLOG) shar.o $(MYLIB) $(DIRLIB) $(LINKF)
X
Xshell		:	shell.o $(MYLIB)
X	@$(REMOVE) shell
X	$(CC) $(CFLAGS) -o shell \
X		$(PROLOG) shell.o $(MYLIB) $(DIRLIB) $(LINKF)
X
Xuudecode	:	uudecode.o $(MYLIB)
X	@$(REMOVE) uudecode
X	$(CC) $(CFLAGS) -o uudecode \
X		$(PROLOG) uudecode.o $(MYLIB) $(DIRLIB) $(LINKF)
X
Xuuencode	:	uuenmain.o $(MYLIB)
X	@$(REMOVE) uuencode
X	$(CC) $(CFLAGS) -o uuencode \
X		$(PROLOG) uuenmain.o $(MYLIB) $(DIRLIB) $(LINKF)
X
Xunshar		:	unshar.o $(MYLIB)
X	@$(REMOVE) unshar
X	$(CC) $(CFLAGS) -o unshar \
X		$(PROLOG) unshar.o $(MYLIB) $(DIRLIB) $(LINKF)
X
X##  Special case, a version of unshar that uses cshar's shell interpreter.
Xunshar2		:	unshar.c $(HDRS) $(MYLIB)
X	@$(REMOVE) unshar2 unshar.o
X	$(CC) $(CFLAGS) -DUSE_MY_SHELL -o unshar \
X		$(PROLOG) unshar.c $(MYLIB) $(DIRLIB) $(LINKF)
X	@$(REMOVE) unshar.o
X
X
X##  Support your local library.
X$(MYLIB)	:	$(LIB_OBJ)
X	@$(REMOVE) $(MYLIB)
X	$(MKLIB)
X	$(RANLIB)
X
X##  Lint; this is probably only good for BSD-derived lints.
X##  A slight speed hack...
XX	= exec
Xlint		:	$(PROGRAMS) lib.ln
X	@$(REMOVE) lint
X	$(X) lint $(LINTF) -u $(LIB_SRC)          >lint
X	$(X) lint $(LINTF)    findsrc.c   lib.ln >>lint
X	$(X) lint $(LINTF)    makekit.c   lib.ln >>lint
X	$(X) lint $(LINTF)    maniscan.c  lib.ln >>lint
X	$(X) lint $(LINTF)    manipull.c  lib.ln >>lint
X	$(X) lint $(LINTF)    shar.c      lib.ln >>lint
X	$(X) lint $(LINTF)    shell.c     lib.ln >>lint
X	$(X) lint $(LINTF)    unshar.c    lib.ln >>lint
X	$(X) lint $(LINTF) -DUSE_MY_SHELL unshar.c lib.ln >>lint
X	-checknr -c.BI.IR.SS  *.man              >>lint
X
Xlib.ln		:	$(LIB_SRC)
X	@$(REMOVE) lib.ln
X	lint -CX $(LIB_SRC)
X	mv llib-lX.ln lib.ln
X
X
X##  Saber stuff
XSABER_SRC	= $(LIB_SRC)
X.SUFFIXES: .c .o .src .obj
X.c.src:
X	#load $(CFLAGS) $<
Xsaber		:	$(SABER_SRC)
X	#load $(CFLAGS) $(SABER_SRC)
END_OF_FILE
  if test 6592 -ne `wc -c <'Makefile'`; then
    echo shar: \"'Makefile'\" unpacked with wrong size!
  fi
  # end of 'Makefile'
fi
if test -f 'config.3b1' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'config.3b1'\"
else
  echo shar: Extracting \"'config.3b1'\" \(6896 characters\)
  sed "s/^X//" >'config.3b1' <<'END_OF_FILE'
X/*
X**  Configuration file for shar and friends.
X**
X**  This is for System V release 2, modified w/ release 3 system calls.
X**  This package will NOT install without the readdir() function, which
X**  comes in another package.
X**
X**  Bud Hovell @ Overture Systems Corp <whizz!bbh>
X**  $Header$
X*/
X/* SUPPRESS 460 *//* '/*' occurred inside a comment */
X
X
X/*
X**  Higher-level controls for which operating system we're running on.
X*/
X#define UNIX				/* Works			*/
X/*efine MSDOS				/* Should work			*/
X/*efine VMS				/* Doesn't work			*/
X
X
X/*
X**  A dense section of one-line compilation controls.  If you're confused,
X**  your best bet is to search through the source to see where and how
X**  each one of these is used.
X*/
X#define IDX		strchr		/* Maybe strchr?		*/
X#define RDX		strrchr		/* Maybe strrchr?		*/
X/*efine NEED_CTERMID			/* Don't have ctermid(3)?	*/
X#define NEED_MKDIR			/* Don't have mkdir(2)?		*/
X/*efine UNOS_MKDIR			/* Use makedir, not mkdir?	*/
X/*efine NEED_QSORT			/* Don't have qsort(3)?		*/
X/*efine NEED_GETOPT			/* Don't have getopt(3)?	*/
X#define NEED_STRERROR			/* Don't have strerror(3)?	*/
X#define HAVE_SYSTEM			/* Have system(3)?		*/
X#define CAN_POPEN			/* Can invoke file(1) command?	*/
X/*efine USE_MY_SHELL			/* Don't popen("/bin/sh")?	*/
X/*efine void		int		/* If you don't have void	*/
X/*pedef void		 sigret_t;	/* What a signal handler returns */
Xtypedef int		 sigret_t;	/* What a signal handler returns */
Xtypedef int		*align_t;	/* Worst-case alignment, for lint */
Xtypedef long		time_t;		/* Needed for non-BSD sites?	*/
Xtypedef long		off_t;		/* Needed for non-BSD sites?	*/
X/*efine SYS_WAIT			/* Have <sys/wait.h> and vfork?	*/
X/*efine HAS_VFORK			/* Have vfork but no <sys/wait.h> */
X/*efine USE_SYSTEM			/* Use system(3), not exec(2)?	*/
X/*efine USE_LONGJMP			/* Don't exit() within parser?	*/
X/*efine USE_SYSERRLIST			/* Have sys_errlist[], sys_nerr? */
X#define USE_GETPWUID			/* Use getpwuid(3)?		*/
X#define DEF_SAVEIT	TRUE		/* Save headers by default?	*/
X#define NAME_FORMAT	"%s%2.2d"	/* To get things like Part02	*/
X/*efine NAME_FORMAT	"%s%02.2d"	/* To get things like Part02	*/
X#define NUMB_FORMAT	"%02d"		/* To get things like 03	*/
X#define MANI_FORMAT	"%-25s %2d\t%s\n"	/* This should be safe	*/
X50c51
X#define MAX_LEVELS	6		/* Levels for findsrc to walk	*/
X#define THE_TTY		"/dev/tty"	/* Maybe "con:" for MS-DOS?	*/
X/*efine RCSID				/* Compile in the RCS strings?	*/
X#define USERNAME	"Somebody"	/* Your name, if not in environ	*/
X/* efine PTR_SPRINTF			/* Need extern char *sprinf()?	*/
X/*efine DECLARE_PROTOTYPES		/* Use prototypes in our decls?	*/
X/*efine ANSI_HDRS			/* Use <stdlib.h>, etc.?	*/
X#define REGISTER	register	/* Do you trust your compiler?	*/
X#define PEDAGOGY			/* Advertise tools?		*/
X
X
X/*
X**  How do we test to see if a character is okay to pass to one of
X**  the macros in <ctype.h>?  Note that we never give it EOF.
X*/
X#define CTYPE(c)	(isascii((c)))	/* Common			*/
X/*efine CTYPE(c)	((c) > 0)	/* Less common			*/
X/*efine CTYPE(c)	(TRUE)		/* Uncommon			*/
X
X
X/*
X**  We often want to make a backup copy of a file (usually a manifest).
X**  The following sets of #define's control how the copying is done.
X*/
X/*efine BU_VIA_RENAME			/* Use rename call?		*/
X#define BU_VIA_LINK			/* Use link/unlink calls?	*/
X/*efine BU_VIA_COPY			/* Use fopen() and such?	*/
X/*efine BU_NONE				/* System has generations?	*/
X/*efine BU_PREFIX	"B-"		/* Instead of ".BAK" suffix?	*/
X#define BU_SUFFIX	".BAK"		/* Instead of "B-" prefix?	*/
X/*efine BU_NAME_LEN	14		/* For non-BSD filesystems	*/
X
X
X/*
X**  The programs create up to two temporary files at one time, using
X**  mktemp(3).  Decide where you want the files to go, and if you wanna
X**  use a special directory for them (see MakeTempName).
X*/
X#define TEMP_NAME1	"/tmp/csharXXXXXX"	/* Unix			*/
X#define TEMP_NAME2	"/tmp/csharXXXXXX"	/* Unix			*/
X/*efine TEMP_NAME1	"csharXXXXXX"		/* MS-DOS		*/
X/*efine TEMP_NAME2	"csharXXXXXX"		/* MS-DOS		*/
X/*efine TEMP_NAME1	"sys$login:csharXXXXXX"	/* VMS			*/
X/*efine TEMP_NAME2	"sys$login:csharXXXXXX"	/* VMS			*/
X#define TEMPSIZE	40		/* Size of temp file name	*/
X/*efine TEMPVAR		"TMPDIR"	/* Place for temp files		*/
X
X
X/*
X**  There are several ways to get the current machine name.  Enable just one
X**  of one of the following lines.
X*/
X/*efine GETHOSTNAME			/* Use gethostname(2) call	*/
X#define UNAME				/* Use uname(2) call		*/
X/*efine UUNAME				/* Invoke "uuname -l"		*/
X/*efine	WHOAMI		"/etc/whoami"	/* Try /etc/whoami & <whoami.h>	*/
X/*efine HOST_STRING			/* Just use DEF_HOST		*/
X#define DEF_HOST	"SITE"		/* If all else fails		*/
X
X
X/*
X**  There are several different ways to get the current working directory.
X**  Enable just one of the following lines.
X*/
X/*efine GETWD				/* Use getwd(3) routine		*/
X#define GETCWD				/* Use getcwd(3) routine	*/
X/*efine PWDPOPEN			/* Invoke "pwd"			*/
X/*efine PWDGETENV	"PWD"		/* Get $PWD from environment	*/
X
X
X/*
X**  If you're a notes site, you might have to tweak these two #define's.
X**  If you don't care, then set them equal to something that doesn't
X**  start with the comment-begin sequence and they'll be effectively no-ops
X**  at the cost of an extra strcmp.  I've also heard of broken MS-DOS
X**  compilers that don't ignore slash-star inside comments!  Anyhow, for
X**  more details see unshar.c
X*/
X/*efine NOTES1		"/* Written "	/* This is what notes 1.7 uses	*/
X/*efine NOTES2		"/* ---"	/* This is what notes 1.7 uses	*/
X#define NOTES1		"$$"		/* This is a don't care		*/
X#define NOTES2		"$$"		/* This is a don't care		*/
X
X
X/*
X**  The findsrc program uses the readdir() routines to read directories.
X**  If your system doesn't have this interface, there are public domain
X**  implementations available for Unix from the comp.sources.unix archives,
X**  GNU has a VMS one inside EMACS, and this package comes with kits for
X**  MS-DOS and the Amiga.  Help save the world and use or write a readdir()
X**  package for your system!
X*/
X
X/* Now then, where did I put that header file?   Pick one. */
X/*efine IN_SYS_DIR			/* <sys/dir.h>			*/
X/*efine IN_SYS_NDIR			/* <sys/ndir.h>			*/
X/*efine IN_DIR				/* <dir.h>			*/
X/*efine IN_DIRECT			/* <direct.h>			*/
X/*efine IN_NDIR				/* "ndir.h"			*/
X#define IN_DIRENT			/* <dirent.h>			*/
X
X/*  What readdir() returns.  Must be a #define because of #include order. */
X#ifdef	IN_DIRENT
X#define DIRENTRY	struct dirent
X#else
X#define DIRENTRY	struct direct
X#endif	/* IN_DIRENT */
X
X
X/*
X**  Limits.  The shell parser can be compiled with some safety-checks.
X**  This includes creating too many files, or writing long ones, creating
X**  too many directories, overwriting existing files, etc.
X*/
X/*efine NAME_CHECK			/* Munge names of files?	*/
X/*efine PATH_CHECK			/* Check filenames in shars?	*/
X/*efine MAX_FOPENS	40		/* Max # of files/archive	*/
X/*efine MAX_LINES	1200		/* Max # of lines in a file	*/
X/*efine MAX_MKDIRS	10		/* Max directory depth		*/
X
X
X/*
X**  Congratulations, you're done!
X*/
END_OF_FILE
  if test 6896 -ne `wc -c <'config.3b1'`; then
    echo shar: \"'config.3b1'\" unpacked with wrong size!
  fi
  # end of 'config.3b1'
fi
if test -f 'config.5r3' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'config.5r3'\"
else
  echo shar: Extracting \"'config.5r3'\" \(6812 characters\)
  sed "s/^X//" >'config.5r3' <<'END_OF_FILE'
X/*
X**  Configuration file for shar and friends.
X**
X**  This is for System V release 3.1 and 3.2.
X**
X**  $Header: config.sVr3,v 2.1 88/06/06 22:05:40 rsalz Exp $
X*/
X/* SUPPRESS 460 *//* '/*' occurred inside a comment */
X
X
X/*
X**  Higher-level controls for which operating system we're running on.
X*/
X#define UNIX				/* Works			*/
X/*efine MSDOS				/* Should work			*/
X/*efine VMS				/* Doesn't work			*/
X
X
X/*
X**  A dense section of one-line compilation controls.  If you're confused,
X**  your best bet is to search through the source to see where and how
X**  each one of these is used.
X*/
X#define IDX		strchr		/* Maybe strchr?		*/
X#define RDX		strrchr		/* Maybe strrchr?		*/
X/*efine NEED_CTERMID			/* Don't have ctermid(3)?	*/
X/*efine NEED_MKDIR			/* Don't have mkdir(2)?		*/
X/*efine UNOS_MKDIR			/* Use makedir, not mkdir?	*/
X/*efine NEED_QSORT			/* Don't have qsort(3)?		*/
X/*efine NEED_GETOPT			/* Don't have getopt(3)?	*/
X#define NEED_STRERROR			/* Don't have strerror(3)?	*/
X#define HAVE_SYSTEM			/* Have system(3)?		*/
X#define CAN_POPEN			/* Can invoke file(1) command?	*/
X/*efine USE_MY_SHELL			/* Don't popen("/bin/sh")?	*/
X/*efine void		int		/* If you don't have void	*/
Xtypedef void		 sigret_t;	/* What a signal handler returns */
X/*pedef int		 sigret_t;	/* What a signal handler returns */
Xtypedef int		*align_t;	/* Worst-case alignment, for lint */
Xtypedef long		time_t;		/* Needed for non-BSD sites?	*/
Xtypedef long		off_t;		/* Needed for non-BSD sites?	*/
X/*efine SYS_WAIT			/* Have <sys/wait.h> and vfork?	*/
X/*efine HAS_VFORK			/* Have vfork but no <sys/wait.h> */
X/*efine USE_SYSTEM			/* Use system(3), not exec(2)?	*/
X/*efine USE_LONGJMP			/* Don't exit() within parser?	*/
X#define USE_SYSERRLIST			/* Have sys_errlist[], sys_nerr? */
X#define USE_GETPWUID			/* Use getpwuid(3)?		*/
X#define DEF_SAVEIT	TRUE		/* Save headers by default?	*/
X#define UNIX_FILES			/* stat(file) gives true size?	*/
X#define NAME_FORMAT	"%s%2.2d"	/* To get things like Part02	*/
X/*efine NAME_FORMAT	"%s%02.2d"	/* To get things like Part02	*/
X#define NUMB_FORMAT	"%02d"		/* To get things like 03	*/
X#define MANI_FORMAT	"%-25s %2d\t%s\n"	/* This should be safe	*/
X#define MAX_LEVELS	6		/* Levels for findsrc to walk	*/
X#define THE_TTY		"/dev/tty"	/* Maybe "con:" for MS-DOS?	*/
X#define RCSID				/* Compile in the RCS strings?	*/
X#define USERNAME	"Somebody"	/* Your name, if not in environ	*/
X/*efine PTR_SPRINTF			/* Need extern char *sprinf()?	*/
X/*efine DECLARE_PROTOTYPES		/* Use prototypes in our decls?	*/
X/*efine ANSI_HDRS			/* Use <stdlib.h>, etc.?	*/
X#define REGISTER	register	/* Do you trust your compiler?	*/
X#define PEDAGOGY			/* Advertise tools?		*/
X
X
X/*
X**  How do we test to see if a character is okay to pass to one of
X**  the macros in <ctype.h>?  Note that we never give it EOF.
X*/
X#define CTYPE(c)	(isascii((c)))	/* Common			*/
X/*efine CTYPE(c)	((c) > 0)	/* Less common			*/
X/*efine CTYPE(c)	(TRUE)		/* Uncommon			*/
X
X
X/*
X**  We often want to make a backup copy of a file (usually a manifest).
X**  The following sets of #define's control how the copying is done.
X*/
X/*efine BU_VIA_RENAME			/* Use rename call?		*/
X#define BU_VIA_LINK			/* Use link/unlink calls?	*/
X/*efine BU_VIA_COPY			/* Use fopen() and such?	*/
X/*efine BU_NONE				/* System has generations?	*/
X/*efine BU_PREFIX	"B-"		/* Instead of ".BAK" suffix?	*/
X#define BU_SUFFIX	".BAK"		/* Instead of "B-" prefix?	*/
X#define BU_NAME_LEN	14		/* For non-BSD filesystems	*/
X
X
X/*
X**  The programs create up to two temporary files at one time, using
X**  mktemp(3).  Decide where you want the files to go, and if you wanna
X**  use a special directory for them (see MakeTempName).
X*/
X#define TEMP_NAME1	"/tmp/csharXXXXXX"	/* Unix			*/
X#define TEMP_NAME2	"/tmp/csharXXXXXX"	/* Unix			*/
X/*efine TEMP_NAME1	"csharXXXXXX"		/* MS-DOS		*/
X/*efine TEMP_NAME2	"csharXXXXXX"		/* MS-DOS		*/
X/*efine TEMP_NAME1	"sys$login:csharXXXXXX"	/* VMS			*/
X/*efine TEMP_NAME2	"sys$login:csharXXXXXX"	/* VMS			*/
X#define TEMPSIZE	40		/* Size of temp file name	*/
X/*efine TEMPVAR		"TMPDIR"	/* Place for temp files		*/
X
X
X/*
X**  There are several ways to get the current machine name.  Enable just one
X**  of one of the following lines.
X*/
X/*efine GETHOSTNAME			/* Use gethostname(2) call	*/
X#define UNAME				/* Use uname(2) call		*/
X/*efine UUNAME				/* Invoke "uuname -l"		*/
X/*efine	WHOAMI		"/etc/whoami"	/* Try /etc/whoami & <whoami.h>	*/
X/*efine HOST_STRING			/* Just use DEF_HOST		*/
X#define DEF_HOST	"SITE"		/* If all else fails		*/
X
X
X/*
X**  There are several different ways to get the current working directory.
X**  Enable just one of the following lines.
X*/
X/*efine GETWD				/* Use getwd(3) routine		*/
X#define GETCWD				/* Use getcwd(3) routine	*/
X/*efine PWDPOPEN			/* Invoke "pwd"			*/
X/*efine PWDGETENV	"PWD"		/* Get $PWD from environment	*/
X
X
X/*
X**  If you're a notes site, you might have to tweak these two #define's.
X**  If you don't care, then set them equal to something that doesn't
X**  start with the comment-begin sequence and they'll be effectively no-ops
X**  at the cost of an extra strcmp.  I've also heard of broken MS-DOS
X**  compilers that don't ignore slash-star inside comments!  Anyhow, for
X**  more details see unshar.c
X*/
X/*efine NOTES1		"/* Written "	/* This is what notes 1.7 uses	*/
X/*efine NOTES2		"/* ---"	/* This is what notes 1.7 uses	*/
X#define NOTES1		"$$"		/* This is a don't care		*/
X#define NOTES2		"$$"		/* This is a don't care		*/
X
X
X/*
X**  The findsrc program uses the readdir() routines to read directories.
X**  If your system doesn't have this interface, there are public domain
X**  implementations available for Unix from the comp.sources.unix archives,
X**  GNU has a VMS one inside EMACS, and this package comes with kits for
X**  MS-DOS and the Amiga.  Help save the world and use or write a readdir()
X**  package for your system!
X*/
X
X/* Now then, where did I put that header file?   Pick one. */
X/*efine IN_SYS_DIR			/* <sys/dir.h>			*/
X/*efine IN_SYS_NDIR			/* <sys/ndir.h>			*/
X/*efine IN_DIR				/* <dir.h>			*/
X/*efine IN_DIRECT			/* <direct.h>			*/
X/*efine IN_NDIR				/* "ndir.h"			*/
X#define IN_DIRENT			/* <dirent.h>			*/
X
X/*  What readdir() returns.  Must be a #define because of #include order. */
X#ifdef	IN_DIRENT
X#define DIRENTRY	struct dirent
X#else
X#define DIRENTRY	struct direct
X#endif	/* IN_DIRENT */
X
X
X/*
X**  Limits.  The shell parser can be compiled with some safety-checks.
X**  This includes creating too many files, or writing long ones, creating
X**  too many directories, overwriting existing files, etc.
X*/
X/*efine NAME_CHECK			/* Munge names of files?	*/
X/*efine PATH_CHECK			/* Check filenames in shars?	*/
X/*efine MAX_FOPENS	40		/* Max # of files/archive	*/
X/*efine MAX_LINES	1200		/* Max # of lines in a file	*/
X/*efine MAX_MKDIRS	10		/* Max directory depth		*/
X
X/*
X**  Congratulations, you're done!
X*/
END_OF_FILE
  if test 6812 -ne `wc -c <'config.5r3'`; then
    echo shar: \"'config.5r3'\" unpacked with wrong size!
  fi
  # end of 'config.5r3'
fi
if test -f 'config.bsd' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'config.bsd'\"
else
  echo shar: Extracting \"'config.bsd'\" \(6864 characters\)
  sed "s/^X//" >'config.bsd' <<'END_OF_FILE'
X/*
X**  Configuration file for shar and friends.
X**
X**  This is known to work on Ultrix1.2 and Sun3.4 machines; it may work
X**  on other BSD variants, too.
X**
X**  $Header: config.h,v 2.2 88/06/06 22:05:27 rsalz Exp $
X*/
X/* SUPPRESS 460 *//* '/*' occurred inside a comment */
X
X
X/*
X**  Higher-level controls for which operating system we're running on.
X*/
X#define UNIX				/* Works			*/
X/*efine MSDOS				/* Should work			*/
X/*efine VMS				/* Doesn't work			*/
X
X
X/*
X**  A dense section of one-line compilation controls.  If you're confused,
X**  your best bet is to search through the source to see where and how
X**  each one of these is used.
X*/
X#define IDX		index		/* Maybe strchr?		*/
X#define RDX		rindex		/* Maybe strrchr?		*/
X#define NEED_CTERMID			/* Don't have ctermid(3)?	*/
X/*efine NEED_MKDIR			/* Don't have mkdir(2)?		*/
X/*efine UNOS_MKDIR			/* Use makedir, not mkdir?	*/
X/*efine NEED_QSORT			/* Don't have qsort(3)?		*/
X#define NEED_GETOPT			/* Don't have getopt(3)?	*/
X#define NEED_STRERROR			/* Don't have strerror(3)?	*/
X#define HAVE_SYSTEM			/* Have system(3)?		*/
X#define CAN_POPEN			/* Can invoke file(1) command?	*/
X/*efine USE_MY_SHELL			/* Don't popen("/bin/sh")?	*/
X/*efine void		int		/* If you don't have void	*/
X/*pedef void		 sigret_t;	/* What a signal handler returns */
Xtypedef int		 sigret_t;	/* What a signal handler returns */
Xtypedef int		*align_t;	/* Worst-case alignment, for lint */
X/*pedef long		time_t		/* Needed for non-BSD sites?	*/
X/*pedef long		off_t		/* Needed for non-BSD sites?	*/
X#define SYS_WAIT			/* Have <sys/wait.h> and vfork?	*/
X#define HAS_VFORK			/* Have vfork but no <sys/wait.h> */
X/*efine USE_SYSTEM			/* Use system(3), not exec(2)?	*/
X/*efine USE_LONGJMP			/* Don't exit() within parser?	*/
X#define USE_SYSERRLIST			/* Have sys_errlist[], sys_nerr? */
X#define USE_GETPWUID			/* Use getpwuid(3)?		*/
X#define DEF_SAVEIT	TRUE		/* Save headers by default?	*/
X#define UNIX_FILES			/* stat(file) gives true size?	*/
X#define NAME_FORMAT	"%s%2.2d"	/* To get things like Part02	*/
X/*efine NAME_FORMAT	"%s%02.2d"	/* To get things like Part02	*/
X#define NUMB_FORMAT	"%02d"		/* To get things like 03	*/
X#define MANI_FORMAT	"%-25s %2d\t%s\n"	/* This should be safe	*/
X#define MAX_LEVELS	6		/* Levels for findsrc to walk	*/
X#define THE_TTY		"/dev/tty"	/* Maybe "con:" for MS-DOS?	*/
X#define RCSID				/* Compile in the RCS strings?	*/
X#define USERNAME	"Somebody"	/* Your name, if not in environ	*/
X#define PTR_SPRINTF			/* Need extern char *sprinf()?	*/
X/*efine DECLARE_PROTOTYPES		/* Use prototypes in our decls?	*/
X/*efine ANSI_HDRS			/* Use <stdlib.h>, etc.?	*/
X#define REGISTER	register	/* Do you trust your compiler?	*/
X#define PEDAGOGY			/* Advertise tools?		*/
X
X
X/*
X**  How do we test to see if a character is okay to pass to one of
X**  the macros in <ctype.h>?  Note that we never give it EOF.
X*/
X#define CTYPE(c)	(isascii((c)))	/* Common			*/
X/*efine CTYPE(c)	((c) > 0)	/* Less common			*/
X/*efine CTYPE(c)	(TRUE)		/* Uncommon			*/
X
X
X/*
X**  We often want to make a backup copy of a file (usually a manifest).
X**  The following sets of #define's control how the copying is done.
X*/
X#define BU_VIA_RENAME			/* Use rename call?		*/
X/*efine BU_VIA_LINK			/* Use link/unlink calls?	*/
X/*efine BU_VIA_COPY			/* Use fopen() and such?	*/
X/*efine BU_NONE				/* System has generations?	*/
X/*efine BU_PREFIX	"B-"		/* Instead of ".BAK" suffix?	*/
X#define BU_SUFFIX	".BAK"		/* Instead of "B-" prefix?	*/
X/*efine BU_NAME_LEN	14		/* For non-BSD filesystems	*/
X
X
X/*
X**  The programs create up to two temporary files at one time, using
X**  mktemp(3).  Decide where you want the files to go, and if you wanna
X**  use a special directory for them (see MakeTempName).
X*/
X#define TEMP_NAME1	"/tmp/csharXXXXXX"	/* Unix			*/
X#define TEMP_NAME2	"/tmp/csharXXXXXX"	/* Unix			*/
X/*efine TEMP_NAME1	"csharXXXXXX"		/* MS-DOS		*/
X/*efine TEMP_NAME2	"csharXXXXXX"		/* MS-DOS		*/
X/*efine TEMP_NAME1	"sys$login:csharXXXXXX"	/* VMS			*/
X/*efine TEMP_NAME2	"sys$login:csharXXXXXX"	/* VMS			*/
X#define TEMPSIZE	40		/* Size of temp file name	*/
X/*efine TEMPVAR		"TMPDIR"	/* Place for temp files		*/
X
X
X/*
X**  There are several ways to get the current machine name.  Enable just one
X**  of one of the following lines.
X*/
X#define GETHOSTNAME			/* Use gethostname(2) call	*/
X/*efine UNAME				/* Use uname(2) call		*/
X/*efine UUNAME				/* Invoke "uuname -l"		*/
X/*efine	WHOAMI		"/etc/whoami"	/* Try /etc/whoami & <whoami.h>	*/
X/*efine HOST_STRING			/* Just use DEF_HOST		*/
X#define DEF_HOST	"SITE"		/* If all else fails		*/
X
X
X/*
X**  There are several different ways to get the current working directory.
X**  Enable just one of the following lines.
X*/
X#define GETWD				/* Use getwd(3) routine		*/
X/*efine GETCWD				/* Use getcwd(3) routine	*/
X/*efine PWDPOPEN			/* Invoke "pwd"			*/
X/*efine PWDGETENV	"PWD"		/* Get $PWD from environment	*/
X
X
X/*
X**  If you're a notes site, you might have to tweak these two #define's.
X**  If you don't care, then set them equal to something that doesn't
X**  start with the comment-begin sequence and they'll be effectively no-ops
X**  at the cost of an extra strcmp.  I've also heard of broken MS-DOS
X**  compilers that don't ignore slash-star inside comments!  Anyhow, for
X**  more details see unshar.c
X*/
X/*efine NOTES1		"/* Written "	/* This is what notes 1.7 uses	*/
X/*efine NOTES2		"/* ---"	/* This is what notes 1.7 uses	*/
X#define NOTES1		"$$"		/* This is a don't care		*/
X#define NOTES2		"$$"		/* This is a don't care		*/
X
X
X/*
X**  The findsrc program uses the readdir() routines to read directories.
X**  If your system doesn't have this interface, there are public domain
X**  implementations available for Unix from the comp.sources.unix archives,
X**  GNU has a VMS one inside EMACS, and this package comes with kits for
X**  MS-DOS and the Amiga.  Help save the world and use or write a readdir()
X**  package for your system!
X*/
X
X/* Now then, where did I put that header file?   Pick one. */
X#define IN_SYS_DIR			/* <sys/dir.h>			*/
X/*efine IN_SYS_NDIR			/* <sys/ndir.h>			*/
X/*efine IN_DIR				/* <dir.h>			*/
X/*efine IN_DIRECT			/* <direct.h>			*/
X/*efine IN_NDIR				/* "ndir.h"			*/
X/*efine IN_DIRENT			/* <dirent.h>			*/
X
X/*  What readdir() returns.  Must be a #define because of #include order. */
X#ifdef	IN_DIRENT
X#define DIRENTRY	struct dirent
X#else
X#define DIRENTRY	struct direct
X#endif	/* IN_DIRENT */
X
X
X/*
X**  Limits.  The shell parser can be compiled with some safety-checks.
X**  This includes creating too many files, or writing long ones, creating
X**  too many directories, overwriting existing files, etc.
X*/
X/*efine NAME_CHECK			/* Munge names of files?	*/
X/*efine PATH_CHECK			/* Check filenames in shars?	*/
X/*efine MAX_FOPENS	40		/* Max # of files/archive	*/
X/*efine MAX_LINES	1200		/* Max # of lines in a file	*/
X/*efine MAX_MKDIRS	10		/* Max directory depth		*/
X
X
X/*
X**  Congratulations, you're done!
X*/
END_OF_FILE
  if test 6864 -ne `wc -c <'config.bsd'`; then
    echo shar: \"'config.bsd'\" unpacked with wrong size!
  fi
  # end of 'config.bsd'
fi
if test -f 'config.dos' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'config.dos'\"
else
  echo shar: Extracting \"'config.dos'\" \(6867 characters\)
  sed "s/^X//" >'config.dos' <<'END_OF_FILE'
X/*
X**  Configuration file for shar and friends.
X**
X**  This is for MS-DOS.  It works on Microsoft C, release 5.1
X**
X**  $Header: config.dos,v 2.1 88/06/06 22:05:40 rsalz Exp $
X*/
X/* SUPPRESS 460 *//* '/*' occurred inside a comment */
X
X
X/*
X**  Higher-level controls for which operating system we're running on.
X*/
X/*efine UNIX				/* Works			*/
X	/* Microsoft C 5.1 predefines MSDOS */
X/*efine MSDOS				/* Should work			*/
X/*efine VMS				/* Doesn't work			*/
X
X
X/*
X**  A dense section of one-line compilation controls.  If you're confused,
X**  your best bet is to search through the source to see where and how
X**  each one of these is used.
X*/
X#define IDX		strchr		/* Maybe strchr?		*/
X#define RDX		strrchr		/* Maybe strrchr?		*/
X#define NEED_CTERMID			/* Don't have ctermid(3)?	*/
X/*efine NEED_MKDIR			/* Don't have mkdir(2)?		*/
X/*efine UNOS_MKDIR			/* Use makedir, not mkdir?	*/
X/*efine NEED_QSORT			/* Don't have qsort(3)?		*/
X#define NEED_GETOPT			/* Don't have getopt(3)?	*/
X#define NEED_STRERROR			/* Don't have strerror(3)?	*/
X#define HAVE_SYSTEM			/* Have system(3)?		*/
X/*efine CAN_POPEN			/* Can invoke file(1) command?	*/
X#define USE_MY_SHELL			/* Don't popen("/bin/sh")?	*/
X/*efine void		int		/* If you don't have void	*/
Xtypedef void		 sigret_t;	/* What a signal handler returns */
Xtypedef void		 sigret_t;	/* What a signal handler returns */
Xtypedef int		*align_t;	/* Worst-case alignment, for lint */
X/*pedef long		time_t;		/* Needed for non-BSD sites?	*/
X/*pedef long		off_t;		/* Needed for non-BSD sites?	*/
X/*efine SYS_WAIT			/* Have <sys/wait.h> and vfork?	*/
X/*efine HAS_VFORK			/* Have vfork but no <sys/wait.h> */
X#define USE_SYSTEM			/* Use system(3), not exec(2)?	*/
X/*efine USE_LONGJMP			/* Don't exit() within parser?	*/
X#define USE_SYSERRLIST			/* Have sys_errlist[], sys_nerr? */
X/*efine USE_GETPWUID			/* Use getpwuid(3)?		*/
X#define DEF_SAVEIT	TRUE		/* Save headers by default?	*/
X#define UNIX_FILES			/* stat(file) gives true size?	*/
X#define NAME_FORMAT	"%s%2.2d"	/* To get things like Part02	*/
X/*efine NAME_FORMAT	"%s%02.2d"	/* To get things like Part02	*/
X#define NUMB_FORMAT	"%02d"		/* To get things like 03	*/
X#define MANI_FORMAT	"%-25s %2d\t%s\n"	/* This should be safe	*/
X#define MAX_LEVELS	6		/* Levels for findsrc to walk	*/
X#define THE_TTY		(getenv("DEVTTY") ? getenv("DEVTTY") : "/dev/con")
X#define RCSID				/* Compile in the RCS strings?	*/
X#define USERNAME	"Somebody"	/* Your name, if not in environ	*/
X/*efine PTR_SPRINTF			/* Need extern char *sprinf()?	*/
X#define DECLARE_PROTOTYPES		/* Use prototypes in our decls?	*/
X#define ANSI_HDRS			/* Use <stdlib.h>, etc.?	*/
X#define REGISTER	register	/* Do you trust your compiler?	*/
X#define PEDAGOGY			/* Advertise tools?		*/
X
X
X/*
X**  How do we test to see if a character is okay to pass to one of
X**  the macros in <ctype.h>?  Note that we never give it EOF.
X*/
X#define CTYPE(c)	(isascii((c)))	/* Common			*/
X/*efine CTYPE(c)	((c) > 0)	/* Less common			*/
X/*efine CTYPE(c)	(TRUE)		/* Uncommon			*/
X
X
X/*
X**  We often want to make a backup copy of a file (usually a manifest).
X**  The following sets of #define's control how the copying is done.
X*/
X#define BU_VIA_RENAME			/* Use rename call?		*/
X/*efine BU_VIA_LINK			/* Use link/unlink calls?	*/
X/*efine BU_VIA_COPY			/* Use fopen() and such?	*/
X/*efine BU_NONE				/* System has generations?	*/
X#define BU_PREFIX	"B-"		/* Instead of ".BAK" suffix?	*/
X/*efine BU_SUFFIX	".BAK"		/* Instead of "B-" prefix?	*/
X#define BU_NAME_LEN	14		/* For non-BSD filesystems	*/
X
X
X/*
X**  The programs create up to two temporary files at one time, using
X**  mktemp(3).  Decide where you want the files to go, and if you wanna
X**  use a special directory for them (see MakeTempName).
X*/
X#define TEMP_NAME1	"/tmp/csharXXXXXX"	/* Unix			*/
X#define TEMP_NAME2	"/tmp/csharXXXXXX"	/* Unix			*/
X/*efine TEMP_NAME1	"csXXXXXX"		/* MS-DOS		*/
X/*efine TEMP_NAME2	"csXXXXXX"		/* MS-DOS		*/
X/*efine TEMP_NAME1	"sys$login:csharXXXXXX"	/* VMS			*/
X/*efine TEMP_NAME2	"sys$login:csharXXXXXX"	/* VMS			*/
X#define TEMPSIZE	40		/* Size of temp file name	*/
X/*efine TEMPVAR		"TMP"		/* Place for temp files		*/
X
X
X/*
X**  There are several ways to get the current machine name.  Enable just one
X**  of one of the following lines.
X*/
X/*efine GETHOSTNAME			/* Use gethostname(2) call	*/
X/*efine UNAME				/* Use uname(2) call		*/
X/*efine UUNAME				/* Invoke "uuname -l"		*/
X/*efine	WHOAMI		"a:\host.txt"	/* Try /etc/whoami & <whoami.h>	*/
X#define HOST_STRING			/* Just use DEF_HOST		*/
X#define DEF_HOST	"pc"		/* If all else fails		*/
X
X
X/*
X**  There are several different ways to get the current working directory.
X**  Enable just one of the following lines.
X*/
X/*efine GETWD				/* Use getwd(3) routine		*/
X#define GETCWD				/* Use getcwd(3) routine	*/
X/*efine PWDPOPEN			/* Invoke "pwd"			*/
X/*efine PWDGETENV	"PWD"		/* Get $PWD from environment	*/
X
X
X/*
X**  If you're a notes site, you might have to tweak these two #define's.
X**  If you don't care, then set them equal to something that doesn't
X**  start with the comment-begin sequence and they'll be effectively no-ops
X**  at the cost of an extra strcmp.  I've also heard of broken MS-DOS
X**  compilers that don't ignore slash-star inside comments!  Anyhow, for
X**  more details see unshar.c
X*/
X/*efine NOTES1		"/* Written "	/* This is what notes 1.7 uses	*/
X/*efine NOTES2		"/* ---"	/* This is what notes 1.7 uses	*/
X#define NOTES1		"$$"		/* This is a don't care		*/
X#define NOTES2		"$$"		/* This is a don't care		*/
X
X
X/*
X**  The findsrc program uses the readdir() routines to read directories.
X**  If your system doesn't have this interface, there are public domain
X**  implementations available for Unix from the comp.sources.unix archives,
X**  GNU has a VMS one inside EMACS, and this package comes with kits for
X**  MS-DOS and the Amiga.  Help save the world and use or write a readdir()
X**  package for your system!
X*/
X
X/* Now then, where did I put that header file?   Pick one. */
X/*efine IN_SYS_DIR			/* <sys/dir.h>			*/
X/*efine IN_SYS_NDIR			/* <sys/ndir.h>			*/
X/*efine IN_DIR				/* <dir.h>			*/
X/*efine IN_DIRECT			/* <direct.h>			*/
X#define IN_NDIR				/* "ndir.h"			*/
X/*efine IN_DIRENT			/* <dirent.h>			*/
X
X/*  What readdir() returns.  Must be a #define because of #include order. */
X#ifdef	IN_DIRENT
X#define DIRENTRY	struct dirent
X#else
X#define DIRENTRY	struct direct
X#endif	/* IN_DIRENT */
X
X
X/*
X**  Limits.  The shell parser can be compiled with some safety-checks.
X**  This includes creating too many files, or writing long ones, creating
X**  too many directories, overwriting existing files, etc.
X*/
X/*efine NAME_CHECK			/* Munge names of files?	*/
X/*efine PATH_CHECK			/* Check filenames in shars?	*/
X/*efine MAX_FOPENS	40		/* Max # of files/archive	*/
X/*efine MAX_LINES	1200		/* Max # of lines in a file	*/
X/*efine MAX_MKDIRS	10		/* Max directory depth		*/
X
X/*
X**  Congratulations, you're done!
X*/
END_OF_FILE
  if test 6867 -ne `wc -c <'config.dos'`; then
    echo shar: \"'config.dos'\" unpacked with wrong size!
  fi
  # end of 'config.dos'
fi
if test -f 'config.hpx' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'config.hpx'\"
else
  echo shar: Extracting \"'config.hpx'\" \(6816 characters\)
  sed "s/^X//" >'config.hpx' <<'END_OF_FILE'
X/*
X**  Configuration file for shar and friends.
X**
X**  This is known to work on HP-UX 9000/300 /500 /800; it make work on
X**  other hockey-pucks, too.
X**
X**  $Header$
X*/
X/* SUPPRESS 460 *//* '/*' occurred inside a comment */
X
X
X/*
X**  Higher-level controls for which operating system we're running on.
X*/
X#define UNIX				/* Works			*/
X/*efine MSDOS				/* Should work			*/
X/*efine VMS				/* Doesn't work			*/
X
X
X/*
X**  A dense section of one-line compilation controls.  If you're confused,
X**  your best bet is to search through the source to see where and how
X**  each one of these is used.
X*/
X#define IDX		strchr		/* Maybe strchr?		*/
X#define RDX		strrchr		/* Maybe strrchr?		*/
X#define NEED_CTERMID			/* Don't have ctermid(3)?	*/
X/*efine NEED_MKDIR			/* Don't have mkdir(2)?		*/
X/*efine UNOS_MKDIR			/* Use makedir, not mkdir?	*/
X/*efine NEED_QSORT			/* Don't have qsort(3)?		*/
X/*efine NEED_GETOPT			/* Don't have getopt(3)?	*/
X#define NEED_STRERROR			/* Don't have strerror(3)?	*/
X#define HAVE_SYSTEM			/* Have system(3)?		*/
X#define CAN_POPEN			/* Can invoke file(1) command?	*/
X/*efine USE_MY_SHELL			/* Don't popen("/bin/sh")?	*/
X/*efine void		int		/* If you don't have void	*/
X/*pedef void		 sigret_t;	/* What a signal handler returns */
Xtypedef int		 sigret_t;	/* What a signal handler returns */
Xtypedef int		*align_t;	/* Worst-case alignment, for lint */
X/*pedef long		time_t		/* Needed for non-BSD sites?	*/
X/*pedef long		off_t		/* Needed for non-BSD sites?	*/
X/*efine SYS_WAIT			/* Have <sys/wait.h> and vfork?	*/
X#define HAS_VFORK			/* Have vfork only, no sys/wait.h */
X/*efine USE_SYSTEM			/* Use system(3), not exec(2)?	*/
X/*efine USE_LONGJMP			/* Don't exit() within parser?	*/
X#define USE_SYSERRLIST			/* Have sys_errlist[], sys_nerr? */
X#define USE_GETPWUID			/* Use getpwuid(3)?		*/
X#define DEF_SAVEIT	TRUE		/* Save headers by default?	*/
X#define UNIX_FILES			/* stat(file) gives true size?	*/
X#define NAME_FORMAT	"%s%2.2d"	/* To get things like Part02	*/
X/*efine NAME_FORMAT	"%s%02.2d"	/* To get things like Part02	*/
X#define NUMB_FORMAT	"%02d"		/* To get things like 03	*/
X#define MANI_FORMAT	"%-25s %2d\t%s\n"	/* This should be safe	*/
X#define MAX_LEVELS	6		/* Levels for findsrc to walk	*/
X#define THE_TTY		"/dev/tty"	/* Maybe "con:" for MS-DOS?	*/
X#define RCSID				/* Compile in the RCS strings?	*/
X#define USERNAME	"Sombody"	/* Your name, if not in environ	*/
X#define PTR_SPRINTF			/* Need extern char *sprinf()?	*/
X/*efine DECLARE_PROTOTYPES		/* Use prototypes in our decls?	*/
X/*efine ANSI_HDRS			/* Use <stdlib.h>, etc.?	*/
X#define REGISTER	register	/* Do you trust your compiler?	*/
X#define PEDAGOGY			/* Advertise tools?		*/
X
X
X/*
X**  How do we test to see if a character is okay to pass to one of
X**  the macros in <ctype.h>?  Note that we never give it EOF.
X*/
X#define CTYPE(c)	(isascii((c)))	/* Common			*/
X/*efine CTYPE(c)	((c) > 0)	/* Less common			*/
X/*efine CTYPE(c)	(TRUE)		/* Uncommon			*/
X
X
X/*
X**  We often want to make a backup copy of a file (usually a manifest).
X**  The following sets of #define's control how the copying is done.
X*/
X#define BU_VIA_RENAME			/* Use rename call?		*/
X/*efine BU_VIA_LINK			/* Use link/unlink calls?	*/
X/*efine BU_VIA_COPY			/* Use fopen() and such?	*/
X/*efine BU_NONE				/* System has generations?	*/
X/*efine BU_PREFIX	"B-"		/* Instead of ".BAK" suffix?	*/
X#define BU_SUFFIX	".BAK"		/* Instead of "B-" prefix?	*/
X#define BU_NAME_LEN	14		/* For non-BSD filesystems	*/
X
X
X/*
X**  The programs create up to two temporary files at one time, using
X**  mktemp(3).  Decide where you want the files to go, and if you wanna
X**  use a special directory for them (see MakeTempName).
X*/
X#define TEMP_NAME1	"/tmp/csharXXXXXX"	/* Unix			*/
X#define TEMP_NAME2	"/tmp/csharXXXXXX"	/* Unix			*/
X/*efine TEMP_NAME1	"csharXXXXXX"		/* MS-DOS		*/
X/*efine TEMP_NAME2	"csharXXXXXX"		/* MS-DOS		*/
X/*efine TEMP_NAME1	"sys$login:csharXXXXXX"	/* VMS			*/
X/*efine TEMP_NAME2	"sys$login:csharXXXXXX"	/* VMS			*/
X#define TEMPSIZE	40		/* Size of temp file name	*/
X/*efine TEMPVAR		"TMPDIR"	/* Place for temp files		*/
X
X
X/*
X**  There are several ways to get the current machine name.  Enable just one
X**  of one of the following lines.
X*/
X#define GETHOSTNAME			/* Use gethostname(2) call	*/
X/*efine UNAME				/* Use uname(2) call		*/
X/*efine UUNAME				/* Invoke "uuname -l"		*/
X/*efine	WHOAMI		"/etc/whoami"	/* Try /etc/whoami & <whoami.h>	*/
X/*efine HOST_STRING			/* Just use DEF_HOST		*/
X#define DEF_HOST	"SITE"		/* If all else fails		*/
X
X
X/*
X**  There are several different ways to get the current working directory.
X**  Enable just one of the following lines.
X*/
X/*efine GETWD				/* Use getwd(3) routine		*/
X#define GETCWD				/* Use getcwd(3) routine	*/
X/*efine PWDPOPEN			/* Invoke "pwd"			*/
X/*efine PWDGETENV	"PWD"		/* Get $PWD from environment	*/
X
X
X/*
X**  If you're a notes site, you might have to tweak these two #define's.
X**  If you don't care, then set them equal to something that doesn't
X**  start with the comment-begin sequence and they'll be effectively no-ops
X**  at the cost of an extra strcmp.  I've also heard of broken MS-DOS
X**  compilers that don't ignore slash-star inside comments!  Anyhow, for
X**  more details see unshar.c
X*/
X/*efine NOTES1		"/* Written "	/* This is what notes 1.7 uses	*/
X/*efine NOTES2		"/* ---"	/* This is what notes 1.7 uses	*/
X#define NOTES1		"$$"		/* This is a don't care		*/
X#define NOTES2		"$$"		/* This is a don't care		*/
X
X
X/*
X**  The findsrc program uses the readdir() routines to read directories.
X**  If your system doesn't have this interface, there are public domain
X**  implementations available for Unix from the comp.sources.unix archives,
X**  GNU has a VMS one inside EMACS, and this package comes with kits for
X**  MS-DOS and the Amiga.  Help save the world and use or write a readdir()
X**  package for your system!
X*/
X
X/* Now then, where did I put that header file?   Pick one. */
X/*efine IN_SYS_DIR			/* <sys/dir.h>			*/
X/*efine IN_SYS_NDIR			/* <sys/ndir.h>			*/
X/*efine IN_DIR				/* <dir.h>			*/
X/*efine IN_DIRECT			/* <direct.h>			*/
X#define IN_NDIR				/* "ndir.h"			*/
X/*efine IN_DIRENT			/* <dirent.h>			*/
X
X/*  What readdir() returns.  Must be a #define because of #include order. */
X#ifdef	IN_DIRENT
X#define DIRENTRY	struct dirent
X#else
X#define DIRENTRY	struct direct
X#endif	/* IN_DIRENT */
X
X
X/*
X**  Limits.  The shell parser can be compiled with some safety-checks.
X**  This includes creating too many files, or writing long ones, creating
X**  too many directories, overwriting existing files, etc.
X*/
X/*efine NAME_CHECK			/* Munge names of files?	*/
X/*efine PATH_CHECK			/* Check filenames in shars?	*/
X/*efine MAX_FOPENS	40		/* Max # of files/archive	*/
X/*efine MAX_LINES	1200		/* Max # of lines in a file	*/
X/*efine MAX_MKDIRS	10		/* Max directory depth		*/
X
X
X/*
X**  Congratulations, you're done!
X*/
END_OF_FILE
  if test 6816 -ne `wc -c <'config.hpx'`; then
    echo shar: \"'config.hpx'\" unpacked with wrong size!
  fi
  # end of 'config.hpx'
fi
if test -f 'config.vms' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'config.vms'\"
else
  echo shar: Extracting \"'config.vms'\" \(6748 characters\)
  sed "s/^X//" >'config.vms' <<'END_OF_FILE'
X/*
X**  Configuration file for shar and friends.
X**
X**  This is believed to work on VMS.
X**
X**  $Header$
X*/
X/* SUPPRESS 460 *//* '/*' occurred inside a comment */
X
X
X/*
X**  Higher-level controls for which operating system we're running on.
X*/
X/*efine UNIX				/* Works			*/
X/*efine MSDOS				/* Should work			*/
X#define VMS				/* Doesn't work			*/
X
X
X/*
X**  A dense section of one-line compilation controls.  If you're confused,
X**  your best bet is to search through the source to see where and how
X**  each one of these is used.
X*/
X#define IDX		index		/* Maybe strchr?		*/
X#define RDX		rindex		/* Maybe strrchr?		*/
X#define NEED_CTERMID			/* Don't have ctermid(3)?	*/
X/*efine NEED_MKDIR			/* Don't have mkdir(2)?		*/
X/*efine UNOS_MKDIR			/* Use makedir, not mkdir?	*/
X#define NEED_QSORT			/* Don't have qsort(3)?		*/
X#define NEED_GETOPT			/* Don't have getopt(3)?	*/
X#define NEED_STRERROR			/* Don't have strerror(3)?	*/
X#define HAVE_SYSTEM			/* Have system(3)?		*/
X/*efine CAN_POPEN			/* Can invoke file(1) command?	*/
X#define USE_MY_SHELL			/* Don't popen("/bin/sh")?	*/
X/*efine void		int		/* If you don't have void	*/
X/*pedef void		 sigret_t;	/* What a signal handler returns */
Xtypedef int		 sigret_t;	/* What a signal handler returns */
Xtypedef int		*align_t;	/* Worst-case alignment, for lint */
X/*pedef long		time_t		/* Needed for non-BSD sites?	*/
X/*pedef long		off_t		/* Needed for non-BSD sites?	*/
X/*efine SYS_WAIT			/* Have <sys/wait.h> and vfork?	*/
X/*efine HAS_VFORK			/* Have vfork but no <sys/wait.h> */
X#define USE_SYSTEM			/* Use system(3), not exec(2)?	*/
X#define USE_LONGJMP			/* Don't exit() within parser?	*/
X#define USE_SYSERRLIST			/* Have sys_errlist[], sys_nerr? */
X/*efine USE_GETPWUID			/* Use getpwuid(3)?		*/
X#define DEF_SAVEIT	TRUE		/* Save headers by default?	*/
X/*efine UNIX_FILES			/* stat(file) gives true size?	*/
X#define NAME_FORMAT	"%s%2.2d"	/* To get things like Part02	*/
X/*efine NAME_FORMAT	"%s%02.2d"	/* To get things like Part02	*/
X#define NUMB_FORMAT	"%02d"		/* To get things like 03	*/
X#define MANI_FORMAT	"%-25s %2d\t%s\n"	/* This should be safe	*/
X#define MAX_LEVELS	6		/* Levels for findsrc to walk	*/
X#define THE_TTY		"sys$input"	/* Maybe "con:" for MS-DOS?	*/
X#define RCSID				/* Compile in the RCS strings?	*/
X#define USERNAME	"Sombody"	/* Your name, if not in environ	*/
X#define PTR_SPRINTF			/* Need extern char *sprinf()?	*/
X/*efine DECLARE_PROTOTYPES		/* Use prototypes in our decls?	*/
X/*efine ANSI_HDRS			/* Use <stdlib.h>, etc.?	*/
X#define REGISTER	register	/* Do you trust your compiler?	*/
X#define PEDAGOGY			/* Advertise tools?		*/
X
X
X/*
X**  How do we test to see if a character is okay to pass to one of
X**  the macros in <ctype.h>?  Note that we never give it EOF.
X*/
X#define CTYPE(c)	(isascii((c)))	/* Common			*/
X/*efine CTYPE(c)	((c) > 0)	/* Less common			*/
X/*efine CTYPE(c)	(TRUE)		/* Uncommon			*/
X
X
X/*
X**  We often want to make a backup copy of a file (usually a manifest).
X**  The following sets of #define's control how the copying is done.
X*/
X/*efine BU_VIA_RENAME			/* Use rename call?		*/
X/*efine BU_VIA_LINK			/* Use link/unlink calls?	*/
X/*efine BU_VIA_COPY			/* Use fopen() and such?	*/
X#define BU_NONE				/* System has generations?	*/
X/*efine BU_PREFIX	"B-"		/* Instead of ".BAK" suffix?	*/
X/*efine BU_SUFFIX	".BAK"		/* Instead of "B-" prefix?	*/
X/*efine BU_NAME_LEN	50		/* For non-BSD filesystems	*/
X
X
X/*
X**  The programs create up to two temporary files at one time, using
X**  mktemp(3).  Decide where you want the files to go, and if you wanna
X**  use a special directory for them (see MakeTempName).
X*/
X#define TEMP_NAME1	"/tmp/csharXXXXXX"	/* Unix			*/
X#define TEMP_NAME2	"/tmp/csharXXXXXX"	/* Unix			*/
X/*efine TEMP_NAME1	"csharXXXXXX"		/* MS-DOS		*/
X/*efine TEMP_NAME2	"csharXXXXXX"		/* MS-DOS		*/
X/*efine TEMP_NAME1	"sys$login:csharXXXXXX"	/* VMS			*/
X/*efine TEMP_NAME2	"sys$login:csharXXXXXX"	/* VMS			*/
X#define TEMPSIZE	40		/* Size of temp file name	*/
X/*efine TEMPVAR		"TMPDIR"	/* Place for temp files		*/
X
X
X/*
X**  There are several ways to get the current machine name.  Enable just one
X**  of one of the following lines.
X*/
X/*efine GETHOSTNAME			/* Use gethostname(2) call	*/
X/*efine UNAME				/* Use uname(2) call		*/
X/*efine UUNAME				/* Invoke "uuname -l"		*/
X#define	WHOAMI		"sys$manager:host.txt"	/* Try /etc/whoami	*/
X/*efine HOST_STRING			/* Just use DEF_HOST		*/
X#define DEF_HOST	"SITE"		/* If all else fails		*/
X
X
X/*
X**  There are several different ways to get the current working directory.
X**  Enable just one of the following lines.
X*/
X#define GETWD				/* Use getwd(3) routine		*/
X/*efine GETCWD				/* Use getcwd(3) routine	*/
X/*efine PWDPOPEN			/* Invoke "pwd"			*/
X/*efine PWDGETENV	"PWD"		/* Get $PWD from environment	*/
X
X
X/*
X**  If you're a notes site, you might have to tweak these two #define's.
X**  If you don't care, then set them equal to something that doesn't
X**  start with the comment-begin sequence and they'll be effectively no-ops
X**  at the cost of an extra strcmp.  I've also heard of broken MS-DOS
X**  compilers that don't ignore slash-star inside comments!  Anyhow, for
X**  more details see unshar.c
X*/
X/*efine NOTES1		"/* Written "	/* This is what notes 1.7 uses	*/
X/*efine NOTES2		"/* ---"	/* This is what notes 1.7 uses	*/
X#define NOTES1		"$$"		/* This is a don't care		*/
X#define NOTES2		"$$"		/* This is a don't care		*/
X
X
X/*
X**  The findsrc program uses the readdir() routines to read directories.
X**  If your system doesn't have this interface, there are public domain
X**  implementations available for Unix from the comp.sources.unix archives,
X**  GNU has a VMS one inside EMACS, and this package comes with kits for
X**  MS-DOS and the Amiga.  Help save the world and use or write a readdir()
X**  package for your system!
X*/
X
X/* Now then, where did I put that header file?   Pick one. */
X#define IN_SYS_DIR			/* <sys/dir.h>			*/
X/*efine IN_SYS_NDIR			/* <sys/ndir.h>			*/
X/*efine IN_DIR				/* <dir.h>			*/
X/*efine IN_DIRECT			/* <direct.h>			*/
X/*efine IN_NDIR				/* "ndir.h"			*/
X/*efine IN_DIRENT			/* <dirent.h>			*/
X
X/*  What readdir() returns.  Must be a #define because of #include order. */
X#ifdef	IN_DIRENT
X#define DIRENTRY	struct dirent
X#else
X#define DIRENTRY	struct direct
X#endif	/* IN_DIRENT */
X
X
X/*
X**  Limits.  The shell parser can be compiled with some safety-checks.
X**  This includes creating too many files, or writing long ones, creating
X**  too many directories, overwriting existing files, etc.
X*/
X/*efine NAME_CHECK			/* Munge names of files?	*/
X/*efine PATH_CHECK			/* Check filenames in shars?	*/
X/*efine MAX_FOPENS	40		/* Max # of files/archive	*/
X/*efine MAX_LINES	1200		/* Max # of lines in a file	*/
X/*efine MAX_MKDIRS	10		/* Max directory depth		*/
X
X
X/*
X**  Congratulations, you're done!
X*/
END_OF_FILE
  if test 6748 -ne `wc -c <'config.vms'`; then
    echo shar: \"'config.vms'\" unpacked with wrong size!
  fi
  # end of 'config.vms'
fi
if test -f 'manipull.man' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'manipull.man'\"
else
  echo shar: Extracting \"'manipull.man'\" \(2108 characters\)
  sed "s/^X//" >'manipull.man' <<'END_OF_FILE'
X.TH MANIPULL 1L
X.\" $Header$
X.SH NAME
Xmanipull \- extract entries out of an existing manifest
X.SH SYNOPSIS
X.RS
X.na
X.ti -.5i
X.B manipull
X[
X.BI \-f\| #
X] [
X.BI \-h\| #
X] [
X.BI \-i\| name
X] [
X.B \-m
X] [
X.BI \-o\| name
X] [
X.B \-s
X] [
X.B \-v
X] file...
X.ad
X.RE
X.SH DESCRIPTION
X.I Manipull
Xreads an existing ``manifest'' (usually created and maintained by
X.IR makekit (1L))
Xand pulls the indicated entries out of it, making a new manifest.
X.PP
XA manifest consist of some header lines, followed by a series of lines
Xthat describe the files contained in the shell archives.
XEach line looks like this;
X.RS
Xfilename\ \ \ spaces\ \ \ optional-digits\ \ \ spaces\ \ \ text
X.RE
XFor more information on the interpretation of the file, see the
X.I makekit
Xdocumentation.
X.PP
XThe original manifest is read from the standard input.
XAn alternate input file may be given by using the ``\-i'' option.
XThe generated manifest will be sent to the standard output.
XAn alternate output file may be given by using the ``\-o'' option.
XThe ``\-m'' option is the same as giving the options
X\&``-iMANIFEST -oMANIFEST.NEW -h2'' and is commonly used when
Xreading existing manifests.
X.PP
XThe ``\-f'' option may be necessary if the original manifest
Xhas more than a couple of hundred lines.
XThe existance of this option can be taken as evidence that the program's
Xauthor is lazy.
XThe ``\-h'' option may be given to have the program skip the
Xindicated number of lines in the input before beginning parsing.
X.PP
XAfter all the options have been read, any remaining arguments are
Xtaken to be a list of files to extract from the manifest.
XIf a file named on the command line does not appear in the existing
Xmanifest, it is added to the new one, with a placeholder for both
Xthe archive number and the description.
X.PP
XAs it is processing,
X.I manipull
Xnormally prints a message to standard error when it adds a file that
Xisn't in the initial manifest, or when a file in that manifest is
Xomitted.
XThese messages may be suppressed by using the ``\-s'' option.
X.PP
XThe ``\-v'' option prints out the current version and exits.
X.SH "SEE ALSO"
Xmakekit(1L).
END_OF_FILE
  if test 2108 -ne `wc -c <'manipull.man'`; then
    echo shar: \"'manipull.man'\" unpacked with wrong size!
  fi
  # end of 'manipull.man'
fi
echo shar: End of archive 3 \(of 6\).
cp /dev/null ark3isdone
MISSING=""
for I in 1 2 3 4 5 6 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 6 archives.
    rm -f ark[1-9]isdone
else
    echo You still must unpack the following archives:
    echo "        " ${MISSING}
fi
exit 0

