Commits

lan Nomar committed bd0e094

Added everything, version 1.7.2 (Quanstrom)

Comments (0)

Files changed (69)

+The current maintainer of rc is Tim Goodwin <tjg@star.le.ac.uk>.  Please
+send all bug reports to him.
+
+This shell was written by me, Byron Rakitzis, but kudos go to Paul Haahr
+for letting me know what a shell should do and for contributing certain
+bits and pieces to rc (notably the limits code, print.c, most of which.c
+and the backquote redirection code), and to Hugh Redelmeier for running
+rc through his fussy ANSI compiler and thereby provoking interesting
+discussions about portability, and also for providing many valuable
+suggestions for improving rc's code in general.  Finally, many thanks
+go to David Sanderson, for reworking the man page to format well with
+troff, and for providing many suggestions both for rc and its man page.
+
+Thanks to Boyd Roberts for the original history.c, and to Hugh again for
+re-working parts of that code.
+
+Of course, without Tom Duff's design of the original rc, I could not
+have written this shell (though I probably would have written *a*
+shell).  Almost all of the features, with minor exceptions, have been
+implemented as described in the Unix v10 manuals.  Hats off to td for
+designing a C-like, minimal but very useful shell.
+
+Tom Duff has kindly given permission for the paper he wrote for UKUUG to
+be distributed with this version of rc (called "plan9.ps" in the same
+FTP or HTTP directory as the shell).  Please read this paper bearing in
+mind that it describes a program that was written at AT&T and that the
+version of rc presented here differs in some respects.
+
+Tim would like to thank these people for their contributions since he
+took over maintenance of rc.  Aharon Robbins, Arvid Requate, Bengt
+Kleberg, Brynjulv Hauksson, Byron Rakitzis, Callum Gibson, Chris
+Siebenmann, Dale Scheetz, Dan Moniz, David Luyer, David Swasey,
+Decklin Foster, Donn Cave, Erik Quanstrom, Gary Carvell, Gerry
+Tomlinson, Gert-Jan Vons, Ian Lance Taylor, Jeremy Fitzhardinge, Marc
+Moorcroft, Mark H Wilkinson, Mark K Gardner, Raymond Venneker, Rich
+$alz, Rob Savoye, Scott Schwartz, Stefan Dalibor, Steve Simon, Thomas
+Nordin, Tom Culliton, Tom Tromey, Vincent Broman, Wolfgang Zekoll.
+/*
+ * Copyright 1991, 2001, 2002 by Byron Rakitzis.  All rights reserved.
+ *
+ * This software is not subject to any license of the American Telephone
+ * and Telegraph Company or of the Regents of the University of California.
+ *
+ * Permission is granted to anyone to use this software for any purpose on
+ * any computer system, and to alter it and redistribute it freely, subject
+ * to the following restrictions:
+ *
+ * 1. The author is not responsible for the consequences of use of this
+ *    software, no matter how awful, even if they arise from flaws in it.
+ *
+ * 2. The origin of this software must not be misrepresented, either by
+ *    explicit claim or by omission.  Since few users ever read sources,
+ *    credits must appear in the documentation.
+ *
+ * 3. Altered versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.  Since few users
+ *    ever read sources, credits must appear in the documentation.
+ *
+ * 4. This notice may not be removed or altered.
+ *
+ *    [this copyright notice is adapted from Henry Spencer's
+ *    "awf" copyright notice.]
+ */
+Changes since 1.2: (Too many to count!)
+
+A memory stomping bug was fixed (provoked by assigning a variable
+to its old value plus something else).
+
+Better signal handling; a real signal handler which manages a queue
+of pending signals was added.
+
+rc now ignores SIGQUIT and traps SIGINT even in non-interactive
+mode. Thus,
+
+	rc ed.sh
+
+will not do mysterious things if the shell script "ed.sh" calls a
+command like "ed" and then you hit ^C.
+
+rc now opens 0, 1, 2 on /dev/null if they are inherited closed.
+rc -o prevents this.
+
+A couple of stupid O(n^2) string appends were replaced with O(n)
+loops. This should make foo=`{cat /etc/termcap} bar=$^foo a little
+faster :-)
+
+Returning a list of signals from a function is now legal, so "return
+$status" should always work.
+
+The code has been revised, new printing routines have been added.
+
+rc no longer uses redundant braces when exporting functions.
+
+A first stab at a verification suite has been added (trip.rc).
+(someone, please help me make this comprehensive!)
+
+rc -p now does not initialize functions from the environment. This
+should make it easier to write shell scripts that don't need to
+assume anything about the environment.
+
+Inherited ignored signals are now ignored in the current shell and
+passed on ignored to the child processes. whatis -s also reflects
+this information.
+
+A file descriptor leak in the /dev/fd implementation of >{} was
+fixed.
+
+A variable set to '' was not imported from the environment; this
+has been fixed.
+
+Changes since 1.3beta:
+
+New Makefile/config.h setup.
+
+builtin echo may now be conditionally included out, to use a Goldwynism.
+
+builtin exit takes any legal exit status. If the status is not all zeros,
+rc exits with 1. (having "exit sigiot" produce a core dump would be going
+a little far, I think.)
+
+limit does not append a unit after a zero limit; 0g was too confusing.
+
+exec > /nonexistentfile does not cause rc to exit any more.
+
+If a noninteractive rc is started with sigint ignored, rc does not install
+its own signal handler.
+
+error messages produced by rc in a subshell were cleaned up. (rc erroneously
+reset the 'interactive' flag after a fork)
+
+print.c was cleaned up a little; no functionality was changed, but should
+be more portable now.
+
+a bug in rc-1.3beta (not previous versions) was fixed: setting the first
+element of $path to '' caused PATH to be exported as '':etc..
+
+getopt's "illegal option" message was gratuitously changed to something
+less abrupt.
+
+some dead code was removed from input.c
+
+%term was changed to %token in parse.y; apparently newer yacc's don't grok
+%term any more.
+
+a race condition in the signal handler was fixed.
+
+the variable in for() was getting evaluated each time through the loop
+(e.g., for (`{echo i;date>[1=2]} in 1 2 3)echo $i would print the date
+three times). This was cleaned up.
+
+a redundant fork() was removed from walk.c; this showed up when running
+a braced command with a redirection in the background. e.g., {a;b}>c&
+
+man pages for history and rc were cleaned up by david (thanks).
+
+rc set SIGQUIT and SIGTERM to SIG_DFL on background jobs---even when
+trying to do old-style backgrounding (i.e., don't use process groups,
+just ignore SIGINT & SIGQUIT & SIGTERM).
+
+$0 is now changed to the name of the signal when entering a signal
+handler. Thus it's possible to write code like
+
+	fn sigint sigterm sigquit {
+		switch ($0) {
+		case sigint
+			...
+		case sigterm
+			...
+
+wait with no arguments now prints the pid of any and all children
+that died with a signal. e.g.,
+
+	; wait
+	25321: terminated
+	25325: terminated
+
+as opposed to
+
+	; wait
+	terminated
+
+An error saving/restoring state in the input stream code would
+cause rc to exit with the (erroneous) command:
+
+	eval '|[a'
+
+FIFO's were not removed in a backgrounded command, e.g.,
+
+	cat <{echo hi}&
+
+Changes since rc-1.4beta:
+
+getopt was renamed to rc_getopt to avoid libc collisions.
+
+$cdpath with a / in it caused a cd to sometimes have two //'s at the
+front of the path. This is reserved by POSIX, so I changed it to skip
+one of the /'s.
+
+signal handling now emulates sh in the way I described in a previous
+message: the race condition present in older rc's whereby some SIGINTs
+got lost is now gone; any SIGINT received during a wait() is acted upon
+at the end of the wait(), unless of course SIGINT is being deliberately
+ignored.
+
+getopt was renamed to avoid naming conflicts with libc. Also a sound
+move since rc_getopt is no longer quite libc-getopt compatible; I had
+to add in a mechanism for resetting getopt.
+
+signal handler code in fn.c was cleaned up; there were several bugs
+in rc-1.4beta, notably the shell sometimes spawned background jobs
+with SIGTERM ignored. I took the opportunity to make things a little
+cleaner here.
+
+a quasi-memory leak in the code for while() was fixed: a long-running
+while that had rc commands allocating memory in it could cause the
+shell to grow without bounds. I fixed this by placing the while loop
+(*and* test!) inside a new allocation arena each time through the loop.
+
+A new configuration parameter, NOJOB, was added to allow you to force
+v7-style backgrounding (no setpgrp, ignore SIGINT and SIGTERM).
+
+The FIFO code was reworked a little. It should be more robust now---
+FIFOs get removed at the end of the command of the argument list
+that they were on:
+
+		fn foo {echo $*; cat $*}
+		foo<{echo hi}
+
+now works as expected. Also FIFO names are pushed onto the exception
+stack so that their removal occurs in the face of exceptions and so
+on.
+
+A memory leak in treefree() was plugged up --- the root node of a
+function was not getting freed.
+
+Changes since rc-1.4:
+
+General changes:
+
+        Some small memory leaks/uninit references revealed by Purify.
+
+        $bqstatus for querying the exit status of a backquote.
+
+        Globbing through unreadable directories.
+
+        More options to whatis.
+
+        History append which always re-opens the file (avoids
+        inconsistencies over multiple NFS-mounted accesses to
+        $history).
+
+        Support "rc -s".
+
+---------
+
+Makefile:	Added comment referring to README for yacc/malloc problem.
+
+uiltins.c:	Added more options to whatis, protected rlimit prototypes
+		with #ifndef SYSVR4, renamed SIGCHK to sigchk.
+
+except.c:	Patched nl_on_intr printing to happen only in interactive
+		shells.
+
+exec.c:		Added comment explaining nl_on_intr variable, renamed SIGCHK
+		to sigchk.
+
+fn.c:		Replaced by-hand consing of exception stack etc. for signal
+		handler execution with call to funcall(). Replaced fun2str
+		call with call on print routines.
+
+footobar.c:	Got rid of memory leak in get_name(), parenthesize count,
+		flat and var nodes for correctness in unparsing, removed
+		list2str, made get_name use nalloc space, merge in a
+		better parse_var from es.
+
+glob.c:		Split out a test so that closedir is called correctly, renamed
+		SIGCHK to sigchk.
+
+glom.c:		Added bqstatus, renamed SIGCHK to sigchk, removed spurious
+		setsigdefaults, patched uninit memory reference, rename
+		"clear" to "memzero", wait for bq subproc to finish on EINTR.
+
+hash.c:		Added options to function/variable print code.
+
+history/history.c: Added '@' to the list of chars which can precede an
+		ignored '-'.
+
+input.c:	Got rid of tiny memory leak in closefds, got rid of uninit
+		memory reference in popinput, moved nul ignored check into
+		realgchar(), changed history append to always reopen the
+		history file, replaced SIGCHK with sigchk. Freed memory
+		returned by call to readline().
+
+lex.c:		Corrected typo in comment, moved nul character ignore code
+		to input routines.
+
+main.c:		Added -s flag.
+
+nalloc.c:	Added convenience feature to erealloc. (Allow NULL parameter)
+
+print.c:	Changed use of va_start so broken compilers can compile
+		print code.
+
+proto.h:	Added fake memset.
+
+rc.h:		Replaced clear() function prototype with a macro call on
+		memset(), removed SIGCHK, fixed prototypes.
+
+signal.c:	Removed unconditional exit in catcher code, renamed SIGCHK
+		to sigchk.
+
+status.c:	Rewrite sgetstatus breaking out strstatus so that bqstatus
+		can be set from glom routines.
+
+utils.c:	Got rid of clear() (use memset from C library), rename SIGCHK
+		to sigchk.
+
+var.c:	 	Got rid of memory leak in listassign(), converted list2str()
+		call to something using the print routines.
+
+version.c:	New version string.
+
+wait.c:		Got rid of memory leak in rc_fork, renamed SIGCHK to sigchk.
+
+walk.c:		Fixed pre-redirection bug, removed spurious setsigdefaults(),
+		renamed SIGCHK to sigchk.
+
+
+Changes since rc-1.5beta1
+
+  Configuration: rc now uses GNU autoconf.
+
+  Portability: mksignal works on HPUX 10.
+
+  Portability: resources can be (quad_t).
+
+  Bug: if rc was started with SIGCLD == SIG_IGN (e.g. by Solaris's
+  rshd) it would loop.  Fixed by resetting SIGCLD to SIG_DFL if it
+  was SIG_IGN when rc was started.
+
+  Portability: POSIXish systems don't have NGROUPS.
+
+Changes since rc-1.5b2
+
+  Configuration: rc now uses GNU automake.
+
+  Portability: use sigsetjmp() when available.
+
+  Portability: improve tests for quad_t.
+
+  Configuration: don't leave FIFOs in /tmp when configuring.
+
+  Configuration: let configure find `-ltermcap' when using readline.
+
+  Configuration: pick up default path from config.cache.
+
+  Bug: sense of most HAVE_RESTARTABLE_SYSCALLS tests was wrong.
+
+  Bug: print prompts with `-i', even with editline / readline.
+
+  Testing: just say `false' (not `/bin/false').
+
+  Bug: confusion over gid_t versus GETGROUPS_T in which.c.
+
+  Feature: `-V' option added to report version number.
+
+  Configuration: remove version.c; `id' is defined in main.c now.
+
+  Bug: clear list of living children after fork(); `{ ls & wait } |cat'
+  no longer hangs or panics.
+
+  Testing: add regression test for above.
+
+  Tidiness: all the system call wrappers to prevent calls being
+  restarted now live in system-bsd.c.  The configure script decides
+  whether to build system.c or system-bsd.c.  Also, signal.c is more
+  careful to only declare slowbuf if it will be needed.
+
+  Tidiness: similarly, configure decides whether to build execve.c or
+  not.
+
+  Portability: test for ssize_t and use it where available; use long if
+  there's no ssize_t.
+
+  Portability: use sigsetjmp where it's available and appropriate.  If
+  no sigsetjmp, just use sigjmp; this probably fails in a traditional
+  SysV environment.
+
+  Portability: test explicitly for SysV SIGCLD semantics.  Main (and
+  dubious) benefit is that you can now define a function called `sigcld'
+  on systems where there is no signal called SIGCLD!
+
+  Bug: rc has its own memory allocator; don't use malloc directly.
+
+  Bug: the rc_wait() wrapper is only needed on systems which restart
+  system calls.  On Linux, in particular, the wrapper leads to a race
+  which causes rc to hang (or panic in later versions).  Other systems
+  apparently don't exercise this race.
+
+  Bug: waitforall() must return if rc_wait4() returns with errno ==
+  EINTR.  Otherwise, the rc builtin `wait' cannot be interrupted if
+  there are background processes (although apparently only if there is a
+  handler for SIGINT).
+
+  Portability: dreadful hack to track down the real locations of
+  signal.h to find signal names. rc now builds under CygWin32!
+
+  Portability: replace above dreadful hack with mksignal.c, contributed
+  by Vincent Broman.
+
+  Portability: use POSIX wait() macros (WIFEXITED and friends).
+  Unfortunately, POSIX omitted to supply WIFDUMPED, so this doesn't buy
+  a great deal.
+
+  Distribution: remove the dependencies of y.tab.[ch] on parse.y from
+  Makefile.am.  The justification for this is that, unless you're
+  hacking on rc's grammar, there's no reason to use anything other
+  than the distributed files (which were generated with byacc and very
+  lightly edited to silence a few gcc warnings).
+
+  Enhancement: the example in addon.c wasn't very useful, since it
+  depended on files which weren't included with the distribution.  There
+  is now a working, if trivial, example.
+
+  Tidiness: the code was compiled with as many gcc warnings enabled as
+  I could find.  Very few problems turned up.  Some unused function
+  arguments were removed.  Where unused arguments could not be removed
+  (because the function is one of a set that must all have the same
+  prototype), they were renamed to `ignore'.
+
+  Portability: some versions of readline define the name `Function',
+  which rc also uses.  Its use in rc has been renamed to `rc_Function'.
+
+  Documentation: the `history' man page didn't explain what end of line
+  does in editing mode.  It now does.
+
+  Bug: the interaction with readline was broken, particularly with
+  respect to signal handling.  I've incorporated some changes from Tom
+  Culliton which should sort this out.  Unfortunately, we now have 3
+  different code paths for readline 2.1, readline 2.2, and editline :-(.
+
+  Configuration: if you say `--with-readline' or `--with-editline' it is
+  now an error if the appropriate library is not found.
+
+  Bug: rc didn't work on RedHat 5 systems.  This is because of
+  peculiarities in the handling of signals and system calls on this
+  system (the C library attempts to fake restartable system calls).
+  The fix involves testing at configure time for sigaction() and
+  SA_INTERRUPT: if both exist, we set up sys_signal() to be an "always
+  interrupt" wrapper around sigaction().  (If we don't have sigaction(),
+  we use signal() and check for restartable system calls as usual.)
+
+  Portability: on AIX, lconv is defined by the system header files.
+  Rename lconv in print.c to avoid the clash.
+
+  Testing: add a test that `cd' prints the new directory if we are
+  interactive and the directory was found via $cdpath.
+
+1998-07-23
+
+  Testing: fix silly typo in above test.
+
+  Configuration: `--with-vrl' added to support Gert-Jan Vons's readline
+  library.
+
+1998-07-24
+
+  Portability: the autoconf macro AC_FUNC_SETPGRP doesn't work on OSF1: that
+  system supports arguments to setpgrp(), but also has a prototype in
+  <unistd.h> to say that it is void.  Fix this by defining our own
+  RC_FUNC_SETPGRP for now.
+
+  Bug: <sys/wait.h> was included twice in some source files.
+
+  Configuration: automake wants `make distclean' to remove *.tab.c.
+  Rename y.tab.[ch] to parse.[ch] to avoid this.
+
+1998-07-27
+
+  Portability: on Ultrix, `make trip' fails with `malloc: Invalid
+  argument'.  Problem is that getgroups(0, NULL) in which.c returns -1.
+  Add new configure test to check for POSIX getgroups() and fall back to
+  NGROUPS if it's not available.  The magic is done by "getgroups.h".
+
+  Tidiness: extract <sys/wait.h> magic into "wait.h".
+
+1998-10-20
+
+  Tidiness: include prototype for add_history() when doing editline.
+
+  Documentation: document the `-V' flag and mention Linux's
+  /proc/self/fd as alternative to /dev/fd.
+
+1998-10-21
+
+  Bug: shells need to be prepared for bogus applications to have set
+  their input file descriptor to non-blocking, and set it back.
+
+  Tidiness: <sys/types.h> is in "proto.h", so nothing else needs to
+  include it explicitly.
+
+  Documentation: document the ^A bug.
+
+1998-10-22
+
+  Tidiness: makenonblock() was a rather poor choice of name for
+  a function which makes a file descriptor *not* nonblocking :-).
+
+1998-10-26
+
+  Portability: apparently some systems declare `char *basename(const
+  char *)' in system header files.  Changing our basename() (in
+  history.c) to match this prototype allows it to be compiled on such
+  systems, and is harmless.  (Harmless, that is, if no system declares
+  `char *basename(char *)'.)
+
+1998-10-28
+
+  Bug: system-bsd.c needs to include "wait.h".
+
+  Warnings: some versions of gcc warn about "ambiguous" `else' clauses.
+
+  Portability: assigning va_list objects doesn't work everywhere (Linux
+  on the PowerPC, specifically).  Use the C 9x invention va_copy()
+  instead, if it exists, otherwise fall back to assignment.
+
+  Documentation: help HP-UX users by mentioning that you need `cc -Ae'.
+  Also, HP-UX make will build rc in a separate directory.
+
+  Tidiness: remove unused functions from print.c.  Anybody wanting to
+  use this library in another project should follow the pointer in the
+  documentation to an improved version.
+
+1998-10-29
+
+  Bug: the "null character ignored" warning was printed with the wrong
+  line number.  Fix by adding an offset argument to pr_error.
+
+  Portability: work around readline's broken treatment of a non-blocking
+  input file descriptor.
+
+  Testing: add `testing' auxiliary program; use `testing' to generate
+  null character on the fly (since it's a nuisance having a literal
+  null character in trip.rc); reset sigexit in `fn fail'; add test for
+  nonblocking input file descriptor; fix test for cdpath.
+
+  Portability: include <sys/types.h> before <sys/stat.h>.
+
+1998-10-30
+
+  Portability: rename basename() to rc_basename(), since the former is
+  quite widespread, and has a variety of different definitions (none of
+  them, of course, static).
+
+  Portability: work around i386 GCC 2.7.2.3 optimization bug triggered
+  by a (really quite simple) expression in history.c.
+
+1998-12-04
+
+  Bug: a debugging statement was left in history.c by mistake.
+
+  Bug: `history' needs to check for `me' character preceded by `/', as
+  well as all the other options.  An invocation like ../rc-1.5/- no
+  longer loops.
+
+  Documentation: it seems better to have but a single URL in the README
+  file, which indirects to the other places of interest.
+
+1998-12-08
+
+  Portability: use AM_PROG_CC_STDC.  This obviates the need for a
+  special hack on HP-UX.
+
+  Documentation: document all the flags to `whatis'.
+
+1998-12-09
+
+  Tidiness: latest autoconf version has fixed AC_FUNC_SETPGRP, so we
+  no longer need to supply our own.
+
+  Portability: test for va_copy() needs to include <stdarg.h>.
+
+1998-12-10
+
+  Tidiness: move most of the configure.in nastiness into acinclude.m4.
+
+1998-12-11
+
+  Tidiness: the release date now only needs to be changed in one place.
+
+1999-01-05
+
+  Documentation: the Bell Labs rc now has the list flattening operator,
+  but spelt $"foo.
+
+1999-01-11
+
+  Release: rc-1.5b4.
+
+1999-01-19
+
+  Documentation: document the `-s' option.  Also, arrange the option
+  documentation in alphabetical order.
+
+  Tidiness: just install `history' to `$(bindir)/-'; don't create an
+  extra link (which `make clean' failed to remove).
+
+1999-01-22
+
+  Bug: `-s' should not imply `-i'.
+
+  Testing: add regression test for `-s' behaviour.
+
+1999-01-27
+
+  Documentation: default path was out of date; minor consistency
+  improvements.
+
+  Release: rc-1.5b5.
+
+1999-02-15
+
+  Portability: AM_INIT_AUTOMAKE calls AC_ARG_PROGRAM and
+  AC_PROG_INSTALL.  Don't do it explicitly.  For once, the configure
+  script gets smaller!  Program name transformations work right now.
+
+  Documentation: note that rc has no `set' builtin; fix weird variable
+  name example; any character except `=' may be used in a variable name;
+  document bqstatus; document rc's exit status; other tidying.
+
+1999-03-01
+
+  Documentation: document the yacc-imposed limit on ; separated commands
+  in a line.
+
+1999-05-06
+
+  Portability: tgetent() might be in -lncurses instead of -ltermcap.
+
+1999-05-10
+
+  Portability: Linux *almost* has SysV SIGCLD semantics, and we need to
+  detect them.
+
+  Bug: if we reset SIGCLD to SIG_DFL, we need to record the fact in the
+  sighandlers[] array.
+
+1999-05-12
+
+  Documentation: note that `$(a.b)' syntax only mostly works, and that
+  list definitions in exported functions are noisier than they need to
+  be.
+
+  Release: rc-1.5b6.
+
+1999-05-19
+
+  Documentation: minor fixes to man page.
+
+1999-05-26
+
+  Tidiness: `make distclean' now removes sigmsgs.[ch].
+
+1999-05-28
+
+  Release: rc-1.6.
+
+1999-08-19
+
+  Portability: the proposed C 9x __va_copy() macro is called that, not
+  va_copy(), as I thought.  Furthermore, it is defined to be a macro, so
+  we don't need to use autoconf to check for it.
+
+1999-10-11
+
+  Bug: absolute globs don't need special case in doglob().  Avoids
+  creating path names like `//tmp', which is a UNC path under CygWin.
+
+1999-10-12
+
+  Portability: status.c assumes traditional Unix layout of 0 and 1 exit
+  statuses in the parent, which is not shared by BeOS.  Add mkstatval.c.
+
+1999-10-13
+
+  Bug: a read(2) error in fdgchar() should call rc_raise(), not
+  rc_exit().  This bug is easily tickled on systems (like Linux) which
+  allow you to open(2) but not read(2) directories: `. /tmp'.  In all
+  previous versions of rc, this caused the shell to exit.
+
+  Portability: use POSIX strerror() where it's available; fake it with
+  sys_errlist[] where not.
+
+  Feature: replace `-V' with `version' variable.
+
+1999-10-14
+
+  Portability: exporting `path' causes indigestion in CygWin.  Since
+  it's virtually impossible for a child `rc' process to inherit `path'
+  (which I consider a bug, but it's not going to be fixed now), simply
+  don't export `path'.
+
+  Portability: add /usr/bsd to default default path.
+
+  Documentation: failing to search $path for a `.' command is at least
+  an incompatibility with Tenth Edition rc, and probably a bug.
+
+1999-11-10
+
+  Feature: make `version' a list.
+
+1999-11-11
+
+  Documentation: when running configure, you need to set LDFLAGS for
+  `-L' options, not LIBS.
+
+  Release: rc-1.6b1.
+
+1999-12-10
+
+  Bug: absolute globs do still need a special case.  `/*' works again now, but
+  we still avoid creating names like `//tmp/foo'.
+
+  Bug: avoid a putative race condition in signal.c.
+
+  Documentation: extra parentheses around `~' and `!' expressions are
+  forbidden.  Tom Duff's paper is not distributed with rc, but is
+  available on the web.
+
+  Release: rc-1.6b2.
+
+2000-04-19
+
+  Bug: isatty() tests in input.c are relevant to any fd, not just 0.
+  Now `. -i /dev/tty' works right.
+
+  Bug: fn sigexit wasn't always cleared in child shells.
+
+  Bug: `~ () '*'' dumped core.
+
+2000-05-25
+
+  Portability: need special runes for read() returning EIO under job
+  control systems.
+
+2000-06-20
+
+  Feature: add `-I' flag (definitively not interactive) for
+  compatibility with Plan 9 rc.
+
+2000-11-27
+
+  Portability: configure fails to detect strerror() on NetBSD; we need
+  to include <string.h>.
+
+2001-06-18
+
+  Bug: you can't pass a short to a stdargs function!
+
+2001-09-27
+
+  Documentation: we don't consider that `.' failing to search path is
+  a bug.
+
+  Feature: ^A in lists is now handled transparently.
+
+2001-10-01
+
+  Bug: it's no longer possible to use parentheses to sneak a word that
+  needs quoting past the "quoting detector", so `fn x { echo $(x.y) }'
+  now works both in the current rc and its descendants.
+
+  Documentation: mention the catastrophic effects of a semantic error
+  in fn prompt.
+
+2001-10-03
+
+  Feature: exported lists no longer use redundant parentheses.
+
+2001-10-04
+
+  Bug: semantic errors in `fn prompt' no longer throw rc into a tailspin.
+
+  Feature: don't export $cdpath or $home (the lower-case versions).
+
+2001-10-12
+
+  Release: rc-1.6b3.
+
+2001-10-25
+
+  Feature: large file support (thanks Scott Schwartz, Chris
+  Siebenmann).
+
+2001-10-29
+
+  Bug: space vs tab confusion in commented out Makefile rules to
+  rebuild parser (thanks Gary Carvell).
+
+2001-10-31
+
+  Documentation: subscripted variables don't work in here documents.
+
+  Release: rc-1.6c4.
+
+2001-11-01
+
+  Bug: more wrongly ordered header file includes (thanks Callum
+  Gibson).
+
+2001-11-06
+
+  Portability: rename print.c::utoa() to rc_utoa() to avoid QNX name
+  clash; use "sh -c 'test ...'" in trip.rc for missing standalone
+  `test' on QNX (thanks Stefan Dalibor).
+
+2001-11-20
+
+  Documentation: tighten up various descriptions, and include some
+  more examples.
+
+  Release: rc-1.6c5.
+
+2001-11-23
+
+  Bug: parselimit() was broken in various ways (thanks Chris
+  Siebenmann).
+
+2002-02-08
+
+  Bug: yet more wrongly ordered header file includes.
+
+  Release: rc-1.6c6.
+
+2002-04-03
+
+  Feature: make $version less magical, and exportable if it's changed
+  from its default value.  Same for $prompt (thank Erik Quanstrom).
+
+  Bug: make $bqstatus and $status not exportable.
+
+  Feature: "stuttering" colons for multiple replacements in the
+  history programs (thanks Callum Gibson).
+
+2002-05-22
+
+  Documentation: possible warning in tripping.c (thanks Dan Moniz).
+
+  Release: rc-1.6c7.
+
+2002-06-18
+
+  Release: rc-1.7.
+
+2002-07-25
+
+  Bug: fix globbing of broken symlinks.
+
+2002-07-31
+
+  Bug: readline doesn't handle EIO either.
+
+2002-08-15
+
+  Bug: variables that are sometimes exported (i.e. $prompt and
+  $version) need to be made exportable if they are inherited from the
+  environment.
+
+  Portability: don't call sigaction() for SIGKILL or SIGSTOP; don't
+  hand a garbage signal mask to sigaction() (thanks Jeremy
+  Fitzhardinge).  Also, remove use of SA_INTERRUPT (SUSv3, BSD,
+  etc. have SA_RESTART with the inverted meaning).
+
+2002-08-20
+
+  Bug: don't call ealloc(0) on systems where getgroups() doesn't
+  return egid (thanks Chris Siebenmann).
+
+2002-11-27
+
+  Bug: history dumps core if more colons than substitutions (thanks
+  Callum Gibson); history fails to avoid itself if it's the only
+  command; history writes and reads outside allocated memory.
+
+  Configuration: upgrade to autoconf-2.56 and automake-1.7.1.
+
+2003-07-17
+
+  Testing: remove test for large file support, as it causes
+  indigestion on file systems that don't support sparse files (thanks
+  Scott Schwartz).
+
+2003-07-22
+
+  Release: rc-1.7.1.
+There is no repository for useful rc code snippets as yet, so
+I'm including a (short) file in the distribution with some
+helpful/intriguing pieces of rc code.
+
+A sample .rcrc
+--------------
+Here is the .rcrc I use on archone:
+
+umask 022 
+path=(/bin /usr/bin /usr/ucb)
+ht=`/usr/arch/bin/hosttype
+h=$home
+history=$h/.history
+bin=$h/bin/$ht
+lib=$h/lib/$ht
+sh=$h/bin/sh
+include=$h/lib/include
+
+switch ($ht) {
+case sun*
+	OBERON='. '$h/other/oberon
+	p=/usr/ucb
+	compiler='gcc -Wall -O -g'
+	MANPATH=$h/man:/usr/arch/man:/usr/man
+	if (! ~ $TERM ()) {
+		stty dec
+		/usr/arch/bin/msgs -q
+	}
+case next
+	p=(/usr/ucb /usr/bin /NextApps)
+	compiler='cc -Wall -O -g -DNODIRENT'
+	MANPATH=$h/man:/usr/arch/man:/usr/man
+	if (! ~ $TERM ())
+		stty dec
+case sgi
+	p=(/usr/ucb /usr/sbin /usr/bin)
+	compiler='gcc -Wall -O -g -DNOSIGCLD'
+	MANPATH=$h/man:/usr/arch/man:/usr/catman
+	if (!{~ $TERM () || ~ $TERM *iris*})
+		stty line 1 intr '' erase '' kill ''
+case *
+	echo .rcrc not configured for this machine
+}
+
+path=(. $sh $bin /usr/arch/bin $p /bin /usr/bin/X11 /etc /usr/etc)
+cdpath=(. .. $h $h/src $h/misc $h/other $h/adm)
+RNINIT=-d$h' -t -M -2400-h -2400+hfrom'; DOTDIR=$h/misc/news
+PRINTER=lw
+
+fn s {
+	echo $status
+}
+fn cd {
+	builtin cd $1 && \
+	switch ($1) {
+	case ()
+		dir=$home
+	case *
+		dir=()
+	}
+}
+fn pwd {
+	if (~ $dir ())
+		dir=`/bin/pwd
+	echo $dir
+}
+fn x {
+	if (~ `tty /dev/console)
+		clear_colormap
+	clear
+	exit
+}
+fn p {
+	if (~ $history ()) {
+		echo '$history not set' >[1=2]
+		return 1
+	}
+
+	if (! ~ $#* 0 1 2) {
+		echo usage: $0 '[egrep pattern] [sed command]' >[1=2]
+		return 1
+	}
+
+	command=`{
+		egrep -v '^[ 	]*p([	 ]+|$)' $history | switch ($#*) {
+		case 0
+			cat
+		case 1
+			egrep $1
+		case 2
+			egrep $1 | sed $2
+		} | tail -1
+	}
+
+	echo $command
+	eval $command
+}
+
+if (~ $TERM dialup network) {
+	TERM=vt100
+	biff y
+}
+
+A front-end to NeXT's "openfile"
+--------------------------------
+
+Named after the sam "B" command for opening a file, this script was written
+by Paul Haahr. (Assumes the "pick" command from Kernighan and Pike is also
+in your path.)
+
+#!/bin/rc
+if (~ $#* 0)
+        exec openfile
+create = ()
+files = ()
+for (i in $*)
+        if (test -f $i) {
+                files = ($files $i)
+        } else {
+                create = ($create $i)
+	}
+create = `{ pick $create }
+files = ($files $create)
+for (i in $create)
+        > $i
+if (! ~ $#files 0)
+	openfile $files
+
+A read function
+---------------
+
+Unlike sh, rc doesn't have a read. This clever alternative returns an
+exit status as well as fetch a variable. Use as
+
+	read foo
+
+to set $foo to a single line from the terminal.
+
+(due to John Mackin <john@syd.dit.csiro.au>)
+
+fn read {
+        x=() {
+                x = `` ($nl) { awk '{print; print 0; exit}' ^ $nl ^ \
+                                   'END {print 1; print 1}' }
+                $1 = $x(1)
+                return $x(2)
+        }
+}
+
+From cs.wisc.edu!dws Fri Aug  2 18:16:14 1991
+
+#-------
+# ls front end
+#-------
+fn ls	\
+{
+	test -t 1 && * = (-FCb $*)
+	builtin ls $*
+}
+#-------
+# nl - holds a newline, useful in certain command substitutions
+#-------
+nl='
+'
+#-------
+# show - tell me about a name
+#
+# Runs possibly dangerous things through cat -v in order to protect
+# me from the effects of control characters I might have in the
+# environment.
+#-------
+fn show	\
+{
+	* = `` $nl {whatis -- $*}
+	for(itis)
+	{
+		switch($^itis)
+		{
+		case 'fn '*	; echo $itis | cat -v -t
+		case builtin*	; echo $itis
+		case /*		; file $itis; ls -ld $itis
+		case *'='*	; echo $itis | cat -v -t
+		case *		; echo $itis: UNKNOWN: update show
+		}
+	}
+	itis = ()
+}
+#-------
+# Tell me automatically when a command has a nonzero status.
+#-------
+fn prompt	\
+{
+	Status = $status
+	~ $Status 0 || echo '[status '$Status']'
+}
+
+#-------
+# chop - echo the given list, less its final member
+#
+# e.g. chop (a b c) -> (a b)
+#-------
+fn chop {
+	~ $#* 0 1 && return 0
+	ans = '' {	# local variable
+		ans = ()
+		while(! ~ $#* 1)
+		{
+			ans = ($ans $1)
+			shift
+		}
+		echo $ans
+	}
+}
+
+From arnold@audiofax.com Thu May 30 08:49:51 1991
+
+# cd.rc --- souped up version of cd
+
+# this is designed to emulate the fancy version of cd in ksh,
+# so if you're a purist, feel free to gag
+
+_cwd=$home
+_oldcwd=$home
+
+fn cd {
+	if (~ $#* 0) {
+		if (~ $_cwd $home) {	# do nothing
+		} else {
+			builtin cd && { _oldcwd=$_cwd ; _cwd=$home }
+		}
+	} else if (~ $#* 1) {
+		if (~ $1 -) {
+			_t=$_cwd
+			builtin cd $_oldcwd && {
+				_cwd=$_oldcwd
+				_oldcwd=$_t
+				echo $_cwd
+			}
+			_t=()
+		} else {
+			# if a cd happens through the cdpath, rc echos
+			# the directory on its own.  all we have to do
+			# is track where we end up
+			_dopwd = 1
+			{ ~ $1 /* } && _dopwd = 0	# absolute path
+			builtin cd $1 && {
+				_oldcwd=$_cwd
+				_cwd=$1
+				{ ~ $_dopwd 1 } && _cwd=`/bin/pwd
+			}
+			_dopwd=()
+		}
+	} else if (~ $#* 2) {
+		_t=`{ echo $_cwd | sed 's<'$1'<'$2'<' }
+		builtin cd $_t && {
+			_oldcwd=$_cwd
+			_cwd=$_t
+			echo $_cwd
+		}
+		_t=()
+	} else {
+		echo cd: takes 0, 1, or 2 arguments >[1=2]
+		builtin cd $1 && { _oldcwd=$_cwd ; _cwd=`/bin/pwd ; echo $_cwd }
+	}
+}
+
+fn pwd { echo $_cwd }
+
+From vlsi.cs.caltech.edu!drazen Tue Jan 21 16:03:14 1992
+
+# A kill builtin.
+
+#ifdef B_KILL
+#include <ctype.h>
+static void b_kill(char **av)
+{
+    int signal = SIGTERM;
+    int n = 1;
+    pid_t pid;
+    boolean res;
+
+    if (!av[1]) {
+        set(TRUE);
+        return;
+    }
+#undef  STRCMP
+#define STRCMP strcmp
+    if ( '-' == av[1][0]) {
+        char *p = 1+av[1];
+        if (0 == strcmp(av[1], "-l")){
+            int r; const int nsig = NUMOFSIGNALS;
+            const int C = 4, R = 1 + (int)((nsig-2)/C);
+            for (r=1; r<=R; r++){
+              int j;
+              for (j=r; j<nsig; j+=R){
+                fprint(1, "%s%d. %s\t", j<10?" ":"", j, signals[j][0]);
+              }
+              fprint(1,"\n");
+            }
+            set(TRUE);
+            return;
+        }
+        n++;
+        if ( (signal=a2u(p)) < 0){
+            int i;
+            for (i = 1; i < NUMOFSIGNALS; i++){
+                char UPPER[31], *u=UPPER, *q;
+                for (q=signals[i][0]; *q; q++, u++) *u = toupper(*q);
+                *u = '\0';
+
+                if (*signals[i][0] &&
+                  (!STRCMP(signals[i][0], p) || !STRCMP(3+signals[i][0],p)
+                   || !STRCMP(UPPER, p) || !STRCMP(3+UPPER, p) )  )
+                {
+                    signal = i;
+                    break;
+                }
+            }
+            if (signal < 0){
+                fprint(2,"kill: bad signal %s\n", av[1]);
+                set(FALSE);
+                return;
+            }
+        }
+    }
+#undef STRCMP
+
+    for (res=TRUE; av[n]; n++){
+        if( (pid = (pid_t) a2u(av[n])) < 0){
+            fprint(2, "kill: bad process number %s\n", av[n]);
+            res = FALSE;
+            continue;
+        }
+        if (kill(pid,signal)){
+            uerror("kill");
+            res = FALSE;
+            continue;
+        }
+    }
+    set(res);
+}
+#endif
+From acc.stolaf.edu!quanstro Thu Apr  2 02:51:10 1992
+Received: from thor.acc.stolaf.edu ([130.71.192.1]) by archone.tamu.edu with SMTP id <45339>; Thu, 2 Apr 1992 02:50:56 -0600
+Received: by thor.acc.stolaf.edu; Thu, 2 Apr 92 02:49:31 -0600
+Date: Thu, 2 Apr 1992 02:49:31 -0600
+From: quanstro@acc.stolaf.edu
+Message-Id: <9204020849.AA26566@thor.acc.stolaf.edu>
+To: byron@archone.tamu.edu
+Subject: EXAMPLES in 1.4beta
+Status: RO
+
+
+I have a little bit of code which might be a little more general than
+the souped-up version that is already there. Here it is, if you are
+interested. 
+
+# directory functions ###################################################
+fn pwd { echo $PWD; }
+
+fn pushd {
+  dirs = ($PWD $dirs);		
+  builtin cd $*;
+  PWD = `{builtin pwd};
+}
+
+fn popd {
+  switch ($#*)
+    {
+    case 0
+      ;
+    case 1
+      echo 'popd: argument '^$1^' ignored.' >[1=2];
+    case *
+      echo 'popd: usage: popd [n].';
+    }
+
+  if (! ~ $dirs ()) 
+    {
+      builtin cd $dirs(1);
+      PWD = $dirs(1);
+      echo $PWD;
+      * = $dirs;
+      shift
+      dirs = $*;
+    }
+}
+
+fn cd {
+  ~ $* () && * = $home;
+  !~ $#* 1 && echo 'cd: too many arguments' >[1=2] && return 1;
+
+  if (test -r $* ) {
+    pushd $*;
+  } else {
+    echo cd: $* does not exist. >[1=2]
+    return 1;
+  } 
+}
+
+fn back { popd $*; }
+
+fn Back { 
+  cd $home;
+  PWD = $home;
+  dirs = ();
+}
+
+fn dirs {
+  echo $dirs;
+}
+
+PWD = `{builtin pwd} ; dirs = $PWD		# kickstart
+
+
+
+
+
+From acc.stolaf.edu!quanstro Thu Apr  2 02:53:40 1992
+Received: from thor.acc.stolaf.edu ([130.71.192.1]) by archone.tamu.edu with SMTP id <45339>; Thu, 2 Apr 1992 02:53:38 -0600
+Received: by thor.acc.stolaf.edu; Thu, 2 Apr 92 02:51:46 -0600
+Date: Thu, 2 Apr 1992 02:51:46 -0600
+From: quanstro@acc.stolaf.edu
+Message-Id: <9204020851.AA26573@thor.acc.stolaf.edu>
+To: byron@archone.tamu.edu
+Subject: EXAMPLES
+Status: RO
+
+
+Little yp hack which act's like ~ w/o syntatic sugar (for those who do
+not have the luxury of seting up symbolic links to all user's homes
+
+# user function #########################################################
+fn u user {  
+  info = ()
+  info = `` (':') {ypmatch $1 passwd >[2] /dev/null }
+
+  if (~ $info ()) {
+    echo user $1 unknown >[1=2];
+    return 1;
+  } else {
+    echo $info(6)
+    if (~ $0 user) 
+      cd $info(6)
+  }
+}
+
+
+From stolaf.edu!quanstro Sun Apr  5 04:53:34 1992
+Date: Sun, 5 Apr 1992 04:53:08 -0500
+From: quanstro@stolaf.edu (Erik Quanstrom)
+To: byron@archone.tamu.edu
+Subject: man written in rc 
+Status: RO
+
+I whipped this up because the NeXTs here insist on using MANPAGER
+instead of PAGER and otherwise being obnoxious . . . 
+
+Anyway ... I hope you approve
+
+#!/bin/rc
+#########################################################################
+# file:		man							#
+#									#
+# object:	display man pages					#
+#									#
+# bugs:		* slow							#
+#		* does not know about fmt files				#
+#									#
+# Erik Quanstrom							#
+# 11. Februar 1992							#
+#########################################################################
+PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:$PATH ; 
+TROFF = (nroff -hq -Tcrt);
+macros=an;
+sections=(cat1 cat2 cat3 cat4 cat5 cat6 cat7 cat8 catl man1 man2 man3 man4 \
+	  man5 man6 man7 man8 manl)
+$nl='
+'
+fn sigint sighup sigquit sigalrm sigterm { rm -f $Bat; exit 2;}
+  
+fn usage {
+  echo usage: $0 [-] [-t] [-M path] [-T macros] [[section] title] ...>[1=2];
+  exit 1;
+}
+
+n=();
+fn shiftn {
+  n=($n 1)
+}
+
+~ $PAGER () && test -t 1 && PAGER=more; #default pager
+     
+while (~ $1 -*)
+  { 
+    switch ($1)
+      {
+      case -
+	if (~ $PAGER troff)
+	  echo bad combination of flags >[1=2] && usage;
+	PAGER=cat;
+      case -t
+	~ TROFF () && TROFF = (troff -t);
+	~ TCAT  () && PAGER=(lpr -t);
+      case -M
+	shift;
+	~ $1 () && usage;
+	
+	MANPATH=$1;
+      case -T
+	shift;
+	~ $1 () && usage;
+	macros=$1;
+      case -k
+	fflag=(); kflag=1;
+        shift;
+        break;
+      case -f
+	# locate related too filenames
+	kflag=(); fflag=1;
+        shift;
+        break;
+      case -*
+	echo bad flag '`'^$1^'''' >[1=2];
+	usage;
+      }
+    shift;
+  }
+
+if (!~ $#* 1) {
+  ~ $1 [l1-8] && { sname=$1 ; sections=(cat man)^$1 ; shift }
+  #hack for sun-style man pages
+  ~ $1 [l1-8]? && { sname=$1 ; sections=(cat man)^`{echo $1| cut -c1} ; shift }
+}
+
+if (~ 1 $fflag $kflag) {
+  dirlist=();
+  for (d in ``(:$nl) {echo $MANPATH})
+    test -s $d^/whatis && dirlist=($dirlist $d^/whatis);
+  
+  ~ $1 () && usage;
+  
+  if (~ $fflag 1) { 
+    while (!~ $1 ()) {
+      cmd=`{echo $1 | sed 's/^.*\///g'}
+      egrep -h '^'^$cmd' ' $dirlist;
+      shift;
+    }
+  } else {
+    while (!~ $1 ()) {
+      grep -h $1 $dirlist;
+      shift;
+    }
+  }
+ exit 0;
+}
+
+s=0;	 
+while (!~ $1 ()) {
+  for (dir in ``(:$nl) {echo $MANPATH}) {
+    filelist=($filelist `{echo $dir/^$sections^/$1^.* |\
+			    tr ' ' '\12' | grep -v '*'})
+
+    # coment this out if you don't care about speed, but 
+    # would rather find all the pages.
+    ~ $filelist () || break;
+  }
+
+  if (~ $filelist ()) {
+    if (~ $#sections 2) {
+      echo no entry for $1 in section '`'$sname'''' of the manual >[1=2];
+    } else {
+      echo no entry for '`'$1'''' found. >[1=2];
+    }
+    s=1;
+  } else {
+
+    echo $filelist '(' $#filelist ')' >[1=2];
+
+    for (file in $filelist) {
+      if (~ $file */cat[1-8l]/*) {
+	Cat = ($Cat $file);
+      } else {
+	# search for dups
+	dont=()
+	for (x in $Cat) {
+	  if (~ `{echo $x |  sed 's/\/[mc]a[nt][1-8l]//'} \
+	        `{echo $file |  sed 's/\/[mc]a[nt][1-8l]//'}) {
+	    dont=1;
+	    break;
+	  }
+	}
+
+	if (~ $dont ()) {
+	  cd `{echo $file | sed 's/man[1-8].*//'}
+	  echo -n Formatting ...
+	  $TROFF -m^$macros $file > /tmp/man^$pid^$#n && \
+		Bat = ($Bat /tmp/man^$pid^$#n)
+
+	  shiftn;
+	  echo ' 'done.
+	}
+      }
+    }
+  } 
+  shift;
+}
+
+{ !~ () $Cat || !~ () $Bat } && $PAGER $Cat $Bat;
+
+rm -f $Bat;
+~ $s () || exit $s;
+     
+exit 0;
+
+
+
+From osf.org!rsalz Thu Apr 23 16:22:32 1992
+Date: Thu, 23 Apr 1992 16:22:07 -0500
+From: rsalz@osf.org
+To: byron@archone.tamu.edu
+Subject: One for your EXAMPLES file
+Status: RO
+
+Use
+	trimhist [-#lines]
+trims your history file back; useful for folks with disk quota's :-)
+fn trimhist { p1=-100 {
+    cp $history $history^'~'
+    ~ $#* 1 && p1=$1
+    tail $p1 <$history^'~' >$history
+    rm $history^'~'
+} }
+
+From Pa.dec.com!uucp Mon Apr 27 12:25:02 1992
+Date: Mon, 27 Apr 1992 12:15:18 -0500
+From: haahr@adobe.com
+To: Byron Rakitzis <byron@archone.tamu.edu>
+Subject: a neat little rc script
+
+what you have to know to understand this:
+	$md for me is usually obj.$machine
+	my mkfiles build *.o, *.a, and the a.outs in $md
+	this is my acc script, which i use for compiling adobe routines
+---
+#! /user/haahr/bin/next/rc
+
+cc = cc
+proto = '-DPROTOTYPES=1'
+
+switch ($md) {
+case noproto.$machine;	proto = '-DPROTOTYPES=0'
+case gprof.$machine;	cc = ($cc -pg)
+case prof.$machine;	cc = ($cc -p)
+case lcomp.$machine;	cc = lcomp
+}
+exec $cc $proto '-DPACKAGE_SPECS="package.h"' '-DISP=isp_mc68020' '-DOS=os_mach' $*
+
+From rc-owner Tue May 12 14:54:10 1992
+Received: from postman.osf.org ([130.105.1.152]) by archone.tamu.edu with SMTP id <45337>; Tue, 12 May 1992 14:38:16 -0500
+Received: from earth.osf.org by postman.osf.org (5.64+/OSF 1.0)
+	id AA14480; Tue, 12 May 92 13:25:03 -0400
+Received: by earth.osf.org (5.64/4.7) id AA03499; Tue, 12 May 92 13:25:02 -0400
+Date: Tue, 12 May 1992 12:25:02 -0500
+From: rsalz@osf.org
+Message-Id: <9205121725.AA03499@earth.osf.org>
+To: rc@archone.tamu.edu
+Subject: Useful function
+Status: R
+
+It looks like line noise, but it turns things like
+	/home/rsalz/foo/bar
+into
+	~/foo/bar
+
+Useful for when you put your current directory up in your icon title.
+By duplicating the $home section you can make things like
+	/project/dce/build/dce1.0.1/src/rpc
+become
+	$MYBT/src/rpc
+
+##  If a pathname starts with $home, turn $home into ~.  Uses all built-ins.
+fn tildepath { p1=() i=() {
+    p1=$1
+    switch ($p1) {
+    case $home $home/*
+	# Split arg into components
+	*=`` (/) { echo -n $p1 }
+	# Shift down by number of components in $home
+	for (i in `` (/) { echo -n $home } ) shift
+	# Glue back together
+	p1='~'
+	for (i) p1=$p1 ^ '/' ^ $i
+	echo $p1
+    case *
+	echo $p1
+    }
+    return 0
+} }
+
+From osf.org!rsalz Tue May 12 15:47:12 1992
+Received: from postman.osf.org ([130.105.1.152]) by archone.tamu.edu with SMTP id <45316>; Tue, 12 May 1992 15:47:06 -0500
+Received: from earth.osf.org by postman.osf.org (5.64+/OSF 1.0)
+	id AA21070; Tue, 12 May 92 16:46:58 -0400
+Received: by earth.osf.org (5.64/4.7) id AA09396; Tue, 12 May 92 16:46:56 -0400
+Date: Tue, 12 May 1992 15:46:56 -0500
+From: rsalz@osf.org
+Message-Id: <9205122046.AA09396@earth.osf.org>
+To: byron@archone.tamu.edu
+Subject: Re: Useful function
+Status: R
+
+>wow. thanks, i'll add it to EXAMPLES.
+Glad you like.  Getting something added to EXAMPLES has been a goal of mine...
+
+I've been thinking, a bit, about a more general way of doing it.  I want
+a "prefix-sub" function, like this
+	prefix $some_path var1 var2 var3 var4 var5
+That would take some_path and replace any leading $var1 (etc) values
+with the variable name.  Return on the first match.
+
+Hmm -- come to think of it, that's very easy to do:
+
+# Use pathprefix filename var1 var2 var3
+# returns filename, with leading prefixes (in $var1...) turned into the
+# string $var1...
+fn pathprefix { p1=() i=() j=() {
+    p1=$1 ; shift
+    for (i) {
+	~ $p1 $$i $$i^/* && {
+	    *=`` (/) { echo -n $p1 }
+	    for (j in `` (/) { echo -n $$i } ) shift
+	    p1='$'^$i
+	    for (j) p1=$p1 ^ '/' ^ $j
+	    echo $p1
+	    return 0
+	}
+    }
+    echo $p1
+    return 0
+} }
+
+home=/user/users/rsalz
+z=/usr/users
+pathprefix /usr/users/rsalz home usr    # --> $home
+pathprefix /usr/users/rsalz z           # --> $z/rsalz
+pathprefix /usr/users/rsalz/foo z home  # --> $z/rsalz/foo
+pathprefix /usr/users/rsalz/foo home    # --> $home/foo
+
+COMPILING
+
+rc uses GNU autoconf and automake.  The following commands are all you
+need to configure, build, test, and install rc.
+
+    $ sh configure
+    $ make
+    $ make trip
+    # make install
+
+This will build rc in the source directory (see below for details on how
+to build rc in a different directory).
+
+
+BUILD AND CONFIGURATION OPTIONS
+
+There are lots of options you can give to configure to modify rc's
+behaviour.  You can also select a command line history library to link
+against---see the rc web page for details of where to find these
+libraries.  For a summary of all options, run `sh configure --help'.
+
+You can specify Makefile variables by setting the corresponding
+environment variables.  For example, you might want to set `CC=cc', to
+prevent configure looking for gcc, or set an initial value for
+`LDFLAGS', as in the example below.  It is a good idea to specify
+static linking (unless you are linking against a dynamic readline
+library)---if you are using gcc, you can do this by setting
+`CFLAGS=-static'.
+
+Here are the configure options you may want to use, in approximately
+descending order of usefulness.
+
+  --with-editline
+
+  This option tells rc to use the editline package (see the web page
+  for details) to provide EMACS style command line editing and
+  history.  If the editline library is not installed in a standard
+  place, you can tell configure where to find it by setting the
+  environment variable LDFLAGS.  For example, you might copy libedit.a
+  into the rc source directory and then run this configure command.
+
+    LDFLAGS=-L. sh configure --with-editline
+
+  --with-vrl
+
+  This option tells rc to use the vrl package (see the web page for
+  details) to provide EMACS style command line editing and history.  As
+  for `--with-editline', you may need to set the environment variable
+  LDFLAGS appropriately.
+
+  --with-readline
+
+  This option tells rc to use the GNU readline package, which is similar
+  to editline or vrl, but has many more features.  The readline package
+  is over 6 times the size of editline (whether you count lines of code,
+  or the library itself).  As for editline, you can set the environment
+  variable LDFLAGS if your readline library is not installed in a
+  standard place.
+
+    LDFLAGS=-L/usr/gnu/lib sh configure --with-readline
+
+  --with-history
+
+  Use this option if you want to build and install the programs that
+  support a crude command-line history mechanism.
+
+You can't use more than one of `--with-editline', `--with-vrl', and
+`--with-readline' at the same time.  If you have any of these you
+probably don't want to bother with `--with-history'.
+
+  --prefix=/path
+
+  By default, `prefix' is /usr/local, which means that `make install'
+  installs rc (and possibly the history programs) in /usr/local/bin, and
+  man pages in /usr/local/man/man1.  Use this option to change where
+  `make install' puts things.
+
+  --disable-builtin-echo
+
+  By default, the `echo' command is builtin to rc for reasons of
+  efficiency and portability (of rc scripts).  It is the only builtin
+  which is not essential, and purists may wish to omit it.  Note that
+  `make trip' will fail if you disable builtin echo and your system's
+  `echo' does not understand `-n' to suppress newline.
+
+  --with-addon
+  --with-addon=foo.c
+  
+  On the other hand, non-purists may wish to add extra builtin commands.
+  An example is included in the files addon.c and addon.h, which will
+  only be built if you specify `--with-addon'.  If your addons are
+  in another file, you can specify that instead (but beware that the
+  interface file is still addon.h).
+
+  --disable-def-interp
+  --enable-def-interp=/bin/foo
+
+  By default, a program that fails with ENOEXEC (Exec format error) is
+  handed to /bin/sh.  This does the Right Thing for scripts that start
+  with `:' to indicate that they are sh scripts.  You can disable this
+  behaviour entirely, or specify a different default interpreter.
+
+  --disable-def-path
+  --enable-def-path "/usr/local/bin","/usr/bin"
+
+  By default, if rc is started with no PATH, it uses a default path.
+  The default path is constructed at configure time, and consists
+  of each of the following directories that exist, in order.
+
+      /usr/local/bin /usr/bin /usr/bsd /usr/ucb /bin .
+
+  You can disable this, or specify a different default path.  Note that
+  the quote marks (") must be seen by configure; unless you are already
+  using rc, you will probably need to quote them to your shell.
+
+  --disable-job
+
+  By default, rc puts backgrounded processes into a new process group,
+  as though it were a job control shell (it isn't).  This is usually
+  needed to work around bugs in application programs which install
+  signal handlers for the keyboard signals without checking whether the
+  signal was being ignored.  This option disables the default behaviour,
+  making rc behave like a traditional sh.  You are unlikely to want this
+  option on any Unix system.
+
+  --disable-protect-env
+
+  By default, rc encodes special characters in environment variables.
+  This is necessary on all known Unix systems to prevent sh either
+  dying or discarding the variables.  This option disables the default
+  behaviour.  You are unlikely to want this option on any Unix system.
+
+After you've built rc, I recommend that you run it through the test
+script to gain some confidence that all is working well.  Type `make
+trip' to do this.  This will produce some output, and should end with
+"trip is complete".  If the trip instead ends with "trip took a wrong
+turn..."  please contact the maintainer.
+
+In this release, `make trip' will fail on a file system which does not
+implement Unix semantics (specifically permissions bits).  This means
+that `make trip' is not useful under CygWin, for instance.
+
+
+BUILDING IN ANOTHER DIRECTORY
+
+If you have a suitable `make', you can build rc in a different directory
+from where the sources are held.  This is particularly useful if you
+are building rc for multiple architectures.  All you need do is specify
+the path to the configure script in the first step.  Suitable `make's
+include GNU, HP-UX, and SunOS, but not Irix, nor Ultrix, nor UnixWare.
+
+
+COMPILATION WARNINGS
+
+If your C compiler is gcc, the option `-Wall' is turned on.  This may
+produce a few warnings.
+
+Warnings about "implicit declaration" of system functions may occur if
+your system's include files are deficient---they are usually harmless.
+
+Some older versions of gcc warn about "variable `n' might be
+clobbered" in walk.c.  As far as I can tell, this is gcc telling you
+that it might not be compiling the code correctly!  I don't know how
+to eliminate the warning, but it doesn't appear to cause any problems
+in practice.
+
+On some systems there are warnings about "passing arg 2 of `getgroups'
+from incompatible pointer type" in which.c.  I believe this is due to an
+incorrect declaration of `getgroups()' in those systems' header files.
+
+The warning "left shift count >= width of type" in tripping.c may
+occur if off_t is only 32 bits.
+
+Any other warnings should be reported to the maintainer.
+
+
+OLD C
+
+rc needs an ISO C (89) compiler, or at least one that has a reasonable
+understanding of function prototypes, `<stdarg.h>', `void', and
+`volatile'.  If you really need to compile rc with an ancient C
+compiler, please contact the maintainer.
+## Process this file with automake to produce Makefile.in
+
+if AMC_HISTORY
+man_MANS = rc.1 history.1
+HISTORY = history
+else
+man_MANS = rc.1
+endif
+
+if AMC_NO_HASHBANG
+EXECVE = execve.o
+endif
+
+if AMC_READLINE
+READLINE = readline.o
+endif
+
+if AMC_RESTART
+SYSTEM = system-bsd.o
+else
+SYSTEM = system.o
+endif
+
+bin_PROGRAMS = rc
+noinst_PROGRAMS = mksignal mkstatval tripping $(HISTORY)
+
+rc_SOURCES = builtins.c except.c exec.c fn.c footobar.c getopt.c glob.c glom.c hash.c heredoc.c input.c lex.c list.c main.c match.c nalloc.c open.c parse.c print.c redir.c signal.c status.c tree.c utils.c var.c wait.c walk.c which.c
+
+EXTRA_rc_SOURCES = addon.c execve.c readline.c system.c system-bsd.c
+
+rc_DEPENDENCIES = sigmsgs.o $(ADDON) $(EXECVE) $(READLINE) $(SYSTEM)
+rc_LDADD = sigmsgs.o $(ADDON) $(EXECVE) $(READLINE) $(SYSTEM)
+
+noinst_HEADERS = getgroups.h jbwrap.h parse.h proto.h rc.h rlimit.h stat.h wait.h
+
+BUILT_SOURCES = sigmsgs.c
+
+EXTRA_DIST = EXAMPLES RELDATE addon.c addon.h history.1 parse.y rc.1 trip.rc
+
+sigmsgs.c sigmsgs.h: mksignal
+	./mksignal
+
+# Newer automake's buildtime dependency tracking can't seem to figure
+# this one out.
+status.o: statval.h
+
+statval.h: mkstatval
+	./mkstatval > statval.h
+
+CONFIGURE_DEPENDENCIES = RELDATE
+
+DISTCLEANFILES = sigmsgs.c sigmsgs.h statval.h
+
+# Of course, parse.c and parse.h depend on parse.y.  However, unless
+# you're hacking on rc's grammar, it's not useful to have this
+# dependency expressed, since the distributed parse.[ch] (generated with
+# byacc, and lightly edited to remove a couple of gcc warnings) are
+# portable (I hope).
+#parse.c parse.h: $(srcdir)/parse.y
+#	$(YACC) -d $(srcdir)/parse.y
+#	mv y.tab.c parse.c
+#	mv y.tab.h parse.h
+
+check: trip
+
+trip: rc tripping
+	./rc -p < $(srcdir)/trip.rc
+
+install-exec-hook:
+if AMC_HISTORY
+	$(INSTALL_PROGRAM) history $(bindir)/- ;\
+	rm -f $(bindir)/--;  $(LN) $(bindir)/- $(bindir)/-- ;\
+	rm -f $(bindir)/-p;  $(LN) $(bindir)/- $(bindir)/-p ;\
+	rm -f $(bindir)/--p; $(LN) $(bindir)/- $(bindir)/--p
+endif
+# Makefile.in generated by automake 1.7.2 from Makefile.am.
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = .
+
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+ACLOCAL = @ACLOCAL@
+ADDON = @ADDON@
+AMC_ADDON_FALSE = @AMC_ADDON_FALSE@
+AMC_ADDON_TRUE = @AMC_ADDON_TRUE@
+AMC_HISTORY_FALSE = @AMC_HISTORY_FALSE@
+AMC_HISTORY_TRUE = @AMC_HISTORY_TRUE@
+AMC_NO_HASHBANG_FALSE = @AMC_NO_HASHBANG_FALSE@
+AMC_NO_HASHBANG_TRUE = @AMC_NO_HASHBANG_TRUE@
+AMC_READLINE_FALSE = @AMC_READLINE_FALSE@
+AMC_READLINE_TRUE = @AMC_READLINE_TRUE@
+AMC_RESTART_FALSE = @AMC_RESTART_FALSE@
+AMC_RESTART_TRUE = @AMC_RESTART_TRUE@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN = @LN@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__quote = @am__quote@
+bindir = @bindir@
+build_alias = @build_alias@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+
+@AMC_HISTORY_TRUE@man_MANS = rc.1 history.1
+@AMC_HISTORY_FALSE@man_MANS = rc.1
+@AMC_HISTORY_TRUE@HISTORY = history
+
+@AMC_NO_HASHBANG_TRUE@EXECVE = execve.o
+
+@AMC_READLINE_TRUE@READLINE = readline.o
+
+@AMC_RESTART_TRUE@SYSTEM = system-bsd.o
+@AMC_RESTART_FALSE@SYSTEM = system.o
+
+bin_PROGRAMS = rc
+noinst_PROGRAMS = mksignal mkstatval tripping $(HISTORY)
+
+rc_SOURCES = builtins.c except.c exec.c fn.c footobar.c getopt.c glob.c glom.c hash.c heredoc.c input.c lex.c list.c main.c match.c nalloc.c open.c parse.c print.c redir.c signal.c status.c tree.c utils.c var.c wait.c walk.c which.c
+
+EXTRA_rc_SOURCES = addon.c execve.c readline.c system.c system-bsd.c
+
+rc_DEPENDENCIES = sigmsgs.o $(ADDON) $(EXECVE) $(READLINE) $(SYSTEM)
+rc_LDADD = sigmsgs.o $(ADDON) $(EXECVE) $(READLINE) $(SYSTEM)
+
+noinst_HEADERS = getgroups.h jbwrap.h parse.h proto.h rc.h rlimit.h stat.h wait.h
+
+BUILT_SOURCES = sigmsgs.c
+
+EXTRA_DIST = EXAMPLES RELDATE addon.c addon.h history.1 parse.y rc.1 trip.rc
+
+CONFIGURE_DEPENDENCIES = RELDATE
+
+DISTCLEANFILES = sigmsgs.c sigmsgs.h statval.h
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+bin_PROGRAMS = rc$(EXEEXT)
+@AMC_HISTORY_TRUE@noinst_PROGRAMS = mksignal$(EXEEXT) mkstatval$(EXEEXT) \
+@AMC_HISTORY_TRUE@	tripping$(EXEEXT) history$(EXEEXT)
+@AMC_HISTORY_FALSE@noinst_PROGRAMS = mksignal$(EXEEXT) \
+@AMC_HISTORY_FALSE@	mkstatval$(EXEEXT) tripping$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
+
+history_SOURCES = history.c
+history_OBJECTS = history.$(OBJEXT)
+history_LDADD = $(LDADD)
+history_DEPENDENCIES =
+history_LDFLAGS =
+mksignal_SOURCES = mksignal.c
+mksignal_OBJECTS = mksignal.$(OBJEXT)
+mksignal_LDADD = $(LDADD)
+mksignal_DEPENDENCIES =
+mksignal_LDFLAGS =
+mkstatval_SOURCES = mkstatval.c
+mkstatval_OBJECTS = mkstatval.$(OBJEXT)
+mkstatval_LDADD = $(LDADD)
+mkstatval_DEPENDENCIES =
+mkstatval_LDFLAGS =
+am_rc_OBJECTS = builtins.$(OBJEXT) except.$(OBJEXT) exec.$(OBJEXT) \
+	fn.$(OBJEXT) footobar.$(OBJEXT) getopt.$(OBJEXT) glob.$(OBJEXT) \
+	glom.$(OBJEXT) hash.$(OBJEXT) heredoc.$(OBJEXT) input.$(OBJEXT) \
+	lex.$(OBJEXT) list.$(OBJEXT) main.$(OBJEXT) match.$(OBJEXT) \
+	nalloc.$(OBJEXT) open.$(OBJEXT) parse.$(OBJEXT) print.$(OBJEXT) \
+	redir.$(OBJEXT) signal.$(OBJEXT) status.$(OBJEXT) \
+	tree.$(OBJEXT) utils.$(OBJEXT) var.$(OBJEXT) wait.$(OBJEXT) \
+	walk.$(OBJEXT) which.$(OBJEXT)
+rc_OBJECTS = $(am_rc_OBJECTS)
+rc_LDFLAGS =
+tripping_SOURCES = tripping.c
+tripping_OBJECTS = tripping.$(OBJEXT)
+tripping_LDADD = $(LDADD)
+tripping_DEPENDENCIES =
+tripping_LDFLAGS =
+
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I.
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/addon.Po ./$(DEPDIR)/builtins.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/except.Po ./$(DEPDIR)/exec.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/execve.Po ./$(DEPDIR)/fn.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/footobar.Po ./$(DEPDIR)/getopt.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/glob.Po ./$(DEPDIR)/glom.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/hash.Po ./$(DEPDIR)/heredoc.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/history.Po ./$(DEPDIR)/input.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/lex.Po ./$(DEPDIR)/list.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/main.Po ./$(DEPDIR)/match.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/mksignal.Po ./$(DEPDIR)/mkstatval.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/nalloc.Po ./$(DEPDIR)/open.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/parse.Po ./$(DEPDIR)/print.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/readline.Po ./$(DEPDIR)/redir.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/signal.Po ./$(DEPDIR)/status.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/system-bsd.Po ./$(DEPDIR)/system.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/tree.Po ./$(DEPDIR)/tripping.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/utils.Po ./$(DEPDIR)/var.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/wait.Po ./$(DEPDIR)/walk.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/which.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = history.c mksignal.c mkstatval.c $(rc_SOURCES) \
+	$(EXTRA_rc_SOURCES) tripping.c
+
+NROFF = nroff
+MANS = $(man_MANS)
+HEADERS = $(noinst_HEADERS)
+
+DIST_COMMON = README $(noinst_HEADERS) AUTHORS COPYING ChangeLog \
+	INSTALL Makefile.am Makefile.in NEWS acinclude.m4 aclocal.m4 \
+	config.h.in configure configure.ac depcomp install-sh missing \
+	mkinstalldirs
+SOURCES = history.c mksignal.c mkstatval.c $(rc_SOURCES) $(EXTRA_rc_SOURCES) tripping.c
+
+all: $(BUILT_SOURCES) config.h
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno
+$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  Makefile
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
+
+$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+$(srcdir)/configure:  $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+	cd $(srcdir) && $(AUTOCONF)
+
+$(ACLOCAL_M4):  configure.ac acinclude.m4
+	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+
+config.h: stamp-h1
+	@if test ! -f $@; then \
+	  rm -f stamp-h1; \
+	  $(MAKE) stamp-h1; \
+	else :; fi
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+	@rm -f stamp-h1
+	cd $(top_builddir) && $(SHELL) ./config.status config.h
+
+$(srcdir)/config.h.in:  $(top_srcdir)/configure.ac $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOHEADER)
+	touch $(srcdir)/config.h.in
+
+distclean-hdr:
+	-rm -f config.h stamp-h1
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(bindir)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  if test -f $$p \
+	  ; then \
+	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+	   echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
+	   $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
+	  else :; fi; \
+	done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+	  echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
+	  rm -f $(DESTDIR)$(bindir)/$$f; \
+	done
+
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+clean-noinstPROGRAMS:
+	-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+history$(EXEEXT): $(history_OBJECTS) $(history_DEPENDENCIES) 
+	@rm -f history$(EXEEXT)
+	$(LINK) $(history_LDFLAGS) $(history_OBJECTS) $(history_LDADD) $(LIBS)
+mksignal$(EXEEXT): $(mksignal_OBJECTS) $(mksignal_DEPENDENCIES) 
+	@rm -f mksignal$(EXEEXT)
+	$(LINK) $(mksignal_LDFLAGS) $(mksignal_OBJECTS) $(mksignal_LDADD) $(LIBS)
+mkstatval$(EXEEXT): $(mkstatval_OBJECTS) $(mkstatval_DEPENDENCIES) 
+	@rm -f mkstatval$(EXEEXT)
+	$(LINK) $(mkstatval_LDFLAGS) $(mkstatval_OBJECTS) $(mkstatval_LDADD) $(LIBS)
+rc$(EXEEXT): $(rc_OBJECTS) $(rc_DEPENDENCIES) 
+	@rm -f rc$(EXEEXT)
+	$(LINK) $(rc_LDFLAGS) $(rc_OBJECTS) $(rc_LDADD) $(LIBS)
+tripping$(EXEEXT): $(tripping_OBJECTS) $(tripping_DEPENDENCIES) 
+	@rm -f tripping$(EXEEXT)
+	$(LINK) $(tripping_LDFLAGS) $(tripping_OBJECTS) $(tripping_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/addon.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/builtins.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/except.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exec.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execve.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fn.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/footobar.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glob.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glom.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/heredoc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/history.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/input.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lex.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/match.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mksignal.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkstatval.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nalloc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readline.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/redir.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signal.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/status.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/system-bsd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/system.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tree.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tripping.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/var.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wait.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/walk.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/which.Po@am__quote@
+
+distclean-depend:
+	-rm -rf ./$(DEPDIR)
+
+.c.o:
+@am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+@am__fastdepCC_TRUE@	then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@	fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
+
+.c.obj: