[alt.sources] System V patches for sccs.c

woods@robohack.UUCP (08/12/89)

Several people have complained that making Eric Allman's sccs.c
programme work on UNIX System V is not an easy job.  That kind of
suprised me, 'cause I made it work on Xenix witht the broken MS
compiler in no time flat.  :-)

Anyhow, I recently picked up a current copy of sccs.c, (version 5.6)
as it is on the 4.3BSDtahoe freeware tape and re-did the port.  Here
are my patches, and a couple of useful hints.

Note the patches go beyond a simple port, and were sufficient to shut
up the noisy compiler on my 3B2 (CPLU4.1).  As such, don't be
surprised at the size of this patch.  It is still only ~1/3 of the size
of sccs.c.

WARNING: You will require a copy of <sysexits.h> (maintained by Eric
Allman!).  The one that comes with smail2.5 is not sufficient.  Of
course you can always cobble one up, with your own numbering scheme.  :-)

Note also I am using /usr/local/bin/diff (which is GNU diff) as the
diff programme.  You might want/have to change this.  In fact, I used
sccs and GNU diff to maintain my source and generate this patch!

Also note you will likely require Doug Gwyn's dirent package (or
something similar) if your OS is pre-SysVr3.

================================ CUT HERE ================================
#! /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 1 (of 1)."
# Contents:  Makefile Patch.sV cshrc kshrc
# Wrapped by woods@robohack on Fri Aug 11 16:33:35 1989
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'Makefile' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Makefile'\"
else
echo shar: Extracting \"'Makefile'\" \(117 characters\)
sed "s/^X//" >'Makefile' <<'END_OF_FILE'
XCFLAGS=-I../head -DSYSV -DSYSVR3 -DUIDUSER -O 
XLIBS=
X
Xsccs: sccs.c
X	$(CC) $(CFLAGS) $(LFLAGS) -o sccs sccs.c $(LIBS)
END_OF_FILE
if test 117 -ne `wc -c <'Makefile'`; then
    echo shar: \"'Makefile'\" unpacked with wrong size!
