]> git.mdlowis.com Git - proto/rc.git/commitdiff
coalesced some headers and deleted some unused files
authorMichael D. Lowis <mike@mdlowis.com>
Tue, 14 Mar 2017 01:20:18 +0000 (21:20 -0400)
committerMichael D. Lowis <mike@mdlowis.com>
Tue, 14 Mar 2017 01:20:18 +0000 (21:20 -0400)
35 files changed:
Makefile
Makefile.am [deleted file]
Makefile.in [deleted file]
builtins.c
edit-edit.c [deleted file]
edit-editline.c [deleted file]
edit-readline.c [deleted file]
edit-vrl.c [deleted file]
edit.c [moved from edit-null.c with 96% similarity]
edit.h [deleted file]
except.c
exec.c
fn.c
footobar.c
hash.c
heredoc.c
history.c [deleted file]
input.c
input.h [deleted file]
jbwrap.h [deleted file]
lex.c
main.c
proto.h
rc.h
rlimit.h [deleted file]
sigmsgs.c [new file with mode: 0644]
signal.c
status.c
system-bsd.c [deleted file]
tripping.c [deleted file]
utils.c
var.c
wait.c
wait.h [deleted file]
walk.c

index 97be0b1cc24c56f45fc2c056307006838940be4c..1c013baf4ca7826888efb8229782959f04ee2d63 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,9 @@
 CPPFLAGS = -I.
 CCCMD = $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LDLIBS)
-RCOBJS = builtins.o except.o builtins.o except.o exec.o fn.o footobar.o getopt.o glob.o glom.o hash.o heredoc.o input.o lex.o list.o main.o match.o nalloc.o open.o parse.o print.o redir.o signal.o status.o tree.o utils.o var.o wait.o walk.o which.o sigmsgs.o edit-null.o system.o
+RCOBJS = builtins.o except.o exec.o fn.o footobar.o getopt.o glob.o glom.o hash.o heredoc.o input.o lex.o list.o main.o match.o nalloc.o open.o parse.o print.o redir.o signal.o status.o tree.o utils.o var.o wait.o walk.o which.o sigmsgs.o edit.o system.o
 
 all: rc
 
-# Generate signal messages
-mksignal: mksignal.o
-sigmsgs.c sigmsgs.h: mksignal
-       ./mksignal
-builtins.o: sigmsgs.h
-
 # Generate mkstatval
 mkstatval: mkstatval.o
 statval.h: mkstatval
@@ -20,4 +14,28 @@ rc: $(RCOBJS)
        $(CCCMD)
 
 clean:
