rc

[fork] interactive rc shell
Log | Files | Refs | README | LICENSE

commit c8a77b86b4f8c91314222a8e12e6e37cf182ee10
parent 27c900d6ae9cd0dcf4bc97bc9b8c1882e40ccfa8
Author: Toby Goodwin <LibreSoftwareDesign@gmail.com>
Date:   Mon,  1 Oct 2012 20:46:40 +0100

initial commit

Diffstat:
AMakefile.in | 881+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ARELDATE | 1+
AReleaseTime | 7+++++++
Dacconfig.h | 83-------------------------------------------------------------------------------
Macinclude.m4 | 2+-
Aaclocal.m4 | 1007+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Achldign | 0
Achldign.c | 9+++++++++
Aconfig.h.in | 189+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aconfigure.scan | 49+++++++++++++++++++++++++++++++++++++++++++++++++
Acpp | 38++++++++++++++++++++++++++++++++++++++
Aedit-bsd.c | 91+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aedit.h | 12++++++++++++
Ainput.h | 35+++++++++++++++++++++++++++++++++++
Ainstall-sh | 250+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aktrace.out | 0
Amkinstalldirs | 36++++++++++++++++++++++++++++++++++++
Anonblock.c | 14++++++++++++++
Aparse.c | 1117+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aparse.h | 37+++++++++++++++++++++++++++++++++++++
Arandom.pl | 15+++++++++++++++
Arc.spec | 31+++++++++++++++++++++++++++++++
Aslow | 11+++++++++++
Astamp-h | 1+
Astamp-h.in | 1+
Atestcld.c | 19+++++++++++++++++++
Atmp | 2++
Dversion.c.in | 1-
28 files changed, 3854 insertions(+), 85 deletions(-)