fi
# end of 'Makefile'
fi
if test -f 'Patch.sV' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Patch.sV'\"
else
echo shar: Extracting \"'Patch.sV'\" \(11227 characters\)
sed "s/^X//" >'Patch.sV' <<'END_OF_FILE'
X
X------- sccs.c -------
X*** Standard Input	Wed Dec 31 19:00:00 1969
X--- sccs.c	Fri Aug 11 16:12:56 1989
X***************
X*** 24,39 ****
X  
X  #ifndef lint
X  static char sccsid[] = "@(#)sccs.c	5.6 (Berkeley) 6/29/88";
X  #endif /* not lint */
X  
X  # include <stdio.h>
X  # include <sys/param.h>
X  # include <sys/stat.h>
X! # include <sys/dir.h>
X  # include <errno.h>
X  # include <signal.h>
X  # include <sysexits.h>
X  # include <pwd.h>
X  
X  /*
X  **  SCCS.C -- human-oriented front end to the SCCS system.
X--- 24,62 ----
X  
X  #ifndef lint
X  static char sccsid[] = "@(#)sccs.c	5.6 (Berkeley) 6/29/88";
X+ static char local_sccsid[] = "@(#)sccs.c	1.1.1.1\t89/07/25 21:48:33 ";
X  #endif /* not lint */
X  
X  # include <stdio.h>
X  # include <sys/param.h>
X+ 
X+ #if defined(M_SYS5) || defined(SYSV)
X+ # include <sys/types.h>
X+ # include <varargs.h>
X+ #endif
X+ 
X  # include <sys/stat.h>
X! 
X! #if defined(M_XENIX)		/* really for 286 Xenix */
X! # include <sys/ndir.h>		/* some simulation of BSD */
X! #else /* !M_XENIX */
X! # ifdef SYSVR3
X! #   include <dirent.h>
X! # else /* !SYSVR3 */
X! #   if defined(BSD)
X! #     include <sys/dir.h>
X! #   else
X! #     include "dirent.h"	/* assume gwyn's dirent library */
X! #   endif /* BSD */
X! # endif /* SYSVR3 */
X! #endif /* M_XENIX */
X! 
X  # include <errno.h>
X  # include <signal.h>
X  # include <sysexits.h>
X  # include <pwd.h>
X+ # include <string.h>
X+ # include <malloc.h>
X  
X  /*
X  **  SCCS.C -- human-oriented front end to the SCCS system.
X***************
X*** 120,125 ****
X--- 143,153 ----
X  **
X  **	Compilation Instructions:
X  **		cc -O -n -s sccs.c
X+ **	For Xenix V 2.2.x:
X+ **		cc -Ms2e -O -F 4000 -i -o sccs sccs.c -lx
X+ **	For System V Release 3.x:
X+ **		cc -O -DSYSV -DSYSVR3 -o sccs sccs.c
X+ **
X  **		The flags listed above can be -D defined to simplify
X  **			recompilation for variant versions.
X  **
X***************
X*** 131,147 ****
X  
X  /*******************  Configuration Information  ********************/
X  
X  # ifndef SCCSPATH
X  # define SCCSPATH	"SCCS"	/* pathname in which to find s-files */
X! # endif NOT SCCSPATH
X  
X  # ifndef MYNAME
X  # define MYNAME		"sccs"	/* name used for printing errors */
X! # endif NOT MYNAME
X  
X  # ifndef PROGPATH
X! # define PROGPATH(name)	"/usr/local/name"	/* place to find binaries */
X! # endif PROGPATH
X  
X  /****************  End of Configuration Information  ****************/
X  
X--- 159,185 ----
X  
X  /*******************  Configuration Information  ********************/
X  
X+ #if defined(M_SYS5) || defined(SYSV)
X+ # define index	strchr
X+ # define rindex	strrchr
X+ # define VARARGS 1
X+ #endif /* SYSV */
X+ 
X+ #ifdef M_XENIX		/* STUPID compiler generates bad code! */
X+ # define register
X+ #endif /* M_XENIX */
X+ 
X  # ifndef SCCSPATH
X  # define SCCSPATH	"SCCS"	/* pathname in which to find s-files */
X! # endif /* NOT SCCSPATH */
X  
X  # ifndef MYNAME
X  # define MYNAME		"sccs"	/* name used for printing errors */
X! # endif /* NOT MYNAME */
X  
X  # ifndef PROGPATH
X! # define PROGPATH(name)	"/usr/bin/name"	/* place to find binaries */
X! # endif /* PROGPATH */
X  
X  /****************  End of Configuration Information  ****************/
X  
X***************
X*** 198,204 ****
X--- 236,244 ----
X  	"get",		PROG,	0,			PROGPATH(get),
X  	"help",		PROG,	NO_SDOT,		PROGPATH(help),
X  	"prs",		PROG,	0,			PROGPATH(prs),
X+ #if !defined(M_SYS5) && !defined(SYSV)
X  	"prt",		PROG,	0,			PROGPATH(prt),
X+ #endif /* SYSV */
X  	"rmdel",	PROG,	REALUSER,		PROGPATH(rmdel),
X  	"val",		PROG,	0,			PROGPATH(val),
X  	"what",		PROG,	NO_SDOT,		PROGPATH(what),
X***************
X*** 213,219 ****
X  	"tell",		CLEAN,	REALUSER|NO_SDOT,	(char *) TELLC,
X  	"unedit",	UNEDIT,	NO_SDOT,		NULL,
X  	"diffs",	DIFFS,	NO_SDOT|REALUSER,	NULL,
X! 	"-diff",	DODIFF,	NO_SDOT|REALUSER,	PROGPATH(bdiff),
X  	"print",	CMACRO,	0,			"prs -e/get -p -m -s",
X  	"branch",	CMACRO,	NO_SDOT,
X  		"get:ixrc -e -b/delta: -s -n -ybranch-place-holder/get:pl -e -t -g",
X--- 253,259 ----
X  	"tell",		CLEAN,	REALUSER|NO_SDOT,	(char *) TELLC,
X  	"unedit",	UNEDIT,	NO_SDOT,		NULL,
X  	"diffs",	DIFFS,	NO_SDOT|REALUSER,	NULL,
X! 	"-diff",	DODIFF,	NO_SDOT|REALUSER,	"/usr/local/bin/diff",
X  	"print",	CMACRO,	0,			"prs -e/get -p -m -s",
X  	"branch",	CMACRO,	NO_SDOT,
X  		"get:ixrc -e -b/delta: -s -n -ybranch-place-holder/get:pl -e -t -g",
X***************
X*** 245,253 ****
X  # ifdef DEBUG
X  bool	Debug;			/* turn on tracing */
X  # endif
X  # ifndef V6
X  extern char	*getenv();
X! # endif V6
X  
X  extern char	*sys_siglist[];
X  
X--- 285,324 ----
X  # ifdef DEBUG
X  bool	Debug;			/* turn on tracing */
X  # endif
X+ 
X+ #if defined(M_SYS5) || defined(SYSV)
X+ static	char	*sys_siglist[NSIG+1] = {
X+ /* 0 */		"Not a valid signal!",
X+ /* SIGHUP */	"hangup",
X+ /* SIGINT */	"interrupt (rubout)",
X+ /* SIGQUIT */	"quit (ASCII FS)",
X+ /* SIGILL */	"illegal instruction (not reset when caught)",
X+ /* SIGTRAP */	"trace trap (not reset when caught)",
X+ /* SIGIOT */	"IOT instruction",
X+ /* SIGABRT */	"used by abort, replace SIGIOT in the future",
X+ /* SIGEMT */	"EMT instruction",
X+ /* SIGFPE */	"floating point exception",
X+ /* SIGKILL */	"kill (cannot be caught or ignored)",
X+ /* SIGBUS */	"bus error",
X+ /* SIGSEGV */	"segmentation violation",
X+ /* SIGSYS */	"bad argument to system call",
X+ /* SIGPIPE */	"write on a pipe with no one to read it",
X+ /* SIGALRM */	"alarm clock",
X+ /* SIGTERM */	"software termination signal from kill",
X+ /* SIGUSR1 */	"user defined signal 1",
X+ /* SIGUSR2 */	"user defined signal 2",
X+ /* SIGCLD */	"death of a child",
X+ /* SIGPWR */	"power-fail restart",
X+ /* SIGWIND */	"window change",
X+ /* SIGPHONE */	"handset, line status change",
X+ /* SIGPOLL */	"pollable event occured",
X+ };
X+ 
X+ #endif /* SYSV */
X+ 
X  # ifndef V6
X  extern char	*getenv();
X! # endif /* V6 */
X  
X  extern char	*sys_siglist[];
X  
X***************
X*** 299,306 ****
X  			SccsDir = buf;
X  		}
X  	}
X! # endif SCCSDIR
X! # endif V6
X  
X  	/*
X  	**  Detect and decode flags intended for this program.
X--- 370,377 ----
X  			SccsDir = buf;
X  		}
X  	}
X! # endif /* SCCSDIR */
X! # endif /* V6 */
X  
X  	/*
X  	**  Detect and decode flags intended for this program.
X***************
X*** 577,582 ****
X--- 648,660 ----
X  # ifndef V6
X  		execvp("diff", ap);
X  # endif
X+ #ifdef DEBUG
X+ 		if (Debug) {
X+ 			printf("command: DODIFF: execvp(%s)\n", cmd->sccspath);
X+ 			for (np = ap; *np != NULL; np++)
X+ 				printf("\t\"%s\"\n", *np);
X+ 		}
X+ #endif /* DEBUG */
X  		execv(cmd->sccspath, argv);
X  		syserr("cannot exec %s", cmd->sccspath);
X  		exit(EX_OSERR);
X***************
X*** 646,652 ****
X  		if (strcmp(cmd->sccsname, name) == 0)
X  			return (cmd);
X  	}
X! 	return (NULL);
X  }
X  
X  /*
X--- 724,730 ----
X  		if (strcmp(cmd->sccsname, name) == 0)
X  			return (cmd);
X  	}
X! 	return ((struct sccsprog *) NULL);
X  }
X  
X  /*
X***************
X*** 808,813 ****
X--- 886,895 ----
X  	extern bool isdir();
X  	register char *q;
X  
X+ #ifdef DEBUG
X+ 	if (Debug)
X+ 		printf("makefile:\n\tbefore: \"%s\"\n", name);
X+ #endif /* DEBUG */
X  	p = rindex(name, '/');
X  	if (p == NULL)
X  		p = name;
X***************
X*** 822,828 ****
X  	*/
X  
X  	if (SccsDir[0] == '/' && !safepath(name))
X! 		return (NULL);
X  
X  	/*
X  	**  Create the base pathname.
X--- 904,910 ----
X  	*/
X  
X  	if (SccsDir[0] == '/' && !safepath(name))
X! 		return ((char *) NULL);
X  
X  	/*
X  	**  Create the base pathname.
X***************
X*** 855,860 ****
X--- 937,946 ----
X  		gstrcat(buf, p, sizeof(buf));
X  	}
X  
X+ #ifdef DEBUG
X+ 	if (Debug)
X+ 		printf("makefile:\n\tp = \"%s\" buf = \"%s\"\n", p, buf);
X+ #endif /* DEBUG */
X  	/* if i haven't changed it, why did I do all this? */
X  	if (strcmp(buf, name) == 0)
X  		p = name;
X***************
X*** 869,874 ****
X--- 955,964 ----
X  		}
X  		strcpy(p, buf);
X  	}
X+ #ifdef DEBUG
X+ 	if (Debug)
X+ 		printf("makefile:\n\tafter: \"%s\"\n", p);
X+ #endif /* DEBUG */
X  
X  	return (p);
X  }
X***************
X*** 958,964 ****
X--- 1048,1058 ----
X  	int mode;
X  	char **argv;
X  {
X+ #if !defined(SYSVR3)
X  	struct direct *dir;
X+ #else
X+ 	struct dirent *dir;
X+ #endif
X  	char buf[FBUFSIZ];
X  	char *bufend;
X  	register DIR *dirp;
X***************
X*** 1321,1327 ****
X--- 1415,1425 ----
X  	register int pid;
X  	auto int st;
X  	extern int errno;
X+ #if !defined(SYSV)
X  	int (*osig)();
X+ #else
X+ 	void (*osig)();
X+ #endif
X  
X  	printf("\n------- %s -------\n", gfile);
X  	fflush(stdout);
X***************
X*** 1413,1419 ****
X  	extern char *nextfield();
X  
X  	if (fgets(buf, sizeof buf, pfp) == NULL)
X! 		return (NULL);
X  
X  	ent.p_osid = p = buf;
X  	ent.p_nsid = p = nextfield(p);
X--- 1511,1517 ----
X  	extern char *nextfield();
X  
X  	if (fgets(buf, sizeof buf, pfp) == NULL)
X! 		return ((struct pfile *) NULL);
X  
X  	ent.p_osid = p = buf;
X  	ent.p_nsid = p = nextfield(p);
X***************
X*** 1431,1443 ****
X  	register char *p;
X  {
X  	if (p == NULL || *p == '\0')
X! 		return (NULL);
X  	while (*p != ' ' && *p != '\n' && *p != '\0')
X  		p++;
X  	if (*p == '\n' || *p == '\0')
X  	{
X  		*p = '\0';
X! 		return (NULL);
X  	}
X  	*p++ = '\0';
X  	return (p);
X--- 1529,1541 ----
X  	register char *p;
X  {
X  	if (p == NULL || *p == '\0')
X! 		return ((char *) NULL);
X  	while (*p != ' ' && *p != '\n' && *p != '\0')
X  		p++;
X  	if (*p == '\n' || *p == '\0')
X  	{
X  		*p = '\0';
X! 		return ((char *) NULL);
X  	}
X  	*p++ = '\0';
X  	return (p);
X***************
X*** 1482,1488 ****
X--- 1580,1604 ----
X  **		none.
X  */
X  
X+ #ifdef VARARGS
X  /*VARARGS1*/
X+ usrerr(va_alist)
X+ 	va_dcl
X+ {
X+ 	va_list	args;
X+ 	char	*fmt;
X+ 
X+ 	va_start(args);
X+ 	(void) fprintf(stderr, "%s: ", MyName);
X+ 	fmt = va_arg(args, char *);
X+ 	(void) vfprintf(stderr, fmt, args);
X+ 	va_end(args);
X+ 	(void) fprintf(stderr, "\n");
X+ 
X+ 	return (-1);
X+ }
X+ #else /* not VARARGS */
X+ /*VARARGS1*/
X  usrerr(f, p1, p2, p3)
X  	char *f;
X  {
X***************
X*** 1492,1497 ****
X--- 1608,1614 ----
X  
X  	return (-1);
X  }
X+ #endif /* VARARGS */
X  
X  /*
X  **  SYSERR -- print system-generated error.
X***************
X*** 1507,1512 ****
X--- 1624,1653 ----
X  **		none.
X  */
X  
X+ #ifdef VARARGS
X+ /*VARARGS1*/
X+ syserr(va_alist)
X+ 	va_dcl
X+ {
X+ 	extern int errno;
X+ 
X+ 	va_list	args;
X+ 	char	*fmt;
X+ 
X+ 	va_start(args);
X+ 	(void) fprintf(stderr, "%s: SYSERR: ", MyName);
X+ 	fmt = va_arg(args, char *);
X+ 	(void) vfprintf(stderr, fmt, args);
X+ 	va_end(args);
X+ 	(void) fprintf(stderr, "\n");
X+ 	if (errno == 0)
X+ 		exit(EX_SOFTWARE);
X+ 	else {
X+ 		perror("");
X+ 		exit(EX_OSERR);
X+ 	}
X+ }
X+ #else /* not VARARGS */
X  /*VARARGS1*/
X  syserr(f, p1, p2, p3)
X  	char *f;
X***************
X*** 1520,1529 ****
X  		exit(EX_SOFTWARE);
X  	else
X  	{
X! 		perror(NULL);
X  		exit(EX_OSERR);
X  	}
X  }
X  /*
X  **  USERNAME -- return name of the current user
X  **
X--- 1661,1671 ----
X  		exit(EX_SOFTWARE);
X  	else
X  	{
X! 		perror((char *) NULL);
X  		exit(EX_OSERR);
X  	}
X  }
X+ #endif /* VARARGS */
X  /*
X  **  USERNAME -- return name of the current user
X  **
X***************
X*** 1555,1565 ****
X  	extern char *getlogin();
X  	register char *p;
X  
X  	p = getenv("USER");
X  	if (p == NULL || p[0] == '\0')
X  		p = getlogin();
X  	return (p);
X! # endif UIDUSER
X  }
X  
X  /*
X--- 1697,1711 ----
X  	extern char *getlogin();
X  	register char *p;
X  
X+ #  if defined(M_SYS5) || defined(SYSV)
X+ 	p = getenv("LOGNAME");
X+ #  else
X  	p = getenv("USER");
X+ #  endif
X  	if (p == NULL || p[0] == '\0')
X  		p = getlogin();
X  	return (p);
X! # endif /* UIDUSER */
X  }
X  
X  /*
END_OF_FILE
if test 11227 -ne `wc -c <'Patch.sV'`; then
    echo shar: \"'Patch.sV'\" unpacked with wrong size!
fi
# end of 'Patch.sV'
fi
if test -f 'cshrc' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'cshrc'\"
else
echo shar: Extracting \"'cshrc'\" \(3661 characters\)
sed "s/^X//" >'cshrc' <<'END_OF_FILE'
X#
X#	@(#) cshrc.src 1.3 87/01/21 
X#
X# woods@cpcc : Mon Sep 14 13:24:22 EDT 1987
X#	Enhanced.  Added pwd to prompt, and more interactive aliases.
X#
X
Xset noclobber				# don't allow '>' to overwrite
Xif ($?prompt) then
X	stty erase ^h kill ^u echoe
X	alias areacode	'look "\!:1 " /usr/pub/AreaCodes'
X	alias cd	'chdir \!* ; setprompt'
X	alias ci	'sccs delget \!*'
X	alias clear	'tput clear'
X	alias co	'sccs edit \!*'
X	alias cua	'cu -l tty1a dir'
X	alias ds	'$PAGER'
X	alias e		'$VISUAL'
X	alias ealias	'e ~/.cshrc'
X	alias ee	'e -p Errors'
X	alias f		'who -HubrtT'
X	alias file	'/usr1/local/bin/file'
X#	alias flipd	'pushd .; swapd ; popd'
X	alias ge	'sccs edit \!*; e \!*'
X	alias h		history
X	alias l		/bin/ls -CF
X	alias la	/bin/ls -aCF
X	alias ll	/bin/ls -lis
X	alias lla	/bin/ls -lisa
X	alias llr	/bin/ls -lisR
X	alias llra	/bin/ls -lisaR
X	alias lr	/bin/ls -CFR
X	alias lra	/bin/ls -aCFR
X	alias mail	mush -C
X	alias maillog	ds /usr/spool/uucp/mail.log
X	alias malias	'grep "alias \!*" /usr/lib/mush/Mail.rc'
X	alias mk	'env SHELL=/bin/sh make \!* |& tee Errors'
X	alias mka	'env SHELL=/bin/sh make \!* |& tee -a Errors'
X	alias mkalint	'env SHELL=/bin/sh make \!* lint |& tee -a Lint.out'
X	alias mkbg	'sh -c "nohup make \!*" & sleep 2 ; mv nohup.out Errors'
X	alias mklintbg	'sh -c "nohup make \!* lint" & sleep 2 ; mv nohup.out Lint'
X	alias mkd	'env SHELL=/bin/sh make DEBUG=-DDEBUG \!* |& tee Errors'
X	alias mkda	'env SHELL=/bin/sh make DEBUG=-DDEBUG \!* |& tee -a Errors'
X	alias mkdbg	'sh -c "nohup make DEBUG=-DDEBUG \!*" & sleep 2 ; mv nohup.out Errors'
X	alias mkdlintbg	'sh -c "nohup make DEBUG=-DDEBUG \!* lint" & sleep 2 ; mv nohup.out Lint'
X	alias mkdp	'env SHELL=/bin/sh make DEBUG="-DDEBUG -p" \!* |& tee Errors'
X	alias mkdpa	'env SHELL=/bin/sh make DEBUG="-DDEBUG -P" \!* |& tee -a Errors'
X	alias mkdalint	'env SHELL=/bin/sh make \!* DEBUG="-DDEBUG" lint |& tee -a Lint.out'
X	alias mkdlint	'env SHELL=/bin/sh make DEBUG=-DDEBUG \!* lint |& tee Lint.out'
X	alias mklint	'env SHELL=/bin/sh make \!* lint |& tee Lint.out'
X	alias mkp	'env SHELL=/bin/sh make DEBUG=-p \!* |& tee Errors'
X	alias mkpa	'env SHELL=/bin/sh make DEBUG=-p \!* |& tee -a Errors'
X	alias mksccs	'sccs enter -fb \!*'
X	alias opr	'pr -w132 \!* | lp -ob -of'
X	alias popd	'popd \!* ; setprompt'
X	alias psa	'ps -af \!* | sort +1n'
X	alias pse	'ps -ef \!* | sort +1n'
X	alias psf	'ps -f \!* | sort +1n'
X	alias pushd	'pushd \!* ; setprompt'
X	alias realias	'source ~/.cshrc'
X	alias rm	'mv \!* $HOME/tmp'
X	alias rstty	'stty sane erase ^h kill ^u echoe echok cs8 tab3; tput init'
X	alias setprompt 'set prompt="($TTY)<$LOGNAME@$UUNAME>[$CSHLEV.\\!] $cwd $prompt_char "'
X	alias sig	'grep "\!*" /usr/include/sys/signal.h'
X	alias signo	'/bin/echo "/\!*/ {print \c" > /tmp/$$awk; /bin/echo '\\\$'\\\c >> /tmp/$$awk; /bin/echo "3}" >> /tmp/$$awk; awk -f /tmp/$$awk /usr/include/sys/signal.h; /bin/rm /tmp/$$awk'
X#	alias swapd	'set _d = ($_d[2] $_d[1] $_d[3-])'
X	alias typeof	'grep "\!*" /usr/lib/llib-l*'
X	alias uuq	'uustat -a \!*'
X	alias vadmin	'sccs admin \!*'
X	alias vcheck	'sccs check \!*'
X	alias vdiff	'sccs diffs \!*'
X	alias vfix	'sccs fix \!*'
X	alias vget	'sccs get \!*'		# same as co
X	alias vinfo	'sccs info \!*'
X	alias vprint	'sccs print \!*'
X	alias vprs	'sccs prs \!*'
X	alias vtell	'sccs tell \!*'
X	alias vunedit	'sccs unedit \!*'
X	alias which	'alias | /usr1/local/bin/which -i'
X	if ($?CSHLEV) then
X		@ CSHLEV = $CSHLEV + 1
X	else
X		setenv CSHLEV 	0
X	endif
X	if ($LOGNAME == "root") then
X		set prompt_char='#'
X	else
X		set prompt_char='%'
X	endif
X	set cdpath = ( . $HOME $HOME/src $HOME/src/lib $HOME/src/cmd /usr1/local /usr1/local/src /usr1/local/src/lib /usr/src /usr/src/lib /usr /usr/lib / )
X	set history = 1000
Xendif
END_OF_FILE
if test 3661 -ne `wc -c <'cshrc'`; then
    echo shar: \"'cshrc'\" unpacked with wrong size!
fi
# end of 'cshrc'
fi
if test -f 'kshrc' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'kshrc'\"
else
echo shar: Extracting \"'kshrc'\" \(1026 characters\)
sed "s/^X//" >'kshrc' <<'END_OF_FILE'
X#
X#	aliases and functions for ksh and friends
X#
X
X# ci and co will really confuse you if you also use RCS
X#
Xalias ci='sccs delget'
Xalias co='sccs edit'
Xalias vadmin='sccs admin'
Xalias vcheck='sccs check'
Xalias vdeled='sccs deledit'
Xalias vdeledit='sccs deledit'
Xalias vdelta='sccs delta'
Xalias vdiff='sccs diffs'
Xalias venter='sccs enter'
Xalias vfix='sccs fix'
Xalias vget='sccs get'
Xalias vhelp='sccs help'
Xalias vinfo='sccs info'
Xalias vlist='ls -CF SCCS'
Xalias vlog='sccs prs'
Xalias vprint='sccs print'
Xalias vprs='sccs prs'
Xalias vrdiff='sccs sccsdiff'
Xalias vrmdel='sccs rmdel'
Xalias vtell='sccs tell'
Xalias vunedit='sccs unedit'
Xalias vunget='sccs unget'
X
Xfunction ge
X{
X	sccs edit $*
X
X	# of course we should strip out options like -t and -r, etc.
X	#
X	${VISUAL:-${EDITOR:-ed}} $*
X}
X
Xfunction mksccs
X{
X	# perhaps there should be some default flags in $SCCSADMINFLAGS
X	#
X	sccs enter -fb $*
X
X	# I almost always have an rm function that does this too.
X	#
X	if [ ! -d $HOME/tmp ] ; then
X		 mkdir $HOME/tmp
X	fi
X	mv ,* $HOME/tmp
X}
END_OF_FILE
if test 1026 -ne `wc -c <'kshrc'`; then
    echo shar: \"'kshrc'\" unpacked with wrong size!
fi
# end of 'kshrc'
fi
echo shar: End of archive 1 \(of 1\).
cp /dev/null ark1isdone
MISSING=""
for I in 1 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have the archive.
    echo "Apply the patch to version 5.6 of the BSD sccs.c source,\
	edit the Makefile, and run make."
    rm -f ark[1-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0
-- 
						Greg A. Woods

woods@{robohack,gate,tmsoft,ontmoh,utgpu,gpu.utcs.Toronto.EDU,utorgpu.BITNET}
+1-416-443-1734 [h]	+1-416-595-5425 [w]	Toronto, Ontario;  CANADA