From aa3048880bb4153a913e604d5ac3b0a17b34560e Mon Sep 17 00:00:00 2001 From: Martijn Dekker Date: Wed, 8 Dec 2021 22:16:11 +0100 Subject: [PATCH] cleanup: get rid of KSHELL and _BLD_shell preprocessor macros Once upon a time it might have been possible to build certain parts of ksh, such as the emacs and vi editors and possibly even the name/value library (nval(3)) as independent libraries. But given the depressing amount of bit rot in the code that we inherited, I am certain that disabling either of these macros had been resulting in a broken build for many years before AT&T abandoned this code base. These are certainly not going to be useful now. Meanwhile the KSHELL macro got in the way of me today, because the Mamfile did not define it for all the .c files, but some headers declared some functionality conditionally upon that macro. So including in, e.g., nvdisc.c did not declare the same functions as including that header in files with KSHELL defined. This inconsistency is now gone as well, for various files. I'm currently working on making it possible once again to build libshell as a dynamic library; that should be good enough. And that never involved disabling either of these macros. --- src/cmd/ksh93/Mamfile | 120 +++++++++++++++---------------- src/cmd/ksh93/data/builtins.c | 16 ++--- src/cmd/ksh93/edit/edit.c | 27 +------ src/cmd/ksh93/edit/emacs.c | 25 ++----- src/cmd/ksh93/edit/history.c | 32 ++------- src/cmd/ksh93/edit/vi.c | 22 ++---- src/cmd/ksh93/include/builtins.h | 2 +- src/cmd/ksh93/include/edit.h | 45 ++---------- src/cmd/ksh93/include/io.h | 9 +-- src/cmd/ksh93/include/nval.h | 4 -- src/cmd/ksh93/include/path.h | 2 +- src/cmd/ksh93/include/shell.h | 8 +-- src/cmd/ksh93/include/shnodes.h | 2 +- src/cmd/ksh93/sh/expand.c | 33 ++------- src/cmd/ksh93/sh/lex.c | 18 +---- src/cmd/ksh93/sh/macro.c | 4 -- src/cmd/ksh93/sh/parse.c | 16 ----- src/cmd/ksh93/sh/streval.c | 2 +- 18 files changed, 102 insertions(+), 285 deletions(-) diff --git a/src/cmd/ksh93/Mamfile b/src/cmd/ksh93/Mamfile index dfa12dbdc..20a566d9a 100644 --- a/src/cmd/ksh93/Mamfile +++ b/src/cmd/ksh93/Mamfile @@ -200,7 +200,7 @@ make install meta pmain.o %.c>%.o sh/pmain.c pmain prev sh/pmain.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/pmain.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/pmain.c done pmain.o generated make libshell.a archive prev shell.req @@ -280,7 +280,7 @@ make install meta alarm.o %.c>%.o bltins/alarm.c alarm prev bltins/alarm.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DERROR_CONTEXT_T=Error_context_t -c bltins/alarm.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c bltins/alarm.c done alarm.o generated make cd_pwd.o make bltins/cd_pwd.c @@ -320,7 +320,7 @@ make install meta cd_pwd.o %.c>%.o bltins/cd_pwd.c cd_pwd prev bltins/cd_pwd.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_BLD_shell -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c bltins/cd_pwd.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c bltins/cd_pwd.c done cd_pwd.o generated make cflow.o make bltins/cflow.c @@ -336,7 +336,7 @@ make install meta cflow.o %.c>%.o bltins/cflow.c cflow prev bltins/cflow.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -D_PACKAGE_ast -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c bltins/cflow.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c bltins/cflow.c done cflow.o generated make deparse.o make sh/deparse.c @@ -347,7 +347,7 @@ make install meta deparse.o %.c>%.o sh/deparse.c deparse prev sh/deparse.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/deparse.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/deparse.c done deparse.o generated make enum.o make bltins/enum.c @@ -355,7 +355,7 @@ make install done bltins/enum.c meta enum.o %.c>%.o bltins/enum.c enum prev bltins/enum.c - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=${SH_DICT} -D_BLD_shell -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c bltins/enum.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=${SH_DICT} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c bltins/enum.c prev SHOPT.sh done enum.o generated make getopts.o @@ -369,7 +369,7 @@ make install meta getopts.o %.c>%.o bltins/getopts.c getopts prev bltins/getopts.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -D_PACKAGE_ast -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c bltins/getopts.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c bltins/getopts.c done getopts.o generated make hist.o make bltins/hist.c @@ -410,7 +410,7 @@ make install meta hist.o %.c>%.o bltins/hist.c hist prev bltins/hist.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DKSHELL -D_PACKAGE_ast -D_BLD_shell -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c bltins/hist.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c bltins/hist.c done hist.o generated make misc.o make bltins/misc.c @@ -436,7 +436,7 @@ make install meta misc.o %.c>%.o bltins/misc.c misc prev bltins/misc.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DKSHELL -DERROR_CONTEXT_T=Error_context_t -c bltins/misc.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c bltins/misc.c done misc.o generated make print.o make bltins/print.c @@ -476,7 +476,7 @@ make install meta print.o %.c>%.o bltins/print.c print prev bltins/print.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DERROR_CONTEXT_T=Error_context_t -DKSHELL -c bltins/print.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c bltins/print.c done print.o generated make read.o make bltins/read.c @@ -499,7 +499,7 @@ make install meta read.o %.c>%.o bltins/read.c read prev bltins/read.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DKSHELL -D_PACKAGE_ast -D_API_ast=20100309 -D_BLD_shell -DERROR_CONTEXT_T=Error_context_t -c bltins/read.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c bltins/read.c done read.o generated make sleep.o make bltins/sleep.c @@ -518,7 +518,7 @@ make install meta sleep.o %.c>%.o bltins/sleep.c sleep prev bltins/sleep.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DERROR_CONTEXT_T=Error_context_t -c bltins/sleep.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c bltins/sleep.c done sleep.o generated make trap.o make bltins/trap.c @@ -529,7 +529,7 @@ make install meta trap.o %.c>%.o bltins/trap.c trap prev bltins/trap.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -D_PACKAGE_ast -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c bltins/trap.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c bltins/trap.c done trap.o generated make test.o make bltins/test.c @@ -548,7 +548,7 @@ make install meta test.o %.c>%.o bltins/test.c test prev bltins/test.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DERROR_CONTEXT_T=Error_context_t -DKSHELL -c bltins/test.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c bltins/test.c done test.o generated make typeset.o make bltins/typeset.c @@ -564,7 +564,7 @@ make install meta typeset.o %.c>%.o bltins/typeset.c typeset prev bltins/typeset.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_API_ast=20100309 -D_BLD_shell -DERROR_CONTEXT_T=Error_context_t -c bltins/typeset.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c bltins/typeset.c done typeset.o generated make ulimit.o make bltins/ulimit.c @@ -587,7 +587,7 @@ make install meta ulimit.o %.c>%.o bltins/ulimit.c ulimit prev bltins/ulimit.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DERROR_CONTEXT_T=Error_context_t -c bltins/ulimit.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c bltins/ulimit.c done ulimit.o generated make umask.o make bltins/umask.c @@ -601,7 +601,7 @@ make install meta umask.o %.c>%.o bltins/umask.c umask prev bltins/umask.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -D_PACKAGE_ast -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c bltins/umask.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c bltins/umask.c done umask.o generated make whence.o make bltins/whence.c @@ -622,7 +622,7 @@ make install meta whence.o %.c>%.o bltins/whence.c whence prev bltins/whence.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -D_PACKAGE_ast -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c bltins/whence.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c bltins/whence.c done whence.o generated make main.o make sh/main.c @@ -665,7 +665,7 @@ make install meta main.o %.c>%.o sh/main.c main prev sh/main.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${SHOPT_TIMEOUT+-DSHOPT_TIMEOUT=${SHOPT_TIMEOUT}} ${SHOPT_ACCT+-DSHOPT_ACCT=${SHOPT_ACCT}} ${SHOPT_SYSRC+-DSHOPT_SYSRC=${SHOPT_SYSRC}} ${SHOPT_REMOTE+-DSHOPT_REMOTE=${SHOPT_REMOTE}} ${SHOPT_OLDTERMIO+-DSHOPT_OLDTERMIO=${SHOPT_OLDTERMIO}} ${SHOPT_SPAWN+-DSHOPT_SPAWN=${SHOPT_SPAWN}} ${SHOPT_P_SUID+-DSHOPT_P_SUID=${SHOPT_P_SUID}} ${SHOPT_REGRESS+-DSHOPT_REGRESS=${SHOPT_REGRESS}} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} ${DEBUG+-DDEBUG=${DEBUG}} -DSH_DICT=${SH_DICT} ${SH_CMDLIB_DIR+-DSH_CMDLIB_DIR=${SH_CMDLIB_DIR}} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DKSHELL -DERROR_CONTEXT_T=Error_context_t -c sh/main.c + exec - ${CC} ${mam_cc_FLAGS} ${SHOPT_TIMEOUT+-DSHOPT_TIMEOUT=${SHOPT_TIMEOUT}} ${SHOPT_ACCT+-DSHOPT_ACCT=${SHOPT_ACCT}} ${SHOPT_SYSRC+-DSHOPT_SYSRC=${SHOPT_SYSRC}} ${SHOPT_REMOTE+-DSHOPT_REMOTE=${SHOPT_REMOTE}} ${SHOPT_OLDTERMIO+-DSHOPT_OLDTERMIO=${SHOPT_OLDTERMIO}} ${SHOPT_SPAWN+-DSHOPT_SPAWN=${SHOPT_SPAWN}} ${SHOPT_P_SUID+-DSHOPT_P_SUID=${SHOPT_P_SUID}} ${SHOPT_REGRESS+-DSHOPT_REGRESS=${SHOPT_REGRESS}} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} ${DEBUG+-DDEBUG=${DEBUG}} -DSH_DICT=${SH_DICT} ${SH_CMDLIB_DIR+-DSH_CMDLIB_DIR=${SH_CMDLIB_DIR}} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/main.c done main.o generated make nvdisc.o make sh/nvdisc.c @@ -677,7 +677,7 @@ make install meta nvdisc.o %.c>%.o sh/nvdisc.c nvdisc prev sh/nvdisc.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/nvdisc.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/nvdisc.c done nvdisc.o generated make nvtype.o make sh/nvtype.c @@ -688,7 +688,7 @@ make install meta nvtype.o %.c>%.o sh/nvtype.c nvtype prev sh/nvtype.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -DSH_DICT=${SH_DICT} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_API_ast=20100309 -D_BLD_shell -DKSHELL -DERROR_CONTEXT_T=Error_context_t -c sh/nvtype.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -DSH_DICT=${SH_DICT} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c sh/nvtype.c done nvtype.o generated make arith.o make sh/arith.c @@ -702,7 +702,7 @@ make install meta arith.o %.c>%.o sh/arith.c arith prev sh/arith.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -D_PACKAGE_ast -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c sh/arith.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c sh/arith.c done arith.o generated make args.o make sh/args.c @@ -719,7 +719,7 @@ make install meta args.o %.c>%.o sh/args.c args prev sh/args.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -DKSHELL -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/args.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/args.c done args.o generated make array.o make sh/array.c @@ -730,7 +730,7 @@ make install meta array.o %.c>%.o sh/array.c array prev sh/array.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/array.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/array.c done array.o generated make completion.o make edit/completion.c @@ -745,7 +745,7 @@ make install meta completion.o %.c>%.o edit/completion.c completion prev edit/completion.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DKSHELL -D_BLD_shell -DERROR_CONTEXT_T=Error_context_t -c edit/completion.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c edit/completion.c done completion.o generated make defs.o make sh/defs.c @@ -758,7 +758,7 @@ make install meta defs.o %.c>%.o sh/defs.c defs prev sh/defs.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DKSHELL -D_PACKAGE_ast -D_API_ast=20100309 -D_BLD_shell -DERROR_CONTEXT_T=Error_context_t -c sh/defs.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c sh/defs.c done defs.o generated make edit.o make edit/edit.c @@ -784,7 +784,7 @@ make install meta edit.o %.c>%.o edit/edit.c edit prev edit/edit.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DKSHELL -D_PACKAGE_ast -D_API_ast=20100309 -D_BLD_shell -DERROR_CONTEXT_T=Error_context_t -c edit/edit.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c edit/edit.c done edit.o generated make expand.o make sh/expand.c @@ -814,7 +814,7 @@ make install meta expand.o %.c>%.o sh/expand.c expand prev sh/expand.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -DKSHELL -c sh/expand.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/expand.c done expand.o generated make regress.o make bltins/regress.c @@ -828,7 +828,7 @@ make install meta regress.o %.c>%.o bltins/regress.c regress prev bltins/regress.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -DSH_DICT=${SH_DICT} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DKSHELL -DERROR_CONTEXT_T=Error_context_t -c bltins/regress.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -DSH_DICT=${SH_DICT} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c bltins/regress.c done regress.o generated make fault.o make sh/fault.c @@ -847,7 +847,7 @@ make install meta fault.o %.c>%.o sh/fault.c fault prev sh/fault.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DERROR_CONTEXT_T=Error_context_t -DKSHELL -c sh/fault.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/fault.c done fault.o generated make fcin.o make sh/fcin.c @@ -879,7 +879,7 @@ make install meta history.o %.c>%.o edit/history.c history prev edit/history.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DKSHELL -DERROR_CONTEXT_T=Error_context_t -c edit/history.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c edit/history.c done history.o generated make init.o make sh/init.c @@ -909,7 +909,7 @@ make install meta init.o %.c>%.o sh/init.c init prev sh/init.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DKSHELL -DERROR_CONTEXT_T=Error_context_t -c sh/init.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/init.c done init.o generated make io.o make sh/io.c @@ -933,7 +933,7 @@ make install meta io.o %.c>%.o sh/io.c io prev sh/io.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DKSHELL -D_PACKAGE_ast -D_API_ast=20100309 -D_BLD_shell -DERROR_CONTEXT_T=Error_context_t -c sh/io.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c sh/io.c done io.o generated make jobs.o make sh/jobs.c @@ -951,7 +951,7 @@ make install meta jobs.o %.c>%.o sh/jobs.c jobs prev sh/jobs.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DKSHELL -DERROR_CONTEXT_T=Error_context_t -c sh/jobs.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/jobs.c done jobs.o generated make lex.o make sh/lex.c @@ -971,7 +971,7 @@ make install meta lex.o %.c>%.o sh/lex.c lex prev sh/lex.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DKSHELL -DERROR_CONTEXT_T=Error_context_t -c sh/lex.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/lex.c done lex.o generated make macro.o make sh/macro.c @@ -991,7 +991,7 @@ make install meta macro.o %.c>%.o sh/macro.c macro prev sh/macro.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DKSHELL -D_BLD_shell -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/macro.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/macro.c done macro.o generated make name.o make sh/name.c @@ -1008,7 +1008,7 @@ make install meta name.o %.c>%.o sh/name.c name prev sh/name.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -D_PACKAGE_ast -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c sh/name.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c sh/name.c done name.o generated make nvtree.o make sh/nvtree.c @@ -1020,7 +1020,7 @@ make install meta nvtree.o %.c>%.o sh/nvtree.c nvtree prev sh/nvtree.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DERROR_CONTEXT_T=Error_context_t -c sh/nvtree.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/nvtree.c done nvtree.o generated make parse.o make sh/parse.c @@ -1038,7 +1038,7 @@ make install meta parse.o %.c>%.o sh/parse.c parse prev sh/parse.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -DKSHELL -c sh/parse.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/parse.c done parse.o generated make path.o make sh/path.c @@ -1064,7 +1064,7 @@ make install meta path.o %.c>%.o sh/path.c path prev sh/path.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DERROR_CONTEXT_T=Error_context_t -DKSHELL -c sh/path.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/path.c done path.o generated make string.o make sh/string.c @@ -1081,7 +1081,7 @@ make install meta string.o %.c>%.o sh/string.c string prev sh/string.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DERROR_CONTEXT_T=Error_context_t -c sh/string.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/string.c done string.o generated make streval.o make sh/streval.c @@ -1094,7 +1094,7 @@ make install meta streval.o %.c>%.o sh/streval.c streval prev sh/streval.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/streval.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/streval.c done streval.o generated make subshell.o make sh/subshell.c @@ -1111,7 +1111,7 @@ make install meta subshell.o %.c>%.o sh/subshell.c subshell prev sh/subshell.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -DKSHELL -c sh/subshell.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/subshell.c done subshell.o generated make tdump.o make sh/tdump.c @@ -1124,7 +1124,7 @@ make install meta tdump.o %.c>%.o sh/tdump.c tdump prev sh/tdump.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -DKSHELL -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/tdump.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/tdump.c done tdump.o generated make timers.o make sh/timers.c @@ -1139,7 +1139,7 @@ make install meta timers.o %.c>%.o sh/timers.c timers prev sh/timers.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DERROR_CONTEXT_T=Error_context_t -c sh/timers.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/timers.c done timers.o generated make trestore.o make sh/trestore.c @@ -1152,7 +1152,7 @@ make install meta trestore.o %.c>%.o sh/trestore.c trestore prev sh/trestore.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${SHOPT_SYSRC+-DSHOPT_SYSRC=${SHOPT_SYSRC}} ${SHOPT_ACCT+-DSHOPT_ACCT=${SHOPT_ACCT}} ${SHOPT_SPAWN+-DSHOPT_SPAWN=${SHOPT_SPAWN}} ${SHOPT_P_SUID+-DSHOPT_P_SUID=${SHOPT_P_SUID}} ${SHOPT_REGRESS+-DSHOPT_REGRESS=${SHOPT_REGRESS}} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} ${SH_CMDLIB_DIR+-DSH_CMDLIB_DIR=${SH_CMDLIB_DIR}} -DSH_DICT=${SH_DICT} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -DKSHELL -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/trestore.c + exec - ${CC} ${mam_cc_FLAGS} ${SHOPT_SYSRC+-DSHOPT_SYSRC=${SHOPT_SYSRC}} ${SHOPT_ACCT+-DSHOPT_ACCT=${SHOPT_ACCT}} ${SHOPT_SPAWN+-DSHOPT_SPAWN=${SHOPT_SPAWN}} ${SHOPT_P_SUID+-DSHOPT_P_SUID=${SHOPT_P_SUID}} ${SHOPT_REGRESS+-DSHOPT_REGRESS=${SHOPT_REGRESS}} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} ${SH_CMDLIB_DIR+-DSH_CMDLIB_DIR=${SH_CMDLIB_DIR}} -DSH_DICT=${SH_DICT} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/trestore.c done trestore.o generated make waitevent.o make sh/waitevent.c @@ -1161,7 +1161,7 @@ make install meta waitevent.o %.c>%.o sh/waitevent.c waitevent prev sh/waitevent.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/waitevent.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/waitevent.c done waitevent.o generated make xec.o make sh/xec.c @@ -1185,7 +1185,7 @@ make install meta xec.o %.c>%.o sh/xec.c xec prev sh/xec.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DERROR_CONTEXT_T=Error_context_t -DKSHELL -c sh/xec.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/xec.c done xec.o generated make limits.o make data/limits.c @@ -1214,7 +1214,7 @@ make install meta msg.o %.c>%.o data/msg.c msg prev data/msg.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DKSHELL -D_PACKAGE_ast -D_API_ast=20100309 -D_BLD_shell -DERROR_CONTEXT_T=Error_context_t -c data/msg.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c data/msg.c done msg.o generated make strdata.o make data/strdata.c @@ -1240,7 +1240,7 @@ make install meta strdata.o %.c>%.o data/strdata.c strdata prev data/strdata.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${SHOPT_P_SUID+-DSHOPT_P_SUID=${SHOPT_P_SUID}} ${SHOPT_REGRESS+-DSHOPT_REGRESS=${SHOPT_REGRESS}} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} ${SH_CMDLIB_DIR+-DSH_CMDLIB_DIR=${SH_CMDLIB_DIR}} -DSH_DICT=${SH_DICT} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c data/strdata.c + exec - ${CC} ${mam_cc_FLAGS} ${SHOPT_P_SUID+-DSHOPT_P_SUID=${SHOPT_P_SUID}} ${SHOPT_REGRESS+-DSHOPT_REGRESS=${SHOPT_REGRESS}} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${CCFLAGS.FORCE}?} ${SH_CMDLIB_DIR+-DSH_CMDLIB_DIR=${SH_CMDLIB_DIR}} -DSH_DICT=${SH_DICT} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c data/strdata.c done strdata.o generated make testops.o make data/testops.c @@ -1251,7 +1251,7 @@ make install meta testops.o %.c>%.o data/testops.c testops prev data/testops.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -DSH_DICT=${SH_DICT} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c data/testops.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -DSH_DICT=${SH_DICT} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c data/testops.c done testops.o generated make keywords.o make data/keywords.c @@ -1262,7 +1262,7 @@ make install meta keywords.o %.c>%.o data/keywords.c keywords prev data/keywords.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_API_ast=20100309 -D_BLD_shell -DERROR_CONTEXT_T=Error_context_t -c data/keywords.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c data/keywords.c done keywords.o generated make options.o make data/options.c @@ -1273,7 +1273,7 @@ make install meta options.o %.c>%.o data/options.c options prev data/options.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c data/options.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c data/options.c done options.o generated make signals.o make data/signals.c @@ -1283,7 +1283,7 @@ make install meta signals.o %.c>%.o data/signals.c signals prev data/signals.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c data/signals.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c data/signals.c done signals.o generated make aliases.o make data/aliases.c @@ -1294,7 +1294,7 @@ make install meta aliases.o %.c>%.o data/aliases.c aliases prev data/aliases.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_BLD_shell -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c data/aliases.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c data/aliases.c done aliases.o generated make builtins.o make data/builtins.c @@ -1310,7 +1310,7 @@ make install meta builtins.o %.c>%.o data/builtins.c builtins prev data/builtins.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -DSH_DICT=${SH_DICT} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -D_BLD_shell -DKSHELL -DERROR_CONTEXT_T=Error_context_t -c data/builtins.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -DSH_DICT=${SH_DICT} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c data/builtins.c done builtins.o generated make variables.o make data/variables.c @@ -1327,7 +1327,7 @@ make install meta variables.o %.c>%.o data/variables.c variables prev data/variables.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_BLD_shell -D_PACKAGE_ast -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c data/variables.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c data/variables.c done variables.o generated make lexstates.o make data/lexstates.c @@ -1353,7 +1353,7 @@ make install meta emacs.o %.c>%.o edit/emacs.c emacs prev edit/emacs.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DKSHELL -D_PACKAGE_ast -D_API_ast=20100309 -D_BLD_shell -DERROR_CONTEXT_T=Error_context_t -c edit/emacs.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c edit/emacs.c done emacs.o generated make vi.o make edit/vi.c @@ -1370,7 +1370,7 @@ make install meta vi.o %.c>%.o edit/vi.c vi prev edit/vi.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DKSHELL -D_BLD_shell -DERROR_CONTEXT_T=Error_context_t -c edit/vi.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c edit/vi.c done vi.o generated make hexpand.o make edit/hexpand.c @@ -1380,7 +1380,7 @@ make install meta hexpand.o %.c>%.o edit/hexpand.c hexpand prev edit/hexpand.c prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DKSHELL -D_PACKAGE_ast -D_BLD_shell -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c edit/hexpand.c + exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_PACKAGE_ast -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c edit/hexpand.c done hexpand.o generated exec - ${AR} rc libshell.a alarm.o cd_pwd.o cflow.o deparse.o enum.o getopts.o hist.o misc.o print.o read.o sleep.o trap.o test.o typeset.o ulimit.o umask.o whence.o main.o nvdisc.o nvtype.o arith.o args.o array.o completion.o defs.o edit.o expand.o regress.o fault.o fcin.o exec - ${AR} rc libshell.a history.o init.o io.o jobs.o lex.o macro.o name.o nvtree.o parse.o path.o string.o streval.o subshell.o tdump.o timers.o trestore.o waitevent.o xec.o limits.o msg.o strdata.o testops.o keywords.o options.o signals.o aliases.o builtins.o variables.o lexstates.o emacs.o vi.o hexpand.o diff --git a/src/cmd/ksh93/data/builtins.c b/src/cmd/ksh93/data/builtins.c index 988f2efc3..a8f68f61f 100644 --- a/src/cmd/ksh93/data/builtins.c +++ b/src/cmd/ksh93/data/builtins.c @@ -27,16 +27,12 @@ #include "ulimit.h" #include "name.h" #include "version.h" -#if KSHELL -# include "builtins.h" -# include "jobs.h" -# include "FEATURE/cmds" -# define bltin(x) (b_##x) - /* The following is for builtins that do not accept -- options */ -# define Bltin(x) (B_##x) -#else -# define bltin(x) 0 -#endif +#include "builtins.h" +#include "jobs.h" +#include "FEATURE/cmds" +#define bltin(x) (b_##x) +/* The following is for builtins that do not accept -- options */ +#define Bltin(x) (B_##x) #ifndef SHOPT_CMDLIB_DIR # define SHOPT_CMDLIB_DIR SH_CMDLIB_DIR diff --git a/src/cmd/ksh93/edit/edit.c b/src/cmd/ksh93/edit/edit.c index b999d243e..1b52a79db 100644 --- a/src/cmd/ksh93/edit/edit.c +++ b/src/cmd/ksh93/edit/edit.c @@ -40,14 +40,8 @@ # include #endif -#if KSHELL -# include "defs.h" -# include "variables.h" -#else -# include - extern char ed_errbuf[]; - char e_version[] = "\n@(#)$Id: Editlib version 1993-12-28 r $\0\n"; -#endif /* KSHELL */ +#include "defs.h" +#include "variables.h" #include "io.h" #include "terminal.h" #include "history.h" @@ -138,12 +132,7 @@ static Lex_t *savelex; # endif /* TIOCGETP */ #endif /* _hdr_sgtty */ -#if KSHELL - static int keytrap(Edit_t *,char*, int, int, int); -#else - Edit_t editb; -#endif /* KSHELL */ - +static int keytrap(Edit_t *,char*, int, int, int); #ifndef _POSIX_DISABLE # define _POSIX_DISABLE 0 @@ -618,15 +607,11 @@ void ed_setup(register Edit_t *ep, int fd, int reedit) ep->nhlist = 0; ep->hoff = 0; #endif /* SHOPT_EDPREDICT */ -#if KSHELL ep->e_stkoff = staktell(); ep->e_stkptr = stakfreeze(0); if(!(last = shp->prompt)) last = ""; shp->prompt = 0; -#else - last = ep->e_prbuff; -#endif /* KSHELL */ if(shp->gd->hist_ptr) { register History_t *hp = shp->gd->hist_ptr; @@ -1033,10 +1018,8 @@ static int putstack(Edit_t *ep,char string[], register int nbyte, int type) { /*** user break key ***/ ep->e_lookahead = 0; -# if KSHELL sh_fault(SIGINT); siglongjmp(ep->e_env, UINTR); -# endif /* KSHELL */ } # endif /* CBREAK */ @@ -1091,10 +1074,8 @@ static int putstack(Edit_t *ep,char string[], register int nbyte, int type) { /*** user break key ***/ ep->e_lookahead = 0; -# if KSHELL sh_fault(SIGINT); siglongjmp(ep->e_env, UINTR); -# endif /* KSHELL */ } # endif /* CBREAK */ } @@ -1638,7 +1619,6 @@ int tcsetattr(int fd,int mode,struct termios *tt) } #endif /* SHOPT_OLDTERMIO */ -#if KSHELL /* * Execute keyboard trap on given buffer of given size * < 0 for vi insert mode @@ -1683,7 +1663,6 @@ static int keytrap(Edit_t *ep,char *inbuff,register int insize, int bufsize, int nv_unset(ED_TXTNOD); return(insize); } -#endif /* KSHELL */ #if SHOPT_EDPREDICT static int ed_sortdata(const char *s1, const char *s2) diff --git a/src/cmd/ksh93/edit/emacs.c b/src/cmd/ksh93/edit/emacs.c index 7c2a4dc3d..e26601822 100644 --- a/src/cmd/ksh93/edit/emacs.c +++ b/src/cmd/ksh93/edit/emacs.c @@ -66,13 +66,8 @@ One line screen editor for any program #include #include "FEATURE/cmds" -#if KSHELL -# include "defs.h" -#else -# include -#endif /* KSHELL */ +#include "defs.h" #include "io.h" - #include "history.h" #include "edit.h" #include "terminal.h" @@ -976,7 +971,6 @@ static int escape(register Emacs_t* ep,register genchar *out,int count) draw(ep,UPDATE); return(-1); } -#if KSHELL #if SHOPT_EDPREDICT case '\n': case '\t': @@ -1168,18 +1162,9 @@ static int escape(register Emacs_t* ep,register genchar *out,int count) # else return(-1); # endif /* ESH_BETTER */ -#else - update: - cur = i; - draw(ep,UPDATE); + beep(); return(-1); - - default: -#endif /* KSHELL */ - beep(); - return(-1); } - return(-1); } @@ -1202,8 +1187,7 @@ static void xcommands(register Emacs_t *ep,int count) draw(ep,UPDATE); return; -#if KSHELL -# ifdef ESH_BETTER +#ifdef ESH_BETTER case cntl('E'): /* invoke emacs on current command */ if(ed_fulledit(ep->ed)==-1) beep(); @@ -1267,8 +1251,7 @@ static void xcommands(register Emacs_t *ep,int count) return; } # endif /* debugging code */ -# endif /* ESH_BETTER */ -#endif /* KSHELL */ +#endif /* ESH_BETTER */ default: beep(); diff --git a/src/cmd/ksh93/edit/history.c b/src/cmd/ksh93/edit/history.c index 7fa952cf0..874f8d472 100644 --- a/src/cmd/ksh93/edit/history.c +++ b/src/cmd/ksh93/edit/history.c @@ -77,30 +77,12 @@ #include #include #include "defs.h" -#if KSHELL -# include "variables.h" -# include "path.h" -# include "builtins.h" -# include "io.h" -#else -# include -#endif /* KSHELL */ +#include "variables.h" +#include "path.h" +#include "builtins.h" +#include "io.h" #include "history.h" -#if !KSHELL -# define NIL(type) ((type)0) -# define path_relative(s,x) (s,x) -# ifdef __STDC__ -# define nv_getval(s) getenv(#s) -# else -# define nv_getval(s) getenv("s") -# endif /* __STDC__ */ -# define e_unknown "unknown" -# define sh_translate(x) (x) - char login_sh = 0; - const char hist_fname[] = "/.history"; -#endif /* KSHELL */ - #ifndef O_BINARY # define O_BINARY 0 #endif /* O_BINARY */ @@ -268,10 +250,8 @@ retry: } if(fd < 0) { -#if KSHELL /* don't allow root a history_file in /tmp */ if(shgd->userid) -#endif /* KSHELL */ { if(!(fname = pathtmp(NIL(char*),0,0,NIL(int*)))) return(0); @@ -346,9 +326,7 @@ retry: hp = hist_trim(hp,(int)hp->histind-maxlines); } sfdisc(hp->histfp,&hp->histdisc); -#if KSHELL (HISTCUR)->nvalue.lp = (&hp->histind); -#endif /* KSHELL */ sh_timeradd(1000L*(HIST_RECENT-30), 1, hist_touch, (void*)hp->histname); #if SHOPT_ACCTFILE if(sh_isstate(SH_INTERACTIVE)) @@ -955,11 +933,9 @@ Histloc_t hist_find(register History_t*hp,char *string,register int index1,int f location.hist_command = index1; return(location); } -#if KSHELL /* allow a search to be aborted */ if(((Shell_t*)hp->histshell)->trapnote&SH_SIGSET) break; -#endif /* KSHELL */ } return(location); } diff --git a/src/cmd/ksh93/edit/vi.c b/src/cmd/ksh93/edit/vi.c index 129b6a56d..6dd04ba0e 100644 --- a/src/cmd/ksh93/edit/vi.c +++ b/src/cmd/ksh93/edit/vi.c @@ -31,13 +31,7 @@ #if SHOPT_VSH -#if KSHELL -# include "defs.h" -#else -# include -# include "FEATURE/options" -# include -#endif /* KSHELL */ +#include "defs.h" #include "io.h" #include "history.h" @@ -258,14 +252,14 @@ int ed_viread(void *context, int fd, register char *shbuf, int nchar, int reedit /* time the current line to determine typeahead */ oldtime = times(&dummy); #endif /* FIORDCHK */ -#if KSHELL /* abort of interrupt has occurred */ if(ed->sh->trapnote&SH_SIGSET) i = -1; else -#endif /* KSHELL */ - /*** Read the line ***/ - i = ed_read(context, fd, shbuf, nchar, 0); + { + /*** Read the line ***/ + i = ed_read(context, fd, shbuf, nchar, 0); + } #ifndef FIORDCHK newtime = times(&dummy); vp->typeahead = ((newtime-oldtime) < NTICKS); @@ -953,11 +947,9 @@ static int cntlmode(Vi_t *vp) } break; -#if KSHELL case 'v': if(vp->repeat_set==0) goto vcommand; -#endif /* KSHELL */ /* FALLTHROUGH */ case 'G': /** goto command repeat **/ @@ -975,13 +967,11 @@ static int cntlmode(Vi_t *vp) goto newhist; } -#if KSHELL vcommand: if(ed_fulledit(vp->ed)==GOOD) return(BIGVI); else goto ringbell; -#endif /* KSHELL */ case '#': /** insert(delete) # to (no)comment command **/ if( cur_virt != INVALID ) @@ -2448,7 +2438,6 @@ addin: { /***** Input commands *****/ -#if KSHELL case '\t': if(vp->ed->e_tabcount!=1) return(BAD); @@ -2514,7 +2503,6 @@ addin: ed_ringbell(); return(BAD); -#endif /* KSHELL */ case '_': /** append last argument of prev command **/ save_v(vp); { diff --git a/src/cmd/ksh93/include/builtins.h b/src/cmd/ksh93/include/builtins.h index 23c2eebd5..a0e345b32 100644 --- a/src/cmd/ksh93/include/builtins.h +++ b/src/cmd/ksh93/include/builtins.h @@ -64,7 +64,7 @@ /* entry point for shell special builtins */ -#if _BLD_shell && defined(__EXPORT__) +#if defined(__EXPORT__) # define extern __EXPORT__ #endif diff --git a/src/cmd/ksh93/include/edit.h b/src/cmd/ksh93/include/edit.h index 7874d4255..ae32988f6 100644 --- a/src/cmd/ksh93/include/edit.h +++ b/src/cmd/ksh93/include/edit.h @@ -32,13 +32,6 @@ #include "FEATURE/options" #include "FEATURE/locale" - -#if !KSHELL -# include -# include -# include -#endif /* KSHELL */ - #include "FEATURE/setjmp" #include "terminal.h" @@ -130,12 +123,8 @@ typedef struct edit int *e_globals; /* global variables */ genchar *e_window; /* display window image */ char e_inmacro; /* processing macro expansion */ -#if KSHELL char e_vi_insert[2]; /* for sh_keytrap */ int32_t e_col; /* for sh_keytrap */ -#else - char e_prbuff[PRSIZE]; /* prompt buffer */ -#endif /* KSHELL */ struct termios e_ttyparm; /* initial tty parameters */ struct termios e_nttyparm; /* raw tty parameters */ struct termios e_savetty; /* saved terminal state */ @@ -185,23 +174,6 @@ typedef struct edit (c<'J'?c+1-'A':(c+10-'J')))))))))))))))) #endif -#if !KSHELL -# define STRIP 0377 -# define GMACS 1 -# define EMACS 2 -# define VIRAW 4 -# define EDITVI 8 -# define NOHIST 16 -# define EDITMASK 15 -# define is_option(m) (opt_flag&(m)) - extern char opt_flag; -# ifdef SYSCALL -# define read(fd,buff,n) syscall(3,fd,buff,n) -# else -# define read(fd,buff,n) rEAd(fd,buff,n) -# endif /* SYSCALL */ -#endif /* KSHELL */ - extern void ed_crlf(Edit_t*); extern void ed_putchar(Edit_t*, int); extern void ed_ringbell(void); @@ -216,19 +188,17 @@ extern int ed_read(void*, int, char*, int, int); extern int ed_emacsread(void*, int, char*, int, int); extern Edpos_t ed_curpos(Edit_t*, genchar*, int, int, Edpos_t); extern int ed_setcursor(Edit_t*, genchar*, int, int, int); -#if KSHELL - extern int ed_macro(Edit_t*,int); - extern int ed_expand(Edit_t*, char[],int*,int*,int,int); - extern int ed_fulledit(Edit_t*); - extern void *ed_open(Shell_t*); -#endif /* KSHELL */ -# if SHOPT_MULTIBYTE +extern int ed_macro(Edit_t*,int); +extern int ed_expand(Edit_t*, char[],int*,int*,int,int); +extern int ed_fulledit(Edit_t*); +extern void *ed_open(Shell_t*); +#if SHOPT_MULTIBYTE extern int ed_internal(const char*, genchar*); extern int ed_external(const genchar*, char*); extern void ed_gencpy(genchar*,const genchar*); extern void ed_genncpy(genchar*,const genchar*,int); extern int ed_genlen(const genchar*); -# endif /* SHOPT_MULTIBYTE */ +#endif /* SHOPT_MULTIBYTE */ #if SHOPT_EDPREDICT extern int ed_histgen(Edit_t*, const char*); # if SHOPT_ESH || SHOPT_VSH @@ -237,9 +207,6 @@ extern int ed_setcursor(Edit_t*, genchar*, int, int, int); #endif /* SHOPT_EDPREDICT */ extern const char e_runvi[]; -#if !KSHELL - extern const char e_version[]; -#endif /* KSHELL */ #if SHOPT_HISTEXPAND diff --git a/src/cmd/ksh93/include/io.h b/src/cmd/ksh93/include/io.h index 69f6819e2..46e93e80a 100644 --- a/src/cmd/ksh93/include/io.h +++ b/src/cmd/ksh93/include/io.h @@ -49,12 +49,6 @@ #define IOPICKFD 0x10000 /* file descriptor number was selected automatically */ #define IOHERESTRING 0x20000 /* allow here documents to be string streams */ -/* - * The remainder of this file is only used when compiled with shell - */ - -#if KSHELL - #ifndef ARG_RAW struct ionod; #endif /* !ARG_RAW */ @@ -66,7 +60,7 @@ extern int sh_iorenumber(Shell_t*,int,int); extern void sh_pclose(int[]); extern int sh_rpipe(int[]); extern void sh_iorestore(Shell_t*,int,int); -#if defined(__EXPORT__) && defined(_BLD_DLL) && defined(_BLD_shell) +#if defined(__EXPORT__) && defined(_BLD_DLL) __EXPORT__ #endif extern Sfio_t *sh_iostream(Shell_t*,int); @@ -113,4 +107,3 @@ extern const char e_sysrc[]; extern const char e_stdprompt[]; extern const char e_supprompt[]; extern const char e_ambiguous[]; -#endif /* KSHELL */ diff --git a/src/cmd/ksh93/include/nval.h b/src/cmd/ksh93/include/nval.h index 7dca8c5ef..d4f95ccdc 100644 --- a/src/cmd/ksh93/include/nval.h +++ b/src/cmd/ksh93/include/nval.h @@ -237,11 +237,7 @@ struct Namval #define NV_DCRESTRICT 1 /* variable that are restricted in rsh */ #if defined(__EXPORT__) && defined(_DLL) -# ifdef _BLD_shell # define extern __EXPORT__ -# else -# define extern __IMPORT__ -# endif /* _BLD_shell */ #endif /* _DLL */ /* prototype for array interface */ extern Namarr_t *nv_arrayptr(Namval_t*); diff --git a/src/cmd/ksh93/include/path.h b/src/cmd/ksh93/include/path.h index b33bdce06..11e77fc9e 100644 --- a/src/cmd/ksh93/include/path.h +++ b/src/cmd/ksh93/include/path.h @@ -85,7 +85,7 @@ extern char *path_fullname(Shell_t*,const char*); extern int path_expand(Shell_t*,const char*, struct argnod**); extern noreturn void path_exec(Shell_t*,const char*,char*[],struct argnod*); extern pid_t path_spawn(Shell_t*,const char*,char*[],char*[],Pathcomp_t*,int); -#if defined(__EXPORT__) && defined(_BLD_DLL) && defined(_BLD_shell) +#if defined(__EXPORT__) && defined(_BLD_DLL) # define extern __EXPORT__ #endif extern int path_open(Shell_t*,const char*,Pathcomp_t*); diff --git a/src/cmd/ksh93/include/shell.h b/src/cmd/ksh93/include/shell.h index 177007dff..aee03187d 100644 --- a/src/cmd/ksh93/include/shell.h +++ b/src/cmd/ksh93/include/shell.h @@ -219,9 +219,7 @@ extern Libcomp_t *liblist; #undef getenv /* -lshell provides its own */ #if defined(__EXPORT__) && defined(_DLL) -# ifdef _BLD_shell # define extern __EXPORT__ -# endif /* _BLD_shell */ #endif /* _DLL */ extern Dt_t *sh_bltin_tree(void); @@ -273,11 +271,7 @@ extern int sh_exec(const Shnode_t*,int); /* * direct access to sh is obsolete, use sh_getinterp() instead */ -#if !defined(_SH_PRIVATE) && defined(__IMPORT__) && !defined(_BLD_shell) - extern __IMPORT__ Shell_t sh; -#else - extern Shell_t sh; -#endif +extern Shell_t sh; #ifdef _DLL # undef extern diff --git a/src/cmd/ksh93/include/shnodes.h b/src/cmd/ksh93/include/shnodes.h index 7a44e4cd5..18756095b 100644 --- a/src/cmd/ksh93/include/shnodes.h +++ b/src/cmd/ksh93/include/shnodes.h @@ -213,7 +213,7 @@ union Shnode_u extern void sh_freeup(Shell_t*); extern void sh_funstaks(struct slnod*,int); extern Sfio_t *sh_subshell(Shell_t*,Shnode_t*, volatile int, int); -#if defined(__EXPORT__) && defined(_BLD_DLL) && defined(_BLD_shell) +#if defined(__EXPORT__) && defined(_BLD_DLL) __EXPORT__ #endif extern int sh_tdump(Sfio_t*, const Shnode_t*); diff --git a/src/cmd/ksh93/sh/expand.c b/src/cmd/ksh93/sh/expand.c index affb8e3a0..aac4f2954 100644 --- a/src/cmd/ksh93/sh/expand.c +++ b/src/cmd/ksh93/sh/expand.c @@ -27,15 +27,9 @@ * */ -#if KSHELL -# include "defs.h" -# include "variables.h" -# include "test.h" -#else -# include -# include -# include -#endif /* KSHELL */ +#include "defs.h" +#include "variables.h" +#include "test.h" #include #include #include @@ -43,23 +37,16 @@ #include "io.h" #include "path.h" -#if KSHELL -# define argbegin argnxt.cp - static const char *sufstr; - static int suflen; - static int scantree(Dt_t*,const char*, struct argnod**); -#else -# define sh_sigcheck(sig) (0) -# define sh_access access -# define suflen 0 -#endif /* KSHELL */ +#define argbegin argnxt.cp +static const char *sufstr; +static int suflen; +static int scantree(Dt_t*,const char*, struct argnod**); /* * This routine builds a list of files that match a given pathname * Uses external routine strgrpmatch() to match each component * A leading . must match explicitly - * */ #ifndef GLOB_AUGMENTED @@ -99,11 +86,9 @@ int path_expand(Shell_t *shp,const char *pattern, struct argnod **arghead) #endif if(sh_isstate(SH_COMPLETE)) { -#if KSHELL extra += scantree(shp->alias_tree,pattern,arghead); extra += scantree(shp->fun_tree,pattern,arghead); gp->gl_nextdir = nextdir; -#endif /* KSHELL */ flags |= GLOB_COMPLETE; flags &= ~GLOB_NOCHECK; } @@ -127,8 +112,6 @@ int path_expand(Shell_t *shp,const char *pattern, struct argnod **arghead) return(gp->gl_pathc+extra); } -#if KSHELL - /* * scan tree and add each name that matches the given pattern */ @@ -169,8 +152,6 @@ int path_complete(Shell_t *shp,const char *name,register const char *suffix, str return(path_expand(shp,name,arghead)); } -#endif - #if SHOPT_BRACEPAT static int checkfmt(Sfio_t* sp, void* vp, Sffmt_t* fp) diff --git a/src/cmd/ksh93/sh/lex.c b/src/cmd/ksh93/sh/lex.c index 1592c6d2a..a887978f8 100644 --- a/src/cmd/ksh93/sh/lex.c +++ b/src/cmd/ksh93/sh/lex.c @@ -32,15 +32,7 @@ #include #include #include "FEATURE/options" - -#if KSHELL -# include "defs.h" -#else -# include -# define nv_getval(np) ((np)->nvalue) - Shell_t sh = {1}; -#endif /* KSHELL */ - +#include "defs.h" #include "argnod.h" #include "test.h" #include "lexstates.h" @@ -136,7 +128,6 @@ static void lex_advance(Sfio_t *iop, const char *buff, register int size, void * register Shell_t *shp = lp->sh; register Sfio_t *log= shp->funlog; Stk_t *stkp = shp->stk; -#if KSHELL /* write to history file and to stderr if necessary */ if(iop && !sfstacked(iop)) { @@ -146,7 +137,6 @@ static void lex_advance(Sfio_t *iop, const char *buff, register int size, void * if(sh_isstate(SH_VERBOSE)) sfwrite(sfstderr, buff, size); } -#endif if(lp->lexd.nocopy) return; if(lp->lexd.dolparen && lp->lexd.docword && lp->lexd.docend) @@ -1498,10 +1488,8 @@ breakloop: if(!lp->lex.incase && !assignment && fcpeek(0)!=LPAREN && (np=nv_search(state,shp->alias_tree,HASH_SCOPE)) && !nv_isattr(np,NV_NOEXPAND) -#if KSHELL && (lp->aliasok!=2 || nv_isattr(np,BLT_DCL)) && (!sh_isstate(SH_NOALIAS) || nv_isattr(np,NV_NOFREE)) -#endif /* KSHELL */ && (state=nv_getval(np))) { setupalias(lp,state,np); @@ -2118,11 +2106,7 @@ noreturn void sh_syntax(Lex_t *lp) fcclose(); shp->inlineno = lp->inlineno; shp->st.firstline = lp->firstline; -#if KSHELL if(!sh_isstate(SH_INTERACTIVE) && !sh_isstate(SH_PROFILE)) -#else - if(shp->inlineno!=1) -#endif errormsg(SH_DICT,ERROR_exit(SYNBAD),e_lexsyntax1,lp->lastline,tokstr,cp); else errormsg(SH_DICT,ERROR_exit(SYNBAD),e_lexsyntax2,tokstr,cp); diff --git a/src/cmd/ksh93/sh/macro.c b/src/cmd/ksh93/sh/macro.c index 3d97edcf4..cded43095 100644 --- a/src/cmd/ksh93/sh/macro.c +++ b/src/cmd/ksh93/sh/macro.c @@ -2152,7 +2152,6 @@ static void comsubst(Mac_t *mp,register Shnode_t* t, int type) mp->shp->inlineno = c; type = 1; } -#if KSHELL if(t) { fcsave(&save); @@ -2203,9 +2202,6 @@ static void comsubst(Mac_t *mp,register Shnode_t* t, int type) sh_onstate(SH_HISTORY); if(was_verbose) sh_onstate(SH_VERBOSE); -#else - sp = sfpopen(NIL(Sfio_t*),str,"r"); -#endif *mp = savemac; np = sh_scoped(mp->shp,IFSNOD); nv_putval(np,mp->ifsp,NV_RDONLY); diff --git a/src/cmd/ksh93/sh/parse.c b/src/cmd/ksh93/sh/parse.c index dd47a51c2..1806d01bc 100644 --- a/src/cmd/ksh93/sh/parse.c +++ b/src/cmd/ksh93/sh/parse.c @@ -29,12 +29,7 @@ * This is the parser for a shell language */ -#if KSHELL #include "defs.h" -#else -#include -#include -#endif #include #include #include "shlex.h" @@ -72,15 +67,6 @@ static Shnode_t *test_primary(Lex_t*); #endif /* NIL */ #define CNTL(x) ((x)&037) - -#if !KSHELL -static struct stdata -{ - struct slnod *staklist; - int cmdline; -} st; -#endif - static int opt_get; static int loop_level; static struct argnod *label_list; @@ -396,9 +382,7 @@ void *sh_parse(Shell_t *shp, Sfio_t *iop, int flag) flag &= ~SH_FUNEVAL; if((flag&SH_NL) && (shp->inlineno=error_info.line+shp->st.firstline)==0) shp->inlineno=1; -#if KSHELL shp->nextprompt = 2; -#endif t = sh_cmd(lexp,(flag&SH_EOF)?EOFSYM:'\n',SH_SEMI|SH_EMPTY|(flag&SH_NL)); fcclose(); fcrestore(&sav_input); diff --git a/src/cmd/ksh93/sh/streval.c b/src/cmd/ksh93/sh/streval.c index 084771bff..e5a047d81 100644 --- a/src/cmd/ksh93/sh/streval.c +++ b/src/cmd/ksh93/sh/streval.c @@ -979,7 +979,7 @@ Sfdouble_t strval(Shell_t *shp,const char *s,char **end,Sfdouble_t(*conv)(const #undef error -#if _BLD_shell && defined(__EXPORT__) +#if defined(__EXPORT__) #define extern __EXPORT__ #endif