diff --git a/Makefile.in b/Makefile.in @@ -0,0 +1,881 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@ + + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +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 = : +bin_PROGRAMS = rc$(EXEEXT) +noinst_PROGRAMS = mksignal$(EXEEXT) mkstatval$(EXEEXT) \ + tripping$(EXEEXT) $(am__EXEEXT_1) +subdir = . +DIST_COMMON = README $(am__configure_deps) $(noinst_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS COPYING \ + ChangeLog INSTALL NEWS depcomp install-sh missing \ + mkinstalldirs +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" +@AMC_HISTORY_TRUE@am__EXEEXT_1 = history$(EXEEXT) +PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) +history_SOURCES = history.c +history_OBJECTS = history.$(OBJEXT) +history_LDADD = $(LDADD) +mksignal_SOURCES = mksignal.c +mksignal_OBJECTS = mksignal.$(OBJEXT) +mksignal_LDADD = $(LDADD) +mkstatval_SOURCES = mkstatval.c +mkstatval_OBJECTS = mkstatval.$(OBJEXT) +mkstatval_LDADD = $(LDADD) +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) +am__DEPENDENCIES_1 = +tripping_SOURCES = tripping.c +tripping_OBJECTS = tripping.$(OBJEXT) +tripping_LDADD = $(LDADD) +DEFAULT_INCLUDES = -I.@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = history.c mksignal.c mkstatval.c $(rc_SOURCES) \ + $(EXTRA_rc_SOURCES) tripping.c +DIST_SOURCES = history.c mksignal.c mkstatval.c $(rc_SOURCES) \ + $(EXTRA_rc_SOURCES) tripping.c +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +man1dir = $(mandir)/man1 +NROFF = nroff +MANS = $(man_MANS) +HEADERS = $(noinst_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +ADDON = @ADDON@ +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@ +EDIT = @EDIT@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +GREP = @GREP@ +INSTALL = @INSTALL@ +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@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build_alias = @build_alias@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host_alias = @host_alias@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +@AMC_HISTORY_FALSE@man_MANS = rc.1 +@AMC_HISTORY_TRUE@man_MANS = rc.1 history.1 +@AMC_HISTORY_TRUE@HISTORY = history +@AMC_NO_HASHBANG_TRUE@EXECVE = execve.o +@AMC_RESTART_FALSE@SYSTEM = system.o +@AMC_RESTART_TRUE@SYSTEM = system-bsd.o +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 edit-bsd.c edit-gnu.c edit-null.c execve.c system.c system-bsd.c +rc_DEPENDENCIES = sigmsgs.o $(ADDON) $(EDIT) $(EXECVE) $(SYSTEM) +rc_LDADD = sigmsgs.o $(ADDON) $(EDIT) $(EXECVE) $(SYSTEM) +noinst_HEADERS = edit.h getgroups.h input.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 +all: $(BUILT_SOURCES) config.h + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .o .obj +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +config.h: stamp-h1 + @if test ! -f $@; then rm -f stamp-h1; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) 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: $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +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) $(EXTRA_history_DEPENDENCIES) + @rm -f history$(EXEEXT) + $(LINK) $(history_OBJECTS) $(history_LDADD) $(LIBS) +mksignal$(EXEEXT): $(mksignal_OBJECTS) $(mksignal_DEPENDENCIES) $(EXTRA_mksignal_DEPENDENCIES) + @rm -f mksignal$(EXEEXT) + $(LINK) $(mksignal_OBJECTS) $(mksignal_LDADD) $(LIBS) +mkstatval$(EXEEXT): $(mkstatval_OBJECTS) $(mkstatval_DEPENDENCIES) $(EXTRA_mkstatval_DEPENDENCIES) + @rm -f mkstatval$(EXEEXT) + $(LINK) $(mkstatval_OBJECTS) $(mkstatval_LDADD) $(LIBS) +rc$(EXEEXT): $(rc_OBJECTS) $(rc_DEPENDENCIES) $(EXTRA_rc_DEPENDENCIES) + @rm -f rc$(EXEEXT) + $(LINK) $(rc_OBJECTS) $(rc_LDADD) $(LIBS) +tripping$(EXEEXT): $(tripping_OBJECTS) $(tripping_DEPENDENCIES) $(EXTRA_tripping_DEPENDENCIES) + @rm -f tripping$(EXEEXT) + $(LINK) $(tripping_OBJECTS) $(tripping_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +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)/edit-bsd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edit-gnu.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edit-null.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)/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@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +install-man1: $(man_MANS) + @$(NORMAL_INSTALL) + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man1dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.1[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ + done; } + +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man1dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.1[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @list='$(MANS)'; if test -n "$$list"; then \ + list=`for p in $$list; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ + if test -n "$$list" && \ + grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ + echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ + grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ + echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ + echo " typically \`make maintainer-clean' will remove them" >&2; \ + exit 1; \ + else :; fi; \ + else :; fi + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__remove_distdir) + +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod u+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(PROGRAMS) $(MANS) $(HEADERS) config.h +installdirs: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-hdr distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-man + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-exec-hook +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: install-man1 + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-man + +uninstall-man: uninstall-man1 + +.MAKE: all check install install-am install-exec-am install-strip + +.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ + clean-binPROGRAMS clean-generic clean-noinstPROGRAMS ctags \ + dist dist-all dist-bzip2 dist-gzip dist-lzip dist-lzma \ + dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \ + distclean-compile distclean-generic distclean-hdr \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-exec-hook \ + install-html install-html-am install-info install-info-am \ + install-man install-man1 install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ + ps ps-am tags uninstall uninstall-am uninstall-binPROGRAMS \ + uninstall-man uninstall-man1 + + +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 + +# 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: +@AMC_HISTORY_TRUE@ $(INSTALL_PROGRAM) history $(bindir)/- ;\ +@AMC_HISTORY_TRUE@ rm -f $(bindir)/--; $(LN) $(bindir)/- $(bindir)/-- ;\ +@AMC_HISTORY_TRUE@ rm -f $(bindir)/-p; $(LN) $(bindir)/- $(bindir)/-p ;\ +@AMC_HISTORY_TRUE@ rm -f $(bindir)/--p; $(LN) $(bindir)/- $(bindir)/--p + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/RELDATE b/RELDATE @@ -0,0 +1 @@ +2003-10-01 diff --git a/ReleaseTime b/ReleaseTime @@ -0,0 +1,7 @@ +#! /usr/bin/sed 1d +ChangeLog +NEWS +README +RELDATE +configure.ac +rc.1 diff --git a/acconfig.h b/acconfig.h @@ -1,83 +0,0 @@ -/* Define to a suitable ssize_t. */ -#undef ssize_t - -/* Define to a suitable sig_atomic_t. */ -#undef sig_atomic_t - -/* Define if you want rc to hand off exec errors to (e.g.) /bin/sh. */ -#undef DEFAULTINTERP - -/* Define to the default path used if $PATH is empty when rc starts. */ -#undef DEFAULTPATH - -/* Define if your kernel has SysV special SIGCLD semantics. */ -#undef HAVE_SYSV_SIGCLD - -/* Define if your kernel supports `#!' magic numbers. */ -#undef HASH_BANG - -/* Define if you have /dev/fd. */ -#undef HAVE_DEV_FD - -/* Define if you have /proc/self/fd. */ -#undef HAVE_PROC_SELF_FD - -/* Define if you have named pipes. */ -#undef HAVE_FIFO - -/* Define if quad_t is a native type. */ -#undef HAVE_QUAD_T - -/* Define if you have rlim_t. */ -#undef HAVE_RLIM_T - -/* Define if you have sigsetjmp(). */ -#undef HAVE_SIGSETJMP - -/* Define in you have strerror(). */ -#undef HAVE_STRERROR - -/* Define if you want rc to encode strange characters in the environment. */ -#undef PROTECT_ENV - -/* Define if you have extra builtins. */ -#undef RC_ADDON - -/* Define if you want echo as a builtin. */ -#undef RC_ECHO - -/* Define if you want rc to support broken apps, like a job control shell. */ -#undef RC_JOB - -/* Define if you want to use editline. */ -#undef EDITLINE - -/* Define if you want to use GNU readline. */ -#undef READLINE - -/* Define if you have the older readline, with rl_deprep_terminal. */ -#undef READLINE_OLD - -/* Define if RLIMIT_foo defines need _KERNEL. */ -#undef RLIMIT_NEEDS_KERNEL - -/* Define if rlim_t is quad_t. */ -#undef RLIM_T_IS_QUAD_T - -/* Define to package name. */ -#undef PACKAGE - -/* Define to version. */ -#undef VERSION - -/* Define to release date. */ -#undef RELDATE - -/* Define if you have SA_INTERRUPT (and sigaction()). */ -#undef HAVE_SA_INTERRUPT - -/* Define if you have POSIX getgroups(). */ -#undef HAVE_POSIX_GETGROUPS - -/* Define if you have va_copy(). */ -#undef HAVE_VA_COPY diff --git a/acinclude.m4 b/acinclude.m4 @@ -1,6 +1,6 @@ dnl This macro sets HAVE_POSIX_GETGROUPS if the dnl getgroups() function accepts a zero first argument. -AC_DEFUN(RC_FUNC_GETGROUPS, [ +AC_DEFUN([RC_FUNC_GETGROUPS], [ AC_CACHE_CHECK(for POSIX getgroups, rc_cv_func_posix_getgroups, AC_TRY_RUN([ #include <sys/types.h> #include <unistd.h> diff --git a/aclocal.m4 b/aclocal.m4 @@ -0,0 +1,1007 @@ +# generated automatically by aclocal 1.11.6 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, +# Inc. +# This file 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. + +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, +[m4_warning([this file was generated for autoconf 2.68. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) + +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software +# Foundation, Inc. +# +# This file 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. + +# serial 1 + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.11' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.11.6], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.11.6])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. +# +# This file 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. + +# serial 1 + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + + +# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file 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. + +# serial 4 + +# This was merged into AC_PROG_CC in Autoconf. + +AU_DEFUN([AM_PROG_CC_STDC], +[AC_PROG_CC +AC_DIAGNOSE([obsolete], [$0: + your code should no longer depend upon `am_cv_prog_cc_stdc', but upon + `ac_cv_prog_cc_stdc'. Remove this warning and the assignment when + you adjust the code. You can also remove the above call to + AC_PROG_CC if you already called it elsewhere.]) +am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc +]) +AU_DEFUN([fp_PROG_CC_STDC]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 +# Free Software Foundation, Inc. +# +# This file 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. + +# serial 9 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, +# 2010, 2011 Free Software Foundation, Inc. +# +# This file 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. + +# serial 12 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file 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. + +#serial 5 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file 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. + +# serial 8 + +# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. +AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# +# This file 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. + +# serial 16 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.62])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl +dnl The `parallel-tests' driver may need to know about EXEEXT, so add the +dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro +dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl +]) + +dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, +# Inc. +# +# This file 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. + +# serial 1 + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file 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. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# +# This file 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. + +# serial 4 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file 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. + +# serial 6 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, +# Inc. +# +# This file 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. + +# serial 1 + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software +# Foundation, Inc. +# +# This file 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. + +# serial 5 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# -------------------- +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ------------------------ +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file 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. + +# serial 5 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. +# +# This file 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. + +# serial 1 + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. +# +# This file 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. + +# serial 3 + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. +# +# This file 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. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar <conftest.tar]) + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([acinclude.m4]) diff --git a/chldign b/chldign Binary files differ. diff --git a/chldign.c b/chldign.c @@ -0,0 +1,9 @@ +#include <stdlib.h> +#include <unistd.h> +#include <signal.h> + +int main(int argc, char **argv) { + int i; + signal(SIGCHLD, SIG_IGN); + execvp(argv[1], &argv[1]); +} diff --git a/config.h.in b/config.h.in @@ -0,0 +1,189 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* The default interpreter */ +#undef DEFAULTINTERP + +/* The default path */ +#undef DEFAULTPATH + +/* Define to the type of elements in the array set by `getgroups'. Usually + this is either `int' or `gid_t'. */ +#undef GETGROUPS_T + +/* Define to 1 if your kernel understands `#!' magic numbers */ +#undef HASH_BANG + +/* Define to 1 if you have /dev/fd. */ +#undef HAVE_DEV_FD + +/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. + */ +#undef HAVE_DIRENT_H + +/* Define to 1 if you have the `mkfifo' function. */ +#undef HAVE_FIFO + +/* Define to 1 if you have the `getgroups' function. */ +#undef HAVE_GETGROUPS + +/* Define to 1 if you have the <inttypes.h> header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the `lstat' function. */ +#undef HAVE_LSTAT + +/* Define to 1 if you have the <memory.h> header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `mkfifo' function. */ +#undef HAVE_MKFIFO + +/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ +#undef HAVE_NDIR_H + +/* Define to 1 if you have the `getgroups' function with POSIX semantics. */ +#undef HAVE_POSIX_GETGROUPS + +/* Define to 1 if you have /proc/self/fd. */ +#undef HAVE_PROC_SELF_FD + +/* Define to 1 if you have the `quad_t' type. */ +#undef HAVE_QUAD_T + +/* Define to 1 if system calls automatically restart after interruption by a + signal. */ +#undef HAVE_RESTARTABLE_SYSCALLS + +/* Define to 1 if you have the `rlim_t' type. */ +#undef HAVE_RLIM_T + +/* Define to 1 if you have the `setpgrp' function. */ +#undef HAVE_SETPGRP + +/* Define to 1 if you have the `setrlimit' function. */ +#undef HAVE_SETRLIMIT + +/* Define to 1 if you have the `sigaction' function. */ +#undef HAVE_SIGACTION + +/* Define to 1 if you have the `sigsetjmp' function or macro. */ +#undef HAVE_SIGSETJMP + +/* Define to 1 if you have the <stdint.h> header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the <stdlib.h> header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `strerror' function or macro. */ +#undef HAVE_STRERROR + +/* Define to 1 if you have the <strings.h> header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the <string.h> header file. */ +#undef HAVE_STRING_H + +/* Has SysV SIGCLD */ +#undef HAVE_SYSV_SIGCLD + +/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. + */ +#undef HAVE_SYS_DIR_H + +/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. + */ +#undef HAVE_SYS_NDIR_H + +/* Define to 1 if you have the <sys/resource.h> header file. */ +#undef HAVE_SYS_RESOURCE_H + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the <sys/time.h> header file. */ +#undef HAVE_SYS_TIME_H + +/* Define to 1 if you have the <sys/types.h> header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */ +#undef HAVE_SYS_WAIT_H + +/* Define to 1 if you have the <unistd.h> header file. */ +#undef HAVE_UNISTD_H + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 to encode exported environment names. */ +#undef PROTECT_ENV + +/* Define to 1 to use addon functions. */ +#undef RC_ADDON + +/* Define to 1 to include `echo' as a builtin. */ +#undef RC_ECHO + +/* Define to 1 to use job-control-style backgrounding. */ +#undef RC_JOB + +/* Release date */ +#undef RELDATE + +/* Define to 1 if `_KERNEL' must be defined for `RLIMIT_*' macros. */ +#undef RLIMIT_NEEDS_KERNEL + +/* Define to 1 if `rlim_t' is `quad_t'. */ +#undef RLIM_T_IS_QUAD_T + +/* Define to 1 if the `setpgrp' function takes no argument. */ +#undef SETPGRP_VOID + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Version number of package */ +#undef VERSION + +/* Number of bits in a file offset, on hosts where this is settable. */ +#undef _FILE_OFFSET_BITS + +/* Define for large files, on AIX-style hosts. */ +#undef _LARGE_FILES + +/* Define to `int' if <sys/types.h> doesn't define. */ +#undef gid_t + +/* Define to `int' if <sys/types.h> does not define. */ +#undef pid_t + +/* Define to 1 if you have the `sig_atomic_t' type. */ +#undef sig_atomic_t + +/* Define to `unsigned int' if <sys/types.h> does not define. */ +#undef size_t + +/* Define to `long' if <sys/types.h> does not define. */ +#undef ssize_t + +/* Define to `int' if <sys/types.h> doesn't define. */ +#undef uid_t diff --git a/configure.scan b/configure.scan @@ -0,0 +1,49 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ(2.56) +AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS) +AC_CONFIG_SRCDIR([parse.c]) +AC_CONFIG_HEADER([config.h]) + +# Checks for programs. +AC_PROG_AWK +AC_PROG_CC +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_CPP + +# Checks for libraries. + +# Checks for header files. +AC_HEADER_DIRENT +AC_HEADER_STDC +AC_HEADER_SYS_WAIT +AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h sys/ioctl.h sys/param.h sys/time.h unistd.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_HEADER_STDBOOL +AC_C_CONST +AC_TYPE_UID_T +AC_TYPE_PID_T +AC_TYPE_SIZE_T +AC_C_VOLATILE + +# Checks for library functions. +AC_FUNC_CLOSEDIR_VOID +AC_FUNC_FORK +AC_FUNC_GETGROUPS +AC_FUNC_GETPGRP +AC_FUNC_LSTAT +AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK +AC_FUNC_MALLOC +AC_FUNC_REALLOC +AC_TYPE_SIGNAL +AC_FUNC_STAT +AC_CHECK_FUNCS([dup2 memset mkfifo strchr strerror strrchr strspn]) + +AC_CONFIG_FILES([Makefile + rc-1.7s20020820/Makefile + rc-1.7s20021127/=build/Makefile + rc-1.7s20021127/Makefile]) +AC_OUTPUT diff --git a/cpp b/cpp @@ -0,0 +1,38 @@ +#!/bin/sh + +# @(#) cpp.sh 1.3 92/01/15 21:53:22 + +# Unprototypeing preprocessor for pre-ANSI C compilers. On some systems, +# this script can be as simple as: +# +# /lib/cpp "$@" | unproto +# +# However, some cc(1) drivers specify output file names on the +# preprocessor command line, so this shell script must be prepared to +# intercept them. Depending on the driver program, the cpp options may +# even go before or after the file name argument(s). The script below +# tries to tackle all these cases. +# +# You may want to add -Ipath_to_stdarg.h_file, -Dvoid=, -Dvolatile=, +# and even -D__STDC__. + +## (This is what I used while testing with the SunOS C compiler. +## Also, I added "-Qpath ." to CFLAGS so that cpp would be +## run out of the current directory. --- Byron) +cpp_args="-I/u/byron/lib/sun4 -Dconst= -Dvolatile=" + +while : +do + case $1 in + "") break;; + -*) cpp_args="$cpp_args $1";; + *) cpp_args="$cpp_args $1" + case $2 in + ""|-*) ;; + *) exec 1> $2 || exit 1; shift;; + esac;; + esac + shift +done + +/lib/cpp $cpp_args | unproto diff --git a/edit-bsd.c b/edit-bsd.c @@ -0,0 +1,91 @@ +#include "rc.h" + +#include <stdio.h> + +#include <histedit.h> + +#include "edit.h" + +bool editing = 1; + +struct cookie { + EditLine *el; + History *hist; +}; + +static char *prompt; + +void *edit_begin(int fd) { + FILE *f; + HistEvent he; + struct cookie *c; + + c = ealloc(sizeof *c); + if (fd == 0) + f = stdin; + else + f = fdopen(fd, "r"); + c->el = el_init("rc", f, stdout, stderr); + el_set(c->el, EL_SIGNAL, 0); + el_source(c->el, NULL); + + c->hist = history_init(); + history(c->hist, &he, H_SETSIZE, 20); + el_set(c->el, EL_HIST, history, c->hist); + + return c; +} + + +static void edit_catcher(int sig) { + write(2, "\n", 1); + rc_raise(eError); +} + +char *edit_alloc(void *cookie, int *count) { + const char *r; + HistEvent he; + struct cookie *c = cookie; + void (*oldint)(int), (*oldquit)(int); + + oldint = sys_signal(SIGINT, edit_catcher); + oldquit = sys_signal(SIGQUIT, edit_catcher); + + r = el_gets(c->el, count); + + sys_signal(SIGINT, oldint); + sys_signal(SIGQUIT, oldquit); + + if (r) + history(c->hist, &he, H_ENTER, r); + return (char *)r; /* cast to avoid gcc warning */ +} + +static char *edit_prompter(EditLine *e) { + return prompt; +} + +void edit_prompt(void *cookie, char *pr) { + struct cookie *c = cookie; + + prompt = pr; + el_set(c->el, EL_PROMPT, edit_prompter); +} + +void edit_free(void *cookie) { + /* this function deliberately left blank */ +} + +void edit_end(void *cookie) { + struct cookie *c = cookie; + + el_end(c->el); + history_end(c->hist); + efree(c); +} + +void edit_reset(void *cookie) { + struct cookie *c = cookie; + + el_set(c->el, EL_TERMINAL, NULL); +} diff --git a/edit.h b/edit.h @@ -0,0 +1,12 @@ +extern bool editing; + +extern void *edit_begin(int fd); + +extern char *edit_alloc(void *, int *); +extern void edit_free(void *); + +extern void edit_prompt(void *, char *); + +extern void edit_end(void *); + +extern void edit_reset(void *); diff --git a/input.h b/input.h @@ -0,0 +1,35 @@ +/* initialize the input stack */ +extern void initinput(void); + +/* push an input onto the stack */ +extern void pushfd(int); +/* the Boolean argument affects line number reporting */ +extern void pushstring(char **, bool); + +/* pop the stack */ +extern void popinput(void); + +/* get / unget the next character */ +extern int gchar(void); +extern void ugchar(int); + +/* $TERM or $TERMCAP has changed */ +extern void termchange(void); + +/* parse a function from the environment */ +extern Node *parseline(char *); + +/* main parsing loop; Boolean says whether to exec also */ +extern Node *doit(bool); + +/* error recovery: skip to the next newline */ +extern void skiptonl(void); + +/* prepare for next line of input */ +extern void nextline(void); + +/* close all file descriptors on the stack */ +extern void closefds(void); + +/* the last character read */ +extern int lastchar; diff --git a/install-sh b/install-sh @@ -0,0 +1,250 @@ +#! /bin/sh +# +# install - install a program, script, or datafile +# This comes from X11R5 (mit/util/scripts/install.sh). +# +# Copyright 1991 by the Massachusetts Institute of Technology +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of M.I.T. not be used in advertising or +# publicity pertaining to distribution of the software without specific, +# written prior permission. M.I.T. makes no representations about the +# suitability of this software for any purpose. It is provided "as is" +# without express or implied warranty. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. + + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +transformbasename="" +transform_arg="" +instcmd="$mvprog" +chmodcmd="$chmodprog 0755" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src="" +dst="" +dir_arg="" + +while [ x"$1" != x ]; do + case $1 in + -c) instcmd="$cpprog" + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd="$stripprog" + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue;; + esac +done + +if [ x"$src" = x ] +then + echo "install: no input file specified" + exit 1 +else + true +fi + +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d $dst ]; then + instcmd=: + else + instcmd=mkdir + fi +else + +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command +# might cause directories to be created, which would be especially bad +# if $src (and thus $dsttmp) contains '*'. + + if [ -f $src -o -d $src ] + then + true + else + echo "install: $src does not exist" + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "install: no destination specified" + exit 1 + else + true + fi + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + + if [ -d $dst ] + then + dst="$dst"/`basename $src` + else + true + fi +fi + +## this sed command emulates the dirname command +dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. +# this part is taken from Noah Friedman's mkinstalldirs script + +# Skip lots of stat calls in the usual case. +if [ ! -d "$dstdir" ]; then +defaultIFS=' +' +IFS="${IFS-${defaultIFS}}" + +oIFS="${IFS}" +# Some sh's can't handle IFS=/ for some reason. +IFS='%' +set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS="${oIFS}" + +pathcomp='' + +while [ $# -ne 0 ] ; do + pathcomp="${pathcomp}${1}" + shift + + if [ ! -d "${pathcomp}" ] ; + then + $mkdirprog "${pathcomp}" + else + true + fi + + pathcomp="${pathcomp}/" +done +fi + +if [ x"$dir_arg" != x ] +then + $doit $instcmd $dst && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi +else + +# If we're going to rename the final executable, determine the name now. + + if [ x"$transformarg" = x ] + then + dstfile=`basename $dst` + else + dstfile=`basename $dst $transformbasename | + sed $transformarg`$transformbasename + fi + +# don't allow the sed command to completely eliminate the filename + + if [ x"$dstfile" = x ] + then + dstfile=`basename $dst` + else + true + fi + +# Make a temp file name in the proper directory. + + dsttmp=$dstdir/#inst.$$# + +# Move or copy the file name to the temp name + + $doit $instcmd $src $dsttmp && + + trap "rm -f ${dsttmp}" 0 && + +# and set any options; do chmod last to preserve setuid bits + +# If any of these fail, we abort the whole thing. If we want to +# ignore errors from any of these, just make sure not to ignore +# errors from the above "$doit $instcmd $src $dsttmp" command. + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && + +# Now rename the file to the real destination. + + $doit $rmcmd -f $dstdir/$dstfile && + $doit $mvcmd $dsttmp $dstdir/$dstfile + +fi && + + +exit 0 diff --git a/ktrace.out b/ktrace.out Binary files differ. diff --git a/mkinstalldirs b/mkinstalldirs @@ -0,0 +1,36 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman <friedman@prep.ai.mit.edu> +# Created: 1993-05-16 +# Last modified: 1994-03-25 +# Public domain + +errstatus=0 + +for file in ${1+"$@"} ; do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d in ${1+"$@"} ; do + pathcomp="$pathcomp$d" + case "$pathcomp" in + -* ) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" 1>&2 + mkdir "$pathcomp" > /dev/null 2>&1 || lasterr=$? + fi + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus + +# mkinstalldirs ends here diff --git a/nonblock.c b/nonblock.c @@ -0,0 +1,14 @@ +/* Set stdin to nonblocking. */ +#include <sys/types.h> +#include <unistd.h> +#include <fcntl.h> +#include <errno.h> +int main(void) { + int flags; + flags = fcntl(0, F_GETFL); + flags |= O_NONBLOCK; + fcntl(0, F_SETFL, (long) flags); + flags = read(0, &flags, 1); + printf("read returns %d, errno == %d\n", flags, errno); + return 0; +} diff --git a/parse.c b/parse.c @@ -0,0 +1,1117 @@ +#ifndef lint +static char const +yyrcsid[] = "$FreeBSD: src/usr.bin/yacc/skeleton.c,v 1.28 2000/01/17 02:04:06 bde Exp $"; +#endif +#include "rc.h" +#include <stdlib.h> +#define YYBYACC 1 +#define YYMAJOR 1 +#define YYMINOR 9 +#define YYLEX yylex() +#define YYEMPTY -1 +#define yyclearin (yychar=(YYEMPTY)) +#define yyerrok (yyerrflag=0) +#define YYRECOVERING() (yyerrflag!=0) +static int yygrowstack(); +#define YYPREFIX "yy" +#line 8 "parse.y" + +static Node *star, *nolist; +Node *parsetree; /* not using yylval because bison declares it as an auto */ +#line 26 "parse.y" +typedef union { + struct Node *node; + struct Redir redir; + struct Pipe pipe; + struct Dup dup; + struct Word word; + char *keyword; +} YYSTYPE; +#line 31 "y.tab.c" +#define YYERRCODE 256 +#define ANDAND 257 +#define BACKBACK 258 +#define BANG 259 +#define CASE 260 +#define COUNT 261 +#define DUP 262 +#define ELSE 263 +#define END 264 +#define FLAT 265 +#define FN 266 +#define FOR 267 +#define IF 268 +#define IN 269 +#define OROR 270 +#define PIPE 271 +#define REDIR 272 +#define SREDIR 273 +#define SUB 274 +#define SUBSHELL 275 +#define SWITCH 276 +#define TWIDDLE 277 +#define WHILE 278 +#define WORD 279 +#define HUH 280 +const short yylhs[] = { -1, + 0, 0, 22, 22, 8, 8, 13, 13, 3, 3, + 9, 9, 4, 15, 2, 11, 11, 16, 16, 16, + 5, 5, 6, 6, 6, 19, 19, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 24, 24, 18, 18, 18, + 12, 12, 17, 17, 20, 20, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 21, 21, + 14, 14, 14, 23, 23, +}; +const short yylen[] = { 2, + 2, 2, 1, 1, 2, 2, 1, 2, 1, 2, + 1, 2, 3, 3, 3, 0, 2, 1, 2, 2, + 3, 3, 1, 2, 2, 1, 4, 0, 1, 2, + 4, 8, 6, 4, 8, 4, 4, 4, 4, 2, + 2, 3, 3, 3, 2, 0, 1, 1, 2, 2, + 1, 3, 1, 1, 1, 3, 2, 5, 2, 2, + 2, 2, 3, 3, 3, 2, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, + 0, 2, 2, 0, 2, +}; +const short yydefred[] = { 0, + 0, 0, 0, 0, 18, 0, 79, 0, 0, 0, + 0, 0, 0, 0, 0, 67, 0, 0, 81, 0, + 0, 0, 0, 0, 0, 51, 0, 0, 0, 0, + 3, 4, 2, 77, 75, 74, 73, 68, 71, 69, + 0, 78, 72, 76, 70, 54, 53, 55, 0, 47, + 0, 59, 60, 0, 0, 0, 84, 66, 0, 0, + 0, 0, 0, 84, 0, 0, 0, 11, 0, 0, + 62, 61, 0, 0, 30, 0, 84, 84, 84, 5, + 6, 8, 0, 0, 1, 0, 50, 0, 0, 63, + 64, 0, 44, 0, 0, 0, 0, 0, 0, 0, + 0, 79, 13, 12, 10, 65, 82, 0, 17, 0, + 0, 0, 0, 52, 56, 79, 84, 14, 85, 0, + 0, 31, 84, 0, 0, 0, 0, 0, 39, 0, + 0, 84, 0, 58, 84, 0, 0, 0, 0, 0, + 79, 0, 0, 0, 0, 0, 0, 24, 35, 25, + 22, 21, +}; +const short yydgoto[] = { 21, + 46, 22, 66, 23, 142, 143, 67, 68, 69, 47, + 75, 27, 28, 70, 57, 29, 48, 30, 122, 94, + 54, 33, 97, 51, +}; +const short yysindex[] = { 874, + 24, 1001, -82, 1001, 0, 1001, 0, -27, -26, 900, + 1001, -82, -20, -82, -26, 0, 1001, 1134, 0, 900, + 0, 1134, -203, -30, 1134, 0, -55, 24, 1134, 826, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -66, 0, 0, 0, 0, 0, 0, 0, 849, 0, + 1134, 0, 0, 900, 1001, 1134, 0, 0, -52, -52, + 1134, 1001, 1001, 0, -212, -58, 154, 0, 1134, 426, + 0, 0, -196, 1001, 0, -203, 0, 0, 0, 0, + 0, 0, 1001, 1001, 0, -196, 0, -52, 1001, 0, + 0, -196, 0, -52, -38, 36, 502, -196, -36, -52, + 502, 0, 0, 0, 0, 0, 0, -52, 0, 502, + 502, 502, -52, 0, 0, 0, 0, 0, 0, -97, + -234, 0, 0, 1001, -234, 922, -196, -196, 0, 944, + 502, 0, -9, 0, 0, -234, 502, 967, 502, -234, + 0, 967, -45, 154, 967, -234, 448, 0, 0, 0, + 0, 0, +}; +const short yyrindex[] = { 134, + 0, 0, 356, 0, 0, 0, 0, 0, 0, 0, + 0, 356, 0, 1024, 0, 0, 0, 571, 0, 0, + 0, 487, 529, 54, 134, 0, 62, 0, 487, 548, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 487, 0, 0, 712, 0, 142, 0, 0, 14, 38, + 487, 0, 0, 0, -10, 0, -32, 0, 744, 0, + 0, 0, 749, 0, 0, 529, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 763, 0, 86, 0, 0, + 0, 779, 0, 110, 0, 0, -34, 788, 0, 380, + -34, 0, 0, 0, 0, 0, 0, 470, 0, -34, + -34, -34, 404, 0, 0, 0, 0, 0, 0, 529, + 6, 0, 0, 724, 30, 0, 805, 813, 0, 0, + -34, 0, 0, 0, 0, 119, -34, 571, -34, 187, + 0, 571, 0, -44, 571, 396, 0, 0, 0, 0, + 0, 0, +}; +const short yygindex[] = { 0, + 0, 0, -23, 12, 0, -104, 1319, 2, -127, 1307, + 7, 0, 57, 0, 70, -13, 84, 0, 0, 420, + -81, 59, 369, 31, +}; +#define YYTABLESIZE 1464 +const short yytable[] = { 57, + 119, 25, 117, 28, 123, 83, 28, 81, 9, 76, + 145, 50, 55, 56, 145, 26, 87, 145, 124, 62, + 126, 58, 77, 19, 28, 57, 25, 57, 80, 57, + 57, 71, 96, 32, 130, 78, 79, 148, 84, 34, + 150, 89, 61, 26, 63, 105, 26, 20, 57, 19, + 57, 19, 58, 19, 19, 89, 18, 89, 5, 147, + 90, 102, 76, 7, 26, 93, 103, 34, 74, 11, + 34, 48, 19, 20, 79, 20, 118, 20, 20, 149, + 23, 82, 109, 57, 64, 57, 85, 52, 34, 53, + 28, 0, 9, 0, 0, 49, 20, 48, 0, 48, + 65, 48, 48, 72, 0, 0, 76, 0, 120, 19, + 0, 0, 57, 138, 57, 0, 0, 0, 0, 80, + 48, 49, 0, 49, 0, 49, 49, 0, 33, 0, + 26, 0, 91, 20, 0, 0, 19, 0, 19, 0, + 0, 0, 0, 28, 49, 80, 0, 80, 0, 80, + 80, 28, 0, 0, 34, 0, 33, 48, 0, 33, + 20, 0, 20, 104, 5, 132, 0, 114, 80, 0, + 0, 28, 115, 0, 74, 11, 0, 33, 0, 28, + 0, 49, 28, 0, 0, 0, 48, 0, 0, 0, + 0, 81, 28, 0, 0, 0, 27, 0, 0, 0, + 28, 0, 0, 0, 0, 80, 0, 0, 0, 0, + 49, 0, 80, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 28, 0, 27, 0, 77, 27, 0, 28, + 116, 0, 80, 0, 80, 28, 28, 0, 0, 78, + 79, 0, 0, 33, 0, 27, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 0, 57, 57, 57, 57, 57, 26, + 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 31, 19, 19, + 19, 19, 19, 34, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 27, 20, 20, 20, 20, 20, 7, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 0, 48, 48, 48, 48, + 48, 0, 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, 49, 0, + 49, 49, 49, 49, 49, 46, 80, 80, 80, 80, + 80, 0, 80, 80, 80, 80, 80, 80, 80, 80, + 80, 80, 33, 0, 80, 80, 80, 80, 80, 79, + 28, 46, 0, 46, 0, 46, 46, 28, 28, 0, + 0, 0, 0, 28, 28, 32, 0, 0, 0, 0, + 77, 28, 28, 15, 46, 79, 0, 79, 0, 79, + 79, 49, 0, 78, 79, 0, 0, 0, 0, 59, + 60, 0, 101, 32, 0, 107, 32, 0, 79, 15, + 0, 15, 0, 15, 15, 110, 111, 112, 0, 88, + 27, 46, 0, 0, 32, 0, 0, 151, 0, 0, + 0, 17, 15, 0, 0, 19, 106, 0, 0, 0, + 0, 0, 0, 0, 95, 79, 0, 0, 46, 83, + 46, 99, 100, 17, 0, 131, 0, 19, 0, 108, + 0, 133, 0, 59, 0, 0, 28, 0, 0, 15, + 137, 0, 113, 139, 79, 83, 152, 0, 0, 83, + 83, 119, 0, 0, 0, 0, 0, 0, 0, 0, + 32, 20, 0, 0, 28, 0, 15, 28, 15, 0, + 0, 0, 0, 0, 0, 0, 0, 17, 16, 0, + 0, 19, 0, 20, 0, 28, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, + 0, 0, 0, 0, 0, 83, 16, 0, 0, 16, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 28, 0, 0, 0, 0, 29, 0, 16, 29, 0, + 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, + 0, 0, 0, 0, 0, 0, 29, 0, 28, 0, + 0, 28, 46, 46, 46, 0, 46, 46, 0, 46, + 46, 46, 46, 46, 18, 46, 46, 46, 46, 28, + 46, 46, 46, 46, 46, 0, 79, 79, 79, 79, + 79, 0, 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 0, 16, 79, 79, 79, 79, 79, 32, + 15, 15, 15, 0, 15, 15, 0, 15, 15, 15, + 15, 15, 29, 15, 15, 15, 15, 0, 15, 15, + 15, 15, 15, 2, 34, 35, 4, 0, 36, 0, + 6, 37, 38, 39, 40, 28, 0, 41, 0, 0, + 42, 43, 44, 45, 16, 2, 34, 35, 4, 0, + 36, 0, 6, 37, 38, 39, 40, 0, 0, 41, + 0, 45, 42, 43, 44, 45, 16, 83, 83, 83, + 83, 0, 83, 36, 83, 83, 83, 83, 83, 0, + 0, 83, 0, 28, 83, 83, 83, 83, 83, 45, + 28, 0, 45, 28, 0, 0, 28, 28, 41, 2, + 3, 36, 4, 5, 36, 0, 6, 7, 8, 9, + 45, 0, 40, 10, 11, 0, 12, 13, 14, 15, + 16, 28, 36, 0, 28, 16, 41, 0, 42, 41, + 0, 0, 16, 0, 0, 0, 0, 43, 16, 16, + 40, 0, 28, 40, 29, 0, 0, 41, 0, 0, + 0, 29, 0, 0, 37, 0, 42, 29, 29, 42, + 0, 40, 38, 0, 0, 43, 0, 28, 43, 0, + 0, 0, 0, 0, 0, 0, 45, 42, 0, 0, + 28, 28, 37, 0, 0, 37, 43, 0, 36, 0, + 38, 0, 0, 38, 0, 0, 0, 0, 0, 0, + 0, 17, 0, 37, 0, 19, 0, 0, 28, 0, + 0, 38, 0, 41, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 17, 0, 0, 40, 19, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 42, 0, 0, 0, 0, 0, 17, + 0, 0, 43, 19, 0, 0, 0, 0, 0, 0, + 0, 20, 0, 0, 0, 0, 0, 0, 0, 37, + 0, 0, 0, 0, 0, 17, 0, 38, 0, 19, + 0, 0, 89, 0, 20, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, + 0, 19, 134, 0, 0, 0, 0, 0, 45, 20, + 0, 18, 0, 0, 0, 45, 0, 0, 0, 17, + 36, 45, 45, 19, 135, 0, 0, 36, 0, 0, + 0, 0, 0, 36, 36, 20, 18, 0, 0, 0, + 28, 0, 17, 0, 0, 41, 19, 0, 0, 0, + 0, 0, 41, 28, 28, 0, 0, 20, 41, 40, + 0, 0, 18, 0, 0, 0, 40, 0, 0, 0, + 0, 0, 40, 0, 0, 42, 17, 0, 0, 20, + 19, 0, 42, 0, 43, 0, 0, 0, 42, 0, + 0, 43, 0, 0, 0, 0, 0, 43, 0, 46, + 0, 37, 20, 46, 0, 0, 0, 0, 37, 38, + 0, 0, 0, 0, 37, 0, 38, 0, 0, 0, + 0, 0, 38, 2, 34, 35, 4, 5, 36, 18, + 6, 37, 38, 39, 40, 0, 20, 10, 11, 0, + 42, 43, 44, 45, 16, 0, 2, 34, 35, 4, + 0, 36, 0, 6, 37, 38, 39, 40, 0, 46, + 41, 0, 0, 42, 43, 44, 45, 16, 0, 1, + 0, 2, 3, 0, 4, 5, 0, 0, 6, 7, + 8, 9, 0, 0, 0, 10, 11, 0, 12, 13, + 14, 15, 16, 0, 0, 0, 0, 2, 34, 35, + 4, 0, 36, 0, 6, 37, 38, 39, 40, 17, + 0, 41, 0, 19, 42, 43, 44, 45, 16, 2, + 34, 35, 4, 0, 36, 0, 6, 37, 38, 39, + 40, 0, 0, 41, 0, 0, 42, 43, 44, 45, + 16, 2, 34, 35, 4, 0, 36, 0, 6, 37, + 38, 39, 40, 0, 0, 41, 0, 0, 42, 43, + 44, 45, 16, 0, 2, 3, 141, 4, 5, 20, + 0, 6, 7, 8, 9, 0, 0, 0, 10, 11, + 0, 12, 13, 14, 15, 16, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 18, 0, 2, 34, + 35, 4, 0, 36, 0, 6, 37, 38, 39, 40, + 0, 0, 41, 0, 0, 42, 43, 44, 45, 16, + 0, 46, 46, 46, 46, 0, 46, 0, 46, 46, + 46, 46, 46, 0, 0, 46, 0, 0, 46, 46, + 46, 46, 46, 0, 0, 0, 26, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, + 0, 0, 0, 0, 26, 0, 0, 0, 26, 0, + 0, 26, 0, 0, 0, 26, 0, 0, 0, 0, + 73, 0, 0, 24, 0, 0, 0, 86, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, + 0, 0, 26, 0, 0, 0, 0, 26, 0, 92, + 0, 0, 0, 0, 0, 26, 0, 0, 0, 98, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 3, 0, 4, 5, 0, 0, 6, 7, + 8, 9, 0, 26, 0, 10, 11, 26, 12, 13, + 14, 15, 16, 0, 0, 121, 26, 26, 26, 125, + 0, 0, 0, 0, 0, 0, 0, 0, 127, 128, + 129, 0, 0, 0, 0, 0, 0, 26, 0, 0, + 0, 0, 0, 26, 26, 26, 0, 0, 26, 136, + 0, 26, 0, 0, 0, 140, 144, 146, 0, 0, + 144, 0, 0, 144, +}; +const short yycheck[] = { 10, + 10, 0, 41, 38, 41, 61, 41, 38, 41, 23, + 138, 94, 40, 40, 142, 10, 30, 145, 100, 40, + 102, 10, 257, 10, 59, 36, 25, 38, 59, 40, + 41, 20, 56, 10, 116, 270, 271, 142, 94, 10, + 145, 94, 12, 38, 14, 69, 41, 10, 59, 36, + 61, 38, 41, 40, 41, 94, 123, 94, 262, 141, + 49, 274, 76, 10, 59, 54, 125, 38, 272, 273, + 41, 10, 59, 36, 271, 38, 41, 40, 41, 125, + 125, 25, 76, 94, 15, 96, 28, 4, 59, 6, + 125, -1, 125, -1, -1, 10, 59, 36, -1, 38, + 17, 40, 41, 20, -1, -1, 120, -1, 97, 96, + -1, -1, 123, 123, 125, -1, -1, -1, -1, 10, + 59, 36, -1, 38, -1, 40, 41, -1, 10, -1, + 125, -1, 49, 96, -1, -1, 123, -1, 125, -1, + -1, -1, -1, 10, 59, 36, -1, 38, -1, 40, + 41, 10, -1, -1, 125, -1, 38, 96, -1, 41, + 123, -1, 125, 10, 262, 263, -1, 84, 59, -1, + -1, 38, 89, -1, 272, 273, -1, 59, -1, 38, + -1, 96, 41, -1, -1, -1, 125, -1, -1, -1, + -1, 38, 59, -1, -1, -1, 10, -1, -1, -1, + 59, -1, -1, -1, -1, 96, -1, -1, -1, -1, + 125, -1, 59, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 257, -1, 38, -1, 257, 41, -1, 264, + 269, -1, 123, -1, 125, 270, 271, -1, -1, 270, + 271, -1, -1, 125, -1, 59, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, + 271, 272, 273, -1, 275, 276, 277, 278, 279, 264, + 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 264, 275, 276, + 277, 278, 279, 264, 257, 258, 259, 260, 261, 262, + 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 125, 275, 276, 277, 278, 279, 264, 257, 258, + 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, + 269, 270, 271, 272, 273, -1, 275, 276, 277, 278, + 279, -1, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, -1, + 275, 276, 277, 278, 279, 10, 257, 258, 259, 260, + 261, -1, 263, 264, 265, 266, 267, 268, 269, 270, + 271, 272, 264, -1, 275, 276, 277, 278, 279, 10, + 257, 36, -1, 38, -1, 40, 41, 264, 257, -1, + -1, -1, -1, 270, 271, 10, -1, -1, -1, -1, + 257, 270, 271, 10, 59, 36, -1, 38, -1, 40, + 41, 2, -1, 270, 271, -1, -1, -1, -1, 10, + 11, -1, 64, 38, -1, 10, 41, -1, 59, 36, + -1, 38, -1, 40, 41, 77, 78, 79, -1, 30, + 264, 96, -1, -1, 59, -1, -1, 10, -1, -1, + -1, 36, 59, -1, -1, 40, 41, -1, -1, -1, + -1, -1, -1, -1, 55, 96, -1, -1, 123, 10, + 125, 62, 63, 36, -1, 117, -1, 40, -1, 70, + -1, 123, -1, 74, -1, -1, 10, -1, -1, 96, + 132, -1, 83, 135, 125, 36, 59, -1, -1, 40, + 41, 10, -1, -1, -1, -1, -1, -1, -1, -1, + 125, 96, -1, -1, 38, -1, 123, 41, 125, -1, + -1, -1, -1, -1, -1, -1, -1, 36, 10, -1, + -1, 40, -1, 96, -1, 59, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 10, -1, -1, + -1, -1, -1, -1, -1, 96, 38, -1, -1, 41, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 10, -1, -1, -1, -1, 38, -1, 59, 41, -1, + -1, -1, -1, -1, -1, -1, -1, 96, -1, -1, + -1, -1, -1, -1, -1, -1, 59, -1, 38, -1, + -1, 125, 257, 258, 259, -1, 261, 262, -1, 264, + 265, 266, 267, 268, 123, 270, 271, 272, 273, 59, + 275, 276, 277, 278, 279, -1, 257, 258, 259, 260, + 261, -1, 263, 264, 265, 266, 267, 268, 269, 270, + 271, 272, -1, 125, 275, 276, 277, 278, 279, 264, + 257, 258, 259, -1, 261, 262, -1, 264, 265, 266, + 267, 268, 125, 270, 271, 272, 273, -1, 275, 276, + 277, 278, 279, 258, 259, 260, 261, -1, 263, -1, + 265, 266, 267, 268, 269, 125, -1, 272, -1, -1, + 275, 276, 277, 278, 279, 258, 259, 260, 261, -1, + 263, -1, 265, 266, 267, 268, 269, -1, -1, 272, + -1, 10, 275, 276, 277, 278, 279, 258, 259, 260, + 261, -1, 263, 10, 265, 266, 267, 268, 269, -1, + -1, 272, -1, 257, 275, 276, 277, 278, 279, 38, + 264, -1, 41, 10, -1, -1, 270, 271, 10, 258, + 259, 38, 261, 262, 41, -1, 265, 266, 267, 268, + 59, -1, 10, 272, 273, -1, 275, 276, 277, 278, + 279, 38, 59, -1, 41, 257, 38, -1, 10, 41, + -1, -1, 264, -1, -1, -1, -1, 10, 270, 271, + 38, -1, 59, 41, 257, -1, -1, 59, -1, -1, + -1, 264, -1, -1, 10, -1, 38, 270, 271, 41, + -1, 59, 10, -1, -1, 38, -1, 257, 41, -1, + -1, -1, -1, -1, -1, -1, 125, 59, -1, -1, + 270, 271, 38, -1, -1, 41, 59, -1, 125, -1, + 38, -1, -1, 41, -1, -1, -1, -1, -1, -1, + -1, 36, -1, 59, -1, 40, -1, -1, 125, -1, + -1, 59, -1, 125, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 36, -1, -1, 125, 40, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 125, -1, -1, -1, -1, -1, 36, + -1, -1, 125, 40, -1, -1, -1, -1, -1, -1, + -1, 96, -1, -1, -1, -1, -1, -1, -1, 125, + -1, -1, -1, -1, -1, 36, -1, 125, -1, 40, + -1, -1, 94, -1, 96, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 36, -1, -1, + -1, 40, 41, -1, -1, -1, -1, -1, 257, 96, + -1, 123, -1, -1, -1, 264, -1, -1, -1, 36, + 257, 270, 271, 40, 41, -1, -1, 264, -1, -1, + -1, -1, -1, 270, 271, 96, 123, -1, -1, -1, + 257, -1, 36, -1, -1, 257, 40, -1, -1, -1, + -1, -1, 264, 270, 271, -1, -1, 96, 270, 257, + -1, -1, 123, -1, -1, -1, 264, -1, -1, -1, + -1, -1, 270, -1, -1, 257, 36, -1, -1, 96, + 40, -1, 264, -1, 257, -1, -1, -1, 270, -1, + -1, 264, -1, -1, -1, -1, -1, 270, -1, 36, + -1, 257, 96, 40, -1, -1, -1, -1, 264, 257, + -1, -1, -1, -1, 270, -1, 264, -1, -1, -1, + -1, -1, 270, 258, 259, 260, 261, 262, 263, 123, + 265, 266, 267, 268, 269, -1, 96, 272, 273, -1, + 275, 276, 277, 278, 279, -1, 258, 259, 260, 261, + -1, 263, -1, 265, 266, 267, 268, 269, -1, 96, + 272, -1, -1, 275, 276, 277, 278, 279, -1, 256, + -1, 258, 259, -1, 261, 262, -1, -1, 265, 266, + 267, 268, -1, -1, -1, 272, 273, -1, 275, 276, + 277, 278, 279, -1, -1, -1, -1, 258, 259, 260, + 261, -1, 263, -1, 265, 266, 267, 268, 269, 36, + -1, 272, -1, 40, 275, 276, 277, 278, 279, 258, + 259, 260, 261, -1, 263, -1, 265, 266, 267, 268, + 269, -1, -1, 272, -1, -1, 275, 276, 277, 278, + 279, 258, 259, 260, 261, -1, 263, -1, 265, 266, + 267, 268, 269, -1, -1, 272, -1, -1, 275, 276, + 277, 278, 279, -1, 258, 259, 260, 261, 262, 96, + -1, 265, 266, 267, 268, -1, -1, -1, 272, 273, + -1, 275, 276, 277, 278, 279, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 123, -1, 258, 259, + 260, 261, -1, 263, -1, 265, 266, 267, 268, 269, + -1, -1, 272, -1, -1, 275, 276, 277, 278, 279, + -1, 258, 259, 260, 261, -1, 263, -1, 265, 266, + 267, 268, 269, -1, -1, 272, -1, -1, 275, 276, + 277, 278, 279, -1, -1, -1, 0, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, + -1, -1, -1, -1, 18, -1, -1, -1, 22, -1, + -1, 25, -1, -1, -1, 29, -1, -1, -1, -1, + 22, -1, -1, 25, -1, -1, -1, 29, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 51, -1, -1, + -1, -1, 56, -1, -1, -1, -1, 61, -1, 51, + -1, -1, -1, -1, -1, 69, -1, -1, -1, 61, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 258, 259, -1, 261, 262, -1, -1, 265, 266, + 267, 268, -1, 97, -1, 272, 273, 101, 275, 276, + 277, 278, 279, -1, -1, 97, 110, 111, 112, 101, + -1, -1, -1, -1, -1, -1, -1, -1, 110, 111, + 112, -1, -1, -1, -1, -1, -1, 131, -1, -1, + -1, -1, -1, 137, 138, 139, -1, -1, 142, 131, + -1, 145, -1, -1, -1, 137, 138, 139, -1, -1, + 142, -1, -1, 145, +}; +#define YYFINAL 21 +#ifndef YYDEBUG +#define YYDEBUG 0 +#endif +#define YYMAXTOKEN 280 +#if YYDEBUG +const char * const yyname[] = { +"end-of-file",0,0,0,0,0,0,0,0,0,"'\\n'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,"'$'",0,"'&'",0,"'('","')'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"';'",0, +"'='",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"'^'",0, +"'`'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"'{'",0,"'}'",0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,"ANDAND","BACKBACK","BANG","CASE","COUNT","DUP","ELSE","END", +"FLAT","FN","FOR","IF","IN","OROR","PIPE","REDIR","SREDIR","SUB","SUBSHELL", +"SWITCH","TWIDDLE","WHILE","WORD","HUH", +}; +const char * const yyrule[] = { +"$accept : rc", +"rc : line end", +"rc : error end", +"end : END", +"end : '\\n'", +"cmdsa : cmd ';'", +"cmdsa : cmd '&'", +"line : cmd", +"line : cmdsa line", +"body : cmd", +"body : cmdsan body", +"cmdsan : cmdsa", +"cmdsan : cmd '\\n'", +"brace : '{' body '}'", +"paren : '(' body ')'", +"assign : first '=' word", +"epilog :", +"epilog : redir epilog", +"redir : DUP", +"redir : REDIR word", +"redir : SREDIR word", +"case : CASE words ';'", +"case : CASE words '\\n'", +"cbody : cmd", +"cbody : case cbody", +"cbody : cmdsan cbody", +"iftail : cmd", +"iftail : brace ELSE optnl cmd", +"cmd :", +"cmd : simple", +"cmd : brace epilog", +"cmd : IF paren optnl iftail", +"cmd : FOR '(' word IN words ')' optnl cmd", +"cmd : FOR '(' word ')' optnl cmd", +"cmd : WHILE paren optnl cmd", +"cmd : SWITCH '(' word ')' optnl '{' cbody '}'", +"cmd : TWIDDLE optcaret word words", +"cmd : cmd ANDAND optnl cmd", +"cmd : cmd OROR optnl cmd", +"cmd : cmd PIPE optnl cmd", +"cmd : redir cmd", +"cmd : assign cmd", +"cmd : BANG optcaret cmd", +"cmd : SUBSHELL optcaret cmd", +"cmd : FN words brace", +"cmd : FN words", +"optcaret :", +"optcaret : '^'", +"simple : first", +"simple : simple word", +"simple : simple redir", +"first : comword", +"first : first '^' sword", +"sword : comword", +"sword : keyword", +"word : sword", +"word : word '^' sword", +"comword : '$' sword", +"comword : '$' sword SUB words ')'", +"comword : COUNT sword", +"comword : FLAT sword", +"comword : '`' sword", +"comword : '`' brace", +"comword : BACKBACK word brace", +"comword : BACKBACK word sword", +"comword : '(' nlwords ')'", +"comword : REDIR brace", +"comword : WORD", +"keyword : FOR", +"keyword : IN", +"keyword : WHILE", +"keyword : IF", +"keyword : SWITCH", +"keyword : FN", +"keyword : ELSE", +"keyword : CASE", +"keyword : TWIDDLE", +"keyword : BANG", +"keyword : SUBSHELL", +"words :", +"words : words word", +"nlwords :", +"nlwords : nlwords '\\n'", +"nlwords : nlwords word", +"optnl :", +"optnl : optnl '\\n'", +}; +#endif +#if YYDEBUG +#include <stdio.h> +#endif +#ifdef YYSTACKSIZE +#undef YYMAXDEPTH +#define YYMAXDEPTH YYSTACKSIZE +#else +#ifdef YYMAXDEPTH +#define YYSTACKSIZE YYMAXDEPTH +#else +#define YYSTACKSIZE 10000 +#define YYMAXDEPTH 10000 +#endif +#endif +#define YYINITSTACKSIZE 200 +int yydebug; +int yynerrs; +int yyerrflag; +int yychar; +short *yyssp; +YYSTYPE *yyvsp; +YYSTYPE yyval; +YYSTYPE yylval; +short *yyss; +short *yysslim; +YYSTYPE *yyvs; +int yystacksize; +#line 167 "parse.y" + +void initparse() { + star = treecpy(mk(nVar, mk(nWord,"*", NULL, FALSE)), ealloc); + nolist = treecpy(mk(nVar, mk(nWord,"ifs", NULL, FALSE)), ealloc); +} + +#line 583 "y.tab.c" +/* allocate initial stack or double stack size, up to YYMAXDEPTH */ +static int yygrowstack() +{ + int newsize, i; + short *newss; + YYSTYPE *newvs; + + if ((newsize = yystacksize) == 0) + newsize = YYINITSTACKSIZE; + else if (newsize >= YYMAXDEPTH) + return -1; + else if ((newsize *= 2) > YYMAXDEPTH) + newsize = YYMAXDEPTH; + i = yyssp - yyss; + newss = yyss ? (short *)realloc(yyss, newsize * sizeof *newss) : + (short *)malloc(newsize * sizeof *newss); + if (newss == NULL) + return -1; + yyss = newss; + yyssp = newss + i; + newvs = yyvs ? (YYSTYPE *)realloc(yyvs, newsize * sizeof *newvs) : + (YYSTYPE *)malloc(newsize * sizeof *newvs); + if (newvs == NULL) + return -1; + yyvs = newvs; + yyvsp = newvs + i; + yystacksize = newsize; + yysslim = yyss + newsize - 1; + return 0; +} + +#define YYABORT goto yyabort +#define YYREJECT goto yyabort +#define YYACCEPT goto yyaccept +#define YYERROR goto yyerrlab + +#ifndef YYPARSE_PARAM +#if defined(__cplusplus) || __STDC__ +#define YYPARSE_PARAM_ARG void +#define YYPARSE_PARAM_DECL +#else /* ! ANSI-C/C++ */ +#define YYPARSE_PARAM_ARG +#define YYPARSE_PARAM_DECL +#endif /* ANSI-C/C++ */ +#else /* YYPARSE_PARAM */ +#ifndef YYPARSE_PARAM_TYPE +#define YYPARSE_PARAM_TYPE void * +#endif +#if defined(__cplusplus) || __STDC__ +#define YYPARSE_PARAM_ARG YYPARSE_PARAM_TYPE YYPARSE_PARAM +#define YYPARSE_PARAM_DECL +#else /* ! ANSI-C/C++ */ +#define YYPARSE_PARAM_ARG YYPARSE_PARAM +#define YYPARSE_PARAM_DECL YYPARSE_PARAM_TYPE YYPARSE_PARAM; +#endif /* ANSI-C/C++ */ +#endif /* ! YYPARSE_PARAM */ + +int +yyparse (YYPARSE_PARAM_ARG) + YYPARSE_PARAM_DECL +{ + register int yym, yyn, yystate; +#if YYDEBUG + register const char *yys; + + if ((yys = getenv("YYDEBUG"))) + { + yyn = *yys; + if (yyn >= '0' && yyn <= '9') + yydebug = yyn - '0'; + } +#endif + + yynerrs = 0; + yyerrflag = 0; + yychar = (-1); + + if (yyss == NULL && yygrowstack()) goto yyoverflow; + yyssp = yyss; + yyvsp = yyvs; + *yyssp = yystate = 0; + +yyloop: + if ((yyn = yydefred[yystate])) goto yyreduce; + if (yychar < 0) + { + if ((yychar = yylex()) < 0) yychar = 0; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, reading %d (%s)\n", + YYPREFIX, yystate, yychar, yys); + } +#endif + } + if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yychar) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, shifting to state %d\n", + YYPREFIX, yystate, yytable[yyn]); +#endif + if (yyssp >= yysslim && yygrowstack()) + { + goto yyoverflow; + } + *++yyssp = yystate = yytable[yyn]; + *++yyvsp = yylval; + yychar = (-1); + if (yyerrflag > 0) --yyerrflag; + goto yyloop; + } + if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yychar) + { + yyn = yytable[yyn]; + goto yyreduce; + } + if (yyerrflag) goto yyinrecovery; +#if defined(lint) || defined(__GNUC__) + goto yynewerror; +#endif +yynewerror: + yyerror("syntax error"); +#if defined(lint) || defined(__GNUC__) + goto yyerrlab; +#endif +yyerrlab: + ++yynerrs; +yyinrecovery: + if (yyerrflag < 3) + { + yyerrflag = 3; + for (;;) + { + if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, error recovery shifting\ + to state %d\n", YYPREFIX, *yyssp, yytable[yyn]); +#endif + if (yyssp >= yysslim && yygrowstack()) + { + goto yyoverflow; + } + *++yyssp = yystate = yytable[yyn]; + *++yyvsp = yylval; + goto yyloop; + } + else + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: error recovery discarding state %d\n", + YYPREFIX, *yyssp); +#endif + if (yyssp <= yyss) goto yyabort; + --yyssp; + --yyvsp; + } + } + } + else + { + if (yychar == 0) goto yyabort; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, error recovery discards token %d (%s)\n", + YYPREFIX, yystate, yychar, yys); + } +#endif + yychar = (-1); + goto yyloop; + } +yyreduce: +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, reducing by rule %d (%s)\n", + YYPREFIX, yystate, yyn, yyrule[yyn]); +#endif + yym = yylen[yyn]; + yyval = yyvsp[1-yym]; + switch (yyn) + { +case 1: +#line 47 "parse.y" +{ parsetree = yyvsp[-1].node; YYACCEPT; } +break; +case 2: +#line 48 "parse.y" +{ yyerrok; parsetree = NULL; YYABORT; } +break; +case 3: +#line 51 "parse.y" +{ if (!heredoc(1)) YYABORT; } +break; +case 4: +#line 52 "parse.y" +{ if (!heredoc(0)) YYABORT; } +break; +case 6: +#line 56 "parse.y" +{ yyval.node = (yyvsp[-1].node != NULL ? mk(nNowait,yyvsp[-1].node) : yyvsp[-1].node); } +break; +case 8: +#line 60 "parse.y" +{ yyval.node = (yyvsp[-1].node != NULL ? mk(nBody,yyvsp[-1].node,yyvsp[0].node) : yyvsp[0].node); } +break; +case 10: +#line 64 "parse.y" +{ yyval.node = (yyvsp[-1].node == NULL ? yyvsp[0].node : yyvsp[0].node == NULL ? yyvsp[-1].node : mk(nBody,yyvsp[-1].node,yyvsp[0].node)); } +break; +case 12: +#line 67 "parse.y" +{ yyval.node = yyvsp[-1].node; if (!heredoc(0)) YYABORT; } +break; +case 13: +#line 69 "parse.y" +{ yyval.node = yyvsp[-1].node; } +break; +case 14: +#line 71 "parse.y" +{ yyval.node = yyvsp[-1].node; } +break; +case 15: +#line 73 "parse.y" +{ yyval.node = mk(nAssign,yyvsp[-2].node,yyvsp[0].node); } +break; +case 16: +#line 75 "parse.y" +{ yyval.node = NULL; } +break; +case 17: +#line 76 "parse.y" +{ yyval.node = mk(nEpilog,yyvsp[-1].node,yyvsp[0].node); } +break; +case 18: +#line 79 "parse.y" +{ yyval.node = mk(nDup,yyvsp[0].dup.type,yyvsp[0].dup.left,yyvsp[0].dup.right); } +break; +case 19: +#line 80 "parse.y" +{ yyval.node = mk(nRedir,yyvsp[-1].redir.type,yyvsp[-1].redir.fd,yyvsp[0].node); + if (yyvsp[-1].redir.type == rHeredoc && !qdoc(yyvsp[0].node, yyval.node)) YYABORT; /* queue heredocs up */ + } +break; +case 20: +#line 83 "parse.y" +{ yyval.node = mk(nRedir,yyvsp[-1].redir.type,yyvsp[-1].redir.fd,yyvsp[0].node); + if (yyvsp[-1].redir.type == rHeredoc && !qdoc(yyvsp[0].node, yyval.node)) YYABORT; /* queue heredocs up */ + } +break; +case 21: +#line 87 "parse.y" +{ yyval.node = mk(nCase, yyvsp[-1].node); } +break; +case 22: +#line 88 "parse.y" +{ yyval.node = mk(nCase, yyvsp[-1].node); } +break; +case 23: +#line 90 "parse.y" +{ yyval.node = mk(nCbody, yyvsp[0].node, NULL); } +break; +case 24: +#line 91 "parse.y" +{ yyval.node = mk(nCbody, yyvsp[-1].node, yyvsp[0].node); } +break; +case 25: +#line 92 "parse.y" +{ yyval.node = mk(nCbody, yyvsp[-1].node, yyvsp[0].node); } +break; +case 27: +#line 95 "parse.y" +{ yyval.node = mk(nElse,yyvsp[-3].node,yyvsp[0].node); } +break; +case 28: +#line 97 "parse.y" +{ yyval.node = NULL; } +break; +case 30: +#line 99 "parse.y" +{ yyval.node = mk(nBrace,yyvsp[-1].node,yyvsp[0].node); } +break; +case 31: +#line 100 "parse.y" +{ yyval.node = mk(nIf,yyvsp[-2].node,yyvsp[0].node); } +break; +case 32: +#line 101 "parse.y" +{ yyval.node = mk(nForin,yyvsp[-5].node,yyvsp[-3].node,yyvsp[0].node); } +break; +case 33: +#line 102 "parse.y" +{ yyval.node = mk(nForin,yyvsp[-3].node,star,yyvsp[0].node); } +break; +case 34: +#line 103 "parse.y" +{ yyval.node = mk(nWhile,yyvsp[-2].node,yyvsp[0].node); } +break; +case 35: +#line 104 "parse.y" +{ yyval.node = mk(nSwitch,yyvsp[-5].node,yyvsp[-1].node); } +break; +case 36: +#line 105 "parse.y" +{ yyval.node = mk(nMatch,yyvsp[-1].node,yyvsp[0].node); } +break; +case 37: +#line 106 "parse.y" +{ yyval.node = mk(nAndalso,yyvsp[-3].node,yyvsp[0].node); } +break; +case 38: +#line 107 "parse.y" +{ yyval.node = mk(nOrelse,yyvsp[-3].node,yyvsp[0].node); } +break; +case 39: +#line 108 "parse.y" +{ yyval.node = mk(nPipe,yyvsp[-2].pipe.left,yyvsp[-2].pipe.right,yyvsp[-3].node,yyvsp[0].node); } +break; +case 40: +#line 109 "parse.y" +{ yyval.node = (yyvsp[0].node != NULL ? mk(nPre,yyvsp[-1].node,yyvsp[0].node) : yyvsp[-1].node); } +break; +case 41: +#line 110 "parse.y" +{ yyval.node = (yyvsp[0].node != NULL ? mk(nPre,yyvsp[-1].node,yyvsp[0].node) : yyvsp[-1].node); } +break; +case 42: +#line 111 "parse.y" +{ yyval.node = mk(nBang,yyvsp[0].node); } +break; +case 43: +#line 112 "parse.y" +{ yyval.node = mk(nSubshell,yyvsp[0].node); } +break; +case 44: +#line 113 "parse.y" +{ yyval.node = mk(nNewfn,yyvsp[-1].node,yyvsp[0].node); } +break; +case 45: +#line 114 "parse.y" +{ yyval.node = mk(nRmfn,yyvsp[0].node); } +break; +case 49: +#line 120 "parse.y" +{ yyval.node = (yyvsp[0].node != NULL ? mk(nArgs,yyvsp[-1].node,yyvsp[0].node) : yyvsp[-1].node); } +break; +case 50: +#line 121 "parse.y" +{ yyval.node = mk(nArgs,yyvsp[-1].node,yyvsp[0].node); } +break; +case 52: +#line 124 "parse.y" +{ yyval.node = mk(nConcat,yyvsp[-2].node,yyvsp[0].node); } +break; +case 54: +#line 127 "parse.y" +{ yyval.node = mk(nWord, yyvsp[0].keyword, NULL, FALSE); } +break; +case 56: +#line 130 "parse.y" +{ yyval.node = mk(nConcat,yyvsp[-2].node,yyvsp[0].node); } +break; +case 57: +#line 132 "parse.y" +{ yyval.node = mk(nVar,yyvsp[0].node); } +break; +case 58: +#line 133 "parse.y" +{ yyval.node = mk(nVarsub,yyvsp[-3].node,yyvsp[-1].node); } +break; +case 59: +#line 134 "parse.y" +{ yyval.node = mk(nCount,yyvsp[0].node); } +break; +case 60: +#line 135 "parse.y" +{ yyval.node = mk(nFlat, yyvsp[0].node); } +break; +case 61: +#line 136 "parse.y" +{ yyval.node = mk(nBackq,nolist,yyvsp[0].node); } +break; +case 62: +#line 137 "parse.y" +{ yyval.node = mk(nBackq,nolist,yyvsp[0].node); } +break; +case 63: +#line 138 "parse.y" +{ yyval.node = mk(nBackq,yyvsp[-1].node,yyvsp[0].node); } +break; +case 64: +#line 139 "parse.y" +{ yyval.node = mk(nBackq,yyvsp[-1].node,yyvsp[0].node); } +break; +case 65: +#line 140 "parse.y" +{ yyval.node = yyvsp[-1].node; } +break; +case 66: +#line 141 "parse.y" +{ yyval.node = mk(nNmpipe,yyvsp[-1].redir.type,yyvsp[-1].redir.fd,yyvsp[0].node); } +break; +case 67: +#line 142 "parse.y" +{ yyval.node = mk(nWord, yyvsp[0].word.w, yyvsp[0].word.m, yyvsp[0].word.q); } +break; +case 68: +#line 144 "parse.y" +{ yyval.keyword = "for"; } +break; +case 69: +#line 145 "parse.y" +{ yyval.keyword = "in"; } +break; +case 70: +#line 146 "parse.y" +{ yyval.keyword = "while"; } +break; +case 71: +#line 147 "parse.y" +{ yyval.keyword = "if"; } +break; +case 72: +#line 148 "parse.y" +{ yyval.keyword = "switch"; } +break; +case 73: +#line 149 "parse.y" +{ yyval.keyword = "fn"; } +break; +case 74: +#line 150 "parse.y" +{ yyval.keyword = "else"; } +break; +case 75: +#line 151 "parse.y" +{ yyval.keyword = "case"; } +break; +case 76: +#line 152 "parse.y" +{ yyval.keyword = "~"; } +break; +case 77: +#line 153 "parse.y" +{ yyval.keyword = "!"; } +break; +case 78: +#line 154 "parse.y" +{ yyval.keyword = "@"; } +break; +case 79: +#line 156 "parse.y" +{ yyval.node = NULL; } +break; +case 80: +#line 157 "parse.y" +{ yyval.node = (yyvsp[-1].node != NULL ? (yyvsp[0].node != NULL ? mk(nLappend,yyvsp[-1].node,yyvsp[0].node) : yyvsp[-1].node) : yyvsp[0].node); } +break; +case 81: +#line 159 "parse.y" +{ yyval.node = NULL; } +break; +case 83: +#line 161 "parse.y" +{ yyval.node = (yyvsp[-1].node != NULL ? (yyvsp[0].node != NULL ? mk(nLappend,yyvsp[-1].node,yyvsp[0].node) : yyvsp[-1].node) : yyvsp[0].node); } +break; +#line 1062 "y.tab.c" + } + yyssp -= yym; + yystate = *yyssp; + yyvsp -= yym; + yym = yylhs[yyn]; + if (yystate == 0 && yym == 0) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: after reduction, shifting from state 0 to\ + state %d\n", YYPREFIX, YYFINAL); +#endif + yystate = YYFINAL; + *++yyssp = YYFINAL; + *++yyvsp = yyval; + if (yychar < 0) + { + if ((yychar = yylex()) < 0) yychar = 0; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, reading %d (%s)\n", + YYPREFIX, YYFINAL, yychar, yys); + } +#endif + } + if (yychar == 0) goto yyaccept; + goto yyloop; + } + if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yystate) + yystate = yytable[yyn]; + else + yystate = yydgoto[yym]; +#if YYDEBUG + if (yydebug) + printf("%sdebug: after reduction, shifting from state %d \ +to state %d\n", YYPREFIX, *yyssp, yystate); +#endif + if (yyssp >= yysslim && yygrowstack()) + { + goto yyoverflow; + } + *++yyssp = yystate; + *++yyvsp = yyval; + goto yyloop; +yyoverflow: + yyerror("yacc stack overflow"); +yyabort: + return (1); +yyaccept: + return (0); +} diff --git a/parse.h b/parse.h @@ -0,0 +1,37 @@ +#ifndef YYERRCODE +#define YYERRCODE 256 +#endif + +#define ANDAND 257 +#define BACKBACK 258 +#define BANG 259 +#define CASE 260 +#define COUNT 261 +#define DUP 262 +#define ELSE 263 +#define END 264 +#define FLAT 265 +#define FN 266 +#define FOR 267 +#define IF 268 +#define IN 269 +#define OROR 270 +#define PIPE 271 +#define REDIR 272 +#define SREDIR 273 +#define SUB 274 +#define SUBSHELL 275 +#define SWITCH 276 +#define TWIDDLE 277 +#define WHILE 278 +#define WORD 279 +#define HUH 280 +typedef union { + struct Node *node; + struct Redir redir; + struct Pipe pipe; + struct Dup dup; + struct Word word; + char *keyword; +} YYSTYPE; +extern YYSTYPE yylval; diff --git a/random.pl b/random.pl @@ -0,0 +1,15 @@ +#! /usr/bin/perl + +$count = 10; +$size = rand(1000); + +for ($i = 0; $i < $count; ++$i) { + open OUT, "> t$i" or die; + for ($j = 0; $j < $size; ++$j) { + printf OUT "%c", rand(256); + } + close OUT; + $cmd = "./rc t$i"; + print $cmd, "\n"; + system $cmd; +} diff --git a/rc.spec b/rc.spec @@ -0,0 +1,31 @@ +%define name rc +%define version 1.7.1 +%define release 1 + +Summary: rc - the Plan 9 and Tenth Edition shell +Name: %name +Version: %version +Release: %release +Group: Shells +License: distributable +Source0: http://www.libra-aries-books.co.uk/software/rc/release/%name-%version.tar.gz +Buildroot: /var/tmp/%{name}-rpmroot + +%description +This is a reimplementation for Unix, by Byron Rakitzis, of the Plan 9 +shell. rc offers much the same capabilities as a traditional Bourne +shell, but with a much cleaner syntax. + +%prep +%setup + +%build +sh configure --with-readline --prefix "$RPM_BUILD_ROOT" --mandir "$RPM_BUILD_ROOT/usr/share/man" +make + +%install +make install + +%files +/bin/rc +/usr/share/man/man1/rc.1.gz diff --git a/slow b/slow @@ -0,0 +1,11 @@ +for (i in 0 1 2 3 4 5 6 7 8 9) { + x=() + y=() + for (j in 0 1 2 3 4 5 6 7 8 9) + for (k in 0 1 2 3 4 5 6 7 8 9) + for (l in 0 1 2 3 4 5 6 7 8 9) { + x = $x^. + y = ($y $x) + } + echo $#y +} diff --git a/stamp-h b/stamp-h @@ -0,0 +1 @@ +timestamp diff --git a/stamp-h.in b/stamp-h.in @@ -0,0 +1 @@ +timestamp diff --git a/testcld.c b/testcld.c @@ -0,0 +1,19 @@ +#include <errno.h> +#include <signal.h> +#include <sys/types.h> +#include <sys/wait.h> +#include <unistd.h> +int main(void) { + int i; + sigset(SIGCLD, SIG_IGN); + switch (fork()) { + case -1: + return 1; + case 0: + return 0; + default: + sleep(1); + if (wait(&i) == -1 && errno == ECHILD) return 0; + else return 1; + } +} diff --git a/tmp b/tmp @@ -0,0 +1,2 @@ +x=('#' '#' '#') +eval z^`{whatis -v x} >[2]/dev/null diff --git a/version.c.in b/version.c.in @@ -1 +0,0 @@ -const char id[] = "@(#)@PACKAGE@ version @VERSION@, @RELDATE@.";