-       $(RM) rc *.o mksignal mkstatval sigmsgs.* statval.h
+       $(RM) rc *.o mkstatval statval.h
+
+
+#sigmsgs.o   # generated 
+#edit-null.o # selected by autoconf
+#system.o    # selected by autoconf
+
+# line editing config
+#edit-edit.c
+#edit-editline.c
+#edit-null.c
+#edit-readline.c
+#edit-vrl.c
+#history.c
+
+# system configs
+#system-bsd.c
+#system.c
+
+# helper utils
+#mksignal.c
+#mkstatval.c
+
+# unused
+#tripping.c
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644 (file)
index 00c5dff..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-EDIT=@EDIT@
-
-if AMC_HISTORY
-man_MANS = rc.1 history.1
-HISTORY = history
-else
-man_MANS = rc.1
-endif
-
-if AMC_NO_HASHBANG
-EXECVE = execve.o
-endif
-
-if AMC_RESTART
-SYSTEM = system-bsd.o
-else
-SYSTEM = system.o
-endif
-
-bin_PROGRAMS = rc
-noinst_PROGRAMS = mksignal mkstatval tripping $(HISTORY)
-
-rc_SOURCES = builtins.c except.c exec.c fn.c footobar.c getopt.c glob.c glom.c hash.c heredoc.c input.c lex.c list.c main.c match.c nalloc.c open.c parse.c print.c redir.c signal.c status.c tree.c utils.c var.c wait.c walk.c which.c
-
-EXTRA_rc_SOURCES = addon.c edit-edit.c edit-editline.c edit-null.c edit-readline.c edit-vrl.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 addon.c addon.h history.1 parse.y rc.1 trip.rc
-
-sigmsgs.c sigmsgs.h: mksignal
-       ./mksignal
-
-# Newer automake's buildtime dependency tracking can't seem to figure
-# this one out.
-status.o: statval.h
-
-statval.h: mkstatval
-       ./mkstatval > statval.h
-
-DISTCLEANFILES = sigmsgs.c sigmsgs.h statval.h
-
-# Of course, parse.c and parse.h depend on parse.y.  However, unless
-# you're hacking on rc's grammar, it's not useful to have this
-# dependency expressed, since the distributed parse.[ch] (generated with
-# byacc, and lightly edited to remove a couple of gcc warnings) are
-# portable (I hope).
-#parse.c parse.h: $(srcdir)/parse.y
-#      $(YACC) -d $(srcdir)/parse.y
-#      mv y.tab.c parse.c
-#      mv y.tab.h parse.h
-
-check: trip
-
-trip: rc tripping
-       ./rc -p < $(srcdir)/trip.rc
-
-install-exec-hook:
-if AMC_HISTORY
-       $(INSTALL_PROGRAM) history $(bindir)/- ;\
-       rm -f $(bindir)/--;  $(LN) $(bindir)/- $(bindir)/-- ;\
-       rm -f $(bindir)/-p;  $(LN) $(bindir)/- $(bindir)/-p ;\
-       rm -f $(bindir)/--p; $(LN) $(bindir)/- $(bindir)/--p
-endif
diff --git a/Makefile.in b/Makefile.in
deleted file mode 100644 (file)
index 8838aae..0000000
+++ /dev/null
@@ -1,955 +0,0 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2013 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__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
-am__make_running_with_option = \
-  case $${target_option-} in \
-      ?) ;; \
-      *) echo "am__make_running_with_option: internal error: invalid" \
-              "target option '$${target_option-}' specified" >&2; \
-         exit 1;; \
-  esac; \
-  has_opt=no; \
-  sane_makeflags=$$MAKEFLAGS; \
-  if $(am__is_gnu_make); then \
-    sane_makeflags=$$MFLAGS; \
-  else \
-    case $$MAKEFLAGS in \
-      *\\[\ \  ]*) \
-        bs=\\; \
-        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
-          | sed "s/$$bs$$bs[$$bs $$bs  ]*//g"`;; \
-    esac; \
-  fi; \
-  skip_next=no; \
-  strip_trailopt () \
-  { \
-    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
-  }; \
-  for flg in $$sane_makeflags; do \
-    test $$skip_next = yes && { skip_next=no; continue; }; \
-    case $$flg in \
-      *=*|--*) continue;; \
-        -*I) strip_trailopt 'I'; skip_next=yes;; \
-      -*I?*) strip_trailopt 'I';; \
-        -*O) strip_trailopt 'O'; skip_next=yes;; \
-      -*O?*) strip_trailopt 'O';; \
-        -*l) strip_trailopt 'l'; skip_next=yes;; \
-      -*l?*) strip_trailopt 'l';; \
-      -[dEDm]) skip_next=yes;; \
-      -[JT]) skip_next=yes;; \
-    esac; \
-    case $$flg in \
-      *$$target_option*) has_opt=yes; break;; \
-    esac; \
-  done; \
-  test $$has_opt = yes
-am__make_dryrun = (target_option=n; $(am__make_running_with_option))
-am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
-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 = INSTALL NEWS README AUTHORS ChangeLog \
-       $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-       $(top_srcdir)/configure $(am__configure_deps) \
-       $(srcdir)/config.h.in mkinstalldirs depcomp $(noinst_HEADERS) \
-       COPYING compile install-sh missing
-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)
-AM_V_P = $(am__v_P_@AM_V@)
-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo "  GEN     " $@;
-am__v_GEN_1 = 
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-am__v_at_1 = 
-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)
-AM_V_CC = $(am__v_CC_@AM_V@)
-am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
-am__v_CC_0 = @echo "  CC      " $@;
-am__v_CC_1 = 
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_@AM_V@)
-am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
-am__v_CCLD_0 = @echo "  CCLD    " $@;
-am__v_CCLD_1 = 
-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)
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
-       $(LISP)config.h.in
-# Read a list of newline-separated strings from the standard input,
-# and print each of them once, without duplicates.  Input order is
-# *not* preserved.
-am__uniquify_input = $(AWK) '\
-  BEGIN { nonempty = 0; } \
-  { items[$$0] = 1; nonempty = 1; } \
-  END { if (nonempty) { for (i in items) print i; }; } \
-'
-# Make sure the list of sources is unique.  This is necessary because,
-# e.g., the same source file might be shared among _SOURCES variables
-# for different programs/libraries.
-am__define_uniq_tagged_files = \
-  list='$(am__tagged_files)'; \
-  unique=`for i in $$list; do \
-    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-  done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-CSCOPE = cscope
-AM_RECURSIVE_TARGETS = cscope
-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
-am__post_remove_distdir = $(am__remove_distdir)
-DIST_ARCHIVES = $(distdir).tar.gz
-GZIP_ENV = --best
-DIST_TARGETS = dist-gzip
-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@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-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-edit.c edit-editline.c edit-null.c edit-readline.c edit-vrl.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 addon.c addon.h history.1 parse.y rc.1 trip.rc
-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
-       @test -f $@ || rm -f stamp-h1
-       @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
-
-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)
-       $(AM_V_CCLD)$(LINK) $(history_OBJECTS) $(history_LDADD) $(LIBS)
-
-mksignal$(EXEEXT): $(mksignal_OBJECTS) $(mksignal_DEPENDENCIES) $(EXTRA_mksignal_DEPENDENCIES) 
-       @rm -f mksignal$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(mksignal_OBJECTS) $(mksignal_LDADD) $(LIBS)
-
-mkstatval$(EXEEXT): $(mkstatval_OBJECTS) $(mkstatval_DEPENDENCIES) $(EXTRA_mkstatval_DEPENDENCIES) 
-       @rm -f mkstatval$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(mkstatval_OBJECTS) $(mkstatval_LDADD) $(LIBS)
-
-rc$(EXEEXT): $(rc_OBJECTS) $(rc_DEPENDENCIES) $(EXTRA_rc_DEPENDENCIES) 
-       @rm -f rc$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(rc_OBJECTS) $(rc_LDADD) $(LIBS)
-
-tripping$(EXEEXT): $(tripping_OBJECTS) $(tripping_DEPENDENCIES) $(EXTRA_tripping_DEPENDENCIES) 
-       @rm -f tripping$(EXEEXT)
-       $(AM_V_CCLD)$(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-edit.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edit-editline.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edit-null.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edit-readline.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edit-vrl.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@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
-
-.c.obj:
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(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: $(am__tagged_files)
-       $(am__define_uniq_tagged_files); mkid -fID $$unique
-tags: tags-am
-TAGS: tags
-
-tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-       set x; \
-       here=`pwd`; \
-       $(am__define_uniq_tagged_files); \
-       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-am
-
-CTAGS: ctags
-ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
-       $(am__define_uniq_tagged_files); \
-       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"
-cscope: cscope.files
-       test ! -s cscope.files \
-         || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
-clean-cscope:
-       -rm -f cscope.files
-cscope.files: clean-cscope cscopelist
-cscopelist: cscopelist-am
-
-cscopelist-am: $(am__tagged_files)
-       list='$(am__tagged_files)'; \
-       case "$(srcdir)" in \
-         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
-         *) sdir=$(subdir)/$(srcdir) ;; \
-       esac; \
-       for i in $$list; do \
-         if test -f "$$i"; then \
-           echo "$(subdir)/$$i"; \
-         else \
-           echo "$$sdir/$$i"; \
-         fi; \
-       done >> $(top_builddir)/cscope.files
-
-distclean-tags:
-       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-       -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
-
-distdir: $(DISTFILES)
-       $(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__post_remove_distdir)
-
-dist-bzip2: distdir
-       tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
-       $(am__post_remove_distdir)
-
-dist-lzip: distdir
-       tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
-       $(am__post_remove_distdir)
-
-dist-xz: distdir
-       tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
-       $(am__post_remove_distdir)
-
-dist-tarZ: distdir
-       @echo WARNING: "Support for shar distribution archives is" \
-                      "deprecated." >&2
-       @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
-       tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
-       $(am__post_remove_distdir)
-
-dist-shar: distdir
-       @echo WARNING: "Support for distribution archives compressed with" \
-                      "legacy program 'compress' is deprecated." >&2
-       @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
-       shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
-       $(am__post_remove_distdir)
-
-dist-zip: distdir
-       -rm -f $(distdir).zip
-       zip -rq $(distdir).zip $(distdir)
-       $(am__post_remove_distdir)
-
-dist dist-all:
-       $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
-       $(am__post_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.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 $(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 \
-           $(AM_DISTCHECK_CONFIGURE_FLAGS) \
-           $(DISTCHECK_CONFIGURE_FLAGS) \
-           --srcdir=.. --prefix="$$dc_install_base" \
-         && $(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__post_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 TAGS all all-am am--refresh check check-am clean \
-       clean-binPROGRAMS clean-cscope clean-generic \
-       clean-noinstPROGRAMS cscope cscopelist-am ctags ctags-am dist \
-       dist-all dist-bzip2 dist-gzip dist-lzip 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 tags-am 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:
index cd137c19408ca864a4e745f1867853641132691b..96a706562e06730abbe2882e77ecad97afc4813d 100644 (file)
 #include <setjmp.h>
 #include <errno.h>
 
-#include "input.h"
-#include "jbwrap.h"
-#include "rlimit.h"
-#include "sigmsgs.h"
-
 static void b_break(char **), b_cd(char **), b_eval(char **), b_exit(char **),
        b_newpgrp(char **), b_return(char **), b_shift(char **), b_umask(char **),
        b_wait(char **), b_whatis(char **), b_limit(char **), b_echo(char **);
@@ -265,7 +260,7 @@ static void b_wait(char **av) {
 
 static bool issig(char *s) {
        int i;
-       for (i = 0; i < NUMOFSIGNALS; i++)
+       for (i = 0; i < NSIG; i++)
                if (streq(s, signals[i].name))
                        return TRUE;
        return FALSE;
diff --git a/edit-edit.c b/edit-edit.c
deleted file mode 100644 (file)
index c2a5260..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-#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, size_t *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-editline.c b/edit-editline.c
deleted file mode 100644 (file)
index 85e3f40..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-#include "rc.h"
-
-#include <errno.h>
-#include <stdio.h>
-
-#include "editline.h"
-
-bool editing = 1;
-
-struct cookie {
-       char *buffer;
-};
-
-static char *prompt;
-
-void *edit_begin(int fd) {
-       List *hist;
-       struct cookie *c;
-
-        hist = varlookup("history");
-        if (hist != NULL)
-                if (read_history(hist->w) != 0 &&
-                               errno != ENOENT) /* ignore if missing */
-                        uerror(hist->w);
-
-       c = ealloc(sizeof *c);
-       c->buffer = NULL;
-       return c;
-}
-
-/*
-static void edit_catcher(int sig) {
-       write(2, "\n", 1);
-       rc_raise(eError);
-}
-
-*/
-
-char *edit_alloc(void *cookie, size_t *count) {
-       struct cookie *c = cookie;
-/*
-       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);
-*/
-
-       c->buffer = readline(prompt);
-       if (c->buffer) {
-               *count = strlen(c->buffer);
-               c->buffer[*count] = '\n';
-               ++*count;
-       }
-       return c->buffer;
-}
-
-/*
-static char *edit_prompter(ne *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) {
-       struct cookie *c = cookie;
-
-       efree(c->buffer);
-       c->buffer = NULL; /* allow "overfrees" */
-}
-
-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-readline.c b/edit-readline.c
deleted file mode 100644 (file)
index 6a997c5..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-#include "rc.h"
-
-#include <errno.h>
-#include <stdio.h>
-#include <readline/readline.h>
-#include <readline/history.h>
-#include <readline/rltypedefs.h>
-
-#include "edit.h"
-
-bool editing = 1;
-
-struct cookie {
-       char *buffer;
-};
-
-void *edit_begin(int fd) {
-       List *hist;
-       struct cookie *c;
-
-       rl_catch_signals = 0;
-       rl_completer_quote_characters = "'";
-       rl_filename_quote_characters = "\t\n !#$&'()*;<=>?@[\\]^`{|}~";
-
-       hist = varlookup("history");
-       if (hist != NULL)
-               if (read_history(hist->w) != 0 && errno != ENOENT) /* ignore if missing */
-                       uerror(hist->w);
-
-       c = ealloc(sizeof *c);
-       c->buffer = NULL;
-       return c;
-}
-
-static void edit_catcher(int sig) {
-       write(2, "\n", 1);
-       rc_raise(eError);
-}
-
-static char *prompt;
-
-char *edit_alloc(void *cookie, size_t *count) {
-       struct cookie *c = cookie;
-       void (*oldint)(int), (*oldquit)(int);
-
-       oldint = sys_signal(SIGINT, edit_catcher);
-       oldquit = sys_signal(SIGQUIT, edit_catcher);
-
-       c->buffer = readline(prompt);
-
-       sys_signal(SIGINT, oldint);
-       sys_signal(SIGQUIT, oldquit);
-
-       if (c->buffer) {
-               *count = strlen(c->buffer);
-               if (*count)
-                       add_history(c->buffer);
-               c->buffer[*count] = '\n';
-               ++*count; /* include the \n */
-       }
-       return c->buffer;
-}
-
-void edit_prompt(void *cookie, char *pr) {
-       prompt = pr;
-}
-
-void edit_free(void *cookie) {
-       struct cookie *c = cookie;
-
-       efree(c->buffer);
-       /* Set c->buffer to NULL, allowing us to "overfree" it.  This
-          is a bit of a kludge, but it's otherwise hard to deal with
-          the case where a signal causes an early return from
-          readline. */
-       c->buffer = NULL;
-}
-
-void edit_end(void *cookie) {
-       struct cookie *c = cookie;
-
-       efree(c);
-}
-
-void edit_reset(void *cookie) {
-       rl_reset_terminal(NULL);
-}
diff --git a/edit-vrl.c b/edit-vrl.c
deleted file mode 100644 (file)
index 5c8ab5a..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-#include "rc.h"
-
-#include <errno.h>
-#include <stdio.h>
-
-#include "edit.h"
-
-extern char *readline(char *);
-extern void add_history(char *);
-
-bool editing = 1;
-
-struct cookie {
-       char *buffer;
-};
-
-static char *prompt;
-
-void *edit_begin(int fd) {
-       List *hist;
-       struct cookie *c;
-
-
-        hist = varlookup("history");
-        if (hist != NULL)
-               ;
-               /* XXX will need to loop calling add_history() */
-
-       c = ealloc(sizeof *c);
-       c->buffer = NULL;
-       return c;
-}
-
-/*
-static void edit_catcher(int sig) {
-       write(2, "\n", 1);
-       rc_raise(eError);
-}
-
-*/
-
-char *edit_alloc(void *cookie, size_t *count) {
-       struct cookie *c = cookie;
-/*
-       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);
-*/
-
-       c->buffer = readline(prompt);
-       if (c->buffer) {
-               add_history(c->buffer);
-               *count = strlen(c->buffer);
-               c->buffer[*count] = '\n';
-               ++*count;
-       }
-       return c->buffer;
-}
-
-/*
-static char *edit_prompter(ne *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) {
-       struct cookie *c = cookie;
-
-       efree(c->buffer);
-       c->buffer = NULL; /* allow "overfrees" */
-}
-
-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);
-}
similarity index 96%
rename from edit-null.c
rename to edit.c
index e3cbe13eb28a00f6001ed69aca5733820e37e8cc..c583cdf9fe2c9f87e73a6dd4f3642bf310bb2e97 100644 (file)
+++ b/edit.c
@@ -4,8 +4,6 @@
 
 #include <sys/types.h>
 
-#include "edit.h"
-
 bool editing = 0;
 
 void *edit_begin(int fd) {
diff --git a/edit.h b/edit.h
deleted file mode 100644 (file)
index 5f4eb5c..0000000
--- a/edit.h
+++ /dev/null
@@ -1,12 +0,0 @@
-extern bool editing;
-
-extern void *edit_begin(int fd);
-
-extern char *edit_alloc(void *, size_t *);
-extern void edit_free(void *);
-
-extern void edit_prompt(void *, char *);
-
-extern void edit_end(void *);
-
-extern void edit_reset(void *);
index 8f2067672d5a73850fa34f842f47fc8e27bd5a40..83951fbe92ac28e2fb55d338c0a430f001b7dc46 100644 (file)
--- a/except.c
+++ b/except.c
@@ -3,9 +3,6 @@
 #include <setjmp.h>
 #include <signal.h>
 
-#include "input.h"
-#include "jbwrap.h"
-
 /*
    A return goes back stack frames to the last return. A break does
    not. A signal goes to the last interactive level. (see below)
diff --git a/exec.c b/exec.c
index 08116e0f2eae71e8fa36f09d9e4f85fd809f6633..055e53f0eee1341d22acd9ff6552132ceab4fa0b 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -5,8 +5,6 @@
 #include <errno.h>
 #include <signal.h>
 
-#include "wait.h"
-
 /*
    Takes an argument list and does the appropriate thing (calls a
    builtin, calls a function, etc.)
diff --git a/fn.c b/fn.c
index 2aa6f9d8d1415b53f3b4804ff697fd9615840486..97e0b4353c02044d87f0c24610a13099ebd55660 100644 (file)
--- a/fn.c
+++ b/fn.c
@@ -8,13 +8,10 @@
 #include <signal.h>
 #include <errno.h>
 
-#include "input.h"
-#include "sigmsgs.h"
-
 static void fn_handler(int), dud_handler(int);
 
 static bool runexit = FALSE;
-static Node *handlers[NUMOFSIGNALS], null;
+static Node *handlers[NSIG], null;
 static void (*def_sigint)(int) = SIG_DFL;
 static void (*def_sigquit)(int) = SIG_DFL;
 static void (*def_sigterm)(int) = SIG_DFL;
@@ -28,7 +25,7 @@ extern void inithandler() {
        int i;
        null.type = nBody;
        null.u[0].p = null.u[1].p = NULL;
-       for (i = 1; i < NUMOFSIGNALS; i++)
+       for (i = 1; i < NSIG; i++)
                if (sighandlers[i] == SIG_IGN)
                        fnassign(signals[i].name, NULL); /* ignore incoming ignored signals */
        if (interactive || sighandlers[SIGINT] != SIG_IGN) {
@@ -66,7 +63,7 @@ extern void setsigdefaults(bool sysvbackground) {
           be taken not to set to SIG_DFL any signals which are being
           ignored.
        */
-       for (i = 1; i < NUMOFSIGNALS; i++)
+       for (i = 1; i < NSIG; i++)
                if (sighandlers[i] != SIG_IGN) {
                        handlers[i] = NULL;
                        switch (i) {
@@ -122,7 +119,7 @@ extern void rc_exit(int stat) {
 static void fn_handler(int s) {
        char *sig[2];
        int olderrno;
-       if (s < 1 || s >= NUMOFSIGNALS)
+       if (s < 1 || s >= NSIG)
                panic("unknown signal");
        olderrno = errno;
        sig[0] = signals[s].name;
@@ -150,7 +147,7 @@ extern void fnassign(char *name, Node *def) {
        if (strncmp(name, "sig", conststrlen("sig")) == 0) { /* slight optimization */
                if (streq(name, "sigexit"))
                        runexit = TRUE;
-               for (i = 1; i < NUMOFSIGNALS; i++) /* zero is a bogus signal */
+               for (i = 1; i < NSIG; i++) /* zero is a bogus signal */
                        if (streq(signals[i].name, name)) {
                                handlers[i] = newdef;
                                if (def == NULL)
@@ -214,7 +211,7 @@ extern char *fnlookup_string(char *name) {
 
 extern void fnrm(char *name) {
        int i;
-       for (i = 1; i < NUMOFSIGNALS; i++)
+       for (i = 1; i < NSIG; i++)
                if (streq(signals[i].name, name)) {
                        handlers[i] = NULL;
                        switch (i) {
@@ -238,7 +235,7 @@ extern void fnrm(char *name) {
 
 extern void whatare_all_signals() {
        int i;
-       for (i = 1; i < NUMOFSIGNALS; i++)
+       for (i = 1; i < NSIG; i++)
                if (*signals[i].name != '\0') {
                        if (sighandlers[i] == SIG_IGN)
                                fprint(1, "fn %s {}\n", signals[i].name);
index d6f6dfdf8558b08c99715fc7a12f6c0fe3507fa4..b445a33f43bf673bed821de23c4901bf271ac782 100644 (file)
@@ -5,8 +5,6 @@
 
 #include "rc.h"
 
-#include "input.h"
-
 /* protect an exported name from brain-dead shells */
 
 #if PROTECT_ENV
diff --git a/hash.c b/hash.c
index 5fafed26d6c00ead208d91710fb3a8e141b62a95..e66383d54c1e91e6c73b428897e1292d3ba96b61 100644 (file)
--- a/hash.c
+++ b/hash.c
@@ -9,7 +9,6 @@
 */
 
 #include "rc.h"
-#include "sigmsgs.h"
 
 static bool var_exportable(char *);
 static bool fn_exportable(char *);
@@ -266,7 +265,7 @@ static bool var_exportable(char *s) {
 static bool fn_exportable(char *s) {
        int i;
        if (strncmp(s, "sig", conststrlen("sig")) == 0) { /* small speed hack */
-               for (i = 0; i < NUMOFSIGNALS; i++)
+               for (i = 0; i < NSIG; i++)
                        if (streq(s, signals[i].name))
                                return FALSE;
                if (streq(s, "sigexit"))
index 348dc84db1e328ad418e6d46a9748fc2290acb49..27177784aaab41867d5644b364ce890e4552d2b2 100644 (file)
--- a/heredoc.c
+++ b/heredoc.c
@@ -2,8 +2,6 @@
 
 #include "rc.h"
 
-#include "input.h"
-
 struct Hq {
        Node *doc;
        char *name;
diff --git a/history.c b/history.c
deleted file mode 100644 (file)
index 1f22f2e..0000000
--- a/history.c
+++ /dev/null
@@ -1,347 +0,0 @@
-/*
-       history.c -- primitive history mechanism
-
-       Paul Haahr & Byron Rakitzis, July 1991.
-
-       This program mimics the att v8 = and == history programs.
-       The edit() algorithm was adapted from a similar program
-       that Boyd Roberts wrote, but otherwise all the code has
-       been written from scratch.
-
-       edit() was subsequently redone by Hugh Redelmeier in order
-       to correctly deal with tab characters in the source line.
-
-       BUGS:
-       There is an implicit assumption that commands are no
-       more than 1k characters long. 
-*/
-
-#include "rc.h"
-
-#include <stdio.h>
-
-static const char id[] = "$Release: @(#)" PACKAGE " " VERSION " " RELDATE " $";
-
-#define CHUNKSIZE 65536
-
-static struct {
-       char *old, *new;
-       int reps;       /* no. of repetitions. i.e. 1 means sub twice. */
-} *replace;
-
-static char **search, *progname, *history;
-static char me;        /* typically ':' or '-' */
-static bool editit = FALSE, printit = FALSE;
-static int nreplace = 0, nsearch = 0;
-static FILE *histfile;
-
-void *ealloc(size_t n) {
-       void *p = (void *) malloc(n);
-       if (p == NULL) {
-               perror("malloc");
-               exit(1);
-       }
-       return p;
-}
-
-void *erealloc(void *p, size_t n) {
-       p = (void *) realloc(p, n);
-       if (p == NULL) {
-               perror("realloc");
-               exit(1);
-       }
-       return p;
-}
-
-static char *newstr() {
-       return ealloc((size_t)1024);
-}
-
-static char *rc_basename(char *s) {
-       char *t = strrchr(s, '/');
-       return (t == NULL) ? s : t + 1;
-}
-
-/* stupid O(n^2) substring matching routine */
-
-static char *isin(char *target, char *pattern) {
-       size_t plen = strlen(pattern);
-       size_t tlen = strlen(target);
-       for (; tlen >= plen; target++, --tlen)
-               if (strncmp(target, pattern, plen) == 0)
-                       return target;
-       return NULL;
-}
-
-/* replace the first match in the string with "new" */
-static char *sub(char *s, char *old, char *new) {
-       char *t, *u;
-
-       t = isin(s, old);
-       if (!t)
-               return s;
-       u = newstr();
-
-       *t = '\0';
-       while (*old != '\0')
-               old++, t++;
-       strcpy(u, s);
-       strcat(u, new);
-       strcat(u, t);
-       return u;
-}
-
-static char *edit(char *s) {
-       char *final, *f, *end;
-       int col;
-       bool ins;
-       
-start:
-       fprintf(stderr, "%s\n", s);     
-       f = final = newstr();
-       end = s + strlen(s);
-       col = 0;
-       ins = FALSE;
-       
-       for (;; col++) {
-               int     c = getchar();
-
-               if (c == me && col == 0) {
-                       int     peekc = getchar();
-                       if (peekc == '\n')
-                               return NULL;
-                       ungetc(peekc, stdin);
-               }
-               if (c == '\n') {
-                       if (col == 0)
-                               return s;
-                       
-                       while (s < end) /* copy remainder of string */
-                               *f++ = *s++;
-                       *f = '\0';
-                       s = final;
-                       goto start;
-               } else if (ins || s>=end) {
-                       /* col need not be accurate -- tabs need not be interpreted */
-                       *f++ = c;
-               } else {
-                       switch (c) {
-                       case '+':
-                               while (s < end)
-                                       *f++ = *s++;
-                               *f = '\0';
-                               continue;
-                       case '%':
-                               c = ' ';
-                               /* FALLTHROUGH */
-                       default:
-                               *f++ = c;
-                               break;  
-                       case EOF:
-                               exit(1);
-                               /* NOTREACHED */
-                       case ' ':
-                               if (*s == '\t') {
-                                       int     oldcol = col;
-
-                                       for (;; col++) {
-                                               int     peekc;
-
-                                               if ((col&07) == 07) {
-                                                       *f++ = '\t';    /* we spaced past a tab */
-                                                       break;
-                                               }
-                                               peekc = getchar();
-                                               if (peekc != ' ') {
-                                                       ungetc(peekc, stdin);
-                                                       if (peekc != '\n') {
-                                                               /* we spaced partially into a tab */
-                                                               do {
-                                                                       *f++ = ' ';
-                                                                       oldcol++;
-                                                               } while (oldcol <= col);
-                                                       }
-                                                       break;
-                                               }
-                                       }
-                               } else {
-                                       *f++ = *s;
-                               }
-                               break;
-                       case '#':
-                               break;
-                       case '$':
-                               end = s;        /* truncate s */
-                               continue;       /* skip incrementing s */
-                       case '^':
-                               ins = TRUE;
-                               continue;       /* skip incrementing s */
-                       case '\t':
-                               for (;; col++) {
-                                       *f = s<end? *s++ : '\t';
-                                       if (*f++ == '\t') {
-                                               col = col | 07; /* advance to before next tabstop */
-                                       }
-                                       if ((col&07) == 07)     /* stop before tabstop */
-                                               break;
-                               }
-                               continue;       /* skip incrementing s */
-                       }
-                       if (s<end && (*s!='\t' || (col&07)==07))
-                               s++;
-               }
-       }
-}
-
-static char *readhistoryfile(char **last) {
-       char *buf;
-       size_t count, size;
-       long nread;
-
-       if ((history = getenv("history")) == NULL) {
-               fprintf(stderr, "$history not set\n");
-               exit(1);
-       }
-       histfile = fopen(history, "r+");
-       if (histfile == NULL) {
-               perror(history);
-               exit(1);
-       }
-
-       size = CHUNKSIZE;
-       buf = ealloc(size);
-       buf[0] = '\0'; count = 1; /* sentinel */
-       while ((nread = fread(buf + count, sizeof (char), size - count, histfile)) > 0) {
-               count += nread;
-               if (size - count == 0)
-                       buf = erealloc(buf, size *= 4);
-       }
-       if (nread == -1) {
-               perror(history);
-               exit(1);
-       }
-       *last = buf + count;
-       return buf;
-}
-
-static char *getcommand(void) {
-       char *s, *t;
-       static char *hist = NULL, *last;
-
-       if (hist == NULL) {
-               hist = readhistoryfile(&last);
-               *--last = '\0';         /* replaces final newline */
-               ++hist; /* start beyond sentinel */
-       }
-
-again: s = last;
-       if (s < hist)
-               return NULL;
-       while (s >= hist && *s != '\n')
-               --s;
-       *s = '\0';
-       last = s++;
-
-       /*
-        * if the command contains the "me" character at the start of the line
-        * or after any of [`{|()@/] then try again
-        */
-
-       for (t = s; *t != '\0'; ++t)
-               if (*t == me) {
-                       char *u = t - 1;
-                       while (u >= s && (*u == ' ' || *u == '\t'))
-                               --u;
-                       if (u < s)
-                               goto again;
-                       switch (*u) {
-                       case '`': case '@':
-                       case '(': case ')':
-                       case '{': case '|':
-                       case '/':
-                               goto again;
-                       default:
-                               break;
-                       }
-               }
-       return s;
-}
-
-int main(int argc, char **argv) {
-       int i;
-       char *s;
-
-       s = progname = rc_basename(argv[0]);
-       me = *s++;
-       if (*s == me) {
-               s++;
-               editit = TRUE;
-       }
-       if (*s == 'p') {
-               s++;
-               printit = TRUE;
-       }
-/* Nahh...
-       if (*s != '\0') {
-               fprintf(stderr, "\"%s\": bad name for history program\n", progname);
-               exit(1);
-       }
-*/
-
-       if (argc > 1) {
-               replace = ealloc((argc - 1) * sizeof *replace);
-               search = ealloc((argc - 1) * sizeof *search);
-       }
-       for (i = 1; i < argc; i++)
-               if ((s = strchr(argv[i], ':')) == NULL)
-                       search[nsearch++] = argv[i];
-               else {
-                       *(char *)s = '\0';      /* do we confuse ps too much? */
-                       replace[nreplace].reps = 0;
-                       while(*(++s) == ':') {
-                             replace[nreplace].reps++;
-                       }
-                       replace[nreplace].old = argv[i];
-                       replace[nreplace].new = s;
-                       nreplace++;
-               }
-
-next:  s = getcommand();
-       if (s == NULL) {
-               fprintf(stderr, "command not matched\n");
-               return 1;
-       }
-       for (i = 0; i < nsearch; i++)
-               if (!isin(s, search[i]))
-                       goto next;
-       for (i = 0; i < nreplace; i++)
-               if (!isin(s, replace[i].old))
-                       goto next;
-               else {
-                       int j;
-                       for (j = 0; j <= replace[i].reps; j++)
-                             s = sub(s, replace[i].old, replace[i].new);
-               }
-       if (editit) {
-               s = edit(s);
-               if (s == NULL)
-                       goto next;
-       }
-       fseek(histfile, 0, 2); /* 2 == end of file. i.e., append command to $history */
-       fprintf(histfile, "%s\n", s);
-       fclose(histfile);
-       if (printit)
-               printf("%s\n", s);
-       else {
-               char *shell = getenv("SHELL");
-
-               if (!editit)
-                       fprintf(stderr, "%s\n", s);
-               if (shell == NULL)
-                       shell = "/bin/sh";
-               execl(shell, rc_basename(shell), "-c", s, NULL);
-               perror(shell);
-               exit(1);
-       }
-       return 0;
-}
diff --git a/input.c b/input.c
index 573737508aeb44852a384a129c06cb9d80746a9a..e8d17fcef5e53b349d45187961dd0383e22c5e28 100644 (file)
--- a/input.c
+++ b/input.c
@@ -4,10 +4,6 @@
 
 #include <errno.h>
 
-#include "edit.h"
-#include "input.h"
-#include "jbwrap.h"
-
 /* How many characters can we unget? */
 enum { UNGETSIZE = 2 };
 
diff --git a/input.h b/input.h
deleted file mode 100644 (file)
index 87db27b..0000000
--- a/input.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* 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/jbwrap.h b/jbwrap.h
deleted file mode 100644 (file)
index f8d34e0..0000000
--- a/jbwrap.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#include <setjmp.h>
-
-/* If we have POSIX sigjmp_buf and friends, use them.  If we don't, just
-use a jmp_buf.  This probably fails on a traditional SysV machine, where
-jmp_bufs don't preserve signal masks.  I'm not worrying about this till
-someone reports it as a bug :-). */
-
-/* Certain braindamaged environments don't define jmp_buf as an array,
-so wrap it in a structure.  Potentially, we could use configure to do
-this only where it needs to be done, but the effort is probably not
-worth it. */
-
-struct Jbwrap {
-       sigjmp_buf j;
-};
diff --git a/lex.c b/lex.c
index 92732f87e5c4604d8fa5d1421035dd9a3c0eba27..4005535920005929eb074d8bb2c92583a9db8ec9 100644 (file)
--- a/lex.c
+++ b/lex.c
@@ -1,8 +1,6 @@
 /* lex.c: rc's lexical analyzer */
 
 #include "rc.h"
-
-#include "input.h"
 #include "parse.h"
 
 /*
diff --git a/main.c b/main.c
index 4da301465917f4a62bfa6889822b94b68f3b2e06..222235a2968c37eb5848779a916b06531ebd7a37 100644 (file)
--- a/main.c
+++ b/main.c
@@ -4,8 +4,6 @@
 
 #include <errno.h>
 
-#include "input.h"
-
 bool dashdee, dashee, dashvee, dashex, dasheye,
        dashen, dashpee, interactive;
 pid_t rc_pid;
diff --git a/proto.h b/proto.h
index 34a8a684d006769c44f7edbf107c2d4c82d611ab..b6628d44dcacddc14dc6e274d61e1dd9f68a7840 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -5,7 +5,6 @@
 */
 
 #include <sys/types.h>
-
 #include <signal.h>
 
 typedef long align_t;
@@ -27,4 +26,73 @@ assignment works. */
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include <stdbool.h>
+#define TRUE  true
+#define FALSE false
+
+/*
+    wait.h
+*/
+#include <sys/wait.h>
+
+/* These don't exist in POSIX. */
+#define myWIFDUMPED(s) (((s) & 0x80) != 0)
+
+/*
+    edit.h
+*/
+extern bool editing;
+extern void *edit_begin(int fd);
+extern char *edit_alloc(void *, size_t *);
+extern void edit_free(void *);
+extern void edit_prompt(void *, char *);
+extern void edit_end(void *);
+extern void edit_reset(void *);
+
+/*
+    jbwrap.h
+*/
+#include <setjmp.h>
+
+/* If we have POSIX sigjmp_buf and friends, use them.  If we don't, just
+use a jmp_buf.  This probably fails on a traditional SysV machine, where
+jmp_bufs don't preserve signal masks.  I'm not worrying about this till
+someone reports it as a bug :-). */
+
+/* Certain braindamaged environments don't define jmp_buf as an array,
+so wrap it in a structure.  Potentially, we could use configure to do
+this only where it needs to be done, but the effort is probably not
+worth it. */
+
+struct Jbwrap {
+       sigjmp_buf j;
+};
+
+/*
+    rlimit.h
+*/
+/* What a mess.  This file attempts to straighten everything out. */
+
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <limits.h>
+
+#define RLIM_CONV long
+#define RLIM_FMT "%s \t%ld%s\n"
+
+#if defined(RLIMIT_OFILE) && !defined (RLIMIT_NOFILE)
+#define RLIMIT_NOFILE RLIMIT_OFILE
+#endif
+
+struct Suffix {
+       const struct Suffix *next;
+       long amount;
+       char *name;
+};
+
+struct Limit {
+       char *name;
+       int flag;
+       const struct Suffix *suffix;
+};
 
diff --git a/rc.h b/rc.h
index 9769e0117e44994673dabf6ad2b270df3950a4ac..ff03b2daa319699bccdd740fb7317368a953bb9e 100644 (file)
--- a/rc.h
+++ b/rc.h
@@ -2,6 +2,11 @@
 #include "config.h"
 #include "proto.h"
 
+typedef struct {
+       char *name, *msg;
+} Sigmsgs;
+extern Sigmsgs signals[NSIG];
+
 #include <assert.h>
 
 #define RC "rc: "
 #define ENV_SEP '\001'
 #define ENV_ESC '\002'
 
-/* braindamaged IBM header files #define true and false */
-#undef FALSE
-#undef TRUE
-
 typedef void builtin_t(char **);
 typedef struct Block Block;
 typedef struct Dup Dup;
@@ -44,10 +45,6 @@ typedef enum ecodes {
        eError, eBreak, eReturn, eVarstack, eArena, eFifo, eFd
 } ecodes;
 
-typedef enum bool {
-       FALSE, TRUE
-} bool;
-
 typedef enum redirtype {
        rFrom, rCreate, rAppend, rHeredoc, rHerestring
 } redirtype;
@@ -385,3 +382,44 @@ extern bool forked;
 /* walk.c */
 extern bool walk(Node *, bool);
 extern bool cond;
+
+/*
+    input.h
+*/
+/* 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/rlimit.h b/rlimit.h
deleted file mode 100644 (file)
index 1486bd7..0000000
--- a/rlimit.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* What a mess.  This file attempts to straighten everything out. */
-
-#include <sys/time.h>
-#include <sys/resource.h>
-
-#if HAVE_LIMITS_H
-#include <limits.h>
-#endif
-
-#define RLIM_CONV long
-#define RLIM_FMT "%s \t%ld%s\n"
-
-#if defined(RLIMIT_OFILE) && !defined (RLIMIT_NOFILE)
-#define RLIMIT_NOFILE RLIMIT_OFILE
-#endif
-
-struct Suffix {
-       const struct Suffix *next;
-       long amount;
-       char *name;
-};
-
-struct Limit {
-       char *name;
-       int flag;
-       const struct Suffix *suffix;
-};
diff --git a/sigmsgs.c b/sigmsgs.c
new file mode 100644 (file)
index 0000000..54c9400
--- /dev/null
+++ b/sigmsgs.c
@@ -0,0 +1,36 @@
+#include "rc.h"
+
+Sigmsgs signals[] = {
+       {"",    ""},
+       {"sighup",      "hangup"},
+       {"sigint",      ""},
+       {"sigquit",     "quit"},
+       {"sigill",      "illegal instruction"},
+       {"sigtrap",     "trace trap"},
+       {"sigabrt",     "abort"},
+       {"sigemt",      "emt instruction"},
+       {"sigfpe",      "floating point error"},
+       {"sigkill",     "killed"},
+       {"sigbus",      "bus error"},
+       {"sigsegv",     "segmentation violation"},
+       {"sigsys",      "invalid argument to system call"},
+       {"sigpipe",     ""},
+       {"sigalrm",     "alarm clock"},
+       {"sigterm",     "terminated"},
+       {"sigurg",      "urgent condition on i/o channel"},
+       {"sigstop",     "stopped by program"},
+       {"sigtstp",     "stopped"},
+       {"sigcont",     "continue"},
+       {"sigchld",     "child stop or exit"},
+       {"sigttin",     "background tty read"},
+       {"sigttou",     "background tty write"},
+       {"sigio",       "socket i/o possible"},
+       {"sigxcpu",     "exceeded cpu time limit"},
+       {"sigxfsz",     "exceeded file size limit"},
+       {"sigvtalrm",   "virtual timer alarm"},
+       {"sigprof",     "profiling timer alarm"},
+       {"sigwinch",    "window size change"},
+       {"siginfo",     "information request"},
+       {"sigusr1",     "user defined signal 1"},
+       {"sigusr2",     "user defined signal 2"},
+};
index f3569e7da6fca4ba0a285b1d915e7121ce16f644..bae465b8800e2265424ac96ca64acc837d842f88 100644 (file)
--- a/signal.c
+++ b/signal.c
@@ -5,9 +5,6 @@
 #include <signal.h>
 #include <setjmp.h>
 
-#include "sigmsgs.h"
-#include "jbwrap.h"
-
 void (*sys_signal(int signum, void (*handler)(int)))(int) {
        struct sigaction new, old;
 
@@ -18,9 +15,9 @@ void (*sys_signal(int signum, void (*handler)(int)))(int) {
        return old.sa_handler;
 }
 
-void (*sighandlers[NUMOFSIGNALS])(int);
+void (*sighandlers[NSIG])(int);
 
-static volatile sig_atomic_t sigcount, caught[NUMOFSIGNALS];
+static volatile sig_atomic_t sigcount, caught[NSIG];
 
 extern void catcher(int s) {
        if (caught[s] == 0) {
@@ -38,7 +35,7 @@ extern void sigchk() {
                return; /* ho hum; life as usual */
        if (forked)
                exit(1); /* exit unconditionally on a signal in a child process */
-       for (i = 0, s = -1; i < NUMOFSIGNALS; i++)
+       for (i = 0, s = -1; i < NSIG; i++)
                if (caught[i] != 0) {
                        s = i;
                        --sigcount;
@@ -70,7 +67,7 @@ extern void initsignal() {
        void (*h)(int);
        int i;
 
-       for (i = 1; i < NUMOFSIGNALS; i++) {
+       for (i = 1; i < NSIG; i++) {
 #ifdef SIGKILL
                if (i == SIGKILL) continue;
 #endif
index 5b37aa561c80ff1217744baf610745e37852de1c..aa8790c22f997d8d311b7d4f240f5abf374c2cdb 100644 (file)
--- a/status.c
+++ b/status.c
@@ -1,9 +1,7 @@
 /* status.c: functions for printing fancy status messages in rc */
 
 #include "rc.h"
-#include "sigmsgs.h"
 #include "statval.h"
-#include "wait.h"
 
 /* status == the wait() value of the last command in the pipeline, or the last command */
 
@@ -67,7 +65,7 @@ extern void setstatus(pid_t pid, int i) {
 extern void statprint(pid_t pid, int i) {
        if (WIFSIGNALED(i)) {
                int t = WTERMSIG(i);
-               char *msg = ((t > 0) && (t < NUMOFSIGNALS) ? signals[WTERMSIG(i)].msg : "");
+               char *msg = ((t > 0) && (t < NSIG) ? signals[WTERMSIG(i)].msg : "");
                if (pid != -1)
                        fprint(2, "%ld: ", (long)pid);
                if (myWIFDUMPED(i)) {
@@ -105,7 +103,7 @@ extern char *strstatus(int s) {
        if (WIFSIGNALED(s)) {
                int t = WTERMSIG(s);
                const char *core = myWIFDUMPED(s) ? "+core" : "";
-               if ((t > 0) && (t < NUMOFSIGNALS) && *signals[t].name != '\0')
+               if ((t > 0) && (t < NSIG) && *signals[t].name != '\0')
                        return nprint("%s%s", signals[t].name, core);
                else
                        return nprint("-%d%s", t, core); /* unknown signals are negated */
@@ -126,7 +124,7 @@ extern void ssetstatus(char **av) {
                        continue;
                }
                found = FALSE;
-               for (k = 0; k < NUMOFSIGNALS; k++) {
+               for (k = 0; k < NSIG; k++) {
                        if (streq(signals[k].name, av[i])) {
                                statuses[l - i] = k;
                                found = TRUE;
diff --git a/system-bsd.c b/system-bsd.c
deleted file mode 100644 (file)
index f081e1a..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/* signal-safe read and write (for BSD slow devices). writeall() also
-allows partial writes */
-
-#include "rc.h"
-
-#include <errno.h>
-
-#include "jbwrap.h"
-#include "wait.h"
-
-Jbwrap slowbuf;
-volatile sig_atomic_t slow;
-
-static char *safe_buf;
-static size_t safe_remain;
-
-extern void writeall(int fd, char *buf, size_t remain) {
-       int i;
-
-       safe_buf = buf;
-       safe_remain = remain;
-       for (i = 0; safe_remain > 0; buf += i, safe_remain -= i) {
-               if (sigsetjmp(slowbuf.j, 1) == 0) {
-                       slow = TRUE;
-                       if ((i = write(fd, safe_buf, safe_remain)) <= 0)
-                               break; /* abort silently on errors in write() */
-               } else
-                       break;
-       }
-       slow = FALSE;
-       sigchk();
-}
-
-extern int rc_read(int fd, char *buf, size_t n) {
-       ssize_t r;
-
-       if (sigsetjmp(slowbuf.j, 1) == 0) {
-               slow = TRUE;
-               r = read(fd, buf, n);
-       } else {
-               errno = EINTR;
-               r = -1;
-       }
-       slow = FALSE;
-
-       return r;
-}
-
-static int r = -1;
-extern pid_t rc_wait(int *stat) {
-       if (sigsetjmp(slowbuf.j, 1) == 0) {
-               slow = TRUE;
-               r = wait(stat);
-       } else {
-               errno = EINTR;
-               r = -1;
-       }
-       slow = FALSE;
-
-       return r;
-}
diff --git a/tripping.c b/tripping.c
deleted file mode 100644 (file)
index 23b2972..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/* This is an auxiliary test program for rc.  */
-
-#include "config.h"
-
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-static void out0(void) {
-       putchar('t'); putchar('r');
-       putchar('\0');
-       putchar('u'); putchar('e');
-       putchar('\n');
-}
-
-static void ctrl_a(void) {
-       puts("a\001ab\002b");
-}
-
-static void makenonblock(void) {
-       int flags;
-
-       if ((flags = fcntl(0, F_GETFL)) == -1)
-               perror("fcntl 1");
-       flags |= O_NONBLOCK;
-       if (fcntl(0, F_SETFL, (long) flags) == -1)
-               perror("fcntl 2");
-}
-
-int main(int argc, char **argv) {
-       switch(argv[1][0]) {
-       case '0':
-               out0();
-               break;
-       case 'a':
-               ctrl_a();
-               break;
-       case 'n':
-               makenonblock();
-               break;
-       }
-       return 0;
-}
diff --git a/utils.c b/utils.c
index 482f7a72ad78bb9016878897fe0444dcb70c1df9..1639628105d9bd32d50be69cd9359127fb3f20da 100644 (file)
--- a/utils.c
+++ b/utils.c
@@ -5,8 +5,6 @@
 #include <errno.h>
 #include <setjmp.h>
 
-#include "jbwrap.h"
-
 /* print error with line number on noninteractive shells (i.e., scripts) */
 
 extern void pr_error(char *s, int offset) {
diff --git a/var.c b/var.c
index 2fa7c350825282fd29ecfa0ed8b4d9f2f1a445f0..002e4d8a2baa583a482b099765c9010a25a423a8 100644 (file)
--- a/var.c
+++ b/var.c
@@ -2,8 +2,6 @@
 
 #include "rc.h"
 
-#include "input.h"
-
 static void colonassign(char *, List *, bool);
 static void listassign(char *, List *, bool);
 static int hasalias(char *);
diff --git a/wait.c b/wait.c
index 1ab85339f4327806fee56974c7edb37aa8482a93..258ba686ea4ddf9a51423f646ec6d5cea36549c3 100644 (file)
--- a/wait.c
+++ b/wait.c
@@ -2,8 +2,6 @@
 
 #include <errno.h>
 
-#include "wait.h"
-
 bool forked = FALSE;
 
 typedef struct Pid Pid;
diff --git a/wait.h b/wait.h
deleted file mode 100644 (file)
index a23ca79..0000000
--- a/wait.h
+++ /dev/null
@@ -1,21 +0,0 @@
-#include <sys/wait.h>
-
-/* Fake the POSIX wait() macros if we don't have them. */
-#ifndef WIFEXITED
-#define WIFEXITED(s) (((s) & 0xFF) == 0)
-#endif
-#ifndef WEXITSTATUS
-#define WEXITSTATUS(s) (((unsigned)(s) >> 8) && 0xFF)
-#endif
-#ifndef WIFSIGNALED
-#define WIFSIGNALED(s) (((s) & 0xFF) != 0)
-#endif
-#ifndef WTERMSIG
-#define WTERMSIG(s) ((s) & 0x7F)
-#endif
-
-/* These don't exist in POSIX. */
-#define myWIFDUMPED(s) (((s) & 0x80) != 0)
-
-
-
diff --git a/walk.c b/walk.c
index 984a68c2b297da15db977adf54d5280e7040c7b8..3c9b1bbe734c91ee3103d5c7c2a670e5b0a999f8 100644 (file)
--- a/walk.c
+++ b/walk.c
@@ -5,8 +5,6 @@
 #include <signal.h>
 #include <setjmp.h>
 
-#include "jbwrap.h"
-
 /*
    global which indicates whether rc is executing a test;
    used by rc -e so that if (false) does not exit.