From cfc1664a3161f3cf0ebe63e73d1f9d4212fa3202 Mon Sep 17 00:00:00 2001 From: Chase Date: Thu, 21 Jul 2022 21:43:09 -0500 Subject: [PATCH 01/75] configure.ac: remove patch requirement --- cde/configure.ac | 4 ---- cde/programs/dtksh/Makefile.am | 24 +++++++++--------------- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/cde/configure.ac b/cde/configure.ac index c224715e9..316ac182f 100644 --- a/cde/configure.ac +++ b/cde/configure.ac @@ -419,10 +419,6 @@ AC_CHECK_PROGS(GENCAT, gencat) if test -z "$ac_cv_prog_GENCAT"; then MISSING_PROGS="gencat ${MISSING_PROGS}" fi -AC_CHECK_PROGS(PATCH, patch) -if test -z "$ac_cv_prog_PATCH"; then - MISSING_PROGS="patch ${MISSING_PROGS}" -fi AC_CHECK_PROGS(ONSGMLS, onsgmls) if test -z "$ac_cv_prog_ONSGMLS"; then MISSING_PROGS="ONSGMLS ${MISSING_PROGS}" diff --git a/cde/programs/dtksh/Makefile.am b/cde/programs/dtksh/Makefile.am index cf61c3485..07c1d76ff 100644 --- a/cde/programs/dtksh/Makefile.am +++ b/cde/programs/dtksh/Makefile.am @@ -18,16 +18,16 @@ BUILT_SOURCES = init.c dtksh_CPPFLAGS = -I$(KSH93SRC)/include/ast -I$(KSH93SRC)/src/cmd/ksh93/include \ -I$(KSH93SRC)/src/cmd/ksh93 -I${srcdir}/lib/DtPrint \ - -I${srcdir}/lib/DtHelp '-DAST_VERSION=20111111' \ - -DSHOPT_STATS -DSHOPT_NAMESPACE -DSHOPT_2DMATCH \ - -DSHOPT_MULTIBYTE -DSHOPT_BGX -DSHOPT_AUDIT -D_PACKAGE_ast \ - -DSHOPT_DYNAMIC -D_BLD_shell -DSHOPT_KIA -DKSHELL \ - -DSHOPT_HISTEXPAND -DSHOPT_EDPREDICT -DSHOPT_ESH -DSHOPT_VSH \ - -DSHOPT_FIXEDARRAY '-DERROR_CONTEXT_T=Error_context_t' \ - -DSHOPT_SUID_EXEC -D_API_ast=20100309 -DSHOPT_BRACEPAT \ - -DBUILD_DTKSH + -I${srcdir}/lib/DtHelp -Iksh93/src/cmd/ksh93/FEATURE \ + '-DAST_VERSION=20111111' -DSHOPT_STATS -DSHOPT_NAMESPACE \ + -DSHOPT_2DMATCH -DSHOPT_MULTIBYTE -DSHOPT_BGX -DSHOPT_AUDIT \ + -D_PACKAGE_ast -DSHOPT_DYNAMIC -D_BLD_shell -DSHOPT_KIA \ + -DKSHELL -DSHOPT_HISTEXPAND -DSHOPT_EDPREDICT -DSHOPT_ESH \ + -DSHOPT_VSH -DSHOPT_FIXEDARRAY \ + '-DERROR_CONTEXT_T=Error_context_t' -DSHOPT_SUID_EXEC \ + -D_API_ast=20100309 -DSHOPT_BRACEPAT -DBUILD_DTKSH -dtksh_LDADD = $(DTCLIENTLIBS) pmain.o $(XTOOLLIB) \ +dtksh_LDADD = $(DTCLIENTLIBS) ksh93/src/cmd/ksh93/pmain.o $(XTOOLLIB) \ libshell.a $(KSH93SRC)/lib/libcmd.a $(KSH93SRC)/lib/libast.a \ $(KSH93SRC)/lib/libdll.a @@ -80,12 +80,6 @@ ksh93/bin/ksh: init.c: ksh93/bin/ksh $(CP) ksh93/src/cmd/ksh93/sh/init.c ./ -pmain.o: ksh93/bin/ksh - $(CP) ksh93/src/cmd/ksh93/pmain.o ./ - -FEATURE: ksh93/bin/ksh - $(CP) -R ksh93/src/cmd/ksh93/FEATURE ./ - libshell.a: $(KSH93SLIBSHELL) dtksh-init.o $(CP) $(KSH93LIBSHELL) libshell.a; \ $(AR) d libshell.a init.o; \ From bd83b53d566bc7afd80f4fe8539dc2f9050d766b Mon Sep 17 00:00:00 2001 From: Chase Date: Fri, 22 Jul 2022 15:58:17 -0500 Subject: [PATCH 02/75] dtfile/dtcopy: remove duplicate icons --- cde/programs/dtfile/dtcopy/sharedFuncs.c | 55 +++++++----------------- 1 file changed, 15 insertions(+), 40 deletions(-) diff --git a/cde/programs/dtfile/dtcopy/sharedFuncs.c b/cde/programs/dtfile/dtcopy/sharedFuncs.c index eea1a601c..53c9f9c02 100644 --- a/cde/programs/dtfile/dtcopy/sharedFuncs.c +++ b/cde/programs/dtfile/dtcopy/sharedFuncs.c @@ -90,41 +90,11 @@ /************************************************************************ * Bitmap Data for Default Symbol **********************************<->***********************************/ - -static unsigned char errorBits[] = { - 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0xf0, 0x3a, 0x00, 0x58, 0x55, 0x00, - 0x2c, 0xa0, 0x00, 0x56, 0x40, 0x01, 0xaa, 0x80, 0x02, 0x46, 0x81, 0x01, - 0x8a, 0x82, 0x02, 0x06, 0x85, 0x01, 0x0a, 0x8a, 0x02, 0x06, 0x94, 0x01, - 0x0a, 0xe8, 0x02, 0x14, 0x50, 0x01, 0x28, 0xb0, 0x00, 0xd0, 0x5f, 0x00, - 0xa0, 0x2a, 0x00, 0x40, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - -static unsigned char infoBits[] = { - 0x00, 0x00, 0x78, 0x00, 0x54, 0x00, 0x2c, 0x00, 0x54, 0x00, 0x28, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x2a, 0x00, 0x5c, 0x00, 0x28, 0x00, - 0x58, 0x00, 0x28, 0x00, 0x58, 0x00, 0x28, 0x00, 0x58, 0x00, 0x28, 0x00, - 0x58, 0x00, 0xae, 0x01, 0x56, 0x01, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00}; - -static unsigned char questionBits[] = { - 0xf0, 0x3f, 0x00, 0x58, 0x55, 0x00, 0xac, 0xaa, 0x00, 0xd6, 0x5f, 0x01, - 0xea, 0xbf, 0x02, 0xf6, 0x7f, 0x01, 0xea, 0xba, 0x02, 0xf6, 0x7d, 0x05, - 0xea, 0xba, 0x0a, 0x56, 0x7d, 0x15, 0xaa, 0xbe, 0x1e, 0x56, 0x5f, 0x01, - 0xac, 0xaf, 0x02, 0x58, 0x57, 0x01, 0xb0, 0xaf, 0x00, 0x60, 0x55, 0x01, - 0xa0, 0xaa, 0x00, 0x60, 0x17, 0x00, 0xa0, 0x2f, 0x00, 0x60, 0x17, 0x00, - 0xb0, 0x2a, 0x00, 0x50, 0x55, 0x00}; - -static unsigned char warningBits[] = { - 0x00, 0x00, 0x18, 0x00, 0x2c, 0x00, 0x56, 0x00, 0x2a, 0x00, 0x56, 0x00, - 0x2a, 0x00, 0x56, 0x00, 0x2c, 0x00, 0x14, 0x00, 0x2c, 0x00, 0x14, 0x00, - 0x2c, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x14, 0x00, - 0x2c, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00}; - -static unsigned char workingBits[] = { - 0x00, 0x00, 0x00, 0xfe, 0xff, 0x0f, 0xaa, 0xaa, 0x0a, 0x44, 0x55, 0x06, - 0xcc, 0x2a, 0x02, 0x44, 0x55, 0x06, 0xcc, 0x2a, 0x02, 0x84, 0x15, 0x06, - 0x8c, 0x2a, 0x02, 0x04, 0x15, 0x06, 0x0c, 0x0a, 0x02, 0x04, 0x06, 0x06, - 0x0c, 0x0b, 0x02, 0x84, 0x15, 0x06, 0xcc, 0x2a, 0x02, 0x44, 0x55, 0x06, - 0xcc, 0x2a, 0x02, 0x44, 0x55, 0x06, 0xcc, 0x2a, 0x02, 0x44, 0x55, 0x06, - 0xfe, 0xff, 0x0f, 0x56, 0x55, 0x05, 0x00, 0x00, 0x00}; +#include +#include +#include +#include +#include Widget G_toplevel; int G_dialog_closed = FALSE; @@ -344,19 +314,24 @@ ImageInitialize( Display *display ) /* create and install the default images for the symbol */ - image = CreateDefaultImage (display, (char *)errorBits, 20, 20); + image = CreateDefaultImage (display, (char *)xm_error_bits, xm_error_width, + xm_error_height); XmInstallImage (image, "default_xm_error"); - image = CreateDefaultImage (display, (char *)infoBits, 11, 24); + image = CreateDefaultImage (display, (char *)xm_information_bits, + xm_information_width, xm_information_height); XmInstallImage (image, "default_xm_information"); - image = CreateDefaultImage (display, (char *)questionBits, 22, 22); + image = CreateDefaultImage (display, (char *)xm_question_bits, + xm_question_width, xm_question_height); XmInstallImage (image, "default_xm_question"); - image = CreateDefaultImage (display, (char *)warningBits, 9, 22); + image = CreateDefaultImage (display, (char *)xm_warning_bits, + xm_warning_width, xm_warning_height); XmInstallImage (image, "default_xm_warning"); - image = CreateDefaultImage (display, (char *)workingBits, 21, 23); + image = CreateDefaultImage (display, (char *)xm_working_bits, + xm_working_width, xm_working_height); XmInstallImage (image, "default_xm_working"); return ; From edf43195481a1629fa871ce17baf3d64e568181c Mon Sep 17 00:00:00 2001 From: Chase Date: Fri, 22 Jul 2022 21:42:06 -0500 Subject: [PATCH 03/75] Discontinue HPUX support --- cde/.gitignore | 2 - cde/configure.ac | 5 - cde/examples/dtaction/Makefile.hp | 45 - cde/examples/dtcalendar/Makefile.hp | 45 - cde/examples/dtdnd/Makefile.hp | 45 - cde/examples/dtdts/Makefile.hp | 45 - cde/examples/dtscreen/Makefile.hp | 45 - cde/examples/dtsession/Makefile.hp | 45 - cde/examples/dtterm/Makefile.hp | 45 - cde/examples/dtwidget/Makefile.hp | 53 - cde/examples/dtwsm/Makefile.hp | 53 - cde/examples/template/Makefile.hp | 107 -- cde/examples/tt/Makefile.hp | 45 - cde/include/Dt/SearchP.h | 7 - cde/include/Dt/TermPrimP.h | 9 +- cde/include/Dt/XlationSvc.h | 2 - cde/include/Dt/vista.h | 3 - cde/include/EUSCompat.h | 43 +- cde/include/SPC/spc-proto.h | 1 - cde/include/bms/sbport.h | 18 +- cde/lib/DtHelp/HP-UX.lcx | 606 ----------- cde/lib/DtHelp/HyperText.c | 8 - cde/lib/DtHelp/Print.c | 4 - cde/lib/DtHelp/StringFuncs.c | 10 - cde/lib/DtHelp/il/ilversion.c | 23 - cde/lib/DtHelp/libDtHelp.elist | 24 +- cde/lib/DtMmdb/HardCopy/TemplatesAutoNumber.C | 2 +- cde/lib/DtMmdb/StyleSheet/Debug.h | 2 +- cde/lib/DtMmdb/StyleSheet/SSTemplates.C | 2 +- cde/lib/DtMmdb/dti_excs/Destructable_il.hh | 2 +- cde/lib/DtMmdb/dti_excs/Exception.hh | 8 - cde/lib/DtMmdb/dti_excs/Exceptions.hh | 7 +- cde/lib/DtMmdb/dti_excs/terminate.C | 7 - cde/lib/DtMmdb/misc/unique_id.c | 17 +- cde/lib/DtMmdb/misc/unique_id.h | 2 +- cde/lib/DtMmdb/oliasdb/c_api.C | 9 - cde/lib/DtMmdb/oliasdb/c_api_pure_virtual.C | 13 +- cde/lib/DtMmdb/schema/desc.h | 2 +- cde/lib/DtMmdb/utility/debug.h | 2 +- cde/lib/DtMmdb/utility/filebuf.C | 2 +- cde/lib/DtMmdb/utility/funcs.C | 4 +- cde/lib/DtMmdb/utility/funcs.h | 3 +- cde/lib/DtMrm/DtMrm.c | 4 - cde/lib/DtSearch/libDtSearch.elist | 4 - cde/lib/DtSvc/DtEncap/pty.c | 202 ---- cde/lib/DtSvc/DtEncap/spc-exec.c | 4 - cde/lib/DtSvc/DtEncap/usersig.c | 48 +- cde/lib/DtSvc/DtUtil1/CmdMain.c | 21 - cde/lib/DtSvc/DtUtil1/CmdProcess.c | 4 - cde/lib/DtSvc/DtUtil1/DbLoad.c | 6 - cde/lib/DtSvc/DtUtil1/Dts.c | 7 +- cde/lib/DtSvc/DtUtil1/DtsInit.c | 6 - cde/lib/DtSvc/DtUtil2/FileUtil.c | 4 - cde/lib/DtSvc/DtUtil2/MsgCat.c | 112 +-- cde/lib/DtSvc/DtUtil2/Utility.c | 4 - cde/lib/DtSvc/include/codelibs/stringx.h | 4 +- cde/lib/DtSvc/libDtSvc.elist | 5 +- cde/lib/DtTerm/Term/TermParse.c | 6 - cde/lib/DtTerm/TermPrim/TermPrim.c | 11 +- cde/lib/DtTerm/TermPrim/TermPrimGetPty-bsd.c | 58 +- .../DtTerm/TermPrim/TermPrimGetPty-clone.c | 37 - cde/lib/DtTerm/TermPrim/TermPrimOSDepI.h | 26 - cde/lib/DtTerm/TermPrim/TermPrimParser.c | 6 - cde/lib/DtTerm/TermPrim/TermPrimSetPty.c | 56 +- cde/lib/DtTerm/TermPrim/TermPrimSetUtmp.c | 23 +- cde/lib/DtTerm/TermPrim/TermPrimSubproc.c | 17 +- cde/lib/DtWidget/Editor.c | 4 +- cde/lib/csa/agent.wrapbegin | 4 - cde/lib/csa/agent.wrapend | 4 - cde/lib/csa/cm.h | 7 +- cde/lib/csa/cmcb.h | 5 - cde/lib/csa/connection.c | 30 - cde/lib/csa/libcsa.elist | 4 - cde/lib/csa/rtable2.h | 7 +- cde/lib/csa/rtable3.h | 7 +- cde/lib/csa/rtable4.h | 5 - cde/lib/pam/libpam/pam_framework.c | 52 - .../bin/tt_type_comp/frozen.mp_types_gram.C | 6 - cde/lib/tt/bin/ttdbserverd/db_server_svc.C | 4 - cde/lib/tt/lib/db/tt_db_file.h | 2 +- cde/lib/tt/lib/libtt.elist | 40 - cde/lib/tt/lib/mp/mp_session.C | 2 +- cde/lib/tt/lib/realpath.c | 2 +- cde/lib/tt/lib/tt_options.h | 58 -- cde/lib/tt/lib/tttk/ttdesktop.C | 5 +- cde/lib/tt/lib/util/tt_object_list.h | 2 +- cde/lib/tt/lib/util/tt_port.C | 16 +- cde/lib/tt/lib/util/tt_string.h | 6 +- cde/lib/tt/lib/util/tt_string_match.C | 6 - cde/lib/tt/lib/util/tt_tracefile_parse.C | 2 +- cde/lib/tt/lib/util/tt_xdr_utils.C | 2 +- cde/lib/tt/slib/mp_s_session.C | 2 +- cde/programs/dtaction/Main.c | 16 +- cde/programs/dtaction/demo/Makefile.hp | 52 - cde/programs/dtappbuilder/src/ab/Makefile.am | 1 - .../dtappbuilder/src/abmf/make_file.c | 75 +- .../src/include/ab_private/util.h | 1 - .../dtappbuilder/src/libABil/Makefile.am | 4 - .../dtappbuilder/src/libABobjXm/Makefile.am | 4 - .../dtappbuilder/src/libAButil/Makefile.am | 4 - .../dtappbuilder/src/libAButil/util.c | 33 +- .../dtappbuilder/src/libAButil/util_convert.c | 2 - cde/programs/dtcalc/calctool.h | 13 - cde/programs/dtcalc/text.c | 7 - cde/programs/dtcm/server/log.c | 8 - cde/programs/dtcm/server/svcmain.c | 14 +- cde/programs/dtdocbook/instant/main.c | 7 - cde/programs/dtexec/osdep.h | 4 - cde/programs/dtfile/ChangeDir.c | 4 - cde/programs/dtfile/File.c | 10 - cde/programs/dtfile/FileDialog.c | 2 +- cde/programs/dtfile/FileManip.c | 2 +- cde/programs/dtfile/FileOp.c | 6 +- cde/programs/dtfile/Find.c | 23 +- cde/programs/dtfile/Find.h | 2 +- cde/programs/dtfile/FindP.c | 2 +- cde/programs/dtfile/Main.c | 8 +- cde/programs/dtfile/Main.h | 2 +- cde/programs/dtfile/MkDir.c | 3 - cde/programs/dtfile/dtfile.msg | 5 - cde/programs/dtfile/fsDialog.c | 18 +- cde/programs/dthelp/dthelpgen/helpgen.c | 4 - .../dthelp/parser/canon1/helptag/global.h | 6 +- .../dthelp/parser/canon1/helptag/help.c | 6 +- .../dthelp/parser/canon1/helptag/help.if | 16 +- .../dthelp/parser/canon1/helptag/make.c | 4 +- .../dthelp/parser/canon1/helptag/option.c | 6 +- .../dthelp/parser/canon1/parser/parser.c | 2 +- .../dthelp/parser/canon1/util/malloc.c | 6 +- .../dthelp/parser/pass1/helptag/help.c | 6 +- .../dthelp/parser/pass1/helptag/help.if | 16 +- .../dthelp/parser/pass1/helptag/make.c | 4 +- .../dthelp/parser/pass1/helptag/option.c | 6 +- .../dthelp/parser/pass1/parser/parser.c | 2 +- .../dthelp/parser/pass1/util/malloc.c | 6 +- .../dthelp/parser/pass2/htag2/global.h | 2 +- .../dthelp/parser/pass2/htag2/option.c | 6 +- .../dthelp/parser/pass2/parser/parser.c | 2 +- .../dthelp/parser/pass2/util/malloc.c | 6 +- cde/programs/dtimsstart/env.c | 123 --- cde/programs/dtimsstart/file.c | 129 --- cde/programs/dtimsstart/main.c | 10 - cde/programs/dtimsstart/start.c | 208 ---- cde/programs/dtimsstart/util.c | 68 -- cde/programs/dtimsstart/xims.h | 51 - cde/programs/dtimsstart/ximspath.h | 6 - .../dtinfo/src/Agents/BookmarkEditMotif.C | 2 +- .../dtinfo/src/Agents/BookmarkEditMotif.hh | 3 - .../dtinfo/src/Agents/GraphicAgentMotif.C | 10 - .../dtinfo/dtinfo/src/Agents/PrefAgentMotif.C | 2 +- .../dtinfo/src/Agents/PrintPanelAgentMotif.hh | 2 +- .../dtinfo/dtinfo/src/Basic/BitField.hh | 2 +- .../dtinfo/dtinfo/src/Basic/FolioObject.hh | 2 +- .../dtinfo/dtinfo/src/Managers/PrefMgr.C | 2 +- .../dtinfo/src/Other/WindowSystemMotif.C | 6 +- .../dtinfo/src/Preferences/UserPreference.C | 2 +- cde/programs/dtinfo/dtinfo/src/Templates.C | 2 +- .../dtinfo/dtinfo/src/UAS/Base/UAS_Sender.hh | 2 +- .../dtinfo/src/UAS/Test/UserPreference.C | 2 - cde/programs/dtinfo/dtinfo/src/config.h | 4 +- cde/programs/dtinfo/dtinfo/src/main.C | 14 - cde/programs/dtlogin/account.c | 3 - cde/programs/dtlogin/auth.c | 10 +- cde/programs/dtlogin/bls/validate.c | 1 - cde/programs/dtlogin/chooser.c | 10 +- cde/programs/dtlogin/config/Xconfig.src | 2 +- cde/programs/dtlogin/config/Xresources.src | 66 -- cde/programs/dtlogin/config/Xservers.src | 2 - cde/programs/dtlogin/config/Xsession.src | 30 - cde/programs/dtlogin/daemon.c | 3 - cde/programs/dtlogin/dm.c | 8 +- cde/programs/dtlogin/dm.h | 5 +- cde/programs/dtlogin/genauth.c | 2 +- cde/programs/dtlogin/netaddr.c | 2 - cde/programs/dtlogin/resource.c | 6 +- cde/programs/dtlogin/session.c | 6 - cde/programs/dtlogin/sysauth.c | 942 +----------------- cde/programs/dtlogin/util.c | 102 +- cde/programs/dtlogin/verify.c | 10 - cde/programs/dtlogin/vgauth.c | 930 +---------------- cde/programs/dtlogin/vgcallback.c | 2 - cde/programs/dtlogin/vgmain.c | 19 - cde/programs/dtlogin/xdmcp.c | 4 - cde/programs/dtmail/MotifApp/Application.C | 4 - cde/programs/dtmail/dtmail/RoamApp.C | 4 - .../dtmail/include/DtMail/HashTable.hh | 8 - .../dtmail/libDtMail/Common/DtMailError.C | 9 - .../dtmail/libDtMail/Common/DtMailRc.C | 2 - .../dtmail/libDtMail/Common/DtMailServer.C | 8 - .../dtmail/libDtMail/Common/HashTable.C | 2 - .../dtmail/libDtMail/Common/Process.C | 2 - .../dtmail/libDtMail/RFC/RFCMailBox.C | 6 +- .../dtmail/libDtMail/RFC/RFCTransport.C | 2 +- cde/programs/dtmail/libDtMail/RFC/SunV3.C | 2 - cde/programs/dtpad/printSetup.c | 4 - cde/programs/dtpad/ttMsgSupport.c | 8 +- cde/programs/dtprintinfo/DtPrintinfo.C | 27 - cde/programs/dtprintinfo/libUI/BaseUI.C | 6 +- .../dtprintinfo/libUI/MotifUI/DtDND.C | 2 - .../dtprintinfo/objects/PrintObj/ParseJobs.C | 110 +- .../objects/PrintObj/PrintSubSys.C | 10 - .../dtprintinfo/objects/PrintObj/Queue.C | 16 - cde/programs/dtscreen/dtscreen.h | 4 +- cde/programs/dtscreen/usleep.c | 4 +- .../dtsearchpath/dtsp/HelpSearchPath.C | 14 - cde/programs/dtsearchpath/dtsp/Options.C | 3 - cde/programs/dtsearchpath/libCliSrv/UnixEnv.C | 2 - cde/programs/dtsession/Sm.h | 5 - cde/programs/dtsession/SmConMgmt.c | 25 +- cde/programs/dtsession/SmGlobals.c | 43 - cde/programs/dtsession/SmMain.c | 9 +- cde/programs/dtsession/SmRestore.c | 67 +- cde/programs/dtsession/sys.resources.src | 44 - cde/programs/dtspcd/main.c | 15 - cde/programs/dtspcd/spcd_event.c | 4 - cde/programs/dtstyle/Backdrop.c | 29 - cde/programs/dtstyle/ColorFile.c | 12 +- cde/programs/dtstyle/ColorMain.c | 29 - .../dtterm/tests/shared/include_files.h | 4 - cde/programs/dtterm/tests/shared/p2c.h | 10 - .../dtudcfonted/dtgpftobdf/bdftosnf.h | 7 - .../dtudcfonted/libfal/_falSetLocale.c | 8 +- cde/programs/dtwm/Dtwm.defs.src | 3 - cde/programs/dtwm/WmResParse.c | 25 - cde/programs/dtwm/examples/occupy/Makefile.hp | 48 - cde/programs/dtwm/examples/wsinfo/Makefile.hp | 48 - .../localized/de_DE.UTF-8/msg/dtfile.msg | 7 - .../localized/el_GR.UTF-8/msg/dtfile.msg | 5 - .../localized/sv_SE.UTF-8/msg/dtfile.msg | 5 - cde/programs/localized/util/mkcatdefs.c | 6 - cde/programs/ttsnoop/Makefile.am | 1 - cde/programs/ttsnoop/ttsnoop.C.src | 4 +- cde/programs/types/demo/Makefile.hp | 48 - cde/programs/types/unsupported.dt.src | 67 +- cde/programs/types/uxstd.dt.src | 15 - 235 files changed, 198 insertions(+), 6290 deletions(-) delete mode 100644 cde/examples/dtaction/Makefile.hp delete mode 100644 cde/examples/dtcalendar/Makefile.hp delete mode 100644 cde/examples/dtdnd/Makefile.hp delete mode 100644 cde/examples/dtdts/Makefile.hp delete mode 100644 cde/examples/dtscreen/Makefile.hp delete mode 100644 cde/examples/dtsession/Makefile.hp delete mode 100644 cde/examples/dtterm/Makefile.hp delete mode 100644 cde/examples/dtwidget/Makefile.hp delete mode 100644 cde/examples/dtwsm/Makefile.hp delete mode 100644 cde/examples/template/Makefile.hp delete mode 100644 cde/examples/tt/Makefile.hp delete mode 100644 cde/lib/DtHelp/HP-UX.lcx delete mode 100644 cde/programs/dtaction/demo/Makefile.hp delete mode 100644 cde/programs/dtwm/examples/occupy/Makefile.hp delete mode 100644 cde/programs/dtwm/examples/wsinfo/Makefile.hp delete mode 100644 cde/programs/types/demo/Makefile.hp diff --git a/cde/.gitignore b/cde/.gitignore index 0a358afa2..0102a0fab 100644 --- a/cde/.gitignore +++ b/cde/.gitignore @@ -242,7 +242,6 @@ programs/dtappbuilder/src/ab/.dtcodegen.log programs/dtappbuilder/src/ab/Dtbuilder programs/dtappbuilder/src/ab/Dtbuilder.BAK programs/dtappbuilder/src/ab/Makefile.aix -programs/dtappbuilder/src/ab/Makefile.hpux programs/dtappbuilder/src/ab/Makefile.sunos programs/dtappbuilder/src/ab/Makefile.linux programs/dtappbuilder/src/ab/Makefile.freebsd @@ -2105,7 +2104,6 @@ programs/nsgmls/xentmgr_inst.C # programs/ttsnoop programs/ttsnoop/.dtcodegen.log programs/ttsnoop/Makefile.aix -programs/ttsnoop/Makefile.hpux programs/ttsnoop/Makefile.sunos programs/ttsnoop/Makefile.linux programs/ttsnoop/Makefile.freebsd diff --git a/cde/configure.ac b/cde/configure.ac index 316ac182f..e2563db39 100644 --- a/cde/configure.ac +++ b/cde/configure.ac @@ -61,7 +61,6 @@ build_freebsd=no build_openbsd=no build_netbsd=no build_solaris=no -build_hpux=no build_aix=no dnl For now, we need to fake the OSMAJORVERSION, OSMINORVERSION. In Linux @@ -121,9 +120,6 @@ case "${build_os}" in aix*) build_aix=yes ;; - hpux*) - build_hpux=yes - ;; esac AM_CONDITIONAL([LINUX], [test "$build_linux" = "yes"]) @@ -133,7 +129,6 @@ AM_CONDITIONAL([OPENBSD], [test "$build_openbsd" = "yes"]) AM_CONDITIONAL([NETBSD], [test "$build_netbsd" = "yes"]) AM_CONDITIONAL([SOLARIS], [test "$build_solaris" = "yes"]) AM_CONDITIONAL([AIX], [test "$build_aix" = "yes"]) -AM_CONDITIONAL([HPUX], [test "$build_hpux" = "yes"]) dnl Add osmajor/minor version to cppflags. OSVERSION="-DOSMAJORVERSION=$OSMAJORVERSION -DOSMINORVERSION=$OSMINORVERSION" diff --git a/cde/examples/dtaction/Makefile.hp b/cde/examples/dtaction/Makefile.hp deleted file mode 100644 index e9215e214..000000000 --- a/cde/examples/dtaction/Makefile.hp +++ /dev/null @@ -1,45 +0,0 @@ -# $XConsortium: Makefile.hp /main/2 1996/05/13 11:42:21 drk $ -########################################################################## -# -# Makefile for dtdts examples (HP) -# -# (c) Copyright 1993, 1994 Hewlett-Packard Company -# (c) Copyright 1993, 1994 International Business Machines Corp. -# (c) Copyright 1993, 1994 Sun Microsystems, Inc. -# (c) Copyright 1993, 1994 Novell, Inc. -# -########################################################################## - -CC = cc -RM = rm -f - -PROGRAM = actions -SOURCES = actions.c -OBJECTS = actions.o - -DEFINES = -CDEBUGFLAGS = -O -CFLAGS = -Aa -z $(DEFINES) $(CDEBUGFLAGS) - -DTINCLUDE = -I/usr/dt/include -X11INCLUDE = -I/usr/include/X11R5 - -INCLUDES = $(DTINCLUDE) $(X11INCLUDE) - -DTLIBS = -L/usr/dt/lib -lDtSvc -ltt -lXm -X11LIBS = -L/usr/lib/X11R5 -lXt -lX11 -SYSLIBS = - -LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS) -LDFLAGS = - -.c.o: - ${CC} -c $(CFLAGS) $(INCLUDES) $< - -all:: $(PROGRAM) - -$(PROGRAM):: $(OBJECTS) - ${CC} -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES) - -clean:: - ${RM} $(PROGRAM) $(OBJECTS) diff --git a/cde/examples/dtcalendar/Makefile.hp b/cde/examples/dtcalendar/Makefile.hp deleted file mode 100644 index 263a470e2..000000000 --- a/cde/examples/dtcalendar/Makefile.hp +++ /dev/null @@ -1,45 +0,0 @@ -# $XConsortium: Makefile.hp /main/2 1996/05/13 11:43:48 drk $ -########################################################################## -# -# Makefile for dtcalendar examples (HP) -# -# (c) Copyright 1993, 1994 Hewlett-Packard Company -# (c) Copyright 1993, 1994 International Business Machines Corp. -# (c) Copyright 1993, 1994 Sun Microsystems, Inc. -# (c) Copyright 1993, 1994 Novell, Inc. -# -########################################################################## - -CC = cc -RM = rm -f - -PROGRAM = attributes -SOURCES = attributes.c -OBJECTS = attributes.o - -DEFINES = -CDEBUGFLAGS = -O -CFLAGS = -Aa -z $(DEFINES) $(CDEBUGFLAGS) - -DTINCLUDE = -I/usr/dt/include -X11INCLUDE = - -INCLUDES = $(DTINCLUDE) $(X11INCLUDE) - -DTLIBS = -L/usr/dt/lib -lcsa -X11LIBS = -SYSLIBS = - -LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS) -LDFLAGS = - -.c.o: - ${CC} -c $(CFLAGS) $(INCLUDES) $< - -all:: $(PROGRAM) - -$(PROGRAM):: $(OBJECTS) - ${CC} -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES) - -clean:: - ${RM} $(PROGRAM) $(OBJECTS) diff --git a/cde/examples/dtdnd/Makefile.hp b/cde/examples/dtdnd/Makefile.hp deleted file mode 100644 index 68416fc69..000000000 --- a/cde/examples/dtdnd/Makefile.hp +++ /dev/null @@ -1,45 +0,0 @@ -# $XConsortium: Makefile.hp /main/2 1996/05/13 11:45:18 drk $ -########################################################################## -# -# Makefile for dtdnddemo -# -# HP Platform -# -# (c) Copyright 1993, 1994 Hewlett-Packard Company -# (c) Copyright 1993, 1994 International Business Machines Corp. -# (c) Copyright 1993, 1994 Sun Microsystems, Inc. -# (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of -# Novell, Inc. -########################################################################## - -PROGRAM = dtdnddemo -SOURCES = demo.c icon.c text.c file.c buff.c -OBJECTS = demo.o icon.o text.o file.o buff.o -APPDEFAULTS = Dtdnddemo - -DEFINES = -D_HPUX_SOURCE -CDEBUGFLAGS = -O -CFLAGS = -Aa -z $(DEFINES) $(CDEBUGFLAGS) - -DTINCLUDE = -I/usr/dt/include -X11INCLUDE = -I/usr/include/X11R5 - -INCLUDES = $(DTINCLUDE) $(X11INCLUDE) - -DTLIBS = -L/usr/dt/lib -lDtSvc -ltt -lXm -X11LIBS = -L/usr/lib/X11R5 -lXt -lX11 -SYSLIBS = - -LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS) -LDFLAGS = - -.c.o: - ${CC} -c $(CFLAGS) $(INCLUDES) $< - -all:: $(PROGRAM) - -$(PROGRAM):: $(OBJECTS) $(APPDEFAULTS) - ${CC} -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES) - -clean:: - rm -f $(PROGRAM) $(OBJECTS) diff --git a/cde/examples/dtdts/Makefile.hp b/cde/examples/dtdts/Makefile.hp deleted file mode 100644 index b3132b0e6..000000000 --- a/cde/examples/dtdts/Makefile.hp +++ /dev/null @@ -1,45 +0,0 @@ -# $XConsortium: Makefile.hp /main/2 1996/05/13 11:47:02 drk $ -########################################################################## -# -# Makefile for dtdts examples (HP) -# -# (c) Copyright 1993, 1994 Hewlett-Packard Company -# (c) Copyright 1993, 1994 International Business Machines Corp. -# (c) Copyright 1993, 1994 Sun Microsystems, Inc. -# (c) Copyright 1993, 1994 Novell, Inc. -# -########################################################################## - -CC = cc -RM = rm -f - -PROGRAM = datatyping -SOURCES = datatyping.c -OBJECTS = datatyping.o - -DEFINES = -CDEBUGFLAGS = -O -CFLAGS = -Aa -z $(DEFINES) $(CDEBUGFLAGS) - -DTINCLUDE = -I/usr/dt/include -X11INCLUDE = -I/usr/include/X11R5 - -INCLUDES = $(DTINCLUDE) $(X11INCLUDE) - -DTLIBS = -L/usr/dt/lib -lDtSvc -lXm -X11LIBS = -L/usr/lib/X11R5 -lXt -lX11 -SYSLIBS = - -LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS) -LDFLAGS = - -.c.o: - ${CC} -c $(CFLAGS) $(INCLUDES) $< - -all:: $(PROGRAM) - -$(PROGRAM):: $(OBJECTS) - ${CC} -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES) - -clean:: - ${RM} $(PROGRAM) $(OBJECTS) diff --git a/cde/examples/dtscreen/Makefile.hp b/cde/examples/dtscreen/Makefile.hp deleted file mode 100644 index f8275d53a..000000000 --- a/cde/examples/dtscreen/Makefile.hp +++ /dev/null @@ -1,45 +0,0 @@ -# $XConsortium: Makefile.hp /main/2 1996/05/13 11:48:11 drk $ -########################################################################## -# -# Makefile for dtsession examples (HP) -# -# (c) Copyright 1993, 1994 Hewlett-Packard Company -# (c) Copyright 1993, 1994 International Business Machines Corp. -# (c) Copyright 1993, 1994 Sun Microsystems, Inc. -# (c) Copyright 1993, 1994 Novell, Inc. -# -########################################################################## - -CC = cc -RM = rm -f - -PROGRAM = screensaver -SOURCES = screensaver.c -OBJECTS = screensaver.o - -DEFINES = -CDEBUGFLAGS = -O -CFLAGS = -Aa -z $(DEFINES) $(CDEBUGFLAGS) - -DTINCLUDE = -I/usr/dt/include -X11INCLUDE = -I/usr/include/X11R5 - -INCLUDES = $(DTINCLUDE) $(X11INCLUDE) - -DTLIBS = -L/usr/dt/lib -lDtSvc -X11LIBS = -L/usr/lib/X11R5 -lXt -lX11 -SYSLIBS = -lm - -LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS) -LDFLAGS = - -.c.o: - ${CC} -c $(CFLAGS) $(INCLUDES) $< - -all:: $(PROGRAM) - -$(PROGRAM):: $(OBJECTS) - ${CC} -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES) - -clean:: - ${RM} $(PROGRAM) $(OBJECTS) diff --git a/cde/examples/dtsession/Makefile.hp b/cde/examples/dtsession/Makefile.hp deleted file mode 100644 index 6a2a87819..000000000 --- a/cde/examples/dtsession/Makefile.hp +++ /dev/null @@ -1,45 +0,0 @@ -# $XConsortium: Makefile.hp /main/2 1996/05/13 11:49:37 drk $ -########################################################################## -# -# Makefile for dtsession examples (HP) -# -# (c) Copyright 1993, 1994 Hewlett-Packard Company -# (c) Copyright 1993, 1994 International Business Machines Corp. -# (c) Copyright 1993, 1994 Sun Microsystems, Inc. -# (c) Copyright 1993, 1994 Novell, Inc. -# -########################################################################## - -CC = cc -RM = rm -f - -PROGRAM = session -SOURCES = session.c -OBJECTS = session.o - -DEFINES = -CDEBUGFLAGS = -O -CFLAGS = -Aa -z $(DEFINES) $(CDEBUGFLAGS) - -DTINCLUDE = -I/usr/dt/include -X11INCLUDE = -I/usr/include/X11R5 - -INCLUDES = $(DTINCLUDE) $(X11INCLUDE) - -DTLIBS = -L/usr/dt/lib -lDtSvc -lXm -X11LIBS = -L/usr/lib/X11R5 -lXt -lX11 -SYSLIBS = - -LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS) -LDFLAGS = - -.c.o: - ${CC} -c $(CFLAGS) $(INCLUDES) $< - -all:: $(PROGRAM) - -$(PROGRAM):: $(OBJECTS) - ${CC} -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES) - -clean:: - ${RM} $(PROGRAM) $(OBJECTS) diff --git a/cde/examples/dtterm/Makefile.hp b/cde/examples/dtterm/Makefile.hp deleted file mode 100644 index 6f2545afc..000000000 --- a/cde/examples/dtterm/Makefile.hp +++ /dev/null @@ -1,45 +0,0 @@ -# $XConsortium: Makefile.hp /main/2 1996/05/13 11:51:00 drk $ -########################################################################## -# -# Makefile for dtterm examples (HP) -# -# (c) Copyright 1993, 1994 Hewlett-Packard Company -# (c) Copyright 1993, 1994 International Business Machines Corp. -# (c) Copyright 1993, 1994 Sun Microsystems, Inc. -# (c) Copyright 1993, 1994 Novell, Inc. -# -########################################################################## - -CC = cc -RM = rm -f - -PROGRAM = term -SOURCES = term.c -OBJECTS = term.o - -DEFINES = -D_HPUX_SOURCE -CDEBUGFLAGS = -O -CFLAGS = -Aa -z $(DEFINES) $(CDEBUGFLAGS) - -DTINCLUDE = -I/usr/dt/include -X11INCLUDE = -I/usr/include/X11R5 - -INCLUDES = $(DTINCLUDE) $(X11INCLUDE) - -DTLIBS = -L/usr/dt/lib -lDtTerm -lXm -X11LIBS = -L/usr/lib/X11R5 -lXt -lX11 -SYSLIBS = - -LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS) -LDFLAGS = - -.c.o: - ${CC} -c $(CFLAGS) $(INCLUDES) $< - -all:: $(PROGRAM) - -$(PROGRAM):: $(OBJECTS) - ${CC} -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES) - -clean:: - ${RM} $(PROGRAM) $(OBJECTS) diff --git a/cde/examples/dtwidget/Makefile.hp b/cde/examples/dtwidget/Makefile.hp deleted file mode 100644 index 412708a51..000000000 --- a/cde/examples/dtwidget/Makefile.hp +++ /dev/null @@ -1,53 +0,0 @@ -# $XConsortium: Makefile.hp /main/2 1996/05/13 11:52:14 drk $ -########################################################################## -# -# Makefile for dtwidget examples (HP) -# -# (c) Copyright 1993, 1994 Hewlett-Packard Company -# (c) Copyright 1993, 1994 International Business Machines Corp. -# (c) Copyright 1993, 1994 Sun Microsystems, Inc. -# (c) Copyright 1993, 1994 Novell, Inc. -# -########################################################################## - -CC = cc -RM = rm -f - -PROGRAM1 = controls -SOURCES1 = controls.c -OBJECTS1 = controls.o - -PROGRAM2 = editor -SOURCES2 = editor.c -OBJECTS2 = editor.o - -DEFINES = -CDEBUGFLAGS = -O -CFLAGS = -Aa -z $(DEFINES) $(CDEBUGFLAGS) - -DTINCLUDE = -I/usr/dt/include -X11INCLUDE = -I/usr/include/X11R5 - -INCLUDES = $(DTINCLUDE) $(X11INCLUDE) - -DTLIBS = -L/usr/dt/lib -lDtWidget -lDtSvc -ltt -lXm -X11LIBS = -L/usr/lib/X11R5 -lXt -lX11 -SYSLIBS = - -LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS) -LDFLAGS = - -.c.o: - ${CC} -c $(CFLAGS) $(INCLUDES) $< - -all:: $(PROGRAM1) $(PROGRAM2) - -$(PROGRAM1):: $(OBJECTS1) - $(CC) -o $(PROGRAM1) $(LDFLAGS) $(OBJECTS1) $(LIBRARIES) - -$(PROGRAM2):: $(OBJECTS2) - $(CC) -o $(PROGRAM2) $(LDFLAGS) $(OBJECTS2) $(LIBRARIES) - -clean:: - $(RM) $(PROGRAM1) $(OBJECTS1) - $(RM) $(PROGRAM2) $(OBJECTS2) diff --git a/cde/examples/dtwsm/Makefile.hp b/cde/examples/dtwsm/Makefile.hp deleted file mode 100644 index 8a93974f0..000000000 --- a/cde/examples/dtwsm/Makefile.hp +++ /dev/null @@ -1,53 +0,0 @@ -# $XConsortium: Makefile.hp /main/2 1996/05/13 11:53:35 drk $ -########################################################################## -# -# Makefile for dtwidget examples (HP) -# -# (c) Copyright 1993, 1994 Hewlett-Packard Company -# (c) Copyright 1993, 1994 International Business Machines Corp. -# (c) Copyright 1993, 1994 Sun Microsystems, Inc. -# (c) Copyright 1993, 1994 Novell, Inc. -# -########################################################################## - -CC = cc -RM = rm -f - -PROGRAM1 = occupy -SOURCES1 = occupy.c -OBJECTS1 = occupy.o - -PROGRAM2 = wsinfo -SOURCES2 = wsinfo.c -OBJECTS2 = wsinfo.o - -DEFINES = -CDEBUGFLAGS = -O -CFLAGS = -Aa -z $(DEFINES) $(CDEBUGFLAGS) - -DTINCLUDE = -I/usr/dt/include -X11INCLUDE = -I/usr/include/X11R5 - -INCLUDES = $(DTINCLUDE) $(X11INCLUDE) - -DTLIBS = -L/usr/dt/lib -lDtSvc -ltt -lXm -X11LIBS = -L/usr/lib/X11R5 -lXt -lX11 -SYSLIBS = - -LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS) -LDFLAGS = - -.c.o: - ${CC} -c $(CFLAGS) $(INCLUDES) $< - -all:: $(PROGRAM1) $(PROGRAM2) - -$(PROGRAM1):: $(OBJECTS1) - $(CC) -o $(PROGRAM1) $(LDFLAGS) $(OBJECTS1) $(LIBRARIES) - -$(PROGRAM2):: $(OBJECTS2) - $(CC) -o $(PROGRAM2) $(LDFLAGS) $(OBJECTS2) $(LIBRARIES) - -clean:: - $(RM) $(PROGRAM1) $(OBJECTS1) - $(RM) $(PROGRAM2) $(OBJECTS2) diff --git a/cde/examples/template/Makefile.hp b/cde/examples/template/Makefile.hp deleted file mode 100644 index 21e8820f0..000000000 --- a/cde/examples/template/Makefile.hp +++ /dev/null @@ -1,107 +0,0 @@ -# $XConsortium: Makefile.hp /main/3 1996/05/13 12:00:59 drk $ -########################################################################## -# -# Makefile for template example (HP) -# -# (c) Copyright 1993, 1994 Hewlett-Packard Company -# (c) Copyright 1993, 1994 International Business Machines Corp. -# (c) Copyright 1993, 1994 Sun Microsystems, Inc. -# (c) Copyright 1993, 1994 Novell, Inc. -# -########################################################################## - -CC = cc -RM = rm -f -DTHELPTAG = dthelptag -GENCAT = gencat -MKDIR = mkdir -p -CP = cp -CHMODEXE = chmod a+x - -LOCALE = C - -PACKAGE = template -APPGROUPNAME = template -PROGRAM = templatebin -SOURCES = template.c -OBJECTS = template.o -HELPSOURCE = $(LOCALE)/template.htg -HELPFILE = $(LOCALE)/template.sdl -MSGSOURCE = $(LOCALE)/template.msg -MSGFILE = $(LOCALE)/template.cat -TYPEFILE = $(LOCALE)/template.dt -ICONFILES = \ - $(LOCALE)/template.t.pm $(LOCALE)/template.t.bm \ - $(LOCALE)/template.s.pm $(LOCALE)/template.s.bm \ - $(LOCALE)/template.m.pm $(LOCALE)/template.m.bm \ - $(LOCALE)/template.l.pm $(LOCALE)/template.l.bm \ - $(LOCALE)/template_icon.pm $(LOCALE)/template_icon_m.bm \ - $(LOCALE)/template-brush.bm -APPDEFAULTSSRC = $(LOCALE)/Template.ad -APPDEFAULTS = $(LOCALE)/Template -README = $(LOCALE)/README -EXAMPLES = $(LOCALE)/example.template -ACTIONS = TemplateNew TemplateOpen TemplatePrint - -DEFINES = -D_INCLUDE_XOPEN_SOURCE -CDEBUGFLAGS = -O -CFLAGS = -Aa -z $(DEFINES) $(CDEBUGFLAGS) - -DTINCLUDE = -I/usr/dt/include -X11INCLUDE = -I/usr/include/X11R5 - -INCLUDES = $(DTINCLUDE) $(X11INCLUDE) - -DTLIBS = -L/usr/dt/lib -lDtHelp -lDtSvc -lXm -ltt -X11LIBS = -L/usr/lib/X11R5 -lXt -lX11 -SYSLIBS = - -LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS) -LDFLAGS = - -.c.o: - $(CC) -c $(CFLAGS) $(INCLUDES) $< - -#all:: $(PACKAGE) - -$(PACKAGE):: $(PROGRAM) $(HELPFILE) $(MSGFILE) $(APPDEFAULTS) \ - $(ICONFILES) $(TYPEFILE) $(README) $(EXAMPLES) $(ACTIONS) - - $(RM) -r $(PACKAGE) - - $(MKDIR) $(PACKAGE)/bin - $(MKDIR) $(PACKAGE)/app-defaults/C - $(MKDIR) $(PACKAGE)/msg/C - - $(CP) $(PROGRAM) $(PACKAGE)/bin - $(CP) $(MSGFILE) $(PACKAGE)/msg/C - $(CP) $(APPDEFAULTS) $(PACKAGE)/app-defaults/C - - $(MKDIR) $(PACKAGE)/dt/appconfig/icons/C - $(MKDIR) $(PACKAGE)/dt/appconfig/help/C - $(MKDIR) $(PACKAGE)/dt/appconfig/types/C - $(MKDIR) $(PACKAGE)/dt/appconfig/appmanager/$(LOCALE)/$(APPGROUPNAME) - - $(CP) $(ICONFILES) $(PACKAGE)/dt/appconfig/icons/C - $(CP) $(HELPFILE) $(PACKAGE)/dt/appconfig/help/C - $(CP) $(TYPEFILE) $(PACKAGE)/dt/appconfig/types/C - $(CHMODEXE) $(ACTIONS) - $(CP) $(README) $(EXAMPLES) $(ACTIONS) \ - $(PACKAGE)/dt/appconfig/appmanager/$(LOCALE)/$(APPGROUPNAME) - -$(PROGRAM):: $(OBJECTS) - $(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES) - -$(APPDEFAULTS):: $(APPDEFAULTSSRC) - $(CP) $(APPDEFAULTSSRC) $(APPDEFAULTS) - -$(HELPFILE):: $(HELPSOURCE) - $(DTHELPTAG) $(HELPSOURCE) - -$(MSGFILE):: $(MSGSOURCE) - $(GENCAT) $(MSGFILE) $(MSGSOURCE) - -clean:: - $(RM) $(PROGRAM) $(OBJECTS) $(MSGFILE) $(APPDEFAULTS) - $(DTHELPTAG) -clean $(HELPSOURCE) - $(RM) -r template diff --git a/cde/examples/tt/Makefile.hp b/cde/examples/tt/Makefile.hp deleted file mode 100644 index 6d9cb15ac..000000000 --- a/cde/examples/tt/Makefile.hp +++ /dev/null @@ -1,45 +0,0 @@ -# $XConsortium: Makefile.hp /main/2 1996/05/13 12:02:22 drk $ -########################################################################## -# -# Makefile for ToolTalk examples (HP) -# -# (c) Copyright 1993, 1994 Hewlett-Packard Company -# (c) Copyright 1993, 1994 International Business Machines Corp. -# (c) Copyright 1993, 1994 Sun Microsystems, Inc. -# (c) Copyright 1993, 1994 Novell, Inc. -# -########################################################################## - -CC = cc -RM = rm -f - -PROGRAM = broadcast -SOURCES = broadcast.c -OBJECTS = broadcast.o - -DEFINES = -D_HPUX_SOURCE -CDEBUGFLAGS = -O -CFLAGS = -Aa -z $(DEFINES) $(CDEBUGFLAGS) - -DTINCLUDE = -I/usr/dt/include -X11INCLUDE = -I/usr/include/X11R5 - -INCLUDES = $(DTINCLUDE) $(X11INCLUDE) - -DTLIBS = -L/usr/dt/lib -ltt -lXm -X11LIBS = -L/usr/lib/X11R5 -lXt -lX11 -SYSLIBS = - -LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS) -LDFLAGS = - -.c.o: - ${CC} -c $(CFLAGS) $(INCLUDES) $< - -all:: $(PROGRAM) - -$(PROGRAM):: $(OBJECTS) - ${CC} -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES) - -clean:: - ${RM} $(PROGRAM) $(OBJECTS) diff --git a/cde/include/Dt/SearchP.h b/cde/include/Dt/SearchP.h index e4a1b090d..d9e75bc5f 100644 --- a/cde/include/Dt/SearchP.h +++ b/cde/include/Dt/SearchP.h @@ -154,13 +154,6 @@ #define UNIX /* used in vista.h and elsewhere */ #endif -#ifdef HP_COMPILER -#define _INCLUDE_HPUX_SOURCE -#define _INCLUDE_POSIX_SOURCE -#define _INCLUDE_XOPEN_SOURCE -#endif - - /*----------------------- AUSTEXT.H --------------------- * DBMS record/key structure and constant declarations. * These represent the database schema formerly in austext.h diff --git a/cde/include/Dt/TermPrimP.h b/cde/include/Dt/TermPrimP.h index 6da67cac3..2a34e7554 100644 --- a/cde/include/Dt/TermPrimP.h +++ b/cde/include/Dt/TermPrimP.h @@ -51,13 +51,8 @@ ** (is it worth making resources for defaultShell ** and defaultShellArgv0?) JRM */ -#ifdef hpV4 -# define DEFAULT_SHELL "/usr/bin/sh" -# define DEFAULT_SHELL_ARGV0 "sh" -#else /* hpV4 */ -# define DEFAULT_SHELL "/bin/sh" -# define DEFAULT_SHELL_ARGV0 "sh" -#endif /* hpV4 */ +#define DEFAULT_SHELL "/bin/sh" +#define DEFAULT_SHELL_ARGV0 "sh" #ifdef __cplusplus extern "C" { diff --git a/cde/include/Dt/XlationSvc.h b/cde/include/Dt/XlationSvc.h index 4cbf865ba..552239c35 100644 --- a/cde/include/Dt/XlationSvc.h +++ b/cde/include/Dt/XlationSvc.h @@ -123,11 +123,9 @@ platforms as part of a translation. #define _DtPLATFORM_UNKNOWN ((const char *)0) #define _DtPLATFORM_CURRENT ((const char *)0) #define _DtPLATFORM_CDE "CDE" -#define _DtPLATFORM_HPUX "HP-UX" #define _DtPLATFORM_AIX "AIX" #define _DtPLATFORM_SUNOS "SunOS" #define _DtPLATFORM_SOLARIS "Solaris" /* verify */ -#define _DtPLATFORM_XENIX "Xenix" /* verify */ /*$END$*/ diff --git a/cde/include/Dt/vista.h b/cde/include/Dt/vista.h index a0ace5376..7fd869dca 100644 --- a/cde/include/Dt/vista.h +++ b/cde/include/Dt/vista.h @@ -302,9 +302,6 @@ typedef struct {DB_ADDR *ptr; LOCK_DESC} DB_ADDR_P; #ifdef ANSI #define Piv(t) ,... /* begining of variable number of parameters */ #define Pv(t) /**/ /* function has 0 or more parameters */ -#else -#define Piv(t) , /* [XENIX] begining of variable number of parameters */ -#define Pv(t) , /* [XENIX] function has 0 or more parameters */ #endif #else #define P0 /**/ diff --git a/cde/include/EUSCompat.h b/cde/include/EUSCompat.h index 320e6ccfd..50f43020d 100644 --- a/cde/include/EUSCompat.h +++ b/cde/include/EUSCompat.h @@ -52,7 +52,7 @@ extern "C" { ** System V R4 based systems define the stuff we need in ** sys/types.h. Include that and then we are done. */ -#if defined(HPUX) || defined(__linux__) || defined(SunOS) || defined(CSRG_BASED) +#if defined(__linux__) || defined(SunOS) || defined(CSRG_BASED) # include #endif @@ -69,44 +69,6 @@ extern "C" { #endif #endif /* sun && _XOPEN_SOURCE */ -/* -** HPUX defines most of what we need, if we set the right -** include options before including the system files. -*/ -#if defined(HPUX) - -#ifndef _INCLUDE_POSIX_SOURCE -#define _INCLUDE_POSIX_SOURCE -#endif - -#ifndef _INCLUDE_XOPEN_SOURCE -#define _INCLUDE_XOPEN_SOURCE -#endif - -#ifndef _INCLUDE_AES_SOURCE -#define _INCLUDE_AES_SOURCE -#endif - -#ifndef _INCLUDE_HPUX_SOURCE -#define _INCLUDE_HPUX_SOURCE -#endif - -#ifndef hpV4 -typedef unsigned long ulong_t; -#endif /* hpV4 */ -typedef unsigned char uchar_t; -typedef enum {B_FALSE, B_TRUE} boolean_t; - -#define _SC_PAGESIZE _SC_PAGE_SIZE - -#ifndef MAXPATHLEN -#include -#endif - -#define MAXNAMELEN 256 - -#endif /* HPUX */ - #if defined(__linux__) || defined(CSRG_BASED) #include /* memset for libcsa and others */ typedef enum {B_FALSE, B_TRUE} boolean_t; @@ -115,7 +77,7 @@ typedef enum {B_FALSE, B_TRUE} boolean_t; /* -** AIX, like HPUX defines most of what we need. +** AIX defines */ #if defined(AIX) @@ -130,7 +92,6 @@ typedef enum {B_FALSE, B_TRUE} boolean_t; #include #define _SC_PAGESIZE _SC_PAGE_SIZE -#define vfork fork #ifndef MAXPATHLEN #include diff --git a/cde/include/SPC/spc-proto.h b/cde/include/SPC/spc-proto.h index c22b8a82f..d459baca5 100644 --- a/cde/include/SPC/spc-proto.h +++ b/cde/include/SPC/spc-proto.h @@ -110,7 +110,6 @@ #define DELETE_LOGFILE 21 -#define RESET_TERMIO 22 /* This is obsolete, (hpux binary version) */ #define RESET_TERMIOS 23 /* New B.00 protocol requests */ diff --git a/cde/include/bms/sbport.h b/cde/include/bms/sbport.h index 8f26b028e..000524c16 100644 --- a/cde/include/bms/sbport.h +++ b/cde/include/bms/sbport.h @@ -44,7 +44,6 @@ __cplusplus - Will be set for C++ compilers __STDCPP__ - Will be set for ANSI and C++ compilers - __hpux - Will be set for HP-UX systems __sun - Will be set for SUN systems __aix - Will be set for IBM (AIX) systems @@ -88,27 +87,12 @@ # define __sun #endif -#if defined(hpux) && !defined(__hpux) -# define __hpux -#endif - #if defined(_AIX) && !defined(__aix) # define __aix # define OSF_MOTIF_1_1_1 # define OSF_BUG #endif -#ifdef __hpux -# define __sysv -/* __hp9000s300 or __hp9000s800 is defined by HP-UX cpp */ -# if !defined (__hpux_8_0) -# define __hp_7_0 -# endif -# define __hp_nls_16 -# define __hp_color_object -# define __unsigned_char_ptr_yytext -#endif /* __hpux */ - #ifdef __sun # if defined(sparc) && !defined(__sparc) # define __sparc @@ -181,7 +165,7 @@ /* about above. So, declare them only if we don't already have them */ /* ----------------------------------------------------------------- */ -#if defined(_HPUX_SOURCE) || defined(__sun) || defined(_INCLUDE_BSD_SOURCE) || defined(__aix) || defined(__linux__) +#if defined(__sun) || defined(_INCLUDE_BSD_SOURCE) || defined(__aix) || defined(__linux__) /* the "u_types" are defined in standard files */ # undef _INCLUDE_BSD_SOURCE #else diff --git a/cde/lib/DtHelp/HP-UX.lcx b/cde/lib/DtHelp/HP-UX.lcx deleted file mode 100644 index 0acd5600b..000000000 --- a/cde/lib/DtHelp/HP-UX.lcx +++ /dev/null @@ -1,606 +0,0 @@ -!!!!!!!!!!!!!! HP-UX Locale-Related Translations !!!!!!!!!!!!!! -! File: HP-UX.lcx -! Default location: /usr/dt/config/svc/HP-UX.lcx -! Purpose: -! Define the HP-specific set of locale-related translations. -! Description: -! This file contains the set of all locale-related translations -! that can occur during _DtLcxXlateOpToStd() and _DtLcxStdToOp() -! calls on HP platforms. Note that platform-specific tables may -! include more than one translation to and from CDE standard -! strings if they can be distinguished by version, operation, or -! pattern matching. -! -! It is important that additional CDE standard strings only -! be created by the CDE owner of the _DtLcx translation service -! and NOT be created by an individual vendor or user. This be because -! the purpose of adopting a set of CDE standard strings is to -! support interoperability across platforms. If individual vendors -! add their own "standard" strings and these strings are not -! known on other platforms, then the goal of interoperability -! will be defeated. -! -! If you feel that a new CDE standard string is needed, -! contact your CDE representative/vendor with a specific -! proposal and justification and have them forward it to -! the owner of the CDE _DtLcx service. -! -! Note that it is allowed for vendors and users to add new -! operations for which translations are specified and which -! utilize the standard strings. If the operations are of -! general utility, please bring them to the attention of -! your CDE representative/vendor for forwarding to the -! _DtLcx owner. -! Invoked by: -! This table is used by the _DtLcx translation service -! Product: @(#)Cde1 -! Revision: $XConsortium: HP-UX.lcx /main/3 1995/10/26 12:23:15 rswiston $ -! Defects: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -!!!!!!!!!!!!!!!! translation specification syntax !!!!!!!!!!!!!!!!!!! -! Introductory fields: -! ==================== -! The _DtLcx translation specifications have a fixed number of -! introductory fields followed by a several standard value -! fields and the operation-specific value. -! The introductory fields are: -! ... -! -! Platform generally is the same string as uname(1) -s. -! Version range utilizes normalized version numbers that -! are acquired using the 'version' translations. -! Operations are one or more comma-separated strings that -! uniquely identify the operation associated with the -! operation-specific value. This string is specified -! as part of the request for a translation. -! -! Kinds of translations allow the mechanism to support several modes -! of operation, each useful for different purposes. When -! reading or writing a specification, pay particular attention -! to the kind of specification, as this guides the usage of it. -! -! Specification kinds: -! .=. means a valid bi-directional translation requiring the op-value -! in the translation specification to exactly match the op-value of -! the call to _DtLcxXlateOpToStd(), e.g. foo matches only foo -! .~. means a valid bi-directional translation requiring the op-value -! in the translation specification to match the beginning of the -! op-value of the call to _DtLcxXlateOpToStd(), e.g. foo matches -! foo@bar. This is often useful, e.g. for operation-specific -! locale strings that may also contain modifier suffixes. -! .>. means only from standard to op-specific (generally a -! compatibility translation, meaning on op-specific value -! that will work for the standard, although that is not -! the straight mapping) -! .<. means only from op-specific to standard (generally a -! regex in the op-value which is used to map a class of -! op values to a standard value) -! .0. means that translation is not supported and if a translation -! request matches the specification, the request will fail. -! -! Standard values: -! ================ -! _DtLcx defines the order of the standard values in the -! translations it utilizes. All translation specifications -! must adhere to this order. -! .. -! In CDE 1.0, no modifiers are standardized and that -! portion of the table is unspecified. This means -! that no CDE standard modifiers are available across -! platforms. Operations that use only the -! should specify the wildcard character ("?") for the -! value. -! -! Operation-specific value: -! ========================= -! The operation-specific value is a string that is used -! according to the kind of translation. The syntax is -! : -! or : "", if it contains white space -! -! Filling in the table of translations: -! ===================================== -! The person preparing the translation table should know -! the minimum version of the target platform that is -! be supported. For example, assume that we must -! complete the table for all versions 9.00 and higher. -! -! The objective is then to provide two sets of translations: -! a full set of translations from CDE standard locales to -! valid platform locales, and a full set of translations -! from valid platform locales to some or all CDE standard -! locales. -! -! Translations from CDE standard locales to valid platform -! locales must use the .~. .=. or .>. mappings. When there -! is a 1:1 mapping between a CDE locale and a platform locale, -! use the .~. or .=. mapping. See the comment below to -! decide which to use. When there is no 1:1 mapping between -! CDE locale and platform locale, use the .>. mapping. This -! provides a valid translation from the CDE locale to the -! best-suitable platform locale, but never translates from -! that platform locale to the CDE locale. -! -! Translations from every platform locale to the appropriate -! CDE locale must use the .~. .=. or .<. mappings. -! When there is a 1:1 mapping between a platform locale and -! a CDE standard locale, use the .~. or .=. mapping. See the -! comment below to decide which to use. If there is a 1:1 -! mapping, but the platform locale pattern uses a regular -! expression, or if more than one platform locale can -! be translated to one CDE standard locale, the .<. mapping must -! be used. -! -! If no appropriate CDE standard locale can be found, you have -! identified the need for a new CDE standard locale. Refer to -! the instructions at the head of this file for how to go about -! registering a new CDE standard locale. You should not create -! a new "standard" locale (the left hand side of the translation -! specification) without registering it with CDE, because this -! will hinder the free exchange of information across locales -! and platforms. -! -! The .=. and .~. mappings are similar. The difference is -! that the .=. mapping requires an exact string match between -! the platform locale and the string provided to the -! translation routine. Generally speaking, this mapping -! is risky unless exact matchings can be guaranteed in -! all DtLcx clients for the particular operation in question. -! The .~. mapping is to be preferred, but the .=. translation -! is useful in limited situations, where similar strings may -! occur. -! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -! uncomment this resource to debug/test the translation db -!*debugDtXlate: True - -!!!!!!!!!!!!!!!! HP Version Identificaton !!!!!!!!!!!!!!!!! -! These translations are used by the _DtXlateGetXlateEnv() -! call to determine the version number to use. -! -! To understand the translation, realize that the -! operation-specific regexp(5) pattern on the right -! hand side is matched against the strings returned -! by uname(2). The best match determines the "normalized" -! version number of the platform, which should range from -! 001 and up. By convention, major release numbers -! map to centuries and minor release numbers to within -! the century. -! -! To determine the string that the regular expression on the -! right hand side is matching against, use uname(1) and run -! 'uname -r' and 'uname -v' and note the strings. During execution, -! the strings returned by this command are retrieved and -! concatenated "rv"--in that order, no extra spaces. -! This is the string that the pattern must match. -! -! Sometimes this string may not be intuitive. For example, -! note that AIX 3.2 returns 2 for 'uname -r' and 3 for 'uname -v'. -! So the pattern string must be 23, not 32. Do not go by -! the order of 'uname -rv' or 'uname -vr', as that is not used. -!!! -HP-UX.?.version.<.1000: "[A-Z]\\.10\\.00" !! any HPUX 10.00 version -HP-UX.?.version.<.1001: "[A-Z]\\.10\\..*" !! any HPUX 10.x version -HP-UX.?.version.<.900: "[A-Z]\\.09\\..*" !! any HPUX 9.x version -HP-UX.?.version.<.903: "[A-Z]\\.09\\.0[3-9].*" !! any HPUX 9.03-9.09 version -HP-UX.?.version.<.910: "[A-Z]\\.09\\.[1-9].*" !! any HPUX 9.1+ version -HP-UX.?.version.<.800: "[A-Z]\\.08\\..*" !! any HPUX 8.x version - - -!!!!!!!!!!!!!!!! HP-specific setlocale translations !!!!!!!!!!!!!!!!!!! -! These translations are for the string returned by the -! getlocale() or setlocale(LC_xxx,NULL) operations, but not -! setlocale(LC_ALL,NULL) operation. -! -! It provides translations from HP operation-specific -! to CDE standard strings and back again. -! -! Some language,territory combinations have the following comments: -! (1) These ISO territory names may be subject to change -! However, their CDE names will continue to be supported -! (2) No ISO "territory" name exists for the Arabic-speaking regions of the -! world as a whole. Vendors have sometimes supplied their own. -! Those names, when conformant to the ISO model, will be adopted for CDE. -! -!Platform Operation Lang_Terr Op-Value Language,Territory Who has -!--- --------- ----- -------- ------------------ ------- -! Version Kind Codeset -! ---- - --------- - -! setlocales Compliance -HP-UX.700+.setlocale.~.C.HP-ROMAN8: C ! setlocales compliance ,IBM, HP, Sun , -HP-UX.700+.setlocale.<.C.HP-ROMAN8: C.roman8 ! setlocales compliance ,IBM, HP, Sun , -HP-UX.700+.setlocale.~.C.ISO-8859-1: C.iso88591 ! setlocales compliance ,IBM, HP, Sun , -HP-UX.700+.setlocale.~.POSIX.HP-ROMAN8: POSIX ! setlocales compliance ,IBM, HP, Sun , -HP-UX.700+.setlocale.<.POSIX.HP-ROMAN8: POSIX.roman8 ! setlocales compliance ,IBM, HP, Sun , -HP-UX.700+.setlocale.~.POSIX.ISO-8859-1: POSIX.iso88591 ! setlocales compliance ,IBM, HP, Sun , - -! W European/Americas, Latin 1 codeset -HP-UX.700+.setlocale.~.da_DK.ISO-8859-1: danish.iso88591 ! Danish, Denmark XoJIG,IBM, HP, , -HP-UX.700+.setlocale.>.de_AT.ISO-8859-1: german.iso88591 ! German,Austria XoJIG, , , , -HP-UX.700+.setlocale.>.de_CH.ISO-8859-1: german.iso88591 ! German,Switzerland XoJIG,IBM, , , -HP-UX.700+.setlocale.~.de_DE.ISO-8859-1: german.iso88591 ! German, Germany XoJIG,IBM, HP, Sun ("de"), -HP-UX.700+.setlocale.>.en_AU.ISO-8859-1: english.iso88591 ! English,Australia , , , , -HP-UX.700+.setlocale.>.en_CA.ISO-8859-1: english.iso88591 ! English,Canada XoJIG, , , , -HP-UX.700+.setlocale.>.en_DK.ISO-8859-1: english.iso88591 ! English, Denmark XoJIG, , , , -HP-UX.700+.setlocale.>.en_GB.ISO-8859-1: english.iso88591 ! English, U.K. XoJIG,IBM, HP, , -HP-UX.700+.setlocale.>.en_JP.ISO-8859-1: english.iso88591 ! English, Japan XoJIG,IBM, , , -HP-UX.700+.setlocale.>.en_IE.ISO-8859-1: english.iso88591 ! English, Ireland XoJIG, , , , -HP-UX.700+.setlocale.>.en_KR.ISO-8859-1: english.iso88591 ! English,Korea , , , , -HP-UX.700+.setlocale.>.en_MY.ISO-8859-1: english.iso88591 ! English,Malaysia , , , , -HP-UX.700+.setlocale.>.en_NZ.ISO-8859-1: english.iso88591 ! English,New Zealand , , , , -HP-UX.700+.setlocale.>.en_TW.ISO-8859-1: english.iso88591 ! English,Taiwan , , , , -HP-UX.700+.setlocale.~.en_US.ISO-8859-1: english.iso88591 ! English, USA XoJIG,IBM, HP, Sun , -HP-UX.700+.setlocale.>.es_AR.ISO-8859-1: spanish.iso88591 ! Spanish, Argentina , , , Sun , -HP-UX.700+.setlocale.>.es_BO.ISO-8859-1: spanish.iso88591 ! Spanish, Bolivia , , , Sun -HP-UX.700+.setlocale.>.es_CL.ISO-8859-1: spanish.iso88591 ! Spanish, Chile , , , Sun , -HP-UX.700+.setlocale.>.es_CO.ISO-8859-1: spanish.iso88591 ! Spanish, Columbia , , , Sun -HP-UX.700+.setlocale.>.es_CR.ISO-8859-1: spanish.iso88591 ! Spanish, Costa Rica , , , Sun -HP-UX.700+.setlocale.>.es_EC.ISO-8859-1: spanish.iso88591 ! Spanish, Ecuador , , , Sun -HP-UX.700+.setlocale.~.es_ES.ISO-8859-1: spanish.iso88591 ! Spanish, Spain XoJIG,IBM, HP, Sun , -HP-UX.700+.setlocale.>.es_GT.ISO-8859-1: spanish.iso88591 ! Spanish, Guatemala , , , Sun -HP-UX.700+.setlocale.>.es_MX.ISO-8859-1: spanish.iso88591 ! Spanish, Mexico , , , Sun , -HP-UX.700+.setlocale.>.es_PE.ISO-8859-1: spanish.iso88591 ! Spanish, Peru , , , Sun -HP-UX.700+.setlocale.>.es_UY.ISO-8859-1: spanish.iso88591 ! Spanish, Uruguay , , , Sun -HP-UX.700+.setlocale.>.es_VE.ISO-8859-1: spanish.iso88591 ! Spanish, Venezuela , , , Sun , -! HP-UX.700+.setlocale.>.et_EE.ISO-8859-1: ! Estonian, Estonia XoJIG, -HP-UX.700+.setlocale.~.fi_FI.ISO-8859-1: finnish.iso88591 ! Finnish, Finland XoJIG,IBM, HP, , -! HP-UX.700+.setlocale.>.fo_FO.ISO-8859-1: ! Faroese, Faeroe Island XoJIG, -HP-UX.700+.setlocale.>.fr_BE.ISO-8859-1: french.iso88591 ! French,Belgium XoJIG, , , , -HP-UX.700+.setlocale.~.fr_CA.ISO-8859-1: c-french.iso88591 ! French, Canada XoJIG,IBM, HP, , -HP-UX.700+.setlocale.>.fr_CH.ISO-8859-1: french.iso88591 ! French, Switzerland XoJIG,IBM, , , -HP-UX.700+.setlocale.~.fr_FR.ISO-8859-1: french.iso88591 ! French, France XoJIG,IBM, HP, Sun ("fr"), -HP-UX.700+.setlocale.~.is_IS.ISO-8859-1: icelandic.iso88591 ! Icelandic, Iceland XoJIG,IBM, HP, , -HP-UX.700+.setlocale.>.it_CH.ISO-8859-1: italian.iso88591 ! Italian,Switzerland , , , , -HP-UX.700+.setlocale.~.it_IT.ISO-8859-1: italian.iso88591 ! Italian, Italy XoJIG,IBM, HP, Sun ("it"), -! HP-UX.700+.setlocale.>.kl_GL.ISO-8859-1: ! Greenlandic, Greenland XoJIG, -! HP-UX.700+.setlocale.>.lt_LT.ISO-8859-1: ! Lithuanian, Lithuania XoJIG, -! HP-UX.700+.setlocale.>.lv_LV.ISO-8859-1: ! Latvian, Latvia XoJIG, -HP-UX.700+.setlocale.>.nl_BE.ISO-8859-1: dutch.iso88591 ! Dutch, Belgium XoJIG,IBM, , , -HP-UX.700+.setlocale.~.nl_NL.ISO-8859-1: dutch.iso88591 ! Dutch, The Netherlands XoJIG,IBM, HP, , -HP-UX.700+.setlocale.~.no_NO.ISO-8859-1: norwegian.iso88591 ! Norwegian, Norway XoJIG,IBM, HP, , -HP-UX.700+.setlocale.>.pt_BR.ISO-8859-1: portuguese.iso88591 ! Portuguese,Brazil , , , , -HP-UX.700+.setlocale.~.pt_PT.ISO-8859-1: portuguese.iso88591 ! Portuguese, Portugal XoJIG,IBM, HP, , -HP-UX.700+.setlocale.>.sv_FI.ISO-8859-1: swedish.iso88591 ! Swedish, Finland XoJIG, -HP-UX.700+.setlocale.~.sv_SE.ISO-8859-1: swedish.iso88591 ! Swedish, Sweden XoJIG,IBM, HP, Sun ("sv"), - -! W European/Americas, HP-ROMAN8 codeset -HP-UX.700+.setlocale.~.da_DK.HP-ROMAN8: danish ! Danish, Denmark , , HP -HP-UX.700+.setlocale.~.de_DE.HP-ROMAN8: german ! German, Germany , , HP -HP-UX.700+.setlocale.>.en_GB.HP-ROMAN8: english ! English, U.K. , , HP -HP-UX.700+.setlocale.~.en_US.HP-ROMAN8: english ! English, USA , , HP -HP-UX.700+.setlocale.~.es_ES.HP-ROMAN8: spanish ! Spanish, Spain , , HP -HP-UX.700+.setlocale.~.fi_FI.HP-ROMAN8: finnish ! Finnish, Finland , , HP -HP-UX.700+.setlocale.~.fr_CA.HP-ROMAN8: c-french ! French, Canada , , HP -HP-UX.700+.setlocale.~.fr_FR.HP-ROMAN8: french ! French, France , , HP -HP-UX.700+.setlocale.~.is_IS.HP-ROMAN8: icelandic ! Icelandic, Iceland , , HP -HP-UX.700+.setlocale.~.it_IT.HP-ROMAN8: italian ! Italian, Italy , , HP -HP-UX.700+.setlocale.~.nl_NL.HP-ROMAN8: dutch ! Dutch, The Netherlands , , HP -HP-UX.700+.setlocale.~.no_NO.HP-ROMAN8: norwegian ! Norwegian, Norway , , HP -HP-UX.700+.setlocale.~.pt_PT.HP-ROMAN8: portuguese ! Portuguese, Portugal , , HP -HP-UX.700+.setlocale.~.sv_SE.HP-ROMAN8: swedish ! Swedish, Sweden , , HP - -! E European -HP-UX.700+.setlocale.~.cs_CS.ISO-8859-2: czech ! Czech(1) ,IBM, HP -! HP-UX.700+.setlocale.>.hr_HR.ISO-8859-2: ! Croatian, Croatia ,IBM -HP-UX.700+.setlocale.~.hu_HU.ISO-8859-2: hungarian ! Hungarian, Hungry XoJIG,IBM, HP -HP-UX.700+.setlocale.~.pl_PL.ISO-8859-2: polish ! Polish, Poland XoJIG,IBM, HP -HP-UX.700+.setlocale.~.ro_RO.ISO-8859-2: rumanian ! Rumanian, Romania XoJIG,IBM, HP -HP-UX.700+.setlocale.~.sh_YU.ISO-8859-2: serbocroatian ! Serbocroatian, Yugoslavia(1) ,IBM, HP -HP-UX.700+.setlocale.~.sl_CS.ISO-8859-2: slovene ! Slovenian ,IBM, HP -HP-UX.700+.setlocale.>.si_SI.ISO-8859-2: slovene ! Slovenian ,IBM, HP -! HP-UX.700+.setlocale.>.sk_SK.ISO-8859-2: ! Slovak ,IBM - -! Cyrillic -HP-UX.700+.setlocale.~.bg_BG.ISO-8859-5: bulgarian ! Bulgarian, Bulgaria ,IBM, HP -! HP-UX.700+.setlocale.>.mk_MK.ISO-8859-5: ! Macedonian ,IBM -HP-UX.700+.setlocale.~.ru_RU.ISO-8859-5: russian ! Russian(1) ,IBM, HP -HP-UX.700+.setlocale.>.ru_SU.ISO-8859-5: russian ! Russian(1) ,IBM, HP -! HP-UX.700+.setlocale.>.sp_YU.ISO-8859-5: ! Serbian,Yugoslavia(1) ,IBM - -! Arabic -HP-UX.700+.setlocale.~.ar_DZ.ISO-8859-6: arabic.iso88596 ! Arabic(2) ,IBM, HP -HP-UX.700+.setlocale.~.ar_DZ.HP-ARABIC8: arabic-w ! Arabic(2) , , HP -HP-UX.700+.setlocale.~.ar_SA.ISO-8859-6: arabic.iso88596 ! Arabic(2) ,IBM, HP -HP-UX.700+.setlocale.~.ar_SA.HP-ARABIC8: arabic ! Arabic(2) , , HP - -! Hebrew -HP-UX.700+.setlocale.~.iw_IL.ISO-8859-8: hebrew.iso88598 ! Hebrew, Israel ,IBM, HP -HP-UX.700+.setlocale.~.iw_IL.HP-HEBREW8: hebrew ! Hebrew, Israel , , HP - -! Greek -HP-UX.700+.setlocale.~.el_GR.ISO-8859-7: greek.iso88597 ! Greek, Greece ,IBM, HP -HP-UX.700+.setlocale.~.el_GR.HP-GREEK8: greek ! Greek, Greece , , HP - -! Turkish -HP-UX.700+.setlocale.~.tr_TR.ISO-8859-9: turkish.iso88599 ! Turkish, Turkey ,IBM, HP -HP-UX.700+.setlocale.~.tr_TR.HP-TURKISH8: turkish ! Turkish, Turkey , , HP - -! East Asia -HP-UX.700+.setlocale.~.ja_JP.EUC-JP: japanese.euc ! Japanese, Japan ,IBM, HP, Sun ("ja"), -HP-UX.700+.setlocale.~.ja_JP.HP-SJIS: japanese ! Japanese, Japan aka japanese 15 , , HP, -HP-UX.700+.setlocale.>.ja_JP.IBM-932: japanese ! Japanese, Japan ,IBM, HP, Sun ("ja"), -HP-UX.700+.setlocale.~.ja_JP.HP-KANA8: katakana ! Japanese, Japan , , HP, , -HP-UX.700+.setlocale.<.ja_JP.EUC-JP: ujis ! Japanese, Japan , , HP, -HP-UX.700+.setlocale.~.ko_KR.EUC-KR: korean ! Korean, Korea ,IBM, HP, Sun ("ko"), -HP-UX.700+.setlocale.>.zh_CN.EUC-CN: chinese-s ! Chinese, China ,IBM, , Sun ("zh"), -HP-UX.700+.setlocale.~.zh_CN.HP-15CN: chinese-s ! Chinese, China , , HP -HP-UX.700+.setlocale.~.zh_TW.EUC-TW: zh_TW.eucTW ! Chinese, Taiwan ,IBM, HP, Sun , -HP-UX.700+.setlocale.~.zh_TW.HP-BIG5: chinese-t.big5 ! Chinese, Taiwan , , HP, , -HP-UX.700+.setlocale.~.zh_TW.HP-CCDC: chinese-t ! Chinese, Taiwan , , HP, , - -! Thai -HP-UX.700+.setlocale.~.th_TH.TIS-620: thai ! Thai, Thailand ,IBM, HP - -! setlocales Compliance; default codeset on 10.01 systems -HP-UX.1000+.setlocale.~.C.ISO-8859-1: C ! setlocales compliance ,IBM, HP, Sun , -HP-UX.1000+.setlocale.~.POSIX.ISO-8859-1: POSIX ! setlocales compliance ,IBM, HP, Sun , - -! W European/Americas, Latin 1 codeset -HP-UX.1000+.setlocale.>.de_AT.ISO-8859-1: de_DE.iso88591 ! German,Austria XoJIG, , , , -HP-UX.1000+.setlocale.>.de_CH.ISO-8859-1: de_DE.iso88591 ! German,Switzerland XoJIG,IBM, , , -HP-UX.1000+.setlocale.~.de_DE.ISO-8859-1: de_DE.iso88591 ! German, Germany XoJIG,IBM, HP, Sun ("de"), -HP-UX.1000+.setlocale.>.en_AU.ISO-8859-1: en_GB.iso88591 ! English,Australia , , , , -HP-UX.1000+.setlocale.>.en_CA.ISO-8859-1: en_US.iso88591 ! English,Canada XoJIG, , , , -HP-UX.1000+.setlocale.>.en_DK.ISO-8859-1: en_GB.iso88591 ! English, Denmark XoJIG, , , , -HP-UX.1000+.setlocale.>.en_GB.ISO-8859-1: en_GB.iso88591 ! English, U.K. XoJIG,IBM, HP, , -HP-UX.1000+.setlocale.>.en_JP.ISO-8859-1: en_GB.iso88591 ! English, Japan XoJIG,IBM, , , -HP-UX.1000+.setlocale.>.en_IE.ISO-8859-1: en_GB.iso88591 ! English, Ireland XoJIG, , , , -HP-UX.1000+.setlocale.>.en_MY.ISO-8859-1: en_US.iso88591 ! English,Malaysia , , , , -HP-UX.1000+.setlocale.>.en_NZ.ISO-8859-1: en_GB.iso88591 ! English,New Zealand , , , , -HP-UX.1000+.setlocale.~.en_US.ISO-8859-1: en_US.iso88591 ! English, USA XoJIG,IBM, HP, Sun , -HP-UX.1000+.setlocale.>.es_AR.ISO-8859-1: es_ES.iso88591 ! Spanish, Argentina , , , Sun , -HP-UX.1000+.setlocale.>.es_BO.ISO-8859-1: es_ES.iso88591 ! Spanish, Bolivia , , , Sun -HP-UX.1000+.setlocale.>.es_CL.ISO-8859-1: es_ES.iso88591 ! Spanish, Chile , , , Sun , -HP-UX.1000+.setlocale.>.es_CO.ISO-8859-1: es_ES.iso88591 ! Spanish, Columbia , , , Sun -HP-UX.1000+.setlocale.>.es_CR.ISO-8859-1: es_ES.iso88591 ! Spanish, Costa Rica , , , Sun -HP-UX.1000+.setlocale.>.es_EC.ISO-8859-1: es_ES.iso88591 ! Spanish, Ecuador , , , Sun -HP-UX.1000+.setlocale.~.es_ES.ISO-8859-1: es_ES.iso88591 ! Spanish, Spain XoJIG,IBM, HP, Sun , -HP-UX.1000+.setlocale.>.es_GT.ISO-8859-1: es_ES.iso88591 ! Spanish, Guatemala , , , Sun -HP-UX.1000+.setlocale.>.es_MX.ISO-8859-1: es_ES.iso88591 ! Spanish, Mexico , , , Sun , -HP-UX.1000+.setlocale.>.es_PE.ISO-8859-1: es_ES.iso88591 ! Spanish, Peru , , , Sun -HP-UX.1000+.setlocale.>.es_UY.ISO-8859-1: es_ES.iso88591 ! Spanish, Uruguay , , , Sun -HP-UX.1000+.setlocale.>.es_VE.ISO-8859-1: es_ES.iso88591 ! Spanish, Venezuela , , , Sun , -! HP-UX.1000+.setlocale.>.et_EE.ISO-8859-1: ! Estonian, Estonia XoJIG, -HP-UX.1000+.setlocale.~.fi_FI.ISO-8859-1: fi_FI.iso88591 ! Finnish, Finland XoJIG,IBM, HP, , -! HP-UX.1000+.setlocale.>.fo_FO.ISO-8859-1: ! Faroese, Faeroe Island XoJIG, -HP-UX.1000+.setlocale.>.fr_BE.ISO-8859-1: fr_FR.iso88591 ! French,Belgium XoJIG, , , , -HP-UX.1000+.setlocale.~.fr_CA.ISO-8859-1: fr_CA.iso88591 ! French, Canada XoJIG,IBM, HP, , -HP-UX.1000+.setlocale.>.fr_CH.ISO-8859-1: fr_FR.iso88591 ! French, Switzerland XoJIG,IBM, , , -HP-UX.1000+.setlocale.~.fr_FR.ISO-8859-1: fr_FR.iso88591 ! French, France XoJIG,IBM, HP, Sun ("fr"), -HP-UX.1000+.setlocale.~.is_IS.ISO-8859-1: is_IS.iso88591 ! Icelandic, Iceland XoJIG,IBM, HP, , -HP-UX.1000+.setlocale.>.it_CH.ISO-8859-1: it_IT.iso88591 ! Italian,Switzerland , , , , -HP-UX.1000+.setlocale.~.it_IT.ISO-8859-1: it_IT.iso88591 ! Italian, Italy XoJIG,IBM, HP, Sun ("it"), -! HP-UX.1000+.setlocale.>.kl_GL.ISO-8859-1: ! Greenlandic, Greenland XoJIG, -! HP-UX.1000+.setlocale.>.lt_LT.ISO-8859-1: ! Lithuanian, Lithuania XoJIG, -! HP-UX.1000+.setlocale.>.lv_LV.ISO-8859-1: ! Latvian, Latvia XoJIG, -HP-UX.1000+.setlocale.>.nl_BE.ISO-8859-1: nl_NL.iso88591 ! Dutch, Belgium XoJIG,IBM, , , -HP-UX.1000+.setlocale.~.nl_NL.ISO-8859-1: nl_NL.iso88591 ! Dutch, The Netherlands XoJIG,IBM, HP, , -HP-UX.1000+.setlocale.~.no_NO.ISO-8859-1: no_NO.iso88591 ! Norwegian, Norway XoJIG,IBM, HP, , -HP-UX.1000+.setlocale.>.pt_BR.ISO-8859-1: pt_PT.iso88591 ! Portuguese,Brazil , , , , -HP-UX.1000+.setlocale.~.pt_PT.ISO-8859-1: pt_PT.iso88591 ! Portuguese, Portugal XoJIG,IBM, HP, , -HP-UX.1000+.setlocale.>.sv_FI.ISO-8859-1: sv_SE.iso88591 ! Swedish, Finland XoJIG, -HP-UX.1000+.setlocale.~.sv_SE.ISO-8859-1: sv_SE.iso88591 ! Swedish, Sweden XoJIG,IBM, HP, Sun ("sv"), - -! W European/Americas, HP-ROMAN8 codeset -HP-UX.1000+.setlocale.~.da_DK.HP-ROMAN8: da_DK.roman8 ! Danish, Denmark , , HP -HP-UX.1000+.setlocale.~.de_DE.HP-ROMAN8: de_DE.roman8 ! German, Germany , , HP -HP-UX.1000+.setlocale.~.en_GB.HP-ROMAN8: en_GB.roman8 ! English, U.K. , , HP -HP-UX.1000+.setlocale.~.en_US.HP-ROMAN8: en_US.roman8 ! English, USA , , HP -HP-UX.1000+.setlocale.~.es_ES.HP-ROMAN8: es_ES.roman8 ! Spanish, Spain , , HP -HP-UX.1000+.setlocale.~.fi_FI.HP-ROMAN8: fi_FI.roman8 ! Finnish, Finland , , HP -HP-UX.1000+.setlocale.~.fr_CA.HP-ROMAN8: fr_CA.roman8 ! French, Canada , , HP -HP-UX.1000+.setlocale.~.fr_FR.HP-ROMAN8: fr_FR.roman8 ! French, France , , HP -HP-UX.1000+.setlocale.~.is_IS.HP-ROMAN8: is_IS.roman8 ! Icelandic, Iceland , , HP -HP-UX.1000+.setlocale.~.it_IT.HP-ROMAN8: it_IT.roman8 ! Italian, Italy , , HP -HP-UX.1000+.setlocale.~.nl_NL.HP-ROMAN8: nl_NL.roman8 ! Dutch, The Netherlands , , HP -HP-UX.1000+.setlocale.~.no_NO.HP-ROMAN8: no_NO.roman8 ! Norwegian, Norway , , HP -HP-UX.1000+.setlocale.~.pt_PT.HP-ROMAN8: pt_PT.roman8 ! Portuguese, Portugal , , HP -HP-UX.1000+.setlocale.~.sv_SE.HP-ROMAN8: sv_SE.roman8 ! Swedish, Sweden , , HP - -! E European -HP-UX.1000+.setlocale.~.cs_CS.ISO-8859-2: cs_CS.iso88592 ! Czech(1) ,IBM, HP -! HP-UX.1000+.setlocale.>.hr_HR.ISO-8859-2: ! Croatian, Croatia ,IBM -HP-UX.1000+.setlocale.~.hu_HU.ISO-8859-2: hu_HU.iso88592 ! Hungarian, Hungry XoJIG,IBM, HP -HP-UX.1000+.setlocale.~.pl_PL.ISO-8859-2: pl_PL.iso88592 ! Polish, Poland XoJIG,IBM, HP -HP-UX.1000+.setlocale.~.ro_RO.ISO-8859-2: ro_RO.iso88592 ! Rumanian, Romania XoJIG,IBM, HP -HP-UX.1000+.setlocale.~.sh_YU.ISO-8859-2: sh_YU.iso88592 ! Serbocroatian, Yugoslavia(1) ,IBM, HP -HP-UX.1000+.setlocale.~.sl_CS.ISO-8859-2: sl_CS.iso88592 ! Slovenian ,IBM, HP -! HP-UX.1000+.setlocale.>.si_SI.ISO-8859-2: ! Slovenian ,IBM, HP -! HP-UX.1000+.setlocale.>.sk_SK.ISO-8859-2: ! Slovak ,IBM - -! Cyrillic -HP-UX.1000+.setlocale.~.bg_BG.ISO-8859-5: bg_BG.iso88595 ! Bulgarian, Bulgaria ,IBM, HP -! HP-UX.1000+.setlocale.>.mk_MK.ISO-8859-5: ! Macedonian ,IBM -HP-UX.1000+.setlocale.>.ru_RU.ISO-8859-5: ru_SU.iso88595 ! Russian(1) ,IBM, HP -HP-UX.1000+.setlocale.~.ru_SU.ISO-8859-5: ru_SU.iso88595 ! Russian(1) ,IBM, HP -! HP-UX.1000+.setlocale.>.sp_YU.ISO-8859-5: ! Serbian,Yugoslavia(1) ,IBM - -! Arabic -HP-UX.1000+.setlocale.>.ar_DZ.ISO-8859-6: ar_SA.iso88596 ! Arabic(2) ,IBM, HP -HP-UX.1000+.setlocale.~.ar_DZ.HP-ARABIC8: ar_DZ.arabic8 ! Arabic(2) , , HP -HP-UX.1000+.setlocale.~.ar_SA.ISO-8859-6: ar_SA.iso88596 ! Arabic(2) ,IBM, HP -HP-UX.1000+.setlocale.~.ar_SA.HP-ARABIC8: ar_SA.arabic8 ! Arabic(2) , , HP - -! Hebrew -HP-UX.1000+.setlocale.~.iw_IL.ISO-8859-8: iw_IL.iso88598 ! Hebrew, Israel ,IBM, HP -HP-UX.1000+.setlocale.~.iw_IL.HP-HEBREW8: iw_IL.hebrew8 ! Hebrew, Israel , , HP - -! Greek -HP-UX.1000+.setlocale.~.el_GR.ISO-8859-7: el_GR.iso88597 ! Greek, Greece ,IBM, HP -HP-UX.1000+.setlocale.~.el_GR.HP-GREEK8: el_GR.greek8 ! Greek, Greece , , HP - -! Turkish -HP-UX.1000+.setlocale.~.tr_TR.ISO-8859-9: tr_TR.iso88599 ! Turkish, Turkey ,IBM, HP -HP-UX.1000+.setlocale.~.tr_TR.HP-TURKISH8: tr_TR.turkish8 ! Turkish, Turkey , , HP - -! East Asia -HP-UX.1000+.setlocale.~.ja_JP.EUC-JP: ja_JP.eucJP ! Japanese, Japan ,IBM, HP, Sun ("ja"), -HP-UX.1000+.setlocale.~.ja_JP.HP-SJIS: ja_JP.SJIS ! Japanese, Japan ,IBM, HP, Sun ("ja"), -HP-UX.1000+.setlocale.>.ja_JP.IBM-932: ja_JP.SJIS ! Japanese, Japan ,IBM, HP, Sun ("ja"), -HP-UX.1000+.setlocale.~.ja_JP.HP-KANA8: ja_JP.kana8 ! Japanese, Japan , , HP, , -HP-UX.1000+.setlocale.~.ko_KR.EUC-KR: ko_KR.eucKR ! Korean, Korea ,IBM, HP, Sun ("ko"), -HP-UX.1000+.setlocale.>.zh_CN.EUC-CN: zh_CN.15CN ! Chinese, China ,IBM, HP, Sun ("zh"), -HP-UX.1000+.setlocale.~.zh_CN.HP-15CN: zh_CN.15CN ! Chinese, China ,IBM, HP, Sun ("zh"), -HP-UX.1000+.setlocale.~.zh_TW.EUC-TW: zh_TW.eucTW ! Chinese, Taiwan ,IBM, HP, Sun , -HP-UX.1000+.setlocale.~.zh_TW.HP-BIG5: zh_TW.big5 ! Chinese, Taiwan , , HP, , -HP-UX.1000+.setlocale.~.zh_TW.HP-CCDC: zh_TW.ccdc ! Chinese, Taiwan , , HP, , - -! Thai -HP-UX.1000+.setlocale.~.th_TH.TIS-620: th_TH.tis620 ! Thai, Thailand ,IBM, HP - - -! codesets supported for iconv(1,3) on HP-UX 7.0 and above -HP-UX.700+.iconv1,iconv3.=.?.HP-ROMAN8: roman8 -HP-UX.700+.iconv1,iconv3.=.?.ISO-8859-1: iso8859_1 -HP-UX.700+.iconv1,iconv3.=.?.HP-ARABIC8: arabic8 -HP-UX.700+.iconv1,iconv3.=.?.HP-GREEK8: greek8 -HP-UX.700+.iconv1,iconv3.=.?.HP-HEBREW8: hebrew8 -HP-UX.700+.iconv1,iconv3.=.?.HP-TURKISH8: turkish8 -HP-UX.700+.iconv1,iconv3.=.?.EUC-KR: korean15 -HP-UX.700+.iconv1,iconv3.=.?.ISO-2022-JP: jis -HP-UX.700+.iconv1,iconv3.<.?.HP-SJIS: japanese15 -HP-UX.700+.iconv1,iconv3.=.?.HP-SJIS: sjis -HP-UX.700+.iconv1,iconv3.=.?.HP-KANA8: kana8 -HP-UX.700+.iconv1,iconv3.=.?.EUC-JP: ujis -HP-UX.700+.iconv1,iconv3.=.?.HP-CCDC: roc15 - -! codesets supported by iconv(1,3) after HP-UX 10.0 -HP-UX.1000+.iconv1,iconv3.~.?.HP-BIG5: big5 -HP-UX.1000+.iconv1,iconv3.~.?.EUC-TW: eucTW -HP-UX.1000+.iconv1,iconv3.~.?.TIS-620: tis620 -HP-UX.1000+.iconv1,iconv3.>.?.EUC-CN: hp15cn -HP-UX.1000+.iconv1,iconv3.~.?.HP-15CN: hp15cn -HP-UX.1000+.iconv1,iconv3.~.?.EUC-KR: eucKR -HP-UX.1000+.iconv1,iconv3.~.?.ISO-8859-2: iso8859_2 -HP-UX.1000+.iconv1,iconv3.~.?.ISO-8859-5: iso8859_5 -HP-UX.1000+.iconv1,iconv3.~.?.ISO-8859-6: iso8859_6 -HP-UX.1000+.iconv1,iconv3.~.?.ISO-8859-7: iso8859_7 -HP-UX.1000+.iconv1,iconv3.~.?.ISO-8859-8: iso8859_8 -HP-UX.1000+.iconv1,iconv3.~.?.ISO-8859-9: iso8859_9 -HP-UX.1000+.iconv1,iconv3.~.?.IBM-437: cp437 -HP-UX.1000+.iconv1,iconv3.~.?.IBM-850: cp850 - -! codesets not supported by iconv(1,3) through 10.0 HP-UX release -!HP-UX.?.iconv1,iconv3.=.?.ISO-2022-KR: -!HP-UX.?.iconv1,iconv3.=.?.ISO-2022-TW: -!HP-UX.?.iconv1,iconv3.=.?.ISO-2022-CN: -!HP-UX.?.iconv1,iconv3.~.?.IBM-856: -!HP-UX.?.iconv1,iconv3.~.?.IBM-1046: -!HP-UX.?.iconv1,iconv3.~.?.UCS-2: -!HP-UX.?.iconv1,iconv3.~.?.UTF-8: - -! codesets supported for nl_langinfo on HP-UX 7.0 and above -HP-UX.700-999.nl_langinfo(CODESET).=.?.HP-ROMAN8: ROMAN8 -HP-UX.700-999.nl_langinfo(CODESET).>.?.?: ROMAN8 !!! nl_langinfo is hardwired to ROMAN8 for all codesets -HP-UX.1000+.nl_langinfo(CODESET).=.?.HP-ROMAN8: roman8 -HP-UX.1000+.nl_langinfo(CODESET).=.?.ISO-8859-1: iso8859_1 -HP-UX.1000+.nl_langinfo(CODESET).=.?.HP-ARABIC8: arabic8 -HP-UX.1000+.nl_langinfo(CODESET).=.?.HP-GREEK8: greek8 -HP-UX.1000+.nl_langinfo(CODESET).=.?.HP-HEBREW8: hebrew8 -HP-UX.1000+.nl_langinfo(CODESET).=.?.HP-TURKISH8: turkish8 -HP-UX.1000+.nl_langinfo(CODESET).=.?.EUC-KR: korean15 !!! verify std matches op -HP-UX.1000+.nl_langinfo(CODESET).<.?.HP-SJIS: japanese15 -HP-UX.1000+.nl_langinfo(CODESET).=.?.HP-SJIS: sjis -HP-UX.1000+.nl_langinfo(CODESET).=.?.HP-KANA8: kana8 -HP-UX.1000+.nl_langinfo(CODESET).=.?.EUC-JP: ujis -HP-UX.1000+.nl_langinfo(CODESET).=.?.HP-CCDC: roc15 !!! verify std matches op - -! 10.0 and above supported iconv(1) codesets -!!! collect and verify this - -! multibyte codesets -! This translation provides an alternative to a call to -! using setlocale() and MB_CUR_MAX to determine this. -HP-UX.?.multibyte.=.?.EUC-KR: 2 -HP-UX.?.multibyte.=.?.HP-SJIS: 2 -HP-UX.700+.multibyte.=.?.EUC-JP: 2 -HP-UX.1000+.multibyte.=.?.EUC-JP: 4 -HP-UX.?.multibyte.=.?.IBM-932: 2 -HP-UX.?.multibyte.=.?.HP-CCDC: 2 -HP-UX.?.multibyte.=.?.HP-BIG5: 2 -HP-UX.?.multibyte.=.?.EUC-TW: 2 -HP-UX.?.multibyte.=.?.TIS-620: 2 -HP-UX.?.multibyte.=.?.EUC-CN: 2 -HP-UX.?.multibyte.=.?.HP-15CN: 2 -HP-UX.?.multibyte.=.?.EUC-KR: 2 -HP-UX.?.multibyte.=.?.EUC-TW: 2 - -! Translations from predefined CCDF-locales to CDE Standard Locales -HP-UX.700+.ccdf.=.?.HP-ROMAN8: hp-roman8 -HP-UX.700+.ccdf.=.?.ISO-8859-1: iso8859-1 -HP-UX.700+.ccdf.=.ko_KR.EUC-KR: hp-korean15 -HP-UX.700+.ccdf.=.ja_JP.HP-SJIS: hp-japanese15 -HP-UX.700+.ccdf.=.ja_JP.EUC-JP: hp-japaneseeuc -HP-UX.700+.ccdf.=.?.DT-SYMBOL-1: symbol !!! this is the Dt symbol font -! These CDE standard locales may have CCDF-locales, but they are defined by localizers -! HP-UX.700+.ccdf.=.ar_SA.HP-ARABIC8: arabic8 -! HP-UX.700+.ccdf.=.el_GR.HP-GREEK8: greek8 -! HP-UX.700+.ccdf.=.iw_IL.HP-HEBREW8: hebrew8 -! HP-UX.700+.ccdf.=.tr_TR.HP-TURKISH8: turkish8 -! HP-UX.700+.ccdf.<.ja_JP.HP-SJIS: sjis -! HP-UX.700+.ccdf.=.ja_JP.HP-KANA8: kana8 -! HP-UX.700+.ccdf.=.ja_JP.EUC-JP: ujis -! HP-UX.700+.ccdf.=.zh_CN.HP-CCDC: roc15 - - -! Codesets that require multibyte parsing to avoid confusion with shell special chars -HP-UX.?.dtkshSpecialParse.=.ja_JP.HP-SJIS: True -HP-UX.?.dtkshSpecialParse.=.ja_JP.IBM-932: True -HP-UX.?.dtkshSpecialParse.=.zh_TW.HP-BIG5: True -HP-UX.?.dtkshSpecialParse.=.zh_TW.HP-CCDC: True -HP-UX.?.dtkshSpecialParse.=.zh_TW.EUC-TW: True - - -!! When content is exchanged with other platforms, the interchange codeset -!! may be different that the codeset used locally. In CDE1, these translations -!! are used by dtmail, but other clients may use the same translations -!! in the future. For example, to improve interoperability of 8-bit mail, -!! the mail messages of users working in codesets such as HP-ROMAN8 or IBM-850 -!! are translated to the interchangeCodeset (in this case, ISO-8859-1) before -!! they are sent. Similarly, the mail of Japanese users is translated to JIS -!! before it is sent. -HP-UX.?.interchangeCodeset.~.?.ISO-8859-1: ISO-8859-1 ! ISO Latin 1 -HP-UX.?.interchangeCodeset.>.?.HP-ROMAN8: ISO-8859-1 ! HP Roman8 -!HP-UX.?.interchangeCodeset.>.?.IBM-850: ISO-8859-1 ! PC (Multi-lingual) -!HP-UX.?.interchangeCodeset.>.?.IBM-437: ISO-8859-1 ! PC (US) -HP-UX.?.interchangeCodeset.~.?.ISO-8859-2: ISO-8859-2 ! ISO Latin 2 -HP-UX.?.interchangeCodeset.~.?.ISO-8859-5: ISO-8859-5 ! ISO Latin/Cyrillic -HP-UX.?.interchangeCodeset.~.?.ISO-8859-6: ISO-8859-6 ! ISO Latin/Arabic -HP-UX.?.interchangeCodeset.>.?.HP-ARABIC8: ISO-8859-6 ! HP Arabic8 -!HP-UX.?.interchangeCodeset.>.?.IBM-1046: ISO-8859-6 ! PC Arabic Code Set -HP-UX.?.interchangeCodeset.~.?.ISO-8859-8: ISO-8859-8 ! ISO Latin/Hebrew -HP-UX.?.interchangeCodeset.>.?.HP-HEBREW8: ISO-8859-8 ! HP Hebrew8 -!HP-UX.?.interchangeCodeset.>.?.IBM-856: ISO-8859-8 ! PC Hebrew -HP-UX.?.interchangeCodeset.~.?.ISO-8859-7: ISO-8859-7 ! ISO Latin/Greek -HP-UX.?.interchangeCodeset.>.?.HP-GREEK8: ISO-8859-7 ! HP Greek8 -HP-UX.?.interchangeCodeset.~.?.ISO-8859-9: ISO-8859-9 ! ISO Latin 5 -HP-UX.?.interchangeCodeset.>.?.HP-TURKISH8: ISO-8859-9 ! HP Turkish8 -HP-UX.?.interchangeCodeset.~.?.EUC-JP: ISO-2022-JP ! Japanese EUC -HP-UX.?.interchangeCodeset.>.?.HP-SJIS: ISO-2022-JP ! HP Japanese Shift JIS -!HP-UX.?.interchangeCodeset.>.?.IBM-932: ISO-2022-JP ! PC Japanese Shift JIS -HP-UX.?.interchangeCodeset.>.?.HP-KANA8: ISO-2022-JP ! HP Japanese Katakana8 -! comment when ISO-2022-KR iconv available -HP-UX.?.interchangeCodeset.~.?.EUC-KR: EUC-KR ! Korean EUC KSC 5601 -! uncomment when ISO-2022-KR iconv available -!HP-UX.?.interchangeCodeset.~.?.EUC-KR: ISO-2022-KR ! Korean EUC KSC 5601 -! comment when ISO-2022-CN iconv available -HP-UX.?.interchangeCodeset.>.?.EUC-CN: EUC-CN ! China Chinese EUC -HP-UX.?.interchangeCodeset.~.?.HP-15CN: EUC-CN ! HP Chinese EUC -! uncomment when ISO-2022-CN iconv available -!HP-UX.?.interchangeCodeset.>.?.EUC-CN: ISO-2022-CN ! China Chinese EUC -!HP-UX.?.interchangeCodeset.~.?.HP-15CN: ISO-2022-CN ! HP Chinese EUC -! comment when ISO-2022-TW iconv available -HP-UX.?.interchangeCodeset.~.?.EUC-TW: EUC-TW ! Taiwan Chinese EUC -HP-UX.?.interchangeCodeset.>.?.HP-BIG5: EUC-TW ! HP Big5 Chinese -HP-UX.?.interchangeCodeset.>.?.HP-CCDC: EUC-TW ! HP CCDC Chinese -! uncomment when ISO-2022-TW iconv available -!HP-UX.?.interchangeCodeset.~.?.EUC-TW: ISO-2022-TW ! Taiwan Chinese EUC -!HP-UX.?.interchangeCodeset.>.?.HP-BIG5: ISO-2022-TW ! HP Big5 Chinese -!HP-UX.?.interchangeCodeset.>.?.HP-CCDC: ISO-2022-TW ! HP CCDC Chinese -HP-UX.?.interchangeCodeset.~.?.TIS-620: TIS-620 ! Thai -HP-UX.?.interchangeCodeset.>.?.UCS-2: UTF-8 ! multibyte encoding of Unicode -HP-UX.?.interchangeCodeset.~.?.UTF-8: UTF-8 ! multibyte encoding of Unicode - diff --git a/cde/lib/DtHelp/HyperText.c b/cde/lib/DtHelp/HyperText.c index 7ea0935d2..07eec3410 100644 --- a/cde/lib/DtHelp/HyperText.c +++ b/cde/lib/DtHelp/HyperText.c @@ -49,15 +49,11 @@ #include #include #include -#ifdef __hpux -#include -#else /* SUN and IBM */ #ifdef _AIX #include #endif #include #include -#endif #include #include #include @@ -233,11 +229,7 @@ _DtHelpExecProcedure ( /* * fork a child process. */ -#ifdef __hpux - childPid = vfork (); -#else childPid = fork (); -#endif /* __hpux */ /* * If the child, exec the cmd with a shell parent diff --git a/cde/lib/DtHelp/Print.c b/cde/lib/DtHelp/Print.c index 8714a9153..a8699a336 100644 --- a/cde/lib/DtHelp/Print.c +++ b/cde/lib/DtHelp/Print.c @@ -1303,11 +1303,7 @@ void _DtHelpPrintJob( } #endif -#ifdef __hpux - pid = vfork(); -#else pid = fork(); -#endif /* __hpux */ if (pid == 0) { diff --git a/cde/lib/DtHelp/StringFuncs.c b/cde/lib/DtHelp/StringFuncs.c index 71749f587..b1e2db671 100644 --- a/cde/lib/DtHelp/StringFuncs.c +++ b/cde/lib/DtHelp/StringFuncs.c @@ -528,11 +528,7 @@ int _DtHelpCeStrHashToKey( _CEStrcollProc _DtHelpCeGetStrcollProc(void) { int Clang = 0; -#if defined(__hpux) - struct locale_data * li; -#else char * locale; -#endif extern int strcoll(const char *,const char *); #if defined(_AIX) @@ -544,15 +540,9 @@ int _DtHelpCeStrHashToKey( #define C_LANG "C" /* if locale is C, use the explicit case insensitive compare */ -#if defined(__hpux) - li = getlocale(LOCALE_STATUS); - if ( NULL == li->LC_COLLATE_D || strcmp(C_LANG,li->LC_COLLATE_D) == 0 ) - Clang = 1; -#else locale = setlocale(LC_COLLATE,NULL); /* put locale in buf */ if (strcmp(locale,C_LANG) == 0) Clang = 1; -#endif if (Clang) #if defined(_AIX) diff --git a/cde/lib/DtHelp/il/ilversion.c b/cde/lib/DtHelp/il/ilversion.c index 00f061d6c..a90c6a913 100644 --- a/cde/lib/DtHelp/il/ilversion.c +++ b/cde/lib/DtHelp/il/ilversion.c @@ -33,31 +33,8 @@ See notes below "ilVersionName". */ -#ifdef __hpux - IL_PRIVATE - char _ilVersionString[] = "HP IL BETA v 23. bl08"; -/* nnnnn vvvvvv bbbb see below - xxxxxxxxxxxxxxxxx total size = 17 chars - - The above version string *must* maintain the syntax and position of all fields - before the ";". The strings have the following format; each string is 5 chars: - nnnnn A 5 char fixed string equal to "HP IL ". - vvvvvv A 6 char string in the format "v!!.??", where !! is the two-digit - major version number (" n" if less than 10), and ?? is the minor - version number ("n " if less than 10). Examples: "v10.12", - "v 9.6 ". - bbbbb A 4 char string in the format "bl??", where ?? is the baselevel - number (e.g. "bl01", "bl56"). - -*/ - -#else - IL_PRIVATE char _ilVersionString[] = "@(#)HP IL v 2.1 bl06; Image Library for Domain/OS SR10.X 'il'"; /* nnnnn vvvvvv bbbb see above xxxxxxxxxxxxxxxxx total size = 17 chars */ - -#endif - diff --git a/cde/lib/DtHelp/libDtHelp.elist b/cde/lib/DtHelp/libDtHelp.elist index c1cc930df..b160b9199 100644 --- a/cde/lib/DtHelp/libDtHelp.elist +++ b/cde/lib/DtHelp/libDtHelp.elist @@ -112,7 +112,7 @@ private _DtHelpCeFindKeyword private _DtHelpCeXlateOpToStdLocale private _DtHelpCeXlateStdToOpLocale private _DtHelpCeGetDocStamp -#if !defined(sun) && !defined(__hpux) +#if !defined(sun) private _DtHelpCeStrCaseCmp #endif @@ -147,28 +147,6 @@ private _DtGrRead private _DtHelpCeGetTopTopicId private _DtHelpCeIsTopTopic -/***************************************************************************** - **** Private const structures. - **** On HP machines, these core dump if compiled +ESlit and not included - **** in the export list. - *****************************************************************************/ -#if 0 -#ifdef __hpux -private ilBitonal0WhiteImageDes -private ilGray256ImageDes -private ilRGB256ImageDes -private ilPaletteImageDes -private ilYCbCrImageDes -private ilYCbCr2ImageDes - -private ilBitImageFormat -private ilByteImageFormat -private il3BytePixelImageFormat -private il3BytePlaneImageFormat -#endif /* ifdef __hpux */ -#endif - - /***************************************************************************** **** Internal symbols nobody should call from outside DtHelp *****************************************************************************/ diff --git a/cde/lib/DtMmdb/HardCopy/TemplatesAutoNumber.C b/cde/lib/DtMmdb/HardCopy/TemplatesAutoNumber.C index 4050c1f2d..6fc7863e4 100644 --- a/cde/lib/DtMmdb/HardCopy/TemplatesAutoNumber.C +++ b/cde/lib/DtMmdb/HardCopy/TemplatesAutoNumber.C @@ -35,7 +35,7 @@ #endif /* end of CDE_NEXT */ -#if defined(sun) || defined(hpux) +#if defined(sun) #ifndef CDE_NEXT /* { */ diff --git a/cde/lib/DtMmdb/StyleSheet/Debug.h b/cde/lib/DtMmdb/StyleSheet/Debug.h index d6d2ace8d..db767c7e7 100644 --- a/cde/lib/DtMmdb/StyleSheet/Debug.h +++ b/cde/lib/DtMmdb/StyleSheet/Debug.h @@ -57,7 +57,7 @@ using namespace std; #ifdef DEBUG -#if !defined ( __STDC__) && !defined (hpux) +#if !defined ( __STDC__) #define debug(s, x) s << "x" << " = " << (x) << "\n" #else #define debug(s, x) s << #x << " = " << (x) << "\n" diff --git a/cde/lib/DtMmdb/StyleSheet/SSTemplates.C b/cde/lib/DtMmdb/StyleSheet/SSTemplates.C index 57c0be22d..fd292238c 100644 --- a/cde/lib/DtMmdb/StyleSheet/SSTemplates.C +++ b/cde/lib/DtMmdb/StyleSheet/SSTemplates.C @@ -69,7 +69,7 @@ typedef Stack > _stack_fs_orvec_fs_; // the largest ID used in f's: 59 // -#if defined(sun) || defined(hpux) +#if defined(sun) typedef CC_TPtrSlist _f4_; typedef CC_TPtrSlist _f5_; typedef CC_TPtrSlist _f2_; diff --git a/cde/lib/DtMmdb/dti_excs/Destructable_il.hh b/cde/lib/DtMmdb/dti_excs/Destructable_il.hh index 3c189913c..ea01d5377 100644 --- a/cde/lib/DtMmdb/dti_excs/Destructable_il.hh +++ b/cde/lib/DtMmdb/dti_excs/Destructable_il.hh @@ -98,7 +98,7 @@ Destructable::~Destructable() // This code relies on the fact that in cfront 2.1 this qualified // call to the destructor will actually call the virtual destructor. -#if !defined(hpux) && (CC_VERSION < 30) +#if (CC_VERSION < 30) inline void Destructable::destruct() { diff --git a/cde/lib/DtMmdb/dti_excs/Exception.hh b/cde/lib/DtMmdb/dti_excs/Exception.hh index 726970c8d..2c5322777 100644 --- a/cde/lib/DtMmdb/dti_excs/Exception.hh +++ b/cde/lib/DtMmdb/dti_excs/Exception.hh @@ -31,10 +31,6 @@ class Exception : public Destructable public: #ifdef NATIVE_EXCEPTIONS -#if defined(hpux) - Exception() { } -#endif - #else Exception(); @@ -106,10 +102,6 @@ protected: friend class Jump_Environment; friend class Exceptions; -#if defined(hpux) -#define MakeOperatorNewPublic -#endif - #ifdef MakeOperatorNewPublic // A problem with the HP-UX 3.65 compiler requires us to make this public. // And, since we gen the Templates.nd.c file on a non-HPUX platform, we need diff --git a/cde/lib/DtMmdb/dti_excs/Exceptions.hh b/cde/lib/DtMmdb/dti_excs/Exceptions.hh index ca7850b35..09683486e 100644 --- a/cde/lib/DtMmdb/dti_excs/Exceptions.hh +++ b/cde/lib/DtMmdb/dti_excs/Exceptions.hh @@ -66,7 +66,7 @@ extern "C" { #endif #ifndef STRINGIFY -#if !defined(__STDC__) && !defined(hpux) +#if !defined(__STDC__) #define STRINGIFY(S) "S" #else #define STRINGIFY(S) #S @@ -130,13 +130,8 @@ extern "C" { // This works if OBJ is an object or a pointer since Exception objects // overload operator ->. -#if !defined(hpux) #define mthrow(OBJ) \ (OBJ)->throw_it (__LINE__, __FILE__, DEBUG_THROW_FLAG) -#else -#define mthrow(OBJ) \ - OBJ->throw_it (__LINE__, __FILE__, DEBUG_THROW_FLAG) -#endif #define rethrow \ Exception::current_exception().do_throw (__LINE__, __FILE__) diff --git a/cde/lib/DtMmdb/dti_excs/terminate.C b/cde/lib/DtMmdb/dti_excs/terminate.C index 1fe248f75..f7b684344 100644 --- a/cde/lib/DtMmdb/dti_excs/terminate.C +++ b/cde/lib/DtMmdb/dti_excs/terminate.C @@ -63,11 +63,4 @@ terminate() abort(); } #else - -#ifdef hpux -// HPUX doesn't define the set_terminate function from the ARM. -typedef void (*PFV)(); -PFV set_terminate (PFV) { return (0); } -#endif - #endif /* NATIVE_EXCEPTIONS */ diff --git a/cde/lib/DtMmdb/misc/unique_id.c b/cde/lib/DtMmdb/misc/unique_id.c index 9447afac0..3f34eb576 100644 --- a/cde/lib/DtMmdb/misc/unique_id.c +++ b/cde/lib/DtMmdb/misc/unique_id.c @@ -97,22 +97,7 @@ static unsigned int mask[] = (bits & (1L << (sizeof(BITS) * 8)-1)) ? putchar('1') : putchar('0'); } \ putchar ('\n'); } -#if defined(hpux) -#include -static unsigned int -gethostid() -{ - struct utsname u; - int i; - - i=uname(&u); - if (i==-1) - abort(); - if (u.idnumber[0]) - return atoi(u.idnumber); - abort(); -} -#elif defined(SVR4) && !defined(sun) +#if defined(SVR4) && !defined(sun) static unsigned int gethostid() { diff --git a/cde/lib/DtMmdb/misc/unique_id.h b/cde/lib/DtMmdb/misc/unique_id.h index 185a1a095..ad06f7c7f 100644 --- a/cde/lib/DtMmdb/misc/unique_id.h +++ b/cde/lib/DtMmdb/misc/unique_id.h @@ -29,7 +29,7 @@ extern "C" { #endif -#if defined( __STDC__ ) || defined( _HPUX_SOURCE ) +#if defined( __STDC__ ) const char *unique_id(void); #else char *unique_id(); diff --git a/cde/lib/DtMmdb/oliasdb/c_api.C b/cde/lib/DtMmdb/oliasdb/c_api.C index e77d6df1f..61ed62e14 100644 --- a/cde/lib/DtMmdb/oliasdb/c_api.C +++ b/cde/lib/DtMmdb/oliasdb/c_api.C @@ -25,15 +25,6 @@ #include "oliasdb/DtMmdb.h" #include -#if ( ARCH == hpux) -extern "C" -char __pure_virtual_called() -{ - return 0; -} -#endif - - #ifdef DEBUG extern "C" diff --git a/cde/lib/DtMmdb/oliasdb/c_api_pure_virtual.C b/cde/lib/DtMmdb/oliasdb/c_api_pure_virtual.C index 12d415851..8f007f024 100644 --- a/cde/lib/DtMmdb/oliasdb/c_api_pure_virtual.C +++ b/cde/lib/DtMmdb/oliasdb/c_api_pure_virtual.C @@ -28,22 +28,13 @@ extern "C" { -#if defined(hpux) -char __pure_virtual_called() -{ - fprintf(stderr, "DtMmdb: pure virtual called\n"); - exit (-1); - return 0; -} -#else #if defined(SVR4) && defined(SC3) void _pure_error_() { fprintf(stderr, "DtMmdb: pure virtual called\n"); exit (-1); } -#else -#ifdef _AIX +#elif _AIX void __PureVirtualCalled() { fprintf(stderr, "DtMmdb: pure virtual called\n"); @@ -57,8 +48,6 @@ void __pure_virtual_called() exit (-1); } -#endif -#endif #endif } diff --git a/cde/lib/DtMmdb/schema/desc.h b/cde/lib/DtMmdb/schema/desc.h index 7c0c71335..a2c2b5f19 100644 --- a/cde/lib/DtMmdb/schema/desc.h +++ b/cde/lib/DtMmdb/schema/desc.h @@ -59,7 +59,7 @@ #define desc_print3(s, n, x) s << " " << n << "=" << (x) << ":\\" << endl #define desc_print_end3(s, n, x) s << " " << n << "=" << (x) << endl -#if !defined ( __STDC__) && !defined (hpux) +#if !defined ( __STDC__) #define desc_print(s, x) s << " " << "x" << "=" << (x) << ":\\\n" #define desc_print_end(s, x) s << " " << "x" << "=" << (x) << "\n" #else diff --git a/cde/lib/DtMmdb/utility/debug.h b/cde/lib/DtMmdb/utility/debug.h index 1bbc98c85..d4401331a 100644 --- a/cde/lib/DtMmdb/utility/debug.h +++ b/cde/lib/DtMmdb/utility/debug.h @@ -48,7 +48,7 @@ #ifdef DEBUG -#if !defined ( __STDC__) && !defined (hpux) +#if !defined ( __STDC__) #define debug(s, x) s << "x" << " = " << (x) << "\n" #else #define debug(s, x) s << #x << " = " << (x) << "\n" diff --git a/cde/lib/DtMmdb/utility/filebuf.C b/cde/lib/DtMmdb/utility/filebuf.C index a0395d7fa..aedc8fee0 100644 --- a/cde/lib/DtMmdb/utility/filebuf.C +++ b/cde/lib/DtMmdb/utility/filebuf.C @@ -26,7 +26,7 @@ #include #include -#if !defined(hpux) && !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) +#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) #include #endif diff --git a/cde/lib/DtMmdb/utility/funcs.C b/cde/lib/DtMmdb/utility/funcs.C index 44f1eb68d..0f78ee330 100644 --- a/cde/lib/DtMmdb/utility/funcs.C +++ b/cde/lib/DtMmdb/utility/funcs.C @@ -741,7 +741,7 @@ Boolean cc_is_digit(istream& in) unsigned long disk_space(const char* path) { -#if defined (hpux) || defined (SVR4) || defined(CSRG_BASED) +#if defined (SVR4) || defined(CSRG_BASED) struct statvfs statfs_buf; #else struct statfs statfs_buf; @@ -749,7 +749,7 @@ unsigned long disk_space(const char* path) long free_bytes; -#if defined (hpux) || defined (SVR4) || defined(CSRG_BASED) +#if defined (SVR4) || defined(CSRG_BASED) if ( statvfs(path, &statfs_buf) == 0 ) { free_bytes = statfs_buf.f_bavail * statfs_buf.f_frsize ; #else diff --git a/cde/lib/DtMmdb/utility/funcs.h b/cde/lib/DtMmdb/utility/funcs.h index 9efeecef1..abf9b00d5 100644 --- a/cde/lib/DtMmdb/utility/funcs.h +++ b/cde/lib/DtMmdb/utility/funcs.h @@ -55,8 +55,7 @@ #if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) #include #endif -#if defined(hpux) || defined(sgi) || \ - defined(__linux__) || defined(CSRG_BASED) || defined(sun) +#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include #else #include diff --git a/cde/lib/DtMrm/DtMrm.c b/cde/lib/DtMrm/DtMrm.c index a642a8dc7..acde8b8f9 100644 --- a/cde/lib/DtMrm/DtMrm.c +++ b/cde/lib/DtMrm/DtMrm.c @@ -85,10 +85,6 @@ static char rcsid[] = "$TOG: DtMrm.c /main/4 1999/10/14 13:35:44 mgreess $" * INCLUDE FILES * */ -#if defined(__hpux) -#include -#endif - #include #include #include diff --git a/cde/lib/DtSearch/libDtSearch.elist b/cde/lib/DtSearch/libDtSearch.elist index 9e4176fcd..306b623fb 100644 --- a/cde/lib/DtSearch/libDtSearch.elist +++ b/cde/lib/DtSearch/libDtSearch.elist @@ -416,10 +416,6 @@ internal yylex internal yynerrs internal yyparse -#if defined(hpux) -internal yymaxdepth -#endif - #if defined(sun) internal yy_yys internal yy_yyv diff --git a/cde/lib/DtSvc/DtEncap/pty.c b/cde/lib/DtSvc/DtEncap/pty.c index a26d3db0d..d580ea1af 100644 --- a/cde/lib/DtSvc/DtEncap/pty.c +++ b/cde/lib/DtSvc/DtEncap/pty.c @@ -35,14 +35,6 @@ #define __need_fd_set -#if defined(hpux) || defined(_hpux) || defined(__hpux) || defined(hp) -#define __hpux_pty -#endif - -#ifdef __hpux_pty -#define __need_timeval /* need struct timeval */ -#endif - #include /* NOTE: sbport.h must be the first include. */ #include #include @@ -56,11 +48,6 @@ #include #endif -#ifdef __hpux_pty -#include -#include -#endif - #ifdef __bsd #include #include @@ -165,28 +152,6 @@ pty_channel_clasp pty_channel_class = &pty_channel_class_struct; /* Local variable */ static XeChar *hexdigits = "0123456789abcdef"; -#ifdef __hpux_pty -/*----------------------------------------------------------------------+*/ -static SPC_Disable_Trapping(int fd) -/*----------------------------------------------------------------------+*/ -{ - int flag=0; - int disable=0; - struct request_info req_info; - - /* Disable trapping */ - ioctl(fd, TIOCTRAP, &disable); - - /* Just in case, flush any queued requests */ - - while((ioctl(fd, TIOCTRAPSTATUS, &flag) != ERROR) && flag) { - ioctl(fd, TIOCREQGET, &req_info); - ioctl(fd, TIOCREQSET, &req_info); - } - return(TRUE); -} -#endif /* __hpux_pty */ - /* * Routines for opening pty master/slave devices */ @@ -384,14 +349,6 @@ int master_pty(int fd, struct termios *state) if (fd < 0) return(TRUE); -#ifdef __hpux_pty - /* Enable trapping of ioctl/open/close (we care about close()) */ - if(ioctl(fd, TIOCTRAP, &enable)==ERROR) { - SPC_Error(SPC_Bad_Ioctl); - return(SPC_ERROR); - } -#endif /* __hpux_pty */ - set_pty_state(fd, state); @@ -510,91 +467,6 @@ int read_pty_channel_object(SPC_Channel_Ptr channel, XeString buffer, int nbytes) /*----------------------------------------------------------------------+*/ -#ifdef __hpux_pty -{ - - int result, select_value; - struct fd_set read_mask, except_mask; - int fd=channel->file_descs[connector]; - struct request_info req_info; - struct timeval timeout, *timeptr; - int i; - - call_parent_method(channel, - read, - (channel, connector, buffer, nbytes), - result); - - if(result==SPC_ERROR) - return(SPC_ERROR); - - if(!IS_SPCIO_DATA(channel->wires[connector]->flags)) - return(0); - - FD_ZERO(&read_mask); - FD_ZERO(&except_mask); - - FD_SET(fd, &read_mask); - FD_SET(fd, &except_mask); - - if(channel->close_timeout) { - timeout.tv_sec=channel->close_timeout; - timeout.tv_usec=0; - timeptr = (&timeout); - } else - timeptr=NULL; - - do - select_value=select(fd+1, &read_mask, NULL, &except_mask, timeptr); - while(select_value==ERROR && errno==EINTR); - - if(select_value==ERROR) { - SPC_Error(SPC_Bad_Select); - return(SPC_ERROR); - } - - /* If there is anything to read, read it & return */ - IS_FD_SET(&read_mask, result); - if(result) { - do { - result = read(fd, buffer, nbytes); - } while (result<0 && errno == EINTR); - if(result==ERROR) { - SPC_Error(SPC_Reading); - return(SPC_ERROR); - } - return(result); - } - - /* Nothing to read. We either timed out or got an exception. */ - - if(select_value != 0) { - - /* We got an exception */ - ioctl(fd, TIOCREQGET, &req_info); - - /* Clear the request (Not really necessary in the case of a close, - but do it anyway) */ - - ioctl(fd, TIOCREQSET, &req_info); - } - - if((select_value == 0) || (req_info.request == TIOCCLOSE)) { - - /* Close, disable trapping on this fd & return EOF. We regard - a timeout as being the same as a close. */ - - SPC_Disable_Trapping(fd); - SPC_Change_State(channel, connector, 0, -1); - return(0); - - } else - - /* Otherwise (open or IOCTL), return -1 */ - - return(EXCEPT_FLAG); -} -#else /* not __hpux_pty */ { int result; int fd=channel->file_descs[connector]; @@ -648,7 +520,6 @@ int read_pty_channel_object(SPC_Channel_Ptr channel, return(result); } -#endif /* __hpux_pty */ /*----------------------------------------------------------------------+*/ int pre_fork_pty_channel_object(SPC_Channel_Ptr channel) @@ -671,38 +542,14 @@ int pre_fork_pty_channel_object(SPC_Channel_Ptr channel) result=SPC_ERROR; } -#ifndef __hpux_pty if(pipe(channel->sync_pipe) < 0) { SPC_Error(SPC_No_Pipe); return(SPC_ERROR); } -#endif /* __hpux_pty */ return(result); } -#ifdef __hpux_pty -/*----------------------------------------------------------------------+*/ -/* clear_trap */ -/*----------------------------------------------------------------------+*/ - -/* I am not particularly enamored of this macro. However, the style of - the SCANBITS macro kinda forces me to write it this way. In particular, - I am a bit worried about the reference to except_mask, which is a - "nonlocal reference" */ - -#define clear_trap(fd) {struct request_info req_info; \ - int my_fd=(fd); \ - ioctl(my_fd, TIOCREQGET, &req_info); \ - if(req_info.request != TIOCOPEN) { \ - SPC_Error(SPC_Bad_Ioctl); \ - return(SPC_ERROR); \ - } \ - ioctl(my_fd, TIOCREQSET, &req_info); \ - FD_CLR(my_fd, &except_mask); \ - } -#endif /* __hpux_pty */ - /*----------------------------------------------------------------------+*/ int post_fork_pty_channel_object(SPC_Channel_Ptr channel, int parentp) @@ -714,9 +561,6 @@ int post_fork_pty_channel_object(SPC_Channel_Ptr channel, int iomode=channel->IOMode; int fd=channel->file_descs[STDIN]; int stdinfd, stdoutfd, stderrfd; -#ifdef __hpux_pty - struct fd_set except_mask, temp_mask; -#endif int pid; char c; @@ -726,40 +570,12 @@ int post_fork_pty_channel_object(SPC_Channel_Ptr channel, return(SPC_ERROR); if (parentp) { /* Master process */ -#ifdef __hpux_pty - { int i; - int select_value; - - stdinfd = channel->wires[STDIN]->fd[MASTER_SIDE]; - stdoutfd = channel->wires[STDOUT]->fd[MASTER_SIDE]; - stderrfd = channel->wires[STDERR]->fd[MASTER_SIDE]; - - FD_ZERO(&except_mask); - - if(stdinfd >= 0) - FD_SET(stdinfd, &except_mask); - if(stdoutfd >= 0) - FD_SET(stdoutfd, &except_mask); - if(stderrfd >= 0) - FD_SET(stderrfd, &except_mask); - - IS_FD_SET(&except_mask, result); - while (result) { - temp_mask = except_mask; - select_value=select(max_fds, NULL, NULL, &temp_mask, NULL); - SCANBITS(&temp_mask, clear_trap); - IS_FD_SET(&except_mask, result); - } - } -#else /* not __hpux_pty */ close(channel->sync_pipe[WRITE_SIDE]); read(channel->sync_pipe[READ_SIDE], &c, 1); close(channel->sync_pipe[READ_SIDE]); channel->sync_pipe[READ_SIDE] = -1; channel->sync_pipe[WRITE_SIDE] = -1; XeSPCAddInput(channel, NULL, NULL); -#endif /* __hpux_pty */ - } else { /* Slave process */ /* Open the slave pty. Do it up to three times to set up @@ -811,14 +627,12 @@ int post_fork_pty_channel_object(SPC_Channel_Ptr channel, stderrfd=stdoutfd; } -#ifndef __hpux_pty /* The pty trapping stuff handles EOF for us. Use the "sync" pipe */ /* to inform the other side when we don't have that code. */ c=040; write(channel->sync_pipe[WRITE_SIDE], &c, 1); close(channel->sync_pipe[READ_SIDE]); close(channel->sync_pipe[WRITE_SIDE]); -#endif /* __hpux_pty */ /* Duplicate these file descriptors to 3, 4, 5 so we don't have to worry about any of std[in|out|err]fd being 0, 1, or 2. */ @@ -863,15 +677,6 @@ int reset_pty_channel_object(SPC_Channel_Ptr channel) for(wirelist=channel->wire_list; wirelist; wirelist=wirelist->next) { -#ifdef __hpux_pty - { - int fd=wirelist->fd[MASTER_SIDE]; - /* Disable trapping of ioctl/open/close */ - if(SPC_Disable_Trapping(fd) == SPC_ERROR) - result=SPC_ERROR; - } -#endif /* __hpux_pty */ - wirelist->flags &= ~SPCIO_DATA; } @@ -925,13 +730,6 @@ int add_input_pty_channel_object(SPC_Channel_Ptr channel, fd, channel->class_ptr->input, SPC_Input); -#ifdef __hpux_pty - SPC_XtAddInput(channel, - &wirelist->except_toolkit_id, - fd, - channel->class_ptr->input, - SPC_Exception); -#endif /* __hpux_pty */ } return(TRUE); diff --git a/cde/lib/DtSvc/DtEncap/spc-exec.c b/cde/lib/DtSvc/DtEncap/spc-exec.c index 7afcb0522..eb49d8e4d 100644 --- a/cde/lib/DtSvc/DtEncap/spc-exec.c +++ b/cde/lib/DtSvc/DtEncap/spc-exec.c @@ -603,11 +603,7 @@ int exec_proc_local_channel_object(SPC_Channel_Ptr channel) if(result!=SPC_ERROR) { /* Execute */ /* Compiler barfs without cast ? */ -#if defined(__hpux_8_0) || defined(__aix) - result=execvp(channel->path, channel->argv); -#else result=execvp(channel->path, channel->argv); -#endif /* If we return from exec, it failed */ SPC_Error(SPC_Cannot_Exec, channel->path); } diff --git a/cde/lib/DtSvc/DtEncap/usersig.c b/cde/lib/DtSvc/DtEncap/usersig.c index c5e2ab957..ff95c7ab5 100644 --- a/cde/lib/DtSvc/DtEncap/usersig.c +++ b/cde/lib/DtSvc/DtEncap/usersig.c @@ -90,55 +90,55 @@ static void Xe_init_sig_table(void) /* Now add signals that may or may not be around on a given platform */ # ifdef SIGIO - Xe_addsig((XeString)"SIGIO", SIGIO); /* hpux sun */ + Xe_addsig((XeString)"SIGIO", SIGIO); /* sun */ # else # ifdef SIGPOLL - Xe_addsig((XeString)"SIGIO", SIGPOLL); /* hpux sun */ + Xe_addsig((XeString)"SIGIO", SIGPOLL); /* sun */ # endif # endif # ifdef SIGPOLL - Xe_addsig((XeString)"SIGPOLL", SIGPOLL); /* hpux sun */ + Xe_addsig((XeString)"SIGPOLL", SIGPOLL); /* sun */ # else # ifdef SIGIO - Xe_addsig((XeString)"SIGPOLL", SIGIO); /* hpux sun */ + Xe_addsig((XeString)"SIGPOLL", SIGIO); /* sun */ # endif # endif # ifdef SIGEMT - Xe_addsig((XeString)"SIGEMT", SIGEMT); /* hpux sun */ + Xe_addsig((XeString)"SIGEMT", SIGEMT); /* sun */ # endif # ifdef SIGBUS - Xe_addsig((XeString)"SIGBUS", SIGBUS); /* hpux sun */ + Xe_addsig((XeString)"SIGBUS", SIGBUS); /* sun */ # endif # ifdef SIGIOT - Xe_addsig((XeString)"SIGIOT", SIGIOT); /* hpux sun */ + Xe_addsig((XeString)"SIGIOT", SIGIOT); /* sun */ # endif # ifdef SIGURG - Xe_addsig((XeString)"SIGURG", SIGURG); /* hpux sun */ + Xe_addsig((XeString)"SIGURG", SIGURG); /* sun */ # endif # ifdef SIGSYS - Xe_addsig((XeString)"SIGSYS", SIGSYS); /* hpux sun */ + Xe_addsig((XeString)"SIGSYS", SIGSYS); /* sun */ # endif # ifdef SIGTRAP - Xe_addsig((XeString)"SIGTRAP", SIGTRAP); /* hpux sun */ + Xe_addsig((XeString)"SIGTRAP", SIGTRAP); /* sun */ # endif # ifdef SIGPROF - Xe_addsig((XeString)"SIGPROF", SIGPROF); /* hpux sun */ + Xe_addsig((XeString)"SIGPROF", SIGPROF); /* sun */ # endif # ifdef SIGCLD - Xe_addsig((XeString)"SIGCLD", SIGCLD); /* hpux sun */ + Xe_addsig((XeString)"SIGCLD", SIGCLD); /* sun */ # endif # ifdef SIGVTALRM - Xe_addsig((XeString)"SIGVTALRM", SIGVTALRM); /* hpux sun */ + Xe_addsig((XeString)"SIGVTALRM", SIGVTALRM); /* sun */ # endif # ifdef SIGWINCH @@ -204,56 +204,56 @@ XeString XeSignalToName(int sig) /* code to the stuff in Xe_init_sig_table() above, you see a one */ /* to one correspondance. */ -# ifdef SIGIO /* hpux sun */ +# ifdef SIGIO /* sun */ /* (SIGPOLL, SIGTINT are aliases) */ case SIGIO: return (XeString)"SIGIO"; # endif -# ifdef SIGPOLL /* hpux sun */ +# ifdef SIGPOLL /* sun */ /* ----> Duplicated by SIGIO above case SIGPOLL: return (XeString)"SIGPOLL"; */ # endif -# ifdef SIGEMT /* hpux sun */ +# ifdef SIGEMT /* sun */ case SIGEMT: return (XeString)"SIGEMT"; # endif -# ifdef SIGBUS /* hpux sun */ +# ifdef SIGBUS /* sun */ case SIGBUS: return (XeString)"SIGBUS"; # endif -# ifdef SIGIOT /* hpux sun */ +# ifdef SIGIOT /* sun */ /* ----> Duplicated by SIGABRT above case SIGIOT: return (XeString)"SIGIOT"; */ # endif -# ifdef SIGURG /* hpux sun */ +# ifdef SIGURG /* sun */ case SIGURG: return (XeString)"SIGURG"; # endif -# ifdef SIGSYS /* hpux sun */ +# ifdef SIGSYS /* sun */ case SIGSYS: return (XeString)"SIGSYS"; # endif -# ifdef SIGTRAP /* hpux sun */ +# ifdef SIGTRAP /* sun */ case SIGTRAP: return (XeString)"SIGTRAP"; # endif -# ifdef SIGPROF /* hpux sun */ +# ifdef SIGPROF /* sun */ case SIGPROF: return (XeString)"SIGPROF"; # endif -# ifdef SIGCLD /* hpux sun */ +# ifdef SIGCLD /* sun */ /* ----> Duplicated by SIGCHLD above case SIGCLD: return (XeString)"SIGCLD"; */ # endif -# ifdef SIGVTALRM /* hpux sun */ +# ifdef SIGVTALRM /* sun */ case SIGVTALRM: return (XeString)"SIGVTALRM"; # endif diff --git a/cde/lib/DtSvc/DtUtil1/CmdMain.c b/cde/lib/DtSvc/DtUtil1/CmdMain.c index 67dfd9dac..61f2069d6 100644 --- a/cde/lib/DtSvc/DtUtil1/CmdMain.c +++ b/cde/lib/DtSvc/DtUtil1/CmdMain.c @@ -73,14 +73,6 @@ */ #define COMMAND_CHECK_FAILURE 1 -#ifdef __hpux -#ifdef hpV4 -#define INETD_SECURITY_FILE "/var/adm/inetd.sec" -#else /* hpV4 */ -#define INETD_SECURITY_FILE "/usr/adm/inetd.sec" -#endif /* hpV4 */ -#endif /* __hpux */ - #define Cmd_FreeAllocatedStringVector(sv) \ _DtCmdFreeStringVector(sv);\ XtFree((char *)sv); @@ -337,24 +329,11 @@ _DtSPCOpen( SPC_BUFSIZ); break; case SPC_Connection_EOF: -#ifdef __hpux - (void) sprintf (errorMessage, - errorInetSecurity, - hostname, - _cmdClientHost, - SPC_SERVICE, - _cmdClientHost, - SPC_SERVICE, - INETD_SECURITY_FILE, - hostname); - -#else /* __hpux */ (void) sprintf (errorMessage, errorBadConnect, hostname, SPC_SERVICE, _cmdClientHost); -#endif /* __hpux */ break; default: /* diff --git a/cde/lib/DtSvc/DtUtil1/CmdProcess.c b/cde/lib/DtSvc/DtUtil1/CmdProcess.c index ecb66a780..1a70a78d8 100644 --- a/cde/lib/DtSvc/DtUtil1/CmdProcess.c +++ b/cde/lib/DtSvc/DtUtil1/CmdProcess.c @@ -45,10 +45,6 @@ #include #endif -#if defined(__hpux) -#include -#endif - #include #include #include diff --git a/cde/lib/DtSvc/DtUtil1/DbLoad.c b/cde/lib/DtSvc/DtUtil1/DbLoad.c index 07caa4ee7..9fb8275f7 100644 --- a/cde/lib/DtSvc/DtUtil1/DbLoad.c +++ b/cde/lib/DtSvc/DtUtil1/DbLoad.c @@ -49,18 +49,12 @@ #include #include -#ifdef __hpux -#include -#else - #if defined(sun) || defined(CSRG_BASED) #include #else #include #endif /* sun || CSRD_BASED */ -#endif /* __hpux */ - #include #include diff --git a/cde/lib/DtSvc/DtUtil1/Dts.c b/cde/lib/DtSvc/DtUtil1/Dts.c index 0e29ba405..5cb2c5271 100644 --- a/cde/lib/DtSvc/DtUtil1/Dts.c +++ b/cde/lib/DtSvc/DtUtil1/Dts.c @@ -54,12 +54,7 @@ #include #include #include -#if defined (__hpux) -/* - * On HP MAXINT is defined in both and - */ -#undef MAXINT -#elif defined(CSRG_BASED) +#if defined(CSRG_BASED) #define MAXINT INT_MAX #else #include diff --git a/cde/lib/DtSvc/DtUtil1/DtsInit.c b/cde/lib/DtSvc/DtUtil1/DtsInit.c index 0e385e274..1d92a0bde 100644 --- a/cde/lib/DtSvc/DtUtil1/DtsInit.c +++ b/cde/lib/DtSvc/DtUtil1/DtsInit.c @@ -47,18 +47,12 @@ #include #include -#ifdef __hpux -#include -#else - #if defined(sun) || defined(CSRG_BASED) #include #else #include #endif /* sun || CSRG_BASED */ -#endif /* __hpux */ - #include #include diff --git a/cde/lib/DtSvc/DtUtil2/FileUtil.c b/cde/lib/DtSvc/DtUtil2/FileUtil.c index d3e799ccd..32ba894a9 100644 --- a/cde/lib/DtSvc/DtUtil2/FileUtil.c +++ b/cde/lib/DtSvc/DtUtil2/FileUtil.c @@ -37,15 +37,11 @@ #include /* MAXPATHLEN */ #include /* errno(2) */ -#ifdef __hpux -#include /* opendir(), directory(3C) */ -#else #if defined(sun) || defined(CSRG_BASED) #include /* opendir(), directory(3C) */ #else #include #endif /* sun || CSRG_BASED */ -#endif /* __hpux */ #include #include /* Xt stuff */ diff --git a/cde/lib/DtSvc/DtUtil2/MsgCat.c b/cde/lib/DtSvc/DtUtil2/MsgCat.c index f34b8020b..99afa3497 100644 --- a/cde/lib/DtSvc/DtUtil2/MsgCat.c +++ b/cde/lib/DtSvc/DtUtil2/MsgCat.c @@ -44,116 +44,10 @@ #else #include #include -#endif /* NO_XLIB */ +#endif #include
-#if defined(hpV4) && !defined(NO_XLIB) -typedef struct _dt_msg_cache -{ - char ***cached_msgs; - int nmsgs_per_set; - int nsets; - - nl_catd catd; - struct _dt_msg_cache *next; -} _DtMsgCache; - -static _DtMsgCache *catalog_message_caches = NULL; - -static _DtMsgCache *get_msg_cache(nl_catd catd) -{ - const int initial_nmsgs_per_set = 300; - const int initial_nsets = 50; - - _DtMsgCache *c; - - for (c=catalog_message_caches; NULL!=c; c=c->next) - if (catd == c->catd) return c; - - c = (_DtMsgCache*) XtMalloc(sizeof(_DtMsgCache)); - c->cached_msgs = NULL; - c->nmsgs_per_set = initial_nmsgs_per_set; - c->nsets = initial_nsets; - c->catd = catd; - c->next = catalog_message_caches; - catalog_message_caches = c; - return c; -} - -/* - * Wrapper around catgets -- this makes sure the message string is saved - * in a safe location; so repeated calls to catgets() do not overwrite - * the catgets() internal buffer. This has been a problem on HP systems. - */ -char *_DtCatgetsCached(nl_catd catd, int set, int num, const char *dflt) -{ - char *message = NULL; - _DtMsgCache *c; - char **setptr; - int i, multiplier; - int size; - - /* convert to a zero based index */ - int setIdx = set - 1; - int numIdx = num - 1; - - c = get_msg_cache(catd); - if (NULL == c) - { - message = catgets(catd, set, num, dflt); - return message; - } - - if (NULL == c->cached_msgs) - { - size = sizeof(char**) * c->nsets; - c->cached_msgs = (char***) XtMalloc(size); - memset((char*) c->cached_msgs, 0, size); - } - else if (setIdx >= c->nsets) - { - for (multiplier=2; setIdx > multiplier*c->nsets; multiplier++) {} - size = sizeof(char**) * c->nsets; - c->cached_msgs = - (char***) XtRealloc((char*) c->cached_msgs, multiplier*size); - memset((char*) (c->cached_msgs + size), 0, multiplier*size); - c->nsets *= multiplier; - } - - if (NULL == c->cached_msgs[setIdx]) - { - size = sizeof(char*) * c->nmsgs_per_set; - c->cached_msgs[setIdx] = (char**) XtMalloc(size); - memset((char*) c->cached_msgs[setIdx], 0, size); - } - else if (numIdx >= c->nmsgs_per_set) - { - for (multiplier=2; numIdx > multiplier*c->nsets; multiplier++) {} - size = sizeof(char*) * c->nmsgs_per_set; - - for (i=0; inmsgs_per_set; i++) - { - if (NULL != c->cached_msgs[i]) - { - c->cached_msgs[i] = - (char**) XtRealloc((char*)c->cached_msgs[i], multiplier*size); - memset((char*) (c->cached_msgs[i] + size), 0, multiplier*size); - } - } - c->nmsgs_per_set *= multiplier; - } - - setptr = c->cached_msgs[setIdx]; - if (NULL == setptr[numIdx]) - setptr[numIdx] = strdup(catgets(catd, set, num, dflt)); - - message = setptr[numIdx]; - - return message; -} -#endif /* hpV4 */ - int _DtCatclose(nl_catd catd) { return (catd == (nl_catd) -1) ? 0 : catclose(catd); @@ -169,11 +63,7 @@ char *_DtCatgets(nl_catd catd, int set, int num, const char *dflt) } else { /* Per POSIX, we cannot assume catgets() is thread-safe. */ _DtSvcProcessLock(); -#if defined(hpV4) && !defined(NO_XLIB) - msg = _DtCatgetsCached(catd, set, num, dflt); -#else msg = catgets(catd, set, num, dflt); -#endif /* hpV4 */ _DtSvcProcessUnlock(); } diff --git a/cde/lib/DtSvc/DtUtil2/Utility.c b/cde/lib/DtSvc/DtUtil2/Utility.c index af2db9454..30cb63555 100644 --- a/cde/lib/DtSvc/DtUtil2/Utility.c +++ b/cde/lib/DtSvc/DtUtil2/Utility.c @@ -35,15 +35,11 @@ #include #include -#ifdef __hpux -#include -#else #if defined(sun) || defined(CSRG_BASED) #include #else #include #endif -#endif #include #ifdef NLS16 diff --git a/cde/lib/DtSvc/include/codelibs/stringx.h b/cde/lib/DtSvc/include/codelibs/stringx.h index 78a8ddc2b..f69fb54e1 100644 --- a/cde/lib/DtSvc/include/codelibs/stringx.h +++ b/cde/lib/DtSvc/include/codelibs/stringx.h @@ -124,11 +124,11 @@ inline void strfree(const char *s) { if (s != NULL) free((char *)s); } #else inline void strfree(const char *s) -#if defined(__hpux) || defined(CSRG_BASED) +#if defined(CSRG_BASED) { if (s != NULL) free((void *)s); } #else { if (s != NULL) free((void *)s); } -#endif /* __hpux */ +#endif /* bsd */ #endif #if defined(bsd) inline char *strdup(const char *s) diff --git a/cde/lib/DtSvc/libDtSvc.elist b/cde/lib/DtSvc/libDtSvc.elist index 719f3e7c8..3b2f7069d 100644 --- a/cde/lib/DtSvc/libDtSvc.elist +++ b/cde/lib/DtSvc/libDtSvc.elist @@ -1106,10 +1106,7 @@ internalC++ xalloc::xalloc(const char*,unsigned int) #endif /* This symbol does not get mangled consistently across platforms. -#ifdef hpV4 -internalC++ shellscan_C_000046c7_parsemeta_:__std -internal __link__std__shellscan_C_000046c7_parsemeta_ -#elif defined(sun) +#if defined(sun) internalC++ shellscan_C:__std #elif defined(_AIX) internalC++ __sterm80000000_x_2fproj_2fcde_2flib_2fDtSvc_2fDtCodelibs_2fshellscan_2eC() diff --git a/cde/lib/DtTerm/Term/TermParse.c b/cde/lib/DtTerm/Term/TermParse.c index 9750ecca6..7649ce84c 100644 --- a/cde/lib/DtTerm/Term/TermParse.c +++ b/cde/lib/DtTerm/Term/TermParse.c @@ -49,12 +49,6 @@ #include "TermPrimUtil.h" #include "TermPrimParseTable.h" -#if defined (__hpux) -/* - * On HP MAXINT is defined in both and - */ -#undef MAXINT -#endif #if defined(CSRG_BASED) #define MAXSHORT SHRT_MAX #else diff --git a/cde/lib/DtTerm/TermPrim/TermPrim.c b/cde/lib/DtTerm/TermPrim/TermPrim.c index 3688e4623..159d73424 100644 --- a/cde/lib/DtTerm/TermPrim/TermPrim.c +++ b/cde/lib/DtTerm/TermPrim/TermPrim.c @@ -75,7 +75,7 @@ extern char * _DtTermPrimGetMessage( char *filename, int set, int n, char *s ); #include #include
#include -#if defined(__linux__) || defined(hpV4) +#if defined(__linux__) # include /* For FD_* macros. */ # include /* For select() prototype. */ #else @@ -246,21 +246,12 @@ static XtResource resources[] = XtOffsetOf(struct _DtTermPrimitiveRec, term.columns), XmRImmediate, (XtPointer) defaultColumns }, -#ifdef HPVUE - { - DtNbackgroundIsSelect, DtCBackgroundIsSelect, XmRBoolean, - sizeof(Boolean), - XtOffsetOf(struct _DtTermPrimitiveRec, term.backgroundIsSelect), - XtRImmediate, (XtPointer) True - }, -#else /* HPVUE */ { DtNbackgroundIsSelect, DtCBackgroundIsSelect, XmRBoolean, sizeof(Boolean), XtOffsetOf(struct _DtTermPrimitiveRec, term.backgroundIsSelect), XtRImmediate, (XtPointer) False }, -#endif /* HPVUE */ { XmNtraversalOn, XmCTraversalOn, XmRBoolean, sizeof(Boolean), XtOffsetOf(struct _DtTermPrimitiveRec, primitive.traversal_on), diff --git a/cde/lib/DtTerm/TermPrim/TermPrimGetPty-bsd.c b/cde/lib/DtTerm/TermPrim/TermPrimGetPty-bsd.c index 0beb1d190..bd9ef8f41 100644 --- a/cde/lib/DtTerm/TermPrim/TermPrimGetPty-bsd.c +++ b/cde/lib/DtTerm/TermPrim/TermPrimGetPty-bsd.c @@ -172,7 +172,7 @@ static struct _pty_dirs { {PTY_null, PTY_null, PTY_null, PTY_null, PTY_null, False}, }; -#if defined(ALPHA_ARCHITECTURE) || defined(CSRG_BASED) +#if defined(CSRG_BASED) /* Use openpty() to open Master/Slave pseudo-terminal pair */ /* Current version of openpty() uses non-STREAM device. BSD name space */ #define TTYNAMELEN 25 @@ -273,25 +273,8 @@ GetPty(char **ptySlave, char **ptyMaster) * This allows us to access the pty when we * are no longer suid root... */ -#ifdef HP_ARCHITECTURE - { - struct group *grp; - gid_t gid; - _Xgetgrparams grp_buf; - - if (grp = _XGetgrnam("tty", grp_buf)) { - gid = grp->gr_gid; - } else { - gid = 0; - } - (void) endgrent(); - (void) chown(ttyDev, getuid(), gid); - (void) chmod(ttyDev, 0620); - } -#else /* HP_ARCHITECTURE */ (void) chown(ttyDev, getuid(), getgid()); (void) chmod(ttyDev, 0622); -#endif /* HP_ARCHITECTURE */ /* close off the pty slave... */ (void) close(ttyFd); @@ -336,7 +319,7 @@ GetPty(char **ptySlave, char **ptyMaster) return(-1); } -#endif /* ALPHA_ARCHITECTURE */ +#endif /* BSD */ /* this is a public wrapper around the previous function that runs the * previous function setuid root... @@ -358,45 +341,8 @@ _DtTermPrimGetPty(char **ptySlave, char **ptyMaster) static int SetupPty(char *ptySlave, int ptyFd) { -#ifdef HP_ARCHITECTURE - { - struct group *grp; - gid_t gid; - _Xgetgrparams grp_buf; - - if (grp = _XGetgrnam("tty", grp_buf)) { - gid = grp->gr_gid; - } else { - gid = 0; - } - (void) endgrent(); - (void) chown(ptySlave, getuid(), gid); - (void) chmod(ptySlave, 0620); - } -#else /* HP_ARCHITECTURE */ -#ifdef ALPHA_ARCHITECTURE - /* code from xterm to setup ownership and permission */ - { - struct group *ttygrp; - _Xgetgrparams grp_buf; - - if (ttygrp = _XGetgrnam("tty", grp_buf)) { - /* change ownership of tty to real uid, "tty" gid */ - chown (ptySlave, getuid(), ttygrp->gr_gid); - chmod (ptySlave, 0620); - } - else { - /* change ownership of tty to real group and user id */ - chown (ptySlave, getuid(), getgid()); - chmod (ptySlave, 0622); - } - endgrent(); - } -#else /* ALPHA_ARCHITECTURE */ (void) chown(ptySlave, getuid(), getgid()); (void) chmod(ptySlave, 0622); -#endif /* ALPHA_ARCHITECTURE */ -#endif /* HP_ARCHITECTURE */ return 0; } diff --git a/cde/lib/DtTerm/TermPrim/TermPrimGetPty-clone.c b/cde/lib/DtTerm/TermPrim/TermPrimGetPty-clone.c index d22bb8102..7409234ba 100644 --- a/cde/lib/DtTerm/TermPrim/TermPrimGetPty-clone.c +++ b/cde/lib/DtTerm/TermPrim/TermPrimGetPty-clone.c @@ -34,9 +34,6 @@ #include #include #include -#ifdef HP_ARCHITECTURE -# define X_INCLUDE_GRP_H -#endif /* HP_ARCHITECTURE */ #define X_INCLUDE_UNISTD_H #define XOS_USE_XT_LOCKING #include @@ -85,25 +82,8 @@ GetPty(char **ptySlave, char **ptyMaster) (void) close(ttyFd); /* fix the owner, mode, and group... */ -#ifdef HP_ARCHITECTURE - { - struct group *grp; - gid_t gid; - _Xgetgrparams grp_buf; - - if (grp = _XGetgrnam("tty", grp_buf)) { - gid = grp->gr_gid; - } else { - gid = 0; - } - (void) endgrent(); - (void) chown(*ptySlave, getuid(), gid); - (void) chmod(*ptySlave, 0620); - } -#else /* HP_ARCHITECTURE */ (void) chown(*ptySlave, getuid(), getgid()); (void) chmod(*ptySlave, 0622); -#endif /* HP_ARCHITECTURE */ /* pty master and slave names are already set. Return * the file descriptor... @@ -142,25 +122,8 @@ _DtTermPrimGetPty(char **ptySlave, char **ptyMaster) static int SetupPty(char *ptySlave, int ptyFd) { -#ifdef HP_ARCHITECTURE - { - struct group *grp; - gid_t gid; - _Xgetgrparams grp_buf; - - if (grp = _XGetgrnam("tty", grp_buf)) { - gid = grp->gr_gid; - } else { - gid = 0; - } - (void) endgrent(); - (void) chown(ptySlave, getuid(), gid); - (void) chmod(ptySlave, 0620); - } -#else /* HP_ARCHITECTURE */ (void) chown(ptySlave, getuid(), getgid()); (void) chmod(ptySlave, 0622); -#endif /* HP_ARCHITECTURE */ } int diff --git a/cde/lib/DtTerm/TermPrim/TermPrimOSDepI.h b/cde/lib/DtTerm/TermPrim/TermPrimOSDepI.h index 3f9da45f1..d79c22f69 100644 --- a/cde/lib/DtTerm/TermPrim/TermPrimOSDepI.h +++ b/cde/lib/DtTerm/TermPrim/TermPrimOSDepI.h @@ -63,32 +63,6 @@ #ifndef _Dt_TermPrimOSDepI_h #define _Dt_TermPrimOSDepI_h -#ifdef ALPHA_ARCHITECTURE -# define USE_TIOCCONS /* use tioccons for -C */ -# define HAS_SETEUID /* seteuid available */ -# define HAS_SETREUID /* setreuid available */ -# define USE_PTYS /* use ptys */ -# define USE_TCSBRK /* use TCSBRK ioctl() */ -#endif /* ALPHA_ARCHITECTURE */ - -#ifdef HP_ARCHITECTURE -# define XOR_CAPS_LOCK /* xor caps lock and shift */ -# define USE_TIOCCONS /* use tioccons for -C */ -# define SETENV_LINES_AND_COLS /* set $LINES and $COLUMNS */ -# define HAS_SETRESUID /* setresuid available */ - -# if OSMAJORVERSION > 9 -# define USE_STREAMS /* use streams */ -# define USE_CSWIDTH /* use the csWidth resource to */ - /* initialize multi-byte processing */ - /* in ldterm */ -# define USE_TCSENDBREAK /* use tiocbreak() */ -# else /* OSMAJORVERSION > 9 */ -# define USE_PTYS /* use ptys */ -# define USE_TIOCBREAK /* use TIOCBREAK ioctl() */ -# endif /* OSMAJORVERSION > 9 */ -#endif /* HP_ARCHITECTURE */ - #ifdef LINUX_ARCHITECTURE # define USE_TIOCCONS /* use tioccons for -C */ # define HAS_SETEUID /* seteuid available */ diff --git a/cde/lib/DtTerm/TermPrim/TermPrimParser.c b/cde/lib/DtTerm/TermPrim/TermPrimParser.c index 6a953ea0e..2eaa3ce29 100644 --- a/cde/lib/DtTerm/TermPrim/TermPrimParser.c +++ b/cde/lib/DtTerm/TermPrim/TermPrimParser.c @@ -37,12 +37,6 @@ #include "TermPrimParserP.h" #include "TermPrimBuffer.h" -#if defined (__hpux) -/* - * On HP MAXINT is defined in both and - */ -#undef MAXINT -#endif #if defined(CSRG_BASED) #define MAXINT INT_MAX #else diff --git a/cde/lib/DtTerm/TermPrim/TermPrimSetPty.c b/cde/lib/DtTerm/TermPrim/TermPrimSetPty.c index 154d28f3c..97b502046 100644 --- a/cde/lib/DtTerm/TermPrim/TermPrimSetPty.c +++ b/cde/lib/DtTerm/TermPrim/TermPrimSetPty.c @@ -36,19 +36,7 @@ #include "TermPrimDebug.h" #include -#ifdef ALPHA_ARCHITECTURE -#include -#include -#endif /* ALPHA_ARCHITECTURE */ #include -#ifdef USE_PTYS -#ifdef HP_ARCHITECTURE -#include -#endif /* HP_ARCHITECTURE */ -#endif /* USE_PTYS */ -#if defined(HP_ARCHITECTURE) && !(OSMAJORVERSION > 9) -#include -#endif /* defined(HP_ARCHITECTURE) && !(OSMAJORVERSION > 9) */ #if defined (USE_SETCSMAP) #include @@ -571,40 +559,7 @@ _DtTermPrimPtyInit TMODE (XTTYMODE_eof, tio.c_cc[VEOF]); TMODE (XTTYMODE_eol, tio.c_cc[VEOL]); -#if defined(HP_ARCHITECTURE) - TMODE (XTTYMODE_swtch, tio.c_cc[VSWTCH]); - TMODE (XTTYMODE_susp, tio.c_cc[VSUSP]); -#if OSMAJORVERSION > 9 - /* HP-UX 10.0 supports the new, extended c_cc[] array... - */ - TMODE (XTTYMODE_start, tio.c_cc[VSTART]); - TMODE (XTTYMODE_stop, tio.c_cc[VSTOP]); - TMODE (XTTYMODE_dsusp, tio.c_cc[VDSUSP]); -#ifdef NOTDEF - /* the following two parameters are not supported by - * HP-UX 10.0. - */ - TMODE (XTTYMODE_rprnt, tio.c_cc[VREPRINT]); - TMODE (XTTYMODE_flush, tio.c_cc[VDISCARD]); -#endif /* NOTDEF */ - TMODE (XTTYMODE_weras, tio.c_cc[VWERASE]); - TMODE (XTTYMODE_lnext, tio.c_cc[VLNEXT]); -#else /* OSMAJORVERSION > 9 */ - { - /* With HP-UX 9.0 (and earlier) we need to set dsuspc - * via the ltchars array. In addition, we have no support - * for rprnt, flush, weras, and lnext... - */ - struct ltchars ltc; - - if (!ioctl(pty, TIOCGLTC, <c)) { - TMODE (XTTYMODE_dsusp, ltc.t_dsuspc); - (void) ioctl(pty, TIOCSLTC, <c); - } - } -#endif /* OSMAJORVERSION > 9 */ - -#elif defined(IBM_ARCHITECTURE) +#if defined(IBM_ARCHITECTURE) TMODE (XTTYMODE_start, tio.c_cc[VSTRT]); TMODE (XTTYMODE_stop, tio.c_cc[VSTOP]); TMODE (XTTYMODE_susp, tio.c_cc[VSUSP]); @@ -625,15 +580,6 @@ _DtTermPrimPtyInit TMODE (XTTYMODE_weras, tio.c_cc[VWERASE]); TMODE (XTTYMODE_lnext, tio.c_cc[VLNEXT]); -#elif defined(ALPHA_ARCHITECTURE) - TMODE (XTTYMODE_start, tio.c_cc[VSTART]); - TMODE (XTTYMODE_stop, tio.c_cc[VSTOP]); - TMODE (XTTYMODE_susp, tio.c_cc[VSUSP]); - TMODE (XTTYMODE_dsusp, tio.c_cc[VDSUSP]); - TMODE (XTTYMODE_rprnt, tio.c_cc[VREPRINT]); - TMODE (XTTYMODE_flush, tio.c_cc[VDISCARD]); - TMODE (XTTYMODE_weras, tio.c_cc[VWERASE]); - TMODE (XTTYMODE_lnext, tio.c_cc[VLNEXT]); #endif } #undef TMODE diff --git a/cde/lib/DtTerm/TermPrim/TermPrimSetUtmp.c b/cde/lib/DtTerm/TermPrim/TermPrimSetUtmp.c index 49e10bd54..32e576c4c 100644 --- a/cde/lib/DtTerm/TermPrim/TermPrimSetUtmp.c +++ b/cde/lib/DtTerm/TermPrim/TermPrimSetUtmp.c @@ -69,11 +69,6 @@ #define UT_NO_pututline #endif /* sun */ -#ifdef __hpux -#define UT_HOST ut_host -#define UT_ADDR ut_addr -#endif /* __hpux */ - #ifdef __AIX #define UT_HOST ut_host #define UT_NO_pututline @@ -362,24 +357,10 @@ UtmpEntryCreate(Widget w, pid_t pid, char *utmpLine) if (NULL == (utPtr = getutline(&ut))) { /* build a base utmp entry... */ utPtr = &ut; -#ifdef __hpux - if (c = strstr(utmpLine, "tty")) { - c += strlen("tty"); - } else if (c = strstr(utmpLine, "pts")) { - c += strlen("pts"); - } else { - c = utmpLine; - if (strlen(utmpLine) > sizeof(utPtr->ut_id)) { - c += strlen(utmpLine) - sizeof(utPtr->ut_id); - } - } - (void) strncpy(utPtr->ut_id, c, sizeof(utPtr->ut_id)); -#else /* __hpux */ #if defined(__AIX) (void) strncpy(utPtr->ut_id, utmpLine, sizeof(utPtr->ut_id)); -#else /* __AIX */ -#if defined(__linux__) || defined(sun) +#elif defined(__linux__) || defined(sun) if (c = strchr(utmpLine, '/')) { c++; } else { @@ -389,8 +370,6 @@ UtmpEntryCreate(Widget w, pid_t pid, char *utmpLine) #else /* linux || sun */ error out -- missing code for utPtr->ut_id #endif /* sun */ -#endif /* __AIX */ -#endif /* __hpux */ } /* set up the new entry... */ diff --git a/cde/lib/DtTerm/TermPrim/TermPrimSubproc.c b/cde/lib/DtTerm/TermPrim/TermPrimSubproc.c index da6f2b824..a0c1df334 100644 --- a/cde/lib/DtTerm/TermPrim/TermPrimSubproc.c +++ b/cde/lib/DtTerm/TermPrim/TermPrimSubproc.c @@ -32,10 +32,10 @@ #include "TermHeader.h" #include -#if defined(ALPHA_ARCHITECTURE) || defined(CSRG_BASED) || defined(LINUX_ARCHITECTURE) +#if defined(CSRG_BASED) || defined(LINUX_ARCHITECTURE) /* For TIOCSTTY definitions */ #include -#endif /* ALPHA_ARCHITECTURE */ +#endif /* BSD || Linux */ #include #include @@ -301,11 +301,6 @@ _DtTermPrimSubprocExec(Widget w, _Xgetpwparams pw_buf; _Xgetloginparams login_buf; -#ifdef ALPHA_ARCHITECTURE - /* merge code from xterm, ignore so that TIOCSWINSZ doesn't block */ - signal(SIGTTOU, SIG_IGN); -#endif /* ALPHA_ARCHITECTURE */ - /* build a default exec command and argv list if one wasn't supplied... */ /* cmd... */ @@ -456,13 +451,13 @@ _DtTermPrimSubprocExec(Widget w, /* child... */ _DtTermProcessUnlock(); -#if defined(ALPHA_ARCHITECTURE) || defined(CSRG_BASED) || defined(LINUX_ARCHITECTURE) +#if defined(CSRG_BASED) || defined(LINUX_ARCHITECTURE) /* establish a new session for child */ setsid(); #else /* do a setpgrp() so that we can... */ (void) setpgrp(); -#endif /* ALPHA_ARCHITECTURE */ +#endif /* Linux || BSD */ #if defined(LINUX_ARCHITECTURE) /* set the ownership and mode of the pty... */ @@ -477,7 +472,7 @@ _DtTermPrimSubprocExec(Widget w, (void) _exit(1); } -#if defined(ALPHA_ARCHITECTURE) || defined(CSRG_BASED) || defined(LINUX_ARCHITECTURE) +#if defined(CSRG_BASED) || defined(LINUX_ARCHITECTURE) /* BSD needs to do this to acquire pty as controlling terminal */ if (ioctl(pty, TIOCSCTTY, (char *)NULL) < 0) { (void) close(pty); @@ -488,7 +483,7 @@ _DtTermPrimSubprocExec(Widget w, /* Do it when no controlling terminal doesn't work for OSF/1 */ _DtTermPrimPtyGetDefaultModes(); -#endif /* ALPHA_ARCHITECTURE */ +#endif /* Linux || BSD */ #if !defined(LINUX_ARCHITECTURE) /* set the ownership and mode of the pty... */ diff --git a/cde/lib/DtWidget/Editor.c b/cde/lib/DtWidget/Editor.c index 168d95a19..4edb0df76 100644 --- a/cde/lib/DtWidget/Editor.c +++ b/cde/lib/DtWidget/Editor.c @@ -57,9 +57,7 @@ #include #include -#if defined(__hpux) -# include -#elif defined(sun) +#if defined(sun) # if (_XOPEN_VERSION==3) # include # else diff --git a/cde/lib/csa/agent.wrapbegin b/cde/lib/csa/agent.wrapbegin index b263e1784..a72172f49 100644 --- a/cde/lib/csa/agent.wrapbegin +++ b/cde/lib/csa/agent.wrapbegin @@ -1,6 +1,2 @@ #ifndef _AGENTX_H #define _AGENTX_H - -#if defined(HPUX) -#include -#endif /* HPUX */ diff --git a/cde/lib/csa/agent.wrapend b/cde/lib/csa/agent.wrapend index 015de2924..69331c3ca 100644 --- a/cde/lib/csa/agent.wrapend +++ b/cde/lib/csa/agent.wrapend @@ -1,5 +1 @@ -#ifdef HPUX -#undef hpux -#define hpux -#endif #endif diff --git a/cde/lib/csa/cm.h b/cde/lib/csa/cm.h index 4a99849f1..81a593a83 100644 --- a/cde/lib/csa/cm.h +++ b/cde/lib/csa/cm.h @@ -33,7 +33,7 @@ #ifndef SunOS #include -#endif /* HPUX */ +#endif /* Sun */ #include @@ -703,9 +703,4 @@ extern bool_t xdr_cms_delete_args(); } #endif -#ifdef HPUX -#undef hpux -#define hpux #endif -#endif - diff --git a/cde/lib/csa/cmcb.h b/cde/lib/csa/cmcb.h index 91c383f32..efe95d03b 100644 --- a/cde/lib/csa/cmcb.h +++ b/cde/lib/csa/cmcb.h @@ -151,9 +151,4 @@ extern bool_t xdr_cmcb_update_callback_args(); } #endif -#ifdef HPUX -#undef hpux -#define hpux #endif -#endif - diff --git a/cde/lib/csa/connection.c b/cde/lib/csa/connection.c index 91e095daa..baa01c62c 100644 --- a/cde/lib/csa/connection.c +++ b/cde/lib/csa/connection.c @@ -39,9 +39,6 @@ #include #include #include -#ifdef HPUX -#include -#endif #include "connection.h" #include "rtable2.h" #include "rtable3.h" @@ -53,11 +50,7 @@ #include "convert3-4.h" #include "rpccalls.h" -#ifdef HPUX -#define MAX_COUNT 10 -#else #define MAX_COUNT 40 -#endif static struct timeval timeout_tv; static struct timeval retry_tv; @@ -636,17 +629,12 @@ cleanup_some_connection(_DtCm_Client_Info *dontclose) for (ci = client_cache_head; ci != NULL; ) { total++; -#ifdef HPUX - /* clean up whole list */ - if (ci != dontclose && ci->nregistered == 0) { -#else if (ci != dontclose && ci->nregistered == 0 && (ci->tcpcl || (!done && ci->tcpcl == NULL) || (ci->tcpcl==NULL && (time(NULL) - ci->last_used)>DAYSEC))) { if (!done) done = 1; -#endif deleted++; oldci = ci; @@ -829,31 +817,13 @@ get_client_handle( struct timeval tv; enum clnt_stat status; -#ifdef HPUX - static int bumped = 0; - struct rlimit rl; - - if (bumped == 0) { - bumped = 1; - - /* raise the soft limit of number of file descriptor */ - getrlimit(RLIMIT_NOFILE, &rl); - rl.rlim_cur = rl.rlim_max; - setrlimit(RLIMIT_NOFILE, &rl); - } -#endif - tv.tv_sec = 1; tv.tv_usec = 0; *clnt = NULL; for (vers = vers_high; vers >= vers_low; vers--) { -#if defined(__hpux) - if ((cl = clnt_create((char *)host, prognum, vers, nettype)) != NULL) { -#else if ((cl = clnt_create(host, prognum, vers, nettype)) != NULL) { -#endif clnt_control(cl, CLSET_TIMEOUT, (char *)&tv); status = clnt_call(cl, 0, (xdrproc_t) xdr_void, (char *)NULL, (xdrproc_t) xdr_void, diff --git a/cde/lib/csa/libcsa.elist b/cde/lib/csa/libcsa.elist index c43704e99..09fa43b23 100644 --- a/cde/lib/csa/libcsa.elist +++ b/cde/lib/csa/libcsa.elist @@ -536,10 +536,6 @@ internal _DtCm_yylval internal _DtCm_yynerrs internal _DtCm_yytext -#if defined(__hpux) -internal _DtCm_yymaxdepth -#endif - #if defined(sun) internal _DtCm_yy__DtCm_yys internal _DtCm_yy__DtCm_yyv diff --git a/cde/lib/csa/rtable2.h b/cde/lib/csa/rtable2.h index f9cff654f..67f4164a3 100644 --- a/cde/lib/csa/rtable2.h +++ b/cde/lib/csa/rtable2.h @@ -47,7 +47,7 @@ #ifndef SunOS #include -#endif /* HPUX */ +#endif /* Sun */ #include @@ -465,9 +465,4 @@ extern bool_t _DtCm_xdr_Registration_Status_2(); } #endif -#ifdef HPUX -#undef hpux -#define hpux #endif -#endif - diff --git a/cde/lib/csa/rtable3.h b/cde/lib/csa/rtable3.h index 122d96bce..e104f12a9 100644 --- a/cde/lib/csa/rtable3.h +++ b/cde/lib/csa/rtable3.h @@ -46,7 +46,7 @@ #ifndef SunOS #include -#endif /* HPUX */ +#endif /* Sun */ #include @@ -533,9 +533,4 @@ extern bool_t _DtCm_xdr_Registration_Status_3(); } #endif -#ifdef HPUX -#undef hpux -#define hpux #endif -#endif - diff --git a/cde/lib/csa/rtable4.h b/cde/lib/csa/rtable4.h index 502a09334..344bf68b0 100644 --- a/cde/lib/csa/rtable4.h +++ b/cde/lib/csa/rtable4.h @@ -597,9 +597,4 @@ extern bool_t _DtCm_xdr_Registration_Status_4(); } #endif -#ifdef HPUX -#undef hpux -#define hpux #endif -#endif - diff --git a/cde/lib/pam/libpam/pam_framework.c b/cde/lib/pam/libpam/pam_framework.c index 8a20ed2ea..d65f9bf41 100644 --- a/cde/lib/pam/libpam/pam_framework.c +++ b/cde/lib/pam/libpam/pam_framework.c @@ -35,12 +35,6 @@ #include #endif -#ifdef hpV4 -#include -#endif - - - #include #include #include @@ -77,10 +71,6 @@ static int load_modules(pam_handle_t *, int, char *); static void *open_module(char *); static int load_function(void *, char *, int (**func)()); #endif -#ifdef hpV4 -static shl_t open_module(char *); -static int load_function(shl_t, char *, int (**func)()); -#endif /* functions to read and store the pam.conf configuration file */ static int open_pam_conf(struct pam_fh **); @@ -1040,10 +1030,6 @@ load_modules(pam_handle_t *pamh, int type, char *function_name) void *mh; #endif -#ifdef hpV4 - shl_t mh; -#endif - pamtab *pam_entry; struct auth_module *authp; struct account_module *accountp; @@ -1233,20 +1219,12 @@ load_modules(pam_handle_t *pamh, int type, char *function_name) static void * open_module(char *module_so) { -#endif -#ifdef hpV4 -static shl_t -open_module(char *module_so) -{ #endif struct stat stb; char *errmsg; #ifdef sun void *lfd; #endif /* sun */ -#ifdef hpV4 - shl_t lfd; -#endif /* hpV4 */ /* * Stat the file so we can check modes and ownerships @@ -1289,10 +1267,6 @@ open_module(char *module_so) lfd = (void *) dlopen(module_so, RTLD_LAZY); #endif /* sun */ -#ifdef hpV4 - lfd = shl_load(module_so, BIND_DEFERRED, 0L); -#endif /* hpV4 */ - if (lfd == NULL) { if (pam_debug) { errmsg = (char *) strerror(errno); @@ -1313,20 +1287,9 @@ open_module(char *module_so) static int load_function(void *lfd, char *name, int (**func)()) { -#endif -#ifdef hpV4 -static int -load_function(shl_t lfd, char *name, int (**func)()) -{ #endif char *errmsg = NULL; -#ifdef hpV4 -void *proc_addr = NULL; -int stat; - -#endif - if (lfd == NULL) return (PAM_SYMBOL_ERR); @@ -1347,21 +1310,6 @@ int stat; } #endif -#ifdef hpV4 - - stat = shl_findsym(&lfd, name, TYPE_PROCEDURE, proc_addr); - - *func = (int (*)())proc_addr; - - if (stat) { - if (pam_debug) { - strerror_r(errno, errmsg, MAX_ERRMESSAGE_LENGTH); - syslog(LOG_DEBUG, "shl_findsym failed %s: error %s", - name, errmsg != NULL ? errmsg : ""); - } - return (PAM_SYMBOL_ERR); - } -#endif if (pam_debug) { syslog(LOG_DEBUG, "load_function: successful load of %s", name); diff --git a/cde/lib/tt/bin/tt_type_comp/frozen.mp_types_gram.C b/cde/lib/tt/bin/tt_type_comp/frozen.mp_types_gram.C index 6b1ac3653..1b487a910 100644 --- a/cde/lib/tt/bin/tt_type_comp/frozen.mp_types_gram.C +++ b/cde/lib/tt/bin/tt_type_comp/frozen.mp_types_gram.C @@ -84,12 +84,6 @@ typedef union #include -#if defined (__hpux) -/* - * On HP MAXINT is defined in both and - */ -#undef MAXINT -#endif #if defined(CSRG_BASED) #define MAXINT INT_MAX #else diff --git a/cde/lib/tt/bin/ttdbserverd/db_server_svc.C b/cde/lib/tt/bin/ttdbserverd/db_server_svc.C index ab32ee474..3716b737a 100644 --- a/cde/lib/tt/bin/ttdbserverd/db_server_svc.C +++ b/cde/lib/tt/bin/ttdbserverd/db_server_svc.C @@ -214,15 +214,11 @@ main(int argc, char** argv, char **envp) void install_signal_handler(); SVCXPRT *transp; struct sockaddr_in saddr; -#if defined(HPUX) - int asize = sizeof(saddr); -#else # if defined(__linux__) || defined(CSRG_BASED) || defined(sun) socklen_t asize = sizeof(saddr); # else size_t asize = sizeof(saddr); # endif -#endif int is_aix = 0; int do_garbage_collect = 0; diff --git a/cde/lib/tt/lib/db/tt_db_file.h b/cde/lib/tt/lib/db/tt_db_file.h index 4a608f13a..71e7147a1 100644 --- a/cde/lib/tt/lib/db/tt_db_file.h +++ b/cde/lib/tt/lib/db/tt_db_file.h @@ -40,7 +40,7 @@ #include "db/tt_db_hostname_global_map_ref.h" #include "db/tt_db_access_utils.h" #include "db/tt_db_property_utils.h" -#if defined(OPT_BUG_HPUX) || defined(OPT_BUG_AIX) +#if defined(OPT_BUG_AIX) # undef copy #endif diff --git a/cde/lib/tt/lib/libtt.elist b/cde/lib/tt/lib/libtt.elist index a9dbb4420..e2acc245b 100644 --- a/cde/lib/tt/lib/libtt.elist +++ b/cde/lib/tt/lib/libtt.elist @@ -32,26 +32,16 @@ # define size_t unsigned long # define pid_t int # define uid_t unsigned long -#elif defined(hpV4) -# define size_t unsigned int -# define pid_t int -# define uid_t int #else # define size_t unsigned int # define pid_t long # define uid_t long #endif -#if defined(hpV4) -# define xdrproc_t int (*)(...) -#else # define xdrproc_t int (*)(void) -#endif #if defined(_AIX) # define va_list char* -#elif defined(hpV4) -# define va_list double* #else # define va_list void* #endif @@ -830,36 +820,6 @@ privateC++ _Tt_message_list::__vtbl privateC++ _Tt_procid_list::__vtbl #endif -#ifdef hpV4 -/* If debugging is enabled the tt clients require these symbols on HP. */ -privateC++ _Tt_arg::__vtbl -privateC++ _Tt_context::__vtbl -privateC++ _Tt_db_access::__vtbl -privateC++ _Tt_db_client::__vtbl -privateC++ _Tt_db_hostname_redirection_map::__vtbl -privateC++ _Tt_db_key::__vtbl -privateC++ _Tt_db_object::__vtbl -privateC++ _Tt_db_property::__vtbl -privateC++ _Tt_desktop_lock::__vtbl -privateC++ _Tt_file_system_entry::__vtbl -privateC++ _Tt_global::__vtbl -privateC++ _Tt_int_rec::__vtbl -privateC++ _Tt_message::__vtbl -privateC++ _Tt_mp::__vtbl -privateC++ _Tt_msg_context::__vtbl -privateC++ _Tt_object_list::__vtbl -privateC++ _Tt_object_table::__vtbl -privateC++ _Tt_pat_context::__vtbl -privateC++ _Tt_patlist::__vtbl -privateC++ _Tt_pattern::__vtbl -privateC++ _Tt_procid::__vtbl -privateC++ _Tt_session::__vtbl -privateC++ _Tt_session_prop::__vtbl -privateC++ _Tt_string_buf::__vtbl -privateC++ _Tt_string_buf_list::__vtbl -privateC++ _Tt_string_list::__vtbl -#endif - #ifdef OPT_BUG_SUNOS_5 /* This symbol was accidentally exported in libtt.so.1, so preserve */ /* it for backward compatibility. */ diff --git a/cde/lib/tt/lib/mp/mp_session.C b/cde/lib/tt/lib/mp/mp_session.C index 32ef0da85..2f2ebcba7 100644 --- a/cde/lib/tt/lib/mp/mp_session.C +++ b/cde/lib/tt/lib/mp/mp_session.C @@ -149,7 +149,7 @@ c_open_unix_socket(char *socket_name) memset(&server_addr, 0, sizeof(server_addr)); server_addr.sun_family = AF_UNIX; strcpy(server_addr.sun_path, socket_name); -#if defined(_AIX) || defined(hpux) +#if defined(_AIX) int servlen = strlen(server_addr.sun_path) + sizeof(server_addr.sun_fam\ ily); if (connect(sock, (sockaddr *)&server_addr, servlen) < 0) { diff --git a/cde/lib/tt/lib/realpath.c b/cde/lib/tt/lib/realpath.c index f1801df31..cd22ba9d7 100644 --- a/cde/lib/tt/lib/realpath.c +++ b/cde/lib/tt/lib/realpath.c @@ -57,7 +57,7 @@ char *finalpath; strcpy(curpath, pathname); if (*pathname != '/') { -#if defined(__STDC__) && defined(hpux) +#if defined(__STDC__) if (!getcwd(workpath)) { #else if (!getwd(workpath)) { diff --git a/cde/lib/tt/lib/tt_options.h b/cde/lib/tt/lib/tt_options.h index de3a30e23..3af74946a 100644 --- a/cde/lib/tt/lib/tt_options.h +++ b/cde/lib/tt/lib/tt_options.h @@ -71,15 +71,9 @@ * OPT_BUG_SUNOS_5 -- used to flag special hacks only needed because * of bugs or quirks in SunOS 5.x. * - * OPT_BUG_HPUX -- used to flag special hacks only needed because - * of bugs or quirks in HP-UX. - * * OPT_BUG_RPCINTR -- used to flag that RPC_INTR is not defined * in enum clnt_stat. * - * OPT_BUG_SGI -- used to flag special hacks only needed because of - * bugs or quirks in SGI IRIX. - * * OPT_XDR_LONG_TYPE -- used for (64-bit) architectures where * defines x_putlong and x_getlong to not take "long*". * @@ -337,58 +331,6 @@ # undef OPT_GARBAGE_THREADS # endif -#elif defined(sgi) -/* these are probably way obsolete now that irix is svr4 based */ -# define OPT_UNIX_SOCKET_RPC -# undef OPT_TLI -# undef OPT_DLOPEN_X11 -# undef OPT_DLOPEN_CE -# undef OPT_ADDMSG_DIRECT -# undef OPT_SECURE_RPC -# undef OPT_CLASSING_ENGINE -# define OPT_TAR_HAS_EXCLUDE_OPTION - -#elif defined(__hpux) || defined(hpux) - -# undef OPT_UNIX_SOCKET_RPC -# undef OPT_TLI -# undef OPT_DLOPEN_X11 -# undef OPT_DLOPEN_CE -# undef OPT_ADDMSG_DIRECT -# define OPT_BUG_HPUX -# undef OPT_SECURE_RPC -# undef OPT_CLASSING_ENGINE -# undef OPT_BSD_SIGNAL -# define OPT_POSIX_SIGNAL -# undef OPT_BSD_WAIT -# undef OPT_DGETTEXT -# define OPT_CATGETS -# undef OPT_GETDTABLESIZE -# undef OPT_SYSINFO -# define OPT_HAS_REALPATH -# define OPT_AUTOMOUNT_PATH_FIX -/* - * re-define these. HP-UX does not seem to want to wake up a swapped - * process. The timeouts have to be increased so that HP-UX has time - * to swap in ttsession (if it is out). - */ -# undef OPT_PING_TRIES -# define OPT_PING_TRIES 10 -# undef OPT_PING_SLEEP -# define OPT_PING_SLEEP 2 -# if OSMAJORVERSION < 10 -# define OPT_CPP_PATH "/lib/cpp" -# else -# define OPT_CPP_PATH "/opt/langtools/lbin/cpp" -# endif -# define OPT_CPP_OPTIONS "" -# undef OPT_SVR4_GETMNTENT -# undef OPT_LOCKF_MNTENT -# define OPT_LOCAL_MOUNT_TYPE MNTTYPE_HFS -# define OPT_DEFINE_SIG_PF -# undef OPT_TAR_HAS_EXCLUDE_OPTION -# define OPT_BUG_RPCINTR - #elif defined(__linux__) # undef OPT_UNIX_SOCKET_RPC diff --git a/cde/lib/tt/lib/tttk/ttdesktop.C b/cde/lib/tt/lib/tttk/ttdesktop.C index a352cfe74..33752bb2a 100644 --- a/cde/lib/tt/lib/tttk/ttdesktop.C +++ b/cde/lib/tt/lib/tttk/ttdesktop.C @@ -1765,8 +1765,7 @@ _ttdt_posix_cb( tt_message_arg_val_set( msg, 4, names.machine ); // The last 3 are from sysinfo which seems to be SVR4 only. // For platforms without the sysinfo call, we just leave - // the values unset for now, except for the serial - // number which is available from utsname onHPUX. + // the values unset for now #if defined(OPT_SYSINFO) if (sysinfo( SI_ARCHITECTURE, buf, SYS_NMLN ) >= 0) { tt_message_arg_val_set( msg, 5, buf ); @@ -1777,8 +1776,6 @@ _ttdt_posix_cb( if (sysinfo( SI_HW_SERIAL, buf, SYS_NMLN ) >= 0) { tt_message_arg_val_set( msg, 7, buf ); } -#elif defined(__hpux) || defined(hpux) - tt_message_arg_val_set( msg, 7, names.idnumber); #endif tt_message_reply( msg ); tttk_message_destroy( msg ); diff --git a/cde/lib/tt/lib/util/tt_object_list.h b/cde/lib/tt/lib/util/tt_object_list.h index 1e93c7984..25f3cf554 100644 --- a/cde/lib/tt/lib/util/tt_object_list.h +++ b/cde/lib/tt/lib/util/tt_object_list.h @@ -37,7 +37,7 @@ #include #include #include -#if defined(OPT_BUG_HPUX) || defined(OPT_BUG_AIX) +#if defined(OPT_BUG_AIX) # undef remove #endif diff --git a/cde/lib/tt/lib/util/tt_port.C b/cde/lib/tt/lib/util/tt_port.C index 39da7edbc..1544cbea1 100644 --- a/cde/lib/tt/lib/util/tt_port.C +++ b/cde/lib/tt/lib/util/tt_port.C @@ -45,12 +45,6 @@ #include #include #include -#if defined(OPT_BUG_HPUX) && !defined(hpV4) -extern "C" { - int syslog(int priority, const char *message, ...); - int openlog(const char *ident, int logopt, int facility); -} -#endif #if defined(sun) #include #endif @@ -200,15 +194,11 @@ _tt_gethostid(void) sscanf(serial_num, "%12lx", &_hostid); } } -#elif defined(hpux) || defined(_AIX) +#elif defined(_AIX) struct utsname uts_name; uname(&uts_name); -# if defined(_AIX) - _hostid = atol(uts_name.machine); -# else - _hostid = atol(uts_name.idnumber); -# endif + _hostid = atol(uts_name.machine); #else _hostid = gethostid(); #endif @@ -365,7 +355,7 @@ _tt_vsyslog( return; } -#if defined(OPT_BUG_AIX) || defined(OPT_BUG_HPUX) +#if defined(OPT_BUG_AIX) char buf[5000]; vsprintf( buf, _format, args ); syslog( priority, buf ); diff --git a/cde/lib/tt/lib/util/tt_string.h b/cde/lib/tt/lib/util/tt_string.h index 6e7181606..1c9f7b60f 100644 --- a/cde/lib/tt/lib/util/tt_string.h +++ b/cde/lib/tt/lib/util/tt_string.h @@ -44,11 +44,7 @@ #endif #include -#if defined(OPT_BUG_HPUX) -extern "C" { -#include -}; -#elif defined(OPT_BUG_SUNOS_5) +#if defined(OPT_BUG_SUNOS_5) #include #include #elif defined(OPT_BUG_AIX) diff --git a/cde/lib/tt/lib/util/tt_string_match.C b/cde/lib/tt/lib/util/tt_string_match.C index aab8e3a18..8e3a3b5c0 100644 --- a/cde/lib/tt/lib/util/tt_string_match.C +++ b/cde/lib/tt/lib/util/tt_string_match.C @@ -42,12 +42,6 @@ #include "util/tt_assert.h" #include -#if defined (__hpux) -/* - * On HP MAXINT is defined in both and - */ -#undef MAXINT -#endif #if defined(CSRG_BASED) #define MAXINT INT_MAX #else diff --git a/cde/lib/tt/lib/util/tt_tracefile_parse.C b/cde/lib/tt/lib/util/tt_tracefile_parse.C index 8d66ce345..69bea1886 100644 --- a/cde/lib/tt/lib/util/tt_tracefile_parse.C +++ b/cde/lib/tt/lib/util/tt_tracefile_parse.C @@ -41,7 +41,7 @@ #include "util/tt_trace_parser.h" #include "util/tt_entry_pt_names.h" -#if defined (_AIX) || defined(hpux) || defined(__linux__) || defined(CSRG_BASED) +#if defined (_AIX) || defined(__linux__) || defined(CSRG_BASED) #include #endif diff --git a/cde/lib/tt/lib/util/tt_xdr_utils.C b/cde/lib/tt/lib/util/tt_xdr_utils.C index ee6585cfe..d4603c664 100644 --- a/cde/lib/tt/lib/util/tt_xdr_utils.C +++ b/cde/lib/tt/lib/util/tt_xdr_utils.C @@ -113,7 +113,7 @@ _tt_xdr_sizeof(xdrproc_t f, void *data) _Tt_xdr_size_stream:: _Tt_xdr_size_stream() { memset (&ops, 0, sizeof ops); -#if defined(OPT_BUG_SUNOS_4) || defined(OPT_BUG_HPUX) +#if defined(OPT_BUG_SUNOS_4) ops.x_putlong = (int (*)(...))tt_x_putlong; ops.x_putbytes = (int (*)(...))tt_x_putbytes; ops.x_inline = (long *(*)(...))tt_x_inline; diff --git a/cde/lib/tt/slib/mp_s_session.C b/cde/lib/tt/slib/mp_s_session.C index 2adb0b535..0d9450224 100644 --- a/cde/lib/tt/slib/mp_s_session.C +++ b/cde/lib/tt/slib/mp_s_session.C @@ -115,7 +115,7 @@ s_open_unix_socket(char *socket_name) server_addr.sun_family = AF_UNIX; (void)unlink(socket_name); strcpy(server_addr.sun_path, socket_name); -#if defined(_AIX) || defined(hpux) +#if defined(_AIX) int servlen = strlen(server_addr.sun_path) + sizeof(server_addr.sun_fam\ ily); if (bind(sock, (struct sockaddr *)&server_addr,servlen) < 0) { diff --git a/cde/programs/dtaction/Main.c b/cde/programs/dtaction/Main.c index 74b767f78..3d8f676ea 100644 --- a/cde/programs/dtaction/Main.c +++ b/cde/programs/dtaction/Main.c @@ -403,10 +403,7 @@ SetGidUid ( unsigned short rgid, unsigned short ruid ) if(-1 == setregid(rgid, rgid)) { fprintf(stderr, "SetGidUid: setregid failed on %d\n", rgid); } -#elif defined(__hpux) - setresgid(rgid, rgid, rgid); -#else - setregid(rgid, rgid, rgid); + setregid(rgid, rgid); #endif /* fix process uid */ @@ -416,10 +413,7 @@ SetGidUid ( unsigned short rgid, unsigned short ruid ) if(-1 == setreuid(ruid, ruid)) { fprintf(stderr, "SetGidUid: setreuid failed on %d\n", ruid); } -#elif defined(__hpux) - setresuid(ruid, ruid, ruid); -#else - setreuid(ruid, ruid, ruid); + setreuid(ruid, ruid); #endif } @@ -591,13 +585,7 @@ AddSuLog( time_t timenow; struct tm *now; -#ifdef hpV4 /* 10.* versions */ char * SULog = "/var/adm/sulog"; -#elif defined( hpux ) /* 9.* versions */ - char * SULog = "/usr/adm/sulog"; -#else - char * SULog = "/var/adm/sulog"; -#endif if ((f = fopen (SULog, "a")) == NULL) return; diff --git a/cde/programs/dtaction/demo/Makefile.hp b/cde/programs/dtaction/demo/Makefile.hp deleted file mode 100644 index 2ef1e978c..000000000 --- a/cde/programs/dtaction/demo/Makefile.hp +++ /dev/null @@ -1,52 +0,0 @@ -# $XConsortium: Makefile.hp /main/2 1996/05/13 11:29:32 drk $ -########################################################################### -# -# Makefile for dtactiondemo.c -# -# (c) Copyright 1993, 1994 Hewlett-Packard Company -# (c) Copyright 1993, 1994 International Business Machines Corp. -# (c) Copyright 1993, 1994 Sun Microsystems, Inc. -# (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of -# Novell, Inc. -########################################################################### - -#ifndef CDE_INSTALLATION_TOP - CDE_INSTALLATION_TOP = /usr/dt -#endif - -PROGRAM = dtactiondemo -SOURCES = dtactiondemo.c -OBJECTS = dtactiondemo.o - -CFLAGS = +Obb2000 -Aa -OPTIMIZEDFLAGS = -O - -DEFINES = -D_HPUX_SOURCE - -DTINCLUDE = -I$(CDE_INSTALLATION_TOP)/include -XMINCLUDE = -I$(CDE_INSTALLATION_TOP)/include -X11INCLUDE = -I/usr/include/X11R5 -EXTRA_INCLUDES = -INCLUDES = $(DTINCLUDE) $(XMINCLUDE) $(X11INCLUDE) $(EXTRA_INCLUDES) - -DTSVCLIB = -L$(CDE_INSTALLATION_TOP)/lib -lDtSvc -TTLIB = -L$(CDE_INSTALLATION_TOP)/lib -ltt -XMLIB = -L$(CDE_INSTALLATION_TOP)/lib -lXm -XTLIB = -L$(CDE_INSTALLATION_TOP)/lib -lXt -X11LIB = -L/usr/lib/X11R5 -lX11 - -LIBRARIES = $(DTSVCLIB) $(TTLIB) $(XMLIB) $(XTLIB) $(X11LIB) - -LDFLAGS = - -.c.o: - cc -c $(CFLAGS) $(DEFINES) $(OPTIMIZEDFLAGS) $(INCLUDES) $< - -all:: $(PROGRAM) - -$(PROGRAM):: $(OBJECTS) - cc -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES) - -clean:: - rm -f $(PROGRAM) - rm -f $(OBJECTS) diff --git a/cde/programs/dtappbuilder/src/ab/Makefile.am b/cde/programs/dtappbuilder/src/ab/Makefile.am index 0d43ea0cf..e40629c7e 100644 --- a/cde/programs/dtappbuilder/src/ab/Makefile.am +++ b/cde/programs/dtappbuilder/src/ab/Makefile.am @@ -29,7 +29,6 @@ endif AB_MAKEFILES = \ Makefile.aix \ - Makefile.hpux \ Makefile.sunos \ Makefile.linux \ Makefile.freebsd \ diff --git a/cde/programs/dtappbuilder/src/abmf/make_file.c b/cde/programs/dtappbuilder/src/abmf/make_file.c index 3c443b44c..211cebd18 100644 --- a/cde/programs/dtappbuilder/src/abmf/make_file.c +++ b/cde/programs/dtappbuilder/src/abmf/make_file.c @@ -99,7 +99,6 @@ static int write_os_params( AbmfLibs libs ); static int write_aix_stuff(File makeFile, AbmfLibs libs); -static int write_hpux_stuff(File makeFile, AbmfLibs libs); static int write_sunos_params(File makeFile, AbmfLibs libs); static int write_lnx_params(File makeFile, AbmfLibs libs); static int write_fbsd_params(File makeFile, AbmfLibs libs); @@ -107,7 +106,6 @@ static int write_nbsd_params(File makeFile, AbmfLibs libs); static int write_obsd_params(File makeFile, AbmfLibs libs); static int determine_aix_libs(AbmfLibs libs, ABObj project); -static int determine_hpux_libs(AbmfLibs libs, ABObj project); static int determine_sunos_libs(AbmfLibs libs, ABObj project); static int determine_lnx_libs(AbmfLibs libs, ABObj project); static int determine_fbsd_libs(AbmfLibs libs, ABObj project); @@ -196,11 +194,6 @@ determine_libs(AbmfLibs libs, ABObj project, AB_OS_TYPE osType) lib_add(libs, LibICE, ABMF_LIB_APPEND, ABMF_LIB_REJECT_DUP); lib_add(libs, LibSM, ABMF_LIB_APPEND, ABMF_LIB_REJECT_DUP); lib_add(libs, LibXp, ABMF_LIB_APPEND, ABMF_LIB_REJECT_DUP); - - if (osType == AB_OS_HPUX) - { - lib_add(libs, LibTt, ABMF_LIB_APPEND, ABMF_LIB_REJECT_DUP); - } } if (projData->has_terminal) @@ -217,10 +210,6 @@ determine_libs(AbmfLibs libs, ABObj project, AB_OS_TYPE osType) return_value = determine_aix_libs(libs, project); break; - case AB_OS_HPUX: - return_value = determine_hpux_libs(libs, project); - break; - case AB_OS_SUNOS: return_value = determine_sunos_libs(libs, project); break; @@ -247,18 +236,6 @@ determine_aix_libs(AbmfLibs libs, ABObj project) return 0; } - -static int -determine_hpux_libs(AbmfLibs libs, ABObj project) -{ - /* - lib_add(libs, LibWlarchive, ABMF_LIB_PREPEND, ABMF_LIB_REPLACE_DUP); - lib_add(libs, LibWldefault, ABMF_LIB_APPEND, ABMF_LIB_REPLACE_DUP); - */ - return 0; -} - - static int determine_sunos_libs(AbmfLibs libs, ABObj project) { @@ -476,10 +453,6 @@ write_os_params( return_value = write_aix_stuff(makeFile, libs); break; - case AB_OS_HPUX: - return_value = write_hpux_stuff(makeFile, libs); - break; - case AB_OS_SUNOS: return_value = write_sunos_params(makeFile, libs); break; @@ -551,52 +524,6 @@ write_aix_stuff(File makeFile, AbmfLibs libs) } -static int -write_hpux_stuff(File makeFile, AbmfLibs libs) -{ - STRING osName = util_os_type_to_string(AB_OS_HPUX); - - abio_printf(makeFile, -"###########################################################################\n" -"# These are the %s-dependent configuration parameters that must be\n" -"# set in order for any application to build.\n" -"###########################################################################\n", - osName); - - abio_puts(makeFile, "\n"); - abio_puts(makeFile, -" RM = rm -f\n" -" INCLUDES = -I/usr/dt/include -I/X11/include\n" -"\n" -" STD_DEFINES = -DSYSV -DNLS16 -DMALLOC_0_RETURNS_NULL -DMERGE -DNDEBUG" - " -D__hpux -Dhpux -DOSMAJORVERSION=9 -DOSMINORVERSION=0 -DSHMLINK" - " -D__hp9000s800 -Dhp9000s800 -Dhp9000s700 -DHPPEX\n" -" ANSI_DEFINES = -Aa -D_HPUX_SOURCE -DANSICPP\n" -"\n" -" CDEBUGFLAGS = -g -z\n" -" COPTFLAGS = -O -z\n" -" SYS_LIBRARIES = -lm\n" -" CDE_LIBPATH = /usr/dt/lib\n" -" CDE_LDFLAGS = -L$(CDE_LIBPATH)\n" -" ALLX_LIBPATH = /X11/lib\n" -" ALLX_LDFLAGS = -L$(ALLX_LIBPATH)\n" -); - - write_local_libraries(makeFile, libs, AB_OS_HPUX); - - abio_puts(makeFile, -"\n" -" CFLAGS = $(CDEBUGFLAGS) $(INCLUDES) $(STD_DEFINES)" - " $(ANSI_DEFINES)\n" -" LDLIBS = $(SYS_LIBRARIES)\n" -" LDOPTIONS = $(CDE_LDFLAGS) $(ALLX_LDFLAGS)\n" -"\n" -); - - return 0; -} - - static int write_sunos_params(File makeFile, AbmfLibs libs) { @@ -1159,7 +1086,7 @@ write_targets( "\n" "scour:\n" " $(RM) $(CLEAN_FILES) $(TARGETS.h.merged) $(TARGETS.c.merged) \\\n" -" Makefile Makefile.aix Makefile.hpux Makefile.sunos \\\n" +" Makefile Makefile.aix Makefile.sunos \\\n" " Makefile.linux \\\n" " Makefile.freebsd Makefile.netbsd Makefile.openbsd\n" ); diff --git a/cde/programs/dtappbuilder/src/include/ab_private/util.h b/cde/programs/dtappbuilder/src/include/ab_private/util.h index aceedbd00..a67dd3af2 100644 --- a/cde/programs/dtappbuilder/src/include/ab_private/util.h +++ b/cde/programs/dtappbuilder/src/include/ab_private/util.h @@ -78,7 +78,6 @@ extern char *strdup(const char *); typedef enum { AB_OS_UNDEF = 0, - AB_OS_HPUX, AB_OS_AIX, AB_OS_SUNOS, AB_OS_LNX, diff --git a/cde/programs/dtappbuilder/src/libABil/Makefile.am b/cde/programs/dtappbuilder/src/libABil/Makefile.am index 1fc2ab05e..a9873fcaf 100644 --- a/cde/programs/dtappbuilder/src/libABil/Makefile.am +++ b/cde/programs/dtappbuilder/src/libABil/Makefile.am @@ -8,10 +8,6 @@ BUILT_SOURCES = bil_parse.h bil_parse.c CLEANFILES = bil_parse.h bil_parse.c AM_YFLAGS = -d -if HPUX -CCOPTIONS = -Ae -endif - noinst_LIBRARIES = libABil.a #noinst_PROGRAMS = bil_test diff --git a/cde/programs/dtappbuilder/src/libABobjXm/Makefile.am b/cde/programs/dtappbuilder/src/libABobjXm/Makefile.am index 2e15f3c2e..ed0151061 100644 --- a/cde/programs/dtappbuilder/src/libABobjXm/Makefile.am +++ b/cde/programs/dtappbuilder/src/libABobjXm/Makefile.am @@ -4,10 +4,6 @@ ABINCLUDES = ../include EXTRA_DEFINES = -D_POSIX_SOURCE=1 -if HPUX -CCOPTIONS = -Ae -endif - noinst_LIBRARIES = libABobjXm.a libABobjXm_a_CFLAGS = $(EXTRA_DEFINES) -I$(ABINCLUDES) diff --git a/cde/programs/dtappbuilder/src/libAButil/Makefile.am b/cde/programs/dtappbuilder/src/libAButil/Makefile.am index 71dae306b..d683a00e8 100644 --- a/cde/programs/dtappbuilder/src/libAButil/Makefile.am +++ b/cde/programs/dtappbuilder/src/libAButil/Makefile.am @@ -4,10 +4,6 @@ ABINCLUDES = ../include EXTRA_DEFINES = -D_POSIX_SOURCE=1 -if HPUX -CCOPTIONS = -Ae -endif - noinst_LIBRARIES = libAButil.a #noinst_PROGRAMS = util_test istr_test diff --git a/cde/programs/dtappbuilder/src/libAButil/util.c b/cde/programs/dtappbuilder/src/libAButil/util.c index b7e62c336..f4e4f12f3 100644 --- a/cde/programs/dtappbuilder/src/libAButil/util.c +++ b/cde/programs/dtappbuilder/src/libAButil/util.c @@ -233,7 +233,7 @@ util_vfork(void) #ifdef __cplusplus extern "C" { #endif -#if defined(__hpux) || (defined(sun) && OSMAJORVERSION >= 5 && OSMINORVERSION >= 4 && OSMINORVERSION <=10 ) +#if (defined(sun) && OSMAJORVERSION >= 5 && OSMINORVERSION >= 4 && OSMINORVERSION <=10 ) extern int putenv(const char *string); #elif !(defined(__aix) || defined(__NetBSD__)) extern int putenv(char *string); @@ -258,7 +258,6 @@ util_get_os_type(void) int rc = 0; /* return code */ struct utsname sysInfo; int aixIndex = -1; - int hpIndex = -1; int sunIndex = -1; int lnxIndex = -1; int fbsdIndex = -1; @@ -275,7 +274,6 @@ util_get_os_type(void) } aixIndex = util_strcasestr(sysInfo.sysname, "aix"); - hpIndex = util_strcasestr(sysInfo.sysname, "hp"); sunIndex = util_strcasestr(sysInfo.sysname, "sun"); lnxIndex = util_strcasestr(sysInfo.sysname, "linux"); fbsdIndex = util_strcasestr(sysInfo.sysname, "freebsd"); @@ -283,49 +281,36 @@ util_get_os_type(void) obsdIndex = util_strcasestr(sysInfo.sysname, "openbsd"); if (aixIndex < 0) aixIndex = INT_MAX; - if (hpIndex < 0) hpIndex = INT_MAX; if (sunIndex < 0) sunIndex = INT_MAX; if (lnxIndex < 0) lnxIndex = INT_MAX; if (fbsdIndex < 0) fbsdIndex = INT_MAX; if (nbsdIndex < 0) nbsdIndex = INT_MAX; if (obsdIndex < 0) obsdIndex = INT_MAX; -#define IS_MATCH(a,b,c,d,e,f,g) \ - (((a) < (b)) && ((a) < (c)) && ((a) < (d)) && ((a) < (e)) && ((a) < (f)) && \ - ((a) < (g))) +#define IS_MATCH(a,b,c,d,e,f) \ + (((a) < (b)) && ((a) < (c)) && ((a) < (d)) && ((a) < (e)) && ((a) < (f))) - if (IS_MATCH(aixIndex, hpIndex, sunIndex, lnxIndex, fbsdIndex, nbsdIndex, - obsdIndex)) + if (IS_MATCH(aixIndex, sunIndex, lnxIndex, fbsdIndex, nbsdIndex, obsdIndex)) { return AB_OS_AIX; } - if (IS_MATCH(hpIndex, aixIndex, sunIndex, lnxIndex, fbsdIndex, nbsdIndex, - obsdIndex)) - { - return AB_OS_HPUX; - } - if (IS_MATCH(sunIndex, aixIndex, hpIndex, lnxIndex, fbsdIndex, nbsdIndex, - obsdIndex)) + if (IS_MATCH(sunIndex, aixIndex, lnxIndex, fbsdIndex, nbsdIndex, obsdIndex)) { return AB_OS_SUNOS; } - if (IS_MATCH(lnxIndex, aixIndex, hpIndex, sunIndex, fbsdIndex, nbsdIndex, - obsdIndex)) + if (IS_MATCH(lnxIndex, aixIndex, sunIndex, fbsdIndex, nbsdIndex, obsdIndex)) { return AB_OS_LNX; } - if (IS_MATCH(fbsdIndex, aixIndex, hpIndex, sunIndex, lnxIndex, nbsdIndex, - obsdIndex)) + if (IS_MATCH(fbsdIndex, aixIndex, sunIndex, lnxIndex, nbsdIndex, obsdIndex)) { return AB_OS_FBSD; } - if (IS_MATCH(nbsdIndex, aixIndex, hpIndex, sunIndex, lnxIndex, fbsdIndex, - obsdIndex)) + if (IS_MATCH(nbsdIndex, aixIndex, sunIndex, lnxIndex, fbsdIndex, obsdIndex)) { return AB_OS_NBSD; } - if (IS_MATCH(obsdIndex, aixIndex, hpIndex, sunIndex, lnxIndex, fbsdIndex, - nbsdIndex)) + if (IS_MATCH(obsdIndex, aixIndex, sunIndex, lnxIndex, fbsdIndex, nbsdIndex)) { return AB_OS_OBSD; } diff --git a/cde/programs/dtappbuilder/src/libAButil/util_convert.c b/cde/programs/dtappbuilder/src/libAButil/util_convert.c index c319d39b5..3b7622748 100644 --- a/cde/programs/dtappbuilder/src/libAButil/util_convert.c +++ b/cde/programs/dtappbuilder/src/libAButil/util_convert.c @@ -852,7 +852,6 @@ util_os_type_to_ident(AB_OS_TYPE osType) switch (osType) { case AB_OS_AIX: typeString = "aix"; break; - case AB_OS_HPUX: typeString = "hpux"; break; case AB_OS_SUNOS: typeString = "sunos"; break; case AB_OS_LNX: typeString = "linux"; break; case AB_OS_FBSD: typeString = "freebsd"; break; @@ -875,7 +874,6 @@ util_os_type_to_string(AB_OS_TYPE osType) switch (osType) { case AB_OS_AIX: nameString = "AIX"; break; - case AB_OS_HPUX: nameString = "HP-UX"; break; case AB_OS_SUNOS: nameString = "SunOS"; break; case AB_OS_LNX: nameString = "Linux"; break; case AB_OS_FBSD: nameString = "FreeBSD"; break; diff --git a/cde/programs/dtcalc/calctool.h b/cde/programs/dtcalc/calctool.h index 3377e9f47..e5b7fa66d 100644 --- a/cde/programs/dtcalc/calctool.h +++ b/cde/programs/dtcalc/calctool.h @@ -91,16 +91,6 @@ extern char *_DtGetMessage(char *filename, int set, int n, char *s); #endif #endif /* sun */ -#ifdef hpux -#define HIL_PC101_KBD 1 -#define HIL_ITF_KBD 2 -#define SERIAL_PC101_KBD 3 -#define FIRST_HIL_KBD 0xC0 -#define LAST_HIL_KBD 0xDF -#define LED_BITS 0x30 -#define PS2_DIN_NAME "PS2_DIN_KEYBOARD" -#endif - #include #define MEM 1 @@ -535,9 +525,6 @@ struct calcVars { /* Calctool variables and options. */ int funstate ; /* whether the last key pressed was a fin. func. key*/ int defState ; /* Set when calculator has just been cleared */ -#ifdef hpux - int keybdID; -#endif }; extern struct calcVars CalcVars; diff --git a/cde/programs/dtcalc/text.c b/cde/programs/dtcalc/text.c index fb88666c2..b2ab0c717 100644 --- a/cde/programs/dtcalc/text.c +++ b/cde/programs/dtcalc/text.c @@ -310,14 +310,7 @@ init_text(void) /* Setup text strings depending upon language. */ get_key_val(&buttons[i++].value, LGET(GETMESSAGE(3, 467, "\010"))) ; /* del */ -#ifdef hpux - if(v->keybdID == HIL_ITF_KBD) - get_key_val(&buttons[i++].value, LGET(GETMESSAGE(3, 513, "\013"))) ; - else - get_key_val(&buttons[i++].value, LGET(GETMESSAGE(3, 468, "\177"))) ; -#else get_key_val(&buttons[i++].value, LGET(GETMESSAGE(3, 468, "\177"))) ; -#endif get_key_val(&buttons[i++].value, LGET(GETMESSAGE(3, 469, "d"))) ; diff --git a/cde/programs/dtcm/server/log.c b/cde/programs/dtcm/server/log.c index 4ccd39250..9d963dbb7 100644 --- a/cde/programs/dtcm/server/log.c +++ b/cde/programs/dtcm/server/log.c @@ -734,13 +734,9 @@ _DtCmsSetFileMode( if (changeeuid == B_TRUE) { #ifndef AIX -#ifdef HPUX - setuid (0); -#else if(-1 == seteuid (0)) { perror(strerror(errno)); } -#endif #endif } @@ -767,11 +763,7 @@ _DtCmsSetFileMode( } #ifndef AIX -#ifdef HPUX - if (changeeuid == B_TRUE && setuid (daemon_uid) < 0) -#else if (changeeuid == B_TRUE && seteuid (daemon_uid) < 0) -#endif { if (printerr == B_TRUE) { error = errno; diff --git a/cde/programs/dtcm/server/svcmain.c b/cde/programs/dtcm/server/svcmain.c index 7c8f796c1..8cdb9d2ac 100644 --- a/cde/programs/dtcm/server/svcmain.c +++ b/cde/programs/dtcm/server/svcmain.c @@ -688,14 +688,12 @@ main(int argc, char **argv) /* don't register unsupported versions: */ if (ph->prog[version].nproc == 0) continue; -#ifndef HPUX if (standalone) -#endif (void) pmap_unset(ph->program_num, version); if (udp_transp == (SVCXPRT *)-1) { udp_transp = svcudp_create(standalone ? RPC_ANYSOCK : 0 -#if defined(_AIX) || defined(hpV4) || defined(__linux__) || defined(CSRG_BASED) +#if defined(_AIX) || defined(__linux__) || defined(CSRG_BASED) ); #else ,0,0); @@ -707,13 +705,8 @@ main(int argc, char **argv) } } -#ifndef HPUX if (!svc_register(udp_transp, ph->program_num, version, program, standalone ? IPPROTO_UDP : 0)) { -#else - if (!svc_register(udp_transp, ph->program_num, version, program, - IPPROTO_UDP)) { -#endif (void)fprintf(stderr, "rtable_main.c: unable to register"); exit(1); } @@ -742,17 +735,12 @@ main(int argc, char **argv) #endif /* SunOS */ #ifndef AIX -#ifdef HPUX - setgid (daemon_gid); - setuid (daemon_uid); -#else if(-1 == setegid (daemon_gid)) { perror(strerror(errno)); } if(-1 == seteuid (daemon_uid)) { perror(strerror(errno)); } -#endif /* HPUX */ #endif /* AIX */ init_time(); diff --git a/cde/programs/dtdocbook/instant/main.c b/cde/programs/dtdocbook/instant/main.c index 65d2678a2..20e089f69 100644 --- a/cde/programs/dtdocbook/instant/main.c +++ b/cde/programs/dtdocbook/instant/main.c @@ -309,9 +309,6 @@ Initialize1( time_t tnow; struct tm *nowtm; char *cp, buf[100]; -#if HPUX - extern int gethostname(char *, int); /* not in a system .h file... */ -#endif /* where we try to find data/library files */ if (!(tpt_lib=getenv(TPT_LIB))) tpt_lib = DEF_TPT_LIB; @@ -330,11 +327,7 @@ Initialize1( nowtm = localtime(&tnow); strftime(buf, 100, "%a %d %b %Y, %R", nowtm); SetMappingNV(Variables, "date", buf); -#if HPUX - if (gethostname(buf, 100) < 0) strcpy(buf, "unknown-host"); -#else strcpy(buf, "unknown-host"); -#endif SetMappingNV(Variables, "host", buf); SetMappingNV(Variables, "transpec", tranfile ? tranfile : "??"); } diff --git a/cde/programs/dtexec/osdep.h b/cde/programs/dtexec/osdep.h index 6aed26d92..767799a73 100644 --- a/cde/programs/dtexec/osdep.h +++ b/cde/programs/dtexec/osdep.h @@ -43,12 +43,8 @@ #include #include -#ifndef __hpux # include # define FD_SET_CAST(x) (x) -#else -# define FD_SET_CAST(x) ((int *)(x)) -#endif #ifndef OPEN_MAX # define OPEN_MAX 128 diff --git a/cde/programs/dtfile/ChangeDir.c b/cde/programs/dtfile/ChangeDir.c index c8d8eee15..6d4c438fd 100644 --- a/cde/programs/dtfile/ChangeDir.c +++ b/cde/programs/dtfile/ChangeDir.c @@ -62,10 +62,6 @@ #include #include -#ifdef __hpux -#include -#endif - #include #include diff --git a/cde/programs/dtfile/File.c b/cde/programs/dtfile/File.c index 87f0be00e..b740d8c13 100644 --- a/cde/programs/dtfile/File.c +++ b/cde/programs/dtfile/File.c @@ -484,24 +484,14 @@ StrcollProc GetStrcollProc(void) { int Clang = 0; -#if defined(__hpux) - struct locale_data * li; -#else char * locale; -#endif #define C_LANG "C" /* if locale is C, use the explicit case insensitive compare */ -#if defined(__hpux) - li = getlocale(LOCALE_STATUS); - if ( NULL == li->LC_COLLATE_D || strcmp(C_LANG,li->LC_COLLATE_D) == 0 ) - Clang = 1; -#else locale = setlocale(LC_COLLATE,NULL); /* put locale in buf */ if (strcmp(locale,C_LANG) == 0) Clang = 1; -#endif if (Clang) return StrCaseCmp; diff --git a/cde/programs/dtfile/FileDialog.c b/cde/programs/dtfile/FileDialog.c index 497b03415..29b0d7ba1 100644 --- a/cde/programs/dtfile/FileDialog.c +++ b/cde/programs/dtfile/FileDialog.c @@ -59,7 +59,7 @@ #include #include -#if defined(_AIX) || defined(hpux) +#if defined(_AIX) #include #else #ifndef MAXNAMLEN diff --git a/cde/programs/dtfile/FileManip.c b/cde/programs/dtfile/FileManip.c index 4500b0a99..2741cc368 100644 --- a/cde/programs/dtfile/FileManip.c +++ b/cde/programs/dtfile/FileManip.c @@ -954,7 +954,7 @@ FileManip( #else #if defined(SVR4) || defined(_AIX) ((s3.st_mode & S_IFMT) == S_IFDIR) ) /* if is a directory */ -#else /* (__hpux) */ +#else (((s3.st_mode & S_IFMT) == S_IFDIR) /* if is a directory */ || ((s3.st_mode & S_IFMT) == S_IFNWK)) ) /* or a net special */ #endif diff --git a/cde/programs/dtfile/FileOp.c b/cde/programs/dtfile/FileOp.c index 67afc0def..dce79f5c4 100644 --- a/cde/programs/dtfile/FileOp.c +++ b/cde/programs/dtfile/FileOp.c @@ -84,7 +84,7 @@ #include #endif -#if defined(_AIX)|| defined(hpux) +#if defined(_AIX) #include #else #ifndef MAXNAMLEN @@ -2287,11 +2287,7 @@ _FileMoveCopy( /* do the select */ FD_SET(fd, &select_fds); -#if defined(__hpux) && (OSMAJORVERSION <= 10) && (OSMINORVERSION < 2) - rc = select(fd + 1, (int *)&select_fds, NULL, NULL, &select_timeout); -#else rc = select(fd + 1, &select_fds, NULL, NULL, &select_timeout); -#endif if (rc < 0 && errno != EINTR) { perror("select failed in FileMoveCopy"); diff --git a/cde/programs/dtfile/Find.c b/cde/programs/dtfile/Find.c index 8688f500d..e599cfad9 100644 --- a/cde/programs/dtfile/Find.c +++ b/cde/programs/dtfile/Find.c @@ -84,9 +84,6 @@ #include -#ifdef __hpux -#include -#endif /* __hpux */ #include #include @@ -159,9 +156,9 @@ static char * PRINT_OPTION = " -print "; static char * FIND_COMMAND = "find "; static char * GREP_COMMAND = "grep -i -l "; static char * NAME_OPTION = " -name "; -#if defined(__hpux) || defined(sun) +#if defined(sun) static char * FOLLOW_OPTION = " -follow"; -#endif /* __hpux */ +#endif /* sun */ static char * REDIRECTOR = " 2>&-"; static char * TYPEDIR = " -type d"; static char * FIND_FILE = "FindFile"; @@ -368,7 +365,7 @@ Create( Widget newFM, outputSeparator; Widget headLabel, contentLabel, contentText; Widget filterText, filterLabel, listLabel, scrolledList, dirName, dirLabel; -#if defined(__hpux) || defined(sun) +#if defined(sun) Widget followLink, followLinkPD; #endif Widget putOnDT, separator; @@ -487,7 +484,7 @@ Create( XtAddCallback(contentText, XmNhelpCallback, (XtCallbackProc)HelpRequestCB, HELP_FIND_DIALOG_STR); -#if defined(__hpux) || defined(sun) +#if defined(sun) n = 0; XtSetArg (args[n], XmNmarginWidth, 1); n++; XtSetArg (args[n], XmNmarginHeight, 1); n++; @@ -543,7 +540,7 @@ Create( XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; XtSetArg (args[n], XmNrightAttachment, XmATTACH_FORM); n++; XtSetArg (args[n], XmNtopAttachment, XmATTACH_WIDGET); n++; -#if defined(__hpux) || defined(sun) +#if defined(sun) XtSetArg (args[n], XmNtopWidget, form1); n++; #else XtSetArg (args[n], XmNtopWidget, contentText); n++; @@ -797,7 +794,7 @@ Create( find_rec->form = form; find_rec->fileNameFilter = filterText; find_rec->content = contentText; -#if defined(__hpux) || defined(sun) +#if defined(sun) find_rec->followLink = followLink; #else find_rec->followLink = NULL; @@ -979,7 +976,7 @@ GetDefaultValues( void ) find_data->matches = NULL; find_data->num_matches = 0; find_data->selected_item = -1; -#if defined(__hpux) || defined(sun) +#if defined(sun) find_data->follow_links = follow_links; #endif @@ -1108,7 +1105,7 @@ SetValues( XtSetValues (find_rec->matchList, args, 1); } -#if defined(__hpux) || defined(sun) +#if defined(sun) /* Set up the Follow links option menu */ if(find_data->follow_links) XtSetArg(args[0], XmNmenuHistory, find_rec->widgArry[ON]); @@ -1295,7 +1292,7 @@ GetFindValues( } } -#if defined(__hpux) || defined(sun) +#if defined(sun) { Widget menuHistory; @@ -1883,7 +1880,7 @@ ExecuteFind( } -#if defined(__hpux) || defined(sun) +#if defined(sun) { Widget menuHistory; diff --git a/cde/programs/dtfile/Find.h b/cde/programs/dtfile/Find.h index c6b468b7e..e9cb10fda 100644 --- a/cde/programs/dtfile/Find.h +++ b/cde/programs/dtfile/Find.h @@ -57,7 +57,7 @@ typedef struct Dimension width; Dimension height; -#if defined(__hpux) || defined(sun) +#if defined(sun) Boolean follow_links; #endif String directories; diff --git a/cde/programs/dtfile/FindP.c b/cde/programs/dtfile/FindP.c index dd23bab2f..fc39634a1 100644 --- a/cde/programs/dtfile/FindP.c +++ b/cde/programs/dtfile/FindP.c @@ -197,7 +197,7 @@ ShowFindDialog( XtFree(tempStr); file_mgr_rec->findBtn_child=find_rec->shell; -#if defined(__hpux) || defined(sun) +#if defined(sun) if(file_mgr_data->toolbox) { XtSetArg (args[0], XmNmenuHistory, find_rec->widgArry[ON]); diff --git a/cde/programs/dtfile/Main.c b/cde/programs/dtfile/Main.c index e52f36c08..328ed85b9 100644 --- a/cde/programs/dtfile/Main.c +++ b/cde/programs/dtfile/Main.c @@ -263,7 +263,7 @@ typedef struct Boolean restrictMode; int desktopPlacement; Boolean freezeOnConfig; -#if defined(__hpux) || defined(sun) +#if defined(sun) Boolean follow_links; #endif char * fileMgrIcon; @@ -590,7 +590,7 @@ int checkBrokenLink; int trashWait; int desktopPlacement; Boolean freezeOnConfig; -#if defined(__hpux) || defined(sun) +#if defined(sun) Boolean follow_links; #endif int treeType; @@ -949,7 +949,7 @@ static XtResource resources[] = (XtPointer)False, }, -#if defined(__hpux) || defined(sun) +#if defined(sun) { "followLinks", "FollowLinks", XmRBoolean, sizeof(Boolean), XtOffset(ApplicationArgsPtr, follow_links), XmRImmediate, (XtPointer) False, @@ -1459,7 +1459,7 @@ _DtPerfChkpntMsgSend("Begin XtInitialize"); desktopPlacement = application_args.desktopPlacement; freezeOnConfig = application_args.freezeOnConfig; emptyTrashOnExit = application_args.emptyTrashOnExit; -#if defined(__hpux) || defined(sun) +#if defined(sun) follow_links = application_args.follow_links; #endif instanceWidth = application_args.instanceIconWidth; diff --git a/cde/programs/dtfile/Main.h b/cde/programs/dtfile/Main.h index 0fb5ed8ab..07ca2b97a 100644 --- a/cde/programs/dtfile/Main.h +++ b/cde/programs/dtfile/Main.h @@ -289,7 +289,7 @@ extern char *fileMgrTitle; extern char *fileMgrHelpVol; extern int desktopIconType; extern Boolean freezeOnConfig; -#if defined(__hpux) || defined(sun) +#if defined(sun) extern Boolean follow_links; #endif extern int maxDirectoryProcesses; diff --git a/cde/programs/dtfile/MkDir.c b/cde/programs/dtfile/MkDir.c index 9299f25ae..a7fb51710 100644 --- a/cde/programs/dtfile/MkDir.c +++ b/cde/programs/dtfile/MkDir.c @@ -51,9 +51,6 @@ #include #include -#ifdef __hpux -#include -#endif #include diff --git a/cde/programs/dtfile/dtfile.msg b/cde/programs/dtfile/dtfile.msg index cac72d0c1..04edf36cb 100644 --- a/cde/programs/dtfile/dtfile.msg +++ b/cde/programs/dtfile/dtfile.msg @@ -808,11 +808,6 @@ The selected file no longer exists. 31 File or Folder Name: 32 File Contents: -$ Messages 33-35 are used on hpux systems -33 On -34 Off -35 Follow Links: - 36 Open New View 37 Put In Workspace 38 Files Found (by Contents): diff --git a/cde/programs/dtfile/fsDialog.c b/cde/programs/dtfile/fsDialog.c index 9817fd3ca..a5f78e4d9 100644 --- a/cde/programs/dtfile/fsDialog.c +++ b/cde/programs/dtfile/fsDialog.c @@ -111,10 +111,6 @@ #include #endif -#ifdef __hpux -#include -#endif - /*---------------------- * global variables *----------------------*/ @@ -259,17 +255,6 @@ static void getFSType(const String path, strncpy(fsType,"",MAXLINELENGTH); #endif /* sun */ -#ifdef __hpux -#define GETFSTYPE - struct statfs buf; - - strncpy(platform,"hpux",MAXLINELENGTH); - if (statfs(path, &buf) == 0) - sprintf(fsType,"%li",buf.f_fsid[1]); - else - strncpy(fsType,"",MAXLINELENGTH); -#endif /* __hpux */ - #ifndef GETFSTYPE strncpy(platform,"unknown",MAXLINELENGTH); strncpy(fsType, "",MAXLINELENGTH); @@ -306,7 +291,6 @@ static void getFSType(const String path, * * sample dtfs configuration file * * aix:4=afs - * hpux:8=afs * sunos:nfs=nfs * end * @@ -459,7 +443,7 @@ configFileName(void) * get the file-system identifier from the configuration file * * fptr refers to an open configuration file - * fsType and platform identify the platfrom (aix, hpux, sunos, etc) + * fsType and platform identify the platfrom (aix, sunos, etc) * and file-system type (afs, nfs, dfs, etc.) * fsID is filled by matching platform:fsType with with information in the * file and reading the id; the string comparisons are case insensitive diff --git a/cde/programs/dthelp/dthelpgen/helpgen.c b/cde/programs/dthelp/dthelpgen/helpgen.c index 84ad947e8..665848ab0 100644 --- a/cde/programs/dthelp/dthelpgen/helpgen.c +++ b/cde/programs/dthelp/dthelpgen/helpgen.c @@ -1317,11 +1317,7 @@ main( * telling the user that we're building help browser * information. */ -#ifdef __hpux - childPid = vfork(); -#else childPid = fork(); -#endif /* * if this is the child, exec the dthelpgen.ds script. */ diff --git a/cde/programs/dthelp/parser/canon1/helptag/global.h b/cde/programs/dthelp/parser/canon1/helptag/global.h index 3e8ed60e6..482307f02 100644 --- a/cde/programs/dthelp/parser/canon1/helptag/global.h +++ b/cde/programs/dthelp/parser/canon1/helptag/global.h @@ -38,7 +38,7 @@ #include #include -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) +#if defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) #include #include #include @@ -170,14 +170,14 @@ struct search { EXTERN SEARCH *path INIT(NULL) ; EXTERN SEARCH **endpath INIT(&path) ; EXTERN char dirsep -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) +#if defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) INIT('/') #else ****define directory separator here**** #endif ; -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) +#if defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) #define CSEP '/' #define SSEP "/" #else diff --git a/cde/programs/dthelp/parser/canon1/helptag/help.c b/cde/programs/dthelp/parser/canon1/helptag/help.c index d8652b757..ed96d7c76 100644 --- a/cde/programs/dthelp/parser/canon1/helptag/help.c +++ b/cde/programs/dthelp/parser/canon1/helptag/help.c @@ -349,7 +349,7 @@ m_free(string, "GetDefaultHeaderString return"); /* construct a qualified file name */ static int mb_getqualified(char *qualname, char *unqualname) { -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) +#if defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) FILE *f; #endif @@ -374,7 +374,7 @@ else fnp = fn; -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) +#if defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) qualname[0] = '\0'; gp = qualname + strlen(qualname); roomleft = roomleft - strlen(qualname); @@ -488,7 +488,7 @@ do { while (1); *strrchr(qualname, CSEP) = '\0'; -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) +#if defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) #else strupr ( qualname ); #endif diff --git a/cde/programs/dthelp/parser/canon1/helptag/help.if b/cde/programs/dthelp/parser/canon1/helptag/help.if index 6c856cfb7..1e31834b0 100644 --- a/cde/programs/dthelp/parser/canon1/helptag/help.if +++ b/cde/programs/dthelp/parser/canon1/helptag/help.if @@ -144,17 +144,6 @@ -#if defined(hpux) - { - M_WCHAR *wc_1, *wc_2; - - wc_1 = MakeWideCharString("HPUX"); - wc_2 = MakeWideCharString("m-machine"); - m_piaction(wc_1, wc_2, M_SDATA) ; - m_free(wc_1,"wide character string"); - m_free(wc_2,"wide character string"); - } -#else #if defined(_AIX) { M_WCHAR *wc_1, *wc_2; @@ -165,8 +154,7 @@ m_free(wc_1,"wide character string"); m_free(wc_2,"wide character string"); } -#else -#if defined(sun) +#elif defined(sun) { M_WCHAR *wc_1, *wc_2; @@ -180,8 +168,6 @@ m_piaction("UNDEFINED MACHINE", "m-machine", M_SDATA) ; -#endif -#endif #endif diff --git a/cde/programs/dthelp/parser/canon1/helptag/make.c b/cde/programs/dthelp/parser/canon1/helptag/make.c index 5c6ab8ef0..dbda7cfd7 100644 --- a/cde/programs/dthelp/parser/canon1/helptag/make.c +++ b/cde/programs/dthelp/parser/canon1/helptag/make.c @@ -31,14 +31,14 @@ or invoke function pointers should be in tex.c. */ -#if defined(hpux) || defined(_AIX) || defined(sun) +#if defined(_AIX) || defined(sun) #include #include #endif #include -#if defined(hpux) || defined(_AIX) || defined(sun) +#if defined(_AIX) || defined(sun) #undef M_PI /* M_PI is used by markup, we don't need the math PI */ #endif diff --git a/cde/programs/dthelp/parser/canon1/helptag/option.c b/cde/programs/dthelp/parser/canon1/helptag/option.c index f3c49192b..513c512b4 100644 --- a/cde/programs/dthelp/parser/canon1/helptag/option.c +++ b/cde/programs/dthelp/parser/canon1/helptag/option.c @@ -26,7 +26,7 @@ #include "userinc.h" #include "globdec.h" -#if defined(hpux) || defined(_AIX) || defined(sun) +#if defined(_AIX) || defined(sun) /* get definition of getenv(3c) for getting of environment variables */ #include #endif @@ -59,7 +59,7 @@ if (optfile = fopen(nameofoptfile, "r")) } m_free(nameofoptfile, "installation helptag.opt"); -#if defined(hpux) || defined(_AIX) || defined(sun) +#if defined(_AIX) || defined(sun) { char *opts; @@ -76,7 +76,7 @@ if (opts) } } } -#endif /* hpux or _AIX or sun */ +#endif /* _AIX or sun */ /* Check helptag.opt in input directory */ if (indir) diff --git a/cde/programs/dthelp/parser/canon1/parser/parser.c b/cde/programs/dthelp/parser/canon1/parser/parser.c index 130716661..0bd301160 100644 --- a/cde/programs/dthelp/parser/canon1/parser/parser.c +++ b/cde/programs/dthelp/parser/canon1/parser/parser.c @@ -90,7 +90,7 @@ static char sopt[] = static char name[] = "m_name = '%s'\n" ; static char literal[] = "m_literal = '%s'\n" ; -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) +#if defined(_AIX) || defined(sun) || defined(__linux__) char buffer[M_LITLEN + 80] ; #else #define max4(a,b,c,d) (a>b&&a>c&&a>d) ? a : ((b>c&&b>d) ? b : (c>d ? c : d)) diff --git a/cde/programs/dthelp/parser/canon1/util/malloc.c b/cde/programs/dthelp/parser/canon1/util/malloc.c index 32ef2dbf1..f3e5766e1 100644 --- a/cde/programs/dthelp/parser/canon1/util/malloc.c +++ b/cde/programs/dthelp/parser/canon1/util/malloc.c @@ -55,7 +55,7 @@ void m_free(void *block, char *msg) free(block) ; if (m_malftrace) { -#if defined(hpux) || defined(_AIX) || defined(sun) +#if defined(_AIX) || defined(sun) snprintf(buffer, 32, "%5x:%5x", (unsigned int) ((unsigned long) block >> 16), (unsigned int) block) ; @@ -84,7 +84,7 @@ void *m_malloc(int size, char *msg) m_exit(TRUE) ; } if (m_malftrace) { -#if defined(hpux) || defined(_AIX) || defined(sun) +#if defined(_AIX) || defined(sun) snprintf(buffer, 32, "%5x:%5x", (unsigned int) ((unsigned long) p >> 16), (unsigned int) p) ; #else @@ -116,7 +116,7 @@ void *m_realloc(void *ptr, int size, char *msg) m_exit(TRUE) ; } if (m_malftrace) { -#if defined(hpux) || defined(_AIX) || defined(sun) +#if defined(_AIX) || defined(sun) snprintf(buffer, 32, "%5x:%5x", (unsigned int) ((unsigned long) p >> 16), (unsigned int) p) ; #else diff --git a/cde/programs/dthelp/parser/pass1/helptag/help.c b/cde/programs/dthelp/parser/pass1/helptag/help.c index 8b31d1cea..0cbd21cea 100644 --- a/cde/programs/dthelp/parser/pass1/helptag/help.c +++ b/cde/programs/dthelp/parser/pass1/helptag/help.c @@ -350,7 +350,7 @@ m_free(string, "GetDefaultHeaderString return"); /* construct a qualified file name */ static int mb_getqualified(char *qualname, char *unqualname) { -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) +#if defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) FILE *f; #endif char fn[FNAMELEN]; @@ -374,7 +374,7 @@ else fnp = fn; -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) +#if defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) qualname[0] = '\0'; gp = qualname + strlen(qualname); roomleft = roomleft - strlen(qualname); @@ -488,7 +488,7 @@ do { while (1); *strrchr(qualname, CSEP) = '\0'; -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) +#if defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) #else strupr ( qualname ); #endif diff --git a/cde/programs/dthelp/parser/pass1/helptag/help.if b/cde/programs/dthelp/parser/pass1/helptag/help.if index aa43e0ccb..78d7d0c77 100644 --- a/cde/programs/dthelp/parser/pass1/helptag/help.if +++ b/cde/programs/dthelp/parser/pass1/helptag/help.if @@ -133,17 +133,6 @@ <\CODE> -#if defined(hpux) - { - M_WCHAR *wc_1, *wc_2; - - wc_1 = MakeWideCharString("HPUX"); - wc_2 = MakeWideCharString("m-machine"); - m_piaction(wc_1, wc_2, M_SDATA) ; - m_free(wc_1,"wide character string"); - m_free(wc_2,"wide character string"); - } -#else #if defined(_AIX) { M_WCHAR *wc_1, *wc_2; @@ -154,8 +143,7 @@ m_free(wc_1,"wide character string"); m_free(wc_2,"wide character string"); } -#else -#if defined(sun) +#elif defined(sun) { M_WCHAR *wc_1, *wc_2; @@ -169,8 +157,6 @@ m_piaction("UNDEFINED MACHINE", "m-machine", M_SDATA) ; -#endif -#endif #endif <\CODE> diff --git a/cde/programs/dthelp/parser/pass1/helptag/make.c b/cde/programs/dthelp/parser/pass1/helptag/make.c index 7dfe88931..30e975bab 100644 --- a/cde/programs/dthelp/parser/pass1/helptag/make.c +++ b/cde/programs/dthelp/parser/pass1/helptag/make.c @@ -31,14 +31,14 @@ or invoke function pointers should be in tex.c. */ -#if defined(hpux) || defined(_AIX) || defined(sun) +#if defined(_AIX) || defined(sun) #include #include #endif #include -#if defined(hpux) || defined(_AIX) || defined(sun) +#if defined(_AIX) || defined(sun) #undef M_PI /* M_PI is used by markup, we don't need the math PI */ #endif diff --git a/cde/programs/dthelp/parser/pass1/helptag/option.c b/cde/programs/dthelp/parser/pass1/helptag/option.c index 32ade5beb..87eac3397 100644 --- a/cde/programs/dthelp/parser/pass1/helptag/option.c +++ b/cde/programs/dthelp/parser/pass1/helptag/option.c @@ -28,7 +28,7 @@ void m_mberr1(char *text, const char *arg); -#if defined(hpux) || defined(_AIX) || defined(sun) +#if defined(_AIX) || defined(sun) /* get definition of getenv(3c) for getting of environment variables */ #include #endif @@ -59,7 +59,7 @@ if (optfile = fopen(nameofoptfile, "r")) } m_free(nameofoptfile, "installation helptag.opt"); -#if defined(hpux) || defined(_AIX) || defined(sun) +#if defined(_AIX) || defined(sun) { char *opts; @@ -76,7 +76,7 @@ if (opts) } } } -#endif /* hpux or _AIX or sun */ +#endif /* _AIX or sun */ /* Check helptag.opt in input directory */ if (indir) diff --git a/cde/programs/dthelp/parser/pass1/parser/parser.c b/cde/programs/dthelp/parser/pass1/parser/parser.c index 1a28b615f..65eef4d8d 100644 --- a/cde/programs/dthelp/parser/pass1/parser/parser.c +++ b/cde/programs/dthelp/parser/pass1/parser/parser.c @@ -43,7 +43,7 @@ int main(int argc, char **argv) "prevcon=%d,token=%d,curcon=%d,scanval='%c'(%d),line=%d,netlevel=%d\n" ; static char name[] = "m_name = '%s'\n" ; static char literal[] = "m_literal = '%s'\n" ; -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) +#if defined(_AIX) || defined(sun) || defined(__linux__) char buffer[M_LITLEN + 80] ; #else #define max4(a,b,c,d) (a>b&&a>c&&a>d) ? a : ((b>c&&b>d) ? b : (c>d ? c : d)) diff --git a/cde/programs/dthelp/parser/pass1/util/malloc.c b/cde/programs/dthelp/parser/pass1/util/malloc.c index b574fafd7..42a15e231 100644 --- a/cde/programs/dthelp/parser/pass1/util/malloc.c +++ b/cde/programs/dthelp/parser/pass1/util/malloc.c @@ -54,7 +54,7 @@ void m_free(void *block, char *msg) char buffer[32] ; if (m_malftrace) { -#if defined(hpux) || defined(_AIX) || defined(sun) +#if defined(_AIX) || defined(sun) snprintf(buffer, 32, "%5x:%5x", (unsigned int) ((unsigned long) block >> 16), (unsigned int) block) ; @@ -84,7 +84,7 @@ void *m_malloc(int size, char *msg) m_exit(TRUE) ; } if (m_malftrace) { -#if defined(hpux) || defined(_AIX) || defined(sun) +#if defined(_AIX) || defined(sun) snprintf(buffer, 32, "%5x:%5x", (unsigned int) ((unsigned long) p >> 16), (unsigned int) p) ; #else @@ -116,7 +116,7 @@ void *m_realloc(void *ptr, int size, char *msg) m_exit(TRUE) ; } if (m_malftrace) { -#if defined(hpux) || defined(_AIX) || defined(sun) +#if defined(_AIX) || defined(sun) snprintf(buffer, 32, "%5x:%5x", (unsigned int) ((unsigned long) p >> 16), (unsigned int) p) ; #else diff --git a/cde/programs/dthelp/parser/pass2/htag2/global.h b/cde/programs/dthelp/parser/pass2/htag2/global.h index b12441cd9..5816d7221 100644 --- a/cde/programs/dthelp/parser/pass2/htag2/global.h +++ b/cde/programs/dthelp/parser/pass2/htag2/global.h @@ -38,7 +38,7 @@ #include #include -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) +#if defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) #include #include #include diff --git a/cde/programs/dthelp/parser/pass2/htag2/option.c b/cde/programs/dthelp/parser/pass2/htag2/option.c index 1f882be20..b6e33f45c 100644 --- a/cde/programs/dthelp/parser/pass2/htag2/option.c +++ b/cde/programs/dthelp/parser/pass2/htag2/option.c @@ -26,7 +26,7 @@ #include "userinc.h" #include "globdec.h" -#if defined(hpux) || defined(_AIX) || defined(sun) +#if defined(_AIX) || defined(sun) /* get definition of getenv(3c) for getting of environment variables */ #include #endif @@ -59,7 +59,7 @@ if (optfile = fopen(nameofoptfile, "r")) } m_free(nameofoptfile, "installation helptag.opt"); -#if defined(hpux) || defined(_AIX) || defined(sun) +#if defined(_AIX) || defined(sun) { char *opts; @@ -76,7 +76,7 @@ if (opts) } } } -#endif /* hpux or _AIX or sun */ +#endif /* _AIX or sun */ /* Check helptag.opt in input directory */ if (indir) diff --git a/cde/programs/dthelp/parser/pass2/parser/parser.c b/cde/programs/dthelp/parser/pass2/parser/parser.c index 0c915da22..65277caa8 100644 --- a/cde/programs/dthelp/parser/pass2/parser/parser.c +++ b/cde/programs/dthelp/parser/pass2/parser/parser.c @@ -43,7 +43,7 @@ void main(int argc, char **argv) "prevcon=%d,token=%d,curcon=%d,scanval='%c'(%d),line=%d,netlevel=%d\n" ; static char name[] = "m_name = '%s'\n" ; static char literal[] = "m_literal = '%s'\n" ; -#if defined(hpux) || defined(_AIX) || defined(sun) +#if defined(_AIX) || defined(sun) char buffer[M_LITLEN + 80] ; #else #define max4(a,b,c,d) (a>b&&a>c&&a>d) ? a : ((b>c&&b>d) ? b : (c>d ? c : d)) diff --git a/cde/programs/dthelp/parser/pass2/util/malloc.c b/cde/programs/dthelp/parser/pass2/util/malloc.c index ff63f1348..dfb98d84f 100644 --- a/cde/programs/dthelp/parser/pass2/util/malloc.c +++ b/cde/programs/dthelp/parser/pass2/util/malloc.c @@ -54,7 +54,7 @@ void m_free(void *block, char *msg) char buffer[32] ; if (m_malftrace) { -#if defined(hpux) || defined(_AIX) || defined(sun) +#if defined(_AIX) || defined(sun) snprintf(buffer, 32, "%5x:%5x", (unsigned int) ((unsigned long) block >> 16), (unsigned int) block) ; @@ -84,7 +84,7 @@ void *m_malloc(int size, char *msg) m_exit(TRUE) ; } if (m_malftrace) { -#if defined(hpux) || defined(_AIX) || defined(sun) +#if defined(_AIX) || defined(sun) snprintf(buffer, 32, "%5x:%5x", (unsigned int) ((unsigned long) p >> 16), (unsigned int) p) ; #else @@ -116,7 +116,7 @@ void *m_realloc(void *ptr, int size, char *msg) m_exit(TRUE) ; } if (m_malftrace) { -#if defined(hpux) || defined(_AIX) || defined(sun) +#if defined(_AIX) || defined(sun) snprintf(buffer, 32, "%5x:%5x", (unsigned int) ((unsigned long) p >> 16), (unsigned int) p) ; #else diff --git a/cde/programs/dtimsstart/env.c b/cde/programs/dtimsstart/env.c index c7358c27f..4063017f3 100644 --- a/cde/programs/dtimsstart/env.c +++ b/cde/programs/dtimsstart/env.c @@ -51,14 +51,6 @@ int set_cmd_env(void) if ((ret = read_cmd_conf()) != NoError) return ret; -# ifdef old_hpux - p = get_real_locale(uenv->locale, &aliases); - if (p) { - uenv->real_locale = NEWSTR(p); - uenv->locale_aliases = aliases; - } -# endif /* old_hpux */ - expand_cmd_conf(); return ret; @@ -170,11 +162,6 @@ int expand_string(char *in_str, char *out_str, int out_len, ImsConf *ims) case 'A': ep = conf->userAltDir; break; case 'C': ep = conf->dt->confDir; break; case 'U': ep = conf->dt->userDir; break; -# ifdef old_hpux - case 'V': ep = conf->vue->confDir; break; - case 'X': ep = conf->vue->userDir; break; -# endif /* old_hpux */ - case 'L': if (ep = uenv->real_locale) break; case 'l': ep = uenv->locale; break; case 'H': ep = uenv->homedir; break; @@ -264,13 +251,8 @@ int make_new_environ(OutEnv *oenv, UserSelection *sel) ims = sel->ent->ims; xmod = ENV_XMODIFIERS; xmod_done = False; -# ifdef old_hpux - xinput = xhp_xinput_name(NULL); - xinput_done = (xinput) ? False : True; -# else xinput = NULL; xinput_done = True; -# endif /* old_hpux */ proto = renv ? renv->proto : default_protocol(ims); setp = unsetp = 0; @@ -295,20 +277,6 @@ int make_new_environ(OutEnv *oenv, UserSelection *sel) ep++; xmod_done = True; } -# ifdef old_hpux - if (!xinput_done && (proto == Proto_Xhp)) { -#ifdef DEBUG - if (!ims->servername) { - DPR(("make_new_environ(): '%s' servername not defined\n", - sel->name)); - } -#endif - ep->name = NEWSTR(xinput); - ep->value = NEWSTR(ims->servername); - ep++; - xinput_done = True; - } -# endif /* old_hpux */ if (ep == oenv->set) { FREE(oenv->set); oenv->set = (EnvEnt *)0; } else @@ -324,13 +292,6 @@ int make_new_environ(OutEnv *oenv, UserSelection *sel) ep++; xmod_done = True; } -# ifdef old_hpux - if (!xinput_done) { - ep->name = NEWSTR(xinput); - ep++; - xinput_done = True; - } -# endif /* old_hpux */ for (i = 0; i < num && (p = unsetp[i]); i++) { if (strcmp(p, xmod) == 0 || (xinput && (strcmp(p, xinput) == 0))) continue; @@ -470,87 +431,3 @@ int set_remote_env(char *ptr, char *env_pass) Conf.remote->passEnv, env_pass, ptr)); return bp - ptr; } - -# ifdef old_hpux -char *xhp_xinput_name(char *locale) -{ - char *xinput_name = "X@INPUT"; - char **pp, *p; - int i, len; - XhpLocale *xhp = Conf.xhp; - char **ls; - char typ = 0; - - if (!xhp) return NULL; - if (!locale) locale = userEnv.locale; - - for (i = 0; !typ && i < XHP_LANG_NUM; i++) { - if (!(ls = parse_strlist(xhp[i].locales, ' '))) continue; - for (pp = ls; *pp; pp++) { - if (locale[0] != (*pp)[0]) continue; - len = strlen(p = *pp); - if ((p[len - 1] == '*' && strncmp(locale, p, len - 1) == 0) - || strcmp(locale, p) == 0) { - typ = xhp[i].type; - break; - } - } - FREE_LIST(ls); - } - if (!typ) { - DPR2(("xhp_xinput_name(%s): unknown locale\n", locale)); - return NULL; - } - - xinput_name[1] = typ; - return NEWSTR(xinput_name); -} - - -char *get_real_locale(char *locale, char ***aliases) -{ - int i; - int match_idx = -1; - LocaleAlias **alias = Conf.alias, *ap; - char **ls, **pp; - char *real_locale = NULL; - - if (!locale || !alias) return NULL; - - for (i = 0; match_idx < 0 && (ap = alias[i]); i++) { - if (strcmp(ap->name, locale) == 0) { - match_idx = i; - if (aliases) - ls = parse_strlist(ap->aliases, ' '); - break; - } - if (ls = parse_strlist(ap->aliases, ' ')) { - for (pp = ls; *pp; pp++) - if (strcmp(locale, *pp) == 0) { - match_idx = i; - break; - } - FREE_LIST(ls); - ls = (char **)NULL; - } - } - - if (match_idx >= 0) { - real_locale = alias[match_idx]->name; - if (aliases) { - *aliases = ls; - ls = (char **)NULL; - } - } else { - real_locale = NULL; - if (aliases) *aliases = (char **) NULL; - } - if (ls) FREE_LIST(ls); - - DPR(("get_real_locale(%s): real_locale=%s aliases=%s\n", - locale, real_locale, aliases ? *aliases : NULL)); - - return real_locale; -} - -# endif /* old_hpux */ diff --git a/cde/programs/dtimsstart/file.c b/cde/programs/dtimsstart/file.c index cd19ba8d7..8147c8a17 100644 --- a/cde/programs/dtimsstart/file.c +++ b/cde/programs/dtimsstart/file.c @@ -153,11 +153,6 @@ int read_cmd_conf(void) DtEnv *dt = NULL; RemoteEnv *remote; FILE *fp; -# ifdef old_hpux - VueEnv *vue; - LocaleAlias *tmp_alias[MAXIMSENT], *ap; -# endif /* old_hpux */ - conf_dir = DTIMS_CONFDIR; if (!(path = Opt.ConfPath) || !*path) { if (!(path = getenv("DTIMS_STARTCONF")) || !*path) { @@ -235,10 +230,6 @@ int read_cmd_conf(void) RENEWSTR(conf->xmod[Proto_Ximp], valp); } else if (strncmp(p, "Xsi", 3) == 0) { RENEWSTR(conf->xmod[Proto_Xsi], valp); -# ifdef old_hpux - } else if (strncmp(p, "Xhp", 3) == 0) { - RENEWSTR(conf->xmod[Proto_Xhp], valp); -# endif /* old_hpux */ } else if (strncmp(p, "None", 3) == 0) { RENEWSTR(conf->xmod[Proto_None], valp); } else @@ -251,10 +242,6 @@ int read_cmd_conf(void) RENEWSTR(conf->atom[Proto_Ximp], valp); } else if (strncmp(p, "Xsi", 3) == 0) { RENEWSTR(conf->atom[Proto_Xsi], valp); -# ifdef old_hpux - } else if (strncmp(p, "Xhp", 3) == 0) { - RENEWSTR(conf->atom[Proto_Xhp], valp); -# endif /* old_hpux */ } else if (strncmp(p, "None", 3) == 0) { RENEWSTR(conf->atom[Proto_None], valp); } else @@ -281,47 +268,6 @@ int read_cmd_conf(void) RENEWSTR(remote->passEnv, valp); } else goto _inv; -# ifdef old_hpux - } else if (strncmp(lp, "Vue", 3) == 0) { - p = lp + 3; - if (!conf->vue) vue = conf->vue = ALLOC(1, VueEnv); - if (strncmp(p, "ConfigDir", 4) == 0) { - RENEWSTR(vue->confDir, valp); - } else if (strncmp(p, "UserDir", 5) == 0) { - RENEWSTR(vue->userDir, valp); - } else if (strncmp(p, "UseLiteFile", 5) == 0) { - RENEWSTR(vue->uselite, valp); - } else if (strncmp(p, "LiteResourcePath", 5) == 0) { - RENEWSTR(vue->litePath, valp); - } else if (strncmp(p, "ResourcePath", 5) == 0) { - RENEWSTR(vue->resPath, valp); - } else - goto _inv; - } else if (strncmp(lp, "LocaleAlias", 6) == 0) { - ap = ALLOC(1, LocaleAlias); - p = valp; cut_field(valp); - ap->name = NEWSTR(p); - ap->aliases = NEWSTR(valp); - tmp_alias[num_alias++] = ap; - } else if (strncmp(lp, "XhpLocales", 3) == 0) { - int idx = 0; - p = strrchr(lp, '.'); - if (!p) continue; /* invalid */ - switch (p[1]) { - case 'J': idx = XHP_JPN; break; - case 'K': idx = XHP_KOR; break; - case 'C': idx = XHP_CHS; break; - case 'T': idx = XHP_CHT; break; - default: goto _inv; - } - if (!conf->xhp) - conf->xhp = ALLOC(XHP_LANG_NUM, XhpLocale); - else if (conf->xhp[idx].locales) { - FREE(conf->xhp[idx].locales); - } - conf->xhp[idx].type = p[1]; - conf->xhp[idx].locales = NEWSTR(valp); -# endif /* old_hpux */ } else { _inv: DPR(("\t[line=%d] invalid entry '%s'\n", line_num, lp)); @@ -329,15 +275,6 @@ int read_cmd_conf(void) } fclose(fp); -# ifdef old_hpux - if (num_alias > 0) { - conf->alias = ALLOC(num_alias + 1, LocaleAlias *); - memcpy((void *)conf->alias, (void *)tmp_alias, - num_alias*sizeof(LocaleAlias *)); - conf->alias[num_alias] = (LocaleAlias *)0; - } -# endif /* old_hpux */ - /* if (remote->disabled) FREE(remote->passEnv); */ _default: @@ -353,11 +290,6 @@ _default: if (!conf->dt) conf->dt = ALLOC(1, DtEnv); if (!conf->dt->confDir) conf->dt->confDir = NEWSTR(DT_CONFDIR); if (!conf->dt->userDir) conf->dt->userDir = NEWSTR(DT_USERDIR); -# ifdef old_hpux - if (!conf->vue) conf->vue = ALLOC(1, VueEnv); - if (!conf->vue->confDir) conf->vue->confDir = NEWSTR(VUE_CONFDIR); - if (!conf->vue->userDir) conf->vue->userDir = NEWSTR(VUE_USERDIR); -# endif /* old_hpux */ if (!conf->xmod[Proto_XIM]) conf->xmod[Proto_XIM] = NEWSTR(IM_XMOD_XIM); if (!conf->xmod[Proto_Ximp]) conf->xmod[Proto_Ximp] = NEWSTR(IM_XMOD_XIMP); if (!conf->xmod[Proto_Xsi]) conf->xmod[Proto_Xsi] = NEWSTR(IM_XMOD_XSI); @@ -401,15 +333,6 @@ int expand_cmd_conf(void) CHK_ADD(conf->dt->userDir) CHK_ADD(conf->dt->resPath) } -# ifdef old_hpux - if (conf->vue) { - CHK_ADD(conf->vue->confDir) - CHK_ADD(conf->vue->userDir) - CHK_ADD(conf->vue->uselite) - CHK_ADD(conf->vue->resPath) - CHK_ADD(conf->vue->litePath) - } -# endif /* old_hpux */ /* xmod[] & atom[] must not be expanded, since no ims selected */ /* remote->* should be expanded at preparation of remote exec */ @@ -498,10 +421,6 @@ int read_imsconf(ImsConf *conf, char *ims_name, char *ims_fname) SET_FLAG(F_NO_REMOTE); else if (strcmp(lp, "no_option") == 0) SET_FLAG(F_NO_OPTION); -# ifdef old_hpux - else if (strcmp(lp, "try_connect") == 0) - SET_FLAG(F_TRY_CONNECT); -# endif /* old_hpux */ else if (strcmp(lp, "has_window") == 0) SET_FLAG(F_HAS_WINDOW); #undef SET_FLAG @@ -1046,48 +965,6 @@ static int user_selection_fname(char *buf, int buf_len, int dpy_specific) } len = expand_string(dpy_specific ? "%S/%d/" : "%S/", buf, buf_len, 0); -# ifdef old_hpux - if (!real_done && uenv->real_locale) { - real_done = True; - strcpy(buf + len, uenv->real_locale); - if (!is_readable(buf, True)) { - bool rename_done = False; - char buf2[MAXPATHLEN], *bp; - - strncpy(buf2, buf, len); - bp = buf2 + len; *bp = 0; - if (strcmp(uenv->locale, uenv->real_locale)) { - strcpy(bp, uenv->locale); - if (is_readable(buf2, False)) { - rename_done = rename(buf2, buf) == 0; - DPR(("user_selection_fname(): rename(%s, %s) %s\n", - uenv->locale, uenv->real_locale, - rename_done ? "OK" : "Failed")); - } - } - - if (uenv->locale_aliases) { - char **ap; - for (ap = uenv->locale_aliases; *ap; ap++) { - strcpy(bp, *ap); - if (!is_readable(buf2, False)) continue; - if (rename_done) { - (void) unlink(buf2); - DPR(("user_selection_fname(): unlink(%s) %s\n", - *ap)); - } else { - rename_done = rename(buf2, buf) == 0; - DPR(("user_selection_fname(): rename(%s, %s) %s\n", - *ap, uenv->real_locale, - rename_done ? "OK" : "Failed")); - } - } - } - /* real_done = rename_done; */ - } - } -# endif /* old_hpux */ - /* Add the CDE-generic locale name */ strcpy(buf + len, real_done ? uenv->real_locale : uenv->CDE_locale); buf[buf_len-1] = 0; @@ -1104,9 +981,6 @@ int parse_protolist(char *valp) if (strstr(valp, "XIM")) proto_bits |= ProtoBit(Proto_XIM); if (strstr(valp, "Ximp")) proto_bits |= ProtoBit(Proto_Ximp); if (strstr(valp, "Xsi")) proto_bits |= ProtoBit(Proto_Xsi); -# ifdef old_hpux - if (strstr(valp, "Xhp")) proto_bits |= ProtoBit(Proto_Xhp); -# endif /* old_hpux */ if (strstr(valp, "None")) proto_bits |= ProtoBit(Proto_None); return proto_bits; } @@ -1116,9 +990,6 @@ int default_protocol(ImsConf *conf) if (conf->protocols & ProtoBit(Proto_XIM)) return Proto_XIM; else if (conf->protocols & ProtoBit(Proto_Ximp)) return Proto_Ximp; else if (conf->protocols & ProtoBit(Proto_Xsi)) return Proto_Xsi; -# ifdef old_hpux - else if (conf->protocols & ProtoBit(Proto_Xhp)) return Proto_Xhp; -# endif /* old_hpux */ else return Proto_None; } diff --git a/cde/programs/dtimsstart/main.c b/cde/programs/dtimsstart/main.c index 8756e2183..4a3b3b60c 100644 --- a/cde/programs/dtimsstart/main.c +++ b/cde/programs/dtimsstart/main.c @@ -845,12 +845,6 @@ static int parse_options(int argc, char **argv) SET_FLAG(FLAG_CONNECT); } else if (optname_match("dt", opt, 2)) { SET_FLAG(FLAG_DT); -# ifdef old_hpux - CLR_FLAG(FLAG_VUE); - } else if (optname_match("vue", opt, 2)) { - SET_FLAG(FLAG_VUE); - CLR_FLAG(FLAG_DT); -# endif /* old_hpux */ } else if (optname_match("window", opt, 2)) { SET_FLAG(FLAG_WINDOW); } else if (optname_match("nowindow", opt, 4)) { @@ -1062,10 +1056,6 @@ static OptDesc opts_internal[] = { { "-notimeout", "do not timeout" }, { "-noremote", "disable remote execution" }, { "-notify", "print error code to stderr" }, -# ifdef old_hpux - { "-vue", "in VUE environment" }, - { "-connect", "enable try_connect" }, -# endif /* old_hpux */ #ifdef SelectMode_ONCE { "-once", "auto-selection once selected" }, #endif /* SelectMode_ONCE */ diff --git a/cde/programs/dtimsstart/start.c b/cde/programs/dtimsstart/start.c index afd145616..d509e7545 100644 --- a/cde/programs/dtimsstart/start.c +++ b/cde/programs/dtimsstart/start.c @@ -45,12 +45,6 @@ static void on_sig_chld(/* sig */); static bool is_ims_running(/* renv, ims */); static int settle_ims(/* sel */); static Window property_owner(/* prop_atom, prop_str */); -# ifdef old_hpux -static void catch_alarm(/* sig */); -static int try_connection(/* sel */); -static int create_dummy_ic(/* xim */); -# endif /* old_hpux */ - void ximsStart(void) { @@ -185,12 +179,6 @@ void ximsWaitDone(void) case ErrImsWaitDone: sel->status = NoError; -# ifdef old_hpux - if ((OpFlag & FLAG_CONNECT) - || (sel->ent->ims->flags & F_TRY_CONNECT)) { - sel->status = try_connection(sel); - } -# endif /* old_hpux */ break; case ErrImsConnecting: @@ -360,11 +348,6 @@ int load_resources(void) if (isDT()) { sess_res = find_session_resfile(RES_TYPE_DT); } -# ifdef old_hpux - else if (isVUE()) { - sess_res = find_session_resfile(RES_TYPE_VUE); - } -# endif /* old_hpux */ if (sess_res && !is_readable(sess_res, False)) { FREE(sess_res); sess_res = NULL; @@ -407,17 +390,6 @@ static char *find_session_resfile(int res_type) if (res_type == RES_TYPE_DT) { /* DT */ res = Conf.dt ? (Conf.dt)->resPath : NULL; } -# ifdef old_hpux - else if (res_type == RES_TYPE_VUE && Conf.vue) { /* VUE */ - VueEnv *vue = Conf.vue; - res = vue->resPath; - if (vue->uselite) { - expand_string(vue->uselite, path, MAXPATHLEN, (ImsConf *)0); - if (access(path, R_OK) == 0) - res = vue->litePath; - } - } -# endif /* old_hpux */ if (!res) return NULL; if (ls = parse_strlist(res, ':')) { @@ -490,12 +462,6 @@ static int build_run_env(UserSelection *sel) renv->atom_name = NEWSTR(buf); } else { /* copy im_mod, instead */ renv->atom_name = NEWSTR(renv->im_mod); -# ifdef old_hpux - if ((p = renv->atom_name) && strchr(p, '#')) { - while (p = strchr(p, '#')) /* replace '#' with '@' */ - *p++ = '@'; - } -# endif /* old_hpux */ } /* others */ @@ -768,177 +734,3 @@ static Window property_owner(Atom *prop_atom, char *prop_str) } return XGetSelectionOwner(Dpy, property); } - - -# ifdef old_hpux - /* ***** try_connection ***** */ - -#define MAX_RETRY 5 - -static jmp_buf jmp_env; -static Window dmy_win = 0; /* temporary window used for XCreateIC() */ - -static void catch_alarm(int sig) -{ - signal(SIGALRM, SIG_IGN); - alarm(0); - longjmp(jmp_env, 1); -} - -static int try_connection(UserSelection *sel) -{ - RunEnv *renv = sel->renv; - ImsConf *ims = sel->ent->ims; - char envbuf[BUFSIZ], *bp; - XIM xim; - int ic_ok, retry_cnt; - static char *saved_xmod = NULL; -#ifdef DEBUG - time_t last_time; -#endif - - DPR(("try_connection(%s):\n", sel->name)); - - if (sel->status != NoError || !renv->im_mod) - return sel->status; - - renv->status = ErrImsConnecting; - set_sig_chld(True); - - /* set XMODIFIERS */ - saved_xmod = NULL; - bp = strcpyx(envbuf, ENV_MOD_IM); - bp = strcpyx(bp, renv->im_mod); - saved_xmod = XSetLocaleModifiers(envbuf); - DPR(("\tXSetLocaleModifiers(%s)\n", envbuf)); - - ic_ok = False; - if (setjmp(jmp_env) == 0) { - signal(SIGALRM, catch_alarm); - alarm(Opt.Timeout); - - for (retry_cnt = 0; !ic_ok && retry_cnt <= MAX_RETRY; retry_cnt++) { - if (retry_cnt) sleep(retry_cnt * retry_cnt); - -#ifdef DEBUG - last_time = time((time_t)0); -#endif - xim = XOpenIM(Dpy, (XrmDatabase)0, ims->servername, ims->classname); - if (xim) { - DPR(("try_connection(%d): XOpenIM() OK [%d sec.]", - retry_cnt, time((time_t)0) - last_time)); -#ifdef DEBUG - last_time = time((time_t)0); -#endif - ic_ok = create_dummy_ic(xim); - DPR(("\tXCreateIC() %s [%d sec.]\n", - ic_ok ? "OK" : "Failed", time((time_t)0) - last_time)); - XCloseIM(xim); xim = 0; - } else { - DPR(("try_connection(%d): XOpenIM() failed.\n", retry_cnt)); - ic_ok = False; - } - } - } else { /* long_jmp() by alarm [timeout] */ - alarm(0); signal(SIGALRM, SIG_IGN); - DPR(("try_connection(): XOpenIM() & XCreateIC() timed-out.\n")); - if (dmy_win) { - XDestroyWindow(Dpy, dmy_win); dmy_win = 0; - } - /* neither XDestroyIC() nor XCloseIM() should be called */ - xim = 0; - ic_ok = False; - } - alarm(0); signal(SIGALRM, SIG_IGN); - - /* restore XMODIFIERS */ - if (saved_xmod) { - DPR2(("\tXSetLocaleModifiers(save='%s')\n", saved_xmod)); - XSetLocaleModifiers(saved_xmod); - } - - set_sig_chld(False); - renv->status = ErrImsConnectDone; - - return ic_ok ? NoError : ErrImsTimeout; /* ErrImsConnect; */ -} - -static int create_dummy_ic(XIM xim) -{ - int scr; - XFontSet fset; - XIMStyles *im_styles; - XIMStyle style; - XIC ic; - unsigned long fg, bg; - XRectangle area; - XVaNestedList status_attr; - - scr = DefaultScreen(Dpy); - fg = BlackPixel(Dpy, scr); - bg = WhitePixel(Dpy, scr); - dmy_win = XCreateSimpleWindow(Dpy, RootWindow(Dpy, scr), - 0, 0, 1, 1, 0, bg, fg); - - /* search (PreeditNothing | StatusNothing [or StatusArea]) style */ - ic = 0; - style = (XIMStyle) 0; - im_styles = (XIMStyles *) 0; - if (XGetIMValues(xim, XNQueryInputStyle, &im_styles, NULL)) { - DPR(("create_dummy_ic(): XGetIMValues(XNQueryInutStyle) failed.\n")); - goto _err; - } - if (!im_styles || !im_styles->count_styles) { - DPR(("create_dummy_ic(): No input styles supported on IMS.\n")); - if (im_styles) XFree(im_styles); - goto _err; - } - if ((int)im_styles->count_styles > 0) { - int i, alt; - for (i = 0, alt = -1; i < (int)im_styles->count_styles; i++) - if (im_styles->supported_styles[i] & XIMPreeditNothing) { - if (im_styles->supported_styles[i] & XIMStatusNothing) { - style = im_styles->supported_styles[i]; - break; - } else if (im_styles->supported_styles[i] & XIMStatusArea) { - alt = i; - } - } - if (!style && alt >= 0) style = im_styles->supported_styles[alt]; - XFree(im_styles); - } - if (!style) { - DPR(("create_dummy_ic(): 'PreeditNothing' styles not supported.\n")); - goto _err; - /* style = XIMPreeditNothing | XIMStatusNothing; */ - } - - fset = 0; - status_attr = (XVaNestedList) 0; - if (style & XIMStatusArea) { - area.x = area.y = 0; area.width = area.height = 1; - status_attr = XVaCreateNestedList(NULL, - XNArea, &area, - XNForeground, fg, - XNBackground, bg, - XNFontSet, fset, - NULL ); - } - - ic = XCreateIC(xim, XNInputStyle, style, - XNClientWindow, dmy_win, - XNStatusAttributes, status_attr, - XNFocusWindow, dmy_win, - NULL ); - - /* if (fset) XFreeFontSet(Dpy, fset); */ - if (ic) XDestroyIC(ic); - -_err: - if (dmy_win) XDestroyWindow(Dpy, dmy_win); - dmy_win = 0; - - return ic ? True : False; -} - -# endif /* old_hpux */ diff --git a/cde/programs/dtimsstart/util.c b/cde/programs/dtimsstart/util.c index e359c319d..a7dabd674 100644 --- a/cde/programs/dtimsstart/util.c +++ b/cde/programs/dtimsstart/util.c @@ -700,28 +700,6 @@ void clear_CmdConf(void) FREE(conf->dt->resPath); FREE(conf->dt); } -# ifdef old_hpux - if (conf->vue) { - FREE(conf->vue->confDir); - FREE(conf->vue->userDir); - FREE(conf->vue->uselite); - FREE(conf->vue->resPath); - FREE(conf->vue->litePath); - FREE(conf->vue); - } - if (conf->alias) { - for (ap = conf->alias; *ap; ap++) { - FREE((*ap)->name); - FREE((*ap)->aliases); - } - FREE(conf->alias); - } - if (conf->xhp) { - for (i = 0; i < XHP_LANG_NUM; i++) - FREE(conf->xhp[i].locales); - FREE(conf->xhp); - } -# endif /* old_hpux */ } CLR(&Conf, CmdConf); cmdconf_initialized = False; @@ -803,11 +781,7 @@ void pr_ImsConf(ImsConf *conf, char *ims_name) (conf->protocols & ProtoBit(Proto_XIM)) ? "XIM," : NULL, (conf->protocols & ProtoBit(Proto_Ximp)) ? "Ximp," : NULL, (conf->protocols & ProtoBit(Proto_Xsi)) ? "Xsi," : NULL, -# ifdef old_hpux - (conf->protocols & ProtoBit(Proto_Xhp)) ? "Xhp," : NULL, -# else NULL, -# endif /* old_hpux */ (conf->protocols & ProtoBit(Proto_None)) ? "None," : NULL); fprintf(LogFp, "\tproperty=%s servername=%s (%s) class=%s\n", conf->property, conf->servername, @@ -903,9 +877,6 @@ void pr_CmdConf(void) { int i; CmdConf *conf = &Conf; -# ifdef old_hpux - LocaleAlias **ap; -# endif /* old_hpux */ char **p; fprintf(LogFp, "CmdConf:\n"); @@ -918,21 +889,12 @@ void pr_CmdConf(void) fprintf(LogFp, "\tuserTmpDir=%s\n", conf->userTmpDir); fprintf(LogFp, "\tuserAltDir=%s\n", conf->userAltDir); -# ifdef old_hpux - fprintf(LogFp, "\tImXmod:\tXIM=%s Ximp=%s Xsi=%s Xhp=%s None=%s\n", - conf->xmod[Proto_XIM], conf->xmod[Proto_Ximp], - conf->xmod[Proto_Xsi], conf->xmod[Proto_Xhp], conf->atom[Proto_None]); - fprintf(LogFp, "\tImAtom:\tXIM=%s Ximp=%s Xsi=%s Xhp=%s None=%s\n", - conf->atom[Proto_XIM], conf->atom[Proto_Ximp], - conf->atom[Proto_Xsi], conf->atom[Proto_Xhp], conf->atom[Proto_None]); -# else fprintf(LogFp, "\tImXmod:\tXIM=%s Ximp=%s Xsi=%s None=%s\n", conf->xmod[Proto_XIM], conf->xmod[Proto_Ximp], conf->xmod[Proto_Xsi], conf->atom[Proto_None]); fprintf(LogFp, "\tImAtom:\tXIM=%s Ximp=%s Xsi=%s None=%s\n", conf->atom[Proto_XIM], conf->atom[Proto_Ximp], conf->atom[Proto_Xsi], conf->atom[Proto_None]); -# endif /* old_hpux */ fprintf(LogFp, "\tAction[%d]:\t{ ", NUM_ACTIONS); for (i = 0; i < NUM_ACTIONS; i++) @@ -952,29 +914,6 @@ void pr_CmdConf(void) } else fprintf(LogFp, "\tDtEnv:\t\n"); -# ifdef old_hpux - if (conf->vue) { - fprintf(LogFp, "\tVueEnv:\tConfDir=%s UserDir=%s\n", - conf->vue->confDir, conf->vue->userDir); - fprintf(LogFp, "\t uselite=%s\n", conf->vue->uselite); - fprintf(LogFp, "\t resPath=\"%s\"\n", conf->vue->resPath); - fprintf(LogFp, "\t litePath=\"%s\"\n", conf->vue->litePath); - } else - fprintf(LogFp, "\tVueEnv:\t\n"); - - fprintf(LogFp, "\tlocaleAlias:\t%s\n", conf->alias ? NULL : "None"); - if (conf->alias) { - for (ap = conf->alias; *ap; ap++) - fprintf(LogFp, "\t [%s]\t%s\n", (*ap)->name, (*ap)->aliases); - } - - fprintf(LogFp, "\txhp:\t%s\n", conf->xhp ? NULL : "None"); - if (conf->xhp) { - for (i = 0; i < XHP_LANG_NUM; i++) - fprintf(LogFp, "\t [%c]\t%s\n", - conf->xhp[i].type, conf->xhp[i].locales); - } -# endif /* old_hpux */ } void pr_CmdOpt(void) @@ -1018,9 +957,6 @@ void pr_OpModeFlag(void) if (OpFlag & FLAG_REMOTERUN) fputs("RemoteRun, ", LogFp); if (OpFlag & FLAG_WINDOW) fputs("Window, ", LogFp); if (OpFlag & FLAG_DT) fputs("Dt, ", LogFp); -# ifdef old_hpux - if (OpFlag & FLAG_VUE) fputs("Vue, ", LogFp); -# endif /* old_hpux */ } putc('\n', LogFp); } @@ -1132,11 +1068,7 @@ char *error_name(ximsError error) static char *_proto_names[NUM_PROTOCOLS] = -# ifdef old_hpux - { "None", "XIM", "Ximp", "Xsi", "Xhp" }; -# else { "None", "XIM", "Ximp", "Xsi" }; -# endif /* old_hpux */ char *proto_name(int proto_idx) { diff --git a/cde/programs/dtimsstart/xims.h b/cde/programs/dtimsstart/xims.h index dcc9d53cb..ed3315225 100644 --- a/cde/programs/dtimsstart/xims.h +++ b/cde/programs/dtimsstart/xims.h @@ -72,16 +72,9 @@ #define FLAG_REMOTERUN (1<<9) /* -remoterun option */ #define FLAG_WINDOW (1<<10) /* -window option */ #define FLAG_DT (1<<11) /* -dt option */ -# ifdef old_hpux -#define FLAG_VUE (1<<12) /* -vue option */ -# endif /* old_hpux */ #define FLAG_DEFAULT (FLAG_DT) -# ifdef old_hpux -#define USE_WINDOW_MASK (FLAG_WINDOW|FLAG_VUE|FLAG_DT) -# else #define USE_WINDOW_MASK (FLAG_WINDOW|FLAG_DT) -# endif /* old_hpux */ #define MAXIMSENT 32 /* max # of ims for each locale */ @@ -122,12 +115,7 @@ #define Proto_XIM 1 #define Proto_Ximp 2 #define Proto_Xsi 3 -# ifdef old_hpux -#define Proto_Xhp 4 -#define NUM_PROTOCOLS 5 -# else #define NUM_PROTOCOLS 4 -# endif /* old_hpux */ /* protocol flag */ #define ProtoBit(i) (1<<(i)) @@ -167,15 +155,6 @@ #define HOST_REMOTE 1 #define HOST_UNKNOWN 2 -# ifdef old_hpux - /* index for XhpLocale */ -#define XHP_JPN 0 -#define XHP_KOR 1 -#define XHP_CHS 2 -#define XHP_CHT 3 -#define XHP_LANG_NUM 4 -# endif /* old_hpux */ - /* message type for put_msg_win() */ #define MSGTYP_INFO 0 #define MSGTYP_WARN 1 @@ -244,26 +223,6 @@ typedef struct { EnvEnt *unset; } OutEnv; -# ifdef old_hpux -typedef struct { - char *name; - char *aliases; -} LocaleAlias; - -typedef struct { - char type; - char *locales; -} XhpLocale; - -typedef struct { - char *confDir; /* override /etc/vue/config */ - char *userDir; /* override .vue */ - char *uselite; /* $HOME/.vue/sessions/usevuelite */ - char *resPath; /* path of session resource (colon separated) */ - char *litePath; -} VueEnv; -# endif /* old_hpux */ - typedef struct { char *confDir; /* override /usr/dt/config */ char *userDir; /* override .dt */ @@ -391,11 +350,6 @@ typedef struct { char *action[NUM_ACTIONS]; /* actions internally used */ DtEnv *dt; RemoteEnv *remote; -# ifdef old_hpux - VueEnv *vue; - XhpLocale *xhp; - LocaleAlias **alias; -# endif /* old_hpux */ } CmdConf; typedef struct { @@ -447,13 +401,8 @@ Extern int LastErrMsg; #undef Extern -# ifdef old_hpux -#define isXsession() ((OpFlag & (FLAG_VUE|FLAG_DT)) ? True : False) -#define isVUE() ((OpFlag & FLAG_VUE) ? True : False) -# else #define isXsession() ((OpFlag & FLAG_DT) ? True : False) #define isVUE() (False) -# endif /* old_hpux */ #define isDT() ((OpFlag & FLAG_DT) ? True : False) #define useWINDOW() \ (((OpFlag & USE_WINDOW_MASK) || window_env_ok()) ? True : False) diff --git a/cde/programs/dtimsstart/ximspath.h b/cde/programs/dtimsstart/ximspath.h index 23ad46a85..40ac7fbad 100644 --- a/cde/programs/dtimsstart/ximspath.h +++ b/cde/programs/dtimsstart/ximspath.h @@ -101,12 +101,6 @@ #define XRDB_PATH "/usr/bin/X11/xrdb" #define DTSESSION_RES_PATH "/usr/dt/bin/dtsession_res" -# ifdef old_hpux - /* VUE dirs */ -#define VUE_CONFDIR "/etc/vue/config" -#define VUE_USERDIR "%H/.vue" -# endif /* old_hpux */ - /* DT dirs */ #define DT_CONFDIR "/usr/dt/config" #define DT_USERDIR "%H/.dt" diff --git a/cde/programs/dtinfo/dtinfo/src/Agents/BookmarkEditMotif.C b/cde/programs/dtinfo/dtinfo/src/Agents/BookmarkEditMotif.C index e2928cf57..b8252b283 100644 --- a/cde/programs/dtinfo/dtinfo/src/Agents/BookmarkEditMotif.C +++ b/cde/programs/dtinfo/dtinfo/src/Agents/BookmarkEditMotif.C @@ -99,7 +99,7 @@ int BookmarkEdit::g_modified_count = 0; #define THIS_CLASS BookmarkEdit #define ON_ACTIVATE(WOBJ,FUNC) \ (WOBJ).SetActivateCallback (this, (WWL_FUN) &THIS_CLASS::FUNC) -#if defined(__STDC__) || defined(hpux) +#if defined(__STDC__) #define BUTTON(PARENT,NAME) \ WXmPushButtonGadget NAME (PARENT, #NAME, WAutoManage); \ ON_ACTIVATE (NAME, NAME) diff --git a/cde/programs/dtinfo/dtinfo/src/Agents/BookmarkEditMotif.hh b/cde/programs/dtinfo/dtinfo/src/Agents/BookmarkEditMotif.hh index 7c75f0983..2e1a6c408 100644 --- a/cde/programs/dtinfo/dtinfo/src/Agents/BookmarkEditMotif.hh +++ b/cde/programs/dtinfo/dtinfo/src/Agents/BookmarkEditMotif.hh @@ -93,9 +93,6 @@ protected: // variables WXmPushButtonGadget f_ok; bool f_modified; WCallback *f_wm_delete_callback; -#ifndef hpux static List g_editor_list; -#endif - static int g_modified_count; }; diff --git a/cde/programs/dtinfo/dtinfo/src/Agents/GraphicAgentMotif.C b/cde/programs/dtinfo/dtinfo/src/Agents/GraphicAgentMotif.C index acc46e11e..c10ba3a35 100644 --- a/cde/programs/dtinfo/dtinfo/src/Agents/GraphicAgentMotif.C +++ b/cde/programs/dtinfo/dtinfo/src/Agents/GraphicAgentMotif.C @@ -247,16 +247,6 @@ GraphicAgent::create_ui() DECL (WXmForm, form, f_shell, "form" ); DECLMC(WXmMenuBar, menu_bar, form, "menu_bar" ); -#ifdef hpux - // - // rtp: hard-wire the menu bar's background, since - // it comes up a bogus color. Copied from swm's - // change in NodeWindowAgentMotif.C - // - Pixel bg = form.Background(); - menu_bar.Background(bg); - -#endif DECLM (WXmCascadeButton, file, menu_bar, "file" ); DECLMC(WXmPulldownMenu, file_menu, menu_bar, "file_menu" ); DECLM (WXmPushButton, attach, file_menu, "attach" ); diff --git a/cde/programs/dtinfo/dtinfo/src/Agents/PrefAgentMotif.C b/cde/programs/dtinfo/dtinfo/src/Agents/PrefAgentMotif.C index ef75f934e..4fb191b8e 100644 --- a/cde/programs/dtinfo/dtinfo/src/Agents/PrefAgentMotif.C +++ b/cde/programs/dtinfo/dtinfo/src/Agents/PrefAgentMotif.C @@ -237,7 +237,7 @@ public: #define IS_CHANGED(X) (((Value *) (X).UserData())->changed) #define SET_CHANGED(X,V) ((Value *) (X).UserData())->changed = V -#if defined(__STDC__) || defined(hpux) +#if defined(__STDC__) #define ATTACH_VALUE(X,T,V) (X).UserData ((void *) new T##Value(V)) #define SET_VALUE(X,T,V) ((T##Value *) (X).UserData())->set_value(V) #define ORIGINAL_VALUE(X,T) ((T##Value *) (X).UserData())->original diff --git a/cde/programs/dtinfo/dtinfo/src/Agents/PrintPanelAgentMotif.hh b/cde/programs/dtinfo/dtinfo/src/Agents/PrintPanelAgentMotif.hh index 729c11398..4c6c2fc6d 100644 --- a/cde/programs/dtinfo/dtinfo/src/Agents/PrintPanelAgentMotif.hh +++ b/cde/programs/dtinfo/dtinfo/src/Agents/PrintPanelAgentMotif.hh @@ -74,7 +74,7 @@ class WTopLevelShell; #endif // This belongs in f'ing config.h -#if defined(SVR4) || defined(hpux) +#if defined(SVR4) # define pid_type pid_t #else # define pid_type int diff --git a/cde/programs/dtinfo/dtinfo/src/Basic/BitField.hh b/cde/programs/dtinfo/dtinfo/src/Basic/BitField.hh index aee1c62ab..09ac84305 100644 --- a/cde/programs/dtinfo/dtinfo/src/Basic/BitField.hh +++ b/cde/programs/dtinfo/dtinfo/src/Basic/BitField.hh @@ -46,7 +46,7 @@ * Campbell, CA 95008 * */ -#if defined(SVR4) || defined(hpux) || defined(__linux__) || defined(__NetBSD__) +#if defined(SVR4) || defined(__linux__) || defined(__NetBSD__) #include #else #include diff --git a/cde/programs/dtinfo/dtinfo/src/Basic/FolioObject.hh b/cde/programs/dtinfo/dtinfo/src/Basic/FolioObject.hh index 64c57fc60..cd1ce6838 100644 --- a/cde/programs/dtinfo/dtinfo/src/Basic/FolioObject.hh +++ b/cde/programs/dtinfo/dtinfo/src/Basic/FolioObject.hh @@ -54,7 +54,7 @@ typedef void (FolioObject::* notify_handler_t) (FolioObject *object, u_int notify_type, void *call_data, void *client_data); -#if defined(__STDC__) || defined(hpux) +#if defined(__STDC__) #define DEF_CLASS(C) \ virtual ClassType type() const; \ static ClassType C##Class diff --git a/cde/programs/dtinfo/dtinfo/src/Managers/PrefMgr.C b/cde/programs/dtinfo/dtinfo/src/Managers/PrefMgr.C index ef95ac755..78c83c59b 100644 --- a/cde/programs/dtinfo/dtinfo/src/Managers/PrefMgr.C +++ b/cde/programs/dtinfo/dtinfo/src/Managers/PrefMgr.C @@ -80,7 +80,7 @@ pref_mgr() } #endif -#if defined(__STDC__) || defined(hpux) +#if defined(__STDC__) # define DEFSYM(S) PrefSymbol PrefMgr::S = (PrefSymbol) #S #else # define DEFSYM(S) PrefSymbol PrefMgr::S = (PrefSymbol) "S" diff --git a/cde/programs/dtinfo/dtinfo/src/Other/WindowSystemMotif.C b/cde/programs/dtinfo/dtinfo/src/Other/WindowSystemMotif.C index b621843a5..e70c885b8 100644 --- a/cde/programs/dtinfo/dtinfo/src/Other/WindowSystemMotif.C +++ b/cde/programs/dtinfo/dtinfo/src/Other/WindowSystemMotif.C @@ -177,10 +177,6 @@ static unsigned char anno_double_bits[] = { #include #endif -#ifdef hpux -typedef void (*SIG_PF)(); -#endif - #include #include @@ -1599,7 +1595,7 @@ WindowSystem::interrupt_handler (int /* signal_number */) exit(1); } -#if defined(SVR4) || defined(hpux) || defined(_IBMR2) +#if defined(SVR4) || defined(_IBMR2) signal (SIGINT, (interrupt_handler_ptr)interrupt_handler); #endif } diff --git a/cde/programs/dtinfo/dtinfo/src/Preferences/UserPreference.C b/cde/programs/dtinfo/dtinfo/src/Preferences/UserPreference.C index a5e104b24..8464aa805 100644 --- a/cde/programs/dtinfo/dtinfo/src/Preferences/UserPreference.C +++ b/cde/programs/dtinfo/dtinfo/src/Preferences/UserPreference.C @@ -63,7 +63,7 @@ #include #include #include -#if !defined(hpux) && !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) +#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) #include #endif #include diff --git a/cde/programs/dtinfo/dtinfo/src/Templates.C b/cde/programs/dtinfo/dtinfo/src/Templates.C index e03f05c61..b9d067efd 100644 --- a/cde/programs/dtinfo/dtinfo/src/Templates.C +++ b/cde/programs/dtinfo/dtinfo/src/Templates.C @@ -422,7 +422,7 @@ typedef CC_TPtrDlist _ccTPtrDLstCvSegmnt_; #endif -#if defined(sun) | defined(hpux) +#if defined(sun) typedef UAS_Pointer _ptrString_; typedef UAS_Pointer _ptrCommon_; diff --git a/cde/programs/dtinfo/dtinfo/src/UAS/Base/UAS_Sender.hh b/cde/programs/dtinfo/dtinfo/src/UAS/Base/UAS_Sender.hh index dc5764c80..2c573b81e 100644 --- a/cde/programs/dtinfo/dtinfo/src/UAS/Base/UAS_Sender.hh +++ b/cde/programs/dtinfo/dtinfo/src/UAS/Base/UAS_Sender.hh @@ -27,7 +27,7 @@ # include "UAS_PtrList.hh" #ifndef CONCAT -#if defined(__STDC__) || defined(hpux) +#if defined(__STDC__) #define CONCAT(A,B) A##B #define CONCAT3(A,B,C) A##B##C #else diff --git a/cde/programs/dtinfo/dtinfo/src/UAS/Test/UserPreference.C b/cde/programs/dtinfo/dtinfo/src/UAS/Test/UserPreference.C index 73a1d953f..6fc3b9e2f 100644 --- a/cde/programs/dtinfo/dtinfo/src/UAS/Test/UserPreference.C +++ b/cde/programs/dtinfo/dtinfo/src/UAS/Test/UserPreference.C @@ -60,9 +60,7 @@ #include #include #include -#ifndef hpux #include -#endif #include #include #include diff --git a/cde/programs/dtinfo/dtinfo/src/config.h b/cde/programs/dtinfo/dtinfo/src/config.h index 3d0c9b5f1..4f899d05a 100644 --- a/cde/programs/dtinfo/dtinfo/src/config.h +++ b/cde/programs/dtinfo/dtinfo/src/config.h @@ -109,7 +109,7 @@ typedef unsigned char u_char; #define self *this #ifndef STRINGIFY -#if defined(__STDC__) || defined(hpux) +#if defined(__STDC__) #define STRINGIFY(S) #S #else #define STRINGIFY(S) "S" @@ -117,7 +117,7 @@ typedef unsigned char u_char; #endif #ifndef CONCAT -#if defined(__STDC__) || defined(hpux) +#if defined(__STDC__) #define CONCAT(A,B) A##B #define CONCAT3(A,B,C) A##B##C #else diff --git a/cde/programs/dtinfo/dtinfo/src/main.C b/cde/programs/dtinfo/dtinfo/src/main.C index 9ae141476..8d44d1d35 100644 --- a/cde/programs/dtinfo/dtinfo/src/main.C +++ b/cde/programs/dtinfo/dtinfo/src/main.C @@ -305,17 +305,3 @@ main(int argc, char **argv) return (0); } - -#ifdef hpux - -extern "C" { -void DosClose () { cerr << "DosClose\n"; } -void DosWrite () { cerr << "DosWrite\n"; } -void DosPeekNmPipe () { cerr << "DosPeekNmPipe\n"; } -void DosDisconnectNmPipe () { cerr << "DosDisconnectNmPipe\n"; } -void DosMakeNmPipe () { cerr << "DosMakeNmPipe\n"; } -void DosConnectNmPipe () { cerr << "DosConnectNmPipe\n"; } -void DosRead () { cerr << "DosRead\n"; } -} - -#endif diff --git a/cde/programs/dtlogin/account.c b/cde/programs/dtlogin/account.c index dc506c7bd..a9721c862 100644 --- a/cde/programs/dtlogin/account.c +++ b/cde/programs/dtlogin/account.c @@ -283,9 +283,6 @@ Account( struct display *d, char *user, char *line, pid_t pid, if (type == LOGIN_PROCESS && d->displayType.location != Local ) { #ifndef SVR4 snprintf(u->ut_host, sizeof(u->ut_host), "%s", d->name); -#endif -#ifdef __hpux - u->ut_addr = 0; #endif } diff --git a/cde/programs/dtlogin/auth.c b/cde/programs/dtlogin/auth.c index 64f807f40..ebbe51598 100644 --- a/cde/programs/dtlogin/auth.c +++ b/cde/programs/dtlogin/auth.c @@ -113,7 +113,7 @@ extern int errno; # include #endif -#if (defined(_POSIX_SOURCE) && !defined(AIXV3)) || defined(hpux) || defined(USG) || defined(SVR4) +#if (defined(_POSIX_SOURCE) && !defined(AIXV3)) || defined(SVR4) #define NEED_UTSNAME #include #endif @@ -747,7 +747,7 @@ DefineLocal (FILE *file, Xauth *auth) #ifdef NEED_UTSNAME - /* hpux: + /* * Why not use gethostname()? Well, at least on my system, I've had to * make an ugly kernel patch to get a name longer than 8 characters, and * uname() lets me access to the whole string (it smashes release, you @@ -760,9 +760,7 @@ DefineLocal (FILE *file, Xauth *auth) strcpy(displayname, name.nodename); } writeAddr (FamilyLocal, strlen (displayname), displayname, file, auth); -#endif - -#if (!defined(NEED_UTSNAME) || defined (hpux)) +#else /* AIXV3: * In AIXV3, _POSIX_SOURCE is defined, but uname gives only first * field of hostname. Thus, we use gethostname instead. @@ -952,7 +950,7 @@ DefineSelf (int fd, int file, int auth) struct sockaddr_in *inetaddr; - /* hpux: + /* * Why not use gethostname()? Well, at least on my system, I've had to * make an ugly kernel patch to get a name longer than 8 characters, and * uname() lets me access to the whole string (it smashes release, you diff --git a/cde/programs/dtlogin/bls/validate.c b/cde/programs/dtlogin/bls/validate.c index 028193416..26da467b8 100644 --- a/cde/programs/dtlogin/bls/validate.c +++ b/cde/programs/dtlogin/bls/validate.c @@ -45,7 +45,6 @@ ** ** BLS HP BLS B1 simple authentication. ** - ** __hpux HP-UX OS only ** **************************************************************************** ************************************<+>*************************************/ diff --git a/cde/programs/dtlogin/chooser.c b/cde/programs/dtlogin/chooser.c index 18084f2ec..4986e22f4 100644 --- a/cde/programs/dtlogin/chooser.c +++ b/cde/programs/dtlogin/chooser.c @@ -124,18 +124,12 @@ extern XtPointer _XmStringUngenerate ( #define ishexdigit(c) (isdigit(c) || 'a' <= (c) && (c) <= 'f') #endif -#ifdef hpux -# include -# ifdef HAS_IFREQ -# include -# endif -#else #ifdef __convex__ # include # include #endif -# include -#endif /* hpux */ + +#include #include diff --git a/cde/programs/dtlogin/config/Xconfig.src b/cde/programs/dtlogin/config/Xconfig.src index 75145925c..05294ba94 100644 --- a/cde/programs/dtlogin/config/Xconfig.src +++ b/cde/programs/dtlogin/config/Xconfig.src @@ -64,7 +64,7 @@ Dtlogin*startup: Xstartup Dtlogin*reset: Xreset Dtlogin*setup: Xsetup -#if defined (__hpux) || defined (_AIX) || defined (sun) || defined(CSRG_BASED) || defined(__linux__) +#if defined (_AIX) || defined (sun) || defined(CSRG_BASED) || defined(__linux__) Dtlogin*failsafeClient: Xfailsafe #else Dtlogin*failsafeClient: /usr/bin/X11/xterm diff --git a/cde/programs/dtlogin/config/Xresources.src b/cde/programs/dtlogin/config/Xresources.src index 2e1588e81..ca60991bf 100644 --- a/cde/programs/dtlogin/config/Xresources.src +++ b/cde/programs/dtlogin/config/Xresources.src @@ -326,72 +326,6 @@ Dtlogin*pt_BR.languageName : %|nls-246-##| #endif /* sun */ -#if defined (__hpux) -!!###################################################################### -!! -!! LANGUAGE MENU NAME MAPPINGS - -#undef C -XCOMM undef C -Dtlogin*C.languageName: %|nls-300-##| -Dtlogin*C.iso88591.languageName: %|nls-301-##| -Dtlogin*POSIX.languageName: %|nls-302-##| -Dtlogin*ar_DZ.arabic8.languageName: %|nls-303-##| -Dtlogin*ar_SA.arabic8.languageName: %|nls-304-##| -Dtlogin*ar_SA.iso88596.languageName: %|nls-305-##| -Dtlogin*bg_BG.iso88595.languageName: %|nls-306-##| -Dtlogin*cs_CZ.iso88592.languageName: %|nls-307-##| -Dtlogin*da_DK.iso88591.languageName: %|nls-308-##| -Dtlogin*da_DK.roman8.languageName: %|nls-309-##| -Dtlogin*de_DE.iso8859.languageName: %|nls-310-##| -Dtlogin*de_DE.roman8.languageName: %|nls-311-##| -Dtlogin*el_GR.greek8.languageName: %|nls-312-##| -Dtlogin*el_GR.iso88597.languageName: %|nls-313-##| -Dtlogin*en_GB.iso88591.languageName: %|nls-314-##| -Dtlogin*en_GB.roman8.languageName: %|nls-315-##| -Dtlogin*en_US.iso88591.languageName: %|nls-316-##| -Dtlogin*en_US.roman8.languageName: %|nls-317-##| -Dtlogin*es_ES.iso88591.languageName: %|nls-318-##| -Dtlogin*es_ES.roman8.languageName: %|nls-319-##| -Dtlogin*fi_FI.iso88591.languageName: %|nls-320-##| -Dtlogin*fi_FI.roman8.languageName: %|nls-321-##| -Dtlogin*fr_CA.iso88591.languageName: %|nls-322-##| -Dtlogin*fr_CA.roman8.languageName: %|nls-323-##| -Dtlogin*fr_FR.iso88591.languageName: %|nls-324-##| -Dtlogin*fr_FR.roman8.languageName: %|nls-325-##| -Dtlogin*hu_HU.iso88592.languageName: %|nls-327-##| -Dtlogin*is_IS.iso88591.languageName: %|nls-328-##| -Dtlogin*is_IS.roman8.languageName: %|nls-329-##| -Dtlogin*it_IT.iso88591.languageName: %|nls-330-##| -Dtlogin*it_IT.roman8.languageName: %|nls-331-##| -Dtlogin*iw_IL.hebrew8.languageName: %|nls-332-##| -Dtlogin*iw_IL.iso88598.languageName: %|nls-333-##| -Dtlogin*ja_JP.SJIS.languageName: %|nls-334-##| -Dtlogin*ja_JP.eucJP.languageName: %|nls-335-##| -Dtlogin*ja_JP.kana8.languageName: %|nls-336-##| -Dtlogin*ko_KR.eucKR.languageName: %|nls-337-##| -Dtlogin*nl_NL.iso88591.languageName: %|nls-338-##| -Dtlogin*nl_NL.roman8.languageName: %|nls-339-##| -Dtlogin*no_NO.iso88591.languageName: %|nls-340-##| -Dtlogin*no_NO.roman8.languageName: %|nls-341-##| -Dtlogin*pl_PL.iso88592.languageName: %|nls-342-##| -Dtlogin*pt_PT.iso88591.languageName: %|nls-343-##| -Dtlogin*pt_PT.roman8.languageName: %|nls-344-##| -Dtlogin*ro_RO.iso88592.languageName: %|nls-345-##| -Dtlogin*ru_RU.iso88595.languageName: %|nls-346-##| -Dtlogin*sh_HR.iso88592.languageName: %|nls-347-##| -Dtlogin*sl_SI.iso88592.languageName: %|nls-348-##| -Dtlogin*sv_SE.iso88591.languageName: %|nls-349-##| -Dtlogin*sv_SE.roman8.languageName: %|nls-350-##| -Dtlogin*th_TH.tis620.languageName: %|nls-351-##| -Dtlogin*tr_TR.iso88599.languageName: %|nls-352-##| -Dtlogin*tr_TR.turkish8.languageName: %|nls-353-##| -Dtlogin*zh_CN.hp15CN.languageName: %|nls-354-##| -Dtlogin*zh_TW.big5.languageName: %|nls-355-##| -Dtlogin*zh_TW.ccdc.languageName: %|nls-356-##| - -#endif /* __hpux */ - !!###################################################################### !! !! CHOOSER diff --git a/cde/programs/dtlogin/config/Xservers.src b/cde/programs/dtlogin/config/Xservers.src index 1ef3ef886..04fcb8199 100644 --- a/cde/programs/dtlogin/config/Xservers.src +++ b/cde/programs/dtlogin/config/Xservers.src @@ -97,8 +97,6 @@ XCOMM ########################################################################## :0 Local local@console /usr/bin/X11/X -T -force :0 #elif defined (sun) :0 Local local_uid@console root /usr/openwin/bin/X :0 -nobanner -#elif defined (__hpux) - * Local local@console /usr/bin/X11/X :0 #elif defined (_NO_CONSOLE) XCOMM * Local local@console /usr/bin/X11/X :0 #elif defined (__linux__) diff --git a/cde/programs/dtlogin/config/Xsession.src b/cde/programs/dtlogin/config/Xsession.src index ae82c4750..1769926fe 100644 --- a/cde/programs/dtlogin/config/Xsession.src +++ b/cde/programs/dtlogin/config/Xsession.src @@ -54,8 +54,6 @@ XCOMM ########################################################################## #if defined (_AIX) # define cpp_XINITUSER "$HOME/.xinitrc" # define cpp_MAIL "/var/spool/mail/$USER" -#elif defined (__hpux) -# define cpp_XDMSYS "/usr/lib/X11/xdm/sys.xsession" #elif defined (sun) # define cpp_XINITUSER "$HOME/.xinitrc" # define cpp_MAIL "/var/mail/$USER" @@ -63,11 +61,6 @@ XCOMM ########################################################################## # define cpp_HELLO "$DT_BINPATH/dthello -file $DT_INSTALL/copyright &" #endif -#if defined (__hpux) && defined (BLS) -# undef cpp_HELLO -# define cpp_HELLO "$DT_BINPATH/dthello -file /etc/copyright -file $HOME/.dtlogininfo &" -#endif - #ifdef linux # define cpp_MAIL "/var/mail/$USER" # define cpp_XDIR "/usr/bin" @@ -240,29 +233,6 @@ then fi #endif -#if defined (__hpux) - HASH - HASH Set the keyboard language if necessary... - HASH - if [ ! -z "$LANG" ] - then - case $LANG in - bulgarian | czech | hebrew | hungarian | \ - japanese | korean | polish | rumanian | \ - russian | serbocroatian) - KBD_LANG=$LANG - export KBD_LANG;; - - chinese-t) KBD_LANG=t_chinese - export KBD_LANG;; - chinese-s) KBD_LANG=s_chinese - export KBD_LANG;; - - *);; - esac - fi -#endif - HASH HASH Locate configuration file directories HASH diff --git a/cde/programs/dtlogin/daemon.c b/cde/programs/dtlogin/daemon.c index d1ee27b8d..8c8ceeee6 100644 --- a/cde/programs/dtlogin/daemon.c +++ b/cde/programs/dtlogin/daemon.c @@ -48,9 +48,6 @@ #include #include -#ifdef hpux -#include -#endif #ifdef SVR4 #include diff --git a/cde/programs/dtlogin/dm.c b/cde/programs/dtlogin/dm.c index aa2bbdb75..d81830a15 100644 --- a/cde/programs/dtlogin/dm.c +++ b/cde/programs/dtlogin/dm.c @@ -277,7 +277,7 @@ main( int argc, char **argv ) ScanServers (); StartDisplays (); (void) signal (SIGHUP, RescanNotify); -#if !defined(SYSV) || defined(hpux) || defined(_AIX) || defined(__linux__) +#if !defined(SYSV) || defined(_AIX) || defined(__linux__) (void) signal (SIGCHLD, ChildNotify); #endif while (AnyWellKnownSockets() || AnyDisplaysLeft ()) @@ -290,7 +290,7 @@ main( int argc, char **argv ) TrimErrorFile(); -#if defined(SYSV) && !defined(hpux) && !defined(_AIX) && !defined(__linux__) +#if defined(SYSV) && !defined(_AIX) && !defined(__linux__) WaitForChild (); #else WaitForSomething (); @@ -504,7 +504,7 @@ StopAll( int arg ) int ChildReady = 0; -#if !defined(SYSV) || defined(hpux) || defined(_AIX) || defined(__linux__) || defined(CSRG_BASED) +#if !defined(SYSV) || defined(_AIX) || defined(__linux__) || defined(CSRG_BASED) static SIGVAL ChildNotify( int arg ) { @@ -533,7 +533,7 @@ WaitForChild( void ) waitType status; int mask; -#if defined(SYSV) || defined(SVR4) || defined(hpux) || defined(__linux__) +#if defined(SYSV) || defined(SVR4) || defined(__linux__) if (AnyWellKnownSockets()) { while ( ChildReady ) { #if defined(SVR4) || defined(__linux__) diff --git a/cde/programs/dtlogin/dm.h b/cde/programs/dtlogin/dm.h index 5b589c506..3ae26e1e1 100644 --- a/cde/programs/dtlogin/dm.h +++ b/cde/programs/dtlogin/dm.h @@ -115,8 +115,6 @@ */ #if defined(_AIX) #define DEF_NLS_DIR "/usr/lib/nls/loc" -#elif defined(hpV4) - #define DEF_NLS_DIR "/usr/lib/nls/msg" #else #define DEF_NLS_DIR CDE_INSTALLATION_TOP "/lib/nls/msg" #endif @@ -195,14 +193,13 @@ * ***************************************************************************/ -/*#if defined(SYSV) && !defined(hpux)*/ #if defined(SYSV) || defined(SVR4) || defined(__linux__) || defined(CSRG_BASED) # include # define waitCode(w) WEXITSTATUS(w) # define waitSig(w) WTERMSIG(w) #if defined(_AIX) /* - * hpux has a "WCOREDUMP" macro which is undefined in AIX. + * "WCOREDUMP" is undefined in AIX. * For AIX, the macro from hpux's is used. */ # define waitCore(w) ( ((int)(w)&0200) == 0 ? 0 : 1 ) diff --git a/cde/programs/dtlogin/genauth.c b/cde/programs/dtlogin/genauth.c index dbbc8f3b9..f3b192ddc 100644 --- a/cde/programs/dtlogin/genauth.c +++ b/cde/programs/dtlogin/genauth.c @@ -106,7 +106,7 @@ extern int errno; #endif #if !defined(DONT_USE_DES) && !defined(USE_CRYPT) -# if defined(AIXV3) || defined(hpux) || defined(__FreeBSD__) +# if defined(AIXV3) || defined(__FreeBSD__) # define USE_CRYPT # elif defined(__OpenBSD__) # define DONT_USE_DES diff --git a/cde/programs/dtlogin/netaddr.c b/cde/programs/dtlogin/netaddr.c index dc477b187..e20899e08 100644 --- a/cde/programs/dtlogin/netaddr.c +++ b/cde/programs/dtlogin/netaddr.c @@ -190,12 +190,10 @@ int ConvertAddr (XdmcpNetaddr saddr, int *len, char **addr) break; #endif #ifdef AF_UNIX -#ifndef hpux case AF_UNIX: retval = FamilyLocal; break; #endif -#endif #ifdef TCPCONN case AF_INET: retval = FamilyInternet; diff --git a/cde/programs/dtlogin/resource.c b/cde/programs/dtlogin/resource.c index f93fc7676..cfd70f19e 100644 --- a/cde/programs/dtlogin/resource.c +++ b/cde/programs/dtlogin/resource.c @@ -201,11 +201,7 @@ static char AppName[16] = DTLOGIN; #define DEF_TIMEZONE "MST7MDT" #endif #ifndef DEF_SYS_PARMS_FILE -# if defined( __hpux ) -# define DEF_SYS_PARMS_FILE "/etc/src.sh" -# else -# define DEF_SYS_PARMS_FILE "/etc/TIMEZONE" -# endif +# define DEF_SYS_PARMS_FILE "/etc/TIMEZONE" #endif #define DEF_UDP_PORT "177" /* registered XDMCP port, don't change */ diff --git a/cde/programs/dtlogin/session.c b/cde/programs/dtlogin/session.c index b195126f9..6311c7a30 100644 --- a/cde/programs/dtlogin/session.c +++ b/cde/programs/dtlogin/session.c @@ -1485,11 +1485,7 @@ StartClient( struct verify_info *verify, struct display *d, int *pidp ) * the "setgroups()" call instead... */ -# if defined(__hpux) - initgroups(user, -1); -# else setgroups (verify->ngroups, verify->groups); -# endif /* setpenv() will set gid for AIX */ #if !defined (_AIX) @@ -1624,8 +1620,6 @@ StartClient( struct verify_info *verify, struct display *d, int *pidp ) failsafeArgv[i++] = "/usr/bin/X11/aixterm"; #elif defined(sun) failsafeArgv[i++] = "/usr/openwin/bin/xterm"; -#elif defined(__hpux) - failsafeArgv[i++] = "/usr/bin/X11/hpterm"; #elif defined(__OpenBSD__) failsafeArgv[i++] = "/usr/X11R6/bin/xterm"; #elif defined(__NetBSD__) diff --git a/cde/programs/dtlogin/sysauth.c b/cde/programs/dtlogin/sysauth.c index 3ecd7f4e1..466aefda5 100644 --- a/cde/programs/dtlogin/sysauth.c +++ b/cde/programs/dtlogin/sysauth.c @@ -63,7 +63,6 @@ ** ** Platform identification: ** - ** __hpux HP-UX OS only ** sun SUN OS only ** SVR4 SUN OS et al. ** _AIX AIX only @@ -115,7 +114,7 @@ /* * Define as generic those without platform specific code. */ -#if !(defined(__hpux) || defined(_AIX) || defined(sun) || \ +#if !(defined(_AIX) || defined(sun) || \ defined(HAS_PAM_LIBRARY)) #define generic #endif @@ -124,945 +123,6 @@ # include #endif -#ifdef __hpux -/*************************************************************************** - * - * Start authentication routines (HPUX) - * - ***************************************************************************/ - -#include /* for MAXUID macro */ -#include -#include -#include -#include -#include - - -#ifdef AUDIT -# include -# include -# include -# define SECUREPASS "/.secure/etc/passwd" -#endif - -#ifdef BLS -# include -# include -#endif - -#ifdef __AFS -#include -#endif /* __AFS */ - -#ifdef __KERBEROS -# include -# define KRBLIFE 255 /* max lifetime */ -#endif /* __KERBEROS */ - -#ifdef __PASSWD_ETC -# include "rgy_base.h" -#endif - - - -#define how_to_count ut_exit.e_exit - -#ifdef __hp9000s300 - int num_users[] = { 2, 32767 }; -# define MIN_VERSION 'A' -# define UNLIMITED 'B' -#else - int num_users[] = { 2, 16, 32, 64 , 8 }; -# define MIN_VERSION 'A' -# define UNLIMITED 'U' -#endif - -/* Maximum number of users allowed with restricted license */ -#if OSMAJORVERSION < 8 -# define MAX_STRICT_USERS 2 -#else -# define MAX_STRICT_USERS 8 -#endif - -#define NUM_VERSIONS (sizeof(num_users)/sizeof(num_users[0])) - 1 - -extern char *globalDisplayName; - -/*************************************************************************** - * - * External declarations (HPUX) - * - ***************************************************************************/ - -extern long groups[NGROUPS]; - - -#ifdef __PASSWD_ETC -extern boolean rgy_$using_local_registry(); -extern struct passwd * getpwnam_full(); -extern boolean is_acct_expired(); -extern boolean is_passwd_expired(); -extern boolean is_passwd_invalid(); -extern boolean rgy_$is_des(); -#endif - - - -/*************************************************************************** - * - * Procedure declarations (HPUX) - * - ***************************************************************************/ - -static void Audit( struct passwd *p, char *msg, int errnum) ; -static int CheckPassword( char *name, char *passwd, struct passwd **ppwd ); -static int CountUsers( int added_users) ; -static int CountUsersStrict( char *new_user) ; -static int PasswordAged( struct passwd *pw) ; -static void WriteBtmp( char *name) ; - - - - -/*************************************************************************** - * - * Global variables (HPUX) - * - ***************************************************************************/ - -#ifdef AUDIT - struct s_passwd *s_pwd; - struct stat s_pfile; - int secure; /* flag to denote existence of secure passwd file */ - int selfAuditOn; -#endif - -#ifdef BLS - struct pr_passwd *b1_pwd; -#endif - -#ifdef __PASSWD_ETC -rgy_$acct_admin_t admin_part; -rgy_$policy_t policy; -rgy_$acct_user_t user_part; -#endif - - - -/*************************************************************************** - * - * Audit (HPUX) - * - * Construct self audit record for event and write to the audit trail. - * This routine assumes that the effective uid is currently 0. If auditing - * is not defined, this routine does nothing. - ***************************************************************************/ - -static void -Audit( struct passwd *p, char *msg, int errnum ) -{ - - -#ifdef AUDIT - char *txtptr; - struct self_audit_rec audrec; - int status; -#endif - - /* - * make sure program is back to super-user... - */ - - setresuid(0,0,0); - - -#ifdef AUDIT - if (selfAuditOn) { - txtptr = (char *)audrec.aud_body.text; - sprintf(txtptr, "User= %s uid=%ld audid=%ld%s", p->pw_name, - (long)p->pw_uid, (long)p->pw_audid, msg); - audrec.aud_head.ah_pid = getpid(); - audrec.aud_head.ah_error = errnum; - audrec.aud_head.ah_event = EN_LOGINS; - audrec.aud_head.ah_len = strlen (txtptr); - status = audwrite(&audrec); - - if ( status != 0 ) { - switch (errno) { - - case EPERM: - LogError(ReadCatalog( - MC_LOG_SET,MC_LOG_NOT_SUSER,MC_DEF_LOG_NOT_SUSER)); - break; - - case EINVAL: - LogError(ReadCatalog( - MC_LOG_SET,MC_LOG_INV_EVENT,MC_DEF_LOG_INV_EVENT)); - break; - - default: - LogError(ReadCatalog( - MC_LOG_SET,MC_LOG_ERR_ERRNO,MC_DEF_LOG_ERR_ERRNO), - errno); - break; - } - } - } - -#else - return; -#endif -} - - - - - - -/*************************************************************************** - * - * CountUsers (HPUX only) - * - * see if new user has exceeded the maximum. - ***************************************************************************/ - -#define NCOUNT 16 - -static int -CountUsers( int added_users ) -{ - int count[NCOUNT], nusers, i; - struct utmp *entry; - - for (i=0; iut_type == USER_PROCESS) { - i = entry->how_to_count; - if (i < 0 || i >= NCOUNT) - i = 1; /* if out of range, then count */ - /* as ordinary user */ - count[i]++; - } - } - endutent(); - - /* - * KEY: - * [0] does not count at all - * [1] counts as real user - * [2] logins via a pty which have not gone trough login. These - * collectively count as 1 user IF count[3] is 0, otherwise, - * they are not counted. Starting with HP-UX 8.0 they are - * no longer counted at all. - * [3] logins via a pty which have been logged through login (i.e. - * rlogin and telnet). these count as 1 "real" user per - * unique user name. - * [4-15] may be used for groups of users which collectively - * count as 1 - */ - nusers = count[1]; - -#if OSMAJORVERSION < 8 - for (i=2; i 0) - nusers++; - - return(nusers); -} - - - - -/*************************************************************************** - * - * CountUsersStrict (HPUX only) - * - * see if new user has exceeded the maximum. - ***************************************************************************/ - -static int -CountUsersStrict( char *new_user ) -{ - char pty_users[MAX_STRICT_USERS][8]; - int count[NCOUNT], nusers, i, cnt, pty_off = -1, uname_off; - struct utmp *entry; - - /* - * Initialize count array... - */ - for (i = 0; i < NCOUNT; i++) - count[i] = 0; - - /* - * Add in the new user (we know it's not a pty)... - */ - count[1]++; - - while ( (entry = getutent()) != NULL ) { - if (entry->ut_type == USER_PROCESS) { - i = entry->how_to_count; - - /* if out of range, then count as ordinary user logged in - via a tty */ - if (i == 1 || (i < 0 || i >= NCOUNT)) - count[1]++; - /* See if it is a pty login granted by login program */ - else if (i == 3) { - count[3]++; - /* See if user is already logged in via login pty */ - uname_off = -1; - for (cnt = 0; cnt <= pty_off; cnt++) - if (strncmp(pty_users[cnt], entry->ut_user, 8) == 0) - uname_off = cnt; - - if (uname_off == -1) { /* user is not logged in via pty yet */ - - if (pty_off >= MAX_STRICT_USERS) /* cannot add any - more users */ - return(MAX_STRICT_USERS + 1); - /* add the user name to the array of pty users */ - else - strncpy(pty_users[++pty_off], entry->ut_user, 8); - } - } /* end if (i == 3) */ - else - count[i]++; - } /* end if entry->ut_type == USER_PROCESS */ - } /* end while (entry = getutent()) */ - - endutent(); - /* - * KEY: - * [0] does not count at all - * [1] counts as "real" user - * [2] logins via a pty which have not gone trough login. These - * collectively count as 1 user IF count[3] is 0, otherwise, - * they are not counted. Starting with HP-UX 8.0 they are - * no longer counted at all. - * [3] logins via a pty which have been logged through login (i.e. - * rlogin and telnet). these count as 1 "real" user per - * unique user name. - * [4-15] may be used for groups of users which collectively count - * as 1 - */ - - nusers = pty_off + 1 + count[1]; /* Current number of users is sum of - users logged in via tty + the - number of unique users logged in - via pty which have gone through - login */ - -#if OSMAJORVERSION < 8 - if ((count[3] == 0) && (count[2] != 0)) - nusers++; /* Add 1 user for all pty logins IF - none of pty logins have been - granted by the login program */ -#else - /* - * Don't count any hpterm logins (exit status of 2). We already - * counted all pty logins granted by the login program. - */ -#endif - - for (i = 4; i < NCOUNT; i++) - if (count[i] > 0) - nusers++; - return(nusers); -} - - - - -/*************************************************************************** - * - * PasswordAged (HPUX) - * - * see if password has aged - ***************************************************************************/ -#define SECONDS_IN_WEEK 604800L - -static int -PasswordAged( struct passwd *pw ) -{ - long change_week; /* week password was changed (1/1/70 = Week 0) */ - long last_week; /* week after which password must change */ - long first_week; /* week before which password can't change */ - long this_week; /* this week derived from time() */ - - char *passwdAge; /* password aging time */ - -#ifdef __PASSWD_ETC - boolean lrgy; -#endif - - - passwdAge = pw->pw_age; - -#ifdef AUDIT - if (secure) - passwdAge = s_pwd->pw_age; -#endif - - -#ifdef __PASSWD_ETC - /* Account validity checks: If we were able to connect to the network - * registry, then we've acquired account and policy data and can perform - * account/password checking - */ - - lrgy = rgy_$using_local_registry(); - if ( !lrgy ) { - - /* Check for password expiration or invalidity */ - if ( rgy_$is_passwd_expired(&user_part, &policy ) != 0 ) { - return TRUE; - } - } - return FALSE; - -#else - - if (*passwdAge == NULL) - return(0); - - first_week = last_week = change_week = (long) a64l(passwdAge); - last_week &= 0x3f; /* first six bits */ - first_week = (first_week >> 6) & 0x3f; /* next six bits */ - change_week >>= 12; /* everything else */ - - this_week = (long) time((long *) 0) / SECONDS_IN_WEEK; - -/* -** Password aging conditions: -** * if the last week is less than the first week (e.g., the aging -** field looks like "./"), only the superuser can change the -** password. We don't request a new password. -** * if the week the password was last changed is after this week, -** we have a problem, and request a new password. -** * if this week is after the specified aging time, we request -** a new password. -*/ - if (last_week < first_week) - return(0); - - if (change_week <= this_week && this_week <= (change_week + last_week)) - return(0); - - return(1); - -#endif -} - - - -/*************************************************************************** - * - * CheckPassword (HPUX only) - * - * Check validity of user password. One of several authentication schemes - * can be used, including Kerberos, AFS 3, HP BLS and traditional - * /etc/passwd. These are selectable via a resource in Dtlogin. - * - * Domain registry authentication (PasswdEtc) can also be compiled in as - * the only authentication scheme used. - * - ***************************************************************************/ - -static int -CheckPassword( char *name, char *passwd, struct passwd **ppwd ) -{ - - char *crypt(); - struct passwd *p; - - char *reason; - -#ifdef __KERBEROS - char realm[REALM_SZ]; - int kerno; -#endif /* __KERBEROS */ - - -#ifdef AUDIT - /* - * validate that user has an entry in the shadow password file on an - * HP-UX C2 trusted system. Keep info in a global structure. - */ - if (secure) { - setspwent(); - s_pwd = getspwnam(name); - endspwent(); - - if (s_pwd == NULL) - return(FALSE); - } -#endif - - - /* - * look up user's regular account information... - */ - -#ifdef __PASSWD_ETC - /* - * look up entry from registry... - * - * need getpwnam_full to get policy data for passwd expiration - * or invalidity... - */ - p = getpwnam_full(name, &user_part, &admin_part, &policy); -#else - p = getpwnam(name); -#endif - - endpwent(); - *ppwd = p; - - if ( p == NULL || strlen(name) == 0 ) - return(FALSE); - - -#ifdef __AFS - - /* - * AFS password authentication... - */ - - if ( vg_IsVerifyName(VN_AFS) ) { - - if ( ka_UserAuthenticateGeneral( - KA_USERAUTH_VERSION + KA_USERAUTH_DOSETPAG, - p->pw_name, /* kerberos name */ - (char *)0, /* instance */ - (char *)0, /* realm */ - passwd, /* password */ - 0, /* default lifetime */ - 0, /* spare 1 */ - 0, /* spare 2 */ - &reason) == 0 ) { /* error string */ - - if (strcmp(p->pw_passwd, "*") == 0) - return(FALSE); - else - return(TRUE); - } - - else { - LogError(ReadCatalog( - MC_LOG_SET,MC_LOG_AFS_FAILATH,MC_DEF_LOG_AFS_FAILATH),reason); - } - } -#endif /* __AFS */ - - -#ifdef __KERBEROS - - /* - * Kerberos password authentication... - */ - - if ( vg_IsVerifyName(VN_KRB) ) { - - (void)krb_get_lrealm(realm, 1); - - setresuid(p->pw_uid, p->pw_uid, -1); - kerno = krb_get_pw_in_tkt(p->pw_name, - "", - realm, - "krbtgt", - realm, - KRBLIFE, - passwd); - - setresuid(0, 0, -1); - - if (kerno == KSUCCESS) - if (strcmp(p->pw_passwd, "*") == 0) - return(FALSE); - else - return(TRUE); - - } -#endif /* __KERBEROS */ - - - - /* - * traditional password verification... - */ - - if (strcmp (crypt (passwd, p->pw_passwd), p->pw_passwd) == 0) - return(TRUE); - - -#ifdef __PASSWD_ETC - /* - * If regular passwd check fails, try old-style SR - */ - - if (rgy_$is_des(passwd, strlen(passwd), p->pw_passwd) == TRUE) - return (TRUE); -#endif - - - /* - * all password checks failed... - */ - - return (FALSE); - -} - - - - -/*************************************************************************** - * - * Authenticate (HPUX) - * - * verify the user - * - * return codes indicate authentication results. - ***************************************************************************/ - -#define MAXATTEMPTS 3 - -struct passwd nouser = {"", "nope"}; /* invalid user password struct */ - -int -Authenticate( struct display *d, char *name, char *passwd, char **msg ) -{ - - static int login_attempts = 0; /* # failed authentications */ - - struct passwd *p = NULL; /* password structure */ - - struct utsname utsnam; - int n; - - char *origpw; - - /* - * Nothing to do if no name provided. - */ - if (!name) - return(VF_INVALID); - -#ifdef SIA - - if (strlen(name) == 0) - return(VF_INVALID); - - if (!passwd) - return(VF_CHALLENGE); - - return(VF_OK); - -#endif - - /* - * Save provided password. - */ - origpw = passwd; - if (!passwd) passwd = ""; - -#ifdef AUDIT - /* - * turn on self auditing... - */ - - if (audswitch(AUD_SUSPEND) == -1) - selfAuditOn = FALSE; - else - selfAuditOn = TRUE; - - /* - * set the secure flag if SECUREPASS exists. If so, we - * are using it for authentication instead of /etc/passwd... - */ - - secure = (stat(SECUREPASS, &s_pfile) < 0) ? 0:1; - - - /* - * set the audit process flag unconditionally on since we want - * to log all logins regardless of whether the user's audit - * flag is set... - */ - - if (secure) - setaudproc(AUD_PROC); - -#endif /* AUDIT */ - - - /* - * validate password... - */ - - if ( CheckPassword(name, passwd, &p) == FALSE) { - - WriteBtmp(name); - - if ((++login_attempts % MAXATTEMPTS) == 0 ) { - - if (p == NULL ) - p = &nouser; - - Audit(p, " Failed login (bailout)", 1); - - } - - return(origpw ? VF_INVALID : VF_CHALLENGE); - } - - - /* - * check restricted license... - * - * Note: This only applies to local displays. Foreign displays - * (i.e. X-terminals) apparently do not count. - */ - - /* Get the version info via uname. If it doesn't look right, - * assume the smallest user configuration - */ - - if (uname(&utsnam) < 0) - utsnam.version[0] = MIN_VERSION; - - /* - * Mappings: - * 834 -> 834 - * 844 -> 844 - * 836 -> 635 - * 846 -> 645 - * 843 -> 642 - * 853 -> 652 - */ - - if ((!strncmp(utsnam.machine, "9000/834", UTSLEN)) || - (!strncmp(utsnam.machine, "9000/844", UTSLEN)) || - (!strncmp(utsnam.machine, "9000/836", UTSLEN)) || - (!strncmp(utsnam.machine, "9000/846", UTSLEN)) || - (!strncmp(utsnam.machine, "9000/843", UTSLEN)) || - (!strncmp(utsnam.machine, "9000/853", UTSLEN))) { - -/* strict_count = 1;*/ - if (CountUsersStrict(name) > MAX_STRICT_USERS) { - Audit(p, - " attempted to login - too many users on the system", - 20); - - return(VF_MAX_USERS); - } - } - else { - if (utsnam.version[0] != UNLIMITED) { - if ((utsnam.version[0]-'A' < 0) || - (utsnam.version[0]-'A' > NUM_VERSIONS)) - utsnam.version[0] = MIN_VERSION; - - n = (int) utsnam.version[0] - 'A'; - if (CountUsers(1) > num_users[n]) { - Audit(p, - " attempted to login - too many users on the system", - 20); - - return(VF_MAX_USERS); - } - } - } - - -#ifdef __PASSWD_ETC - /* - * Check for account validity. Unfortunately, we have no graphical - * dialog for this at this time so the best we can do is log an - * error message and hope the system administrator sees it. - */ - - if ( !rgy_$using_local_registry() ) { - if (rgy_$is_acct_expired(&admin_part) != 0 ) { - LogError(ReadCatalog(MC_LOG_SET,MC_LOG_ACC_EXP,MC_DEF_LOG_ACC_EXP), - name); - return(VF_INVALID); - } - } -#endif - - /* - * check password aging... - */ - - if ( PasswordAged(p) ) return(VF_PASSWD_AGED); - - - /* - * verify home directory exists... - */ - - if(chdir(p->pw_dir) < 0) { - Audit(p, " attempted to login - no home directory", 1); - return(VF_HOME); - } - - -#ifdef AUDIT - /* - * check audit flag and id... - */ - - setresuid(0,0,0); - - if (secure && (p->pw_audflg > 1 || p->pw_audflg < 0)) { - Audit(p, " attempted to login - bad audit flag", 1); - return(VF_BAD_AFLAG); - } - - if (secure && (setaudid(p->pw_audid) == -1 )) { - Audit(p, " attempted to login - bad audit id", 1); - return(VF_BAD_AID); - } -#endif /* AUDIT */ - - - /* - * validate uid and gid... - */ - - if ((p->pw_gid < 0) || - (p->pw_gid > MAXUID) || - (setgid(p->pw_gid) == -1)) { - - Audit(p, " attempted to login - bad group id", 1); - return(VF_BAD_GID); - } - - -#ifdef __AFS - /* - * ka_UserAuthenticateGeneral() sets the group access of this process - * to the proper PAG. Pick up these values and pass them back to - * Dtlogin to be put into the user's environment... - */ - - if ( vg_IsVerifyName(VN_AFS) ) { - groups[0] = groups[1] = 0; - getgroups(NGROUPS, groups); - } - -#endif /* __AFS */ - - - if ((p->pw_uid < 0) || - (p->pw_uid > MAXUID) || - (setresuid(p->pw_uid, p->pw_uid, 0) == -1)) { - - Audit(p, " attempted to login - bad user id", 1); - return(VF_BAD_UID); - } - - - - - /* - * verify ok... - */ - - Audit(p, " Successful login", 0); - return(VF_OK); -} - - - - -/*************************************************************************** - * - * WriteBtmp (HPUX) - * - * log bad login attempts - * - ***************************************************************************/ - -static void -WriteBtmp( char *name ) -{ - int fd; - struct utmp utmp, *u; - - int found=FALSE; - - bzero(&utmp, sizeof(struct utmp)); - - utmp.ut_pid = getppid(); - while ((u = getutent()) != NULL) { - if ( (u->ut_type == INIT_PROCESS || - u->ut_type == LOGIN_PROCESS || - u->ut_type == USER_PROCESS) && - u->ut_pid == utmp.ut_pid ) { - - found = TRUE; - break; - } - } - - - /* - * if no utmp entry, this may be an X-terminal. Construct a utmp - * entry for it... - */ - - if ( ! found ) { - strncpy(utmp.ut_id, "??", sizeof(utmp.ut_id)); - strncpy(utmp.ut_line, globalDisplayName, sizeof(utmp.ut_line)); - utmp.ut_type = LOGIN_PROCESS; -#ifndef SVR4 - strncpy(utmp.ut_host, globalDisplayName, sizeof(utmp.ut_host)); -#endif - u = &utmp; - } - - - /* - * If btmp exists, then record the bad attempt - */ - if ( (fd = open(BTMP_FILE,O_WRONLY|O_APPEND)) >= 0) { - strncpy(u->ut_user, name, sizeof(u->ut_user)); - (void) time(&u->ut_time); - write(fd, (char *)u, sizeof(utmp)); - (void) close(fd); - } - - endutent(); /* Close utmp file */ -} - -/*************************************************************************** - * - * End authentication routines (HPUX) - * - ***************************************************************************/ -#endif /* __hpux */ - - -/*************************************************************************** - *************************************************************************** - *************************************************************************** - *************************************************************************** - *************************************************************************** - *************************************************************************** - *************************************************************************** - ***************************************************************************/ - - #if defined(sun) || defined(HAS_PAM_LIBRARY) /*************************************************************************** diff --git a/cde/programs/dtlogin/util.c b/cde/programs/dtlogin/util.c index e42d7a99b..26f11a162 100644 --- a/cde/programs/dtlogin/util.c +++ b/cde/programs/dtlogin/util.c @@ -579,107 +579,7 @@ ScanNLSDir(char *dirname) } } -#elif defined(hpV4) - -#define LOCALE "locale.inf" -#define LOCALEOLD "locale.def" -#define COLLATE8 "collate8" -#define MAILX "mailx" -#define ELM "elm" -#define MSGCAT ".cat" -#define DOT "." -#define DOTDOT ".." - -/* - * Scan for installed locales on HP platform. - */ -{ - /*************************************************************************** - * Scan supplied NLS directory structure to see if it contains an - * installed language. If so, the name of the language is appended - * to a global list of languages. - * - * This routine is recursively called as a directory structure is - * traversed. - * - *************************************************************************/ - - DIR *dirp; - struct dirent *dp; - struct stat statb; - - char buf[1024]; - - /* - * Scan input directory, looking for a LOCALE file. If a sub-directory - * is found, recurse down into it... - */ - if ( (dirp = opendir(dirname)) != NULL ) - { - while ( (dp = readdir(dirp)) != NULL ) - { - /* - * ignore files that are known not to be candidates... - */ - if ( MatchesFileSuffix(dp->d_name, MSGCAT) || - (strcmp (dp->d_name, COLLATE8) == 0 ) || - (strcmp (dp->d_name, MAILX) == 0 ) || - (strcmp (dp->d_name, ELM) == 0 ) || - (strcmp (dp->d_name, DOT) == 0 ) || - (strcmp (dp->d_name, DOTDOT) == 0 ) ) - continue; - - - /* - * check to see if this is the locale file... - */ - if ( (strcmp(dp->d_name, LOCALEOLD) == 0 ) || - (strcmp(dp->d_name, LOCALE) == 0 ) ) - { - char *p, *s; - - /* - * Convert directory name to language name... - */ - if ( (p = strstr(dirname, DEF_NLS_DIR)) != NULL ) - { - p += strlen(DEF_NLS_DIR); - if ( *p == '/' ) - p++; - - s = p; - while ( (p = strchr(s,'/')) != NULL ) - *p = '.'; - - /* - * append to global list of languages... - */ - if ((int) (strlen(languageList)+strlen(s)+2) < LANGLISTSIZE) - { - strcat(languageList, " "); - strcat(languageList, s); - } - } - - continue; - } - - /* - * if this file is a directory, scan it also... - */ - strcpy(buf, dirname); - strcat(buf, "/"); - strcat(buf, dp->d_name); - - if (stat(buf, &statb) == 0 && S_ISDIR(statb.st_mode)) - ScanNLSDir(buf); - } - - closedir(dirp); - } -} - -#else /* !_AIX && !hpV4 */ +#else /* !_AIX */ /* * Scan for installed locales on generic platform */ diff --git a/cde/programs/dtlogin/verify.c b/cde/programs/dtlogin/verify.c index d9f70fe3a..fa2abb30a 100644 --- a/cde/programs/dtlogin/verify.c +++ b/cde/programs/dtlogin/verify.c @@ -569,12 +569,6 @@ systemEnv( struct display *d, char *user, char *home ) #ifdef NGROUPS -#ifndef __hpux - -/* - * groupMember() not used in HP-UX - */ - int groupMember( char *name, @@ -587,8 +581,6 @@ groupMember( } return 0; } -#endif /* ! __hpux */ - void getGroups( @@ -609,7 +601,6 @@ getGroups( * this code... */ -#if !(defined(__hpux)) while ( (g = getgrent()) != NULL ) { /* * make the list unique @@ -628,7 +619,6 @@ getGroups( verify->groups[ngroups++] = g->gr_gid; } } -#endif verify->ngroups = ngroups; endgrent (); } diff --git a/cde/programs/dtlogin/vgauth.c b/cde/programs/dtlogin/vgauth.c index 41dc6f9ce..56521c9a4 100644 --- a/cde/programs/dtlogin/vgauth.c +++ b/cde/programs/dtlogin/vgauth.c @@ -63,7 +63,6 @@ ** ** Platform identification: ** - ** __hpux HP-UX OS only ** sun SUN OS only ** SVR4 SUN OS et al. ** _AIX AIX only @@ -97,937 +96,10 @@ /* * Define as generic those without platform specific code. */ -#if !(defined(__hpux) || defined(_AIX) || defined(sun)) +#if !(defined(_AIX) || defined(sun)) #define generic #endif -#ifdef __hpux -/*************************************************************************** - * - * Start authentication routines (HPUX) - * - ***************************************************************************/ - -#include /* for MAXUID macro */ -#include -#include -#include -#include -#include - - -#ifdef AUDIT -# include -# include -# include -# define SECUREPASS "/.secure/etc/passwd" -#endif - -#ifdef BLS -# include -# include -#endif - -#ifdef __AFS -#include -#endif /* __AFS */ - -#ifdef __KERBEROS -# include -# define KRBLIFE 255 /* max lifetime */ -#endif /* __KERBEROS */ - -#ifdef __PASSWD_ETC -# include "rgy_base.h" -#endif - - - -#define how_to_count ut_exit.e_exit - -#ifdef __hp9000s300 - int num_users[] = { 2, 32767 }; -# define MIN_VERSION 'A' -# define UNLIMITED 'B' -#else - int num_users[] = { 2, 16, 32, 64 , 8 }; -# define MIN_VERSION 'A' -# define UNLIMITED 'U' -#endif - -/* Maximum number of users allowed with restricted license */ -#if OSMAJORVERSION < 8 -# define MAX_STRICT_USERS 2 -#else -# define MAX_STRICT_USERS 8 -#endif - -#define NUM_VERSIONS (sizeof(num_users)/sizeof(num_users[0])) - 1 - - - -/*************************************************************************** - * - * External declarations (HPUX) - * - ***************************************************************************/ - -extern Widget focusWidget; /* login or password text field */ - -extern long groups[NGROUPS]; - - -#ifdef __PASSWD_ETC -extern boolean rgy_$using_local_registry(); -extern struct passwd * getpwnam_full(); -extern boolean is_acct_expired(); -extern boolean is_passwd_expired(); -extern boolean is_passwd_invalid(); -extern boolean rgy_$is_des(); -#endif - - - -/*************************************************************************** - * - * Procedure declarations (HPUX) - * - ***************************************************************************/ - -static void Audit( struct passwd *p, char *msg, int errnum) ; -static int CheckPassword( char *name, char *passwd, struct passwd **ppwd ); -static int CountUsers( int added_users) ; -static int CountUsersStrict( char *new_user) ; -static int PasswordAged( struct passwd *pw) ; -static void WriteBtmp( char *name) ; - - - - -/*************************************************************************** - * - * Global variables (HPUX) - * - ***************************************************************************/ - -#ifdef AUDIT - struct s_passwd *s_pwd; - struct stat s_pfile; - int secure; /* flag to denote existence of secure passwd file */ - Boolean selfAuditOn; -#endif - -#ifdef BLS - struct pr_passwd *b1_pwd; -#endif - -#ifdef __PASSWD_ETC -rgy_$acct_admin_t admin_part; -rgy_$policy_t policy; -rgy_$acct_user_t user_part; -#endif - - - -/*************************************************************************** - * - * Audit (HPUX) - * - * Construct self audit record for event and write to the audit trail. - * This routine assumes that the effective uid is currently 0. If auditing - * is not defined, this routine does nothing. - ***************************************************************************/ - -static void -Audit( struct passwd *p, char *msg, int errnum ) -{ - - -#ifdef AUDIT - char *txtptr; - struct self_audit_rec audrec; - int status; -#endif - - /* - * make sure program is back to super-user... - */ - - setresuid(0,0,0); - - -#ifdef AUDIT - if (selfAuditOn) { - txtptr = (char *)audrec.aud_body.text; - sprintf(txtptr, "User= %s uid=%ld audid=%ld%s", p->pw_name, - (long)p->pw_uid, (long)p->pw_audid, msg); - audrec.aud_head.ah_pid = getpid(); - audrec.aud_head.ah_error = errnum; - audrec.aud_head.ah_event = EN_LOGINS; - audrec.aud_head.ah_len = strlen (txtptr); - status = audwrite(&audrec); - - if ( status != 0 ) { - switch (errno) { - - case EPERM: - LogError(ReadCatalog( - MC_LOG_SET,MC_LOG_NOT_SUSER,MC_DEF_LOG_NOT_SUSER)); - break; - - case EINVAL: - LogError(ReadCatalog( - MC_LOG_SET,MC_LOG_INV_EVENT,MC_DEF_LOG_INV_EVENT)); - break; - - default: - LogError(ReadCatalog( - MC_LOG_SET,MC_LOG_ERR_ERRNO,MC_DEF_LOG_ERR_ERRNO), - errno); - break; - } - } - } - -#else - return; -#endif -} - - - - - - -/*************************************************************************** - * - * CountUsers (HPUX only) - * - * see if new user has exceeded the maximum. - ***************************************************************************/ - -#define NCOUNT 16 - -static int -CountUsers( int added_users ) -{ - int count[NCOUNT], nusers, i; - struct utmp *entry; - - for (i=0; iut_type == USER_PROCESS) { - i = entry->how_to_count; - if (i < 0 || i >= NCOUNT) - i = 1; /* if out of range, then count */ - /* as ordinary user */ - count[i]++; - } - } - endutent(); - - /* - * KEY: - * [0] does not count at all - * [1] counts as real user - * [2] logins via a pty which have not gone trough login. These - * collectively count as 1 user IF count[3] is 0, otherwise, - * they are not counted. Starting with HP-UX 8.0 they are - * no longer counted at all. - * [3] logins via a pty which have been logged through login (i.e. - * rlogin and telnet). these count as 1 "real" user per - * unique user name. - * [4-15] may be used for groups of users which collectively - * count as 1 - */ - nusers = count[1]; - -#if OSMAJORVERSION < 8 - for (i=2; i 0) - nusers++; - - return(nusers); -} - - - - -/*************************************************************************** - * - * CountUsersStrict (HPUX only) - * - * see if new user has exceeded the maximum. - ***************************************************************************/ - -static int -CountUsersStrict( char *new_user ) -{ - char pty_users[MAX_STRICT_USERS][8]; - int count[NCOUNT], nusers, i, cnt, pty_off = -1, uname_off; - struct utmp *entry; - - /* - * Initialize count array... - */ - for (i = 0; i < NCOUNT; i++) - count[i] = 0; - - /* - * Add in the new user (we know it's not a pty)... - */ - count[1]++; - - while ( (entry = getutent()) != NULL ) { - if (entry->ut_type == USER_PROCESS) { - i = entry->how_to_count; - - /* if out of range, then count as ordinary user logged in - via a tty */ - if (i == 1 || (i < 0 || i >= NCOUNT)) - count[1]++; - /* See if it is a pty login granted by login program */ - else if (i == 3) { - count[3]++; - /* See if user is already logged in via login pty */ - uname_off = -1; - for (cnt = 0; cnt <= pty_off; cnt++) - if (strncmp(pty_users[cnt], entry->ut_user, 8) == 0) - uname_off = cnt; - - if (uname_off == -1) { /* user is not logged in via pty yet */ - - if (pty_off >= MAX_STRICT_USERS) /* cannot add any - more users */ - return(MAX_STRICT_USERS + 1); - /* add the user name to the array of pty users */ - else - strncpy(pty_users[++pty_off], entry->ut_user, 8); - } - } /* end if (i == 3) */ - else - count[i]++; - } /* end if entry->ut_type == USER_PROCESS */ - } /* end while (entry = getutent()) */ - - endutent(); - /* - * KEY: - * [0] does not count at all - * [1] counts as "real" user - * [2] logins via a pty which have not gone trough login. These - * collectively count as 1 user IF count[3] is 0, otherwise, - * they are not counted. Starting with HP-UX 8.0 they are - * no longer counted at all. - * [3] logins via a pty which have been logged through login (i.e. - * rlogin and telnet). these count as 1 "real" user per - * unique user name. - * [4-15] may be used for groups of users which collectively count - * as 1 - */ - - nusers = pty_off + 1 + count[1]; /* Current number of users is sum of - users logged in via tty + the - number of unique users logged in - via pty which have gone through - login */ - -#if OSMAJORVERSION < 8 - if ((count[3] == 0) && (count[2] != 0)) - nusers++; /* Add 1 user for all pty logins IF - none of pty logins have been - granted by the login program */ -#else - /* - * Don't count any hpterm logins (exit status of 2). We already - * counted all pty logins granted by the login program. - */ -#endif - - for (i = 4; i < NCOUNT; i++) - if (count[i] > 0) - nusers++; - return(nusers); -} - - - - -/*************************************************************************** - * - * PasswordAged (HPUX) - * - * see if password has aged - ***************************************************************************/ -#define SECONDS_IN_WEEK 604800L - -static int -PasswordAged( struct passwd *pw ) -{ - long change_week; /* week password was changed (1/1/70 = Week 0) */ - long last_week; /* week after which password must change */ - long first_week; /* week before which password can't change */ - long this_week; /* this week derived from time() */ - - char *passwdAge; /* password aging time */ - -#ifdef __PASSWD_ETC - boolean lrgy; -#endif - - - passwdAge = pw->pw_age; - -#ifdef AUDIT - if (secure) - passwdAge = s_pwd->pw_age; -#endif - - -#ifdef __PASSWD_ETC - /* Account validity checks: If we were able to connect to the network - * registry, then we've acquired account and policy data and can perform - * account/password checking - */ - - lrgy = rgy_$using_local_registry(); - if ( !lrgy ) { - - /* Check for password expiration or invalidity */ - if ( rgy_$is_passwd_expired(&user_part, &policy ) != 0 ) { - return TRUE; - } - } - return FALSE; - -#else - - if (*passwdAge == NULL) - return(0); - - first_week = last_week = change_week = (long) a64l(passwdAge); - last_week &= 0x3f; /* first six bits */ - first_week = (first_week >> 6) & 0x3f; /* next six bits */ - change_week >>= 12; /* everything else */ - - this_week = (long) time((long *) 0) / SECONDS_IN_WEEK; - -/* -** Password aging conditions: -** * if the last week is less than the first week (e.g., the aging -** field looks like "./"), only the superuser can change the -** password. We don't request a new password. -** * if the week the password was last changed is after this week, -** we have a problem, and request a new password. -** * if this week is after the specified aging time, we request -** a new password. -*/ - if (last_week < first_week) - return(0); - - if (change_week <= this_week && this_week <= (change_week + last_week)) - return(0); - - return(1); - -#endif -} - - - -/*************************************************************************** - * - * CheckPassword (HPUX only) - * - * Check validity of user password. One of several authentication schemes - * can be used, including Kerberos, AFS 3, HP BLS and traditional - * /etc/passwd. These are selectable via a resource in Dtlogin. - * - * Domain registry authentication (PasswdEtc) can also be compiled in as - * the only authentication scheme used. - * - ***************************************************************************/ - -static int -CheckPassword( char *name, char *passwd, struct passwd **ppwd ) -{ - - char *crypt(); - struct passwd *p; - - char *reason; - -#ifdef __KERBEROS - char realm[REALM_SZ]; - int kerno; -#endif /* __KERBEROS */ - - -#ifdef AUDIT - /* - * validate that user has an entry in the shadow password file on an - * HP-UX C2 trusted system. Keep info in a global structure. - */ - if (secure) { - setspwent(); - s_pwd = getspwnam(name); - endspwent(); - - if (s_pwd == NULL) - return(FALSE); - } -#endif - - - /* - * look up user's regular account information... - */ - -#ifdef __PASSWD_ETC - /* - * look up entry from registry... - * - * need getpwnam_full to get policy data for passwd expiration - * or invalidity... - */ - p = getpwnam_full(name, &user_part, &admin_part, &policy); -#else - p = getpwnam(name); -#endif - - endpwent(); - *ppwd = p; - - if ( p == NULL || strlen(name) == 0 ) - return(FALSE); - - -#ifdef __AFS - - /* - * AFS password authentication... - */ - - if ( IsVerifyName(VN_AFS) ) { - - if (focusWidget == login_text) - return(FALSE); - - if ( ka_UserAuthenticateGeneral( - KA_USERAUTH_VERSION + KA_USERAUTH_DOSETPAG, - p->pw_name, /* kerberos name */ - (char *)0, /* instance */ - (char *)0, /* realm */ - passwd, /* password */ - 0, /* default lifetime */ - 0, /* spare 1 */ - 0, /* spare 2 */ - &reason) == 0 ) { /* error string */ - - if (strcmp(p->pw_passwd, "*") == 0) - return(FALSE); - else - return(TRUE); - } - - else { - LogError(ReadCatalog( - MC_LOG_SET,MC_LOG_AFS_FAILATH,MC_DEF_LOG_AFS_FAILATH),reason); - } - } -#endif /* __AFS */ - - -#ifdef __KERBEROS - - /* - * Kerberos password authentication... - */ - - if ( IsVerifyName(VN_KRB) ) { - - if (focusWidget == login_text) - return(FALSE); - - (void)krb_get_lrealm(realm, 1); - - setresuid(p->pw_uid, p->pw_uid, -1); - kerno = krb_get_pw_in_tkt(p->pw_name, - "", - realm, - "krbtgt", - realm, - KRBLIFE, - passwd); - - setresuid(0, 0, -1); - - if (kerno == KSUCCESS) - if (strcmp(p->pw_passwd, "*") == 0) - return(FALSE); - else - return(TRUE); - - } -#endif /* __KERBEROS */ - - - - /* - * traditional password verification... - */ - - if (strcmp (crypt (passwd, p->pw_passwd), p->pw_passwd) == 0) - return(TRUE); - - -#ifdef __PASSWD_ETC - /* - * If regular passwd check fails, try old-style SR - */ - - if (rgy_$is_des(passwd, strlen(passwd), p->pw_passwd) == TRUE) - return (TRUE); -#endif - - - /* - * all password checks failed... - */ - - return (FALSE); - -} - - - - -/*************************************************************************** - * - * Verify (HPUX) - * - * verify the user - * - * return codes indicate authentication results. - ***************************************************************************/ - -#define MAXATTEMPTS 3 - -struct passwd nouser = {"", "nope"}; /* invalid user password struct */ - -int -Verify( char *name, char *passwd ) -{ - - static int login_attempts = 0; /* # failed authentications */ - - struct passwd *p; /* password structure */ - - struct utsname utsnam; - int n; - - - -#ifdef AUDIT - /* - * turn on self auditing... - */ - - if (audswitch(AUD_SUSPEND) == -1) - selfAuditOn = FALSE; - else - selfAuditOn = TRUE; - - /* - * set the secure flag if SECUREPASS exists. If so, we - * are using it for authentication instead of /etc/passwd... - */ - - secure = (stat(SECUREPASS, &s_pfile) < 0) ? 0:1; - - - /* - * set the audit process flag unconditionally on since we want - * to log all logins regardless of whether the user's audit - * flag is set... - */ - - if (secure) - setaudproc(AUD_PROC); - -#endif /* AUDIT */ - - - /* - * validate password... - */ - - if ( CheckPassword(name, passwd, &p) == FALSE) { - if ( focusWidget == passwd_text ) { - - WriteBtmp(name); - - if ((++login_attempts % MAXATTEMPTS) == 0 ) { - - if (p->pw_name == NULL ) - p = &nouser; - - Audit(p, " Failed login (bailout)", 1); - - } - } - - return(VF_INVALID); - } - - - /* - * check restricted license... - * - * Note: This only applies to local displays. Foreign displays - * (i.e. X-terminals) apparently do not count. - */ - - /* Get the version info via uname. If it doesn't look right, - * assume the smallest user configuration - */ - - if (getenv(LOCATION) != NULL) { - if (uname(&utsnam) < 0) - utsnam.version[0] = MIN_VERSION; - - /* - * Mappings: - * 834 -> 834 - * 844 -> 844 - * 836 -> 635 - * 846 -> 645 - * 843 -> 642 - * 853 -> 652 - */ - - if ((!strncmp(utsnam.machine, "9000/834", UTSLEN)) || - (!strncmp(utsnam.machine, "9000/844", UTSLEN)) || - (!strncmp(utsnam.machine, "9000/836", UTSLEN)) || - (!strncmp(utsnam.machine, "9000/846", UTSLEN)) || - (!strncmp(utsnam.machine, "9000/843", UTSLEN)) || - (!strncmp(utsnam.machine, "9000/853", UTSLEN))) { - -/* strict_count = 1;*/ - if (CountUsersStrict(name) > MAX_STRICT_USERS) { - Audit(p, - " attempted to login - too many users on the system", - 20); - - return(VF_MAX_USERS); - } - } - else { - if (utsnam.version[0] != UNLIMITED) { - if ((utsnam.version[0]-'A' < 0) || - (utsnam.version[0]-'A' > NUM_VERSIONS)) - utsnam.version[0] = MIN_VERSION; - - n = (int) utsnam.version[0] - 'A'; - if (CountUsers(1) > num_users[n]) { - Audit(p, - " attempted to login - too many users on the system", - 20); - - return(VF_MAX_USERS); - } - } - } - } - -#ifdef __PASSWD_ETC - /* - * Check for account validity. Unfortunately, we have no graphical - * dialog for this at this time so the best we can do is log an - * error message and hope the system administrator sees it. - */ - - if ( !rgy_$using_local_registry() ) { - if (rgy_$is_acct_expired(&admin_part) != 0 ) { - LogError(ReadCatalog(MC_LOG_SET,MC_LOG_ACC_EXP,MC_DEF_LOG_ACC_EXP), - name); - return(VF_INVALID); - } - } -#endif - - /* - * check password aging... - */ - - if ( PasswordAged(p) ) return(VF_PASSWD_AGED); - - - /* - * verify home directory exists... - */ - - if(chdir(p->pw_dir) < 0) { - Audit(p, " attempted to login - no home directory", 1); - return(VF_HOME); - } - - -#ifdef AUDIT - /* - * check audit flag and id... - */ - - setresuid(0,0,0); - - if (secure && (p->pw_audflg > 1 || p->pw_audflg < 0)) { - Audit(p, " attempted to login - bad audit flag", 1); - return(VF_BAD_AFLAG); - } - - if (secure && (setaudid(p->pw_audid) == -1 )) { - Audit(p, " attempted to login - bad audit id", 1); - return(VF_BAD_AID); - } -#endif /* AUDIT */ - - - /* - * validate uid and gid... - */ - - if ((p->pw_gid < 0) || - (p->pw_gid > MAXUID) || - (setgid(p->pw_gid) == -1)) { - - Audit(p, " attempted to login - bad group id", 1); - return(VF_BAD_GID); - } - - -#ifdef __AFS - /* - * ka_UserAuthenticateGeneral() sets the group access of this process - * to the proper PAG. Pick up these values and pass them back to - * Dtlogin to be put into the user's environment... - */ - - if ( IsVerifyName(VN_AFS) ) { - groups[0] = groups[1] = 0; - getgroups(NGROUPS, groups); - } - -#endif /* __AFS */ - - - if ((p->pw_uid < 0) || - (p->pw_uid > MAXUID) || - (setresuid(p->pw_uid, p->pw_uid, 0) == -1)) { - - Audit(p, " attempted to login - bad user id", 1); - return(VF_BAD_UID); - } - - - - - /* - * verify ok... - */ - - Audit(p, " Successful login", 0); - return(VF_OK); -} - - - - -/*************************************************************************** - * - * WriteBtmp (HPUX) - * - * log bad login attempts - * - ***************************************************************************/ - -static void -WriteBtmp( char *name ) -{ - int fd; - struct utmp utmp, *u; - - Boolean found=FALSE; - - bzero(&utmp, sizeof(struct utmp)); - - utmp.ut_pid = getppid(); - while ((u = getutent()) != NULL) { - if ( (u->ut_type == INIT_PROCESS || - u->ut_type == LOGIN_PROCESS || - u->ut_type == USER_PROCESS) && - u->ut_pid == utmp.ut_pid ) { - - found = TRUE; - break; - } - } - - - /* - * if no utmp entry, this may be an X-terminal. Construct a utmp - * entry for it... - */ - - if ( ! found ) { - strncpy(utmp.ut_id, "??", sizeof(utmp.ut_id)); - strncpy(utmp.ut_line, dpyinfo.name, sizeof(utmp.ut_line)); - utmp.ut_type = LOGIN_PROCESS; -#ifndef SVR4 - strncpy(utmp.ut_host, dpyinfo.name, sizeof(utmp.ut_host)); -#endif - u = &utmp; - } - - - /* - * If btmp exists, then record the bad attempt - */ - if ( (fd = open(BTMP_FILE,O_WRONLY|O_APPEND)) >= 0) { - strncpy(u->ut_user, name, sizeof(u->ut_user)); - (void) time(&u->ut_time); - write(fd, (char *)u, sizeof(utmp)); - (void) close(fd); - } - - endutent(); /* Close utmp file */ -} - -/*************************************************************************** - * - * End authentication routines (HPUX) - * - ***************************************************************************/ -#endif /* __hpux */ - - - -/*************************************************************************** - *************************************************************************** - *************************************************************************** - *************************************************************************** - *************************************************************************** - *************************************************************************** - *************************************************************************** - ***************************************************************************/ - - #ifdef sun /*************************************************************************** * diff --git a/cde/programs/dtlogin/vgcallback.c b/cde/programs/dtlogin/vgcallback.c index d0571fe50..9ff1a48bb 100644 --- a/cde/programs/dtlogin/vgcallback.c +++ b/cde/programs/dtlogin/vgcallback.c @@ -1097,7 +1097,6 @@ ProcessTraversal( Widget w, int direction ) i = XmProcessTraversal(w, direction); -#ifndef __hpux /* * Versions of Motif other than HP do not support the XmfocusCallback * on the TextField widget. We simulate it here by manually invoking the @@ -1105,7 +1104,6 @@ ProcessTraversal( Widget w, int direction ) */ TextFocusCB(w, NULL, NULL); -#endif } diff --git a/cde/programs/dtlogin/vgmain.c b/cde/programs/dtlogin/vgmain.c index 07e1e77fc..33bb00fd0 100644 --- a/cde/programs/dtlogin/vgmain.c +++ b/cde/programs/dtlogin/vgmain.c @@ -454,14 +454,10 @@ main( int argc, char **argv ) vg_TRACE_EXECUTION("main: after options."); #endif /* VG_TRACE */ #ifdef VG_DEBUG - #ifdef __hpux - while (1) {} - #else LogError((unsigned char *) "main: sleeping %d seconds.\n", debug); if (debug) { sleep(debug); } - #endif /* __hpux */ #endif /* VG_DEBUG */ /* @@ -478,15 +474,6 @@ main( int argc, char **argv ) XtSetWarningHandler(xtWarningHandler); } -#ifdef __hpux - /* - * prevent the toolkit from starting the NLIO server... - */ -#ifdef VG_TRACE - vg_TRACE_EXECUTION("main: exited _XHPNlioctl ..."); -#endif /* VG_TRACE */ -#endif - /* * get information about the display... */ @@ -1740,9 +1727,6 @@ MakeLogin( void ) Ctrl Tab: next-tab-group() ")); XtManageChild(login_text); -#ifdef __hpux - XtAddCallback(login_text, XmNfocusCallback, TextFocusCB, NULL); -#endif XtAddActions(textActions, 2); @@ -1761,9 +1745,6 @@ MakeLogin( void ) textdata->text[1] = login_text; XtManageChild(passwd_text); -#ifdef __hpux - XtAddCallback(passwd_text, XmNfocusCallback, TextFocusCB, NULL); -#endif XtAddCallback(passwd_text, XmNmodifyVerifyCallback, EditPasswdCB, NULL); /* diff --git a/cde/programs/dtlogin/xdmcp.c b/cde/programs/dtlogin/xdmcp.c index c562eec21..84b489df9 100644 --- a/cde/programs/dtlogin/xdmcp.c +++ b/cde/programs/dtlogin/xdmcp.c @@ -394,11 +394,7 @@ void WaitForSomething (void) else ptimeout = NULL; -#ifdef __hpux - nready = select (WellKnownSocketsMax + 1, (int *) &reads, 0, 0, ptimeout); -#else nready = select (WellKnownSocketsMax + 1, &reads, 0, 0, ptimeout); -#endif Debug ("select returns %d. Rescan: %d ChildReady: %d\n", nready, Rescan, ChildReady); if (nready > 0) diff --git a/cde/programs/dtmail/MotifApp/Application.C b/cde/programs/dtmail/MotifApp/Application.C index b1bc02814..f2c9790d3 100644 --- a/cde/programs/dtmail/MotifApp/Application.C +++ b/cde/programs/dtmail/MotifApp/Application.C @@ -226,11 +226,7 @@ Application::~Application() delete []_windows; #ifdef CDExc21492 - #if defined(__hpux) - this->BasicComponent::~BasicComponent(); - #else BasicComponent::~BasicComponent(); - #endif #endif CATCLOSE(catd); diff --git a/cde/programs/dtmail/dtmail/RoamApp.C b/cde/programs/dtmail/dtmail/RoamApp.C index 049742f31..10ba126fe 100644 --- a/cde/programs/dtmail/dtmail/RoamApp.C +++ b/cde/programs/dtmail/dtmail/RoamApp.C @@ -981,11 +981,7 @@ void RoamApp::initialize(int *argcp, char **argv) int opt; char *helpId; -#ifdef hpV4 - signal(SIGUSR1, (void(*)(int ...))SigUsr1); -#else signal(SIGUSR1, SigUsr1); -#endif #ifdef _AIX (void)signal( SIGDANGER, pspace_signal ); diff --git a/cde/programs/dtmail/include/DtMail/HashTable.hh b/cde/programs/dtmail/include/DtMail/HashTable.hh index a91b70074..f12f930d6 100644 --- a/cde/programs/dtmail/include/DtMail/HashTable.hh +++ b/cde/programs/dtmail/include/DtMail/HashTable.hh @@ -55,17 +55,11 @@ class HashTableImpl : public DtCPlusPlusAllocator { virtual void set(ObjectKey & key, void * value); virtual void * remove(ObjectKey & key); -// HP can not support this construct. -// -#if !defined(HPUX) -// #define HASHTABLE_HASFOREACH typedef int (*HashImplIterator)(ObjectKey &, void * value, void * client_data); virtual void forEach(HashImplIterator, void * client_data); -#endif - protected: struct HashEntry : public DtCPlusPlusAllocator { ObjectKey * key; @@ -90,12 +84,10 @@ class HashTable : public DtCPlusPlusAllocator { Object remove(ObjectKey & key) { return( (Object)((long)_table.remove(key)) ); } -#if !defined(HPUX) typedef int (*HashIterator)(ObjectKey &, Object, void * client_data); void forEach(HashTableImpl::HashImplIterator iterator, void * client_data) { _table.forEach((HashTableImpl::HashImplIterator)iterator, client_data); } -#endif protected: HashTableImpl _table; diff --git a/cde/programs/dtmail/libDtMail/Common/DtMailError.C b/cde/programs/dtmail/libDtMail/Common/DtMailError.C index 6ff659800..180a32ea2 100644 --- a/cde/programs/dtmail/libDtMail/Common/DtMailError.C +++ b/cde/programs/dtmail/libDtMail/Common/DtMailError.C @@ -49,16 +49,7 @@ #include #include #include
- #include - -#if defined(HPUX) && !defined(hpV4) -// HP-UX 9.* syslog.h does not define these. -// -extern "C" int syslog(int, const char *, ...); -extern "C" int openlog(const char *, int, int); -#endif - #include // Provide interface to the DtSvc function DtSimpleError diff --git a/cde/programs/dtmail/libDtMail/Common/DtMailRc.C b/cde/programs/dtmail/libDtMail/Common/DtMailRc.C index b4732147b..153290b9e 100644 --- a/cde/programs/dtmail/libDtMail/Common/DtMailRc.C +++ b/cde/programs/dtmail/libDtMail/Common/DtMailRc.C @@ -147,8 +147,6 @@ struct cmd cmdtab[] = { #define SYSTEM_MAILRC "/etc/mail/mail.rc" #elif defined(_AIX) || defined(__linux__) #define SYSTEM_MAILRC "/usr/share/lib/Mail.rc" -#elif defined(__hpux) -#define SYSTEM_MAILRC "/usr/share/lib/mailx.rc" #elif defined(CSRG_BASED) #define SYSTEM_MAILRC "/etc/mail.rc" #endif diff --git a/cde/programs/dtmail/libDtMail/Common/DtMailServer.C b/cde/programs/dtmail/libDtMail/Common/DtMailServer.C index 973c96bdf..eec5e87ab 100644 --- a/cde/programs/dtmail/libDtMail/Common/DtMailServer.C +++ b/cde/programs/dtmail/libDtMail/Common/DtMailServer.C @@ -331,11 +331,7 @@ DtMailServer::do_send(char *fmt, ... ) // // Assemble command in printf(3) style, send to server, accept a response. // -#if defined(__hpux) -#define DTMAS_COMMAND_TERMINATOR "\n" -#else #define DTMAS_COMMAND_TERMINATOR "\r\n" -#endif DTMailError_t DtMailServer::do_transaction(char *fmt, ... ) { @@ -829,11 +825,7 @@ restoreSignal: // // Reset the nonresponse-timeout // -#if defined(__hpux) -#define TV_USEC_TYPE long -#else #define TV_USEC_TYPE int -#endif void DtMailServer::vtalarm_setitimer(int timeout_seconds) { diff --git a/cde/programs/dtmail/libDtMail/Common/HashTable.C b/cde/programs/dtmail/libDtMail/Common/HashTable.C index 4bc575a2c..913f6a028 100644 --- a/cde/programs/dtmail/libDtMail/Common/HashTable.C +++ b/cde/programs/dtmail/libDtMail/Common/HashTable.C @@ -189,7 +189,6 @@ HashTableImpl::remove(ObjectKey & key) return(removed_val); } -#if !defined(HPUX) void HashTableImpl::forEach(HashImplIterator iterator, void * client_data) { @@ -210,4 +209,3 @@ HashTableImpl::forEach(HashImplIterator iterator, void * client_data) } } } -#endif diff --git a/cde/programs/dtmail/libDtMail/Common/Process.C b/cde/programs/dtmail/libDtMail/Common/Process.C index 623e5f131..56611bb7a 100644 --- a/cde/programs/dtmail/libDtMail/Common/Process.C +++ b/cde/programs/dtmail/libDtMail/Common/Process.C @@ -53,8 +53,6 @@ */ #if defined(SunOS) #include -#elif defined(HPUX) -#include #elif defined(_AIX) || defined(__linux__) #define INFTIM (-1) /* Infinite timeout */ #endif diff --git a/cde/programs/dtmail/libDtMail/RFC/RFCMailBox.C b/cde/programs/dtmail/libDtMail/RFC/RFCMailBox.C index 8e91838b6..498f360e7 100644 --- a/cde/programs/dtmail/libDtMail/RFC/RFCMailBox.C +++ b/cde/programs/dtmail/libDtMail/RFC/RFCMailBox.C @@ -63,7 +63,7 @@ #include #include #include -#if !defined(__aix) && !defined(__hpux) && !defined(__linux__) && !defined(CSRG_BASED) +#if !defined(__aix) && !defined(__linux__) && !defined(CSRG_BASED) #include #endif #include @@ -95,9 +95,7 @@ extern "C" { #if defined(sun) #define LCL_SIG_HANDLER_SIGNATURE -#elif defined(__hpux) -#define LCL_SIG_HANDLER_SIGNATURE __harg -#elif defined(__aix) || defined(__alpha) || defined(__linux__) || defined(CSRG_BASED) +#elif defined(__aix) || defined(__linux__) || defined(CSRG_BASED) #define LCL_SIG_HANDLER_SIGNATURE int #endif diff --git a/cde/programs/dtmail/libDtMail/RFC/RFCTransport.C b/cde/programs/dtmail/libDtMail/RFC/RFCTransport.C index 0b14d72c4..00ddf4633 100644 --- a/cde/programs/dtmail/libDtMail/RFC/RFCTransport.C +++ b/cde/programs/dtmail/libDtMail/RFC/RFCTransport.C @@ -975,7 +975,7 @@ RFCTransport::signalRegister(void) if (initialized) return; initialized = 1; -#if defined(hpux) || defined(_aix) || defined(__linux__) || \ +#if defined(_aix) || defined(__linux__) || \ (defined(sun) && OSMAJORVERSION>=5 && OSMINORVERSION>4) || defined(CSRG_BASED) // SunOS 5.5 and above defined prototype for signal handler act.sa_handler = (void (*)(int))&RFCTransport::childHandler; diff --git a/cde/programs/dtmail/libDtMail/RFC/SunV3.C b/cde/programs/dtmail/libDtMail/RFC/SunV3.C index 38b9a303f..8353b7a92 100644 --- a/cde/programs/dtmail/libDtMail/RFC/SunV3.C +++ b/cde/programs/dtmail/libDtMail/RFC/SunV3.C @@ -57,8 +57,6 @@ */ #if defined(SunOS) #include -#elif defined(HPUX) -#include #elif defined(_AIX) || defined(__linux__) #define INFTIM (-1) /* Infinite timeout */ #endif diff --git a/cde/programs/dtpad/printSetup.c b/cde/programs/dtpad/printSetup.c index 4ae105e7e..26ad6c73c 100644 --- a/cde/programs/dtpad/printSetup.c +++ b/cde/programs/dtpad/printSetup.c @@ -421,9 +421,6 @@ _psGetResourceFileName(PrintSetup *pSetup) static char *dtpadrc = NULL; char *savePath, *saveFile; -#ifdef hpV4 - return XtNewString("/tmp/dtpadrc"); -#else if (dtpadrc != NULL) return XtNewString(dtpadrc); savePath = NULL; @@ -440,7 +437,6 @@ _psGetResourceFileName(PrintSetup *pSetup) dtpadrc = XtNewString(savePath); return XtNewString(dtpadrc); -#endif } /************************************************************************ diff --git a/cde/programs/dtpad/ttMsgSupport.c b/cde/programs/dtpad/ttMsgSupport.c index 54e8e857c..43148a602 100644 --- a/cde/programs/dtpad/ttMsgSupport.c +++ b/cde/programs/dtpad/ttMsgSupport.c @@ -871,17 +871,11 @@ TTdesktopOpen( int *ttFd, Editor *pPad, Boolean sendStarted ) #ifdef sun vendor = "Sun Microsystems"; -#else -#ifdef _AIX +#elif defined(_AIX) vendor = "IBM"; -#else -#ifdef hpux - vendor = "Hewlett-Packard"; #else vendor = "Unknown"; -#endif /* hpux */ #endif /* _AIX */ -#endif /* sun */ procId = ttdt_open( ttFd, "dtpad", vendor, "2.1", sendStarted ); if ( (status = tt_ptr_error( procId )) != TT_OK ) diff --git a/cde/programs/dtprintinfo/DtPrintinfo.C b/cde/programs/dtprintinfo/DtPrintinfo.C index 8e4c92b7b..4294acec8 100644 --- a/cde/programs/dtprintinfo/DtPrintinfo.C +++ b/cde/programs/dtprintinfo/DtPrintinfo.C @@ -49,25 +49,6 @@ nl_catd dtprintinfo_cat = NULL; extern "C" { extern int seteuid(uid_t); } #endif -#ifdef hpux -static char **msg_strings = NULL; - -// Cannot use multiple catgets parameter calls in functions because the -// previous catgets returned value is overwritten by later catgets calls -// Example: this would fail on HP systems -// sprintf(buf, "%s %s" catgets(...), catgets(...)) - -char *Catgets(nl_catd catd, int set_num, int msg_num, char *s) -{ - if (!msg_strings) - return s; - - if (!msg_strings[msg_num]) - msg_strings[msg_num] = strdup(CATGETS(catd, set_num, msg_num, s)); - return msg_strings[msg_num]; -} -#endif - int main(int argc, char **argv) { #ifndef NO_CDE @@ -75,11 +56,7 @@ int main(int argc, char **argv) #endif // run as user's UID -#ifdef hpux - setresuid(getuid(), getuid(), (uid_t)0); -#else seteuid(getuid()); -#endif setlocale(LC_ALL, ""); @@ -96,10 +73,6 @@ int main(int argc, char **argv) if ((nl_catd) errno) dtprintinfo_cat = (nl_catd) -1; -#ifdef hpux - else - msg_strings = (char **)calloc(LAST_MSG_NO, sizeof(char *)); -#endif } if (dtprintinfo_cat == NULL) { diff --git a/cde/programs/dtprintinfo/libUI/BaseUI.C b/cde/programs/dtprintinfo/libUI/BaseUI.C index 872945b33..933954990 100644 --- a/cde/programs/dtprintinfo/libUI/BaseUI.C +++ b/cde/programs/dtprintinfo/libUI/BaseUI.C @@ -42,13 +42,11 @@ #include #include #include -#ifdef hpux - #include -#elif defined(__linux__) +#if defined(__linux__) #include #else #include -#endif /* hpux */ +#endif /* linux */ #ifdef _AIX #include /* need to get bzero defined */ #endif /* _AIX */ diff --git a/cde/programs/dtprintinfo/libUI/MotifUI/DtDND.C b/cde/programs/dtprintinfo/libUI/MotifUI/DtDND.C index 0407ed727..fd865c6b7 100644 --- a/cde/programs/dtprintinfo/libUI/MotifUI/DtDND.C +++ b/cde/programs/dtprintinfo/libUI/MotifUI/DtDND.C @@ -276,7 +276,6 @@ void DtDND::GetDragPixmaps() XSetForeground(icon->display, gc_mask, 1); if (icon_size == LARGE_ICON) { -#ifndef hpux if (tmp_mask && tmp_mask != XmUNSPECIFIED_PIXMAP) { XSetClipOrigin(icon->display, gc_mask, p_x, p_y); @@ -286,7 +285,6 @@ void DtDND::GetDragPixmaps() XSetClipOrigin(icon->display, gc_mask, 0, 0); } else -#endif XFillRectangle(icon->display, mask, gc_mask, p_x, p_y, p_w, p_h); } else diff --git a/cde/programs/dtprintinfo/objects/PrintObj/ParseJobs.C b/cde/programs/dtprintinfo/objects/PrintObj/ParseJobs.C index 0eff7c7ce..484925c48 100644 --- a/cde/programs/dtprintinfo/objects/PrintObj/ParseJobs.C +++ b/cde/programs/dtprintinfo/objects/PrintObj/ParseJobs.C @@ -70,14 +70,10 @@ extern "C" in_addr_t inet_addr(const char *); extern "C" { int rresvport(int *); } #endif -#ifdef hpux - #define SETEUID(id) setresuid(getuid(), (uid_t)id, (uid_t)0); -#else - #if defined(aix) - extern "C" { extern int seteuid(uid_t); } - #endif - #define SETEUID(id) seteuid((uid_t)id) +#if defined(aix) + extern "C" { extern int seteuid(uid_t); } #endif +#define SETEUID(id) seteuid((uid_t)id) #include "ParseJobs.h" #include "Invoke.h" @@ -693,106 +689,6 @@ static int SortJobs(const void *_first, const void *_second) #endif // SUN LOCAL PARSER -#ifdef hpux - -/* HP LOCAL PARSER - have to parse the following - - Need to parse the following 2 forms of output: - - coseps-28 guest priority 0 Aug 9 12:54 on coseps - test.ps 31160 bytes - - OR - - coseps-29 guest priority 0 Aug 9 12:56 on hostname - (standard input) 31160 bytes -*/ - -void LocalPrintJobs(char *printer, char **return_job_list, int *return_n_jobs) -{ - char *buf = new char[300]; - char *s, *s1, *c; - char *qname; - char *jname; - char *jnumber; - char *owner; - char *month; - char *day; - char *stime; - char *jsize; - char *hostname; - int current_size; - int len; - char *output; - - static char *job_list = NULL; - static int prev_buf_size = 0; - - sprintf(buf, "LANG=C lpstat -i -o%s", printer); - Invoke *_thread = new Invoke(buf, &output); - - if (prev_buf_size == 0) - { - prev_buf_size = BUFSIZ; - job_list = (char *)malloc(prev_buf_size); - } - - current_size = 0; - *job_list = '\0'; - *return_n_jobs = 0; - s = output; - if (s1 = strchr(s, '\n')) - *s1++ = '\0'; - while (s && *s) - { - qname = strtok(s, "-"); - jnumber = strtok(NULL, " "); - owner = strtok(NULL, " "); - strtok(NULL, " "); - strtok(NULL, " "); - month = strtok(NULL, " "); - day = strtok(NULL, " "); - stime = strtok(NULL, " \n"); - strtok(NULL, " "); - hostname = strtok(NULL, " \n"); - s = s1; - if (s1 = strchr(s, '\n')) - *s1++ = '\0'; - for (jname = s; *jname == '\t' || *jname == ' '; jname++) - ; - jsize = strrchr(s, ' '); - *jsize = '\0'; - jsize = strrchr(s, ' ') + 1; - for (c = jsize - 1; *c == ' '; c--) - ; - *(c + 1) = '\0'; - if (hostname && strcmp(qname, hostname)) - sprintf(buf, "%s|%s|%s|%s@%s|%s %s|%s|%s\n", qname, jname, jnumber, - owner, hostname, month, day, stime, jsize); - else - sprintf(buf, "%s|%s|%s|%s|%s %s|%s|%s\n", qname, jname, jnumber, - owner, month, day, stime, jsize); - - len = strlen(buf); - if (prev_buf_size < (current_size + len + 1)) - job_list = (char *) realloc(job_list, (current_size + len + 1) * - sizeof(char *)); - memcpy(job_list + current_size, buf, len); - current_size += len; - (*return_n_jobs)++; - s = s1; - if (s1 = strchr(s, '\n')) - *s1++ = '\0'; - } - *(job_list + current_size) = '\0'; - prev_buf_size = prev_buf_size > current_size ? prev_buf_size : current_size; - *return_job_list = job_list; - delete [] buf; - delete output; - delete _thread; -} -#endif // HP LOCAL PARSER - #if defined(__linux__) || defined(CSRG_BASED) //Linux local parser diff --git a/cde/programs/dtprintinfo/objects/PrintObj/PrintSubSys.C b/cde/programs/dtprintinfo/objects/PrintObj/PrintSubSys.C index 1d7a65938..76f67e53b 100644 --- a/cde/programs/dtprintinfo/objects/PrintObj/PrintSubSys.C +++ b/cde/programs/dtprintinfo/objects/PrintObj/PrintSubSys.C @@ -36,15 +36,6 @@ #ifdef aix const char *LIST_QUEUES = "lsallq | grep -v '^bsh$' | sort"; #else -#ifdef hpux -const char *LIST_QUEUES = "LANG=C lpstat -v | " - "awk '" - " $2 == \"for\" " - " { " - " x = match($3, /:/); " - " print substr($3, 1, x-1)" - " }' | sort"; -#else const char *LIST_QUEUES = "LANG=C lpstat -v | " "nawk '" " $2 == \"for\" " @@ -53,7 +44,6 @@ const char *LIST_QUEUES = "LANG=C lpstat -v | " " print substr($3, 1, x-1)" " }' | sort"; #endif -#endif // Object Class Name const char *PRINTSUBSYSTEM = "PrintSubSystem"; diff --git a/cde/programs/dtprintinfo/objects/PrintObj/Queue.C b/cde/programs/dtprintinfo/objects/PrintObj/Queue.C index c1c3ae58c..21f845839 100644 --- a/cde/programs/dtprintinfo/objects/PrintObj/Queue.C +++ b/cde/programs/dtprintinfo/objects/PrintObj/Queue.C @@ -46,21 +46,6 @@ const char *GET_DEVICE_STATUS = "LANG=C enq -As -P%s | " const char *START_QUEUE_CMD = "enq -U -P%s"; const char *STOP_QUEUE_CMD = "enq -D -P%s"; #else -#ifdef hpux -const char *GET_ATTRS = "LANG=C lpstat -v%s 2>&1 | awk '" - "BEGIN { device=\"\"; rhost=\"\"; rp=\"\" } " - "/device for/ { device = $4 } " - "/remote to/ { rhost = $5; rp = $3 } " - "END { print device,rhost,rp }' OFS=:"; -const char *GET_QUEUE_STATUS = "LANG=C lpstat -i -a%s | awk '" - "{if ($2 == \"not\") {exit 1} else {exit 0}}'"; -const char *GET_DEVICE_STATUS = "LANG=C lpstat -i -p%s | " - "awk '/disabled/ {exit 1}'"; -const char *START_QUEUE_CMD = "/usr/lib/accept %s"; -const char *STOP_QUEUE_CMD = "/usr/lib/reject %s"; -const char *START_PRINTING_CMD = "enable %s"; -const char *STOP_PRINTING_CMD = "disable %s"; -#else const char *GET_ATTRS = "LANG=C lpstat -v %s 2>&1 | nawk '" "BEGIN { device=\"\"; rhost=\"\"; rp=\"\" } " "/device for/ { device = $4 } " @@ -79,7 +64,6 @@ const char *STOP_QUEUE_CMD = "/usr/sbin/reject %s"; const char *START_PRINTING_CMD = "enable %s"; const char *STOP_PRINTING_CMD = "disable %s"; #endif -#endif // Object Class Name const char *QUEUE = "Queue"; diff --git a/cde/programs/dtscreen/dtscreen.h b/cde/programs/dtscreen/dtscreen.h index 1a44aafd3..4c7b4cce9 100644 --- a/cde/programs/dtscreen/dtscreen.h +++ b/cde/programs/dtscreen/dtscreen.h @@ -92,7 +92,7 @@ extern void unhide_hft_ring(); #include #define passwd spwd #define pw_passwd sp_pwdp -#if defined(AIXV3) || defined(hpux) +#if defined(AIXV3) #undef NULL #define NULL 0 #include @@ -111,7 +111,7 @@ struct passwd { #include #define getpwnam getspnam #endif -#if !(defined(_AIX) || defined(hpux) || defined(sun)) +#if !(defined(_AIX) || defined(sun)) # define srandom srand # define random rand # define MAXRAND (32767.0) diff --git a/cde/programs/dtscreen/usleep.c b/cde/programs/dtscreen/usleep.c index 82470bfda..834c41ab2 100644 --- a/cde/programs/dtscreen/usleep.c +++ b/cde/programs/dtscreen/usleep.c @@ -41,7 +41,7 @@ #include "dtscreen.h" -#if !defined(_AIX) && !defined(hpV4) && !defined(__linux__) && !defined(sun) && !defined(CSRG_BASED) +#if !defined(_AIX) && !defined(__linux__) && !defined(sun) && !defined(CSRG_BASED) int usleep(unsigned long usec) { @@ -55,7 +55,7 @@ usleep(unsigned long usec) #endif return 0; } -#endif /* !_AIX && !hpV4*/ +#endif /* !_AIX && */ /* * returns the number of seconds since 01-Jan-70. diff --git a/cde/programs/dtsearchpath/dtsp/HelpSearchPath.C b/cde/programs/dtsearchpath/dtsp/HelpSearchPath.C index 25d8136c1..fbbd39769 100644 --- a/cde/programs/dtsearchpath/dtsp/HelpSearchPath.C +++ b/cde/programs/dtsearchpath/dtsp/HelpSearchPath.C @@ -114,20 +114,6 @@ HelpSearchPath::HelpSearchPath NormalizePath(); TraversePath(); -#if defined(hpux) - AddToPath ("/etc/vhelp/%T/%L/%H"); - AddToPath ("/etc/vhelp/%T/%H"); - AddToPath ("/etc/vhelp/%T/%L/%H.hv"); - AddToPath ("/etc/vhelp/%T/%H.hv"); - AddToPath ("/etc/vhelp/%T/C/%H"); - AddToPath ("/etc/vhelp/%T/C/%H.hv"); - AddToPath ("/usr/vhelp/%T/%L/%H"); - AddToPath ("/usr/vhelp/%T/%H"); - AddToPath ("/usr/vhelp/%T/%L/%H.hv"); - AddToPath ("/usr/vhelp/%T/%H.hv"); - AddToPath ("/usr/vhelp/%T/C/%H"); - AddToPath ("/usr/vhelp/%T/C/%H.hv"); -#endif } diff --git a/cde/programs/dtsearchpath/dtsp/Options.C b/cde/programs/dtsearchpath/dtsp/Options.C index b6d0af64f..1edfcc3f9 100644 --- a/cde/programs/dtsearchpath/dtsp/Options.C +++ b/cde/programs/dtsearchpath/dtsp/Options.C @@ -99,9 +99,6 @@ CString Usage ("Usage: dtsearchpath [ -v | -T | -o | -a | -csh | -ksh ] " } } } -#if defined(hpux) || defined(hpV4) - flags |= 16; -#endif } diff --git a/cde/programs/dtsearchpath/libCliSrv/UnixEnv.C b/cde/programs/dtsearchpath/libCliSrv/UnixEnv.C index 1c634ff10..f3bd8d631 100644 --- a/cde/programs/dtsearchpath/libCliSrv/UnixEnv.C +++ b/cde/programs/dtsearchpath/libCliSrv/UnixEnv.C @@ -71,8 +71,6 @@ UnixEnvironment::UnixEnvironment() manpath = "/usr/share/man"; #elif defined(_AIX) manpath = "/usr/share/man:/usr/lpp/info"; -#elif defined(hpux) - manpath = "/usr/man:/usr/contrib/man:/usr/local/man"; #elif defined(__linux__) manpath = "/usr/share/man/%L:/usr/share/man:/usr/contrib/man/%L:/usr/contrib/man:/usr/local/man/%L:/usr/local/man"; #elif defined(__OpenBSD__) diff --git a/cde/programs/dtsession/Sm.h b/cde/programs/dtsession/Sm.h index f1d8014ec..e76be5b78 100644 --- a/cde/programs/dtsession/Sm.h +++ b/cde/programs/dtsession/Sm.h @@ -80,10 +80,6 @@ #define SM_FREE(PTR) XtFree(PTR) #define SM_EXIT(STATUS) SmExit(STATUS) -#ifdef __hpux -#define SM_SETEUID(EUID) setresuid(-1, EUID, -1) -#define SM_SETESUID(UID) setresuid(-1, UID, UID) -#else #ifndef SVR4 #define SM_SETEUID(EUID) seteuid(EUID) #define SM_SETESUID(UID) setreuid(UID, UID) @@ -91,7 +87,6 @@ #define SM_SETEUID(EUID) seteuid(EUID) #define SM_SETESUID(UID) (setuid(UID), seteuid(UID)) #endif -#endif /* * Types of states the session manager can be in diff --git a/cde/programs/dtsession/SmConMgmt.c b/cde/programs/dtsession/SmConMgmt.c index 237625425..5ffd31a5a 100644 --- a/cde/programs/dtsession/SmConMgmt.c +++ b/cde/programs/dtsession/SmConMgmt.c @@ -87,13 +87,6 @@ #ifdef mips #define GPGSLIM "gpgslim" #define FREEMEM "freemem" -#else /* not mips */ -# ifdef __hpux -# ifdef __hp9000s800 -# define GPGSLIM "gpgslim" -# define FREEMEM "freemem" -# endif /* __hp9000s800 */ -# endif /* __hpux */ #endif /* mips */ #ifndef GPGSLIM @@ -163,21 +156,17 @@ GetMemoryUtilization(void) #if !defined(__linux__) static int init = 0; static int kmem; -#if !defined(SVR4) && !defined(hpV4) && !defined(_POWER) && !defined(CSRG_BASED) +#if !defined(SVR4) && !defined(_AIX) && !defined(CSRG_BASED) extern void nlist(); #endif int i; -#ifdef __hpux - setresgid(-1, smGD.conMgmtGID, -1); -#else #ifndef SVR4 setregid(smGD.runningGID, smGD.conMgmtGID); #else setgid(smGD.runningGID); setegid(smGD.conMgmtGID); -#endif #endif if(!init) @@ -191,15 +180,11 @@ GetMemoryUtilization(void) if (namelist[i].n_type == 0 || namelist[i].n_value == 0) { -#ifdef __hpux - setresgid(-1, smGD.runningGID, -1); -#else #ifndef SVR4 setregid(smGD.conMgmtGID, smGD.runningGID); #else setgid(smGD.conMgmtGID); setegid(smGD.runningGID); -#endif #endif return(MEM_NOT_AVAILABLE); } @@ -211,15 +196,11 @@ GetMemoryUtilization(void) kmem = open(KMEM_FILE, O_RDONLY); if (kmem < 0) { -#ifdef __hpux - setresgid(-1, smGD.runningGID, -1); -#else #ifndef SVR4 setregid(smGD.conMgmtGID, smGD.runningGID); #else setgid(smGD.conMgmtGID); setegid(smGD.runningGID); -#endif #endif return(MEM_NOT_AVAILABLE); } @@ -247,15 +228,11 @@ GetMemoryUtilization(void) (void) read(kmem, (char *)&freemem, sizeof(int)); #endif /* mips */ -#ifdef __hpux - setresgid(-1, smGD.runningGID, -1); -#else #ifndef SVR4 setregid(smGD.conMgmtGID, smGD.runningGID); #else setgid(smGD.conMgmtGID); setegid(smGD.runningGID); -#endif #endif if(freemem >= gpgslim) diff --git a/cde/programs/dtsession/SmGlobals.c b/cde/programs/dtsession/SmGlobals.c index 0bb24e7ed..f6817da7a 100644 --- a/cde/programs/dtsession/SmGlobals.c +++ b/cde/programs/dtsession/SmGlobals.c @@ -266,13 +266,6 @@ static XtResource saverResources[]= machineDefault[] = { { 0, 20, 60}, /* Machine independent default */ -#ifdef __hpux - {300, 10, 60}, /* HP s300 */ - {400, 10, 60}, /* HP s400 */ - {600, 5, 60}, /* HP s600 */ - {700, 5, 60}, /* HP s700 */ - {800, 5, 60}, /* HP s800 */ -#endif /* __hpux */ }; #define MACHINEDEFAULTS (sizeof(machineDefault) / sizeof(machineDefault[0])) @@ -420,38 +413,6 @@ InitSMGlobals( void ) smGD.userSetWaitWmTimeout = True; /* assume it is */ -#ifdef __hpux - if (uname(&nameRec) == 0) - { - keyNum = nameRec.machine; - if (firstSlash = strchr(keyNum, '/')) - { - keyNum = ++firstSlash; - - if ( keyNum[0] == '3') - { - machineType = 300; - } - else if (keyNum[0] == '4') - { - machineType = 400; - } - else if (keyNum[0] == '6') - { - machineType = 600; - } - else if (keyNum[0] == '7') - { - machineType = 700; - } - else if (keyNum[0] == '8') - { - machineType = 800; - } - } - } -#endif /* __hpux */ - /* * Get application specific resource values */ @@ -1385,13 +1346,11 @@ RemoveFiles( /* * Set the gid of the process back from bin */ -#ifndef __hpux #ifndef SVR4 setregid(smGD.runningGID, smGD.runningGID); #else setgid(smGD.runningGID); setegid(smGD.runningGID); -#endif #endif _DtEnvControl(DT_ENV_RESTORE_PRE_DT); @@ -1490,13 +1449,11 @@ MoveDirectory( /* * Set the gid of the process back from bin */ -#ifndef __hpux #ifndef SVR4 setregid(smGD.runningGID, smGD.runningGID); #else setgid(smGD.runningGID); setegid(smGD.runningGID); -#endif #endif _DtEnvControl(DT_ENV_RESTORE_PRE_DT); diff --git a/cde/programs/dtsession/SmMain.c b/cde/programs/dtsession/SmMain.c index 5d7b6a97b..30366e1c5 100644 --- a/cde/programs/dtsession/SmMain.c +++ b/cde/programs/dtsession/SmMain.c @@ -89,9 +89,6 @@ static int RegisterX11ScreenSaver(Display *display, int *ssEventType); /* * Internal Defines */ -#ifdef __hpux -#define SECURE_SYS_PATH "/.secure/etc/passwd" -#endif #ifdef _AIX #define SECURE_SYS_PATH "/etc/security/passwd" #endif @@ -218,16 +215,12 @@ main (int argc, char **argv) (void) putenv (lang); } -#ifdef __hpux - setresgid(-1, smGD.runningGID, -1); -#else /* _AIX or any other system */ #ifndef SVR4 setregid(smGD.conMgmtGID, smGD.runningGID); #else setgid(smGD.conMgmtGID); setegid(smGD.runningGID); -#endif -#endif /* !hpux */ +#endif /* !SVR4 */ /* * Set up POSIX sigaction structs diff --git a/cde/programs/dtsession/SmRestore.c b/cde/programs/dtsession/SmRestore.c index 5b1dfd526..9b1225196 100644 --- a/cde/programs/dtsession/SmRestore.c +++ b/cde/programs/dtsession/SmRestore.c @@ -890,7 +890,6 @@ RestoreResources( Boolean errorHandlerInstalled, ... ) { SetSIGPIPEToDefault (); -#ifndef __hpux /* * Set the gid of the process back from bin */ @@ -900,7 +899,7 @@ RestoreResources( Boolean errorHandlerInstalled, ... ) setgid(smGD.runningGID); setegid(smGD.runningGID); #endif -#endif + #if defined(CSRG_BASED) setsid(); #else @@ -3611,7 +3610,6 @@ StartLocalClient ( putenv (strdup (*ppchar)); } -#ifndef __hpux /* * Set the gid of the process back from bin */ @@ -3620,7 +3618,6 @@ StartLocalClient ( #else setgid(smGD.runningGID); setegid(smGD.runningGID); -#endif #endif _DtEnvControl(DT_ENV_RESTORE_PRE_DT); @@ -3765,67 +3762,7 @@ ForkWM( void ) pid_t clientFork; int execStatus, i; -#ifdef __hpux - /* - * These lines were added to support the builtin - * panacomm dtwm. - */ - char *homeDir; - char *hostName; - char *displayName,*dpy; - - hostName = SM_MALLOC(MAXPATHSM); - displayName = SM_MALLOC(MAXPATHSM); - - if( gethostname(hostName, (sizeof(hostName) - 1) ) == 0) - { - hostName[MAXPATHSM - 1] = '\0'; - dpy = getenv(DISPLAY_NAME); - homeDir = getenv("HOME"); - if (dpy && homeDir) - { - strcpy(displayName, dpy); - dpy = strchr(displayName, ':'); - if (dpy) - { - *dpy = '\0'; - } - sprintf(tmpExecWmFile, "%s/.dt/bin/%s/%s/dtwm", homeDir, - hostName,displayName); - if (access(tmpExecWmFile,X_OK) != 0) - { - strcpy(tmpExecWmFile,CDE_INSTALLATION_TOP "/bin/dtwm"); - } - else - { - localWmLaunched = True; - if (!smGD.userSetWaitWmTimeout) - { - smRes.waitWmTimeout = 60000; - } - } - } - else - { - strcpy(tmpExecWmFile,CDE_INSTALLATION_TOP "/bin/dtwm"); - } - } - else - { - strcpy(tmpExecWmFile,CDE_INSTALLATION_TOP "/bin/dtwm"); - } - - SM_FREE(hostName); - SM_FREE(displayName); - /* - * ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^ - * End of lines were added to support the builtin - * panacomm dtwm. - */ -#else strcpy(tmpExecWmFile,CDE_INSTALLATION_TOP "/bin/dtwm"); -#endif /* __hpux */ - /* * Fork and exec the client process @@ -3848,7 +3785,6 @@ ForkWM( void ) { SetSIGPIPEToDefault (); -#ifndef __hpux /* * Set the gid of the process back from bin */ @@ -3857,7 +3793,6 @@ ForkWM( void ) #else setgid(smGD.runningGID); setegid(smGD.runningGID); -#endif #endif _DtEnvControl(DT_ENV_RESTORE_PRE_DT); diff --git a/cde/programs/dtsession/sys.resources.src b/cde/programs/dtsession/sys.resources.src index b97fdc014..0756f7931 100644 --- a/cde/programs/dtsession/sys.resources.src +++ b/cde/programs/dtsession/sys.resources.src @@ -80,11 +80,6 @@ XCOMM endif *ttyModes: erase ^H intr ^C kill ^U start ^Q stop ^S swtch ^@ susp ^Z *promptDialog.bboard.frame.form.text.columns: %|nls-3-#45#| -#ifdef __hpux -Hpterm*backgroundIsSelect: True -Hpterm*makeColors: shadow -#endif - dtsession*saverTimeout: 10 dtsession*lockTimeout: 30 dtsession*cycleTimeout: 3 @@ -160,44 +155,6 @@ XCOMM endif *enableDragIcon: True *enableCDEColorFactors: True -#ifdef __hpux -!################################################################# -!# -!# CDE translations for the text widget and text field widget -!# -!# - provides more intuitive "clear line", "insert line" and -!# "delete line" behavior -!# - provides basic EMACS editor functionality -!# -!################################################################# -*XmText*Translations:#override\n\ - hpClearLine: delete-to-end-of-line()\n\ - ~m ~a osfPrimaryPaste:beginning-of-line()\ - newline-and-backup()\n\ - osfQuickPaste: beginning-of-line()\ - insert-string(\" \")\ - beginning-of-line()\ - delete-to-end-of-line()\ - delete-next-character()\n\ - Ctrlu:delete-to-start-of-line()\n\ - Ctrlk:delete-to-end-of-line()\n\ - Ctrla:beginning-of-line()\n\ - Ctrle:end-of-line()\n\ - Ctrlp:process-up()\n\ - Ctrlb:backward-character()\n\ - Ctrln:process-down()\n\ - Ctrlf:forward-character() -*XmTextField*Translations:#override\n\ - hpClearLine: delete-to-end-of-line()\n\ - osfQuickPaste: beginning-of-line()\ - delete-to-end-of-line()\n\ - Ctrlu:delete-to-start-of-line()\n\ - Ctrlk:delete-to-end-of-line()\n\ - Ctrla:beginning-of-line()\n\ - Ctrle:end-of-line()\n\ - Ctrlb:backward-character()\n\ - Ctrlf:forward-character() -#else !################################################################# !# !# CDE translations for the text widget and text field widget @@ -221,7 +178,6 @@ XCOMM endif Ctrle:end-of-line()\n\ Ctrlb:backward-character()\n\ Ctrlf:forward-character() -#endif !################################################################# !# diff --git a/cde/programs/dtspcd/main.c b/cde/programs/dtspcd/main.c index c48a51ac4..7b02b79bc 100644 --- a/cde/programs/dtspcd/main.c +++ b/cde/programs/dtspcd/main.c @@ -91,7 +91,6 @@ int Client_Environ_Reset(protocol_request_ptr prot); int Client_Reply_Devices(protocol_request_ptr prot); int Client_Reply_Logfile(protocol_request_ptr prot); int Client_Delete_Logfile(protocol_request_ptr prot); -int Client_Reset_Termio(protocol_request_ptr prot); int Client_Reset_Termios(protocol_request_ptr prot); int Client_Protocol_Version(protocol_request_ptr prot); int Client_Reply_Protocol(protocol_request_ptr prot); @@ -140,7 +139,6 @@ protocol_request_handler spcd_protocol_dispatch_table[NREQS]={ Client_Reply_Logfile, /* QUERY_LOGFILE */ NULL, /* LOGFILE_REPLY */ Client_Delete_Logfile, /* DELETE_LOGFILE */ - Client_Reset_Termio, /* RESET_TERMIO (obsolete) */ Client_Reset_Termios, /* RESET_TERMIOS */ Client_Send_EOF, /* CHANNEL_SEND_EOF */ Client_Channel_Termios, /* CHANNEL_TERMIOS */ @@ -1117,19 +1115,6 @@ int Client_Delete_Logfile(protocol_request_ptr prot) return(XeSPCRemoveLogfile(channel)); } -/*----------------------------------------------------------------------+*/ -int Client_Reset_Termio(protocol_request_ptr prot) -/*----------------------------------------------------------------------+*/ -{ - /* This handles old 1.0 versions of the SPC code. We used to send */ - /* an hp-ux version of the termio struct in a non-portable manner */ - /* We need to be able to "eat" such an request if we get one. */ - - print_protocol_request((XeString)"--> RESET_TERMIO", prot); - - return(SPC_Get_Termio(prot)); -} - /*----------------------------------------------------------------------+*/ int Client_Reset_Termios(protocol_request_ptr prot) /*----------------------------------------------------------------------+*/ diff --git a/cde/programs/dtspcd/spcd_event.c b/cde/programs/dtspcd/spcd_event.c index 2f388da7f..33f0fd010 100644 --- a/cde/programs/dtspcd/spcd_event.c +++ b/cde/programs/dtspcd/spcd_event.c @@ -40,11 +40,7 @@ #include /* for fd_set, FD_SET macros, et. al. */ #include -#ifndef __hpux # define FD_SET_CAST(x) (x) -#else -# define FD_SET_CAST(x) ((int *)(x)) -#endif /* __hpux */ struct {SbInputCallbackProc handler; void* data; } SPCD_input_handlers [FD_SETSIZE], diff --git a/cde/programs/dtstyle/Backdrop.c b/cde/programs/dtstyle/Backdrop.c index 1e0ee803d..98a4689fa 100644 --- a/cde/programs/dtstyle/Backdrop.c +++ b/cde/programs/dtstyle/Backdrop.c @@ -399,35 +399,6 @@ CreateBackdropDialog( /* from that locale's description file from the system location */ lang = setlocale (LC_CTYPE,NULL); -#ifdef hpux /* hpux-specific parsing of the locale string */ - /* The following code is identical to the - ExtractLocaleName function in WmResParse.c - from dtwm - */ -#define MAXLOCALE 64 /* buffer size of locale name */ - -{ char *start; - char *end; - int len; - static char buf[MAXLOCALE]; - - /* If lang has a substring ":;", extract - * from the first such occurrence as the locale name. - */ - - start = lang; - if (start = strchr (lang, ':')) { - start++; - if (end = strchr (start, ';')) { - len = end - start; - strncpy(buf, start, len); - *(buf + len) = '\0'; - lang = buf; - } - } -} -#endif /* hpux */ - bd_desc = (char *)XtMalloc(strlen("/usr/dt/backdrops/desc.") + strlen(lang) + 1); strcpy (bd_desc,"/usr/dt/backdrops/desc."); strcat (bd_desc, lang); diff --git a/cde/programs/dtstyle/ColorFile.c b/cde/programs/dtstyle/ColorFile.c index b638f5045..8ae8724cd 100644 --- a/cde/programs/dtstyle/ColorFile.c +++ b/cde/programs/dtstyle/ColorFile.c @@ -48,9 +48,7 @@ #include -#ifdef __hpux -#include /* opendir(), directory(3C) */ -#elif defined(SVR4) || defined(CSRG_BASED) +#if defined(SVR4) || defined(CSRG_BASED) #include /* opendir(), directory(3C) */ #else #include @@ -137,11 +135,7 @@ static char *home_palette_dir; static int loopcount = 0; static DIR *dirp; -#ifdef __hpux -static struct direct *file_descpt; -#else static struct dirent *file_descpt; -#endif /* __hpux */ static Boolean open_dir = False; extern XrmDatabase hm_pl_DB; @@ -761,11 +755,7 @@ AddDirectories( char *text ) ********************************************************************/ void CheckForDeletedFile( -#ifdef __hpux - struct direct *file_descpt ) -#else struct dirent *file_descpt ) -#endif /* __hpux */ { char *filename; int i; diff --git a/cde/programs/dtstyle/ColorMain.c b/cde/programs/dtstyle/ColorMain.c index f60cf91ea..589cfd021 100644 --- a/cde/programs/dtstyle/ColorMain.c +++ b/cde/programs/dtstyle/ColorMain.c @@ -319,35 +319,6 @@ loadDatabase(void) lang = setlocale (LC_CTYPE,NULL); -#ifdef hpux /* hpux-specific parsing of the locale string */ - /* The following code is identical to the - ExtractLocaleName function in WmResParse.c - from dtwm - */ -#define MAXLOCALE 64 /* buffer size of locale name */ - -{ char *start; - char *end; - int len; - static char buf[MAXLOCALE]; - - /* If lang has a substring ":;", extract - * from the first such occurrence as the locale name. - */ - - start = lang; - if (start = strchr (lang, ':')) { - start++; - if (end = strchr (start, ';')) { - len = end - start; - strncpy(buf, start, len); - *(buf + len) = '\0'; - lang = buf; - } - } -} -#endif /* hpux */ - pl_desc = (char *)XtMalloc(strlen("/usr/dt/palettes/desc.") + strlen(lang) + 1); strcpy (pl_desc,"/usr/dt/palettes/desc."); strcat (pl_desc, lang); diff --git a/cde/programs/dtterm/tests/shared/include_files.h b/cde/programs/dtterm/tests/shared/include_files.h index 99aee68ca..2b8f0ae9d 100644 --- a/cde/programs/dtterm/tests/shared/include_files.h +++ b/cde/programs/dtterm/tests/shared/include_files.h @@ -25,10 +25,6 @@ #define DO_NOT_NEED_NOW #endif -#ifndef _HPUX_SOURCE -#define _HPUX_SOURCE -#endif - #include #include #include diff --git a/cde/programs/dtterm/tests/shared/p2c.h b/cde/programs/dtterm/tests/shared/p2c.h index 5a4eb7fea..1c084967f 100644 --- a/cde/programs/dtterm/tests/shared/p2c.h +++ b/cde/programs/dtterm/tests/shared/p2c.h @@ -40,10 +40,6 @@ /* If the following heuristic fails, compile -DBSD=0 for non-BSD systems, or -DBSD=1 for BSD systems. */ -#ifdef M_XENIX -# define BSD 0 -#endif - #ifdef FILE /* a #define in BSD, a typedef in SYSV (hp-ux, at least) */ # ifndef BSD /* (a convenient, but horrible kludge!) */ # define BSD 1 @@ -115,12 +111,6 @@ typedef struct __p2c_jmp_buf { -#ifdef M_XENIX /* avoid compiler bug */ -# define SHORT_MAX (32767) -# define SHORT_MIN (-32768) -#endif - - /* The following definitions work only on twos-complement machines */ #ifndef SHORT_MAX # define SHORT_MAX (((unsigned short) -1) >> 1) diff --git a/cde/programs/dtudcfonted/dtgpftobdf/bdftosnf.h b/cde/programs/dtudcfonted/dtgpftobdf/bdftosnf.h index 4a7b6f713..e1c41f25b 100644 --- a/cde/programs/dtudcfonted/dtgpftobdf/bdftosnf.h +++ b/cde/programs/dtudcfonted/dtgpftobdf/bdftosnf.h @@ -87,13 +87,6 @@ typedef struct _TempFont { # define DEFAULTBYTEORDER MSBFirst /* default bitmap byte order */ # define DEFAULTSCANUNIT 1 /* default bitmap scan unit */ -#elif defined(hpux) - -# define DEFAULTGLPAD 2 /* default padding for glyphs */ -# define DEFAULTBITORDER MSBFirst /* default bitmap bit order */ -# define DEFAULTBYTEORDER MSBFirst /* default bitmap byte order */ -# define DEFAULTSCANUNIT 1 /* default bitmap scan unit */ - #elif defined(mips) # ifdef MIPSEL diff --git a/cde/programs/dtudcfonted/libfal/_falSetLocale.c b/cde/programs/dtudcfonted/libfal/_falSetLocale.c index 958b9d08e..16cdc909c 100644 --- a/cde/programs/dtudcfonted/libfal/_falSetLocale.c +++ b/cde/programs/dtudcfonted/libfal/_falSetLocale.c @@ -143,13 +143,9 @@ _falsetlocale(int category, const char *name) char * _fallcMapOSLocaleName(char *osname, char *siname) { -#if defined(hpux) || defined(CSRG_BASED) || defined(sun) || defined(SVR4) +#if defined(CSRG_BASED) || defined(sun) || defined(SVR4) -#ifdef hpux -#define SKIPCOUNT 2 -#define STARTCHAR ':' -#define ENDCHAR ';' -#elif !defined(sun) || defined(SVR4) +#if !defined(sun) || defined(SVR4) #define STARTCHAR '/' #define ENDCHAR '/' #endif diff --git a/cde/programs/dtwm/Dtwm.defs.src b/cde/programs/dtwm/Dtwm.defs.src index adc127b43..b13e0a5f4 100644 --- a/cde/programs/dtwm/Dtwm.defs.src +++ b/cde/programs/dtwm/Dtwm.defs.src @@ -30,9 +30,6 @@ Dtwm*useFrontPanel: True !### Dtwm*Dtmail*iconImage: DtMail Dtwm*Dtterm*iconImage: Fpterm -#ifdef __hpux -Dtwm*HPterm*iconImage: Fpterm -#endif /* __hpux */ !# XTerm icon setting commented out - icon does not exist. !# Dtwm*XTerm*iconImage: Dtxterm.l diff --git a/cde/programs/dtwm/WmResParse.c b/cde/programs/dtwm/WmResParse.c index 164c059b6..99304bc2f 100644 --- a/cde/programs/dtwm/WmResParse.c +++ b/cde/programs/dtwm/WmResParse.c @@ -1757,31 +1757,6 @@ void ProcessWmFile (WmScreenData *pSD, Boolean bNested) static char *ExtractLocaleName(String lang) { - -#ifdef hpux /* hpux-specific parsing of the locale string */ -#define MAXLOCALE 64 /* buffer size of locale name */ - - char *start; - char *end; - int len; - static char buf[MAXLOCALE]; - - /* If lang has a substring ":;", extract - * from the first such occurrence as the locale name. - */ - - start = lang; - if (start = strchr (lang, ':')) { - start++; - if (end = strchr (start, ';')) { - len = end - start; - strncpy(buf, start, len); - *(buf + len) = '\0'; - lang = buf; - } - } -#endif /* hpux */ - return lang; } diff --git a/cde/programs/dtwm/examples/occupy/Makefile.hp b/cde/programs/dtwm/examples/occupy/Makefile.hp deleted file mode 100644 index d0822d7f1..000000000 --- a/cde/programs/dtwm/examples/occupy/Makefile.hp +++ /dev/null @@ -1,48 +0,0 @@ -# $XConsortium: Makefile.hp /main/2 1996/05/13 11:33:03 drk $ -########################################################################## -# -# Makefile for occupy.c -# -# (c) Copyright 1993, 1994 Hewlett-Packard Company -# (c) Copyright 1993, 1994 International Business Machines Corp. -# (c) Copyright 1993, 1994 Sun Microsystems, Inc. -# (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of -# Novell, Inc. -########################################################################## - -#ifndef CDE_INSTALLATION_TOP - CDE_INSTALLATION_TOP = /usr/dt -#endif - -PROGRAM = occupy -SOURCES = occupy.c -OBJECTS = occupy.o - -CFLAGS = +Obb2000 -Aa -D_HPUX_SOURCE -CDEBUGFLAGS = -O - -DTINCLUDE = -I$(CDE_INSTALLATION_TOP)/include -X11INCLUDE = -I/usr/include/X11R5 -EXTRA_INCLUDES = -INCLUDES = $(DTINCLUDE) $(X11INCLUDE) $(EXTRA_INCLUDES) - -DTSVCLIB = -L$(CDE_INSTALLATION_TOP)/lib -lDtSvc -TTLIB = -L$(CDE_INSTALLATION_TOP)/lib -ltt -XMLIB = -L$(CDE_INSTALLATION_TOP)/lib -lXm -XTLIB = -L/usr/lib/X11R5 -lXt -X11LIB = -L/usr/lib/X11R5 -lX11 - -LIBRARIES = $(DTSVCLIB) $(TTLIB) $(XMLIB) $(XTLIB) $(X11LIB) -LDFLAGS = - -.c.o: - cc -c $(CFLAGS) $(CDEBUGFLAGS) $(INCLUDES) $< - -all:: $(PROGRAM) - -$(PROGRAM):: $(OBJECTS) - cc -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES) - -clean:: - rm -f $(PROGRAM) - rm -f $(OBJECTS) diff --git a/cde/programs/dtwm/examples/wsinfo/Makefile.hp b/cde/programs/dtwm/examples/wsinfo/Makefile.hp deleted file mode 100644 index 0aa506eba..000000000 --- a/cde/programs/dtwm/examples/wsinfo/Makefile.hp +++ /dev/null @@ -1,48 +0,0 @@ -# $XConsortium: Makefile.hp /main/2 1996/05/13 11:34:13 drk $ -########################################################################## -# -# Makefile for wsinfo.c -# -# (c) Copyright 1993, 1994 Hewlett-Packard Company -# (c) Copyright 1993, 1994 International Business Machines Corp. -# (c) Copyright 1993, 1994 Sun Microsystems, Inc. -# (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of -# Novell, Inc. -########################################################################## - -#ifndef CDE_INSTALLATION_TOP - CDE_INSTALLATION_TOP = /usr/dt -#endif - -PROGRAM = wsinfo -SOURCES = wsinfo.c -OBJECTS = wsinfo.o - -CFLAGS = +Obb2000 -Aa -D_HPUX_SOURCE -CDEBUGFLAGS = -O - -DTINCLUDE = -I$(CDE_INSTALLATION_TOP)/include -X11INCLUDE = -I/usr/include/X11R5 -EXTRA_INCLUDES = -INCLUDES = $(DTINCLUDE) $(X11INCLUDE) $(EXTRA_INCLUDES) - -DTSVCLIB = -L$(CDE_INSTALLATION_TOP)/lib -lDtSvc -TTLIB = -L$(CDE_INSTALLATION_TOP)/lib -ltt -XMLIB = -L$(CDE_INSTALLATION_TOP)/lib -lXm -XTLIB = -L/usr/lib/X11R5 -lXt -X11LIB = -L/usr/lib/X11R5 -lX11 - -LIBRARIES = $(DTSVCLIB) $(TTLIB) $(XMLIB) $(XTLIB) $(X11LIB) -LDFLAGS = - -.c.o: - cc -c $(CFLAGS) $(CDEBUGFLAGS) $(INCLUDES) $< - -all:: $(PROGRAM) - -$(PROGRAM):: $(OBJECTS) - cc -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES) - -clean:: - rm -f $(PROGRAM) - rm -f $(OBJECTS) diff --git a/cde/programs/localized/de_DE.UTF-8/msg/dtfile.msg b/cde/programs/localized/de_DE.UTF-8/msg/dtfile.msg index b743ae7e6..0b55d2635 100644 --- a/cde/programs/localized/de_DE.UTF-8/msg/dtfile.msg +++ b/cde/programs/localized/de_DE.UTF-8/msg/dtfile.msg @@ -1059,13 +1059,6 @@ Die ausgewählte Datei ist nicht mehr vorhanden." 31 "Datei- oder Ordnername:" 32 "Inhalt der Datei:" -$ Messages 33-35 are used on hpux systems - -33 "Ein" - -34 "Aus" - -35 "Verweisen folgen: " 36 "Neues Fenster öffnen" diff --git a/cde/programs/localized/el_GR.UTF-8/msg/dtfile.msg b/cde/programs/localized/el_GR.UTF-8/msg/dtfile.msg index 6f1b21089..31cec958a 100644 --- a/cde/programs/localized/el_GR.UTF-8/msg/dtfile.msg +++ b/cde/programs/localized/el_GR.UTF-8/msg/dtfile.msg @@ -822,11 +822,6 @@ $ 31 Όνομα αρχείου ή φακέλου: 32 Περιεχόμενα αρχείου: -$ Messages 33-35 are used on hpux systems -33 Ανοιχτό -34 Κλειστό -35 Ακολούθησε τους δεσμούς: - 36 Άνοιγμα νέας εμφάνισης 37 Τοποθέτησε στον χώρο εργασίας 38 Βρέθηκαν αρχεία (με βάση το περιεχόενο): diff --git a/cde/programs/localized/sv_SE.UTF-8/msg/dtfile.msg b/cde/programs/localized/sv_SE.UTF-8/msg/dtfile.msg index 32c8827ec..de8de5086 100644 --- a/cde/programs/localized/sv_SE.UTF-8/msg/dtfile.msg +++ b/cde/programs/localized/sv_SE.UTF-8/msg/dtfile.msg @@ -849,11 +849,6 @@ Den markerade filen finns inte längre. 31 Namn på fil eller mapp: 32 Filinnehåll: -$ Messages 33-35 are used on hpux systems -33 På -34 Av -35 Följ länkar: - 36 Öppna i nytt fönster 37 Lägg på arbetsytan 38 Hittade filer (efter Innehåll): diff --git a/cde/programs/localized/util/mkcatdefs.c b/cde/programs/localized/util/mkcatdefs.c index a9877e6cb..52e415270 100644 --- a/cde/programs/localized/util/mkcatdefs.c +++ b/cde/programs/localized/util/mkcatdefs.c @@ -54,12 +54,6 @@ #include #endif -#ifdef hpux -#ifndef _XPG2 -#define _XPG2 -#endif -#endif - #include #include diff --git a/cde/programs/ttsnoop/Makefile.am b/cde/programs/ttsnoop/Makefile.am index bbb52594a..7448c2223 100644 --- a/cde/programs/ttsnoop/Makefile.am +++ b/cde/programs/ttsnoop/Makefile.am @@ -6,7 +6,6 @@ dist_appdefaults_DATA = Ttsnoop AB_MAKEFILES = \ Makefile.aix \ - Makefile.hpux \ Makefile.sunos \ Makefile.linux \ Makefile.freebsd \ diff --git a/cde/programs/ttsnoop/ttsnoop.C.src b/cde/programs/ttsnoop/ttsnoop.C.src index 60b4a3928..f9a590241 100644 --- a/cde/programs/ttsnoop/ttsnoop.C.src +++ b/cde/programs/ttsnoop/ttsnoop.C.src @@ -190,7 +190,7 @@ signalHandler( } } -#if defined(SVR4) || defined(aix) || defined(hpux) || defined(__linux__) || defined(CSRG_BASED) +#if defined(SVR4) || defined(aix) || defined(__linux__) || defined(CSRG_BASED) #if !defined(SIG_PF) typedef void (*sig_pf_t)(int); #define SIG_PF sig_pf_t @@ -202,7 +202,7 @@ _tt_sigset( int sig, SIG_PF handler ) { -#if defined(hpux) || defined(__linux__) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) struct sigaction act; act.sa_handler = handler; sigemptyset(&act.sa_mask); diff --git a/cde/programs/types/demo/Makefile.hp b/cde/programs/types/demo/Makefile.hp deleted file mode 100644 index 763f8e23a..000000000 --- a/cde/programs/types/demo/Makefile.hp +++ /dev/null @@ -1,48 +0,0 @@ -# $XConsortium: Makefile.hp /main/2 1996/05/13 11:35:25 drk $ -########################################################################## -# -# Makefile for datatyping.c -# -# (c) Copyright 1993, 1994 Hewlett-Packard Company -# (c) Copyright 1993, 1994 International Business Machines Corp. -# (c) Copyright 1993, 1994 Sun Microsystems, Inc. -# (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of -# Novell, Inc. -########################################################################## - -#ifndef CDE_INSTALLATION_TOP - CDE_INSTALLATION_TOP = /usr/dt -#endif - -PROGRAM = datatyping -SOURCES = datatyping.c -OBJECTS = datatyping.o - -CFLAGS = +Obb2000 -Aa -CDEBUGFLAGS = -O - -DTINCLUDE = -I$(CDE_INSTALLATION_TOP)/include -X11INCLUDE = -I/usr/include/X11R5 -EXTRA_INCLUDES = -INCLUDES = $(DTINCLUDE) $(X11INCLUDE) $(EXTRA_INCLUDES) - -DTSVCLIB = -L$(CDE_INSTALLATION_TOP)/lib -lDtSvc -TTLIB = -L$(CDE_INSTALLATION_TOP)/lib -ltt -XMLIB = -L$(CDE_INSTALLATION_TOP)/lib -lXm -XTLIB = -L/usr/lib/X11R5 -lXt -X11LIB = -L/usr/lib/X11R5 -lX11 - -LIBRARIES = $(DTSVCLIB) $(TTLIB) $(XMLIB) $(XTLIB) $(X11LIB) -LDFLAGS = - -.c.o: - cc -c $(CFLAGS) $(CDEBUGFLAGS) $(INCLUDES) $< - -all:: $(PROGRAM) - -$(PROGRAM):: $(OBJECTS) - cc -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES) - -clean:: - rm -f $(PROGRAM) - rm -f $(OBJECTS) diff --git a/cde/programs/types/unsupported.dt.src b/cde/programs/types/unsupported.dt.src index 01865585c..1e73358f9 100644 --- a/cde/programs/types/unsupported.dt.src +++ b/cde/programs/types/unsupported.dt.src @@ -25,20 +25,13 @@ XCOMM ########################################################################## #if defined(__aix) #define XBIN /usr/lpp/X11/bin #define XBIN_CONTRIB /usr/lpp/X11/bin -#else -#if defined(__sun) +#elif defined(__sun) #define XBIN /usr/openwin/bin #define XBIN_CONTRIB /usr/openwin/bin #else -#if defined(__hpux) -#define XBIN /usr/bin/X11 -#define XBIN_CONTRIB /usr/contrib/bin/X11 -#else #define XBIN /usr/bin/X11 #define XBIN_CONTRIB /usr/local/bin/X11 #endif -#endif -#endif ACTION DtTypes { @@ -68,64 +61,6 @@ ACTION Clipboard DESCRIPTION %|nls-9003-#The#| } -#ifdef __hpux -ACTION DisplayFont -{ - LABEL %|nls-29-#DisplayFont#| - TYPE COMMAND - WINDOW_TYPE NO_STDIO - EXEC_STRING sh -c '/usr/contrib/bin/X11/xfd -fn \ - `basename "%(File)Arg_1"%|nls-9012-#Font#|"%" | sed /[.].*/s///`;\ - if [ \$? -eq 1 ] ; then \ - /usr/dt/bin/dterror.ds \ - "%|nls-9014-#The Font#|" \ - "%|nls-9015-#Invalid#|" \ - "%|nls-21002-#OK#|" ; \ - fi' - DESCRIPTION %|nls-9004-#The#| -} - -%|nls-9016-#The ListWinInfo ...#| -ACTION ListWinInfo -{ - LABEL %|nls-33-#ListWinInfo#| - ARG_COUNT 0 - TYPE COMMAND - WINDOW_TYPE PERM_TERMINAL - EXEC_STRING \ - sh -c ' \ - /usr/contrib/bin/X11/xwininfo; \ - echo "%|nls-9011-#Select#|"' - DESCRIPTION %|nls-9005-#The#| -} - -ACTION ListWinProps -{ - LABEL %|nls-34-#ListWinProps#| - ARG_COUNT 0 - TYPE COMMAND - WINDOW_TYPE PERM_TERMINAL - EXEC_STRING \ - sh -c ' \ - echo "%|nls-9013-#[When#|"; \ - /usr/contrib/bin/X11/xprop | \${PAGER:-more}; \ - echo "%|nls-9011-#Select#|"' - DESCRIPTION %|nls-9006-#The#| -} - -ACTION XserverInfo -{ - LABEL %|nls-35-#XserverInfo#| - ARG_COUNT 0 - TYPE COMMAND - WINDOW_TYPE PERM_TERMINAL - EXEC_STRING \ - sh -c ' \ - /usr/contrib/bin/X11/xdpyinfo | \${PAGER:-more}; \ - echo "%|nls-9011-#Select#|"' - DESCRIPTION %|nls-9007-#The#| -} -#endif #ifdef __aix ACTION DisplayFont { diff --git a/cde/programs/types/uxstd.dt.src b/cde/programs/types/uxstd.dt.src index 85ba07dce..05c39dbfe 100644 --- a/cde/programs/types/uxstd.dt.src +++ b/cde/programs/types/uxstd.dt.src @@ -638,20 +638,6 @@ ACTION Spell XCOMM ###### -#ifdef __hpux -ACTION Df -{ - LABEL %|nls-10070-#Disk Usage#| - ARG_COUNT 0 - TYPE COMMAND - WINDOW_TYPE PERM_TERMINAL - EXEC_STRING \ - sh -c ' \ - bdf 2>&1 | \${PAGER:-more}; \ - echo "%|nls-7-#Select#|"' - DESCRIPTION %|nls-10071-#The#| -} -#else ACTION Df { LABEL %|nls-10070-#Disk Usage#| @@ -664,7 +650,6 @@ ACTION Df echo "%|nls-7-#Select#|"' DESCRIPTION %|nls-10071-#The#| } -#endif XCOMM ###### From a3d056f56efdaf1301b10b23526402ab100b85e5 Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Sat, 23 Jul 2022 18:27:48 -0600 Subject: [PATCH 04/75] configure.ac: bump version to 2.5.0a --- cde/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cde/configure.ac b/cde/configure.ac index e2563db39..d2551a566 100644 --- a/cde/configure.ac +++ b/cde/configure.ac @@ -1,7 +1,7 @@ dnl When changing the version below, also change the CDE_VERSION_* macros dnl to match further below AC_INIT([Common Desktop Environment], - [2.5.0], + [2.5.0a], [https://sourceforge.net/projects/cdesktopenv], [cde], [https://sourceforge.net/projects/cdesktopenv]) @@ -16,7 +16,7 @@ CDE_VERSION_MINOR=5 CDE_VERSION_MICRO=0 dnl this is blank for a release, or contains an alpha character to indicate a dnl dev release. -CDE_VERSION_DEV= +CDE_VERSION_DEV=a AC_SUBST(CDE_VERSION_MAJOR) AC_SUBST(CDE_VERSION_MINOR) From 1e7374e2f99036483fcb48014e596d6c75ff8b30 Mon Sep 17 00:00:00 2001 From: Liang Chang Date: Thu, 28 Jul 2022 22:03:49 +0000 Subject: [PATCH 05/75] fontaliases: install to DESTDIR correctly. --- cde/programs/fontaliases/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cde/programs/fontaliases/Makefile.am b/cde/programs/fontaliases/Makefile.am index 29abc6d15..6a51e33b9 100644 --- a/cde/programs/fontaliases/Makefile.am +++ b/cde/programs/fontaliases/Makefile.am @@ -33,4 +33,4 @@ fonts.dir: dtinfo.pcf.gz install-data-hook: $(MKDIR_P) $(DESTDIR)$(fontaliasesconfdir) - $(CP) $(fontaliasesdatadir)/$(FONTS_ALIAS) $(DESTDIR)$(fontaliasesconfdir)/fonts.alias + $(CP) $(DESTDIR)$(fontaliasesdatadir)/$(FONTS_ALIAS) $(DESTDIR)$(fontaliasesconfdir)/fonts.alias From 4370a95a84198944d3614fb82221be8349becfee Mon Sep 17 00:00:00 2001 From: Chase Date: Fri, 29 Jul 2022 11:13:34 -0500 Subject: [PATCH 06/75] dthelp: remove obsolete and non-compiled code --- .../dthelp/parser/canon1/build/proto.h | 2 - .../dthelp/parser/canon1/eltdef/proto.h | 2 - .../dthelp/parser/canon1/helptag/Makefile.am | 2 +- .../dthelp/parser/canon1/helptag/calculat.c | 37 - .../dthelp/parser/canon1/helptag/calculat.h | 828 ------------------ .../dthelp/parser/canon1/helptag/charconv.h | 156 ---- .../dthelp/parser/canon1/helptag/figure.c | 29 - .../dthelp/parser/canon1/helptag/fproto.h | 2 - .../dthelp/parser/canon1/helptag/grphpar.c | 29 - .../dthelp/parser/canon1/helptag/grphpar.h | 28 - .../dthelp/parser/canon1/helptag/make.c | 48 - .../dthelp/parser/canon1/helptag/need.c | 24 - .../dthelp/parser/canon1/helptag/table.c | 24 - .../dthelp/parser/canon1/parser/addinput.c | 24 - .../dthelp/parser/canon1/parser/delfree.c | 61 -- .../dthelp/parser/canon1/parser/dmpline.c | 50 -- .../dthelp/parser/canon1/parser/eprefix.c | 36 - .../dthelp/parser/canon1/parser/errline.c | 42 - .../dthelp/parser/canon1/parser/esuffix.c | 43 - .../dthelp/parser/canon1/parser/findpar.c | 92 -- .../dthelp/parser/canon1/parser/getc.c | 35 - .../dthelp/parser/canon1/parser/ifdata.c | 71 -- .../dthelp/parser/canon1/parser/openent.c | 36 - .../dthelp/parser/canon1/parser/openfrst.c | 36 - .../dthelp/parser/canon1/parser/parcount.c | 44 - .../dthelp/parser/canon1/parser/pardef.c | 61 -- .../dthelp/parser/canon1/parser/parname.c | 58 -- .../dthelp/parser/canon1/parser/parvalok.c | 54 -- .../dthelp/parser/canon1/parser/procscmp.c | 39 - .../dthelp/parser/canon1/parser/proto.h | 2 - .../dthelp/parser/canon1/parser/setopt.c | 36 - .../dthelp/parser/canon1/parser/signmsg.c | 40 - .../dthelp/parser/canon1/parser/startdoc.c | 39 - .../dthelp/parser/canon1/parser/trace.c | 46 - .../dthelp/parser/canon1/util/emptyfil.c | 40 - .../dthelp/parser/canon1/util/fclndir.c | 160 ---- .../dthelp/parser/canon1/util/initct.c | 45 - .../dthelp/parser/canon1/util/strstr.c | 40 - .../dthelp/parser/pass1/build/proto.h | 2 - .../dthelp/parser/pass1/eltdef/proto.h | 2 - .../dthelp/parser/pass1/helptag/Makefile.am | 2 +- .../dthelp/parser/pass1/helptag/calculat.c | 37 - .../dthelp/parser/pass1/helptag/calculat.h | 828 ------------------ .../dthelp/parser/pass1/helptag/charconv.h | 156 ---- .../dthelp/parser/pass1/helptag/figure.c | 29 - .../dthelp/parser/pass1/helptag/fproto.h | 2 - .../dthelp/parser/pass1/helptag/grphpar.c | 29 - .../dthelp/parser/pass1/helptag/grphpar.h | 28 - .../dthelp/parser/pass1/helptag/make.c | 48 - .../dthelp/parser/pass1/helptag/need.c | 24 - .../dthelp/parser/pass1/helptag/table.c | 24 - .../dthelp/parser/pass1/parser/addinput.c | 24 - .../dthelp/parser/pass1/parser/delfree.c | 61 -- .../dthelp/parser/pass1/parser/dmpline.c | 50 -- .../dthelp/parser/pass1/parser/eprefix.c | 36 - .../dthelp/parser/pass1/parser/errline.c | 42 - .../dthelp/parser/pass1/parser/esuffix.c | 43 - .../dthelp/parser/pass1/parser/findpar.c | 92 -- .../dthelp/parser/pass1/parser/getc.c | 35 - .../dthelp/parser/pass1/parser/ifdata.c | 71 -- .../dthelp/parser/pass1/parser/openent.c | 36 - .../dthelp/parser/pass1/parser/openfrst.c | 36 - .../dthelp/parser/pass1/parser/parcount.c | 44 - .../dthelp/parser/pass1/parser/pardef.c | 61 -- .../dthelp/parser/pass1/parser/parname.c | 58 -- .../dthelp/parser/pass1/parser/parvalok.c | 54 -- .../dthelp/parser/pass1/parser/procscmp.c | 39 - .../dthelp/parser/pass1/parser/proto.h | 2 - .../dthelp/parser/pass1/parser/setopt.c | 36 - .../dthelp/parser/pass1/parser/startdoc.c | 39 - .../dthelp/parser/pass1/parser/trace.c | 46 - .../dthelp/parser/pass1/util/emptyfil.c | 38 - .../dthelp/parser/pass1/util/fclndir.c | 160 ---- .../dthelp/parser/pass1/util/initct.c | 45 - .../dthelp/parser/pass1/util/strstr.c | 40 - .../dthelp/parser/pass2/build/proto.h | 2 - .../dthelp/parser/pass2/eltdef/proto.h | 2 - .../dthelp/parser/pass2/parser/addinput.c | 24 - .../dthelp/parser/pass2/parser/delfree.c | 61 -- .../dthelp/parser/pass2/parser/dmpline.c | 50 -- .../dthelp/parser/pass2/parser/eprefix.c | 36 - .../dthelp/parser/pass2/parser/errline.c | 42 - .../dthelp/parser/pass2/parser/esuffix.c | 43 - .../dthelp/parser/pass2/parser/findpar.c | 92 -- .../dthelp/parser/pass2/parser/getc.c | 35 - .../dthelp/parser/pass2/parser/ifdata.c | 71 -- .../dthelp/parser/pass2/parser/openent.c | 36 - .../dthelp/parser/pass2/parser/openfrst.c | 36 - .../dthelp/parser/pass2/parser/parcount.c | 44 - .../dthelp/parser/pass2/parser/pardef.c | 61 -- .../dthelp/parser/pass2/parser/parname.c | 58 -- .../dthelp/parser/pass2/parser/parvalok.c | 54 -- .../dthelp/parser/pass2/parser/procscmp.c | 39 - .../dthelp/parser/pass2/parser/proto.h | 2 - .../dthelp/parser/pass2/parser/setopt.c | 36 - .../dthelp/parser/pass2/parser/signmsg.c | 40 - .../dthelp/parser/pass2/parser/startdoc.c | 39 - .../dthelp/parser/pass2/parser/trace.c | 46 - .../dthelp/parser/pass2/util/emptyfil.c | 42 - .../dthelp/parser/pass2/util/fclndir.c | 160 ---- .../dthelp/parser/pass2/util/initct.c | 47 - .../dthelp/parser/pass2/util/strstr.c | 40 - 102 files changed, 2 insertions(+), 6076 deletions(-) delete mode 100644 cde/programs/dthelp/parser/canon1/helptag/calculat.c delete mode 100644 cde/programs/dthelp/parser/canon1/helptag/calculat.h delete mode 100644 cde/programs/dthelp/parser/canon1/helptag/charconv.h delete mode 100644 cde/programs/dthelp/parser/canon1/helptag/figure.c delete mode 100644 cde/programs/dthelp/parser/canon1/helptag/grphpar.c delete mode 100644 cde/programs/dthelp/parser/canon1/helptag/grphpar.h delete mode 100644 cde/programs/dthelp/parser/canon1/helptag/make.c delete mode 100644 cde/programs/dthelp/parser/canon1/helptag/need.c delete mode 100644 cde/programs/dthelp/parser/canon1/helptag/table.c delete mode 100644 cde/programs/dthelp/parser/canon1/parser/addinput.c delete mode 100644 cde/programs/dthelp/parser/canon1/parser/delfree.c delete mode 100644 cde/programs/dthelp/parser/canon1/parser/dmpline.c delete mode 100644 cde/programs/dthelp/parser/canon1/parser/eprefix.c delete mode 100644 cde/programs/dthelp/parser/canon1/parser/errline.c delete mode 100644 cde/programs/dthelp/parser/canon1/parser/esuffix.c delete mode 100644 cde/programs/dthelp/parser/canon1/parser/findpar.c delete mode 100644 cde/programs/dthelp/parser/canon1/parser/getc.c delete mode 100644 cde/programs/dthelp/parser/canon1/parser/ifdata.c delete mode 100644 cde/programs/dthelp/parser/canon1/parser/openent.c delete mode 100644 cde/programs/dthelp/parser/canon1/parser/openfrst.c delete mode 100644 cde/programs/dthelp/parser/canon1/parser/parcount.c delete mode 100644 cde/programs/dthelp/parser/canon1/parser/pardef.c delete mode 100644 cde/programs/dthelp/parser/canon1/parser/parname.c delete mode 100644 cde/programs/dthelp/parser/canon1/parser/parvalok.c delete mode 100644 cde/programs/dthelp/parser/canon1/parser/procscmp.c delete mode 100644 cde/programs/dthelp/parser/canon1/parser/setopt.c delete mode 100644 cde/programs/dthelp/parser/canon1/parser/signmsg.c delete mode 100644 cde/programs/dthelp/parser/canon1/parser/startdoc.c delete mode 100644 cde/programs/dthelp/parser/canon1/parser/trace.c delete mode 100644 cde/programs/dthelp/parser/canon1/util/emptyfil.c delete mode 100644 cde/programs/dthelp/parser/canon1/util/fclndir.c delete mode 100644 cde/programs/dthelp/parser/canon1/util/initct.c delete mode 100644 cde/programs/dthelp/parser/canon1/util/strstr.c delete mode 100644 cde/programs/dthelp/parser/pass1/helptag/calculat.c delete mode 100644 cde/programs/dthelp/parser/pass1/helptag/calculat.h delete mode 100644 cde/programs/dthelp/parser/pass1/helptag/charconv.h delete mode 100644 cde/programs/dthelp/parser/pass1/helptag/figure.c delete mode 100644 cde/programs/dthelp/parser/pass1/helptag/grphpar.c delete mode 100644 cde/programs/dthelp/parser/pass1/helptag/grphpar.h delete mode 100644 cde/programs/dthelp/parser/pass1/helptag/make.c delete mode 100644 cde/programs/dthelp/parser/pass1/helptag/need.c delete mode 100644 cde/programs/dthelp/parser/pass1/helptag/table.c delete mode 100644 cde/programs/dthelp/parser/pass1/parser/addinput.c delete mode 100644 cde/programs/dthelp/parser/pass1/parser/delfree.c delete mode 100644 cde/programs/dthelp/parser/pass1/parser/dmpline.c delete mode 100644 cde/programs/dthelp/parser/pass1/parser/eprefix.c delete mode 100644 cde/programs/dthelp/parser/pass1/parser/errline.c delete mode 100644 cde/programs/dthelp/parser/pass1/parser/esuffix.c delete mode 100644 cde/programs/dthelp/parser/pass1/parser/findpar.c delete mode 100644 cde/programs/dthelp/parser/pass1/parser/getc.c delete mode 100644 cde/programs/dthelp/parser/pass1/parser/ifdata.c delete mode 100644 cde/programs/dthelp/parser/pass1/parser/openent.c delete mode 100644 cde/programs/dthelp/parser/pass1/parser/openfrst.c delete mode 100644 cde/programs/dthelp/parser/pass1/parser/parcount.c delete mode 100644 cde/programs/dthelp/parser/pass1/parser/pardef.c delete mode 100644 cde/programs/dthelp/parser/pass1/parser/parname.c delete mode 100644 cde/programs/dthelp/parser/pass1/parser/parvalok.c delete mode 100644 cde/programs/dthelp/parser/pass1/parser/procscmp.c delete mode 100644 cde/programs/dthelp/parser/pass1/parser/setopt.c delete mode 100644 cde/programs/dthelp/parser/pass1/parser/startdoc.c delete mode 100644 cde/programs/dthelp/parser/pass1/parser/trace.c delete mode 100644 cde/programs/dthelp/parser/pass1/util/emptyfil.c delete mode 100644 cde/programs/dthelp/parser/pass1/util/fclndir.c delete mode 100644 cde/programs/dthelp/parser/pass1/util/initct.c delete mode 100644 cde/programs/dthelp/parser/pass1/util/strstr.c delete mode 100644 cde/programs/dthelp/parser/pass2/parser/addinput.c delete mode 100644 cde/programs/dthelp/parser/pass2/parser/delfree.c delete mode 100644 cde/programs/dthelp/parser/pass2/parser/dmpline.c delete mode 100644 cde/programs/dthelp/parser/pass2/parser/eprefix.c delete mode 100644 cde/programs/dthelp/parser/pass2/parser/errline.c delete mode 100644 cde/programs/dthelp/parser/pass2/parser/esuffix.c delete mode 100644 cde/programs/dthelp/parser/pass2/parser/findpar.c delete mode 100644 cde/programs/dthelp/parser/pass2/parser/getc.c delete mode 100644 cde/programs/dthelp/parser/pass2/parser/ifdata.c delete mode 100644 cde/programs/dthelp/parser/pass2/parser/openent.c delete mode 100644 cde/programs/dthelp/parser/pass2/parser/openfrst.c delete mode 100644 cde/programs/dthelp/parser/pass2/parser/parcount.c delete mode 100644 cde/programs/dthelp/parser/pass2/parser/pardef.c delete mode 100644 cde/programs/dthelp/parser/pass2/parser/parname.c delete mode 100644 cde/programs/dthelp/parser/pass2/parser/parvalok.c delete mode 100644 cde/programs/dthelp/parser/pass2/parser/procscmp.c delete mode 100644 cde/programs/dthelp/parser/pass2/parser/setopt.c delete mode 100644 cde/programs/dthelp/parser/pass2/parser/signmsg.c delete mode 100644 cde/programs/dthelp/parser/pass2/parser/startdoc.c delete mode 100644 cde/programs/dthelp/parser/pass2/parser/trace.c delete mode 100644 cde/programs/dthelp/parser/pass2/util/emptyfil.c delete mode 100644 cde/programs/dthelp/parser/pass2/util/fclndir.c delete mode 100644 cde/programs/dthelp/parser/pass2/util/initct.c delete mode 100644 cde/programs/dthelp/parser/pass2/util/strstr.c diff --git a/cde/programs/dthelp/parser/canon1/build/proto.h b/cde/programs/dthelp/parser/canon1/build/proto.h index f9a4a9091..97dbdbfc1 100644 --- a/cde/programs/dthelp/parser/canon1/build/proto.h +++ b/cde/programs/dthelp/parser/canon1/build/proto.h @@ -128,8 +128,6 @@ int gettoken(int *c, int context); TREE *gettreenode(void); -void m_initctype(void); - void initialize(void); LOGICAL litproc(int delim); diff --git a/cde/programs/dthelp/parser/canon1/eltdef/proto.h b/cde/programs/dthelp/parser/canon1/eltdef/proto.h index e22c6e53e..3dba71fab 100644 --- a/cde/programs/dthelp/parser/canon1/eltdef/proto.h +++ b/cde/programs/dthelp/parser/canon1/eltdef/proto.h @@ -90,8 +90,6 @@ void getname(int first); int gettoken(int *c, int context); -void m_initctype(void); - void initialize(void); LOGICAL m_letter(M_WCHAR c); diff --git a/cde/programs/dthelp/parser/canon1/helptag/Makefile.am b/cde/programs/dthelp/parser/canon1/helptag/Makefile.am index 80eddc1fb..97e8d07ff 100644 --- a/cde/programs/dthelp/parser/canon1/helptag/Makefile.am +++ b/cde/programs/dthelp/parser/canon1/helptag/Makefile.am @@ -28,5 +28,5 @@ AM_CPPFLAGS = -I$(HELPPARSERSRC) -I$(HELPUTILSRC) \ # needed by parser/ noinst_LIBRARIES = libhelptag.a -libhelptag_a_SOURCES = custom.c default.c help.c make.c option.c \ +libhelptag_a_SOURCES = custom.c default.c help.c option.c \ special.c out.c xref.c global.c ../parser/delim.h diff --git a/cde/programs/dthelp/parser/canon1/helptag/calculat.c b/cde/programs/dthelp/parser/canon1/helptag/calculat.c deleted file mode 100644 index 6f7178d67..000000000 --- a/cde/programs/dthelp/parser/canon1/helptag/calculat.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: calculat.c /main/3 1995/11/08 09:28:53 rswiston $ */ -/* - * Copyright 1989 Hewlett-Packard Co. - * - * - * procedures used by calculator elements for 1.2 release 26jul89-pj - * - * NOTE : This file is used as a Microsoft Linker overlay, so it cannot - * have functions as pointers, eg. (proc *) f(). Routines that are - * or invoke function pointers should be in tex.c. - * - */ - -/* Obsolete */ - diff --git a/cde/programs/dthelp/parser/canon1/helptag/calculat.h b/cde/programs/dthelp/parser/canon1/helptag/calculat.h deleted file mode 100644 index 86e178d08..000000000 --- a/cde/programs/dthelp/parser/canon1/helptag/calculat.h +++ /dev/null @@ -1,828 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: calculat.h /main/3 1995/11/08 09:29:08 rswiston $ */ -/* this file contains special character expansions for various characters - * in Dot Matrix (computer), Menu Label (ml), and White Menu Label (wl) - * arrays are: ccompspec[] --> computer specials - * cmenlspec[] --> menu label specials - * cwmenlspec[]--> white menu label specials - */ - -/* special computer expansions for dot matrix in calculator style */ -EXTERN char *ccompspec[256] -#if defined(DEFINE) -= { -/* Char Name TeX Expansion */ -/* */ -/* 0: ^@ NUL */ 0, -/* 1: ^A SOH */ 0, -/* 2: ^B STX */ 0, -/* 3: ^C ETX */ 0, -/* 4: ^D EOT */ 0, -/* 5: ^E ENQ */ 0, -/* 6: ^F ACK */ 0, -/* 7: ^G BEL */ 0, -/* 8: ^H BS */ 0, -/* 9: ^I HT */ 0, -/* 10: ^J LF */ 0, -/* 11: ^K VT */ 0, -/* 12: ^L FF */ 0, -/* 13: ^M CR */ 0, -/* 14: ^N SO */ 0, -/* 15: ^O SI */ 0, -/* 16: ^P DLE */ 0, -/* 17: ^Q DC1 */ 0, -/* 18: ^R DC2 */ 0, -/* 19: ^S DC3 */ 0, -/* 20: ^T DC4 */ 0, -/* 21: ^U NAK */ 0, -/* 22: ^V SYN */ 0, -/* 23: ^W ETB */ 0, -/* 24: ^X CAN */ 0, -/* 25: ^Y EM */ 0, -/* 26: ^Z SUB */ 0, -/* 27: ^[ ESC */ 0, -/* 28: ^\ FS */ 0, -/* 29: ^] GS */ 0, -/* 30: ^^ RS */ 0, -/* 31: ^_ US */ 0, -/* 32: SP */ 0, -/* 33: ! */ 0, -/* 34: " */ 0, -/* 35: # */ "\\#", -/* 36: $ */ "{\\dollar}", -/* 37: % */ "\\%", -/* 38: & */ "\\&", -/* 39: ' */ "{'}", -/* 40: ( */ 0, -/* 41: ) */ 0, -/* 42: * */ 0, -/* 43: + */ 0, -/* 44: , */ 0, -/* 45: - */ "{-}", -/* 46: . */ 0, -/* 47: / */ 0, -/* 48: 0 */ 0, -/* 49: 1 */ 0, -/* 50: 2 */ 0, -/* 51: 3 */ 0, -/* 52: 4 */ 0, -/* 53: 5 */ 0, -/* 54: 6 */ 0, -/* 55: 7 */ 0, -/* 56: 8 */ 0, -/* 57: 9 */ 0, -/* 58: : */ 0, -/* 59: ; */ 0, -/* 60: < */ "{\\tendmb\\char'045}", -/* 61: = */ 0, -/* 62: > */ "{\\tendmb\\char'046}", -/* 63: ? */ 0, -/* 64: @ */ 0, -/* 65: A */ 0, -/* 66: B */ 0, -/* 67: C */ 0, -/* 68: D */ 0, -/* 69: E */ 0, -/* 70: F */ 0, -/* 71: G */ 0, -/* 72: H */ 0, -/* 73: I */ 0, -/* 74: J */ 0, -/* 75: K */ 0, -/* 76: L */ 0, -/* 77: M */ 0, -/* 78: N */ 0, -/* 79: O */ 0, -/* 80: P */ 0, -/* 81: Q */ 0, -/* 82: R */ 0, -/* 83: S */ 0, -/* 84: T */ 0, -/* 85: U */ 0, -/* 86: V */ 0, -/* 87: W */ 0, -/* 88: X */ 0, -/* 89: Y */ 0, -/* 90: Z */ 0, -/* 91: [ */ 0, -/* 92: \\ */ "{\\tendmb\\char'047}", -/* 93: ] */ 0, -/* 94: ^ */ "{\\tendmb\\char'064}", -/* 95: _ */ "{\\tendmb\\char'066}", -/* 96: ` */ "{`}", -/* 97: a */ 0, -/* 98: b */ 0, -/* 99: c */ 0, -/* 100: d */ 0, -/* 101: e */ 0, -/* 102: f */ 0, -/* 103: g */ 0, -/* 104: h */ 0, -/* 105: i */ 0, -/* 106: j */ 0, -/* 107: k */ 0, -/* 108: l */ 0, -/* 109: m */ 0, -/* 110: n */ 0, -/* 111: o */ 0, -/* 112: p */ 0, -/* 113: q */ 0, -/* 114: r */ 0, -/* 115: s */ 0, -/* 116: t */ 0, -/* 117: u */ 0, -/* 118: v */ 0, -/* 119: w */ 0, -/* 120: x */ 0, -/* 121: y */ 0, -/* 122: z */ 0, -/* 123: { */ "{\\tendmb\\char'070}", -/* 124: | */ "{\\tendmb\\char'104}", -/* 125: } */ "{\\tendmb\\char'107}", -/* 126: ~ */ "{\\tendmb\\char'116}", -/* 127: DEL */ 0, -/* 128: undefined */ 0, -/* 129: undefined */ 0, -/* 130: undefined */ 0, -/* 131: undefined */ 0, -/* 132: undefined */ 0, -/* 133: undefined */ 0, -/* 134: undefined */ 0, -/* 135: undefined */ 0, -/* 136: undefined */ 0, -/* 137: undefined */ 0, -/* 138: undefined */ 0, -/* 139: undefined */ 0, -/* 140: undefined */ 0, -/* 141: undefined */ 0, -/* 142: undefined */ 0, -/* 143: undefined */ 0, -/* 144: undefined */ 0, -/* 145: undefined */ 0, -/* 146: undefined */ 0, -/* 147: undefined */ 0, -/* 148: undefined */ 0, -/* 149: undefined */ 0, -/* 150: undefined */ 0, -/* 151: undefined */ 0, -/* 152: undefined */ 0, -/* 153: undefined */ 0, -/* 154: undefined */ 0, -/* 155: undefined */ 0, -/* 156: undefined */ 0, -/* 157: undefined */ 0, -/* 158: undefined */ 0, -/* 159: undefined */ 0, -/* 160: undefined */ 0, -/* 161: A grave */ "{\\tendmc\\char'041}", -/* 162: A circumflex */ "{\\tendmc\\char'042}", -/* 163: E grave */ "{\\tendmc\\char'043}", -/* 164: E circumflex */ "{\\tendmc\\char'044}", -/* 165: E dieresis */ "{\\tendmc\\char'045}", -/* 166: I circumflex */ "{\\tendmc\\char'046}", -/* 167: I dieresis */ "{\\tendmc\\char'047}", -/* 168: acute accent */ "{\\tendma\\char'023}", -/* 169: grave accent */ "{\\tendma\\char'022}", -/* 170: circumflex */ "{\\tendma\\char'136}", -/* 171: dieresis */ "{\\tendma\\char'177}", -/* 172: tilde */ "{\\tendma\\char'176}", -/* 173: U grave */ "{\\tendmc\\char'050}", -/* 174: U circumflex */ "{\\tendmc\\char'051}", -/* 175: Italian Lira */ 0, -/* 176: overbar */ 0, -/* 177: Y acute */ "{\\tendmc\\char'053}", -/* 178: y acute */ "{\\tendmc\\char'054}", -/* 179: degree */ 0, -/* 180: C cedilla */ "{\\tendma\\char'030}", -/* 181: c cedilla */ "{\\tendma\\char'030}", -/* 182: N tilde */ "{\\tendmc\\char'055}", -/* 183: n tilde */ "{\\tendmc\\char'056}", -/* 184: inverted exclamation mark */ "{\\tendma\\char'074}", -/* 185: inverted question mark */ "{\\tendma\\char'076}", -/* 186: currency sign */ 0, -/* 187: pound sterling */ 0, -/* 188: Yen */ 0, -/* 189: Section sign */ 0, -/* 190: florin */ 0, -/* 191: Cent sign */ 0, -/* 192: a circumflex */ "{\\tendmc\\char'063}", -/* 193: e circumflex */ "{\\tendmc\\char'064}", -/* 194: o circumflex */ "{\\tendmc\\char'065}", -/* 195: u circumflex */ "{\\tendmc\\char'066}", -/* 196: a acute */ "{\\tendmc\\char'067}", -/* 197: e acute */ "{\\tendmc\\char'070}", -/* 198: o acute */ "{\\tendmc\\char'071}", -/* 199: u acute */ "{\\tendmc\\char'072}", -/* 200: a grave */ "{\\tendmc\\char'073}", -/* 201: e grave */ "{\\tendmc\\char'074}", -/* 202: o grave */ "{\\tendmc\\char'075}", -/* 203: u grave */ "{\\tendmc\\char'076}", -/* 204: a dieresis */ "{\\tendmc\\char'077}", -/* 205: e dieresis */ "{\\tendmc\\char'100}", -/* 206: o dieresis */ "{\\tendmc\\char'101}", -/* 207: u dieresis */ "{\\tendmc\\char'102}", -/* 208: A angstrom */ "{\\tendmc\\char'103}", -/* 209: i circumflex */ "{\\tendmc\\char'104}", -/* 210: O slash */ "{\\tendma\\char'037}", -/* 211: AE ligature */ "{\\tendma\\char'035}", -/* 212: a angstrom */ "{\\tendmc\\char'105}", -/* 213: i acute */ "{\\tendmc\\char'106}", -/* 214: o slash */ "{\\tendma\\char'034}", -/* 215: ae ligature */ "{\\tendma\\char'032}", -/* 216: A dieresis */ "{\\tendmc\\char'107}", -/* 217: i grave */ "{\\tendmc\\char'110}", -/* 218: O dieresis */ "{\\tendmc\\char'111}", -/* 219: U dieresis */ "{\\tendmc\\char'112}", -/* 220: E acute */ "{\\tendmc\\char'113}", -/* 221: i dieresis */ "{\\tendmc\\char'114}", -/* 222: SS ligature */ "{\\tendma\\char'031}", -/* 223: O circumflex */ "{\\tendmc\\char'115}", -/* 224: A acute */ "{\\tendmc\\char'116}", -/* 225: A tilde */ "{\\tendmc\\char'117}", -/* 226: a tilde */ "{\\tendmc\\char'120}", -/* 227: Eth */ 0, -/* 228: eth */ 0, -/* 229: I acute */ "{\\tendmc\\char'121}", -/* 230: I grave */ "{\\tendmc\\char'122}", -/* 231: O acute */ "{\\tendmc\\char'123}", -/* 232: O grave */ "{\\tendmc\\char'124}", -/* 233: O tilde */ "{\\tendmc\\char'125}", -/* 234: o tilde */ "{\\tendmc\\char'126}", -/* 235: S caron */ "{\\tendmc\\char'127}", -/* 236: s caron */ "{\\tendmc\\char'130}", -/* 237: U acute */ "{\\tendmc\\char'131}", -/* 238: Y dieresis */ "{\\tendmc\\char'132}", -/* 239: y dieresis */ "{\\tendmc\\char'133}", -/* 240: Thorn */ 0, -/* 241: thorn */ 0, -/* 242: undefined */ 0, -/* 243: mu */ 0, -/* 244: paragraph sign */ 0, -/* 245: fraction 3/4 */ 0, -/* 246: long dash */ 0, -/* 247: fraction 1/4 */ 0, -/* 248: fraction 1/2 */ 0, -/* 249: Female ordinal */ 0, -/* 250: Male ordinal */ 0, -/* 251: French double open quote */ 0, -/* 252: Solid square */ 0, -/* 253: French double close quote */ 0, -/* 254: Plus over minus sign */ 0, -/* 255: undefined */ 0 -} -#endif -; - -/* special menu label character expansions */ -EXTERN char *cmenlspec[256] -#if defined(DEFINE) -= { -/* Char Name TeX Expansion */ -/* */ -/* 0: ^@ NUL */ 0, -/* 1: ^A SOH */ 0, -/* 2: ^B STX */ 0, -/* 3: ^C ETX */ 0, -/* 4: ^D EOT */ 0, -/* 5: ^E ENQ */ 0, -/* 6: ^F ACK */ 0, -/* 7: ^G BEL */ 0, -/* 8: ^H BS */ 0, -/* 9: ^I HT */ 0, -/* 10: ^J LF */ 0, -/* 11: ^K VT */ 0, -/* 12: ^L FF */ 0, -/* 13: ^M CR */ 0, -/* 14: ^N SO */ 0, -/* 15: ^O SI */ 0, -/* 16: ^P DLE */ 0, -/* 17: ^Q DC1 */ 0, -/* 18: ^R DC2 */ 0, -/* 19: ^S DC3 */ 0, -/* 20: ^T DC4 */ 0, -/* 21: ^U NAK */ 0, -/* 22: ^V SYN */ 0, -/* 23: ^W ETB */ 0, -/* 24: ^X CAN */ 0, -/* 25: ^Y EM */ 0, -/* 26: ^Z SUB */ 0, -/* 27: ^[ ESC */ 0, -/* 28: ^\ FS */ 0, -/* 29: ^] GS */ 0, -/* 30: ^^ RS */ 0, -/* 31: ^_ US */ 0, -/* 32: SP */ "{\\tenmlb\\char'146}", -/* 33: ! */ 0, -/* 34: " */ 0, -/* 35: # */ "\\#", -/* 36: $ */ "{\\dollar}", -/* 37: % */ "\\%", -/* 38: & */ "\\&", -/* 39: ' */ "{'}", -/* 40: ( */ 0, -/* 41: ) */ 0, -/* 42: * */ 0, -/* 43: + */ 0, -/* 44: , */ 0, -/* 45: - */ "{-}", -/* 46: . */ 0, -/* 47: / */ 0, -/* 48: 0 */ 0, -/* 49: 1 */ 0, -/* 50: 2 */ 0, -/* 51: 3 */ 0, -/* 52: 4 */ 0, -/* 53: 5 */ 0, -/* 54: 6 */ 0, -/* 55: 7 */ 0, -/* 56: 8 */ 0, -/* 57: 9 */ 0, -/* 58: : */ 0, -/* 59: ; */ 0, -/* 60: < */ "{\\tenmlb\\char'045}", -/* 61: = */ 0, -/* 62: > */ "{\\tenmlb\\char'046}", -/* 63: ? */ 0, -/* 64: @ */ 0, -/* 65: A */ 0, -/* 66: B */ 0, -/* 67: C */ 0, -/* 68: D */ 0, -/* 69: E */ 0, -/* 70: F */ 0, -/* 71: G */ 0, -/* 72: H */ 0, -/* 73: I */ 0, -/* 74: J */ 0, -/* 75: K */ 0, -/* 76: L */ 0, -/* 77: M */ 0, -/* 78: N */ 0, -/* 79: O */ 0, -/* 80: P */ 0, -/* 81: Q */ 0, -/* 82: R */ 0, -/* 83: S */ 0, -/* 84: T */ 0, -/* 85: U */ 0, -/* 86: V */ 0, -/* 87: W */ 0, -/* 88: X */ 0, -/* 89: Y */ 0, -/* 90: Z */ 0, -/* 91: [ */ 0, -/* 92: \\ */ "{\\tenmlb\\char'047}", -/* 93: ] */ 0, -/* 94: ^ */ "{\\tenmlb\\char'064}", -/* 95: _ */ "{\\tenmlb\\char'066}", -/* 96: ` */ "{`}", -/* 97: a */ 0, -/* 98: b */ 0, -/* 99: c */ 0, -/* 100: d */ 0, -/* 101: e */ 0, -/* 102: f */ 0, -/* 103: g */ 0, -/* 104: h */ 0, -/* 105: i */ 0, -/* 106: j */ 0, -/* 107: k */ 0, -/* 108: l */ 0, -/* 109: m */ 0, -/* 110: n */ 0, -/* 111: o */ 0, -/* 112: p */ 0, -/* 113: q */ 0, -/* 114: r */ 0, -/* 115: s */ 0, -/* 116: t */ 0, -/* 117: u */ 0, -/* 118: v */ 0, -/* 119: w */ 0, -/* 120: x */ 0, -/* 121: y */ 0, -/* 122: z */ 0, -/* 123: { */ "{\\tenmlb\\char'070}", -/* 124: | */ "{\\tenmlb\\char'104}", -/* 125: } */ "{\\tenmlb\\char'107}", -/* 126: ~ */ "{\\tenmlb\\char'116}", -/* 127: DEL */ 0, -/* 128: undefined */ 0, -/* 129: undefined */ 0, -/* 130: undefined */ 0, -/* 131: undefined */ 0, -/* 132: undefined */ 0, -/* 133: undefined */ 0, -/* 134: undefined */ 0, -/* 135: undefined */ 0, -/* 136: undefined */ 0, -/* 137: undefined */ 0, -/* 138: undefined */ 0, -/* 139: undefined */ 0, -/* 140: undefined */ 0, -/* 141: undefined */ 0, -/* 142: undefined */ 0, -/* 143: undefined */ 0, -/* 144: undefined */ 0, -/* 145: undefined */ 0, -/* 146: undefined */ 0, -/* 147: undefined */ 0, -/* 148: undefined */ 0, -/* 149: undefined */ 0, -/* 150: undefined */ 0, -/* 151: undefined */ 0, -/* 152: undefined */ 0, -/* 153: undefined */ 0, -/* 154: undefined */ 0, -/* 155: undefined */ 0, -/* 156: undefined */ 0, -/* 157: undefined */ 0, -/* 158: undefined */ 0, -/* 159: undefined */ 0, -/* 160: undefined */ 0, -/* 161: A grave */ "{\\tenmlc\\char'041}", -/* 162: A circumflex */ "{\\tenmlc\\char'042}", -/* 163: E grave */ "{\\tenmlc\\char'043}", -/* 164: E circumflex */ "{\\tenmlc\\char'044}", -/* 165: E dieresis */ "{\\tenmlc\\char'045}", -/* 166: I circumflex */ "{\\tenmlc\\char'046}", -/* 167: I dieresis */ "{\\tenmlc\\char'047}", -/* 168: acute accent */ "{\\tenmla\\char'023}", -/* 169: grave accent */ "{\\tenmla\\char'022}", -/* 170: circumflex */ "{\\tenmla\\char'136}", -/* 171: dieresis */ "{\\tenmla\\char'177}", -/* 172: tilde */ "{\\tenmla\\char'176}", -/* 173: U grave */ "{\\tenmlc\\char'050}", -/* 174: U circumflex */ "{\\tenmlc\\char'051}", -/* 175: Italian Lira */ 0, -/* 176: overbar */ 0, -/* 177: Y acute */ "{\\tenmlc\\char'053}", -/* 178: y acute */ "{\\tenmlc\\char'054}", -/* 179: degree */ 0, -/* 180: C cedilla */ "{\\tenmla\\char'030}", -/* 181: c cedilla */ "{\\tenmla\\char'030}", -/* 182: N tilde */ "{\\tenmlc\\char'055}", -/* 183: n tilde */ "{\\tenmlc\\char'056}", -/* 184: inverted exclamation mark */ "{\\tenmla\\char'074}", -/* 185: inverted question mark */ "{\\tenmla\\char'076}", -/* 186: currency sign */ 0, -/* 187: pound sterling */ 0, -/* 188: Yen */ 0, -/* 189: Section sign */ 0, -/* 190: florin */ 0, -/* 191: Cent sign */ 0, -/* 192: a circumflex */ "{\\tenmlc\\char'063}", -/* 193: e circumflex */ "{\\tenmlc\\char'064}", -/* 194: o circumflex */ "{\\tenmlc\\char'065}", -/* 195: u circumflex */ "{\\tenmlc\\char'066}", -/* 196: a acute */ "{\\tenmlc\\char'067}", -/* 197: e acute */ "{\\tenmlc\\char'070}", -/* 198: o acute */ "{\\tenmlc\\char'071}", -/* 199: u acute */ "{\\tenmlc\\char'072}", -/* 200: a grave */ "{\\tenmlc\\char'073}", -/* 201: e grave */ "{\\tenmlc\\char'074}", -/* 202: o grave */ "{\\tenmlc\\char'075}", -/* 203: u grave */ "{\\tenmlc\\char'076}", -/* 204: a dieresis */ "{\\tenmlc\\char'077}", -/* 205: e dieresis */ "{\\tenmlc\\char'100}", -/* 206: o dieresis */ "{\\tenmlc\\char'101}", -/* 207: u dieresis */ "{\\tenmlc\\char'102}", -/* 208: A angstrom */ "{\\tenmlc\\char'103}", -/* 209: i circumflex */ "{\\tenmlc\\char'104}", -/* 210: O slash */ "{\\tenmla\\char'037}", -/* 211: AE ligature */ "{\\tenmla\\char'035}", -/* 212: a angstrom */ "{\\tenmlc\\char'105}", -/* 213: i acute */ "{\\tenmlc\\char'106}", -/* 214: o slash */ "{\\tenmla\\char'034}", -/* 215: ae ligature */ "{\\tenmla\\char'032}", -/* 216: A dieresis */ "{\\tenmlc\\char'107}", -/* 217: i grave */ "{\\tenmlc\\char'110}", -/* 218: O dieresis */ "{\\tenmlc\\char'111}", -/* 219: U dieresis */ "{\\tenmlc\\char'112}", -/* 220: E acute */ "{\\tenmlc\\char'113}", -/* 221: i dieresis */ "{\\tenmlc\\char'114}", -/* 222: SS ligature */ "{\\tenmla\\char'031}", -/* 223: O circumflex */ "{\\tenmlc\\char'115}", -/* 224: A acute */ "{\\tenmlc\\char'116}", -/* 225: A tilde */ "{\\tenmlc\\char'117}", -/* 226: a tilde */ "{\\tenmlc\\char'120}", -/* 227: Eth */ 0, -/* 228: eth */ 0, -/* 229: I acute */ "{\\tenmlc\\char'121}", -/* 230: I grave */ "{\\tenmlc\\char'122}", -/* 231: O acute */ "{\\tenmlc\\char'123}", -/* 232: O grave */ "{\\tenmlc\\char'124}", -/* 233: O tilde */ "{\\tenmlc\\char'125}", -/* 234: o tilde */ "{\\tenmlc\\char'126}", -/* 235: S caron */ "{\\tenmlc\\char'127}", -/* 236: s caron */ "{\\tenmlc\\char'130}", -/* 237: U acute */ "{\\tenmlc\\char'131}", -/* 238: Y dieresis */ "{\\tenmlc\\char'132}", -/* 239: y dieresis */ "{\\tenmlc\\char'133}", -/* 240: Thorn */ 0, -/* 241: thorn */ 0, -/* 242: undefined */ 0, -/* 243: mu */ 0, -/* 244: paragraph sign */ 0, -/* 245: fraction 3/4 */ 0, -/* 246: long dash */ 0, -/* 247: fraction 1/4 */ 0, -/* 248: fraction 1/2 */ 0, -/* 249: Female ordinal */ 0, -/* 250: Male ordinal */ 0, -/* 251: French double open quote */ 0, -/* 252: Solid square */ 0, -/* 253: French double close quote */ 0, -/* 254: Plus over minus sign */ 0, -/* 255: undefined */ 0 -} -#endif -; - -/* white menu label special character expansions */ -EXTERN char *cwmenlspec[256] -#if defined(DEFINE) -= { -/* Char Name TeX Expansion */ -/* */ -/* 0: ^@ NUL */ 0, -/* 1: ^A SOH */ 0, -/* 2: ^B STX */ 0, -/* 3: ^C ETX */ 0, -/* 4: ^D EOT */ 0, -/* 5: ^E ENQ */ 0, -/* 6: ^F ACK */ 0, -/* 7: ^G BEL */ 0, -/* 8: ^H BS */ 0, -/* 9: ^I HT */ 0, -/* 10: ^J LF */ 0, -/* 11: ^K VT */ 0, -/* 12: ^L FF */ 0, -/* 13: ^M CR */ 0, -/* 14: ^N SO */ 0, -/* 15: ^O SI */ 0, -/* 16: ^P DLE */ 0, -/* 17: ^Q DC1 */ 0, -/* 18: ^R DC2 */ 0, -/* 19: ^S DC3 */ 0, -/* 20: ^T DC4 */ 0, -/* 21: ^U NAK */ 0, -/* 22: ^V SYN */ 0, -/* 23: ^W ETB */ 0, -/* 24: ^X CAN */ 0, -/* 25: ^Y EM */ 0, -/* 26: ^Z SUB */ 0, -/* 27: ^[ ESC */ 0, -/* 28: ^\ FS */ 0, -/* 29: ^] GS */ 0, -/* 30: ^^ RS */ 0, -/* 31: ^_ US */ 0, -/* 32: SP */ "{\\tenwlb\\char'146}", -/* 33: ! */ 0, -/* 34: " */ 0, -/* 35: # */ "\\#", -/* 36: $ */ "{\\dollar}", -/* 37: % */ "\\%", -/* 38: & */ "\\&", -/* 39: ' */ "{'}", -/* 40: ( */ 0, -/* 41: ) */ 0, -/* 42: * */ 0, -/* 43: + */ 0, -/* 44: , */ 0, -/* 45: - */ "{-}", -/* 46: . */ 0, -/* 47: / */ 0, -/* 48: 0 */ 0, -/* 49: 1 */ 0, -/* 50: 2 */ 0, -/* 51: 3 */ 0, -/* 52: 4 */ 0, -/* 53: 5 */ 0, -/* 54: 6 */ 0, -/* 55: 7 */ 0, -/* 56: 8 */ 0, -/* 57: 9 */ 0, -/* 58: : */ 0, -/* 59: ; */ 0, -/* 60: < */ "{\\tenwlb\\char'045}", -/* 61: = */ 0, -/* 62: > */ "{\\tenwlb\\char'046}", -/* 63: ? */ 0, -/* 64: @ */ 0, -/* 65: A */ 0, -/* 66: B */ 0, -/* 67: C */ 0, -/* 68: D */ 0, -/* 69: E */ 0, -/* 70: F */ 0, -/* 71: G */ 0, -/* 72: H */ 0, -/* 73: I */ 0, -/* 74: J */ 0, -/* 75: K */ 0, -/* 76: L */ 0, -/* 77: M */ 0, -/* 78: N */ 0, -/* 79: O */ 0, -/* 80: P */ 0, -/* 81: Q */ 0, -/* 82: R */ 0, -/* 83: S */ 0, -/* 84: T */ 0, -/* 85: U */ 0, -/* 86: V */ 0, -/* 87: W */ 0, -/* 88: X */ 0, -/* 89: Y */ 0, -/* 90: Z */ 0, -/* 91: [ */ 0, -/* 92: \\ */ "{\\tenwlb\\char'047}", -/* 93: ] */ 0, -/* 94: ^ */ "{\\tenwlb\\char'064}", -/* 95: _ */ "{\\tenwlb\\char'066}", -/* 96: ` */ "{`}", -/* 97: a */ 0, -/* 98: b */ 0, -/* 99: c */ 0, -/* 100: d */ 0, -/* 101: e */ 0, -/* 102: f */ 0, -/* 103: g */ 0, -/* 104: h */ 0, -/* 105: i */ 0, -/* 106: j */ 0, -/* 107: k */ 0, -/* 108: l */ 0, -/* 109: m */ 0, -/* 110: n */ 0, -/* 111: o */ 0, -/* 112: p */ 0, -/* 113: q */ 0, -/* 114: r */ 0, -/* 115: s */ 0, -/* 116: t */ 0, -/* 117: u */ 0, -/* 118: v */ 0, -/* 119: w */ 0, -/* 120: x */ 0, -/* 121: y */ 0, -/* 122: z */ 0, -/* 123: { */ "{\\tenwlb\\char'070}", -/* 124: | */ "{\\tenwlb\\char'104}", -/* 125: } */ "{\\tenwlb\\char'107}", -/* 126: ~ */ "{\\tenwlb\\char'116}", -/* 127: DEL */ 0, -/* 128: undefined */ 0, -/* 129: undefined */ 0, -/* 130: undefined */ 0, -/* 131: undefined */ 0, -/* 132: undefined */ 0, -/* 133: undefined */ 0, -/* 134: undefined */ 0, -/* 135: undefined */ 0, -/* 136: undefined */ 0, -/* 137: undefined */ 0, -/* 138: undefined */ 0, -/* 139: undefined */ 0, -/* 140: undefined */ 0, -/* 141: undefined */ 0, -/* 142: undefined */ 0, -/* 143: undefined */ 0, -/* 144: undefined */ 0, -/* 145: undefined */ 0, -/* 146: undefined */ 0, -/* 147: undefined */ 0, -/* 148: undefined */ 0, -/* 149: undefined */ 0, -/* 150: undefined */ 0, -/* 151: undefined */ 0, -/* 152: undefined */ 0, -/* 153: undefined */ 0, -/* 154: undefined */ 0, -/* 155: undefined */ 0, -/* 156: undefined */ 0, -/* 157: undefined */ 0, -/* 158: undefined */ 0, -/* 159: undefined */ 0, -/* 160: undefined */ 0, -/* 161: A grave */ "{\\tenwlc\\char'041}", -/* 162: A circumflex */ "{\\tenwlc\\char'042}", -/* 163: E grave */ "{\\tenwlc\\char'043}", -/* 164: E circumflex */ "{\\tenwlc\\char'044}", -/* 165: E dieresis */ "{\\tenwlc\\char'045}", -/* 166: I circumflex */ "{\\tenwlc\\char'046}", -/* 167: I dieresis */ "{\\tenwlc\\char'047}", -/* 168: acute accent */ "{\\tenwla\\char'023}", -/* 169: grave accent */ "{\\tenwla\\char'022}", -/* 170: circumflex */ "{\\tenwla\\char'136}", -/* 171: dieresis */ "{\\tenwla\\char'177}", -/* 172: tilde */ "{\\tenwla\\char'176}", -/* 173: U grave */ "{\\tenwlc\\char'050}", -/* 174: U circumflex */ "{\\tenwlc\\char'051}", -/* 175: Italian Lira */ 0, -/* 176: overbar */ 0, -/* 177: Y acute */ "{\\tenwlc\\char'053}", -/* 178: y acute */ "{\\tenwlc\\char'054}", -/* 179: degree */ 0, -/* 180: C cedilla */ "{\\tenwla\\char'030}", -/* 181: c cedilla */ "{\\tenwla\\char'030}", -/* 182: N tilde */ "{\\tenwlc\\char'055}", -/* 183: n tilde */ "{\\tenwlc\\char'056}", -/* 184: inverted exclamation mark */ "{\\tenwla\\char'074}", -/* 185: inverted question mark */ "{\\tenwla\\char'076}", -/* 186: currency sign */ 0, -/* 187: pound sterling */ 0, -/* 188: Yen */ 0, -/* 189: Section sign */ 0, -/* 190: florin */ 0, -/* 191: Cent sign */ 0, -/* 192: a circumflex */ "{\\tenwlc\\char'063}", -/* 193: e circumflex */ "{\\tenwlc\\char'064}", -/* 194: o circumflex */ "{\\tenwlc\\char'065}", -/* 195: u circumflex */ "{\\tenwlc\\char'066}", -/* 196: a acute */ "{\\tenwlc\\char'067}", -/* 197: e acute */ "{\\tenwlc\\char'070}", -/* 198: o acute */ "{\\tenwlc\\char'071}", -/* 199: u acute */ "{\\tenwlc\\char'072}", -/* 200: a grave */ "{\\tenwlc\\char'073}", -/* 201: e grave */ "{\\tenwlc\\char'074}", -/* 202: o grave */ "{\\tenwlc\\char'075}", -/* 203: u grave */ "{\\tenwlc\\char'076}", -/* 204: a dieresis */ "{\\tenwlc\\char'077}", -/* 205: e dieresis */ "{\\tenwlc\\char'100}", -/* 206: o dieresis */ "{\\tenwlc\\char'101}", -/* 207: u dieresis */ "{\\tenwlc\\char'102}", -/* 208: A angstrom */ "{\\tenwlc\\char'103}", -/* 209: i circumflex */ "{\\tenwlc\\char'104}", -/* 210: O slash */ "{\\tenwla\\char'037}", -/* 211: AE ligature */ "{\\tenwla\\char'035}", -/* 212: a angstrom */ "{\\tenwlc\\char'105}", -/* 213: i acute */ "{\\tenwlc\\char'106}", -/* 214: o slash */ "{\\tenwla\\char'034}", -/* 215: ae ligature */ "{\\tenwla\\char'032}", -/* 216: A dieresis */ "{\\tenwlc\\char'107}", -/* 217: i grave */ "{\\tenwlc\\char'110}", -/* 218: O dieresis */ "{\\tenwlc\\char'111}", -/* 219: U dieresis */ "{\\tenwlc\\char'112}", -/* 220: E acute */ "{\\tenwlc\\char'113}", -/* 221: i dieresis */ "{\\tenwlc\\char'114}", -/* 222: SS ligature */ "{\\tenwla\\char'031}", -/* 223: O circumflex */ "{\\tenwlc\\char'115}", -/* 224: A acute */ "{\\tenwlc\\char'116}", -/* 225: A tilde */ "{\\tenwlc\\char'117}", -/* 226: a tilde */ "{\\tenwlc\\char'120}", -/* 227: Eth */ 0, -/* 228: eth */ 0, -/* 229: I acute */ "{\\tenwlc\\char'121}", -/* 230: I grave */ "{\\tenwlc\\char'122}", -/* 231: O acute */ "{\\tenwlc\\char'123}", -/* 232: O grave */ "{\\tenwlc\\char'124}", -/* 233: O tilde */ "{\\tenwlc\\char'125}", -/* 234: o tilde */ "{\\tenwlc\\char'126}", -/* 235: S caron */ "{\\tenwlc\\char'127}", -/* 236: s caron */ "{\\tenwlc\\char'130}", -/* 237: U acute */ "{\\tenwlc\\char'131}", -/* 238: Y dieresis */ "{\\tenwlc\\char'132}", -/* 239: y dieresis */ "{\\tenwlc\\char'133}", -/* 240: Thorn */ 0, -/* 241: thorn */ 0, -/* 242: undefined */ 0, -/* 243: mu */ 0, -/* 244: paragraph sign */ 0, -/* 245: fraction 3/4 */ 0, -/* 246: long dash */ 0, -/* 247: fraction 1/4 */ 0, -/* 248: fraction 1/2 */ 0, -/* 249: Female ordinal */ 0, -/* 250: Male ordinal */ 0, -/* 251: French double open quote */ 0, -/* 252: Solid square */ 0, -/* 253: French double close quote */ 0, -/* 254: Plus over minus sign */ 0, -/* 255: undefined */ 0 -} -#endif -; - diff --git a/cde/programs/dthelp/parser/canon1/helptag/charconv.h b/cde/programs/dthelp/parser/canon1/helptag/charconv.h deleted file mode 100644 index 18b7422b5..000000000 --- a/cde/programs/dthelp/parser/canon1/helptag/charconv.h +++ /dev/null @@ -1,156 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: charconv.h /main/3 1995/11/08 09:29:21 rswiston $ */ -EXTERN M_WCHAR pc8_to_r8 [256] -#if defined(DEFINE) -= { - '\000','\001','\002','\003','\004','\005','\006','\007','\010','\011', - '\012','\013','\014','\015','\016','\017','\020','\021','\022','\023', - '\024','\025','\026','\027','\030','\031','\032','\033','\034','\035', - '\036','\037','\040','\041','\042','\043','\044','\045','\046','\047', - '\050','\051','\052','\053','\054','\055','\056','\057','\060','\061', - '\062','\063','\064','\065','\066','\067','\070','\071','\072','\073', - '\074','\075','\076','\077','\100','\101','\102','\103','\104','\105', - '\106','\107','\110','\111','\112','\113','\114','\115','\116','\117', - '\120','\121','\122','\123','\124','\125','\126','\127','\130','\131', - '\132','\133','\134','\135','\136','\137','\140','\141','\142','\143', - '\144','\145','\146','\147','\150','\151','\152','\153','\154','\155', - '\156','\157','\160','\161','\162','\163','\164','\165','\166','\167', - '\170','\171','\172','\173','\174','\175','\176','\177','\264','\317', - '\305','\300','\314','\310','\324','\265','\301','\315','\311','\335', - '\321','\331','\330','\320','\334','\327','\323','\302','\316','\312', - '\303','\313','\357','\332','\333','\277','\273','\274','\120','\276', - '\304','\325','\306','\307','\267','\266','\371','\372','\271','\055', - '\052','\370','\367','\270','\373','\375','\374','\374','\374','\174', - '\053','\043','\053','\053','\043','\043','\174','\043','\043','\053', - '\043','\053','\053','\053','\053','\053','\055','\053','\043','\053', - '\043','\043','\043','\043','\043','\075','\043','\043','\053','\043', - '\053','\053','\043','\043','\053','\053','\043','\053','\053','\374', - '\374','\374','\374','\374','\052','\336','\052','\052','\052','\052', - '\363','\052','\052','\052','\052','\052','\052','\326','\052','\052', - '\052','\376','\052','\052','\174','\174','\057','\176','\263','\362', - '\362','\052','\052','\052','\374','\377' - } -#endif - ; - -EXTERN M_WCHAR pc8dn_to_r8 [256] -#if defined(DEFINE) -= { - '\000','\001','\002','\003','\004','\005','\006','\007','\010','\011', - '\012','\013','\014','\015','\016','\017','\020','\021','\022','\023', - '\024','\025','\026','\027','\030','\031','\032','\033','\034','\035', - '\036','\037','\040','\041','\042','\043','\044','\045','\046','\047', - '\050','\051','\052','\053','\054','\055','\056','\057','\060','\061', - '\062','\063','\064','\065','\066','\067','\070','\071','\072','\073', - '\074','\075','\076','\077','\100','\101','\102','\103','\104','\105', - '\106','\107','\110','\111','\112','\113','\114','\115','\116','\117', - '\120','\121','\122','\123','\124','\125','\126','\127','\130','\131', - '\132','\133','\134','\135','\136','\137','\140','\141','\142','\143', - '\144','\145','\146','\147','\150','\151','\152','\153','\154','\155', - '\156','\157','\160','\161','\162','\163','\164','\165','\166','\167', - '\170','\171','\172','\173','\174','\175','\176','\177','\264','\317', - '\305','\300','\314','\310','\324','\265','\301','\315','\311','\335', - '\321','\331','\330','\320','\334','\327','\323','\302','\316','\312', - '\303','\313','\357','\332','\333','\326','\273','\322','\114','\154', - '\304','\325','\306','\307','\267','\266','\352','\351','\271','\342', - '\341','\154','\156','\270','\052','\272','\374','\374','\374','\174', - '\053','\043','\053','\053','\043','\043','\174','\043','\043','\053', - '\043','\053','\053','\053','\053','\053','\055','\053','\043','\053', - '\043','\043','\043','\043','\043','\075','\043','\043','\053','\043', - '\053','\053','\043','\043','\053','\053','\043','\053','\053','\374', - '\374','\374','\374','\374','\052','\336','\052','\052','\052','\052', - '\363','\052','\052','\052','\052','\052','\052','\326','\052','\052', - '\052','\376','\052','\052','\174','\174','\057','\176','\263','\362', - '\362','\052','\052','\052','\374','\377' - } -#endif - ; - -EXTERN M_WCHAR r8_to_pc8 [256] -#if defined(DEFINE) -= { - '\000','\001','\002','\003','\004','\005','\006','\007','\010','\011', - '\012','\013','\014','\015','\016','\017','\020','\021','\022','\023', - '\024','\025','\026','\027','\030','\031','\032','\033','\034','\035', - '\036','\037','\040','\041','\042','\043','\044','\045','\046','\047', - '\050','\051','\052','\053','\054','\055','\056','\057','\060','\061', - '\062','\063','\064','\065','\066','\067','\070','\071','\072','\073', - '\074','\075','\076','\077','\100','\101','\102','\103','\104','\105', - '\106','\107','\110','\111','\112','\113','\114','\115','\116','\117', - '\120','\121','\122','\123','\124','\125','\126','\127','\130','\131', - '\132','\133','\134','\135','\136','\137','\140','\141','\142','\143', - '\144','\145','\146','\147','\150','\151','\152','\153','\154','\155', - '\156','\157','\160','\161','\162','\163','\164','\165','\166','\167', - '\170','\171','\172','\173','\174','\175','\176','\177','\200','\201', - '\202','\203','\204','\205','\206','\207','\210','\211','\212','\213', - '\214','\215','\216','\217','\220','\221','\222','\223','\224','\225', - '\226','\227','\230','\231','\232','\233','\234','\235','\236','\237', - '\040','\101','\101','\105','\105','\105','\111','\111','\047','\140', - '\136','\042','\176','\125','\125','\234','\055','\131','\171','\370', - '\200','\207','\245','\244','\255','\250','\052','\234','\235','\052', - '\237','\233','\203','\210','\223','\226','\240','\202','\242','\243', - '\205','\212','\225','\227','\204','\211','\224','\201','\217','\214', - '\117','\222','\206','\241','\355','\221','\216','\215','\231','\232', - '\220','\213','\341','\117','\101','\101','\141','\104','\144','\111', - '\111','\117','\117','\117','\157','\123','\163','\125','\131','\230', - '\052','\052','\372','\346','\052','\052','\304','\254','\253','\246', - '\247','\256','\376','\257','\361','\040' - } -#endif - ; - -EXTERN M_WCHAR r8_to_pc8dn [256] -#if defined(DEFINE) -= { - '\000','\001','\002','\003','\004','\005','\006','\007','\010','\011', - '\012','\013','\014','\015','\016','\017','\020','\021','\022','\023', - '\024','\025','\026','\027','\030','\031','\032','\033','\034','\035', - '\036','\037','\040','\041','\042','\043','\044','\045','\046','\047', - '\050','\051','\052','\053','\054','\055','\056','\057','\060','\061', - '\062','\063','\064','\065','\066','\067','\070','\071','\072','\073', - '\074','\075','\076','\077','\100','\101','\102','\103','\104','\105', - '\106','\107','\110','\111','\112','\113','\114','\115','\116','\117', - '\120','\121','\122','\123','\124','\125','\126','\127','\130','\131', - '\132','\133','\134','\135','\136','\137','\140','\141','\142','\143', - '\144','\145','\146','\147','\150','\151','\152','\153','\154','\155', - '\156','\157','\160','\161','\162','\163','\164','\165','\166','\167', - '\170','\171','\172','\173','\174','\175','\176','\177','\200','\201', - '\202','\203','\204','\205','\206','\207','\210','\211','\212','\213', - '\214','\215','\216','\217','\220','\221','\222','\223','\224','\225', - '\226','\227','\230','\231','\232','\233','\234','\235','\236','\237', - '\040','\101','\101','\105','\105','\105','\111','\111','\047','\140', - '\136','\042','\176','\125','\125','\234','\055','\131','\171','\370', - '\200','\207','\245','\244','\255','\250','\257','\234','\131','\052', - '\146','\143','\203','\210','\223','\226','\240','\202','\242','\243', - '\205','\212','\225','\227','\204','\211','\224','\201','\217','\214', - '\235','\222','\206','\241','\233','\221','\216','\215','\231','\232', - '\220','\213','\341','\117','\101','\252','\251','\104','\144','\111', - '\111','\117','\117','\247','\246','\123','\163','\125','\131','\230', - '\052','\052','\372','\346','\052','\052','\304','\052','\052','\052', - '\052','\074','\376','\076','\361','\040' - } -#endif - ; - -/* Obsolete */ diff --git a/cde/programs/dthelp/parser/canon1/helptag/figure.c b/cde/programs/dthelp/parser/canon1/helptag/figure.c deleted file mode 100644 index 973a83537..000000000 --- a/cde/programs/dthelp/parser/canon1/helptag/figure.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: figure.c /main/3 1995/11/08 09:29:52 rswiston $ */ -/* -Copyright 1988, 1989 Hewlett-Packard Co. -*/ -/* Figure.c contains HP Tag to TeX figure processing */ - -/* Obsolete */ diff --git a/cde/programs/dthelp/parser/canon1/helptag/fproto.h b/cde/programs/dthelp/parser/canon1/helptag/fproto.h index a5970c16d..c80be7bbf 100644 --- a/cde/programs/dthelp/parser/canon1/helptag/fproto.h +++ b/cde/programs/dthelp/parser/canon1/helptag/fproto.h @@ -150,8 +150,6 @@ void strcode(M_WCHAR *string, FILE *outfile); void mb_strcode(char *string, FILE *outfile); -char *strstr(const char *s1, const char *s2); - void svhdstring(M_WCHAR *string); void svtcstring(M_WCHAR *string); diff --git a/cde/programs/dthelp/parser/canon1/helptag/grphpar.c b/cde/programs/dthelp/parser/canon1/helptag/grphpar.c deleted file mode 100644 index 9caa0f5cc..000000000 --- a/cde/programs/dthelp/parser/canon1/helptag/grphpar.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: grphpar.c /main/3 1995/11/08 09:30:22 rswiston $ */ -/* Copyright (c) 1988, 1989 Hewlett-Packard Co. */ -/* HP Tag/TeX figure aspect ratio calculations */ - -#define GRAPHDEF - -/* Obsolete */ diff --git a/cde/programs/dthelp/parser/canon1/helptag/grphpar.h b/cde/programs/dthelp/parser/canon1/helptag/grphpar.h deleted file mode 100644 index 92c79a4f6..000000000 --- a/cde/programs/dthelp/parser/canon1/helptag/grphpar.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: grphpar.h /main/3 1995/11/08 09:30:34 rswiston $ */ -/* Copyright (c) 1988, 1989 Hewlett-Packard Co. */ -/* Variable definitions for HP Tag/TeX for figures and graphics */ -/* when adding, check "global.h" for conflicts */ - -/* Obsolete */ diff --git a/cde/programs/dthelp/parser/canon1/helptag/make.c b/cde/programs/dthelp/parser/canon1/helptag/make.c deleted file mode 100644 index dbda7cfd7..000000000 --- a/cde/programs/dthelp/parser/canon1/helptag/make.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: make.c /main/3 1995/11/08 09:31:30 rswiston $ */ -/* Copyright (c) 1986, 1987, 1988, 1989 Hewlett-Packard Co. */ -/* Functions for pseudo-make features of HP Tag/TeX translator, i.e., - for testing which generated files are current and which must be - recreated. */ -/* - NOTE : This file is used as a Microsoft Linker overlay, so it cannot - have functions as pointers, eg. (proc *) f(). Routines that are - or invoke function pointers should be in tex.c. -*/ - -#if defined(_AIX) || defined(sun) -#include -#include -#endif - -#include - -#if defined(_AIX) || defined(sun) -#undef M_PI /* M_PI is used by markup, we don't need the math PI */ -#endif - -#include "userinc.h" -#include "globdec.h" - -/* Obsolete */ diff --git a/cde/programs/dthelp/parser/canon1/helptag/need.c b/cde/programs/dthelp/parser/canon1/helptag/need.c deleted file mode 100644 index 57bc22b6f..000000000 --- a/cde/programs/dthelp/parser/canon1/helptag/need.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: need.c /main/3 1995/11/08 09:31:41 rswiston $ */ -/* Obsolete */ diff --git a/cde/programs/dthelp/parser/canon1/helptag/table.c b/cde/programs/dthelp/parser/canon1/helptag/table.c deleted file mode 100644 index 3367aa752..000000000 --- a/cde/programs/dthelp/parser/canon1/helptag/table.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: table.c /main/3 1995/11/08 09:32:57 rswiston $ */ -/* Obsolete */ diff --git a/cde/programs/dthelp/parser/canon1/parser/addinput.c b/cde/programs/dthelp/parser/canon1/parser/addinput.c deleted file mode 100644 index 81a8296f7..000000000 --- a/cde/programs/dthelp/parser/canon1/parser/addinput.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: addinput.c /main/3 1995/11/08 09:34:10 rswiston $ */ -/* Obsolete */ diff --git a/cde/programs/dthelp/parser/canon1/parser/delfree.c b/cde/programs/dthelp/parser/canon1/parser/delfree.c deleted file mode 100644 index e7b6fd86d..000000000 --- a/cde/programs/dthelp/parser/canon1/parser/delfree.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: delfree.c /main/3 1995/11/08 09:35:18 rswiston $ */ -/* Copyright (c) 1988 Hewlett-Packard Co. */ - -/* Versions of m_free and m_malloc for debugging. */ - -/**/ -#include -#include -#include "basic.h" -#include "trie.h" -#include "dtd.h" -#include "parser.h" - -m_free(block, msg) - char *block ; - char *msg ; - { - free(block) ; - fprintf(m_outfile, "%5u:%5u- Freed %s\n", - (unsigned int) ((unsigned long) block >> 16), - (unsigned int) block, msg) ; - } - -char *m_mallocx(size, msg) - int size ; - char *msg ; - { - char *p ; - - if (! size) return(NULL) ; - p = malloc(size) ; - if (! p) { - m_err1("Unable to allocate space for %s", msg) ; - exit(TRUE) ; - } - fprintf(m_outfile, "%5u:%5u- Allocated %s\n", - (unsigned int) ((unsigned long) p >> 16), (unsigned int) p, msg) ; - return(p) ; - } diff --git a/cde/programs/dthelp/parser/canon1/parser/dmpline.c b/cde/programs/dthelp/parser/canon1/parser/dmpline.c deleted file mode 100644 index a8a3a9c6b..000000000 --- a/cde/programs/dthelp/parser/canon1/parser/dmpline.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: dmpline.c /main/3 1995/11/08 09:35:33 rswiston $ */ -/* -Copyright 1988, 1989 Hewlett-Packard Co. -*/ - -#include "userinc.h" -#include "globdec.h" - -/* Write input file and line number for an error message */ -void m_dumpline(file, line) -M_WCHAR *file ; -int line ; -{ -char buffer[10] ; - -m_errline("Line ") ; -sprintf(buffer, "%d", line) ; -m_errline(buffer) ; -if (file) - { - char mb_file; - - m_errline(" of File ") ; - mb_file = MakeMByteString(file); - m_errline(mb_file) ; - m_free(mb_file,"multi-byte string"); - } -} diff --git a/cde/programs/dthelp/parser/canon1/parser/eprefix.c b/cde/programs/dthelp/parser/canon1/parser/eprefix.c deleted file mode 100644 index c1257c0f9..000000000 --- a/cde/programs/dthelp/parser/canon1/parser/eprefix.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: eprefix.c /main/3 1995/11/08 09:36:12 rswiston $ */ -/* -Copyright 1988, 1989 Hewlett-Packard Co. -*/ - -#include "userinc.h" -#include "globdec.h" - -/* Write error message prefix */ -void m_eprefix(void) - { - m_errline("\n*****\n") ; - } - diff --git a/cde/programs/dthelp/parser/canon1/parser/errline.c b/cde/programs/dthelp/parser/canon1/parser/errline.c deleted file mode 100644 index 80ad19c88..000000000 --- a/cde/programs/dthelp/parser/canon1/parser/errline.c +++ /dev/null @@ -1,42 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: errline.c /main/3 1995/11/08 09:36:25 rswiston $ */ -/* -Copyright 1988, 1989 Hewlett-Packard Co. -*/ - -#include "userinc.h" -#include "globdec.h" - -/* Process error message text */ -void m_errline(p) -M_WCHAR *p ; -{ -char mb_p; - -mb_p = MakeMByteString(p); -fputs(mb_p, m_errfile) ; -fputs(mb_p, stderr) ; -m_free(mb_p,"multi-byte string"); -} - diff --git a/cde/programs/dthelp/parser/canon1/parser/esuffix.c b/cde/programs/dthelp/parser/canon1/parser/esuffix.c deleted file mode 100644 index 31b12d8a1..000000000 --- a/cde/programs/dthelp/parser/canon1/parser/esuffix.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: esuffix.c /main/3 1995/11/08 09:36:52 rswiston $ */ -/* -Copyright 1988, 1989 Hewlett-Packard Co. -*/ - -#include "userinc.h" -#include "globdec.h" - -/* Write error message suffix */ -void m_esuffix(void) - { - m_errline("\n") ; - m_dumpline(m_thisfile(), m_thisline()) ; - m_errline(":\n") ; - m_lastchars() ; - if (++m_errcnt == m_errlim) { - m_error("Too many errors, processing stopped") ; - m_exit(TRUE) ; - } - } - diff --git a/cde/programs/dthelp/parser/canon1/parser/findpar.c b/cde/programs/dthelp/parser/canon1/parser/findpar.c deleted file mode 100644 index d74048fe5..000000000 --- a/cde/programs/dthelp/parser/canon1/parser/findpar.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: findpar.c /main/3 1995/11/08 09:37:18 rswiston $ */ -/* - Copyright 1989 Hewlett-Packard Co. -*/ - -#include -#include "basic.h" -#include "trie.h" -#include "dtdext.h" -#include "parser.h" - -/* Function callable by interface designers. Returns index in parameter - list of a specified parameter for an element (i.e., 1 for first parameter - specified in the DTD, 2 for second, etc.). First parameter, elt, is - the name of the element. Second parameter is the name of the parameter - or NULL. Third parameter is used only if second parameter is NULL. In - the latter case, function returns first keyword parameter, if any, for - which the specified value is a legal value and otherwise first - Returns 0 if elt is not a valid element name, if param is specified - but is not a valid parameter name, or if param is NULL and value is - not a valid value of any of elt's parameters. */ -int m_findpar( const char *elt , const char *param , const M_WCHAR *value ) -{ -M_ELEMENT eltid ; -int par ; -int i ; -M_WCHAR *wc_elt; - -wc_elt = MakeWideCharString(elt); -if (! (eltid = m_packedlook(m_entree, wc_elt))) - { - m_free(wc_elt,"wide character string"); - return(M_NULLVAL) ; - } -m_free(wc_elt,"wide character string"); - -/* A parameter name specified */ -if (param) - { - for (par = m_element[eltid - 1].parptr, i = 1 ; - - i <= m_element[eltid - 1].parcount ; - par++, i++) - if (!m_wcmbupstrcmp(&m_pname[m_parameter[par - 1].paramname], param)) - return(i) ; - return(M_NULLVAL) ; - } - -/* No parameter name specified */ - -/* First check is it a valid keyword? */ -for (par = m_element[eltid - 1].parptr, i = 1 ; - i <= m_element[eltid - 1].parcount ; - par++, i++) -if (m_parameter[par - 1].type == M_KEYWORD) -if (m_partype(par, value)) return(i) ; - -/* It wasn't a keyword. Check for valid value for some other parameter.*/ -for (par = m_element[eltid - 1].parptr, i = 1 ; -i <= m_element[eltid - 1].parcount ; -par++, i++) - { - if (m_parameter[par - 1].type == M_KEYWORD) continue ; - if (m_partype(par, value)) return(i) ; - } - -/* Not a valid value for any parameter */ -return(M_NULLVAL) ; -} - diff --git a/cde/programs/dthelp/parser/canon1/parser/getc.c b/cde/programs/dthelp/parser/canon1/parser/getc.c deleted file mode 100644 index 148529a45..000000000 --- a/cde/programs/dthelp/parser/canon1/parser/getc.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: getc.c /main/3 1995/11/08 09:37:33 rswiston $ */ -/* Copyright 1988, 1989 Hewlett-Packard Co. */ - -/* Default get-char procedure */ - -#include "userinc.h" -#include "globdec.h" - -int m_getc(m_ptr) - void *m_ptr ; - { - return(getc((FILE*) m_ptr)) ; - } diff --git a/cde/programs/dthelp/parser/canon1/parser/ifdata.c b/cde/programs/dthelp/parser/canon1/parser/ifdata.c deleted file mode 100644 index e81317bd0..000000000 --- a/cde/programs/dthelp/parser/canon1/parser/ifdata.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: ifdata.c /main/3 1995/11/08 09:38:00 rswiston $ */ -/* Copyright 1988, 1989 Hewlett-Packard Co. */ - -/* Ifdata.c contains functions used by the interface to access the - single item of interface-determined data stored on the parse stack. */ - -#include -#include "basic.h" -#include "trie.h" -#include "dtdext.h" -#include "parser.h" - -/* Retrieve the interface data stored with the current element's nth parent */ -void *m_getdata(n, flag) - int n ; - LOGICAL *flag ; - { - M_PARSE *stackptr ; - - for (stackptr = m_stacktop ; - stackptr->oldtop && n >= 0 ; - stackptr = stackptr->oldtop, n--) { - if (! n) { - *flag = TRUE ; - return(stackptr->ifdata) ; - } - } - *flag = FALSE ; - return(NULL) ; - } - -/* Store interface data for the current element's nth parent */ -LOGICAL m_putdata(data, n) - void *data ; - int n ; - { - M_PARSE *stackptr ; - - for (stackptr = m_stacktop ; - stackptr->oldtop && n >= 0 ; - stackptr = stackptr->oldtop, n--) { - if (! n) { - stackptr->ifdata = data ; - return(TRUE) ; - } - } - return(FALSE) ; - } - diff --git a/cde/programs/dthelp/parser/canon1/parser/openent.c b/cde/programs/dthelp/parser/canon1/parser/openent.c deleted file mode 100644 index 8023718af..000000000 --- a/cde/programs/dthelp/parser/canon1/parser/openent.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: openent.c /main/3 1995/11/08 09:39:07 rswiston $ */ -/* Copyright 1988, 1989 Hewlett-Packard Co. */ - -/* Default open SYSTEM entity procedure */ - -#include "userinc.h" -#include "globdec.h" - -void *m_openent(entcontent) - M_WCHAR *entcontent ; - { - return((void *) fopen(entcontent, "r")) ; - } - diff --git a/cde/programs/dthelp/parser/canon1/parser/openfrst.c b/cde/programs/dthelp/parser/canon1/parser/openfrst.c deleted file mode 100644 index 0ec9fb4b2..000000000 --- a/cde/programs/dthelp/parser/canon1/parser/openfrst.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: openfrst.c /main/3 1995/11/08 09:39:20 rswiston $ */ -/* Copyright 1988, 1989 Hewlett-Packard Co. */ - -/* Default open SYSTEM entity procedure */ - -#include "userinc.h" -#include "globdec.h" - -void *m_openfirst(void) - { - return((void *) stdin) ; - } - - diff --git a/cde/programs/dthelp/parser/canon1/parser/parcount.c b/cde/programs/dthelp/parser/canon1/parser/parcount.c deleted file mode 100644 index dc18117a8..000000000 --- a/cde/programs/dthelp/parser/canon1/parser/parcount.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: parcount.c /main/3 1995/11/08 09:40:02 rswiston $ */ -/* - Copyright 1989 Hewlett-Packard Co. -*/ - -#include -#include "basic.h" -#include "trie.h" -#include "dtdext.h" -#include "parser.h" - -/* Function callable by interface designers. Returns number of parameters - of specified element (-1 indicates error). */ -int m_parcount(elt) - M_WCHAR *elt ; - { - M_ELEMENT eltid ; - - if (! (eltid = m_packedlook(m_entree, elt))) return(-1) ; - return(m_element[eltid - 1].parcount) ; - } - diff --git a/cde/programs/dthelp/parser/canon1/parser/pardef.c b/cde/programs/dthelp/parser/canon1/parser/pardef.c deleted file mode 100644 index a1b7de380..000000000 --- a/cde/programs/dthelp/parser/canon1/parser/pardef.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: pardef.c /main/3 1995/11/08 09:40:15 rswiston $ */ -/* - Copyright 1989 Hewlett-Packard Co. -*/ - -#include -#include "basic.h" -#include "trie.h" -#include "dtdext.h" -#include "parser.h" - -/* Function callable by interface designers. Returns pointer to default - value of a parameter of an element. Type is set to indicate type of - default. Error indication is type is 0 and function returns NULL. */ -M_WCHAR *m_pardefault(elt, param, type) - M_WCHAR *elt ; - M_WCHAR *param ; - unsigned char *type ; - { - M_ELEMENT eltid ; - int par ; - int i ; - - *type = M_NULLVAL ; - if (! (eltid = m_packedlook(m_entree, elt))) return(NULL) ; - - for (par = m_element[eltid - 1].parptr, i = 0 ; - i < m_element[eltid - 1].parcount ; - par++, i++) - if (! m_wcupstrcmp(&m_pname[m_parameter[par - 1].paramname], param)) { - *type = (unsigned char) m_parameter[par - 1].deftype ; - if (*type == M_REQUIRED || *type == M_NULLDEF) return(NULL) ; - return(m_parameter[par -1].defval) ; - } - - /* Can't find the parameter */ - return(NULL) ; - } - diff --git a/cde/programs/dthelp/parser/canon1/parser/parname.c b/cde/programs/dthelp/parser/canon1/parser/parname.c deleted file mode 100644 index 9d2ccb8bf..000000000 --- a/cde/programs/dthelp/parser/canon1/parser/parname.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: parname.c /main/3 1995/11/08 09:40:42 rswiston $ */ -/* - Copyright 1989 Hewlett-Packard Co. -*/ - -#include -#include "basic.h" -#include "trie.h" -#include "dtdext.h" -#include "parser.h" - -/* Function callable by interface designers. Returns name of nth parameter - of specified element (NULL indicates error). */ -M_WCHAR *m_parname(elt, n) - M_WCHAR *elt ; - int n ; - { - M_ELEMENT eltid ; - - if (! (eltid = m_packedlook(m_entree, elt))) return(NULL) ; - if (n < 1 || n > m_element[eltid - 1].parcount) return(NULL) ; - return(&m_pname[m_parameter[(n - 1) + m_element[eltid - 1].parptr - 1]. - paramname]) ; - } - -M_WCHAR *m_mbparname(elt, n) -char *elt ; -int n ; -{ -M_WCHAR *wc_elt, *retval; - -wc_elt = MakeWideCharString(elt); -retval = m_parname(wc_elt, n); -m_free(wc_elt,"wide character string"); -} - diff --git a/cde/programs/dthelp/parser/canon1/parser/parvalok.c b/cde/programs/dthelp/parser/canon1/parser/parvalok.c deleted file mode 100644 index 776b7ef8e..000000000 --- a/cde/programs/dthelp/parser/canon1/parser/parvalok.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: parvalok.c /main/3 1995/11/08 09:41:38 rswiston $ */ -/* - Copyright 1989 Hewlett-Packard Co. -*/ - -#include -#include "basic.h" -#include "trie.h" -#include "dtdext.h" -#include "parser.h" - -/* Function callable by interface designers. Returns TRUE if specified value - is a legal value for the indicated parameter of the given element, - FALSE otherwise. */ -LOGICAL m_parvalok( M_WCHAR *elt , M_WCHAR *param , const M_WCHAR *value ) - { - M_ELEMENT eltid ; - int par ; - int i ; - - if (! (eltid = m_packedlook(m_entree, elt))) return(FALSE) ; - for (par = m_element[eltid - 1].parptr, i = 1 ; - i <= m_element[eltid - 1].parcount ; - par++, i++) - if (! m_wcupstrcmp(&m_pname[m_parameter[par - 1].paramname], param)) - if (m_partype(par, value)) return(TRUE) ; - else return(FALSE) ; - - /* No such parameter */ - return(FALSE) ; - } - diff --git a/cde/programs/dthelp/parser/canon1/parser/procscmp.c b/cde/programs/dthelp/parser/canon1/parser/procscmp.c deleted file mode 100644 index a9509b329..000000000 --- a/cde/programs/dthelp/parser/canon1/parser/procscmp.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: procscmp.c /main/3 1995/11/08 09:42:07 rswiston $ */ -/* - Copyright 1986 Tandem Computers Incorporated. -This product and information is proprietary of Tandem Computers Incorporated. - Copyright 1986, 1987, 1988, 1989 Hewlett-Packard Co. -*/ - -/* Procscmp.c prefixes the interface's procs.c file with appropriate - declarations so it can be compiled. */ - -#include "userinc.h" -#include "globdec.h" - -/* Include any procedures specified by the interface designer */ -#include "procs.c" - - diff --git a/cde/programs/dthelp/parser/canon1/parser/proto.h b/cde/programs/dthelp/parser/canon1/parser/proto.h index b7e86e1e6..e9acf1926 100644 --- a/cde/programs/dthelp/parser/canon1/parser/proto.h +++ b/cde/programs/dthelp/parser/canon1/parser/proto.h @@ -153,8 +153,6 @@ void m_holdproc(void); void m_inctest(int *count, int limit, char *message); -void m_initctype(void); - void m_initialize(void); void m_lastchars(void); diff --git a/cde/programs/dthelp/parser/canon1/parser/setopt.c b/cde/programs/dthelp/parser/canon1/parser/setopt.c deleted file mode 100644 index b984d67d6..000000000 --- a/cde/programs/dthelp/parser/canon1/parser/setopt.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: setopt.c /main/3 1995/11/08 09:42:58 rswiston $ */ -/* -Copyright 1988, 1989 Hewlett-Packard Co. -*/ - -#include "userinc.h" -#include "globdec.h" - - -/* Set program options */ -void m_setoptions(void) - { - if (m_argc > 1) m_optstring(m_argv[1]) ; - } diff --git a/cde/programs/dthelp/parser/canon1/parser/signmsg.c b/cde/programs/dthelp/parser/canon1/parser/signmsg.c deleted file mode 100644 index b23cb0a63..000000000 --- a/cde/programs/dthelp/parser/canon1/parser/signmsg.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: signmsg.c /main/3 1995/11/08 09:43:25 rswiston $ */ -/* -Copyright 1988, 1989 Hewlett-Packard Co. -*/ - -#include "userinc.h" -#include "globdec.h" - -/* Process signon message text */ -void m_signmsg(p) -M_WCHAR *p ; -{ -char mb_p; - -mb_p = MakeMByteString(p); -m_errline(mb_p) ; -m_free(mb_p,"multi-byte string"); -} diff --git a/cde/programs/dthelp/parser/canon1/parser/startdoc.c b/cde/programs/dthelp/parser/canon1/parser/startdoc.c deleted file mode 100644 index 7e7c98bfe..000000000 --- a/cde/programs/dthelp/parser/canon1/parser/startdoc.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: startdoc.c /main/3 1995/11/08 09:43:53 rswiston $ */ -/* -Copyright 1989 Hewlett-Packard Co. -*/ - -#include "userinc.h" -#include "globdec.h" - -/* Default function called at start of document instance. Allows interface - control after all entity declarations have been processed. Not needed - in valid documents (when it is called just prior to global start-code), - but may be useful in some applications nevertheless. */ -void m_startdoc(void) - { - } - - diff --git a/cde/programs/dthelp/parser/canon1/parser/trace.c b/cde/programs/dthelp/parser/canon1/parser/trace.c deleted file mode 100644 index a4318ca28..000000000 --- a/cde/programs/dthelp/parser/canon1/parser/trace.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: trace.c /main/3 1995/11/08 09:45:23 rswiston $ */ -/* -Copyright 1988, 1989 Hewlett-Packard Co. -*/ - -#include "userinc.h" -#include "globdec.h" - -/* Write debugging trace information */ -void m_wctrace(p) -M_WCHAR *p ; -{ -char *mb_p; - -mb_p = MakeMByteString(p); -fputs(mb_p, m_outfile) ; -m_free(mb_p,"multi-byte string"); -} - -void m_trace(p) -char *p ; -{ -fputs(p, m_outfile); -} diff --git a/cde/programs/dthelp/parser/canon1/util/emptyfil.c b/cde/programs/dthelp/parser/canon1/util/emptyfil.c deleted file mode 100644 index 033096b4a..000000000 --- a/cde/programs/dthelp/parser/canon1/util/emptyfil.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: emptyfil.c /main/3 1995/11/08 09:49:33 rswiston $ */ -/* Copyright (c) 1988, 1989 Hewlett-Packard Co. */ -/* Creates a file with nothing in it */ -#include -#include "basic.h" - -void main(int argc, char **argv); - -void main(int argc, char **argv) - { - if (argc != 2) { - fprintf(stderr, "Usage: emptyfil filename\n") ; - exit(1) ; - } - if (! fopen(argv[1], "w")) - fprintf(stderr, "Unable to open %s\n", argv[1]) ; - return 0; - } diff --git a/cde/programs/dthelp/parser/canon1/util/fclndir.c b/cde/programs/dthelp/parser/canon1/util/fclndir.c deleted file mode 100644 index b69046c8a..000000000 --- a/cde/programs/dthelp/parser/canon1/util/fclndir.c +++ /dev/null @@ -1,160 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: fclndir.c /main/3 1995/11/08 09:51:14 rswiston $ */ -/* Copyright (c) 1987-1990 Hewlett-Packard Co. - -Fclndir.c compares two files, ignoring C line directives that appear -within them as well as blank lines, and leading white space. It exits -with an error code of 0 if the files are the same, 1 if they differ, and -2 if the program was called incorrectly. -*/ - -/* Feb. 11, 1991, CED: Added v2 fixes to v3 version of fclndir. - Thus, both versions now copy the source file to the target if - the files differ. -*/ - -#include -#include -#include -#include "basic.h" -#define SAME 0 -/* different defined to be 0 as of 12-1-89, because fclndir now does -the file-copy if the files are different, or if the second file -doesn't exist. (different used to be 1.) --ced */ -#define DIFFERENT 0 -#define ERROR 2 - -struct data { - int c ; - LOGICAL linestart ; - char *p ; - char *q ; - } data1, data2 ; - -char linedir[] = "#line" ; -char *p = linedir, *q = linedir + 1 ; - -void main(int argc, char **argv); - -void copyfile(char *pfile1, char *pfile2); - -int nextchar(FILE *file, struct data *data); - -void main(int argc, char **argv) - { - FILE *one, *two ; - int c1, c2 ; - - if (argc != 3) { - fputs("Usage: fclndir file1 (=source) file2 (=target)\n", stderr) ; - exit(ERROR) ; - } - if (! (one = fopen(argv[1], "r"))) { - fprintf(stderr, "ERROR: source file unavailable: %s\n", argv[1]) ; - exit(ERROR) ; - } - if (! (two = fopen(argv[2], "r"))) { - fprintf(stderr, "No target file %s; copying source file...\n", argv[2]) ; - /* call to copyfile entered by ced, 12-29-89. */ - copyfile(argv[1],argv[2]); - exit(DIFFERENT) ; - } - data1.linestart = data2.linestart = TRUE ; - data1.p = data2.p = linedir ; - data1.q = data2.q = linedir + 1 ; - c1 = nextchar(one, &data1) ; - c2 = nextchar(two, &data2) ; - while (c1 != EOF && c2 != EOF) { - if (c1 != c2) { - fprintf(stderr, "%s and %s are different; copying source...\n", - argv[1], argv[2]) ; -/* call to copyfile entered by ced, 12-1-89. */ - copyfile(argv[1],argv[2]); - exit(DIFFERENT) ; - } - c1 = nextchar(one, &data1) ; - c2 = nextchar(two, &data2) ; - } - if (c1 != c2) { - fprintf(stderr, "%s and %s are different; copying source...\n", - argv[1], argv[2]) ; -/* call to copyfile entered by ced, 12-1-89. */ - copyfile(argv[1],argv[2]); - exit(DIFFERENT) ; - } - fprintf(stderr, "%s and %s are the same\n", argv[1], argv[2]) ; - exit(SAME) ; - } - -/* copyfile inserted by ced, 12-1-89. */ -void copyfile(char *pfile1, char *pfile2) -{ - int ret; - char *pcmd; - int slen; - -/* malloc space for the system command: two filenames, plus a command, - spaces, and the terminating null */ - slen = strlen(pfile1) + strlen(pfile2) + 8; - pcmd = (char *) malloc(slen); - ret = snprintf(pcmd, slen, "cp %s %s",pfile1,pfile2); - ret = system(pcmd); - ret = snprintf(pcmd, slen, "touch %s",pfile2); - ret = system(pcmd); - free(pcmd); -} - -int nextchar(FILE *file, struct data *data) - { - while (data->linestart) { - data->linestart = FALSE ; - for (data->p = linedir ; *data->p; data->p++) - if ((data->c = getc(file)) != (int) *data->p) break ; - /* Found a line directive, skip remainder of line */ - if (! *data->p) { - data->c = getc(file) ; - while (data->c != '\n' && data->c != EOF) - data->c = getc(file) ; - data->linestart = TRUE ; - continue ; - } - /* Check for leading blanks */ - else if (data->p == linedir) { - while (data->c == ' ' || data->c == '\t') data->c = getc(file) ; - if (data->c == '\n') { - data->linestart = TRUE ; - continue ; - } - return(data->c) ; - } - /* Line began with a prefix of #line */ - data->q = linedir ; - } - - if (data->q < data->p) return(*data->q++) ; - else if (data->q++ != data->p) data->c = getc(file) ; - if (data->c == '\n') data->linestart = TRUE ; - return(data->c) ; - } - diff --git a/cde/programs/dthelp/parser/canon1/util/initct.c b/cde/programs/dthelp/parser/canon1/util/initct.c deleted file mode 100644 index 9f03df46d..000000000 --- a/cde/programs/dthelp/parser/canon1/util/initct.c +++ /dev/null @@ -1,45 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: initct.c /main/3 1995/11/08 09:51:46 rswiston $ */ -/* Copyright (c) 1987, 1988 Hewlett-Packard Co. */ -/* M_initctype initializes the array used to indicate which ASCII - characters can appear within SGML names */ - -#include "basic.h" -#include "common.h" -extern char m_chartype[M_CHARSETLEN] ; - -void m_initctype(void) - { - int i ; - -/* ****************************** NOTE: ********************************** - If the set of name characters is ever modified, make appropriate changes - in ELTDEF's scanner for testing for valid C identifiers as parameter - names */ - for (i = 0 ; i < M_CHARSETLEN ; i++) m_chartype[i] = M_NONNAME ; - for (i = 'A' ; i <= 'Z' ; i++) m_chartype[i] = M_NMSTART ; - for (i = 'a' ; i <= 'z' ; i++) m_chartype[i] = M_NMSTART ; - for (i = '0' ; i <= '9' ; i++) m_chartype[i] = M_DIGIT ; - m_chartype['.'] = m_chartype['-'] = M_NAMECHAR ; - } diff --git a/cde/programs/dthelp/parser/canon1/util/strstr.c b/cde/programs/dthelp/parser/canon1/util/strstr.c deleted file mode 100644 index 020b91df5..000000000 --- a/cde/programs/dthelp/parser/canon1/util/strstr.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: strstr.c /main/3 1995/11/08 09:54:55 rswiston $ */ -char *strstr (char *s1, char *s2) -{ - - int x, y ; - - y = strlen ( s2 ) ; - x = strlen ( s1 ) - y ; - - if ( x < 0 ) return ( ( char * ) 0L ) ; - do { - if ( strncmp ( s1 + x, s2, y ) == 0 ) return ( s1 + x ) ; - } - while ( --x >= 0 ) ; - - return ( ( char * ) 0L ) ; - } - diff --git a/cde/programs/dthelp/parser/pass1/build/proto.h b/cde/programs/dthelp/parser/pass1/build/proto.h index e5396c6b9..07ebb0e6e 100644 --- a/cde/programs/dthelp/parser/pass1/build/proto.h +++ b/cde/programs/dthelp/parser/pass1/build/proto.h @@ -128,8 +128,6 @@ int gettoken(int *c, int context); TREE *gettreenode(void); -void m_initctype(void); - void initialize(void); LOGICAL litproc(int delim); diff --git a/cde/programs/dthelp/parser/pass1/eltdef/proto.h b/cde/programs/dthelp/parser/pass1/eltdef/proto.h index fb7810839..e2eb9b340 100644 --- a/cde/programs/dthelp/parser/pass1/eltdef/proto.h +++ b/cde/programs/dthelp/parser/pass1/eltdef/proto.h @@ -90,8 +90,6 @@ void getname(int first); int gettoken(int *c, int context); -void m_initctype(void); - void initialize(void); LOGICAL m_letter(M_WCHAR c); diff --git a/cde/programs/dthelp/parser/pass1/helptag/Makefile.am b/cde/programs/dthelp/parser/pass1/helptag/Makefile.am index 125baf747..aa9a1eeab 100644 --- a/cde/programs/dthelp/parser/pass1/helptag/Makefile.am +++ b/cde/programs/dthelp/parser/pass1/helptag/Makefile.am @@ -28,5 +28,5 @@ AM_CPPFLAGS = -I. -I$(HELPPARSERSRC) -I$(HELPUTILSRC) \ # needed by parser/ noinst_LIBRARIES = libhelptag.a -libhelptag_a_SOURCES = custom.c default.c help.c make.c option.c \ +libhelptag_a_SOURCES = custom.c default.c help.c option.c \ special.c out.c xref.c global.c ../parser/delim.h diff --git a/cde/programs/dthelp/parser/pass1/helptag/calculat.c b/cde/programs/dthelp/parser/pass1/helptag/calculat.c deleted file mode 100644 index 567167cc9..000000000 --- a/cde/programs/dthelp/parser/pass1/helptag/calculat.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: calculat.c /main/3 1995/11/08 10:06:50 rswiston $ */ -/* - * Copyright 1989 Hewlett-Packard Co. - * - * - * procedures used by calculator elements for 1.2 release 26jul89-pj - * - * NOTE : This file is used as a Microsoft Linker overlay, so it cannot - * have functions as pointers, eg. (proc *) f(). Routines that are - * or invoke function pointers should be in tex.c. - * - */ - -/* Obsolete */ - diff --git a/cde/programs/dthelp/parser/pass1/helptag/calculat.h b/cde/programs/dthelp/parser/pass1/helptag/calculat.h deleted file mode 100644 index e8f848256..000000000 --- a/cde/programs/dthelp/parser/pass1/helptag/calculat.h +++ /dev/null @@ -1,828 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: calculat.h /main/3 1995/11/08 10:07:11 rswiston $ */ -/* this file contains special character expansions for various characters - * in Dot Matrix (computer), Menu Label (ml), and White Menu Label (wl) - * arrays are: ccompspec[] --> computer specials - * cmenlspec[] --> menu label specials - * cwmenlspec[]--> white menu label specials - */ - -/* special computer expansions for dot matrix in calculator style */ -EXTERN char *ccompspec[256] -#if defined(DEFINE) -= { -/* Char Name TeX Expansion */ -/* */ -/* 0: ^@ NUL */ 0, -/* 1: ^A SOH */ 0, -/* 2: ^B STX */ 0, -/* 3: ^C ETX */ 0, -/* 4: ^D EOT */ 0, -/* 5: ^E ENQ */ 0, -/* 6: ^F ACK */ 0, -/* 7: ^G BEL */ 0, -/* 8: ^H BS */ 0, -/* 9: ^I HT */ 0, -/* 10: ^J LF */ 0, -/* 11: ^K VT */ 0, -/* 12: ^L FF */ 0, -/* 13: ^M CR */ 0, -/* 14: ^N SO */ 0, -/* 15: ^O SI */ 0, -/* 16: ^P DLE */ 0, -/* 17: ^Q DC1 */ 0, -/* 18: ^R DC2 */ 0, -/* 19: ^S DC3 */ 0, -/* 20: ^T DC4 */ 0, -/* 21: ^U NAK */ 0, -/* 22: ^V SYN */ 0, -/* 23: ^W ETB */ 0, -/* 24: ^X CAN */ 0, -/* 25: ^Y EM */ 0, -/* 26: ^Z SUB */ 0, -/* 27: ^[ ESC */ 0, -/* 28: ^\ FS */ 0, -/* 29: ^] GS */ 0, -/* 30: ^^ RS */ 0, -/* 31: ^_ US */ 0, -/* 32: SP */ 0, -/* 33: ! */ 0, -/* 34: " */ 0, -/* 35: # */ "\\#", -/* 36: $ */ "{\\dollar}", -/* 37: % */ "\\%", -/* 38: & */ "\\&", -/* 39: ' */ "{'}", -/* 40: ( */ 0, -/* 41: ) */ 0, -/* 42: * */ 0, -/* 43: + */ 0, -/* 44: , */ 0, -/* 45: - */ "{-}", -/* 46: . */ 0, -/* 47: / */ 0, -/* 48: 0 */ 0, -/* 49: 1 */ 0, -/* 50: 2 */ 0, -/* 51: 3 */ 0, -/* 52: 4 */ 0, -/* 53: 5 */ 0, -/* 54: 6 */ 0, -/* 55: 7 */ 0, -/* 56: 8 */ 0, -/* 57: 9 */ 0, -/* 58: : */ 0, -/* 59: ; */ 0, -/* 60: < */ "{\\tendmb\\char'045}", -/* 61: = */ 0, -/* 62: > */ "{\\tendmb\\char'046}", -/* 63: ? */ 0, -/* 64: @ */ 0, -/* 65: A */ 0, -/* 66: B */ 0, -/* 67: C */ 0, -/* 68: D */ 0, -/* 69: E */ 0, -/* 70: F */ 0, -/* 71: G */ 0, -/* 72: H */ 0, -/* 73: I */ 0, -/* 74: J */ 0, -/* 75: K */ 0, -/* 76: L */ 0, -/* 77: M */ 0, -/* 78: N */ 0, -/* 79: O */ 0, -/* 80: P */ 0, -/* 81: Q */ 0, -/* 82: R */ 0, -/* 83: S */ 0, -/* 84: T */ 0, -/* 85: U */ 0, -/* 86: V */ 0, -/* 87: W */ 0, -/* 88: X */ 0, -/* 89: Y */ 0, -/* 90: Z */ 0, -/* 91: [ */ 0, -/* 92: \\ */ "{\\tendmb\\char'047}", -/* 93: ] */ 0, -/* 94: ^ */ "{\\tendmb\\char'064}", -/* 95: _ */ "{\\tendmb\\char'066}", -/* 96: ` */ "{`}", -/* 97: a */ 0, -/* 98: b */ 0, -/* 99: c */ 0, -/* 100: d */ 0, -/* 101: e */ 0, -/* 102: f */ 0, -/* 103: g */ 0, -/* 104: h */ 0, -/* 105: i */ 0, -/* 106: j */ 0, -/* 107: k */ 0, -/* 108: l */ 0, -/* 109: m */ 0, -/* 110: n */ 0, -/* 111: o */ 0, -/* 112: p */ 0, -/* 113: q */ 0, -/* 114: r */ 0, -/* 115: s */ 0, -/* 116: t */ 0, -/* 117: u */ 0, -/* 118: v */ 0, -/* 119: w */ 0, -/* 120: x */ 0, -/* 121: y */ 0, -/* 122: z */ 0, -/* 123: { */ "{\\tendmb\\char'070}", -/* 124: | */ "{\\tendmb\\char'104}", -/* 125: } */ "{\\tendmb\\char'107}", -/* 126: ~ */ "{\\tendmb\\char'116}", -/* 127: DEL */ 0, -/* 128: undefined */ 0, -/* 129: undefined */ 0, -/* 130: undefined */ 0, -/* 131: undefined */ 0, -/* 132: undefined */ 0, -/* 133: undefined */ 0, -/* 134: undefined */ 0, -/* 135: undefined */ 0, -/* 136: undefined */ 0, -/* 137: undefined */ 0, -/* 138: undefined */ 0, -/* 139: undefined */ 0, -/* 140: undefined */ 0, -/* 141: undefined */ 0, -/* 142: undefined */ 0, -/* 143: undefined */ 0, -/* 144: undefined */ 0, -/* 145: undefined */ 0, -/* 146: undefined */ 0, -/* 147: undefined */ 0, -/* 148: undefined */ 0, -/* 149: undefined */ 0, -/* 150: undefined */ 0, -/* 151: undefined */ 0, -/* 152: undefined */ 0, -/* 153: undefined */ 0, -/* 154: undefined */ 0, -/* 155: undefined */ 0, -/* 156: undefined */ 0, -/* 157: undefined */ 0, -/* 158: undefined */ 0, -/* 159: undefined */ 0, -/* 160: undefined */ 0, -/* 161: A grave */ "{\\tendmc\\char'041}", -/* 162: A circumflex */ "{\\tendmc\\char'042}", -/* 163: E grave */ "{\\tendmc\\char'043}", -/* 164: E circumflex */ "{\\tendmc\\char'044}", -/* 165: E dieresis */ "{\\tendmc\\char'045}", -/* 166: I circumflex */ "{\\tendmc\\char'046}", -/* 167: I dieresis */ "{\\tendmc\\char'047}", -/* 168: acute accent */ "{\\tendma\\char'023}", -/* 169: grave accent */ "{\\tendma\\char'022}", -/* 170: circumflex */ "{\\tendma\\char'136}", -/* 171: dieresis */ "{\\tendma\\char'177}", -/* 172: tilde */ "{\\tendma\\char'176}", -/* 173: U grave */ "{\\tendmc\\char'050}", -/* 174: U circumflex */ "{\\tendmc\\char'051}", -/* 175: Italian Lira */ 0, -/* 176: overbar */ 0, -/* 177: Y acute */ "{\\tendmc\\char'053}", -/* 178: y acute */ "{\\tendmc\\char'054}", -/* 179: degree */ 0, -/* 180: C cedilla */ "{\\tendma\\char'030}", -/* 181: c cedilla */ "{\\tendma\\char'030}", -/* 182: N tilde */ "{\\tendmc\\char'055}", -/* 183: n tilde */ "{\\tendmc\\char'056}", -/* 184: inverted exclamation mark */ "{\\tendma\\char'074}", -/* 185: inverted question mark */ "{\\tendma\\char'076}", -/* 186: currency sign */ 0, -/* 187: pound sterling */ 0, -/* 188: Yen */ 0, -/* 189: Section sign */ 0, -/* 190: florin */ 0, -/* 191: Cent sign */ 0, -/* 192: a circumflex */ "{\\tendmc\\char'063}", -/* 193: e circumflex */ "{\\tendmc\\char'064}", -/* 194: o circumflex */ "{\\tendmc\\char'065}", -/* 195: u circumflex */ "{\\tendmc\\char'066}", -/* 196: a acute */ "{\\tendmc\\char'067}", -/* 197: e acute */ "{\\tendmc\\char'070}", -/* 198: o acute */ "{\\tendmc\\char'071}", -/* 199: u acute */ "{\\tendmc\\char'072}", -/* 200: a grave */ "{\\tendmc\\char'073}", -/* 201: e grave */ "{\\tendmc\\char'074}", -/* 202: o grave */ "{\\tendmc\\char'075}", -/* 203: u grave */ "{\\tendmc\\char'076}", -/* 204: a dieresis */ "{\\tendmc\\char'077}", -/* 205: e dieresis */ "{\\tendmc\\char'100}", -/* 206: o dieresis */ "{\\tendmc\\char'101}", -/* 207: u dieresis */ "{\\tendmc\\char'102}", -/* 208: A angstrom */ "{\\tendmc\\char'103}", -/* 209: i circumflex */ "{\\tendmc\\char'104}", -/* 210: O slash */ "{\\tendma\\char'037}", -/* 211: AE ligature */ "{\\tendma\\char'035}", -/* 212: a angstrom */ "{\\tendmc\\char'105}", -/* 213: i acute */ "{\\tendmc\\char'106}", -/* 214: o slash */ "{\\tendma\\char'034}", -/* 215: ae ligature */ "{\\tendma\\char'032}", -/* 216: A dieresis */ "{\\tendmc\\char'107}", -/* 217: i grave */ "{\\tendmc\\char'110}", -/* 218: O dieresis */ "{\\tendmc\\char'111}", -/* 219: U dieresis */ "{\\tendmc\\char'112}", -/* 220: E acute */ "{\\tendmc\\char'113}", -/* 221: i dieresis */ "{\\tendmc\\char'114}", -/* 222: SS ligature */ "{\\tendma\\char'031}", -/* 223: O circumflex */ "{\\tendmc\\char'115}", -/* 224: A acute */ "{\\tendmc\\char'116}", -/* 225: A tilde */ "{\\tendmc\\char'117}", -/* 226: a tilde */ "{\\tendmc\\char'120}", -/* 227: Eth */ 0, -/* 228: eth */ 0, -/* 229: I acute */ "{\\tendmc\\char'121}", -/* 230: I grave */ "{\\tendmc\\char'122}", -/* 231: O acute */ "{\\tendmc\\char'123}", -/* 232: O grave */ "{\\tendmc\\char'124}", -/* 233: O tilde */ "{\\tendmc\\char'125}", -/* 234: o tilde */ "{\\tendmc\\char'126}", -/* 235: S caron */ "{\\tendmc\\char'127}", -/* 236: s caron */ "{\\tendmc\\char'130}", -/* 237: U acute */ "{\\tendmc\\char'131}", -/* 238: Y dieresis */ "{\\tendmc\\char'132}", -/* 239: y dieresis */ "{\\tendmc\\char'133}", -/* 240: Thorn */ 0, -/* 241: thorn */ 0, -/* 242: undefined */ 0, -/* 243: mu */ 0, -/* 244: paragraph sign */ 0, -/* 245: fraction 3/4 */ 0, -/* 246: long dash */ 0, -/* 247: fraction 1/4 */ 0, -/* 248: fraction 1/2 */ 0, -/* 249: Female ordinal */ 0, -/* 250: Male ordinal */ 0, -/* 251: French double open quote */ 0, -/* 252: Solid square */ 0, -/* 253: French double close quote */ 0, -/* 254: Plus over minus sign */ 0, -/* 255: undefined */ 0 -} -#endif -; - -/* special menu label character expansions */ -EXTERN char *cmenlspec[256] -#if defined(DEFINE) -= { -/* Char Name TeX Expansion */ -/* */ -/* 0: ^@ NUL */ 0, -/* 1: ^A SOH */ 0, -/* 2: ^B STX */ 0, -/* 3: ^C ETX */ 0, -/* 4: ^D EOT */ 0, -/* 5: ^E ENQ */ 0, -/* 6: ^F ACK */ 0, -/* 7: ^G BEL */ 0, -/* 8: ^H BS */ 0, -/* 9: ^I HT */ 0, -/* 10: ^J LF */ 0, -/* 11: ^K VT */ 0, -/* 12: ^L FF */ 0, -/* 13: ^M CR */ 0, -/* 14: ^N SO */ 0, -/* 15: ^O SI */ 0, -/* 16: ^P DLE */ 0, -/* 17: ^Q DC1 */ 0, -/* 18: ^R DC2 */ 0, -/* 19: ^S DC3 */ 0, -/* 20: ^T DC4 */ 0, -/* 21: ^U NAK */ 0, -/* 22: ^V SYN */ 0, -/* 23: ^W ETB */ 0, -/* 24: ^X CAN */ 0, -/* 25: ^Y EM */ 0, -/* 26: ^Z SUB */ 0, -/* 27: ^[ ESC */ 0, -/* 28: ^\ FS */ 0, -/* 29: ^] GS */ 0, -/* 30: ^^ RS */ 0, -/* 31: ^_ US */ 0, -/* 32: SP */ "{\\tenmlb\\char'146}", -/* 33: ! */ 0, -/* 34: " */ 0, -/* 35: # */ "\\#", -/* 36: $ */ "{\\dollar}", -/* 37: % */ "\\%", -/* 38: & */ "\\&", -/* 39: ' */ "{'}", -/* 40: ( */ 0, -/* 41: ) */ 0, -/* 42: * */ 0, -/* 43: + */ 0, -/* 44: , */ 0, -/* 45: - */ "{-}", -/* 46: . */ 0, -/* 47: / */ 0, -/* 48: 0 */ 0, -/* 49: 1 */ 0, -/* 50: 2 */ 0, -/* 51: 3 */ 0, -/* 52: 4 */ 0, -/* 53: 5 */ 0, -/* 54: 6 */ 0, -/* 55: 7 */ 0, -/* 56: 8 */ 0, -/* 57: 9 */ 0, -/* 58: : */ 0, -/* 59: ; */ 0, -/* 60: < */ "{\\tenmlb\\char'045}", -/* 61: = */ 0, -/* 62: > */ "{\\tenmlb\\char'046}", -/* 63: ? */ 0, -/* 64: @ */ 0, -/* 65: A */ 0, -/* 66: B */ 0, -/* 67: C */ 0, -/* 68: D */ 0, -/* 69: E */ 0, -/* 70: F */ 0, -/* 71: G */ 0, -/* 72: H */ 0, -/* 73: I */ 0, -/* 74: J */ 0, -/* 75: K */ 0, -/* 76: L */ 0, -/* 77: M */ 0, -/* 78: N */ 0, -/* 79: O */ 0, -/* 80: P */ 0, -/* 81: Q */ 0, -/* 82: R */ 0, -/* 83: S */ 0, -/* 84: T */ 0, -/* 85: U */ 0, -/* 86: V */ 0, -/* 87: W */ 0, -/* 88: X */ 0, -/* 89: Y */ 0, -/* 90: Z */ 0, -/* 91: [ */ 0, -/* 92: \\ */ "{\\tenmlb\\char'047}", -/* 93: ] */ 0, -/* 94: ^ */ "{\\tenmlb\\char'064}", -/* 95: _ */ "{\\tenmlb\\char'066}", -/* 96: ` */ "{`}", -/* 97: a */ 0, -/* 98: b */ 0, -/* 99: c */ 0, -/* 100: d */ 0, -/* 101: e */ 0, -/* 102: f */ 0, -/* 103: g */ 0, -/* 104: h */ 0, -/* 105: i */ 0, -/* 106: j */ 0, -/* 107: k */ 0, -/* 108: l */ 0, -/* 109: m */ 0, -/* 110: n */ 0, -/* 111: o */ 0, -/* 112: p */ 0, -/* 113: q */ 0, -/* 114: r */ 0, -/* 115: s */ 0, -/* 116: t */ 0, -/* 117: u */ 0, -/* 118: v */ 0, -/* 119: w */ 0, -/* 120: x */ 0, -/* 121: y */ 0, -/* 122: z */ 0, -/* 123: { */ "{\\tenmlb\\char'070}", -/* 124: | */ "{\\tenmlb\\char'104}", -/* 125: } */ "{\\tenmlb\\char'107}", -/* 126: ~ */ "{\\tenmlb\\char'116}", -/* 127: DEL */ 0, -/* 128: undefined */ 0, -/* 129: undefined */ 0, -/* 130: undefined */ 0, -/* 131: undefined */ 0, -/* 132: undefined */ 0, -/* 133: undefined */ 0, -/* 134: undefined */ 0, -/* 135: undefined */ 0, -/* 136: undefined */ 0, -/* 137: undefined */ 0, -/* 138: undefined */ 0, -/* 139: undefined */ 0, -/* 140: undefined */ 0, -/* 141: undefined */ 0, -/* 142: undefined */ 0, -/* 143: undefined */ 0, -/* 144: undefined */ 0, -/* 145: undefined */ 0, -/* 146: undefined */ 0, -/* 147: undefined */ 0, -/* 148: undefined */ 0, -/* 149: undefined */ 0, -/* 150: undefined */ 0, -/* 151: undefined */ 0, -/* 152: undefined */ 0, -/* 153: undefined */ 0, -/* 154: undefined */ 0, -/* 155: undefined */ 0, -/* 156: undefined */ 0, -/* 157: undefined */ 0, -/* 158: undefined */ 0, -/* 159: undefined */ 0, -/* 160: undefined */ 0, -/* 161: A grave */ "{\\tenmlc\\char'041}", -/* 162: A circumflex */ "{\\tenmlc\\char'042}", -/* 163: E grave */ "{\\tenmlc\\char'043}", -/* 164: E circumflex */ "{\\tenmlc\\char'044}", -/* 165: E dieresis */ "{\\tenmlc\\char'045}", -/* 166: I circumflex */ "{\\tenmlc\\char'046}", -/* 167: I dieresis */ "{\\tenmlc\\char'047}", -/* 168: acute accent */ "{\\tenmla\\char'023}", -/* 169: grave accent */ "{\\tenmla\\char'022}", -/* 170: circumflex */ "{\\tenmla\\char'136}", -/* 171: dieresis */ "{\\tenmla\\char'177}", -/* 172: tilde */ "{\\tenmla\\char'176}", -/* 173: U grave */ "{\\tenmlc\\char'050}", -/* 174: U circumflex */ "{\\tenmlc\\char'051}", -/* 175: Italian Lira */ 0, -/* 176: overbar */ 0, -/* 177: Y acute */ "{\\tenmlc\\char'053}", -/* 178: y acute */ "{\\tenmlc\\char'054}", -/* 179: degree */ 0, -/* 180: C cedilla */ "{\\tenmla\\char'030}", -/* 181: c cedilla */ "{\\tenmla\\char'030}", -/* 182: N tilde */ "{\\tenmlc\\char'055}", -/* 183: n tilde */ "{\\tenmlc\\char'056}", -/* 184: inverted exclamation mark */ "{\\tenmla\\char'074}", -/* 185: inverted question mark */ "{\\tenmla\\char'076}", -/* 186: currency sign */ 0, -/* 187: pound sterling */ 0, -/* 188: Yen */ 0, -/* 189: Section sign */ 0, -/* 190: florin */ 0, -/* 191: Cent sign */ 0, -/* 192: a circumflex */ "{\\tenmlc\\char'063}", -/* 193: e circumflex */ "{\\tenmlc\\char'064}", -/* 194: o circumflex */ "{\\tenmlc\\char'065}", -/* 195: u circumflex */ "{\\tenmlc\\char'066}", -/* 196: a acute */ "{\\tenmlc\\char'067}", -/* 197: e acute */ "{\\tenmlc\\char'070}", -/* 198: o acute */ "{\\tenmlc\\char'071}", -/* 199: u acute */ "{\\tenmlc\\char'072}", -/* 200: a grave */ "{\\tenmlc\\char'073}", -/* 201: e grave */ "{\\tenmlc\\char'074}", -/* 202: o grave */ "{\\tenmlc\\char'075}", -/* 203: u grave */ "{\\tenmlc\\char'076}", -/* 204: a dieresis */ "{\\tenmlc\\char'077}", -/* 205: e dieresis */ "{\\tenmlc\\char'100}", -/* 206: o dieresis */ "{\\tenmlc\\char'101}", -/* 207: u dieresis */ "{\\tenmlc\\char'102}", -/* 208: A angstrom */ "{\\tenmlc\\char'103}", -/* 209: i circumflex */ "{\\tenmlc\\char'104}", -/* 210: O slash */ "{\\tenmla\\char'037}", -/* 211: AE ligature */ "{\\tenmla\\char'035}", -/* 212: a angstrom */ "{\\tenmlc\\char'105}", -/* 213: i acute */ "{\\tenmlc\\char'106}", -/* 214: o slash */ "{\\tenmla\\char'034}", -/* 215: ae ligature */ "{\\tenmla\\char'032}", -/* 216: A dieresis */ "{\\tenmlc\\char'107}", -/* 217: i grave */ "{\\tenmlc\\char'110}", -/* 218: O dieresis */ "{\\tenmlc\\char'111}", -/* 219: U dieresis */ "{\\tenmlc\\char'112}", -/* 220: E acute */ "{\\tenmlc\\char'113}", -/* 221: i dieresis */ "{\\tenmlc\\char'114}", -/* 222: SS ligature */ "{\\tenmla\\char'031}", -/* 223: O circumflex */ "{\\tenmlc\\char'115}", -/* 224: A acute */ "{\\tenmlc\\char'116}", -/* 225: A tilde */ "{\\tenmlc\\char'117}", -/* 226: a tilde */ "{\\tenmlc\\char'120}", -/* 227: Eth */ 0, -/* 228: eth */ 0, -/* 229: I acute */ "{\\tenmlc\\char'121}", -/* 230: I grave */ "{\\tenmlc\\char'122}", -/* 231: O acute */ "{\\tenmlc\\char'123}", -/* 232: O grave */ "{\\tenmlc\\char'124}", -/* 233: O tilde */ "{\\tenmlc\\char'125}", -/* 234: o tilde */ "{\\tenmlc\\char'126}", -/* 235: S caron */ "{\\tenmlc\\char'127}", -/* 236: s caron */ "{\\tenmlc\\char'130}", -/* 237: U acute */ "{\\tenmlc\\char'131}", -/* 238: Y dieresis */ "{\\tenmlc\\char'132}", -/* 239: y dieresis */ "{\\tenmlc\\char'133}", -/* 240: Thorn */ 0, -/* 241: thorn */ 0, -/* 242: undefined */ 0, -/* 243: mu */ 0, -/* 244: paragraph sign */ 0, -/* 245: fraction 3/4 */ 0, -/* 246: long dash */ 0, -/* 247: fraction 1/4 */ 0, -/* 248: fraction 1/2 */ 0, -/* 249: Female ordinal */ 0, -/* 250: Male ordinal */ 0, -/* 251: French double open quote */ 0, -/* 252: Solid square */ 0, -/* 253: French double close quote */ 0, -/* 254: Plus over minus sign */ 0, -/* 255: undefined */ 0 -} -#endif -; - -/* white menu label special character expansions */ -EXTERN char *cwmenlspec[256] -#if defined(DEFINE) -= { -/* Char Name TeX Expansion */ -/* */ -/* 0: ^@ NUL */ 0, -/* 1: ^A SOH */ 0, -/* 2: ^B STX */ 0, -/* 3: ^C ETX */ 0, -/* 4: ^D EOT */ 0, -/* 5: ^E ENQ */ 0, -/* 6: ^F ACK */ 0, -/* 7: ^G BEL */ 0, -/* 8: ^H BS */ 0, -/* 9: ^I HT */ 0, -/* 10: ^J LF */ 0, -/* 11: ^K VT */ 0, -/* 12: ^L FF */ 0, -/* 13: ^M CR */ 0, -/* 14: ^N SO */ 0, -/* 15: ^O SI */ 0, -/* 16: ^P DLE */ 0, -/* 17: ^Q DC1 */ 0, -/* 18: ^R DC2 */ 0, -/* 19: ^S DC3 */ 0, -/* 20: ^T DC4 */ 0, -/* 21: ^U NAK */ 0, -/* 22: ^V SYN */ 0, -/* 23: ^W ETB */ 0, -/* 24: ^X CAN */ 0, -/* 25: ^Y EM */ 0, -/* 26: ^Z SUB */ 0, -/* 27: ^[ ESC */ 0, -/* 28: ^\ FS */ 0, -/* 29: ^] GS */ 0, -/* 30: ^^ RS */ 0, -/* 31: ^_ US */ 0, -/* 32: SP */ "{\\tenwlb\\char'146}", -/* 33: ! */ 0, -/* 34: " */ 0, -/* 35: # */ "\\#", -/* 36: $ */ "{\\dollar}", -/* 37: % */ "\\%", -/* 38: & */ "\\&", -/* 39: ' */ "{'}", -/* 40: ( */ 0, -/* 41: ) */ 0, -/* 42: * */ 0, -/* 43: + */ 0, -/* 44: , */ 0, -/* 45: - */ "{-}", -/* 46: . */ 0, -/* 47: / */ 0, -/* 48: 0 */ 0, -/* 49: 1 */ 0, -/* 50: 2 */ 0, -/* 51: 3 */ 0, -/* 52: 4 */ 0, -/* 53: 5 */ 0, -/* 54: 6 */ 0, -/* 55: 7 */ 0, -/* 56: 8 */ 0, -/* 57: 9 */ 0, -/* 58: : */ 0, -/* 59: ; */ 0, -/* 60: < */ "{\\tenwlb\\char'045}", -/* 61: = */ 0, -/* 62: > */ "{\\tenwlb\\char'046}", -/* 63: ? */ 0, -/* 64: @ */ 0, -/* 65: A */ 0, -/* 66: B */ 0, -/* 67: C */ 0, -/* 68: D */ 0, -/* 69: E */ 0, -/* 70: F */ 0, -/* 71: G */ 0, -/* 72: H */ 0, -/* 73: I */ 0, -/* 74: J */ 0, -/* 75: K */ 0, -/* 76: L */ 0, -/* 77: M */ 0, -/* 78: N */ 0, -/* 79: O */ 0, -/* 80: P */ 0, -/* 81: Q */ 0, -/* 82: R */ 0, -/* 83: S */ 0, -/* 84: T */ 0, -/* 85: U */ 0, -/* 86: V */ 0, -/* 87: W */ 0, -/* 88: X */ 0, -/* 89: Y */ 0, -/* 90: Z */ 0, -/* 91: [ */ 0, -/* 92: \\ */ "{\\tenwlb\\char'047}", -/* 93: ] */ 0, -/* 94: ^ */ "{\\tenwlb\\char'064}", -/* 95: _ */ "{\\tenwlb\\char'066}", -/* 96: ` */ "{`}", -/* 97: a */ 0, -/* 98: b */ 0, -/* 99: c */ 0, -/* 100: d */ 0, -/* 101: e */ 0, -/* 102: f */ 0, -/* 103: g */ 0, -/* 104: h */ 0, -/* 105: i */ 0, -/* 106: j */ 0, -/* 107: k */ 0, -/* 108: l */ 0, -/* 109: m */ 0, -/* 110: n */ 0, -/* 111: o */ 0, -/* 112: p */ 0, -/* 113: q */ 0, -/* 114: r */ 0, -/* 115: s */ 0, -/* 116: t */ 0, -/* 117: u */ 0, -/* 118: v */ 0, -/* 119: w */ 0, -/* 120: x */ 0, -/* 121: y */ 0, -/* 122: z */ 0, -/* 123: { */ "{\\tenwlb\\char'070}", -/* 124: | */ "{\\tenwlb\\char'104}", -/* 125: } */ "{\\tenwlb\\char'107}", -/* 126: ~ */ "{\\tenwlb\\char'116}", -/* 127: DEL */ 0, -/* 128: undefined */ 0, -/* 129: undefined */ 0, -/* 130: undefined */ 0, -/* 131: undefined */ 0, -/* 132: undefined */ 0, -/* 133: undefined */ 0, -/* 134: undefined */ 0, -/* 135: undefined */ 0, -/* 136: undefined */ 0, -/* 137: undefined */ 0, -/* 138: undefined */ 0, -/* 139: undefined */ 0, -/* 140: undefined */ 0, -/* 141: undefined */ 0, -/* 142: undefined */ 0, -/* 143: undefined */ 0, -/* 144: undefined */ 0, -/* 145: undefined */ 0, -/* 146: undefined */ 0, -/* 147: undefined */ 0, -/* 148: undefined */ 0, -/* 149: undefined */ 0, -/* 150: undefined */ 0, -/* 151: undefined */ 0, -/* 152: undefined */ 0, -/* 153: undefined */ 0, -/* 154: undefined */ 0, -/* 155: undefined */ 0, -/* 156: undefined */ 0, -/* 157: undefined */ 0, -/* 158: undefined */ 0, -/* 159: undefined */ 0, -/* 160: undefined */ 0, -/* 161: A grave */ "{\\tenwlc\\char'041}", -/* 162: A circumflex */ "{\\tenwlc\\char'042}", -/* 163: E grave */ "{\\tenwlc\\char'043}", -/* 164: E circumflex */ "{\\tenwlc\\char'044}", -/* 165: E dieresis */ "{\\tenwlc\\char'045}", -/* 166: I circumflex */ "{\\tenwlc\\char'046}", -/* 167: I dieresis */ "{\\tenwlc\\char'047}", -/* 168: acute accent */ "{\\tenwla\\char'023}", -/* 169: grave accent */ "{\\tenwla\\char'022}", -/* 170: circumflex */ "{\\tenwla\\char'136}", -/* 171: dieresis */ "{\\tenwla\\char'177}", -/* 172: tilde */ "{\\tenwla\\char'176}", -/* 173: U grave */ "{\\tenwlc\\char'050}", -/* 174: U circumflex */ "{\\tenwlc\\char'051}", -/* 175: Italian Lira */ 0, -/* 176: overbar */ 0, -/* 177: Y acute */ "{\\tenwlc\\char'053}", -/* 178: y acute */ "{\\tenwlc\\char'054}", -/* 179: degree */ 0, -/* 180: C cedilla */ "{\\tenwla\\char'030}", -/* 181: c cedilla */ "{\\tenwla\\char'030}", -/* 182: N tilde */ "{\\tenwlc\\char'055}", -/* 183: n tilde */ "{\\tenwlc\\char'056}", -/* 184: inverted exclamation mark */ "{\\tenwla\\char'074}", -/* 185: inverted question mark */ "{\\tenwla\\char'076}", -/* 186: currency sign */ 0, -/* 187: pound sterling */ 0, -/* 188: Yen */ 0, -/* 189: Section sign */ 0, -/* 190: florin */ 0, -/* 191: Cent sign */ 0, -/* 192: a circumflex */ "{\\tenwlc\\char'063}", -/* 193: e circumflex */ "{\\tenwlc\\char'064}", -/* 194: o circumflex */ "{\\tenwlc\\char'065}", -/* 195: u circumflex */ "{\\tenwlc\\char'066}", -/* 196: a acute */ "{\\tenwlc\\char'067}", -/* 197: e acute */ "{\\tenwlc\\char'070}", -/* 198: o acute */ "{\\tenwlc\\char'071}", -/* 199: u acute */ "{\\tenwlc\\char'072}", -/* 200: a grave */ "{\\tenwlc\\char'073}", -/* 201: e grave */ "{\\tenwlc\\char'074}", -/* 202: o grave */ "{\\tenwlc\\char'075}", -/* 203: u grave */ "{\\tenwlc\\char'076}", -/* 204: a dieresis */ "{\\tenwlc\\char'077}", -/* 205: e dieresis */ "{\\tenwlc\\char'100}", -/* 206: o dieresis */ "{\\tenwlc\\char'101}", -/* 207: u dieresis */ "{\\tenwlc\\char'102}", -/* 208: A angstrom */ "{\\tenwlc\\char'103}", -/* 209: i circumflex */ "{\\tenwlc\\char'104}", -/* 210: O slash */ "{\\tenwla\\char'037}", -/* 211: AE ligature */ "{\\tenwla\\char'035}", -/* 212: a angstrom */ "{\\tenwlc\\char'105}", -/* 213: i acute */ "{\\tenwlc\\char'106}", -/* 214: o slash */ "{\\tenwla\\char'034}", -/* 215: ae ligature */ "{\\tenwla\\char'032}", -/* 216: A dieresis */ "{\\tenwlc\\char'107}", -/* 217: i grave */ "{\\tenwlc\\char'110}", -/* 218: O dieresis */ "{\\tenwlc\\char'111}", -/* 219: U dieresis */ "{\\tenwlc\\char'112}", -/* 220: E acute */ "{\\tenwlc\\char'113}", -/* 221: i dieresis */ "{\\tenwlc\\char'114}", -/* 222: SS ligature */ "{\\tenwla\\char'031}", -/* 223: O circumflex */ "{\\tenwlc\\char'115}", -/* 224: A acute */ "{\\tenwlc\\char'116}", -/* 225: A tilde */ "{\\tenwlc\\char'117}", -/* 226: a tilde */ "{\\tenwlc\\char'120}", -/* 227: Eth */ 0, -/* 228: eth */ 0, -/* 229: I acute */ "{\\tenwlc\\char'121}", -/* 230: I grave */ "{\\tenwlc\\char'122}", -/* 231: O acute */ "{\\tenwlc\\char'123}", -/* 232: O grave */ "{\\tenwlc\\char'124}", -/* 233: O tilde */ "{\\tenwlc\\char'125}", -/* 234: o tilde */ "{\\tenwlc\\char'126}", -/* 235: S caron */ "{\\tenwlc\\char'127}", -/* 236: s caron */ "{\\tenwlc\\char'130}", -/* 237: U acute */ "{\\tenwlc\\char'131}", -/* 238: Y dieresis */ "{\\tenwlc\\char'132}", -/* 239: y dieresis */ "{\\tenwlc\\char'133}", -/* 240: Thorn */ 0, -/* 241: thorn */ 0, -/* 242: undefined */ 0, -/* 243: mu */ 0, -/* 244: paragraph sign */ 0, -/* 245: fraction 3/4 */ 0, -/* 246: long dash */ 0, -/* 247: fraction 1/4 */ 0, -/* 248: fraction 1/2 */ 0, -/* 249: Female ordinal */ 0, -/* 250: Male ordinal */ 0, -/* 251: French double open quote */ 0, -/* 252: Solid square */ 0, -/* 253: French double close quote */ 0, -/* 254: Plus over minus sign */ 0, -/* 255: undefined */ 0 -} -#endif -; - diff --git a/cde/programs/dthelp/parser/pass1/helptag/charconv.h b/cde/programs/dthelp/parser/pass1/helptag/charconv.h deleted file mode 100644 index 3a7c97daf..000000000 --- a/cde/programs/dthelp/parser/pass1/helptag/charconv.h +++ /dev/null @@ -1,156 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: charconv.h /main/3 1995/11/08 10:07:32 rswiston $ */ -EXTERN M_WCHAR pc8_to_r8 [256] -#if defined(DEFINE) -= { - '\000','\001','\002','\003','\004','\005','\006','\007','\010','\011', - '\012','\013','\014','\015','\016','\017','\020','\021','\022','\023', - '\024','\025','\026','\027','\030','\031','\032','\033','\034','\035', - '\036','\037','\040','\041','\042','\043','\044','\045','\046','\047', - '\050','\051','\052','\053','\054','\055','\056','\057','\060','\061', - '\062','\063','\064','\065','\066','\067','\070','\071','\072','\073', - '\074','\075','\076','\077','\100','\101','\102','\103','\104','\105', - '\106','\107','\110','\111','\112','\113','\114','\115','\116','\117', - '\120','\121','\122','\123','\124','\125','\126','\127','\130','\131', - '\132','\133','\134','\135','\136','\137','\140','\141','\142','\143', - '\144','\145','\146','\147','\150','\151','\152','\153','\154','\155', - '\156','\157','\160','\161','\162','\163','\164','\165','\166','\167', - '\170','\171','\172','\173','\174','\175','\176','\177','\264','\317', - '\305','\300','\314','\310','\324','\265','\301','\315','\311','\335', - '\321','\331','\330','\320','\334','\327','\323','\302','\316','\312', - '\303','\313','\357','\332','\333','\277','\273','\274','\120','\276', - '\304','\325','\306','\307','\267','\266','\371','\372','\271','\055', - '\052','\370','\367','\270','\373','\375','\374','\374','\374','\174', - '\053','\043','\053','\053','\043','\043','\174','\043','\043','\053', - '\043','\053','\053','\053','\053','\053','\055','\053','\043','\053', - '\043','\043','\043','\043','\043','\075','\043','\043','\053','\043', - '\053','\053','\043','\043','\053','\053','\043','\053','\053','\374', - '\374','\374','\374','\374','\052','\336','\052','\052','\052','\052', - '\363','\052','\052','\052','\052','\052','\052','\326','\052','\052', - '\052','\376','\052','\052','\174','\174','\057','\176','\263','\362', - '\362','\052','\052','\052','\374','\377' - } -#endif - ; - -EXTERN M_WCHAR pc8dn_to_r8 [256] -#if defined(DEFINE) -= { - '\000','\001','\002','\003','\004','\005','\006','\007','\010','\011', - '\012','\013','\014','\015','\016','\017','\020','\021','\022','\023', - '\024','\025','\026','\027','\030','\031','\032','\033','\034','\035', - '\036','\037','\040','\041','\042','\043','\044','\045','\046','\047', - '\050','\051','\052','\053','\054','\055','\056','\057','\060','\061', - '\062','\063','\064','\065','\066','\067','\070','\071','\072','\073', - '\074','\075','\076','\077','\100','\101','\102','\103','\104','\105', - '\106','\107','\110','\111','\112','\113','\114','\115','\116','\117', - '\120','\121','\122','\123','\124','\125','\126','\127','\130','\131', - '\132','\133','\134','\135','\136','\137','\140','\141','\142','\143', - '\144','\145','\146','\147','\150','\151','\152','\153','\154','\155', - '\156','\157','\160','\161','\162','\163','\164','\165','\166','\167', - '\170','\171','\172','\173','\174','\175','\176','\177','\264','\317', - '\305','\300','\314','\310','\324','\265','\301','\315','\311','\335', - '\321','\331','\330','\320','\334','\327','\323','\302','\316','\312', - '\303','\313','\357','\332','\333','\326','\273','\322','\114','\154', - '\304','\325','\306','\307','\267','\266','\352','\351','\271','\342', - '\341','\154','\156','\270','\052','\272','\374','\374','\374','\174', - '\053','\043','\053','\053','\043','\043','\174','\043','\043','\053', - '\043','\053','\053','\053','\053','\053','\055','\053','\043','\053', - '\043','\043','\043','\043','\043','\075','\043','\043','\053','\043', - '\053','\053','\043','\043','\053','\053','\043','\053','\053','\374', - '\374','\374','\374','\374','\052','\336','\052','\052','\052','\052', - '\363','\052','\052','\052','\052','\052','\052','\326','\052','\052', - '\052','\376','\052','\052','\174','\174','\057','\176','\263','\362', - '\362','\052','\052','\052','\374','\377' - } -#endif - ; - -EXTERN M_WCHAR r8_to_pc8 [256] -#if defined(DEFINE) -= { - '\000','\001','\002','\003','\004','\005','\006','\007','\010','\011', - '\012','\013','\014','\015','\016','\017','\020','\021','\022','\023', - '\024','\025','\026','\027','\030','\031','\032','\033','\034','\035', - '\036','\037','\040','\041','\042','\043','\044','\045','\046','\047', - '\050','\051','\052','\053','\054','\055','\056','\057','\060','\061', - '\062','\063','\064','\065','\066','\067','\070','\071','\072','\073', - '\074','\075','\076','\077','\100','\101','\102','\103','\104','\105', - '\106','\107','\110','\111','\112','\113','\114','\115','\116','\117', - '\120','\121','\122','\123','\124','\125','\126','\127','\130','\131', - '\132','\133','\134','\135','\136','\137','\140','\141','\142','\143', - '\144','\145','\146','\147','\150','\151','\152','\153','\154','\155', - '\156','\157','\160','\161','\162','\163','\164','\165','\166','\167', - '\170','\171','\172','\173','\174','\175','\176','\177','\200','\201', - '\202','\203','\204','\205','\206','\207','\210','\211','\212','\213', - '\214','\215','\216','\217','\220','\221','\222','\223','\224','\225', - '\226','\227','\230','\231','\232','\233','\234','\235','\236','\237', - '\040','\101','\101','\105','\105','\105','\111','\111','\047','\140', - '\136','\042','\176','\125','\125','\234','\055','\131','\171','\370', - '\200','\207','\245','\244','\255','\250','\052','\234','\235','\052', - '\237','\233','\203','\210','\223','\226','\240','\202','\242','\243', - '\205','\212','\225','\227','\204','\211','\224','\201','\217','\214', - '\117','\222','\206','\241','\355','\221','\216','\215','\231','\232', - '\220','\213','\341','\117','\101','\101','\141','\104','\144','\111', - '\111','\117','\117','\117','\157','\123','\163','\125','\131','\230', - '\052','\052','\372','\346','\052','\052','\304','\254','\253','\246', - '\247','\256','\376','\257','\361','\040' - } -#endif - ; - -EXTERN M_WCHAR r8_to_pc8dn [256] -#if defined(DEFINE) -= { - '\000','\001','\002','\003','\004','\005','\006','\007','\010','\011', - '\012','\013','\014','\015','\016','\017','\020','\021','\022','\023', - '\024','\025','\026','\027','\030','\031','\032','\033','\034','\035', - '\036','\037','\040','\041','\042','\043','\044','\045','\046','\047', - '\050','\051','\052','\053','\054','\055','\056','\057','\060','\061', - '\062','\063','\064','\065','\066','\067','\070','\071','\072','\073', - '\074','\075','\076','\077','\100','\101','\102','\103','\104','\105', - '\106','\107','\110','\111','\112','\113','\114','\115','\116','\117', - '\120','\121','\122','\123','\124','\125','\126','\127','\130','\131', - '\132','\133','\134','\135','\136','\137','\140','\141','\142','\143', - '\144','\145','\146','\147','\150','\151','\152','\153','\154','\155', - '\156','\157','\160','\161','\162','\163','\164','\165','\166','\167', - '\170','\171','\172','\173','\174','\175','\176','\177','\200','\201', - '\202','\203','\204','\205','\206','\207','\210','\211','\212','\213', - '\214','\215','\216','\217','\220','\221','\222','\223','\224','\225', - '\226','\227','\230','\231','\232','\233','\234','\235','\236','\237', - '\040','\101','\101','\105','\105','\105','\111','\111','\047','\140', - '\136','\042','\176','\125','\125','\234','\055','\131','\171','\370', - '\200','\207','\245','\244','\255','\250','\257','\234','\131','\052', - '\146','\143','\203','\210','\223','\226','\240','\202','\242','\243', - '\205','\212','\225','\227','\204','\211','\224','\201','\217','\214', - '\235','\222','\206','\241','\233','\221','\216','\215','\231','\232', - '\220','\213','\341','\117','\101','\252','\251','\104','\144','\111', - '\111','\117','\117','\247','\246','\123','\163','\125','\131','\230', - '\052','\052','\372','\346','\052','\052','\304','\052','\052','\052', - '\052','\074','\376','\076','\361','\040' - } -#endif - ; - -/* Obsolete */ diff --git a/cde/programs/dthelp/parser/pass1/helptag/figure.c b/cde/programs/dthelp/parser/pass1/helptag/figure.c deleted file mode 100644 index 0e791e6ad..000000000 --- a/cde/programs/dthelp/parser/pass1/helptag/figure.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: figure.c /main/3 1995/11/08 10:08:13 rswiston $ */ -/* -Copyright 1988, 1989 Hewlett-Packard Co. -*/ -/* Figure.c contains HP Tag to TeX figure processing */ - -/* Obsolete */ diff --git a/cde/programs/dthelp/parser/pass1/helptag/fproto.h b/cde/programs/dthelp/parser/pass1/helptag/fproto.h index 8b35a5660..b71946c01 100644 --- a/cde/programs/dthelp/parser/pass1/helptag/fproto.h +++ b/cde/programs/dthelp/parser/pass1/helptag/fproto.h @@ -149,8 +149,6 @@ void strcode(M_WCHAR *string, FILE *outfile); void mb_strcode(char *string, FILE *outfile); -char *strstr(const char *s1, const char *s2); - void svhdstring(M_WCHAR *string); void svtcstring(M_WCHAR *string); diff --git a/cde/programs/dthelp/parser/pass1/helptag/grphpar.c b/cde/programs/dthelp/parser/pass1/helptag/grphpar.c deleted file mode 100644 index b7f5780c9..000000000 --- a/cde/programs/dthelp/parser/pass1/helptag/grphpar.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: grphpar.c /main/3 1995/11/08 10:08:53 rswiston $ */ -/* Copyright (c) 1988, 1989 Hewlett-Packard Co. */ -/* HP Tag/TeX figure aspect ratio calculations */ - -#define GRAPHDEF - -/* Obsolete */ diff --git a/cde/programs/dthelp/parser/pass1/helptag/grphpar.h b/cde/programs/dthelp/parser/pass1/helptag/grphpar.h deleted file mode 100644 index 19f847ca6..000000000 --- a/cde/programs/dthelp/parser/pass1/helptag/grphpar.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: grphpar.h /main/3 1995/11/08 10:09:08 rswiston $ */ -/* Copyright (c) 1988, 1989 Hewlett-Packard Co. */ -/* Variable definitions for HP Tag/TeX for figures and graphics */ -/* when adding, check "global.h" for conflicts */ - -/* Obsolete */ diff --git a/cde/programs/dthelp/parser/pass1/helptag/make.c b/cde/programs/dthelp/parser/pass1/helptag/make.c deleted file mode 100644 index 30e975bab..000000000 --- a/cde/programs/dthelp/parser/pass1/helptag/make.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: make.c /main/3 1995/11/08 10:10:53 rswiston $ */ -/* Copyright (c) 1986, 1987, 1988, 1989 Hewlett-Packard Co. */ -/* Functions for pseudo-make features of HP Tag/TeX translator, i.e., - for testing which generated files are current and which must be - recreated. */ -/* - NOTE : This file is used as a Microsoft Linker overlay, so it cannot - have functions as pointers, eg. (proc *) f(). Routines that are - or invoke function pointers should be in tex.c. -*/ - -#if defined(_AIX) || defined(sun) -#include -#include -#endif - -#include - -#if defined(_AIX) || defined(sun) -#undef M_PI /* M_PI is used by markup, we don't need the math PI */ -#endif - -#include "userinc.h" -#include "globdec.h" - -/* Obsolete */ diff --git a/cde/programs/dthelp/parser/pass1/helptag/need.c b/cde/programs/dthelp/parser/pass1/helptag/need.c deleted file mode 100644 index c5c20d69c..000000000 --- a/cde/programs/dthelp/parser/pass1/helptag/need.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: need.c /main/3 1995/11/08 10:11:13 rswiston $ */ -/* Obsolete */ diff --git a/cde/programs/dthelp/parser/pass1/helptag/table.c b/cde/programs/dthelp/parser/pass1/helptag/table.c deleted file mode 100644 index b72b8bdb3..000000000 --- a/cde/programs/dthelp/parser/pass1/helptag/table.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: table.c /main/3 1995/11/08 10:13:13 rswiston $ */ -/* Obsolete */ diff --git a/cde/programs/dthelp/parser/pass1/parser/addinput.c b/cde/programs/dthelp/parser/pass1/parser/addinput.c deleted file mode 100644 index a482bdd05..000000000 --- a/cde/programs/dthelp/parser/pass1/parser/addinput.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: addinput.c /main/3 1995/11/08 10:14:54 rswiston $ */ -/* Obsolete */ diff --git a/cde/programs/dthelp/parser/pass1/parser/delfree.c b/cde/programs/dthelp/parser/pass1/parser/delfree.c deleted file mode 100644 index 2527dfa7b..000000000 --- a/cde/programs/dthelp/parser/pass1/parser/delfree.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: delfree.c /main/3 1995/11/08 10:16:24 rswiston $ */ -/* Copyright (c) 1988 Hewlett-Packard Co. */ - -/* Versions of m_free and m_malloc for debugging. */ - -/**/ -#include -#include -#include "basic.h" -#include "trie.h" -#include "dtd.h" -#include "parser.h" - -m_free(block, msg) - char *block ; - char *msg ; - { - free(block) ; - fprintf(m_outfile, "%5u:%5u- Freed %s\n", - (unsigned int) ((unsigned long) block >> 16), - (unsigned int) block, msg) ; - } - -char *m_mallocx(size, msg) - int size ; - char *msg ; - { - char *p ; - - if (! size) return(NULL) ; - p = malloc(size) ; - if (! p) { - m_err1("Unable to allocate space for %s", msg) ; - exit(TRUE) ; - } - fprintf(m_outfile, "%5u:%5u- Allocated %s\n", - (unsigned int) ((unsigned long) p >> 16), (unsigned int) p, msg) ; - return(p) ; - } diff --git a/cde/programs/dthelp/parser/pass1/parser/dmpline.c b/cde/programs/dthelp/parser/pass1/parser/dmpline.c deleted file mode 100644 index 113492109..000000000 --- a/cde/programs/dthelp/parser/pass1/parser/dmpline.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: dmpline.c /main/3 1995/11/08 10:16:42 rswiston $ */ -/* -Copyright 1988, 1989 Hewlett-Packard Co. -*/ - -#include "userinc.h" -#include "globdec.h" - -/* Write input file and line number for an error message */ -void m_dumpline(file, line) -M_WCHAR *file ; -int line ; -{ -char buffer[10] ; - -m_errline("Line ") ; -sprintf(buffer, "%d", line) ; -m_errline(buffer) ; -if (file) - { - char mb_file; - - m_errline(" of File ") ; - mb_file = MakeMByteString(file); - m_errline(mb_file) ; - m_free(mb_file,"multi-byte string"); - } -} diff --git a/cde/programs/dthelp/parser/pass1/parser/eprefix.c b/cde/programs/dthelp/parser/pass1/parser/eprefix.c deleted file mode 100644 index 0dd277983..000000000 --- a/cde/programs/dthelp/parser/pass1/parser/eprefix.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: eprefix.c /main/3 1995/11/08 10:17:31 rswiston $ */ -/* -Copyright 1988, 1989 Hewlett-Packard Co. -*/ - -#include "userinc.h" -#include "globdec.h" - -/* Write error message prefix */ -void m_eprefix(void) - { - m_errline("\n*****\n") ; - } - diff --git a/cde/programs/dthelp/parser/pass1/parser/errline.c b/cde/programs/dthelp/parser/pass1/parser/errline.c deleted file mode 100644 index c12c947bb..000000000 --- a/cde/programs/dthelp/parser/pass1/parser/errline.c +++ /dev/null @@ -1,42 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: errline.c /main/3 1995/11/08 10:17:47 rswiston $ */ -/* -Copyright 1988, 1989 Hewlett-Packard Co. -*/ - -#include "userinc.h" -#include "globdec.h" - -/* Process error message text */ -void m_errline(p) -M_WCHAR *p ; -{ -char mb_p; - -mb_p = MakeMByteString(p); -fputs(mb_p, m_errfile) ; -fputs(mb_p, stderr) ; -m_free(mb_p,"multi-byte string"); -} - diff --git a/cde/programs/dthelp/parser/pass1/parser/esuffix.c b/cde/programs/dthelp/parser/pass1/parser/esuffix.c deleted file mode 100644 index b56151199..000000000 --- a/cde/programs/dthelp/parser/pass1/parser/esuffix.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: esuffix.c /main/3 1995/11/08 10:18:24 rswiston $ */ -/* -Copyright 1988, 1989 Hewlett-Packard Co. -*/ - -#include "userinc.h" -#include "globdec.h" - -/* Write error message suffix */ -void m_esuffix(void) - { - m_errline("\n") ; - m_dumpline(m_thisfile(), m_thisline()) ; - m_errline(":\n") ; - m_lastchars() ; - if (++m_errcnt == m_errlim) { - m_error("Too many errors, processing stopped") ; - m_exit(TRUE) ; - } - } - diff --git a/cde/programs/dthelp/parser/pass1/parser/findpar.c b/cde/programs/dthelp/parser/pass1/parser/findpar.c deleted file mode 100644 index 7aa28f8b5..000000000 --- a/cde/programs/dthelp/parser/pass1/parser/findpar.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: findpar.c /main/3 1995/11/08 10:18:57 rswiston $ */ -/* - Copyright 1989 Hewlett-Packard Co. -*/ - -#include -#include "basic.h" -#include "trie.h" -#include "dtdext.h" -#include "parser.h" - -/* Function callable by interface designers. Returns index in parameter - list of a specified parameter for an element (i.e., 1 for first parameter - specified in the DTD, 2 for second, etc.). First parameter, elt, is - the name of the element. Second parameter is the name of the parameter - or NULL. Third parameter is used only if second parameter is NULL. In - the latter case, function returns first keyword parameter, if any, for - which the specified value is a legal value and otherwise first - Returns 0 if elt is not a valid element name, if param is specified - but is not a valid parameter name, or if param is NULL and value is - not a valid value of any of elt's parameters. */ -int m_findpar( const char *elt , const char *param , const M_WCHAR *value ) -{ -M_ELEMENT eltid ; -int par ; -int i ; -M_WCHAR *wc_elt; - -wc_elt = MakeWideCharString(elt); -if (! (eltid = m_packedlook(m_entree, wc_elt))) - { - m_free(wc_elt,"wide character string"); - return(M_NULLVAL) ; - } -m_free(wc_elt,"wide character string"); - -/* A parameter name specified */ -if (param) - { - for (par = m_element[eltid - 1].parptr, i = 1 ; - - i <= m_element[eltid - 1].parcount ; - par++, i++) - if (!m_wcmbupstrcmp(&m_pname[m_parameter[par - 1].paramname], param)) - return(i) ; - return(M_NULLVAL) ; - } - -/* No parameter name specified */ - -/* First check is it a valid keyword? */ -for (par = m_element[eltid - 1].parptr, i = 1 ; - i <= m_element[eltid - 1].parcount ; - par++, i++) -if (m_parameter[par - 1].type == M_KEYWORD) -if (m_partype(par, value)) return(i) ; - -/* It wasn't a keyword. Check for valid value for some other parameter.*/ -for (par = m_element[eltid - 1].parptr, i = 1 ; -i <= m_element[eltid - 1].parcount ; -par++, i++) - { - if (m_parameter[par - 1].type == M_KEYWORD) continue ; - if (m_partype(par, value)) return(i) ; - } - -/* Not a valid value for any parameter */ -return(M_NULLVAL) ; -} - diff --git a/cde/programs/dthelp/parser/pass1/parser/getc.c b/cde/programs/dthelp/parser/pass1/parser/getc.c deleted file mode 100644 index b66fb60f7..000000000 --- a/cde/programs/dthelp/parser/pass1/parser/getc.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: getc.c /main/3 1995/11/08 10:19:11 rswiston $ */ -/* Copyright 1988, 1989 Hewlett-Packard Co. */ - -/* Default get-char procedure */ - -#include "userinc.h" -#include "globdec.h" - -int m_getc(m_ptr) - void *m_ptr ; - { - return(getc((FILE*) m_ptr)) ; - } diff --git a/cde/programs/dthelp/parser/pass1/parser/ifdata.c b/cde/programs/dthelp/parser/pass1/parser/ifdata.c deleted file mode 100644 index 3073f023c..000000000 --- a/cde/programs/dthelp/parser/pass1/parser/ifdata.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: ifdata.c /main/3 1995/11/08 10:19:44 rswiston $ */ -/* Copyright 1988, 1989 Hewlett-Packard Co. */ - -/* Ifdata.c contains functions used by the interface to access the - single item of interface-determined data stored on the parse stack. */ - -#include -#include "basic.h" -#include "trie.h" -#include "dtdext.h" -#include "parser.h" - -/* Retrieve the interface data stored with the current element's nth parent */ -void *m_getdata(n, flag) - int n ; - LOGICAL *flag ; - { - M_PARSE *stackptr ; - - for (stackptr = m_stacktop ; - stackptr->oldtop && n >= 0 ; - stackptr = stackptr->oldtop, n--) { - if (! n) { - *flag = TRUE ; - return(stackptr->ifdata) ; - } - } - *flag = FALSE ; - return(NULL) ; - } - -/* Store interface data for the current element's nth parent */ -LOGICAL m_putdata(data, n) - void *data ; - int n ; - { - M_PARSE *stackptr ; - - for (stackptr = m_stacktop ; - stackptr->oldtop && n >= 0 ; - stackptr = stackptr->oldtop, n--) { - if (! n) { - stackptr->ifdata = data ; - return(TRUE) ; - } - } - return(FALSE) ; - } - diff --git a/cde/programs/dthelp/parser/pass1/parser/openent.c b/cde/programs/dthelp/parser/pass1/parser/openent.c deleted file mode 100644 index 94ec6098b..000000000 --- a/cde/programs/dthelp/parser/pass1/parser/openent.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: openent.c /main/3 1995/11/08 10:21:06 rswiston $ */ -/* Copyright 1988, 1989 Hewlett-Packard Co. */ - -/* Default open SYSTEM entity procedure */ - -#include "userinc.h" -#include "globdec.h" - -void *m_openent(entcontent) - M_WCHAR *entcontent ; - { - return((void *) fopen(entcontent, "r")) ; - } - diff --git a/cde/programs/dthelp/parser/pass1/parser/openfrst.c b/cde/programs/dthelp/parser/pass1/parser/openfrst.c deleted file mode 100644 index 9a58dea2c..000000000 --- a/cde/programs/dthelp/parser/pass1/parser/openfrst.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: openfrst.c /main/3 1995/11/08 10:21:22 rswiston $ */ -/* Copyright 1988, 1989 Hewlett-Packard Co. */ - -/* Default open SYSTEM entity procedure */ - -#include "userinc.h" -#include "globdec.h" - -void *m_openfirst(void) - { - return((void *) stdin) ; - } - - diff --git a/cde/programs/dthelp/parser/pass1/parser/parcount.c b/cde/programs/dthelp/parser/pass1/parser/parcount.c deleted file mode 100644 index 282251276..000000000 --- a/cde/programs/dthelp/parser/pass1/parser/parcount.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: parcount.c /main/3 1995/11/08 10:22:26 rswiston $ */ -/* - Copyright 1989 Hewlett-Packard Co. -*/ - -#include -#include "basic.h" -#include "trie.h" -#include "dtdext.h" -#include "parser.h" - -/* Function callable by interface designers. Returns number of parameters - of specified element (-1 indicates error). */ -int m_parcount(elt) - M_WCHAR *elt ; - { - M_ELEMENT eltid ; - - if (! (eltid = m_packedlook(m_entree, elt))) return(-1) ; - return(m_element[eltid - 1].parcount) ; - } - diff --git a/cde/programs/dthelp/parser/pass1/parser/pardef.c b/cde/programs/dthelp/parser/pass1/parser/pardef.c deleted file mode 100644 index c43f01dcc..000000000 --- a/cde/programs/dthelp/parser/pass1/parser/pardef.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: pardef.c /main/3 1995/11/08 10:22:42 rswiston $ */ -/* - Copyright 1989 Hewlett-Packard Co. -*/ - -#include -#include "basic.h" -#include "trie.h" -#include "dtdext.h" -#include "parser.h" - -/* Function callable by interface designers. Returns pointer to default - value of a parameter of an element. Type is set to indicate type of - default. Error indication is type is 0 and function returns NULL. */ -M_WCHAR *m_pardefault(elt, param, type) - M_WCHAR *elt ; - M_WCHAR *param ; - unsigned char *type ; - { - M_ELEMENT eltid ; - int par ; - int i ; - - *type = M_NULLVAL ; - if (! (eltid = m_packedlook(m_entree, elt))) return(NULL) ; - - for (par = m_element[eltid - 1].parptr, i = 0 ; - i < m_element[eltid - 1].parcount ; - par++, i++) - if (! m_wcupstrcmp(&m_pname[m_parameter[par - 1].paramname], param)) { - *type = (unsigned char) m_parameter[par - 1].deftype ; - if (*type == M_REQUIRED || *type == M_NULLDEF) return(NULL) ; - return(m_parameter[par -1].defval) ; - } - - /* Can't find the parameter */ - return(NULL) ; - } - diff --git a/cde/programs/dthelp/parser/pass1/parser/parname.c b/cde/programs/dthelp/parser/pass1/parser/parname.c deleted file mode 100644 index e2af62fd1..000000000 --- a/cde/programs/dthelp/parser/pass1/parser/parname.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: parname.c /main/3 1995/11/08 10:23:17 rswiston $ */ -/* - Copyright 1989 Hewlett-Packard Co. -*/ - -#include -#include "basic.h" -#include "trie.h" -#include "dtdext.h" -#include "parser.h" - -/* Function callable by interface designers. Returns name of nth parameter - of specified element (NULL indicates error). */ -M_WCHAR *m_parname(elt, n) - M_WCHAR *elt ; - int n ; - { - M_ELEMENT eltid ; - - if (! (eltid = m_packedlook(m_entree, elt))) return(NULL) ; - if (n < 1 || n > m_element[eltid - 1].parcount) return(NULL) ; - return(&m_pname[m_parameter[(n - 1) + m_element[eltid - 1].parptr - 1]. - paramname]) ; - } - -M_WCHAR *m_mbparname(elt, n) -char *elt ; -int n ; -{ -M_WCHAR *wc_elt, *retval; - -wc_elt = MakeWideCharString(elt); -retval = m_parname(wc_elt, n); -m_free(wc_elt,"wide character string"); -} - diff --git a/cde/programs/dthelp/parser/pass1/parser/parvalok.c b/cde/programs/dthelp/parser/pass1/parser/parvalok.c deleted file mode 100644 index a9aa78455..000000000 --- a/cde/programs/dthelp/parser/pass1/parser/parvalok.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: parvalok.c /main/3 1995/11/08 10:24:04 rswiston $ */ -/* - Copyright 1989 Hewlett-Packard Co. -*/ - -#include -#include "basic.h" -#include "trie.h" -#include "dtdext.h" -#include "parser.h" - -/* Function callable by interface designers. Returns TRUE if specified value - is a legal value for the indicated parameter of the given element, - FALSE otherwise. */ -LOGICAL m_parvalok( M_WCHAR *elt , M_WCHAR *param , const M_WCHAR *value ) - { - M_ELEMENT eltid ; - int par ; - int i ; - - if (! (eltid = m_packedlook(m_entree, elt))) return(FALSE) ; - for (par = m_element[eltid - 1].parptr, i = 1 ; - i <= m_element[eltid - 1].parcount ; - par++, i++) - if (! m_wcupstrcmp(&m_pname[m_parameter[par - 1].paramname], param)) - if (m_partype(par, value)) return(TRUE) ; - else return(FALSE) ; - - /* No such parameter */ - return(FALSE) ; - } - diff --git a/cde/programs/dthelp/parser/pass1/parser/procscmp.c b/cde/programs/dthelp/parser/pass1/parser/procscmp.c deleted file mode 100644 index 3aa5b2b62..000000000 --- a/cde/programs/dthelp/parser/pass1/parser/procscmp.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: procscmp.c /main/3 1995/11/08 10:24:29 rswiston $ */ -/* - Copyright 1986 Tandem Computers Incorporated. -This product and information is proprietary of Tandem Computers Incorporated. - Copyright 1986, 1987, 1988, 1989 Hewlett-Packard Co. -*/ - -/* Procscmp.c prefixes the interface's procs.c file with appropriate - declarations so it can be compiled. */ - -#include "userinc.h" -#include "globdec.h" - -/* Include any procedures specified by the interface designer */ -#include "procs.c" - - diff --git a/cde/programs/dthelp/parser/pass1/parser/proto.h b/cde/programs/dthelp/parser/pass1/parser/proto.h index 8ad1f618a..690b12479 100644 --- a/cde/programs/dthelp/parser/pass1/parser/proto.h +++ b/cde/programs/dthelp/parser/pass1/parser/proto.h @@ -153,8 +153,6 @@ void m_holdproc(void); void m_inctest(int *count, int limit, char *message); -void m_initctype(void); - void m_initialize(void); void m_lastchars(void); diff --git a/cde/programs/dthelp/parser/pass1/parser/setopt.c b/cde/programs/dthelp/parser/pass1/parser/setopt.c deleted file mode 100644 index 45e886429..000000000 --- a/cde/programs/dthelp/parser/pass1/parser/setopt.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: setopt.c /main/3 1995/11/08 10:25:07 rswiston $ */ -/* -Copyright 1988, 1989 Hewlett-Packard Co. -*/ - -#include "userinc.h" -#include "globdec.h" - - -/* Set program options */ -void m_setoptions(void) - { - if (m_argc > 1) m_optstring(m_argv[1]) ; - } diff --git a/cde/programs/dthelp/parser/pass1/parser/startdoc.c b/cde/programs/dthelp/parser/pass1/parser/startdoc.c deleted file mode 100644 index cbd952c62..000000000 --- a/cde/programs/dthelp/parser/pass1/parser/startdoc.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: startdoc.c /main/3 1995/11/08 10:25:53 rswiston $ */ -/* -Copyright 1989 Hewlett-Packard Co. -*/ - -#include "userinc.h" -#include "globdec.h" - -/* Default function called at start of document instance. Allows interface - control after all entity declarations have been processed. Not needed - in valid documents (when it is called just prior to global start-code), - but may be useful in some applications nevertheless. */ -void m_startdoc(void) - { - } - - diff --git a/cde/programs/dthelp/parser/pass1/parser/trace.c b/cde/programs/dthelp/parser/pass1/parser/trace.c deleted file mode 100644 index 29e767cdd..000000000 --- a/cde/programs/dthelp/parser/pass1/parser/trace.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: trace.c /main/3 1995/11/08 10:26:46 rswiston $ */ -/* -Copyright 1988, 1989 Hewlett-Packard Co. -*/ - -#include "userinc.h" -#include "globdec.h" - -/* Write debugging trace information */ -void m_wctrace(p) -M_WCHAR *p ; -{ -char *mb_p; - -mb_p = MakeMByteString(p); -fputs(mb_p, m_outfile) ; -m_free(mb_p,"multi-byte string"); -} - -void m_trace(p) -char *p ; -{ -fputs(p, m_outfile); -} diff --git a/cde/programs/dthelp/parser/pass1/util/emptyfil.c b/cde/programs/dthelp/parser/pass1/util/emptyfil.c deleted file mode 100644 index 5569cbe30..000000000 --- a/cde/programs/dthelp/parser/pass1/util/emptyfil.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: emptyfil.c /main/3 1995/11/08 10:30:15 rswiston $ */ -/* Copyright (c) 1988, 1989 Hewlett-Packard Co. */ -/* Creates a file with nothing in it */ -#include -#include "basic.h" - -int main(int argc, char **argv) - { - if (argc != 2) { - fprintf(stderr, "Usage: emptyfil filename\n") ; - exit(1) ; - } - if (! fopen(argv[1], "w")) - fprintf(stderr, "Unable to open %s\n", argv[1]) ; - return 0; - } diff --git a/cde/programs/dthelp/parser/pass1/util/fclndir.c b/cde/programs/dthelp/parser/pass1/util/fclndir.c deleted file mode 100644 index eb0dcebf0..000000000 --- a/cde/programs/dthelp/parser/pass1/util/fclndir.c +++ /dev/null @@ -1,160 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: fclndir.c /main/3 1995/11/08 10:32:12 rswiston $ */ -/* Copyright (c) 1987-1990 Hewlett-Packard Co. - -Fclndir.c compares two files, ignoring C line directives that appear -within them as well as blank lines, and leading white space. It exits -with an error code of 0 if the files are the same, 1 if they differ, and -2 if the program was called incorrectly. -*/ - -/* Feb. 11, 1991, CED: Added v2 fixes to v3 version of fclndir. - Thus, both versions now copy the source file to the target if - the files differ. -*/ - -#include -#include -#include -#include "basic.h" -#define SAME 0 -/* different defined to be 0 as of 12-1-89, because fclndir now does -the file-copy if the files are different, or if the second file -doesn't exist. (different used to be 1.) --ced */ -#define DIFFERENT 0 -#define ERROR 2 - -struct data { - int c ; - LOGICAL linestart ; - char *p ; - char *q ; - } data1, data2 ; - -char linedir[] = "#line" ; -char *p = linedir, *q = linedir + 1 ; - -int main(int argc, char **argv); - -void copyfile(char *pfile1, char *pfile2); - -int nextchar(FILE *file, struct data *data); - -int main(int argc, char **argv) - { - FILE *one, *two ; - int c1, c2 ; - - if (argc != 3) { - fputs("Usage: fclndir file1 (=source) file2 (=target)\n", stderr) ; - exit(ERROR) ; - } - if (! (one = fopen(argv[1], "r"))) { - fprintf(stderr, "ERROR: source file unavailable: %s\n", argv[1]) ; - exit(ERROR) ; - } - if (! (two = fopen(argv[2], "r"))) { - fprintf(stderr, "No target file %s; copying source file...\n", argv[2]) ; - /* call to copyfile entered by ced, 12-29-89. */ - copyfile(argv[1],argv[2]); - exit(DIFFERENT) ; - } - data1.linestart = data2.linestart = TRUE ; - data1.p = data2.p = linedir ; - data1.q = data2.q = linedir + 1 ; - c1 = nextchar(one, &data1) ; - c2 = nextchar(two, &data2) ; - while (c1 != EOF && c2 != EOF) { - if (c1 != c2) { - fprintf(stderr, "%s and %s are different; copying source...\n", - argv[1], argv[2]) ; -/* call to copyfile entered by ced, 12-1-89. */ - copyfile(argv[1],argv[2]); - exit(DIFFERENT) ; - } - c1 = nextchar(one, &data1) ; - c2 = nextchar(two, &data2) ; - } - if (c1 != c2) { - fprintf(stderr, "%s and %s are different; copying source...\n", - argv[1], argv[2]) ; -/* call to copyfile entered by ced, 12-1-89. */ - copyfile(argv[1],argv[2]); - exit(DIFFERENT) ; - } - fprintf(stderr, "%s and %s are the same\n", argv[1], argv[2]) ; - exit(SAME) ; - } - -/* copyfile inserted by ced, 12-1-89. */ -void copyfile(char *pfile1, char *pfile2) -{ - int ret; - char *pcmd; - int slen; - -/* malloc space for the system command: two filenames, plus a command, - spaces, and the terminating null */ - slen = strlen(pfile1) + strlen(pfile2) + 8; - pcmd = (char *) malloc(slen); - ret = snprintf(pcmd, slen, "cp %s %s",pfile1,pfile2); - ret = system(pcmd); - ret = snprintf(pcmd, slen, "touch %s",pfile2); - ret = system(pcmd); - free(pcmd); -} - -int nextchar(FILE *file, struct data *data) - { - while (data->linestart) { - data->linestart = FALSE ; - for (data->p = linedir ; *data->p; data->p++) - if ((data->c = getc(file)) != (int) *data->p) break ; - /* Found a line directive, skip remainder of line */ - if (! *data->p) { - data->c = getc(file) ; - while (data->c != '\n' && data->c != EOF) - data->c = getc(file) ; - data->linestart = TRUE ; - continue ; - } - /* Check for leading blanks */ - else if (data->p == linedir) { - while (data->c == ' ' || data->c == '\t') data->c = getc(file) ; - if (data->c == '\n') { - data->linestart = TRUE ; - continue ; - } - return(data->c) ; - } - /* Line began with a prefix of #line */ - data->q = linedir ; - } - - if (data->q < data->p) return(*data->q++) ; - else if (data->q++ != data->p) data->c = getc(file) ; - if (data->c == '\n') data->linestart = TRUE ; - return(data->c) ; - } - diff --git a/cde/programs/dthelp/parser/pass1/util/initct.c b/cde/programs/dthelp/parser/pass1/util/initct.c deleted file mode 100644 index 237bdea84..000000000 --- a/cde/programs/dthelp/parser/pass1/util/initct.c +++ /dev/null @@ -1,45 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: initct.c /main/3 1995/11/08 10:32:53 rswiston $ */ -/* Copyright (c) 1987, 1988 Hewlett-Packard Co. */ -/* M_initctype initializes the array used to indicate which ASCII - characters can appear within SGML names */ - -#include "basic.h" -#include "common.h" -extern char m_chartype[M_CHARSETLEN] ; - -void m_initctype(void) - { - int i ; - -/* ****************************** NOTE: ********************************** - If the set of name characters is ever modified, make appropriate changes - in ELTDEF's scanner for testing for valid C identifiers as parameter - names */ - for (i = 0 ; i < M_CHARSETLEN ; i++) m_chartype[i] = M_NONNAME ; - for (i = 'A' ; i <= 'Z' ; i++) m_chartype[i] = M_NMSTART ; - for (i = 'a' ; i <= 'z' ; i++) m_chartype[i] = M_NMSTART ; - for (i = '0' ; i <= '9' ; i++) m_chartype[i] = M_DIGIT ; - m_chartype['.'] = m_chartype['-'] = M_NAMECHAR ; - } diff --git a/cde/programs/dthelp/parser/pass1/util/strstr.c b/cde/programs/dthelp/parser/pass1/util/strstr.c deleted file mode 100644 index 181211869..000000000 --- a/cde/programs/dthelp/parser/pass1/util/strstr.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: strstr.c /main/3 1995/11/08 10:36:55 rswiston $ */ -char *strstr ( s1, s2 ) -char *s1, *s2 ; { - - int x, y ; - - y = strlen ( s2 ) ; - x = strlen ( s1 ) - y ; - - if ( x < 0 ) return ( ( char * ) 0L ) ; - do { - if ( strncmp ( s1 + x, s2, y ) == 0 ) return ( s1 + x ) ; - } - while ( --x >= 0 ) ; - - return ( ( char * ) 0L ) ; - } - diff --git a/cde/programs/dthelp/parser/pass2/build/proto.h b/cde/programs/dthelp/parser/pass2/build/proto.h index 152e69828..4f9a6d30f 100644 --- a/cde/programs/dthelp/parser/pass2/build/proto.h +++ b/cde/programs/dthelp/parser/pass2/build/proto.h @@ -128,8 +128,6 @@ int gettoken(int *c, int context); TREE *gettreenode(void); -void m_initctype(void); - void initialize(void); LOGICAL litproc(int delim); diff --git a/cde/programs/dthelp/parser/pass2/eltdef/proto.h b/cde/programs/dthelp/parser/pass2/eltdef/proto.h index fb74b475a..2540a85dd 100644 --- a/cde/programs/dthelp/parser/pass2/eltdef/proto.h +++ b/cde/programs/dthelp/parser/pass2/eltdef/proto.h @@ -90,8 +90,6 @@ void getname(int first); int gettoken(int *c, int context); -void m_initctype(void); - void initialize(void); LOGICAL m_letter(M_WCHAR c); diff --git a/cde/programs/dthelp/parser/pass2/parser/addinput.c b/cde/programs/dthelp/parser/pass2/parser/addinput.c deleted file mode 100644 index f2c4d4029..000000000 --- a/cde/programs/dthelp/parser/pass2/parser/addinput.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: addinput.c /main/3 1995/11/08 10:48:50 rswiston $ */ -/* Obsolete */ diff --git a/cde/programs/dthelp/parser/pass2/parser/delfree.c b/cde/programs/dthelp/parser/pass2/parser/delfree.c deleted file mode 100644 index fd9e1ad5b..000000000 --- a/cde/programs/dthelp/parser/pass2/parser/delfree.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: delfree.c /main/3 1995/11/08 10:50:16 rswiston $ */ -/* Copyright (c) 1988 Hewlett-Packard Co. */ - -/* Versions of m_free and m_malloc for debugging. */ - -/**/ -#include -#include -#include "basic.h" -#include "trie.h" -#include "dtd.h" -#include "parser.h" - -m_free(block, msg) - char *block ; - char *msg ; - { - free(block) ; - fprintf(m_outfile, "%5u:%5u- Freed %s\n", - (unsigned int) ((unsigned long) block >> 16), - (unsigned int) block, msg) ; - } - -char *m_mallocx(size, msg) - int size ; - char *msg ; - { - char *p ; - - if (! size) return(NULL) ; - p = malloc(size) ; - if (! p) { - m_err1("Unable to allocate space for %s", msg) ; - exit(TRUE) ; - } - fprintf(m_outfile, "%5u:%5u- Allocated %s\n", - (unsigned int) ((unsigned long) p >> 16), (unsigned int) p, msg) ; - return(p) ; - } diff --git a/cde/programs/dthelp/parser/pass2/parser/dmpline.c b/cde/programs/dthelp/parser/pass2/parser/dmpline.c deleted file mode 100644 index 677accaf8..000000000 --- a/cde/programs/dthelp/parser/pass2/parser/dmpline.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: dmpline.c /main/3 1995/11/08 10:50:31 rswiston $ */ -/* -Copyright 1988, 1989 Hewlett-Packard Co. -*/ - -#include "userinc.h" -#include "globdec.h" - -/* Write input file and line number for an error message */ -void m_dumpline(file, line) -M_WCHAR *file ; -int line ; -{ -char buffer[10] ; - -m_errline("Line ") ; -sprintf(buffer, "%d", line) ; -m_errline(buffer) ; -if (file) - { - char mb_file; - - m_errline(" of File ") ; - mb_file = MakeMByteString(file); - m_errline(mb_file) ; - m_free(mb_file,"multi-byte string"); - } -} diff --git a/cde/programs/dthelp/parser/pass2/parser/eprefix.c b/cde/programs/dthelp/parser/pass2/parser/eprefix.c deleted file mode 100644 index 7383b2c46..000000000 --- a/cde/programs/dthelp/parser/pass2/parser/eprefix.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: eprefix.c /main/3 1995/11/08 10:51:14 rswiston $ */ -/* -Copyright 1988, 1989 Hewlett-Packard Co. -*/ - -#include "userinc.h" -#include "globdec.h" - -/* Write error message prefix */ -void m_eprefix(void) - { - m_errline("\n*****\n") ; - } - diff --git a/cde/programs/dthelp/parser/pass2/parser/errline.c b/cde/programs/dthelp/parser/pass2/parser/errline.c deleted file mode 100644 index ba548debf..000000000 --- a/cde/programs/dthelp/parser/pass2/parser/errline.c +++ /dev/null @@ -1,42 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: errline.c /main/3 1995/11/08 10:51:28 rswiston $ */ -/* -Copyright 1988, 1989 Hewlett-Packard Co. -*/ - -#include "userinc.h" -#include "globdec.h" - -/* Process error message text */ -void m_errline(p) -M_WCHAR *p ; -{ -char mb_p; - -mb_p = MakeMByteString(p); -fputs(mb_p, m_errfile) ; -fputs(mb_p, stderr) ; -m_free(mb_p,"multi-byte string"); -} - diff --git a/cde/programs/dthelp/parser/pass2/parser/esuffix.c b/cde/programs/dthelp/parser/pass2/parser/esuffix.c deleted file mode 100644 index 9b71a516e..000000000 --- a/cde/programs/dthelp/parser/pass2/parser/esuffix.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: esuffix.c /main/3 1995/11/08 10:52:01 rswiston $ */ -/* -Copyright 1988, 1989 Hewlett-Packard Co. -*/ - -#include "userinc.h" -#include "globdec.h" - -/* Write error message suffix */ -void m_esuffix(void) - { - m_errline("\n") ; - m_dumpline(m_thisfile(), m_thisline()) ; - m_errline(":\n") ; - m_lastchars() ; - if (++m_errcnt == m_errlim) { - m_error("Too many errors, processing stopped") ; - m_exit(TRUE) ; - } - } - diff --git a/cde/programs/dthelp/parser/pass2/parser/findpar.c b/cde/programs/dthelp/parser/pass2/parser/findpar.c deleted file mode 100644 index 59dd954d0..000000000 --- a/cde/programs/dthelp/parser/pass2/parser/findpar.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: findpar.c /main/3 1995/11/08 10:52:30 rswiston $ */ -/* - Copyright 1989 Hewlett-Packard Co. -*/ - -#include -#include "basic.h" -#include "trie.h" -#include "dtdext.h" -#include "parser.h" - -/* Function callable by interface designers. Returns index in parameter - list of a specified parameter for an element (i.e., 1 for first parameter - specified in the DTD, 2 for second, etc.). First parameter, elt, is - the name of the element. Second parameter is the name of the parameter - or NULL. Third parameter is used only if second parameter is NULL. In - the latter case, function returns first keyword parameter, if any, for - which the specified value is a legal value and otherwise first - Returns 0 if elt is not a valid element name, if param is specified - but is not a valid parameter name, or if param is NULL and value is - not a valid value of any of elt's parameters. */ -int m_findpar( const char *elt , const char *param , const M_WCHAR *value ) -{ -M_ELEMENT eltid ; -int par ; -int i ; -M_WCHAR *wc_elt; - -wc_elt = MakeWideCharString(elt); -if (! (eltid = m_packedlook(m_entree, wc_elt))) - { - m_free(wc_elt,"wide character string"); - return(M_NULLVAL) ; - } -m_free(wc_elt,"wide character string"); - -/* A parameter name specified */ -if (param) - { - for (par = m_element[eltid - 1].parptr, i = 1 ; - - i <= m_element[eltid - 1].parcount ; - par++, i++) - if (!m_wcmbupstrcmp(&m_pname[m_parameter[par - 1].paramname], param)) - return(i) ; - return(M_NULLVAL) ; - } - -/* No parameter name specified */ - -/* First check is it a valid keyword? */ -for (par = m_element[eltid - 1].parptr, i = 1 ; - i <= m_element[eltid - 1].parcount ; - par++, i++) -if (m_parameter[par - 1].type == M_KEYWORD) -if (m_partype(par, value)) return(i) ; - -/* It wasn't a keyword. Check for valid value for some other parameter.*/ -for (par = m_element[eltid - 1].parptr, i = 1 ; -i <= m_element[eltid - 1].parcount ; -par++, i++) - { - if (m_parameter[par - 1].type == M_KEYWORD) continue ; - if (m_partype(par, value)) return(i) ; - } - -/* Not a valid value for any parameter */ -return(M_NULLVAL) ; -} - diff --git a/cde/programs/dthelp/parser/pass2/parser/getc.c b/cde/programs/dthelp/parser/pass2/parser/getc.c deleted file mode 100644 index 940bfd973..000000000 --- a/cde/programs/dthelp/parser/pass2/parser/getc.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: getc.c /main/3 1995/11/08 10:52:46 rswiston $ */ -/* Copyright 1988, 1989 Hewlett-Packard Co. */ - -/* Default get-char procedure */ - -#include "userinc.h" -#include "globdec.h" - -int m_getc(m_ptr) - void *m_ptr ; - { - return(getc((FILE*) m_ptr)) ; - } diff --git a/cde/programs/dthelp/parser/pass2/parser/ifdata.c b/cde/programs/dthelp/parser/pass2/parser/ifdata.c deleted file mode 100644 index 01081a214..000000000 --- a/cde/programs/dthelp/parser/pass2/parser/ifdata.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: ifdata.c /main/3 1995/11/08 10:53:18 rswiston $ */ -/* Copyright 1988, 1989 Hewlett-Packard Co. */ - -/* Ifdata.c contains functions used by the interface to access the - single item of interface-determined data stored on the parse stack. */ - -#include -#include "basic.h" -#include "trie.h" -#include "dtdext.h" -#include "parser.h" - -/* Retrieve the interface data stored with the current element's nth parent */ -void *m_getdata(n, flag) - int n ; - LOGICAL *flag ; - { - M_PARSE *stackptr ; - - for (stackptr = m_stacktop ; - stackptr->oldtop && n >= 0 ; - stackptr = stackptr->oldtop, n--) { - if (! n) { - *flag = TRUE ; - return(stackptr->ifdata) ; - } - } - *flag = FALSE ; - return(NULL) ; - } - -/* Store interface data for the current element's nth parent */ -LOGICAL m_putdata(data, n) - void *data ; - int n ; - { - M_PARSE *stackptr ; - - for (stackptr = m_stacktop ; - stackptr->oldtop && n >= 0 ; - stackptr = stackptr->oldtop, n--) { - if (! n) { - stackptr->ifdata = data ; - return(TRUE) ; - } - } - return(FALSE) ; - } - diff --git a/cde/programs/dthelp/parser/pass2/parser/openent.c b/cde/programs/dthelp/parser/pass2/parser/openent.c deleted file mode 100644 index 1149c754f..000000000 --- a/cde/programs/dthelp/parser/pass2/parser/openent.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: openent.c /main/3 1995/11/08 10:54:37 rswiston $ */ -/* Copyright 1988, 1989 Hewlett-Packard Co. */ - -/* Default open SYSTEM entity procedure */ - -#include "userinc.h" -#include "globdec.h" - -void *m_openent(entcontent) - M_WCHAR *entcontent ; - { - return((void *) fopen(entcontent, "r")) ; - } - diff --git a/cde/programs/dthelp/parser/pass2/parser/openfrst.c b/cde/programs/dthelp/parser/pass2/parser/openfrst.c deleted file mode 100644 index 3bd2331bd..000000000 --- a/cde/programs/dthelp/parser/pass2/parser/openfrst.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: openfrst.c /main/3 1995/11/08 10:54:51 rswiston $ */ -/* Copyright 1988, 1989 Hewlett-Packard Co. */ - -/* Default open SYSTEM entity procedure */ - -#include "userinc.h" -#include "globdec.h" - -void *m_openfirst(void) - { - return((void *) stdin) ; - } - - diff --git a/cde/programs/dthelp/parser/pass2/parser/parcount.c b/cde/programs/dthelp/parser/pass2/parser/parcount.c deleted file mode 100644 index d976b22c3..000000000 --- a/cde/programs/dthelp/parser/pass2/parser/parcount.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: parcount.c /main/3 1995/11/08 10:55:34 rswiston $ */ -/* - Copyright 1989 Hewlett-Packard Co. -*/ - -#include -#include "basic.h" -#include "trie.h" -#include "dtdext.h" -#include "parser.h" - -/* Function callable by interface designers. Returns number of parameters - of specified element (-1 indicates error). */ -int m_parcount(elt) - M_WCHAR *elt ; - { - M_ELEMENT eltid ; - - if (! (eltid = m_packedlook(m_entree, elt))) return(-1) ; - return(m_element[eltid - 1].parcount) ; - } - diff --git a/cde/programs/dthelp/parser/pass2/parser/pardef.c b/cde/programs/dthelp/parser/pass2/parser/pardef.c deleted file mode 100644 index be8004730..000000000 --- a/cde/programs/dthelp/parser/pass2/parser/pardef.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: pardef.c /main/3 1995/11/08 10:55:48 rswiston $ */ -/* - Copyright 1989 Hewlett-Packard Co. -*/ - -#include -#include "basic.h" -#include "trie.h" -#include "dtdext.h" -#include "parser.h" - -/* Function callable by interface designers. Returns pointer to default - value of a parameter of an element. Type is set to indicate type of - default. Error indication is type is 0 and function returns NULL. */ -M_WCHAR *m_pardefault(elt, param, type) - M_WCHAR *elt ; - M_WCHAR *param ; - unsigned char *type ; - { - M_ELEMENT eltid ; - int par ; - int i ; - - *type = M_NULLVAL ; - if (! (eltid = m_packedlook(m_entree, elt))) return(NULL) ; - - for (par = m_element[eltid - 1].parptr, i = 0 ; - i < m_element[eltid - 1].parcount ; - par++, i++) - if (! m_wcupstrcmp(&m_pname[m_parameter[par - 1].paramname], param)) { - *type = (unsigned char) m_parameter[par - 1].deftype ; - if (*type == M_REQUIRED || *type == M_NULLDEF) return(NULL) ; - return(m_parameter[par -1].defval) ; - } - - /* Can't find the parameter */ - return(NULL) ; - } - diff --git a/cde/programs/dthelp/parser/pass2/parser/parname.c b/cde/programs/dthelp/parser/pass2/parser/parname.c deleted file mode 100644 index ba7906f56..000000000 --- a/cde/programs/dthelp/parser/pass2/parser/parname.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: parname.c /main/3 1995/11/08 10:56:15 rswiston $ */ -/* - Copyright 1989 Hewlett-Packard Co. -*/ - -#include -#include "basic.h" -#include "trie.h" -#include "dtdext.h" -#include "parser.h" - -/* Function callable by interface designers. Returns name of nth parameter - of specified element (NULL indicates error). */ -M_WCHAR *m_parname(elt, n) - M_WCHAR *elt ; - int n ; - { - M_ELEMENT eltid ; - - if (! (eltid = m_packedlook(m_entree, elt))) return(NULL) ; - if (n < 1 || n > m_element[eltid - 1].parcount) return(NULL) ; - return(&m_pname[m_parameter[(n - 1) + m_element[eltid - 1].parptr - 1]. - paramname]) ; - } - -M_WCHAR *m_mbparname(elt, n) -char *elt ; -int n ; -{ -M_WCHAR *wc_elt, *retval; - -wc_elt = MakeWideCharString(elt); -retval = m_parname(wc_elt, n); -m_free(wc_elt,"wide character string"); -} - diff --git a/cde/programs/dthelp/parser/pass2/parser/parvalok.c b/cde/programs/dthelp/parser/pass2/parser/parvalok.c deleted file mode 100644 index 6789594c0..000000000 --- a/cde/programs/dthelp/parser/pass2/parser/parvalok.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: parvalok.c /main/3 1995/11/08 10:57:12 rswiston $ */ -/* - Copyright 1989 Hewlett-Packard Co. -*/ - -#include -#include "basic.h" -#include "trie.h" -#include "dtdext.h" -#include "parser.h" - -/* Function callable by interface designers. Returns TRUE if specified value - is a legal value for the indicated parameter of the given element, - FALSE otherwise. */ -LOGICAL m_parvalok( M_WCHAR *elt , M_WCHAR *param , const M_WCHAR *value ) - { - M_ELEMENT eltid ; - int par ; - int i ; - - if (! (eltid = m_packedlook(m_entree, elt))) return(FALSE) ; - for (par = m_element[eltid - 1].parptr, i = 1 ; - i <= m_element[eltid - 1].parcount ; - par++, i++) - if (! m_wcupstrcmp(&m_pname[m_parameter[par - 1].paramname], param)) - if (m_partype(par, value)) return(TRUE) ; - else return(FALSE) ; - - /* No such parameter */ - return(FALSE) ; - } - diff --git a/cde/programs/dthelp/parser/pass2/parser/procscmp.c b/cde/programs/dthelp/parser/pass2/parser/procscmp.c deleted file mode 100644 index e974f3d32..000000000 --- a/cde/programs/dthelp/parser/pass2/parser/procscmp.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: procscmp.c /main/3 1995/11/08 10:57:41 rswiston $ */ -/* - Copyright 1986 Tandem Computers Incorporated. -This product and information is proprietary of Tandem Computers Incorporated. - Copyright 1986, 1987, 1988, 1989 Hewlett-Packard Co. -*/ - -/* Procscmp.c prefixes the interface's procs.c file with appropriate - declarations so it can be compiled. */ - -#include "userinc.h" -#include "globdec.h" - -/* Include any procedures specified by the interface designer */ -#include "procs.c" - - diff --git a/cde/programs/dthelp/parser/pass2/parser/proto.h b/cde/programs/dthelp/parser/pass2/parser/proto.h index f907af1ce..2e0f0371b 100644 --- a/cde/programs/dthelp/parser/pass2/parser/proto.h +++ b/cde/programs/dthelp/parser/pass2/parser/proto.h @@ -153,8 +153,6 @@ void m_holdproc(void); void m_inctest(int *count, int limit, char *message); -void m_initctype(void); - void m_initialize(void); void m_lastchars(void); diff --git a/cde/programs/dthelp/parser/pass2/parser/setopt.c b/cde/programs/dthelp/parser/pass2/parser/setopt.c deleted file mode 100644 index 6d161306a..000000000 --- a/cde/programs/dthelp/parser/pass2/parser/setopt.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: setopt.c /main/3 1995/11/08 10:58:30 rswiston $ */ -/* -Copyright 1988, 1989 Hewlett-Packard Co. -*/ - -#include "userinc.h" -#include "globdec.h" - - -/* Set program options */ -void m_setoptions(void) - { - if (m_argc > 1) m_optstring(m_argv[1]) ; - } diff --git a/cde/programs/dthelp/parser/pass2/parser/signmsg.c b/cde/programs/dthelp/parser/pass2/parser/signmsg.c deleted file mode 100644 index 18ea9abe5..000000000 --- a/cde/programs/dthelp/parser/pass2/parser/signmsg.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: signmsg.c /main/3 1995/11/08 10:58:59 rswiston $ */ -/* -Copyright 1988, 1989 Hewlett-Packard Co. -*/ - -#include "userinc.h" -#include "globdec.h" - -/* Process signon message text */ -void m_signmsg(p) -M_WCHAR *p ; -{ -char mb_p; - -mb_p = MakeMByteString(p); -m_errline(mb_p) ; -m_free(mb_p,"multi-byte string"); -} diff --git a/cde/programs/dthelp/parser/pass2/parser/startdoc.c b/cde/programs/dthelp/parser/pass2/parser/startdoc.c deleted file mode 100644 index c4e35ab17..000000000 --- a/cde/programs/dthelp/parser/pass2/parser/startdoc.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: startdoc.c /main/3 1995/11/08 10:59:27 rswiston $ */ -/* -Copyright 1989 Hewlett-Packard Co. -*/ - -#include "userinc.h" -#include "globdec.h" - -/* Default function called at start of document instance. Allows interface - control after all entity declarations have been processed. Not needed - in valid documents (when it is called just prior to global start-code), - but may be useful in some applications nevertheless. */ -void m_startdoc(void) - { - } - - diff --git a/cde/programs/dthelp/parser/pass2/parser/trace.c b/cde/programs/dthelp/parser/pass2/parser/trace.c deleted file mode 100644 index 87e5b02e0..000000000 --- a/cde/programs/dthelp/parser/pass2/parser/trace.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: trace.c /main/3 1995/11/08 11:00:43 rswiston $ */ -/* -Copyright 1988, 1989 Hewlett-Packard Co. -*/ - -#include "userinc.h" -#include "globdec.h" - -/* Write debugging trace information */ -void m_wctrace(p) -M_WCHAR *p ; -{ -char *mb_p; - -mb_p = MakeMByteString(p); -fputs(mb_p, m_outfile) ; -m_free(mb_p,"multi-byte string"); -} - -void m_trace(p) -char *p ; -{ -fputs(p, m_outfile); -} diff --git a/cde/programs/dthelp/parser/pass2/util/emptyfil.c b/cde/programs/dthelp/parser/pass2/util/emptyfil.c deleted file mode 100644 index a373d097f..000000000 --- a/cde/programs/dthelp/parser/pass2/util/emptyfil.c +++ /dev/null @@ -1,42 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: emptyfil.c /main/3 1995/11/08 11:04:00 rswiston $ */ -/* Copyright (c) 1988, 1989 Hewlett-Packard Co. */ -/* Creates a file with nothing in it */ -#include -#include "basic.h" - -void main(int argc, char **argv); - -void main(argc, argv) - int argc ; - char **argv ; - { - if (argc != 2) { - fprintf(stderr, "Usage: emptyfil filename\n") ; - exit(1) ; - } - if (! fopen(argv[1], "w")) - fprintf(stderr, "Unable to open %s\n", argv[1]) ; - return 0; - } diff --git a/cde/programs/dthelp/parser/pass2/util/fclndir.c b/cde/programs/dthelp/parser/pass2/util/fclndir.c deleted file mode 100644 index 1c1eb501c..000000000 --- a/cde/programs/dthelp/parser/pass2/util/fclndir.c +++ /dev/null @@ -1,160 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: fclndir.c /main/3 1995/11/08 11:05:25 rswiston $ */ -/* Copyright (c) 1987-1990 Hewlett-Packard Co. - -Fclndir.c compares two files, ignoring C line directives that appear -within them as well as blank lines, and leading white space. It exits -with an error code of 0 if the files are the same, 1 if they differ, and -2 if the program was called incorrectly. -*/ - -/* Feb. 11, 1991, CED: Added v2 fixes to v3 version of fclndir. - Thus, both versions now copy the source file to the target if - the files differ. -*/ - -#include -#include -#include -#include "basic.h" -#define SAME 0 -/* different defined to be 0 as of 12-1-89, because fclndir now does -the file-copy if the files are different, or if the second file -doesn't exist. (different used to be 1.) --ced */ -#define DIFFERENT 0 -#define ERROR 2 - -struct data { - int c ; - LOGICAL linestart ; - char *p ; - char *q ; - } data1, data2 ; - -char linedir[] = "#line" ; -char *p = linedir, *q = linedir + 1 ; - -void main(int argc, char **argv); - -void copyfile(char *pfile1, char *pfile2); - -int nextchar(FILE *file, struct data *data); - -void main(int argc, char **argv) - { - FILE *one, *two ; - int c1, c2 ; - - if (argc != 3) { - fputs("Usage: fclndir file1 (=source) file2 (=target)\n", stderr) ; - exit(ERROR) ; - } - if (! (one = fopen(argv[1], "r"))) { - fprintf(stderr, "ERROR: source file unavailable: %s\n", argv[1]) ; - exit(ERROR) ; - } - if (! (two = fopen(argv[2], "r"))) { - fprintf(stderr, "No target file %s; copying source file...\n", argv[2]) ; - /* call to copyfile entered by ced, 12-29-89. */ - copyfile(argv[1],argv[2]); - exit(DIFFERENT) ; - } - data1.linestart = data2.linestart = TRUE ; - data1.p = data2.p = linedir ; - data1.q = data2.q = linedir + 1 ; - c1 = nextchar(one, &data1) ; - c2 = nextchar(two, &data2) ; - while (c1 != EOF && c2 != EOF) { - if (c1 != c2) { - fprintf(stderr, "%s and %s are different; copying source...\n", - argv[1], argv[2]) ; -/* call to copyfile entered by ced, 12-1-89. */ - copyfile(argv[1],argv[2]); - exit(DIFFERENT) ; - } - c1 = nextchar(one, &data1) ; - c2 = nextchar(two, &data2) ; - } - if (c1 != c2) { - fprintf(stderr, "%s and %s are different; copying source...\n", - argv[1], argv[2]) ; -/* call to copyfile entered by ced, 12-1-89. */ - copyfile(argv[1],argv[2]); - exit(DIFFERENT) ; - } - fprintf(stderr, "%s and %s are the same\n", argv[1], argv[2]) ; - exit(SAME) ; - } - -/* copyfile inserted by ced, 12-1-89. */ -void copyfile(char *pfile1, char *pfile2) -{ - int ret; - char *pcmd; - int slen; - -/* malloc space for the system command: two filenames, plus a command, - spaces, and the terminating null */ - slen = strlen(pfile1) + strlen(pfile2) + 8; - pcmd = (char *) malloc(slen); - ret = snprintf(pcmd, slen, "cp %s %s",pfile1,pfile2); - ret = system(pcmd); - ret = snprintf(pcmd, slen, "touch %s",pfile2); - ret = system(pcmd); - free(pcmd); -} - -int nextchar(FILE *file, struct data *data) - { - while (data->linestart) { - data->linestart = FALSE ; - for (data->p = linedir ; *data->p; data->p++) - if ((data->c = getc(file)) != (int) *data->p) break ; - /* Found a line directive, skip remainder of line */ - if (! *data->p) { - data->c = getc(file) ; - while (data->c != '\n' && data->c != EOF) - data->c = getc(file) ; - data->linestart = TRUE ; - continue ; - } - /* Check for leading blanks */ - else if (data->p == linedir) { - while (data->c == ' ' || data->c == '\t') data->c = getc(file) ; - if (data->c == '\n') { - data->linestart = TRUE ; - continue ; - } - return(data->c) ; - } - /* Line began with a prefix of #line */ - data->q = linedir ; - } - - if (data->q < data->p) return(*data->q++) ; - else if (data->q++ != data->p) data->c = getc(file) ; - if (data->c == '\n') data->linestart = TRUE ; - return(data->c) ; - } - diff --git a/cde/programs/dthelp/parser/pass2/util/initct.c b/cde/programs/dthelp/parser/pass2/util/initct.c deleted file mode 100644 index 9be8dde03..000000000 --- a/cde/programs/dthelp/parser/pass2/util/initct.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: initct.c /main/3 1995/11/08 11:05:54 rswiston $ */ -/* Copyright (c) 1987, 1988 Hewlett-Packard Co. */ -/* M_initctype initializes the array used to indicate which ASCII - characters can appear within SGML names */ - -#include "basic.h" -#include "common.h" -extern char m_chartype[M_CHARSETLEN] ; - -void m_initctype(void); - -void m_initctype(void) - { - int i ; - -/* ****************************** NOTE: ********************************** - If the set of name characters is ever modified, make appropriate changes - in ELTDEF's scanner for testing for valid C identifiers as parameter - names */ - for (i = 0 ; i < M_CHARSETLEN ; i++) m_chartype[i] = M_NONNAME ; - for (i = 'A' ; i <= 'Z' ; i++) m_chartype[i] = M_NMSTART ; - for (i = 'a' ; i <= 'z' ; i++) m_chartype[i] = M_NMSTART ; - for (i = '0' ; i <= '9' ; i++) m_chartype[i] = M_DIGIT ; - m_chartype['.'] = m_chartype['-'] = M_NAMECHAR ; - } diff --git a/cde/programs/dthelp/parser/pass2/util/strstr.c b/cde/programs/dthelp/parser/pass2/util/strstr.c deleted file mode 100644 index 14b2ce2de..000000000 --- a/cde/programs/dthelp/parser/pass2/util/strstr.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: strstr.c /main/3 1995/11/08 11:07:59 rswiston $ */ -char *strstr ( s1, s2 ) -char *s1, *s2 ; { - - int x, y ; - - y = strlen ( s2 ) ; - x = strlen ( s1 ) - y ; - - if ( x < 0 ) return ( ( char * ) 0L ) ; - do { - if ( strncmp ( s1 + x, s2, y ) == 0 ) return ( s1 + x ) ; - } - while ( --x >= 0 ) ; - - return ( ( char * ) 0L ) ; - } - From 9a9d586e87064bf5b2ddd7aa8c4ea65c03776047 Mon Sep 17 00:00:00 2001 From: Chase Date: Sat, 30 Jul 2022 20:33:24 -0500 Subject: [PATCH 07/75] configure: detect libdl --- cde/configure.ac | 4 ++ cde/lib/DtTerm/Makefile.am | 2 +- cde/lib/tt/bin/shell/Makefile.am | 2 +- cde/lib/tt/bin/tt_type_comp/Makefile.am | 2 +- cde/lib/tt/bin/ttauth/Makefile.am | 2 +- cde/lib/tt/bin/ttdbserverd/Makefile.am | 2 +- cde/lib/tt/bin/ttsession/Makefile.am | 2 +- cde/lib/tt/bin/tttar/Makefile.am | 2 +- cde/lib/tt/bin/tttrace/Makefile.am | 2 +- cde/lib/tt/demo/CoEd/CoEd/IMakeFile | 47 ------------------- cde/lib/tt/lib/Makefile.am | 2 +- cde/programs/dsdm/Makefile.am | 4 -- cde/programs/dtaction/Makefile.am | 4 -- .../dtappbuilder/src/libABobj/Makefile.am | 2 +- cde/programs/dtcalc/Makefile.am | 2 +- cde/programs/dtcm/server/Makefile.am | 2 +- cde/programs/dtcreate/Makefile.am | 4 -- cde/programs/dtdbcache/Makefile.am | 2 +- cde/programs/dtdspmsg/Makefile.am | 2 +- cde/programs/dthello/Makefile.am | 2 +- cde/programs/dthelp/dthelpprint/Makefile.am | 2 +- cde/programs/dticon/Makefile.am | 4 -- cde/programs/dtksh/Makefile.am | 6 +-- cde/programs/dtlogin/Makefile.am | 6 +-- cde/programs/dtpdm/Makefile.am | 2 +- cde/programs/dtpdmd/Makefile.am | 4 -- cde/programs/dtprintinfo/Makefile.am | 4 -- cde/programs/dtscreen/Makefile.am | 2 +- cde/programs/dtsearchpath/dtappg/Makefile.am | 2 +- .../dtsearchpath/libCliSrv/Makefile.am | 2 +- cde/programs/dtsession/Makefile.am | 4 +- cde/programs/dtspcd/Makefile.am | 2 +- cde/programs/dtudcexch/Makefile.am | 2 +- cde/programs/util/dttypes/Makefile.am | 2 +- 34 files changed, 33 insertions(+), 104 deletions(-) delete mode 100644 cde/lib/tt/demo/CoEd/CoEd/IMakeFile diff --git a/cde/configure.ac b/cde/configure.ac index d2551a566..88f662625 100644 --- a/cde/configure.ac +++ b/cde/configure.ac @@ -506,6 +506,10 @@ AC_CHECK_LIB(Xdmcp, XdmcpFlush, [XDMCPLIB="-lXdmcp"], [XDMCPLIB=""], [${EXTRA_INCS} ${EXTRA_LIBS}]) AC_SUBST(XDMCPLIB) +AC_SEARCH_LIBS(dlopen, [dl dld], [], [ + AC_MSG_ERROR([dlopen not found, your system probably doesn't obey posix] + )]) + dnl iconv AM_ICONV diff --git a/cde/lib/DtTerm/Makefile.am b/cde/lib/DtTerm/Makefile.am index 7b96f2127..36d71c183 100644 --- a/cde/lib/DtTerm/Makefile.am +++ b/cde/lib/DtTerm/Makefile.am @@ -18,7 +18,7 @@ libDtTerm_la_LIBADD += -lutil endif if SOLARIS -libDtTerm_la_LIBADD += -ldl -lgen +libDtTerm_la_LIBADD += -lgen endif if HAS_UTEMPTER_LIBRARY diff --git a/cde/lib/tt/bin/shell/Makefile.am b/cde/lib/tt/bin/shell/Makefile.am index 04b2403ca..0455255be 100644 --- a/cde/lib/tt/bin/shell/Makefile.am +++ b/cde/lib/tt/bin/shell/Makefile.am @@ -10,7 +10,7 @@ AM_CXXFLAGS = -I../../lib $(TT_VERSION_DEFINE) LDADD = $(LIBTT) $(TIRPCLIB) $(XTOOLLIB) if SOLARIS -LDADD += -ldl -lintl -lsocket -lnsl +LDADD += -lintl -lsocket -lnsl endif ttmv_SOURCES = ttmv.C mover.C diff --git a/cde/lib/tt/bin/tt_type_comp/Makefile.am b/cde/lib/tt/bin/tt_type_comp/Makefile.am index c9e3dbf7e..0c04b7908 100644 --- a/cde/lib/tt/bin/tt_type_comp/Makefile.am +++ b/cde/lib/tt/bin/tt_type_comp/Makefile.am @@ -21,7 +21,7 @@ tt_type_comp_SOURCES = mp_type_comp.C mp_types_table.C \ tt_type_comp_LDADD = ../../slib/libstt.a $(LIBTT) $(TIRPCLIB) $(XTOOLLIB) if SOLARIS -tt_type_comp_LDADD += $(XTOOLLIB) -ldl -lintl -lsocket -lnsl +tt_type_comp_LDADD += $(XTOOLLIB) -lintl -lsocket -lnsl endif frozen.mp_types_lex.o: frozen.mp_types_gram.h diff --git a/cde/lib/tt/bin/ttauth/Makefile.am b/cde/lib/tt/bin/ttauth/Makefile.am index d17f8d302..a814ca899 100644 --- a/cde/lib/tt/bin/ttauth/Makefile.am +++ b/cde/lib/tt/bin/ttauth/Makefile.am @@ -11,7 +11,7 @@ ttauth_LDADD += $(TIRPCLIB) $(XTOOLLIB) endif if SOLARIS -ttauth_LDADD += $(XTOOLLIB) -ldl -lintl -lsocket -lnsl +ttauth_LDADD += $(XTOOLLIB) -lintl -lsocket -lnsl endif if BSD diff --git a/cde/lib/tt/bin/ttdbserverd/Makefile.am b/cde/lib/tt/bin/ttdbserverd/Makefile.am index 976a2a74e..1c8a3f098 100644 --- a/cde/lib/tt/bin/ttdbserverd/Makefile.am +++ b/cde/lib/tt/bin/ttdbserverd/Makefile.am @@ -16,7 +16,7 @@ rpc_ttdbserver_LDADD += $(TIRPCLIB) $(XTOOLLIB) endif if SOLARIS -rpc_ttdbserver_LDADD += $(XTOOLLIB) -ldl -lintl -lsocket -lnsl +rpc_ttdbserver_LDADD += $(XTOOLLIB) -lintl -lsocket -lnsl endif if BSD diff --git a/cde/lib/tt/bin/ttsession/Makefile.am b/cde/lib/tt/bin/ttsession/Makefile.am index 398d27b30..226a9468c 100644 --- a/cde/lib/tt/bin/ttsession/Makefile.am +++ b/cde/lib/tt/bin/ttsession/Makefile.am @@ -14,7 +14,7 @@ ttsession_LDADD += $(TIRPCLIB) $(XTOOLLIB) endif if SOLARIS -ttsession_LDADD += $(XTOOLLIB) -ldl -lintl -lsocket -lnsl +ttsession_LDADD += $(XTOOLLIB) -lintl -lsocket -lnsl endif if BSD diff --git a/cde/lib/tt/bin/tttar/Makefile.am b/cde/lib/tt/bin/tttar/Makefile.am index 510810986..e2349d881 100644 --- a/cde/lib/tt/bin/tttar/Makefile.am +++ b/cde/lib/tt/bin/tttar/Makefile.am @@ -11,7 +11,7 @@ tttar_LDADD = ../../slib/libstt.a ../../mini_isam/libisam.a \ $(LIBTT) $(TIRPCLIB) $(XTOOLLIB) if SOLARIS -tttar_LDADD += -ldl -lintl -lsocket -lnsl +tttar_LDADD += -lintl -lsocket -lnsl endif tttar_SOURCES = tttar.C \ diff --git a/cde/lib/tt/bin/tttrace/Makefile.am b/cde/lib/tt/bin/tttrace/Makefile.am index c7ae9a4c3..9759d3ddf 100644 --- a/cde/lib/tt/bin/tttrace/Makefile.am +++ b/cde/lib/tt/bin/tttrace/Makefile.am @@ -7,7 +7,7 @@ tttrace_CXXFLAGS = -I../../lib tttrace_LDADD = $(LIBTT) $(TIRPCLIB) $(XTOOLLIB) if SOLARIS -tttrace_LDADD += -ldl -lintl -lsocket -lnsl +tttrace_LDADD += -lintl -lsocket -lnsl endif tttrace_SOURCES = tttrace.C tttrace_objs.C diff --git a/cde/lib/tt/demo/CoEd/CoEd/IMakeFile b/cde/lib/tt/demo/CoEd/CoEd/IMakeFile deleted file mode 100644 index 3674f3702..000000000 --- a/cde/lib/tt/demo/CoEd/CoEd/IMakeFile +++ /dev/null @@ -1,47 +0,0 @@ -# %% (c) Copyright 1993, 1994 Hewlett-Packard Company -# %% (c) Copyright 1993, 1994 International Business Machines Corp. -# %% (c) Copyright 1993, 1994 Sun Microsystems, Inc. -# %% (c) Copyright 1993, 1994 Novell, Inc. -# %% $XConsortium: IMakeFile /main/3 1995/10/20 17:04:55 rswiston $ -#ifdef HideFromImake - # - # IMakeFile 1.7 17 Nov 1994 - # - # This preamble turns this imakefile into a shell script which will - # create/update this directory's makefile when invoked as follows: - # % sh IMakeFile [[GNU]MakeFile] - # -IMAKEDIR=../../../imake; export IMAKEDIR -exec make -f $IMAKEDIR/Boot.mk ${1+"$@"} -#endif HideFromImake - -TT_DIR = ../../.. - -include $(TT_DIR)/Make.macros - -.KEEP_STATE: - -default: all - -All:: $(MAKEFILE)s all -all: DynamicDebugProg(CoEd) - -CoEd_SOURCES.C = CoEdTextBuffer.C CoEditor.C CoEd.C - -RUN_PATH = -R /tt/proto/lib:/usr/dt/lib:$(OPENWINHOME)/lib:/opt/SUNWspro/lib - -ProgramDynamicOptimized(CoEd) -ProgramDynamicDebug(CoEd) -SourceHygiene(CoEd) - -SaberProg(CoEd) - -AppendVal(CPPFLAGS,-I../../../proto/include -I/usr/dt/include -I$(OPENWINHOME)/include -I../libCoEd) - -AppendVal(LDFLAGS,-L../../../proto/lib -L/usr/dt/lib -L$(OPENWINHOME)/lib -L../libCoEd/$(OEUVRE)/pdc/O) - -#AppendVal(LDLIBS,-ltt-g -lXm -lXt -lX11 -Bstatic -lCoEd -Bdynamic) -AppendVal(LDLIBS,-ltt -lXm -lXt -lX11 -Bstatic -lCoEd -Bdynamic) -loc_LDLIBS_SunOS4 = -lce -lX -lI18N -ldl -loc_LDLIBS_SunOS5 = -lnsl -lsocket -lintl -lgen -AppendVal(LDLIBS,$(loc_LDLIBS_$(OS))) diff --git a/cde/lib/tt/lib/Makefile.am b/cde/lib/tt/lib/Makefile.am index 895861805..b9e17b595 100644 --- a/cde/lib/tt/lib/Makefile.am +++ b/cde/lib/tt/lib/Makefile.am @@ -18,7 +18,7 @@ libtt_la_LIBADD = api/c/libapi.la api/dnd/libdnd.la db/libdb.la mp/libmp.la \ if SOLARIS # This stuff should be figured out by configure -libtt_la_LIBADD += -lnsl -lsocket -lintl -ldl -lc -lw +libtt_la_LIBADD += -lnsl -lsocket -lintl -lc -lw endif if LINUX diff --git a/cde/programs/dsdm/Makefile.am b/cde/programs/dsdm/Makefile.am index 78a3202be..acf6edf9f 100644 --- a/cde/programs/dsdm/Makefile.am +++ b/cde/programs/dsdm/Makefile.am @@ -2,8 +2,4 @@ bin_PROGRAMS = dsdm dsdm_LDADD = $(XTOOLLIB) -if SOLARIS -dsdm_LDADD += -ldl -endif - dsdm_SOURCES = dsdm.c proxy.c diff --git a/cde/programs/dtaction/Makefile.am b/cde/programs/dtaction/Makefile.am index f1370dfc8..6dde85bec 100644 --- a/cde/programs/dtaction/Makefile.am +++ b/cde/programs/dtaction/Makefile.am @@ -6,10 +6,6 @@ dtaction_SOURCES = Main.c dtaction_LDADD = $(DTCLIENTLIBS) $(XTOOLLIB) -if SOLARIS -dtaction_LDADD += -ldl -endif - if LINUX dtaction_LDADD += -lcrypt endif diff --git a/cde/programs/dtappbuilder/src/libABobj/Makefile.am b/cde/programs/dtappbuilder/src/libABobj/Makefile.am index 3bf1128f7..f74e52884 100644 --- a/cde/programs/dtappbuilder/src/libABobj/Makefile.am +++ b/cde/programs/dtappbuilder/src/libABobj/Makefile.am @@ -7,7 +7,7 @@ EXTRA_DEFINES = -D_POSIX_SOURCE=1 EXTRALIBS = -lm if SOLARIS -EXTRALIBS += -ldl -lgen +EXTRALIBS += -lgen endif noinst_LIBRARIES = libABobj.a diff --git a/cde/programs/dtcalc/Makefile.am b/cde/programs/dtcalc/Makefile.am index f86bf3a7b..c9bc32d1a 100644 --- a/cde/programs/dtcalc/Makefile.am +++ b/cde/programs/dtcalc/Makefile.am @@ -7,7 +7,7 @@ dtcalc_CPPFLAGS = -DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" dtcalc_LDADD = $(DTCLIENTLIBS) $(XTOOLLIB) if SOLARIS -dtcalc_LDADD += -lintl -ldl +dtcalc_LDADD += -lintl endif diff --git a/cde/programs/dtcm/server/Makefile.am b/cde/programs/dtcm/server/Makefile.am index 9321ca858..bd49c472c 100644 --- a/cde/programs/dtcm/server/Makefile.am +++ b/cde/programs/dtcm/server/Makefile.am @@ -7,7 +7,7 @@ rpc_cmsd_CFLAGS = -I../../../lib/csa $(DT_INCDIR) $(CSA_INCDIR) rpc_cmsd_LDADD = $(LIBCSA) $(DTCLIENTLIBS) $(TIRPCLIB) $(XTOOLLIB) if SOLARIS -rpc_cmsd_LDADD += -lsocket -lnsl -lintl -lm -ldl +rpc_cmsd_LDADD += -lsocket -lnsl -lintl -lm endif rpc_cmsd_SOURCES = parser.c access.c callback.c cmscalendar.c \ diff --git a/cde/programs/dtcreate/Makefile.am b/cde/programs/dtcreate/Makefile.am index b5b3c5c2a..6df2ba70a 100644 --- a/cde/programs/dtcreate/Makefile.am +++ b/cde/programs/dtcreate/Makefile.am @@ -4,10 +4,6 @@ bin_PROGRAMS = dtcreate dtcreate_LDADD = $(DTCLIENTLIBS) $(XTOOLLIB) -if SOLARIS -dtcreate_LDADD += -ldl -endif - dtcreate_SOURCES = main.c AddFiletype.c Confirmed.c \ CreateActionAppShell.c FileCharacteristics.c OpenFile.c \ UxXt.c ca_aux.c cmncbs.c cmnutils.c cmnrtns.c ErrorDialog.c \ diff --git a/cde/programs/dtdbcache/Makefile.am b/cde/programs/dtdbcache/Makefile.am index 9ab1be7db..61fc146dc 100644 --- a/cde/programs/dtdbcache/Makefile.am +++ b/cde/programs/dtdbcache/Makefile.am @@ -5,7 +5,7 @@ bin_PROGRAMS = dtdbcache dtdbcache_LDADD = $(DTCLIENTLIBS) $(XTOOLLIB) if SOLARIS -dtdbcache_LDADD += -ldl -lw -lgen +dtdbcache_LDADD += -lw -lgen endif dtdbcache_SOURCES = Main.c diff --git a/cde/programs/dtdspmsg/Makefile.am b/cde/programs/dtdspmsg/Makefile.am index effc68aac..eb8d5b37e 100644 --- a/cde/programs/dtdspmsg/Makefile.am +++ b/cde/programs/dtdspmsg/Makefile.am @@ -15,6 +15,6 @@ dtdspmsg_LDADD = dtdspmsg_CFLAGS = -DNO_XLIB if SOLARIS -dtdspmsg_LDADD += -ldl -lgen +dtdspmsg_LDADD += -lgen endif diff --git a/cde/programs/dthello/Makefile.am b/cde/programs/dthello/Makefile.am index 4f5775685..75b484662 100644 --- a/cde/programs/dthello/Makefile.am +++ b/cde/programs/dthello/Makefile.am @@ -5,7 +5,7 @@ bin_PROGRAMS = dthello dthello_LDADD = $(DTCLIENTLIBS) $(XTOOLLIB) if SOLARIS -dthello_LDADD += -ldl -lgen +dthello_LDADD += -lgen endif if LINUX diff --git a/cde/programs/dthelp/dthelpprint/Makefile.am b/cde/programs/dthelp/dthelpprint/Makefile.am index 8dca02139..c493da6e7 100644 --- a/cde/programs/dthelp/dthelpprint/Makefile.am +++ b/cde/programs/dthelp/dthelpprint/Makefile.am @@ -10,7 +10,7 @@ dthelpprint_CPPFLAGS = -I.. -I ../../../lib/DtHelp \ dthelpprint_LDADD = $(DTCLIENTLIBS) $(XTOOLLIB) if SOLARIS -dthelpprint_LDADD += -lw -ldl -lgen -lm +dthelpprint_LDADD += -lw -lgen -lm endif dthelpprint_SOURCES = Main.c Initialize.c PrintUtil.c PrintTopics.c \ diff --git a/cde/programs/dticon/Makefile.am b/cde/programs/dticon/Makefile.am index 7d4356444..2781d2781 100644 --- a/cde/programs/dticon/Makefile.am +++ b/cde/programs/dticon/Makefile.am @@ -6,10 +6,6 @@ dticon_CFLAGS = -D__TOOLTALK dticon_LDADD = $(DTCLIENTLIBS) $(XTOOLLIB) -if SOLARIS -dticon_LDADD += -ldl -endif - dticon_SOURCES = dtIconShell.c event.c event.h fileIO.c fileIO.h \ fileIODialog.c globals.c graphics.c graphics.h \ help.c image.c image.h main.c newIconDialog.c \ diff --git a/cde/programs/dtksh/Makefile.am b/cde/programs/dtksh/Makefile.am index 07c1d76ff..3d71f6566 100644 --- a/cde/programs/dtksh/Makefile.am +++ b/cde/programs/dtksh/Makefile.am @@ -1,6 +1,6 @@ MAINTAINERCLEANFILES = Makefile.in -CLEANFILES = init.c FEATURE DtFuncs.dtsh +CLEANFILES = init.c DtFuncs.dtsh SUBDIRS = examples @@ -31,10 +31,6 @@ dtksh_LDADD = $(DTCLIENTLIBS) ksh93/src/cmd/ksh93/pmain.o $(XTOOLLIB) \ libshell.a $(KSH93SRC)/lib/libcmd.a $(KSH93SRC)/lib/libast.a \ $(KSH93SRC)/lib/libdll.a -if LINUX -dtksh_LDADD += -ldl -endif - if SOLARIS dtksh_LDADD += -lsecdb -lsocket -lnsl endif diff --git a/cde/programs/dtlogin/Makefile.am b/cde/programs/dtlogin/Makefile.am index 38aaab42f..d4ad631f9 100644 --- a/cde/programs/dtlogin/Makefile.am +++ b/cde/programs/dtlogin/Makefile.am @@ -88,9 +88,9 @@ endif if SOLARIS XBINDIR = /usr/bin/X11 -dtlogin_LDADD += -ldl -lgen -lresolv -lbsm -lcmd -dtgreet_LDADD += -ldl -lgen -lresolv -lbsm -lcmd -dtchooser_LDADD += -ldl -lgen -lresolv -lbsm -lcmd +dtlogin_LDADD += -lgen -lresolv -lbsm -lcmd +dtgreet_LDADD += -lgen -lresolv -lbsm -lcmd +dtchooser_LDADD += -lgen -lresolv -lbsm -lcmd dtlogin_SOURCES += solaris.c endif diff --git a/cde/programs/dtpdm/Makefile.am b/cde/programs/dtpdm/Makefile.am index 178bf1997..5afc7f527 100644 --- a/cde/programs/dtpdm/Makefile.am +++ b/cde/programs/dtpdm/Makefile.am @@ -7,7 +7,7 @@ dtpdm_CFLAGS = -DI18N_MSG -DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" dtpdm_LDADD = $(DTCLIENTLIBS) $(XTOOLLIB) if SOLARIS -dtpdm_LDADD += -lintl -lgen -ldl -lresolv +dtpdm_LDADD += -lintl -lgen -lresolv endif dtpdm_SOURCES = JobBox.c Main.c MainWindow.c PdmMsgs.c PdmOid.c \ diff --git a/cde/programs/dtpdmd/Makefile.am b/cde/programs/dtpdmd/Makefile.am index 218089810..38c6416a9 100644 --- a/cde/programs/dtpdmd/Makefile.am +++ b/cde/programs/dtpdmd/Makefile.am @@ -6,9 +6,5 @@ dtpdmd_CFLAGS = -DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" dtpdmd_LDADD = $(DTCLIENTLIBS) $(XTOOLLIB) -if SOLARIS -dtpdmd_LDADD += -ldl -endif - dtpdmd_SOURCES = dispatch.c dtpdmd.c mailbox.c manager.c records.c \ nlmsg.c setup.c util.c dtpdmdP.h nlmsg.h diff --git a/cde/programs/dtprintinfo/Makefile.am b/cde/programs/dtprintinfo/Makefile.am index 104ecc820..3ec53d926 100644 --- a/cde/programs/dtprintinfo/Makefile.am +++ b/cde/programs/dtprintinfo/Makefile.am @@ -51,10 +51,6 @@ UI_SRC = UI/DtActions.C UI/DtFindD.h UI/DtProps.C UI/DtSetModList.h \ dtprintinfo_SOURCES = $(UTIL_SRC) $(LIBUI_SRC) $(OBJ_SRC) $(UI_SRC) \ DtPrintinfo.C dtprintinfomsg.h -if SOLARIS -dtprintinfo_LDADD += -ldl -endif - # special processing for message files SYM2NUM_CMD = CPP=$(GENCPP) $(KSH) sym2num diff --git a/cde/programs/dtscreen/Makefile.am b/cde/programs/dtscreen/Makefile.am index 083bbfa2a..93e390c09 100644 --- a/cde/programs/dtscreen/Makefile.am +++ b/cde/programs/dtscreen/Makefile.am @@ -5,7 +5,7 @@ bin_PROGRAMS = dtscreen dtscreen_LDADD = $(DTCLIENTLIBS) $(XTOOLLIB) if SOLARIS -dtscreen_LDADD += -ldl -lgen +dtscreen_LDADD += -lgen endif dtscreen_SOURCES = blank.c dtscreen.c flame.c hopalong.c hsbramp.c \ diff --git a/cde/programs/dtsearchpath/dtappg/Makefile.am b/cde/programs/dtsearchpath/dtappg/Makefile.am index 915c76af3..22f5c54f2 100644 --- a/cde/programs/dtsearchpath/dtappg/Makefile.am +++ b/cde/programs/dtsearchpath/dtappg/Makefile.am @@ -7,7 +7,7 @@ dtappgather_CXXFLAGS = -I../libCliSrv $(DT_INCDIR) dtappgather_LDADD = ../libCliSrv/libCliSrv.a $(DTCLIENTLIBS) $(XTOOLLIB) if SOLARIS -dtappgather_LDADD += -ldl -lintl +dtappgather_LDADD += -lintl endif dtappgather_SOURCES = Options.C dtappgather.C dtappgather.h Options.h diff --git a/cde/programs/dtsearchpath/libCliSrv/Makefile.am b/cde/programs/dtsearchpath/libCliSrv/Makefile.am index 2d46d4428..f7dc9f87b 100644 --- a/cde/programs/dtsearchpath/libCliSrv/Makefile.am +++ b/cde/programs/dtsearchpath/libCliSrv/Makefile.am @@ -6,7 +6,7 @@ libCliSrv_a_CXXFLAGS = $(DT_INCDIR) if SOLARIS libCliSrv_a_CXXFLAGS += -DIOSTREAMSWORKS -libCliSrv_a_LIBADD = -ldl -lintl -lc -ladm +libCliSrv_a_LIBADD = -lintl -lc -ladm endif libCliSrv_a_SOURCES = DirIterator.C Environ.C TTFile.C UnixEnv.C \ diff --git a/cde/programs/dtsession/Makefile.am b/cde/programs/dtsession/Makefile.am index 83c224cef..bc8830826 100644 --- a/cde/programs/dtsession/Makefile.am +++ b/cde/programs/dtsession/Makefile.am @@ -30,12 +30,12 @@ dtsession_LDADD = $(DTCLIENTLIBS) $(XTOOLLIB) $(DTPAMSVCLIB) if SOLARIS dtsession_SOURCES += OWsync.c -dtsession_LDADD += -lelf -ldl +dtsession_LDADD += -lelf endif if LINUX dtsession_CFLAGS += -DUSE_X11SSEXT -dtsession_LDADD += $(TIRPCLIB) -lXss -ldl +dtsession_LDADD += $(TIRPCLIB) -lXss endif if BSD diff --git a/cde/programs/dtspcd/Makefile.am b/cde/programs/dtspcd/Makefile.am index c0b517af9..f116e56a2 100644 --- a/cde/programs/dtspcd/Makefile.am +++ b/cde/programs/dtspcd/Makefile.am @@ -9,7 +9,7 @@ dtspcd_CFLAGS = -DCDE_CONFIGURATION_TOP=\"${prefix}\" \ dtspcd_LDADD = $(DTCLIENTLIBS) $(XTOOLLIB) if SOLARIS -dtspcd_LDADD += -ldl -lgen +dtspcd_LDADD += -lgen endif cfgdir = $(CDE_INSTALLATION_TOP)/config diff --git a/cde/programs/dtudcexch/Makefile.am b/cde/programs/dtudcexch/Makefile.am index 0d3359470..6e2513bd5 100644 --- a/cde/programs/dtudcexch/Makefile.am +++ b/cde/programs/dtudcexch/Makefile.am @@ -11,7 +11,7 @@ dtudcexch_LDADD = $(LIBSVC) $(LIBTT) $(XTOOLLIB) ${X_LIBS} \ $(FONTEDT_PATH1)/libfal/libfal.a if SOLARIS -dtudcexch_LDADD += -ldl -lgen +dtudcexch_LDADD += -lgen endif if FREEBSD diff --git a/cde/programs/util/dttypes/Makefile.am b/cde/programs/util/dttypes/Makefile.am index 83d3e758a..d8e2ef5e2 100644 --- a/cde/programs/util/dttypes/Makefile.am +++ b/cde/programs/util/dttypes/Makefile.am @@ -5,6 +5,6 @@ bin_PROGRAMS = dttypes dttypes_LDADD = $(DTCLIENTLIBS) $(XTOOLLIB) if SOLARIS -dttypes_LDADD += -ldl -lgen +dttypes_LDADD += -lgen endif From 60e60b9836f8ce6c3ffff25a72d191b2af4dd15d Mon Sep 17 00:00:00 2001 From: Chase Date: Sat, 30 Jul 2022 20:55:31 -0500 Subject: [PATCH 08/75] configure: detect libm --- cde/configure.ac | 3 +++ cde/lib/DtHelp/Makefile.am | 2 +- cde/lib/DtSearch/Makefile.am | 2 +- cde/programs/dtappbuilder/src/ab/Makefile.am | 2 +- cde/programs/dtappbuilder/src/abmf/Makefile.am | 2 +- cde/programs/dtappbuilder/src/libABobj/Makefile.am | 4 +--- cde/programs/dtappbuilder/src/libAButil/Makefile.am | 4 ++-- cde/programs/dtcm/server/Makefile.am | 2 +- cde/programs/dthelp/dthelpprint/Makefile.am | 2 +- 9 files changed, 12 insertions(+), 11 deletions(-) diff --git a/cde/configure.ac b/cde/configure.ac index 88f662625..5946c27a3 100644 --- a/cde/configure.ac +++ b/cde/configure.ac @@ -506,6 +506,9 @@ AC_CHECK_LIB(Xdmcp, XdmcpFlush, [XDMCPLIB="-lXdmcp"], [XDMCPLIB=""], [${EXTRA_INCS} ${EXTRA_LIBS}]) AC_SUBST(XDMCPLIB) +AC_SEARCH_LIBS(cos, m, [], [ + AC_MSG_ERROR([cos not found, your system probably doesn't obey posix])]) + AC_SEARCH_LIBS(dlopen, [dl dld], [], [ AC_MSG_ERROR([dlopen not found, your system probably doesn't obey posix] )]) diff --git a/cde/lib/DtHelp/Makefile.am b/cde/lib/DtHelp/Makefile.am index 8aad06f3f..a3b59681b 100644 --- a/cde/lib/DtHelp/Makefile.am +++ b/cde/lib/DtHelp/Makefile.am @@ -16,7 +16,7 @@ libDtHelp_la_CFLAGS = -I./il -I./jpeg -I../DtSvc/DtUtil2 -DDTLIB \ libDtHelp_la_LIBADD = $(JPEGLIB) il/libil.la $(LTLIBICONV) if SOLARIS -libDtHelp_la_LIBADD += -lw -lgen -lm -lc +libDtHelp_la_LIBADD += -lw -lgen -lc endif diff --git a/cde/lib/DtSearch/Makefile.am b/cde/lib/DtSearch/Makefile.am index fce13b0b6..5c359728f 100644 --- a/cde/lib/DtSearch/Makefile.am +++ b/cde/lib/DtSearch/Makefile.am @@ -22,7 +22,7 @@ endif libDtSearch_la_LIBADD = raima/libraima.la if SOLARIS -libDtSearch_la_LIBADD += -lm -lc +libDtSearch_la_LIBADD += -lc endif libDtSearch_la_SOURCES = apndext.c ausdopen.c ausexit.c \ diff --git a/cde/programs/dtappbuilder/src/ab/Makefile.am b/cde/programs/dtappbuilder/src/ab/Makefile.am index e40629c7e..c0dee1a6f 100644 --- a/cde/programs/dtappbuilder/src/ab/Makefile.am +++ b/cde/programs/dtappbuilder/src/ab/Makefile.am @@ -47,7 +47,7 @@ dtbuilder_LDADD = ../libABil/libABil.a ../libABobjXm/libABobjXm.a \ ../libABobj/libABobj.a ../libAButil/libAButil.a \ $(LIBWIDGET) $(LIBTERM) $(LIBHELP) $(LIBSVC) \ $(LIBTT) $(LIBXIN) -lUil $(MRESOURCELIB) $(XTOOLLIB) ${X_LIB} \ - $(UTILLIB) -lm + $(UTILLIB) dtbuilder_CFLAGS = -DPIXMAP_WORKAROUND $(ABINCLUDES) diff --git a/cde/programs/dtappbuilder/src/abmf/Makefile.am b/cde/programs/dtappbuilder/src/abmf/Makefile.am index 4578520f1..ee697131a 100644 --- a/cde/programs/dtappbuilder/src/abmf/Makefile.am +++ b/cde/programs/dtappbuilder/src/abmf/Makefile.am @@ -44,7 +44,7 @@ dtcodegen_SOURCES = abmf.c args.c \ utils_header_file.c write_c.c \ write_code.c -#ab_func_strings_LDADD = -lm ../libAButil/libAButil.a +#ab_func_strings_LDADD = ../libAButil/libAButil.a #ab_func_strings_SOURCES = ab_func_strings.c diff --git a/cde/programs/dtappbuilder/src/libABobj/Makefile.am b/cde/programs/dtappbuilder/src/libABobj/Makefile.am index f74e52884..af17282a9 100644 --- a/cde/programs/dtappbuilder/src/libABobj/Makefile.am +++ b/cde/programs/dtappbuilder/src/libABobj/Makefile.am @@ -4,10 +4,8 @@ ABINCLUDES = ../include EXTRA_DEFINES = -D_POSIX_SOURCE=1 -EXTRALIBS = -lm - if SOLARIS -EXTRALIBS += -lgen +EXTRALIBS = -lgen endif noinst_LIBRARIES = libABobj.a diff --git a/cde/programs/dtappbuilder/src/libAButil/Makefile.am b/cde/programs/dtappbuilder/src/libAButil/Makefile.am index d683a00e8..af3aa55ac 100644 --- a/cde/programs/dtappbuilder/src/libAButil/Makefile.am +++ b/cde/programs/dtappbuilder/src/libAButil/Makefile.am @@ -21,13 +21,13 @@ libAButil_a_SOURCES = abio.c \ util_file.c \ util_string.c -#util_test_LDADD = libAButil.a -lm +#util_test_LDADD = libAButil.a #util_test_CFLAGS = $(EXTRA_DEFINES) -I$(ABINCLUDES) #util_test_SOURCES = util_test.c -#istr_test_LDADD = libAButil.a -lm +#istr_test_LDADD = libAButil.a #istr_test_CFLAGS = $(EXTRA_DEFINES) -I$(ABINCLUDES) diff --git a/cde/programs/dtcm/server/Makefile.am b/cde/programs/dtcm/server/Makefile.am index bd49c472c..a4ac7dc55 100644 --- a/cde/programs/dtcm/server/Makefile.am +++ b/cde/programs/dtcm/server/Makefile.am @@ -7,7 +7,7 @@ rpc_cmsd_CFLAGS = -I../../../lib/csa $(DT_INCDIR) $(CSA_INCDIR) rpc_cmsd_LDADD = $(LIBCSA) $(DTCLIENTLIBS) $(TIRPCLIB) $(XTOOLLIB) if SOLARIS -rpc_cmsd_LDADD += -lsocket -lnsl -lintl -lm +rpc_cmsd_LDADD += -lsocket -lnsl -lintl endif rpc_cmsd_SOURCES = parser.c access.c callback.c cmscalendar.c \ diff --git a/cde/programs/dthelp/dthelpprint/Makefile.am b/cde/programs/dthelp/dthelpprint/Makefile.am index c493da6e7..81eda923f 100644 --- a/cde/programs/dthelp/dthelpprint/Makefile.am +++ b/cde/programs/dthelp/dthelpprint/Makefile.am @@ -10,7 +10,7 @@ dthelpprint_CPPFLAGS = -I.. -I ../../../lib/DtHelp \ dthelpprint_LDADD = $(DTCLIENTLIBS) $(XTOOLLIB) if SOLARIS -dthelpprint_LDADD += -lw -lgen -lm +dthelpprint_LDADD += -lw -lgen endif dthelpprint_SOURCES = Main.c Initialize.c PrintUtil.c PrintTopics.c \ From 47cc5d4a72d9c69ef549c675fa471f19ae7f47fb Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Sun, 31 Jul 2022 18:38:16 -0600 Subject: [PATCH 09/75] configure.ac: remove extra -lm check, move dl check to after libm check In addition, do not fail the configure if libdl[d] is not found. Building may still fail in that case, but then it may not :) --- cde/configure.ac | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/cde/configure.ac b/cde/configure.ac index 5946c27a3..32d1ff0a8 100644 --- a/cde/configure.ac +++ b/cde/configure.ac @@ -431,6 +431,8 @@ AC_CHECK_HEADERS([X11/extensions/Xrender.h], [], dnl libraries AC_CHECK_LIB(m, cosf) +AC_SEARCH_LIBS(dlopen, [dl dld], [], []) + AC_CHECK_LIB(crypt, crypt) dnl this should be configurable, for now it is required AC_CHECK_LIB(Xinerama, XineramaQueryScreens, @@ -506,13 +508,6 @@ AC_CHECK_LIB(Xdmcp, XdmcpFlush, [XDMCPLIB="-lXdmcp"], [XDMCPLIB=""], [${EXTRA_INCS} ${EXTRA_LIBS}]) AC_SUBST(XDMCPLIB) -AC_SEARCH_LIBS(cos, m, [], [ - AC_MSG_ERROR([cos not found, your system probably doesn't obey posix])]) - -AC_SEARCH_LIBS(dlopen, [dl dld], [], [ - AC_MSG_ERROR([dlopen not found, your system probably doesn't obey posix] - )]) - dnl iconv AM_ICONV From b38c2b02a86d866103ae9b7c8596b844ae3256dc Mon Sep 17 00:00:00 2001 From: Chase Date: Wed, 3 Aug 2022 18:07:57 -0500 Subject: [PATCH 10/75] Remove detected -lcrypt flag --- cde/lib/DtHelp/Makefile.am | 2 +- cde/lib/DtSearch/Makefile.am | 6 ------ cde/lib/DtWidget/Makefile.am | 2 +- cde/lib/tt/lib/Makefile.am | 2 +- cde/programs/dtaction/Makefile.am | 12 ------------ 5 files changed, 3 insertions(+), 21 deletions(-) diff --git a/cde/lib/DtHelp/Makefile.am b/cde/lib/DtHelp/Makefile.am index a3b59681b..04730f098 100644 --- a/cde/lib/DtHelp/Makefile.am +++ b/cde/lib/DtHelp/Makefile.am @@ -16,7 +16,7 @@ libDtHelp_la_CFLAGS = -I./il -I./jpeg -I../DtSvc/DtUtil2 -DDTLIB \ libDtHelp_la_LIBADD = $(JPEGLIB) il/libil.la $(LTLIBICONV) if SOLARIS -libDtHelp_la_LIBADD += -lw -lgen -lc +libDtHelp_la_LIBADD += -lw -lgen endif diff --git a/cde/lib/DtSearch/Makefile.am b/cde/lib/DtSearch/Makefile.am index 5c359728f..fdd8f7585 100644 --- a/cde/lib/DtSearch/Makefile.am +++ b/cde/lib/DtSearch/Makefile.am @@ -21,10 +21,6 @@ endif libDtSearch_la_LIBADD = raima/libraima.la -if SOLARIS -libDtSearch_la_LIBADD += -lc -endif - libDtSearch_la_SOURCES = apndext.c ausdopen.c ausexit.c \ bmstrstr.c boolpars.c boolsrch.c \ boolyac.y cuslang.c dbchange.c \ @@ -39,5 +35,3 @@ libDtSearch_la_SOURCES = apndext.c ausdopen.c ausexit.c \ ocf.c opendblk.c ophuf.c \ readchar.c strupr.c userint.c \ vedelete.c vestatis.c vstfunct.c - - diff --git a/cde/lib/DtWidget/Makefile.am b/cde/lib/DtWidget/Makefile.am index 182717e2e..ca9eda4b9 100644 --- a/cde/lib/DtWidget/Makefile.am +++ b/cde/lib/DtWidget/Makefile.am @@ -17,7 +17,7 @@ endif if SOLARIS libDtWidget_la_CFLAGS += -DNO_REGCOMP -libDtWidget_la_LIBADD = -lc -lw -lintl +libDtWidget_la_LIBADD = -lw -lintl endif diff --git a/cde/lib/tt/lib/Makefile.am b/cde/lib/tt/lib/Makefile.am index b9e17b595..6fa386ad6 100644 --- a/cde/lib/tt/lib/Makefile.am +++ b/cde/lib/tt/lib/Makefile.am @@ -18,7 +18,7 @@ libtt_la_LIBADD = api/c/libapi.la api/dnd/libdnd.la db/libdb.la mp/libmp.la \ if SOLARIS # This stuff should be figured out by configure -libtt_la_LIBADD += -lnsl -lsocket -lintl -lc -lw +libtt_la_LIBADD += -lnsl -lsocket -lintl -lw endif if LINUX diff --git a/cde/programs/dtaction/Makefile.am b/cde/programs/dtaction/Makefile.am index 6dde85bec..245d887ce 100644 --- a/cde/programs/dtaction/Makefile.am +++ b/cde/programs/dtaction/Makefile.am @@ -5,15 +5,3 @@ bin_PROGRAMS = dtaction dtaction_SOURCES = Main.c dtaction_LDADD = $(DTCLIENTLIBS) $(XTOOLLIB) - -if LINUX -dtaction_LDADD += -lcrypt -endif - -if FREEBSD -dtaction_LDADD += -lcrypt -endif - -if NETBSD -dtaction_LDADD += -lcrypt -endif From 06863e826e43b4edd9a12e3b7a6208e2d1628e5c Mon Sep 17 00:00:00 2001 From: Chase Date: Wed, 3 Aug 2022 18:41:37 -0500 Subject: [PATCH 11/75] lib/DtTerm/TermPrim: clean up defines --- cde/lib/DtTerm/TermPrim/Makefile.am | 20 +------------------- cde/lib/DtTerm/TermPrim/TermPrimOSDepI.h | 8 ++++---- cde/lib/DtTerm/TermPrim/TermPrimSetPty.c | 6 +++--- cde/lib/DtTerm/TermPrim/TermPrimSubproc.c | 16 ++++++---------- 4 files changed, 14 insertions(+), 36 deletions(-) diff --git a/cde/lib/DtTerm/TermPrim/Makefile.am b/cde/lib/DtTerm/TermPrim/Makefile.am index 6ecc554f4..6c404dd7a 100644 --- a/cde/lib/DtTerm/TermPrim/Makefile.am +++ b/cde/lib/DtTerm/TermPrim/Makefile.am @@ -35,24 +35,6 @@ libTermPrim_la_SOURCES = TermPrim.c \ if SOLARIS libTermPrim_la_SOURCES += TermPrimGetPty-svr4.c -AM_CPPFLAGS += -DSUN_ARCHITECTURE -endif - -# Use the posix pts api, like linux -if BSD +else libTermPrim_la_SOURCES += TermPrimGetPty-pts.c -# uses CSRG_BASED global define -endif - -if FREEBSD -AM_CPPFLAGS += -DFREEBSD_ARCHITECTURE -endif - -if OPENBSD -AM_CPPFLAGS += -DOPENBSD_ARCHITECTURE -endif - -if LINUX -libTermPrim_la_SOURCES += TermPrimGetPty-pts.c -AM_CPPFLAGS += -DLINUX_ARCHITECTURE endif diff --git a/cde/lib/DtTerm/TermPrim/TermPrimOSDepI.h b/cde/lib/DtTerm/TermPrim/TermPrimOSDepI.h index d79c22f69..a9a74df21 100644 --- a/cde/lib/DtTerm/TermPrim/TermPrimOSDepI.h +++ b/cde/lib/DtTerm/TermPrim/TermPrimOSDepI.h @@ -63,12 +63,12 @@ #ifndef _Dt_TermPrimOSDepI_h #define _Dt_TermPrimOSDepI_h -#ifdef LINUX_ARCHITECTURE +#ifdef __linux__ # define USE_TIOCCONS /* use tioccons for -C */ # define HAS_SETEUID /* seteuid available */ # define HAS_SETREUID /* setreuid available */ # define USE_TCSENDBREAK /* use tiocbreak() */ -#endif /* LINUX_ARCHITECTURE */ +#endif /* LINUX */ #ifdef CSRG_BASED # define HAS_SETEUID /* seteuid available */ @@ -76,7 +76,7 @@ # define USE_TCSENDBREAK /* use tiocbreak() */ #endif /* CSRG_BASED */ -#ifdef SUN_ARCHITECTURE +#ifdef sun # define XOR_CAPS_LOCK /* xor caps lock and shift */ # define USE_SRIOCSREDIR /* use SRIOCSREDIR ioctl for -C */ # define USE_STREAMS /* use streams */ @@ -87,7 +87,7 @@ # define USE_SUN_WCWIDTH_PATCH # define wcwidth(w) sun_wcwidth(w) # endif /* (_XOPEN_VERSION == 3) */ -#endif /* SUN_ARCHITECTURE */ +#endif /* SUN */ #ifdef IBM_ARCHITECTURE /* this seems to be #define'ed in the world of imake... */ diff --git a/cde/lib/DtTerm/TermPrim/TermPrimSetPty.c b/cde/lib/DtTerm/TermPrim/TermPrimSetPty.c index 97b502046..c2b76acfb 100644 --- a/cde/lib/DtTerm/TermPrim/TermPrimSetPty.c +++ b/cde/lib/DtTerm/TermPrim/TermPrimSetPty.c @@ -55,9 +55,9 @@ #include #endif /* USE_TIOCCONS */ -#if defined(LINUX_ARCHITECTURE) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) #include -#endif /* LINUX_ARCHITECTURE */ +#endif /* LINUX */ #ifdef USE_STREAMS #include @@ -569,7 +569,7 @@ _DtTermPrimPtyInit TMODE (XTTYMODE_weras, tio.c_cc[VWERSE]); TMODE (XTTYMODE_lnext, tio.c_cc[VLNEXT]); -#elif defined(SUN_ARCHITECTURE) +#elif defined(sun) TMODE (XTTYMODE_swtch, tio.c_cc[VSWTCH]); TMODE (XTTYMODE_start, tio.c_cc[VSTART]); TMODE (XTTYMODE_stop, tio.c_cc[VSTOP]); diff --git a/cde/lib/DtTerm/TermPrim/TermPrimSubproc.c b/cde/lib/DtTerm/TermPrim/TermPrimSubproc.c index a0c1df334..2e14d94f3 100644 --- a/cde/lib/DtTerm/TermPrim/TermPrimSubproc.c +++ b/cde/lib/DtTerm/TermPrim/TermPrimSubproc.c @@ -32,7 +32,7 @@ #include "TermHeader.h" #include -#if defined(CSRG_BASED) || defined(LINUX_ARCHITECTURE) +#if defined(CSRG_BASED) || defined(__linux__) /* For TIOCSTTY definitions */ #include #endif /* BSD || Linux */ @@ -47,11 +47,7 @@ #include #include -#if defined(HPVUE) -#include -#else /* HPVUE */ #include
-#endif /* HPVUE */ #include "TermPrimP.h" #include "TermPrimI.h" @@ -451,7 +447,7 @@ _DtTermPrimSubprocExec(Widget w, /* child... */ _DtTermProcessUnlock(); -#if defined(CSRG_BASED) || defined(LINUX_ARCHITECTURE) +#if defined(CSRG_BASED) || defined(__linux__) /* establish a new session for child */ setsid(); #else @@ -459,7 +455,7 @@ _DtTermPrimSubprocExec(Widget w, (void) setpgrp(); #endif /* Linux || BSD */ -#if defined(LINUX_ARCHITECTURE) +#if defined(__linux__) /* set the ownership and mode of the pty... */ (void) _DtTermPrimSetupPty(ptyName, pty); #endif @@ -472,7 +468,7 @@ _DtTermPrimSubprocExec(Widget w, (void) _exit(1); } -#if defined(CSRG_BASED) || defined(LINUX_ARCHITECTURE) +#if defined(CSRG_BASED) || defined(__linux__) /* BSD needs to do this to acquire pty as controlling terminal */ if (ioctl(pty, TIOCSCTTY, (char *)NULL) < 0) { (void) close(pty); @@ -485,10 +481,10 @@ _DtTermPrimSubprocExec(Widget w, _DtTermPrimPtyGetDefaultModes(); #endif /* Linux || BSD */ -#if !defined(LINUX_ARCHITECTURE) +#if !defined(__linux__) /* set the ownership and mode of the pty... */ (void) _DtTermPrimSetupPty(ptyName, pty); -#endif /* LINUX_ARCHITECTURE */ +#endif /* LINUX */ /* apply the ttyModes... */ _DtTermPrimPtyInit(pty, tw->term.ttyModes, tw->term.csWidth); From 45cee195bd5e4957f5dec3b24629ddb9d7718aec Mon Sep 17 00:00:00 2001 From: Chase Date: Wed, 3 Aug 2022 23:15:45 -0500 Subject: [PATCH 12/75] Generify source code Previously we would fail in some parts of the code if we did not have a premade configuration, now we use any code that was marked as Linux, BSD and Solaris as our basis in order to support building unknown Unix systems. --- cde/.gitignore | 123 +------- cde/include/Dt/vista.h | 2 - cde/include/EUSCompat.h | 4 +- cde/lib/DtMmdb/StyleSheet/DocParser.C | 8 - cde/lib/DtMmdb/StyleSheet/Expression.C | 12 - cde/lib/DtMmdb/btree_berkeley/compat.h | 8 - cde/lib/DtMmdb/dti_excs/Destructable_il.hh | 6 - cde/lib/DtMmdb/utility/filebuf.C | 4 - cde/lib/DtMmdb/utility/funcs.h | 7 - cde/lib/DtMmdb/utility/streambuf.C | 5 - cde/lib/DtSearch/raima/Makefile.am | 12 +- cde/lib/DtSvc/include/codelibs/dynarray.h | 8 - cde/lib/DtSvc/include/codelibs/privbuf.h | 8 - cde/lib/DtSvc/include/codelibs/stringx.h | 29 -- cde/lib/DtTerm/TermPrim/TermPrimDebug.c | 6 +- cde/lib/tt/bin/dbck/options.C | 2 +- cde/lib/tt/bin/ttauth/ttauth.h | 3 - cde/lib/tt/bin/ttdbserverd/db_server_svc.C | 4 - cde/lib/tt/bin/tttar/tttar.C | 6 - cde/lib/tt/bin/tttar/tttar_api.C | 4 - cde/lib/tt/bin/tttar/tttar_spec.C | 4 - cde/lib/tt/lib/Makefile.am | 5 - cde/lib/tt/lib/realpath.c | 160 ----------- cde/lib/tt/lib/realpath.hp.c | 146 ---------- cde/lib/tt/lib/tt_options.h | 271 ++---------------- cde/lib/tt/lib/util/tt_host.C | 3 - cde/lib/tt/lib/util/tt_log.C | 3 - cde/lib/tt/lib/util/tt_path.C | 13 - cde/lib/tt/lib/util/tt_string.C | 2 - cde/lib/tt/mini_isam/iscntl.c | 16 -- .../dthelp/parser/canon1/helptag/global.h | 10 - .../dthelp/parser/canon1/helptag/help.c | 52 ---- .../dthelp/parser/pass1/helptag/help.c | 51 ---- .../dthelp/parser/pass2/htag2/global.h | 2 - .../dtinfo/src/Other/WindowSystemMotif.C | 5 - .../dtinfo/src/Preferences/UserPreference.C | 3 - .../dtinfo/dtinfo/src/Query/QueryTermView.C | 2 - .../dtinfo/dtinfo/src/Support/xList.hh | 12 - .../dtinfo/dtinfo/wwl/include/WWL/WArgList.h | 5 - .../dtinfo/dtinfo/wwl/include/WWL/wwl.h | 14 - cde/programs/dtinfo/tools/misc/msgsets.C | 4 - cde/programs/dtlogin/config/Xconfig.src | 4 - cde/programs/dtlogin/dm.c | 4 - cde/programs/dtlogin/genauth.c | 40 --- cde/programs/dtmail/include/DtMail/Buffer.hh | 3 - .../dtmail/libDtMail/RFC/RFCTransport.C | 7 - cde/programs/dtscreen/usleep.c | 16 -- cde/programs/dtscreen/worm.c | 9 - cde/programs/dtsearchpath/dtappg/Options.C | 4 - .../dtsearchpath/dtappg/dtappgather.C | 6 +- .../dtsearchpath/dtsp/ManSearchPath.C | 12 - cde/programs/dtsearchpath/dtsp/Options.C | 4 - cde/programs/dtsearchpath/dtsp/SearchPath.C | 27 -- cde/programs/dtsearchpath/dtsp/SearchPath.h | 14 - cde/programs/dtsearchpath/libCliSrv/TTFile.C | 17 -- cde/programs/dtsearchpath/libCliSrv/TTFile.h | 4 - cde/programs/dtsearchpath/libCliSrv/UnixEnv.C | 6 - cde/programs/dtsearchpath/libCliSrv/cstring.C | 8 - cde/programs/dtsearchpath/libCliSrv/cstring.h | 8 - cde/programs/dtsession/Makefile.am | 2 - cde/programs/dtudcfonted/libfuty/getfname.c | 4 - cde/programs/dtudcfonted/libfuty/oakfuty.c | 5 - cde/programs/dtwm/WmFunction.c | 2 +- cde/programs/localized/templates/French.am | 8 +- cde/programs/localized/templates/German.am | 8 +- cde/programs/localized/templates/Italian.am | 8 +- cde/programs/localized/templates/Japanese.am | 8 +- cde/programs/localized/templates/Spanish.am | 8 +- cde/programs/ttsnoop/tt_c++.h | 4 - cde/programs/ttsnoop/ttsnoop.C.src | 2 - 70 files changed, 46 insertions(+), 1250 deletions(-) delete mode 100644 cde/lib/tt/lib/realpath.c delete mode 100644 cde/lib/tt/lib/realpath.hp.c diff --git a/cde/.gitignore b/cde/.gitignore index 0102a0fab..f76c859d1 100644 --- a/cde/.gitignore +++ b/cde/.gitignore @@ -22,130 +22,14 @@ imports/motif # exports of libraries/headers exports -# admin/IntegTools/ -admin/IntegTools/post_install/*.list -admin/IntegTools/post_install/*.lst - -admin/IntegTools/post_install/linux/CDE-MIN.list -admin/IntegTools/post_install/linux/CDE-MIN.lst -admin/IntegTools/post_install/linux/CDE-RUN.list -admin/IntegTools/post_install/linux/CDE-RUN.lst -admin/IntegTools/post_install/linux/CDE-SHLIBS.list -admin/IntegTools/post_install/linux/CDE-SHLIBS.lst -admin/IntegTools/post_install/linux/CDE-TT.list -admin/IntegTools/post_install/linux/CDE-TT.lst -admin/IntegTools/post_install/linux/configMin -admin/IntegTools/post_install/linux/configRun -admin/IntegTools/post_install/linux/configShlibs -admin/IntegTools/post_install/linux/configTT - -admin/IntegTools/post_install/freebsd/CDE-MIN.list -admin/IntegTools/post_install/freebsd/CDE-MIN.lst -admin/IntegTools/post_install/freebsd/CDE-RUN.list -admin/IntegTools/post_install/freebsd/CDE-RUN.lst -admin/IntegTools/post_install/freebsd/CDE-SHLIBS.list -admin/IntegTools/post_install/freebsd/CDE-SHLIBS.lst -admin/IntegTools/post_install/freebsd/CDE-TT.list -admin/IntegTools/post_install/freebsd/CDE-TT.lst -admin/IntegTools/post_install/freebsd/configMin -admin/IntegTools/post_install/freebsd/configRun -admin/IntegTools/post_install/freebsd/configShlibs -admin/IntegTools/post_install/freebsd/configTT - -admin/IntegTools/post_install/openbsd/CDE-MIN.list -admin/IntegTools/post_install/openbsd/CDE-MIN.lst -admin/IntegTools/post_install/openbsd/CDE-RUN.list -admin/IntegTools/post_install/openbsd/CDE-RUN.lst -admin/IntegTools/post_install/openbsd/CDE-SHLIBS.list -admin/IntegTools/post_install/openbsd/CDE-SHLIBS.lst -admin/IntegTools/post_install/openbsd/CDE-TT.list -admin/IntegTools/post_install/openbsd/CDE-TT.lst -admin/IntegTools/post_install/openbsd/configMin -admin/IntegTools/post_install/openbsd/configRun -admin/IntegTools/post_install/openbsd/configShlibs -admin/IntegTools/post_install/openbsd/configTT - -admin/IntegTools/post_install/netbsd/CDE-MIN.list -admin/IntegTools/post_install/netbsd/CDE-MIN.lst -admin/IntegTools/post_install/netbsd/CDE-RUN.list -admin/IntegTools/post_install/netbsd/CDE-RUN.lst -admin/IntegTools/post_install/netbsd/CDE-SHLIBS.list -admin/IntegTools/post_install/netbsd/CDE-SHLIBS.lst -admin/IntegTools/post_install/netbsd/CDE-TT.list -admin/IntegTools/post_install/netbsd/CDE-TT.lst -admin/IntegTools/post_install/netbsd/configMin -admin/IntegTools/post_install/netbsd/configRun -admin/IntegTools/post_install/netbsd/configShlibs -admin/IntegTools/post_install/netbsd/configTT - -admin/IntegTools/post_install/sun/CDE-MIN.list -admin/IntegTools/post_install/sun/CDE-MIN.lst -admin/IntegTools/post_install/sun/CDE-RUN.list -admin/IntegTools/post_install/sun/CDE-RUN.lst -admin/IntegTools/post_install/sun/CDE-SHLIBS.list -admin/IntegTools/post_install/sun/CDE-SHLIBS.lst -admin/IntegTools/post_install/sun/CDE-TT.list -admin/IntegTools/post_install/sun/CDE-TT.lst -admin/IntegTools/post_install/sun/configMin -admin/IntegTools/post_install/sun/configRun -admin/IntegTools/post_install/sun/configShlibs -admin/IntegTools/post_install/sun/configTT - -admin/IntegTools/post_install/configDemos -admin/IntegTools/post_install/configFonts -admin/IntegTools/post_install/configHelp -admin/IntegTools/post_install/configHelpPrg -admin/IntegTools/post_install/configHelpRun -admin/IntegTools/post_install/configIcons -admin/IntegTools/post_install/configInc -admin/IntegTools/post_install/configMan -admin/IntegTools/post_install/configManDev -admin/IntegTools/post_install/configMsgCat -admin/IntegTools/post_install/configPrg -admin/IntegTools/post_install/configShlibs - -install.dt -install.dt.hp -install.dt.ibm -install.dt.sun -dinstall.dt -dinstallCDE -installCDE -updateCDE - installCDE.*.log cscope.out -# Makefiles (generated by Imakefiles) +# Makefiles Makefile -xmakefile -# generated db files -databases/*\.db -databases/*\.tmp -databases/CDE-MIN.udb -databases/CDE-RUN.udb -databases/CDE-C.udb -databases/CDE-DE.udb -databases/CDE-ES.udb -databases/CDE-FR.udb -databases/CDE-IT.udb -databases/CDE-JP.udb -databases/CDE-INFOLIB-*\.udb -databases/CDE-HELP-*\.udb -databases/CDE-MSG-*\.udb -databases/CDE-SHLIBS\.udb - -# config -config/imake/imake -config/makedepend/makedepend -config/util/lndir -config/util/makestrs -config/util/mergelib -config/util/xmkmf - -# exampls +# examples examples/tt/broadcast # Compiled binaries and misc generated program files @@ -367,9 +251,6 @@ programs/dtappbuilder/src/abmf/dtcodegen.cat programs/dtappbuilder/src/libABil/bil_parse.c programs/dtappbuilder/src/libABil/bil_parse.h -# imake -config/imake/Makefile.proto - # doc book.log book.out.idx diff --git a/cde/include/Dt/vista.h b/cde/include/Dt/vista.h index 7fd869dca..ac47147f7 100644 --- a/cde/include/Dt/vista.h +++ b/cde/include/Dt/vista.h @@ -86,7 +86,6 @@ # define __SVR4_I386_ABI_L1__ #endif #include /* pickup WORD_BIT, LONG_BIT */ -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) # undef __SVR4_I386_ABI_L1__ # ifndef WORD_BIT # define WORD_BIT 32 @@ -94,7 +93,6 @@ # ifndef LONG_BIT # define LONG_BIT 32 # endif -#endif #define db_VERSION "3.dt" /* was "3.10" */ #define dbd_VERSION "V3.dt\032" /* was "V3.00\032" */ diff --git a/cde/include/EUSCompat.h b/cde/include/EUSCompat.h index 50f43020d..68140abe8 100644 --- a/cde/include/EUSCompat.h +++ b/cde/include/EUSCompat.h @@ -52,9 +52,7 @@ extern "C" { ** System V R4 based systems define the stuff we need in ** sys/types.h. Include that and then we are done. */ -#if defined(__linux__) || defined(SunOS) || defined(CSRG_BASED) -# include -#endif +#include #if defined(CSRG_BASED) || defined(__linux__) # include diff --git a/cde/lib/DtMmdb/StyleSheet/DocParser.C b/cde/lib/DtMmdb/StyleSheet/DocParser.C index 6579e06fc..1bf65192a 100644 --- a/cde/lib/DtMmdb/StyleSheet/DocParser.C +++ b/cde/lib/DtMmdb/StyleSheet/DocParser.C @@ -242,15 +242,7 @@ DocParser::process(istream &input, ostringstream &output, break; case AttributeSection: { -#if !defined(SC3) && !defined(_IBMR2) && !defined(__linux__) && \ - !defined(CSRG_BASED) && !defined(sun) - volatile -#endif AttributeList *attrs = 0; -#if !defined(SC3) && !defined(_IBMR2) && !defined(__linux__) && \ - !defined(CSRG_BASED) && !defined(sun) - volatile -#endif AttributeList *olias_attrs = 0; mtry diff --git a/cde/lib/DtMmdb/StyleSheet/Expression.C b/cde/lib/DtMmdb/StyleSheet/Expression.C index e85a1167b..f3c7a9cdb 100644 --- a/cde/lib/DtMmdb/StyleSheet/Expression.C +++ b/cde/lib/DtMmdb/StyleSheet/Expression.C @@ -141,20 +141,8 @@ BinaryOperatorNode::evaluate() const { // calculate children trees and then have feature value do the operation -#if !defined(SC3) && !defined(_IBMR2) && !defined(__linux__) && \ - !defined(CSRG_BASED) && !defined(sun) - volatile -#endif FeatureValue *left = 0; -#if !defined(SC3) && !defined(_IBMR2) && !defined(__linux__) && \ - !defined(CSRG_BASED) && !defined(sun) - volatile -#endif FeatureValue *right = 0; -#if !defined(SC3) && !defined(_IBMR2) && !defined(__linux__) && \ - !defined(CSRG_BASED) && !defined(sun) - volatile -#endif FeatureValue *result = 0; mtry diff --git a/cde/lib/DtMmdb/btree_berkeley/compat.h b/cde/lib/DtMmdb/btree_berkeley/compat.h index 48de36163..e5c8d5bab 100644 --- a/cde/lib/DtMmdb/btree_berkeley/compat.h +++ b/cde/lib/DtMmdb/btree_berkeley/compat.h @@ -85,14 +85,6 @@ typedef unsigned int size_t; typedef unsigned int sigset_t; #endif -/* - * If your system's vsnprintf returns a char *, not an int, - * change the 0 to a 1. - */ -#if !defined(_AIX) && !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) -#define VSPRINTF_CHARSTAR -#endif - /* * If you don't have POSIX 1003.1 signals, the signal code surrounding the * temporary file creation is intended to block all of the possible signals diff --git a/cde/lib/DtMmdb/dti_excs/Destructable_il.hh b/cde/lib/DtMmdb/dti_excs/Destructable_il.hh index ea01d5377..c198a37ad 100644 --- a/cde/lib/DtMmdb/dti_excs/Destructable_il.hh +++ b/cde/lib/DtMmdb/dti_excs/Destructable_il.hh @@ -102,12 +102,6 @@ Destructable::~Destructable() inline void Destructable::destruct() { -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) delete this; -#else - // Have to call this here since some compilers don't allow - // qualified calls through object pointer. - Destructable::~Destructable(); -#endif } #endif diff --git a/cde/lib/DtMmdb/utility/filebuf.C b/cde/lib/DtMmdb/utility/filebuf.C index aedc8fee0..d08dbe7fa 100644 --- a/cde/lib/DtMmdb/utility/filebuf.C +++ b/cde/lib/DtMmdb/utility/filebuf.C @@ -26,10 +26,6 @@ #include #include -#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) -#include -#endif - #include #include diff --git a/cde/lib/DtMmdb/utility/funcs.h b/cde/lib/DtMmdb/utility/funcs.h index abf9b00d5..b4253e4a4 100644 --- a/cde/lib/DtMmdb/utility/funcs.h +++ b/cde/lib/DtMmdb/utility/funcs.h @@ -52,14 +52,7 @@ #ifndef _funcs_h #define _funcs_h 1 -#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) -#include -#endif -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include -#else -#include -#endif #include #include #include diff --git a/cde/lib/DtMmdb/utility/streambuf.C b/cde/lib/DtMmdb/utility/streambuf.C index 959b62412..f01ad68e3 100644 --- a/cde/lib/DtMmdb/utility/streambuf.C +++ b/cde/lib/DtMmdb/utility/streambuf.C @@ -22,12 +22,7 @@ */ /* $XConsortium: streambuf.C /main/8 1996/08/21 15:55:14 drk $ */ #include "utility/c_streambuf.h" - -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include -#else -#include -#endif #define DEF_BUF_SIZ 4096 diff --git a/cde/lib/DtSearch/raima/Makefile.am b/cde/lib/DtSearch/raima/Makefile.am index 5be3c10e4..7213ee168 100644 --- a/cde/lib/DtSearch/raima/Makefile.am +++ b/cde/lib/DtSearch/raima/Makefile.am @@ -7,16 +7,10 @@ libraima_la_CFLAGS = -DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" \ -DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\" \ -DNO_TRANS -DUNIX -D_POSIX_SOURCE -DMULTIBYTE -if LINUX -libraima_la_CFLAGS += -D_XOPEN_SOURCE=700 -endif - -if BSD -libraima_la_CFLAGS += -D_XOPEN_SOURCE=700 -endif - if SOLARIS -libraima_la_CFLAGS += -D_XOPEN_SOURCE=500 -DNO_REGCOMP +libraima_la_CFLAGS += -D_XOPEN_SOURCE=500 +else +libraima_la_CFLAGS += -D_XOPEN_SOURCE=700 endif diff --git a/cde/lib/DtSvc/include/codelibs/dynarray.h b/cde/lib/DtSvc/include/codelibs/dynarray.h index 785606393..5cf7e99f9 100644 --- a/cde/lib/DtSvc/include/codelibs/dynarray.h +++ b/cde/lib/DtSvc/include/codelibs/dynarray.h @@ -36,15 +36,7 @@ #ifndef __DYNARRAY_H_ #define __DYNARRAY_H_ -#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) -#include -#endif -#if defined(sun) || defined(__linux__) || defined(CSRG_BASED) #define _DELETE_ARRAY(sz) delete[] -#else -#define _DELETE_ARRAY(sz) delete[(sz)] -#endif - // this is used to create an ARRAY of a TYPE #define declare_array(ARRAY, TYPE, BUMP) \ diff --git a/cde/lib/DtSvc/include/codelibs/privbuf.h b/cde/lib/DtSvc/include/codelibs/privbuf.h index b692dda57..e5f1d85ba 100644 --- a/cde/lib/DtSvc/include/codelibs/privbuf.h +++ b/cde/lib/DtSvc/include/codelibs/privbuf.h @@ -41,14 +41,6 @@ typedef void (*privbuf_func)(void *v); #include #include -#if defined(sun) || defined(__linux__) || defined(CSRG_BASED) -// Rejects valid inline declarations, claiming they have both internal and -// external linkage. -#else -inline static void *operator new(size_t size) { return malloc((unsigned)size); } -inline static void operator delete(void *p) { if (p) free((char*)p); } -#endif - #include declare_array(privbuf_charbuf, char, 128) declare_array(privbuf_strvec, char*, 128) diff --git a/cde/lib/DtSvc/include/codelibs/stringx.h b/cde/lib/DtSvc/include/codelibs/stringx.h index f69fb54e1..e702d0e9a 100644 --- a/cde/lib/DtSvc/include/codelibs/stringx.h +++ b/cde/lib/DtSvc/include/codelibs/stringx.h @@ -66,28 +66,11 @@ extern "C" #ifdef __cplusplus char *strtokx(char *&ptr, const char *sep); -# if !defined(__linux__) && !defined(sun) && !defined(CSRG_BASED) - char **strsep(const char *str, const char *sep, - boolean whsp = TRUE, int *num = NULL); - const char *strcmbn(const char **vec, const char *sep = " "); -# endif - #else /* __STDC__ */ char *strtokx(char **ptr, const char *sep); -# if !defined(__linux__) && !defined(sun) && !defined(CSRG_BASED) - char **strsep(const char *str, const char *sep, - boolean whsp, int *num); -#endif const char *strcmbn(const char **vec, const char *sep); - #endif /* __STDC__ */ - -#ifdef __OBSOLETE - size_t nl_strlen(const char *str); /* __OBSOLETE */ - int strcharsize(const char *str); /* __OBSOLETE */ -#endif /* __OBSOLETE */ - #else /* C */ extern void strfree(); @@ -102,12 +85,6 @@ extern unsigned strhashi(); extern char *strupper(), *strlower(); - -#ifdef __OBSOLETE -extern int strcharsize(); /* __OBSOLETE */ -extern size_t nl_strlen(); /* __OBSOLETE */ -#endif /* __OBSOLETE */ - #endif /* C */ #if defined(__cplusplus) } @@ -145,12 +122,6 @@ inline char *strdup(const char *s) /* macros for funcs that work on top of privbuf versions */ -/* for backward compatibility only - __OBSOLETE */ -#ifdef __OBSOLETE -#define strpos strstrx /* __OBSOLETE */ -#define strrpos strrstrx /* __OBSOLETE */ -#endif /* __OBSOLETE */ - #endif /* C || __STDC__ */ #endif /* __STRINGX_H_ */ diff --git a/cde/lib/DtTerm/TermPrim/TermPrimDebug.c b/cde/lib/DtTerm/TermPrim/TermPrimDebug.c index 9990ebfb8..119fc56d4 100644 --- a/cde/lib/DtTerm/TermPrim/TermPrimDebug.c +++ b/cde/lib/DtTerm/TermPrim/TermPrimDebug.c @@ -33,11 +33,7 @@ #include #include #include -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) -# include -#else -# include -#endif +#include #include "TermHeader.h" #include "TermPrimDebug.h" #include diff --git a/cde/lib/tt/bin/dbck/options.C b/cde/lib/tt/bin/dbck/options.C index 98393be4d..55ccb8e44 100644 --- a/cde/lib/tt/bin/dbck/options.C +++ b/cde/lib/tt/bin/dbck/options.C @@ -37,7 +37,7 @@ #include #include #include "util/copyright.h" -#if defined(__linux__) || defined(sgi) || defined(CSRG_BASED) +#if defined(__linux__) || defined(CSRG_BASED) #include #endif #include "dbck.h" diff --git a/cde/lib/tt/bin/ttauth/ttauth.h b/cde/lib/tt/bin/ttauth/ttauth.h index c12ef0842..b3670b366 100644 --- a/cde/lib/tt/bin/ttauth/ttauth.h +++ b/cde/lib/tt/bin/ttauth/ttauth.h @@ -58,9 +58,6 @@ typedef int Bool; extern char *ProgramName; -#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) -extern char *malloc(), *realloc(); -#endif int process_command(), auth_initialize(), auth_finalize(); extern int print_help(); extern int verbose; diff --git a/cde/lib/tt/bin/ttdbserverd/db_server_svc.C b/cde/lib/tt/bin/ttdbserverd/db_server_svc.C index 3716b737a..af4d4dc55 100644 --- a/cde/lib/tt/bin/ttdbserverd/db_server_svc.C +++ b/cde/lib/tt/bin/ttdbserverd/db_server_svc.C @@ -214,11 +214,7 @@ main(int argc, char** argv, char **envp) void install_signal_handler(); SVCXPRT *transp; struct sockaddr_in saddr; -# if defined(__linux__) || defined(CSRG_BASED) || defined(sun) socklen_t asize = sizeof(saddr); -# else - size_t asize = sizeof(saddr); -# endif int is_aix = 0; int do_garbage_collect = 0; diff --git a/cde/lib/tt/bin/tttar/tttar.C b/cde/lib/tt/bin/tttar/tttar.C index 1a66e83e5..b3961be1c 100644 --- a/cde/lib/tt/bin/tttar/tttar.C +++ b/cde/lib/tt/bin/tttar/tttar.C @@ -37,13 +37,7 @@ #include #include #include -#if defined(__linux__) || defined(sun) || defined(CSRG_BASED) #include -#else -#if !defined(sun) -#include -#endif -#endif #include #include #include diff --git a/cde/lib/tt/bin/tttar/tttar_api.C b/cde/lib/tt/bin/tttar/tttar_api.C index e742c3a83..7da03deae 100644 --- a/cde/lib/tt/bin/tttar/tttar_api.C +++ b/cde/lib/tt/bin/tttar/tttar_api.C @@ -33,11 +33,7 @@ */ #include -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include -#else -#include -#endif #include #include "api/c/api_api.h" #include "Tt/tt_c.h" diff --git a/cde/lib/tt/bin/tttar/tttar_spec.C b/cde/lib/tt/bin/tttar/tttar_spec.C index bee2cb13d..771ee1656 100644 --- a/cde/lib/tt/bin/tttar/tttar_spec.C +++ b/cde/lib/tt/bin/tttar/tttar_spec.C @@ -32,11 +32,7 @@ * */ -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include -#else -#include -#endif #include "Tt/tt_c.h" #include "util/tt_iostream.h" #include "tttar_utils.h" diff --git a/cde/lib/tt/lib/Makefile.am b/cde/lib/tt/lib/Makefile.am index 6fa386ad6..9d48f9457 100644 --- a/cde/lib/tt/lib/Makefile.am +++ b/cde/lib/tt/lib/Makefile.am @@ -4,11 +4,6 @@ SUBDIRS = api db mp util tttk lib_LTLIBRARIES = libtt.la -# if you are on a system that does not support realpath(), you may need to -# include realpath.c in the _SOURCES -# -#libtt_la_SOURCES = realpath.c - libtt_la_SOURCES = # fake things so libtool creates this as a C++ library diff --git a/cde/lib/tt/lib/realpath.c b/cde/lib/tt/lib/realpath.c deleted file mode 100644 index cd22ba9d7..000000000 --- a/cde/lib/tt/lib/realpath.c +++ /dev/null @@ -1,160 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/*%% (c) Copyright 1993, 1994 Hewlett-Packard Company */ -/*%% (c) Copyright 1993, 1994 International Business Machines Corp. */ -/*%% (c) Copyright 1993, 1994 Sun Microsystems, Inc. */ -/*%% (c) Copyright 1993, 1994 Novell, Inc. */ -/*%% $XConsortium: realpath.c /main/3 1995/10/23 09:49:50 rswiston $ */ - -#include -#include -#include -#include -#include -#include - -/* This is used when the operating system does not provide us with - * a realpath implementation. It's named differently so there is - * no name clash between it and the system version of realpath. - */ - -char * -_tt_internal_realpath(pathname, finalpath) -char *pathname; -char *finalpath; -{ - struct stat sbuf; - char curpath[MAXPATHLEN], - workpath[MAXPATHLEN], - linkpath[MAXPATHLEN], - namebuf[MAXPATHLEN], - *where, - *ptr, - *last; - int len; - int nlink = 0; /* To keep track of loops in the path. */ - - strcpy(curpath, pathname); - - if (*pathname != '/') { -#if defined(__STDC__) - if (!getcwd(workpath)) { -#else - if (!getwd(workpath)) { -#endif - strcpy(finalpath, "."); - return(NULL); - } - } else *workpath = NULL; - - /* curpath is the path we're still resolving */ - /* linkpath is the path a symbolic link points to */ - /* workpath is the path we've resolved */ - - loop: - where = curpath; - while (*where != NULL) { - if (!strcmp(where, ".")) { - where++; - continue; - } - - /* deal with "./" */ - if (!strncmp(where, "./", 2)) { - where += 2; - continue; - } - - /* deal with "../" */ - if (!strncmp(where, "../", 3)) { - where += 3; - ptr = last = workpath; - while (*ptr) { - if (*ptr == '/') last = ptr; - ptr++; - } - *last = NULL; - continue; - } - - ptr = strchr(where, '/'); - if (!ptr) - ptr = where + strlen(where) - 1; - else - *ptr = NULL; - - strcpy(namebuf, workpath); - - for (last = namebuf; *last; last++) continue; - - /* tack on a trailing, or leading, `/` */ - if (last == namebuf || *--last != '/') { - strcat(namebuf, "/"); - } - - strcat(namebuf, where); - - where = ++ptr; - if (lstat(namebuf, &sbuf) == -1) { - strcpy(finalpath, namebuf); - return(NULL); - } - - if ((sbuf.st_mode & S_IFLNK) == S_IFLNK) { - /* Look for loop in path such as link to self. */ - nlink++; - if (nlink > MAXSYMLINKS) { - errno = ELOOP; - return (NULL); - } - len = readlink(namebuf, linkpath, MAXPATHLEN); - if (len == 0) { - strcpy(finalpath, namebuf); - return(NULL); - } - *(linkpath + len) = NULL; /* readlink doesn't null-terminate result */ - if (*linkpath == '/') *workpath = NULL; - if (*where) { - strcat(linkpath, "/"); - strcat(linkpath, where); - } - strcpy(curpath, linkpath); - goto loop; - } - - if ((sbuf.st_mode & S_IFDIR) == S_IFDIR) { - strcpy(workpath, namebuf); - continue; - } - - if (*where) { - strcpy(finalpath, namebuf); - return(NULL); /* path/notadir/morepath */ - } else - strcpy(workpath, namebuf); - } - strcpy(finalpath, workpath); - return(finalpath); - -} - diff --git a/cde/lib/tt/lib/realpath.hp.c b/cde/lib/tt/lib/realpath.hp.c deleted file mode 100644 index 97a700b0c..000000000 --- a/cde/lib/tt/lib/realpath.hp.c +++ /dev/null @@ -1,146 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/*%% (c) Copyright 1993, 1994 Hewlett-Packard Company */ -/*%% (c) Copyright 1993, 1994 International Business Machines Corp. */ -/*%% (c) Copyright 1993, 1994 Sun Microsystems, Inc. */ -/*%% (c) Copyright 1993, 1994 Novell, Inc. */ -/*%% $XConsortium: realpath.hp.c /main/3 1995/10/23 09:49:57 rswiston $ */ -/* @(#)realpath.hp.c 1.3 93/07/30 - * Version of realpath for HP/UX systems */ - -#include -#include -#include -#include -#include - -char * -realpath(pathname, finalpath) -char *pathname; -char *finalpath; -{ - struct stat sbuf; - char curpath[MAXPATHLEN], - workpath[MAXPATHLEN], - linkpath[MAXPATHLEN], - namebuf[MAXPATHLEN], - *where, - *ptr, - *last; - int len; - - strcpy(curpath, pathname); - - if (*pathname != '/') { -#if defined(__STDC__) - if (!getcwd(workpath)) { -#else - if (!getwd(workpath)) { -#endif - strcpy(finalpath, "."); - return(NULL); - } - } else *workpath = NULL; - - /* curpath is the path we're still resolving */ - /* linkpath is the path a symbolic link points to */ - /* workpath is the path we've resolved */ - - loop: - where = curpath; - while (*where != NULL) { - if (!strcmp(where, ".")) { - where++; - continue; - } - - /* deal with "./" */ - if (!strncmp(where, "./", 2)) { - where += 2; - continue; - } - - /* deal with "../" */ - if (!strncmp(where, "../", 3)) { - where += 3; - ptr = last = workpath; - while (*ptr) { - if (*ptr == '/') last = ptr; - ptr++; - } - *last = NULL; - continue; - } - - ptr = strchr(where, '/'); - if (!ptr) - ptr = where + strlen(where) - 1; - else - *ptr = NULL; - - strcpy(namebuf, workpath); - for (last = namebuf; *last; last++) continue; - /* tack on a trailing, or leading, `/` */ - if (last == namebuf || *--last != '/') { - strcat(namebuf, "/"); - } - strcat(namebuf, where); - - where = ++ptr; - if (lstat(namebuf, &sbuf) == -1) { - strcpy(finalpath, namebuf); - return(NULL); - } - - if ((sbuf.st_mode & S_IFLNK) == S_IFLNK) { - len = readlink(namebuf, linkpath, MAXPATHLEN); - if (len == 0) { - strcpy(finalpath, namebuf); - return(NULL); - } - *(linkpath + len) = NULL; /* readlink doesn't null-terminate result */ - if (*linkpath == '/') *workpath = NULL; - if (*where) { - strcat(linkpath, "/"); - strcat(linkpath, where); - } - strcpy(curpath, linkpath); - goto loop; - } - - if ((sbuf.st_mode & S_IFDIR) == S_IFDIR) { - strcpy(workpath, namebuf); - continue; - } - - if (*where) { - strcpy(finalpath, namebuf); - return(NULL); /* path/notadir/morepath */ - } else - strcpy(workpath, namebuf); - } - strcpy(finalpath, workpath); - return(finalpath); - -} - diff --git a/cde/lib/tt/lib/tt_options.h b/cde/lib/tt/lib/tt_options.h index 3af74946a..09631f10e 100644 --- a/cde/lib/tt/lib/tt_options.h +++ b/cde/lib/tt/lib/tt_options.h @@ -65,9 +65,6 @@ * * OPT_PATCH -- if defined, build patch info into objects * - * OPT_BUG_SUNOS_4 -- used to flag special hacks only needed because - * of bugs or quirks in SunOS 4.x. - * * OPT_BUG_SUNOS_5 -- used to flag special hacks only needed because * of bugs or quirks in SunOS 5.x. * @@ -77,9 +74,9 @@ * OPT_XDR_LONG_TYPE -- used for (64-bit) architectures where * defines x_putlong and x_getlong to not take "long*". * - * OPT_POSIX_SIGNAL -- set to assume posix-style sigaction() call. + * OPT_POSIX_SIGNAL -- set to assume posix-style sigaction() call (default). * OPT_BSD_SIGNAL -- set to assume bsd-style signal() call. - * If *neither* OPT_POSIX_SIGNAL or OPT_BSD_SIGNAL is defined, use + * If OPT_POSIX_SIGNAL is undefined and OPT_BSD_SIGNAL is not set, use * the old SVR2-style sigset(). * * OPT_BSD_WAIT -- set to assume bsd-style wait() calls, which expect @@ -117,9 +114,6 @@ * the tttarfile file will appear after extracts, a small flaw but not a * fatal one. * - * OPT_HAS_REALPATH -- set if the system provides a realpath() library - * function; otherwise we'll use our local copy. - * * OPT_PING_TRIES - The number of times to rpc-ping ttsession to * see if ttsession is alive. * @@ -191,136 +185,50 @@ # define GNU_STRCAST #endif -/* - * To avoid ugly cpp command-line options, we instead centralize - * in the following code all knowledge about deducing the OS version - * from the definitions cpp gives us. - */ -#if defined(sun) -# if !defined(OS_VERSION) -# if defined(OSMajorVersion) -# define OS_VERSION OSMajorVersion -# define OS_MINOR_VERSION OSMinorVersion -# else -# if !defined(_STDIO_H) && !defined(__stdio_h) -# include -# endif -# if defined(_SIZE_T) -# define OS_VERSION 5 -# else -# define OS_VERSION 4 -# endif -# endif -# endif +#undef OPT_CPP_PATH +#define OPT_CPP_PATH CPP_PROGRAM + +#ifdef sun +#define OPT_CPP_OPTIONS "-B" +#else +#define OPT_BUG_RPCINTR +#define OPT_CPP_OPTIONS "" +#define OPT_AUTOMOUNT_PATH_FIX +#define OPT_DEFINE_SIG_PF #endif +#ifdef __linux__ +#define OPT_LOCAL_MOUNT_TYPE "ext2fs" +#else +#define OPT_LOCAL_MOUNT_TYPE MNTTYPE_UFS +#endif + +#define OPT_POSIX_SIGNAL +#define OPT_CATGETS +#define OPT_TAR_HAS_EXCLUDE_OPTION + #if defined(_AIX) -# undef OPT_UNIX_SOCKET_RPC -# undef OPT_TLI -# undef OPT_DLOPEN_X11 -# undef OPT_DLOPEN_CE -# undef OPT_ADDMSG_DIRECT +# undef OPT_BUG_RPCINTR +# undef OPT_LOCAL_MOUNT_TYPE +# undef OPT_TAR_HAS_EXCLUDE_OPTION # define OPT_BUG_AIX -# undef OPT_SECURE_RPC -# undef OPT_CLASSING_ENGINE -# undef OPT_BSD_SIGNAL -# define OPT_POSIX_SIGNAL -# undef OPT_BSD_WAIT -# undef OPT_DGETTEXT -# define OPT_CATGETS # define OPT_GETDTABLESIZE -# undef OPT_SYSINFO -# define OPT_CPP_PATH "/usr/ccs/lib/cpp" -# define OPT_CPP_OPTIONS "" -# undef OPT_SVR4_GETMNTENT -# undef OPT_LOCKF_MNTENT -# define OPT_DEFINE_SIG_PF -# undef OPT_TAR_HAS_EXCLUDE_OPTION -# undef OPT_HAS_REALPATH -# define OPT_AUTOMOUNT_PATH_FIX /* # define OPT_XTHREADS 1 */ /* Defaulted by -DXTHREADS */ -#elif defined(sun) && (OS_VERSION <= 4) - -# define OPT_UNIX_SOCKET_RPC -# undef OPT_TLI - /* for 4.1.1 systems turning on any dlopen features on the */ - /* client side would break clients with ld errors unless they */ - /* linked with -ldl. OPT_DLOPEN_CE is ok since clients don't */ - /* ever execute ce_* functions. */ -# undef OPT_DLOPEN_X11 -# undef OPT_DLOPEN_CE -# undef OPT_ADDMSG_DIRECT -# define OPT_SECURE_RPC -# undef OPT_CLASSING_ENGINE -# undef OPT_PATCH -# define OPT_BSD_SIGNAL -# define OPT_BSD_WAIT -# define OPT_DGETTEXT -# undef OPT_CATGETS -# undef OPT_GETDTABLESIZE -# undef OPT_SYSINFO -# define OPT_CPP_PATH "/usr/lib/cpp" -# define OPT_CPP_OPTIONS "-B" -# undef OPT_SVR4_GETMNTENT -# undef OPT_LOCKF_MNTENT -# define OPT_LOCAL_MOUNT_TYPE MNTTYPE_42 -# undef OPT_OLD_RPC -# undef OPT_DEFINE_SIG_PF -# define OPT_TAR_HAS_EXCLUDE_OPTION - -# define OPT_BUG_SUNOS_4 - -# define OPT_HAS_REALPATH -# undef OPT_AUTOMOUNT_PATH_FIX - #elif defined(sun) && (OS_VERSION >= 5) - -# undef OPT_UNIX_SOCKET_RPC # define OPT_TLI -# undef OPT_DLOPEN_X11 -# undef OPT_DLOPEN_CE -# undef OPT_ADDMSG_DIRECT # define OPT_SECURE_RPC -# undef OPT_CLASSING_ENGINE -# undef OPT_BSD_SIGNAL -# define OPT_POSIX_SIGNAL -# undef OPT_BSD_WAIT -# undef OPT_DGETTEXT -# define OPT_CATGETS -# undef OPT_GETDTABLESIZE # define OPT_SYSINFO -# define OPT_CPP_PATH "/usr/ccs/lib/cpp" -# define OPT_CPP_OPTIONS "-B" # define OPT_SVR4_GETMNTENT # define OPT_LOCKF_MNTENT -# define OPT_LOCAL_MOUNT_TYPE MNTTYPE_UFS -# undef OPT_DEFINE_SIG_PF -# define OPT_TAR_HAS_EXCLUDE_OPTION -# define OPT_HAS_REALPATH -# undef OPT_AUTOMOUNT_PATH_FIX - -/* Does not work on X86 */ -# if defined(i386) && OS_MINOR_VERSION <= 4 -# undef OPT_GARBAGE_THREADS -# undef OPT_SOLARIS_THREADED_TRIES -# else -# define OPT_SOLARIS_THREADS 1 +# define OPT_SOLARIS_THREADS 1 /* # define OPT_XTHREADS 1 */ /* Defaulted by -DXTHREADS */ -# define OPT_GARBAGE_THREADS 1 -# define OPT_SOLARIS_THREADED_TRIES 10 -# endif +# define OPT_GARBAGE_THREADS 1 +# define OPT_SOLARIS_THREADED_TRIES 10 -/* Solaris 2.5 and above, supports clnt_create_timed(3N) */ -# if (OS_MINOR_VERSION >= 5) -# define OPT_HAS_CLNT_CREATE_TIMED 1 -# define OPT_CLNT_CREATE_TIMEOUT 30 -# endif - -/* TURN THESE OFF FOR NOW */ -# undef OPT_GARBAGE_IN_PARALLEL -# undef OPT_GARBAGE_THREADS +# define OPT_HAS_CLNT_CREATE_TIMED 1 +# define OPT_CLNT_CREATE_TIMEOUT 30 /* Turn ON/OFF parallel threads for garbage collection */ # if defined(OPT_DO_AUTO_GARBAGE_COLLECT) && defined(OPT_SOLARIS_THREADS) @@ -328,140 +236,23 @@ # define OPT_GARBAGE_THREADS 1 # else # define OPT_GARBAGE_IN_PARALLEL 0 /* used as a const */ -# undef OPT_GARBAGE_THREADS # endif #elif defined(__linux__) - -# undef OPT_UNIX_SOCKET_RPC -# undef OPT_TLI -# undef OPT_DLOPEN_X11 -# undef OPT_DLOPEN_CE -# undef OPT_ADDMSG_DIRECT -# undef OPT_SECURE_RPC -# undef OPT_CLASSING_ENGINE -# undef OPT_PATCH -# define OPT_POSIX_SIGNAL -# undef OPT_BSD_WAIT -# undef OPT_DGETTEXT -# define OPT_CATGETS -# undef OPT_GETDTABLESIZE -# undef OPT_SYSINFO -# define OPT_CPP_PATH "/usr/bin/cpp" -# define OPT_CPP_OPTIONS "" -# undef OPT_SVR4_GETMNTENT -# undef OPT_LOCKF_MNTENT -# define OPT_LOCAL_MOUNT_TYPE "ext2fs" -# undef OPT_OLD_RPC -# define OPT_DEFINE_SIG_PF -# define OPT_TAR_HAS_EXCLUDE_OPTION -# define OPT_HAS_REALPATH -# define OPT_AUTOMOUNT_PATH_FIX -# define OPT_BUG_RPCINTR -# undef OPT_XTHREADS # define OPT_CONST_CORRECT #elif defined(__OpenBSD__) -# undef OPT_UNIX_SOCKET_RPC -# undef OPT_TLI -# undef OPT_DLOPEN_X11 -# undef OPT_DLOPEN_CE -# undef OPT_ADDMSG_DIRECT -# undef OPT_SECURE_RPC -# undef OPT_CLASSING_ENGINE -# undef OPT_PATCH -# define OPT_POSIX_SIGNAL -# undef OPT_BSD_WAIT -# undef OPT_DGETTEXT -# define OPT_CATGETS -# undef OPT_GETDTABLESIZE -# undef OPT_SYSINFO -# define OPT_CPP_PATH "/usr/libexec/cpp" -# define OPT_CPP_OPTIONS "" -# undef OPT_SVR4_GETMNTENT -# undef OPT_LOCKF_MNTENT -# define OPT_LOCAL_MOUNT_TYPE MNTTYPE_UFS -# undef OPT_OLD_RPC -# define OPT_DEFINE_SIG_PF -# define OPT_TAR_HAS_EXCLUDE_OPTION -# define OPT_HAS_REALPATH -# define OPT_AUTOMOUNT_PATH_FIX -# define OPT_BUG_RPCINTR -# undef OPT_XTHREADS - #elif defined(__FreeBSD__) -# undef OPT_UNIX_SOCKET_RPC -# undef OPT_TLI -# undef OPT_DLOPEN_X11 -# undef OPT_DLOPEN_CE -# undef OPT_ADDMSG_DIRECT -# undef OPT_SECURE_RPC -# undef OPT_CLASSING_ENGINE -# undef OPT_PATCH -# define OPT_POSIX_SIGNAL -# undef OPT_BSD_WAIT -# undef OPT_DGETTEXT -# define OPT_CATGETS -# undef OPT_GETDTABLESIZE -# undef OPT_SYSINFO -# if defined(OSMAJORVERSION) && (OSMAJORVERSION >= 5) -# define OPT_CPP_PATH "/usr/bin/cpp" -# else -# define OPT_CPP_PATH "/usr/libexec/cpp" -# endif -# define OPT_CPP_OPTIONS "" -# undef OPT_SVR4_GETMNTENT -# undef OPT_LOCKF_MNTENT -# define OPT_LOCAL_MOUNT_TYPE MNTTYPE_UFS -# undef OPT_OLD_RPC -# define OPT_DEFINE_SIG_PF -# define OPT_TAR_HAS_EXCLUDE_OPTION -# define OPT_HAS_REALPATH -# define OPT_AUTOMOUNT_PATH_FIX -# define OPT_BUG_RPCINTR -# undef OPT_XTHREADS # define OPT_CONST_CORRECT #elif defined(__NetBSD__) -# undef OPT_UNIX_SOCKET_RPC -# undef OPT_TLI -# undef OPT_DLOPEN_X11 -# undef OPT_DLOPEN_CE -# undef OPT_ADDMSG_DIRECT -# undef OPT_SECURE_RPC -# undef OPT_CLASSING_ENGINE -# undef OPT_PATCH -# define OPT_POSIX_SIGNAL -# undef OPT_BSD_WAIT -# undef OPT_DGETTEXT -# define OPT_CATGETS -# undef OPT_GETDTABLESIZE -# undef OPT_SYSINFO -# define OPT_CPP_PATH "/usr/bin/cpp" -# define OPT_CPP_OPTIONS "" -# undef OPT_SVR4_GETMNTENT -# undef OPT_LOCKF_MNTENT -# define OPT_LOCAL_MOUNT_TYPE MNTTYPE_UFS -# undef OPT_OLD_RPC -# define OPT_DEFINE_SIG_PF -# define OPT_TAR_HAS_EXCLUDE_OPTION -# define OPT_HAS_REALPATH -# define OPT_AUTOMOUNT_PATH_FIX -# define OPT_BUG_RPCINTR -# undef OPT_XTHREADS # define OPT_CONST_CORRECT # define HAS_STATVFS #else /* Unknown configuration, complain */ -}}}} You must edit lib/tt_options.h and add a section defining the options for your configuration. - -#endif - -#ifdef CPP_PROGRAM -# undef OPT_CPP_PATH -# define OPT_CPP_PATH CPP_PROGRAM +#warning "Your system is unknown to us, things might not build properly without editing tt_options.h" #endif #endif /* _TT_OPTIONS_H */ diff --git a/cde/lib/tt/lib/util/tt_host.C b/cde/lib/tt/lib/util/tt_host.C index d608b57e1..87342ef71 100644 --- a/cde/lib/tt/lib/util/tt_host.C +++ b/cde/lib/tt/lib/util/tt_host.C @@ -45,9 +45,6 @@ extern "C" in_addr_t inet_addr(const char *); #include #include #include -#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) -#include -#endif #define X_INCLUDE_NETDB_H #define XOS_USE_XT_LOCKING diff --git a/cde/lib/tt/lib/util/tt_log.C b/cde/lib/tt/lib/util/tt_log.C index aaf4e1f36..5f8f3b2d3 100644 --- a/cde/lib/tt/lib/util/tt_log.C +++ b/cde/lib/tt/lib/util/tt_log.C @@ -34,9 +34,6 @@ #include #include -#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) -#include -#endif #define X_INCLUDE_TIME_H #define XOS_USE_XT_LOCKING diff --git a/cde/lib/tt/lib/util/tt_path.C b/cde/lib/tt/lib/util/tt_path.C index 7cc309c0d..0d3df63ce 100644 --- a/cde/lib/tt/lib/util/tt_path.C +++ b/cde/lib/tt/lib/util/tt_path.C @@ -59,23 +59,10 @@ #undef rindex #endif -// Not everybody has realpath() in libc, sometimes we have to define -// it ourselves, see realpath*.c in tt/lib - -#if !defined(OPT_HAS_REALPATH) - extern "C" { char *_tt_internal_realpath(char*, char*); } -#endif - -// Use the system realpath on OS's that have it, otherwise -// use the ToolTalk implementation of it. char * _tt_get_realpath(char *pathname, char *finalpath) { -#ifdef OPT_HAS_REALPATH return realpath(pathname, finalpath); -#else - return _tt_internal_realpath(pathname, finalpath); -#endif } /* diff --git a/cde/lib/tt/lib/util/tt_string.C b/cde/lib/tt/lib/util/tt_string.C index 8479da8a8..5d086d5ae 100644 --- a/cde/lib/tt/lib/util/tt_string.C +++ b/cde/lib/tt/lib/util/tt_string.C @@ -51,9 +51,7 @@ #include #include #include -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include -#endif #include "util/tt_string.h" #include "util/tt_assert.h" #include "util/tt_xdr_utils.h" diff --git a/cde/lib/tt/mini_isam/iscntl.c b/cde/lib/tt/mini_isam/iscntl.c index f243e5345..29c65e39c 100644 --- a/cde/lib/tt/mini_isam/iscntl.c +++ b/cde/lib/tt/mini_isam/iscntl.c @@ -36,11 +36,7 @@ * Generic control function */ -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include -#else -#include -#endif #include "isam_impl.h" @@ -76,25 +72,13 @@ typedef int (* intfunc)(); -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) int iscntl(int isfd, int func, ...) -#else -int -iscntl(isfd, func, va_alist) - int isfd; - int func; - va_dcl -#endif { va_list pvar; int ret; -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) va_start(pvar, func); -#else - va_start(pvar); -#endif switch (func) { case ISCNTL_MASKSIGNALS: diff --git a/cde/programs/dthelp/parser/canon1/helptag/global.h b/cde/programs/dthelp/parser/canon1/helptag/global.h index 482307f02..cd62e28a9 100644 --- a/cde/programs/dthelp/parser/canon1/helptag/global.h +++ b/cde/programs/dthelp/parser/canon1/helptag/global.h @@ -38,11 +38,9 @@ #include #include -#if defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) #include #include #include -#endif #define MAXHEADLINES 3 #define FNAMELEN 513 @@ -170,19 +168,11 @@ struct search { EXTERN SEARCH *path INIT(NULL) ; EXTERN SEARCH **endpath INIT(&path) ; EXTERN char dirsep -#if defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) INIT('/') -#else -****define directory separator here**** -#endif ; -#if defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) #define CSEP '/' #define SSEP "/" -#else -****define directory separator here**** -#endif /* Location in .TEX file of two \wlog messages */ EXTERN long wlog ; diff --git a/cde/programs/dthelp/parser/canon1/helptag/help.c b/cde/programs/dthelp/parser/canon1/helptag/help.c index ed96d7c76..4479c1619 100644 --- a/cde/programs/dthelp/parser/canon1/helptag/help.c +++ b/cde/programs/dthelp/parser/canon1/helptag/help.c @@ -349,10 +349,7 @@ m_free(string, "GetDefaultHeaderString return"); /* construct a qualified file name */ static int mb_getqualified(char *qualname, char *unqualname) { -#if defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) - FILE *f; -#endif char fn[FNAMELEN]; char tokstr [ 20 ], *gp, *p, *pp, *fnp, curdir[FNAMELEN-1]; int roomleft = FNAMELEN - 1; @@ -374,7 +371,6 @@ else fnp = fn; -#if defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) qualname[0] = '\0'; gp = qualname + strlen(qualname); roomleft = roomleft - strlen(qualname); @@ -402,49 +398,6 @@ else strcat(qualname,SSEP); roomleft--; } -#else -/* if MS-DOS, force to upper case, then get drive spec */ -strupr ( fn ); -if ( fn[1] == ':' ) { -strncpy ( qualname, fn, 2 ); -fnp += 2; -} -else { -getcwd(qualname, roomleft); -} -qualname[2] = '\0'; -gp = qualname + strlen ( qualname ); -roomleft = roomleft - strlen ( qualname ); -/* if path is from root, tack that on, else tack on the current - directory (for the referenced drive, if MS-DOS) */ -if ( *fnp == CSEP ) { -strcat ( qualname, SSEP ); -roomleft--; -++fnp; -} -else { -/* assume current directory always !!! */ -*gp = CSEP; -getcwd(curdir, FNAMELEN-1); -if (*curdir != *qualname) { - m_err1("Relative directory %s for non-current drive, can't qualify", - unqualname); - return (-1); - } -if (strlen(curdir) > 3) { - if ((strlen(curdir+3)+1) < roomleft) { /* "1" for SSEP */ - strcpy( gp+1, curdir+3 ); - strcat ( qualname, SSEP ); - roomleft = roomleft - strlen(curdir+3) - 1; /* "1" for SSEP */ - } - else { - m_err1("Internal error. File name too long for qualifying: %s", - unqualname); - return (-1); - } - } -} -#endif strcpy(tokstr, " \r\n\t"); strcat(tokstr, SSEP); @@ -488,11 +441,6 @@ do { while (1); *strrchr(qualname, CSEP) = '\0'; -#if defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) -#else -strupr ( qualname ); -#endif - return ( 0 ); } /* end mb_getqualified */ diff --git a/cde/programs/dthelp/parser/pass1/helptag/help.c b/cde/programs/dthelp/parser/pass1/helptag/help.c index 0cbd21cea..48c43af5d 100644 --- a/cde/programs/dthelp/parser/pass1/helptag/help.c +++ b/cde/programs/dthelp/parser/pass1/helptag/help.c @@ -350,9 +350,7 @@ m_free(string, "GetDefaultHeaderString return"); /* construct a qualified file name */ static int mb_getqualified(char *qualname, char *unqualname) { -#if defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) FILE *f; -#endif char fn[FNAMELEN]; char tokstr [ 20 ], *gp, *p, *pp, *fnp, curdir[FNAMELEN-1]; int roomleft = FNAMELEN - 1; @@ -374,7 +372,6 @@ else fnp = fn; -#if defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) qualname[0] = '\0'; gp = qualname + strlen(qualname); roomleft = roomleft - strlen(qualname); @@ -402,49 +399,6 @@ else strcat(qualname,SSEP); roomleft--; } -#else -/* if MS-DOS, force to upper case, then get drive spec */ -strupr ( fn ); -if ( fn[1] == ':' ) { -strncpy ( qualname, fn, 2 ); -fnp += 2; -} -else { -getcwd(qualname, roomleft); -} -qualname[2] = '\0'; -gp = qualname + strlen ( qualname ); -roomleft = roomleft - strlen ( qualname ); -/* if path is from root, tack that on, else tack on the current - directory (for the referenced drive, if MS-DOS) */ -if ( *fnp == CSEP ) { -strcat ( qualname, SSEP ); -roomleft--; -++fnp; -} -else { -/* assume current directory always !!! */ -*gp = CSEP; -getcwd(curdir, FNAMELEN-1); -if (*curdir != *qualname) { - m_err1("Relative directory %s for non-current drive, can't qualify", - unqualname); - return (-1); - } -if (strlen(curdir) > 3) { - if ((strlen(curdir+3)+1) < roomleft) { /* "1" for SSEP */ - strcpy( gp+1, curdir+3 ); - strcat ( qualname, SSEP ); - roomleft = roomleft - strlen(curdir+3) - 1; /* "1" for SSEP */ - } - else { - m_err1("Internal error. File name too long for qualifying: %s", - unqualname); - return (-1); - } - } -} -#endif strcpy(tokstr, " \r\n\t"); strcat(tokstr, SSEP); @@ -488,11 +442,6 @@ do { while (1); *strrchr(qualname, CSEP) = '\0'; -#if defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) -#else -strupr ( qualname ); -#endif - return ( 0 ); } /* end mb_getqualified */ diff --git a/cde/programs/dthelp/parser/pass2/htag2/global.h b/cde/programs/dthelp/parser/pass2/htag2/global.h index 5816d7221..b61a16547 100644 --- a/cde/programs/dthelp/parser/pass2/htag2/global.h +++ b/cde/programs/dthelp/parser/pass2/htag2/global.h @@ -38,11 +38,9 @@ #include #include -#if defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED) #include #include #include -#endif #ifndef MB_MAX_LEN #define MB_MAX_LEN 4 diff --git a/cde/programs/dtinfo/dtinfo/src/Other/WindowSystemMotif.C b/cde/programs/dtinfo/dtinfo/src/Other/WindowSystemMotif.C index e70c885b8..a371efca2 100644 --- a/cde/programs/dtinfo/dtinfo/src/Other/WindowSystemMotif.C +++ b/cde/programs/dtinfo/dtinfo/src/Other/WindowSystemMotif.C @@ -171,12 +171,7 @@ static unsigned char anno_double_bits[] = { 0x0a, 0x20, 0xea, 0x2f, 0x0a, 0x20, 0xea, 0x2f, 0x0a, 0x20, 0xfa, 0x3f, 0x02, 0x08, 0xfe, 0x0f, 0x00, 0x00}; -#if defined(SVR4) || defined(__linux__) || defined(CSRG_BASED) #include -#else -#include -#endif - #include #include diff --git a/cde/programs/dtinfo/dtinfo/src/Preferences/UserPreference.C b/cde/programs/dtinfo/dtinfo/src/Preferences/UserPreference.C index 8464aa805..340fc8732 100644 --- a/cde/programs/dtinfo/dtinfo/src/Preferences/UserPreference.C +++ b/cde/programs/dtinfo/dtinfo/src/Preferences/UserPreference.C @@ -63,9 +63,6 @@ #include #include #include -#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) -#include -#endif #include #include diff --git a/cde/programs/dtinfo/dtinfo/src/Query/QueryTermView.C b/cde/programs/dtinfo/dtinfo/src/Query/QueryTermView.C index d8b8652b6..cee1b8a47 100644 --- a/cde/programs/dtinfo/dtinfo/src/Query/QueryTermView.C +++ b/cde/programs/dtinfo/dtinfo/src/Query/QueryTermView.C @@ -77,9 +77,7 @@ #include #include -#if defined(SVR4) || defined(SYSV) || defined(__linux__) || defined(CSRG_BASED) #include -#endif #define CLASS QueryTermView diff --git a/cde/programs/dtinfo/dtinfo/src/Support/xList.hh b/cde/programs/dtinfo/dtinfo/src/Support/xList.hh index a4e2159a4..f7b56d698 100644 --- a/cde/programs/dtinfo/dtinfo/src/Support/xList.hh +++ b/cde/programs/dtinfo/dtinfo/src/Support/xList.hh @@ -71,20 +71,12 @@ private: }; template -#if defined(_IBMR2) || defined(__linux__) || defined(CSRG_BASED) || defined(sun) class xList : public List_base -#else -class xList : private List_base -#endif { // NOTE: This friend declaration is too general because cfront // barfs when I do it the correct way. 22:05 22-Jul-93 DJB #ifdef SC3 friend class List_Iterator; -#else -#if !defined(_IBMR2) && !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) -template friend class List_Iterator; -#endif #endif public: xList() { } @@ -118,11 +110,7 @@ public: template -#if defined(_IBMR2) || defined(__linux__) || defined(CSRG_BASED) || defined(sun) class List_Iterator : public List_Iterator_base -#else -class List_Iterator : private List_Iterator_base -#endif { friend class xList; public: diff --git a/cde/programs/dtinfo/dtinfo/wwl/include/WWL/WArgList.h b/cde/programs/dtinfo/dtinfo/wwl/include/WWL/WArgList.h index 47f9a305f..96733a57e 100644 --- a/cde/programs/dtinfo/dtinfo/wwl/include/WWL/WArgList.h +++ b/cde/programs/dtinfo/dtinfo/wwl/include/WWL/WArgList.h @@ -45,13 +45,8 @@ #define WArgList_h // Allow setting of resources by name in arg list -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #define CASTRNAM (char*) #define CASTVAL (void*)(size_t) -#else -#define CASTRNAM -#define CASTVAL -#endif #define RSRC_SET(RSC,TYP,RNAM) \ inline WArgList& RSC(TYP val) { return Add(CASTRNAM RNAM, CASTVAL val); } diff --git a/cde/programs/dtinfo/dtinfo/wwl/include/WWL/wwl.h b/cde/programs/dtinfo/dtinfo/wwl/include/WWL/wwl.h index 31632a601..4484177a7 100644 --- a/cde/programs/dtinfo/dtinfo/wwl/include/WWL/wwl.h +++ b/cde/programs/dtinfo/dtinfo/wwl/include/WWL/wwl.h @@ -45,19 +45,10 @@ #define wwl_h // Widget Wrapper Library by: -// -// ___ 0 Jean-Daniel Fekete uucp : jdf@lri.lri.fr -// / \ / LRI - Bat 490 bitnet: jdf@FRLRI61.bitnet -// / _/ / Universite de Paris-Sud voice : +33 (1) 69 41 65 91 -// /__ \/ F-91405 ORSAY Cedex +33 (1) 69 41 66 29 #include -#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) -#include -#else #define name2(__n1,__n2) __paste2(__n1,__n2) #define __paste2(__p1,__p2) __p1##__p2 -#endif #include #include "WXmString.h" @@ -78,13 +69,8 @@ class WComposite; typedef void (* XtProc)(); #endif -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #define CASTRNAM (char*) #define CASTVAL (void*)(size_t) -#else -#define CASTRNAM -#define CASTVAL -#endif #define DEFINE_GETTER(rsc,typ,rnam) \ inline typ rsc() const \ diff --git a/cde/programs/dtinfo/tools/misc/msgsets.C b/cde/programs/dtinfo/tools/misc/msgsets.C index 639fb839f..17b2dbfbf 100644 --- a/cde/programs/dtinfo/tools/misc/msgsets.C +++ b/cde/programs/dtinfo/tools/misc/msgsets.C @@ -42,11 +42,7 @@ #ifdef __cplusplus #include -#if !defined(__DECCXX) && !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) -#include -#else #include -#endif /* use prototypes in function declarations */ #define YY_USE_PROTOS diff --git a/cde/programs/dtlogin/config/Xconfig.src b/cde/programs/dtlogin/config/Xconfig.src index 05294ba94..6d474df3a 100644 --- a/cde/programs/dtlogin/config/Xconfig.src +++ b/cde/programs/dtlogin/config/Xconfig.src @@ -64,11 +64,7 @@ Dtlogin*startup: Xstartup Dtlogin*reset: Xreset Dtlogin*setup: Xsetup -#if defined (_AIX) || defined (sun) || defined(CSRG_BASED) || defined(__linux__) Dtlogin*failsafeClient: Xfailsafe -#else -Dtlogin*failsafeClient: /usr/bin/X11/xterm -#endif XCOMM ######################################################################### XCOMM To specify the system env vars to be exported to the users session diff --git a/cde/programs/dtlogin/dm.c b/cde/programs/dtlogin/dm.c index d81830a15..b73b24e5d 100644 --- a/cde/programs/dtlogin/dm.c +++ b/cde/programs/dtlogin/dm.c @@ -63,11 +63,7 @@ # include # include # include -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) # include -#else -# include -#endif #if defined(SYSV) || defined(SVR4) || defined(__linux__) #ifndef F_TLOCK diff --git a/cde/programs/dtlogin/genauth.c b/cde/programs/dtlogin/genauth.c index f3b192ddc..c9836bce9 100644 --- a/cde/programs/dtlogin/genauth.c +++ b/cde/programs/dtlogin/genauth.c @@ -213,7 +213,6 @@ bitsToBytes (unsigned long bits[2], char bytes[64]) * the OS's random number device. */ -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #define READ_LIMIT (sizeof (long) * 2) static int @@ -254,45 +253,6 @@ sumFile (char *name, long sum[2]) #undef READ_LIMIT -#else /* linux || CSRG_BASED */ - -static int -sumFile (char *name, long sum[2]) -{ - long buf[1024*2]; - int cnt; - int fd; - int loops; - int reads; - int i; - int ret_status = 0; - - fd = open (name, 0); - if (fd < 0) { - LogError((unsigned char *) "Cannot open randomFile \"%s\", errno = %d\n", name, errno); - return 0; - } -#ifdef FRAGILE_DEV_MEM - if (strcmp(name, "/dev/mem") == 0) lseek (fd, (off_t) 0x100000, SEEK_SET); -#endif - reads = FILE_LIMIT; - sum[0] = 0; - sum[1] = 0; - while ((cnt = read (fd, (char *) buf, sizeof (buf))) > 0 && --reads > 0) { - loops = cnt / (2 * sizeof (long)); - for (i = 0; i < loops; i+= 2) { - sum[0] += buf[i]; - sum[1] += buf[i+1]; - ret_status = 1; - } - } - if (cnt < 0) - LogError((unsigned char *) "Cannot read randomFile \"%s\", errno = %d\n", name, errno); - close (fd); - return ret_status; -} -#endif /* linux || CSRG_BASED */ - void GenerateAuthData (char *auth, int len) { diff --git a/cde/programs/dtmail/include/DtMail/Buffer.hh b/cde/programs/dtmail/include/DtMail/Buffer.hh index 1f2232740..88d41e576 100644 --- a/cde/programs/dtmail/include/DtMail/Buffer.hh +++ b/cde/programs/dtmail/include/DtMail/Buffer.hh @@ -125,9 +125,6 @@ class BufferMemory : public Buffer { virtual int getSize(void); // get total size of the buffer private: -#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun) - class Chunk; -#endif BufferMemory(const Buffer&); // try and avoid copies void initBuffer(int size); // common constructor diff --git a/cde/programs/dtmail/libDtMail/RFC/RFCTransport.C b/cde/programs/dtmail/libDtMail/RFC/RFCTransport.C index 00ddf4633..a6e5dda99 100644 --- a/cde/programs/dtmail/libDtMail/RFC/RFCTransport.C +++ b/cde/programs/dtmail/libDtMail/RFC/RFCTransport.C @@ -975,14 +975,7 @@ RFCTransport::signalRegister(void) if (initialized) return; initialized = 1; -#if defined(_aix) || defined(__linux__) || \ - (defined(sun) && OSMAJORVERSION>=5 && OSMINORVERSION>4) || defined(CSRG_BASED) - // SunOS 5.5 and above defined prototype for signal handler act.sa_handler = (void (*)(int))&RFCTransport::childHandler; -#else - // SunOS 5.4 and before defined prototype signal handler - act.sa_handler = (void (*)())&RFCTransport::childHandler; -#endif sigemptyset(&act.sa_mask); sigaddset(&act.sa_mask, SIGCHLD); act.sa_flags = 0; diff --git a/cde/programs/dtscreen/usleep.c b/cde/programs/dtscreen/usleep.c index 834c41ab2..9dda981c3 100644 --- a/cde/programs/dtscreen/usleep.c +++ b/cde/programs/dtscreen/usleep.c @@ -41,22 +41,6 @@ #include "dtscreen.h" -#if !defined(_AIX) && !defined(__linux__) && !defined(sun) && !defined(CSRG_BASED) -int -usleep(unsigned long usec) -{ -#ifdef SYSV - poll((struct poll *) 0, (size_t) 0, usec / 1000); /* ms resolution */ -#else - struct timeval timeout; - timeout.tv_usec = usec % (unsigned long) 1000000; - timeout.tv_sec = usec / (unsigned long) 1000000; - select(0, (void *) 0, (void *) 0, (void *) 0, &timeout); -#endif - return 0; -} -#endif /* !_AIX && */ - /* * returns the number of seconds since 01-Jan-70. * This is used to control rate and timeout in many of the animations. diff --git a/cde/programs/dtscreen/worm.c b/cde/programs/dtscreen/worm.c index 4fce9758b..afe8aa0d9 100644 --- a/cde/programs/dtscreen/worm.c +++ b/cde/programs/dtscreen/worm.c @@ -88,15 +88,6 @@ typedef struct { int size[MAXCOLORS]; } wormstruct; -#if !defined(CSRG_BASED) && !defined(sun) && !defined(__linux__) -int -round(float x) -{ - return ((int) floor((double) x)); -} -#endif - - void worm_doit(perwindow *pwin, wormstruct *wp, int which, unsigned long color) { diff --git a/cde/programs/dtsearchpath/dtappg/Options.C b/cde/programs/dtsearchpath/dtappg/Options.C index ffaf55e10..2752f0505 100644 --- a/cde/programs/dtsearchpath/dtappg/Options.C +++ b/cde/programs/dtsearchpath/dtappg/Options.C @@ -31,11 +31,7 @@ #include "Options.h" #include -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include -#else -#include -#endif #include #include diff --git a/cde/programs/dtsearchpath/dtappg/dtappgather.C b/cde/programs/dtsearchpath/dtappg/dtappgather.C index 5ed0c8b70..beef8c26e 100644 --- a/cde/programs/dtsearchpath/dtappg/dtappgather.C +++ b/cde/programs/dtsearchpath/dtappg/dtappgather.C @@ -75,11 +75,7 @@ #include "dtappgather.h" #include "DirIterator.h" #include -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include -#else -#include -#endif Options * options; @@ -88,7 +84,7 @@ void LegacyCleanUp CDEEnvironment * user ) { - + //XXX: // For now, remove the old ApplicationManager subdirectory // so that we don't leave old CDE users with extra baggage // under $HOME. diff --git a/cde/programs/dtsearchpath/dtsp/ManSearchPath.C b/cde/programs/dtsearchpath/dtsp/ManSearchPath.C index 2aca2d54c..ca4b1b398 100644 --- a/cde/programs/dtsearchpath/dtsp/ManSearchPath.C +++ b/cde/programs/dtsearchpath/dtsp/ManSearchPath.C @@ -136,25 +136,13 @@ void ManSearchPath::Print() } } -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) std::ostream & operator<< ( std::ostream & os, const ManSearchPath & sp ) -#else -ostream & operator<< - ( - ostream & os, - const ManSearchPath & sp - ) -#endif { -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) os << sp.GetEnvVar() << std::endl; -#else - os << sp.GetEnvVar() << endl; -#endif sp.PrettyPrint(os); return os; } diff --git a/cde/programs/dtsearchpath/dtsp/Options.C b/cde/programs/dtsearchpath/dtsp/Options.C index 1edfcc3f9..1ef9c16bd 100644 --- a/cde/programs/dtsearchpath/dtsp/Options.C +++ b/cde/programs/dtsearchpath/dtsp/Options.C @@ -33,11 +33,7 @@ #include "Options.h" #include -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include -#else -#include -#endif #include #include diff --git a/cde/programs/dtsearchpath/dtsp/SearchPath.C b/cde/programs/dtsearchpath/dtsp/SearchPath.C index 55334856d..d4838ef4b 100644 --- a/cde/programs/dtsearchpath/dtsp/SearchPath.C +++ b/cde/programs/dtsearchpath/dtsp/SearchPath.C @@ -387,33 +387,18 @@ void SearchPath::Print() * ****************************************************************/ -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) void SearchPath::PrettyPrint ( std::ostream & os ) const -#else -void SearchPath::PrettyPrint - ( - ostream & os - ) const -#endif { CTokenizedString path (GetSearchPath(), Separator().data()); CString subpath = path.next(); while (!subpath.isNull()) { -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) os << " " << subpath << std::endl; -#else - os << " " << subpath << endl; -#endif subpath = path.next(); } -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) os << std::endl; -#else - os << endl; -#endif } @@ -424,25 +409,13 @@ void SearchPath::PrettyPrint * ****************************************************************/ -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) std::ostream & operator<< ( std::ostream & os, const SearchPath & sp ) -#else -ostream & operator<< - ( - ostream & os, - const SearchPath & sp - ) -#endif { -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) os << sp.GetEnvVar() << "SEARCHPATH:" << std::endl; -#else - os << sp.GetEnvVar() << "SEARCHPATH:" << endl; -#endif sp.PrettyPrint(os); return os; } diff --git a/cde/programs/dtsearchpath/dtsp/SearchPath.h b/cde/programs/dtsearchpath/dtsp/SearchPath.h index 841648768..a81727a7b 100644 --- a/cde/programs/dtsearchpath/dtsp/SearchPath.h +++ b/cde/programs/dtsearchpath/dtsp/SearchPath.h @@ -34,11 +34,7 @@ #include "Environ.h" #include "cstring.h" -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include -#else -#include -#endif #include class SearchPath { @@ -51,15 +47,9 @@ class SearchPath { virtual void Print(); virtual void AddPredefinedPath(); -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) virtual void PrettyPrint (std::ostream &) const; friend std::ostream & operator<< (std::ostream &, const SearchPath &); -#else - virtual void PrettyPrint (ostream &) const; - - friend ostream & operator<< (ostream &, const SearchPath &); -#endif const char * GetEnvVar() const { return environment_var; } CString GetSearchPath() const { return final_search_path; } @@ -186,11 +176,7 @@ class ManSearchPath : public SearchPath { virtual void ExportPath (); virtual void Print(); -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) friend std::ostream & operator<< (std::ostream &, const ManSearchPath &); -#else - friend ostream & operator<< (ostream &, const ManSearchPath &); -#endif protected: virtual void MakePath (const CString &); diff --git a/cde/programs/dtsearchpath/libCliSrv/TTFile.C b/cde/programs/dtsearchpath/libCliSrv/TTFile.C index 8349cb391..2d01f67a2 100644 --- a/cde/programs/dtsearchpath/libCliSrv/TTFile.C +++ b/cde/programs/dtsearchpath/libCliSrv/TTFile.C @@ -95,32 +95,15 @@ TTFile & TTFile::operator= return *this; } -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) std::ostream & operator<< ( std::ostream & os, TTFile & file ) -#else -ostream & operator<< - ( - ostream & os, - TTFile & file - ) -#endif { if (file.ttFileOpFailed()) -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) return os << "Error in filename mapping; status = " << file.getStatus() << std::endl; -#else - return os << "Error in filename mapping; status = " - << file.getStatus() << endl; -#endif else -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) return os << file.data() << std::endl; -#else - return os << file.data() << endl; -#endif } diff --git a/cde/programs/dtsearchpath/libCliSrv/TTFile.h b/cde/programs/dtsearchpath/libCliSrv/TTFile.h index 9753fa246..fb9294ed7 100644 --- a/cde/programs/dtsearchpath/libCliSrv/TTFile.h +++ b/cde/programs/dtsearchpath/libCliSrv/TTFile.h @@ -65,11 +65,7 @@ class TTFile : public CString { }; #else void TT_Exception (char *); -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) friend std::ostream & operator<< (std::ostream &, TTFile &); -#else - friend ostream & operator<< (ostream &, TTFile &); -#endif #endif int ttFileOpFailed () { return status != TT_OK; } diff --git a/cde/programs/dtsearchpath/libCliSrv/UnixEnv.C b/cde/programs/dtsearchpath/libCliSrv/UnixEnv.C index f3bd8d631..51a1fe9df 100644 --- a/cde/programs/dtsearchpath/libCliSrv/UnixEnv.C +++ b/cde/programs/dtsearchpath/libCliSrv/UnixEnv.C @@ -34,11 +34,7 @@ #include #include #include -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include -#else -#include -#endif #include #include #include @@ -50,10 +46,8 @@ #endif #include -#if defined(sun) || defined(_AIX) || defined(__linux__) || defined(CSRG_BASED) #define UID_NO_CHANGE ((uid_t) -1) #define GID_NO_CHANGE ((gid_t) -1) -#endif UnixEnvironment::UnixEnvironment() { diff --git a/cde/programs/dtsearchpath/libCliSrv/cstring.C b/cde/programs/dtsearchpath/libCliSrv/cstring.C index 828291129..c5901c00d 100644 --- a/cde/programs/dtsearchpath/libCliSrv/cstring.C +++ b/cde/programs/dtsearchpath/libCliSrv/cstring.C @@ -566,19 +566,11 @@ int i; } } -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) std::ostream & operator<< ( std::ostream & os, const CString & s ) -#else -ostream & operator<< - ( - ostream & os, - const CString & s - ) -#endif { if (s.isNull()) return os << "(null)"; diff --git a/cde/programs/dtsearchpath/libCliSrv/cstring.h b/cde/programs/dtsearchpath/libCliSrv/cstring.h index e2c785238..b9aed7b52 100644 --- a/cde/programs/dtsearchpath/libCliSrv/cstring.h +++ b/cde/programs/dtsearchpath/libCliSrv/cstring.h @@ -32,11 +32,7 @@ #ifndef _CSTRING_H_ #define _CSTRING_H_ -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include -#else -#include -#endif #include class CString { @@ -72,11 +68,7 @@ class CString { int isNull() const; void replace (const CString &, const CString &); -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) friend std::ostream & operator<< (std::ostream &, const CString &); -#else - friend ostream & operator<< (ostream &, const CString &); -#endif protected: char * contents; diff --git a/cde/programs/dtsession/Makefile.am b/cde/programs/dtsession/Makefile.am index bc8830826..22834c7a1 100644 --- a/cde/programs/dtsession/Makefile.am +++ b/cde/programs/dtsession/Makefile.am @@ -65,7 +65,6 @@ endif if FREEBSD LOCAL_CPP_DEFINES += -DFREEBSD -D__FreeBSD__ -SUBDIRS += config endif if SOLARIS @@ -78,7 +77,6 @@ endif if NETBSD LOCAL_CPP_DEFINES += -D__NetBSD__ -SUBDIRS += config endif if BSD diff --git a/cde/programs/dtudcfonted/libfuty/getfname.c b/cde/programs/dtudcfonted/libfuty/getfname.c index 167a3135b..36f6cbf52 100644 --- a/cde/programs/dtudcfonted/libfuty/getfname.c +++ b/cde/programs/dtudcfonted/libfuty/getfname.c @@ -945,11 +945,7 @@ GetUdcFontName( { FILE *fp ; pid_t chld_pid = 0; -#if defined( SVR4 ) || defined( SYSV ) || defined(CSRG_BASED) || defined(__linux__) int chld_stat ; -#else - union wait chld_stat ; -#endif struct ptobhead head ; char *p, *tmp_font ; char readbuf[BUFSIZE], fntbuf[BUFSIZE] ; diff --git a/cde/programs/dtudcfonted/libfuty/oakfuty.c b/cde/programs/dtudcfonted/libfuty/oakfuty.c index a10d3ed37..49e91a05b 100644 --- a/cde/programs/dtudcfonted/libfuty/oakfuty.c +++ b/cde/programs/dtudcfonted/libfuty/oakfuty.c @@ -163,12 +163,7 @@ WriteBdfHeader( struct ptobhead *head ) char buf[BUFSIZE], *p; pid_t chld_pid = 0; -#if defined( SVR4 ) || defined( SYSV ) || defined(CSRG_BASED) || defined(__linux__) int chld_stat ; -#else - union wait chld_stat ; -#endif - if (head->snf_file != NULL) { if (pipe(fd) != 0) { diff --git a/cde/programs/dtwm/WmFunction.c b/cde/programs/dtwm/WmFunction.c index 869b9a2fa..534e006ef 100644 --- a/cde/programs/dtwm/WmFunction.c +++ b/cde/programs/dtwm/WmFunction.c @@ -98,7 +98,7 @@ extern XmMenuState _XmGetMenuState(); static unsigned int GetEventInverseMask(XEvent *event); -#if (defined(__linux__) || defined(sun) || defined(CSRG_BASED)) && !defined(_NFILE) +#if !defined(_NFILE) #define _NFILE FOPEN_MAX #endif diff --git a/cde/programs/localized/templates/French.am b/cde/programs/localized/templates/French.am index 8ba41d1e7..c2a4b35f4 100644 --- a/cde/programs/localized/templates/French.am +++ b/cde/programs/localized/templates/French.am @@ -3,12 +3,6 @@ if SOLARIS LANG=fr -endif - -if LINUX -LANG=fr_FR.UTF-8 -endif - -if BSD +else LANG=fr_FR.UTF-8 endif diff --git a/cde/programs/localized/templates/German.am b/cde/programs/localized/templates/German.am index dc3dbf200..57cf3ff0e 100644 --- a/cde/programs/localized/templates/German.am +++ b/cde/programs/localized/templates/German.am @@ -3,12 +3,6 @@ if SOLARIS LANG=de -endif - -if LINUX -LANG=de_DE.UTF-8 -endif - -if BSD +else LANG=de_DE.UTF-8 endif diff --git a/cde/programs/localized/templates/Italian.am b/cde/programs/localized/templates/Italian.am index 205330944..e4d6746bd 100644 --- a/cde/programs/localized/templates/Italian.am +++ b/cde/programs/localized/templates/Italian.am @@ -3,12 +3,6 @@ if SOLARIS LANG=it -endif - -if LINUX -LANG=it_IT.UTF-8 -endif - -if BSD +else LANG=it_IT.UTF-8 endif diff --git a/cde/programs/localized/templates/Japanese.am b/cde/programs/localized/templates/Japanese.am index 433cfd2b8..99028fd9a 100644 --- a/cde/programs/localized/templates/Japanese.am +++ b/cde/programs/localized/templates/Japanese.am @@ -3,12 +3,6 @@ if SOLARIS LANG=ja -endif - -if LINUX -LANG=ja_JP.UTF-8 -endif - -if BSD +else LANG=ja_JP.UTF-8 endif diff --git a/cde/programs/localized/templates/Spanish.am b/cde/programs/localized/templates/Spanish.am index 4e4c2efac..2678c7492 100644 --- a/cde/programs/localized/templates/Spanish.am +++ b/cde/programs/localized/templates/Spanish.am @@ -3,12 +3,6 @@ if SOLARIS LANG=es -endif - -if LINUX -LANG=es_ES.UTF-8 -endif - -if BSD +else LANG=es_ES.UTF-8 endif diff --git a/cde/programs/ttsnoop/tt_c++.h b/cde/programs/ttsnoop/tt_c++.h index a7af12ac0..c5c0165c3 100644 --- a/cde/programs/ttsnoop/tt_c++.h +++ b/cde/programs/ttsnoop/tt_c++.h @@ -29,12 +29,8 @@ #ifndef TT_CXX_H #define TT_CXX_H -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) #include using namespace std; -#else -#include -#endif #include diff --git a/cde/programs/ttsnoop/ttsnoop.C.src b/cde/programs/ttsnoop/ttsnoop.C.src index f9a590241..2173edfdc 100644 --- a/cde/programs/ttsnoop/ttsnoop.C.src +++ b/cde/programs/ttsnoop/ttsnoop.C.src @@ -190,12 +190,10 @@ signalHandler( } } -#if defined(SVR4) || defined(aix) || defined(__linux__) || defined(CSRG_BASED) #if !defined(SIG_PF) typedef void (*sig_pf_t)(int); #define SIG_PF sig_pf_t #endif -#endif int _tt_sigset( From 2d355712eadd50c29e5889aceaa2faf464586a75 Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Sat, 6 Aug 2022 12:24:10 -0600 Subject: [PATCH 13/75] C locales: recursively delete C locale directories on make install In previous versions of CDE (<2.5.0), these were directories with en_US symlinked to them. Attempting to do a 'make install' with 2.5.0 would yield errors since only a non-recursive 'rm' was being done. On 2.5.0+, these are symlinks to the en_US versions now. --- cde/doc/en_US.UTF-8/guides/Makefile.am | 2 +- cde/doc/en_US.UTF-8/help/Makefile.am | 2 +- cde/programs/localized/C/msg/Makefile.am | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cde/doc/en_US.UTF-8/guides/Makefile.am b/cde/doc/en_US.UTF-8/guides/Makefile.am index 776dc50c4..c07f3dd97 100644 --- a/cde/doc/en_US.UTF-8/guides/Makefile.am +++ b/cde/doc/en_US.UTF-8/guides/Makefile.am @@ -73,5 +73,5 @@ CLEANFILES += $(cdedti_DATA) $(cdedtidoc_DATA) $(cdedtidocsearch_DATA) # link the en_US.UTF-8 version to C install-data-hook: - $(RM) $(DESTDIR)$(CDE_INSTALLATION_TOP)/infolib/C + $(RM) -rf $(DESTDIR)$(CDE_INSTALLATION_TOP)/infolib/C cd $(DESTDIR)$(CDE_INSTALLATION_TOP)/infolib && $(LN_S) en_US.UTF-8 C diff --git a/cde/doc/en_US.UTF-8/help/Makefile.am b/cde/doc/en_US.UTF-8/help/Makefile.am index b9f15fac3..898dc0676 100644 --- a/cde/doc/en_US.UTF-8/help/Makefile.am +++ b/cde/doc/en_US.UTF-8/help/Makefile.am @@ -13,5 +13,5 @@ include $(top_srcdir)/doc/common/help/sdl-data.am # need to setup a symlink for the C locale to point toward en_US install-data-hook: - $(RM) $(DESTDIR)$(CDE_INSTALLATION_TOP)/appconfig/help/C + $(RM) -rf $(DESTDIR)$(CDE_INSTALLATION_TOP)/appconfig/help/C cd $(DESTDIR)$(CDE_INSTALLATION_TOP)/appconfig/help/ && $(LN_S) en_US.UTF-8 C diff --git a/cde/programs/localized/C/msg/Makefile.am b/cde/programs/localized/C/msg/Makefile.am index 4d1730ce4..bade8fa17 100644 --- a/cde/programs/localized/C/msg/Makefile.am +++ b/cde/programs/localized/C/msg/Makefile.am @@ -5,5 +5,5 @@ include ../../templates/msg.C.am # Setup a symlink from C -> en_US.UTF-8 install-data-hook: - $(RM) $(DESTDIR)$(CDE_INSTALLATION_TOP)/lib/nls/msg/en_US.UTF-8 + $(RM) -rf $(DESTDIR)$(CDE_INSTALLATION_TOP)/lib/nls/msg/en_US.UTF-8 cd $(DESTDIR)$(CDE_INSTALLATION_TOP)/lib/nls/msg/ && $(LN_S) C en_US.UTF-8 From a3e491d64853dfe16ab63ba1e0734ab3ca03b5f2 Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Sat, 6 Aug 2022 13:09:01 -0600 Subject: [PATCH 14/75] doc: re-enable building the dtinfo guides on netbsd As long as you have enough space in /tmp (10MB is the default! change this!) these will build fine. --- cde/doc/en_US.UTF-8/Makefile.am | 5 ----- 1 file changed, 5 deletions(-) diff --git a/cde/doc/en_US.UTF-8/Makefile.am b/cde/doc/en_US.UTF-8/Makefile.am index a8b049e27..08b152303 100644 --- a/cde/doc/en_US.UTF-8/Makefile.am +++ b/cde/doc/en_US.UTF-8/Makefile.am @@ -1,8 +1,3 @@ MAINTAINERCLEANFILES = Makefile.in -if !NETBSD SUBDIRS = m-guides man guides help -else -# building the guides on netbsd (9.2) doesn't work currently -SUBDIRS = m-guides man help -endif From 37367d5e122e9dcea9eac04d588906ccceb6e772 Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Sat, 6 Aug 2022 15:31:36 -0600 Subject: [PATCH 15/75] libtt: remove OPT_LOCAL_MOUNT_TYPE, OS_VERSION - never used anywhere OS_VERSION was used with a '#if defined(sun)', but since it was never set anywhere it just omitted that block. If the block turns up to be broken on sun systems, then someone will fix it properly. --- cde/lib/tt/lib/tt_options.h | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/cde/lib/tt/lib/tt_options.h b/cde/lib/tt/lib/tt_options.h index 09631f10e..52114ad41 100644 --- a/cde/lib/tt/lib/tt_options.h +++ b/cde/lib/tt/lib/tt_options.h @@ -103,8 +103,6 @@ * OPT_LOCKF_MNTTAB - set to hold a lockf lock on MNTTAB while doing * getmntents. * - * OPT_LOCAL_MOUNT_TYPE -- mount type in mntent for local disks. - * * OPT_DEFINE_SIG_PF - define if SIG_PF (=type of pointer to signal * handler function) isn't defined in system includes * @@ -197,25 +195,18 @@ #define OPT_DEFINE_SIG_PF #endif -#ifdef __linux__ -#define OPT_LOCAL_MOUNT_TYPE "ext2fs" -#else -#define OPT_LOCAL_MOUNT_TYPE MNTTYPE_UFS -#endif - #define OPT_POSIX_SIGNAL #define OPT_CATGETS #define OPT_TAR_HAS_EXCLUDE_OPTION #if defined(_AIX) # undef OPT_BUG_RPCINTR -# undef OPT_LOCAL_MOUNT_TYPE # undef OPT_TAR_HAS_EXCLUDE_OPTION # define OPT_BUG_AIX # define OPT_GETDTABLESIZE /* # define OPT_XTHREADS 1 */ /* Defaulted by -DXTHREADS */ -#elif defined(sun) && (OS_VERSION >= 5) +#elif defined(sun) # define OPT_TLI # define OPT_SECURE_RPC # define OPT_SYSINFO From 6fddca178f836f11815ca94ac0a336dbb5ff19bb Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Sat, 6 Aug 2022 15:57:35 -0600 Subject: [PATCH 16/75] dtlogin: remove HP BLS B1 simple authentication support (BLS) --- cde/programs/dtlogin/bls/bls.h | 112 ---- cde/programs/dtlogin/bls/debug.c | 140 ----- cde/programs/dtlogin/bls/get_level.c | 666 --------------------- cde/programs/dtlogin/bls/validate.c | 830 --------------------------- cde/programs/dtlogin/dm.h | 12 - cde/programs/dtlogin/resource.c | 6 - cde/programs/dtlogin/session.c | 113 +--- cde/programs/dtlogin/sysauth.c | 2 - cde/programs/dtlogin/sysauth.h | 4 - cde/programs/dtlogin/vg.h | 4 - cde/programs/dtlogin/vgauth.c | 2 - cde/programs/dtlogin/vgcallback.c | 71 --- cde/programs/dtlogin/vgmain.c | 25 - 13 files changed, 2 insertions(+), 1985 deletions(-) delete mode 100644 cde/programs/dtlogin/bls/bls.h delete mode 100644 cde/programs/dtlogin/bls/debug.c delete mode 100644 cde/programs/dtlogin/bls/get_level.c delete mode 100644 cde/programs/dtlogin/bls/validate.c diff --git a/cde/programs/dtlogin/bls/bls.h b/cde/programs/dtlogin/bls/bls.h deleted file mode 100644 index 74f8a4164..000000000 --- a/cde/programs/dtlogin/bls/bls.h +++ /dev/null @@ -1,112 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* - * xdm - display manager daemon - * - * $XConsortium: bls.h /main/4 1996/10/30 11:35:48 drk $ - * - * Copyright 1988 Massachusetts Institute of Technology - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, provided - * that the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of M.I.T. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. M.I.T. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * Author: Keith Packard, MIT X Consortium - */ - -/* - * bls.h - * - * public interfaces for B1 greet/verify functionality - */ - - -#ifndef _BLS_H -#define _BLS_H - -typedef unsigned char BOOL; - -#ifndef FALSE -#define FALSE 0 -#endif - -#ifndef TRUE -#define TRUE 1 -#endif - -#ifdef BLS -#include -#include /* for passwd and pr_passwd */ -#endif - -#ifdef pegasus -#undef dirty /* Some bozo put a macro called dirty in sys/param.h */ -#endif /* pegasus */ - -struct greet_info { - char *name; /* user name */ - char *password; /* user password */ -#ifdef BLS - char *b1security; /* user's b1 security */ -#endif - char *string; /* random string */ -}; - -struct verify_info { - int uid; /* user id */ -#ifdef NGROUPS - int groups[NGROUPS];/* group list */ - int ngroups; /* number of elements in groups */ -#else - int gid; /* group id */ -#endif - char **argv; /* arguments to session */ - char **userEnviron; /* environment for session */ - char **systemEnviron;/* environment for startup/reset */ -#ifdef BLS - char *user_name; - struct mand_ir_t *sec_label_ir; - struct mand_ir_t *clearance_ir; - /* save these for logout time */ - struct pr_passwd *prpwd; - struct passwd *pwd; - char terminal[16]; -#endif -}; - -/*************************************************************************** - * - * Global variables - * - ***************************************************************************/ -extern struct pr_passwd *b1_pwd; -extern struct verify_info *verify; -extern struct greet_info *greet; - -#endif /* _BLS_H */ diff --git a/cde/programs/dtlogin/bls/debug.c b/cde/programs/dtlogin/bls/debug.c deleted file mode 100644 index dd38c8ac8..000000000 --- a/cde/programs/dtlogin/bls/debug.c +++ /dev/null @@ -1,140 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* - * xdm - display manager daemon - * - * $XConsortium: debug.c /main/3 1995/07/14 13:23:25 drk $ - * - * Copyright 1988 Massachusetts Institute of Technology - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, provided - * that the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of M.I.T. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. M.I.T. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * Author: Keith Packard, MIT X Consortium - */ - - /*************** - debug.c - ****************/ - -#ifndef NDEBUG -/* don't compile anything in this file unless this is pre-release code */ -#include -#include -#include "../vg.h" -#include "bls.h" - -# include -# define Va_start(a,b) va_start(a,b) - -char *DisplayName=NULL; - - -/**************************************************************************** - * - * Debug - * - * Write a debug message to stderr - * - ****************************************************************************/ - -static int DoName=TRUE; -static int debugLevel=0; - - -int -BLS_ToggleDebug( int arg) -{ - debugLevel = !debugLevel; - (void) signal(SIGHUP,BLS_ToggleDebug); -} - - - -void -Debug( char *fmt, ...) -{ - static int sentinel = 0; - static char *debugLog; - - va_list args; - - Va_start(args,fmt); - - - - if ( !sentinel ) { - /* - * open up an error log for dtgreet - */ - if ((debugLog = getenv("VG_DEBUG")) == 0) - debugLog = "/usr/lib/X11/dt/Dtlogin/dtgreet.log"; - - if ( !freopen(debugLog,"a",stderr)) { - perror("Debug:"); - } - DisplayName=dpyinfo.name; - sentinel = 1; - } - - if (debugLevel > 0) - { - if ( strlen(DisplayName) > 0 && DoName) - fprintf(stderr, "(%s) ", DisplayName); - - vfprintf (stderr,fmt, args); - fflush (stderr); - - /* - * don't prepend the display name next time if this debug message - * does not contain a "new line" character... - */ - - if ( strchr(fmt,'\n') == NULL ) - DoName=FALSE; - else - DoName=TRUE; - - } - - va_end(args); -} - -#else - -/* - * Debug stub for product purposes - */ - -void -Debug( ) -{ } - -#endif /* NDEBUG */ diff --git a/cde/programs/dtlogin/bls/get_level.c b/cde/programs/dtlogin/bls/get_level.c deleted file mode 100644 index 8f06d59d4..000000000 --- a/cde/programs/dtlogin/bls/get_level.c +++ /dev/null @@ -1,666 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: get_level.c /main/4 1995/10/27 16:19:39 rswiston $ */ -/* - * get_level.c - * last modified by: - * David Dolson June 7/92 - * - rewrote most of B1 security routines. Much of it is based on - * parallel routines in login. - * Ron Voll July 7/92 - * - rolled the xdm version of this file into dtlogin. - */ - -#ifdef BLS /* Brackets entire file */ -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef SEC_NET_TTY -#include -#include -#include -#endif - -#include -#include -#include -#include -#if defined(TAC3) && !defined(TPLOGIN) -#include -#include -#include -#endif -#include -#include -#include -#include -#include -#if 0 -#include -#endif -#include -#include - -/* - * Local include file for bls specific definitions. - * Also defines some of the structures from dm.h for bls usage. - */ -#include "bls.h" - -/* drop those privs from the base set which are not needed by xdm */ -void -drop_privs(void) -{ - priv_t privs[SEC_SPRIVVEC_SIZE]; - - getpriv(SEC_BASE_PRIV, privs); - RMBIT(privs, SEC_ALLOWNETACCESS); - RMBIT(privs, SEC_NETPRIVSESSION); - RMBIT(privs, SEC_NETNOAUTH); - RMBIT(privs, SEC_MULTILEVELDIR); - setpriv(SEC_BASE_PRIV, privs); - return; -} - -/* stuff to do at the start */ -void -init_security(void) -{ - /* set default file creation mode to be restrictive */ - umask(~SEC_DEFAULT_MODE); - drop_privs(); -} - -/* check that the requested security level is valid for this user, - * return 1 = success, return 0 is fail(fatal) - */ -int -verify_user_seclevel( struct verify_info verify, char *desired_label) -{ - int uid; - mand_ir_t *dl_ir, *clearance_ir; - struct pr_passwd *prpwd; - struct passwd *pwd; - - prpwd = verify->prpwd; - pwd = verify->pwd; - uid = verify->uid; - - /* check that desired_label falls within user's range */ - dl_ir = mand_er_to_ir(desired_label); - if (dl_ir ==NULL) { - audit_login(prpwd, pwd, verify->terminal, - "Unknown clearance level", ES_LOGIN_FAILED); - Debug("unable to translate clearance\n"); - return 0; - } - /* get user clearance from prpwd database */ - if (prpwd->uflg.fg_clearance) - clearance_ir = &prpwd->ufld.fd_clearance; - else if (prpwd->sflg.fg_clearance) - clearance_ir = &prpwd->sfld.fd_clearance; - else - clearance_ir = mand_syslo; - - /* make sure clearance dominates or equals desired_label */ - switch(mand_ir_relationship(/* subject */ dl_ir, - /* object */ clearance_ir)) { - case MAND_ODOM: - case MAND_EQUAL: - /* Within range */ - break; - default: - audit_login(prpwd, pwd, verify->terminal, - "Security label out of range", ES_LOGIN_FAILED); - Debug("Invalid clearance for this user\n"); - mand_free_ir(dl_ir); - return 0; - } - verify->clearance_ir = clearance_ir; - verify->sec_label_ir = dl_ir; - - return 1; -} - -/* check the proper structures to determine if the user has a password. - * If the nullpw field is set, the user does not need one, and this - * overrides the rest of the checking. - * return 1 means that a password exists (or is not needed) - */ -int -password_exists(struct verify_info *verify) -{ - struct pr_passwd *prpwd; - BOOL nocheck; - - Debug("password_exists()\n"); - prpwd = verify->prpwd; - if (prpwd->uflg.fg_nullpw) - nocheck=prpwd->ufld.fd_nullpw; - else if (prpwd->sflg.fg_nullpw) - nocheck=prpwd->sfld.fd_nullpw; - else - nocheck=FALSE; - - if (!nocheck) { /* user needs password */ - Debug("password required for user\n"); - if (!prpwd->uflg.fg_encrypt || - prpwd->ufld.fd_encrypt[0] == '\0' ) { - return 0; - } - } - return 1; -} - - -/* check that the requested security level can be used on this X terminal, - * and that it is not locked. - * Currently there is no support for locking xterms like there is for - * /dev/tty* terminals. - */ -int -verify_sec_xterm(struct verify_info *verify, char *desired_label) -{ - return 1; -} - - -/* set clearance and label for the user. Audit all failures. - * return 0=fail, 1=pass - */ -int -set_sec_label(struct verify_info *verify) -{ - struct pr_passwd *prpwd; - struct passwd *pwd; - /* set clearance */ - prpwd = verify->prpwd; - pwd = verify->pwd; - - if (setclrnce(verify->sec_label_ir)==-1) { - switch(errno) { - case EPERM: - audit_login(prpwd, pwd, verify->terminal, - "Insufficient privs to set clearance", ES_LOGIN_FAILED); - Debug ("login failed: EPERM on setclrnce()\n"); - break; - case EFAULT: - /* audit:login failed: xdm memory fault */ - default: - audit_login(prpwd, pwd, verify->terminal, - "Unable to set clearance", ES_LOGIN_FAILED); - Debug ("setclrnce failed: error: %d\n", errno); - break; - } - return 0; - } - /* set label */ - if (setslabel(verify->sec_label_ir)==-1) { - switch(errno) { - case EPERM: - audit_login(prpwd, pwd, verify->terminal, - "Insufficient privs to set sec label", ES_LOGIN_FAILED); - Debug ("login failed: insufficient priv. to setslabel()\n"); - break; - case EFAULT: - /* audit:login failed: xdm memory fault */ - default: - audit_login(prpwd, pwd, verify->terminal, - "Unable to set sec label", ES_LOGIN_FAILED); - Debug ("setslabel() failed: error: %d\n", errno); - break; - } - return 0; - } - return 1; -} - -/* set the effective, base, and maximum priv vectors for the - * new process, based on values from the pr_passwd entry. - * Inability to find either user priv's or default priv's - * results in failure. One or the other must be there. - * Function returns 1 for success, 0 for failure. - * A failure of this function should be considered fatal. - */ -int -set_sec_privs(struct verify_info *verify) -{ - - priv_t *maxprivs, *bprivs; - priv_t curr_bprivs[SEC_SPRIVVEC_SIZE]; - priv_t curr_sprivs[SEC_SPRIVVEC_SIZE]; - - struct pr_passwd *prpwd; - struct passwd *pwd; - int bit; - - prpwd = verify->prpwd; - pwd = verify->pwd; - - /* kernel authorizations */ - if (prpwd->uflg.fg_sprivs) { - maxprivs = &prpwd->ufld.fd_sprivs[0]; - }else if(prpwd->sflg.fg_sprivs) { - maxprivs = &prpwd->sfld.fd_sprivs[0]; - Debug("Using default kernel priv's\n"); - }else { - audit_login(prpwd, pwd, verify->terminal, - "Unable to find kernel priv set for user", - ES_LOGIN_FAILED); - Debug("Can't find max. priv set for user-quitting\n"); - return 0; - } - - /* base priv's and initial effective priv's */ - if (verify->prpwd->uflg.fg_bprivs) { - bprivs = &verify->prpwd->ufld.fd_bprivs[0]; - }else if (verify->prpwd->sflg.fg_bprivs) { /* use system defaults */ - bprivs = &verify->prpwd->sfld.fd_bprivs[0]; - Debug("Using default base priv's\n"); - }else{ - audit_login(prpwd, pwd, verify->terminal, - "Unable to find base priv set for user", - ES_LOGIN_FAILED); - Debug("Can't find base priv set for user-quitting\n"); - return 0; - } - - getpriv(SEC_MAXIMUM_PRIV, curr_sprivs); - getpriv(SEC_BASE_PRIV, curr_bprivs); - - /* remove those privs which the current process does not have, - * to avoid any error in the following system calls - */ - for (bit=0; bit<=SEC_MAX_SPRIV; bit++) { - if (!ISBITSET(curr_sprivs, bit)) - RMBIT(maxprivs, bit); - if (!ISBITSET(curr_bprivs, bit)) - RMBIT(bprivs, bit); - } - - /* login removes those bits from maxprivs which the current process - * does not have. - This program assumes the system config - * utilities will enforce the rules for setpriv(3). Any failure - * of setpriv will indicate a corrupt database. - */ - - if (setpriv(SEC_MAXIMUM_PRIV, maxprivs)==-1) { - switch(errno) { - case EPERM: - Debug("setpriv (max) failed: EPERM\n"); - break; - case EINVAL: - Debug("setpriv (max) failed: EINVAL\n"); - break; - case EFAULT: - Debug("setpriv (max) failed: EFAULT\n"); - break; - default: - Debug("setpriv (max) failed for unknown error: %d\n",errno); - break; - } - audit_login(prpwd, pwd, verify->terminal, - "Unable to set Kernel privs", ES_LOGIN_FAILED); - Debug("Unable to set Kernel privs (error %d): aborting\n",errno); - return 0; - } - - if (setpriv(SEC_BASE_PRIV, bprivs)==-1) { - switch(errno) { - case EPERM: - Debug("setpriv (base) failed: EPERM\n"); - break; - case EINVAL: - Debug("setpriv (base) failed: EINVAL\n"); - break; - case EFAULT: - Debug("setpriv (base) failed: EFAULT\n"); - break; - default: - Debug("setpriv (base) failed for unknown error: %d\n",errno); - break; - } - audit_login(prpwd, pwd, verify->terminal, - "Unable to set base privs", ES_LOGIN_FAILED); - return 0; - } - - if (setpriv(SEC_EFFECTIVE_PRIV, bprivs)==-1) { - switch(errno) { - case EPERM: - Debug("setpriv (effective) failed: EPERM\n"); - break; - case EINVAL: - Debug("setpriv (effective) failed: EINVAL\n"); - break; - case EFAULT: - Debug("setpriv (effective) failed: EFAULT\n"); - break; - default: - Debug("setpriv (effective) failed for unknown error: %d\n", - errno); - break; - } - audit_login(prpwd, pwd, verify->terminal, - "Unable to set effective privs", ES_LOGIN_FAILED); - Debug("Unable to set effective privs (error %d): aborting\n",errno); - return 0; - } - return 1; - -} - - -/* change the current process over to be owned by the user verify->uid. - * Also properly set the privs, sec label, etc. - * Also audits failures. - * return=1 for success, 0 for fail. A failure should be considered fatal. - */ -int -change_to_user(struct verify_info *verify) -{ - struct pr_passwd *prpwd; - struct passwd *pwd; - int new_nice; - - prpwd = verify->prpwd; - pwd = verify->pwd; - - Debug("change_to_user()\n"); - /* 1. set the login user id - settable only once */ - if (setluid(verify->uid)==-1) { - switch(errno) { - case EPERM: - Debug("Unable to set luid - EPERM\n"); - audit_login(prpwd, pwd, verify->terminal, - "Unable to set luid - insufficient privs", - ES_LOGIN_FAILED); - break; - case EINVAL: - Debug("Unable to set luid - suspicious of pwd db.\n"); - audit_login(prpwd, pwd, verify->terminal, - "Unable to set luid - out of range", ES_LOGIN_FAILED); - break; - default: - Debug("Can't set luid-Unknown error %d\n",errno); - audit_login(prpwd, pwd, verify->terminal, - "Unable to set luid-unknown error", ES_LOGIN_FAILED); - break; - } - return 0; - } - - /* - * Set the 'nice' priority if necessary. Since the return value - * of nice(2) can normally be -1 from the documentation, and - * -1 is the error condition, we key off of errno, not the - * return value to find if the change were successful. - * Note we must do this before the setuid(2) below. - */ - errno = 0; - prpwd = verify->prpwd; - if (prpwd->uflg.fg_nice) - new_nice = prpwd->ufld.fd_nice; - else if (prpwd->sflg.fg_nice) - new_nice = prpwd->sfld.fd_nice; - - if (prpwd->uflg.fg_nice || prpwd->sflg.fg_nice) { - (void) nice(new_nice); - if (errno != 0) { - audit_login(prpwd, verify->pwd, NULL, - "bad 'nice' setting", ES_LOGIN_FAILED); - Debug("Bad priority setting.\n"); - return 0; - } - } - - - /* 2. set the group(s) id and - * 3. set the regular user id */ - -#ifdef NGROUPS - - /* setgroups (verify->ngroups, verify->groups); - */ - if(setgid (verify->groups[0])) { - switch(errno) { - case EPERM: - Debug("setgid EPERM\n"); - break; - case EINVAL: - Debug("setgid EINVAL\n"); - break; - default: - Debug("setgid unknown error: %d\n",errno); - break; - } - return 0; - } - initgroups(verify->user_name, verify->groups[0]); -#else - if(setgid (verify->gid)) { - switch(errno) { - case EPERM: Debug("setgid EPERM\n");break; - case EINVAL: Debug("setgid EINVAL\n");break; - default: Debug("setgid unknown error\n");break; - } - return 0; - } -#endif - - if(setuid (verify->uid)) { - switch(errno) { - case EPERM: Debug("setgid EPERM\n");break; - case EINVAL: Debug("setgid EINVAL\n");break; - default: Debug("setgid unknown error\n");break; - } - return 0; - } - - /* 4. set security clearance and label for the new process */ - if (!set_sec_label(verify)) - return 0; - - /* 5. set audit parameters */ - audit_adjust_mask(prpwd); - - /* 6. set privlege levels - maximum, base, and effective */ - if (!set_sec_privs(verify)) - return 0; - - return 1; -} - - -/* - * Try to read back everything, and print it. If a fatal error occurs, - * return code is 0. 1=success. - */ -int -dump_sec_debug_info(struct verify_info *verify) -{ - mand_ir_t *level_ir; - priv_t privs[SEC_SPRIVVEC_SIZE]; - - Debug ("luid: %d, real uid: %d, effective uid:%d,\n", - getluid(),getuid(),geteuid()); - Debug ("real gid:%d, effective gid: %d\n", getgid(),getegid()); - level_ir = mand_alloc_ir(); - if (getclrnce(level_ir)==-1) { - switch(errno) { - case EFAULT: Debug("getclrnce EFAULT\n");break; - case EINVAL: Debug("getclrnce EINVAL\n");break; - default: Debug("getclrnce unknown error:%d\n",errno);break; - } - return 0; - }else Debug ("Clearance: %s\n", mand_ir_to_er(level_ir) ); - if (getslabel(level_ir)==-1) { - switch(errno) { - case EFAULT: Debug("getslabel EFAULT\n");break; - case EINVAL: Debug("getslabel EINVAL\n");break; - default: Debug("getslabel unknown error:%d\n",errno);break; - } - return 0; - }else Debug ("Level: %s\n", mand_ir_to_er(level_ir)); - mand_free_ir(level_ir); - if(getpriv(SEC_MAXIMUM_PRIV, privs)==-1) { - switch(errno) { - case EFAULT: Debug("getpriv max EFAULT\n");break; - case EINVAL: Debug("getpriv max EINVAL\n");break; - default: Debug("getpriv max unknown error:%d\n",errno); - break; - } - return 0; - }else Debug ("max priv: %x.%x\n", privs[0],privs[1]); - if(getpriv(SEC_EFFECTIVE_PRIV, privs)==-1) { - switch(errno) { - case EFAULT: Debug("getpriv eff EFAULT\n");break; - case EINVAL: Debug("getpriv eff EINVAL\n");break; - default: Debug("getpriv eff unknown error:%d\n",errno); - break; - } - return 0; - }else Debug ("eff priv: %x.%x\n", privs[0],privs[1]); - if(getpriv(SEC_BASE_PRIV, privs)==-1) { - switch(errno) { - case EFAULT: Debug("getpriv base EFAULT\n");break; - case EINVAL: Debug("getpriv base EINVAL\n");break; - default: Debug("getpriv base unknown error:%d\n",errno); - break; - } - return 0; - }else Debug ("base priv: %x.%x\n", privs[0],privs[1]); - return 1; -} - -/* - * writeLoginInfo - * Input: file name string (ex. $HOME/.dtlogininfo) - * verify structure with password stuff - * Write login information to a file to be displayed later, after a - * successful login. - * - * Xsession will need to be modified something like this... - * DTHELLO="$DTDIR/bin/dthello -f /etc/copyright -f $HOME/.dtlogininfo" - */ - -int -writeLoginInfo( char *filename, struct verify_info *verify) -{ - char *s1="Last successful login: %s"; - char *s2="Last unsuccessful login: %s"; - char *s3; - char s[80]; - char term[15]; - char *label; - char *message="Sensitivity level for process: "; - int i; - int nl; - time_t slogin, ulogin; - char *slabel; - char *uterminal, *sterminal; - - FILE *fp; - - Debug("Writing login info\n"); - if ((fp = fopen (filename, "w")) == 0 ) - return 0; - - if (verify->prpwd->uflg.fg_slogin) - slogin=verify->prpwd->ufld.fd_slogin; - else - slogin=(time_t)0; - - if (verify->prpwd->uflg.fg_ulogin) - ulogin=verify->prpwd->ufld.fd_ulogin; - else - ulogin=(time_t)0; - - if (verify->prpwd->uflg.fg_suctty) - sterminal=verify->prpwd->ufld.fd_suctty; - else - sterminal="UNKNOWN"; - - if (verify->prpwd->uflg.fg_unsuctty) - uterminal=verify->prpwd->ufld.fd_unsuctty; - else - uterminal="UNKNOWN"; - - slabel = mand_ir_to_er(verify->sec_label_ir); - - fprintf(fp,"-----------------------------------\n"); - fprintf(fp,"\nPrevious login information:\n\n"); - - /* tricky formatting */ - if (slogin != 0) { - sprintf(s, s1, ctime(&slogin)); - nl=strlen(s)-1; - s[nl]='\0'; /* remove new-line */ - }else{ - sprintf(s,s1,"NEVER"); - } - strcat(s, " from "); - strncpy(term, sterminal, 14); - term[14]='\0'; - strcat(s, term); - fprintf(fp,"%s\n",s); - - if (ulogin != 0) { - sprintf(s, s2, ctime(&ulogin)); - nl=strlen(s)-1; - s[nl]='\0'; /* remove new-line */ - }else{ - sprintf(s,s2,"NEVER"); - } - strcat(s, " from "); - strncpy(term, uterminal, 14); - term[14]='\0'; - strcat(s, term); - fprintf(fp,"%s\n",s); - - label = (char*)malloc(strlen(message)+strlen(slabel)+1); - sprintf(label, "%s%s", message, slabel); - if (strlen (label) > 77) { - for(i=75; label[i]!=',' && i>0; i--); - if (i==0) for(i=75; label[i]!=' ' && i>0; i--); - if (i==0) i=75; - strncpy(s, label, i+1); - s[i+1]='\0'; - fprintf(fp,"%s\n",s); - strncpy(s, &label[i+1], 75); - s[75]='\0'; - fprintf(fp,"%s\n",s); - }else{ - fprintf(fp,"%s\n",label); - } - - fclose(fp); - return 1; -} - -#endif /* BLS */ diff --git a/cde/programs/dtlogin/bls/validate.c b/cde/programs/dtlogin/bls/validate.c deleted file mode 100644 index 26da467b8..000000000 --- a/cde/programs/dtlogin/bls/validate.c +++ /dev/null @@ -1,830 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: validate.c /main/4 1995/10/27 16:19:47 rswiston $ */ -/************************************<+>************************************* - **************************************************************************** - ** - ** File: validate.c - ** - ** Project: HP Visual User Environment (DT) - ** - ** Description: Dtgreet BLS user authentication routines - ** - ** These routines validate the user; checking name, password, - ** number of users on the system, password aging, etc. - ** - ** - ** (c) Copyright 1987, 1988, 1989 by Hewlett-Packard Company - ** - ** - ** Conditional compiles: - ** - ** OSMAJORVERSION < 8 - ** HP-UX 7.0/7.03 restricted license counting algorithms - ** are used. Otherwise HP-UX 8.0 and beyond is used - ** - ** BLS HP BLS B1 simple authentication. - ** - ** - **************************************************************************** - ************************************<+>*************************************/ - -#ifdef BLS - -/*************************************************************************** - * - * Includes & Defines - * - ***************************************************************************/ - -#include -#include -#include -#include - -#include "../vg.h" - - - -/*************************************************************************** - * - * HP-UX BLS authentication routines - * - ***************************************************************************/ - -#include /* for MAXUID macro */ -#include -#include -#include -#include -#include -#include - - -/* BLS only headers */ -# include -# include -# include "bls.h" - - -#define how_to_count ut_exit.e_exit - -#ifdef __hp9000s300 -static int num_users[] = { 2, 32767 }; -# define MIN_VERSION 'A' -# define UNLIMITED 'B' -#else -static int num_users[] = { 2, 16, 32, 64 , 8 }; -# define MIN_VERSION 'A' -# define UNLIMITED 'U' -#endif - -/* Maximum number of users allowed with restricted license */ -#if OSMAJORVERSION < 8 -# define MAX_STRICT_USERS 2 -#else -# define MAX_STRICT_USERS 8 -#endif - -#define NUM_VERSIONS (sizeof(num_users)/sizeof(num_users[0])) - 1 - - - -/*************************************************************************** - * - * External declarations - * - ***************************************************************************/ - -extern Widget focusWidget; /* login or password text field */ - -extern long groups[NGROUPS]; - - -/*************************************************************************** - * - * Procedure declarations - * - ***************************************************************************/ - -static int CheckPassword( char *name, char *passwd ); -static int CountUsers( int added_users) ; -static int CountUsersStrict( char *new_user) ; -static void WriteBtmp( char *name) ; - - - - -/*************************************************************************** - * - * Global variables - * - ***************************************************************************/ - -/* BLS only data */ - struct pr_passwd *b1_pwd; - struct verify_info verify_data; - struct verify_info *verify = &verify_data; - struct greet_info greet_data; - struct greet_info *greet = &greet_data; - static int UserHasPassword = 1; - - -/*************************************************************************** - * - * CountUsers - * - * see if new user has exceeded the maximum. - ***************************************************************************/ - -#define NCOUNT 16 - -static int -CountUsers( int added_users ) -{ - int count[NCOUNT], nusers, i; - struct utmp *entry; - - for (i=0; iut_type == USER_PROCESS) { - i = entry->how_to_count; - if (i < 0 || i >= NCOUNT) - i = 1; /* if out of range, then count */ - /* as ordinary user */ - count[i]++; - } - } - endutent(); - - /* - * KEY: - * [0] does not count at all - * [1] counts as real user - * [2] logins via a pty which have not gone trough login. These - * collectively count as 1 user IF count[3] is 0, otherwise, - * they are not counted. Starting with HP-UX 8.0 they are - * no longer counted at all. - * [3] logins via a pty which have been logged through login (i.e. - * rlogin and telnet). these count as 1 "real" user per - * unique user name. - * [4-15] may be used for groups of users which collectively - * count as 1 - */ - nusers = count[1]; - -#if OSMAJORVERSION < 8 - for (i=2; i 0) - nusers++; - - return(nusers); -} - - - - -/*************************************************************************** - * - * CountUsersStrict - * - * see if new user has exceeded the maximum. - ***************************************************************************/ - -static int -CountUsersStrict( char *new_user ) -{ - char pty_users[MAX_STRICT_USERS][8]; - int count[NCOUNT], nusers, i, cnt, pty_off = -1, uname_off; - struct utmp *entry; - - /* - * Initialize count array... - */ - for (i = 0; i < NCOUNT; i++) - count[i] = 0; - - /* - * Add in the new user (we know it's not a pty)... - */ - count[1]++; - - while ( (entry = getutent()) != NULL ) { - if (entry->ut_type == USER_PROCESS) { - i = entry->how_to_count; - - /* if out of range, then count as ordinary user logged in - via a tty */ - if (i == 1 || (i < 0 || i >= NCOUNT)) - count[1]++; - /* See if it is a pty login granted by login program */ - else if (i == 3) { - count[3]++; - /* See if user is already logged in via login pty */ - uname_off = -1; - for (cnt = 0; cnt <= pty_off; cnt++) - if (strncmp(pty_users[cnt], entry->ut_user, 8) == 0) - uname_off = cnt; - - if (uname_off == -1) { /* user is not logged in via pty yet */ - - if (pty_off >= MAX_STRICT_USERS) /* cannot add any - more users */ - return(MAX_STRICT_USERS + 1); - /* add the user name to the array of pty users */ - else - strncpy(pty_users[++pty_off], entry->ut_user, 8); - } - } /* end if (i == 3) */ - else - count[i]++; - } /* end if entry->ut_type == USER_PROCESS */ - } /* end while (entry = getutent()) */ - - endutent(); - /* - * KEY: - * [0] does not count at all - * [1] counts as "real" user - * [2] logins via a pty which have not gone trough login. These - * collectively count as 1 user IF count[3] is 0, otherwise, - * they are not counted. Starting with HP-UX 8.0 they are - * no longer counted at all. - * [3] logins via a pty which have been logged through login (i.e. - * rlogin and telnet). these count as 1 "real" user per - * unique user name. - * [4-15] may be used for groups of users which collectively count - * as 1 - */ - - nusers = pty_off + 1 + count[1]; /* Current number of users is sum of - users logged in via tty + the - number of unique users logged in - via pty which have gone through - login */ - -#if OSMAJORVERSION < 8 - if ((count[3] == 0) && (count[2] != 0)) - nusers++; /* Add 1 user for all pty logins IF - none of pty logins have been - granted by the login program */ -#else - /* - * Don't count any hpterm logins (exit status of 2). We already - * counted all pty logins granted by the login program. - */ -#endif - - for (i = 4; i < NCOUNT; i++) - if (count[i] > 0) - nusers++; - return(nusers); -} - - - -/*************************************************************************** - * - * CheckPassword - * - * Check validity of user password. - * - ***************************************************************************/ - -static int -CheckPassword( char *name, char *passwd ) -{ - - char *crypt(); - struct passwd *p; - char *reason; - - /* - * HP BLS B1 password authentication... - */ - - if ( ISSECURE ) { - b1_pwd = getprpwnam(name); - - if ( b1_pwd == NULL || strlen(name) == 0 ) { - Debug("unknown user '%s'\n", name); - audit_login((struct pr_passwd *)0, (struct passwd *)0, - dpyinfo.name, "No entry in protected password db", - ES_LOGIN_FAILED); - return(FALSE); - } - - /* - * look up user's regular account information... - */ - - p = getpwnam(name); - - if ( p == NULL || strlen(name) == 0 ) { - Debug("unknown user '%s'\n", name); - audit_login((struct pr_passwd *)0, (struct passwd *)0, - dpyinfo.name, "No entry in password file", - ES_LOGIN_FAILED); - return(FALSE); - } - - /* verify_info has become a catchall for info needed later */ - verify->user_name = name; - verify->prpwd = b1_pwd; - verify->pwd = p; - strncpy(verify->terminal, dpyinfo.name, 15); - verify->terminal[15]='\0'; - - } - - Debug("Verify %s \n",name); - - /* if the password doesn't exists, we can't check it, but - * the user will be forced to change it later */ - if ( (UserHasPassword = password_exists(verify)) != 0 ) - if ( strcmp(bigcrypt(passwd,b1_pwd->ufld.fd_encrypt), - b1_pwd->ufld.fd_encrypt) ) { - Debug("verify failed\n"); - audit_login( b1_pwd, p ,dpyinfo.name, - "Password incorrect", - ES_LOGIN_FAILED); - return(FALSE); - } else { - Debug ("username/password verify succeeded\n"); - return(TRUE); - } - /* - * all password checks failed... - */ - - return (FALSE); - -} - - - - -/*************************************************************************** - * - * BLS_Verify - * - * verify the user - * - * return codes indicate authentication results. - ***************************************************************************/ - -#define MAXATTEMPTS 3 - -static struct passwd nouser = {"", "nope"}; /* invalid user password struct */ - -int -BLS_Verify( char *name, char *passwd ) -{ - - static int login_attempts = 0; /* # failed authentications */ - - struct passwd *p; /* password structure */ - struct pr_passwd *prpwd; - - struct utsname utsnam; - int n; - int uid; - - /* - * Desparate maneuvre to give dtgreet the privledges it needs - */ - if ( login_attempts == 0 ) { - Debug("Setting luid for dtgreet\n"); - if ( getluid() == -1 ) - setluid(getuid()); - } - - /* - * validate password... - */ - - if ( CheckPassword(name, passwd) == FALSE) { - p = verify->pwd; - if ( focusWidget == passwd_text ) { - - WriteBtmp(name); - - if ((++login_attempts % MAXATTEMPTS) == 0 ) { - - if (p->pw_name == NULL ) - p = &nouser; - - audit_login( b1_pwd, p ,dpyinfo.name, - "Failed login(bailout)", - ES_LOGIN_FAILED); - } - - } else if ( !UserHasPassword ) { - /* - * The user has not password -- this must be the initial login for this - * user. Treat it like an expired password. This should invoke the - * password program on behalf of the user. - */ - UserHasPassword = 1; - return VF_PASSWD_AGED; - } - - return(VF_INVALID); - } - prpwd = verify->prpwd; - p = verify->pwd; - - /* check that the uid of both passwd and pr_passwd struct's agree */ - uid = p->pw_uid; - if (uid != prpwd->ufld.fd_uid) { - audit_login(prpwd, p, verify->terminal, - "User id's inconsistent across password database\n", - ES_LOGIN_FAILED); - Debug("login failed - uid's do not match\n"); - return VF_BAD_UID; - } - verify->uid = uid; - - /* check if user's account is locked - * This can be by dead password (lifetime exceeded), - * fd_lock is set, or fd_max_tries is exceeded. - * locked_out is from libsec, but is poorly documented. - */ - if (locked_out(prpwd)) { - Debug("Account locked\n"); - audit_login(prpwd, p, verify->terminal, - "Account locked", ES_LOGIN_FAILED); - return VF_INVALID; - } - /* can user log in at this time? - * time_lock is in libsec, but poorly documented - */ - if (time_lock(prpwd)) { - Debug("Account time-locked\n"); - audit_login(prpwd, p, verify->terminal, - "Account time-locked", ES_LOGIN_FAILED); - return VF_INVALID; - } - - /**************************************************** - xdm checks the security level here using - verify_sec_user - We do it later from the dtgreet callback rountine - VerifySensitivityLevel() - ****************************************************/ - -#if 0 - /* - * check restricted license... - * - * Note: This only applies to local displays. Foreign displays - * (i.e. X-terminals) apparently do not count. - */ - - /* Get the version info via uname. If it doesn't look right, - * assume the smallest user configuration - */ - - if (getenv(LOCATION) != NULL) { - if (uname(&utsnam) < 0) - utsnam.version[0] = MIN_VERSION; - - /* - * Mappings: - * 834 -> 834 - * 844 -> 844 - * 836 -> 635 - * 846 -> 645 - * 843 -> 642 - * 853 -> 652 - */ - - if ((!strncmp(utsnam.machine, "9000/834", UTSLEN)) || - (!strncmp(utsnam.machine, "9000/844", UTSLEN)) || - (!strncmp(utsnam.machine, "9000/836", UTSLEN)) || - (!strncmp(utsnam.machine, "9000/846", UTSLEN)) || - (!strncmp(utsnam.machine, "9000/843", UTSLEN)) || - (!strncmp(utsnam.machine, "9000/853", UTSLEN))) { - -/* strict_count = 1;*/ - if (CountUsersStrict(name) > MAX_STRICT_USERS) { - audit_login( b1_pwd, p ,dpyinfo.name, - "Attempted to login - too many users on the system", - ES_LOGIN_FAILED); - return(VF_MAX_USERS); - } - } - else { - if (utsnam.version[0] != UNLIMITED) { - if ((utsnam.version[0]-'A' < 0) || - (utsnam.version[0]-'A' > NUM_VERSIONS)) - utsnam.version[0] = MIN_VERSION; - - n = (int) utsnam.version[0] - 'A'; - if (CountUsers(1) > num_users[n]) { - audit_login( b1_pwd, p ,dpyinfo.name, - "Attempted to login - too many users on the system", - ES_LOGIN_FAILED); - return(VF_MAX_USERS); - } - } - } - } - -#endif /* 0 */ - - /* - * check password aging... - */ - - if ( passwordExpired(verify)) { - audit_login( b1_pwd, p ,dpyinfo.name, - "Password expired", - ES_LOGIN_FAILED); - return(VF_PASSWD_AGED); - } - - - /* - * verify home directory exists... - */ - - if(chdir(p->pw_dir) < 0) { - Debug("Attempted to login -- no home directory\n"); - audit_login( b1_pwd, p ,dpyinfo.name, - " Attempted to login - no home directory", - ES_LOGIN_FAILED); - return(VF_HOME); - } - - /* - * validate uid and gid... - */ -#ifdef NGROUPS - getGroups(greet->name, verify, p->pw_gid); -#else - verify->gid = pwd->pw_gid; - - if ((p->pw_gid < 0) || - (p->pw_gid > MAXUID) || - (setgid(p->pw_gid) == -1)) { - - Debug("Attempted to login -- bad group id"); - audit_login( b1_pwd, p ,dpyinfo.name, - "Attempted to login - bad group id", - ES_LOGIN_FAILED); - return(VF_BAD_GID); - } -#endif /* NGROUPS */ - - if ((p->pw_uid < 0) || - (p->pw_uid > MAXUID) || - (setresuid(p->pw_uid, p->pw_uid, 0) == -1)) { - - Debug("Attempted to login -- bad user id\n"); - audit_login( b1_pwd, p ,dpyinfo.name, - "Attempted to login - bad user id", - ES_LOGIN_FAILED); - return(VF_BAD_UID); - } - - - /* - * verify ok... - */ - - Debug ("Successful login\n"); - audit_login( b1_pwd, p ,dpyinfo.name, - "Successful login", - ES_LOGIN_REMOTE); - return(VF_OK); -} - - - - -/*************************************************************************** - * - * WriteBtmp - * - * log bad login attempts - * - ***************************************************************************/ - -static void -WriteBtmp( char *name ) -{ - int fd; - struct utmp utmp, *u; - - Boolean found=FALSE; - - bzero(&utmp, sizeof(struct utmp)); - - utmp.ut_pid = getppid(); - while ((u = getutent()) != NULL) { - if ( (u->ut_type == INIT_PROCESS || - u->ut_type == LOGIN_PROCESS || - u->ut_type == USER_PROCESS) && - u->ut_pid == utmp.ut_pid ) { - - found = TRUE; - break; - } - } - - - /* - * if no utmp entry, this may be an X-terminal. Construct a utmp - * entry for it... - */ - - if ( ! found ) { - strncpy(utmp.ut_id, "??", sizeof(utmp.ut_id)); - strncpy(utmp.ut_line, dpyinfo.name, sizeof(utmp.ut_line)); - utmp.ut_type = LOGIN_PROCESS; - strncpy(utmp.ut_host, dpyinfo.name, sizeof(utmp.ut_host)); - u = &utmp; - } - - - /* - * If btmp exists, then record the bad attempt - */ - if ( (fd = open(BTMP_FILE,O_WRONLY|O_APPEND)) >= 0) { - strncpy(u->ut_user, name, sizeof(u->ut_user)); - (void) time(&u->ut_time); - write(fd, (char *)u, sizeof(utmp)); - (void) close(fd); - } - - endutent(); /* Close utmp file */ -} - - -/*************************************************************************** - * - * VerifySensitivityLevel - * - * verify B1 Sensitivity Level - **************************************************************************/ -extern char *sensitivityLevel; - -int -VerifySensitivityLevel( void) -{ - - int i; - - greet->b1security = sensitivityLevel = - (char *) XmTextFieldGetString(passwd_text); - - /* new functions: (side effects: auditing, change verify) */ - if (verify_user_seclevel(verify, sensitivityLevel) - && verify_sec_xterm(verify, sensitivityLevel)) { - - Debug("verify_user_seclevel succeeded.\n"); - return VF_OK; - } - - Debug("verify_user_seclevel failed\n"); - return (VF_BAD_SEN_LEVEL); -} - - -#ifdef NGROUPS -groupMember ( char *name, char **members ) -{ - while (*members) { - if (!strcmp (name, *members)) - return 1; - ++members; - } - return 0; -} - -getGroups ( char *name, struct verify_info *verify, int gid) -{ - int ngroups; - struct group *g; - int i; - - ngroups = 0; - verify->groups[ngroups++] = gid; - setgrent (); - while (g = getgrent()) { - /* - * make the list unique - */ - for (i = 0; i < ngroups; i++) - if (verify->groups[i] == g->gr_gid) - break; - if (i != ngroups) - continue; - if (groupMember (name, g->gr_mem)) { - if (ngroups >= NGROUPS) - LogError ("%s belongs to more than %d groups, %s ignored\n", - name, NGROUPS, g->gr_name); - else - verify->groups[ngroups++] = g->gr_gid; - } - } - verify->ngroups = ngroups; - endgrent (); -} -#endif - -/* check whether the password has expired or not. - * return 1 means that the password has expired. - */ -int -passwordExpired( struct verify_info *verify) -{ - struct pr_passwd *pr; - time_t expiration; - time_t last_change; - time_t expiration_time; - time_t now; - int passwd_status; - struct pr_passwd save_data; - struct pr_default *df; - char *ttime; - char ptime[64]; - - pr = verify->prpwd; - - /* - * If null password, do not check expiration. - */ - - if (!pr->uflg.fg_encrypt || (pr->ufld.fd_encrypt[0] == '\0')) - return 0; - - now = time((long *) 0); - - if (pr->uflg.fg_schange) - last_change = pr->ufld.fd_schange; - else - last_change = (time_t) 0; - - if (pr->uflg.fg_expire) - expiration = pr->ufld.fd_expire; - else if (pr->sflg.fg_expire) - expiration = pr->sfld.fd_expire; - else - expiration = (time_t) 0; - - df = getprdfnam(AUTH_DEFAULT); - - /* - * A 0 or missing expiration field means there is no - * expiration. - */ - expiration_time = expiration ? last_change + expiration : 0; - - if (expiration_time && now > expiration_time ) { - /* - * The password has expired - */ - Debug("The password is expired\n"); - return 1; - } - - Debug("The password is not expired\n"); - return 0; -} - - -/*************************************************************************** - * - * end HP-UX authentication routines - * - ***************************************************************************/ -#endif /* BLS */ diff --git a/cde/programs/dtlogin/dm.h b/cde/programs/dtlogin/dm.h index 3ae26e1e1..57cc1b5a5 100644 --- a/cde/programs/dtlogin/dm.h +++ b/cde/programs/dtlogin/dm.h @@ -404,9 +404,6 @@ struct protoDisplay { struct greet_info { char *name; /* user name */ char *password; /* user password */ -#ifdef BLS - char *b1security; /* user's b1 security */ -#endif char *string; /* random string */ #ifdef __PASSWD_ETC char *name_full; /* full SID */ @@ -428,15 +425,6 @@ struct verify_info { long audid; /* audit id */ int audflg; /* audit flag */ #endif -#ifdef BLS - char *user_name; - struct mand_ir_t *sec_label_ir; - struct mand_ir_t *clearance_ir; - /* save these for logout time */ - struct pr_passwd *prpwd; - struct passwd *pwd; - char terminal[16]; -#endif }; diff --git a/cde/programs/dtlogin/resource.c b/cde/programs/dtlogin/resource.c index cfd70f19e..8a0d7f980 100644 --- a/cde/programs/dtlogin/resource.c +++ b/cde/programs/dtlogin/resource.c @@ -110,12 +110,6 @@ static char AppName[16] = DTLOGIN; # define DM_BOOL 2 # define DM_ARGV 3 -#ifdef BLS -# define DEF_XDM_CONFIG CDE_INSTALLATION_TOP "/lib/X11/Dtlogin/Xconfig" -# define DEF_AUTH_DIR CDE_INSTALLATION_TOP "/lib/X11/Dtlogin" -# define DEF_KEY_FILE CDE_INSTALLATION_TOP "/lib/X11/Dtlogin/Xkeys" -#endif - /* * the following constants are supposed to be set in the makefile from diff --git a/cde/programs/dtlogin/session.c b/cde/programs/dtlogin/session.c index 6311c7a30..4e624a97e 100644 --- a/cde/programs/dtlogin/session.c +++ b/cde/programs/dtlogin/session.c @@ -95,11 +95,6 @@ # include "solaris.h" #endif -#ifdef BLS -# include -# include -#endif - #ifdef __KERBEROS # include #endif /* __KERBEROS */ @@ -241,10 +236,6 @@ static char *defaultLanguage = NULL; static sigjmp_buf abortSession; -#ifdef BLS - static char *sensitivityLevel; -#endif - #ifdef __KERBEROS static char krb_ticket_string[MAXPATHLEN]; #endif /* __KERBEROS */ @@ -1189,10 +1180,6 @@ StartClient( struct verify_info *verify, struct display *d, int *pidp ) FILE *lastsession; char lastsessfile[MAXPATHLEN]; -#ifdef BLS - struct pr_passwd *b1_pwd; -#endif - #ifdef __AFS #define NOPAG 0xffffffff long pagval, j; @@ -1387,63 +1374,6 @@ StartClient( struct verify_info *verify, struct display *d, int *pidp ) #ifndef sun -#ifdef BLS - /* - * HP BLS B1 session setup... - * - * 1. look up user's protected account information. - * 2. set the session sensitivity/clearance levels - * 3. set the logical UID (LUID) - */ - - if ( ISSECURE ) { - Debug("BLS - Setting user's clearance, security level and luid.\n"); - set_auth_parameters(1, verify->argv); - init_security(); - - verify->user_name = user; - strncpy(verify->terminal,d->name,15); - verify->terminal[15]='\0'; - verify->pwd = getpwnam(user); - - if ( verify->pwd == NULL || strlen(user) == 0 ) { - LogError(ReadCatalog( - MC_LOG_SET,MC_LOG_NO_BLSACCT,MC_DEF_LOG_NO_BLSACCT)); - exit (1); - } - verify->prpwd= b1_pwd = getprpwnam(user); - verify->uid = b1_pwd->ufld.fd_uid; - - if ( b1_pwd == NULL || strlen(user) == 0 ) { - LogError(ReadCatalog( - MC_LOG_SET,MC_LOG_NO_BLSPACCT,MC_DEF_LOG_NO_BLSPACCT)); - exit (1); - } - - /* - * This has already been done successfully by dtgreet - * but we need to get all the information again for the - * dtlogin process. - */ - if ( verify_user_seclevel(verify,sensitivityLevel) != 1 ) { - Debug("BLS - Could not verify sensitivity level.\n"); - LogError(ReadCatalog( - MC_LOG_SET,MC_LOG_NO_VFYLVL,MC_DEF_LOG_NO_VFYLVL)); - exit (1); - } - - if ( change_to_user(verify) != 1 ) { - Debug("BLS - Could not change to user: %s.\n",verify->user_name); - LogError(ReadCatalog( - MC_LOG_SET,MC_LOG_NO_BLSUSR,MC_DEF_LOG_NO_BLSUSR), - verify->user_name); - exit (1); - } - - Debug("BLS - Session setup complete.\n"); - } else { -#endif /* BLS */ - # ifdef __AFS if ( IsVerifyName(VN_AFS) ) { pagval = get_pag_from_groups(verify->groups[0], verify->groups[1]); @@ -1522,10 +1452,6 @@ StartClient( struct verify_info *verify, struct display *d, int *pidp ) } #endif -#ifdef BLS - } /* ends the else clause of if ( ISSECURE ) */ -#endif /* BLS */ - #endif /* ! sun */ /* @@ -1569,23 +1495,6 @@ StartClient( struct verify_info *verify, struct display *d, int *pidp ) if (greet.password) bzero(greet.password, strlen(greet.password)); -#ifdef BLS - /* - * Write login information to a file - * The file name should really be settable by some kind of resource - * but time is short so we hard-wire it to ".dtlogininfo". - */ - if ( ! writeLoginInfo( ".dtlogininfo" , verify ) ) - Debug("Unable to write \".dtlogininfo\"\n"); -# ifndef NDEBUG - /* extra debugging */ - if(!dump_sec_debug_info(verify)) { - Debug("Something wrong with environment\n"); - exit(1); - } -# endif /* ! NDEBUG */ -#endif /* BLS */ - /* * exec session... */ @@ -2268,11 +2177,7 @@ RunGreeter( struct display *d, struct greet_info *greet, */ if (d->authorizations && d->authFile && - waitVal(status) != NOTIFY_LANG_CHANGE -#ifdef BLS - && waitVal(status) != NOTIFY_BAD_SECLEVEL -#endif - ) { + waitVal(status) != NOTIFY_LANG_CHANGE) { /*** Debug ("Done with authorization file %s, removing\n", @@ -2351,13 +2256,6 @@ RunGreeter( struct display *d, struct greet_info *greet, } #endif -#ifdef BLS - /* - * sensitivityLevel set in BLS_Verify() - */ - greet->b1security = sensitivityLevel; -#endif - Verify(d, greet, verify); return; @@ -2405,14 +2303,10 @@ RunGreeter( struct display *d, struct greet_info *greet, LANGUAGESIZE) = '\0'; return; -#ifdef BLS - case NOTIFY_BAD_SECLEVEL: - return; -#endif case waitCompose (SIGTERM,0,0): Debug ("Greeter exited on SIGTERM\n"); SessionExit(d, OPENFAILED_DISPLAY); - + default: Debug ("Greeter returned unknown status %d\n", waitVal(status)); @@ -2769,9 +2663,6 @@ ManageGreeter( struct display *d, struct greet_info *greet, case VF_BAD_AID: SETMC(msg, BAD_AID); break; case VF_BAD_AFLAG: SETMC(msg, BAD_AFLAG); break; case VF_NO_LOGIN: SETMC(msg, NO_LOGIN); break; -#ifdef BLS - case VF_BAD_SEN_LEVEL: SETMC(msg, BAD_SEN_LEVEL); break; -#endif case VF_MESSAGE: msg.id=0; msg.def=state->msg; break; default: msg.id=0; msg.def=""; break; } diff --git a/cde/programs/dtlogin/sysauth.c b/cde/programs/dtlogin/sysauth.c index 466aefda5..6d409fa5a 100644 --- a/cde/programs/dtlogin/sysauth.c +++ b/cde/programs/dtlogin/sysauth.c @@ -55,8 +55,6 @@ ** self-auditing of login actions. Incompatible with ** #ifdef SecureWare ** - ** BLS HP BLS B1 simple authentication. - ** ** __AFS AFS 3 authentication mechanism ** __KERBEROS Kerberos authentication mechanism ** __PASSWD_ETC Domain/OS Registry from HP-UX authentication mechanism diff --git a/cde/programs/dtlogin/sysauth.h b/cde/programs/dtlogin/sysauth.h index 2cbf8ff0a..5612a6ca3 100644 --- a/cde/programs/dtlogin/sysauth.h +++ b/cde/programs/dtlogin/sysauth.h @@ -74,10 +74,6 @@ #define VF_CHALLENGE 12 #define VF_MESSAGE 13 -#ifdef BLS -#define VF_BAD_SEN_LEVEL 14 -#endif - /**************************************************************************** * * External procedure declarations diff --git a/cde/programs/dtlogin/vg.h b/cde/programs/dtlogin/vg.h index 7a34eaefd..39de37284 100644 --- a/cde/programs/dtlogin/vg.h +++ b/cde/programs/dtlogin/vg.h @@ -62,10 +62,6 @@ extern int errno; #include #include "vgproto.h" -#ifdef BLS -# include -#endif - #ifdef USE_XINERAMA # include
#endif diff --git a/cde/programs/dtlogin/vgauth.c b/cde/programs/dtlogin/vgauth.c index 56521c9a4..5dbb0cf41 100644 --- a/cde/programs/dtlogin/vgauth.c +++ b/cde/programs/dtlogin/vgauth.c @@ -55,8 +55,6 @@ ** self-auditing of login actions. Incompatible with ** #ifdef SecureWare ** - ** BLS HP BLS B1 simple authentication. - ** ** __AFS AFS 3 authentication mechanism ** __KERBEROS Kerberos authentication mechanism ** __PASSWD_ETC Domain/OS Registry from HP-UX authentication mechanism diff --git a/cde/programs/dtlogin/vgcallback.c b/cde/programs/dtlogin/vgcallback.c index 9ff1a48bb..df8e35aba 100644 --- a/cde/programs/dtlogin/vgcallback.c +++ b/cde/programs/dtlogin/vgcallback.c @@ -110,11 +110,6 @@ static void ProcessTraversal( Widget w, int direction) ; static void _DtShowDialog(DialogType dtype, XmString msg); static void TellRequester(char * buf, size_t nbytes); -# ifdef BLS -static void PromptSensitivityLevel(void); /* prompt for B1 Sen. Level */ - int VerifySensitivityLevel(void); /* verify B1 Sensitivity Level */ -# endif - static int session_selected = False; static Widget default_dt = NULL; @@ -131,11 +126,6 @@ char *userName = "\0"; struct passwd *user_p; -#ifdef BLS -static int normalPasswordWidget = True; - char *sensitivityLevel = NULL; -#endif - #ifndef SVR4 long groups[NGROUPS]; #endif @@ -1877,67 +1867,6 @@ GetLoginTextPtr( Widget w ) } -#ifdef BLS -/*************************************************************************** - * - * PromptSensitivityLevel - * - * Prompt for B1 Sensitivity Level. The password widget set is reused for - * this purpose rather than creating another complete widget set. It already - * has most of the proper size and alignment specifications needed. Using - * the password set also allows the B1 code changes to be more localized. - * - ***************************************************************************/ - -static void -PromptSensitivityLevel( void) -{ - - Dimension width; - int i, width1, width2; - - /* - * Use the password widget set to prompt for the B1 Sensitivity Level. - * Remember to put it back to normal if the user presses [Clear]. - */ - - normalPasswordWidget = False; - - XtRemoveAllCallbacks(_text, XmNmodifyVerifyCallback); - XmTextFieldSetString(_text,""); - - - /* - * Change the label and resize the password form... - */ - - i = 0; - XtSetArg(argt[i], XmNresizable, True ); i++; - XtSetArg(argt[i], XmNresizePolicy, XmRESIZE_ANY ); i++; - XtSetValues(_form, argt, i); - - i = 0; - xmstr = ReadCatalogXms(MC_LABEL_SET, -1, "Sensitivity Level:"); - XtSetArg(argt[i], XmNrecomputeSize, True ); i++; - XtSetArg(argt[i], XmNlabelString, xmstr ); i++; - XtSetValues(_label, argt, i); - - XmStringFree(xmstr); - - /* - * Center the form horizontally in the login_matte... - * - */ - - CenterForm(matte1, _form); - - ProcessTraversal(_text, XmTRAVERSE_CURRENT); - -} - -#endif /* BLS */ - - static void TellRequester(char * buf, size_t nbytes) { diff --git a/cde/programs/dtlogin/vgmain.c b/cde/programs/dtlogin/vgmain.c index 33bb00fd0..53b26a017 100644 --- a/cde/programs/dtlogin/vgmain.c +++ b/cde/programs/dtlogin/vgmain.c @@ -371,31 +371,6 @@ main( int argc, char **argv ) (void) signal(SIGTERM, Terminate); - -#ifdef BLS -# ifndef NDEBUG - { - extern SIGVAL BLS_ToggleDebug( int arg ); - - /* - * Allow debug output to be turned on for dtgreet. - */ - - (void) signal(SIGHUP, BLS_ToggleDebug); - - } -# endif /* NDEBUG */ - /* - * set up authorization parameters, see the identity(3) man page... - */ - - if (ISSECURE) { - set_auth_parameters(1, argv); - init_security(); - } -#endif /* BLS */ - - /* * check some environment variables... */ From 2d0c4d6d3980b19db077c86ff28bde0c8ab57956 Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Sat, 6 Aug 2022 17:02:52 -0600 Subject: [PATCH 17/75] Kill off OSMAJORVERSION and OSMINORVERSION defines/cpp flags This has meant very little for a long time as configure.ac just hardcoded these values depending on the current OS versions at the time. The only place where this is really 'needed' is XlationSvc.c in DtSvc so that differences between locale specifications on various versions of an OS can be accounted for. So for now, we just define those when building DtSvc. We could probably safely remove them as well with an update to the Xlate locale DB to remove ancient cruft we don't care about anymore. For various other modules, like dtlogin, dtsession, etc we just use the code that was already being used due to the hardcoded values we've had for the last 10-ish years. --- cde/configure.ac | 24 +-------------- cde/lib/DtSvc/DtUtil2/XlationSvc.c | 6 ++-- cde/lib/DtSvc/Makefile.am | 29 +++++++++++++++++++ cde/lib/DtTerm/TermPrim/TermPrimSetUtmp.c | 2 -- cde/lib/tt/lib/mp/mp_stream_socket.C | 11 +------ cde/lib/tt/slib/mp_rpc_server.C | 4 --- .../dtappbuilder/src/libAButil/util.c | 11 ------- cde/programs/dtlogin/account.c | 2 +- cde/programs/dtlogin/dm.c | 6 ++-- cde/programs/dtlogin/fontpath.c | 2 +- cde/programs/dtlogin/genauth.c | 4 --- cde/programs/dtlogin/session.c | 2 +- cde/programs/dtlogin/socket.c | 4 --- cde/programs/dtlogin/sysauth.c | 6 +--- cde/programs/dtlogin/vgauth.c | 4 --- cde/programs/dtmail/libDtMail/Common/IO.C | 4 --- cde/programs/dtprintinfo/libUI/BaseUI.h | 27 ++++++----------- cde/programs/dtprintinfo/objects/BaseObj.h | 27 ++++++----------- cde/programs/dtprintinfo/util/Invoke.C | 4 --- cde/programs/dtsession/SmLock.c | 2 +- 20 files changed, 61 insertions(+), 120 deletions(-) diff --git a/cde/configure.ac b/cde/configure.ac index 32d1ff0a8..d11392d03 100644 --- a/cde/configure.ac +++ b/cde/configure.ac @@ -63,15 +63,6 @@ build_netbsd=no build_solaris=no build_aix=no -dnl For now, we need to fake the OSMAJORVERSION, OSMINORVERSION. In Linux -dnl this never mattered anyway as it was always the kernel version. We will -dnl choose defaults here. These need to be removed in the code in favor -dnl of actual checks for functionality. So this should be considered -dnl temporary. - -OSMAJORVERSION=4 -OSMINORVERSION=15 - dnl locations of libs/includes if not in 'standard' places like on dnl linux (/usr/...). We build these up based on where X11 is, and dnl other things as we go along. @@ -84,8 +75,6 @@ supports_pam=no case "${build_os}" in linux*) build_linux=yes - OSMAJORVERSION=4 - OSMINORVERSION=15 SOURCE_CPP_DEFINES="${SOURCE_CPP_DEFINES} -D_POSIX_SOURCE \ -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE" supports_pam=yes @@ -93,8 +82,6 @@ case "${build_os}" in freebsd*) build_freebsd=yes bsd=yes - OSMAJORVERSION=10 - OSMINORVERSION=0 # fbsd needs the iconv plug to avoid conflict with libiconv # and libc implementations. We prefer the libc impl. SOURCE_CPP_DEFINES="${SOURCE_CPP_DEFINES} -DLIBICONV_PLUG" @@ -102,20 +89,14 @@ case "${build_os}" in openbsd*) build_openbsd=yes bsd=yes - OSMAJORVERSION=6 - OSMINORVERSION=2 ;; netbsd*) build_netbsd=yes bsd=yes - OSMAJORVERSION=8 - OSMINORVERSION=0 supports_pam=yes ;; solaris*|sun*) build_solaris=yes - OSMAJORVERSION=5 - OSMINORVERSION=10 ;; aix*) build_aix=yes @@ -130,9 +111,6 @@ AM_CONDITIONAL([NETBSD], [test "$build_netbsd" = "yes"]) AM_CONDITIONAL([SOLARIS], [test "$build_solaris" = "yes"]) AM_CONDITIONAL([AIX], [test "$build_aix" = "yes"]) -dnl Add osmajor/minor version to cppflags. -OSVERSION="-DOSMAJORVERSION=$OSMAJORVERSION -DOSMINORVERSION=$OSMINORVERSION" - dnl set CSRG_BASED define for the BSD's. if test "$bsd" = "yes" then @@ -547,7 +525,7 @@ dnl shouldn't be modified. It suggests that you create a special dnl variable and presumably add those to your Makefile.am files. We dnl have 192 of these currently, so... The user will just have to dnl deal, or modify them here directly. -CPPFLAGS="${CPPFLAGS} ${SOURCE_CPP_DEFINES} ${CPP_COMPILER_FLAGS} ${OSVERSION}" +CPPFLAGS="${CPPFLAGS} ${SOURCE_CPP_DEFINES} ${CPP_COMPILER_FLAGS}" CFLAGS="${CFLAGS} ${C_COMPILER_FLAGS} ${EXTRA_INCS} ${PTHREAD_CFLAGS}" CXXFLAGS="${CXXFLAGS} ${CXX_COMPILER_FLAGS} ${EXTRA_INCS} ${PTHREAD_CFLAGS}" LIBS="${EXTRA_LIBS} ${LIBS} ${PTHREAD_LIBS}" diff --git a/cde/lib/DtSvc/DtUtil2/XlationSvc.c b/cde/lib/DtSvc/DtUtil2/XlationSvc.c index c36f97dee..669586170 100644 --- a/cde/lib/DtSvc/DtUtil2/XlationSvc.c +++ b/cde/lib/DtSvc/DtUtil2/XlationSvc.c @@ -2245,8 +2245,10 @@ int _DtXlateGetXlateEnv( 809 = (int) (100.0 * atof("8.09")); ===========================*/ -#if !defined(OSMAJORVERSION) || !defined(OSMINORVERSION) || OSMAJORVERSION == 0 -#error OSMAJORVERSION and/or OSMINORVERSION not defined +#if !defined(OSMAJORVERSION) && !defined(OSMINORVERSION) +#warning "OSMAJORVERSION and OSMINORVERSION not defined, assuming 99.0: +#define OSMAJORVERSION 99 +#define OSMINORVERSION 0 #endif #if defined(__linux__) || defined(CSRG_BASED) diff --git a/cde/lib/DtSvc/Makefile.am b/cde/lib/DtSvc/Makefile.am index 273048f26..90aa72c73 100644 --- a/cde/lib/DtSvc/Makefile.am +++ b/cde/lib/DtSvc/Makefile.am @@ -19,6 +19,35 @@ if SOLARIS libDtSvc_la_CPPFLAGS += -DNO_REGCOMP endif +# OSVERSION hackery. This database works by comparing a number +# computed with the OS major/minor versions to determine appropriate +# entries in the Xlocale DB. These are currently hardcoded per OS in +# configure.ac. Well, no more. Now they will be hardcoded per OS +# here - the only place where they are really needed currently, until +# some time in the future when old and irrelevant entries are removed +# from the DB and we won't need this at all. + +if LINUX +libDtSvc_la_CPPFLAGS += -DOSMAJORVERSION=4 -DOSMINORVERSION=15 +endif + +if FREEBSD +libDtSvc_la_CPPFLAGS += -DOSMAJORVERSION=10 -DOSMINORVERSION=0 +endif + +if OPENBSD +libDtSvc_la_CPPFLAGS += -DOSMAJORVERSION=6 -DOSMINORVERSION=2 +endif + +if NETBSD +libDtSvc_la_CPPFLAGS += -DOSMAJORVERSION=8 -DOSMINORVERSION=0 +endif + +if SOLARIS +libDtSvc_la_CPPFLAGS += -DOSMAJORVERSION=5 -DOSMINORVERSION=10 +endif + + libDtSvc_la_SOURCES = DtCodelibs/buf.C \ DtCodelibs/buf.h \ DtCodelibs/filegen.C \ diff --git a/cde/lib/DtTerm/TermPrim/TermPrimSetUtmp.c b/cde/lib/DtTerm/TermPrim/TermPrimSetUtmp.c index 32e576c4c..df2574d17 100644 --- a/cde/lib/DtTerm/TermPrim/TermPrimSetUtmp.c +++ b/cde/lib/DtTerm/TermPrim/TermPrimSetUtmp.c @@ -55,9 +55,7 @@ #endif /* sun */ #ifdef __FreeBSD__ -#if OSMAJORVERSION > 8 #define UT_UTMPX -#endif #define UT_HOST ut_host #define UT_NO_pututline #endif diff --git a/cde/lib/tt/lib/mp/mp_stream_socket.C b/cde/lib/tt/lib/mp/mp_stream_socket.C index fbc3f5122..5009a99ef 100644 --- a/cde/lib/tt/lib/mp/mp_stream_socket.C +++ b/cde/lib/tt/lib/mp/mp_stream_socket.C @@ -209,12 +209,7 @@ init(int init_as_source) return(0); } len = sizeof(sockaddr_in); -#if defined(_AIX) && (OSMAJORVERSION==4) && (OSMINORVERSION==2) - if (getsockname(_sock, (sockaddr *)&_hostaddr, (size_t *)&len) - < 0) { -#else if (getsockname(_sock, (sockaddr *)&_hostaddr, &len) < 0) { -#endif return(0); } return(listen(_sock,5) == 0); @@ -440,13 +435,9 @@ accept() #endif sockaddr_in saddr; -#if defined(_AIX) && (OSMAJORVERSION==4) && (OSMINORVERSION==2) - _msgsock = ::accept(_sock, (struct sockaddr *)&saddr, - (size_t *)&addrlen); -#else _msgsock = ::accept(_sock, (struct sockaddr *)&saddr, &addrlen); -#endif + if (_msgsock < 0) { _tt_syslog( 0, LOG_ERR, "_Tt_stream_socket::accept(): " "accept(): %m" ); diff --git a/cde/lib/tt/slib/mp_rpc_server.C b/cde/lib/tt/slib/mp_rpc_server.C index 7924901a2..bf75c67a3 100644 --- a/cde/lib/tt/slib/mp_rpc_server.C +++ b/cde/lib/tt/slib/mp_rpc_server.C @@ -410,11 +410,7 @@ gettransient(int proto, int vers, int *sockp) _tt_syslog(0, LOG_ERR, "bind(): %m"); return(0); } -#if defined (_AIX) && (OSMAJORVERSION==4) && (OSMINORVERSION==2) - if (getsockname(s, (sockaddr *)&addr, (size_t *)&len) < 0) { -#else if (getsockname(s, (sockaddr *)&addr, &len) < 0) { -#endif _tt_syslog(0, LOG_ERR, "getsockname(): %m"); return(0); } diff --git a/cde/programs/dtappbuilder/src/libAButil/util.c b/cde/programs/dtappbuilder/src/libAButil/util.c index f4e4f12f3..7d49ee4da 100644 --- a/cde/programs/dtappbuilder/src/libAButil/util.c +++ b/cde/programs/dtappbuilder/src/libAButil/util.c @@ -230,17 +230,6 @@ util_vfork(void) /* * putenv() is non-POSIX, so the parameter types can vary a bit... */ -#ifdef __cplusplus -extern "C" { -#endif -#if (defined(sun) && OSMAJORVERSION >= 5 && OSMINORVERSION >= 4 && OSMINORVERSION <=10 ) - extern int putenv(const char *string); -#elif !(defined(__aix) || defined(__NetBSD__)) - extern int putenv(char *string); -#endif -#ifdef __cplusplus -} // extern "C" -#endif int util_putenv(STRING string) { diff --git a/cde/programs/dtlogin/account.c b/cde/programs/dtlogin/account.c index a9721c862..6014333e6 100644 --- a/cde/programs/dtlogin/account.c +++ b/cde/programs/dtlogin/account.c @@ -51,7 +51,7 @@ #endif #include -#if defined(__FreeBSD__) && OSMAJORVERSION > 8 || defined(HAS_PAM_LIBRARY) +#if defined (__FreeBSD__) || defined(HAS_PAM_LIBRARY) #include #else #include diff --git a/cde/programs/dtlogin/dm.c b/cde/programs/dtlogin/dm.c index b73b24e5d..45e228c3e 100644 --- a/cde/programs/dtlogin/dm.c +++ b/cde/programs/dtlogin/dm.c @@ -54,7 +54,7 @@ # include # include # include -#if defined(__FreeBSD__) && OSMAJORVERSION > 8 +#if defined(__FreeBSD__) # include #else # include @@ -1646,7 +1646,7 @@ GettyMessage( struct display *d, int msgnum ) int GettyRunning( struct display *d ) { -#if defined(__FreeBSD__) && OSMAJORVERSION > 8 +#if defined(__FreeBSD__) struct utmpx utmp; /* local struct for new entry */ struct utmpx *u; /* pointer to entry in utmp file */ #else @@ -1671,7 +1671,7 @@ GettyRunning( struct display *d ) return FALSE; -#if defined(__FreeBSD__) && OSMAJORVERSION > 8 +#if defined(__FreeBSD__) bzero(&utmp, sizeof(struct utmpx)); #else bzero(&utmp, sizeof(struct utmp)); diff --git a/cde/programs/dtlogin/fontpath.c b/cde/programs/dtlogin/fontpath.c index dbd7d876e..591c7fe6d 100644 --- a/cde/programs/dtlogin/fontpath.c +++ b/cde/programs/dtlogin/fontpath.c @@ -39,7 +39,7 @@ # include # include # include -#if defined(__FreeBSD__) && OSMAJORVERSION > 8 +#if defined(__FreeBSD__) # include #else # include diff --git a/cde/programs/dtlogin/genauth.c b/cde/programs/dtlogin/genauth.c index c9836bce9..be4b97929 100644 --- a/cde/programs/dtlogin/genauth.c +++ b/cde/programs/dtlogin/genauth.c @@ -112,10 +112,6 @@ extern int errno; # define DONT_USE_DES # elif defined(sun) # define USE_CRYPT -# if (OSMAJORVERSION >= 4) - /* avoid strange sun crypt hackery */ -# define crypt _crypt -# endif # endif # define USE_ENCRYPT #endif diff --git a/cde/programs/dtlogin/session.c b/cde/programs/dtlogin/session.c index 4e624a97e..c7bb5fb4b 100644 --- a/cde/programs/dtlogin/session.c +++ b/cde/programs/dtlogin/session.c @@ -67,7 +67,7 @@ # include # include # include -#if defined(__FreeBSD__) && OSMAJORVERSION > 8 || defined(HAS_PAM_LIBRARY) +#if defined(__FreeBSD__) || defined(HAS_PAM_LIBRARY) # include #else # include diff --git a/cde/programs/dtlogin/socket.c b/cde/programs/dtlogin/socket.c index d138b9512..4a3ee19f3 100644 --- a/cde/programs/dtlogin/socket.c +++ b/cde/programs/dtlogin/socket.c @@ -165,11 +165,7 @@ GetChooserAddr (char *addr, int *lenp) int len; len = sizeof in_addr; -#if defined (_AIX) && (OSMAJORVERSION==4) && (OSMINORVERSION==2) - if (getsockname (chooserFd, (struct sockaddr *)&in_addr, (size_t *)&len) < 0) -#else if (getsockname (chooserFd, (struct sockaddr *)&in_addr, &len) < 0) -#endif return -1; Debug ("Chooser socket port: %d\n", ntohs(in_addr.sin_port)); memmove( addr, (char *) &in_addr, len); diff --git a/cde/programs/dtlogin/sysauth.c b/cde/programs/dtlogin/sysauth.c index 6d409fa5a..59c476a70 100644 --- a/cde/programs/dtlogin/sysauth.c +++ b/cde/programs/dtlogin/sysauth.c @@ -45,10 +45,6 @@ ** ** Conditional compiles for HPUX: ** - ** OSMAJORVERSION < 8 - ** HP-UX 7.0/7.03 restricted license counting algorithms - ** are used. Otherwise HP-UX 8.0 and beyond is used - ** ** AUDIT HP C2 security enhancements; checks for existence of ** SECUREPASSWD file and authenticates user against ** password contained in that file. Also performs @@ -1022,7 +1018,7 @@ Authenticate( struct display *d, char *name, char *passwd, char **msg ) } #endif -#if defined(__OpenBSD__) && OSMAJORVERSION > 5 +#if defined(__OpenBSD__) /* * Use the OpenBSD getpwnam_shadow function to get the crypt()ed password */ diff --git a/cde/programs/dtlogin/vgauth.c b/cde/programs/dtlogin/vgauth.c index 5dbb0cf41..f490c12ed 100644 --- a/cde/programs/dtlogin/vgauth.c +++ b/cde/programs/dtlogin/vgauth.c @@ -45,10 +45,6 @@ ** ** Conditional compiles for HPUX: ** - ** OSMAJORVERSION < 8 - ** HP-UX 7.0/7.03 restricted license counting algorithms - ** are used. Otherwise HP-UX 8.0 and beyond is used - ** ** AUDIT HP C2 security enhancements; checks for existence of ** SECUREPASSWD file and authenticates user against ** password contained in that file. Also performs diff --git a/cde/programs/dtmail/libDtMail/Common/IO.C b/cde/programs/dtmail/libDtMail/Common/IO.C index 6847b18fe..c8ceb8858 100644 --- a/cde/programs/dtmail/libDtMail/Common/IO.C +++ b/cde/programs/dtmail/libDtMail/Common/IO.C @@ -91,10 +91,6 @@ extern "C" mntctl(int, int, char *); ssize_t writev(int, const struct iovec *, int); } -#if (OSMAJORVERSION==4) && (OSMINORVERSION==2) -/* Temporary hack till the /usr/lpp/xlC/include/unistd.h file is fixed. */ -extern "C" { int lockf(int, int, off_t); } -#endif #endif /* _AIX */ #include diff --git a/cde/programs/dtprintinfo/libUI/BaseUI.h b/cde/programs/dtprintinfo/libUI/BaseUI.h index 6544ce185..deb8cd066 100644 --- a/cde/programs/dtprintinfo/libUI/BaseUI.h +++ b/cde/programs/dtprintinfo/libUI/BaseUI.h @@ -35,26 +35,17 @@ #ifndef _BOOLEAN_ #define _BOOLEAN_ -#if (defined(sun) && OSMAJORVERSION <= 5 && OSMINORVERSION <= 3) +#if defined(sun) #include #define boolean boolean_t - #define true B_TRUE - #define false B_FALSE -#elif defined(sun) - #include - #define boolean boolean_t -#if defined(__XOPEN_OR_POSIX) - #define true _B_TRUE - #define false _B_FALSE -#else - #define true B_TRUE - #define false B_FALSE -#endif -#elif defined(__linux__) - #define false 0 - #define true 1 - #define boolean int -#elif defined(CSRG_BASED) +# if defined(__XOPEN_OR_POSIX) + #define true _B_TRUE + #define false _B_FALSE +# else + #define true B_TRUE + #define false B_FALSE +# endif +#elif defined(__linux__) || defined(CSRG_BASED) #include #define boolean bool #else diff --git a/cde/programs/dtprintinfo/objects/BaseObj.h b/cde/programs/dtprintinfo/objects/BaseObj.h index d6df46577..68219c0ce 100644 --- a/cde/programs/dtprintinfo/objects/BaseObj.h +++ b/cde/programs/dtprintinfo/objects/BaseObj.h @@ -36,26 +36,17 @@ #ifndef _BOOLEAN_ #define _BOOLEAN_ -#if (defined(sun) && OSMAJORVERSION <= 5 && OSMINORVERSION <= 3) +#if defined(sun) #include #define boolean boolean_t - #define true B_TRUE - #define false B_FALSE -#elif defined(sun) - #include - #define boolean boolean_t -#if defined(__XOPEN_OR_POSIX) - #define true _B_TRUE - #define false _B_FALSE -#else - #define true B_TRUE - #define false B_FALSE -#endif -#elif defined(__linux__) - #define false 0 - #define true 1 - #define boolean int -#elif defined(CSRG_BASED) +# if defined(__XOPEN_OR_POSIX) + #define true _B_TRUE + #define false _B_FALSE +# else + #define true B_TRUE + #define false B_FALSE +# endif +#elif defined(__linux__) || defined(CSRG_BASED) #include #define boolean bool #else diff --git a/cde/programs/dtprintinfo/util/Invoke.C b/cde/programs/dtprintinfo/util/Invoke.C index 8d6b61619..c9822d556 100644 --- a/cde/programs/dtprintinfo/util/Invoke.C +++ b/cde/programs/dtprintinfo/util/Invoke.C @@ -114,11 +114,7 @@ Invoke::Invoke(const char *command, // Command to Run memset(&oldsigquit_act, '\0', sizeof (struct sigaction)); memset(&oldsigint_act, '\0', sizeof (struct sigaction)); -#if (defined(sun) && OSMAJORVERSION == 5 && OSMINORVERSION <= 4) - action.sa_handler = (void (*)())SIG_IGN; -#else action.sa_handler = SIG_IGN; -#endif sigaction(SIGINT, &action, &oldsigint_act); sigaction(SIGQUIT, &action, &oldsigquit_act); diff --git a/cde/programs/dtsession/SmLock.c b/cde/programs/dtsession/SmLock.c index 83d1c183b..a8c476fe5 100644 --- a/cde/programs/dtsession/SmLock.c +++ b/cde/programs/dtsession/SmLock.c @@ -1827,7 +1827,7 @@ localAuthenticate( /* * Get password entry for 'name' or 'uid'. */ -#if defined(__OpenBSD__) && OSMAJORVERSION > 5 +#if defined(__OpenBSD__) if ((pwent = (name == NULL ? getpwuid_shadow(uid) : getpwnam_shadow(name))) == NULL) #else From f0494103c383489abb8864c8490fc21b561d67ab Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Sat, 6 Aug 2022 17:21:02 -0600 Subject: [PATCH 18/75] Delete all unused/obsolete .elist files These (export lists) aren't needed on modern compilers and haven't been for quite awhile (like 2+ decades). --- cde/lib/DtHelp/libDtHelp.elist | 725 ----- cde/lib/DtMrm/libDtMrm.elist | 16 - cde/lib/DtPrint/libDtPrint.elist | 150 - cde/lib/DtSearch/libDtSearch.elist | 440 --- cde/lib/DtSvc/libDtSvc.elist | 1170 -------- cde/lib/DtTerm/libDtTerm.elist | 511 ---- cde/lib/DtWidget/libDtWidget.elist | 250 -- cde/lib/csa/libcsa.elist | 597 ---- cde/lib/pam/libpam/libpam.elist | 35 - cde/lib/pam/pam_modules/dce/libpam_cde.elist | 22 - .../dial_auth/libpam_dial_auth.elist | 18 - .../rhosts_auth/libpam_rhosts_auth.elist | 18 - .../pam_modules/sample/libpam_sample.elist | 28 - .../pam/pam_modules/unix/libpam_unix.elist | 48 - cde/lib/tt/lib/libtt.elist | 2534 ----------------- 15 files changed, 6562 deletions(-) delete mode 100644 cde/lib/DtHelp/libDtHelp.elist delete mode 100644 cde/lib/DtMrm/libDtMrm.elist delete mode 100644 cde/lib/DtPrint/libDtPrint.elist delete mode 100644 cde/lib/DtSearch/libDtSearch.elist delete mode 100644 cde/lib/DtSvc/libDtSvc.elist delete mode 100644 cde/lib/DtTerm/libDtTerm.elist delete mode 100644 cde/lib/DtWidget/libDtWidget.elist delete mode 100644 cde/lib/csa/libcsa.elist delete mode 100644 cde/lib/pam/libpam/libpam.elist delete mode 100644 cde/lib/pam/pam_modules/dce/libpam_cde.elist delete mode 100644 cde/lib/pam/pam_modules/dial_auth/libpam_dial_auth.elist delete mode 100644 cde/lib/pam/pam_modules/rhosts_auth/libpam_rhosts_auth.elist delete mode 100644 cde/lib/pam/pam_modules/sample/libpam_sample.elist delete mode 100644 cde/lib/pam/pam_modules/unix/libpam_unix.elist delete mode 100644 cde/lib/tt/lib/libtt.elist diff --git a/cde/lib/DtHelp/libDtHelp.elist b/cde/lib/DtHelp/libDtHelp.elist deleted file mode 100644 index b160b9199..000000000 --- a/cde/lib/DtHelp/libDtHelp.elist +++ /dev/null @@ -1,725 +0,0 @@ -/**************************************************************************** - * Export list for libDtHelp. - * This list *must* be updated whenever a change is made to the libDtHelp API. - * - * The syntax for the symbol declarations in this list is as follows: - * public sym => Public C symbol, i.e., publicised API - * private sym => Private C symbol, i.e., unpublicised API - * internal sym => Internal C symbol, i.e., not part of API - * publicC++ sym => Public C++ symbol, i.e., publicised API - * privateC++ sym => Private C++ symbol, i.e., unpublicised API - * internalC++ sym => Internal C++ symbol, i.e., not part of API - * - * $TOG: libDtHelp.elist /main/17 1999/10/14 13:15:38 mgreess $ - *****************************************************************************/ - -/* - * DtHelp Public Header File List: Those files that are public to developers via - * the Cde Dev Environment. - */ - -public DtHelpReturnSelectedWidgetId -public DtHelpSetCatalogName -public DtCreateHelpDialog -public DtCreateHelpQuickDialog -public DtHelpQuickDialogGetChild - -public dtHelpDialogWidgetClass -public dtHelpQuickDialogWidgetClass - -public dtHelpDialogWidgetClassRec -public dtHelpQuickDialogWidgetClassRec - -/***************************************************************************** - * DtCanvas Semi-private Header File List: Those files used by other desktop - * clients, but not public to cde developers via the Cde Dev Environment. - *****************************************************************************/ -private _DtCanvasCreate -private _DtCanvasClean -private _DtCanvasDestroy -private _DtCanvasResize -private _DtCanvasSetTopic -private _DtCanvasGetMarkPositions -private _DtCanvasRender -private _DtCanvasMoveTraversal -private _DtCanvasGetCurLink -private _DtCanvasGetCurTraversal -private _DtCanvasGetPosLink -private _DtCanvasProcessSelection -private _DtCanvasGetSelection -private _DtCanvasGetSelectionPoints -private _DtCanvasActivatePts -private _DtCanvasLoadMetrics -private _DtCanvasGetSpotInfo - -/***************************************************************************** - * DtLinkMgr Semi-private Header File List: Those files used by other desktop - * clients, but not public to cde developers via the Cde Dev Environment. - *****************************************************************************/ -private _DtLinkDbCreate -private _DtLinkDbDestroy -private _DtLinkDbAddLink -private _DtLinkDbAddSwitch -private _DtLinkDbRemoveLink - -/***************************************************************************** - * DtHelp Semi-private Header File List: Those files used by other desktop - * clients, but not public to cde developers via the Cde Dev Environment. - *****************************************************************************/ - -/**** Used by dthelpgen ****/ -private _DtHelpCeAddPtrToArray -private _DtHelpCeCreateDefCanvas -private _DtHelpCeDestroyCanvas -private _DtHelpCeFreeStringArray -private _DtHelpCeExpandPathname -private _DtHelpCeGetAsciiVolumeAbstract -private _DtHelpCeGetNxtToken -private _DtHelpCeGetResourceString -private _DtHelpCeGetResourceStringArray -private _DtHelpCeGetTopicTitle -private _DtHelpCeGetVolumeLocale -private _DtHelpCeGetVolumeTitle -private _DtHelpCeTracePathName -private _DtHelpCeCloseVolume -private _DtHelpCeOpenVolume - -/**** Used by dthelpview ****/ -private _DtHelpTurnOffHourGlass -private _DtHelpTurnOnHourGlass -private _DtHelpGetMessage - - -/**** Old Ascii Functions ****/ -private _DtHelpFreeTopicData -private _DtHelpGetTopicData -private _DtHelpProcessLinkData - - -/**** Used by cdecruse & cdewalk ****/ -private _DtHelpGetTopicChildren - -/**** Used by dthelpprint ****/ -private _DtHelpTermGetTopicData -private _DtHelpTermCreateCanvas -private _DtHelpCeGetTopicChildren -private _DtHelpCeStrchr -private _DtHelpFileLocate -private _DtHelpCeGetKeywordList -private _DtHelpCeStrrchr -private _DtHelpFileSuffixList -private _DtHelpCeFindKeyword -private _DtHelpCeXlateOpToStdLocale -private _DtHelpCeXlateStdToOpLocale -private _DtHelpCeGetDocStamp -#if !defined(sun) -private _DtHelpCeStrCaseCmp -#endif - -/**** Used by dtinfo ****/ -private _DtHelpActivateLink -private _DtHelpCleanAndDrawWholeCanvas -private _DtHelpClearSelection -private _DtHelpCopyAction -private _DtHelpCreateDisplayArea -private _DtHelpCreateOutputArea -private _DtHelpDeSelectAll -private _DtHelpGetExactFontIndex -private _DtHelpNextLink -private _DtHelpPageLeftOrRight -private _DtHelpPageUpOrDown -private _DtHelpSearchMoveTraversal -private _DtHelpSelectAll -private _DtHelpSetScrollBars - -private _DtGrLoad -private _DtGrDestroyContext -private _DtGrOpenFile -private _DtGrCloseStream -private _DtGrRegisterConverter -private _DtGrOpenBuffer -private _DtGrSeek -private _DtGrGetChar -private _DtGrGetString -private _DtGrRead - -/**** Additional private symbols ****/ -private _DtHelpCeGetTopTopicId -private _DtHelpCeIsTopTopic - -/***************************************************************************** - **** Internal symbols nobody should call from outside DtHelp - *****************************************************************************/ -/* DtHelp - internal functions */ -internal _DtCliSrvGetDtUserSession -internal _DtCvAddPtrToArray -internal _DtCvAddSpace -internal _DtCvAddToMarkList -internal _DtCvAdjustForSuperSub -internal _DtCvAdvanceXOfLine -internal _DtCvCalcMarkPos -internal _DtCvChar -internal _DtCvCheckAddHyperToTravList -internal _DtCvCheckInfringement -internal _DtCvCheckLineMarks -internal _DtCvCheckLineSyntax -internal _DtCvCheckOneByteCantBeginList -internal _DtCvCheckOneByteCantEndList -internal _DtCvClearInternalUse -internal _DtCvCvtSegsToPts -internal _DtCvDrawAreaWithFlags -internal _DtCvDrawSegments -internal _DtCvFontMetrics -internal _DtCvFreeArray -internal _DtCvGetCharIdx -internal _DtCvGetMarkSegs -internal _DtCvGetNextSearchEntry -internal _DtCvGetNextTravEntry -internal _DtCvGetNextWidth -internal _DtCvGetSearchLineMetrics -internal _DtCvGetStartXOfLine -internal _DtCvGetStringWidth -internal _DtCvGetTraversalWidth -internal _DtCvGetWidthOfSegment -internal _DtCvInitLayoutInfo -internal _DtCvModifyXpos -internal _DtCvProcessStringSegment -internal _DtCvRunInterp -internal _DtCvSaveInfo -internal _DtCvSetJoinInfo -internal _DtCvSetSearchEntryInfo -internal _DtCvSetTravEntryInfo -internal _DtCvSetTravEntryPos -internal _DtCvSkipLineChars -internal _DtCvSortTraversalList -internal _DtCvStrCaseCmpLatin1 -internal _DtCvStrNCaseCmpLatin1 -internal _DtCvStrLen -internal _DtCvStrPtr -internal _DtCvStrcspn -internal _DtGrReadBitmapStream -internal _DtGrReadBitmapStreamData -internal _DtHelpAllocateSegments -internal _DtHelpBuildPathArea -internal _DtHelpCB -internal _DtHelpCancelSelection -internal _DtHelpCeAddCharToBuf -internal _DtHelpCeAddOctalToBuf -internal _DtHelpCeAddSegToList -internal _DtHelpCeAddStrToBuf -internal _DtHelpCeAllocSegment -internal _DtHelpCeAllocateFontStruct -internal _DtHelpCeBufFileClose -internal _DtHelpCeBufFileCreate -internal _DtHelpCeBufFileFlush -internal _DtHelpCeBufFileOpenWr -internal _DtHelpCeBufFilePushZ -internal _DtHelpCeBufFileRd -internal _DtHelpCeBufFileRdRawZ -internal _DtHelpCeBufFileRdWithFd -internal _DtHelpCeCheckAndCacheDir -internal _DtHelpCeCheckNextCcdfCmd -internal _DtHelpCeCleanSdlVolume -internal _DtHelpCeCloseCcdfVolume -internal _DtHelpCeCloseSdlVolume -internal _DtHelpCeCompressPathname -internal _DtHelpCeCompressSpace -internal _DtHelpCeCopyDefFontAttrList -internal _DtHelpCeCountChars -internal _DtHelpCeCreatePipeBufFile -internal _DtHelpCeFileOpenAndSeek -internal _DtHelpCeFindCcdfId -internal _DtHelpCeFindId -internal _DtHelpCeFindSdlId -internal _DtHelpCeFindSkipSdlElementEnd -internal _DtHelpCeFrmtCcdfPathAndChildren -internal _DtHelpCeFrmtCcdfTopic -internal _DtHelpCeFrmtSDLTitleToAscii -internal _DtHelpCeFrmtSDLVolTitleToAscii -internal _DtHelpCeFrmtSdlPathAndChildren -internal _DtHelpCeFrmtSdlVolumeAbstractToAscii -internal _DtHelpCeFrmtSdlVolumeInfo -internal _DtHelpCeGetCcdfAbbrevCmd -internal _DtHelpCeGetCcdfCmd -internal _DtHelpCeGetCcdfDocStamp -internal _DtHelpCeGetCcdfEndMark -internal _DtHelpCeGetCcdfFontType -internal _DtHelpCeGetCcdfIdPath -internal _DtHelpCeGetCcdfKeywordList -internal _DtHelpCeGetCcdfStrParam -internal _DtHelpCeGetCcdfTitleChunks -internal _DtHelpCeGetCcdfTopTopic -internal _DtHelpCeGetCcdfTopicAbbrev -internal _DtHelpCeGetCcdfTopicChildren -internal _DtHelpCeGetCcdfTopicCmd -internal _DtHelpCeGetCcdfTopicParent -internal _DtHelpCeGetCcdfValueParam -internal _DtHelpCeGetCcdfVolIdList -internal _DtHelpCeGetCcdfVolLocale -internal _DtHelpCeGetCcdfVolTitle -internal _DtHelpCeGetCcdfVolTitleChunks -internal _DtHelpCeGetCcdfVolumeAbstract -internal _DtHelpCeGetCcdfVolumeTitle -internal _DtHelpCeGetLangSubParts -internal _DtHelpCeGetMbLen -internal _DtHelpCeGetNxtBuf -internal _DtHelpCeGetSdlAttribute -internal _DtHelpCeGetSdlAttributeCdata -internal _DtHelpCeGetSdlAttributeList -internal _DtHelpCeGetSdlCdata -internal _DtHelpCeGetSdlDocStamp -internal _DtHelpCeGetSdlHomeTopicId -internal _DtHelpCeGetSdlId -internal _DtHelpCeGetSdlIdPath -internal _DtHelpCeGetSdlKeywordList -internal _DtHelpCeGetSdlNumber -internal _DtHelpCeGetSdlTitleChunks -internal _DtHelpCeGetSdlTopicChildren -internal _DtHelpCeGetSdlVolCharSet -internal _DtHelpCeGetSdlVolIds -internal _DtHelpCeGetSdlVolIndex -internal _DtHelpCeGetSdlVolLanguage -internal _DtHelpCeGetSdlVolTitleChunks -internal _DtHelpCeGetSdlVolToss -internal _DtHelpCeGetSdlVolumeAsciiAbstract -internal _DtHelpCeGetSdlVolumeLocale -internal _DtHelpCeGetSdlVolumePtr -internal _DtHelpCeGetStrcollProc -internal _DtHelpCeGetUncompressedFileName -internal _DtHelpCeGetVolumeFlag -internal _DtHelpCeGetVolumeName -internal _DtHelpCeIconvClose -internal _DtHelpCeIconvContextSuitable -internal _DtHelpCeIconvOpen -internal _DtHelpCeIconvStr -internal _DtHelpCeIconvStr1Step -internal _DtHelpCeInitSdlVolume -internal _DtHelpCeLockVolume -internal _DtHelpCeMapCcdfTargetToId -internal _DtHelpCeMapIdToSdlTopicId -internal _DtHelpCeMapSdlIdToSegment -internal _DtHelpCeMapTargetToId -internal _DtHelpCeMatchSdlElement -internal _DtHelpCeMatchSemanticStyle -internal _DtHelpCeMergeSdlAttribInfo -internal _DtHelpCeOpenCcdfVolume -internal _DtHelpCeOpenSdlVolume -internal _DtHelpCeParseSdlTopic -internal _DtHelpCeReadBuf -internal _DtHelpCeRereadCcdfVolume -internal _DtHelpCeRereadSdlVolume -internal _DtHelpCeResolveSpcToAscii -internal _DtHelpCeReturnSdlElement -internal _DtHelpCeSaveString -internal _DtHelpCeSkipCcdfAbbrev -internal _DtHelpCeSkipCdata -internal _DtHelpCeSkipToNextCcdfToken -internal _DtHelpCeStrCaseCmpLatin1 -internal _DtHelpCeStrNCaseCmpLatin1 -internal _DtHelpCeStrHashToKey -internal _DtHelpCeStrcspn -internal _DtHelpCeStripSpaces -internal _DtHelpCeStrspn -internal _DtHelpCeTraceFilenamePath -internal _DtHelpCeUncompressFile -internal _DtHelpCeUnlockVolume -internal _DtHelpCeUpVolumeOpenCnt -internal _DtHelpCeUpperCase -internal _DtHelpCeWaitAndProcessEvents -internal _DtHelpClickOrSelectCB -internal _DtHelpCloseVolume -internal _DtHelpCommonHelpClean -internal _DtHelpCommonHelpInit -internal _DtHelpCopyDefaultList -internal _DtHelpCopyCasualList -internal _DtHelpDABuildSelection -internal _DtHelpDADestroyGraphic -internal _DtHelpDADestroyRegion -internal _DtHelpDADestroySpc -internal _DtHelpDAGetCvsMetrics -internal _DtHelpDAGetFontMetrics -internal _DtHelpDAGetSpcString -internal _DtHelpDAGetStrWidth -internal _DtHelpDALoadGraphic -internal _DtHelpDARenderElem -internal _DtHelpDAResolveFont -internal _DtHelpDAResolveSpc -internal _DtHelpDATocMarker -internal _DtHelpDefaultHelp4HelpVolume -internal _DtHelpDefaultHelpPrint -internal _DtHelpDefaultLocationId -internal _DtHelpDefaultSrchHitPrefixFont -internal _DtHelpDestroyTopicData -internal _DtHelpDialogHypertextCB -internal _DtHelpDialogWidgetGeoMatrixCreate -internal _DtHelpDialogWidgetNoGeoRequest -internal _DtHelpDisplayAreaClean -internal _DtHelpDisplayAreaData -internal _DtHelpDisplayAreaDestroyCB -internal _DtHelpDisplayAreaDimensionsReturn -internal _DtHelpDisplayAreaSetList -internal _DtHelpDisplayAreaWidget -internal _DtHelpDisplayBackCB -internal _DtHelpDisplayBrowserHomeCB -internal _DtHelpDisplayDefinitionBox -internal _DtHelpDisplayFormatError -internal _DtHelpDisplayHistoryCB -internal _DtHelpDisplayHistoryInfo -internal _DtHelpDisplayIndexCB -internal _DtHelpDisplayPrintDialog -internal _DtHelpDupFontHints -internal _DtHelpDuplicateWindowCB -internal _DtHelpEndSelectionCB -internal _DtHelpEnterLeaveCB -internal _DtHelpErrorDialog -internal _DtHelpExecFilteredCmd -internal _DtHelpExecProcedure -internal _DtHelpExpandHelpVolume -internal _DtHelpExposeCB -internal _DtHelpFileFreeEntry -internal _DtHelpFileGetSearchPaths -internal _DtHelpFileIsSameP -internal _DtHelpFileListAddFile -internal _DtHelpFileListCreateSelectionDialog -internal _DtHelpFileListGetMatch -internal _DtHelpFileListGetNext -internal _DtHelpFileListScanPaths -internal _DtHelpFileTraceLinks -internal _DtHelpFileTraceToFile -internal _DtHelpFilterExecCmd -internal _DtHelpFilterExecCmdCB -internal _DtHelpFilterExecCmdStr -internal _DtHelpFmtFindBreak -internal _DtHelpFocusCB -internal _DtHelpFormatAsciiFile -internal _DtHelpFormatAsciiString -internal _DtHelpFormatAsciiStringDynamic -internal _DtHelpFormatIndexEntries -internal _DtHelpFormatManPage -internal _DtHelpFormatToc -internal _DtHelpFormatTopic -internal _DtHelpFormatTopicTitle -internal _DtHelpFormatVolumeTitle -internal _DtHelpFreeFontHints -internal _DtHelpFreePrintStuff -internal _DtHelpFreeSegments -internal _DtHelpGetAsciiVolumeTitle -internal _DtHelpGetClearSelection -internal _DtHelpGetHourGlassCursor -internal _DtHelpGetLocale -internal _DtHelpGetNxtToken -internal _DtHelpGetScrollbarValue -internal _DtHelpGetStringQuarks -internal _DtHelpGetSystemSearchPath -internal _DtHelpGetTopicDataHandles -internal _DtHelpGetTopicTitle -internal _DtHelpGetUserSearchPath -internal _DtHelpGetVolumeLocale -internal _DtHelpGlobSrchCleanAndClose -internal _DtHelpGlobSrchDisplayDialog -internal _DtHelpGlobSrchInitVars -internal _DtHelpGlobSrchUpdateCurVol -internal _DtHelpHorzScrollCB -internal _DtHelpInitPrintStuff -internal _DtHelpInitiateClipboard -internal _DtHelpListAdd -internal _DtHelpListFree -internal _DtHelpLoadMultiInfo -internal _DtHelpLoseSelectionCB -internal _DtHelpMapCB -internal _DtHelpMapCenteredCB -internal _DtHelpMouseMoveCB -internal _DtHelpMoveBtnFocusCB -internal _DtHelpOSGetHomeDirName -internal _DtHelpOpenVolume -internal _DtHelpPaperSizeNames -internal _DtHelpPaperSizeNamesCnt -internal _DtHelpParseAccessFile -internal _DtHelpParseIdString -internal _DtHelpPrintJob -internal _DtHelpPrintSetValues -internal _DtHelpProcessGraphic -internal _DtHelpProcessHyperSelection -internal _DtHelpQuickDialogHypertextCB -internal _DtHelpQuickDialogWidgetGeoMatrixCreate -internal _DtHelpQuickDialogWidgetNoGeoRequest -internal _DtHelpResizeCB -internal _DtHelpResizeDisplayArea -internal _DtHelpResolvePathname -internal _DtHelpSetButtonPositions -internal _DtHelpSetupDisplayType -internal _DtHelpTopicListAddToHead -internal _DtHelpTopicListDeleteHead -internal _DtHelpTopicListFree -internal _DtHelpTurnOffNoEnter -internal _DtHelpTurnOnNoEnter -internal _DtHelpUpdateDisplayArea -internal _DtHelpUpdateHistoryList -internal _DtHelpUpdateJumpList -internal _DtHelpUpdatePath -internal _DtHelpUpdatePathArea -internal _DtHelpUpdatePrintDialog -internal _DtHelpVertScrollCB -internal _DtHelpVisibilityCB -internal _DtHelpXmFontListGetPropertyMax -internal _DtLinkDbGetHint -internal _DtLinkDbGetLinkInfo -internal _DtLinkDbGetLinkSpec -internal _DtLinkDbGetLinkType -internal __DtHelpCeGetParagraphList -internal __DtHelpCeProcessString -internal __DtHelpCeSetUpVars -internal __DtHelpDefaultFontIndexGet -internal __DtHelpFontCharSetQuarkGet -internal __DtHelpFontDatabaseInit -internal __DtHelpFontIndexGet -internal __DtHelpFontLangQuarkGet -internal __DtHelpFontMetrics -internal __DtHelpFontSetGet -internal __DtHelpFontStructGet - -/* DtHelp - globals */ -internal _DtHelpMsg_0000 -internal _DtHelpMsg_0001 -internal _DtHelpMsg_0002 -internal _DtHelpMsg_0003 -internal _DtHelpMsg_0004 -internal _DtHelpMsg_0005 -internal _DtHelpMsg_0006 -internal _DtHelpMsg_0007 -internal _DtHelpMsg_0008 -internal _DtHelpMsg_0009 -internal _DtHelpMsg_0010 -internal _DtHelpMsg_0011 -internal _DtMsgQuickHelp_0001 - -/* il library objects symbols */ - -internal _ilAddInvertFilter -internal _ilAddLevelConversionFilter -internal _ilAddPipeDestroyObject -internal _ilAddProducerImage -internal _ilAddThrottlePipeElement -internal _ilAllocStripOffsets -internal _ilAreaScaleBitonal -internal _ilConvertRGBToPalette -internal _ilConvertRGBToYCbCr -internal _ilConvertYCbCrToRGB -internal _ilCreateObject -internal _ilDecompG3 -internal _ilDecompG4 -internal _ilDecompG4Line -internal _ilDecompJPEG -internal _ilDecompLZW -internal _ilDecompPackbits -internal _ilDecompress -internal _ilDiffuseGrayToBitonal -internal _ilDitherKernel -internal _ilDitherYCbCr -internal _ilFastUpsample -internal _ilFormat4To8Bit -internal _ilFormat8Bit3PixelToPlane -internal _ilFormat8Bit3PlaneToPixel -internal _ilFormat8To4Bit -internal _ilFormatRowBitAlign -internal _ilFreeImagePixels -internal _ilGrayToRGB -internal _ilInsertCompressedCopyFilter -internal _ilInsertCopyFilter -internal _ilIntersectRect -internal _ilJPEGCopyData -internal _ilJPEGDataIn -internal _ilJPEGFreeTables -internal _ilJPEGTablesIn -internal _ilMallocImagePixels -internal _ilMul4 -internal _ilMul8 -internal _ilObjectDestroyContext -internal _ilObjectInitContext -internal _ilPaletteToRGBByte -internal _ilPutOnes -internal _ilRGBToGray -internal _ilReallocCompressedBuffer -internal _ilReallocJPEGEncode -internal _ilScaleBitonalToGray -internal _ilScaleSample -internal _ilSetDefaultStripSize -internal _ilSetFeedPipeData -internal _ilSetPipeDesFormat -internal _ilSubsampleShift -internal _ilSubsampleYCbCr -internal _ilTagTypeItemSizes -internal _ilTagTypeItemsThatFit -internal _ilThresholdGrayToBitonal -internal _ilUpsampleYCbCr -internal _ilValidateDesFormat -internal _iljpgDeDCT4x4 -internal _iljpgDeDCTCleanup -internal _iljpgDeDCTDCOnly -internal _iljpgDeDCTFull -internal _iljpgDeDCTInit -internal _iljpgDehuffCleanup -internal _iljpgDehuffExecute -internal _iljpgDehuffInit -internal _iljpgDehuffReset -internal _iljpgValidPars -internal _iljpgZigzagTable -internal il3BytePixelImageFormat -internal il3BytePlaneImageFormat -internal ilAbortPipe -internal ilAddPipeElement -internal ilArFax1DDecodeBlack -internal ilArFax1DDecodeWhite -internal ilArFax2DDecodeTable -internal ilBitImageFormat -internal ilBitReverseTable -internal ilBitonal0WhiteImageDes -internal ilByteImageFormat -internal ilChangeXWC -internal ilConnectFile -internal ilConvert -internal ilConvertForXWrite -internal ilCreateClientImage -internal ilCreateInternalImage -internal ilCreatePipe -internal ilCreateXWC -internal ilCrop -internal ilDeclarePipeInvalid -internal ilDestroyContext -internal ilDestroyObject -internal ilEmptyPipe -internal ilExecutePipe -internal ilGetBytesPerRow -internal ilGetPipeInfo -internal ilGetPrivateType -internal ilGray256ImageDes -internal ilInternalCreateContext -internal ilListFileImages -internal ilMap -internal ilPaletteImageDes -internal ilQueryClientImage -internal ilQueryInternalImage -internal ilQueryPipe -internal ilQueryXWC -internal ilRGB256ImageDes -internal ilReadFileImage -internal ilReadFileTags -internal ilRecommendedStripHeight -internal ilScale -internal ilWriteXDrawable -internal ilYCbCr2ImageDes -internal ilYCbCrImageDes -internal iljpgDecodeCleanup -internal iljpgDecodeExecute -internal iljpgDecodeInit -internal iljpgDecodeJIF -internal iljpgFreeData - -/* GifUtils - functions */ -internal DeleteGifObjectResources -internal InitGifObject -internal ReadImage -internal allocate_colors -internal allocate_greys -internal create_pixmap -internal create_raw_image -internal free_raw_image -internal gif_to_pixmap - -#if 0 -#ifdef sun -/* symbols from sunregexp/?*.c */ -internal __compile -internal _braelist -internal _braslist -internal _compile -internal _loc1 -internal _loc2 -internal _locs -internal _nbra -internal _radvance -internal _regerrno -internal _reglength -internal _step -internal braelist -internal braslist -internal compile -internal loc1 -internal loc2 -internal locs -internal nbra -internal advance -internal regerrno -internal reglength -internal step -#endif -#endif - - -/* jpeg library objects symbols */ - -internal jdiv_round_up -internal jpeg_idct_1x1 -internal init_jpeg_dest_mgr -internal jinit_marker_reader -internal jpeg_idct_2x2 -internal jpeg_new_colormap -internal jpeg_alloc_quant_table -internal jpeg_free_large -internal jpeg_abort -internal jpeg_get_large -internal jpeg_idct_4x4 -internal jcopy_block_row -internal jpeg_CreateDecompress -internal jpeg_read_raw_data -internal jpeg_start_output -internal jpeg_mem_available -internal jinit_color_deconverter -internal jpeg_natural_order -internal jinit_inverse_dct -internal jinit_master_decompress -internal jzero_far -internal jinit_1pass_quantizer -internal jinit_2pass_quantizer -internal jpeg_idct_float -internal jpeg_mem_init -internal jpeg_resync_to_restart -internal jpeg_free_small -internal jpeg_destroy_decompress -internal jpeg_open_backing_store -internal jpeg_idct_ifast -internal jpeg_get_small -internal jpeg_mem_term -internal jinit_upsampler -internal jinit_memory_mgr -internal jpeg_set_marker_processor -internal jinit_d_post_controller -internal jpeg_to_ximage -internal jpeg_abort_decompress -internal jpeg_alloc_huff_table -internal jpeg_make_d_derived_tbl -internal jpeg_input_complete -internal jpeg_finish_decompress -internal jpeg_calc_output_dimensions -internal jinit_d_coef_controller -internal jround_up -internal jinit_huff_decoder -internal jpeg_fill_bit_buffer -internal jpeg_read_scanlines -internal jpeg_consume_input -internal jinit_input_controller -internal jpeg_has_multiple_scans -internal jpeg_stdio_src -internal jcopy_sample_rows -internal jpeg_read_coefficients -internal jinit_d_main_controller -internal jpeg_idct_islow -internal jpeg_read_header -internal jpeg_finish_output -internal jinit_merged_upsampler -internal jinit_phuff_decoder -internal jpeg_destroy -internal jpeg_std_error -internal jpeg_start_decompress -internal jpeg_huff_decode -internal jpeg_std_message_table diff --git a/cde/lib/DtMrm/libDtMrm.elist b/cde/lib/DtMrm/libDtMrm.elist deleted file mode 100644 index ba347accb..000000000 --- a/cde/lib/DtMrm/libDtMrm.elist +++ /dev/null @@ -1,16 +0,0 @@ -/**************************************************************************** - * Export list for libDtMrm. - * This list *must* be updated whenever a change is made to the libDtMrm API. - * - * The syntax for the symbol declarations in this list is as follows: - * public sym => Public C symbol, i.e., publicised API - * private sym => Private C symbol, i.e., unpublicised API - * internal sym => Internal C symbol, i.e., not part of API - * publicC++ sym => Public C++ symbol, i.e., publicised API - * privateC++ sym => Private C++ symbol, i.e., unpublicised API - * internalC++ sym => Internal C++ symbol, i.e., not part of API - * - * $TOG: libDtMrm.elist /main/1 1999/09/08 11:53:46 mgreess $ - *****************************************************************************/ - -public DtMrmInitialize diff --git a/cde/lib/DtPrint/libDtPrint.elist b/cde/lib/DtPrint/libDtPrint.elist deleted file mode 100644 index bcb629575..000000000 --- a/cde/lib/DtPrint/libDtPrint.elist +++ /dev/null @@ -1,150 +0,0 @@ -/* $XConsortium: libDtPrint.elist /main/15 1996/08/19 17:12:44 cde-hp $ */ - -/************************************************************************* - * Export list for libDtPrint - * This list *must* be updated whenever a change is made to the library API. - * - * The syntax for the symbol declarations in this list is as follows: - * public sym => Public C symbol, i.e., publicized API - * publicC++ sym => Public C++ symbol, i.e., publicized API - * private sym => Private C symbol, i.e., unpublicized API - * privateC++ sym => Private C++ symbol, i.e., unpublicized API - * internal sym => Internal C symbol, i.e., not part of API - * internalC++ sym => Internal C++ symbol, i.e., not part of API - * - **************************************************************************/ - - -/******************************************************************** - * Public symbols -- available to everyone - ********************************************************************/ - -public DtCreatePrintSetupBox -public DtCreatePrintSetupDialog -public DtPrintCopySetupData -public DtPrintFillSetupData -public DtPrintFreeSetupData -public DtPrintResetConnection -public dtPrintSetupBoxWidgetClass - - -/******************************************************************** - * Private symbols -- Undocumented APIs that are exported for B.C. - * or because privileged applications may need used them. - ********************************************************************/ - -private _DtCreatePDMJobSetup -private _DtPrintGetMessage -private _DtPrintSetupBoxCreateBottomSeparator -private _DtPrintSetupBoxCreateButtonSeparator -private _DtPrintSetupBoxCreateCancelButton -private _DtPrintSetupBoxCreateCopiesControl -private _DtPrintSetupBoxCreateDescription -private _DtPrintSetupBoxCreateDescriptionLabel -private _DtPrintSetupBoxCreateDestinationRadioBox -private _DtPrintSetupBoxCreateFileNameLabel -private _DtPrintSetupBoxCreateFileNameText -private _DtPrintSetupBoxCreateHelpButton -private _DtPrintSetupBoxCreatePrintButton -private _DtPrintSetupBoxCreatePrinterInfoButton -private _DtPrintSetupBoxCreatePrinterNameCombo -private _DtPrintSetupBoxCreatePrinterNameLabel -private _DtPrintSetupBoxCreateSelectFileButton -private _DtPrintSetupBoxCreateSelectPrinterButton -private _DtPrintSetupBoxCreateSetupButton -private _DtPrintSetupBoxCreateTopSeparator -private _DtPrintSetupBoxGeoMatrixCreate -private _DtPrintSetupBoxGetCopies -private _DtPrintSetupBoxGetDescription -private _DtPrintSetupBoxGetFileName -private _DtPrintSetupBoxGetPrinterName -private _DtPrintSetupBoxNoGeoRequest -private dtPrintSetupBoxClassRec - -private _DtPrintCreateHdrFtrFrame -private _DtPrintHdrFtrFrameEnumToWidget -private _DtPrintHdrFtrFrameMenuWidgets -private _DtPrintGetHdrFtrData -private _DtPrintGetHdrFtrIndex -private _DtPrintGetHdrFtrString -private _DtPrintSetHdrFtrByData -private _DtPrintSetHdrFtrByIndex -private _DtPrintSetHdrFtrByString - -private _DtPrintCreateMarginFrame -private _DtPrintMarginFrameEnumToWidget -private _DtPrintGetMarginSpec -private _DtPrintSetMarginSpec - - -/******************************************************************** - * Internal symbols -- not to be used outside the library. - ********************************************************************/ - -internal _DtPrMsgPrintSetupBox_0000 -internal _DtPrMsgPrintSetupBox_0001 -internal _DtPrMsgPrintSetupBox_0002 -internal _DtPrMsgPrintSetupBox_0003 -internal _DtPrMsgPrintSetupBox_0004 -internal _DtPrMsgPrintSetupBox_0005 -internal _DtPrMsgPrintSetupBox_0006 -internal _DtPrMsgPrintSetupBox_0007 -internal _DtPrMsgPrintSetupBox_0008 -internal _DtPrMsgPrintSetupBox_0009 -internal _DtPrMsgPrintSetupBox_0010 -internal _DtPrMsgPrintSetupBox_0011 -internal _DtPrMsgPrintSetupBox_0012 -internal _DtPrMsgPrintSetupBox_0013 -internal _DtPrMsgPrintSetupBox_0014 -internal _DtPrMsgPrintSetupBox_0015 -internal _DtPrMsgPrintSetupBox_0016 -internal _DtPrMsgPrintSetupBox_0017 -internal _DtPrMsgPrintSetupBox_0018 -internal _DtPrMsgPrintSetupBox_0019 -internal _DtPrMsgPrintSetupBox_0020 -internal _DtPrMsgPrintSetupBox_0021 -internal _DtPrMsgPrintSetupBox_0022 -internal _DtPrMsgPrintSetupBox_0023 -internal _DtPrMsgPrintSetupBox_0024 -internal _DtPrMsgPrintSetupBox_0025 -internal _DtPrMsgPrintSetupBox_0026 -internal _DtPrMsgPrintSetupBox_0027 -internal _DtPrMsgPrintSetupBox_0028 -internal _DtPrMsgPrintSetupBox_0029 -internal _DtPrMsgPrintSetupBox_0030 -internal _DtPrMsgPrintSetupBox_0031 -internal _DtPrMsgPrintSetupBox_0032 -internal _DtPrMsgPrintSetupBox_0033 -internal _DtPrMsgPrintSetupBox_0034 -internal _DtPrMsgPrintSetupBox_0035 -internal _DtPrMsgPrintSetupBox_0036 - -internal _DtPrMsgPrintOption_0000 -internal _DtPrMsgPrintOption_0001 -internal _DtPrMsgPrintOption_0002 -internal _DtPrMsgPrintOption_0003 -internal _DtPrMsgPrintOption_0004 -internal _DtPrMsgPrintOption_0005 -internal _DtPrMsgPrintOption_0006 -internal _DtPrMsgPrintOption_0007 -internal _DtPrMsgPrintOption_0008 -internal _DtPrMsgPrintOption_0009 - -internal _DtPrMsgPrintDlgMgr_0000 -internal _DtPrMsgPrintDlgMgr_0001 -internal _DtPrMsgPrintDlgMgr_0002 - -internal _DtPrintCreateXPrinterSpecifier -internal _DtPrintDefProcInitialize -internal _DtPrintDefProcManageErrorBox -internal _DtPrintFreeStringList -internal _DtPrintGetDefaultXPrinterName -internal _DtPrintGetXpPrinterList -internal _DtPrintGetXpServerList -internal _DtPrintParseXDisplaySpecifier -internal _DtPrintParseXPrinterSpecifier -internal _DtPrintSetupBoxSelectFileProc -internal _DtPrintSetupBoxSelectXPrinterProc -internal _DtPrintSetupBoxVerifyXPrinterProc -internal _DtPrintSetupBoxXPrinterInfoProc -internal _DtPrintVerifyXPrinter diff --git a/cde/lib/DtSearch/libDtSearch.elist b/cde/lib/DtSearch/libDtSearch.elist deleted file mode 100644 index 306b623fb..000000000 --- a/cde/lib/DtSearch/libDtSearch.elist +++ /dev/null @@ -1,440 +0,0 @@ -/* $TOG: libDtSearch.elist /main/4 1999/10/14 14:12:00 mgreess $ */ - -/************************************************************************* - * Export list for libDtSearch - * This list *must* be updated whenever a change is made to the library API. - * - * The syntax for the symbol declarations in this list is as follows: - * public sym => Public C symbol, i.e., publicized API - * private sym => Private C symbol, i.e., unpublicized API - * internal sym => Internal C symbol, i.e., not part of API - * - **************************************************************************/ - - -/******************************************************************** - * Public symbols -- available to everyone - ********************************************************************/ - -public DtSearchAddMessage -public DtSearchAddUserExit -public DtSearchExit -public DtSearchFormatObjdate -public DtSearchFreeMessages -public DtSearchFreeResults -public DtSearchGetKeytypes -public DtSearchGetMaxResults -public DtSearchGetMessages -public DtSearchHasMessages -public DtSearchHighlight -public DtSearchInit -public DtSearchMergeResults -public DtSearchQuery -public DtSearchReinit -public DtSearchRemoveUserExit -public DtSearchRetrieve -public DtSearchSetMaxResults -public DtSearchSortResults -public DtSearchValidDateString - - -/******************************************************************** - * Private symbols -- Undocumented APIs that are exported for B.C. - * or because privileged applications may need used them. - ********************************************************************/ - -private ADDRcmp -private INTcmp -private OEF_audit -private OEF_discard -private OEF_news -private OEF_notesnot -private OEF_notessem -private OEF_readme -private OE_bmhtab_strlen -private OE_bmhtables -private OE_dbn -private OE_enable_markdel -private OE_enable_usernotes -private OE_expiration -private OE_fastdecode -private OE_fileio -private OE_flags -private OE_inittab_dir -private OE_objsize -private OE_prodname -private OE_prox_factor -private OE_search_type -private OE_server_dir -private OE_sitecnfg_fname -private OE_sitecnfg_mtime -private OE_uppercase_keys -private OE_words_hitlimit -private Opera_Engine -private aa_argv0 -private aa_maxhits -private aa_stderr -private add_free_space -private add_syntax_errmsg -private alloc_table -private append_ext -private ascii_charmap -private ausapi_dbnamesc -private ausapi_dbnamesv -private ausapi_msglist -private austext_dopen -private austext_exit_comm -private austext_exit_dbms -private austext_exit_endwin -private austext_exit_first -private austext_exit_last -private austext_exit_mem -private austext_exit_user -private austext_malloc -private austools_catd -private batch_size -private bmhcore -private bmhtable_build -private bmstrstr -private boolyac_AND -private boolyac_COLLOC -private boolyac_NOT -private boolyac_OR -private check_dba -private clean_wrap -private clear_hitwords -private clear_usrblk_record -private compare_llist -private compat_dbd -private con_dbd -private con_dbf -private copy_final_truthtab -private crloc -private ctb_init -private ctbl_alloc -private ctbl_free -private cutnode_llist -private d_alloc -private d_calloc -private d_close -private d_cmtype -private d_connect -private d_cotype -private d_crget -private d_crread -private d_crset -private d_crtype -private d_crwrite -private d_csmget -private d_csmread -private d_csmset -private d_csmwrite -private d_csoget -private d_csoread -private d_csoset -private d_csowrite -private d_ctbpath -private d_dbdpath -private d_dbfpath -private d_dbuserid -private d_decode_dba -private d_delete -private d_destroy -private d_discon -private d_disdel -private d_encode_dba -private d_fillnew -private d_findco -private d_findfm -private d_findlm -private d_findnm -private d_findpm -private d_free -private d_initfile -private d_initialize -private d_ismember -private d_isowner -private d_keydel -private d_keyexist -private d_keyfind -private d_keyfrst -private d_keylast -private d_keynext -private d_keyprev -private d_keyread -private d_keystore -private d_makenew -private d_mapchar -private d_members -private d_off_opt -private d_on_opt -private d_open -private d_rdcurr -private d_recfrst -private d_reclast -private d_recnext -private d_recprev -private d_recread -private d_recset -private d_recwrite -private d_renfile -private d_rerdcurr -private d_setdb -private d_setfiles -private d_setkey -private d_setmm -private d_setmo -private d_setmr -private d_setom -private d_setoo -private d_setor -private d_setpages -private d_setrm -private d_setro -private d_wrcurr -private db_glob_init -private db_global -private db_oflag -private db_pgtab_sz -private db_status -private db_txtest -private dbautorec -private dberr -private dberr_exit -private dbn_check -private delete_whitespace -private dio_clear -private dio_close -private dio_clrfile -private dio_findpg -private dio_flush -private dio_free -private dio_get -private dio_init -private dio_open -private dio_out -private dio_pzalloc -private dio_pzclr -private dio_pzdel -private dio_pznext -private dio_pzread -private dio_read -private dio_release -private dio_setdef -private dio_touch -private dio_write -private discard_to_ETX -private dtsearch_catd -private dummy_workproc -private duprec_hashsize -private ensure_end_slash -private fillnew_wordrec -private final_truthtab -private find_free_space -private find_keyword -private fldcmp -private fread_d99_header -private free_llist -private fwrite_d99_header -private gen_vec -private gen_vec_hufid -private get_element -private get_hitlist_text -private global_memory_ptr -private hc_decode -private hc_encode -private hilite_cleartext -private init_header -private init_user_interrupt -private initdbt -private inittab -private is_compatible_version -private is_concordable -private is_duprec -private is_objdatestr -private is_objdatetm -private join_llists -private jpn_parser -private key_bldcom -private key_boundary -private key_close -private key_cmpcpy -private key_delete -private key_init -private key_insert -private key_locpos -private key_open -private key_reset -private key_scan -private largest_page -private latin_charmap -private ll_access -private ll_append -private ll_first -private ll_free -private ll_next -private ll_prepend -private load_custom_language -private load_jpn_language -private load_language -private load_ocf -private load_wordtree -private nfld_check -private nowstring -private nrec_check -private nset_check -private null_dba -private null_lstrupr -private null_stemmer -private objdate2fzkstr -private objdate2tm -private objdate_in_range -private oe_initialize -private oe_unblob -private oe_write_audit_rec -private oef_table -private old_no_of_dbs -private old_size_fd -private old_size_ft -private old_size_kt -private old_size_mt -private old_size_rt -private old_size_srt -private old_size_st -private open_b -private open_dblk -private parser_invalid_wordcount -private pop_llist -private print_dbrec -private print_dittolist -private print_stems -private print_usrblk_record -private qry_has_no_NOTs -private qry_is_all_ANDs -private r_chkfld -private r_clropt -private r_delrec -private r_gfld -private r_gmem -private r_gset -private r_pfld -private r_pmem -private r_pset -private r_setopt -private r_smem -private r_tstopt -private read_wordstr -private readchar_ftext -private readchar_string -private release_shm_mem -private renfiles -private replace_ext -private retncode_str -private saveusr -private shm_id -private shutdown_now -private size_compat -private sk_free -private sort_llist -private startup -private strupr -private swab_dbrec -private swab_objrec -private swab_page -private taskinit -private termfree -private teskey_parser -private tm2objdate -private trcommit -private unload_custom_language -private unload_language -private usrblk -private ve_append_notes -private ve_browse_dba -private ve_getblobs -private ve_getrec_dba -private ve_initialize -private ve_reckey2dba -private ve_shutdown -private ve_statistical -private vista_abort -private vista_msg -private write_wordstr - - -/******************************************************************** - * Internal symbols -- not to be used outside the library. - ********************************************************************/ - -internal Db_lookup -internal Dbpg_table -internal Used_files -internal aa_check_initialization -internal aa_getnews_flag -internal aa_is_initialized -internal boolean_parse -internal boolean_search -internal cnt_open_files -internal comp_stat -internal convert_str_2_char -internal database_has_changed -internal debugging_boolsrch -internal debugging_dbswab -internal debugging_dio_close -internal debugging_dio_init -internal debugging_dopen -internal debugging_inittab -internal debugging_jpn -internal debugging_key_swabs -internal debugging_loadlang -internal debugging_loadword -internal debugging_paice -internal debugging_search_wordtree -internal debugging_teskey -internal ditsort_type -internal dump_init_tables -internal efim_qsort -internal get_next_memory_block -internal hctree -internal hctree_id -internal hctree_name -internal hctree_root -internal init_memory -internal load_ditto_str -internal max_open_files -internal oe_uninitialize -internal process_char -internal save_init_switches -internal unload_jpn_language -internal user_interrupt -internal ve_delete - -internal yychar -internal yydebug -internal yyerror -internal yylex -internal yynerrs -internal yyparse - -#if defined(sun) -internal yy_yys -internal yy_yyv -internal yyact -internal yychk -internal yydef -internal yyerrflag -internal yyexca -internal yylval -internal yypact -internal yypgo -internal yyps -internal yypv -internal yyr1 -internal yyr2 -internal yys -internal yystate -internal yytmp -internal yyv -internal yyval -#endif - diff --git a/cde/lib/DtSvc/libDtSvc.elist b/cde/lib/DtSvc/libDtSvc.elist deleted file mode 100644 index 3b2f7069d..000000000 --- a/cde/lib/DtSvc/libDtSvc.elist +++ /dev/null @@ -1,1170 +0,0 @@ -/* $TOG: libDtSvc.elist /main/27 1999/10/15 17:21:56 mgreess $ */ - -/************************************************************************* - * Export list for libDtSvc - * This list *must* be updated whenever a change is made to the library API. - * - * The syntax for the symbol declarations in this list is as follows: - * public sym => Public C symbol, i.e., publicized API - * publicC++ sym => Public C++ symbol, i.e., publicized API - * private sym => Private C symbol, i.e., unpublicized API - * privateC++ sym => Private C++ symbol, i.e., unpublicized API - * internal sym => Internal C symbol, i.e., not part of API - * internalC++ sym => Internal C++ symbol, i.e., not part of API - * - **************************************************************************/ - -#if defined(SVR4) -# define boolean boolean_t -#else -# define boolean int -#endif - - -/******************************************************************** - * Public symbols -- available to everyone - ********************************************************************/ - -public DtActionDescription -public DtActionExists -public DtActionIcon -public DtActionInvoke -public DtActionLabel -public DtAppInitialize -public DtDbLoad -public DtDbReloadNotify -public DtDndCreateSourceIcon -public DtDndDragStart -public DtDndDropRegister -public DtDndDropUnregister -public DtDndVaDragStart -public DtDndVaDropRegister -public DtDtsBufferToAttributeList -public DtDtsBufferToAttributeValue -public DtDtsBufferToDataType -public DtDtsDataToDataType -public DtDtsDataTypeIsAction -public DtDtsDataTypeNames -public DtDtsDataTypeToAttributeList -public DtDtsDataTypeToAttributeValue -public DtDtsFileToAttributeList -public DtDtsFileToAttributeValue -public DtDtsFileToDataType -public DtDtsFindAttribute -public DtDtsFreeAttributeList -public DtDtsFreeAttributeValue -public DtDtsFreeDataType -public DtDtsFreeDataTypeNames -public DtDtsIsTrue -public DtDtsLoadDataTypes -public DtDtsRelease -public DtDtsSetDataType -public DtInfoShowTopic -public DtInitialize -public DtMsgLogMessage -public DtMsgLogOpenFile -public DtMsgLogSetHandler -public DtSaverGetWindows -public DtSessionRestorePath -public DtSessionSavePath -public DtVersion -public DtVersionString -public DtWsmAddCurrentWorkspaceCallback -public DtWsmAddWorkspaceFunctions -public DtWsmAddWorkspaceModifiedCallback -public DtWsmFreeWorkspaceInfo -public DtWsmGetCurrentBackdropWindow -public DtWsmGetCurrentWorkspace -public DtWsmGetWorkspaceInfo -public DtWsmGetWorkspaceList -public DtWsmGetWorkspacesOccupied -public DtWsmOccupyAllWorkspaces -public DtWsmRemoveWorkspaceCallback -public DtWsmRemoveWorkspaceFunctions -public DtWsmSetCurrentWorkspace -public DtWsmSetWorkspacesOccupied -public DtWsmSetWorkspaceTitle -public DtWsmChangeBackdrop -public DtWsmAddWorkspace -public DtWsmDeleteWorkspace - - -/******************************************************************** - * Private symbols -- Undocumented APIs that are exported for B.C. - * or because privileged applications may need used them. - ********************************************************************/ - -private Dt_charCount -private Dt_lastChar -private Dt_nlInit -private Dt_strchr -private Dt_strcspn -private Dt_strrchr -private Dt_strspn -private Dt_strtok -private Dt_strtok_r -private SPCD_Authentication_Dir -private SPC_Add_Env_File -private SPC_Close_Log -private SPC_Dispatch_Protocol -private SPC_Encode_Termios -private SPC_Error -private SPC_Filter_Connection -private SPC_Format_Log -private SPC_Free_Protocol_Ptr -private SPC_Getenv -private SPC_Get_Multi_Packet -private SPC_Get_Termio -private SPC_Get_Termios -private SPC_Initialize -private SPC_LocalHostinfo -private SPC_Merge_Envp -private SPC_Open_Log -private SPC_Print_Protocol -private SPC_Putenv -private SPC_Read_Protocol -private SPC_Start_Daemon -private SPC_Wait_For_Termination -private SPC_Write_Protocol_Request -private SPC_Write_Reply -private SPC_XtAddInput -private SPC_client_version_number -private SPC_logfile_list -private SPC_mount_point_env_var -private SPC_pid_list -private SPC_who_am_i -private SbAddException_hookfn -private SbAddInput_hookfn -private SbBreakMainLoop_hookfn -private SbMainLoopUntil_hookfn -private SbRemoveException_hookfn -private SbRemoveInput_hookfn -private XeCall_SbMainLoopUntil -private XeCreateContextString -private XeFree -private XeIsLocalHostP -private XeMalloc -private XeNameToSignal -private XeParseFileString -private XeProgName -private XeSBTempPath -private XeSPCAddInput -private XeSPCAttach -private XeSPCClose -private XeSPCErrorNumber -private XeSPCExecuteProcess -private XeSPCGetLogfile -private XeSPCOpen -private XeSPCRegisterTerminator -private XeSPCRemoveLogfile -private XeSPCReset -private XeSPCSendEOF -private XeSPCSetTermio -private XeSPCSignalProcess -private XeSPCSpawn -private XeSPCWrite -private XeToolClass -private Xechdir -private Xegetshorthostname -private Xestrcat -private Xestrchr -private Xestrcmp -private Xestrcoll -private Xestrcpy -private Xestrdup -private Xestrlen -private Xestrncat -private Xestrncmp -private Xestrncpy -private Xestrpbrk -private Xestrrchr -private Xestrstr -private Xestrtok -private _DtActMapFileName -private _DtAddResString -private _DtAddToResource -private _DtApplyString -private _DtBasename -private _DtCancelString -private _DtCatgetsCached -private _DtCloseString -private _DtCmdStringToArrayOfStrings -private _DtCommandInvokerExecute -private _DtCreateDtDirs -private _DtDbGetDataBaseEnv -private _DtDbPathIdToString -private _DtDbRead -private _DtDtsMMBosonToString -private _DtDtsMMExpandValue -private _DtDtsMMGet -private _DtDtsMMGetPtr -private _DtDtsMMInit -private _DtDtsMMSafeFree -private _DtEnvControl -private _DtEnvMapForRemote -private _DtEnvRestoreLocal -private _DtEnv_tt_file_netfile -private _DtFindMatchingFiles -private _DtFlushIconFileCache -private _DtFreeDatabaseDirPaths -private _DtFreeStringVector -private _DtGetDatabaseDirPaths -private _DtGetDisplayResolution -private _DtGetEmbeddedClients -private _DtGetHourGlassCursor -private _DtGetIconFileName -private _DtGetLock -private _DtGetMask -private _DtGetMessage -private _DtGetMwmWindow -private _DtGetPixmap -private _DtGetPixmapByDepth -private _DtGetResString -private _DtGetSmAudio -private _DtGetSmFont -private _DtGetSmPreedit -private _DtGetSmKeyboard -private _DtGetSmPointer -private _DtGetSmSaver -private _DtGetSmScreen -private _DtGetSmState -private _DtGetSmWindow -private _DtHelpString -private _DtHostString -private _DtInitializeCommandInvoker -private _DtInitializeToolTalk -private _DtIsSameHost -private _DtMessage -private _DtMessageClose -private _DtMessageDialog -private _DtMessageOK -private _DtNl_is_multibyte -private _DtOkString -private _DtPerfChkpntEnd -private _DtPerfChkpntInit -private _DtPerfChkpntListenInit -private _DtPerfChkpntMsgReceive -private _DtPerfChkpntMsgSend -private _DtPrintDefaultError -private _DtPrintDefaultErrorSafe -private _DtQualifyWithFirst -private _DtReleaseLock -private _DtResourceDatabase -private _DtSPCOpen -private _DtSPCSpawn -private _DtSaverStart -private _DtSaverStop -private _DtSendActivityDoneNotification -private _DtSendActivityNotification -private _DtSetSmSaver -private _DtSetSmState -private _DtSimpleErrnoError -private _DtSimpleError -private _DtStripSpaces -private _DtTurnOffHourGlass -private _DtTurnOnHourGlass -private _DtVectorizeInPlace -private _DtWmRestart -private _DtWmRestartNoConfirm -private _DtWsmAddMarqueeSelectionCallback -private _DtWsmChangeBackdrop -private _DtWsmCreateWorkspace -private _DtWsmDeleteWorkspace -private _DtWsmFreeWorkspaceHints -private _DtWsmGetDtWmHints -private _DtWsmGetWorkspaceHints -private _DtWsmIsBackdropWindow -private _DtWsmSelectionNameForScreen -private _DtWsmSetBackdropSearchPath -private _DtWsmSetDtWmHints -private _DtWsmSetWorkspaceTitle -private _Dt_NextChar -private _Dt_PrevChar -private _Dt_isspace -private _DtsMMListDb -private pathcollapse -private print_protocol_request -private shellscan -private spc_logF -private spc_user_environment_file -private sscan_application_data -private sscan_register_data - -/***************************************************************************** - ***** Private API accessible to any other Dt client - ***** This API could be moved to another library, - ***** if someone antes up to own it. Moved from DtHelp. - ***** Commented functions are part of the API but - ***** currently not in use by any Dt client. - ***** If uncommented, remove from "internal" below. - ****************************************************************************/ - -/* private _DtXlateOpenDb */ -/* private _DtXlateOpenAndMergeDbs */ -/* private _DtXlateMergeDbs */ -/* private _DtXlateOpenAllDbs */ - -private _DtXlateCloseDb - -/* private _DtXlateStdToOpValue */ -/* private _DtXlateOpToStdValue */ - -private _DtXlateGetXlateEnv -private _DtLcxOpenAllDbs -private _DtLcxXlateOpToStd -private _DtLcxXlateStdToOp - -#ifdef sun -/* Symbols from the sun-specific DtUtil2/SunDtHelp.c module. */ -private DtCreateHelpDialog -private DtCreateHelpQuickDialog -private DtHelpQuickDialogGetChild -private DtHelpReturnSelectedWidgetId -#endif - -/******************************************************************** - * Internal symbols -- not to be used outside the library. - ********************************************************************/ - -internal Alloc_Argv -internal Dt11GetMessage -internal InitDefaultTermioStruct -internal SPC_Add_Connection -internal SPC_Alloc_Connection -internal SPC_Change_State -internal SPC_Channel_Terminated -internal SPC_Channel_Terminator_Connection -internal SPC_Check_Style -internal SPC_Child_Terminated -internal SPC_Close_Connection -internal SPC_Close_Unused -internal SPC_Conditional_Packet_Handler -internal SPC_Contact_Server -internal SPC_Create_Default_Envp -internal SPC_Debug_Mode -internal SPC_Decode_Termios -internal SPC_Find_PID -internal SPC_Fixup_Environment -internal SPC_Flush_Queued_Data -internal SPC_Free_Envp -internal SPC_Get_Current_Termio -internal SPC_Inetd_Daemon -internal SPC_Init_Child -internal SPC_Init_Local_Host_Info -internal SPC_Initialize_Channel -internal SPC_Initialized -internal SPC_Input_Handler -internal SPC_Local_Hostname -internal SPC_Lookup_Channel -internal SPC_Lookup_Connection -internal SPC_Lookup_Connection_Fd -internal SPC_Lookup_Error -internal SPC_MakeSystemCommand -internal SPC_Make_Connection -internal SPC_Make_Log_Filename -internal SPC_New_Buffered_Data_Ptr -internal SPC_New_Protocol_Ptr -internal SPC_Newline_Filter -internal SPC_Open_Connection -internal SPC_Open_Socket -internal SPC_Process_Single_Prot_Request -internal SPC_Query_Devices -internal SPC_Query_Logfile -internal SPC_Read_Chars -internal SPC_Read_Remote_Data -internal SPC_ResetTerminator -internal SPC_Reset_Protocol_Ptr -internal SPC_Send_Environ -internal SPC_Send_Multi_Packet -internal SPC_Setpgrp -internal SPC_Setup_Synchronous_Terminator -internal SPC_Standalone_Daemon -internal SPC_Transform_Iomode -internal SPC_Validate_User -internal SPC_Waitfor_Reply -internal SPC_Write_Chars -internal SPC_Write_Log -internal SPC_Write_Single_Prot_Request -internal SPC_XtBreak -internal SPC_XtRemoveInput -internal SPC_copy_string -/* internal SPC_except_handlers */ -internal SPC_fd_to_connector -/* internal SPC_input_handlers */ -/* internal SetNetworkPrefix */ -/* internal SeverityString */ -internal ToolTalkErrorMsg -internal ToolTalkErrorMsg2 -internal TtFileArgMapErr -internal Ttmedia_to_Dt_StatusUpdateCB -internal XA_DELETE -internal XA_HOST_NAME -internal XA_MULTIPLE -internal XA_NULL -internal XA_SUN_ATM_FILE_NAME -internal XA_SUN_ATM_METHODS -internal XA_SUN_DATA_LABEL -internal XA_SUN_ENUM_COUNT -internal XA_SUN_FILE_HOST_NAME -internal XA_SUN_SELN_READONLY -internal XA_TARGETS -internal XA_TEXT -internal XA_TIMESTAMP -/* internal XeActivateUserMessages */ -/* internal XeAddClearCallback */ -/* internal XeAddFailNotificationCallback */ -/* internal XeAddGeneralCallbacks */ -/* internal XeAddMessageInput */ -/* internal XeAddMsgCallback */ -/* internal XeAddNotificationCallback */ -/* internal XeAddRequestCallback */ -/* internal XeAddStatusCallback */ -/* internal XeAddStopCallbacks */ -internal XeAppendToStringBuffer -/* internal XeBaseAppResources */ -/* internal XeBlockMessageInput */ -/* internal XeBottomMessageHandler */ -/* internal XeCalloc */ -/* internal XeCbSelectHook */ -/* internal XeCdToSubDir */ -/* internal XeChangeContext */ -/* internal XeChangeStatusCallback */ -/* internal XeClearBits */ -/* internal XeClearMsgServerCallbacks */ -/* internal XeClearSavedUserMessages */ -internal XeClearStringBuffer -/* internal XeCloseMsgServerConnect */ -/* internal XeConcatSBPath */ -/* internal XeConcatSavedUserMessages */ -/* internal XeContextStringFopen */ -/* internal XeContextStringFreopen */ -/* internal XeContextStringMakeConnectionReturnPath */ -/* internal XeContextStringOpen */ -/* internal XeConvertBitsToIndices */ -/* internal XeCopyContext */ -/* internal XeCreateViewableContextString */ -/* internal XeCtoI */ -/* internal XeCurrentContext */ -/* internal XeDefaultCoreUserMessageHandler */ -internal XeDefaultTermioStruct -/* internal XeDeleteSymbol */ -/* internal XeDestroyContext */ -/* internal XeDestroyStringBuffer */ -/* internal XeDomainSocketPath */ -/* internal XeDontOpenMsgChn */ -/* internal XeExecRelativePath */ -/* internal XeExpandSBPath */ -internal XeFindHost -internal XeFindShortHost -/* internal XeFlushUserMsg */ -/* internal XeFopen */ -/* internal XeFormatContext */ -/* internal XeFreopen */ -/* internal XeGetFileContextFromPath */ -/* internal XeGetMsgChannel */ -/* internal XeGetToolContextFromPath */ -/* internal XeInitMsgServer */ -/* internal XeInitMsgServerReturnStatus */ -/* internal XeInitializeContext */ -/* internal XeInitializeSBPath */ -/* internal XeInvokingContext */ -internal XeIsSameHostP -/* internal XeLookUpSBPath */ -/* internal XeMakeConnectionReturnPath */ -/* internal XeMakeContext */ -/* internal XeMakeHostRelativePath */ -internal XeMakeStringBuffer -/* internal XeMaskAndSetBits */ -/* internal XeMaxFileTypes */ -/* internal XeMsgServerConnectP */ -/* internal XeNLSInit */ -/* internal XeNLSPath */ -/* internal XeOpen */ -/* internal XeOrBits */ -/* internal XeParseContextFromPath */ -/* internal XePostInternalError */ -/* internal XePrependToStringBuffer */ -/* internal XePushAUserMessage */ -/* internal XeRealloc */ -/* internal XeRegisterFunction */ -/* internal XeRegisterSymbol */ -/* internal XeRestoreXAPPLRESDIR */ -/* internal XeSBPath */ -/* internal XeSBXAPPLRESDIR */ -internal XeSPCActive -internal XeSPCData -internal XeSPCDetach -internal XeSPCGetChannelSyncFd -internal XeSPCGetDevice -internal XeSPCGetPID -internal XeSPCGetProcessStatus -internal XeSPCHandleTerminator -internal XeSPCInterruptProcess -internal XeSPCKillProcess -internal XeSPCKillProcesses -internal XeSPCLookupError -internal XeSPCOpenAndSpawn -internal XeSPCRead -internal XeSPCRestartCallbacks -internal XeSPCShutdownCallbacks -/* internal XeSavedUserMessages */ -/* internal XeSendBusy */ -/* internal XeSendFailNotification */ -/* internal XeSendMsg */ -/* internal XeSendMsgString */ -/* internal XeSendReady */ -/* internal XeSendRequest */ -/* internal XeSendRequestCatchResponse */ -/* internal XeSendRequestWithId */ -/* internal XeSendStart */ -/* internal XeSendSuccessNotification */ -/* internal XeServerDeathFn */ -/* internal XeSetAllBits */ -/* internal XeSetBit */ -/* internal XeSetCbInputAddFn */ -/* internal XeSetCbInputBlockFn */ -/* internal XeSetContextDirectory */ -/* internal XeSetContextFile */ -/* internal XeSetContextHost */ -/* internal XeSetUserMessageHandler */ -/* internal XeSetUserSignalHandler */ -/* internal XeSetXAPPLRESDIR */ -internal XeSetpgrp -/* internal XeSignalHandler */ -internal XeSignalToName -/* internal XeSimpleErrnoError */ -/* internal XeSimpleError */ -/* internal XeSplitIntoDirAndFile */ -/* internal XeStringBufferPrintf */ -/* internal XeStringBufferSetLength */ -/* internal XeStripPrefix */ -/* internal XeSuppressUserMessages */ -internal XeTermioStruct -/* internal XeToolStatus */ -/* internal XeUniqueRequestId */ -/* internal XeUserMessage */ -/* internal XeUserMessagesSuppressed */ -/* internal XeUserMsg */ -/* internal XeUserMsgWithCallback */ -internal Xe_default_symtab -internal Xe_delete_queue_element -/* internal Xe_delete_sym */ -/* internal Xe_free_symtab */ -internal Xe_init_queue -internal Xe_intern -/* internal Xe_intern_anysym */ -internal Xe_lookup -/* internal Xe_lookup_anysym */ -/* internal Xe_make_bitmask */ -internal Xe_make_list -internal Xe_make_queue -internal Xe_new_symtab -/* internal Xe_next_anysym */ -/* internal Xe_next_sym */ -/* internal Xe_pathwexp */ -internal Xe_pop_queue -internal Xe_push_queue -/* internal Xe_queue_length */ -/* internal Xe_release_bitmask */ -internal Xe_release_queue -/* internal Xe_set_next_anysym */ -/* internal Xe_set_next_sym */ -internal Xe_set_sym_fns -internal Xe_shellexp -/* internal Xe_shellrelexp */ -/* internal Xe_top_queue */ -/* internal Xecatopen */ -internal Xegetcwd -internal Xegethostname -internal Xestrxfrm -internal _DtActAllocChildRec -internal _DtActAllocID -internal _DtActAllocInvRec -internal _DtActDeleteChildRec -internal _DtActDeleteInvRec -internal _DtActEvalChildren -internal _DtActExecutionLeafNodeCleanup -internal _DtActFindChildRec -internal _DtActFindInvRec -internal _DtActFreeArgArray -internal _DtActGenerateTmpFile -internal _DtActGetCmdReturnArgs -/* internal _DtActInvRecArray */ -internal _DtActMallocEmptyArgArray -internal _DtActReadTmpFileToBuffer -internal _DtActionCommandInvoke -internal _DtActionCompareRecordBoson -internal _DtActionConverter -internal _DtActionFindDBEntry -internal _DtActionLocateRecord -/* internal _DtAddEntry */ -internal _DtAllocHashTable -internal _DtAppContext -/* internal _DtAppInit */ -/* internal _DtAppendEntryToBuffer */ -/* internal _DtAppendToBuffer */ -internal _DtCloneRequest -/* internal _DtCmdBufferLocalStderr */ -/* internal _DtCmdBufferRemoteStderr */ -internal _DtCmdBuildPathList -internal _DtCmdCheckForExecutable -internal _DtCmdCheckQForId -internal _DtCmdCommandInvokerExecute -/* internal _DtCmdCreateStderrPipe */ -internal _DtCmdCreateTerminalCommand -internal _DtCmdFreeStringVector -/* internal _DtCmdGetDefaultShell */ -/* internal _DtCmdGetDisplayHost */ -internal _DtCmdGetQueueHead -internal _DtCmdGetResources -/* internal _DtCmdInitializeErrorMessages */ -/* internal _DtCmdLocalXhost */ -internal _DtCmdLogErrorMessage -/* internal _DtCmdProcessError */ -/* internal _DtCmdRemoteXhost */ -internal _DtCmdSPCAddExceptionHandler -internal _DtCmdSPCAddInputHandler -/* internal _DtCmdSPCTerminator */ -/* internal _DtCmdSPCXhostTerminator */ -/* internal _DtCmdSuccessNotification */ -internal _DtCmdValidDir -/* internal _DtCmdValidRequest */ -/* internal _DtCompareEntries */ -internal _DtCompileMessagePiece -internal _DtCreateDirs -internal _DtCreateErrorDialog -internal _DtDbFillVariables -internal _DtDbLoad -internal _DtDestroyPixmap -internal _DtDirname -internal _DtDndArgListFromVarArgs -internal _DtDndBuffTransferProtocolInitialize -internal _DtDndCallCallbackList -internal _DtDndCopyCallbackList -internal _DtDndCountVarArgs -internal _DtDndCreateExportTransfer -internal _DtDndCreateImportTransfers -/* internal _DtDndDataConvertProc */ -/* internal _DtDndDataConvertTargets */ -/* internal _DtDndDataTransferEntries */ -/* internal _DtDndDataTransferProc */ -internal _DtDndDestroyTransfers -/* internal _DtDndFileConvertProc */ -/* internal _DtDndFileConvertTargets */ -/* internal _DtDndFileTransferEntries */ -/* internal _DtDndFileTransferProc */ -internal _DtDndFileTransferProtocolInitialize -/* internal _DtDndGetContextID */ -internal _DtDndGetHostName -internal _DtDndGetIconOffset -/* internal _DtDndGetTextualDragIcon */ -/* internal _DtDndInitializeIcons */ -internal _DtDndSelectDragSource -/* internal _DtDndTextConvertProc */ -/* internal _DtDndTextConvertTargets */ -/* internal _DtDndTextTransferEntries */ -/* internal _DtDndTextTransferProc */ -internal _DtDndTextTransferProtocolInitialize -internal _DtDndTransferAdd -internal _DtDndTransferFromTargets -internal _DtDtsClear -internal _DtDtsDAConverter -internal _DtDtsDCConverter -internal _DtDtsDbAddDatabase -internal _DtDtsDbAddField -internal _DtDtsDbAddRecord -internal _DtDtsDbCompareFieldNames -internal _DtDtsDbCompareRecordNames -internal _DtDtsDbDeleteDb -internal _DtDtsDbDeleteField -internal _DtDtsDbDeleteFields -internal _DtDtsDbDeleteRecord -internal _DtDtsDbDeleteRecords -internal _DtDtsDbFieldSort -internal _DtDtsDbGet -internal _DtDtsDbGetField -internal _DtDtsDbGetFieldByName -internal _DtDtsDbGetRecordByName -internal _DtDtsDbInit -internal _DtDtsDbPrint -internal _DtDtsDbPrintFields -internal _DtDtsDbPrintRecords -internal _DtDtsDbRecordSort -internal _DtDtsMMCacheName -internal _DtDtsMMCompareFieldNames -internal _DtDtsMMCompareRecordNames -internal _DtDtsMMCreateDb -internal _DtDtsMMCreateFile -internal _DtDtsMMGetBufferIndex -internal _DtDtsMMGetDCNameIndex -internal _DtDtsMMGetDbName -internal _DtDtsMMGetField -internal _DtDtsMMGetFieldByName -internal _DtDtsMMGetFileList -internal _DtDtsMMGetNoNameIndex -internal _DtDtsMMGetPtrSize -internal _DtDtsMMGetRecordByName -internal _DtDtsMMIsMemory -internal _DtDtsMMPathHash -internal _DtDtsMMPrint -internal _DtDtsMMPrintDb -internal _DtDtsMMPrintFld -internal _DtDtsMMPrintRec -internal _DtDtsMMStringToBoson -internal _DtDtsMMUnLoad -internal _DtDtsMMapDB -internal _DtDtsNextDASeq -internal _DtDtsNextDCSeq -internal _DtDtsSeqReset -internal _DtEmptyString -internal _DtEnumerateHashTable -/* internal _DtEnvPrint */ -internal _DtEnvRemove -internal _DtEnv_tt_host_netfile_file -internal _DtExecuteAccess -/* internal _DtExtractFieldValue */ -internal _DtFindCwd -/* internal _DtFindFirst */ -internal _DtFreeActionDB -internal _DtFreeActionStruct -/* internal _DtFreeContext */ -internal _DtFreeHashTable -internal _DtFreeRequest -internal _DtGetActionIconDefault -internal _DtGetDisplayHostName -internal _DtGetDisplayName -internal _DtGetDtTmpDir -/* internal _DtGetEntries */ -internal _DtGetExecHostsDefault -internal _DtGetImage -internal _DtGetLocalHostName -internal _DtGetNthChar -internal _DtGetSessionHostName -internal _DtInitAppContextp -internal _DtInitTtContextWidget -internal _DtInstallImage -internal _DtIsOpenableDir -internal _DtIsOpenableDirContext -internal _DtKeyToHashEntry -/* internal _DtMakeAndSetContext */ -/* internal _DtMergeEntries */ -/* internal _DtMsgBroadcastAddNewReceiver */ -/* internal _DtMsgBroadcastAddToRegistry */ -/* internal _DtMsgBroadcastCreateSharedWindow */ -/* internal _DtMsgBroadcastDeleteReceiver */ -/* internal _DtMsgBroadcastDeleteReceiverEntry */ -/* internal _DtMsgBroadcastFindWindowInRegistry */ -/* internal _DtMsgBroadcastGenerateNewPropertyName */ -/* internal _DtMsgBroadcastGetRegistry */ -/* internal _DtMsgBroadcastGetSharedWindow */ -/* internal _DtMsgBroadcastGetUnusedPropertyForReceiver */ -/* internal _DtMsgBroadcastRegister */ -/* internal _DtMsgBroadcastSend */ -/* internal _DtMsgBroadcastSenderInitialize */ -/* internal _DtMsgBroadcastSenderUninitialize */ -/* internal _DtMsgBroadcastSetPropsUnread */ -/* internal _DtMsgBroadcastUnregister */ -/* internal _DtMsgGetMessage */ -/* internal _DtMsgHandleAllocate */ -/* internal _DtMsgHandleDestroy */ -/* internal _DtMsgHandleGetAtom */ -/* internal _DtMsgHandleGetName */ -/* internal _DtMsgHandleGetPropertyAtom */ -/* internal _DtMsgHandleGetPropertyName */ -/* internal _DtMsgHandleGetWidget */ -/* internal _DtMsgHandleSetProperty */ -/* internal _DtMsgServiceIsOffered */ -/* internal _DtMsgServiceOffer */ -/* internal _DtMsgServiceReply */ -/* internal _DtMsgServiceRequest */ -/* internal _DtMsgServiceUniqueProperty */ -/* internal _DtMsgServiceWithdraw */ -/* internal _DtMsgSetMessage */ -/* internal _DtMsgW4wAddEventHandler */ -/* internal _DtMsgW4wCreate */ -/* internal _DtMsgW4wRealize */ -internal _DtPathname -internal _DtProcessTtRequest -internal _DtRegisterHashEntry -internal _DtRemoveTrailingBlanksInPlace -/* internal _DtSetContext */ -internal _DtShmBosonToString -internal _DtShmFindIntTabEntry -internal _DtShmProtoAddIntLst -internal _DtShmProtoAddInttab -internal _DtShmProtoAddStrtab -internal _DtShmProtoCopyIntLst -internal _DtShmProtoCopyInttab -internal _DtShmProtoCopyStrtab -internal _DtShmProtoDestroyIntLst -internal _DtShmProtoDestroyInttab -internal _DtShmProtoDestroyStrtab -internal _DtShmProtoInitIntLst -internal _DtShmProtoInitInttab -internal _DtShmProtoInitStrtab -internal _DtShmProtoLookUpStrtab -internal _DtShmProtoSizeIntLst -internal _DtShmProtoSizeInttab -internal _DtShmProtoSizeStrtab -internal _DtShmStringToBoson -internal _DtSortActionDb -internal _DtStringsAreEqual -/* internal _DtSvcGetName */ -internal _DtSvcInitToolTalk -/* internal _DtSvcIsRegistered */ -/* internal _DtSvcLogMsg */ -/* internal _DtSvcMsgSendTT */ -/* internal _DtSvcNotifyHandler */ -/* internal _DtSvcNotifyMsgUnregister */ -/* internal _DtSvcReplyHandler */ -/* internal _DtSvcRequestHandler */ -/* internal _DtSvcStart */ -/* internal _DtSvcUnregister */ -internal _DtTestLock -internal _DtUninstallImage -internal _DtUnregisterHashEntry -/* internal _DtUserMsgHandler */ -internal _DtUtilDelHash -internal _DtUtilDestroyHash -internal _DtUtilFindHash -internal _DtUtilGetHash -internal _DtUtilMakeHash -internal _DtUtilMakeIHash -internal _DtUtilOperateHash -/* internal _DtValidateFieldNames */ -internal _DtWsmConsumeReply -/* internal _DtWsmRemoveMarqueeSelectionCallback */ -internal _DtWsmSetWorkspaceHints -internal _Dt_isdigit -/* internal _Dt_msg_context */ -/* internal _Dt_msg_widget */ -internal _DtsDbListDb -internal _MMWriteDb -internal __DtGetPixmapData -internal __DtInstallPixmap -/* internal __nlh_buf */ -/* internal _actInvRecArraySize */ -/* internal _cmdAppContext */ -/* internal _cmdClientHost */ -/* internal _cmdDisplay */ -/* internal _cmdLocalDisplay */ -/* internal _curr_exception */ -internal _DtApplicationClass -internal _DtApplicationName -internal _DtDisplay -internal _DtEnvSessionManager -internal _DtToolClass -internal _dt_strpbrk -internal _is_previous_single -internal _mb_schr -/* internal _mb_srchr */ -internal _path_search -/* internal _strcmbn_privbuf */ -/* internal _strcmbnb_privbuf */ -/* internal _strsep_privbuf */ -/* internal _strsepb_privbuf */ -internal add_input_channel_object -internal add_input_pipe_channel_object -internal add_input_pty_channel_object -internal add_input_remote_channel_object -/* internal add_pattern_to_tree */ -internal alloc_channel_object -internal append -/* internal atoui */ -internal attach_channel_object -internal attach_noio_channel_object -internal attach_pipe_channel_object -internal attach_pty_channel_object -internal attach_remote_channel_object -internal break_on_termination -internal cde_da_compare -internal cde_dc_compare -internal cde_dc_field_compare -internal channel_class -internal channel_class_init -internal channel_object_wait_for_termination -internal check_content -internal check_pattern -internal close_channel_object -internal close_local_channel_object -/* internal close_msg_channel */ -internal close_remote_channel_object -internal cmd_Globals -internal cmd_Resources -internal connection_list -internal connector_eof -internal connector_eof_with_reset -/* internal copy_word */ -/* internal copy_word_inc_ptr */ -internal current_sequence_number -/* internal defaultShell */ -/* internal dndTargetsInList */ -/* internal errno */ -/* internal errorAddInput */ -/* internal errorBadConnect */ -/* internal errorBadService */ -/* internal errorChdir */ -/* internal errorDirectoryNameMap */ -/* internal errorEnvTooBig */ -/* internal errorExec */ -/* internal errorFork */ -/* internal errorInetSecurity */ -/* internal errorLength */ -/* internal errorLogPipe */ -/* internal errorLogfileNameMap */ -/* internal errorParams */ -/* internal errorRegisterHandshake */ -/* internal errorRegisterNetrc */ -/* internal errorRegisterOpen */ -/* internal errorRegisterUsername */ -/* internal errorRemoteSubprocess */ -/* internal errorRequest */ -/* internal errorShell */ -/* internal errorSpawn */ -/* internal errorSpcTerminator */ -/* internal errorSubprocess */ -/* internal errorTerminal */ -/* internal errorTerminalExec */ -/* internal errorUnknownHost */ -/* internal errorXhost */ -internal error_fun -internal exec_proc_channel_object -internal exec_proc_local_channel_object -internal exec_proc_remote_channel_object -internal expand_shell -internal free_protocol_requests -internal free_wire -internal get_buff_size -internal get_link_info -internal get_name_list -internal get_new_remote_wire -internal get_new_wire -internal getpipe -/* internal init_msg_channel */ -/* internal init_msg_write */ -/* internal is_multibyte */ -internal local_channel_object_input_handler -internal local_channel_object_send_eof -internal local_channel_object_wait_for_termination -internal master_pty -/* internal match_pattern_tree */ -internal max_fds -internal mode_count -/* internal mserve_host_and_port */ -/* internal msg_channel_rfd */ -/* internal msprintf */ -/* internal mvsprintf */ -/* internal next_token */ -internal noio_channel_class -internal noio_channel_class_init -internal noio_channel_object_input_handler -/* internal numActiveTransferEntries */ -internal object_create -internal object_destroy -internal object_init -internal official_hostname -internal open_channel_object -/* internal open_msg_channel */ -/* internal open_msg_chn */ -/* internal open_msg_chn_return_status */ -internal open_noio_channel_object -internal open_pipe_channel_object -internal open_pty_channel_object -internal open_remote_channel_object -internal parts_of_pattern -/* internal pathList */ -/* internal pathbase */ -/* internal pathdir */ -internal pipe_channel_class -internal pipe_channel_class_init -internal post_fork_channel_object -internal post_fork_noio_channel_object -internal post_fork_pipe_channel_object -internal post_fork_pty_channel_object -internal pre_fork_channel_object -internal pre_fork_noio_channel_object -internal pre_fork_pipe_channel_object -internal pre_fork_pty_channel_object -internal privbuf_release -internal pty_channel_class -internal pty_channel_class_init -internal read_channel_object -/* internal read_msg */ -/* internal read_msg_step */ -internal read_noio_channel_object -internal read_pipe_channel_object -internal read_pty_channel_object -internal read_remote_channel_object -internal read_terminator -internal remote_channel_class -internal remote_channel_class_init -internal remove_logfile_channel_object -internal remove_logfile_local_channel_object -internal remove_logfile_remote_channel_object -/* internal remove_tree_patterns */ -internal reset_channel_object -internal reset_noio_channel_object -internal reset_pipe_channel_object -internal reset_pty_channel_object -internal reset_remote_channel_object -internal root_class -internal root_class_struct -internal send_eof_noio_channel_object -internal send_eof_remote_channel_object -internal set_termio_noio_channel_object -internal set_termio_pty_channel_object -internal set_termio_remote_channel_object -/* internal set_up_msg_reads */ -internal setpgrp_wire -internal sigcld_with_reset -internal signal_channel_object -internal signal_local_channel_object -internal signal_remote_channel_object -internal spc_activation_list -internal spc_close -internal spc_dup2 -internal spc_error_struct -internal spc_init_fds -internal spc_logfd -internal spc_logfile -internal spc_logging -internal sprint_application_data -internal sprint_counted_string -internal sprint_device_data -internal sprint_logfile_data -internal sprint_register_data -internal sprintf_len -internal sscan_counted_string -internal sscan_device_data -internal sscan_logfile_data -internal strend -/* internal strfree */ -internal strhash -internal strhashi -internal strlower -internal strtokx -internal strupper -internal strwcmp -internal strwpat -/* internal successHost */ -/* internal svect */ -internal use_in_memory_db -/* internal word_length */ -internal write_channel_object -internal write_local_channel_object -/* internal write_msg */ -/* internal write_msg_step */ -internal write_noio_channel_object -internal write_remote_channel_object -internal write_terminator -/* internalC++ Charbuf::Charbuf(const Charbuf&) */ -/* internalC++ Charbuf::bumpsize(long) */ -/* internalC++ Charbuf::operator=(const Charbuf&) */ -/* internalC++ _Exception::_Exception(void) */ -/* internalC++ _Exception::accept(const char *const) */ -/* internalC++ _Exception::raise(const char *const) */ -/* internalC++ _Exception::recover(void) */ -/* internalC++ _Exception::~_Exception(void) */ -internalC++ _SHXbuf::append(const char*,char) -internalC++ _SHXbuf::append(const int,char) -internalC++ _SHXbuf::expand(_SHXcomponents&,char *const,char*,int) -internalC++ _SHXbuf::filegen(void) -internalC++ _SHXbuf::quote(unsigned char) -internalC++ _SHXbuf::reset(boolean,boolean) -internalC++ _SHXbuf::start_token(void) -internalC++ _SHXbuf::vector(void) -internalC++ _SHXcomponents::_SHXcomponents(const _SHXcomponents&) -internalC++ _SHXcomponents::bumpsize(long) -internalC++ _SHXcomponents::operator=(const _SHXcomponents&) -internalC++ _StringIO::doit(int) -/* internalC++ __hashtable_bump(unsigned int) */ -/* internalC++ _raise_exception(const char *const) */ -internalC++ privbuf_allocprivbuf(void) -internalC++ privbuf_charbuf::bumpsize(long) -internalC++ privbuf_charbuf::operator=(const privbuf_charbuf&) -internalC++ privbuf_charbuf::privbuf_charbuf(const privbuf_charbuf&) -internalC++ privbuf_freeprivbuf(void*) -internalC++ privbuf_strvec::bumpsize(long) -internalC++ privbuf_strvec::operator=(const privbuf_strvec&) -internalC++ privbuf_strvec::privbuf_strvec(const privbuf_strvec&) -internalC++ pushgrave(_StringIO&,const char,boolean,privbuf_charbuf&) -/* internalC++ restdirname(const char*) */ - -#if defined(sun) -/* C++ symbols from the Sun compiler */ -internal __new_handler -internal __handler_lk -internalC++ operator delete(void*) -internalC++ operator new(unsigned int) -internalC++ set_new_handler(void(*)(void)) -internalC++ set_terminate(void(*)(void)) -internalC++ set_unexpected(void(*)(void)) -internalC++ terminate(void) -internalC++ unexpected(void) -internalC++ xstack::get_prev(void) -internalC++ xalloc::xalloc(const char*,unsigned int) -#endif - -/* This symbol does not get mangled consistently across platforms. -#if defined(sun) -internalC++ shellscan_C:__std -#elif defined(_AIX) -internalC++ __sterm80000000_x_2fproj_2fcde_2flib_2fDtSvc_2fDtCodelibs_2fshellscan_2eC() -#endif -*/ - -#ifdef sun -/* Symbols from the sun-specific DtUtil2/SunDtHelp.c module. */ -internal SUNWDtHelpdlopen -internal _DtCreateHelpDialog -internal _DtCreateHelpQuickDialog -internal _DtHelpQuickDialogGetChild -internal _DtHelpReturnSelectedWidgetId - -/* Symbols from */ -internal advance -internal basename -internal _basename -internal braelist -internal _braelist -internal ___braelist -internal braslist -internal _braslist -internal ___braslist -internal compile -internal _compile -internal __compile -internal locs -internal _locs -internal ___locs -internal loc1 -internal _loc1 -internal ___loc1 -internal loc2 -internal _loc2 -internal ___loc2 -internal nbra -internal _nbra -internal ___nbra -internal _pure_error_ -internal _radvance -internal regerrno -internal _regerrno -internal ___regerrno -internal reglength -internal _reglength -internal ___reglength -internal step -internal _step -#endif - -/* Moved from DtHelp */ -internal ExpandPath -internal _DtMBStrchr -internal _DtMBStrrchr -internal _DtXlateMergeDbs -internal _DtXlateOpToStdValue -internal _DtXlateOpenAllDbs -internal _DtXlateOpenAndMergeDbs -internal _DtXlateOpenDb -internal _DtXlateStdToOpValue diff --git a/cde/lib/DtTerm/libDtTerm.elist b/cde/lib/DtTerm/libDtTerm.elist deleted file mode 100644 index d773541fd..000000000 --- a/cde/lib/DtTerm/libDtTerm.elist +++ /dev/null @@ -1,511 +0,0 @@ -/* # $TOG: libDtTerm.elist /main/2 1999/10/14 16:23:20 mgreess $ */ - -/************************************************************************* - * Export list for libDtTerm - * This list *must* be updated whenever a change is made to the library API. - * - * The syntax for the symbol declarations in this list is as follows: - * public sym => Public C symbol, i.e., publicized API - * publicC++ sym => Public C++ symbol, i.e., publicized API - * private sym => Private C symbol, i.e., unpublicized API - * privateC++ sym => Private C++ symbol, i.e., unpublicized API - * internal sym => Internal C symbol, i.e., not part of API - * internalC++ sym => Internal C++ symbol, i.e., not part of API - * - **************************************************************************/ - -/******************************************************************** - * Public symbols -- available to everyone - ********************************************************************/ - -public DtTermInitialize -public DtTermDisplaySend -public DtTermSubprocSend -public DtTermSubprocReap -public dtTermWidgetClass -public dtTermClassRec -public DtCreateTerm - -/******************************************************************** - * Private symbols -- Undocumented APIs that are exported for B.C. - * or because privileged applications may need used them. - ********************************************************************/ - -private _DtTermPrimGetPty -private _DtTermPrimSetupPty -private _DtTermPrimReleasePty -private _DtTermPrimPtyCleanup -private _DtTermPrimPtySetWindowSize -private _DtTermPrimPtyGetDefaultModes -private _DtTermPrimPtyInit - -/* -# the following symbols are necessary for the dtterm client to -## work (i.e., the DtTermView Widget, etc). -# -*/ -private _DtTermGetCurrentWorkingDirectory -private _DtTermPrimSetCursorVisible -private _DtTermPrimAddDeleteWindowCallback -private DtCreateTermView -private _DtTermPrimLogFileCleanup -private _DtTermPrimSetDebugFlags -private _DtTermViewMenuToggleMenuBar -private _DtTermPrimGetMessage -private _DtTermPrimDebugLevel -private _DtTermPrimIsDebugFSet -private _DtTermGetUserKeyLock -private _DtTermPrimGetCursorVisible -private _DtTermViewGetUserFontListIndex -private _DtTermGetAutoLineFeed -private _DtTermViewSetUserFontListIndex -private _DtTermSetUserKeyLock -private _DtTermSetAutoLineFeed -private _DtTermPrimUtmpCleanup -private _DtTermSetCurrentWorkingDirectory -private _DtTermPrimTimeStamp - -/* -# These symbols are needed for the tests to build. - */ - -private DtCreateTermPrimitive -private _DtTermViewGetChild - -/******************************************************************** - * Internal symbols -- not to be used outside the library. - ********************************************************************/ - -internal dtTermPrimitiveClassRec -internal dtTermPrimitiveWidgetClass -internal dtTermViewClassRec -internal dtTermViewWidgetClass - -internal _DtTermGetRenderFontIndex -internal _DtTermActionBeginningOfBuffer -internal _DtTermActionBreak -internal _DtTermActionEditKeyExecute -internal _DtTermActionEndOfBuffer -internal _DtTermActionFunctionKeyExecute -internal _DtTermActionHardReset -internal _DtTermActionInsertLine -internal _DtTermActionKeypadKeyExecute -internal _DtTermActionMoveCursor -internal _DtTermActionScroll -internal _DtTermActionSoftReset -internal _DtTermActionTab -internal _DtTermWriteEscSeq - -internal _DtTermBufferCreateBuffer -internal _DtTermBufferDelete -internal _DtTermBufferErase -internal _DtTermBufferFreeBuffer -internal _DtTermBufferFreeEnhancement - -internal _DtTermColorDestroy -internal _DtTermColorInit -internal _DtTermColorInitializeColorPair - -internal _DtTermEnhProc - -internal _DtTermFontEnhancement -internal _DtTermFuncBeginningOfBuffer -internal _DtTermFuncClearBuffer -internal _DtTermFuncClearLine -internal _DtTermFuncClearToEndOfBuffer -internal _DtTermFuncClearToEndOfLine -internal _DtTermFuncDeleteChar -internal _DtTermFuncDeleteLine -internal _DtTermFuncEndOfBuffer -internal _DtTermFuncEraseCharacter -internal _DtTermFuncEraseInDisplay -internal _DtTermFuncEraseInLine -internal _DtTermFuncHardReset -internal _DtTermFuncInsertLine -internal _DtTermFuncScroll -internal _DtTermFuncSoftReset -internal _DtTermFuncTab -internal _DtTermVideoEnhancement - -internal _DtTermFunctionKeyClear -internal _DtTermFunctionKeyExecute -internal _DtTermFunctionKeyInit -internal _DtTermFunctionKeyStringStore -internal _DtTermFunctionKeyUserKeyExecute - -internal _DtTermAlignTest -internal _DtTermAppKeypad -internal _DtTermChangeTextParam -internal _DtTermCharAttributes -internal _DtTermClearParam -internal _DtTermCursorBack -internal _DtTermCursorDown -internal _DtTermCursorForward -internal _DtTermCursorPos -internal _DtTermCursorToCol -internal _DtTermCursorToLineUp -internal _DtTermCursorUp -internal _DtTermDeleteChars -internal _DtTermDeleteLines -internal _DtTermDeviceAttributes -internal _DtTermDeviceStatus -internal _DtTermDeviceStatusAnsi -internal _DtTermDoubleHigh -internal _DtTermDoubleWide -internal _DtTermEnterNum -internal _DtTermEraseChars -internal _DtTermEraseDisplay -internal _DtTermEraseInLine -internal _DtTermGlyphs -internal _DtTermIndex -internal _DtTermInsertChars -internal _DtTermInsertLines -internal _DtTermInvokeG1 -internal _DtTermInvokeG2 -internal _DtTermInvokeG3 -internal _DtTermLoadCharSet -internal _DtTermNextLine -internal _DtTermNormalKeypad -internal _DtTermNumGlyphs -internal _DtTermPModeReset -internal _DtTermPModeSet -internal _DtTermParseBackspace -internal _DtTermParseFontG0 -internal _DtTermParseFontG1 -internal _DtTermParseFontG2 -internal _DtTermParseFontG3 -internal _DtTermParseFontShift -internal _DtTermParseHexDigit -internal _DtTermParseLF -internal _DtTermParsePushNum -internal _DtTermParseStatus -internal _DtTermParseSunMisc -internal _DtTermParseTab -internal _DtTermParseUserKeyClear -internal _DtTermParseUserKeyLoad -internal _DtTermParseUserKeyLoadLast -internal _DtTermParserSunIconFile -internal _DtTermParserSunWindowIcon -internal _DtTermParserSunWindowTitle -internal _DtTermPrintState -internal _DtTermRequestParam -internal _DtTermReset -internal _DtTermResetMode -internal _DtTermRestoreCursor -internal _DtTermRestoreModeValues -internal _DtTermReverseIndex -internal _DtTermS7C1T -internal _DtTermS8C1T -internal _DtTermSaveChar -internal _DtTermSaveCursor -internal _DtTermSaveModeValues -internal _DtTermScrollDown -internal _DtTermScrollUp -internal _DtTermScrollingRegion -internal _DtTermSelEraseInDisplay -internal _DtTermSelEraseInLine -internal _DtTermSelectG2 -internal _DtTermSelectG3 -internal _DtTermSetCharEraseMode -internal _DtTermSetCompatLevel -internal _DtTermSetMode -internal _DtTermSingleShiftG2 -internal _DtTermSingleShiftG3 -internal _DtTermSingleWide -internal _DtTermSoftReset -internal _DtTermTabClear -internal _DtTermTabSet - -internal _DtTermPrimActionEnter -internal _DtTermPrimActionFocusIn -internal _DtTermPrimActionFocusOut -internal _DtTermPrimActionKeyInput -internal _DtTermPrimActionKeyRelease -internal _DtTermPrimActionLeave -internal _DtTermPrimActionStop -internal _DtTermPrimDrawShadow -internal _DtTermPrimForcePtyRead -internal _DtTermPrimGetFontSet -internal _DtTermPrimInsertCharUpdate -internal _DtTermPrimInvokeStatusChangeCallback -internal _DtTermPrimLoopBackData -internal _DtTermPrimPutEnv -internal _DtTermPrimSendInput -internal _DtTermPrimStartOrStopPtyInput -internal _DtTermPrimStartOrStopPtyOutput -internal _DtTermPrimWarningDialog - -internal _DtTermPrimActionInsert -internal _DtTermPrimActionKeymap -internal _DtTermPrimActionRedrawDisplay -internal _DtTermPrimActionReturn -internal _DtTermPrimActionString -internal _DtTermPrimActionTab - -internal _DtTermPrimBufferClearAllTabs -internal _DtTermPrimBufferClearLine -internal _DtTermPrimBufferClearTab -internal _DtTermPrimBufferCreateBuffer -internal _DtTermPrimBufferDelete -internal _DtTermPrimBufferDeleteLine -internal _DtTermPrimBufferErase -internal _DtTermPrimBufferFreeBuffer -internal _DtTermPrimBufferFreeEnhancement -internal _DtTermPrimBufferGetCharacterPointer -internal _DtTermPrimBufferGetCols -internal _DtTermPrimBufferGetEnhancement -internal _DtTermPrimBufferGetInSelectionFlag -internal _DtTermPrimBufferGetLineLength -internal _DtTermPrimBufferGetLineWidth -internal _DtTermPrimBufferGetNextTab -internal _DtTermPrimBufferGetPreviousTab -internal _DtTermPrimBufferGetRows -internal _DtTermPrimBufferGetText -internal _DtTermPrimBufferInsert -internal _DtTermPrimBufferInsertLine -internal _DtTermPrimBufferInsertLineFromTB -internal _DtTermPrimBufferMoveLockArea -internal _DtTermPrimBufferPadLine -internal _DtTermPrimBufferResizeBuffer -internal _DtTermPrimBufferSetEnhancement -internal _DtTermPrimBufferSetInSelectionFlag -internal _DtTermPrimBufferSetLineWidth -internal _DtTermPrimBufferSetLineWrapFlag -internal _DtTermPrimBufferSetLinks -internal _DtTermPrimBufferSetSelectInfo -internal _DtTermPrimBufferSetSelectLines -internal _DtTermPrimBufferSetTab -internal _DtTermPrimBufferTestLineWrapFlag -internal _DtTermPrimGetCharacterInfo - -internal _DtTermPrimBufferClearLineWc -internal _DtTermPrimBufferDeleteWc -internal _DtTermPrimBufferEraseWc -internal _DtTermPrimBufferGetTextWc -internal _DtTermPrimBufferInsertWc -internal _DtTermPrimBufferPadLineWc - -internal _DtTermPrimCursorChangeFocus -internal _DtTermPrimCursorMove -internal _DtTermPrimCursorOff -internal _DtTermPrimCursorOn -internal _DtTermPrimCursorUpdate - -internal _DtTermPrimDebugDumpEvent -internal _DtTermPrimShortSleep - -internal _DtTermPrimFuncBackspace -internal _DtTermPrimFuncBackwardCharacter -internal _DtTermPrimFuncCR -internal _DtTermPrimFuncForwardCharacter -internal _DtTermPrimFuncLF -internal _DtTermPrimFuncMarginClear -internal _DtTermPrimFuncMarginSetLeft -internal _DtTermPrimFuncMarginSetRight -internal _DtTermPrimFuncNextLine -internal _DtTermPrimFuncPreviousLine -internal _DtTermPrimFuncRedrawDisplay -internal _DtTermPrimFuncReturn -internal _DtTermPrimFuncTab -internal _DtTermPrimFuncTabClear -internal _DtTermPrimFuncTabClearAll -internal _DtTermPrimFuncTabSet - -internal _DtTermPrimLineDrawCreateFont -internal _DtTermPrimLineDrawFreeFont -internal _DtTermPrimLineDrawImageString - -internal _DtTermPrimParseBackspace -internal _DtTermPrimParseBell -internal _DtTermPrimParseCR -internal _DtTermPrimParseCursorDown -internal _DtTermPrimParseCursorLeft -internal _DtTermPrimParseCursorRight -internal _DtTermPrimParseCursorUp -internal _DtTermPrimParseLF -internal _DtTermPrimParseMarginClear -internal _DtTermPrimParseMarginSetLeft -internal _DtTermPrimParseMarginSetRight -internal _DtTermPrimParseTab -internal _DtTermPrimParseTabClear -internal _DtTermPrimParseTabClearAll -internal _DtTermPrimParseTabSet -internal _DtTermPrimParseWriteChar - -internal _DtTermPrimParse -internal _DtTermPrimParserClearParm -internal _DtTermPrimParserClrStrParm -internal _DtTermPrimParserEnterNum -internal _DtTermPrimParserInitContext -internal _DtTermPrimParserNextState -internal _DtTermPrimParserNumParmPush -internal _DtTermPrimParserSaveSign - -internal _DtTermPrimPendingTextAppend -internal _DtTermPrimPendingTextAppendChunk -internal _DtTermPrimPendingTextCreate -internal _DtTermPrimPendingTextDestroy -internal _DtTermPrimPendingTextFlush -internal _DtTermPrimPendingTextGetChunk -internal _DtTermPrimPendingTextIsPending -internal _DtTermPrimPendingTextRemoveChunk -internal _DtTermPrimPendingTextReplace -internal _DtTermPrimPendingTextWrite - -internal _DtTermPrimBell -internal _DtTermPrimDestroyFont -internal _DtTermPrimExposeText -internal _DtTermPrimFillScreenGap -internal _DtTermPrimInsertText -internal _DtTermPrimParseInput -internal _DtTermPrimRefreshText -internal _DtTermPrimRenderPadLine -internal _DtTermPrimRenderText - -internal _DtTermPrimRenderFontCreate - -internal _DtTermPrimRenderFontSetCreate - -internal _DtTermPrimRenderLineDrawCreate - -internal _DtTermPrimExposeTextMb -internal _DtTermPrimInsertTextWc -internal _DtTermPrimRefreshTextWc - -internal _DtTermPrimInitRepTypes - -internal _DtTermPrimScrollComplete -internal _DtTermPrimScrollCompleteIfNecessary -internal _DtTermPrimScrollText -internal _DtTermPrimScrollTextArea -internal _DtTermPrimScrollTextTo -internal _DtTermPrimScrollWait - -internal _DtTermPrimRenderRefreshTextLinear -internal _DtTermPrimSelect2ButtonMouse -internal _DtTermPrimSelectAll -internal _DtTermPrimSelectBDragRelease -internal _DtTermPrimSelectConvert -internal _DtTermPrimSelectCopyClipboard -internal _DtTermPrimSelectCopyClipboardEventIF -internal _DtTermPrimSelectCreate -internal _DtTermPrimSelectDeleteLines -internal _DtTermPrimSelectDestroy -internal _DtTermPrimSelectDisown -internal _DtTermPrimSelectDoSelection -internal _DtTermPrimSelectExtend -internal _DtTermPrimSelectExtendEnd -internal _DtTermPrimSelectExtendStart -internal _DtTermPrimSelectGetSelection -internal _DtTermPrimSelectGrabFocus -internal _DtTermPrimSelectInitBtnEvents -internal _DtTermPrimSelectInsert -internal _DtTermPrimSelectInsertLines -internal _DtTermPrimSelectIsAboveSelection -internal _DtTermPrimSelectIsInSelection -internal _DtTermPrimSelectLoseSelection -internal _DtTermPrimSelectMoveLines -internal _DtTermPrimSelectPage -internal _DtTermPrimSelectPasteClipboard -internal _DtTermPrimSelectPasteClipboardEventIF -internal _DtTermPrimSelectProcessBDrag -internal _DtTermPrimSelectProcessCancel -internal _DtTermPrimSelectResize -internal _DtTermPrimSelectSetHint -internal _DtTermPrimSelectStart - -internal _DtTermPrimPtyConsoleModeEnable -internal _DtTermPrimPtySendBreak - -internal _DtTermPrimUtmpAddEntry -internal _DtTermPrimUtmpEntryCreate -internal _DtTermPrimUtmpEntryDestroy -internal _DtTermPrimUtmpGetUtLine -internal _DtTermPrimUtmpInit - -internal _DtTermPrimAddSubproc -internal _DtTermPrimSetChildSignalHandler -internal _DtTermPrimSubprocExec -internal _DtTermPrimSubprocRemoveSubproc - -internal _DtTermPrimCloseLog -/* internal _DtTermPrimLogPipe */ -internal _DtTermPrimPointerFreeze -internal _DtTermPrimPointerOff -internal _DtTermPrimPointerOn -internal _DtTermPrimRecolorPointer -internal _DtTermPrimRemoveSuidRoot -internal _DtTermPrimStartLog -internal _DtTermPrimToggleSuidRoot -internal _DtTermPrimWriteLog - -internal _DtTermPrimAddSaveYourselfCallback - -internal _DtTermPrimCharCursorStyle -internal _DtTermPrimEmulationMode -internal _DtTermPrimPullInTermWhatString -internal _DtTermPrimStateStart -internal _DtTermPrimTtyModeList -internal _DtTermPrim_XA_UtmpLine -internal _DtTermPullInTermWhatString - -internal _DtTermStateAsterisk -internal _DtTermStateC1 -internal _DtTermStateDECSCA -internal _DtTermStateDLCharSet -internal _DtTermStateError -internal _DtTermStateEscQuestion -internal _DtTermStateEscape -internal _DtTermStateGetIcon -internal _DtTermStateGetIconBS -internal _DtTermStateGetIconFile -internal _DtTermStateGetIconFileBS -internal _DtTermStateGetString -internal _DtTermStateGetStringBS -internal _DtTermStateGetTitle -internal _DtTermStateGetTitleBS -internal _DtTermStateIsNextBS_DL -internal _DtTermStateIsNextBS_SK -internal _DtTermStateLeftBracket -internal _DtTermStateLeftBracketNotQ -internal _DtTermStateLeftParen -internal _DtTermStateP -internal _DtTermStatePlus -internal _DtTermStatePound -internal _DtTermStateRightBracket -internal _DtTermStateRightParen -internal _DtTermStateSoftReset -internal _DtTermStateStart -internal _DtTermStateTilda -internal _DtTermStateUA_BS -internal _DtTermStateUS_BS -internal _DtTermStateUnderscore -internal _DtTermStateUpArrow -internal _DtTermStateUserKey -internal _DtTermStateUserKeyString - -internal DtTermViewCloneCallback -internal DtTermViewGetCloneEnabled -internal _DtTermViewMapHelp -internal _DtTermViewMenuDefaultFonts - -internal _DtTermViewCreateGlobalOptionsDialog -internal _DtTermViewCreateOptionMenu -internal _DtTermViewCreatePulldown -internal _DtTermViewEqualizeHeights -internal _DtTermViewLineupListAddItem -internal _DtTermViewLineupListCreate -internal _DtTermViewLineupListFree -internal _DtTermViewLineupListLineup - -internal _DtTermViewCreateCascadeButton -internal _DtTermViewCreateLabel -internal _DtTermViewCreatePopupMenu -internal _DtTermViewCreatePulldownMenu -internal _DtTermViewCreatePushButton -internal _DtTermViewCreateSeparator -internal _DtTermViewCreateToggleButton - -internal _DtTermViewCreateTerminalOptionsDialog - -internal rowColToPos diff --git a/cde/lib/DtWidget/libDtWidget.elist b/cde/lib/DtWidget/libDtWidget.elist deleted file mode 100644 index ebe6bab81..000000000 --- a/cde/lib/DtWidget/libDtWidget.elist +++ /dev/null @@ -1,250 +0,0 @@ -/* $XConsortium: libDtWidget.elist /main/8 1996/06/19 11:38:55 cde-dec $ - * - * (c) Copyright 1996 Digital Equipment Corporation. - * (c) Copyright 1996 Hewlett-Packard Company. - * (c) Copyright 1996 International Business Machines Corp. - * (c) Copyright 1996 Sun Microsystems, Inc. - * (c) Copyright 1996 Novell, Inc. - * (c) Copyright 1996 FUJITSU LIMITED. - * (c) Copyright 1996 Hitachi. - */ - -/************************************************************************* - * Export list for libDtWidget - * This list *must* be updated whenever a change is made to the library API. - * - * The syntax for the symbol declarations in this list is as follows: - * public sym => Public C symbol, i.e., publicized API - * publicC++ sym => Public C++ symbol, i.e., publicized API - * private sym => Private C symbol, i.e., unpublicized API - * privateC++ sym => Private C++ symbol, i.e., unpublicized API - * internal sym => Internal C symbol, i.e., not part of API - * internalC++ sym => Internal C++ symbol, i.e., not part of API - * - **************************************************************************/ - - -/******************************************************************** - * Public symbols -- available to everyone - ********************************************************************/ - -public DtComboBoxAddItem -public DtComboBoxDeletePos -public DtComboBoxSelectItem -public DtComboBoxSetItem -public DtCreateComboBox -public DtCreateEditor -public DtCreateMenuButton -public DtCreateSpinBox -public DtEditorAppend -public DtEditorAppendFromFile -public DtEditorChange -public DtEditorCheckForUnsavedChanges -public DtEditorClearSelection -public DtEditorCopyToClipboard -public DtEditorCutToClipboard -public DtEditorDeleteSelection -public DtEditorDeselect -public DtEditorDisableRedisplay -public DtEditorEnableRedisplay -public DtEditorFind -public DtEditorFormat -public DtEditorGetContents -public DtEditorGetInsertionPosition -public DtEditorGetLastPosition -public DtEditorGetMessageTextFieldID -public DtEditorGetSizeHints -public DtEditorGoToLine -public DtEditorInsert -public DtEditorInsertFromFile -public DtEditorInvokeFindChangeDialog -public DtEditorInvokeFormatDialog -public DtEditorInvokeSpellDialog -public DtEditorPasteFromClipboard -public DtEditorReplace -public DtEditorReplaceFromFile -public DtEditorReset -public DtEditorSaveContentsToFile -public DtEditorSelectAll -public DtEditorSetContents -public DtEditorSetContentsFromFile -public DtEditorSetInsertionPosition -public DtEditorTraverseToEditor -public DtEditorUndoEdit -public DtSpinBoxAddItem -public DtSpinBoxDeletePos -public DtSpinBoxSetItem -public dtComboBoxWidgetClass -public dtDialogBoxWidgetClass -public dtEditorClassRec -public dtEditorWidgetClass -public dtMenuButtonWidgetClass -public dtSpinBoxWidgetClass - - -/******************************************************************** - * Private symbols -- Undocumented APIs that are exported for B.C. - * or because privileged applications may need used them. - ********************************************************************/ - -private _AIXJPStrings -private _DtComboBoxGetArrowSize -private _DtComboBoxGetLabelString -private _DtComboBoxGetListFontList -private _DtComboBoxGetListItemCount -private _DtComboBoxGetListItems -private _DtComboBoxGetListMarginHeight -private _DtComboBoxGetListMarginWidth -private _DtComboBoxGetListSpacing -private _DtComboBoxGetListTopItemPosition -private _DtComboBoxGetListVisibleItemCount -private _DtControlAddDropAnimationImage -private _DtControlAddPushAnimationImage -private _DtControlDoDropAnimation -private _DtControlDoPushAnimation -private _DtControlGetMonitorState -private _DtControlSetBusy -private _DtControlSetFileChanged -private _DtCreateControl -private _DtCreateDialogBox -private _DtCreateIcon -private _DtCreateTitleBox -private _DtCreateView -private _DtDialogBoxGetButton -private _DtDialogBoxGetWorkArea -private _DtDuplicateIcon -private _DtIconDraw -private _DtIconGetIconRects -private _DtIconGetState -private _DtIconGetTextExtent -private _DtIconGetTextExtent_r -private _DtIconSelectInTitle -private _DtIconSetState -private _DtSpinBoxGetArrowSize -private _DtStrings -private _DtTitleBoxGetTitleArea -private _DtTitleBoxGetWorkArea -private _DtWidgetGetMessage -private __DtCreateDialogBoxDialog -private dtComboBoxClassRec -private dtControlCacheObjClassRec -private dtControlClassRec -private dtControlGadgetClass -private dtDialogBoxClassRec -private dtIconCacheObjClassRec -private dtIconClassRec -private dtIconGadgetClass -private dtMenuButtonClassRec -private dtSpinBoxClassRec -private dtTitleBoxClassRec -private dtTitleBoxWidgetClass -private dtViewClassRec -private dtViewWidgetClass - - -/******************************************************************** - * Internal symbols -- not to be used outside the library. - ********************************************************************/ - -internal _DtEditorDialogFindCancelCB -internal _DtEditorDialogReplaceAllCB -internal _DtEditorDialogReplaceCB -internal _DtEditorDialogSearchCB -internal _DtEditorFindTextChangedCB -internal _DtEditorGetLineIndex -internal _DtEditorGetPointer -internal _DtEditorHelpSearchCB -internal _DtEditorHelpSearchChangeCB -internal _DtEditorHelpSearchFindCB -internal _DtEditorHelpSearchSpellCB -internal _DtEditorMisspelledDblClickCB -internal _DtEditorMisspelledSelectCB -internal _DtEditorModifyVerifyCB -internal _DtEditorReplaceTextChangedCB -internal _DtEditorResetUndo -internal _DtEditorSearch -internal _DtEditorSearchMapCB -internal _DtEditorSetFindSensitivity -internal _DtEditorSetReplaceAllSensitivity -internal _DtEditorSetReplaceSensitivity -internal _DtEditorUpdateLineDisplay -internal _DtEditorValidateFileAccess -internal _DtEditorWarning -internal _DtEditor_CountCharacters -internal _DtIconRegisterDropsite -internal _DtMsgComboBox_0000 -internal _DtMsgComboBox_0001 -internal _DtMsgComboBox_0002 -internal _DtMsgComboBox_0003 -internal _DtMsgComboBox_0004 -internal _DtMsgComboBox_0005 -internal _DtMsgComboBox_0006 -internal _DtMsgComboBox_0007 -internal _DtMsgComboBox_0008 -internal _DtMsgComboBox_0009 -internal _DtMsgComboBox_0010 -internal _DtMsgComboBox_0011 -internal _DtMsgComboBox_0012 -internal _DtMsgComboBox_0013 -internal _DtMsgComboBox_0014 -internal _DtMsgCommon_0000 -internal _DtMsgCommon_0001 -internal _DtMsgDialogBox_0000 -internal _DtMsgDialogBox_0001 -internal _DtMsgEditor_0000 -internal _DtMsgEditor_0001 -internal _DtMsgEditor_0002 -internal _DtMsgEditor_0003 -internal _DtMsgEditor_0004 -internal _DtMsgEditor_0005 -internal _DtMsgEditor_0006 -internal _DtMsgEditor_0007 -internal _DtMsgEditor_0008 -internal _DtMsgEditor_0009 -internal _DtMsgEditor_0010 -internal _DtMsgEditor_0011 -internal _DtMsgEditor_0012 -internal _DtMsgEditor_0013 -internal _DtMsgEditor_0014 -internal _DtMsgEditor_0015 -internal _DtMsgEditor_0016 -internal _DtMsgEditor_0017 -internal _DtMsgEditor_0018 -internal _DtMsgEditor_0019 -internal _DtMsgEditor_0020 -internal _DtMsgEditor_0021 -internal _DtMsgEditor_0022 -internal _DtMsgEditor_0023 -internal _DtMsgEditor_0024 -internal _DtMsgEditor_0025 -internal _DtMsgIcon_0000 -internal _DtMsgIcon_0001 -internal _DtMsgIcon_0002 -internal _DtMsgIcon_0003 -internal _DtMsgIcon_0004 -internal _DtMsgIcon_0005 -internal _DtMsgIndicator_0000 -internal _DtMsgMenuButton_0000 -internal _DtMsgMenuButton_0001 -internal _DtMsgMenuButton_0002 -internal _DtMsgSpinBox_0000 -internal _DtMsgSpinBox_0001 -internal _DtMsgSpinBox_0002 -internal _DtMsgSpinBox_0003 -internal _DtMsgSpinBox_0004 -internal _DtMsgSpinBox_0005 -internal _DtMsgSpinBox_0006 -internal _DtMsgSpinBox_0007 -internal _DtMsgSpinBox_0008 -internal _DtMsgSpinBox_0009 -internal _DtMsgSpinBox_0010 -internal _DtMsgSpinBox_0011 -internal _DtMsgSpinBox_0012 -internal _DtMsgSpinBox_0013 -internal _DtMsgSpinBox_0014 -internal _DtMsgTitleBox_0000 -internal _DtMsgTitleBox_0001 -internal _DtMsgTitleBox_0002 -internal _DtMsgTitleBox_0003 -internal _DtMsgTitleBox_0004 -internal _DtRegisterNewConverters diff --git a/cde/lib/csa/libcsa.elist b/cde/lib/csa/libcsa.elist deleted file mode 100644 index 09fa43b23..000000000 --- a/cde/lib/csa/libcsa.elist +++ /dev/null @@ -1,597 +0,0 @@ -/* $TOG: libcsa.elist /main/3 1999/10/14 17:47:27 mgreess $ - * - * (c) Copyright 1996 Digital Equipment Corporation. - * (c) Copyright 1996 Hewlett-Packard Company. - * (c) Copyright 1996 International Business Machines Corp. - * (c) Copyright 1996 Sun Microsystems, Inc. - * (c) Copyright 1996 Novell, Inc. - * (c) Copyright 1996 FUJITSU LIMITED. - * (c) Copyright 1996 Hitachi. - */ - -/************************************************************************* - * Export list for libcsa - * This list *must* be updated whenever a change is made to the library API. - * - * The syntax for the symbol declarations in this list is as follows: - * public sym => Public C symbol, i.e., publicized API - * publicC++ sym => Public C++ symbol, i.e., publicized API - * private sym => Private C symbol, i.e., unpublicized API - * privateC++ sym => Private C++ symbol, i.e., unpublicized API - * internal sym => Internal C symbol, i.e., not part of API - * internalC++ sym => Internal C++ symbol, i.e., not part of API - * - **************************************************************************/ - - -/******************************************************************** - * Public symbols -- available to everyone - ********************************************************************/ - -public csa_free -public csa_list_calendars -public csa_logoff -public csa_logon -public csa_look_up -public csa_query_configuration -public csa_restore -public csa_save -public csa_add_calendar -public csa_delete_calendar -public csa_list_calendar_attributes -public csa_read_calendar_attributes -public csa_register_callback -public csa_unregister_callback -public csa_call_callbacks -public csa_update_calendar_attributes -public csa_add_entry -public csa_delete_entry -public csa_free_time_search -public csa_list_entries -public csa_list_entry_attributes -public csa_list_entry_sequence -public csa_read_entry_attributes -public csa_read_next_reminder -public csa_update_entry_attributes -public csa_add_event -public csa_add_todo -public csa_add_memo -public _CSA_calendar_attribute_names -public _CSA_entry_attribute_names -public _CSA_entry_subtype_values - - -/******************************************************************** - * Private symbols -- used by dtcm's server (rpc.cmsd) - ********************************************************************/ - -private _CSA_cal_attr_info -private _DtCmAccessRightToV4AccessType -private _DtCmAttr4ToReminderValue -private _DtCmExtendNameTable -private _DtCmFreeHashedArrays -private _DtCmGetHostAtDomain -private _DtCmGetLocalDomain -private _DtCmGetLocalHost -private _DtCmGetPrefix -private _DtCmGrowAttrArray -private _DtCmHashCriteria -private _DtCmIsSamePath -private _DtCmIsSameUser -private _DtCmIsUserName -private _DtCmUpdateAccessListAttrVal -private _DtCmUpdateAttribute -private _DtCmUpdateAttributes -private _DtCmUpdateDateTimeListAttrVal -private _DtCmUpdateSint32AttrVal -private _DtCmUpdateStringAttrVal -private _DtCm_accargs2_to_accargs4 -private _DtCm_accargs3_to_accargs4 -private _DtCm_accargs4_to_accargs2 -private _DtCm_accargs4_to_accargs3 -private _DtCm_accessentry4_to_cmsaccesslist -private _DtCm_accstat4_to_accstat2 -private _DtCm_accstat4_to_accstat3 -private _DtCm_add_reminder -private _DtCm_appt4_to_attrs -private _DtCm_appt_to_abbrev4 -private _DtCm_appt_to_semiprivate_abbrev4 -private _DtCm_apptstatus4_to_status -private _DtCm_attrs_to_eventtype4 -private _DtCm_cal_name_tbl -private _DtCm_check_cal_cms_attributes -private _DtCm_check_entry_cms_attributes -private _DtCm_check_operator -private _DtCm_classification_to_privacy4 -private _DtCm_cms_entry_to_appt4 -private _DtCm_copy_appt4 -private _DtCm_copy_cms_attr_val -private _DtCm_copy_cms_attribute -private _DtCm_copy_cms_attributes -private _DtCm_copy_cms_entry -private _DtCm_copy_excpt4 -private _DtCm_copy_one_appt4 -private _DtCm_copy_semiprivate_appt4 -private _DtCm_entry_name_tbl -private _DtCm_eventtype4_to_subtype -private _DtCm_eventtype4_to_type -private _DtCm_free_abbrev_appt4 -private _DtCm_free_access_list4 -private _DtCm_free_appt4 -private _DtCm_free_cms_access_entry -private _DtCm_free_cms_attribute_value -private _DtCm_free_cms_attribute_values -private _DtCm_free_cms_attributes -private _DtCm_free_cms_entries -private _DtCm_free_cms_entry -private _DtCm_free_date_time_list -private _DtCm_free_excpt4 -private _DtCm_free_keyentry4 -private _DtCm_free_name_table -private _DtCm_free_re -private _DtCm_free_re_state -private _DtCm_free_reminder4 -private _DtCm_get_attribute_types -private _DtCm_get_index_from_table -private _DtCm_init_hash -private _DtCm_interval4_to_rtype -private _DtCm_make_access_entry4 -private _DtCm_make_appt4 -private _DtCm_make_attr4 -private _DtCm_make_cms_entry -private _DtCm_match_one_appt -private _DtCm_match_reminder_attribute -private _DtCm_match_sint32_attribute -private _DtCm_match_string_attribute -private _DtCm_match_time_attribute -private _DtCm_match_time_duration_attribute -private _DtCm_match_uint32_attribute -private _DtCm_old_reminder_name_to_index -private _DtCm_old_reminder_name_to_name -private _DtCm_privacy4_to_classification -private _DtCm_reg2_to_reg4 -private _DtCm_reg3_to_reg4 -private _DtCm_regstat4_to_regstat2 -private _DtCm_regstat4_to_regstat3 -private _DtCm_remove_reminder -private _DtCm_repeat_info -private _DtCm_rtype_to_interval4 -private _DtCm_rule_buf -private _DtCm_rule_parser -private _DtCm_set_opaque_attrval -private _DtCm_set_reminder_attrval -private _DtCm_set_string_attrval -private _DtCm_set_uint32_attrval -private _DtCm_set_user_attrval -private _DtCm_status_to_apptstatus4 -private _DtCm_tableargs2_to_tableargs4 -private _DtCm_tableargs3_to_tableargs4 -private _DtCm_tabledelargs2_to_tabledelargs4 -private _DtCm_tabledelargs3_to_tabledelargs4 -private _DtCm_tableres4_to_tableres2 -private _DtCm_tableres4_to_tableres3 -private _DtCm_tablestat4_to_tablestat2 -private _DtCm_tablestat4_to_tablestat3 -private _DtCm_xdr_Access_Args_2 -private _DtCm_xdr_Access_Args_3 -private _DtCm_xdr_Access_Args_4 -private _DtCm_xdr_Access_Status_2 -private _DtCm_xdr_Access_Status_3 -private _DtCm_xdr_Access_Status_4 -private _DtCm_xdr_Registration_2 -private _DtCm_xdr_Registration_3 -private _DtCm_xdr_Registration_4 -private _DtCm_xdr_Registration_Status_2 -private _DtCm_xdr_Registration_Status_3 -private _DtCm_xdr_Registration_Status_4 -private _DtCm_xdr_Table_Args_2 -private _DtCm_xdr_Table_Args_3 -private _DtCm_xdr_Table_Args_4 -private _DtCm_xdr_Table_Op_Args_4 -private _DtCm_xdr_Table_Res_2 -private _DtCm_xdr_Table_Res_3 -private _DtCm_xdr_Table_Res_4 -private _DtCm_xdr_Table_Status_2 -private _DtCm_xdr_Table_Status_3 -private _DtCm_xdr_Table_Status_4 -private xdr_cmcb_update_callback_args -private xdr_cms_archive_args -private xdr_cms_archive_res -private xdr_cms_create_args -private xdr_cms_delete_args -private xdr_cms_entries_res -private xdr_cms_entry_res -private xdr_cms_enumerate_args -private xdr_cms_enumerate_calendar_attr_res -private xdr_cms_get_cal_attr_args -private xdr_cms_get_cal_attr_res -private xdr_cms_get_entry_attr_args -private xdr_cms_get_entry_attr_res -private xdr_cms_insert_args -private xdr_cms_list_calendars_res -private xdr_cms_lookup_entries_args -private xdr_cms_name -private xdr_cms_open_args -private xdr_cms_open_res -private xdr_cms_register_args -private xdr_cms_reminder_args -private xdr_cms_reminder_res -private xdr_cms_remove_args -private xdr_cms_restore_args -private xdr_cms_set_cal_attr_args -private xdr_cms_update_args - -/******************************************************************** - * Private symbols -- Undocumented APIs that are exported for B.C. - * or because privileged applications may need used them. - ********************************************************************/ - -private _csa_iso8601_to_tick -private _csa_tick_to_iso8601 -private _csa_iso8601_to_range -private _csa_range_to_iso8601 -private _csa_iso8601_to_duration -private _csa_duration_to_iso8601 -private _DtCm_set_sint32_attrval - - -/******************************************************************** - * Internal symbols -- not to be used outside the library. - ********************************************************************/ - -#ifdef NEED_STRCASECMP -internal strcasecmp -internal strncasecmp -#endif - -internal _CSA_entry_attr_info -internal _DtCmCmsentriesToLibentries -internal _DtCmDestroyHash -internal _DtCmFindHash -internal _DtCmGetHash -internal _DtCmGetUserName -internal _DtCmMakeHash -internal _DtCmUpdateOpaqueDataAttrVal -internal _DtCmUpdateReminderAttrVal -internal _DtCm_acclist4_to_acclist2 -internal _DtCm_acclist4_to_acclist3 -internal _DtCm_accstat2_to_accstat4 -internal _DtCm_accstat3_to_accstat4 -internal _DtCm_active_cal_list -internal _DtCm_add_name_to_table -internal _DtCm_add_registration -internal _DtCm_add_to_entry_list -internal _DtCm_alloc_attributes -internal _DtCm_alloc_calendar_users -internal _DtCm_alloc_character_pointers -internal _DtCm_alloc_entry -internal _DtCm_alloc_entry_handles -internal _DtCm_alloc_reminder_references -internal _DtCm_appt4_to_appt2 -internal _DtCm_appt4_to_appt3 -internal _DtCm_appt4_to_libentries -internal _DtCm_attrs_to_appt4 -internal _DtCm_attrs_to_apptdata -internal _DtCm_check_cal_csa_attributes -internal _DtCm_check_entry_attributes -internal _DtCm_clnt_call -internal _DtCm_clntstat_to_csastat -internal _DtCm_cms2csa_access_list -internal _DtCm_cms2csa_attribute -internal _DtCm_cms2csa_attrval -internal _DtCm_cms2csa_reminder_ref -internal _DtCm_cmsattrs_to_apptdata -internal _DtCm_convert_entry_wheader -internal _DtCm_copy_cms_access_list -internal _DtCm_copy_date_time_list -internal _DtCm_copy_opaque_data -internal _DtCm_copy_reminder -internal _DtCm_copy_reminder4 -internal _DtCm_count_entry_in_list -internal _DtCm_create_tcp_client -internal _DtCm_create_udp_client -internal _DtCm_csa2cms_access_list -internal _DtCm_csaaccesslist_toaccessentry4 -internal _DtCm_deregister_callback_2 -internal _DtCm_deregister_callback_3 -internal _DtCm_deregister_callback_4 -internal _DtCm_destroy_agent -internal _DtCm_do_registration -internal _DtCm_do_unregistration -internal _DtCm_free -internal _DtCm_free_Calendar -internal _DtCm_free_appt2 -internal _DtCm_free_appt3 -internal _DtCm_free_attr2 -internal _DtCm_free_attr3 -internal _DtCm_free_attr4 -internal _DtCm_free_attribute_value -internal _DtCm_free_attribute_values -internal _DtCm_free_attributes -internal _DtCm_free_character_pointers -internal _DtCm_free_csa_access_list -internal _DtCm_free_entry_content -internal _DtCm_free_entry_handles -internal _DtCm_free_libentries -internal _DtCm_free_libentries_from_list -internal _DtCm_free_opaque_data -internal _DtCm_free_reminder -internal _DtCm_free_reminder_references -internal _DtCm_get_Calendar -internal _DtCm_get_all_cal_attrs -internal _DtCm_get_all_entry_attrs -internal _DtCm_get_cal_attrs_by_name -internal _DtCm_get_entry_attr_names -internal _DtCm_get_entry_attrs_by_name -internal _DtCm_get_entry_detail -internal _DtCm_get_libentry -internal _DtCm_get_old_attr_by_index -internal _DtCm_get_old_attr_by_name -internal _DtCm_get_server_rpc_version -internal _DtCm_id4_to_id2 -internal _DtCm_id4_to_id3 -internal _DtCm_init_agent -internal _DtCm_keyrange4_to_keyrange3 -internal _DtCm_libentries_to_appt4 -internal _DtCm_libentry_to_entryh -internal _DtCm_list_old_cal_attr_names -internal _DtCm_make_libentry -internal _DtCm_make_name_table -internal _DtCm_match_appts -internal _DtCm_match_reminders -internal _DtCm_new_Calendar -internal _DtCm_print_errmsg -internal _DtCm_print_tick -internal _DtCm_process_updates -internal _DtCm_range4_to_range2 -internal _DtCm_range4_to_range3 -internal _DtCm_register_callback_2 -internal _DtCm_register_callback_3 -internal _DtCm_register_callback_4 -internal _DtCm_register_xtcallback -internal _DtCm_regstat2_to_regstat4 -internal _DtCm_regstat3_to_regstat4 -internal _DtCm_reminder4_to_csareminder -internal _DtCm_remove_from_entry_list -internal _DtCm_remove_registration -internal _DtCm_reset_cal_attrs -internal _DtCm_rpc_create_calendar -internal _DtCm_rpc_delete_calendar -internal _DtCm_rpc_delete_entry -internal _DtCm_rpc_enumerate_sequence -internal _DtCm_rpc_get_cal_attrs -internal _DtCm_rpc_insert_entry -internal _DtCm_rpc_list_calendar_attributes -internal _DtCm_rpc_list_calendars -internal _DtCm_rpc_lookup_entries -internal _DtCm_rpc_lookup_entry_by_id -internal _DtCm_rpc_lookup_reminder -internal _DtCm_rpc_open_calendar -internal _DtCm_rpc_register_client -internal _DtCm_rpc_set_cal_attrs -internal _DtCm_rpc_unregister_client -internal _DtCm_rpc_update_entry -internal _DtCm_rtable_abbreviated_lookup_key_range_3 -internal _DtCm_rtable_abbreviated_lookup_key_range_4 -internal _DtCm_rtable_abbreviated_lookup_range_2 -internal _DtCm_rtable_abbreviated_lookup_range_3 -internal _DtCm_rtable_abbreviated_lookup_range_4 -internal _DtCm_rtable_change_2 -internal _DtCm_rtable_change_3 -internal _DtCm_rtable_change_4 -internal _DtCm_rtable_change_instance_2 -internal _DtCm_rtable_change_instance_3 -internal _DtCm_rtable_change_instance_4 -internal _DtCm_rtable_check_2 -internal _DtCm_rtable_check_3 -internal _DtCm_rtable_check_4 -internal _DtCm_rtable_create_4 -internal _DtCm_rtable_delete_2 -internal _DtCm_rtable_delete_3 -internal _DtCm_rtable_delete_4 -internal _DtCm_rtable_delete_instance_2 -internal _DtCm_rtable_delete_instance_3 -internal _DtCm_rtable_delete_instance_4 -internal _DtCm_rtable_flush_table_2 -internal _DtCm_rtable_flush_table_3 -internal _DtCm_rtable_flush_table_4 -internal _DtCm_rtable_get_access_2 -internal _DtCm_rtable_get_access_3 -internal _DtCm_rtable_get_access_4 -internal _DtCm_rtable_gmtoff_3 -internal _DtCm_rtable_gmtoff_4 -internal _DtCm_rtable_insert_2 -internal _DtCm_rtable_insert_3 -internal _DtCm_rtable_insert_4 -internal _DtCm_rtable_lookup_2 -internal _DtCm_rtable_lookup_3 -internal _DtCm_rtable_lookup_4 -internal _DtCm_rtable_lookup_next_larger_2 -internal _DtCm_rtable_lookup_next_larger_3 -internal _DtCm_rtable_lookup_next_larger_4 -internal _DtCm_rtable_lookup_next_reminder_2 -internal _DtCm_rtable_lookup_next_reminder_3 -internal _DtCm_rtable_lookup_next_reminder_4 -internal _DtCm_rtable_lookup_next_smaller_2 -internal _DtCm_rtable_lookup_next_smaller_3 -internal _DtCm_rtable_lookup_next_smaller_4 -internal _DtCm_rtable_lookup_range_2 -internal _DtCm_rtable_lookup_range_3 -internal _DtCm_rtable_lookup_range_4 -internal _DtCm_rtable_ping_2 -internal _DtCm_rtable_ping_3 -internal _DtCm_rtable_ping_4 -internal _DtCm_rtable_remove_4 -internal _DtCm_rtable_rename_4 -internal _DtCm_rtable_set_access_2 -internal _DtCm_rtable_set_access_3 -internal _DtCm_rtable_set_access_4 -internal _DtCm_rtable_size_2 -internal _DtCm_rtable_size_3 -internal _DtCm_rtable_size_4 -internal _DtCm_scope_to_options4 -internal _DtCm_set_csa_access_attrval -internal _DtCm_set_csa_string_attrval -internal _DtCm_set_csa_uint32_attrval -internal _DtCm_table_create -internal _DtCm_table_delete -internal _DtCm_table_get_access -internal _DtCm_table_insert -internal _DtCm_table_lookup -internal _DtCm_table_lookup_key_range -internal _DtCm_table_lookup_range -internal _DtCm_table_lookup_reminder -internal _DtCm_table_register_target -internal _DtCm_table_set_access -internal _DtCm_table_size -internal _DtCm_table_unregister_target -internal _DtCm_table_update -internal _DtCm_tableres2_to_tableres4 -internal _DtCm_tableres3_to_tableres4 -internal _DtCm_tablestat2_to_tablestat4 -internal _DtCm_tablestat3_to_tablestat4 -internal _DtCm_transient -internal _DtCm_uid4_to_uid2 -internal _DtCm_uid4_to_uid3 -internal _DtCm_uidopt4_to_uid2 -internal _DtCm_uidopt4_to_uid3 -internal _DtCm_update_callback_1 -internal _DtCm_xdr_Abb_Appt_2 -internal _DtCm_xdr_Abb_Appt_3 -internal _DtCm_xdr_Abb_Appt_4 -internal _DtCm_xdr_Access_Entry_2 -internal _DtCm_xdr_Access_Entry_3 -internal _DtCm_xdr_Access_Entry_4 -internal _DtCm_xdr_Appt_2 -internal _DtCm_xdr_Appt_3 -internal _DtCm_xdr_Appt_4 -internal _DtCm_xdr_Appt_Status_3 -internal _DtCm_xdr_Appt_Status_4 -internal _DtCm_xdr_Apptid_2 -internal _DtCm_xdr_Apptid_3 -internal _DtCm_xdr_Apptid_4 -internal _DtCm_xdr_Args_2 -internal _DtCm_xdr_Args_3 -internal _DtCm_xdr_Args_4 -internal _DtCm_xdr_Attr_2 -internal _DtCm_xdr_Attr_3 -internal _DtCm_xdr_Attr_4 -internal _DtCm_xdr_Attribute_2 -internal _DtCm_xdr_Attribute_3 -internal _DtCm_xdr_Attribute_4 -internal _DtCm_xdr_Buffer_2 -internal _DtCm_xdr_Buffer_3 -internal _DtCm_xdr_Buffer_4 -internal _DtCm_xdr_Event_Type_3 -internal _DtCm_xdr_Event_Type_4 -internal _DtCm_xdr_Except_2 -internal _DtCm_xdr_Except_3 -internal _DtCm_xdr_Except_4 -internal _DtCm_xdr_Exception_2 -internal _DtCm_xdr_Exception_3 -internal _DtCm_xdr_Exception_4 -internal _DtCm_xdr_Id_2 -internal _DtCm_xdr_Id_3 -internal _DtCm_xdr_Id_4 -internal _DtCm_xdr_Interval_3 -internal _DtCm_xdr_Interval_4 -internal _DtCm_xdr_Keyrange_3 -internal _DtCm_xdr_Keyrange_4 -internal _DtCm_xdr_Options_4 -internal _DtCm_xdr_Period_2 -internal _DtCm_xdr_Period_3 -internal _DtCm_xdr_Period_4 -internal _DtCm_xdr_Privacy_Level_3 -internal _DtCm_xdr_Privacy_Level_4 -internal _DtCm_xdr_Range_2 -internal _DtCm_xdr_Range_3 -internal _DtCm_xdr_Range_4 -internal _DtCm_xdr_Reminder_2 -internal _DtCm_xdr_Reminder_3 -internal _DtCm_xdr_Reminder_4 -internal _DtCm_xdr_Table_Args_Type_2 -internal _DtCm_xdr_Table_Args_Type_3 -internal _DtCm_xdr_Table_Args_Type_4 -internal _DtCm_xdr_Table_Res_List_2 -internal _DtCm_xdr_Table_Res_List_3 -internal _DtCm_xdr_Table_Res_List_4 -internal _DtCm_xdr_Table_Res_Type_2 -internal _DtCm_xdr_Table_Res_Type_3 -internal _DtCm_xdr_Table_Res_Type_4 -internal _DtCm_xdr_Tag_2 -internal _DtCm_xdr_Tag_3 -internal _DtCm_xdr_Tag_4 -internal _DtCm_xdr_Transaction_2 -internal _DtCm_xdr_Transaction_3 -internal _DtCm_xdr_Uid_2 -internal _DtCm_xdr_Uid_3 -internal _DtCm_xdr_Uid_4 -internal _DtCm_xdr_Uidopt_4 -internal _DtCm_xdr_Update_Status - -internal _DtCm_yydebug -internal _DtCm_yyerror -internal _DtCm_yylex -internal _DtCm_yylval -internal _DtCm_yynerrs -internal _DtCm_yytext - -#if defined(sun) -internal _DtCm_yy__DtCm_yys -internal _DtCm_yy__DtCm_yyv -internal _DtCm_yyact -internal _DtCm_yychar -internal _DtCm_yychk -internal _DtCm_yydef -internal _DtCm_yyerrflag -internal _DtCm_yyexca -internal _DtCm_yypact -internal _DtCm_yypgo -internal _DtCm_yyps -internal _DtCm_yypv -internal _DtCm_yyr1 -internal _DtCm_yyr2 -internal _DtCm_yys -internal _DtCm_yystate -internal _DtCm_yytmp -internal _DtCm_yyv -internal _DtCm_yyval -#endif - -internal cmcb_update_callback_2_svc -internal cms_archive_5 -internal cms_create_calendar_5 -internal cms_delete_entry_5 -internal cms_enumerate_calendar_attr_5 -internal cms_enumerate_sequence_5 -internal cms_get_calendar_attr_5 -internal cms_get_entry_attr_5 -internal cms_insert_entry_5 -internal cms_list_calendars_5 -internal cms_lookup_entries_5 -internal cms_lookup_reminder_5 -internal cms_open_calendar_5 -internal cms_ping_5 -internal cms_register_5 -internal cms_remove_calendar_5 -internal cms_restore_5 -internal cms_set_calendar_attr_5 -internal cms_unregister_5 -internal cms_update_entry_5 -internal xdr_CSA_date_time_entry -internal xdr_CSA_opaque_data -internal xdr_CSA_reminder -internal xdr_cmcb_add_entry_data -internal xdr_cmcb_cal_attr_data -internal xdr_cmcb_delete_entry_data -internal xdr_cmcb_update_data -internal xdr_cmcb_update_entry_data -internal xdr_cms_access_entry -internal xdr_cms_attr_name -internal xdr_cms_attribute -internal xdr_cms_attribute_value -internal xdr_cms_entry -internal xdr_cms_get_entry_attr_res_item -internal xdr_cms_key -internal xdr_cms_reminder_ref -internal xdr_time_t diff --git a/cde/lib/pam/libpam/libpam.elist b/cde/lib/pam/libpam/libpam.elist deleted file mode 100644 index 60ef7be00..000000000 --- a/cde/lib/pam/libpam/libpam.elist +++ /dev/null @@ -1,35 +0,0 @@ -/**************************************************************************** - * Export list for libpam. - * This list *must* be updated whenever a change is made to the libpam API. - * - * The syntax for the symbol declarations in this list is as follows: - * public sym => Public C symbol, i.e., publicised API - * private sym => Private C symbol, i.e., unpublicised API - * internal sym => Internal C symbol, i.e., not part of API - * publicC++ sym => Public C++ symbol, i.e., publicised API - * privateC++ sym => Private C++ symbol, i.e., unpublicised API - * internalC++ sym => Internal C++ symbol, i.e., not part of API - * - * $TOG: libpam.elist /main/1 1999/09/08 15:03:20 mgreess $ - *****************************************************************************/ - -public pam_start -public pam_end -public pam_set_item -public pam_get_item -public pam_get_user -public pam_set_data -public pam_get_data -public pam_strerror -public pam_authenticate -public pam_acct_mgmt -public pam_open_session -public pam_close_session -public pam_setcred -public pam_chauthtok - -private __pam_free_resp -private __pam_display_msg -private __pam_get_input -private __pam_get_authtok -private __pam_get_i18n_msg diff --git a/cde/lib/pam/pam_modules/dce/libpam_cde.elist b/cde/lib/pam/pam_modules/dce/libpam_cde.elist deleted file mode 100644 index e666682cb..000000000 --- a/cde/lib/pam/pam_modules/dce/libpam_cde.elist +++ /dev/null @@ -1,22 +0,0 @@ -/**************************************************************************** - * Export list for libpam_dce. - * This list *must* be updated whenever a change is made to the libpam_dce - * API. - * - * The syntax for the symbol declarations in this list is as follows: - * public sym => Public C symbol, i.e., publicised API - * private sym => Private C symbol, i.e., unpublicised API - * internal sym => Internal C symbol, i.e., not part of API - * publicC++ sym => Public C++ symbol, i.e., publicised API - * privateC++ sym => Private C++ symbol, i.e., unpublicised API - * internalC++ sym => Internal C++ symbol, i.e., not part of API - * - * $TOG: libpam_cde.elist /main/1 1999/09/08 15:58:14 mgreess $ - *****************************************************************************/ - -public pam_sm_authenticate -public pam_sm_setcred -public pam_sm_acct_mgmt -public pam_sm_open_session -public pam_sm_close_session -public pam_sm_chauthtok diff --git a/cde/lib/pam/pam_modules/dial_auth/libpam_dial_auth.elist b/cde/lib/pam/pam_modules/dial_auth/libpam_dial_auth.elist deleted file mode 100644 index fd28ba868..000000000 --- a/cde/lib/pam/pam_modules/dial_auth/libpam_dial_auth.elist +++ /dev/null @@ -1,18 +0,0 @@ -/**************************************************************************** - * Export list for libpam_dial_auth. - * This list *must* be updated whenever a change is made to the libpam_dial_auth - * API. - * - * The syntax for the symbol declarations in this list is as follows: - * public sym => Public C symbol, i.e., publicised API - * private sym => Private C symbol, i.e., unpublicised API - * internal sym => Internal C symbol, i.e., not part of API - * publicC++ sym => Public C++ symbol, i.e., publicised API - * privateC++ sym => Private C++ symbol, i.e., unpublicised API - * internalC++ sym => Internal C++ symbol, i.e., not part of API - * - * $TOG: libpam_dial_auth.elist /main/1 1999/09/08 15:58:41 mgreess $ - *****************************************************************************/ - -public pam_sm_authenticate -public pam_sm_setcred diff --git a/cde/lib/pam/pam_modules/rhosts_auth/libpam_rhosts_auth.elist b/cde/lib/pam/pam_modules/rhosts_auth/libpam_rhosts_auth.elist deleted file mode 100644 index af5a73859..000000000 --- a/cde/lib/pam/pam_modules/rhosts_auth/libpam_rhosts_auth.elist +++ /dev/null @@ -1,18 +0,0 @@ -/**************************************************************************** - * Export list for libpam_rhosts_auth. - * This list *must* be updated whenever a change is made to the - * libpam_rhosts_auth API. - * - * The syntax for the symbol declarations in this list is as follows: - * public sym => Public C symbol, i.e., publicised API - * private sym => Private C symbol, i.e., unpublicised API - * internal sym => Internal C symbol, i.e., not part of API - * publicC++ sym => Public C++ symbol, i.e., publicised API - * privateC++ sym => Private C++ symbol, i.e., unpublicised API - * internalC++ sym => Internal C++ symbol, i.e., not part of API - * - * $TOG: libpam_rhosts_auth.elist /main/1 1999/09/08 15:59:05 mgreess $ - *****************************************************************************/ - -public pam_sm_authenticate -public pam_sm_setcred diff --git a/cde/lib/pam/pam_modules/sample/libpam_sample.elist b/cde/lib/pam/pam_modules/sample/libpam_sample.elist deleted file mode 100644 index ed25d5431..000000000 --- a/cde/lib/pam/pam_modules/sample/libpam_sample.elist +++ /dev/null @@ -1,28 +0,0 @@ -/**************************************************************************** - * Export list for libpam_sample. - * This list *must* be updated whenever a change is made to the libpam_sample - * API. - * - * The syntax for the symbol declarations in this list is as follows: - * public sym => Public C symbol, i.e., publicised API - * private sym => Private C symbol, i.e., unpublicised API - * internal sym => Internal C symbol, i.e., not part of API - * publicC++ sym => Public C++ symbol, i.e., publicised API - * privateC++ sym => Private C++ symbol, i.e., unpublicised API - * internalC++ sym => Internal C++ symbol, i.e., not part of API - * - * $TOG: libpam_sample.elist /main/1 1999/09/08 15:59:30 mgreess $ - *****************************************************************************/ - -public pam_sm_authenticate -public pam_sm_setcred -public pam_sm_acct_mgmt -public pam_sm_open_session -public pam_sm_close_session -public pam_sm_chauthtok - -internal display_errmsg -internal get_authtok -internal free_msg -internal free_resp - diff --git a/cde/lib/pam/pam_modules/unix/libpam_unix.elist b/cde/lib/pam/pam_modules/unix/libpam_unix.elist deleted file mode 100644 index 599c94850..000000000 --- a/cde/lib/pam/pam_modules/unix/libpam_unix.elist +++ /dev/null @@ -1,48 +0,0 @@ -/**************************************************************************** - * Export list for libpam_unix. - * This list *must* be updated whenever a change is made to the libpam_unix API. - * - * The syntax for the symbol declarations in this list is as follows: - * public sym => Public C symbol, i.e., publicised API - * private sym => Private C symbol, i.e., unpublicised API - * internal sym => Internal C symbol, i.e., not part of API - * publicC++ sym => Public C++ symbol, i.e., publicised API - * privateC++ sym => Private C++ symbol, i.e., unpublicised API - * internalC++ sym => Internal C++ symbol, i.e., not part of API - * - * $TOG: libpam_unix.elist /main/1 1999/09/08 15:59:55 mgreess $ - *****************************************************************************/ - -public pam_sm_authenticate -public pam_sm_setcred -public pam_sm_acct_mgmt -public pam_sm_open_session -public pam_sm_close_session -public pam_sm_chauthtok - -internal get_ns -internal __set_authtoken_attr -internal defcntl -internal defopen -internal ck_perm -internal gethomedir -internal str2spwd -internal xdr_yppasswd -internal getspnam_from -internal update_authtok_file -internal setup_attr -internal getfingerinfo -internal free_setattr -internal defread -internal repository_to_string -internal _priv_lock -internal getpwnam_from -internal update_authtok_nis -internal attr_find -internal getloginshell -internal xdr_passwd -internal attr_match -internal __update_authtok -internal free_passwd_structs -internal __get_authtoken_attr - diff --git a/cde/lib/tt/lib/libtt.elist b/cde/lib/tt/lib/libtt.elist deleted file mode 100644 index e2acc245b..000000000 --- a/cde/lib/tt/lib/libtt.elist +++ /dev/null @@ -1,2534 +0,0 @@ -/* $TOG: libtt.elist /main/24 1999/10/15 17:22:29 mgreess $ */ - -/************************************************************************* - * Export list for libDtSvc - * This list *must* be updated whenever a change is made to the library API. - * - * The syntax for the symbol declarations in this list is as follows: - * public sym => Public C symbol, i.e., publicized API - * publicC++ sym => Public C++ symbol, i.e., publicized API - * private sym => Private C symbol, i.e., unpublicized API - * privateC++ sym => Private C++ symbol, i.e., unpublicized API - * internal sym => Internal C symbol, i.e., not part of API - * internalC++ sym => Internal C++ symbol, i.e., not part of API - * - **************************************************************************/ - - -/* - * Try to make all systems look as similar as possible. - */ - -/* Get tooltalk OPT_ definitions. */ -#define _STDIO_H -#define __STDIO_H -#if defined(OSMAJORVERSION) -# define OSMajorVersion OSMAJORVERSION -# define OSMinorVersion OSMINORVERSION -#endif -#include "tt_options.h" - -#ifdef _AIX -# define size_t unsigned long -# define pid_t int -# define uid_t unsigned long -#else -# define size_t unsigned int -# define pid_t long -# define uid_t long -#endif - -# define xdrproc_t int (*)(void) - -#if defined(_AIX) -# define va_list char* -#else -# define va_list void* -#endif - -#ifndef _AIX -# define CLIENT __client -#endif - - -/******************************************************************** - * Public symbols -- available to everyone - ********************************************************************/ - -public tt_open -public tt_close -public tt_X_session -public tt_default_ptype -public tt_default_ptype_set -public tt_default_file -public tt_default_file_set -public tt_default_session -public tt_default_session_set -public tt_default_procid -public tt_default_procid_set -public tt_file_join -public tt_file_quit -public tt_file_objects_query -public tt_file_move -public tt_file_copy -public tt_file_destroy -public tt_message_context_val -public tt_message_context_ival -public tt_message_context_bval -public tt_message_context_xval -public tt_message_context_set -public tt_message_icontext_set -public tt_message_bcontext_set -public tt_message_xcontext_set -public tt_context_join -public tt_icontext_join -public tt_bcontext_join -public tt_xcontext_join -public tt_context_quit -public tt_icontext_quit -public tt_bcontext_quit -public tt_xcontext_quit -public tt_message_contexts_count -public tt_message_context_slotname -public tt_message_create -public tt_message_create_super -public tt_message_destroy -public tt_message_send -public tt_message_send_on_exit -public tt_message_receive -public tt_message_reply -public tt_message_reject -public tt_message_accept -public tt_message_fail -public tt_message_pattern -public tt_message_callback_add -public tt_message_user -public tt_message_user_set -public tt_message_arg_add -public tt_message_arg_mode -public tt_message_arg_type -public tt_message_arg_val -public tt_message_arg_val_set -public tt_message_arg_bval -public tt_message_arg_bval_set -public tt_message_barg_add -public tt_message_arg_ival -public tt_message_arg_ival_set -public tt_message_iarg_add -public tt_message_arg_xval -public tt_message_arg_xval_set -public tt_message_xarg_add -public tt_message_args_count -public tt_message_class -public tt_message_class_set -public tt_message_file -public tt_message_file_set -public tt_message_object -public tt_message_object_set -public tt_message_id -public tt_message_op -public tt_message_op_set -public tt_message_opnum -public tt_message_otype -public tt_message_otype_set -public tt_message_address -public tt_message_address_set -public tt_message_handler -public tt_message_handler_set -public tt_message_handler_ptype -public tt_message_handler_ptype_set -public tt_message_accepters_count -public tt_message_accepter -public tt_message_rejecters_count -public tt_message_rejecter -public tt_message_abstainers_count -public tt_message_abstainer -public tt_message_disposition -public tt_message_disposition_set -public tt_message_scope -public tt_message_scope_set -public tt_message_sender -public tt_message_sender_ptype -public tt_message_sender_ptype_set -public tt_message_session -public tt_message_session_set -public tt_message_state -public tt_message_status -public tt_message_status_set -public tt_message_status_string -public tt_message_status_string_set -public tt_message_uid -public tt_message_gid -public tt_pnotice_create -public tt_prequest_create -public tt_onotice_create -public tt_orequest_create -public tt_spec_create -public tt_spec_write -public tt_spec_destroy -public tt_spec_file -public tt_spec_type -public tt_spec_type_set -public tt_spec_move -public tt_spec_propname -public tt_spec_propnames_count -public tt_spec_prop -public tt_spec_prop_add -public tt_spec_prop_count -public tt_spec_prop_set -public tt_spec_bprop -public tt_spec_bprop_add -public tt_spec_bprop_set -public tt_objid_equal -public tt_objid_objkey -public tt_otype_deriveds_count -public tt_otype_derived -public tt_otype_base -public tt_otype_is_derived -public tt_otype_osig_count -public tt_otype_hsig_count -public tt_otype_osig_op -public tt_otype_hsig_op -public tt_otype_osig_args_count -public tt_otype_hsig_args_count -public tt_otype_osig_arg_mode -public tt_otype_hsig_arg_mode -public tt_otype_osig_arg_type -public tt_otype_hsig_arg_type -public tt_pattern_create -public tt_pattern_destroy -public tt_pattern_register -public tt_pattern_unregister -public tt_pattern_callback_add -public tt_pattern_user -public tt_pattern_user_set -public tt_pattern_category -public tt_pattern_category_set -public tt_pattern_arg_add -public tt_pattern_barg_add -public tt_pattern_iarg_add -public tt_pattern_xarg_add -public tt_pattern_class_add -public tt_pattern_file_add -public tt_pattern_object_add -public tt_pattern_op_add -public tt_pattern_opnum_add -public tt_pattern_otype_add -public tt_pattern_address_add -public tt_pattern_disposition_add -public tt_pattern_scope_add -public tt_pattern_sender_add -public tt_pattern_sender_ptype_add -public tt_pattern_session_add -public tt_pattern_state_add -public tt_pattern_context_add -public tt_pattern_icontext_add -public tt_pattern_bcontext_add -public tt_pattern_xcontext_add -public tt_ptype_declare -public tt_ptype_undeclare -public tt_ptype_exists -public tt_ptype_opnum_callback_add -public tt_otype_opnum_callback_add -public tt_session_join -public tt_session_quit -public tt_initial_session -public tt_session_propname -public tt_session_propnames_count -public tt_session_prop -public tt_session_prop_add -public tt_session_prop_count -public tt_session_prop_set -public tt_session_bprop -public tt_session_bprop_add -public tt_session_bprop_set -public tt_session_types_load -public tt_fd -public tt_mark -public tt_release -public tt_malloc -public tt_free -public tt_status_message -public tt_pointer_error -public tt_error -public tt_int_error -public tt_error_pointer -public tt_error_int -public tt_trace_control -public tt_message_print -public tt_pattern_print -public tt_file_netfile -public tt_netfile_file -public tt_host_file_netfile -public tt_host_netfile_file -public tt_feature_enabled -public tt_feature_required -public ttdt_open -public ttdt_sender_imprint_on -public ttdt_close -public ttdt_session_join -public ttdt_session_quit -public ttdt_message_accept -public ttdt_subcontract_manage -public ttdt_file_join -public ttdt_file_event -public ttdt_file_quit -public ttdt_Get_Modified -public ttdt_Save -public ttdt_Revert -public ttdt_file_notice -public ttdt_file_request -public ttmedia_ptype_declare -public ttmedia_load -public ttmedia_load_reply -public ttmedia_Deposit -public tttk_Xt_input_handler -public tttk_block_while -public tttk_message_create -public tttk_message_destroy -public tttk_message_reject -public tttk_message_fail -public tttk_message_abandon -public tttk_string_op -public tttk_op_string - -/* - * Public symbols added during the thread-safing of libtt - */ -public tt_procid_session -public tt_thread_procid -public tt_thread_procid_set -public tt_thread_session -public tt_thread_session_set - -/* - * Public symbols added for ICE style authorization - */ -public tt_AuthFileName -public tt_FreeAuthFileEntry -public tt_GenerateMagicCookie -public tt_GetAuthFileEntry -public tt_LockAuthFile -public tt_ReadAuthFileEntry -public tt_UnlockAuthFile -public tt_WriteAuthFileEntry - -/******************************************************************** - * Private symbols -- Undocumented APIs that are exported for B.C. - * or because privileged applications may need used them. - ********************************************************************/ - -/* This is commented as a temporary function? */ -private _ttds_file_server - -/* These constants in tttk.h should really be considered public. */ -private Tttk_boolean -private Tttk_file -private Tttk_height -private Tttk_integer -private Tttk_message_id -private Tttk_string -private Tttk_title -private Tttk_width -private Tttk_xoffset -private Tttk_yoffset - -privateC++ _Tt_allocated::operator delete(void*) -privateC++ _Tt_allocated::operator new(size_t) -privateC++ _Tt_arg::_Tt_arg(const _Tt_arg_ptr&) -privateC++ _Tt_arg::_Tt_arg(tt_mode,const char*) -privateC++ _Tt_arg::_Tt_arg(void) -privateC++ _Tt_arg::data_string(_Tt_string&) const -privateC++ _Tt_arg::match_score(const _Tt_arg&,int&) const -privateC++ _Tt_arg::operator==(const _Tt_arg&) const -privateC++ _Tt_arg::~_Tt_arg(void) -privateC++ _Tt_arg_list::_Tt_arg_list(void) -privateC++ _Tt_arg_list_cursor::~_Tt_arg_list_cursor(void) -privateC++ _Tt_arg_list_ptr::_Tt_arg_list_ptr(void) -privateC++ _Tt_arg_list_ptr::xdr(XDR*) -privateC++ _Tt_arg_list_ptr::~_Tt_arg_list_ptr(void) -privateC++ _Tt_arg_ptr::_Tt_arg_ptr(void) -privateC++ _Tt_arg_ptr::~_Tt_arg_ptr(void) -privateC++ _Tt_auth::_Tt_auth(_Tt_auth_level) -privateC++ _Tt_auth::~_Tt_auth(void) -privateC++ _Tt_auth::generate_auth_cookie(void) -privateC++ _Tt_auth::retrieve_auth_cookie(void) -privateC++ _Tt_auth::set_auth_level(_Tt_auth_level) -privateC++ _Tt_auth::set_sessionid(int,_Tt_auth_level,_Tt_string,int) -privateC++ _Tt_basename(const char*,int) -privateC++ _Tt_context::_Tt_context(void) -privateC++ _Tt_context::setName(const char*) -privateC++ _Tt_context_list::_Tt_context_list(void) -privateC++ _Tt_context_list::append_ordered(const _Tt_context_ptr&) -privateC++ _Tt_context_list_cursor::~_Tt_context_list_cursor(void) -privateC++ _Tt_context_list_ptr::_Tt_context_list_ptr(void) -privateC++ _Tt_context_list_ptr::xdr(XDR*) -privateC++ _Tt_context_list_ptr::~_Tt_context_list_ptr(void) -privateC++ _Tt_context_ptr::~_Tt_context_ptr(void) -privateC++ _Tt_db_access::_Tt_db_access(void) -privateC++ _Tt_db_access_ptr::_Tt_db_access_ptr(void) -privateC++ _Tt_db_access_ptr::~_Tt_db_access_ptr(void) -privateC++ _Tt_db_client::_Tt_db_client(void) -privateC++ _Tt_db_client::garbage_collect_in_server(void) -privateC++ _Tt_db_client::~_Tt_db_client(void) -privateC++ _Tt_db_key::_Tt_db_key(const _Tt_string&) -privateC++ _Tt_db_key::_Tt_db_key(short) -privateC++ _Tt_db_key::operator==(const _Tt_db_key&) const -privateC++ _Tt_db_key::string(void) const -privateC++ _Tt_db_key_ptr::_Tt_db_key_ptr(void) -privateC++ _Tt_db_key_ptr::~_Tt_db_key_ptr(void) -privateC++ _Tt_db_object::_Tt_db_object(void) -privateC++ _Tt_db_object::addProperty(const _Tt_db_property_ptr&,int) -privateC++ _Tt_db_object::create(const _Tt_string&,const _Tt_string&) -privateC++ _Tt_db_object::getAccess(void) -privateC++ _Tt_db_object::remove(void) -privateC++ _Tt_db_object::setAccess(const _Tt_db_access_ptr&) -privateC++ _Tt_db_object::setType(const _Tt_string&) -privateC++ _Tt_db_object::write(void) -privateC++ _Tt_db_object_ptr::~_Tt_db_object_ptr(void) -privateC++ _Tt_db_property::_Tt_db_property(void) -privateC++ _Tt_db_property::is_empty(void) const -privateC++ _Tt_db_property_list::_Tt_db_property_list(void) -privateC++ _Tt_db_property_list_cursor::~_Tt_db_property_list_cursor(void) -privateC++ _Tt_db_property_list_ptr::_Tt_db_property_list_ptr(void) -privateC++ _Tt_db_property_list_ptr::~_Tt_db_property_list_ptr(void) -privateC++ _Tt_db_property_ptr::_Tt_db_property_ptr(void) -privateC++ _Tt_db_property_ptr::~_Tt_db_property_ptr(void) -privateC++ _Tt_desktop::_Tt_desktop(void) -privateC++ _Tt_desktop::init(_Tt_string,_Tt_dt_type) -privateC++ _Tt_desktop::notify_fd(void) -privateC++ _Tt_desktop::set_error_handler(int (*)(void*)) -privateC++ _Tt_desktop::set_prop(_Tt_string,_Tt_string&) -privateC++ _Tt_desktop_lock::_Tt_desktop_lock(const _Tt_desktop_ptr&) -privateC++ _Tt_desktop_lock_ptr::_Tt_desktop_lock_ptr(void) -privateC++ _Tt_desktop_lock_ptr::~_Tt_desktop_lock_ptr(void) -privateC++ _Tt_dirname(const char*,int) -privateC++ _Tt_file::networkPath_(_Tt_object_ptr&) -privateC++ _Tt_file_system::_Tt_file_system(void) -privateC++ _Tt_file_system::bestMatchToPath(const _Tt_string&) -privateC++ _Tt_file_system::~_Tt_file_system(void) -privateC++ _Tt_file_system_entry_ptr::~_Tt_file_system_entry_ptr(void) -privateC++ _Tt_global::_Tt_global(void) -privateC++ _Tt_global::drop_mutex(void) -privateC++ _Tt_global::find_host(_Tt_string,_Tt_host_ptr&,int) -privateC++ _Tt_global::get_local_host(_Tt_host_ptr&) -privateC++ _Tt_global::grab_mutex(void) -privateC++ _Tt_global::maxfds(void) -privateC++ _Tt_global::set_xdr_version(int) -privateC++ _Tt_global::xdr_version(void) -privateC++ _Tt_int_rec::_Tt_int_rec(int) -privateC++ _Tt_int_rec_list::_Tt_int_rec_list(void) -privateC++ _Tt_int_rec_list_cursor::~_Tt_int_rec_list_cursor(void) -privateC++ _Tt_int_rec_list_ptr::_Tt_int_rec_list_ptr(void) -privateC++ _Tt_int_rec_list_ptr::~_Tt_int_rec_list_ptr(void) -privateC++ _Tt_int_rec_ptr::~_Tt_int_rec_ptr(void) -privateC++ _Tt_map_entry::getPathAddress(_Tt_object_ptr&) -privateC++ _Tt_message::_Tt_message(void) -privateC++ _Tt_message::add_out_arg(_Tt_arg_ptr&) -privateC++ _Tt_message::add_voter(const _Tt_procid_ptr&,tt_state) -privateC++ _Tt_message::base_constructor(void) -privateC++ _Tt_message::clr_observer_procid(void) -privateC++ _Tt_message::context(const char*) const -privateC++ _Tt_message::is_equal(const _Tt_message_ptr&) -privateC++ _Tt_message::is_start_message(void) const -privateC++ _Tt_message::pattern_id(void) -privateC++ _Tt_message::set_handler_procid(const _Tt_procid_ptr&) -privateC++ _Tt_message::set_handler_ptype(_Tt_string) -privateC++ _Tt_message::set_opnum(int) -privateC++ _Tt_message::set_pattern_id(_Tt_string) -privateC++ _Tt_message::set_start_message(int) -privateC++ _Tt_message::set_state(tt_state) -privateC++ _Tt_message::set_status(int) -privateC++ _Tt_message::unset_handler_procid(void) -privateC++ _Tt_message::update_message(const _Tt_message_ptr&) -privateC++ _Tt_message::xdr(XDR*) -privateC++ _Tt_message::~_Tt_message(void) -privateC++ _Tt_message_list::_Tt_message_list(void) -privateC++ _Tt_message_list::~_Tt_message_list(void) -privateC++ _Tt_message_list_cursor::~_Tt_message_list_cursor(void) -privateC++ _Tt_message_list_ptr::_Tt_message_list_ptr(void) -privateC++ _Tt_message_list_ptr::~_Tt_message_list_ptr(void) -privateC++ _Tt_message_ptr::_Tt_message_ptr(void) -privateC++ _Tt_message_ptr::~_Tt_message_ptr(void) -privateC++ _Tt_mp::_Tt_mp(void) -privateC++ _Tt_mp::find_session(_Tt_string,_Tt_session_ptr&,int,int) -privateC++ _Tt_mp::~_Tt_mp(void) -privateC++ _Tt_msg_context::_Tt_msg_context(void) -privateC++ _Tt_msg_context::enVarName(void) const -privateC++ _Tt_msg_context::isEnvEntry(void) const -privateC++ _Tt_msg_context::stringRep(void) const -privateC++ _Tt_msg_context::~_Tt_msg_context(void) -privateC++ _Tt_msg_context_list_cursor::~_Tt_msg_context_list_cursor(void) -privateC++ _Tt_msg_context_ptr::_Tt_msg_context_ptr(void) -privateC++ _Tt_msg_context_ptr::~_Tt_msg_context_ptr(void) -privateC++ _Tt_msg_trace::_Tt_msg_trace(_Tt_message&,_Tt_dispatch_reason) -privateC++ _Tt_msg_trace::_Tt_msg_trace(_Tt_message&,const _Tt_procid&) -privateC++ _Tt_msg_trace::_Tt_msg_trace(_Tt_message&,tt_state) -privateC++ _Tt_msg_trace::~_Tt_msg_trace(void) -privateC++ _Tt_new_ptr::_Tt_new_ptr(_Tt_object*) -privateC++ _Tt_new_ptr::_Tt_new_ptr(const _Tt_new_ptr&) -privateC++ _Tt_new_ptr::_Tt_new_ptr(void) -privateC++ _Tt_new_ptr::operator=(_Tt_object*) -privateC++ _Tt_new_ptr::operator=(const _Tt_new_ptr&) -privateC++ _Tt_new_ptr::xdr(XDR*,int (*)(XDR*,_Tt_object*),_Tt_object* (*)(void)) -privateC++ _Tt_new_ptr::~_Tt_new_ptr(void) -privateC++ _Tt_object::xdr(XDR*) -privateC++ _Tt_object::~_Tt_object(void) -privateC++ _Tt_object_list::_Tt_object_list(const _Tt_object_list&) -privateC++ _Tt_object_list::_Tt_object_list(void) -privateC++ _Tt_object_list::append(_Tt_object_list_ptr) -privateC++ _Tt_object_list::append(const _Tt_object_ptr&) -privateC++ _Tt_object_list::append_destructive(_Tt_object_list_ptr) -privateC++ _Tt_object_list::bot(void) const -privateC++ _Tt_object_list::flush(void) -privateC++ _Tt_object_list::is_empty(void) const -privateC++ _Tt_object_list::operator[](int) const -privateC++ _Tt_object_list::pop(void) -privateC++ _Tt_object_list::print(void (*)(const _Tt_ostream&,const _Tt_object*),const _Tt_ostream&) const -privateC++ _Tt_object_list::push(const _Tt_object_ptr&) -privateC++ _Tt_object_list::top(void) const -privateC++ _Tt_object_list::xdr(XDR*,int (*)(XDR*,_Tt_object*),_Tt_object* (*)(void)) -privateC++ _Tt_object_list::~_Tt_object_list(void) -privateC++ _Tt_object_list_cursor::_Tt_object_list_cursor(const _Tt_object_list_cursor&) -privateC++ _Tt_object_list_cursor::_Tt_object_list_cursor(const _Tt_object_list_ptr&) -privateC++ _Tt_object_list_cursor::_Tt_object_list_cursor(void) -privateC++ _Tt_object_list_cursor::is_valid(void) const -privateC++ _Tt_object_list_cursor::next(void) -privateC++ _Tt_object_list_cursor::operator*(void) const -privateC++ _Tt_object_list_cursor::prev(void) -privateC++ _Tt_object_list_cursor::remove(void) -privateC++ _Tt_object_list_cursor::reset(const _Tt_object_list_ptr&) -privateC++ _Tt_object_list_cursor::reset(void) -privateC++ _Tt_object_list_cursor::~_Tt_object_list_cursor(void) -privateC++ _Tt_object_list_ptr::_Tt_object_list_ptr(void) -privateC++ _Tt_object_list_ptr::~_Tt_object_list_ptr(void) -privateC++ _Tt_object_ptr::_Tt_object_ptr(void) -privateC++ _Tt_object_ptr::~_Tt_object_ptr(void) -privateC++ _Tt_object_table::_Tt_object_table(int) -privateC++ _Tt_object_table::insert(_Tt_object_ptr&) -privateC++ _Tt_object_table::lookup(const _Tt_string&) const -privateC++ _Tt_object_table::lookup(const _Tt_string&,_Tt_object_ptr&) const -privateC++ _Tt_object_table::print(void (*)(const _Tt_ostream&,const _Tt_object*),const _Tt_ostream&) const -privateC++ _Tt_object_table::remove(const _Tt_string&) -privateC++ _Tt_object_table::xdr(XDR*,int (*)(XDR*,_Tt_object*),_Tt_object* (*)(void)) -privateC++ _Tt_object_table::~_Tt_object_table(void) -privateC++ _Tt_object_table_cursor::_Tt_object_table_cursor(const _Tt_object_table_cursor&) -privateC++ _Tt_object_table_cursor::_Tt_object_table_cursor(const _Tt_object_table_ptr&) -privateC++ _Tt_object_table_cursor::_Tt_object_table_cursor(void) -privateC++ _Tt_object_table_cursor::next(void) -privateC++ _Tt_object_table_cursor::operator*(void) -privateC++ _Tt_object_table_cursor::reset(_Tt_object_table_ptr&) -privateC++ _Tt_object_table_cursor::~_Tt_object_table_cursor(void) -privateC++ _Tt_object_table_ptr::_Tt_object_table_ptr(void) -privateC++ _Tt_object_table_ptr::~_Tt_object_table_ptr(void) -privateC++ _Tt_ostream::operator<<(char) const -privateC++ _Tt_ostream::operator<<(const _Tt_string&) const -privateC++ _Tt_ostream::operator<<(const char*) const -privateC++ _Tt_ostream::operator<<(int) const -privateC++ _Tt_ostream::_Tt_ostream(FILE*) -privateC++ _Tt_ostream::~_Tt_ostream(void) -privateC++ _Tt_pat_context::_Tt_pat_context(const _Tt_context&) -privateC++ _Tt_pat_context::_Tt_pat_context(void) -privateC++ _Tt_pat_context::addValue(const _Tt_msg_context&) -privateC++ _Tt_pat_context::deleteValue(const _Tt_msg_context&) -privateC++ _Tt_pat_context::~_Tt_pat_context(void) -privateC++ _Tt_pat_context_list::append_ordered(const _Tt_pat_context_ptr&) -privateC++ _Tt_pat_context_list_cursor::~_Tt_pat_context_list_cursor(void) -privateC++ _Tt_pat_context_ptr::~_Tt_pat_context_ptr(void) -privateC++ _Tt_patlist::_Tt_patlist(void) -privateC++ _Tt_patlist_ptr::_Tt_patlist_ptr(void) -privateC++ _Tt_patlist_ptr::~_Tt_patlist_ptr(void) -privateC++ _Tt_patlist_table_ptr::_Tt_patlist_table_ptr(void) -privateC++ _Tt_patlist_table_ptr::~_Tt_patlist_table_ptr(void) -privateC++ _Tt_pattern::_Tt_pattern(void) -privateC++ _Tt_pattern::add_field(const _Tt_string&,_Tt_string_list_ptr&) -privateC++ _Tt_pattern::add_field(int,_Tt_int_rec_list_ptr&) -privateC++ _Tt_pattern::add_netfile(const _Tt_string&,int) -privateC++ _Tt_pattern::del_file(const _Tt_string&) -privateC++ _Tt_pattern::del_session(const _Tt_string&) -privateC++ _Tt_pattern::join_files(const _Tt_string&) const -privateC++ _Tt_pattern::set_id(const _Tt_string&) -privateC++ _Tt_pattern::xdr(XDR*) -privateC++ _Tt_pattern::~_Tt_pattern(void) -privateC++ _Tt_pattern_list::_Tt_pattern_list(void) -privateC++ _Tt_pattern_list_cursor::~_Tt_pattern_list_cursor(void) -privateC++ _Tt_pattern_list_ptr::_Tt_pattern_list_ptr(void) -privateC++ _Tt_pattern_list_ptr::~_Tt_pattern_list_ptr(void) -privateC++ _Tt_pattern_ptr::_Tt_pattern_ptr(void) -privateC++ _Tt_pattern_ptr::~_Tt_pattern_ptr(void) -privateC++ _Tt_pid_t_rec_list_ptr::_Tt_pid_t_rec_list_ptr(void) -privateC++ _Tt_pid_t_rec_list_ptr::~_Tt_pid_t_rec_list_ptr(void) -privateC++ _Tt_procid::_Tt_procid(void) -privateC++ _Tt_procid::add_joined_file(_Tt_string) -privateC++ _Tt_procid::del_joined_file(_Tt_string) -privateC++ _Tt_procid::id(void) const -privateC++ _Tt_procid::joined_to_file(_Tt_string) -privateC++ _Tt_procid::processing(const _Tt_message&) -privateC++ _Tt_procid::xdr(XDR*) -privateC++ _Tt_procid::~_Tt_procid(void) -privateC++ _Tt_procid_list::_Tt_procid_list(void) -privateC++ _Tt_procid_list::~_Tt_procid_list(void) -privateC++ _Tt_procid_list_cursor::~_Tt_procid_list_cursor(void) -privateC++ _Tt_procid_list_ptr::_Tt_procid_list_ptr(void) -privateC++ _Tt_procid_list_ptr::~_Tt_procid_list_ptr(void) -privateC++ _Tt_procid_ptr::_Tt_procid_ptr(void) -privateC++ _Tt_procid_ptr::~_Tt_procid_ptr(void) -privateC++ _Tt_qmsg_info::_Tt_qmsg_info(void) -privateC++ _Tt_qmsg_info_ptr::_Tt_qmsg_info_ptr(void) -privateC++ _Tt_qmsg_info_ptr::~_Tt_qmsg_info_ptr(void) -privateC++ _Tt_session::_Tt_session(void) -privateC++ _Tt_session::address_string(void) -privateC++ _Tt_session::call(int,xdrproc_t,char*,xdrproc_t,char*,int,int) -privateC++ _Tt_session::client_session_init(void) -privateC++ _Tt_session::desktop_event_callback(void) -privateC++ _Tt_session::displayname(void) -privateC++ _Tt_session::env(void) -privateC++ _Tt_session::find_advertised_address(_Tt_string&) -privateC++ _Tt_session::has_id(const _Tt_string&) -privateC++ _Tt_session::has_id(const _Tt_string_list_ptr) -privateC++ _Tt_session::parsed_address(_Tt_string&) -privateC++ _Tt_session::ping(void) -privateC++ _Tt_session::process_tree_id(void) -privateC++ _Tt_session::set_env(_Tt_env,_Tt_string) -privateC++ _Tt_session::set_id(char*) -privateC++ _Tt_session::xdr(XDR*) -privateC++ _Tt_session::~_Tt_session(void) -privateC++ _Tt_session_prop::_Tt_session_prop(_Tt_string,_Tt_string) -privateC++ _Tt_session_prop_list::_Tt_session_prop_list(void) -privateC++ _Tt_session_prop_list_cursor::~_Tt_session_prop_list_cursor(void) -privateC++ _Tt_session_prop_ptr::~_Tt_session_prop_ptr(void) -privateC++ _Tt_session_ptr::_Tt_session_ptr(void) -privateC++ _Tt_session_ptr::~_Tt_session_ptr(void) -privateC++ _Tt_stream_socket::_Tt_stream_socket(_Tt_host_ptr&,int) -privateC++ _Tt_stream_socket::fd(void) -privateC++ _Tt_stream_socket::init(int) -privateC++ _Tt_stream_socket::send(char*,int) -privateC++ _Tt_string::_Tt_string(const _Tt_string&) -privateC++ _Tt_string::_Tt_string(const char*) -privateC++ _Tt_string::_Tt_string(const unsigned char*,int) -privateC++ _Tt_string::_Tt_string(int) -privateC++ _Tt_string::_Tt_string(void) -privateC++ _Tt_string::cat(const _Tt_string&) const -privateC++ _Tt_string::cmp(const char*,int) const -privateC++ _Tt_string::index(char) const -privateC++ _Tt_string::left(int) const -privateC++ _Tt_string::operator char*(void) const -privateC++ _Tt_string::operator const char*(void) const -privateC++ _Tt_string::operator=(const char*) -privateC++ _Tt_string::operator[](int) -privateC++ _Tt_string::operator[](int) const -privateC++ _Tt_string::print(const _Tt_ostream&,int,int) const -privateC++ _Tt_string::right(int) const -privateC++ _Tt_string::rindex(char) const -privateC++ _Tt_string::rsplit(char,_Tt_string&) const -privateC++ _Tt_string::set(const unsigned char*,int) -privateC++ _Tt_string::sh_match(const _Tt_string&) const -privateC++ _Tt_string::split(char,_Tt_string&) const -privateC++ _Tt_string::strchr(char) const -privateC++ _Tt_string::strrchr(char) const -privateC++ _Tt_string::xdr(XDR*) -privateC++ _Tt_string::~_Tt_string(void) -privateC++ _Tt_string_buf::print(const _Tt_ostream&,int,int) const -privateC++ _Tt_string_buf_list_ptr::xdr(XDR*) -privateC++ _Tt_string_buf_list_ptr::~_Tt_string_buf_list_ptr(void) -privateC++ _Tt_string_list::_Tt_string_list(void) -privateC++ _Tt_string_list::~_Tt_string_list(void) -privateC++ _Tt_string_list_cursor::_Tt_string_list_cursor(const _Tt_string_list_ptr&) -privateC++ _Tt_string_list_cursor::_Tt_string_list_cursor(void) -privateC++ _Tt_string_list_cursor::operator*(void) const -privateC++ _Tt_string_list_cursor::operator->(void) const -privateC++ _Tt_string_list_cursor::~_Tt_string_list_cursor(void) -privateC++ _Tt_string_list_ptr::_Tt_string_list_ptr(void) -privateC++ _Tt_string_list_ptr::operator=(_Tt_string_list*) -privateC++ _Tt_string_list_ptr::operator=(const _Tt_string_list_ptr&) -privateC++ _Tt_string_list_ptr::~_Tt_string_list_ptr(void) -privateC++ _Tt_string_map::_Tt_string_map(_Tt_string (*)(_Tt_object_ptr&)) -privateC++ _Tt_string_map::findEntry(const _Tt_string&) -privateC++ _Tt_string_map::loadFile(const _Tt_string&) -privateC++ _Tt_string_map_ptr::_Tt_string_map_ptr(void) -privateC++ _Tt_string_map_ptr::~_Tt_string_map_ptr(void) -privateC++ _tt_syslog(FILE*,int,const char* ...) -privateC++ _Tt_trace::decr_indent(void) const -privateC++ _Tt_trace::incr_indent(void) const -privateC++ _Tt_trace::operator<<(const _Tt_pattern&) const -privateC++ _Tt_trace::operator<<(const _Tt_string&) const -privateC++ _Tt_trace::operator<<(const char*) const -privateC++ _Tt_trace::operator<<(int) const -privateC++ _Tt_trace::print(void (*)(const _Tt_ostream&,const _Tt_object*),const _Tt_object*) const -privateC++ _Tt_xdr_size_stream::_Tt_xdr_size_stream(void) -privateC++ _Tt_xdr_size_stream::operator XDR*(void) -privateC++ _tt_base64_encode(unsigned long) -privateC++ _tt_catgets(int,int,const char*) -privateC++ _tt_db_create_objid(const _Tt_db_key_ptr&,const _Tt_string&,const _Tt_string&,const _Tt_string&) -privateC++ _tt_dir_entries(const _Tt_string&,int) -privateC++ _tt_entrypt_to_string(_Tt_entry_pt) -privateC++ _tt_enumname(tt_category) -privateC++ _tt_enumname(tt_class) -privateC++ _tt_enumname(tt_feature) -privateC++ _tt_enumname(tt_mode) -privateC++ _tt_enumname(tt_scope) -privateC++ _tt_enumname(tt_status) -privateC++ _tt_errno_status(int) -privateC++ _tt_file_netfile(const char*) -privateC++ _tt_free_rpc_messages(const _tt_message_list&) -privateC++ _tt_free_rpc_properties(const _tt_property_list&) -privateC++ _tt_free_rpc_property(const _tt_property&) -privateC++ _tt_free_rpc_strings(const _tt_string_list&) -privateC++ _tt_get_realpath(char*,char*) -privateC++ _tt_get_rpc_access(const _tt_access&,_Tt_db_access_ptr&) -privateC++ _tt_get_rpc_properties(const _tt_property_list&,_Tt_db_property_list_ptr&) -privateC++ _tt_get_rpc_property(const _tt_property&,_Tt_db_property_ptr&) -privateC++ _tt_get_rpc_strings(const _tt_string_list&,_Tt_string_list_ptr&) -privateC++ _tt_getdtablesize(void) -privateC++ _tt_gethostname(void) -privateC++ _tt_global -privateC++ _tt_is_network_path(const _Tt_string&) -privateC++ _tt_isdir(const _Tt_string&) -privateC++ _tt_lib_version -privateC++ _tt_mp -privateC++ _tt_netfile_file(const char*) -privateC++ _tt_network_path_to_local_path(const _Tt_string&) -privateC++ _tt_openlog(const char*,int,int) -privateC++ _tt_patlist_op(_Tt_object_ptr&) -privateC++ _tt_pointer_error(void*) -privateC++ _tt_procid_id(_Tt_object_ptr&) -privateC++ _tt_put_all_env_var(int,const char* ...) -privateC++ _tt_putenv(const char*,const char*) -privateC++ _tt_realpath(const _Tt_string&) -privateC++ _tt_restoredtablesize(void) -privateC++ _tt_set_rpc_access(const _Tt_db_access_ptr&,_tt_access&) -privateC++ _tt_set_rpc_properties(const _Tt_db_property_list_ptr&,_tt_property_list&) -privateC++ _tt_set_rpc_property(const _Tt_db_property_ptr&,_tt_property&) -privateC++ _tt_set_rpc_strings(const _Tt_string_list_ptr&,_tt_string_list&) -privateC++ _tt_sigset(int,void (*)(int)) -privateC++ _tt_strdup(const _Tt_string&) -privateC++ _tt_string_print(const _Tt_ostream&,const _Tt_object*) -privateC++ _tt_svc_getargs -privateC++ _tt_user_path(_Tt_string,_Tt_string,int) -privateC++ _tt_zoomdtablesize(void) -privateC++ tt_xdr_auth_iceauth_args(XDR*,_Tt_auth_iceauth_args*) -privateC++ tt_xdr_context_join_args(XDR*,_Tt_context_join_args*) -privateC++ tt_xdr_declare_ptype_args(XDR*,_Tt_declare_ptype_args*) -privateC++ tt_xdr_dispatch_reply_args(XDR*,_Tt_dispatch_reply_args*) -privateC++ tt_xdr_fd_args(XDR*,_Tt_fd_args*) -privateC++ tt_xdr_file_join_args(XDR*,_Tt_file_join_args*) -privateC++ tt_xdr_load_types_args(XDR*,_Tt_load_types_args*) -privateC++ tt_xdr_message(XDR*,_Tt_message_ptr*) -privateC++ tt_xdr_next_message_args(XDR*,_Tt_next_message_args*) -privateC++ tt_xdr_otype_args(XDR*,_Tt_otype_args*) -privateC++ tt_xdr_procid(XDR*,_Tt_procid_ptr*) -privateC++ tt_xdr_prop_args(XDR*,_Tt_prop_args*) -privateC++ tt_xdr_rpc_result(XDR*,_Tt_rpc_result*) -privateC++ tt_xdr_string(XDR*,_Tt_string*) -privateC++ tt_xdr_update_args(XDR*,_Tt_update_args*) -privateC++ xdr_Tt_isaddindex_args(XDR*,_Tt_isaddindex_args*) -privateC++ xdr_Tt_isam_results(XDR*,_Tt_isam_results*) -privateC++ xdr_Tt_isbuild_args(XDR*,_Tt_isbuild_args*) -privateC++ xdr_Tt_iscntl_args(XDR*,_Tt_iscntl_args*) -privateC++ xdr_Tt_iscntl_results(XDR*,_Tt_iscntl_results*) -privateC++ xdr_Tt_isdelrec_args(XDR*,_Tt_isdelrec_args*) -privateC++ xdr_Tt_isopen_args(XDR*,_Tt_isopen_args*) -privateC++ xdr_Tt_isread_args(XDR*,_Tt_isread_args*) -privateC++ xdr_Tt_isread_results(XDR*,_Tt_isread_results*) -privateC++ xdr_Tt_isrewrec_args(XDR*,_Tt_isrewrec_args*) -privateC++ xdr_Tt_isstart_args(XDR*,_Tt_isstart_args*) -privateC++ xdr_Tt_iswrite_args(XDR*,_Tt_iswrite_args*) -privateC++ xdr_Tt_oidaccess_args(XDR*,_Tt_oidaccess_args*) -privateC++ xdr_Tt_oidaccess_results(XDR*,_Tt_oidaccess_results*) -privateC++ xdr_Tt_session_args(XDR*,_Tt_session_args*) -privateC++ xdr_Tt_spec_props(XDR*,_Tt_spec_props*) -privateC++ xdr_Tt_test_and_set_args(XDR*,_Tt_test_and_set_args*) -privateC++ xdr_Tt_test_and_set_results(XDR*,_Tt_test_and_set_results*) -privateC++ xdr_Tt_transaction_args(XDR*,_Tt_transaction_args*) -privateC++ xdr_tt_add_file_prop_args(XDR*,_tt_add_file_prop_args*) -privateC++ xdr_tt_add_obj_prop_args(XDR*,_tt_add_obj_prop_args*) -privateC++ xdr_tt_auth_level_results(XDR*,_tt_auth_level_results*) -privateC++ xdr_tt_create_file_args(XDR*,_tt_create_file_args*) -privateC++ xdr_tt_create_obj_args(XDR*,_tt_create_obj_args*) -privateC++ xdr_tt_db_cache_results(XDR*,_tt_db_cache_results*) -privateC++ xdr_tt_db_results(XDR*,_Tt_db_results*) -privateC++ xdr_tt_del_file_prop_args(XDR*,_tt_del_file_prop_args*) -privateC++ xdr_tt_del_obj_prop_args(XDR*,_tt_del_obj_prop_args*) -privateC++ xdr_tt_delete_session_args(XDR*,_tt_delete_session_args*) -privateC++ xdr_tt_delete_session_results(XDR*,_tt_delete_session_results*) -privateC++ xdr_tt_dequeue_msgs_args(XDR*,_tt_dequeue_msgs_args*) -privateC++ xdr_tt_dequeue_msgs_results(XDR*,_tt_dequeue_msgs_results*) -privateC++ xdr_tt_file_access_results(XDR*,_tt_file_access_results*) -privateC++ xdr_tt_file_netfile_args(XDR*,_tt_file_netfile_args*) -privateC++ xdr_tt_file_netfile_results(XDR*,_tt_file_netfile_results*) -privateC++ xdr_tt_file_objs_results(XDR*,_tt_file_objs_results*) -privateC++ xdr_tt_file_partition_results(XDR*,_tt_file_partition_results*) -privateC++ xdr_tt_file_prop_results(XDR*,_tt_file_prop_results*) -privateC++ xdr_tt_file_props_results(XDR*,_tt_file_props_results*) -privateC++ xdr_tt_garbage_collect_results(XDR*,_tt_garbage_collect_results*) -privateC++ xdr_tt_get_all_sessions_args(XDR*,_tt_get_all_sessions_args*) -privateC++ xdr_tt_get_all_sessions_results(XDR*,_tt_get_all_sessions_results*) -privateC++ xdr_tt_get_file_access_args(XDR*,_tt_get_file_access_args*) -privateC++ xdr_tt_get_file_objs_args(XDR*,_tt_get_file_objs_args*) -privateC++ xdr_tt_get_file_prop_args(XDR*,_tt_get_file_prop_args*) -privateC++ xdr_tt_get_file_props_args(XDR*,_tt_get_file_props_args*) -privateC++ xdr_tt_get_obj_access_args(XDR*,_tt_get_obj_access_args*) -privateC++ xdr_tt_get_obj_file_args(XDR*,_tt_get_obj_file_args*) -privateC++ xdr_tt_get_obj_prop_args(XDR*,_tt_get_obj_prop_args*) -privateC++ xdr_tt_get_obj_props_args(XDR*,_tt_get_obj_props_args*) -privateC++ xdr_tt_is_file_in_db_args(XDR*,_tt_is_file_in_db_args*) -privateC++ xdr_tt_is_file_in_db_results(XDR*,_tt_is_file_in_db_results*) -privateC++ xdr_tt_is_obj_in_db_args(XDR*,_tt_is_obj_in_db_args*) -privateC++ xdr_tt_is_obj_in_db_results(XDR*,_tt_is_obj_in_db_results*) -privateC++ xdr_tt_move_file_args(XDR*,_tt_move_file_args*) -privateC++ xdr_tt_obj_access_results(XDR*,_tt_obj_access_results*) -privateC++ xdr_tt_obj_file_results(XDR*,_tt_obj_file_results*) -privateC++ xdr_tt_obj_prop_results(XDR*,_tt_obj_prop_results*) -privateC++ xdr_tt_obj_props_results(XDR*,_tt_obj_props_results*) -privateC++ xdr_tt_obj_type_results(XDR*,_tt_obj_type_results*) -privateC++ xdr_tt_queue_msg_args(XDR*,_tt_queue_msg_args*) -privateC++ xdr_tt_remove_file_args(XDR*,_tt_remove_file_args*) -privateC++ xdr_tt_remove_obj_args(XDR*,_tt_remove_obj_args*) -privateC++ xdr_tt_set_file_access_args(XDR*,_tt_set_file_access_args*) -privateC++ xdr_tt_set_file_prop_args(XDR*,_tt_set_file_prop_args*) -privateC++ xdr_tt_set_file_props_args(XDR*,_tt_set_file_props_args*) -privateC++ xdr_tt_set_obj_access_args(XDR*,_tt_set_obj_access_args*) -privateC++ xdr_tt_set_obj_file_args(XDR*,_tt_set_obj_file_args*) -privateC++ xdr_tt_set_obj_prop_args(XDR*,_tt_set_obj_prop_args*) -privateC++ xdr_tt_set_obj_props_args(XDR*,_tt_set_obj_props_args*) -privateC++ xdr_tt_set_obj_type_args(XDR*,_tt_set_obj_type_args*) - -/* These next four are only used when building non-threaded dbserver */ -privateC++ _Tt_db_client_ptr::_Tt_db_client_ptr(void) -privateC++ _Tt_db_client_ptr::~_Tt_db_client_ptr(void) -privateC++ _Tt_db_client::delete_session(_Tt_string) -privateC++ _Tt_db_client::get_all_sessions(void) - -#ifdef _AIX -/* AIX c++filt does not demangle these symbols. */ -privateC++ __vft10_Tt_object -privateC++ __vft12_Tt_arg_list10_Tt_object -privateC++ __vft14_Tt_file_table10_Tt_object -privateC++ __vft16_Tt_pattern_list10_Tt_object -privateC++ __vft17_Tt_patlist_table10_Tt_object -privateC++ __vft16_Tt_context_list10_Tt_object -privateC++ __vft16_Tt_message_list10_Tt_object -privateC++ __vft15_Tt_procid_list10_Tt_object -#else -privateC++ _Tt_object::__vtbl -privateC++ _Tt_arg_list::__vtbl -privateC++ _Tt_file_table::__vtbl -privateC++ _Tt_pattern_list::__vtbl -privateC++ _Tt_patlist_table::__vtbl -privateC++ _Tt_context_list::__vtbl -privateC++ _Tt_message_list::__vtbl -privateC++ _Tt_procid_list::__vtbl -#endif - -#ifdef OPT_BUG_SUNOS_5 -/* This symbol was accidentally exported in libtt.so.1, so preserve */ -/* it for backward compatibility. */ -private iserrno -#endif - -/* - * This symbol (like all C++ symbols) really should be internal, but - * some of the tt clients used it in CDE 1.0. - */ -privateC++ _Tt_string_buf_ptr::~_Tt_string_buf_ptr(void) - - - -/******************************************************************** - * Internal symbols -- not to be used outside the library. - ********************************************************************/ - -internal TtDtOps -internal _TttkKeys -internal _tt_api_status_page -#ifdef OPT_TLI -internal _tt_bind_endpoint -#endif -internal _tt_c_mp -internal _tt_htab -internal _tt_string_list_decode -internal _tt_string_list_encode -internal _tt_svc_freeargs -#ifdef OPT_TLI -internal _tt_tli_set_nodelay -#endif -#ifdef OPT_DLOPEN_X11 -internal _tt_xlib -internal _tt_xt -#endif -internal _ttdnd_receive -internal _ttdtme -internal ttdnd_init -internal ttdnd_negotiate_types -internal ttdnd_start_transfer - -#ifdef OPT_XTHREADS -/* Conditionally compiled routines in api/c/api_default.C. */ -internalC++ _tt_feature_enabled(tt_feature) -internalC++ _tt_feature_required(tt_feature) -internalC++ _tt_thread_procid(void) -internalC++ _tt_thread_procid_set(const char*) -internalC++ _tt_thread_session(void) -internalC++ _tt_thread_session_set(const char*) -#endif - -internalC++ _TtDtProcid::_TtDtProcid(const char*,const char*,const char*) -internalC++ _TtDtProcid::pats_create(_Tt_message_handle*,_Tt_message_handle* (*)(_Tt_message_handle*,void*,_Tt_message_handle*),_WidgetRec*,void*) const -internalC++ _TtDtProcid::~_TtDtProcid(void) -internalC++ _Tt_api_callback::_Tt_api_callback(void) -internalC++ _Tt_api_callback::print(FILE*) const -internalC++ _Tt_api_callback::~_Tt_api_callback(void) -internalC++ _Tt_api_callback_list::_Tt_api_callback_list(void) -internalC++ _Tt_api_callback_list::xdr(XDR*) -internalC++ _Tt_api_callback_list::~_Tt_api_callback_list(void) -internalC++ _Tt_api_callback_list_cursor::~_Tt_api_callback_list_cursor(void) -internalC++ _Tt_api_callback_list_maker(void) -internalC++ _Tt_api_callback_list_ptr::_Tt_api_callback_list_ptr(void) -internalC++ _Tt_api_callback_list_ptr::xdr(XDR*) -internalC++ _Tt_api_callback_list_ptr::~_Tt_api_callback_list_ptr(void) -internalC++ _Tt_api_callback_list_xdr(XDR*,_Tt_object*) -internalC++ _Tt_api_callback_maker(void) -internalC++ _Tt_api_callback_ptr::_Tt_api_callback_ptr(void) -internalC++ _Tt_api_callback_ptr::xdr(XDR*) -internalC++ _Tt_api_callback_ptr::~_Tt_api_callback_ptr(void) -internalC++ _Tt_api_callback_xdr(XDR*,_Tt_object*) -internalC++ _Tt_api_filename_map::canonical_path_val(void) -internalC++ _Tt_api_filename_map::hostname_val(void) -internalC++ _Tt_api_filename_map::lpath_val(void) -internalC++ _Tt_api_filename_map::parse_netfilename(const _Tt_string&) -internalC++ _Tt_api_filename_map::rpath_val(void) -internalC++ _Tt_api_filename_map::set_filename(const _Tt_string&) -internalC++ _Tt_api_filename_map_maker(void) -internalC++ _Tt_api_filename_map_ptr::_Tt_api_filename_map_ptr(void) -internalC++ _Tt_api_filename_map_ptr::xdr(XDR*) -internalC++ _Tt_api_filename_map_ptr::~_Tt_api_filename_map_ptr(void) -internalC++ _Tt_api_filename_map_xdr(XDR*,_Tt_object*) -internalC++ _Tt_api_handle::_Tt_api_handle(void) -internalC++ _Tt_api_handle::add_callback(tt_callback_action (*)(_Tt_message_handle*,_Tt_pattern_handle*)) -internalC++ _Tt_api_handle::fetch(int) -internalC++ _Tt_api_handle::mptr(void) -internalC++ _Tt_api_handle::pptr(void) -internalC++ _Tt_api_handle::print(FILE*) const -internalC++ _Tt_api_handle::ptr_set(_Tt_c_message_ptr) -internalC++ _Tt_api_handle::ptr_set(_Tt_pattern_ptr) -internalC++ _Tt_api_handle::run_callbacks(_Tt_message_handle*,_Tt_pattern_handle*) -internalC++ _Tt_api_handle::store(int,void*) -internalC++ _Tt_api_handle::~_Tt_api_handle(void) -internalC++ _Tt_api_handle_list::_Tt_api_handle_list(void) -internalC++ _Tt_api_handle_list::xdr(XDR*) -internalC++ _Tt_api_handle_list::~_Tt_api_handle_list(void) -internalC++ _Tt_api_handle_list_cursor::~_Tt_api_handle_list_cursor(void) -internalC++ _Tt_api_handle_list_maker(void) -internalC++ _Tt_api_handle_list_ptr::_Tt_api_handle_list_ptr(void) -internalC++ _Tt_api_handle_list_ptr::xdr(XDR*) -internalC++ _Tt_api_handle_list_ptr::~_Tt_api_handle_list_ptr(void) -internalC++ _Tt_api_handle_list_xdr(XDR*,_Tt_object*) -internalC++ _Tt_api_handle_maker(void) -internalC++ _Tt_api_handle_ptr::_Tt_api_handle_ptr(void) -internalC++ _Tt_api_handle_ptr::xdr(XDR*) -internalC++ _Tt_api_handle_ptr::~_Tt_api_handle_ptr(void) -internalC++ _Tt_api_handle_table::_Tt_api_handle_table(void) -internalC++ _Tt_api_handle_table::add_callback(_Tt_message_handle*,tt_callback_action (*)(_Tt_message_handle*,_Tt_pattern_handle*)) -internalC++ _Tt_api_handle_table::add_callback(_Tt_pattern_handle*,tt_callback_action (*)(_Tt_message_handle*,_Tt_pattern_handle*)) -internalC++ _Tt_api_handle_table::clear(_Tt_c_message_ptr) -internalC++ _Tt_api_handle_table::clear(_Tt_message_handle*) -internalC++ _Tt_api_handle_table::clear(_Tt_pattern_handle*) -internalC++ _Tt_api_handle_table::clear(_Tt_pattern_ptr) -internalC++ _Tt_api_handle_table::fetch(_Tt_message_handle*,int) -internalC++ _Tt_api_handle_table::fetch(_Tt_pattern_handle*,int) -internalC++ _Tt_api_handle_table::lookup_mhandle(_Tt_c_message_ptr) -internalC++ _Tt_api_handle_table::lookup_msg(_Tt_message_handle*) -internalC++ _Tt_api_handle_table::lookup_pat(_Tt_pattern_handle*) -internalC++ _Tt_api_handle_table::lookup_pat_by_id(_Tt_string,_Tt_pattern_handle*&) -internalC++ _Tt_api_handle_table::lookup_phandle(_Tt_pattern_ptr) -internalC++ _Tt_api_handle_table::run_message_callbacks(_Tt_message_handle*,_Tt_pattern_handle*) -internalC++ _Tt_api_handle_table::run_pattern_callbacks(_Tt_pattern_handle*,_Tt_message_handle*) -internalC++ _Tt_api_handle_table::store(_Tt_message_handle*,int,void*) -internalC++ _Tt_api_handle_table::store(_Tt_pattern_handle*,int,void*) -internalC++ _Tt_api_handle_table::~_Tt_api_handle_table(void) -internalC++ _Tt_api_handle_xdr(XDR*,_Tt_object*) -internalC++ _Tt_api_spec_map_ref::_Tt_api_spec_map_ref(void) -internalC++ _Tt_api_spec_map_ref::addSpec(_Tt_objid_spec_ptr) -internalC++ _Tt_api_spec_map_ref::apiSpecKey(_Tt_object_ptr&) -internalC++ _Tt_api_spec_map_ref::apiSpecMapP -internalC++ _Tt_api_spec_map_ref::deleteSpec(_Tt_string) -internalC++ _Tt_api_spec_map_ref::flush(void) -internalC++ _Tt_api_spec_map_ref::getSpec(_Tt_string) -internalC++ _Tt_api_spec_map_ref::~_Tt_api_spec_map_ref(void) -internalC++ _Tt_api_stg_stack::_Tt_api_stg_stack(void) -internalC++ _Tt_api_stg_stack::free(char*) -internalC++ _Tt_api_stg_stack::malloc(size_t) -internalC++ _Tt_api_stg_stack::mark(void) -internalC++ _Tt_api_stg_stack::release(int) -internalC++ _Tt_api_stg_stack::take(char*) -internalC++ _Tt_api_stg_stack::~_Tt_api_stg_stack(void) -internalC++ _Tt_api_stg_stack_elm::print(FILE*) const -internalC++ _Tt_api_stg_stack_elm::~_Tt_api_stg_stack_elm(void) -internalC++ _Tt_api_stg_stack_elm_list::_Tt_api_stg_stack_elm_list(void) -internalC++ _Tt_api_stg_stack_elm_list::xdr(XDR*) -internalC++ _Tt_api_stg_stack_elm_list::~_Tt_api_stg_stack_elm_list(void) -internalC++ _Tt_api_stg_stack_elm_list_cursor::~_Tt_api_stg_stack_elm_list_cursor(void) -internalC++ _Tt_api_stg_stack_elm_list_maker(void) -internalC++ _Tt_api_stg_stack_elm_list_ptr::_Tt_api_stg_stack_elm_list_ptr(void) -internalC++ _Tt_api_stg_stack_elm_list_ptr::xdr(XDR*) -internalC++ _Tt_api_stg_stack_elm_list_ptr::~_Tt_api_stg_stack_elm_list_ptr(void) -internalC++ _Tt_api_stg_stack_elm_list_xdr(XDR*,_Tt_object*) -internalC++ _Tt_api_stg_stack_elm_maker(void) -internalC++ _Tt_api_stg_stack_elm_ptr::_Tt_api_stg_stack_elm_ptr(void) -internalC++ _Tt_api_stg_stack_elm_ptr::xdr(XDR*) -internalC++ _Tt_api_stg_stack_elm_ptr::~_Tt_api_stg_stack_elm_ptr(void) -internalC++ _Tt_api_stg_stack_elm_xdr(XDR*,_Tt_object*) -internalC++ _Tt_api_stg_stack_maker(void) -internalC++ _Tt_api_stg_stack_ptr::_Tt_api_stg_stack_ptr(void) -internalC++ _Tt_api_stg_stack_ptr::xdr(XDR*) -internalC++ _Tt_api_stg_stack_ptr::~_Tt_api_stg_stack_ptr(void) -internalC++ _Tt_api_stg_stack_xdr(XDR*,_Tt_object*) -internalC++ _Tt_api_userdata::_Tt_api_userdata(void) -internalC++ _Tt_api_userdata::print(FILE*) const -internalC++ _Tt_api_userdata::~_Tt_api_userdata(void) -internalC++ _Tt_api_userdata_list::_Tt_api_userdata_list(void) -internalC++ _Tt_api_userdata_list::xdr(XDR*) -internalC++ _Tt_api_userdata_list::~_Tt_api_userdata_list(void) -internalC++ _Tt_api_userdata_list_cursor::~_Tt_api_userdata_list_cursor(void) -internalC++ _Tt_api_userdata_list_maker(void) -internalC++ _Tt_api_userdata_list_ptr::_Tt_api_userdata_list_ptr(void) -internalC++ _Tt_api_userdata_list_ptr::xdr(XDR*) -internalC++ _Tt_api_userdata_list_ptr::~_Tt_api_userdata_list_ptr(void) -internalC++ _Tt_api_userdata_list_xdr(XDR*,_Tt_object*) -internalC++ _Tt_api_userdata_maker(void) -internalC++ _Tt_api_userdata_ptr::_Tt_api_userdata_ptr(void) -internalC++ _Tt_api_userdata_ptr::xdr(XDR*) -internalC++ _Tt_api_userdata_ptr::~_Tt_api_userdata_ptr(void) -internalC++ _Tt_api_userdata_xdr(XDR*,_Tt_object*) -internalC++ _Tt_arg::_Tt_arg(const _Tt_arg&) -internalC++ _Tt_arg::_Tt_arg(const _Tt_string&) -internalC++ _Tt_arg::_Tt_arg(const char*) -internalC++ _Tt_arg::_Tt_arg(tt_mode,_Tt_string&) -internalC++ _Tt_arg::constructor_common(void) -internalC++ _Tt_arg::data_int(int&) const -internalC++ _Tt_arg::print(const _Tt_ostream&) const -internalC++ _Tt_arg::set_data_int(int) -internalC++ _Tt_arg::set_data_string(const _Tt_string&) -internalC++ _Tt_arg::update_value(const _Tt_arg&) -internalC++ _Tt_arg::xdr(XDR*) -internalC++ _Tt_arg_list::xdr(XDR*) -internalC++ _Tt_arg_list::~_Tt_arg_list(void) -internalC++ _Tt_arg_list_maker(void) -internalC++ _Tt_arg_list_xdr(XDR*,_Tt_object*) -internalC++ _Tt_arg_maker(void) -internalC++ _Tt_arg_ptr::xdr(XDR*) -internalC++ _Tt_arg_xdr(XDR*,_Tt_object*) -internalC++ _Tt_auth::read_auth_file(char*) -internalC++ _Tt_auth::write_auth_file(char*) -internalC++ _Tt_auth::modify_auth_entry(_tt_AuthFileEntry*,_tt_AuthFileEntryList**) -internalC++ _Tt_auth::read_auth_entries(FILE*,_tt_AuthFileEntryList**) -internalC++ _Tt_audit::entry(char*,_Tt_entry_pt ...) -internalC++ _Tt_c_file::_Tt_c_file(_Tt_string) -internalC++ _Tt_c_file::_Tt_c_file(void) -internalC++ _Tt_c_file::c_join(_Tt_procid_ptr&) -internalC++ _Tt_c_file::c_quit(_Tt_procid_ptr&) -internalC++ _Tt_c_file::process_message_queue(int) -internalC++ _Tt_c_file::~_Tt_c_file(void) -internalC++ _Tt_c_file_maker(void) -internalC++ _Tt_c_file_ptr::_Tt_c_file_ptr(void) -internalC++ _Tt_c_file_ptr::xdr(XDR*) -internalC++ _Tt_c_file_ptr::~_Tt_c_file_ptr(void) -internalC++ _Tt_c_file_xdr(XDR*,_Tt_object*) -internalC++ _Tt_c_message::_Tt_c_message(void) -internalC++ _Tt_c_message::_rpc_dispatch(void) const -internalC++ _Tt_c_message::_rpc_dispatch_2(void) const -internalC++ _Tt_c_message::dispatch(int) -internalC++ _Tt_c_message::dispatch_file_scope_notification(_Tt_file_ptr&) -internalC++ _Tt_c_message::dispatch_on_exit(void) -internalC++ _Tt_c_message::is_a_diff(void) -internalC++ _Tt_c_message::resolve(void) -internalC++ _Tt_c_message::set_return_handler_flags(void) -internalC++ _Tt_c_message::~_Tt_c_message(void) -internalC++ _Tt_c_message_maker(void) -internalC++ _Tt_c_message_ptr::_Tt_c_message_ptr(void) -internalC++ _Tt_c_message_ptr::xdr(XDR*) -internalC++ _Tt_c_message_ptr::~_Tt_c_message_ptr(void) -internalC++ _Tt_c_message_xdr(XDR*,_Tt_object*) -internalC++ _Tt_c_mp::_Tt_c_mp(void) -internalC++ _Tt_c_mp::c_init(void) -internalC++ _Tt_c_mp::c_remove_procid(_Tt_procid_ptr&) -internalC++ _Tt_c_mp::create_new_procid(void) -internalC++ _Tt_c_mp::default_c_procid(void) -internalC++ _Tt_c_mp::default_procid(void) -internalC++ _Tt_c_mp::procid_count(void) -internalC++ _Tt_c_mp::set_default_procid(_Tt_string,int) -#ifdef OPT_XTHREADS -internalC++ _Tt_c_mp::set_multithreaded(void) -#endif -internalC++ _Tt_c_mp::~_Tt_c_mp(void) -internalC++ _Tt_c_msg_context::_Tt_c_msg_context(void) -internalC++ _Tt_c_msg_context::c_join(_Tt_session&,_Tt_procid_ptr&) -internalC++ _Tt_c_msg_context::c_quit(_Tt_session&,_Tt_procid_ptr&) -internalC++ _Tt_c_msg_context::~_Tt_c_msg_context(void) -internalC++ _Tt_c_msg_context_list::_Tt_c_msg_context_list(void) -internalC++ _Tt_c_msg_context_list::xdr(XDR*) -internalC++ _Tt_c_msg_context_list::~_Tt_c_msg_context_list(void) -internalC++ _Tt_c_msg_context_list_cursor::~_Tt_c_msg_context_list_cursor(void) -internalC++ _Tt_c_msg_context_list_maker(void) -internalC++ _Tt_c_msg_context_list_ptr::_Tt_c_msg_context_list_ptr(void) -internalC++ _Tt_c_msg_context_list_ptr::xdr(XDR*) -internalC++ _Tt_c_msg_context_list_ptr::~_Tt_c_msg_context_list_ptr(void) -internalC++ _Tt_c_msg_context_list_xdr(XDR*,_Tt_object*) -internalC++ _Tt_c_msg_context_maker(void) -internalC++ _Tt_c_msg_context_ptr::_Tt_c_msg_context_ptr(void) -internalC++ _Tt_c_msg_context_ptr::xdr(XDR*) -internalC++ _Tt_c_msg_context_ptr::~_Tt_c_msg_context_ptr(void) -internalC++ _Tt_c_msg_context_xdr(XDR*,_Tt_object*) -internalC++ _Tt_c_procid::_Tt_c_procid(const _Tt_string&) -internalC++ _Tt_c_procid::_Tt_c_procid(void) -internalC++ _Tt_c_procid::add_pattern(_Tt_pattern_ptr&) -internalC++ _Tt_c_procid::api_in(_Tt_string&) -internalC++ _Tt_c_procid::api_out(void) -internalC++ _Tt_c_procid::clear_signal(void) -internalC++ _Tt_c_procid::close(void) -internalC++ _Tt_c_procid::commit(void) -internalC++ _Tt_c_procid::declare_ptype(_Tt_string&) -internalC++ _Tt_c_procid::default_session(void) -internalC++ _Tt_c_procid::del_pattern(const _Tt_string&) -internalC++ _Tt_c_procid::exists_ptype(_Tt_string&) -internalC++ _Tt_c_procid::init(void) -internalC++ _Tt_c_procid::load_types(_Tt_string&) -internalC++ _Tt_c_procid::next_message(_Tt_c_message_ptr&) -internalC++ _Tt_c_procid::set_default_file(const _Tt_string&) -internalC++ _Tt_c_procid::set_default_ptype(_Tt_string&) -internalC++ _Tt_c_procid::set_default_session(_Tt_string&) -internalC++ _Tt_c_procid::set_fd_channel(int) -internalC++ _Tt_c_procid::unblock_ptype(const _Tt_string&) -internalC++ _Tt_c_procid::undeclare_ptype(_Tt_string&) -internalC++ _Tt_c_procid::update_message(const _Tt_c_message_ptr&,tt_state) -internalC++ _Tt_c_procid::~_Tt_c_procid(void) -internalC++ _Tt_c_procid_maker(void) -internalC++ _Tt_c_procid_ptr::_Tt_c_procid_ptr(void) -internalC++ _Tt_c_procid_ptr::xdr(XDR*) -internalC++ _Tt_c_procid_ptr::~_Tt_c_procid_ptr(void) -internalC++ _Tt_c_procid_table::xdr(XDR*) -internalC++ _Tt_c_procid_table::~_Tt_c_procid_table(void) -internalC++ _Tt_c_procid_table_cursor::~_Tt_c_procid_table_cursor(void) -internalC++ _Tt_c_procid_table_maker(void) -internalC++ _Tt_c_procid_table_ptr::_Tt_c_procid_table_ptr(void) -internalC++ _Tt_c_procid_table_ptr::xdr(XDR*) -internalC++ _Tt_c_procid_table_ptr::~_Tt_c_procid_table_ptr(void) -internalC++ _Tt_c_procid_table_xdr(XDR*,_Tt_object*) -internalC++ _Tt_c_procid_xdr(XDR*,_Tt_object*) -internalC++ _Tt_c_session::_Tt_c_session(void) -internalC++ _Tt_c_session::c_addprop(_Tt_string,_Tt_string) -internalC++ _Tt_c_session::c_getprop(_Tt_string,int,_Tt_string&) -internalC++ _Tt_c_session::c_init(void) -internalC++ _Tt_c_session::c_join(_Tt_procid_ptr&) -internalC++ _Tt_c_session::c_propcount(_Tt_string,int&) -internalC++ _Tt_c_session::c_propname(int,_Tt_string&) -internalC++ _Tt_c_session::c_propnames_count(int&) -internalC++ _Tt_c_session::c_quit(_Tt_procid_ptr&) -internalC++ _Tt_c_session::c_setprop(_Tt_string,_Tt_string) -internalC++ _Tt_c_session::startup_ttsession(_Tt_string&) -internalC++ _Tt_c_session::~_Tt_c_session(void) -internalC++ _Tt_c_session_maker(void) -internalC++ _Tt_c_session_ptr::_Tt_c_session_ptr(void) -internalC++ _Tt_c_session_ptr::xdr(XDR*) -internalC++ _Tt_c_session_ptr::~_Tt_c_session_ptr(void) -internalC++ _Tt_c_session_xdr(XDR*,_Tt_object*) -internalC++ _Tt_client_isam_file::_Tt_client_isam_file(const _Tt_string&,int,const _Tt_db_client_ptr&) -#ifdef _AIX -/* The AIX c++filt bungles this symbol. */ -internalC++ _Tt_client_isam_file::_Tt_client_isam_file(const _Tt_string&,int)T234_Tt_client_isam_key_descriptor_ptrT2RC17_Tt_db_client_ptr -#else -internalC++ _Tt_client_isam_file::_Tt_client_isam_file(const _Tt_string&,int,int,_Tt_client_isam_key_descriptor_ptr,int,const _Tt_db_client_ptr&) -#endif -internalC++ _Tt_client_isam_file::addIndex(_Tt_client_isam_key_descriptor_ptr) -internalC++ _Tt_client_isam_file::deleteRecord(long,const _Tt_client_isam_record_ptr&) -internalC++ _Tt_client_isam_file::findStartRecord(const _Tt_client_isam_key_descriptor_ptr&,int,const _Tt_client_isam_record_ptr&,int) -internalC++ _Tt_client_isam_file::getEmptyRecord(void) -internalC++ _Tt_client_isam_file::getFullRecord(const _Tt_string&) -internalC++ _Tt_client_isam_file::getISAMFileInfo(void) -internalC++ _Tt_client_isam_file::readMagicString(void) -internalC++ _Tt_client_isam_file::readRecord(int) -internalC++ _Tt_client_isam_file::readRecord(int,const _Tt_client_isam_record_ptr&) -internalC++ _Tt_client_isam_file::setErase(int) -internalC++ _Tt_client_isam_file::setTtISAMFileDefaults(void) -internalC++ _Tt_client_isam_file::updateRecord(long,const _Tt_client_isam_record_ptr&) -internalC++ _Tt_client_isam_file::writeMagicString(const _Tt_string&) -internalC++ _Tt_client_isam_file::writeRecord(const _Tt_client_isam_record_ptr&) -internalC++ _Tt_client_isam_file::~_Tt_client_isam_file(void) -internalC++ _Tt_client_isam_file_maker(void) -internalC++ _Tt_client_isam_file_ptr::_Tt_client_isam_file_ptr(void) -internalC++ _Tt_client_isam_file_ptr::xdr(XDR*) -internalC++ _Tt_client_isam_file_ptr::~_Tt_client_isam_file_ptr(void) -internalC++ _Tt_client_isam_file_xdr(XDR*,_Tt_object*) -internalC++ _Tt_client_isam_key_descriptor::_Tt_client_isam_key_descriptor(void) -internalC++ _Tt_client_isam_key_descriptor::addKeyPart(short,short,short) -internalC++ _Tt_client_isam_key_descriptor::getKeyPart(short,short&,short&,short&) const -internalC++ _Tt_client_isam_key_descriptor::setKeyPart(short,short,short,short) -internalC++ _Tt_client_isam_key_descriptor::~_Tt_client_isam_key_descriptor(void) -internalC++ _Tt_client_isam_key_descriptor_list::_Tt_client_isam_key_descriptor_list(void) -internalC++ _Tt_client_isam_key_descriptor_list::xdr(XDR*) -internalC++ _Tt_client_isam_key_descriptor_list::~_Tt_client_isam_key_descriptor_list(void) -internalC++ _Tt_client_isam_key_descriptor_list_cursor::~_Tt_client_isam_key_descriptor_list_cursor(void) -internalC++ _Tt_client_isam_key_descriptor_list_maker(void) -internalC++ _Tt_client_isam_key_descriptor_list_ptr::_Tt_client_isam_key_descriptor_list_ptr(void) -internalC++ _Tt_client_isam_key_descriptor_list_ptr::xdr(XDR*) -internalC++ _Tt_client_isam_key_descriptor_list_ptr::~_Tt_client_isam_key_descriptor_list_ptr(void) -internalC++ _Tt_client_isam_key_descriptor_list_xdr(XDR*,_Tt_object*) -internalC++ _Tt_client_isam_key_descriptor_maker(void) -internalC++ _Tt_client_isam_key_descriptor_ptr::_Tt_client_isam_key_descriptor_ptr(void) -internalC++ _Tt_client_isam_key_descriptor_ptr::xdr(XDR*) -internalC++ _Tt_client_isam_key_descriptor_ptr::~_Tt_client_isam_key_descriptor_ptr(void) -internalC++ _Tt_client_isam_key_descriptor_xdr(XDR*,_Tt_object*) -internalC++ _Tt_client_isam_record::_Tt_client_isam_record(const _Tt_client_isam_key_descriptor_list_ptr&,int,int) -internalC++ _Tt_client_isam_record::getBytes(int,int) const -internalC++ _Tt_client_isam_record::getKeyDescriptor(int) const -internalC++ _Tt_client_isam_record::getKeyPartValue(int,int) const -internalC++ _Tt_client_isam_record::getNumberOfKeys(void) const -internalC++ _Tt_client_isam_record::setBytes(int,const _Tt_string&) -internalC++ _Tt_client_isam_record::setBytes(int,int,const _Tt_string&) -internalC++ _Tt_client_isam_record::setKeyPartValue(int,int,const _Tt_string&) -internalC++ _Tt_client_isam_record::~_Tt_client_isam_record(void) -internalC++ _Tt_client_isam_record_list::_Tt_client_isam_record_list(void) -internalC++ _Tt_client_isam_record_list::xdr(XDR*) -internalC++ _Tt_client_isam_record_list::~_Tt_client_isam_record_list(void) -internalC++ _Tt_client_isam_record_list_cursor::~_Tt_client_isam_record_list_cursor(void) -internalC++ _Tt_client_isam_record_list_maker(void) -internalC++ _Tt_client_isam_record_list_ptr::_Tt_client_isam_record_list_ptr(void) -internalC++ _Tt_client_isam_record_list_ptr::xdr(XDR*) -internalC++ _Tt_client_isam_record_list_ptr::~_Tt_client_isam_record_list_ptr(void) -internalC++ _Tt_client_isam_record_list_xdr(XDR*,_Tt_object*) -internalC++ _Tt_client_isam_record_maker(void) -internalC++ _Tt_client_isam_record_ptr::_Tt_client_isam_record_ptr(void) -internalC++ _Tt_client_isam_record_ptr::xdr(XDR*) -internalC++ _Tt_client_isam_record_ptr::~_Tt_client_isam_record_ptr(void) -internalC++ _Tt_client_isam_record_xdr(XDR*,_Tt_object*) -internalC++ _Tt_context::_Tt_context(const _Tt_context&) -internalC++ _Tt_context::print(const _Tt_ostream&) const -internalC++ _Tt_context::xdr(XDR*) -internalC++ _Tt_context::~_Tt_context(void) -internalC++ _Tt_context_list::xdr(XDR*) -internalC++ _Tt_context_list::~_Tt_context_list(void) -internalC++ _Tt_context_list_maker(void) -internalC++ _Tt_context_list_xdr(XDR*,_Tt_object*) -internalC++ _Tt_context_maker(void) -internalC++ _Tt_context_ptr::_Tt_context_ptr(void) -internalC++ _Tt_context_ptr::xdr(XDR*) -internalC++ _Tt_context_xdr(XDR*,_Tt_object*) -internalC++ _Tt_db_access::~_Tt_db_access(void) -internalC++ _Tt_db_access_maker(void) -internalC++ _Tt_db_access_ptr::xdr(XDR*) -internalC++ _Tt_db_access_xdr(XDR*,_Tt_object*) -internalC++ _Tt_db_client::SetError(clnt_stat) -internalC++ _Tt_db_client::_Tt_db_client(_Tt_db_results&) -internalC++ _Tt_db_client::_Tt_db_client(const _Tt_string&,_Tt_db_results&) -internalC++ _Tt_db_client::addFileProperty(const _Tt_string&,const _Tt_db_property_ptr&,int,int&) -internalC++ _Tt_db_client::addObjectProperty(const _Tt_string&,const _Tt_db_property_ptr&,int,_Tt_db_property_list_ptr&,int&) -internalC++ _Tt_db_client::addsession(const _Tt_string&,const _Tt_string&) -internalC++ _Tt_db_client::connectToDB(const _Tt_string&) -internalC++ _Tt_db_client::createAuth(void) -internalC++ _Tt_db_client::createFile(const _Tt_string&,const _Tt_db_property_list_ptr&,const _Tt_db_access_ptr&,int&) -internalC++ _Tt_db_client::createObject(const _Tt_string&,const _Tt_string&,const _Tt_string&,const _Tt_db_property_list_ptr&,const _Tt_db_access_ptr&,int&) -internalC++ _Tt_db_client::deleteFileProperty(const _Tt_string&,const _Tt_db_property_ptr&,int&) -internalC++ _Tt_db_client::deleteObjectProperty(const _Tt_string&,const _Tt_db_property_ptr&,_Tt_db_property_list_ptr&,int&) -internalC++ _Tt_db_client::delsession(const _Tt_string&,const _Tt_string&) -internalC++ _Tt_db_client::dequeueMessages(const _Tt_string&,const _Tt_string_list_ptr&,_Tt_message_list_ptr&) -internalC++ _Tt_db_client::file_netfile(const _Tt_string&,_Tt_string&) -internalC++ _Tt_db_client::getCurrentAccess(void) const -internalC++ _Tt_db_client::getFileAccess(const _Tt_string&,_Tt_db_access_ptr&) -internalC++ _Tt_db_client::getFileObjects(const _Tt_string&,int&,_Tt_string_list_ptr&) -internalC++ _Tt_db_client::getFilePartition(const _Tt_string&,_Tt_string&,_Tt_string&) -internalC++ _Tt_db_client::getFileProperties(const _Tt_string&,int&,_Tt_db_property_list_ptr&) -internalC++ _Tt_db_client::getFileProperty(const _Tt_string&,const _Tt_string&,int&,_Tt_db_property_ptr&) -internalC++ _Tt_db_client::getObjectAccess(const _Tt_string&,_Tt_db_access_ptr&) -internalC++ _Tt_db_client::getObjectFile(const _Tt_string&,_Tt_string&) -internalC++ _Tt_db_client::getObjectProperties(const _Tt_string&,int&,_Tt_db_property_list_ptr&) -internalC++ _Tt_db_client::getObjectProperty(const _Tt_string&,const _Tt_string&,int&,_Tt_db_property_ptr&) -internalC++ _Tt_db_client::getObjectType(const _Tt_string&,_Tt_string&) -internalC++ _Tt_db_client::gettype(const _Tt_string&,_Tt_string&) -internalC++ _Tt_db_client::isFileInDatabase(const _Tt_string&,int&) -internalC++ _Tt_db_client::isObjectInDatabase(const _Tt_string&,_Tt_string&) -internalC++ _Tt_db_client::isaddindex(int,keydesc*) -internalC++ _Tt_db_client::isbuild(char*,int,keydesc*,int) -internalC++ _Tt_db_client::isclose(int) -internalC++ _Tt_db_client::iscntl(int,int,char*) -internalC++ _Tt_db_client::isdelrec(int,long,char*) -internalC++ _Tt_db_client::iserase(char*) -internalC++ _Tt_db_client::isopen(char*,int) -internalC++ _Tt_db_client::isread(int,char*,int) -internalC++ _Tt_db_client::isrewrec(int,long,char*) -internalC++ _Tt_db_client::isstart(int,keydesc*,int,char*,int) -internalC++ _Tt_db_client::iswrite(int,char*) -internalC++ _Tt_db_client::mfs(const _Tt_string&) -internalC++ _Tt_db_client::moveFile(const _Tt_string&,const _Tt_string&) -internalC++ _Tt_db_client::netfile_file(const _Tt_string&,_Tt_string&) -internalC++ _Tt_db_client::oldDBToNewDBResults(_Tt_old_db_results) -internalC++ _Tt_db_client::queueMessage(const _Tt_string&,const _Tt_string_list_ptr&,const _Tt_message_ptr&) -internalC++ _Tt_db_client::removeFile(const _Tt_string&) -internalC++ _Tt_db_client::removeObject(const _Tt_string&,const _Tt_string&) -internalC++ _Tt_db_client::setCurrentAccess(const _Tt_db_access_ptr&) -internalC++ _Tt_db_client::setFileAccess(const _Tt_string&,const _Tt_db_access_ptr&) -internalC++ _Tt_db_client::setFileProperties(const _Tt_string&,const _Tt_db_property_list_ptr&,int&) -internalC++ _Tt_db_client::setFileProperty(const _Tt_string&,const _Tt_db_property_ptr&,int&) -internalC++ _Tt_db_client::setObjectAccess(const _Tt_string&,const _Tt_db_access_ptr&) -internalC++ _Tt_db_client::setObjectFile(const _Tt_string&,const _Tt_string&) -internalC++ _Tt_db_client::setObjectProperties(const _Tt_string&,const _Tt_db_property_list_ptr&,_Tt_db_property_list_ptr&,int&) -internalC++ _Tt_db_client::setObjectProperty(const _Tt_string&,const _Tt_db_property_ptr&,_Tt_db_property_list_ptr&,int&) -internalC++ _Tt_db_client::setObjectType(const _Tt_string&,const _Tt_string&) -internalC++ _Tt_db_client::setTtDBDefaults(void) -internalC++ _Tt_db_client_list::_Tt_db_client_list(void) -internalC++ _Tt_db_client_list::xdr(XDR*) -internalC++ _Tt_db_client_list::~_Tt_db_client_list(void) -internalC++ _Tt_db_client_list_cursor::~_Tt_db_client_list_cursor(void) -internalC++ _Tt_db_client_list_maker(void) -internalC++ _Tt_db_client_list_ptr::_Tt_db_client_list_ptr(void) -internalC++ _Tt_db_client_list_ptr::xdr(XDR*) -internalC++ _Tt_db_client_list_ptr::~_Tt_db_client_list_ptr(void) -internalC++ _Tt_db_client_list_xdr(XDR*,_Tt_object*) -internalC++ _Tt_db_client_maker(void) -internalC++ _Tt_db_client_ptr::xdr(XDR*) -internalC++ _Tt_db_client_table::xdr(XDR*) -internalC++ _Tt_db_client_table::~_Tt_db_client_table(void) -internalC++ _Tt_db_client_table_cursor::~_Tt_db_client_table_cursor(void) -internalC++ _Tt_db_client_table_maker(void) -internalC++ _Tt_db_client_table_ptr::_Tt_db_client_table_ptr(void) -internalC++ _Tt_db_client_table_ptr::xdr(XDR*) -internalC++ _Tt_db_client_table_ptr::~_Tt_db_client_table_ptr(void) -internalC++ _Tt_db_client_table_xdr(XDR*,_Tt_object*) -internalC++ _Tt_db_client_xdr(XDR*,_Tt_object*) -internalC++ _Tt_db_file::_Tt_db_file(const _Tt_string&) -internalC++ _Tt_db_file::_Tt_db_file(const _Tt_string&,const _Tt_db_property_list_ptr&,const _Tt_db_access_ptr&) -internalC++ _Tt_db_file::_Tt_db_file(void) -internalC++ _Tt_db_file::addProperty(const _Tt_db_property_ptr&,int) -internalC++ _Tt_db_file::addSession(const _Tt_string&) -internalC++ _Tt_db_file::copy(const _Tt_string&) -internalC++ _Tt_db_file::createDBFile(void) -internalC++ _Tt_db_file::deleteProperty(const _Tt_db_property_ptr&) -internalC++ _Tt_db_file::deleteSession(const _Tt_string&) -internalC++ _Tt_db_file::dequeueMessages(const _Tt_string_list_ptr&,_Tt_message_list_ptr&) -internalC++ _Tt_db_file::getAccess(void) -internalC++ _Tt_db_file::getCurrentAccess(void) const -internalC++ _Tt_db_file::getHostname(void) -internalC++ _Tt_db_file::getNetworkPath(const _Tt_string&) -internalC++ _Tt_db_file::getObjects(void) -internalC++ _Tt_db_file::getProperties(void) -internalC++ _Tt_db_file::getProperty(const _Tt_string&) -internalC++ _Tt_db_file::getSessions(void) -internalC++ _Tt_db_file::isFileInDatabase(void) -internalC++ _Tt_db_file::move(const _Tt_string&) -internalC++ _Tt_db_file::processDBResults(void) -internalC++ _Tt_db_file::queueMessage(const _Tt_string_list_ptr&,const _Tt_message_ptr&) -internalC++ _Tt_db_file::remove(void) -internalC++ _Tt_db_file::setAccess(const _Tt_db_access_ptr&) -internalC++ _Tt_db_file::setCurrentAccess(const _Tt_db_access_ptr&) -internalC++ _Tt_db_file::setProperties(const _Tt_db_property_list_ptr&) -internalC++ _Tt_db_file::setProperty(const _Tt_db_property_ptr&) -internalC++ _Tt_db_file::setTtDBFileDefaults(const _Tt_string&,const _Tt_db_property_list_ptr&,const _Tt_db_access_ptr&) -internalC++ _Tt_db_file::~_Tt_db_file(void) -internalC++ _Tt_db_file_maker(void) -internalC++ _Tt_db_file_ptr::_Tt_db_file_ptr(void) -internalC++ _Tt_db_file_ptr::xdr(XDR*) -internalC++ _Tt_db_file_ptr::~_Tt_db_file_ptr(void) -internalC++ _Tt_db_file_xdr(XDR*,_Tt_object*) -internalC++ _Tt_db_hostname_global_map_ref::_Tt_db_hostname_global_map_ref(void) -internalC++ _Tt_db_hostname_global_map_ref::addDB(_Tt_db_client_ptr&) -internalC++ _Tt_db_hostname_global_map_ref::dbHostnameMap -internalC++ _Tt_db_hostname_global_map_ref::dbHostnameMapKey(_Tt_object_ptr&) -internalC++ _Tt_db_hostname_global_map_ref::flush(void) -internalC++ _Tt_db_hostname_global_map_ref::getDB(const _Tt_string&,_Tt_string&,_Tt_db_results&) -internalC++ _Tt_db_hostname_global_map_ref::removeDB(const _Tt_string&) -internalC++ _Tt_db_hostname_global_map_ref::~_Tt_db_hostname_global_map_ref(void) -internalC++ _Tt_db_hostname_redirection_map::_Tt_db_hostname_redirection_map(void) -internalC++ _Tt_db_hostname_redirection_map::findEntry(const _Tt_string&) -internalC++ _Tt_db_hostname_redirection_map::refresh(void) -internalC++ _Tt_db_hostname_redirection_map::~_Tt_db_hostname_redirection_map(void) -internalC++ _Tt_db_key::~_Tt_db_key(void) -internalC++ _Tt_db_key_maker(void) -internalC++ _Tt_db_key_ptr::xdr(XDR*) -internalC++ _Tt_db_key_xdr(XDR*,_Tt_object*) -internalC++ _Tt_db_object::_Tt_db_object(const _Tt_string&) -internalC++ _Tt_db_object::copy(const _Tt_string&) -internalC++ _Tt_db_object::create(const _Tt_string&) -internalC++ _Tt_db_object::createDBObject(void) -internalC++ _Tt_db_object::createMemoryObject(const _Tt_string&,const _Tt_string&) -internalC++ _Tt_db_object::deleteProperty(const _Tt_db_property_ptr&) -internalC++ _Tt_db_object::getCurrentAccess(void) const -internalC++ _Tt_db_object::getDBObjectHostnameFromID(void) -internalC++ _Tt_db_object::getFile(void) -internalC++ _Tt_db_object::getObjectKey(void) const -internalC++ _Tt_db_object::getProperties(void) -internalC++ _Tt_db_object::getProperty(const _Tt_string&) -internalC++ _Tt_db_object::getType(void) -internalC++ _Tt_db_object::internalRefresh(void) -internalC++ _Tt_db_object::isObjectInDatabase(int) -internalC++ _Tt_db_object::makeEquivalentObjectID(const _Tt_string&,const _Tt_string&) -internalC++ _Tt_db_object::move(const _Tt_string&) -internalC++ _Tt_db_object::processDBResults(void) -internalC++ _Tt_db_object::refresh(void) -internalC++ _Tt_db_object::remove(const _Tt_string&) -internalC++ _Tt_db_object::setCurrentAccess(const _Tt_db_access_ptr&) -internalC++ _Tt_db_object::setObjectID(const _Tt_string&) -internalC++ _Tt_db_object::setProperties(const _Tt_db_property_list_ptr&) -internalC++ _Tt_db_object::setProperty(const _Tt_db_property_ptr&) -internalC++ _Tt_db_object::setTtDBObjectDefaults(void) -internalC++ _Tt_db_object::~_Tt_db_object(void) -internalC++ _Tt_db_object_list::_Tt_db_object_list(void) -internalC++ _Tt_db_object_list::xdr(XDR*) -internalC++ _Tt_db_object_list::~_Tt_db_object_list(void) -internalC++ _Tt_db_object_list_cursor::~_Tt_db_object_list_cursor(void) -internalC++ _Tt_db_object_list_maker(void) -internalC++ _Tt_db_object_list_ptr::_Tt_db_object_list_ptr(void) -internalC++ _Tt_db_object_list_ptr::xdr(XDR*) -internalC++ _Tt_db_object_list_ptr::~_Tt_db_object_list_ptr(void) -internalC++ _Tt_db_object_list_xdr(XDR*,_Tt_object*) -internalC++ _Tt_db_object_maker(void) -internalC++ _Tt_db_object_ptr::_Tt_db_object_ptr(void) -internalC++ _Tt_db_object_ptr::xdr(XDR*) -internalC++ _Tt_db_object_table::xdr(XDR*) -internalC++ _Tt_db_object_table::~_Tt_db_object_table(void) -internalC++ _Tt_db_object_table_cursor::~_Tt_db_object_table_cursor(void) -internalC++ _Tt_db_object_table_maker(void) -internalC++ _Tt_db_object_table_ptr::_Tt_db_object_table_ptr(void) -internalC++ _Tt_db_object_table_ptr::xdr(XDR*) -internalC++ _Tt_db_object_table_ptr::~_Tt_db_object_table_ptr(void) -internalC++ _Tt_db_object_table_xdr(XDR*,_Tt_object*) -internalC++ _Tt_db_object_xdr(XDR*,_Tt_object*) -internalC++ _Tt_db_property::~_Tt_db_property(void) -internalC++ _Tt_db_property_list::xdr(XDR*) -internalC++ _Tt_db_property_list::~_Tt_db_property_list(void) -internalC++ _Tt_db_property_list_maker(void) -internalC++ _Tt_db_property_list_ptr::xdr(XDR*) -internalC++ _Tt_db_property_list_xdr(XDR*,_Tt_object*) -internalC++ _Tt_db_property_maker(void) -internalC++ _Tt_db_property_ptr::xdr(XDR*) -internalC++ _Tt_db_property_xdr(XDR*,_Tt_object*) -internalC++ _Tt_desktop::close(void) -internalC++ _Tt_desktop::del_prop(_Tt_string) -internalC++ _Tt_desktop::get_prop(_Tt_string,_Tt_string&) -internalC++ _Tt_desktop::io_error_proc(void*) -internalC++ _Tt_desktop::io_exception -internalC++ _Tt_desktop::lock(void) -internalC++ _Tt_desktop::process_event(void) -internalC++ _Tt_desktop::restore_user_handler(void) -internalC++ _Tt_desktop::session_name(_Tt_string) -internalC++ _Tt_desktop::unlock(void) -internalC++ _Tt_desktop::~_Tt_desktop(void) -internalC++ _Tt_desktop_lock::_Tt_desktop_lock(void) -internalC++ _Tt_desktop_lock::~_Tt_desktop_lock(void) -internalC++ _Tt_desktop_lock_maker(void) -internalC++ _Tt_desktop_lock_ptr::xdr(XDR*) -internalC++ _Tt_desktop_lock_xdr(XDR*,_Tt_object*) -internalC++ _Tt_desktop_maker(void) -internalC++ _Tt_desktop_ptr::_Tt_desktop_ptr(void) -internalC++ _Tt_desktop_ptr::xdr(XDR*) -internalC++ _Tt_desktop_ptr::~_Tt_desktop_ptr(void) -internalC++ _Tt_desktop_xdr(XDR*,_Tt_object*) -internalC++ _Tt_file::_Tt_file(const _Tt_string&) -internalC++ _Tt_file::_Tt_file(void) -internalC++ _Tt_file::query(tt_filter_action (*)(tt_filter_action (*)(const char*,void*,void*),_Tt_string,void*,void*),tt_filter_action (*)(const char*,void*,void*),void*,void*) -internalC++ _Tt_file::~_Tt_file(void) -internalC++ _Tt_file_list::_Tt_file_list(void) -internalC++ _Tt_file_list::xdr(XDR*) -internalC++ _Tt_file_list::~_Tt_file_list(void) -internalC++ _Tt_file_list_cursor::~_Tt_file_list_cursor(void) -internalC++ _Tt_file_list_maker(void) -internalC++ _Tt_file_list_ptr::_Tt_file_list_ptr(void) -internalC++ _Tt_file_list_ptr::xdr(XDR*) -internalC++ _Tt_file_list_ptr::~_Tt_file_list_ptr(void) -internalC++ _Tt_file_list_xdr(XDR*,_Tt_object*) -internalC++ _Tt_file_maker(void) -internalC++ _Tt_file_ptr::_Tt_file_ptr(void) -internalC++ _Tt_file_ptr::xdr(XDR*) -internalC++ _Tt_file_ptr::~_Tt_file_ptr(void) -internalC++ _Tt_file_system::findBestMountPoint(_Tt_string&,int&,_Tt_string&) -internalC++ _Tt_file_system::findMountEntry(const _Tt_string&) -internalC++ _Tt_file_system::flush(void) -internalC++ _Tt_file_system::lastMountTime -internalC++ _Tt_file_system::updateFileSystemEntries(void) -internalC++ _Tt_file_system_entry::_Tt_file_system_entry(const _Tt_string&,const _Tt_string&,const _Tt_string&,int,int) -internalC++ _Tt_file_system_entry::_Tt_file_system_entry(void) -internalC++ _Tt_file_system_entry::~_Tt_file_system_entry(void) -internalC++ _Tt_file_system_entry_list::_Tt_file_system_entry_list(void) -internalC++ _Tt_file_system_entry_list::xdr(XDR*) -internalC++ _Tt_file_system_entry_list::~_Tt_file_system_entry_list(void) -internalC++ _Tt_file_system_entry_list_cursor::~_Tt_file_system_entry_list_cursor(void) -internalC++ _Tt_file_system_entry_list_maker(void) -internalC++ _Tt_file_system_entry_list_ptr::_Tt_file_system_entry_list_ptr(void) -internalC++ _Tt_file_system_entry_list_ptr::xdr(XDR*) -internalC++ _Tt_file_system_entry_list_ptr::~_Tt_file_system_entry_list_ptr(void) -internalC++ _Tt_file_system_entry_list_xdr(XDR*,_Tt_object*) -internalC++ _Tt_file_system_entry_maker(void) -internalC++ _Tt_file_system_entry_ptr::_Tt_file_system_entry_ptr(void) -internalC++ _Tt_file_system_entry_ptr::xdr(XDR*) -internalC++ _Tt_file_system_entry_xdr(XDR*,_Tt_object*) -internalC++ _Tt_file_table::xdr(XDR*) -internalC++ _Tt_file_table::~_Tt_file_table(void) -internalC++ _Tt_file_table_cursor::~_Tt_file_table_cursor(void) -internalC++ _Tt_file_table_maker(void) -internalC++ _Tt_file_table_ptr::_Tt_file_table_ptr(void) -internalC++ _Tt_file_table_ptr::xdr(XDR*) -internalC++ _Tt_file_table_ptr::~_Tt_file_table_ptr(void) -internalC++ _Tt_file_table_xdr(XDR*,_Tt_object*) -internalC++ _Tt_file_xdr(XDR*,_Tt_object*) -internalC++ _Tt_global::_maxfds -internalC++ _Tt_global::find_host_byname(_Tt_string,_Tt_host_ptr&) -internalC++ _Tt_global::~_Tt_global(void) -internalC++ _Tt_host::_Tt_host(void) -internalC++ _Tt_host::addr_length(void) const -internalC++ _Tt_host::init_byaddr(_Tt_string) -internalC++ _Tt_host::init_byname(_Tt_string) -internalC++ _Tt_host::init_bystringaddr(_Tt_string) -internalC++ _Tt_host::init_from_hostent(hostent*) -internalC++ _Tt_host::xdr(XDR*) -internalC++ _Tt_host::~_Tt_host(void) -internalC++ _Tt_host_equiv::_Tt_host_equiv(void) -internalC++ _Tt_host_equiv::hostname_equiv(const _Tt_string&,const _Tt_string&) -internalC++ _Tt_host_equiv::prefix_host(const _Tt_string&,const _Tt_string&) -internalC++ _Tt_host_equiv::~_Tt_host_equiv(void) -internalC++ _Tt_host_equiv_maker(void) -internalC++ _Tt_host_equiv_ptr::_Tt_host_equiv_ptr(void) -internalC++ _Tt_host_equiv_ptr::xdr(XDR*) -internalC++ _Tt_host_equiv_ptr::~_Tt_host_equiv_ptr(void) -internalC++ _Tt_host_equiv_xdr(XDR*,_Tt_object*) -internalC++ _Tt_host_list::_Tt_host_list(void) -internalC++ _Tt_host_list::xdr(XDR*) -internalC++ _Tt_host_list::~_Tt_host_list(void) -internalC++ _Tt_host_list_cursor::~_Tt_host_list_cursor(void) -internalC++ _Tt_host_list_maker(void) -internalC++ _Tt_host_list_ptr::_Tt_host_list_ptr(void) -internalC++ _Tt_host_list_ptr::xdr(XDR*) -internalC++ _Tt_host_list_ptr::~_Tt_host_list_ptr(void) -internalC++ _Tt_host_list_xdr(XDR*,_Tt_object*) -internalC++ _Tt_host_maker(void) -internalC++ _Tt_host_ptr::_Tt_host_ptr(void) -internalC++ _Tt_host_ptr::xdr(XDR*) -internalC++ _Tt_host_ptr::~_Tt_host_ptr(void) -internalC++ _Tt_host_table::xdr(XDR*) -internalC++ _Tt_host_table::~_Tt_host_table(void) -internalC++ _Tt_host_table_cursor::~_Tt_host_table_cursor(void) -internalC++ _Tt_host_table_maker(void) -internalC++ _Tt_host_table_ptr::_Tt_host_table_ptr(void) -internalC++ _Tt_host_table_ptr::xdr(XDR*) -internalC++ _Tt_host_table_ptr::~_Tt_host_table_ptr(void) -internalC++ _Tt_host_table_xdr(XDR*,_Tt_object*) -internalC++ _Tt_host_xdr(XDR*,_Tt_object*) -internalC++ _Tt_hostname_cache::_Tt_hostname_cache(_Tt_string&) -internalC++ _Tt_hostname_cache::_Tt_hostname_cache(void) -internalC++ _Tt_hostname_cache::h_keyfn(_Tt_object_ptr&) -internalC++ _Tt_hostname_cache::~_Tt_hostname_cache(void) -internalC++ _Tt_hostname_cache_list::_Tt_hostname_cache_list(void) -internalC++ _Tt_hostname_cache_list::xdr(XDR*) -internalC++ _Tt_hostname_cache_list::~_Tt_hostname_cache_list(void) -internalC++ _Tt_hostname_cache_list_cursor::~_Tt_hostname_cache_list_cursor(void) -internalC++ _Tt_hostname_cache_list_maker(void) -internalC++ _Tt_hostname_cache_list_ptr::_Tt_hostname_cache_list_ptr(void) -internalC++ _Tt_hostname_cache_list_ptr::xdr(XDR*) -internalC++ _Tt_hostname_cache_list_ptr::~_Tt_hostname_cache_list_ptr(void) -internalC++ _Tt_hostname_cache_list_xdr(XDR*,_Tt_object*) -internalC++ _Tt_hostname_cache_maker(void) -internalC++ _Tt_hostname_cache_ptr::_Tt_hostname_cache_ptr(void) -internalC++ _Tt_hostname_cache_ptr::xdr(XDR*) -internalC++ _Tt_hostname_cache_ptr::~_Tt_hostname_cache_ptr(void) -internalC++ _Tt_hostname_cache_table::xdr(XDR*) -internalC++ _Tt_hostname_cache_table::~_Tt_hostname_cache_table(void) -internalC++ _Tt_hostname_cache_table_cursor::~_Tt_hostname_cache_table_cursor(void) -internalC++ _Tt_hostname_cache_table_maker(void) -internalC++ _Tt_hostname_cache_table_ptr::_Tt_hostname_cache_table_ptr(void) -internalC++ _Tt_hostname_cache_table_ptr::xdr(XDR*) -internalC++ _Tt_hostname_cache_table_ptr::~_Tt_hostname_cache_table_ptr(void) -internalC++ _Tt_hostname_cache_table_xdr(XDR*,_Tt_object*) -internalC++ _Tt_hostname_cache_xdr(XDR*,_Tt_object*) -internalC++ _Tt_int_rec::_Tt_int_rec(void) -internalC++ _Tt_int_rec::print(const _Tt_ostream&) const -internalC++ _Tt_int_rec::xdr(XDR*) -internalC++ _Tt_int_rec::~_Tt_int_rec(void) -internalC++ _Tt_int_rec_list::xdr(XDR*) -internalC++ _Tt_int_rec_list::~_Tt_int_rec_list(void) -internalC++ _Tt_int_rec_list_maker(void) -internalC++ _Tt_int_rec_list_ptr::xdr(XDR*) -internalC++ _Tt_int_rec_list_xdr(XDR*,_Tt_object*) -internalC++ _Tt_int_rec_maker(void) -internalC++ _Tt_int_rec_ptr::_Tt_int_rec_ptr(void) -internalC++ _Tt_int_rec_ptr::xdr(XDR*) -internalC++ _Tt_int_rec_xdr(XDR*,_Tt_object*) -internalC++ _Tt_map_entry::_Tt_map_entry(void) -internalC++ _Tt_map_entry::getAddress(_Tt_object_ptr&) -internalC++ _Tt_map_entry::~_Tt_map_entry(void) -internalC++ _Tt_map_entry_maker(void) -internalC++ _Tt_map_entry_ptr::_Tt_map_entry_ptr(void) -internalC++ _Tt_map_entry_ptr::xdr(XDR*) -internalC++ _Tt_map_entry_ptr::~_Tt_map_entry_ptr(void) -internalC++ _Tt_map_entry_table::xdr(XDR*) -internalC++ _Tt_map_entry_table::~_Tt_map_entry_table(void) -internalC++ _Tt_map_entry_table_cursor::~_Tt_map_entry_table_cursor(void) -internalC++ _Tt_map_entry_table_maker(void) -internalC++ _Tt_map_entry_table_ptr::_Tt_map_entry_table_ptr(void) -internalC++ _Tt_map_entry_table_ptr::xdr(XDR*) -internalC++ _Tt_map_entry_table_ptr::~_Tt_map_entry_table_ptr(void) -internalC++ _Tt_map_entry_table_xdr(XDR*,_Tt_object*) -internalC++ _Tt_map_entry_xdr(XDR*,_Tt_object*) -internalC++ _Tt_message::_set_id(int) -internalC++ _Tt_message::add_arg(_Tt_arg_ptr&) -internalC++ _Tt_message::add_context(_Tt_msg_context_ptr&) -internalC++ _Tt_message::api_id(void) const -internalC++ _Tt_message::context(int) const -internalC++ _Tt_message::contextsCount(void) const -internalC++ _Tt_message::gid(void) const -internalC++ _Tt_message::id(void) const -internalC++ _Tt_message::is_awaiting_reply(void) const -internalC++ _Tt_message::print(const _Tt_ostream&) const -internalC++ _Tt_message::set_awaiting_reply(int) -internalC++ _Tt_message::set_file(_Tt_string) -internalC++ _Tt_message::set_id(void) -internalC++ _Tt_message::set_message_class(tt_class) -internalC++ _Tt_message::set_object(_Tt_string) -internalC++ _Tt_message::set_observer_procid(const _Tt_procid_ptr&) -internalC++ _Tt_message::set_op(_Tt_string) -internalC++ _Tt_message::set_otype(_Tt_string) -internalC++ _Tt_message::set_paradigm(tt_address) -internalC++ _Tt_message::set_reliability(tt_disposition) -internalC++ _Tt_message::set_scope(tt_scope) -internalC++ _Tt_message::set_sender(_Tt_procid_ptr&) -internalC++ _Tt_message::set_sender_ptype(_Tt_string) -internalC++ _Tt_message::set_session(_Tt_session_ptr&) -internalC++ _Tt_message::set_status_string(_Tt_string) -internalC++ _Tt_message::set_super(void) -internalC++ _Tt_message::status_string(void) -internalC++ _Tt_message::uid(void) const -internalC++ _Tt_message_list::xdr(XDR*) -internalC++ _Tt_message_list_maker(void) -internalC++ _Tt_message_list_ptr::xdr(XDR*) -internalC++ _Tt_message_list_xdr(XDR*,_Tt_object*) -internalC++ _Tt_message_maker(void) -internalC++ _Tt_message_ptr::xdr(XDR*) -internalC++ _Tt_message_xdr(XDR*,_Tt_object*) -internalC++ _Tt_mp::check_if_sessions_alive(void) -internalC++ _Tt_mp::find_file(_Tt_string,_Tt_file_ptr&,int) -internalC++ _Tt_mp::find_session_by_fd(int,_Tt_session_ptr&) -internalC++ _Tt_mp::generate_message_id(void) -internalC++ _Tt_mp::generate_pattern_id(void) -internalC++ _Tt_mp::remove_file(_Tt_string) -internalC++ _Tt_mp::remove_session(_Tt_string) -internalC++ _Tt_mp::save_session_fd(int) -internalC++ _Tt_msg_context::print(const _Tt_ostream&) const -internalC++ _Tt_msg_context::print_(const _Tt_ostream&,const _Tt_object*) -internalC++ _Tt_msg_context::setValue(const _Tt_string&) -internalC++ _Tt_msg_context::setValue(int) -internalC++ _Tt_msg_context::xdr(XDR*) -internalC++ _Tt_msg_context_list::_Tt_msg_context_list(void) -internalC++ _Tt_msg_context_list::append_ordered(const _Tt_msg_context_ptr&) -internalC++ _Tt_msg_context_list::xdr(XDR*) -internalC++ _Tt_msg_context_list::~_Tt_msg_context_list(void) -internalC++ _Tt_msg_context_list_maker(void) -internalC++ _Tt_msg_context_list_ptr::_Tt_msg_context_list_ptr(void) -internalC++ _Tt_msg_context_list_ptr::xdr(XDR*) -internalC++ _Tt_msg_context_list_ptr::~_Tt_msg_context_list_ptr(void) -internalC++ _Tt_msg_context_list_xdr(XDR*,_Tt_object*) -internalC++ _Tt_msg_context_maker(void) -internalC++ _Tt_msg_context_ptr::xdr(XDR*) -internalC++ _Tt_msg_context_xdr(XDR*,_Tt_object*) -internalC++ _Tt_object::null_ptr(void) -internalC++ _Tt_object::verify_refcount(int) -internalC++ _Tt_object_list::dequeue(void) -internalC++ _Tt_object_list::verify(int (*)(const _Tt_object*)) -internalC++ _Tt_object_list_cursor::insert(const _Tt_object_ptr&) -internalC++ _Tt_object_list_cursor::operator->(void) const -internalC++ _Tt_object_list_element::_Tt_object_list_element(void) -internalC++ _Tt_object_list_element::~_Tt_object_list_element(void) -internalC++ _Tt_object_list_maker(void) -internalC++ _Tt_object_list_ptr::xdr(XDR*) -internalC++ _Tt_object_list_xdr(XDR*,_Tt_object*) -internalC++ _Tt_object_maker(void) -internalC++ _Tt_object_ptr::xdr(XDR*) -internalC++ _Tt_object_table::flush(void) -internalC++ _Tt_object_table_cursor::is_valid(void) const -internalC++ _Tt_object_table_cursor::operator->(void) -internalC++ _Tt_object_table_cursor::prev(void) -internalC++ _Tt_object_table_cursor::reset(void) -internalC++ _Tt_object_table_maker(void) -internalC++ _Tt_object_table_ptr::xdr(XDR*) -internalC++ _Tt_object_table_xdr(XDR*,_Tt_object*) -internalC++ _Tt_object_xdr(XDR*,_Tt_object*) -internalC++ _Tt_objid_spec::_Tt_objid_spec(_Tt_string) -internalC++ _Tt_objid_spec::_Tt_objid_spec(void) -internalC++ _Tt_objid_spec::getOnDiskFlag(void) -internalC++ _Tt_objid_spec::setOnDiskFlag(int) -internalC++ _Tt_objid_spec::~_Tt_objid_spec(void) -internalC++ _Tt_objid_spec_maker(void) -internalC++ _Tt_objid_spec_ptr::_Tt_objid_spec_ptr(void) -internalC++ _Tt_objid_spec_ptr::xdr(XDR*) -internalC++ _Tt_objid_spec_ptr::~_Tt_objid_spec_ptr(void) -internalC++ _Tt_objid_spec_table::xdr(XDR*) -internalC++ _Tt_objid_spec_table::~_Tt_objid_spec_table(void) -internalC++ _Tt_objid_spec_table_cursor::~_Tt_objid_spec_table_cursor(void) -internalC++ _Tt_objid_spec_table_maker(void) -internalC++ _Tt_objid_spec_table_ptr::_Tt_objid_spec_table_ptr(void) -internalC++ _Tt_objid_spec_table_ptr::xdr(XDR*) -internalC++ _Tt_objid_spec_table_ptr::~_Tt_objid_spec_table_ptr(void) -internalC++ _Tt_objid_spec_table_xdr(XDR*,_Tt_object*) -internalC++ _Tt_objid_spec_xdr(XDR*,_Tt_object*) -internalC++ _Tt_old_db::_Tt_old_db(const _Tt_string&,const _Tt_db_client_ptr&) -internalC++ _Tt_old_db::_Tt_old_db(void) -internalC++ _Tt_old_db::addFileProperty(const _Tt_string&,const _Tt_db_property_ptr&,int,const _Tt_db_access_ptr&) -internalC++ _Tt_old_db::addObjectProperty(const _Tt_string&,const _Tt_db_property_ptr&,int,const _Tt_db_access_ptr&) -internalC++ _Tt_old_db::addProperty(const _Tt_string&,const _Tt_db_property_ptr&,int) -internalC++ _Tt_old_db::addPropertyValue(const _Tt_string&,const _Tt_string&,const _Tt_string&) -internalC++ _Tt_old_db::connectToDB(const _Tt_string&,const _Tt_db_client_ptr&) -internalC++ _Tt_old_db::createFile(const _Tt_string&,const _Tt_db_access_ptr&) -internalC++ _Tt_old_db::createObject(const _Tt_string&,const _Tt_string&,const _Tt_db_access_ptr&,const _Tt_db_access_ptr&) -internalC++ _Tt_old_db::deleteFileObjects(const _Tt_string&,const _Tt_db_access_ptr&) -internalC++ _Tt_old_db::deleteFileProperties(const _Tt_string&,const _Tt_db_access_ptr&) -internalC++ _Tt_old_db::deleteFileProperty(const _Tt_string&,const _Tt_db_property_ptr&,const _Tt_db_access_ptr&) -internalC++ _Tt_old_db::deleteObjectProperties(const _Tt_string&,const _Tt_db_access_ptr&) -internalC++ _Tt_old_db::deleteObjectProperty(const _Tt_string&,const _Tt_db_property_ptr&,const _Tt_db_access_ptr&) -internalC++ _Tt_old_db::deleteProperties(const _Tt_string&,int) -internalC++ _Tt_old_db::deleteProperty(const _Tt_string&,const _Tt_db_property_ptr&) -internalC++ _Tt_old_db::getAccess(const _Tt_string&,_Tt_db_access_ptr&) -internalC++ _Tt_old_db::getFile(const _Tt_string&,_Tt_string&) -internalC++ _Tt_old_db::getFileAccess(const _Tt_string&,const _Tt_db_access_ptr&,_Tt_db_access_ptr&) -internalC++ _Tt_old_db::getFileChildren(const _Tt_string&,_Tt_string_list_ptr&) -internalC++ _Tt_old_db::getFileKey(const _Tt_string&,_Tt_string&) -internalC++ _Tt_old_db::getFileObjects(const _Tt_string&,const _Tt_db_access_ptr&,_Tt_string_list_ptr&) -internalC++ _Tt_old_db::getFileProperties(const _Tt_string&,const _Tt_db_access_ptr&,_Tt_db_property_list_ptr&) -internalC++ _Tt_old_db::getFileProperty(const _Tt_string&,const _Tt_string&,const _Tt_db_access_ptr&,_Tt_db_property_ptr&) -internalC++ _Tt_old_db::getObjectAccess(const _Tt_string&,const _Tt_db_access_ptr&,_Tt_db_access_ptr&) -internalC++ _Tt_old_db::getObjectFile(const _Tt_string&,const _Tt_db_access_ptr&,_Tt_string&) -internalC++ _Tt_old_db::getObjectKey(const _Tt_string&) -internalC++ _Tt_old_db::getObjectProperties(const _Tt_string&,const _Tt_db_access_ptr&,_Tt_db_property_list_ptr&) -internalC++ _Tt_old_db::getObjectProperty(const _Tt_string&,const _Tt_string&,const _Tt_db_access_ptr&,_Tt_db_property_ptr&) -internalC++ _Tt_old_db::getProperties(const _Tt_string&,_Tt_db_property_list_ptr&) -internalC++ _Tt_old_db::getProperty(const _Tt_string&,const _Tt_string&,_Tt_db_property_ptr&) -internalC++ _Tt_old_db::removeFile(const _Tt_string&,const _Tt_db_access_ptr&) -internalC++ _Tt_old_db::removeObject(const _Tt_string&,const _Tt_db_access_ptr&) -internalC++ _Tt_old_db::setAccess(const _Tt_string&,const _Tt_db_access_ptr&) -internalC++ _Tt_old_db::setFileAccess(const _Tt_string&,const _Tt_db_access_ptr&,const _Tt_db_access_ptr&) -internalC++ _Tt_old_db::setFileFile(const _Tt_string&,const _Tt_string&,const _Tt_db_access_ptr&) -internalC++ _Tt_old_db::setFileProperties(const _Tt_string&,const _Tt_db_property_list_ptr&,const _Tt_db_access_ptr&) -internalC++ _Tt_old_db::setFileProperty(const _Tt_string&,const _Tt_db_property_ptr&,const _Tt_db_access_ptr&) -internalC++ _Tt_old_db::setObjectAccess(const _Tt_string&,const _Tt_db_access_ptr&,const _Tt_db_access_ptr&) -internalC++ _Tt_old_db::setObjectFile(const _Tt_string&,const _Tt_string&,const _Tt_db_access_ptr&) -internalC++ _Tt_old_db::setObjectProperties(const _Tt_string&,const _Tt_db_property_list_ptr&,const _Tt_db_access_ptr&) -internalC++ _Tt_old_db::setObjectProperty(const _Tt_string&,const _Tt_db_property_ptr&,const _Tt_db_access_ptr&) -internalC++ _Tt_old_db::setProperties(const _Tt_string&,const _Tt_db_property_list_ptr&) -internalC++ _Tt_old_db::setProperty(const _Tt_string&,const _Tt_db_property_ptr&) -internalC++ _Tt_old_db::verifyAccess(const _Tt_string&,const _Tt_db_access_ptr&,int,int) -internalC++ _Tt_old_db::verifyObjectAccess(const _Tt_string&,const _Tt_db_access_ptr&,int,int) -internalC++ _Tt_old_db::verifyUserOnlyObjectAccess(const _Tt_string&,const _Tt_db_access_ptr&) -internalC++ _Tt_old_db::~_Tt_old_db(void) -internalC++ _Tt_old_db_list::_Tt_old_db_list(void) -internalC++ _Tt_old_db_list::xdr(XDR*) -internalC++ _Tt_old_db_list::~_Tt_old_db_list(void) -internalC++ _Tt_old_db_list_cursor::~_Tt_old_db_list_cursor(void) -internalC++ _Tt_old_db_list_maker(void) -internalC++ _Tt_old_db_list_ptr::_Tt_old_db_list_ptr(void) -internalC++ _Tt_old_db_list_ptr::xdr(XDR*) -internalC++ _Tt_old_db_list_ptr::~_Tt_old_db_list_ptr(void) -internalC++ _Tt_old_db_list_xdr(XDR*,_Tt_object*) -internalC++ _Tt_old_db_maker(void) -internalC++ _Tt_old_db_message_info::_Tt_old_db_message_info(void) -internalC++ _Tt_old_db_message_info::xdr(XDR*) -internalC++ _Tt_old_db_message_info::~_Tt_old_db_message_info(void) -internalC++ _Tt_old_db_message_info_maker(void) -internalC++ _Tt_old_db_message_info_ptr::_Tt_old_db_message_info_ptr(void) -internalC++ _Tt_old_db_message_info_ptr::xdr(XDR*) -internalC++ _Tt_old_db_message_info_ptr::~_Tt_old_db_message_info_ptr(void) -internalC++ _Tt_old_db_message_info_xdr(XDR*,_Tt_object*) -internalC++ _Tt_old_db_partition_map_ref::_Tt_old_db_partition_map_ref(void) -internalC++ _Tt_old_db_partition_map_ref::addDB(_Tt_old_db_ptr&) -internalC++ _Tt_old_db_partition_map_ref::dbPartitionMap -internalC++ _Tt_old_db_partition_map_ref::dbPartitionMapKey(_Tt_object_ptr&) -internalC++ _Tt_old_db_partition_map_ref::flush(void) -internalC++ _Tt_old_db_partition_map_ref::getDB(const _Tt_string&,const _Tt_db_client_ptr&) -internalC++ _Tt_old_db_partition_map_ref::removeDB(const _Tt_string&) -internalC++ _Tt_old_db_partition_map_ref::~_Tt_old_db_partition_map_ref(void) -internalC++ _Tt_old_db_ptr::_Tt_old_db_ptr(void) -internalC++ _Tt_old_db_ptr::xdr(XDR*) -internalC++ _Tt_old_db_ptr::~_Tt_old_db_ptr(void) -internalC++ _Tt_old_db_table::xdr(XDR*) -internalC++ _Tt_old_db_table::~_Tt_old_db_table(void) -internalC++ _Tt_old_db_table_cursor::~_Tt_old_db_table_cursor(void) -internalC++ _Tt_old_db_table_maker(void) -internalC++ _Tt_old_db_table_ptr::_Tt_old_db_table_ptr(void) -internalC++ _Tt_old_db_table_ptr::xdr(XDR*) -internalC++ _Tt_old_db_table_ptr::~_Tt_old_db_table_ptr(void) -internalC++ _Tt_old_db_table_xdr(XDR*,_Tt_object*) -internalC++ _Tt_old_db_xdr(XDR*,_Tt_object*) -internalC++ _Tt_ostream::_Tt_ostream(_Tt_string&) -internalC++ _Tt_ostream::_Tt_ostream(void) -internalC++ _Tt_ostream::operator<<(const _Tt_message&) const -internalC++ _Tt_ostream::operator<<(const _Tt_pattern&) const -internalC++ _Tt_ostream::operator<<(long) const -internalC++ _Tt_ostream::operator<<(tt_callback_action) const -internalC++ _Tt_ostream::operator<<(tt_status) const -internalC++ _Tt_ostream::operator<<(unsigned long) const -internalC++ _Tt_ostream::operator<<(void*) const -internalC++ _Tt_ostream::operator=(FILE*) -internalC++ _Tt_ostream::operator=(_Tt_string&) -internalC++ _Tt_ostream::print(void (*)(const _Tt_ostream&,const _Tt_object*),const _Tt_object*) const -internalC++ _Tt_ostream::set_indent(const _Tt_string&) const -internalC++ _Tt_ostream::sprintf(unsigned int,const char* ...) const -internalC++ _Tt_pat_context::addValue(const _Tt_string&) -internalC++ _Tt_pat_context::addValue(int) -internalC++ _Tt_pat_context::print(const _Tt_ostream&) const -internalC++ _Tt_pat_context::print_(const _Tt_ostream&,const _Tt_object*) -internalC++ _Tt_pat_context::xdr(XDR*) -internalC++ _Tt_pat_context_list::_Tt_pat_context_list(void) -internalC++ _Tt_pat_context_list::xdr(XDR*) -internalC++ _Tt_pat_context_list::~_Tt_pat_context_list(void) -internalC++ _Tt_pat_context_list_maker(void) -internalC++ _Tt_pat_context_list_ptr::_Tt_pat_context_list_ptr(void) -internalC++ _Tt_pat_context_list_ptr::xdr(XDR*) -internalC++ _Tt_pat_context_list_ptr::~_Tt_pat_context_list_ptr(void) -internalC++ _Tt_pat_context_list_xdr(XDR*,_Tt_object*) -internalC++ _Tt_pat_context_maker(void) -internalC++ _Tt_pat_context_ptr::_Tt_pat_context_ptr(void) -internalC++ _Tt_pat_context_ptr::xdr(XDR*) -internalC++ _Tt_pat_context_xdr(XDR*,_Tt_object*) -internalC++ _Tt_patlist::_Tt_patlist(_Tt_string) -internalC++ _Tt_patlist::~_Tt_patlist(void) -internalC++ _Tt_patlist_list::_Tt_patlist_list(void) -internalC++ _Tt_patlist_list::xdr(XDR*) -internalC++ _Tt_patlist_list::~_Tt_patlist_list(void) -internalC++ _Tt_patlist_list_cursor::~_Tt_patlist_list_cursor(void) -internalC++ _Tt_patlist_list_maker(void) -internalC++ _Tt_patlist_list_ptr::_Tt_patlist_list_ptr(void) -internalC++ _Tt_patlist_list_ptr::xdr(XDR*) -internalC++ _Tt_patlist_list_ptr::~_Tt_patlist_list_ptr(void) -internalC++ _Tt_patlist_list_xdr(XDR*,_Tt_object*) -internalC++ _Tt_patlist_maker(void) -internalC++ _Tt_patlist_ptr::xdr(XDR*) -internalC++ _Tt_patlist_table::xdr(XDR*) -internalC++ _Tt_patlist_table::~_Tt_patlist_table(void) -internalC++ _Tt_patlist_table_cursor::~_Tt_patlist_table_cursor(void) -internalC++ _Tt_patlist_table_maker(void) -internalC++ _Tt_patlist_table_ptr::xdr(XDR*) -internalC++ _Tt_patlist_table_xdr(XDR*,_Tt_object*) -internalC++ _Tt_patlist_xdr(XDR*,_Tt_object*) -internalC++ _Tt_pattern::add_object(const _Tt_string&) -internalC++ _Tt_pattern::base_constructor(void) -internalC++ _Tt_pattern::context(const char*) const -internalC++ _Tt_pattern::context(int) const -internalC++ _Tt_pattern::contextsCount(void) const -internalC++ _Tt_pattern::print(const _Tt_ostream&) const -internalC++ _Tt_pattern_list::xdr(XDR*) -internalC++ _Tt_pattern_list::~_Tt_pattern_list(void) -internalC++ _Tt_pattern_list_maker(void) -internalC++ _Tt_pattern_list_ptr::xdr(XDR*) -internalC++ _Tt_pattern_list_xdr(XDR*,_Tt_object*) -internalC++ _Tt_pattern_maker(void) -internalC++ _Tt_pattern_ptr::xdr(XDR*) -internalC++ _Tt_pattern_xdr(XDR*,_Tt_object*) -internalC++ _Tt_pid_t_rec::_Tt_pid_t_rec(pid_t) -internalC++ _Tt_pid_t_rec::_Tt_pid_t_rec(void) -internalC++ _Tt_pid_t_rec::print(const _Tt_ostream&) const -internalC++ _Tt_pid_t_rec::xdr(XDR*) -internalC++ _Tt_pid_t_rec::~_Tt_pid_t_rec(void) -internalC++ _Tt_pid_t_rec_list::_Tt_pid_t_rec_list(void) -internalC++ _Tt_pid_t_rec_list::xdr(XDR*) -internalC++ _Tt_pid_t_rec_list::~_Tt_pid_t_rec_list(void) -internalC++ _Tt_pid_t_rec_list_cursor::~_Tt_pid_t_rec_list_cursor(void) -internalC++ _Tt_pid_t_rec_list_maker(void) -internalC++ _Tt_pid_t_rec_list_ptr::xdr(XDR*) -internalC++ _Tt_pid_t_rec_list_xdr(XDR*,_Tt_object*) -internalC++ _Tt_pid_t_rec_maker(void) -internalC++ _Tt_pid_t_rec_ptr::_Tt_pid_t_rec_ptr(void) -internalC++ _Tt_pid_t_rec_ptr::xdr(XDR*) -internalC++ _Tt_pid_t_rec_ptr::~_Tt_pid_t_rec_ptr(void) -internalC++ _Tt_pid_t_rec_xdr(XDR*,_Tt_object*) -internalC++ _Tt_procid::fd(void) -internalC++ _Tt_procid::is_equal(_Tt_string&) -internalC++ _Tt_procid::port(void) const -internalC++ _Tt_procid::print(const _Tt_ostream&) const -internalC++ _Tt_procid_list::xdr(XDR*) -internalC++ _Tt_procid_list_maker(void) -internalC++ _Tt_procid_list_ptr::xdr(XDR*) -internalC++ _Tt_procid_list_xdr(XDR*,_Tt_object*) -internalC++ _Tt_procid_maker(void) -internalC++ _Tt_procid_ptr::xdr(XDR*) -internalC++ _Tt_procid_table::xdr(XDR*) -internalC++ _Tt_procid_table::~_Tt_procid_table(void) -internalC++ _Tt_procid_table_cursor::~_Tt_procid_table_cursor(void) -internalC++ _Tt_procid_table_maker(void) -internalC++ _Tt_procid_table_ptr::_Tt_procid_table_ptr(void) -internalC++ _Tt_procid_table_ptr::xdr(XDR*) -internalC++ _Tt_procid_table_ptr::~_Tt_procid_table_ptr(void) -internalC++ _Tt_procid_table_xdr(XDR*,_Tt_object*) -internalC++ _Tt_procid_xdr(XDR*,_Tt_object*) -internalC++ _Tt_qmsg_info::xdr(XDR*) -internalC++ _Tt_qmsg_info::~_Tt_qmsg_info(void) -internalC++ _Tt_qmsg_info_maker(void) -internalC++ _Tt_qmsg_info_ptr::xdr(XDR*) -internalC++ _Tt_qmsg_info_xdr(XDR*,_Tt_object*) -internalC++ _Tt_rpc_client::_Tt_rpc_client(int) -internalC++ _Tt_rpc_client::call(int,xdrproc_t,char*,xdrproc_t,char*,int) -internalC++ _Tt_rpc_client::init(_Tt_host_ptr&,int,int,uid_t,_Tt_auth&) -internalC++ _Tt_rpc_client::socket(void) -internalC++ _Tt_rpc_client::~_Tt_rpc_client(void) -internalC++ _Tt_rpc_client_maker(void) -internalC++ _Tt_rpc_client_ptr::_Tt_rpc_client_ptr(void) -internalC++ _Tt_rpc_client_ptr::xdr(XDR*) -internalC++ _Tt_rpc_client_ptr::~_Tt_rpc_client_ptr(void) -internalC++ _Tt_rpc_client_xdr(XDR*,_Tt_object*) -internalC++ _Tt_session::Xid(_Tt_string) -internalC++ _Tt_session_list::_Tt_session_list(void) -internalC++ _Tt_session_list::xdr(XDR*) -internalC++ _Tt_session_list::~_Tt_session_list(void) -internalC++ _Tt_session_list_cursor::~_Tt_session_list_cursor(void) -internalC++ _Tt_session_list_maker(void) -internalC++ _Tt_session_list_ptr::_Tt_session_list_ptr(void) -internalC++ _Tt_session_list_ptr::xdr(XDR*) -internalC++ _Tt_session_list_ptr::~_Tt_session_list_ptr(void) -internalC++ _Tt_session_list_xdr(XDR*,_Tt_object*) -internalC++ _Tt_session_maker(void) -internalC++ _Tt_session_prop::_Tt_session_prop(_Tt_string,_Tt_string_list_ptr) -internalC++ _Tt_session_prop::_Tt_session_prop(void) -internalC++ _Tt_session_prop::~_Tt_session_prop(void) -internalC++ _Tt_session_prop_list::xdr(XDR*) -internalC++ _Tt_session_prop_list::~_Tt_session_prop_list(void) -internalC++ _Tt_session_prop_list_maker(void) -internalC++ _Tt_session_prop_list_ptr::_Tt_session_prop_list_ptr(void) -internalC++ _Tt_session_prop_list_ptr::xdr(XDR*) -internalC++ _Tt_session_prop_list_ptr::~_Tt_session_prop_list_ptr(void) -internalC++ _Tt_session_prop_list_xdr(XDR*,_Tt_object*) -internalC++ _Tt_session_prop_maker(void) -internalC++ _Tt_session_prop_ptr::_Tt_session_prop_ptr(void) -internalC++ _Tt_session_prop_ptr::xdr(XDR*) -internalC++ _Tt_session_prop_xdr(XDR*,_Tt_object*) -internalC++ _Tt_session_ptr::xdr(XDR*) -internalC++ _Tt_session_table::xdr(XDR*) -internalC++ _Tt_session_table::~_Tt_session_table(void) -internalC++ _Tt_session_table_cursor::~_Tt_session_table_cursor(void) -internalC++ _Tt_session_table_maker(void) -internalC++ _Tt_session_table_ptr::_Tt_session_table_ptr(void) -internalC++ _Tt_session_table_ptr::xdr(XDR*) -internalC++ _Tt_session_table_ptr::~_Tt_session_table_ptr(void) -internalC++ _Tt_session_table_xdr(XDR*,_Tt_object*) -internalC++ _Tt_session_xdr(XDR*,_Tt_object*) -internalC++ _Tt_stream_socket::_Tt_stream_socket(void) -internalC++ _Tt_stream_socket::accept(void) -internalC++ _Tt_stream_socket::port(void) -internalC++ _Tt_stream_socket::read_would_block(void) -internalC++ _Tt_stream_socket::recv(char*,int) -internalC++ _Tt_stream_socket::sock(void) -internalC++ _Tt_stream_socket::~_Tt_stream_socket(void) -internalC++ _Tt_stream_socket_maker(void) -internalC++ _Tt_stream_socket_ptr::_Tt_stream_socket_ptr(void) -internalC++ _Tt_stream_socket_ptr::xdr(XDR*) -internalC++ _Tt_stream_socket_ptr::~_Tt_stream_socket_ptr(void) -internalC++ _Tt_stream_socket_xdr(XDR*,_Tt_object*) -internalC++ _Tt_string::cat(char) const -internalC++ _Tt_string::cat(int) const -internalC++ _Tt_string::cat(long) const -internalC++ _Tt_string::cat(unsigned int) const -internalC++ _Tt_string::cat(unsigned long) const -internalC++ _Tt_string::hash(int) const -internalC++ _Tt_string::index(const char*) const -internalC++ _Tt_string::mid(int,int) const -internalC++ _Tt_string::print(void) const -internalC++ _Tt_string::quote_nulls(void) const -internalC++ _Tt_string::replace(const char*,const _Tt_string&) const -internalC++ _Tt_string::split(const char*,_Tt_string&) const -internalC++ _Tt_string::split(int,_Tt_string&) const -internalC++ _Tt_string::strchr(const char*) const -internalC++ _Tt_string::unquote_nulls(void) const -internalC++ _Tt_string_buf::_Tt_string_buf(const _Tt_string_buf&) -internalC++ _Tt_string_buf::set(const unsigned char*,int) -internalC++ _Tt_string_buf::xdr(XDR*) -internalC++ _Tt_string_buf::xdr_1(XDR*) -internalC++ _Tt_string_buf::xdr_2(XDR*) -internalC++ _Tt_string_buf::~_Tt_string_buf(void) -internalC++ _Tt_string_buf_list::_Tt_string_buf_list(void) -internalC++ _Tt_string_buf_list::xdr(XDR*) -internalC++ _Tt_string_buf_list::~_Tt_string_buf_list(void) -internalC++ _Tt_string_buf_list_cursor::~_Tt_string_buf_list_cursor(void) -internalC++ _Tt_string_buf_list_maker(void) -internalC++ _Tt_string_buf_list_ptr::_Tt_string_buf_list_ptr(void) -internalC++ _Tt_string_buf_list_xdr(XDR*,_Tt_object*) -internalC++ _Tt_string_buf_maker(void) -internalC++ _Tt_string_buf_ptr::xdr(XDR*) -internalC++ _Tt_string_buf_ptr::_Tt_string_buf_ptr(void) -internalC++ _Tt_string_buf_xdr(XDR*,_Tt_object*) -internalC++ _Tt_string_list::_Tt_string_list(const _Tt_string_buf_list&) -internalC++ _Tt_string_list::_Tt_string_list(const _Tt_string_list&) -internalC++ _Tt_string_map::_Tt_string_map(void) -internalC++ _Tt_string_map::~_Tt_string_map(void) -internalC++ _Tt_string_map_maker(void) -internalC++ _Tt_string_map_ptr::xdr(XDR*) -internalC++ _Tt_string_map_xdr(XDR*,_Tt_object*) -#ifdef OPT_XTHREADS -internalC++ _Tt_threadspecific::_Tt_threadspecific(const _Tt_c_session_ptr&,const _Tt_c_procid_ptr&) -internalC++ _Tt_threadspecific::free_procid(void) -internalC++ _Tt_threadspecific::thread_stgstack(void) -#endif -internalC++ _Tt_trace::_allowed2trace(void) -internalC++ _Tt_trace::_entry(void) -internalC++ _Tt_trace::_exit(int,const char* (*)(int),int) -internalC++ _Tt_trace::_pstream -internalC++ _Tt_trace::_toggled_off -internalC++ _Tt_trace::any_tracing(void) -internalC++ _Tt_trace::entry(_Tt_message&,_Tt_dispatch_reason) -internalC++ _Tt_trace::entry(_Tt_message&,const _Tt_procid&) -internalC++ _Tt_trace::entry(_Tt_message&,tt_state) -internalC++ _Tt_trace::entry(char*,_Tt_entry_pt,va_list) -internalC++ _Tt_trace::entry(tt_callback_action (*)(_Tt_message_handle*,_Tt_pattern_handle*),_Tt_message_handle*,_Tt_pattern_handle*) -internalC++ _Tt_trace::exit(_Tt_message_handle*) -internalC++ _Tt_trace::exit(_Tt_pattern_handle*) -internalC++ _Tt_trace::exit(char*) -internalC++ _Tt_trace::exit(int) -internalC++ _Tt_trace::exit(tt_address) -internalC++ _Tt_trace::exit(tt_callback_action) -internalC++ _Tt_trace::exit(tt_category) -internalC++ _Tt_trace::exit(tt_class) -internalC++ _Tt_trace::exit(tt_disposition) -internalC++ _Tt_trace::exit(tt_mode) -internalC++ _Tt_trace::exit(tt_scope) -internalC++ _Tt_trace::exit(tt_state) -internalC++ _Tt_trace::exit(tt_status) -internalC++ _Tt_trace::exit(void) -internalC++ _Tt_trace::exit(void*) -internalC++ _Tt_trace::exitq(void) -internalC++ _Tt_trace::fini(void) -internalC++ _Tt_trace::init(int) -internalC++ _Tt_trace::operator<<(_Tt_message&) const -internalC++ _Tt_trace::operator<<(tt_status) const -internalC++ _Tt_trace::toggle(void) -internalC++ _Tt_trace_parser::_Tt_trace_parser(_Tt_trace_parser&) -internalC++ _Tt_trace_parser::_Tt_trace_parser(const char*) -internalC++ _Tt_trace_parser::_Tt_trace_parser(int) -internalC++ _Tt_trace_parser::_Tt_trace_parser(void) -internalC++ _Tt_trace_parser::_is_traced(const _Tt_message&) const -internalC++ _Tt_trace_parser::add_function(const _Tt_string&) -internalC++ _Tt_trace_parser::add_handler_ptype(const _Tt_string&) -internalC++ _Tt_trace_parser::add_op(const _Tt_string&) -internalC++ _Tt_trace_parser::add_sender_ptype(const _Tt_string&) -internalC++ _Tt_trace_parser::add_state(int) -internalC++ _Tt_trace_parser::any_tracing(void) -internalC++ _Tt_trace_parser::attributes_val(void) const -internalC++ _Tt_trace_parser::clear_functions(void) -internalC++ _Tt_trace_parser::clear_handler_ptypes(void) -internalC++ _Tt_trace_parser::clear_ops(void) -internalC++ _Tt_trace_parser::clear_sender_ptypes(void) -internalC++ _Tt_trace_parser::clear_states(void) -internalC++ _Tt_trace_parser::follow_val(void) -internalC++ _Tt_trace_parser::handler_ptypes_val(void) -internalC++ _Tt_trace_parser::ifunction_val(void) -internalC++ _Tt_trace_parser::is_traced(_Tt_entry_pt) const -internalC++ _Tt_trace_parser::is_traced(const _Tt_message&) const -internalC++ _Tt_trace_parser::is_traced(const _Tt_message&,_Tt_dispatch_stage) const -internalC++ _Tt_trace_parser::mode_val(void) -internalC++ _Tt_trace_parser::ops_val(void) -internalC++ _Tt_trace_parser::parse(void) -internalC++ _Tt_trace_parser::sender_ptypes_val(void) -internalC++ _Tt_trace_parser::set_attributes(int) -internalC++ _Tt_trace_parser::set_follow(int) -internalC++ _Tt_trace_parser::set_function(int) -internalC++ _Tt_trace_parser::set_sink(const _Tt_string&,int) -internalC++ _Tt_trace_parser::sfunction_val(void) -internalC++ _Tt_trace_parser::sink_val(void) -internalC++ _Tt_trace_parser::states_val(void) -internalC++ _Tt_trace_parser::tracer_init(void) -internalC++ _Tt_trace_parser::~_Tt_trace_parser(void) -internalC++ _Tt_trace_stream::_Tt_trace_stream(const char*) -internalC++ _Tt_trace_stream::_Tt_trace_stream(int) -internalC++ _Tt_trace_stream::_Tt_trace_stream(void) -internalC++ _Tt_trace_stream::decr_indent(void) const -internalC++ _Tt_trace_stream::incr_indent(void) const -internalC++ _Tt_trace_stream::init(void) -internalC++ _Tt_trace_stream::~_Tt_trace_stream(void) -internalC++ _Tt_typecb::_Tt_typecb(const _Tt_string&,int) -internalC++ _Tt_typecb::_Tt_typecb(void) -internalC++ _Tt_typecb::add_callback(tt_callback_action (*)(_Tt_message_handle*,_Tt_pattern_handle*)) -internalC++ _Tt_typecb::opnum(void) -internalC++ _Tt_typecb::run_callbacks(_Tt_message_handle*,_Tt_pattern_handle*) -internalC++ _Tt_typecb::get_typename(void) -internalC++ _Tt_typecb::~_Tt_typecb(void) -internalC++ _Tt_typecb_list::_Tt_typecb_list(void) -internalC++ _Tt_typecb_list::xdr(XDR*) -internalC++ _Tt_typecb_list::~_Tt_typecb_list(void) -internalC++ _Tt_typecb_list_cursor::~_Tt_typecb_list_cursor(void) -internalC++ _Tt_typecb_list_maker(void) -internalC++ _Tt_typecb_list_ptr::_Tt_typecb_list_ptr(void) -internalC++ _Tt_typecb_list_ptr::xdr(XDR*) -internalC++ _Tt_typecb_list_ptr::~_Tt_typecb_list_ptr(void) -internalC++ _Tt_typecb_list_xdr(XDR*,_Tt_object*) -internalC++ _Tt_typecb_maker(void) -internalC++ _Tt_typecb_ptr::_Tt_typecb_ptr(void) -internalC++ _Tt_typecb_ptr::xdr(XDR*) -internalC++ _Tt_typecb_ptr::~_Tt_typecb_ptr(void) -internalC++ _Tt_typecb_table::xdr(XDR*) -internalC++ _Tt_typecb_table::~_Tt_typecb_table(void) -internalC++ _Tt_typecb_table_cursor::~_Tt_typecb_table_cursor(void) -internalC++ _Tt_typecb_table_maker(void) -internalC++ _Tt_typecb_table_ptr::_Tt_typecb_table_ptr(void) -internalC++ _Tt_typecb_table_ptr::xdr(XDR*) -internalC++ _Tt_typecb_table_ptr::~_Tt_typecb_table_ptr(void) -internalC++ _Tt_typecb_table_xdr(XDR*,_Tt_object*) -internalC++ _Tt_typecb_xdr(XDR*,_Tt_object*) -internalC++ _Ttmedia_ptype_info::_Ttmedia_ptype_info(_Tt_message_handle* (*)(_Tt_message_handle*,void*,Tttk_op,tt_status,unsigned char*,int,char*,char*),void*) -internalC++ _TttkItem2Free::_TttkItem2Free(_Tt_message_handle*) -internalC++ _TttkItem2Free::_TttkItem2Free(_Tt_pattern_handle*) -internalC++ _TttkItem2Free::_TttkItem2Free(char*) -internalC++ _TttkItem2Free::_TttkItem2Free(void) -internalC++ _TttkItem2Free::operator=(_Tt_message_handle*) -internalC++ _TttkItem2Free::operator=(_Tt_pattern_handle*) -internalC++ _TttkItem2Free::operator=(char*) -internalC++ _TttkItem2Free::~_TttkItem2Free(void) -internalC++ _TttkList2Free::_TttkList2Free(unsigned int) -internalC++ _TttkList2Free::_destruct(void) -internalC++ _TttkList2Free::_item(int) -internalC++ _TttkList2Free::flush(void) -internalC++ _TttkList2Free::operator+=(_Tt_message_handle*) -internalC++ _TttkList2Free::operator+=(_Tt_pattern_handle*) -internalC++ _TttkList2Free::operator+=(char*) -internalC++ _TttkList2Free::~_TttkList2Free(void) -internalC++ _prepend_P_to_sessid(const char*,_Tt_string&) -internalC++ _ttDesktopMessageFinish(_Tt_message_handle*,_Tt_message_handle*,int) -internalC++ _ttDesktopPatternFinish(_Tt_pattern_handle*,_Tt_message_handle*,int) -internalC++ _ttDtCallbackAction(_Tt_message_handle*) -internalC++ _ttDtGetLocaleCB(_Tt_message_handle*,_Tt_pattern_handle*,void*,void*) -internalC++ _ttDtMessageCB(_Tt_message_handle*,_Tt_pattern_handle*) -internalC++ _ttDtMessageGong(_Tt_message_handle*,tt_status,const char*,int,int) -internalC++ _ttDtOp(Tttk_op) -internalC++ _ttDtPError(const char*,const char*) -internalC++ _ttDtPMessageCreate(_Tt_message_handle*,tt_class,tt_scope,const char*,Tttk_op,_Tt_message_handle* (*)(_Tt_message_handle*,_Tt_pattern_handle*,void*,void*),void*,void*) -internalC++ _ttDtPatternCreate(tt_category,tt_scope,int,const char*,Tttk_op,_Tt_message_handle* (*)(_Tt_message_handle*,_Tt_pattern_handle*,void*,void*),void*,void*,int) -internalC++ _ttDtPrint(const char*,const char*) -internalC++ _ttDtPrintInt(const char*,const char*,int) -internalC++ _ttDtPrintStatus(const char*,const char*,tt_status) -internalC++ _ttMeOpnumCB(_Tt_message_handle*,_Tt_pattern_handle*) -internalC++ _ttTkNoteReplyStatus(_Tt_message_handle*,_Tt_pattern_handle*,void*,void*) -internalC++ _tt_X_session(const char*) -internalC++ _tt_add_file_prop_1(_tt_add_file_prop_args*,CLIENT*) -internalC++ _tt_add_file_prop_1(_tt_add_file_prop_args*,const _Tt_db_client_ptr&) -internalC++ _tt_add_obj_prop_1(_tt_add_obj_prop_args*,CLIENT*) -internalC++ _tt_add_obj_prop_1(_tt_add_obj_prop_args*,const _Tt_db_client_ptr&) -internalC++ _tt_addsession_1(_Tt_session_args*,CLIENT*) -internalC++ _tt_api_handle_print(FILE*,const _Tt_object*) -internalC++ _tt_api_stg_stack_elm_print(FILE*,const _Tt_object*) -internalC++ _tt_api_userdata_print(FILE*,const _Tt_object*) -internalC++ _tt_arg_print(const _Tt_ostream&,const _Tt_object*) -internalC++ _tt_base64_decode(const char*) -internalC++ _tt_bcontext_join(const char*,const unsigned char*,int) -internalC++ _tt_bcontext_quit(const char*,const unsigned char*,int) -internalC++ _tt_close(void) -internalC++ _tt_context_join(const char*,const char*) -internalC++ _tt_context_quit(const char*,const char*) -internalC++ _tt_create_file_1(_tt_create_file_args*,CLIENT*) -internalC++ _tt_create_file_1(_tt_create_file_args*,const _Tt_db_client_ptr&) -internalC++ _tt_create_obj_1(_tt_create_obj_args*,CLIENT*) -internalC++ _tt_create_obj_1(_tt_create_obj_args*,const _Tt_db_client_ptr&) -internalC++ _tt_db_network_path(const _Tt_string&,_Tt_string&,_Tt_string&,_Tt_string&,_Tt_string&) -internalC++ _tt_db_objid_to_key(const _Tt_string&) -internalC++ _tt_default_file(void) -internalC++ _tt_default_file_set(const char*) -internalC++ _tt_default_procid(void) -internalC++ _tt_default_procid_set(const char*) -internalC++ _tt_default_ptype(void) -internalC++ _tt_default_ptype_set(const char*) -internalC++ _tt_default_session(void) -internalC++ _tt_default_session_set(const char*) -internalC++ _tt_delete_file_prop_1(_tt_del_file_prop_args*,CLIENT*) -internalC++ _tt_delete_file_prop_1(_tt_del_file_prop_args*,const _Tt_db_client_ptr&) -internalC++ _tt_delete_obj_prop_1(_tt_del_obj_prop_args*,CLIENT*) -internalC++ _tt_delete_obj_prop_1(_tt_del_obj_prop_args*,const _Tt_db_client_ptr&) -internalC++ _tt_delete_session_1(_tt_delete_session_args*,CLIENT*) -internalC++ _tt_delsession_1(_Tt_session_args*,CLIENT*) -internalC++ _tt_dequeue_messages_1(_tt_dequeue_msgs_args*,CLIENT*) -internalC++ _tt_dequeue_messages_1(_tt_dequeue_msgs_args*,const _Tt_db_client_ptr&) -internalC++ _tt_enumname(_Tt_entry_pt) -internalC++ _tt_enumname(tt_address) -internalC++ _tt_enumname(tt_callback_action) -internalC++ _tt_enumname(tt_disposition) -internalC++ _tt_enumname(tt_filter_action) -internalC++ _tt_enumname(tt_state) -internalC++ _tt_error_int(tt_status) -internalC++ _tt_error_pointer(tt_status) -internalC++ _tt_fd(void) -internalC++ _tt_file_copy(const char*,const char*) -internalC++ _tt_file_destroy(const char*) -internalC++ _tt_file_join(const char*) -internalC++ _tt_file_move(const char*,const char*) -internalC++ _tt_file_netfile_1(_tt_file_netfile_args*,CLIENT*) -internalC++ _tt_file_objects_query(const char*,tt_filter_action (*)(const char*,void*,void*),void*,void*) -internalC++ _tt_file_quit(const char*) -internalC++ _tt_free(char*) -internalC++ _tt_free_rpc_message(const _tt_message&) -internalC++ _tt_garbage_collect_1(void*,CLIENT*) -internalC++ _tt_get_all_sessions_1(_tt_get_all_sessions_args*,CLIENT*) -internalC++ _tt_get_api_error(_Tt_db_results,api_module) -internalC++ _tt_get_file_access_1(_tt_get_file_access_args*,CLIENT*) -internalC++ _tt_get_file_access_1(_tt_get_file_access_args*,const _Tt_db_client_ptr&) -internalC++ _tt_get_file_objs_1(_tt_get_file_objs_args*,CLIENT*) -internalC++ _tt_get_file_objs_1(_tt_get_file_objs_args*,const _Tt_db_client_ptr&) -internalC++ _tt_get_file_partition_1(char**,CLIENT*) -internalC++ _tt_get_file_partition_1(char**,const _Tt_db_client_ptr&) -internalC++ _tt_get_file_prop_1(_tt_get_file_prop_args*,CLIENT*) -internalC++ _tt_get_file_prop_1(_tt_get_file_prop_args*,const _Tt_db_client_ptr&) -internalC++ _tt_get_file_props_1(_tt_get_file_props_args*,CLIENT*) -internalC++ _tt_get_file_props_1(_tt_get_file_props_args*,const _Tt_db_client_ptr&) -internalC++ _tt_get_first_set_env_var(int ...) -internalC++ _tt_get_min_auth_level_1(void*,CLIENT*) -internalC++ _tt_get_obj_access_1(_tt_get_obj_access_args*,CLIENT*) -internalC++ _tt_get_obj_access_1(_tt_get_obj_access_args*,const _Tt_db_client_ptr&) -internalC++ _tt_get_obj_file_1(_tt_get_obj_file_args*,CLIENT*) -internalC++ _tt_get_obj_file_1(_tt_get_obj_file_args*,const _Tt_db_client_ptr&) -internalC++ _tt_get_obj_prop_1(_tt_get_obj_prop_args*,CLIENT*) -internalC++ _tt_get_obj_prop_1(_tt_get_obj_prop_args*,const _Tt_db_client_ptr&) -internalC++ _tt_get_obj_props_1(_tt_get_obj_props_args*,CLIENT*) -internalC++ _tt_get_obj_props_1(_tt_get_obj_props_args*,const _Tt_db_client_ptr&) -internalC++ _tt_get_obj_type_1(_tt_get_obj_type_args*,CLIENT*) -internalC++ _tt_get_rpc_message(const _tt_message&,_Tt_message_ptr&) -internalC++ _tt_get_rpc_messages(const _tt_message_list&,_Tt_message_list_ptr&) -internalC++ _tt_get_rpc_result(void) -internalC++ _tt_gethostid(void) -internalC++ _tt_getoidaccess_1(_Tt_oidaccess_args*,CLIENT*) -internalC++ _tt_gettype_1(_Tt_spec_props*,CLIENT*) -internalC++ _tt_host_addr(_Tt_object_ptr&) -internalC++ _tt_host_file_netfile(const char*,const char*) -internalC++ _tt_host_name(_Tt_object_ptr&) -internalC++ _tt_host_netfile_file(const char*,const char*) -internalC++ _tt_icontext_join(const char*,int) -internalC++ _tt_icontext_quit(const char*,int) -internalC++ _tt_initial_session(void) -internalC++ _tt_int_error(int) -internalC++ _tt_int_rec_print(const _Tt_ostream&,const _Tt_object*) -internalC++ _tt_internal_init(void) -internalC++ _tt_is_file_in_db_1(_tt_is_file_in_db_args*,CLIENT*) -internalC++ _tt_is_file_in_db_1(_tt_is_file_in_db_args*,const _Tt_db_client_ptr&) -internalC++ _tt_is_obj_in_db_1(_tt_is_obj_in_db_args*,CLIENT*) -internalC++ _tt_is_obj_in_db_1(_tt_is_obj_in_db_args*,const _Tt_db_client_ptr&) -internalC++ _tt_isaddindex_1(_Tt_isaddindex_args*,CLIENT*) -internalC++ _tt_isbuild_1(_Tt_isbuild_args*,CLIENT*) -internalC++ _tt_isclose_1(int*,CLIENT*) -internalC++ _tt_iscntl_1(_Tt_iscntl_args*,CLIENT*) -internalC++ _tt_isdelrec_1(_Tt_isdelrec_args*,CLIENT*) -internalC++ _tt_iserase_1(char**,CLIENT*) -internalC++ _tt_isopen_1(_Tt_isopen_args*,CLIENT*) -internalC++ _tt_isread_1(_Tt_isread_args*,CLIENT*) -internalC++ _tt_isrewrec_1(_Tt_isrewrec_args*,CLIENT*) -internalC++ _tt_isstart_1(_Tt_isstart_args*,CLIENT*) -internalC++ _tt_iswrite_1(_Tt_iswrite_args*,CLIENT*) -internalC++ _tt_load_xlib(void) -internalC++ _tt_load_xt(void) -internalC++ _tt_local_network_path(const _Tt_string&) -internalC++ _tt_log_error(int,int,char*,char*) -internalC++ _tt_malloc(size_t) -internalC++ _tt_mark(void) -internalC++ _tt_message_abstain(_Tt_message_handle*) -internalC++ _tt_message_abstainer(_Tt_message_handle*,int) -internalC++ _tt_message_abstainers_count(_Tt_message_handle*) -internalC++ _tt_message_accept(_Tt_message_handle*) -internalC++ _tt_message_accepter(_Tt_message_handle*,int) -internalC++ _tt_message_accepters_count(_Tt_message_handle*) -internalC++ _tt_message_address(_Tt_message_handle*) -internalC++ _tt_message_address_set(_Tt_message_handle*,tt_address) -internalC++ _tt_message_arg_add(_Tt_message_handle*,tt_mode,const char*,const char*) -internalC++ _tt_message_arg_bval(_Tt_message_handle*,int,unsigned char**,int*) -internalC++ _tt_message_arg_bval_set(_Tt_message_handle*,int,const unsigned char*,int) -internalC++ _tt_message_arg_ival(_Tt_message_handle*,int,int*) -internalC++ _tt_message_arg_ival_set(_Tt_message_handle*,int,int) -internalC++ _tt_message_arg_mode(_Tt_message_handle*,int) -internalC++ _tt_message_arg_type(_Tt_message_handle*,int) -internalC++ _tt_message_arg_val(_Tt_message_handle*,int) -internalC++ _tt_message_arg_val_set(_Tt_message_handle*,int,const char*) -internalC++ _tt_message_arg_xval(_Tt_message_handle*,int,xdrproc_t,void*) -internalC++ _tt_message_arg_xval_set(_Tt_message_handle*,int,xdrproc_t,void*) -internalC++ _tt_message_args_count(_Tt_message_handle*) -internalC++ _tt_message_barg_add(_Tt_message_handle*,tt_mode,const char*,const unsigned char*,int) -internalC++ _tt_message_bcontext_set(_Tt_message_handle*,const char*,const unsigned char*,int) -internalC++ _tt_message_callback_add(_Tt_message_handle*,tt_callback_action (*)(_Tt_message_handle*,_Tt_pattern_handle*)) -internalC++ _tt_message_class(_Tt_message_handle*) -internalC++ _tt_message_class_set(_Tt_message_handle*,tt_class) -internalC++ _tt_message_context_bval(_Tt_message_handle*,const char*,unsigned char**,int*) -internalC++ _tt_message_context_ival(_Tt_message_handle*,const char*,int*) -internalC++ _tt_message_context_set(_Tt_message_handle*,const char*,const char*) -internalC++ _tt_message_context_slotname(_Tt_message_handle*,int) -internalC++ _tt_message_context_val(_Tt_message_handle*,const char*) -internalC++ _tt_message_context_xval(_Tt_message_handle*,const char*,xdrproc_t,void*) -internalC++ _tt_message_contexts_count(_Tt_message_handle*) -internalC++ _tt_message_create(void) -internalC++ _tt_message_create_super(_Tt_message_handle*) -internalC++ _tt_message_destroy(_Tt_message_handle*) -internalC++ _tt_message_disposition(_Tt_message_handle*) -internalC++ _tt_message_disposition_set(_Tt_message_handle*,tt_disposition) -internalC++ _tt_message_fail(_Tt_message_handle*) -internalC++ _tt_message_file(_Tt_message_handle*) -internalC++ _tt_message_file_set(_Tt_message_handle*,const char*) -internalC++ _tt_message_gid(_Tt_message_handle*) -internalC++ _tt_message_handler(_Tt_message_handle*) -internalC++ _tt_message_handler_ptype(_Tt_message_handle*) -internalC++ _tt_message_handler_ptype_set(_Tt_message_handle*,const char*) -internalC++ _tt_message_handler_set(_Tt_message_handle*,const char*) -internalC++ _tt_message_iarg_add(_Tt_message_handle*,tt_mode,const char*,int) -internalC++ _tt_message_icontext_set(_Tt_message_handle*,const char*,int) -internalC++ _tt_message_id(_Tt_message_handle*) -internalC++ _tt_message_object(_Tt_message_handle*) -internalC++ _tt_message_object_set(_Tt_message_handle*,const char*) -internalC++ _tt_message_op(_Tt_message_handle*) -internalC++ _tt_message_op_set(_Tt_message_handle*,const char*) -internalC++ _tt_message_opnum(_Tt_message_handle*) -internalC++ _tt_message_otype(_Tt_message_handle*) -internalC++ _tt_message_otype_set(_Tt_message_handle*,const char*) -internalC++ _tt_message_pattern(_Tt_message_handle*) -internalC++ _tt_message_print(_Tt_message_handle*) -internalC++ _tt_message_receive(void) -internalC++ _tt_message_reject(_Tt_message_handle*) -internalC++ _tt_message_rejecter(_Tt_message_handle*,int) -internalC++ _tt_message_rejecters_count(_Tt_message_handle*) -internalC++ _tt_message_reply(_Tt_message_handle*) -internalC++ _tt_message_scope(_Tt_message_handle*) -internalC++ _tt_message_scope_set(_Tt_message_handle*,tt_scope) -internalC++ _tt_message_send(_Tt_message_handle*) -internalC++ _tt_message_send_on_exit(_Tt_message_handle*) -internalC++ _tt_message_sender(_Tt_message_handle*) -internalC++ _tt_message_sender_ptype(_Tt_message_handle*) -internalC++ _tt_message_sender_ptype_set(_Tt_message_handle*,const char*) -internalC++ _tt_message_session(_Tt_message_handle*) -internalC++ _tt_message_session_set(_Tt_message_handle*,const char*) -internalC++ _tt_message_state(_Tt_message_handle*) -internalC++ _tt_message_status(_Tt_message_handle*) -internalC++ _tt_message_status_set(_Tt_message_handle*,int) -internalC++ _tt_message_status_string(_Tt_message_handle*) -internalC++ _tt_message_status_string_set(_Tt_message_handle*,const char*) -internalC++ _tt_message_uid(_Tt_message_handle*) -internalC++ _tt_message_user(_Tt_message_handle*,int) -internalC++ _tt_message_user_set(_Tt_message_handle*,int,void*) -internalC++ _tt_message_xarg_add(_Tt_message_handle*,tt_mode,const char*,xdrproc_t,void*) -internalC++ _tt_message_xcontext_set(_Tt_message_handle*,const char*,xdrproc_t,void*) -internalC++ _tt_mfs_1(char**,CLIENT*) -internalC++ _tt_min_auth_level_1(char**,CLIENT*,clnt_stat*) -internalC++ _tt_move_file_1(_tt_move_file_args*,CLIENT*) -internalC++ _tt_move_file_1(_tt_move_file_args*,const _Tt_db_client_ptr&) -internalC++ _tt_netfile_file_1(_tt_file_netfile_args*,CLIENT*) -internalC++ _tt_objid_equal(const char*,const char*) -internalC++ _tt_objid_objkey(const char*) -internalC++ _tt_onotice_create(const char*,const char*) -internalC++ _tt_open(void) -internalC++ _tt_orequest_create(const char*,const char*) -internalC++ _tt_otype_base(const char*) -internalC++ _tt_otype_derived(const char*,int) -internalC++ _tt_otype_deriveds_count(const char*) -internalC++ _tt_otype_hsig_arg_mode(const char*,int,int) -internalC++ _tt_otype_hsig_arg_type(const char*,int,int) -internalC++ _tt_otype_hsig_args_count(const char*,int) -internalC++ _tt_otype_hsig_count(const char*) -internalC++ _tt_otype_hsig_op(const char*,int) -internalC++ _tt_otype_is_derived(const char*,const char*) -internalC++ _tt_otype_opnum_callback_add(const char*,int,tt_callback_action (*)(_Tt_message_handle*,_Tt_pattern_handle*)) -internalC++ _tt_otype_osig_arg_mode(const char*,int,int) -internalC++ _tt_otype_osig_arg_type(const char*,int,int) -internalC++ _tt_otype_osig_args_count(const char*,int) -internalC++ _tt_otype_osig_count(const char*) -internalC++ _tt_otype_osig_op(const char*,int) -internalC++ _tt_pattern_address_add(_Tt_pattern_handle*,tt_address) -internalC++ _tt_pattern_arg_add(_Tt_pattern_handle*,tt_mode,const char*,const char*) -internalC++ _tt_pattern_barg_add(_Tt_pattern_handle*,tt_mode,const char*,const unsigned char*,int) -internalC++ _tt_pattern_bcontext_add(_Tt_pattern_handle*,const char*,const unsigned char*,int) -internalC++ _tt_pattern_callback_add(_Tt_pattern_handle*,tt_callback_action (*)(_Tt_message_handle*,_Tt_pattern_handle*)) -internalC++ _tt_pattern_category(_Tt_pattern_handle*) -internalC++ _tt_pattern_category_set(_Tt_pattern_handle*,tt_category) -internalC++ _tt_pattern_class_add(_Tt_pattern_handle*,tt_class) -internalC++ _tt_pattern_context_add(_Tt_pattern_handle*,const char*,const char*) -internalC++ _tt_pattern_create(void) -internalC++ _tt_pattern_destroy(_Tt_pattern_handle*) -internalC++ _tt_pattern_disposition_add(_Tt_pattern_handle*,tt_disposition) -internalC++ _tt_pattern_file_add(_Tt_pattern_handle*,const char*) -internalC++ _tt_pattern_iarg_add(_Tt_pattern_handle*,tt_mode,const char*,int) -internalC++ _tt_pattern_icontext_add(_Tt_pattern_handle*,const char*,int) -internalC++ _tt_pattern_object_add(_Tt_pattern_handle*,const char*) -internalC++ _tt_pattern_op_add(_Tt_pattern_handle*,const char*) -internalC++ _tt_pattern_opnum_add(_Tt_pattern_handle*,int) -internalC++ _tt_pattern_otype_add(_Tt_pattern_handle*,const char*) -internalC++ _tt_pattern_print(_Tt_pattern_handle*) -internalC++ _tt_pattern_register(_Tt_pattern_handle*) -internalC++ _tt_pattern_scope_add(_Tt_pattern_handle*,tt_scope) -internalC++ _tt_pattern_sender_add(_Tt_pattern_handle*,const char*) -internalC++ _tt_pattern_sender_ptype_add(_Tt_pattern_handle*,const char*) -internalC++ _tt_pattern_session_add(_Tt_pattern_handle*,const char*) -internalC++ _tt_pattern_state_add(_Tt_pattern_handle*,tt_state) -internalC++ _tt_pattern_unregister(_Tt_pattern_handle*) -internalC++ _tt_pattern_user(_Tt_pattern_handle*,int) -internalC++ _tt_pattern_user_set(_Tt_pattern_handle*,int,void*) -internalC++ _tt_pattern_xarg_add(_Tt_pattern_handle*,tt_mode,const char*,xdrproc_t,void*) -internalC++ _tt_pattern_xcontext_add(_Tt_pattern_handle*,const char*,xdrproc_t,void*) -internalC++ _tt_pnotice_create(tt_scope,const char*) -internalC++ _tt_prequest_create(tt_scope,const char*) -internalC++ _tt_print_escaped_string(const _Tt_ostream&,const char*,int,int,int) -internalC++ _tt_procid_session(const char*) -internalC++ _tt_ptype_declare(const char*) -internalC++ _tt_ptype_exists(const char*) -internalC++ _tt_ptype_opnum_callback_add(const char*,int,tt_callback_action (*)(_Tt_message_handle*,_Tt_pattern_handle*)) -internalC++ _tt_ptype_opnum_user(const char*,int) -internalC++ _tt_ptype_opnum_user_set(const char*,int,void*) -internalC++ _tt_ptype_undeclare(const char*) -internalC++ _tt_queue_message_1(_tt_queue_msg_args*,CLIENT*) -internalC++ _tt_queue_message_1(_tt_queue_msg_args*,const _Tt_db_client_ptr&) -internalC++ _tt_release(int) -internalC++ _tt_remove_file_1(_tt_remove_file_args*,CLIENT*) -internalC++ _tt_remove_file_1(_tt_remove_file_args*,const _Tt_db_client_ptr&) -internalC++ _tt_remove_obj_1(_tt_remove_obj_args*,CLIENT*) -internalC++ _tt_remove_obj_1(_tt_remove_obj_args*,const _Tt_db_client_ptr&) -internalC++ _tt_session_address(_Tt_object_ptr&) -internalC++ _tt_session_bprop(const char*,const char*,int,unsigned char**,int*) -internalC++ _tt_session_bprop_add(const char*,const char*,const unsigned char*,int) -internalC++ _tt_session_bprop_set(const char*,const char*,const unsigned char*,int) -internalC++ _tt_session_join(const char*) -internalC++ _tt_session_prop(const char*,const char*,int) -internalC++ _tt_session_prop_add(const char*,const char*,const char*) -internalC++ _tt_session_prop_count(const char*,const char*) -internalC++ _tt_session_prop_set(const char*,const char*,const char*) -internalC++ _tt_session_propname(const char*,int) -internalC++ _tt_session_propnames_count(const char*) -internalC++ _tt_session_quit(const char*) -internalC++ _tt_session_types_load(const char*) -internalC++ _tt_set_file_access_1(_tt_set_file_access_args*,CLIENT*) -internalC++ _tt_set_file_access_1(_tt_set_file_access_args*,const _Tt_db_client_ptr&) -internalC++ _tt_set_file_prop_1(_tt_set_file_prop_args*,CLIENT*) -internalC++ _tt_set_file_prop_1(_tt_set_file_prop_args*,const _Tt_db_client_ptr&) -internalC++ _tt_set_file_props_1(_tt_set_file_props_args*,CLIENT*) -internalC++ _tt_set_file_props_1(_tt_set_file_props_args*,const _Tt_db_client_ptr&) -internalC++ _tt_set_obj_access_1(_tt_set_obj_access_args*,CLIENT*) -internalC++ _tt_set_obj_access_1(_tt_set_obj_access_args*,const _Tt_db_client_ptr&) -internalC++ _tt_set_obj_file_1(_tt_set_obj_file_args*,CLIENT*) -internalC++ _tt_set_obj_file_1(_tt_set_obj_file_args*,const _Tt_db_client_ptr&) -internalC++ _tt_set_obj_prop_1(_tt_set_obj_prop_args*,CLIENT*) -internalC++ _tt_set_obj_prop_1(_tt_set_obj_prop_args*,const _Tt_db_client_ptr&) -internalC++ _tt_set_obj_props_1(_tt_set_obj_props_args*,CLIENT*) -internalC++ _tt_set_obj_props_1(_tt_set_obj_props_args*,const _Tt_db_client_ptr&) -internalC++ _tt_set_obj_type_1(_tt_set_obj_type_args*,CLIENT*) -internalC++ _tt_set_obj_type_1(_tt_set_obj_type_args*,const _Tt_db_client_ptr&) -internalC++ _tt_set_rpc_message(const _Tt_message_ptr&,_tt_message&) -internalC++ _tt_setoidgroup_1(_Tt_oidaccess_args*,CLIENT*) -internalC++ _tt_setoidmode_1(_Tt_oidaccess_args*,CLIENT*) -internalC++ _tt_setoiduser_1(_Tt_oidaccess_args*,CLIENT*) -internalC++ _tt_spec_bprop(const char*,const char*,int,unsigned char**,int*) -internalC++ _tt_spec_bprop_add(const char*,const char*,const unsigned char*,int) -internalC++ _tt_spec_bprop_set(const char*,const char*,const unsigned char*,int) -internalC++ _tt_spec_create(const char*) -internalC++ _tt_spec_destroy(const char*) -internalC++ _tt_spec_file(const char*) -internalC++ _tt_spec_move(const char*,const char*) -internalC++ _tt_spec_prop(const char*,const char*,int) -internalC++ _tt_spec_prop_add(const char*,const char*,const char*) -internalC++ _tt_spec_prop_count(const char*,const char*) -internalC++ _tt_spec_prop_set(const char*,const char*,const char*) -internalC++ _tt_spec_propname(const char*,int) -internalC++ _tt_spec_propnames_count(const char*) -internalC++ _tt_spec_type(const char*) -internalC++ _tt_spec_type_set(const char*,const char*) -internalC++ _tt_spec_write(const char*) -internalC++ _tt_status_message(tt_status) -internalC++ _tt_strdup(const char*) -internalC++ _tt_strdup(const char*,int) -internalC++ _tt_take(char*) -internalC++ _tt_test_and_set_1(_Tt_test_and_set_args*,CLIENT*) -internalC++ _tt_trace_parse(_Tt_string&,_Tt_trace_parser*) -internalC++ _tt_transaction_1(_Tt_transaction_args*,CLIENT*) -internalC++ _tt_typecb_key(_Tt_object_ptr&) -internalC++ _tt_typecb_key(const _Tt_string&,int) -internalC++ _tt_valid_otype(const char*) -internalC++ _tt_vsyslog(FILE*,int,const char*,va_list) -internalC++ _tt_xcontext_join(const char*,xdrproc_t,void*) -internalC++ _tt_xcontext_quit(const char*,xdrproc_t,void*) -internalC++ _tt_xdr_cstring_list(XDR*,char***) -internalC++ _tt_xdr_decode(xdrproc_t,void*,_Tt_string) -internalC++ _tt_xdr_encode(xdrproc_t,void*,_Tt_string&) -internalC++ _tt_xdr_sizeof(xdrproc_t,void*) -internalC++ _tt_xdr_string_list(XDR*,_Tt_string_list_ptr*) -internalC++ _ttdt_contract_cb(_Tt_message_handle*,_Tt_pattern_handle*,void*,void*) -internalC++ _ttdt_do_GSet_Geometry(_Tt_message_handle*,void*,_Tt_message_handle*,int*,int*,int*,int*) -internalC++ _ttdt_do_Get_XInfo(_Tt_message_handle*,void*,_Tt_message_handle*,char**,int*,int*) -internalC++ _ttdt_do_RaiseLower(_Tt_message_handle*,void*,_Tt_message_handle*) -internalC++ _ttdt_do_Set_XInfo(_Tt_message_handle*,void*,_Tt_message_handle*,char*,int,int) -internalC++ _ttdt_do_wm_state(_Tt_message_handle*,void*,_Tt_message_handle*,int*) -internalC++ _ttdt_file_request(Tttk_op,_Tt_message_handle*,const char*,tt_scope,_XtAppStruct*,int) -internalC++ _ttdt_pat(Tttk_op,_Tt_message_handle* (*)(_Tt_message_handle*,_Tt_pattern_handle*,void*,void*),tt_category,_Tt_message_handle*,void*,void*,int) -internalC++ _ttdt_posix_cb(_Tt_message_handle*,_Tt_pattern_handle*,void*,void*) -internalC++ _ttdt_realized_widget(void*,int) -internalC++ _tttk_block_app_while(_XtAppStruct*,const int*,int) -internalC++ _tttk_block_procid_while(const int*,int) -internalC++ _tttk_message_am_handling(_Tt_message_handle*) -internalC++ _tttk_message_arg_is_set(_Tt_message_handle*,unsigned int) -internalC++ _tttk_message_arg_ival(_Tt_message_handle*,unsigned int,int) -internalC++ _tttk_message_arg_val(_Tt_message_handle*,unsigned int,const char*) -internalC++ _tttk_message_id(_Tt_message_handle*,int) -internalC++ _tttk_message_in_final_state(_Tt_message_handle*) -internalC++ _tttk_message_receive(const char*) -internalC++ _tttk_message_reply(_Tt_message_handle*) -internalC++ _tttk_pattern_contract(_Tt_pattern_handle*) -internalC++ _tttk_patterns_destroy(_Tt_pattern_handle**) -internalC++ _tttk_timed_out(void*,unsigned long) -internalC++ operator<<(_Tt_trace_stream&,_Tt_message&) -internalC++ ttMediaLoadPatCB(_Tt_message_handle*,_Tt_pattern_handle*,_Tt_message_handle* (*)(_Tt_message_handle*,void*,Tttk_op,tt_status,unsigned char*,int,char*,char*),void*,Tttk_op,int,int) -internalC++ tt_ldpath(_Tt_string,_Tt_string&) -internalC++ tt_xdr_add_pattern_args(XDR*,_Tt_add_pattern_args*) -internalC++ tt_xdr_arg(XDR*,_Tt_arg_ptr*) -internalC++ tt_xdr_arg_list(XDR*,_Tt_arg_list_ptr*) -internalC++ tt_xdr_bstring(XDR*,char**) -internalC++ tt_xdr_del_pattern_args(XDR*,_Tt_del_pattern_args*) -internalC++ tt_xdr_message_list(XDR*,_Tt_message_list_ptr*) -internalC++ tt_xdr_pattern(XDR*,_Tt_pattern_ptr*) -internalC++ ttdt_Get_Geometry(const char*,_Tt_message_handle*,_Tt_message_handle* (*)(_Tt_message_handle*,void*,_Tt_message_handle*,int,int,int,int),void*,int) -internalC++ ttdt_Get_Geometry_pat(tt_category,_Tt_message_handle*,_Tt_message_handle* (*)(_Tt_message_handle*,void*,_Tt_message_handle*,int*,int*,int*,int*),void*,int) -internalC++ ttdt_Get_Iconified(const char*,_Tt_message_handle*,_Tt_message_handle* (*)(_Tt_message_handle*,void*,_Tt_message_handle*,int),void*,int) -internalC++ ttdt_Get_Iconified_pat(tt_category,_Tt_message_handle*,_Tt_message_handle* (*)(_Tt_message_handle*,void*,_Tt_message_handle*,int*),void*,int) -internalC++ ttdt_Get_Locale(const char*,_Tt_message_handle*,_Tt_message_handle* (*)(_Tt_message_handle*,void*,const char**,const char**),void*,const char**,int) -internalC++ ttdt_Get_Situation(const char*,_Tt_message_handle*,_Tt_message_handle* (*)(_Tt_message_handle*,void*,char*),void*,int) -internalC++ ttdt_Get_XInfo(const char*,_Tt_message_handle*,_Tt_message_handle* (*)(_Tt_message_handle*,void*,_Tt_message_handle*,char*,int,int),void*,int) -internalC++ ttdt_Get_XInfo_pat(tt_category,_Tt_message_handle*,_Tt_message_handle* (*)(_Tt_message_handle*,void*,_Tt_message_handle*,char**,int*,int*),void*,int) -internalC++ ttdt_Set_Geometry(const char*,_Tt_message_handle*,tt_class,_Tt_message_handle* (*)(_Tt_message_handle*,void*,_Tt_message_handle*,int,int,int,int),void*,int,int,int,int,int) -internalC++ ttdt_Set_Geometry_pat(tt_category,_Tt_message_handle*,_Tt_message_handle* (*)(_Tt_message_handle*,void*,_Tt_message_handle*,int*,int*,int*,int*),void*,int) -internalC++ ttdt_Set_Iconified(const char*,_Tt_message_handle*,tt_class,_Tt_message_handle* (*)(_Tt_message_handle*,void*,_Tt_message_handle*,int),void*,int,int) -internalC++ ttdt_Set_Iconified_pat(tt_category,_Tt_message_handle*,_Tt_message_handle* (*)(_Tt_message_handle*,void*,_Tt_message_handle*,int*),void*,int) -internalC++ ttdt_Set_XInfo(const char*,_Tt_message_handle*,tt_class,_Tt_message_handle* (*)(_Tt_message_handle*,void*,_Tt_message_handle*,char*,int,int),void*,const char*,int,int,int) -internalC++ ttdt_Set_XInfo_pat(tt_category,_Tt_message_handle*,_Tt_message_handle* (*)(_Tt_message_handle*,void*,_Tt_message_handle*,char*,int,int),void*,int) -internalC++ ttdt_Started(_Tt_message_handle*,const char*,const char*,const char*,int) -internalC++ ttdt_Status(_Tt_message_handle*,_Tt_message_handle*,const char*,const char*,const char*,const char*,int) -internalC++ ttdt_Stopped(_Tt_message_handle*,const char*,const char*,const char*,int) -internalC++ xdr_Tt_prop(XDR*,_Tt_prop*) -internalC++ xdr_Tt_trans_record(XDR*,_Tt_trans_record*) -internalC++ xdr_Tt_trans_record_list(XDR*,_Tt_trans_record**) -internalC++ xdr_keydesc(XDR*,keydesc*) -internalC++ xdr_keypart(XDR*,keypart*) -internalC++ xdr_tt_access(XDR*,_tt_access*) -internalC++ xdr_tt_get_obj_type_args(XDR*,_tt_get_obj_type_args*) -internalC++ xdr_tt_message(XDR*,_tt_message*) -internalC++ xdr_tt_property(XDR*,_tt_property*) -internalC++ xdr_tt_property_value(XDR*,_tt_property_value*) -internalC++ xdr_tt_string(XDR*,_tt_string*) - -/* - * Public symbols added for ICE style authorization - */ -internalC++ _tt_AuthFileName(void) -internalC++ _tt_FreeAuthFileEntry(_tt_AuthFileEntry*) -internalC++ _tt_GenerateMagicCookie(int) -internalC++ _tt_GetAuthFileEntry(char*,char*,char*) -internalC++ _tt_LockAuthFile(char*,int,int,long) -internalC++ _tt_ReadAuthFileEntry(FILE*) -internalC++ _tt_UnlockAuthFile(char*) -internalC++ _tt_WriteAuthFileEntry(FILE*,_tt_AuthFileEntry*) - -#ifdef _AIX -/* Including defines these symbols everywhere on AIX machines. */ -internal __page_size -internal __page_sizeM1 -internal __page_sizeX16 -internal __page_sizeX24 -internal __page_size_K -internal _mutex_global_np -#endif - -#if defined(_AIX) -/* Symbols from realpath.c */ -internal _tt_internal_realpath -#endif - -#if defined(sun) -/* C++ symbols from the Sun compiler */ -internal _pure_error_ -internalC++ operator delete(void*) -internalC++ set_terminate(void(*)(void)) -internalC++ set_unexpected(void(*)(void)) -internalC++ terminate(void) -internalC++ unexpected(void) -internalC++ xstack::get_prev(void) -#endif From e03eabfd59a5d14946a1da382090f7c849a75478 Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Sun, 7 Aug 2022 15:11:21 -0600 Subject: [PATCH 19/75] #127: dtcm: solaris - use readdir instead of readdir_r --- cde/programs/dtcm/server/cmsfunc.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/cde/programs/dtcm/server/cmsfunc.c b/cde/programs/dtcm/server/cmsfunc.c index 5e6d37d0a..c805b562f 100644 --- a/cde/programs/dtcm/server/cmsfunc.c +++ b/cde/programs/dtcm/server/cmsfunc.c @@ -1293,17 +1293,7 @@ _ListCalendarNames(uint *num_names, char ***names) if ((dirp = opendir(".")) == NULL) return (CSA_E_FAILURE); -#ifdef SunOS - if ((dp = (struct dirent *)malloc(sizeof(struct dirent) + FILENAME_MAX)) - == NULL) { - closedir(dirp); - return (CSA_E_INSUFFICIENT_MEMORY); - } - - while (dp = readdir_r(dirp, dp)) { -#else while (dp = readdir(dirp)) { -#endif if (strncmp(dp->d_name, "callog.", strlen("callog.")) == 0) { if (count == num) { count += _NAME_INCREMENT; From dcee51c158699c715099e536f24e140dba253d14 Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Sun, 7 Aug 2022 15:15:33 -0600 Subject: [PATCH 20/75] #130: Xserver.src: fix sun X server path --- cde/programs/dtlogin/config/Xservers.src | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cde/programs/dtlogin/config/Xservers.src b/cde/programs/dtlogin/config/Xservers.src index 04fcb8199..135fd9578 100644 --- a/cde/programs/dtlogin/config/Xservers.src +++ b/cde/programs/dtlogin/config/Xservers.src @@ -96,9 +96,9 @@ XCOMM ########################################################################## #elif defined (_AIX) :0 Local local@console /usr/bin/X11/X -T -force :0 #elif defined (sun) - :0 Local local_uid@console root /usr/openwin/bin/X :0 -nobanner + :0 Local local_uid@console root /usr/bin/Xorg :0 -nobanner #elif defined (_NO_CONSOLE) -XCOMM * Local local@console /usr/bin/X11/X :0 +XCOMM * Local local@console /usr/bin/X :0 #elif defined (__linux__) :0 Local local_uid@tty1 root /usr/bin/X :0 #elif defined (__OpenBSD__) From f63a74781421e422d1a4fada912b8f0fb222a70c Mon Sep 17 00:00:00 2001 From: Liang Chang Date: Mon, 8 Aug 2022 00:38:43 +0000 Subject: [PATCH 21/75] dtdocbook: set locale explicitly. --- cde/programs/dtdocbook/dtdocbook2infolib.c | 162 ++++++++++++++------- cde/programs/dtdocbook/dtdocbook2man.in | 13 +- cde/programs/dtdocbook/dtdocbook2sdl.in | 158 ++++++++++---------- cde/programs/dtdocbook/instant/main.c | 36 ++++- 4 files changed, 219 insertions(+), 150 deletions(-) diff --git a/cde/programs/dtdocbook/dtdocbook2infolib.c b/cde/programs/dtdocbook/dtdocbook2infolib.c index ddebc4908..adaea7583 100644 --- a/cde/programs/dtdocbook/dtdocbook2infolib.c +++ b/cde/programs/dtdocbook/dtdocbook2infolib.c @@ -38,6 +38,7 @@ #include #include #include +#include #include /* for dirname() */ #include #include @@ -169,13 +170,17 @@ t_entry langtbl[] = static char *usageMsg1 = "USAGE:\n\ " EXEC_NAME " -h\n\ - " EXEC_NAME " admin\n\ - " EXEC_NAME " build [-h] [-T ] [-m ] [-d ]\n\ - [-n ] -l ...\n\ - " EXEC_NAME " tocgen [-h] [-T ] [-m ] -f [-id ]\n\ - [-title ] ...\n\ - " EXEC_NAME " update [-h] [-m ] -l -b \n\ - " EXEC_NAME " validate [-h] [-T ] [-m ] ...\n" + " EXEC_NAME " admin -L \n\ + " EXEC_NAME " build [-h] -L [-T ] [-m ]\n\ + [-d ] [-n ]\n\ + -l ...\n\ + " EXEC_NAME " tocgen [-h] -L [-T ] [-m ]\n\ + -f [-id ] [-title ]\n\ + ...\n\ + " EXEC_NAME " update [-h] -L [-m ] -l \n\ + -b \n\ + " EXEC_NAME " validate [-h] -L [-T ] [-m ]\n\ + ...\n" "\n" "options:\n"; @@ -215,6 +220,7 @@ static char *buildStyleProlog(void); static char *buildSpec(void); static void defaultGlobals(void); static void checkGlobals(void); +static void setLangIndex(const char * const locale); static int parseArgs(int argc, char *argv[]); static char *parseDocument(int runCmd, ...); static void buildBookcase(char *cmdSrc, char *dirName); @@ -986,45 +992,6 @@ defaultGlobals(void) gStruct->sgmlCatFilesLen = 0; gStruct->sgmlCatFilesMaxLen = 0; - { /* resolve lang from env variable */ - char* lang; - char *s = NULL; - char* code = NULL; - int curLen; - int maxLen = 0; - t_entry* iter; - - if ((lang = getenv("LC_CTYPE")) == NULL) lang = LANG_COMMON; - - lang = XtsNewString(lang); - - s = strchr(lang, '.'); if (s) *s = 0; - - curLen = strlen(lang); - - appendStr(&lang, &curLen, &maxLen, ".UTF-8"); - - /* resolve dtsearch language based on canonical lang */ - - for (iter = langtbl; iter->name; ++iter) { - if (strcmp(lang, iter->name) == 0) { - code = lang; - break; - } - } - - if (!code) code = LANG_COMMON; - - for (iter = langtbl; iter->name; ++iter) { - if (strcmp(iter->name, code) == 0) { - gStruct->dtsridx = iter - langtbl; - break; - } - } - - free(lang); - } - if ((gStruct->sgml = buildSGML()) == NULL) { die(-1, "%s: Cannot find SGML files\n", EXEC_NAME); } @@ -1095,6 +1062,45 @@ checkGlobals(void) checkExec("validator"); } +static void +setLangIndex(const char * const locale) +{ + char* lang; + char *s = NULL; + char* code = NULL; + int curLen; + int maxLen = 0; + t_entry* iter; + + lang = XtsNewString(locale); + + s = strchr(lang, '.'); if (s) *s = 0; + + curLen = strlen(lang); + + appendStr(&lang, &curLen, &maxLen, ".UTF-8"); + + /* resolve dtsearch language based on canonical lang */ + + for (iter = langtbl; iter->name; ++iter) { + if (strcmp(lang, iter->name) == 0) { + code = lang; + break; + } + } + + if (!code) code = LANG_COMMON; + + for (iter = langtbl; iter->name; ++iter) { + if (strcmp(iter->name, code) == 0) { + gStruct->dtsridx = iter - langtbl; + break; + } + } + + free(lang); +} + static void addCatFile(char *catalog, bool needed) { @@ -2278,19 +2284,53 @@ int main(int argc, char *argv[]) { GlobalsStruct globalsStruct; - - if (!addToEnv("PATH", STR(INFOLIB_LIBEXECDIR), true)) - die(-1, "%s: could not set PATH\n", EXEC_NAME); - - gStruct = &globalsStruct; + char *pm; + const char *lc_all; + int ec; + int il = 0; if (argc < 2) - printUsage((char *)NULL, -1); + { + pm = NULL; + ec = -1; + goto usage; + } - defaultGlobals(); + gStruct = &globalsStruct; defaultGlobals(); - if (setenv("LC_CTYPE", STR(langtbl[gStruct->dtsridx].name), 1) == -1) - die(-1, "%s: LC_CTYPE: %s\n", EXEC_NAME, strerror(errno)); + for (int i = 0; i < argc; ++i) + { + if (strcmp(argv[i], "-h") == 0) + { + pm = NULL; + ec = 0; + goto usage; + } + else if (strcmp(argv[i], "-L") == 0) + { + il = 1 + i; + } + } + + if (!(il > 2 && il < argc && isalpha(argv[il][0]))) + { + pm = NULL; + ec = -1; + goto usage; + } + + setLangIndex(argv[il]); + + for (int i = 1 + il; i < argc; ++i) argv[i - 2] = argv[i]; + + argc -= 2; + + lc_all = STR(langtbl[gStruct->dtsridx].name); + + setlocale(LC_ALL, lc_all); + + if (setenv("LC_ALL", lc_all, 1) == -1) + die(-1, "%s: LC_ALL: %s\n", EXEC_NAME, strerror(errno)); if (setenv("SP_CHARSET_FIXED", "1", 1) == -1) die(-1, "%s: SP_CHARSET_FIXED: %s\n", EXEC_NAME, strerror(errno)); @@ -2298,13 +2338,23 @@ main(int argc, char *argv[]) if (setenv("SP_ENCODING", "UTF-8", 1) == -1) die(-1, "%s: SP_ENCODING: %s\n", EXEC_NAME, strerror(errno)); + if (!addToEnv("PATH", STR(INFOLIB_LIBEXECDIR), true)) + die(-1, "%s: could not set PATH\n", EXEC_NAME); + if (!doAdmin(argc, argv) && !doBuild(argc, argv) && !doTocgen(argc, argv) && !doUpdate(argc, argv) && !doValidate(argc, argv) && !doHelp(argc, argv)) - printUsage(EXEC_NAME ": unrecognized subcommand `%s'\n", -1); + { + pm = EXEC_NAME ": unrecognized subcommand\n"; + ec = -1; + goto usage; + } return 0; + +usage: + printUsage(pm, ec); } diff --git a/cde/programs/dtdocbook/dtdocbook2man.in b/cde/programs/dtdocbook/dtdocbook2man.in index a57f2ddc7..5ee47cee5 100755 --- a/cde/programs/dtdocbook/dtdocbook2man.in +++ b/cde/programs/dtdocbook/dtdocbook2man.in @@ -63,11 +63,12 @@ then nroff="| tbl | nroff -man" shift fi -if [ $# -eq 3 ] -then dclfile=$1 - reffile=$2 - manfile=$3 -else echo "usage: dtdocbook2man [-c] dcl-file ref-src-file man-dst-file" +if [ $# -eq 4 ] +then locale=$1 + dclfile=$2 + reffile=$3 + manfile=$4 +else echo "usage: dtdocbook2man [-c] locale dcl-file ref-src-file man-dst-file" exit 1 fi @@ -129,6 +130,6 @@ cat >> /tmp/dtm.$$.psinc <<\! cat $decl $dclfile $reffile | \ sed -e 's/<\!\[[ ]*\%CDE\.C\.CDE;[ ]*\[<[rR]ef[eE]ntry [iI]d="[^"]*">\]\]>//g' | \ $parser $parser_opts | \ -$instant $INSTANT_OPT -croff.cmap -sroff.sdata -tdocbook-to-man.ts > \ +$instant -L$locale -croff.cmap -sroff.sdata -tdocbook-to-man.ts > \ /tmp/dtm.$$.out1 && eval cat /tmp/dtm.$$.psinc /tmp/dtm.$$.out1 $nroff > \ /tmp/dtm.$$.out2 && cp /tmp/dtm.$$.out2 $manfile diff --git a/cde/programs/dtdocbook/dtdocbook2sdl.in b/cde/programs/dtdocbook/dtdocbook2sdl.in index e56d18131..c8c661957 100755 --- a/cde/programs/dtdocbook/dtdocbook2sdl.in +++ b/cde/programs/dtdocbook/dtdocbook2sdl.in @@ -1,7 +1,5 @@ #!@KSH@ -export LC_CTYPE="${LANG}" - # get the name of this command for errors, warnings and messages command_name=`basename $0` @@ -77,95 +75,35 @@ do (u) uncompressed=1;; (v) verbose=1;; (x) debug=1;; + (L) x_locale="$OPTARG";; # undocumented options to be used at build time (H) helptag2="$OPTARG";; (I) instant="$OPTARG";; - (L) x_locale="$OPTARG";; (S) sgmls="$OPTARG";; (?) fatal "Unknown option: -$OPTARG";; esac done -default_charset='UTF-8' -default_locale="en_US.$default_charset" - -# if no -t, use installed dir -prefix="${prefix:-@prefix@}" -exec_prefix="@exec_prefix@" - -export PATH="${PATH}:@bindir@" - -dcbk_name="@PACKAGE_TARNAME@/dtdocbook" - -dtdcbk_libdir="${dtdcbk_libdir:-@libdir@/${dcbk_name}}" -dtdcbk_libexecdir="${dtdcbk_libexecdir:-@libexecdir@/${dcbk_name}}" -dtdcbk_datarootdir="${dtdcbk_datarootdir:-@datarootdir@/${dcbk_name}}" - -# if no -I, use installed one -instant="${instant:-${dtdcbk_libexecdir}/instant/instant}" - -# if no -s, use -t -sgml_dir="${sgml_dir:-${dtdcbk_datarootdir}/sgml}" - -sgml_cat="${sgml_dir}" -sgmls="${sgmls:-onsgmls}" # if no -S, use onsgmls -x_locale="${x_locale:-${LANG}}" # if no -L, use installed one -helptag2="${helptag2:-dthelp_htag2}" # if no -H, use one in PATH - -if [[ $x_locale == *.* ]] then - x_lang="${x_locale%%.*}" - x_charset="${x_locale##*.}" - - if [[ $x_charset != $default_charset ]] then - x_locale="${x_lang}.$default_charset" - fi -else - x_locale="${x_locale}.$default_charset" -fi - -# Set the environment variables for instant(1) to find its files -export TPT_LIB="${dtdcbk_datarootdir}/tpt" -export LOCALE_DIR="${dtdcbk_datarootdir}/locales/${x_locale}" - -if [[ -d $LOCALE_DIR ]] then - export LOCALE_DIR="${dtdcbk_datarootdir}/locales/${default_locale}" -fi - -parser=`basename $sgmls` - -# Set the environment variable for finding the default catalog. -if ([[ "$SGML_CATALOG_FILES" = "" ]]) then - export SGML_CATALOG_FILES="${sgml_cat}/catalog" -else - export SGML_CATALOG_FILES="${SGML_CATALOG_FILES}:${sgml_cat}/catalog" -fi - -export SP_CHARSET_FIXED=1 -export SP_ENCODING="$default_charset" - -# Set the environment variable to be picked up inside instant(1) when it -# goes to call Tcl. -export DBKTCL_DIR="${dtdcbk_libdir}/tcl" - # The user asked for help, give it and exit. if (( $help )); then echo "$command_name [options] " echo "options:" - echo " -c compress an existing SDL file" - echo " -d decompress an existing SDL file" - echo " -g specify additional catalog file (repeatable)" - echo " -h emit this message" - echo " -l leave ..log in current directory" - echo " -m add to list of SDATA or CMAP files" - echo " -o use as the output file name" - echo " -r remove leftover intermediate files" - echo " -s docbook.dcl is in " - echo " -t read translation specs, etc., from " - echo " -u do not compress during translation" - echo " -v verbose" - echo " -x leave intermediate files, for debugging" + echo " -c compress an existing SDL file" + echo " -d decompress an existing SDL file" + echo " -g specify additional catalog file (repeatable)" + echo " -h emit this message" + echo " -l leave ..log in current directory" + echo " -m add to list of SDATA or CMAP files" + echo " -o use as the output file name" + echo " -r remove leftover intermediate files" + echo " -s docbook.dcl is in " + echo " -t read translation specs, etc., from " + echo " -u do not compress during translation" + echo " -v verbose" + echo " -x leave intermediate files, for debugging" + echo " -L set the current locale to " exit 0 fi @@ -178,8 +116,9 @@ elif (( $OPTIND > $# )); then fi -# Get the name of the input file. -iname=`eval echo \\\${\$OPTIND}` +if [[ $x_locale == "" ]] then + fatal "No locale specified" +fi # Check for mutually exclusive options. if (( $compress && $decompress )); then @@ -187,10 +126,66 @@ if (( $compress && $decompress )); then fi +default_charset='UTF-8' + +prefix="${prefix:-@prefix@}" +exec_prefix="@exec_prefix@" + +dcbk_name="@PACKAGE_TARNAME@/dtdocbook" +dtdcbk_libdir="${dtdcbk_libdir:-@libdir@/${dcbk_name}}" +dtdcbk_libexecdir="${dtdcbk_libexecdir:-@libexecdir@/${dcbk_name}}" +dtdcbk_datarootdir="${dtdcbk_datarootdir:-@datarootdir@/${dcbk_name}}" + +sgml_dir="${sgml_dir:-${dtdcbk_datarootdir}/sgml}" + + +if [[ $x_locale == *.* ]] then + x_lang="${x_locale%%.*}" + x_charset="${x_locale##*.}" + + if [[ $x_charset != $default_charset ]] then + x_locale="${x_lang}.$default_charset" + fi +else + x_locale="${x_locale}.$default_charset" +fi + +if ([[ "$SGML_CATALOG_FILES" = "" ]]) then + SGML_CATALOG_FILES="${sgml_dir}/catalog" +else + SGML_CATALOG_FILES="${SGML_CATALOG_FILES}:${sgml_dir}/catalog" +fi + + +export PATH="${PATH}:@bindir@" +export SP_CHARSET_FIXED=1 +export SP_ENCODING="$default_charset" +export DBKTCL_DIR="${dtdcbk_libdir}/tcl" +export TPT_LIB="${dtdcbk_datarootdir}/tpt" +export LOCALE_DIR="${dtdcbk_datarootdir}/locales/${x_locale}" +export SGML_CATALOG_FILES + + +if [[ ! -d $LOCALE_DIR || ! -x $LOCALE_DIR ]] then + fatal "$LOCALE_DIR can't be accessed" +fi + + +# if no -I, use installed one +instant="${instant:-${dtdcbk_libexecdir}/instant/instant}" +sgmls="${sgmls:-onsgmls}" # if no -S, use onsgmls +helptag2="${helptag2:-dthelp_htag2}" # if no -H, use one in PATH + + +# Get the name of the input file. +iname=`eval echo \\\${\$OPTIND}` + # Get the basename and directory of the input file. basename=`basename $iname` dirname=`dirname $iname` +parser=`basename $sgmls` + # Look for an extension on the input file, if it's .sgm (or .sdl for # -c and -d), use it as is, else add the proper extension. @@ -372,12 +367,14 @@ if (( $verbose )); then if [[ $mapfiles != "" ]] then echo " $mapfiles \\\\" fi + echo " -L $x_locale \\\\" echo " -c docbook.cmap \\\\" echo " -t docbook.ts \\\\" echo " $basename.$$.esis" ${instant} -o $basename.out.$$.sdl \ $mapfiles \ - -c docbook.cmap \ + -L $x_locale \ + -c docbook.cmap \ -t docbook.ts \ $basename.$$.esis status=$? @@ -397,6 +394,7 @@ if (( $verbose )); then else ${instant} -o $basename.out.$$.sdl \ $mapfiles \ + -L $x_locale \ -c docbook.cmap \ -t docbook.ts \ $basename.$$.esis 2> $basename.$$.log diff --git a/cde/programs/dtdocbook/instant/main.c b/cde/programs/dtdocbook/instant/main.c index 20e089f69..cdec6defc 100644 --- a/cde/programs/dtdocbook/instant/main.c +++ b/cde/programs/dtdocbook/instant/main.c @@ -103,6 +103,7 @@ static char *tranfile; static char **cmapfile, **sdatafile; static char *start_id; static char *last_file; +static char *locale; static int last_lineno; /* forward references */ @@ -132,16 +133,33 @@ main( char *av[] ) { - char **thisopt; + char **thisopt; + char *s, *lc_all; + Initialize1(av[0]); HandleArgs(ac, av); Initialize2(); - /* use the current locale for all text but use American English ... */ - setlocale(LC_ALL, ""); + if (!(locale && *locale)) { + fprintf(stderr, "Error: No locale specified.\n"); + return 1; + } - /* ... in expressions (e.g., leave "." as the radix operator) */ - setlocale(LC_NUMERIC, "C.UTF-8"); + lc_all = strdup(locale); + lc_all = realloc(lc_all, 7 + strlen(locale)); + + s = strchr(lc_all, '.'); if (s) *s = 0; + + strcat(lc_all, ".UTF-8"); + + setlocale(LC_ALL, lc_all); + + if (setenv("LC_ALL", lc_all, 1) == -1) { + fprintf(stderr, "Error: Can not set locale.\n"); + return 1; + } + + free(lc_all); /* Create a Tcl interpreter. */ interpreter = Tcl_CreateInterp(); @@ -439,13 +457,13 @@ HandleArgs( char **thisopt; int count; - while ((c=getopt(ac, av, "t:vc:s:o:huSxIl:bHVWi:D:Z")) != EOF) { + while ((c=getopt(ac, av, "t:vc:s:o:L:huSxIl:bHVWi:D:Z")) != EOF) { switch (c) { case 't': tranfile = optarg; break; case 'v': do_validate = 1; break; case 's': { - if (thisopt = sdatafile) + if ((thisopt = sdatafile)) { count = 0; while (*thisopt++) @@ -465,7 +483,7 @@ HandleArgs( } case 'c': { - if (thisopt = cmapfile) + if ((thisopt = cmapfile)) { count = 0; while (*thisopt++) @@ -491,6 +509,7 @@ HandleArgs( case 'l': tpt_lib = optarg; break; case 'i': start_id = optarg; break; case 'o': out_file = optarg; break; + case 'L': locale = optarg; break; case 'b': interactive = 1; break; case 'W': warnings = 0; break; case 'V': verbose = 1; break; @@ -534,6 +553,7 @@ static char *help_msg[] = { " -h Print document hierarchy as a tree", " -o file Write output to . Default is standard output.", " -l dir Set library directory to . (or env. variable TPT_LIB)", + " -L locale Set the current locale to ", " -I List all IDs used in the instance", " -W Do not print warning messages", " -H Print this help message", From 2d186d4cdd0e264a20eac1cce689627f8c5a046a Mon Sep 17 00:00:00 2001 From: Liang Chang Date: Mon, 8 Aug 2022 04:43:48 +0000 Subject: [PATCH 22/75] doc: set locale explicitly for building doc. --- cde/doc/common/guides/guides_env.am | 4 +- cde/doc/common/help/sdl-docs.am | 2 +- .../guides/man/man1_dt/docbook2infolib.sgm | 61 +++++++++++-------- cde/doc/en_US.UTF-8/man/Makefile.am | 5 +- 4 files changed, 44 insertions(+), 28 deletions(-) diff --git a/cde/doc/common/guides/guides_env.am b/cde/doc/common/guides/guides_env.am index 1ca0bb128..e986d154c 100644 --- a/cde/doc/common/guides/guides_env.am +++ b/cde/doc/common/guides/guides_env.am @@ -9,8 +9,8 @@ INFOLIBNAME = -n cde # orig: INFOLIBDESC = -d InfoLibDesc SSENTS = -m common/catalog -DGENV = LC_CTYPE=$(LANG) SGML_SEARCH_PATH=".:.." -DTINFOGENOPTIONS = $(SSENTS) $(INFOLIBNAME) -d $(INFOLIBDESC) +DGENV = SGML_SEARCH_PATH=".:.." +DTINFOGENOPTIONS = -L $(LANG) $(SSENTS) $(INFOLIBNAME) -d $(INFOLIBDESC) # Note the quad-dollar sign - this escapes $$ (pid) for the tmp # dir. This is required for multi-core builds to work. diff --git a/cde/doc/common/help/sdl-docs.am b/cde/doc/common/help/sdl-docs.am index aaf5cd856..f5aa875c5 100644 --- a/cde/doc/common/help/sdl-docs.am +++ b/cde/doc/common/help/sdl-docs.am @@ -19,7 +19,7 @@ DTHELP_HTAG2 = $(top_builddir)/programs/dthelp/parser/pass2/parser/dthelp_htag2 # but the $(basename...) seems to add a space for some reason %.sdl: - LC_CTYPE=$(LANG) SGML_SEARCH_PATH=".:.." \ + SGML_SEARCH_PATH=".:.." \ $(KSH) $(DTDOCBOOK) -H $(DTHELP_HTAG2) -L $(LANG) \ -o $@ `basename $@ .sdl`/book.sgm diff --git a/cde/doc/en_US.UTF-8/guides/man/man1_dt/docbook2infolib.sgm b/cde/doc/en_US.UTF-8/guides/man/man1_dt/docbook2infolib.sgm index 621b5badf..34f877ee5 100644 --- a/cde/doc/en_US.UTF-8/guides/man/man1_dt/docbook2infolib.sgm +++ b/cde/doc/en_US.UTF-8/guides/man/man1_dt/docbook2infolib.sgm @@ -22,10 +22,12 @@ dtdocbook2infolib admin -h +-L Locale dtdocbook2infolib build -h +-L Locale -T TmpDir -m CatalogFile -l Library @@ -36,6 +38,7 @@ dtdocbook2infolib tocgen -h +-L Locale -T TmpDir -m CatalogFile -id TOCid @@ -46,6 +49,7 @@ dtdocbook2infolib update -h +-L Locale -T TmpDir -m CatalogFile -b BookcaseName @@ -55,6 +59,7 @@ dtdocbook2infolib validate -h +-L Locale -T TmpDir -m CatalogFile SGMLdocument @@ -113,12 +118,16 @@ DocBook.DTD. Displays a help message for each available option. +-L Locale +Specifies the locale of the information library. + + -T TmpDir Specifies the directory in which temporary files are placed during the build process. The default is to use the environment variable TMPDIR. If variable TMPDIR is not set, -/usr/tmp is used. +/tmp is used. @@ -207,9 +216,9 @@ administration functions to perform on a specified information library: Example -Enter the dtdocbook2infolib admin command in a shell window: +Enter the dtdocbook2infolib admin -L en_US.UTF-8 command in a shell window: -dtdocbook2infolib admin +dtdocbook2infolib admin -L en_US.UTF-8 The following menu appears: @@ -224,8 +233,7 @@ Please enter your choice [1-6] Enter the number associated with the administrative task you want to perform. -dtdocbook2infolib admin prompts for additional input as -required. +dtdocbook2infolib admin -L en_US.UTF-8 prompts for additional input as required. @@ -238,14 +246,14 @@ It also creates a full-text search index. Example -Enter the dtdocbook2infolib build command in a shell -window. +Enter the dtdocbook2infolib build -L en_US.UTF-8 +command in a shell window. To build an information library containing multiple bookcases, an example command might be: -build -l +dtdocbook2infolib build -L en_US.UTF-8 -l UNIXLib -T /usr/pers ProgBooks @@ -269,14 +277,14 @@ source file(s) for a book and generates a hypertext table of contents. Example -Enter the dtdocbook2infolib tocgen command in a shell -window. +Enter the dtdocbook2infolib tocgen -L en_US.UTF-8 +command in a shell window. To generate a hypertext table of contents for a book containing six SGML book source files, each of which contains a separate chapter, an example command might be: -dtdocbook2infolib tocgen -T +dtdocbook2infolib tocgen -L en_US.UTF-8 -T /usr/pers -f Perl.TOC -id Perl0594 @@ -302,18 +310,21 @@ during processing. update -The dtdocbook2infolib update command dynamically replaces -existing style sheets in the DtInfo document database. +The dtdocbook2infolib update -L en_US.UTF-8 +command dynamically replaces existing style sheets in the DtInfo document +database. Example -Enter the dtdocbook2infolib update command in a shell window. +Enter the dtdocbook2infolib update -L en_US.UTF-8 +command in a shell window. -Here is an example of a dtdocbook2infolib update command used -to reformat the documents and/or document sections that use the +Here is an example of a dtdocbook2infolib update -L en_US.UTF-8 + +command used to reformat the documents and/or document sections that use the specified style sheet: -dtdocbook2infolib update -T +dtdocbook2infolib update -L en_US.UTF-8 -T /usr/pers -b ICE9 -l Brunn style @@ -327,19 +338,21 @@ that is specified in the bookcase named ICE9. validate -The dtdocbook2infolib validate command performs SGML -validation on bookcase specifications, on individual book source files, -or any SGML document. +The dtdocbook2infolib validate -L en_US.UTF-8 +command performs SGML validation on bookcase specifications, on individual book +source files, or any SGML document. Examples -Enter the dtdocbook2infolib validate in a shell window. +Enter the dtdocbook2infolib validate -L en_US.UTF-8 +in a shell window. -Here is an example of a dtdocbook2infolib validate command -that performs validation on three SGML book source files: +Here is an example of a dtdocbook2infolib validate -L en_US.UTF-8 + +command that performs validation on three SGML book source files: -dtdocbook2infolib validate +dtdocbook2infolib validate -L en_US.UTF-8 03.Structure.N 04.Process.N 05.BookArea.N diff --git a/cde/doc/en_US.UTF-8/man/Makefile.am b/cde/doc/en_US.UTF-8/man/Makefile.am index 669895597..d9b38a3d3 100644 --- a/cde/doc/en_US.UTF-8/man/Makefile.am +++ b/cde/doc/en_US.UTF-8/man/Makefile.am @@ -1,6 +1,9 @@ MAINTAINERCLEANFILES = Makefile.in -DBTOMAN = $(top_srcdir)/programs/dtdocbook/doc_utils/dtdocbook2man +# this sets the LANG variables +include $(top_srcdir)/programs/localized/templates/English.am + +DBTOMAN = $(top_srcdir)/programs/dtdocbook/doc_utils/dtdocbook2man $(LANG) # first, the man pages broken down by sections MANSEC1 = man1/tttrace.1 man1/tttar.1 man1/ttsession.1 man1/ttrmdir.1 \ From 3449ea67672272a35409faa326d20dfda8cf919f Mon Sep 17 00:00:00 2001 From: Liang Chang Date: Fri, 12 Aug 2022 01:54:57 +0000 Subject: [PATCH 23/75] dtsession: help applications enable "international". --- cde/programs/dtsession/sys.resources.src | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/cde/programs/dtsession/sys.resources.src b/cde/programs/dtsession/sys.resources.src index 0756f7931..19aa9f48a 100644 --- a/cde/programs/dtsession/sys.resources.src +++ b/cde/programs/dtsession/sys.resources.src @@ -186,4 +186,20 @@ XCOMM endif !################################################################# *dtEnvMapForRemote: DTAPPSEARCHPATH:DTHELPSEARCHPATH:DTDATABASESEARCHPATH:XMICONSEARCHPATH:XMICONBMSEARCHPATH +!################################################################# +!# +!# "international" +!# +!# This resource is not for CDE. Some applications (eg. +!# xfontsel) need it to enable the international feature. For +!# a better UX, CDE sets it for users. However, CDE can't +!# foreknow what applications will be installed by a user or +!# what resources will be defined by an application. In +!# extreme cases, an application may define "international" +!# as other meanings. In other words, users may need tweaking +!# the resources for individual applictions in some scenarios. +!# +!################################################################# +*international: True + !################ eof ####################### From 4bea26e4b7283372a90edc4abab182cf8f79a4a3 Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Sat, 27 Aug 2022 13:52:40 -0600 Subject: [PATCH 24/75] Remove ksh 1.0.0beta --- .../dtksh/ksh93/.github/workflows/ci.yml | 32 - cde/programs/dtksh/ksh93/.gitignore | 42 - cde/programs/dtksh/ksh93/ANNOUNCE | 249 - cde/programs/dtksh/ksh93/COPYRIGHT | 146 - cde/programs/dtksh/ksh93/LICENSE.md | 87 - cde/programs/dtksh/ksh93/NEWS | 1664 -- cde/programs/dtksh/ksh93/README.md | 222 - cde/programs/dtksh/ksh93/TODO | 124 - cde/programs/dtksh/ksh93/bin/Mamfile_indent | 33 - .../dtksh/ksh93/bin/Mamfile_rm_unused_vars | 30 - cde/programs/dtksh/ksh93/bin/ignore | 37 - cde/programs/dtksh/ksh93/bin/mamprobe | 274 - cde/programs/dtksh/ksh93/bin/package | 3562 --- cde/programs/dtksh/ksh93/bin/shtests | 54 - cde/programs/dtksh/ksh93/bin/silent | 36 - cde/programs/dtksh/ksh93/docs/index.html | 6 - .../dtksh/ksh93/docs/ksh/builtins.html | 710 - .../dtksh/ksh93/docs/ksh/examples.html | 55 - cde/programs/dtksh/ksh93/docs/ksh/faq.html | 1004 - .../dtksh/ksh93/docs/ksh/features.html | 207 - .../dtksh/ksh93/docs/ksh/functions/dirs.txt | 111 - .../docs/ksh/functions/emacs_keybind.txt | 12 - .../dtksh/ksh93/docs/ksh/functions/getopt.txt | 28 - .../ksh93/docs/ksh/functions/keybind.txt | 14 - .../dtksh/ksh93/docs/ksh/functions/popd.txt | 111 - .../dtksh/ksh93/docs/ksh/functions/pushd.txt | 111 - .../dtksh/ksh93/docs/ksh/functions/title.txt | 54 - .../ksh93/docs/ksh/functions/vi_keybind.txt | 10 - cde/programs/dtksh/ksh93/docs/ksh/index.html | 10 - cde/programs/dtksh/ksh93/docs/ksh/ksh.html | 118 - .../ksh93/docs/ksh/scripts/cgi-lib.ksh.txt | 129 - .../ksh93/docs/ksh/scripts/dump-cgi.ksh.txt | 17 - .../dtksh/ksh93/docs/ksh/scripts/env.txt | 66 - .../dtksh/ksh93/docs/ksh/scripts/line.txt | 2 - .../dtksh/ksh93/docs/ksh/scripts/which.txt | 2 - cde/programs/dtksh/ksh93/src/Mamfile | 16 - cde/programs/dtksh/ksh93/src/cmd/INIT/C+probe | 870 - cde/programs/dtksh/ksh93/src/cmd/INIT/Mamfile | 1130 - cde/programs/dtksh/ksh93/src/cmd/INIT/RELEASE | 934 - .../dtksh/ksh93/src/cmd/INIT/ar.ibm.risc | 9 - .../dtksh/ksh93/src/cmd/INIT/cc.hp.ia64 | 13 - .../dtksh/ksh93/src/cmd/INIT/cc.hp.pa | 13 - .../dtksh/ksh93/src/cmd/INIT/cc.hp.pa64 | 11 - .../dtksh/ksh93/src/cmd/INIT/cc.ibm.risc | 63 - .../dtksh/ksh93/src/cmd/INIT/cc.ibm.risc.gcc | 36 - .../dtksh/ksh93/src/cmd/INIT/cc.lynxos.i386 | 81 - .../dtksh/ksh93/src/cmd/INIT/cc.lynxos.ppc | 85 - .../dtksh/ksh93/src/cmd/INIT/cc.mvs.390 | 279 - .../dtksh/ksh93/src/cmd/INIT/cc.next.i386 | 158 - .../dtksh/ksh93/src/cmd/INIT/cc.next.m68k | 9 - .../dtksh/ksh93/src/cmd/INIT/cc.osf.alpha | 9 - .../dtksh/ksh93/src/cmd/INIT/cc.pentium4 | 26 - .../dtksh/ksh93/src/cmd/INIT/cc.sco.i386 | 9 - .../dtksh/ksh93/src/cmd/INIT/cc.sgi.mips2 | 68 - .../dtksh/ksh93/src/cmd/INIT/cc.sgi.mips3 | 110 - .../dtksh/ksh93/src/cmd/INIT/cc.sgi.mips3-o32 | 65 - .../dtksh/ksh93/src/cmd/INIT/cc.sgi.mips4 | 90 - .../dtksh/ksh93/src/cmd/INIT/cc.sgi.mips4-n32 | 65 - .../dtksh/ksh93/src/cmd/INIT/cc.specialize | 35 - .../dtksh/ksh93/src/cmd/INIT/cc.unix.mc68k | 76 - .../dtksh/ksh93/src/cmd/INIT/cc.unixware.i386 | 9 - .../dtksh/ksh93/src/cmd/INIT/crossexec.sh | 144 - cde/programs/dtksh/ksh93/src/cmd/INIT/db.c | 38 - cde/programs/dtksh/ksh93/src/cmd/INIT/dl.c | 34 - .../dtksh/ksh93/src/cmd/INIT/execrate.sh | 190 - .../dtksh/ksh93/src/cmd/INIT/filter.sh | 105 - cde/programs/dtksh/ksh93/src/cmd/INIT/gdbm.c | 38 - cde/programs/dtksh/ksh93/src/cmd/INIT/gdbm1.c | 38 - cde/programs/dtksh/ksh93/src/cmd/INIT/gdbm2.c | 38 - cde/programs/dtksh/ksh93/src/cmd/INIT/hello.c | 24 - .../dtksh/ksh93/src/cmd/INIT/hosttype.tst | 6 - cde/programs/dtksh/ksh93/src/cmd/INIT/iconv.c | 30 - cde/programs/dtksh/ksh93/src/cmd/INIT/iffe.sh | 4420 --- .../dtksh/ksh93/src/cmd/INIT/iffe.tst | 1881 -- .../dtksh/ksh93/src/cmd/INIT/ignore.sh | 37 - cde/programs/dtksh/ksh93/src/cmd/INIT/intl.c | 30 - .../dtksh/ksh93/src/cmd/INIT/ld.hp.pa | 5 - .../dtksh/ksh93/src/cmd/INIT/ldd.cygwin.i386 | 22 - .../dtksh/ksh93/src/cmd/INIT/ldd.darwin | 2 - .../dtksh/ksh93/src/cmd/INIT/ldd.hp.pa | 21 - .../dtksh/ksh93/src/cmd/INIT/ldd.ibm.risc | 16 - .../dtksh/ksh93/src/cmd/INIT/ldd.lynxos | 1 - .../dtksh/ksh93/src/cmd/INIT/ldd.mvs.390 | 18 - cde/programs/dtksh/ksh93/src/cmd/INIT/ldd.sgi | 2 - cde/programs/dtksh/ksh93/src/cmd/INIT/m.c | 35 - cde/programs/dtksh/ksh93/src/cmd/INIT/m2.c | 37 - cde/programs/dtksh/ksh93/src/cmd/INIT/m3.c | 37 - cde/programs/dtksh/ksh93/src/cmd/INIT/m4.c | 33 - cde/programs/dtksh/ksh93/src/cmd/INIT/m5.c | 33 - cde/programs/dtksh/ksh93/src/cmd/INIT/m6.c | 35 - .../dtksh/ksh93/src/cmd/INIT/make.probe | 2145 -- .../dtksh/ksh93/src/cmd/INIT/mamake.c | 2411 -- .../dtksh/ksh93/src/cmd/INIT/mamake.rt | 40 - .../dtksh/ksh93/src/cmd/INIT/mamake.tst | 63 - .../dtksh/ksh93/src/cmd/INIT/mamprobe.sh | 274 - .../dtksh/ksh93/src/cmd/INIT/mkdir.sh | 83 - .../dtksh/ksh93/src/cmd/INIT/mktest.sh | 644 - .../dtksh/ksh93/src/cmd/INIT/mprobe.sh | 31 - cde/programs/dtksh/ksh93/src/cmd/INIT/nsl.c | 32 - cde/programs/dtksh/ksh93/src/cmd/INIT/p.c | 25 - .../dtksh/ksh93/src/cmd/INIT/package.sh | 3562 --- .../dtksh/ksh93/src/cmd/INIT/probe.win32 | 274 - .../dtksh/ksh93/src/cmd/INIT/proto.sh | 35 - .../dtksh/ksh93/src/cmd/INIT/regress.sh | 1466 - cde/programs/dtksh/ksh93/src/cmd/INIT/rt.sh | 482 - .../dtksh/ksh93/src/cmd/INIT/silent.sh | 36 - .../dtksh/ksh93/src/cmd/INIT/socket.c | 34 - cde/programs/dtksh/ksh93/src/cmd/INIT/w.c | 31 - cde/programs/dtksh/ksh93/src/cmd/INIT/w2.c | 28 - cde/programs/dtksh/ksh93/src/cmd/Mamfile | 16 - .../dtksh/ksh93/src/cmd/builtin/Mamfile | 69 - .../dtksh/ksh93/src/cmd/builtin/RELEASE | 10 - .../dtksh/ksh93/src/cmd/builtin/features/pty | 59 - .../dtksh/ksh93/src/cmd/builtin/pty.c | 1150 - .../dtksh/ksh93/src/cmd/ksh93/COMPATIBILITY | 313 - cde/programs/dtksh/ksh93/src/cmd/ksh93/DESIGN | 171 - .../dtksh/ksh93/src/cmd/ksh93/Mamfile | 1564 -- .../dtksh/ksh93/src/cmd/ksh93/OBSOLETE | 152 - .../dtksh/ksh93/src/cmd/ksh93/PROMO.mm | 141 - cde/programs/dtksh/ksh93/src/cmd/ksh93/README | 294 - .../dtksh/ksh93/src/cmd/ksh93/RELEASE | 3114 --- .../dtksh/ksh93/src/cmd/ksh93/RELEASE88 | 426 - .../dtksh/ksh93/src/cmd/ksh93/RELEASE93 | 458 - .../dtksh/ksh93/src/cmd/ksh93/SHOPT.sh | 46 - cde/programs/dtksh/ksh93/src/cmd/ksh93/TYPES | 182 - .../dtksh/ksh93/src/cmd/ksh93/bltins/alarm.c | 290 - .../dtksh/ksh93/src/cmd/ksh93/bltins/cd_pwd.c | 309 - .../dtksh/ksh93/src/cmd/ksh93/bltins/cflow.c | 137 - .../dtksh/ksh93/src/cmd/ksh93/bltins/enum.c | 307 - .../ksh93/src/cmd/ksh93/bltins/getopts.c | 211 - .../dtksh/ksh93/src/cmd/ksh93/bltins/hist.c | 326 - .../dtksh/ksh93/src/cmd/ksh93/bltins/misc.c | 634 - .../ksh93/src/cmd/ksh93/bltins/mkservice.c | 500 - .../dtksh/ksh93/src/cmd/ksh93/bltins/print.c | 1152 - .../dtksh/ksh93/src/cmd/ksh93/bltins/read.c | 846 - .../ksh93/src/cmd/ksh93/bltins/regress.c | 346 - .../dtksh/ksh93/src/cmd/ksh93/bltins/sleep.c | 156 - .../dtksh/ksh93/src/cmd/ksh93/bltins/test.c | 716 - .../dtksh/ksh93/src/cmd/ksh93/bltins/trap.c | 521 - .../ksh93/src/cmd/ksh93/bltins/typeset.c | 1651 -- .../dtksh/ksh93/src/cmd/ksh93/bltins/ulimit.c | 240 - .../dtksh/ksh93/src/cmd/ksh93/bltins/umask.c | 104 - .../dtksh/ksh93/src/cmd/ksh93/bltins/whence.c | 357 - .../dtksh/ksh93/src/cmd/ksh93/builtins.mm | 648 - .../dtksh/ksh93/src/cmd/ksh93/data/aliases.c | 35 - .../dtksh/ksh93/src/cmd/ksh93/data/builtins.c | 2107 -- .../dtksh/ksh93/src/cmd/ksh93/data/keywords.c | 62 - .../ksh93/src/cmd/ksh93/data/lexstates.c | 453 - .../dtksh/ksh93/src/cmd/ksh93/data/limits.c | 65 - .../dtksh/ksh93/src/cmd/ksh93/data/math.tab | 99 - .../dtksh/ksh93/src/cmd/ksh93/data/msg.c | 210 - .../dtksh/ksh93/src/cmd/ksh93/data/options.c | 112 - .../dtksh/ksh93/src/cmd/ksh93/data/signals.c | 252 - .../dtksh/ksh93/src/cmd/ksh93/data/strdata.c | 103 - .../dtksh/ksh93/src/cmd/ksh93/data/testops.c | 173 - .../ksh93/src/cmd/ksh93/data/variables.c | 135 - .../ksh93/src/cmd/ksh93/edit/completion.c | 609 - .../dtksh/ksh93/src/cmd/ksh93/edit/edit.c | 1936 -- .../dtksh/ksh93/src/cmd/ksh93/edit/emacs.c | 1635 -- .../dtksh/ksh93/src/cmd/ksh93/edit/hexpand.c | 737 - .../dtksh/ksh93/src/cmd/ksh93/edit/history.c | 1165 - .../dtksh/ksh93/src/cmd/ksh93/edit/vi.c | 2788 -- .../dtksh/ksh93/src/cmd/ksh93/features/cmds | 39 - .../ksh93/src/cmd/ksh93/features/dynamic | 5 - .../ksh93/src/cmd/ksh93/features/externs | 116 - .../dtksh/ksh93/src/cmd/ksh93/features/locale | 45 - .../ksh93/src/cmd/ksh93/features/math.sh | 341 - .../ksh93/src/cmd/ksh93/features/options | 73 - .../dtksh/ksh93/src/cmd/ksh93/features/poll | 155 - .../ksh93/src/cmd/ksh93/features/rlimits | 25 - .../dtksh/ksh93/src/cmd/ksh93/features/setjmp | 18 - .../ksh93/src/cmd/ksh93/features/sigfeatures | 49 - .../dtksh/ksh93/src/cmd/ksh93/features/time | 59 - .../dtksh/ksh93/src/cmd/ksh93/features/ttys | 3 - .../dtksh/ksh93/src/cmd/ksh93/fun/dirs | 112 - .../dtksh/ksh93/src/cmd/ksh93/fun/popd | 111 - .../dtksh/ksh93/src/cmd/ksh93/fun/pushd | 111 - .../ksh93/src/cmd/ksh93/include/argnod.h | 142 - .../ksh93/src/cmd/ksh93/include/builtins.h | 221 - .../dtksh/ksh93/src/cmd/ksh93/include/defs.h | 251 - .../dtksh/ksh93/src/cmd/ksh93/include/edit.h | 247 - .../dtksh/ksh93/src/cmd/ksh93/include/fault.h | 123 - .../dtksh/ksh93/src/cmd/ksh93/include/fcin.h | 71 - .../ksh93/src/cmd/ksh93/include/history.h | 75 - .../dtksh/ksh93/src/cmd/ksh93/include/io.h | 108 - .../dtksh/ksh93/src/cmd/ksh93/include/jobs.h | 190 - .../ksh93/src/cmd/ksh93/include/lexstates.h | 160 - .../dtksh/ksh93/src/cmd/ksh93/include/name.h | 271 - .../ksh93/src/cmd/ksh93/include/national.h | 39 - .../dtksh/ksh93/src/cmd/ksh93/include/nval.h | 300 - .../dtksh/ksh93/src/cmd/ksh93/include/path.h | 150 - .../ksh93/src/cmd/ksh93/include/regress.h | 66 - .../dtksh/ksh93/src/cmd/ksh93/include/shell.h | 502 - .../dtksh/ksh93/src/cmd/ksh93/include/shlex.h | 198 - .../ksh93/src/cmd/ksh93/include/shnodes.h | 221 - .../ksh93/src/cmd/ksh93/include/shtable.h | 66 - .../ksh93/src/cmd/ksh93/include/streval.h | 205 - .../ksh93/src/cmd/ksh93/include/terminal.h | 207 - .../dtksh/ksh93/src/cmd/ksh93/include/test.h | 72 - .../ksh93/src/cmd/ksh93/include/timeout.h | 31 - .../ksh93/src/cmd/ksh93/include/ulimit.h | 184 - .../ksh93/src/cmd/ksh93/include/variables.h | 109 - .../ksh93/src/cmd/ksh93/include/version.h | 44 - .../dtksh/ksh93/src/cmd/ksh93/ksh-regress.rt | 71 - .../dtksh/ksh93/src/cmd/ksh93/ksh-regress.tst | 22544 ---------------- .../dtksh/ksh93/src/cmd/ksh93/mamexec | 307 - .../dtksh/ksh93/src/cmd/ksh93/mamstate.c | 74 - cde/programs/dtksh/ksh93/src/cmd/ksh93/nval.3 | 688 - cde/programs/dtksh/ksh93/src/cmd/ksh93/sh.1 | 8742 ------ .../dtksh/ksh93/src/cmd/ksh93/sh.memo | 3248 --- .../dtksh/ksh93/src/cmd/ksh93/sh/args.c | 832 - .../dtksh/ksh93/src/cmd/ksh93/sh/arith.c | 601 - .../dtksh/ksh93/src/cmd/ksh93/sh/array.c | 1853 -- .../dtksh/ksh93/src/cmd/ksh93/sh/defs.c | 47 - .../dtksh/ksh93/src/cmd/ksh93/sh/deparse.c | 602 - .../dtksh/ksh93/src/cmd/ksh93/sh/expand.c | 366 - .../dtksh/ksh93/src/cmd/ksh93/sh/fault.c | 697 - .../dtksh/ksh93/src/cmd/ksh93/sh/fcin.c | 169 - .../dtksh/ksh93/src/cmd/ksh93/sh/init.c | 2157 -- .../dtksh/ksh93/src/cmd/ksh93/sh/io.c | 2747 -- .../dtksh/ksh93/src/cmd/ksh93/sh/jobs.c | 1976 -- .../dtksh/ksh93/src/cmd/ksh93/sh/lex.c | 2488 -- .../dtksh/ksh93/src/cmd/ksh93/sh/macro.c | 2843 -- .../dtksh/ksh93/src/cmd/ksh93/sh/main.c | 824 - .../dtksh/ksh93/src/cmd/ksh93/sh/name.c | 3735 --- .../dtksh/ksh93/src/cmd/ksh93/sh/nvdisc.c | 1527 -- .../dtksh/ksh93/src/cmd/ksh93/sh/nvtree.c | 1144 - .../dtksh/ksh93/src/cmd/ksh93/sh/nvtype.c | 1537 -- .../dtksh/ksh93/src/cmd/ksh93/sh/parse.c | 2148 -- .../dtksh/ksh93/src/cmd/ksh93/sh/path.c | 1882 -- .../dtksh/ksh93/src/cmd/ksh93/sh/pmain.c | 46 - .../dtksh/ksh93/src/cmd/ksh93/sh/shcomp.c | 222 - .../dtksh/ksh93/src/cmd/ksh93/sh/streval.c | 1024 - .../dtksh/ksh93/src/cmd/ksh93/sh/string.c | 743 - .../dtksh/ksh93/src/cmd/ksh93/sh/subshell.c | 961 - .../dtksh/ksh93/src/cmd/ksh93/sh/suid_exec.c | 521 - .../dtksh/ksh93/src/cmd/ksh93/sh/tdump.c | 265 - .../dtksh/ksh93/src/cmd/ksh93/sh/timers.c | 247 - .../dtksh/ksh93/src/cmd/ksh93/sh/trestore.c | 339 - .../dtksh/ksh93/src/cmd/ksh93/sh/waitevent.c | 54 - .../dtksh/ksh93/src/cmd/ksh93/sh/xec.c | 3640 --- .../dtksh/ksh93/src/cmd/ksh93/shell.3 | 427 - .../dtksh/ksh93/src/cmd/ksh93/tests/_common | 41 - .../dtksh/ksh93/src/cmd/ksh93/tests/alias.sh | 279 - .../dtksh/ksh93/src/cmd/ksh93/tests/append.sh | 110 - .../dtksh/ksh93/src/cmd/ksh93/tests/arith.sh | 951 - .../dtksh/ksh93/src/cmd/ksh93/tests/arrays.sh | 742 - .../ksh93/src/cmd/ksh93/tests/arrays2.sh | 268 - .../ksh93/src/cmd/ksh93/tests/attributes.sh | 709 - .../dtksh/ksh93/src/cmd/ksh93/tests/basic.sh | 856 - .../ksh93/src/cmd/ksh93/tests/bracket.sh | 519 - .../ksh93/src/cmd/ksh93/tests/builtins.sh | 1517 -- .../dtksh/ksh93/src/cmd/ksh93/tests/case.sh | 103 - .../dtksh/ksh93/src/cmd/ksh93/tests/comvar.sh | 711 - .../ksh93/src/cmd/ksh93/tests/comvario.sh | 657 - .../ksh93/src/cmd/ksh93/tests/coprocess.sh | 364 - .../ksh93/src/cmd/ksh93/tests/cubetype.sh | 207 - .../dtksh/ksh93/src/cmd/ksh93/tests/enum.sh | 165 - .../dtksh/ksh93/src/cmd/ksh93/tests/exit.sh | 186 - .../dtksh/ksh93/src/cmd/ksh93/tests/expand.sh | 120 - .../ksh93/src/cmd/ksh93/tests/functions.sh | 1346 - .../dtksh/ksh93/src/cmd/ksh93/tests/glob.sh | 418 - .../dtksh/ksh93/src/cmd/ksh93/tests/grep.sh | 95 - .../ksh93/src/cmd/ksh93/tests/heredoc.sh | 529 - .../dtksh/ksh93/src/cmd/ksh93/tests/io.sh | 909 - .../dtksh/ksh93/src/cmd/ksh93/tests/jobs.sh | 90 - .../dtksh/ksh93/src/cmd/ksh93/tests/leaks.sh | 428 - .../dtksh/ksh93/src/cmd/ksh93/tests/locale.sh | 420 - .../dtksh/ksh93/src/cmd/ksh93/tests/math.sh | 264 - .../ksh93/src/cmd/ksh93/tests/nameref.sh | 691 - .../ksh93/src/cmd/ksh93/tests/namespace.sh | 101 - .../ksh93/src/cmd/ksh93/tests/options.sh | 577 - .../dtksh/ksh93/src/cmd/ksh93/tests/path.sh | 928 - .../ksh93/src/cmd/ksh93/tests/pointtype.sh | 131 - .../dtksh/ksh93/src/cmd/ksh93/tests/pty.sh | 950 - .../ksh93/src/cmd/ksh93/tests/quoting.sh | 365 - .../ksh93/src/cmd/ksh93/tests/quoting2.sh | 283 - .../ksh93/src/cmd/ksh93/tests/readcsv.sh | 65 - .../ksh93/src/cmd/ksh93/tests/readonly.sh | 349 - .../ksh93/src/cmd/ksh93/tests/recttype.sh | 63 - .../ksh93/src/cmd/ksh93/tests/restricted.sh | 80 - .../dtksh/ksh93/src/cmd/ksh93/tests/return.sh | 250 - .../dtksh/ksh93/src/cmd/ksh93/tests/select.sh | 57 - .../dtksh/ksh93/src/cmd/ksh93/tests/shtests | 474 - .../ksh93/src/cmd/ksh93/tests/sigchld.sh | 153 - .../dtksh/ksh93/src/cmd/ksh93/tests/signal.sh | 557 - .../ksh93/src/cmd/ksh93/tests/statics.sh | 680 - .../ksh93/src/cmd/ksh93/tests/subshell.sh | 1099 - .../ksh93/src/cmd/ksh93/tests/substring.sh | 688 - .../dtksh/ksh93/src/cmd/ksh93/tests/tilde.sh | 172 - .../ksh93/src/cmd/ksh93/tests/timetype.sh | 74 - .../ksh93/src/cmd/ksh93/tests/treemove.sh | 155 - .../dtksh/ksh93/src/cmd/ksh93/tests/types.sh | 661 - .../ksh93/src/cmd/ksh93/tests/variables.sh | 1408 - .../ksh93/src/cmd/ksh93/tests/vartree1.sh | 209 - .../ksh93/src/cmd/ksh93/tests/vartree2.sh | 329 - cde/programs/dtksh/ksh93/src/lib/Mamfile | 16 - .../dtksh/ksh93/src/lib/libast/Mamfile | 7215 ----- .../dtksh/ksh93/src/lib/libast/README | 95 - .../dtksh/ksh93/src/lib/libast/RELEASE | 1808 -- .../ksh93/src/lib/libast/aso/aso-fcntl.c | 188 - .../dtksh/ksh93/src/lib/libast/aso/aso-sem.c | 193 - .../dtksh/ksh93/src/lib/libast/aso/aso.c | 867 - .../dtksh/ksh93/src/lib/libast/aso/asohdr.h | 68 - .../dtksh/ksh93/src/lib/libast/aso/asolock.c | 55 - .../dtksh/ksh93/src/lib/libast/aso/asometh.c | 43 - .../dtksh/ksh93/src/lib/libast/aso/asorelax.c | 56 - .../ksh93/src/lib/libast/astsa/README-astsa | 15 - .../dtksh/ksh93/src/lib/libast/astsa/aso.c | 56 - .../dtksh/ksh93/src/lib/libast/astsa/aso.h | 33 - .../dtksh/ksh93/src/lib/libast/astsa/ast.c | 85 - .../dtksh/ksh93/src/lib/libast/astsa/ast.h | 157 - .../ksh93/src/lib/libast/astsa/ast_common.h | 62 - .../ksh93/src/lib/libast/astsa/astsa.manifest | 49 - .../dtksh/ksh93/src/lib/libast/astsa/astsa.mm | 33 - .../ksh93/src/lib/libast/astsa/astsa.omk | 81 - .../dtksh/ksh93/src/lib/libast/astsa/ccode.h | 35 - .../dtksh/ksh93/src/lib/libast/astsa/debug.h | 30 - .../dtksh/ksh93/src/lib/libast/astsa/error.c | 103 - .../dtksh/ksh93/src/lib/libast/astsa/error.h | 67 - .../ksh93/src/lib/libast/astsa/hashkey.h | 62 - .../dtksh/ksh93/src/lib/libast/astsa/mkast_sa | 150 - .../dtksh/ksh93/src/lib/libast/astsa/option.h | 106 - .../dtksh/ksh93/src/lib/libast/astsa/optlib.h | 106 - .../dtksh/ksh93/src/lib/libast/astsa/sfstr.c | 247 - .../dtksh/ksh93/src/lib/libast/astsa/sfstr.h | 61 - .../dtksh/ksh93/src/lib/libast/astsa/strdup.c | 37 - .../ksh93/src/lib/libast/astsa/strmatch.c | 597 - .../dtksh/ksh93/src/lib/libast/astsa/times.h | 28 - .../ksh93/src/lib/libast/astsa/vmalloc.c | 102 - .../ksh93/src/lib/libast/astsa/vmalloc.h | 62 - .../dtksh/ksh93/src/lib/libast/cdt/cdtlib.h | 158 - .../dtksh/ksh93/src/lib/libast/cdt/dtclose.c | 62 - .../dtksh/ksh93/src/lib/libast/cdt/dtcomp.c | 55 - .../dtksh/ksh93/src/lib/libast/cdt/dtdisc.c | 77 - .../dtksh/ksh93/src/lib/libast/cdt/dthash.c | 447 - .../dtksh/ksh93/src/lib/libast/cdt/dthdr.h | 38 - .../dtksh/ksh93/src/lib/libast/cdt/dtlist.c | 347 - .../dtksh/ksh93/src/lib/libast/cdt/dtmethod.c | 102 - .../dtksh/ksh93/src/lib/libast/cdt/dtnew.c | 81 - .../dtksh/ksh93/src/lib/libast/cdt/dtopen.c | 143 - .../dtksh/ksh93/src/lib/libast/cdt/dtstat.c | 55 - .../ksh93/src/lib/libast/cdt/dtstrhash.c | 53 - .../dtksh/ksh93/src/lib/libast/cdt/dttree.c | 663 - .../dtksh/ksh93/src/lib/libast/cdt/dtuser.c | 60 - .../dtksh/ksh93/src/lib/libast/cdt/dtview.c | 145 - .../dtksh/ksh93/src/lib/libast/cdt/dtwalk.c | 47 - .../dtksh/ksh93/src/lib/libast/comp/atexit.c | 111 - .../ksh93/src/lib/libast/comp/basename.c | 55 - .../dtksh/ksh93/src/lib/libast/comp/catopen.c | 182 - .../ksh93/src/lib/libast/comp/closelog.c | 51 - .../dtksh/ksh93/src/lib/libast/comp/conf.sh | 1648 -- .../dtksh/ksh93/src/lib/libast/comp/conf.tab | 640 - .../dtksh/ksh93/src/lib/libast/comp/creat64.c | 38 - .../dtksh/ksh93/src/lib/libast/comp/dirname.c | 61 - .../dtksh/ksh93/src/lib/libast/comp/dup2.c | 46 - .../dtksh/ksh93/src/lib/libast/comp/eaccess.c | 139 - .../dtksh/ksh93/src/lib/libast/comp/errno.c | 40 - .../dtksh/ksh93/src/lib/libast/comp/execlp.c | 50 - .../dtksh/ksh93/src/lib/libast/comp/execve.c | 70 - .../dtksh/ksh93/src/lib/libast/comp/execvp.c | 50 - .../dtksh/ksh93/src/lib/libast/comp/execvpe.c | 78 - .../ksh93/src/lib/libast/comp/fakelink.h | 34 - .../dtksh/ksh93/src/lib/libast/comp/fcntl.c | 98 - .../dtksh/ksh93/src/lib/libast/comp/fmtmsg.h | 141 - .../ksh93/src/lib/libast/comp/fmtmsglib.c | 335 - .../dtksh/ksh93/src/lib/libast/comp/fnmatch.c | 79 - .../dtksh/ksh93/src/lib/libast/comp/fnmatch.h | 61 - .../dtksh/ksh93/src/lib/libast/comp/frexp.c | 153 - .../dtksh/ksh93/src/lib/libast/comp/frexpl.c | 161 - .../dtksh/ksh93/src/lib/libast/comp/fsync.c | 42 - .../dtksh/ksh93/src/lib/libast/comp/ftw.c | 50 - .../dtksh/ksh93/src/lib/libast/comp/ftw.h | 60 - .../dtksh/ksh93/src/lib/libast/comp/getdate.c | 83 - .../ksh93/src/lib/libast/comp/getgroups.c | 78 - .../ksh93/src/lib/libast/comp/getlogin.c | 42 - .../dtksh/ksh93/src/lib/libast/comp/getopt.c | 82 - .../dtksh/ksh93/src/lib/libast/comp/getopt.h | 51 - .../dtksh/ksh93/src/lib/libast/comp/getoptl.c | 151 - .../dtksh/ksh93/src/lib/libast/comp/getpgrp.c | 47 - .../ksh93/src/lib/libast/comp/getsubopt.c | 84 - .../dtksh/ksh93/src/lib/libast/comp/getwd.c | 37 - .../dtksh/ksh93/src/lib/libast/comp/gross.c | 100 - .../ksh93/src/lib/libast/comp/gross_sgi.h | 189 - .../dtksh/ksh93/src/lib/libast/comp/hsearch.c | 121 - .../dtksh/ksh93/src/lib/libast/comp/iconv.c | 1590 -- .../dtksh/ksh93/src/lib/libast/comp/killpg.c | 40 - .../dtksh/ksh93/src/lib/libast/comp/libgen.h | 52 - .../dtksh/ksh93/src/lib/libast/comp/link.c | 43 - .../ksh93/src/lib/libast/comp/localeconv.c | 90 - .../dtksh/ksh93/src/lib/libast/comp/lstat.c | 39 - .../dtksh/ksh93/src/lib/libast/comp/memccpy.c | 51 - .../dtksh/ksh93/src/lib/libast/comp/memchr.c | 49 - .../dtksh/ksh93/src/lib/libast/comp/memcmp.c | 45 - .../dtksh/ksh93/src/lib/libast/comp/memcpy.c | 60 - .../dtksh/ksh93/src/lib/libast/comp/memmove.c | 53 - .../dtksh/ksh93/src/lib/libast/comp/memset.c | 42 - .../dtksh/ksh93/src/lib/libast/comp/mkdir.c | 62 - .../dtksh/ksh93/src/lib/libast/comp/mkfifo.c | 46 - .../dtksh/ksh93/src/lib/libast/comp/mknod.c | 46 - .../dtksh/ksh93/src/lib/libast/comp/mktemp.c | 85 - .../dtksh/ksh93/src/lib/libast/comp/mktime.c | 77 - .../dtksh/ksh93/src/lib/libast/comp/mount.c | 45 - .../dtksh/ksh93/src/lib/libast/comp/nftw.c | 61 - .../dtksh/ksh93/src/lib/libast/comp/omitted.c | 1180 - .../dtksh/ksh93/src/lib/libast/comp/open.c | 119 - .../dtksh/ksh93/src/lib/libast/comp/openlog.c | 58 - .../dtksh/ksh93/src/lib/libast/comp/putenv.c | 53 - .../dtksh/ksh93/src/lib/libast/comp/re_comp.c | 81 - .../dtksh/ksh93/src/lib/libast/comp/re_comp.h | 41 - .../ksh93/src/lib/libast/comp/readlink.c | 57 - .../ksh93/src/lib/libast/comp/realpath.c | 53 - .../dtksh/ksh93/src/lib/libast/comp/regcmp.c | 224 - .../dtksh/ksh93/src/lib/libast/comp/regexp.c | 123 - .../dtksh/ksh93/src/lib/libast/comp/regexp.h | 129 - .../dtksh/ksh93/src/lib/libast/comp/remove.c | 49 - .../dtksh/ksh93/src/lib/libast/comp/rename.c | 98 - .../ksh93/src/lib/libast/comp/resolvepath.c | 72 - .../dtksh/ksh93/src/lib/libast/comp/rmdir.c | 66 - .../dtksh/ksh93/src/lib/libast/comp/setenv.c | 58 - .../ksh93/src/lib/libast/comp/setlocale.c | 2859 -- .../ksh93/src/lib/libast/comp/setlogmask.c | 48 - .../dtksh/ksh93/src/lib/libast/comp/setpgid.c | 76 - .../dtksh/ksh93/src/lib/libast/comp/setsid.c | 90 - .../dtksh/ksh93/src/lib/libast/comp/sigflag.c | 52 - .../ksh93/src/lib/libast/comp/sigunblock.c | 63 - .../ksh93/src/lib/libast/comp/spawnveg.c | 295 - .../dtksh/ksh93/src/lib/libast/comp/statvfs.c | 163 - .../ksh93/src/lib/libast/comp/strcasecmp.c | 58 - .../dtksh/ksh93/src/lib/libast/comp/strchr.c | 57 - .../ksh93/src/lib/libast/comp/strftime.c | 104 - .../ksh93/src/lib/libast/comp/strncasecmp.c | 62 - .../ksh93/src/lib/libast/comp/strptime.c | 82 - .../dtksh/ksh93/src/lib/libast/comp/strrchr.c | 60 - .../dtksh/ksh93/src/lib/libast/comp/strstr.c | 76 - .../dtksh/ksh93/src/lib/libast/comp/strtod.c | 32 - .../dtksh/ksh93/src/lib/libast/comp/strtol.c | 35 - .../dtksh/ksh93/src/lib/libast/comp/strtold.c | 53 - .../dtksh/ksh93/src/lib/libast/comp/strtoll.c | 46 - .../dtksh/ksh93/src/lib/libast/comp/strtoul.c | 36 - .../ksh93/src/lib/libast/comp/strtoull.c | 47 - .../dtksh/ksh93/src/lib/libast/comp/swab.c | 60 - .../dtksh/ksh93/src/lib/libast/comp/symlink.c | 55 - .../dtksh/ksh93/src/lib/libast/comp/syslog.c | 369 - .../dtksh/ksh93/src/lib/libast/comp/syslog.h | 132 - .../ksh93/src/lib/libast/comp/sysloglib.h | 54 - .../dtksh/ksh93/src/lib/libast/comp/system.c | 55 - .../dtksh/ksh93/src/lib/libast/comp/tempnam.c | 58 - .../dtksh/ksh93/src/lib/libast/comp/tmpnam.c | 51 - .../ksh93/src/lib/libast/comp/transition.c | 86 - .../dtksh/ksh93/src/lib/libast/comp/tsearch.c | 199 - .../dtksh/ksh93/src/lib/libast/comp/unlink.c | 38 - .../ksh93/src/lib/libast/comp/unsetenv.c | 50 - .../dtksh/ksh93/src/lib/libast/comp/vfork.c | 51 - .../dtksh/ksh93/src/lib/libast/comp/waitpid.c | 199 - .../dtksh/ksh93/src/lib/libast/comp/wc.c | 139 - .../dtksh/ksh93/src/lib/libast/comp/wordexp.c | 217 - .../dtksh/ksh93/src/lib/libast/comp/wordexp.h | 63 - .../dtksh/ksh93/src/lib/libast/dir/dirlib.h | 168 - .../dtksh/ksh93/src/lib/libast/dir/dirstd.h | 59 - .../dtksh/ksh93/src/lib/libast/dir/getdents.c | 166 - .../dtksh/ksh93/src/lib/libast/dir/opendir.c | 97 - .../dtksh/ksh93/src/lib/libast/dir/readdir.c | 61 - .../ksh93/src/lib/libast/dir/rewinddir.c | 46 - .../dtksh/ksh93/src/lib/libast/dir/seekdir.c | 56 - .../dtksh/ksh93/src/lib/libast/dir/telldir.c | 43 - .../ksh93/src/lib/libast/disc/memfatal.c | 82 - .../dtksh/ksh93/src/lib/libast/disc/sfdcdio.c | 191 - .../dtksh/ksh93/src/lib/libast/disc/sfdcdos.c | 368 - .../ksh93/src/lib/libast/disc/sfdcfilter.c | 156 - .../dtksh/ksh93/src/lib/libast/disc/sfdchdr.h | 29 - .../ksh93/src/lib/libast/disc/sfdcmore.c | 330 - .../ksh93/src/lib/libast/disc/sfdcprefix.c | 132 - .../ksh93/src/lib/libast/disc/sfdcseekable.c | 197 - .../ksh93/src/lib/libast/disc/sfdcslow.c | 72 - .../ksh93/src/lib/libast/disc/sfdcsubstr.c | 172 - .../dtksh/ksh93/src/lib/libast/disc/sfdctee.c | 85 - .../ksh93/src/lib/libast/disc/sfdcunion.c | 171 - .../ksh93/src/lib/libast/disc/sfkeyprintf.c | 392 - .../ksh93/src/lib/libast/disc/sfstrtmp.c | 62 - .../ksh93/src/lib/libast/features/align.c | 188 - .../dtksh/ksh93/src/lib/libast/features/api | 15 - .../dtksh/ksh93/src/lib/libast/features/aso | 633 - .../ksh93/src/lib/libast/features/asometh | 44 - .../ksh93/src/lib/libast/features/botch.c | 72 - .../dtksh/ksh93/src/lib/libast/features/ccode | 81 - .../ksh93/src/lib/libast/features/common | 633 - .../ksh93/src/lib/libast/features/dirent | 273 - .../ksh93/src/lib/libast/features/eaccess | 11 - .../dtksh/ksh93/src/lib/libast/features/errno | 31 - .../ksh93/src/lib/libast/features/fcntl.c | 362 - .../dtksh/ksh93/src/lib/libast/features/float | 1253 - .../dtksh/ksh93/src/lib/libast/features/fs | 249 - .../dtksh/ksh93/src/lib/libast/features/hack | 51 - .../dtksh/ksh93/src/lib/libast/features/iconv | 115 - .../dtksh/ksh93/src/lib/libast/features/lib | 697 - .../ksh93/src/lib/libast/features/libpath.sh | 80 - .../ksh93/src/lib/libast/features/limits.c | 323 - .../ksh93/src/lib/libast/features/locale | 28 - .../dtksh/ksh93/src/lib/libast/features/map.c | 574 - .../dtksh/ksh93/src/lib/libast/features/mmap | 333 - .../ksh93/src/lib/libast/features/mode.c | 218 - .../dtksh/ksh93/src/lib/libast/features/ndbm | 29 - .../ksh93/src/lib/libast/features/nl_types | 63 - .../ksh93/src/lib/libast/features/omitted | 110 - .../ksh93/src/lib/libast/features/options | 1 - .../ksh93/src/lib/libast/features/param.sh | 54 - .../ksh93/src/lib/libast/features/preroot.sh | 52 - .../dtksh/ksh93/src/lib/libast/features/prog | 12 - .../ksh93/src/lib/libast/features/sfinit.c | 95 - .../dtksh/ksh93/src/lib/libast/features/sfio | 175 - .../ksh93/src/lib/libast/features/sig.sh | 134 - .../ksh93/src/lib/libast/features/siglist | 14 - .../ksh93/src/lib/libast/features/signal.c | 376 - .../ksh93/src/lib/libast/features/sizeof | 16 - .../ksh93/src/lib/libast/features/standards | 324 - .../dtksh/ksh93/src/lib/libast/features/stdio | 452 - .../dtksh/ksh93/src/lib/libast/features/sys | 275 - .../ksh93/src/lib/libast/features/syscall | 19 - .../dtksh/ksh93/src/lib/libast/features/time | 50 - .../dtksh/ksh93/src/lib/libast/features/tmlib | 38 - .../dtksh/ksh93/src/lib/libast/features/tmx | 105 - .../dtksh/ksh93/src/lib/libast/features/tty | 131 - .../dtksh/ksh93/src/lib/libast/features/tv | 80 - .../dtksh/ksh93/src/lib/libast/features/tvlib | 112 - .../dtksh/ksh93/src/lib/libast/features/uwin | 10 - .../dtksh/ksh93/src/lib/libast/features/vfork | 12 - .../ksh93/src/lib/libast/features/vmalloc | 200 - .../dtksh/ksh93/src/lib/libast/features/wait | 9 - .../dtksh/ksh93/src/lib/libast/features/wchar | 162 - .../ksh93/src/lib/libast/features/wctype | 13 - .../ksh93/src/lib/libast/hash/hashalloc.c | 213 - .../ksh93/src/lib/libast/hash/hashdump.c | 173 - .../ksh93/src/lib/libast/hash/hashfree.c | 144 - .../ksh93/src/lib/libast/hash/hashlast.c | 43 - .../dtksh/ksh93/src/lib/libast/hash/hashlib.h | 104 - .../ksh93/src/lib/libast/hash/hashlook.c | 367 - .../ksh93/src/lib/libast/hash/hashscan.c | 139 - .../ksh93/src/lib/libast/hash/hashsize.c | 84 - .../ksh93/src/lib/libast/hash/hashview.c | 88 - .../ksh93/src/lib/libast/hash/hashwalk.c | 51 - .../dtksh/ksh93/src/lib/libast/hash/memhash.c | 45 - .../dtksh/ksh93/src/lib/libast/hash/memsum.c | 53 - .../dtksh/ksh93/src/lib/libast/hash/strhash.c | 45 - .../dtksh/ksh93/src/lib/libast/hash/strkey.c | 49 - .../dtksh/ksh93/src/lib/libast/hash/strsum.c | 53 - .../dtksh/ksh93/src/lib/libast/include/aso.h | 183 - .../dtksh/ksh93/src/lib/libast/include/ast.h | 451 - .../ksh93/src/lib/libast/include/ast_dir.h | 71 - .../ksh93/src/lib/libast/include/ast_getopt.h | 42 - .../ksh93/src/lib/libast/include/ast_std.h | 384 - .../src/lib/libast/include/ast_windows.h | 39 - .../ksh93/src/lib/libast/include/ccode.h | 90 - .../dtksh/ksh93/src/lib/libast/include/cdt.h | 357 - .../ksh93/src/lib/libast/include/cmdarg.h | 92 - .../ksh93/src/lib/libast/include/debug.h | 109 - .../dtksh/ksh93/src/lib/libast/include/dt.h | 41 - .../ksh93/src/lib/libast/include/error.h | 226 - .../dtksh/ksh93/src/lib/libast/include/find.h | 86 - .../dtksh/ksh93/src/lib/libast/include/fnv.h | 72 - .../dtksh/ksh93/src/lib/libast/include/fts.h | 162 - .../ksh93/src/lib/libast/include/ftwalk.h | 124 - .../dtksh/ksh93/src/lib/libast/include/glob.h | 153 - .../dtksh/ksh93/src/lib/libast/include/hash.h | 202 - .../ksh93/src/lib/libast/include/hashkey.h | 62 - .../ksh93/src/lib/libast/include/hashpart.h | 51 - .../dtksh/ksh93/src/lib/libast/include/ip6.h | 40 - .../dtksh/ksh93/src/lib/libast/include/ls.h | 88 - .../ksh93/src/lib/libast/include/magic.h | 86 - .../ksh93/src/lib/libast/include/magicid.h | 46 - .../dtksh/ksh93/src/lib/libast/include/mc.h | 96 - .../dtksh/ksh93/src/lib/libast/include/mime.h | 91 - .../dtksh/ksh93/src/lib/libast/include/mnt.h | 58 - .../ksh93/src/lib/libast/include/modecanon.h | 65 - .../ksh93/src/lib/libast/include/modex.h | 51 - .../ksh93/src/lib/libast/include/namval.h | 42 - .../ksh93/src/lib/libast/include/option.h | 106 - .../dtksh/ksh93/src/lib/libast/include/proc.h | 108 - .../ksh93/src/lib/libast/include/recfmt.h | 83 - .../ksh93/src/lib/libast/include/regex.h | 254 - .../ksh93/src/lib/libast/include/sfdisc.h | 70 - .../dtksh/ksh93/src/lib/libast/include/sfio.h | 458 - .../ksh93/src/lib/libast/include/sfio_s.h | 52 - .../ksh93/src/lib/libast/include/sfio_t.h | 136 - .../ksh93/src/lib/libast/include/shcmd.h | 108 - .../ksh93/src/lib/libast/include/stack.h | 83 - .../dtksh/ksh93/src/lib/libast/include/stak.h | 55 - .../dtksh/ksh93/src/lib/libast/include/stk.h | 78 - .../dtksh/ksh93/src/lib/libast/include/swap.h | 53 - .../dtksh/ksh93/src/lib/libast/include/tar.h | 118 - .../ksh93/src/lib/libast/include/times.h | 54 - .../dtksh/ksh93/src/lib/libast/include/tm.h | 192 - .../dtksh/ksh93/src/lib/libast/include/tok.h | 47 - .../ksh93/src/lib/libast/include/usage.h | 34 - .../dtksh/ksh93/src/lib/libast/include/vdb.h | 46 - .../ksh93/src/lib/libast/include/vecargs.h | 45 - .../ksh93/src/lib/libast/include/vmalloc.h | 312 - .../dtksh/ksh93/src/lib/libast/include/wait.h | 98 - .../dtksh/ksh93/src/lib/libast/man/LIBAST.3 | 98 - .../dtksh/ksh93/src/lib/libast/man/aso.3 | 357 - .../dtksh/ksh93/src/lib/libast/man/ast.3 | 298 - .../dtksh/ksh93/src/lib/libast/man/astsa.3 | 161 - .../dtksh/ksh93/src/lib/libast/man/cdt.3 | 940 - .../dtksh/ksh93/src/lib/libast/man/chr.3 | 126 - .../dtksh/ksh93/src/lib/libast/man/compat.3 | 103 - .../dtksh/ksh93/src/lib/libast/man/error.3 | 283 - .../dtksh/ksh93/src/lib/libast/man/find.3 | 89 - .../dtksh/ksh93/src/lib/libast/man/fmt.3 | 213 - .../dtksh/ksh93/src/lib/libast/man/fmtls.3 | 143 - .../dtksh/ksh93/src/lib/libast/man/ftwalk.3 | 235 - .../dtksh/ksh93/src/lib/libast/man/getcwd.3 | 67 - .../dtksh/ksh93/src/lib/libast/man/hash.3 | 644 - .../dtksh/ksh93/src/lib/libast/man/iblocks.3 | 62 - .../dtksh/ksh93/src/lib/libast/man/int.3 | 68 - .../dtksh/ksh93/src/lib/libast/man/ip6.3 | 85 - .../dtksh/ksh93/src/lib/libast/man/magic.3 | 493 - .../dtksh/ksh93/src/lib/libast/man/mem.3 | 98 - .../dtksh/ksh93/src/lib/libast/man/mime.3 | 117 - .../ksh93/src/lib/libast/man/modecanon.3 | 105 - .../dtksh/ksh93/src/lib/libast/man/optget.3 | 68 - .../dtksh/ksh93/src/lib/libast/man/path.3 | 414 - .../dtksh/ksh93/src/lib/libast/man/preroot.3 | 147 - .../dtksh/ksh93/src/lib/libast/man/proc.3 | 319 - .../dtksh/ksh93/src/lib/libast/man/re.3 | 214 - .../dtksh/ksh93/src/lib/libast/man/regex.3 | 163 - .../ksh93/src/lib/libast/man/setenviron.3 | 79 - .../dtksh/ksh93/src/lib/libast/man/sfdisc.3 | 118 - .../dtksh/ksh93/src/lib/libast/man/sfio.3 | 2373 -- .../dtksh/ksh93/src/lib/libast/man/sig.3 | 76 - .../dtksh/ksh93/src/lib/libast/man/spawnveg.3 | 90 - .../dtksh/ksh93/src/lib/libast/man/stak.3 | 170 - .../dtksh/ksh93/src/lib/libast/man/stk.3 | 166 - .../dtksh/ksh93/src/lib/libast/man/strcopy.3 | 54 - .../dtksh/ksh93/src/lib/libast/man/strdup.3 | 55 - .../ksh93/src/lib/libast/man/strelapsed.3 | 77 - .../dtksh/ksh93/src/lib/libast/man/strerror.3 | 53 - .../dtksh/ksh93/src/lib/libast/man/stresc.3 | 53 - .../dtksh/ksh93/src/lib/libast/man/streval.3 | 83 - .../dtksh/ksh93/src/lib/libast/man/strgid.3 | 58 - .../dtksh/ksh93/src/lib/libast/man/strmatch.3 | 101 - .../dtksh/ksh93/src/lib/libast/man/stropt.3 | 130 - .../dtksh/ksh93/src/lib/libast/man/strperm.3 | 109 - .../ksh93/src/lib/libast/man/strsignal.3 | 53 - .../dtksh/ksh93/src/lib/libast/man/strsort.3 | 73 - .../dtksh/ksh93/src/lib/libast/man/strtape.3 | 86 - .../dtksh/ksh93/src/lib/libast/man/strton.3 | 97 - .../dtksh/ksh93/src/lib/libast/man/struid.3 | 58 - .../dtksh/ksh93/src/lib/libast/man/swap.3 | 138 - .../dtksh/ksh93/src/lib/libast/man/tab.3 | 74 - .../dtksh/ksh93/src/lib/libast/man/tm.3 | 778 - .../dtksh/ksh93/src/lib/libast/man/tmx.3 | 670 - .../dtksh/ksh93/src/lib/libast/man/tok.3 | 217 - .../dtksh/ksh93/src/lib/libast/man/touch.3 | 68 - .../dtksh/ksh93/src/lib/libast/man/tv.3 | 173 - .../dtksh/ksh93/src/lib/libast/man/vecargs.3 | 126 - .../dtksh/ksh93/src/lib/libast/man/vmalloc.3 | 665 - .../ksh93/src/lib/libast/misc/astintercept.c | 53 - .../dtksh/ksh93/src/lib/libast/misc/cmdarg.c | 412 - .../dtksh/ksh93/src/lib/libast/misc/cmdlib.h | 57 - .../ksh93/src/lib/libast/misc/conformance.c | 151 - .../dtksh/ksh93/src/lib/libast/misc/debug.c | 68 - .../dtksh/ksh93/src/lib/libast/misc/error.c | 659 - .../dtksh/ksh93/src/lib/libast/misc/errorf.c | 41 - .../ksh93/src/lib/libast/misc/errormsg.c | 41 - .../dtksh/ksh93/src/lib/libast/misc/errorx.c | 50 - .../ksh93/src/lib/libast/misc/fastfind.c | 1281 - .../dtksh/ksh93/src/lib/libast/misc/findlib.h | 123 - .../dtksh/ksh93/src/lib/libast/misc/fmtrec.c | 102 - .../dtksh/ksh93/src/lib/libast/misc/fts.c | 1598 -- .../dtksh/ksh93/src/lib/libast/misc/ftwalk.c | 156 - .../ksh93/src/lib/libast/misc/ftwflags.c | 35 - .../dtksh/ksh93/src/lib/libast/misc/getcwd.c | 323 - .../dtksh/ksh93/src/lib/libast/misc/getenv.c | 109 - .../dtksh/ksh93/src/lib/libast/misc/glob.c | 855 - .../ksh93/src/lib/libast/misc/intercepts.h | 40 - .../dtksh/ksh93/src/lib/libast/misc/magic.c | 2500 -- .../dtksh/ksh93/src/lib/libast/misc/magic.tab | 1723 -- .../dtksh/ksh93/src/lib/libast/misc/mime.c | 839 - .../dtksh/ksh93/src/lib/libast/misc/mimelib.h | 52 - .../ksh93/src/lib/libast/misc/mimetype.c | 69 - .../dtksh/ksh93/src/lib/libast/misc/optctx.c | 70 - .../dtksh/ksh93/src/lib/libast/misc/optesc.c | 93 - .../dtksh/ksh93/src/lib/libast/misc/optget.c | 5760 ---- .../dtksh/ksh93/src/lib/libast/misc/optjoin.c | 129 - .../dtksh/ksh93/src/lib/libast/misc/optlib.h | 115 - .../ksh93/src/lib/libast/misc/procclose.c | 98 - .../ksh93/src/lib/libast/misc/procfree.c | 43 - .../dtksh/ksh93/src/lib/libast/misc/proclib.h | 65 - .../ksh93/src/lib/libast/misc/procopen.c | 942 - .../dtksh/ksh93/src/lib/libast/misc/procrun.c | 49 - .../dtksh/ksh93/src/lib/libast/misc/recfmt.c | 165 - .../dtksh/ksh93/src/lib/libast/misc/reclen.c | 71 - .../dtksh/ksh93/src/lib/libast/misc/recstr.c | 206 - .../ksh93/src/lib/libast/misc/setenviron.c | 136 - .../dtksh/ksh93/src/lib/libast/misc/sigcrit.c | 199 - .../dtksh/ksh93/src/lib/libast/misc/sigdata.c | 41 - .../dtksh/ksh93/src/lib/libast/misc/signal.c | 136 - .../dtksh/ksh93/src/lib/libast/misc/stack.c | 172 - .../dtksh/ksh93/src/lib/libast/misc/state.c | 42 - .../dtksh/ksh93/src/lib/libast/misc/stk.c | 563 - .../ksh93/src/lib/libast/misc/systrace.c | 68 - .../ksh93/src/lib/libast/misc/translate.c | 434 - .../ksh93/src/lib/libast/misc/univdata.c | 58 - .../dtksh/ksh93/src/lib/libast/misc/univlib.h | 93 - .../ksh93/src/lib/libast/path/pathaccess.c | 69 - .../dtksh/ksh93/src/lib/libast/path/pathbin.c | 46 - .../ksh93/src/lib/libast/path/pathcanon.c | 189 - .../dtksh/ksh93/src/lib/libast/path/pathcat.c | 85 - .../dtksh/ksh93/src/lib/libast/path/pathcd.c | 142 - .../ksh93/src/lib/libast/path/pathcheck.c | 91 - .../ksh93/src/lib/libast/path/pathexists.c | 134 - .../ksh93/src/lib/libast/path/pathfind.c | 168 - .../ksh93/src/lib/libast/path/pathgetlink.c | 102 - .../ksh93/src/lib/libast/path/pathicase.c | 80 - .../dtksh/ksh93/src/lib/libast/path/pathkey.c | 312 - .../ksh93/src/lib/libast/path/pathnative.c | 126 - .../ksh93/src/lib/libast/path/pathpath.c | 126 - .../ksh93/src/lib/libast/path/pathposix.c | 128 - .../ksh93/src/lib/libast/path/pathprobe.c | 326 - .../ksh93/src/lib/libast/path/pathprog.c | 128 - .../ksh93/src/lib/libast/path/pathrepl.c | 93 - .../ksh93/src/lib/libast/path/pathsetlink.c | 72 - .../ksh93/src/lib/libast/path/pathshell.c | 118 - .../ksh93/src/lib/libast/path/pathstat.c | 45 - .../ksh93/src/lib/libast/path/pathtemp.c | 371 - .../dtksh/ksh93/src/lib/libast/path/pathtmp.c | 41 - .../dtksh/ksh93/src/lib/libast/port/astconf.c | 1722 -- .../dtksh/ksh93/src/lib/libast/port/astcopy.c | 90 - .../ksh93/src/lib/libast/port/astdynamic.c | 132 - .../dtksh/ksh93/src/lib/libast/port/astmath.c | 73 - .../ksh93/src/lib/libast/port/astquery.c | 114 - .../ksh93/src/lib/libast/port/aststatic.c | 44 - .../ksh93/src/lib/libast/port/astwinsize.c | 143 - .../dtksh/ksh93/src/lib/libast/port/atmain.C | 38 - .../dtksh/ksh93/src/lib/libast/port/iblocks.c | 95 - .../dtksh/ksh93/src/lib/libast/port/lc.c | 883 - .../dtksh/ksh93/src/lib/libast/port/lc.tab | 275 - .../dtksh/ksh93/src/lib/libast/port/lcgen.c | 758 - .../dtksh/ksh93/src/lib/libast/port/lclang.h | 121 - .../dtksh/ksh93/src/lib/libast/port/lclib.h | 71 - .../dtksh/ksh93/src/lib/libast/port/mc.c | 675 - .../dtksh/ksh93/src/lib/libast/port/mnt.c | 811 - .../dtksh/ksh93/src/lib/libast/port/touch.c | 74 - .../ksh93/src/lib/libast/preroot/getpreroot.c | 161 - .../ksh93/src/lib/libast/preroot/ispreroot.c | 71 - .../ksh93/src/lib/libast/preroot/realopen.c | 47 - .../ksh93/src/lib/libast/preroot/setpreroot.c | 75 - .../ksh93/src/lib/libast/regex/regalloc.c | 36 - .../ksh93/src/lib/libast/regex/regcache.c | 198 - .../ksh93/src/lib/libast/regex/regclass.c | 298 - .../ksh93/src/lib/libast/regex/regcoll.c | 121 - .../ksh93/src/lib/libast/regex/regcomp.c | 3575 --- .../ksh93/src/lib/libast/regex/regdecomp.c | 450 - .../ksh93/src/lib/libast/regex/regerror.c | 95 - .../ksh93/src/lib/libast/regex/regexec.c | 90 - .../ksh93/src/lib/libast/regex/regfatal.c | 49 - .../ksh93/src/lib/libast/regex/reginit.c | 412 - .../dtksh/ksh93/src/lib/libast/regex/reglib.h | 589 - .../ksh93/src/lib/libast/regex/regnexec.c | 2095 -- .../ksh93/src/lib/libast/regex/regrecord.c | 34 - .../ksh93/src/lib/libast/regex/regrexec.c | 182 - .../ksh93/src/lib/libast/regex/regstat.c | 53 - .../dtksh/ksh93/src/lib/libast/regex/regsub.c | 269 - .../ksh93/src/lib/libast/regex/regsubcomp.c | 377 - .../ksh93/src/lib/libast/regex/regsubexec.c | 237 - .../ksh93/src/lib/libast/sfio/_sfclrerr.c | 30 - .../dtksh/ksh93/src/lib/libast/sfio/_sfdlen.c | 30 - .../dtksh/ksh93/src/lib/libast/sfio/_sfeof.c | 30 - .../ksh93/src/lib/libast/sfio/_sferror.c | 30 - .../ksh93/src/lib/libast/sfio/_sffileno.c | 30 - .../dtksh/ksh93/src/lib/libast/sfio/_sfgetc.c | 30 - .../dtksh/ksh93/src/lib/libast/sfio/_sfgetl.c | 38 - .../ksh93/src/lib/libast/sfio/_sfgetl2.c | 43 - .../dtksh/ksh93/src/lib/libast/sfio/_sfgetu.c | 38 - .../ksh93/src/lib/libast/sfio/_sfgetu2.c | 43 - .../dtksh/ksh93/src/lib/libast/sfio/_sfllen.c | 30 - .../dtksh/ksh93/src/lib/libast/sfio/_sfopen.c | 220 - .../dtksh/ksh93/src/lib/libast/sfio/_sfputc.c | 30 - .../dtksh/ksh93/src/lib/libast/sfio/_sfputd.c | 91 - .../dtksh/ksh93/src/lib/libast/sfio/_sfputl.c | 85 - .../dtksh/ksh93/src/lib/libast/sfio/_sfputm.c | 81 - .../dtksh/ksh93/src/lib/libast/sfio/_sfputu.c | 78 - .../dtksh/ksh93/src/lib/libast/sfio/_sfslen.c | 30 - .../ksh93/src/lib/libast/sfio/_sfstacked.c | 30 - .../dtksh/ksh93/src/lib/libast/sfio/_sfulen.c | 30 - .../ksh93/src/lib/libast/sfio/_sfvalue.c | 30 - .../dtksh/ksh93/src/lib/libast/sfio/sfclose.c | 174 - .../ksh93/src/lib/libast/sfio/sfclrlock.c | 59 - .../dtksh/ksh93/src/lib/libast/sfio/sfcvt.c | 493 - .../dtksh/ksh93/src/lib/libast/sfio/sfdisc.c | 250 - .../dtksh/ksh93/src/lib/libast/sfio/sfdlen.c | 54 - .../dtksh/ksh93/src/lib/libast/sfio/sfecvt.c | 34 - .../ksh93/src/lib/libast/sfio/sfexcept.c | 129 - .../ksh93/src/lib/libast/sfio/sfextern.c | 100 - .../dtksh/ksh93/src/lib/libast/sfio/sffcvt.c | 34 - .../ksh93/src/lib/libast/sfio/sffilbuf.c | 112 - .../ksh93/src/lib/libast/sfio/sfflsbuf.c | 122 - .../dtksh/ksh93/src/lib/libast/sfio/sfgetd.c | 75 - .../dtksh/ksh93/src/lib/libast/sfio/sfgetl.c | 66 - .../dtksh/ksh93/src/lib/libast/sfio/sfgetm.c | 63 - .../dtksh/ksh93/src/lib/libast/sfio/sfgetr.c | 165 - .../dtksh/ksh93/src/lib/libast/sfio/sfgetu.c | 63 - .../dtksh/ksh93/src/lib/libast/sfio/sfhdr.h | 1268 - .../dtksh/ksh93/src/lib/libast/sfio/sfllen.c | 35 - .../dtksh/ksh93/src/lib/libast/sfio/sfmode.c | 561 - .../dtksh/ksh93/src/lib/libast/sfio/sfmove.c | 242 - .../dtksh/ksh93/src/lib/libast/sfio/sfmutex.c | 64 - .../dtksh/ksh93/src/lib/libast/sfio/sfnew.c | 125 - .../ksh93/src/lib/libast/sfio/sfnotify.c | 34 - .../dtksh/ksh93/src/lib/libast/sfio/sfnputc.c | 77 - .../dtksh/ksh93/src/lib/libast/sfio/sfopen.c | 36 - .../dtksh/ksh93/src/lib/libast/sfio/sfpeek.c | 85 - .../dtksh/ksh93/src/lib/libast/sfio/sfpkrd.c | 224 - .../dtksh/ksh93/src/lib/libast/sfio/sfpoll.c | 247 - .../dtksh/ksh93/src/lib/libast/sfio/sfpool.c | 339 - .../dtksh/ksh93/src/lib/libast/sfio/sfpopen.c | 284 - .../ksh93/src/lib/libast/sfio/sfprintf.c | 79 - .../ksh93/src/lib/libast/sfio/sfprints.c | 89 - .../dtksh/ksh93/src/lib/libast/sfio/sfpurge.c | 94 - .../dtksh/ksh93/src/lib/libast/sfio/sfputd.c | 30 - .../dtksh/ksh93/src/lib/libast/sfio/sfputl.c | 30 - .../dtksh/ksh93/src/lib/libast/sfio/sfputm.c | 30 - .../dtksh/ksh93/src/lib/libast/sfio/sfputr.c | 131 - .../dtksh/ksh93/src/lib/libast/sfio/sfputu.c | 30 - .../dtksh/ksh93/src/lib/libast/sfio/sfraise.c | 103 - .../dtksh/ksh93/src/lib/libast/sfio/sfrd.c | 306 - .../dtksh/ksh93/src/lib/libast/sfio/sfread.c | 136 - .../ksh93/src/lib/libast/sfio/sfreserve.c | 206 - .../ksh93/src/lib/libast/sfio/sfresize.c | 78 - .../dtksh/ksh93/src/lib/libast/sfio/sfscanf.c | 67 - .../dtksh/ksh93/src/lib/libast/sfio/sfseek.c | 271 - .../dtksh/ksh93/src/lib/libast/sfio/sfset.c | 93 - .../ksh93/src/lib/libast/sfio/sfsetbuf.c | 420 - .../dtksh/ksh93/src/lib/libast/sfio/sfsetfd.c | 125 - .../dtksh/ksh93/src/lib/libast/sfio/sfsize.c | 105 - .../dtksh/ksh93/src/lib/libast/sfio/sfsk.c | 99 - .../dtksh/ksh93/src/lib/libast/sfio/sfstack.c | 111 - .../ksh93/src/lib/libast/sfio/sfstrtod.c | 148 - .../ksh93/src/lib/libast/sfio/sfstrtof.h | 557 - .../dtksh/ksh93/src/lib/libast/sfio/sfswap.c | 114 - .../dtksh/ksh93/src/lib/libast/sfio/sfsync.c | 164 - .../dtksh/ksh93/src/lib/libast/sfio/sftable.c | 529 - .../dtksh/ksh93/src/lib/libast/sfio/sftell.c | 55 - .../dtksh/ksh93/src/lib/libast/sfio/sftmp.c | 401 - .../ksh93/src/lib/libast/sfio/sfungetc.c | 96 - .../ksh93/src/lib/libast/sfio/sfvprintf.c | 1440 - .../ksh93/src/lib/libast/sfio/sfvscanf.c | 1065 - .../dtksh/ksh93/src/lib/libast/sfio/sfwalk.c | 63 - .../dtksh/ksh93/src/lib/libast/sfio/sfwr.c | 238 - .../dtksh/ksh93/src/lib/libast/sfio/sfwrite.c | 167 - .../dtksh/ksh93/src/lib/libast/sfio/vthread.h | 203 - .../dtksh/ksh93/src/lib/libast/std/bytesex.h | 44 - .../dtksh/ksh93/src/lib/libast/std/dirent.h | 23 - .../dtksh/ksh93/src/lib/libast/std/endian.h | 55 - .../dtksh/ksh93/src/lib/libast/std/iconv.h | 23 - .../dtksh/ksh93/src/lib/libast/std/nl_types.h | 23 - .../dtksh/ksh93/src/lib/libast/std/stdio.h | 23 - .../dtksh/ksh93/src/lib/libast/std/wchar.h | 23 - .../dtksh/ksh93/src/lib/libast/std/wctype.h | 23 - .../ksh93/src/lib/libast/stdio/_doprnt.c | 32 - .../ksh93/src/lib/libast/stdio/_doscan.c | 32 - .../ksh93/src/lib/libast/stdio/_filbuf.c | 36 - .../ksh93/src/lib/libast/stdio/_flsbuf.c | 44 - .../ksh93/src/lib/libast/stdio/_stdfun.c | 80 - .../ksh93/src/lib/libast/stdio/_stdopen.c | 32 - .../ksh93/src/lib/libast/stdio/_stdprintf.c | 38 - .../ksh93/src/lib/libast/stdio/_stdscanf.c | 38 - .../ksh93/src/lib/libast/stdio/_stdsprnt.c | 38 - .../ksh93/src/lib/libast/stdio/_stdvbuf.c | 32 - .../ksh93/src/lib/libast/stdio/_stdvsnprnt.c | 32 - .../ksh93/src/lib/libast/stdio/_stdvsprnt.c | 32 - .../ksh93/src/lib/libast/stdio/_stdvsscn.c | 32 - .../ksh93/src/lib/libast/stdio/asprintf.c | 36 - .../ksh93/src/lib/libast/stdio/clearerr.c | 33 - .../dtksh/ksh93/src/lib/libast/stdio/fclose.c | 32 - .../ksh93/src/lib/libast/stdio/fcloseall.c | 57 - .../dtksh/ksh93/src/lib/libast/stdio/fdopen.c | 34 - .../dtksh/ksh93/src/lib/libast/stdio/feof.c | 42 - .../dtksh/ksh93/src/lib/libast/stdio/ferror.c | 42 - .../dtksh/ksh93/src/lib/libast/stdio/fflush.c | 41 - .../dtksh/ksh93/src/lib/libast/stdio/fgetc.c | 32 - .../ksh93/src/lib/libast/stdio/fgetpos.c | 48 - .../dtksh/ksh93/src/lib/libast/stdio/fgets.c | 110 - .../dtksh/ksh93/src/lib/libast/stdio/fgetwc.c | 35 - .../dtksh/ksh93/src/lib/libast/stdio/fgetws.c | 52 - .../dtksh/ksh93/src/lib/libast/stdio/fileno.c | 42 - .../ksh93/src/lib/libast/stdio/flockfile.c | 32 - .../ksh93/src/lib/libast/stdio/fmemopen.c | 32 - .../dtksh/ksh93/src/lib/libast/stdio/fopen.c | 30 - .../ksh93/src/lib/libast/stdio/fprintf.c | 39 - .../dtksh/ksh93/src/lib/libast/stdio/fpurge.c | 32 - .../dtksh/ksh93/src/lib/libast/stdio/fputc.c | 42 - .../dtksh/ksh93/src/lib/libast/stdio/fputs.c | 32 - .../dtksh/ksh93/src/lib/libast/stdio/fputwc.c | 33 - .../dtksh/ksh93/src/lib/libast/stdio/fputws.c | 36 - .../dtksh/ksh93/src/lib/libast/stdio/fread.c | 34 - .../ksh93/src/lib/libast/stdio/freopen.c | 32 - .../dtksh/ksh93/src/lib/libast/stdio/fscanf.c | 39 - .../dtksh/ksh93/src/lib/libast/stdio/fseek.c | 48 - .../dtksh/ksh93/src/lib/libast/stdio/fseeko.c | 48 - .../ksh93/src/lib/libast/stdio/fsetpos.c | 48 - .../dtksh/ksh93/src/lib/libast/stdio/ftell.c | 48 - .../dtksh/ksh93/src/lib/libast/stdio/ftello.c | 48 - .../ksh93/src/lib/libast/stdio/ftrylockfile.c | 32 - .../ksh93/src/lib/libast/stdio/funlockfile.c | 32 - .../dtksh/ksh93/src/lib/libast/stdio/fwide.c | 51 - .../ksh93/src/lib/libast/stdio/fwprintf.c | 36 - .../dtksh/ksh93/src/lib/libast/stdio/fwrite.c | 34 - .../ksh93/src/lib/libast/stdio/fwscanf.c | 39 - .../dtksh/ksh93/src/lib/libast/stdio/getc.c | 42 - .../ksh93/src/lib/libast/stdio/getchar.c | 40 - .../ksh93/src/lib/libast/stdio/getdelim.c | 96 - .../ksh93/src/lib/libast/stdio/getline.c | 36 - .../dtksh/ksh93/src/lib/libast/stdio/getw.c | 34 - .../dtksh/ksh93/src/lib/libast/stdio/getwc.c | 31 - .../ksh93/src/lib/libast/stdio/getwchar.c | 31 - .../dtksh/ksh93/src/lib/libast/stdio/pclose.c | 32 - .../dtksh/ksh93/src/lib/libast/stdio/popen.c | 30 - .../dtksh/ksh93/src/lib/libast/stdio/printf.c | 36 - .../dtksh/ksh93/src/lib/libast/stdio/putc.c | 42 - .../ksh93/src/lib/libast/stdio/putchar.c | 40 - .../dtksh/ksh93/src/lib/libast/stdio/puts.c | 30 - .../dtksh/ksh93/src/lib/libast/stdio/putw.c | 32 - .../dtksh/ksh93/src/lib/libast/stdio/putwc.c | 31 - .../ksh93/src/lib/libast/stdio/putwchar.c | 31 - .../dtksh/ksh93/src/lib/libast/stdio/rewind.c | 33 - .../dtksh/ksh93/src/lib/libast/stdio/scanf.c | 36 - .../dtksh/ksh93/src/lib/libast/stdio/setbuf.c | 32 - .../ksh93/src/lib/libast/stdio/setbuffer.c | 32 - .../ksh93/src/lib/libast/stdio/setlinebuf.c | 33 - .../ksh93/src/lib/libast/stdio/setvbuf.c | 48 - .../ksh93/src/lib/libast/stdio/snprintf.c | 36 - .../ksh93/src/lib/libast/stdio/sprintf.c | 36 - .../dtksh/ksh93/src/lib/libast/stdio/sscanf.c | 36 - .../dtksh/ksh93/src/lib/libast/stdio/stdhdr.h | 115 - .../ksh93/src/lib/libast/stdio/stdio_c99.c | 118 - .../ksh93/src/lib/libast/stdio/swprintf.c | 36 - .../ksh93/src/lib/libast/stdio/swscanf.c | 36 - .../ksh93/src/lib/libast/stdio/tmpfile.c | 30 - .../dtksh/ksh93/src/lib/libast/stdio/ungetc.c | 32 - .../ksh93/src/lib/libast/stdio/ungetwc.c | 39 - .../ksh93/src/lib/libast/stdio/vasprintf.c | 45 - .../ksh93/src/lib/libast/stdio/vfprintf.c | 32 - .../ksh93/src/lib/libast/stdio/vfscanf.c | 32 - .../ksh93/src/lib/libast/stdio/vfwprintf.c | 68 - .../ksh93/src/lib/libast/stdio/vfwscanf.c | 121 - .../ksh93/src/lib/libast/stdio/vprintf.c | 30 - .../dtksh/ksh93/src/lib/libast/stdio/vscanf.c | 30 - .../ksh93/src/lib/libast/stdio/vsnprintf.c | 52 - .../ksh93/src/lib/libast/stdio/vsprintf.c | 30 - .../ksh93/src/lib/libast/stdio/vsscanf.c | 30 - .../ksh93/src/lib/libast/stdio/vswprintf.c | 55 - .../ksh93/src/lib/libast/stdio/vswscanf.c | 51 - .../ksh93/src/lib/libast/stdio/vwprintf.c | 30 - .../ksh93/src/lib/libast/stdio/vwscanf.c | 30 - .../ksh93/src/lib/libast/stdio/wprintf.c | 36 - .../dtksh/ksh93/src/lib/libast/stdio/wscanf.c | 36 - .../ksh93/src/lib/libast/string/base64.c | 312 - .../dtksh/ksh93/src/lib/libast/string/ccmap.c | 746 - .../ksh93/src/lib/libast/string/ccmapid.c | 173 - .../ksh93/src/lib/libast/string/ccnative.c | 56 - .../ksh93/src/lib/libast/string/chresc.c | 237 - .../ksh93/src/lib/libast/string/chrtoi.c | 55 - .../ksh93/src/lib/libast/string/fmtbase.c | 70 - .../ksh93/src/lib/libast/string/fmtbuf.c | 69 - .../ksh93/src/lib/libast/string/fmtclock.c | 63 - .../ksh93/src/lib/libast/string/fmtdev.c | 63 - .../ksh93/src/lib/libast/string/fmtelapsed.c | 61 - .../ksh93/src/lib/libast/string/fmterror.c | 37 - .../ksh93/src/lib/libast/string/fmtesc.c | 248 - .../ksh93/src/lib/libast/string/fmtfmt.c | 205 - .../dtksh/ksh93/src/lib/libast/string/fmtfs.c | 100 - .../ksh93/src/lib/libast/string/fmtgid.c | 101 - .../ksh93/src/lib/libast/string/fmtident.c | 77 - .../ksh93/src/lib/libast/string/fmtint.c | 122 - .../ksh93/src/lib/libast/string/fmtip4.c | 43 - .../ksh93/src/lib/libast/string/fmtip6.c | 175 - .../dtksh/ksh93/src/lib/libast/string/fmtls.c | 120 - .../ksh93/src/lib/libast/string/fmtmatch.c | 286 - .../ksh93/src/lib/libast/string/fmtmode.c | 47 - .../ksh93/src/lib/libast/string/fmtnum.c | 92 - .../ksh93/src/lib/libast/string/fmtperm.c | 91 - .../dtksh/ksh93/src/lib/libast/string/fmtre.c | 226 - .../ksh93/src/lib/libast/string/fmtscale.c | 94 - .../ksh93/src/lib/libast/string/fmtsignal.c | 62 - .../ksh93/src/lib/libast/string/fmttime.c | 41 - .../ksh93/src/lib/libast/string/fmttmx.c | 45 - .../dtksh/ksh93/src/lib/libast/string/fmttv.c | 44 - .../ksh93/src/lib/libast/string/fmtuid.c | 101 - .../ksh93/src/lib/libast/string/fmtversion.c | 53 - .../ksh93/src/lib/libast/string/memdup.c | 44 - .../ksh93/src/lib/libast/string/modedata.c | 69 - .../dtksh/ksh93/src/lib/libast/string/modei.c | 55 - .../ksh93/src/lib/libast/string/modelib.h | 55 - .../dtksh/ksh93/src/lib/libast/string/modex.c | 75 - .../ksh93/src/lib/libast/string/stracmp.c | 62 - .../ksh93/src/lib/libast/string/strcopy.c | 36 - .../ksh93/src/lib/libast/string/strdup.c | 65 - .../ksh93/src/lib/libast/string/strelapsed.c | 154 - .../ksh93/src/lib/libast/string/strerror.c | 148 - .../ksh93/src/lib/libast/string/stresc.c | 67 - .../ksh93/src/lib/libast/string/streval.c | 50 - .../ksh93/src/lib/libast/string/strexpr.c | 294 - .../ksh93/src/lib/libast/string/strgid.c | 121 - .../ksh93/src/lib/libast/string/strlcat.c | 83 - .../ksh93/src/lib/libast/string/strlcpy.c | 71 - .../ksh93/src/lib/libast/string/strlook.c | 50 - .../ksh93/src/lib/libast/string/strmatch.c | 207 - .../ksh93/src/lib/libast/string/strmode.c | 51 - .../ksh93/src/lib/libast/string/strnacmp.c | 66 - .../ksh93/src/lib/libast/string/strncopy.c | 46 - .../ksh93/src/lib/libast/string/strnpcmp.c | 51 - .../ksh93/src/lib/libast/string/strntod.c | 33 - .../ksh93/src/lib/libast/string/strntol.c | 32 - .../ksh93/src/lib/libast/string/strntold.c | 33 - .../ksh93/src/lib/libast/string/strntoll.c | 32 - .../ksh93/src/lib/libast/string/strnton.c | 33 - .../ksh93/src/lib/libast/string/strntonll.c | 33 - .../ksh93/src/lib/libast/string/strntoul.c | 33 - .../ksh93/src/lib/libast/string/strntoull.c | 33 - .../ksh93/src/lib/libast/string/strnvcmp.c | 86 - .../ksh93/src/lib/libast/string/stropt.c | 188 - .../ksh93/src/lib/libast/string/strpcmp.c | 44 - .../ksh93/src/lib/libast/string/strperm.c | 267 - .../ksh93/src/lib/libast/string/strpsearch.c | 125 - .../ksh93/src/lib/libast/string/strsearch.c | 57 - .../ksh93/src/lib/libast/string/strsort.c | 57 - .../ksh93/src/lib/libast/string/strtape.c | 148 - .../ksh93/src/lib/libast/string/strtoi.h | 618 - .../ksh93/src/lib/libast/string/strtoip4.c | 150 - .../ksh93/src/lib/libast/string/strtoip6.c | 204 - .../ksh93/src/lib/libast/string/strton.c | 32 - .../ksh93/src/lib/libast/string/strtonll.c | 32 - .../ksh93/src/lib/libast/string/struid.c | 109 - .../ksh93/src/lib/libast/string/struniq.c | 51 - .../ksh93/src/lib/libast/string/strvcmp.c | 74 - .../ksh93/src/lib/libast/string/swapget.c | 57 - .../ksh93/src/lib/libast/string/swapmem.c | 109 - .../ksh93/src/lib/libast/string/swapop.c | 59 - .../ksh93/src/lib/libast/string/swapput.c | 50 - .../dtksh/ksh93/src/lib/libast/string/tok.c | 190 - .../ksh93/src/lib/libast/string/tokline.c | 193 - .../ksh93/src/lib/libast/string/tokscan.c | 373 - .../ksh93/src/lib/libast/string/wc2utf8.c | 78 - .../dtksh/ksh93/src/lib/libast/tm/tmdata.c | 291 - .../dtksh/ksh93/src/lib/libast/tm/tmdate.c | 41 - .../dtksh/ksh93/src/lib/libast/tm/tmequiv.c | 57 - .../dtksh/ksh93/src/lib/libast/tm/tmfix.c | 173 - .../dtksh/ksh93/src/lib/libast/tm/tmfmt.c | 41 - .../dtksh/ksh93/src/lib/libast/tm/tmform.c | 44 - .../dtksh/ksh93/src/lib/libast/tm/tmgoff.c | 77 - .../dtksh/ksh93/src/lib/libast/tm/tminit.c | 471 - .../dtksh/ksh93/src/lib/libast/tm/tmleap.c | 41 - .../dtksh/ksh93/src/lib/libast/tm/tmlex.c | 67 - .../dtksh/ksh93/src/lib/libast/tm/tmlocale.c | 650 - .../dtksh/ksh93/src/lib/libast/tm/tmmake.c | 41 - .../dtksh/ksh93/src/lib/libast/tm/tmpoff.c | 62 - .../dtksh/ksh93/src/lib/libast/tm/tmscan.c | 41 - .../dtksh/ksh93/src/lib/libast/tm/tmsleep.c | 42 - .../dtksh/ksh93/src/lib/libast/tm/tmtime.c | 41 - .../dtksh/ksh93/src/lib/libast/tm/tmtype.c | 57 - .../dtksh/ksh93/src/lib/libast/tm/tmweek.c | 87 - .../dtksh/ksh93/src/lib/libast/tm/tmword.c | 89 - .../dtksh/ksh93/src/lib/libast/tm/tmxdate.c | 1758 -- .../ksh93/src/lib/libast/tm/tmxduration.c | 80 - .../dtksh/ksh93/src/lib/libast/tm/tmxfmt.c | 716 - .../ksh93/src/lib/libast/tm/tmxgettime.c | 44 - .../dtksh/ksh93/src/lib/libast/tm/tmxleap.c | 51 - .../dtksh/ksh93/src/lib/libast/tm/tmxmake.c | 140 - .../dtksh/ksh93/src/lib/libast/tm/tmxscan.c | 538 - .../ksh93/src/lib/libast/tm/tmxsettime.c | 45 - .../dtksh/ksh93/src/lib/libast/tm/tmxsleep.c | 41 - .../dtksh/ksh93/src/lib/libast/tm/tmxtime.c | 137 - .../dtksh/ksh93/src/lib/libast/tm/tmxtouch.c | 81 - .../dtksh/ksh93/src/lib/libast/tm/tmzone.c | 143 - .../dtksh/ksh93/src/lib/libast/tm/tvcmp.c | 46 - .../dtksh/ksh93/src/lib/libast/tm/tvgettime.c | 70 - .../dtksh/ksh93/src/lib/libast/tm/tvsettime.c | 72 - .../dtksh/ksh93/src/lib/libast/tm/tvsleep.c | 259 - .../dtksh/ksh93/src/lib/libast/tm/tvtouch.c | 297 - .../dtksh/ksh93/src/lib/libast/uwin/a64l.c | 77 - .../dtksh/ksh93/src/lib/libast/uwin/acosh.c | 108 - .../dtksh/ksh93/src/lib/libast/uwin/asinh.c | 107 - .../dtksh/ksh93/src/lib/libast/uwin/atanh.c | 89 - .../dtksh/ksh93/src/lib/libast/uwin/cbrt.c | 39 - .../dtksh/ksh93/src/lib/libast/uwin/crypt.c | 956 - .../dtksh/ksh93/src/lib/libast/uwin/erf.c | 403 - .../dtksh/ksh93/src/lib/libast/uwin/err.c | 124 - .../dtksh/ksh93/src/lib/libast/uwin/exp.c | 213 - .../dtksh/ksh93/src/lib/libast/uwin/exp__E.c | 142 - .../dtksh/ksh93/src/lib/libast/uwin/expm1.c | 173 - .../dtksh/ksh93/src/lib/libast/uwin/gamma.c | 343 - .../dtksh/ksh93/src/lib/libast/uwin/getpass.c | 78 - .../dtksh/ksh93/src/lib/libast/uwin/lgamma.c | 316 - .../dtksh/ksh93/src/lib/libast/uwin/log.c | 496 - .../dtksh/ksh93/src/lib/libast/uwin/log1p.c | 176 - .../dtksh/ksh93/src/lib/libast/uwin/log__L.c | 116 - .../ksh93/src/lib/libast/uwin/mathimpl.h | 103 - .../dtksh/ksh93/src/lib/libast/uwin/mini.sym | 84 - .../dtksh/ksh93/src/lib/libast/uwin/rand48.c | 178 - .../dtksh/ksh93/src/lib/libast/uwin/random.c | 381 - .../dtksh/ksh93/src/lib/libast/uwin/rcmd.c | 571 - .../dtksh/ksh93/src/lib/libast/uwin/rint.c | 42 - .../dtksh/ksh93/src/lib/libast/uwin/rlib.h | 81 - .../dtksh/ksh93/src/lib/libast/uwin/support.c | 605 - .../dtksh/ksh93/src/lib/libast/vec/vecargs.c | 76 - .../dtksh/ksh93/src/lib/libast/vec/vecfile.c | 62 - .../dtksh/ksh93/src/lib/libast/vec/vecfree.c | 48 - .../dtksh/ksh93/src/lib/libast/vec/vecload.c | 96 - .../ksh93/src/lib/libast/vec/vecstring.c | 46 - .../ksh93/src/lib/libast/vmalloc/malloc.c | 1317 - .../ksh93/src/lib/libast/vmalloc/vmbest.c | 1311 - .../ksh93/src/lib/libast/vmalloc/vmclear.c | 81 - .../ksh93/src/lib/libast/vmalloc/vmclose.c | 87 - .../ksh93/src/lib/libast/vmalloc/vmdcheap.c | 57 - .../ksh93/src/lib/libast/vmalloc/vmdebug.c | 651 - .../ksh93/src/lib/libast/vmalloc/vmdisc.c | 50 - .../ksh93/src/lib/libast/vmalloc/vmexit.c | 86 - .../ksh93/src/lib/libast/vmalloc/vmgetmem.c | 45 - .../ksh93/src/lib/libast/vmalloc/vmhdr.h | 505 - .../ksh93/src/lib/libast/vmalloc/vmlast.c | 381 - .../ksh93/src/lib/libast/vmalloc/vmmopen.c | 496 - .../ksh93/src/lib/libast/vmalloc/vmopen.c | 181 - .../ksh93/src/lib/libast/vmalloc/vmpool.c | 266 - .../ksh93/src/lib/libast/vmalloc/vmprivate.c | 281 - .../ksh93/src/lib/libast/vmalloc/vmprofile.c | 618 - .../ksh93/src/lib/libast/vmalloc/vmregion.c | 57 - .../ksh93/src/lib/libast/vmalloc/vmsegment.c | 54 - .../ksh93/src/lib/libast/vmalloc/vmset.c | 58 - .../ksh93/src/lib/libast/vmalloc/vmstat.c | 139 - .../ksh93/src/lib/libast/vmalloc/vmstrdup.c | 43 - .../ksh93/src/lib/libast/vmalloc/vmtrace.c | 251 - .../ksh93/src/lib/libast/vmalloc/vmwalk.c | 63 - .../dtksh/ksh93/src/lib/libcmd/Mamfile | 853 - .../dtksh/ksh93/src/lib/libcmd/RELEASE | 334 - .../dtksh/ksh93/src/lib/libcmd/basename.c | 142 - cde/programs/dtksh/ksh93/src/lib/libcmd/cat.c | 560 - .../dtksh/ksh93/src/lib/libcmd/chgrp.c | 528 - .../dtksh/ksh93/src/lib/libcmd/chmod.c | 329 - .../dtksh/ksh93/src/lib/libcmd/chown.c | 39 - .../dtksh/ksh93/src/lib/libcmd/cksum.c | 641 - cde/programs/dtksh/ksh93/src/lib/libcmd/cmd.h | 163 - .../dtksh/ksh93/src/lib/libcmd/cmdinit.c | 75 - cde/programs/dtksh/ksh93/src/lib/libcmd/cmp.c | 396 - .../dtksh/ksh93/src/lib/libcmd/comm.c | 215 - cde/programs/dtksh/ksh93/src/lib/libcmd/cp.c | 1021 - cde/programs/dtksh/ksh93/src/lib/libcmd/cut.c | 716 - .../dtksh/ksh93/src/lib/libcmd/date.c | 528 - .../dtksh/ksh93/src/lib/libcmd/dirname.c | 142 - .../dtksh/ksh93/src/lib/libcmd/expr.c | 577 - cde/programs/dtksh/ksh93/src/lib/libcmd/fds.c | 369 - .../dtksh/ksh93/src/lib/libcmd/features/ids | 9 - .../ksh93/src/lib/libcmd/features/sockets | 3 - .../ksh93/src/lib/libcmd/features/symlink | 23 - .../ksh93/src/lib/libcmd/features/utsname | 15 - cde/programs/dtksh/ksh93/src/lib/libcmd/fmt.c | 638 - .../dtksh/ksh93/src/lib/libcmd/fold.c | 243 - .../dtksh/ksh93/src/lib/libcmd/getconf.c | 285 - .../dtksh/ksh93/src/lib/libcmd/head.c | 164 - cde/programs/dtksh/ksh93/src/lib/libcmd/id.c | 484 - .../dtksh/ksh93/src/lib/libcmd/join.c | 992 - cde/programs/dtksh/ksh93/src/lib/libcmd/lib.c | 25 - cde/programs/dtksh/ksh93/src/lib/libcmd/ln.c | 35 - .../dtksh/ksh93/src/lib/libcmd/logname.c | 80 - .../dtksh/ksh93/src/lib/libcmd/md5sum.c | 35 - .../dtksh/ksh93/src/lib/libcmd/mkdir.c | 192 - .../dtksh/ksh93/src/lib/libcmd/mkfifo.c | 99 - .../dtksh/ksh93/src/lib/libcmd/mktemp.c | 172 - cde/programs/dtksh/ksh93/src/lib/libcmd/mv.c | 35 - .../dtksh/ksh93/src/lib/libcmd/paste.c | 298 - .../dtksh/ksh93/src/lib/libcmd/pathchk.c | 268 - .../dtksh/ksh93/src/lib/libcmd/pids.c | 127 - cde/programs/dtksh/ksh93/src/lib/libcmd/rev.c | 174 - cde/programs/dtksh/ksh93/src/lib/libcmd/rev.h | 34 - .../dtksh/ksh93/src/lib/libcmd/revlib.c | 112 - cde/programs/dtksh/ksh93/src/lib/libcmd/rm.c | 407 - .../dtksh/ksh93/src/lib/libcmd/rmdir.c | 128 - .../dtksh/ksh93/src/lib/libcmd/stty.c | 1029 - cde/programs/dtksh/ksh93/src/lib/libcmd/sum.c | 35 - .../dtksh/ksh93/src/lib/libcmd/sync.c | 83 - .../dtksh/ksh93/src/lib/libcmd/tail.c | 817 - cde/programs/dtksh/ksh93/src/lib/libcmd/tee.c | 210 - cde/programs/dtksh/ksh93/src/lib/libcmd/tty.c | 108 - .../dtksh/ksh93/src/lib/libcmd/uname.c | 570 - .../dtksh/ksh93/src/lib/libcmd/uniq.c | 351 - .../dtksh/ksh93/src/lib/libcmd/vmstate.c | 205 - cde/programs/dtksh/ksh93/src/lib/libcmd/wc.c | 191 - cde/programs/dtksh/ksh93/src/lib/libcmd/wc.h | 59 - .../dtksh/ksh93/src/lib/libcmd/wclib.c | 511 - .../dtksh/ksh93/src/lib/libdll/Mamfile | 295 - .../dtksh/ksh93/src/lib/libdll/RELEASE | 53 - .../dtksh/ksh93/src/lib/libdll/dlfcn.c | 536 - .../dtksh/ksh93/src/lib/libdll/dll_lib.c | 188 - .../dtksh/ksh93/src/lib/libdll/dllcheck.c | 85 - .../dtksh/ksh93/src/lib/libdll/dllerror.c | 52 - .../dtksh/ksh93/src/lib/libdll/dllfind.c | 46 - .../dtksh/ksh93/src/lib/libdll/dlllib.h | 34 - .../dtksh/ksh93/src/lib/libdll/dlllook.c | 49 - .../dtksh/ksh93/src/lib/libdll/dllnext.c | 223 - .../dtksh/ksh93/src/lib/libdll/dllopen.c | 93 - .../dtksh/ksh93/src/lib/libdll/dllplug.c | 126 - .../dtksh/ksh93/src/lib/libdll/dllscan.c | 526 - .../dtksh/ksh93/src/lib/libdll/features/dll | 266 - .../dtksh/ksh93/src/lib/libsum/Mamfile | 222 - .../dtksh/ksh93/src/lib/libsum/RELEASE | 16 - .../dtksh/ksh93/src/lib/libsum/features/sum | 4 - .../dtksh/ksh93/src/lib/libsum/sum-ast4.c | 120 - .../dtksh/ksh93/src/lib/libsum/sum-att.c | 130 - .../dtksh/ksh93/src/lib/libsum/sum-bsd.c | 48 - .../dtksh/ksh93/src/lib/libsum/sum-crc.c | 342 - .../dtksh/ksh93/src/lib/libsum/sum-lmd.c | 330 - .../dtksh/ksh93/src/lib/libsum/sum-md5.c | 354 - .../dtksh/ksh93/src/lib/libsum/sum-prng.c | 113 - .../dtksh/ksh93/src/lib/libsum/sum-sha1.c | 322 - .../dtksh/ksh93/src/lib/libsum/sum-sha2.c | 1228 - cde/programs/dtksh/ksh93/src/lib/libsum/sum.h | 65 - .../dtksh/ksh93/src/lib/libsum/sumlib.c | 376 - 1217 files changed, 345256 deletions(-) delete mode 100644 cde/programs/dtksh/ksh93/.github/workflows/ci.yml delete mode 100644 cde/programs/dtksh/ksh93/.gitignore delete mode 100644 cde/programs/dtksh/ksh93/ANNOUNCE delete mode 100644 cde/programs/dtksh/ksh93/COPYRIGHT delete mode 100644 cde/programs/dtksh/ksh93/LICENSE.md delete mode 100644 cde/programs/dtksh/ksh93/NEWS delete mode 100644 cde/programs/dtksh/ksh93/README.md delete mode 100644 cde/programs/dtksh/ksh93/TODO delete mode 100755 cde/programs/dtksh/ksh93/bin/Mamfile_indent delete mode 100755 cde/programs/dtksh/ksh93/bin/Mamfile_rm_unused_vars delete mode 100755 cde/programs/dtksh/ksh93/bin/ignore delete mode 100755 cde/programs/dtksh/ksh93/bin/mamprobe delete mode 100755 cde/programs/dtksh/ksh93/bin/package delete mode 100755 cde/programs/dtksh/ksh93/bin/shtests delete mode 100755 cde/programs/dtksh/ksh93/bin/silent delete mode 100644 cde/programs/dtksh/ksh93/docs/index.html delete mode 100644 cde/programs/dtksh/ksh93/docs/ksh/builtins.html delete mode 100644 cde/programs/dtksh/ksh93/docs/ksh/examples.html delete mode 100644 cde/programs/dtksh/ksh93/docs/ksh/faq.html delete mode 100644 cde/programs/dtksh/ksh93/docs/ksh/features.html delete mode 100644 cde/programs/dtksh/ksh93/docs/ksh/functions/dirs.txt delete mode 100644 cde/programs/dtksh/ksh93/docs/ksh/functions/emacs_keybind.txt delete mode 100644 cde/programs/dtksh/ksh93/docs/ksh/functions/getopt.txt delete mode 100644 cde/programs/dtksh/ksh93/docs/ksh/functions/keybind.txt delete mode 100644 cde/programs/dtksh/ksh93/docs/ksh/functions/popd.txt delete mode 100644 cde/programs/dtksh/ksh93/docs/ksh/functions/pushd.txt delete mode 100644 cde/programs/dtksh/ksh93/docs/ksh/functions/title.txt delete mode 100644 cde/programs/dtksh/ksh93/docs/ksh/functions/vi_keybind.txt delete mode 100644 cde/programs/dtksh/ksh93/docs/ksh/index.html delete mode 100644 cde/programs/dtksh/ksh93/docs/ksh/ksh.html delete mode 100644 cde/programs/dtksh/ksh93/docs/ksh/scripts/cgi-lib.ksh.txt delete mode 100644 cde/programs/dtksh/ksh93/docs/ksh/scripts/dump-cgi.ksh.txt delete mode 100644 cde/programs/dtksh/ksh93/docs/ksh/scripts/env.txt delete mode 100644 cde/programs/dtksh/ksh93/docs/ksh/scripts/line.txt delete mode 100644 cde/programs/dtksh/ksh93/docs/ksh/scripts/which.txt delete mode 100644 cde/programs/dtksh/ksh93/src/Mamfile delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/C+probe delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/Mamfile delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/RELEASE delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/INIT/ar.ibm.risc delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/INIT/cc.hp.ia64 delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/INIT/cc.hp.pa delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/INIT/cc.hp.pa64 delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/INIT/cc.ibm.risc delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/INIT/cc.ibm.risc.gcc delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/INIT/cc.lynxos.i386 delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/INIT/cc.lynxos.ppc delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/INIT/cc.mvs.390 delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/INIT/cc.next.i386 delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/INIT/cc.next.m68k delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/INIT/cc.osf.alpha delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/INIT/cc.pentium4 delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sco.i386 delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sgi.mips2 delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sgi.mips3 delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sgi.mips3-o32 delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sgi.mips4 delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sgi.mips4-n32 delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/INIT/cc.specialize delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/INIT/cc.unix.mc68k delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/INIT/cc.unixware.i386 delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/crossexec.sh delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/db.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/dl.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/execrate.sh delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/filter.sh delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/gdbm.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/gdbm1.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/gdbm2.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/hello.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/hosttype.tst delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/iconv.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/iffe.sh delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/iffe.tst delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/ignore.sh delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/intl.c delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/INIT/ld.hp.pa delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/INIT/ldd.cygwin.i386 delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/INIT/ldd.darwin delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/INIT/ldd.hp.pa delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/INIT/ldd.ibm.risc delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/INIT/ldd.lynxos delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/INIT/ldd.mvs.390 delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/INIT/ldd.sgi delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/m.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/m2.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/m3.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/m4.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/m5.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/m6.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/make.probe delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/mamake.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/mamake.rt delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/mamake.tst delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/mamprobe.sh delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/mkdir.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/INIT/mktest.sh delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/mprobe.sh delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/nsl.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/p.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/package.sh delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/probe.win32 delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/proto.sh delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/regress.sh delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/rt.sh delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/silent.sh delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/socket.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/w.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/INIT/w2.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/Mamfile delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/builtin/Mamfile delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/builtin/RELEASE delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/builtin/features/pty delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/builtin/pty.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/COMPATIBILITY delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/DESIGN delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/Mamfile delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/OBSOLETE delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/PROMO.mm delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/README delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/RELEASE delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/RELEASE88 delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/RELEASE93 delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/SHOPT.sh delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/TYPES delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/alarm.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/cd_pwd.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/cflow.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/enum.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/getopts.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/hist.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/misc.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/mkservice.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/print.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/read.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/regress.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/sleep.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/test.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/trap.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/typeset.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/ulimit.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/umask.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/whence.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/builtins.mm delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/data/aliases.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/data/builtins.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/data/keywords.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/data/lexstates.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/data/limits.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/data/math.tab delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/data/msg.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/data/options.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/data/signals.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/data/strdata.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/data/testops.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/data/variables.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/edit/completion.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/edit/edit.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/edit/emacs.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/edit/hexpand.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/edit/history.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/edit/vi.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/features/cmds delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/features/dynamic delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/features/externs delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/features/locale delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/features/math.sh delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/features/options delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/features/poll delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/features/rlimits delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/features/setjmp delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/features/sigfeatures delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/features/time delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/features/ttys delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/fun/dirs delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/fun/popd delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/fun/pushd delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/include/argnod.h delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/include/builtins.h delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/include/defs.h delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/include/edit.h delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/include/fault.h delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/include/fcin.h delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/include/history.h delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/include/io.h delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/include/jobs.h delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/include/lexstates.h delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/include/name.h delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/include/national.h delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/include/nval.h delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/include/path.h delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/include/regress.h delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/include/shell.h delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/include/shlex.h delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/include/shnodes.h delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/include/shtable.h delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/include/streval.h delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/include/terminal.h delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/include/test.h delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/include/timeout.h delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/include/ulimit.h delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/include/variables.h delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/include/version.h delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/ksh-regress.rt delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/ksh-regress.tst delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/mamexec delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/mamstate.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/nval.3 delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh.1 delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh.memo delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/args.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/arith.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/array.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/defs.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/deparse.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/expand.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/fault.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/fcin.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/init.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/io.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/jobs.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/lex.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/macro.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/main.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/name.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/nvdisc.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/nvtree.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/nvtype.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/parse.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/path.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/pmain.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/shcomp.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/streval.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/string.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/subshell.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/suid_exec.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/tdump.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/timers.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/trestore.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/waitevent.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/xec.c delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/shell.3 delete mode 100644 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/_common delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/alias.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/append.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/arith.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/arrays.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/arrays2.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/attributes.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/basic.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/bracket.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/builtins.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/case.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/comvar.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/comvario.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/coprocess.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/cubetype.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/enum.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/exit.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/expand.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/functions.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/glob.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/grep.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/heredoc.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/io.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/jobs.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/leaks.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/locale.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/math.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/nameref.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/namespace.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/options.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/path.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/pointtype.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/pty.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/quoting.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/quoting2.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/readcsv.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/readonly.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/recttype.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/restricted.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/return.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/select.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/shtests delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/sigchld.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/signal.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/statics.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/subshell.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/substring.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/tilde.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/timetype.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/treemove.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/types.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/variables.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/vartree1.sh delete mode 100755 cde/programs/dtksh/ksh93/src/cmd/ksh93/tests/vartree2.sh delete mode 100644 cde/programs/dtksh/ksh93/src/lib/Mamfile delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/Mamfile delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/README delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/RELEASE delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/aso/aso-fcntl.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/aso/aso-sem.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/aso/aso.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/aso/asohdr.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/aso/asolock.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/aso/asometh.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/aso/asorelax.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/astsa/README-astsa delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/astsa/aso.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/astsa/aso.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/astsa/ast.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/astsa/ast.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/astsa/ast_common.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/astsa/astsa.manifest delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/astsa/astsa.mm delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/astsa/astsa.omk delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/astsa/ccode.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/astsa/debug.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/astsa/error.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/astsa/error.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/astsa/hashkey.h delete mode 100755 cde/programs/dtksh/ksh93/src/lib/libast/astsa/mkast_sa delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/astsa/option.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/astsa/optlib.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/astsa/sfstr.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/astsa/sfstr.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/astsa/strdup.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/astsa/strmatch.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/astsa/times.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/astsa/vmalloc.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/astsa/vmalloc.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/cdt/cdtlib.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/cdt/dtclose.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/cdt/dtcomp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/cdt/dtdisc.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/cdt/dthash.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/cdt/dthdr.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/cdt/dtlist.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/cdt/dtmethod.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/cdt/dtnew.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/cdt/dtopen.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/cdt/dtstat.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/cdt/dtstrhash.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/cdt/dttree.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/cdt/dtuser.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/cdt/dtview.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/cdt/dtwalk.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/atexit.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/basename.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/catopen.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/closelog.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/conf.sh delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/conf.tab delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/creat64.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/dirname.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/dup2.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/eaccess.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/errno.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/execlp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/execve.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/execvp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/execvpe.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/fakelink.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/fcntl.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/fmtmsg.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/fmtmsglib.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/fnmatch.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/fnmatch.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/frexp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/frexpl.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/fsync.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/ftw.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/ftw.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/getdate.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/getgroups.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/getlogin.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/getopt.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/getopt.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/getoptl.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/getpgrp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/getsubopt.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/getwd.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/gross.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/gross_sgi.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/hsearch.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/iconv.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/killpg.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/libgen.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/link.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/localeconv.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/lstat.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/memccpy.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/memchr.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/memcmp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/memcpy.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/memmove.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/memset.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/mkdir.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/mkfifo.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/mknod.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/mktemp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/mktime.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/mount.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/nftw.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/omitted.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/open.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/openlog.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/putenv.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/re_comp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/re_comp.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/readlink.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/realpath.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/regcmp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/regexp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/regexp.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/remove.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/rename.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/resolvepath.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/rmdir.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/setenv.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/setlocale.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/setlogmask.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/setpgid.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/setsid.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/sigflag.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/sigunblock.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/spawnveg.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/statvfs.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/strcasecmp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/strchr.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/strftime.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/strncasecmp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/strptime.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/strrchr.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/strstr.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/strtod.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/strtol.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/strtold.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/strtoll.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/strtoul.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/strtoull.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/swab.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/symlink.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/syslog.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/syslog.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/sysloglib.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/system.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/tempnam.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/tmpnam.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/transition.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/tsearch.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/unlink.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/unsetenv.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/vfork.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/waitpid.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/wc.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/wordexp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/comp/wordexp.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/dir/dirlib.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/dir/dirstd.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/dir/getdents.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/dir/opendir.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/dir/readdir.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/dir/rewinddir.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/dir/seekdir.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/dir/telldir.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/disc/memfatal.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/disc/sfdcdio.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/disc/sfdcdos.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/disc/sfdcfilter.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/disc/sfdchdr.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/disc/sfdcmore.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/disc/sfdcprefix.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/disc/sfdcseekable.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/disc/sfdcslow.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/disc/sfdcsubstr.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/disc/sfdctee.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/disc/sfdcunion.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/disc/sfkeyprintf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/disc/sfstrtmp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/align.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/api delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/aso delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/asometh delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/botch.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/ccode delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/common delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/dirent delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/eaccess delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/errno delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/fcntl.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/float delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/fs delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/hack delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/iconv delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/lib delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/libpath.sh delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/limits.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/locale delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/map.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/mmap delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/mode.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/ndbm delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/nl_types delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/omitted delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/options delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/param.sh delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/preroot.sh delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/prog delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/sfinit.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/sfio delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/sig.sh delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/siglist delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/signal.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/sizeof delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/standards delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/stdio delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/sys delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/syscall delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/time delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/tmlib delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/tmx delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/tty delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/tv delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/tvlib delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/uwin delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/vfork delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/vmalloc delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/wait delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/wchar delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/features/wctype delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/hash/hashalloc.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/hash/hashdump.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/hash/hashfree.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/hash/hashlast.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/hash/hashlib.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/hash/hashlook.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/hash/hashscan.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/hash/hashsize.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/hash/hashview.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/hash/hashwalk.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/hash/memhash.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/hash/memsum.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/hash/strhash.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/hash/strkey.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/hash/strsum.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/aso.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/ast.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/ast_dir.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/ast_getopt.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/ast_std.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/ast_windows.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/ccode.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/cdt.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/cmdarg.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/debug.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/dt.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/error.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/find.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/fnv.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/fts.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/ftwalk.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/glob.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/hash.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/hashkey.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/hashpart.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/ip6.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/ls.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/magic.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/magicid.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/mc.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/mime.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/mnt.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/modecanon.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/modex.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/namval.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/option.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/proc.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/recfmt.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/regex.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/sfdisc.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/sfio.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/sfio_s.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/sfio_t.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/shcmd.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/stack.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/stak.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/stk.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/swap.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/tar.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/times.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/tm.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/tok.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/usage.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/vdb.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/vecargs.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/vmalloc.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/include/wait.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/LIBAST.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/aso.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/ast.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/astsa.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/cdt.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/chr.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/compat.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/error.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/find.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/fmt.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/fmtls.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/ftwalk.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/getcwd.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/hash.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/iblocks.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/int.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/ip6.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/magic.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/mem.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/mime.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/modecanon.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/optget.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/path.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/preroot.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/proc.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/re.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/regex.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/setenviron.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/sfdisc.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/sfio.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/sig.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/spawnveg.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/stak.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/stk.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/strcopy.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/strdup.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/strelapsed.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/strerror.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/stresc.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/streval.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/strgid.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/strmatch.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/stropt.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/strperm.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/strsignal.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/strsort.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/strtape.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/strton.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/struid.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/swap.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/tab.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/tm.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/tmx.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/tok.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/touch.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/tv.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/vecargs.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/man/vmalloc.3 delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/astintercept.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/cmdarg.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/cmdlib.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/conformance.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/debug.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/error.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/errorf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/errormsg.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/errorx.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/fastfind.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/findlib.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/fmtrec.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/fts.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/ftwalk.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/ftwflags.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/getcwd.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/getenv.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/glob.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/intercepts.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/magic.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/magic.tab delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/mime.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/mimelib.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/mimetype.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/optctx.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/optesc.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/optget.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/optjoin.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/optlib.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/procclose.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/procfree.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/proclib.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/procopen.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/procrun.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/recfmt.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/reclen.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/recstr.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/setenviron.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/sigcrit.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/sigdata.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/signal.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/stack.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/state.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/stk.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/systrace.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/translate.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/univdata.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/misc/univlib.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/path/pathaccess.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/path/pathbin.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/path/pathcanon.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/path/pathcat.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/path/pathcd.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/path/pathcheck.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/path/pathexists.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/path/pathfind.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/path/pathgetlink.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/path/pathicase.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/path/pathkey.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/path/pathnative.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/path/pathpath.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/path/pathposix.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/path/pathprobe.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/path/pathprog.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/path/pathrepl.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/path/pathsetlink.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/path/pathshell.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/path/pathstat.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/path/pathtemp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/path/pathtmp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/port/astconf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/port/astcopy.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/port/astdynamic.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/port/astmath.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/port/astquery.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/port/aststatic.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/port/astwinsize.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/port/atmain.C delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/port/iblocks.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/port/lc.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/port/lc.tab delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/port/lcgen.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/port/lclang.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/port/lclib.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/port/mc.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/port/mnt.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/port/touch.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/preroot/getpreroot.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/preroot/ispreroot.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/preroot/realopen.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/preroot/setpreroot.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/regex/regalloc.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/regex/regcache.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/regex/regclass.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/regex/regcoll.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/regex/regcomp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/regex/regdecomp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/regex/regerror.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/regex/regexec.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/regex/regfatal.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/regex/reginit.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/regex/reglib.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/regex/regnexec.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/regex/regrecord.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/regex/regrexec.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/regex/regstat.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/regex/regsub.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/regex/regsubcomp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/regex/regsubexec.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/_sfclrerr.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/_sfdlen.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/_sfeof.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/_sferror.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/_sffileno.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/_sfgetc.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/_sfgetl.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/_sfgetl2.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/_sfgetu.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/_sfgetu2.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/_sfllen.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/_sfopen.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/_sfputc.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/_sfputd.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/_sfputl.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/_sfputm.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/_sfputu.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/_sfslen.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/_sfstacked.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/_sfulen.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/_sfvalue.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfclose.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfclrlock.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfcvt.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfdisc.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfdlen.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfecvt.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfexcept.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfextern.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sffcvt.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sffilbuf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfflsbuf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfgetd.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfgetl.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfgetm.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfgetr.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfgetu.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfhdr.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfllen.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfmode.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfmove.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfmutex.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfnew.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfnotify.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfnputc.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfopen.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfpeek.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfpkrd.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfpoll.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfpool.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfpopen.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfprintf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfprints.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfpurge.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfputd.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfputl.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfputm.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfputr.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfputu.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfraise.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfrd.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfread.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfreserve.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfresize.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfscanf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfseek.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfset.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfsetbuf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfsetfd.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfsize.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfsk.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfstack.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfstrtod.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfstrtof.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfswap.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfsync.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sftable.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sftell.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sftmp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfungetc.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfvprintf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfvscanf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfwalk.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfwr.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfwrite.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/sfio/vthread.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/std/bytesex.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/std/dirent.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/std/endian.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/std/iconv.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/std/nl_types.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/std/stdio.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/std/wchar.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/std/wctype.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/_doprnt.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/_doscan.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/_filbuf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/_flsbuf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/_stdfun.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/_stdopen.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/_stdprintf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/_stdscanf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/_stdsprnt.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/_stdvbuf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/_stdvsnprnt.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/_stdvsprnt.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/_stdvsscn.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/asprintf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/clearerr.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/fclose.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/fcloseall.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/fdopen.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/feof.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/ferror.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/fflush.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/fgetc.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/fgetpos.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/fgets.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/fgetwc.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/fgetws.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/fileno.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/flockfile.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/fmemopen.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/fopen.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/fprintf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/fpurge.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/fputc.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/fputs.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/fputwc.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/fputws.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/fread.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/freopen.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/fscanf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/fseek.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/fseeko.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/fsetpos.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/ftell.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/ftello.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/ftrylockfile.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/funlockfile.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/fwide.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/fwprintf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/fwrite.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/fwscanf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/getc.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/getchar.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/getdelim.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/getline.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/getw.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/getwc.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/getwchar.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/pclose.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/popen.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/printf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/putc.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/putchar.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/puts.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/putw.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/putwc.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/putwchar.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/rewind.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/scanf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/setbuf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/setbuffer.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/setlinebuf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/setvbuf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/snprintf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/sprintf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/sscanf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/stdhdr.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/stdio_c99.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/swprintf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/swscanf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/tmpfile.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/ungetc.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/ungetwc.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/vasprintf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/vfprintf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/vfscanf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/vfwprintf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/vfwscanf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/vprintf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/vscanf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/vsnprintf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/vsprintf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/vsscanf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/vswprintf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/vswscanf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/vwprintf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/vwscanf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/wprintf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/stdio/wscanf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/base64.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/ccmap.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/ccmapid.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/ccnative.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/chresc.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/chrtoi.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/fmtbase.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/fmtbuf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/fmtclock.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/fmtdev.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/fmtelapsed.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/fmterror.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/fmtesc.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/fmtfmt.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/fmtfs.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/fmtgid.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/fmtident.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/fmtint.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/fmtip4.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/fmtip6.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/fmtls.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/fmtmatch.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/fmtmode.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/fmtnum.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/fmtperm.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/fmtre.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/fmtscale.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/fmtsignal.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/fmttime.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/fmttmx.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/fmttv.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/fmtuid.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/fmtversion.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/memdup.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/modedata.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/modei.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/modelib.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/modex.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/stracmp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strcopy.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strdup.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strelapsed.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strerror.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/stresc.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/streval.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strexpr.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strgid.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strlcat.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strlcpy.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strlook.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strmatch.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strmode.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strnacmp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strncopy.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strnpcmp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strntod.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strntol.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strntold.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strntoll.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strnton.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strntonll.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strntoul.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strntoull.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strnvcmp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/stropt.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strpcmp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strperm.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strpsearch.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strsearch.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strsort.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strtape.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strtoi.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strtoip4.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strtoip6.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strton.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strtonll.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/struid.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/struniq.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/strvcmp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/swapget.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/swapmem.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/swapop.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/swapput.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/tok.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/tokline.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/tokscan.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/string/wc2utf8.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tmdata.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tmdate.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tmequiv.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tmfix.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tmfmt.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tmform.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tmgoff.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tminit.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tmleap.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tmlex.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tmlocale.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tmmake.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tmpoff.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tmscan.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tmsleep.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tmtime.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tmtype.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tmweek.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tmword.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tmxdate.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tmxduration.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tmxfmt.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tmxgettime.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tmxleap.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tmxmake.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tmxscan.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tmxsettime.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tmxsleep.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tmxtime.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tmxtouch.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tmzone.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tvcmp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tvgettime.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tvsettime.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tvsleep.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/tm/tvtouch.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/uwin/a64l.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/uwin/acosh.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/uwin/asinh.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/uwin/atanh.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/uwin/cbrt.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/uwin/crypt.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/uwin/erf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/uwin/err.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/uwin/exp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/uwin/exp__E.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/uwin/expm1.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/uwin/gamma.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/uwin/getpass.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/uwin/lgamma.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/uwin/log.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/uwin/log1p.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/uwin/log__L.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/uwin/mathimpl.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/uwin/mini.sym delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/uwin/rand48.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/uwin/random.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/uwin/rcmd.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/uwin/rint.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/uwin/rlib.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/uwin/support.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/vec/vecargs.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/vec/vecfile.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/vec/vecfree.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/vec/vecload.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/vec/vecstring.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/malloc.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmbest.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmclear.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmclose.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmdcheap.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmdebug.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmdisc.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmexit.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmgetmem.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmhdr.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmlast.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmmopen.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmopen.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmpool.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmprivate.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmprofile.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmregion.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmsegment.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmset.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmstat.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmstrdup.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmtrace.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmwalk.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/Mamfile delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/RELEASE delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/basename.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/cat.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/chgrp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/chmod.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/chown.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/cksum.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/cmd.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/cmdinit.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/cmp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/comm.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/cp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/cut.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/date.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/dirname.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/expr.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/fds.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/features/ids delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/features/sockets delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/features/symlink delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/features/utsname delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/fmt.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/fold.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/getconf.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/head.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/id.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/join.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/lib.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/ln.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/logname.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/md5sum.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/mkdir.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/mkfifo.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/mktemp.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/mv.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/paste.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/pathchk.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/pids.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/rev.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/rev.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/revlib.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/rm.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/rmdir.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/stty.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/sum.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/sync.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/tail.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/tee.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/tty.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/uname.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/uniq.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/vmstate.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/wc.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/wc.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libcmd/wclib.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libdll/Mamfile delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libdll/RELEASE delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libdll/dlfcn.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libdll/dll_lib.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libdll/dllcheck.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libdll/dllerror.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libdll/dllfind.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libdll/dlllib.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libdll/dlllook.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libdll/dllnext.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libdll/dllopen.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libdll/dllplug.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libdll/dllscan.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libdll/features/dll delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libsum/Mamfile delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libsum/RELEASE delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libsum/features/sum delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libsum/sum-ast4.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libsum/sum-att.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libsum/sum-bsd.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libsum/sum-crc.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libsum/sum-lmd.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libsum/sum-md5.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libsum/sum-prng.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libsum/sum-sha1.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libsum/sum-sha2.c delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libsum/sum.h delete mode 100644 cde/programs/dtksh/ksh93/src/lib/libsum/sumlib.c diff --git a/cde/programs/dtksh/ksh93/.github/workflows/ci.yml b/cde/programs/dtksh/ksh93/.github/workflows/ci.yml deleted file mode 100644 index c0d0217a4..000000000 --- a/cde/programs/dtksh/ksh93/.github/workflows/ci.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: CI - -on: [push] - -jobs: - - Linux: - name: Linux - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v2 - - name: Build - run: bin/package make - - name: Regression tests - run: | - PS4="$PS4[ci.yml] " - set -o xtrace - export TZ=UTC - ulimit -n 1024 - : default regression tests && - script -q -e -c "bin/shtests" && - : regression tests with OS-provided multibyte locales && - LANG=nl_NL.UTF-8 script -q -e -c "bin/shtests --locale --nocompile" && - LANG=ja_JP.SJIS script -q -e -c "bin/shtests --locale --nocompile" && - : disable most SHOPTs, rebuild ksh && - sed --regexp-extended --in-place=.orig \ - '/^SHOPT (2DMATCH|AUDIT|BGX|BRACEPAT|DEVFD|DYNAMIC|EDPREDICT|ESH|FIXEDARRAY|HISTEXPAND|MULTIBYTE|NAMESPACE|OPTIMIZE|STATS|SUID_EXEC|VSH)=/ s/=1?/=0/' \ - src/cmd/ksh93/SHOPT.sh && - bin/package make && - : default regression tests with SHOPTs disabled && - script -q -e -c "bin/shtests" diff --git a/cde/programs/dtksh/ksh93/.gitignore b/cde/programs/dtksh/ksh93/.gitignore deleted file mode 100644 index f68096577..000000000 --- a/cde/programs/dtksh/ksh93/.gitignore +++ /dev/null @@ -1,42 +0,0 @@ -# Project-specific files -arch -tgz -lcl - -# Flat make libs, binaries, etc -/bin/.paths -/bin/crossexec -/bin/execrate -/bin/filter -/bin/iffe -/bin/ksh -/bin/mamake -/bin/proto -/bin/mktest -/bin/pty -/bin/regress -/bin/rt -/bin/shcomp -/bin/suid_exec -/fun/ -/include/ -/lib/file/ -/lib/*.a -/man/ - -# Miscellaneous artefacts -*.bak -*.sav -*.old -*.orig -.*.swp -*.DS_Store -*~ -.nfs* -*.tmp -*.rej -*.project -*.core -core -**/#*# -tags diff --git a/cde/programs/dtksh/ksh93/ANNOUNCE b/cde/programs/dtksh/ksh93/ANNOUNCE deleted file mode 100644 index 332b8ad4e..000000000 --- a/cde/programs/dtksh/ksh93/ANNOUNCE +++ /dev/null @@ -1,249 +0,0 @@ -Announcing: KornShell 93u+m 1.0.0-beta.2 -https://github.com/ksh93/ksh - -In May 2020, when every KornShell (ksh93) development project was -abandoned, development was rebooted in a new fork based on the last -stable AT&T version: ksh 93u+. This new fork is called ksh 93u+m as a -permanent nod to its origin. We're restarting it at version 1.0. Seven -months after the first beta, the second one is ready. Please test this -second beta and report any bugs you find, or help us fix known bugs. - -We're now the default ksh93 in some OS distributions, at least Debian -and Slackware! Even though we don't think it's stable release quality -yet, the consensus seems to be that 93u+m is already much better than -the last AT&T release. - -Main developers: Martijn Dekker, Johnothan King, hyenias - -Contributors: Andy Fiddaman, Anuradha Weeraman, Chase, Gordon Woodhull, -Govind Kamat, Harald van Dijk, Lev Kujawski, Marc Wilson, Ryan Schmidt, -Sterling Jensen - -HOW TO GET IT - -Please download the source code tarball from our GitHub releases page: - - https://github.com/ksh93/ksh/releases - -To build, follow the instructions in README.md or src/cmd/ksh93/README. - -HOW TO GET INVOLVED - -To report a bug, please open an issue at our GitHub page (see above). -Alternatively, email me at martijn@inlv.org with your report. -To get involved in development, read the brief policy information in -README.md and then jump right in with a pull request or email a patch. -See the TODO file in the top-level directory for a to-do list. - -### MAIN CHANGES between 1.0.0-beta.2 and 1.0.0-(unreleased) ### - -New features in built-in commands: - -- Two bash-like flags for 'whence' were backported from ksh 93v-: - - 'whence -P/type -P' is an alias to the existing -p flag. - - 'whence -t/type -t' will print only the type of a command in a simple - format that is designed to be easy to use for scripts. Example: - $ type -t typeset; whence -t sh - builtin - file - -- Added three options to the ulimit builtin with the same names and - functionality as in Bash: - - 'ulimit -k' sets the maximum number of kqueues. - - 'ulimit -P' sets the maximum number of pseudo-terminals. - - 'ulimit -R' sets the maximum time in microseconds a real-time process - can run before blocking. - Note that to use these options the operating system must support the - corresponding resource limit. - -### MAIN CHANGES between 1.0.0-beta.1 and 1.0.0-beta.2 ### - -New features in built-in commands: - -- 'cd' now supports an -e option that, when combined with -P, verifies - that $PWD is correct after changing directories; this helps detect - access permission problems. See: - https://www.austingroupbugs.net/view.php?id=253 - -- 'printf' now supports a -v option as in bash. This assigns formatted - output directly to variables, which is very fast and will not strip - final newline (\n) characters. - -- The 'return' command, when used to return from a function, can now - return any status value in the 32-bit signed integer range, like on - zsh. However, due to a traditional Unix kernel limitation, $? is - still trimmed to its least significant 8 bits whenever leaving a - (sub)shell environment. - -- 'test'/'[' now supports all the same operators as [[ (including =~, - \<, \>) except for the different 'and'/'or' operators. Note that - 'test'/'[' remains deprecated due to its unfixable pitfalls; - [[ ... ]] is recommended instead. - -Shell language changes: - -- Several improvements were made to the --noexec shell code linter. - -- Arithmetic expressions in native ksh mode no longer interpret a - number with a leading zero as octal in any context. Use 8#octalnumber - instead (e.g. 8#400 == 256). Arithmetic expressions now also behave - identically within and outside ((...)) and $((...)). - -- POSIX compatibility mode fixes (only applicable with the --posix shell - option on): - - A leading zero is now consistently recognised as introducing an octal - number in all arithmetic contexts. - - $((inf)) and $((nan)) are now interpreted as regular variables. - - The '.' built-in no longer runs ksh functions and now only runs - files. - -Bugs fixed: - -- '.' and '..' are now once again completed by tab completion. - -- If SIGINT is set to ignore, the interactive shell no longer exits on - Ctrl+C. - -- ksh now builds and runs on Apple's new M1 hardware. - -- The 'return' and 'exit' commands no longer risk triggering actual - signals by returning or exiting with a status > 256. - -- Ksh no longer behaves badly when parsing a type definition command - ('typeset -T' or 'enum') without executing it or when executing it in - a subshell. Types can now safely be defined in subshells and defined - conditionally as in 'if condition; then enum ...; fi'. - -- Discipline functions, especially those applied to PS2 or .sh.tilde, - will no longer crash your shell upon being interrupted or throwing an - error. - -- Fixed a bug that could corrupt output if standard output is closed - upon initialising the shell. - -- Fixed a bug in the [[ ... ]] compound command: the '!' logical - negation operator now correctly negates another '!', e.g., - [[ ! ! 1 -eq 1 ]] now returns 0/true. Note that this has always been - the case for 'test'/'['. - -- Fixed SHLVL so that replacing ksh by itself (exec ksh) will not - increase it. - -- Arithmetic expressions are no longer allowed to assign out-of-range - values to variables of types declared with enum. - -- The 'time' keyword no longer makes the --errexit shell option - ineffective. - -- Various bugs in libcmd built-in commands (those bound to the - /opt/ast/bin path by default) have been fixed. - -- Various other crashing bugs have been fixed. - -Fixes for the shcomp byte code compiler: - -- shcomp is now able to compile scripts that define types using enum. - -- shcomp now refuses to mess up your terminal by writing bytecode - to it. - -### MAIN CHANGES between ksh 93u+ 2012-08-01 and 93u+m 1.0.0-beta.1 ### - -Hundreds of bugs have been fixed, including many serious/critical bugs. -This includes upstreamed patches from OpenSUSE, Red Hat, and Solaris, fixes -backported from the abandoned 93v- beta and ksh2020 fork, as well as many -new fixes from the community. See the NEWS file for more information, and -the git commit log for complete documentation of every fix. Incompatible -changes have been minimised, but not at the expense of fixing bugs. For a -list of potentially incompatible changes, see src/cmd/ksh93/COMPATIBILITY. - -Though there was a "no new features, bugfixes only" policy, some new -features were found necessary, either to fix serious design flaws or to -complete functionality that was evidently intended, but not finished. -Below is a summary of these new features. - -New command line editor features: - -- The forward-delete and End keys are now handled as expected in the - emacs and vi built-in line editors. - -- In the vi and emacs line editors, repeat count parameters can now also - be used for the arrow keys and the forward-delete key. E.g., in emacs - mode, 7 will now move the cursor seven positions to - the left. In vi control mode, this would be entered as: 7 . - -New shell language features: - -- The &>file redirection shorthand (for >file 2>&1) is now available for - all scripts and interactive sessions and not only for profile/login - scripts, bringing ksh 93u+m in line with mksh, bash, and zsh. - -- File name generation (a.k.a. pathname expansion, a.k.a. globbing) now - never matches the special navigational names '.' (current directory) - and '..' (parent directory). This change makes a pattern like .* - useful; it now matches all hidden files (dotfiles) in the current - directory, without the harmful inclusion of '.' and '..'. - -- Tilde expansion can now be extended or modified by defining a - .sh.tilde.get or .sh.tilde.set discipline function. This replaces a - 2004 undocumented attempt to add this functionality via a .sh.tilde - command, which never worked and crashed the shell. See the manual for - details on the new method. - -New features in built-in commands: - -- Usage error messages now show the --help/--man self-documentation options. - -- Path-bound built-ins (such as /opt/ast/bin/cat) can now be executed by - invoking the canonical path, so the following will now work as expected: - $ /opt/ast/bin/cat --version - version cat (AT&T Research) 2012-05-31 - -- 'command -x' now looks for external commands only, skipping built-ins. - In addition, its xargs-like functionality no longer freezes the shell on - Linux and macOS, making it effectively a new feature on these systems. - -- 'redirect' now checks if all arguments are valid redirections before - performing them. If an error occurs, it issues an error message instead - of terminating the shell. - -- 'suspend' now refuses to suspend a login shell, as there is probably no - parent shell to return to and the login session would freeze. - -- 'times' now gives high precision output in a POSIX compliant format. - -- 'typeset' now gives an informative error message if an incompatible - combination of options is given. - -- 'whence -v/-a' now reports the location of autoloadable functions. - -New features in shell options: - -- A new --globcasedetect shell option is added on OSs where we can - check for a case-insensitive file system (currently Windows/Cygwin, - macOS, Linux and QNX 7.0+). When this option is turned on, file name - generation (globbing), as well as file name tab completion on - interactive shells, automatically become case-insensitive on file - systems where the difference between upper and lower case is ignored - for file names. This is transparently determined for each directory, so - a path pattern that spans multiple file systems can be part - case-sensitive and part case-insensitive. - -- A new --nobackslashctrl shell option disables the special escaping - behaviour of the backslash character in the emacs and vi built-in - editors. Particularly in the emacs editor, this makes it much easier to - go backward, insert a forgotten backslash into a command, and then - continue editing without having your next cursor key replace your - backslash with garbage. Note that Ctrl+V (or whatever other character - was set using 'stty lnext') always escapes all control characters in - either editing mode. - -- A new --posix shell option has been added to ksh 93u+m that makes the - ksh language more compatible with other shells by following the POSIX - standard more closely. See the manual page for details. It is enabled by - default if ksh is invoked as sh, otherwise it is disabled by default. - -- Enhancement to -G/--globstar: symbolic links to directories are now - followed if they match a normal (non-**) glob pattern. For example, if - '/lnk' is a symlink to a directory, '/lnk/**' and '/l?k/**' now work as - you would expect. diff --git a/cde/programs/dtksh/ksh93/COPYRIGHT b/cde/programs/dtksh/ksh93/COPYRIGHT deleted file mode 100644 index 72982159b..000000000 --- a/cde/programs/dtksh/ksh93/COPYRIGHT +++ /dev/null @@ -1,146 +0,0 @@ -ksh 93u+m general copyright notice - -######################################################################## -# # -# The KornShell 93u+m distribution # -# Copyright (c) 2021 Contributors to ksh 93u+m # -# # -# Derived from AT&T's ast package (see below) # -# Licensed under the Eclipse Public License, Version 1.0 # -# # -# A copy of the License is available at # -# http://www.eclipse.org/org/documents/epl-v10.html # -# (with md5 checksum b35adb5213ca9657e911e9befb180842) # -# # -# CONTRIBUTORS # -# # -# Martijn Dekker # -# Johnothan King # -# hyenias <58673227+hyenias@users.noreply.github.com> # -# Anuradha Weeraman # -# Chase # -# Govind Kamat # -# Harald van Dijk # -# Lev Kujawski # -# Marc Wilson # -# # -######################################################################## - -ast package general copyright notice - -######################################################################## -# # -# This software is part of the ast package # -# Copyright (c) 1986-2014 AT&T Intellectual Property # -# and is licensed under the # -# Eclipse Public License, Version 1.0 # -# by AT&T Intellectual Property # -# # -# A copy of the License is available at # -# http://www.eclipse.org/org/documents/epl-v10.html # -# (with md5 checksum b35adb5213ca9657e911e9befb180842) # -# # -# Information and Software Systems Research # -# AT&T Research # -# Florham Park NJ # -# # -# CONTRIBUTORS # -# # -# Glenn Fowler # -# David Korn # -# Phong Vo # -# Adam Edgar # -# Adam Buchsbaum # -# Aman Shaikh # -# Bala Krishnamurthy # -# Brian Russell # -# Robin Chen # -# Don Caldwell # -# Lefty Koutsofios # -# Bob Gruber # -# Jia Wang # -# Jeff Fellin # -# Jeff Korn <@google.com> # -# Kathleen Fisher # -# Ken Church <@microsoft.com> # -# Brian Kernigham # -# Dennis Ritchie # -# Doug McIlroy # -# Eduardo Krell # -# John Snyder # -# Herman Rao # -# AST users mailgroup # -# AST developers mailgroup # -# # -######################################################################## - -bsd package general copyright notice - -######################################################################## -# # -# This software is part of the BSD package # -# Copyright (c) 1979-2012 The Regents of the University of California # -# # -# Redistribution and use in source and binary forms, with or # -# without modification, are permitted provided that the following # -# conditions are met: # -# # -# 1. Redistributions of source code must retain the above # -# copyright notice, this list of conditions and the # -# following disclaimer. # -# # -# 2. Redistributions in binary form must reproduce the above # -# copyright notice, this list of conditions and the # -# following disclaimer in the documentation and/or other # -# materials provided with the distribution. # -# # -# 3. Neither the name of The Regents of the University of California# -# names of its contributors may be used to endorse or # -# promote products derived from this software without # -# specific prior written permission. # -# # -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND # -# CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, # -# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # -# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED # -# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON # -# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # -# POSSIBILITY OF SUCH DAMAGE. # -# # -# Redistribution and use in source and binary forms, with or without # -# modification, are permitted provided that the following conditions # -# are met: # -# 1. Redistributions of source code must retain the above copyright # -# notice, this list of conditions and the following disclaimer. # -# 2. Redistributions in binary form must reproduce the above copyright # -# notice, this list of conditions and the following disclaimer in # -# the documentation and/or other materials provided with the # -# distribution. # -# 3. Neither the name of the University nor the names of its # -# contributors may be used to endorse or promote products derived # -# from this software without specific prior written permission. # -# # -# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" # -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED # -# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A # -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS # -# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF # -# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT # -# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # -# SUCH DAMAGE. # -# # -# CONTRIBUTORS # -# # -# Bill Joy # -# # -######################################################################## diff --git a/cde/programs/dtksh/ksh93/LICENSE.md b/cde/programs/dtksh/ksh93/LICENSE.md deleted file mode 100644 index b0e51e253..000000000 --- a/cde/programs/dtksh/ksh93/LICENSE.md +++ /dev/null @@ -1,87 +0,0 @@ -## Eclipse Public License - v 1.0 - -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - -### 1. DEFINITIONS - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and - -b) in the case of each subsequent Contributor: - -i) changes to the Program, and - -ii) additions to the Program; - -where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. - -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. - -### 2. GRANT OF RIGHTS - -a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. - -b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. - -c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. - -d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. - -### 3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: - -a) it complies with the terms and conditions of this Agreement; and - -b) its license agreement: - -i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; - -ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; - -iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and - -iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. - -When the Program is made available in source code form: - -a) it must be made available under this Agreement; and - -b) a copy of this Agreement must be included with each copy of the Program. - -Contributors may not remove or alter any copyright notices contained within the Program. - -Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. - -### 4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. - -### 5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. - -### 6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -### 7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. - -If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. diff --git a/cde/programs/dtksh/ksh93/NEWS b/cde/programs/dtksh/ksh93/NEWS deleted file mode 100644 index 1ee13ee67..000000000 --- a/cde/programs/dtksh/ksh93/NEWS +++ /dev/null @@ -1,1664 +0,0 @@ -This documents significant changes in the 93u+m branch of AT&T ksh93. -For full details, see the git log at: https://github.com/ksh93/ksh - -Any uppercase BUG_* names are modernish shell bug IDs. - -2021-12-28: - -- Fixed a bug that caused CDPATH to continue working after unsetting it. - -- Added three options to the ulimit builtin with the same names and - functionality as in Bash: - - 'ulimit -k' sets the maximum number of kqueues. - - 'ulimit -P' sets the maximum number of pseudo-terminals. - - 'ulimit -R' sets the maximum time in microseconds a real-time process - can run before blocking. - Note that to use these options the operating system must support the - corresponding resource limit. - -- Ported performance optimizations from illumos to improve the performance - of the cksum builtin. (Note that the cksum builtin is not enabled by - default.) - -2021-12-27: - -- Two bash-like flags for 'whence' were backported from ksh 93v-: - - 'whence -P/type -P' is an alias to the existing -p flag. - - 'whence -t/type -t' will print only the type of a command in a simple - format that is designed to be easy to use for scripts. Example: - $ type -t typeset; whence -t sh - builtin - file - -- Fixed a crash or freeze that would occur on Linux when using Ctrl+C to - interrupt a command substitution containing a pipe in an interactive shell. - -- Fixed a crash that could occur while processing a here-document while - xtrace (set -x) is on and the $PS4 prompt contains parameter expansions or - command substitutions. - -- The mkservice and eloop builtins can now be built by enabling the - new SHOPT_MKSERVICE setting in src/cmd/ksh93/SHOPT.sh. - -2021-12-26: - -- Listing aliases or tracked aliases in a script no longer corrupts - shcomp's generated bytecode. - -- Listing specific aliases with 'alias -p' and specific tracked aliases - with 'alias -pt' now works as documented. This means that the following - string of commands now works as you would expect: - $ hash -r; unalias -a - $ alias foo=bar; hash cat - $ alias -p foo; alias -pt cat - alias foo=bar - alias -t cat - -- As a result of the above fix, listing all tracked aliases with 'alias -pt' - now prints commands that can be reused to recreate the tracked aliases. - -- Attempting to list a non-existent alias or tracked alias with the -p option - now causes an error and sets the exit status to the number of non-existent - aliases passed. - -- Attempting to list 256 non-existent aliases now errors out with the exit - status set to one. - -2021-12-22: - -- Process substitutions run in a profile script no longer print their - process ID when run. - -2021-12-21: - -- Fixed a bug that caused subshells (such as code blocks in parentheses) to - partially behave like the interactive main shell after running anything - that invokes the parser. For example: - $ (eval :; sleep 1 & echo done) - [1] 30909 <--- incorrect job control output from subshell - done - -- Fixed: after suspending (Ctrl+Z) a subshell that is running an external - command, resuming the subshell with 'fg' failed and the job was lost. - $ (vi) <--- press Ctrl+Z - [2] + Stopped (vi) - $ fg - (vi) <--- vi failed to resume; immediate return to command line - $ fg - ksh: no such job - -2021-12-17: - -- Release 1.0.0-beta.2. - -- Ksh no longer behaves badly when parsing a type definition command - ('typeset -T' or 'enum') without executing it or when executing it in - a subshell. Types can now safely be defined in subshells and defined - conditionally as in 'if condition; then enum ...; fi'. - -- Single digits can now be compared lexically in [[ ... ]] with the - < and > operators. - -2021-12-16: - -- Changed the default selection of compiled-in /opt/ast/bin built-in libcmd - command to: basename, cat, cp, cut, dirname, getconf, ln, mktemp, mv. - Add /opt/ast/bin to your $PATH to use these. Type 'cp --man', etc. for info. - -- A bug introduced on 2020-09-17 was fixed that caused interactive ksh to exit - if Ctrl+C was pressed while SIGINT was being ignored (as in "trap '' INT"). - -2021-12-13: - -- Fixed a bug introduced on 2020-08-09 that prevented '.' and '..' from - being completed when using file name tab completion. - -- Fixed a bug on illumos that caused the chown builtin to fail with 'Invalid - argument' after failing to change the ownership of a file twice using an ID - that doesn't exist in /etc/passwd. (Note that the chown builtin is not - enabled by default.) - -2021-12-11: - -- Fixed two more crashing bugs that occurred if ksh received a signal (such - as SIGINT due to Ctrl+C) while the user is entering a multi-line command - substitution in an interactive shell. - -- The shell linter's warning for variable expansion in ((...)) now tells the - user which variable is causing performance degradation. - -- The shell linter now warns the user x=$((expr)) is slower than ((x=expr)) - when assigning a value to a variable. - -2021-12-09: - -- Increased the general robustness of discipline function handling, fixing - crashing bugs with PS2.get() and .sh.tilde.get() disciplines, among others. - -- Fixed a crash that occurred on the interactive shell if the PS1 prompt - contains multiple command substitutions and the user interrupts input - while the shell is on a PS2 prompt waiting for the user to complete a - command substitution of the form $( ... ). - -2021-12-08: - -- Fixed: if a function returned with a status > 256 using the 'return' command - and the return value corresponded to a value that could have resulted from a - signal, and an EXIT trap was active, then the shell mistakenly issued that - signal to itself. Depending on the signal, this could cause the shell to - terminate ungracefully, e.g. 'return 267' caused SIGSEGV ("memory fault"). - -- For the 'return' built-in command, you can now freely specify any - return value that fits in a signed integer, typically a 32-bit value. - Note that $? is truncated to 8 bits when the current (sub)shell exits. - -- The head and tail builtins now correctly handle files that do not have an - ending newline. (Note that the tail builtin is not compiled in by default.) - -2021-12-05: - -- Fixed an issue on illumos that caused some parameters in the getconf - builtin to fail. - -- The cd built-in command now supports a -e option (as specified in - https://www.austingroupbugs.net/view.php?id=253). Passing -e alongside -P - is used to guarantee the cd built-in returns with exit status 1 if the - current working directory couldn't be determined after successfully changing - the directory. - -2021-12-01: - -- Fixed a memory fault that occurred when a discipline function exited - with an error from a special builtin or when a discipline function exited - because of a signal. - -2021-11-29: - -- Fixed a memory fault that prevented ksh from functioning on ARM-based Macs. - -- A bug that caused the time keyword to override the errexit shell option has - been fixed. - -- Fixed a crash that could occur when a KEYBD trap was set and a multi-line - command substitution was input in an interactive shell. - -- The shell linter's warnings for obsolete arithmetic operators in [[ ... ]] - and unnecessary variable expansion in ((...)) have been improved. - -2021-11-24: - -- The --posix mode was amended to stop the '.' command (but not 'source') from - looking up functions defined with the 'function' keyword. In the POSIX - standard and on other shells, the '.' command finds only script files. - -- The rm built-in's -d/--directory option has been fixed. It now properly - removes empty directories and refuses to remove non-empty directories - (as specified in https://www.austingroupbugs.net/view.php?id=802). Note - that the rm built-in command isn't compiled in by default. - -2021-11-23: - -- A bug was fixed that allowed arithmetic expressions to assign out-of-range - values to variables of an enumeration type defined with the 'enum' command, - causing undefined behavior. Within arithmetic expressions, enumeration - values translate to index numbers from 0 to the number of elements minus 1. - That range is now checked for. Decimal fractions are ignored. - -2021-11-21: - -- It is now possible to use types defined by 'enum' in contexts where the - script is entirely parsed before (or without) being executed, such as - dotted/sourced scripts and scripts compiled by shcomp. - -- Added support for the size mode to the stty(1) built-in. This mode is used - to display the terminal's number of rows and columns. Note that the stty - built-in is not compiled in by default. This can be changed by adding - stty to the table of built-ins in src/cmd/ksh93/data/builtins.c. - -2021-11-20: - -- Listing types with 'typeset -T' no longer displays incomplete versions of - types created by the enum built-in. - -2021-11-18: - -- The printf built-in command now supports a -v option as on bash and zsh. - This allows you to assign formatted output directly to a variable. - -- Fixed a performance regression introduced on 2021-05-03 that caused - the shbench[*] fibonacci benchmark to run slower. - [*]: https://github.com/ksh-community/shbench - -2021-11-16: - -- By default, arithmetic expressions in ksh no longer interpret a number - with a leading zero as octal in any context. Use 8#octalnumber instead. - Before, ksh would arbitrarily recognize the leading octal zero in some - contexts but not others, e.g., both of: - $ x=010; echo "$((x)), $(($x))" - $ set -o letoctal; x=010; let y=$x z=010; echo "$y, $z" - would output '10, 8'. These now output '10, 10' and '8, 8', respectively. - Arithmetic expressions now also behave identically within and outside - ((...)) and $((...)). Setting the --posix compliance option turns on the - recognition of the leading octal zero for all arithmetic contexts. - -2021-11-15: - -- In arithmetic evaluation, the --posix compliance option now disables the - special floating point constants Inf and NaN so that $((inf)) and $((nan)) - refer to the variables by those names as the standard requires. (BUG_ARITHNAN) - -- Fixed two file descriptor leaks in the hist builtin that occurred when - the -s flag ran a command or encountered an error. - -2021-11-14: - -- Fixed: ksh crashed after unsetting .sh.match and then matching a pattern. - -- Another test/[ fix: "test \( string1 -a string2 \)" and "test \( string1 -o - string2 \)" no longer give an incorrect "argument expected" error message. - -2021-11-13: - -- The test/[ built-in command now supports the '<' and '=~' operators from [[. - As of now, test/[ supports the same operators as [[ except for the different - and/or operators. Note: test/[ remains deprecated due to its many pitfalls. - -- The test/[ built-in command is fixed so that the binary -a (and) and -o (or) - operators, as in [ "$a" -a "$b" ] or [ "$a" -o "$b" ], work even if "$a" is - '!' or '('. To avoid breaking backwards compatibility with the nonstandard - unary [ -a "$file" ] and [ -o "$option" ] operators in combination with '!' - or parentheses, this fix is only activated if the posix option is on. - -2021-11-07: - -- Fixed a bug that could corrupt output if standard output is closed upon - initializing the shell. - -- Improved BUG_PUTIOERR fix (2020-05-14) with more error checking. On - systems with the "disk full" error testing device /dev/full, an - echo/print/printf to /dev/full now always yields a non-zero exit status. - -2021-09-13: - -- Disable the POSIX arithmetic context while running a command substitution - invoked from within an arithmetic expression. This fixes a bug that caused - integer arguments with a leading zero to be incorrectly interpreted as octal - numbers in non-POSIX arithmetic contexts within such command substitutions. - -2021-09-12: - -- When invoking a script without an interpreter/hashbang path on Linux and - macOS, ksh can now update 'ps' output to show longer command lines. - -2021-08-13: - -- An issue was fixed that could cause old-style `backtick` command - substitutions to hang in certain cases. - -2021-06-03: - -- Fixed a bug in the [[ compound command: the '!' logical negation operator - now correctly negates another '!', e.g., [[ ! ! 1 -eq 1 ]] now returns - 0/true. Note that this has always been the case for 'test'/'['. - -2021-05-18: - -- Fixed SHLVL so that replacing ksh by itself (exec ksh) will not increase it. - -- Fixed a regression introduced on 2020-08-05 that caused a non-interactive - shell to exit if an I/O redirection of a function call encountered an error. - -2021-05-13: - -- Fixed a bug with 'test -t 1' that was introduced on 2021-04-26: - v=$(test -t 1 >/dev/tty && echo ok) did not assign 'ok' to v. - -2021-05-10: - -- Release 1.0.0-beta.1. - -2021-05-07: - -- Backported three ksh 93v- math.tab changes, allowing for an exp10() - arithmetic function if one exists in the C library, a new float() - function, and lastly an updated int() function that rounds to zero - instead of being an alias to floor(). - -2021-05-05: - -- Fixed: a preceding variable assignment like foo=bar in 'foo=bar command' - (with no command arguments after 'command') incorrectly survived the - 'command' regular built-in command invocation. - -- Fixed: 'command -p some_utility' intermittently failed to find the utility - under certain conditions due to a memory corruption issue. - -2021-05-03: - -- Subshells (even if non-forked) now keep a properly separated state of the - pseudorandom generator used for $RANDOM, so that using $RANDOM in a - non-forked subshell no longer influences a reproducible $RANDOM sequence in - the parent environment. In addition, upon invoking a subshell, $RANDOM is now - reseeded (as mksh and bash do). - -- Fixed program flow corruption that occurred in scripts on executing a - background job in a nested subshell, as in ( ( simple_command & ) ). - -- Completed the 2021-04-30 fix for ${var'{}'} where is '-', '+', - ':-' or ':+' by fixing a bug that caused an extra '}' to be output. - -- Following the resolution of Austin Group bug 1393[*] that is set to be - included in the next version of the POSIX standard, the 'command' prefix - in POSIX mode (set -o posix) no longer disables the declaration properties - of declaration built-ins. This reverts a change introduced on 2020-09-11. - [*] https://austingroupbugs.net/view.php?id=1393 - -- Fixed arithmetic assignment operations for multidimensional indexed arrays. - -2021-04-30: - -- The emacs 'ESC .' (M-.) and vi '_' commands now take shell quoting into - account when repeating a word from the previous command line. For example, if - the previous command is 'ls Stairway\ To\ Heaven.mp3', then they now insert - 'Stairway\ To\ Heaven.mp3' instead of 'Heaven.mp3'. Thanks to Govind Kamat. - -- Fixed a bug introduced on 2020-09-05 that caused "echo ${var:+'{}'}" - to be misparsed. - -- Fixed: the effects of 'builtin', 'exec' and 'ulimit' leaked out of a parent - virtual subshell if run from a ${ shared-state; } command substitution. - -2021-04-26: - -- Fixed a bug introduced on 2021-02-20 in which a shared-state command - substitution stopped sharing its state with the calling shell environment - if it executed a command that locally redirected standard output. - -2021-04-22: - -- shcomp (the shell bytecode compiler) was fixed to correctly compile process - substitutions used as the file name to a redirection, as in 'cmd < <(cmd)'. - -- Fixed a bug introduced on 2020-07-13 that set LINENO to the wrong line - number after leaving a virtual subshell in which LINENO had been unset. - -2021-04-21: - -- Fixed a bug introduced on 2020-09-28 that caused an interactive ksh to exit - if a profile script (such as ~/.kshrc) contains a syntax error. - -2021-04-20: - -- Fixed three problems with the /opt/ast/bin/getconf built-in command: - 1. The -l/--lowercase option did not change all variable names to lower case. - 2. The -q/--quote option now quotes all string values. Previously, it only - quoted string values that had a space or other non-shellsafe character. - 3. The -c/--call, -n/--name and -s/--standard options matched all variable - names provided by 'getconf -a', even if none were actual matches. - -- The readonly attribute of ksh variables is no longer imported from - or exported to other ksh shell instances through the environment. - -2021-04-16: - -- Fixed a bug in emacs mode: after using tab completion to complete the name - of a directory, it was not possible to type numbers after the slash. - -- Fixed an optimization bug that caused the <>; redirection operator to fail - when used with the last command in a -c script. - -2021-04-14: - -- Path-bound built-ins (such as /opt/ast/bin/cat) can now be executed by - invoking the canonical path, so the following will now work as expected: - $ /opt/ast/bin/cat --version - version cat (AT&T Research) 2012-05-31 - $ (PATH=/opt/ast/bin:$PATH; "$(whence -p cat)" --version) - version cat (AT&T Research) 2012-05-31 - Non-canonical paths such as /opt/ast/./bin/cat will not find the built-ins. - -- Path-bound built-ins will now also be found on a PATH set locally using an - assignment preceding the command, so the following will now work as expected: - $ PATH=/opt/ast/bin cat --version - version cat (AT&T Research) 2012-05-31 - -2021-04-13: - -- Fixed a few bugs that could cause ksh to show the wrong error message and/or - return the wrong exit status if a command couldn't be executed. In - scenarios where the command was found in the PATH but it was not executable, - ksh now returns with exit status 126. Otherwise, ksh will return with exit - status 127 (such as if the command isn't found or if the command name is - too long). - -2021-04-12: - -- Corrected a memory fault when an attempt was made to unset the default - nameref KSH_VERSION from the shell environment prior to any other name - reference variable creation or modification. - -2021-04-11: - -- Fixed two related regressions introduced on 2020-06-16: - 1. The += assignment failed to append the value of variables when used - in an invocation-local scope. The following should print '5', but - the regression resulted in '3' being printed instead: - $ integer foo=2; foo+=3 command eval 'echo $foo' - 3 - 2. Any += assignment used in an invocation-local scope could modify - readonly variables. - -2021-04-10: - -- Fixed: the internal count of the recursion level for arithmetic expressions - was not reset when certain errors occurred in a virtual subshell. This could - cause an erroneous "recursion to deep" error when a loop executed many - subshells containing arithmetic expressions with errors, e.g. for testing. - -2021-04-09: - -- Fixed a bug that caused ksh to enable -c during the shell's initialization - if the only argument passed was --posix. - -- Fixed a related bug that caused 'set --posix' to leave the braceexpand and - letoctal shell options unchanged. - -- Fixed a bug that caused 'set --default' to unset the restricted option - in restricted shells. - -2021-04-08: - -- Path-bound builtins will now be used by restricted shells if /opt/ast/bin - is in the $PATH upon invoking the shell or before setting it to restricted. - -- Fixed a bug that caused "printf '%T\n' now" to ignore $LC_ALL and $LC_TIME - if the current locale was previously set, unset then set again. - -2021-04-07: - -- The $LC_TIME variable is now recognized by ksh and if set to an invalid - locale will show an error. - -- Fixed BUG_CSUBSTDO: If standard output is closed before running a command - substitution, redirecting any other file descriptor no longer closes standard - output inside of the command substitution. - -2021-04-05: - -- Fixed a regression, introduced in ksh 93t+ 2009-07-31, that caused a command - like 'unset arr[3]' to unset not just element 3 of the array but all elements - starting from 3, if a range expansion like ${arr[5..10]} was previously used. - -- Several fixes for arrays of a type created by 'enum' were backported from ksh - 93v-, further to the two enum array fixes already applied on 2021-02-01: - 1. The array[@]} expansion was fixed for associative arrays of an enum type. - 2. Assignments now work correctly for all enum values for both indexed and - associative arrays. - 3. 'unset' will now completely unset an associative array of an enum type. - -2021-04-04: - -- A bug was fixed that caused a broken prompt display upon redrawing the - command line if the last line of the prompt includes an xterm escape - sequence that is terminated by $'\a' (the bell character). - -- Harden readonly variables. Readonly variables or arrays no longer allow - attribute changes which would otherwise allow their value to be altered. - Expanded support for readonly variables within multidimensional arrays. - -2021-04-03: - -- Fixed a bug that caused the uname builtin's -d option to change the output - of the -o option. - -- Fixed a possible crash that could occur when showing the domain name - with the uname builtin's -d option. - -2021-03-31: - -- Fixed a bug that caused 'cd -' to ignore the current value of $OLDPWD - when it's set to a different directory in a new scope. - -- Fixed a related bug that caused ksh to use the wrong value for $PWD - when in a new scope. - -2021-03-29: - -- Fixed an intermittent crash that could occur in vi mode when using the 'b' - or 'B' commands to go back one word. - -2021-03-27: - -- The 'test' builtin will now show an error message when given the invalid ']]' - or '=~' operators; it also properly returns with exit status 2 now (instead - of exit status 1). If the invalid operator is supported by [[ ... ]] (such - as '=~'), test will now suggest the usage of [[ ... ]] instead. - -2021-03-22: - -- A new --globcasedetect shell option is added to ksh on OSs where we can check - for a case-insensitive file system (currently macOS, Windows/Cygwin, Linux - and QNX 7.0+). When this option is turned on, file name generation - (globbing), as well as file name tab completion on interactive shells, - automatically become case-insensitive on file systems where the difference - between upper- and lowercase is ignored for file names. This is transparently - determined for each directory, so a path pattern that spans multiple file - systems can be part case-sensitive and part case-insensitive. - The option is not compiled into ksh on systems where we do not know of a - method to check for file system case insensitivity. The shell option can be - force-compiled by setting SHOPT_GLOBCASEDET to 1 in src/cmd/ksh93/SHOPT.sh, - but it won't have any effect on non-supported systems, so this is not - recommended. It can be removed from ksh by setting SHOPT_GLOBCASEDET to 0. - -2021-03-17: - -- Fixed a bug with file name completion on the interactive shell in multibyte - locales. Upon encountering two filenames with multibyte characters starting - with the same byte, a partial multibyte character was autocompleted. - -2021-03-16: - -- Tilde expansion can now be extended or modified by defining a .sh.tilde.get - or .sh.tilde.set discipline function. This replaces a 2004 undocumented - attempt to add this functionality via a .sh.tilde built-in, which never - worked and crashed the shell. See the manual for details on the new method. - -- Fixed a bug in interactive shells: if a variable used by the shell called - a discipline function (such as PS1.get() or COLUMNS.set()), the value of $? - was set to the exit status of the discipline function instead of the last - command run. - -2021-03-15: - -- If the HOME variable is unset, the bare tilde ~ now expands to the current - user's system-configured home directory instead of merely the username. - -- Tighten up potential invalid typeset attribute combos when more than - one numeric type has been requested. In particular, -F and -i are no - longer masked over by previously given float types. - -2021-03-13: - -- Fixed a file descriptor leak that occurred when ksh used /dev/fd for - process substitutions passed to functions. - -- Fixed a separate file descriptor leak that happened when a process - substitution was passed to a nonexistent command. - -2021-03-11: - -- Fixed an intermittent bug that caused process substitutions to infinitely - loop in Linux virtual machines that use systemd. - -- Fixed a bug that caused process substitutions to leave lingering processes - if the command invoking them never reads from them. - -2021-03-09: - -- The ${!foo@} and ${!foo*} expansions yield variable names beginning with foo, - but excluded 'foo' itself. The fix for this is now backported from 93v- beta. - -- test -v var, [ -v var ], and [[ -v var ]] did not correctly test if a - variable is set or unset after it has been given a numeric attribute with - 'typeset' but not yet assigned a value. This has been fixed so that - [[ -v var ]] is now equivalent to [[ -n ${var+set} ]] as documented. - -2021-03-07: - -- Fixed the typeset -p display of short integers without an assigned value. - Also, the last -s or -l attribute option supplied for an integer is used. - -- Fixed a bug with -G/--globstar introduced on 2020-08-09: patterns did not - match anything if any pathname component was '.' or '..', e.g. '**/./glob.c' - never matched. The 2020-08-09 fix does still apply to patterns like '.*'. - -- Enhancement to -G/--globstar: symbolic links to directories are now followed - if they match a normal (non-**) glob pattern. For example, if '/lnk' is a - symlink to a directory, '/lnk/**' and '/l?k/**' now work as you would expect. - -- Fixed a bug introduced on 2021-02-11 that caused job control on interactive - ksh sessions to misbehave if the login shell was replaced by ksh using 'exec'. - -2021-03-06: - -- Fixed an old expansion bug: expansions of type ${var=value} and ${var:=value} - did not perform an assignment and yielded the value 0 if 'var' was typeset as - numeric (integer or float) but had not yet been assigned a value. - -- Fixed a bug introduced on 2020-08-19: Ctrl+D would break after an - interactive shell received SIGWINCH. - -- Fixed a bug introduced on 2020-05-21: on an interactive shell, command lines - containing a syntax error were not added to the command history file and - sometimes corrupted the command history. - -2021-03-05: - -- Unbalanced quotes and backticks now correctly produce a syntax error - in -c scripts, 'eval', and backtick-style command substitutions. - -2021-03-04: - -- Fixed an arbitrary command execution vulnerability that occurred when - parsing the subscripts of arrays within arithmetic commands and expansion. - -2021-03-01: - -- Fixed the retention of size attributes when 'readonly' or 'typeset -r' - was applied to an existing variable. - -2021-02-26: - -- Fixed three long-standing bugs with tab completion in the emacs editor: - - 1. The editor accepted literal tabs without escaping in certain cases, - causing buggy and inconsistent completion behaviour. Details: - https://github.com/ksh93/ksh/issues/71#issuecomment-656970959 - https://github.com/ksh93/ksh/issues/71#issuecomment-657216472 - To enter a literal tab in emacs, you need to escape it with ^V or \. - - 2. After completing a filename by choosing from a file completion menu, - the terminal cursor was placed one position too far to the right, - corrupting command line display. This happened with multiline active. - Details: https://github.com/ksh93/ksh/issues/71#issue-655093805 - - 3. A completion menu was displayed if the file name to be completed was - at the point where the rest of it started with a number, even if that - part uniquely identified it so the menu only showed one item. Details: - https://www.mail-archive.com/ast-users@lists.research.att.com/msg00436.html - -- A bug with ${.sh.fun} in combination with the DEBUG trap has been fixed. - The ${.sh.fun} variable wrongly continued to contain the name of the last - function executed by the DEBUG trap after the trap action completed. - -2021-02-21: - -- Fixed: The way that SIGWINCH was handled (i.e. the signal emitted when the - terminal window size changes) could cause strange emacs/vi editor behaviour. - -2021-02-20: - -- Fixed a bug introduced on 2021-01-20: if a DEBUG trap action yielded exit - status 2, the execution of the next command was not skipped as documented. - -- Fixed multiple buffer overflows causing crashes in typeset -L/-R-/-Z. - -- Fixed typeset -Z zero-filling: if the number was zero, all zeros - were skipped when changing the initial size value of the -Z attribute, - leaving an empty string. - -2021-02-18: - -- A bug was fixed in the 'read' builtin that caused it to fail to process - multibyte characters properly in Shift-JIS locales. - -2021-02-17: - -- Emacs mode fixes: - 1. Erasing a backslash while doing a reverse search (^R) no longer deletes - extra characters. - 2. The backslash now escapes a subsequent interrupt (^C) as documented. - -- Fixed a longstanding bug with shared-state command substitutions of the form - ${ command; }. If these were executed in a subshell, changes made within - could survive not only the command substitution but also the parent subshell. - -2021-02-15: - -- Fixed a regression introduced by ksh93 (was not in ksh88): an empty 'case' - list on a single line ('case x in esac') was a syntax error. - -- Fixed a bug in the emacs built-in editor, introduced on 2020-09-17, that - made the Meta-D and Meta-H keys delete single characters instead of words. - -- A new 'backslashctrl' shell option has been added. It is on by default. - Turning it off (set +o backslashctrl or set --nobackslashctrl) disables the - special escaping behaviour of the backslash character in the emacs and vi - built-in editors. Particularly in the emacs editor, this makes it much easier - to go back, insert a forgotten backslash into a command, and then continue - editing without having your next cursor key replace your backslash with - garbage. Note that Ctrl+V (or whatever other character was set using - 'stty lnext') always escapes all control characters in either editing mode. - -2021-02-14: - -- Due to a deficiency in some UNIX variants, the 'sleep' built-in command could - occasionally sleep for slightly less than the time specified. It now performs - an additional check against the system clock to make sure it sleeps at least - the given amount of time. Thanks to Lev Kujawski for adding this feature. - -- A few bugs were fixed that 93u+m introduced along with the new '-o posix' - shell option on 2020-09-01: - 1. 'set --posix' now works as the expected equivalent of 'set -o posix'. - 2. As of 2020-09-18, the posix option turns off braceexpand and turns on - letoctal. Any attempt to override that in a single command such as - 'set -o posix +o letoctal' was quietly ignored. This now works as long - as the overriding option follows the posix option on the command line. - 3. The --default option to 'set' now stops the 'posix' option, if set or - unset in the same 'set' command, from changing other options. This allows - the command output by 'set +o' to correctly restore the current options. - -2021-02-11: - -- Fixed a bug that caused ksh to lose track of all running background jobs if - a shared-state command substitution of the form v=${ cmd; } was used twice. - -- Job control (the -m/-o monitor option) has been fixed for scripts. Background - jobs are now correctly assigned their own process group when run from - subshells (except command substitutions). The 'fg' command now also works for - scripts as it does on other shells, though 'wait' should be preferred. - -2021-02-05: - -- Fixed a longstanding bug that caused redirections that store a file - descriptor > 10 in a variable, such as {var}>file, to stop working if - brace expansion (the -B or -o braceexpand option) was turned off. (Note - that '{var}' is not a brace expansion as it does not contain ',' or '..'.) - -2021-02-04: - -- Fixed ksh crashing if an autoloaded function tried to autoload itself. - ksh now errors out gracefully with an "autoload loop" error message. - -- Fixed crash on trying a very long nonexistent command. - -2021-02-01: - -- Fixed a bug in 'typeset': the '-s' modifier option for short integer will - now only be applied if the integer option '-i' is also present, avoiding - inconsistent results and a crash. - -- Fixed: scalar arrays (-a) and associative arrays (-A) of a type created by - 'enum' allowed values not specified by the enum type, corrupting results. - -- Fixed: the "${array[@]}" expansion for associative arrays of a type created - by 'enum' expanded to random numbers instead of the array's values. - -2021-01-30: - -- The -x option to the 'command' built-in now causes it to bypass built-ins - so that it always runs/queries an external command. See 'command --man'. - -- Fixed a bug in 'command -x' that caused the minimum exit status to be 1 if - a command with many arguments was divided into several command invocations. - -- The 2020-08-16 fix is improved with a compile-time feature test that - detects if the OS requires extra bytes per argument in the arguments list, - maximising the efficiency of 'command -x' for the system it runs on. - -2021-01-24: - -- Fixed a bug in 'typeset': combining the -u option with -F or -E caused the - variable to become a hexadecimal floating point in error. - -- Fixed: an unquoted variable expansion evaluated in a DEBUG trap action caused - IFS field splitting to be deactivated in code executed after the trap action. - This bug was introduced in ksh 93t+ 2009-11-30. - -2021-01-23: - -- Fixed: when the DEBUG trap was redefined in a subshell, the DEBUG trap in - the parent environment was corrupted or the shell crashed. - When a redirection was used in a DEBUG trap action, the trap was disabled. - DEBUG traps were also incorrectly inherited by subshells and ksh functions. - All this was caused by a bug introduced in ksh 93t 2008-07-25. - -2021-01-22: - -- Compile-time shell options can now be edited in src/cmd/ksh93/SHOPT.sh - before building. - -2021-01-20: - -- Fixed: executing a DEBUG trap in a command substitution had side effects - on the exit status ($?) of non-trap commands. - This bug was introduced in ksh 93t 2008-11-04. - -- The typeset builtin command now gives an informative error message if an - incompatible combination of options is given. - -2021-01-19: - -- Fixed a crash when using 'cd' in a virtual/non-forking subshell in a - situation where the current working directory cannot be determined. - -2021-01-08: - -- Fixed a crash on exceeding the maximum size of the $PS1 prompt. - The maximum size is also increased from 160 to 256 bytes. - -2021-01-07: - -- Fixed a crash that could occur while ksh updated ${.sh.match}. - -- Any changes to the hash table (a.k.a. "tracked aliases", i.e. cached $PATH - searches) in a subshell now no longer affect the parent shell's hash table. - -2021-01-05: - -- Fixed a bug in 'cd' that caused 'cd ./foo' to search for 'foo' in $CDPATH. - -2021-01-03: - -- The invocation - $ ksh +s - caused an infinite loop and corrupted ~/.sh_history. This is now fixed so - that the '-s' option is automatically turned on if there are no non-option - command arguments, as documented in Bolsky & Korn (1995), p. 261. - -2020-10-22: - -- Fixed: 'typeset -F0', 'typeset -E0', and 'typeset -X0' floating point - numerics having a precision of 0 with variable assignment. - 'typeset -F0 x; x=4.56' worked but not 'typeset -F0 x=4.56'. - -2020-10-21: - -- Fixed: More concisely correct the exporting of uppercase and lowercase - variables when only the export and change case attributes were applied. - This fix improves upon the previous 2020-09-30 modifications. - -2020-10-06: - -- The security of virtual/non-forking subshells that locally change the present - working directory (PWD) using 'cd' has been improved in two ways. - 1. On entering a subshell, if the parent shell's PWD proves inaccessible upon - saving it, the subshell will now fork into a separate process so the - parent process never changes its PWD, avoiding the need to restore it. - 2. If some attack renders the parent shell's PWD unrestorable *after* ksh - enters a virtual subshell, ksh will now error out on exiting it, as - continuing would mean running arbitrary commands in the wrong PWD. - Hopefully this is an acceptable compromise between performance and security. - The proper fix would be to always fork a subshell when changing the working - directory within it, but the resulting slowdown would likely be unpopular. - -2020-09-30: - -- Fixed: 'typeset -xu' and 'typeset -xl' (export + change case) failed to - change the case of a variable's value in certain conditions. - -- A ksh 93u+ regression was fixed in the combination of ERR trap handling and - the 'pipefail' option. A pipeline now triggers the ERR trap correctly again - if the 'pipefail' option is active and any of the pipeline elements return a - nonzero exit status. Similarly, if both the 'errexit' and 'pipefail' options - are active, ksh now correctly exits if any pipeline element returns nonzero. - -- Autoloading a function no longer causes the calling script's $LINENO to be - off by the number of lines in the function definition file that was loaded. - This also corrects line numbers in warnings and error messages. - -2020-09-28: - -- While executing a ksh-style function, ksh 93u+ ignored all signals for which - the function had not set a local trap, except for SIGINT and SIGQUIT. This - was contrary to the manual, which states that a "trap condition that is not - caught or ignored by the function causes the function to terminate and the - condition to be passed on to the caller". This has now been fixed in 93u+m to - match the documentation, so that e.g. global traps work as expected again. - -2020-09-27: - -- The shell's lexical analysis of a 'case' statement within a do...done block - within a command substitution of the form $(...) has been fixed so that code - like the following no longer throws a spurious syntax error: - x=$(for i in 1; do case $i in word) true;; esac; done) - Previously, this required a leading parenthesis before 'word', although the - syntax error claimed that the ';;' was unexpected. - -2020-09-26: - -- 'whence -f' now completely ignores the existence of functions, as documented. - -- ksh now does not import environment variables whose names are not valid in - the shell language, as it would be impossible to change or unset them. - However, they stay in the environment to be passed to child processes. - -2020-09-25: - -- whence -v/-a now reports the path to the file that an "undefined" (i.e. - autoloadable) function will be loaded from when invoked, if found in $FPATH. - -- When ksh invoked a shell script that does not have a leading - #!/hashbang/path, 'ps' and /proc//cmdline showed corrupted output if - the new script's command line was shorter than that of the invoking script. - This has been fixed by wiping the arguments buffer correctly. - -2020-09-24: - -- An omission made it impossible to turn off brace expansion within command - substitutions (`...`, $(...) or ${ ...; }) as the code for parsing these - did not check the -B/braceexpand option. This check has now been added. - -2020-09-23: - -- Fixed a crash that could occur when running a pipeline containing - backtick-style command substitutions with job control enabled. - -- Fixed a crash that occurred when using 'typeset -u' or 'typeset -l' on a - special variable such as PATH, ENV or SHELL. - -2020-09-21: - -- A bug was fixed that caused command substitutions embedded in here-documents - to lose the output of the commands they ran. This bug occurred when ksh was - compiled with the SHOPT_SPAWN compile-time option. - -- Bugfix: var=$(< file) now reads the file even if the standard inout, standard - output and/or standard error file descriptors are closed. - -2020-09-20: - -- Bugfix: when whence -v/-a found an "undefined" (i.e. autoloadable) function - in $FPATH, it actually loaded the function as a side effect of reporting on - its existence. Now it only reports, as documented. - -- 'whence' will now canonicalise paths properly, resolving '.' and '..' - elements in paths given to it. It also no longer prefixes a spurious - double slash when doing something like 'cd / && whence bin/echo'. - -2020-09-18: - -- Setting the 'posix' option now turns off the 'braceexpand' option, as brace - expansion is not specified by POSIX and potentially incompatible with sh - scripts. In addition, 'set -o posix' now turns on the 'letoctal' option - instead of controlling that behaviour directly. 'set +o posix' does the - reverse of these. - -2020-09-17: - -- In the vi and emacs line editors, repeat count parameters can now also be - used for the arrow keys and the forward-delete key. E.g., in emacs mode, - 7 will now move the cursor seven positions to the left. - In vi control mode, this would be entered as: 7 . - -- When a background job on an interactive shell received SIGINT or SIGPIPE, the - job termination message was empty. It now shows "Interrupt" or "Broken Pipe". - -- The -m (-o monitor) option is no longer ignored when specified on the shell - invocation command line. - -- A script that is interrupted with Ctrl+C now terminates its background jobs - as expected, unless the -m (-o monitor) option was turned on. - -2020-09-14: - -- Corrected rounding of floating point values by ksh's printf %f formatting - operator. Fix contributed by @hyenias. - -- The forward-delete key now works as expected in emacs and vi editing modes. - -2020-09-11: - -- The 'command' regular builtin utility (which runs a simple command, removing - special properties) has been made fully POSIX compliant. - 1. The 'command' name can now result from an expansion (fixing BUG_CMDEXPAN), - e.g. 'c=command; "$c" ls' and 'set -- command ls; "$@"' now work. - 2. If and only if the POSIX mode (the new -o posix shell option) is active, - then the 'command' utility now disables not only "special" but also - "declaration" properties of builtin commands that it invokes, meaning: - a. arguments that start with a variable name followed by '=' are - always treated as regular words subject to normal shell syntax; - b. 'command' can now stop the shell from exiting if a command that it - invokes tries to modify a readonly variable (fixing BUG_CMDSPEXIT). - -- The 'history' (== 'hist -l') and 'r' (== 'hist -s') interactive shell - history commands have reverted to preset aliases and are now only loaded if - the shell is interactive and not initialised in POSIX mode. This avoids - unneeded conflicts with external commands by these names, particularly 'r'. - -2020-09-09: - -- Fixed BUG_LOOPRET2 and related bugs. The 'exit' and 'return' commands without - an argument now correctly default to passing down the exit status of the - last-run command. Tests like the following, in which the last-run command is - 'false', now correctly output 1 instead of 0: - fn() { return || true; }; false; fn; echo "$?" - fn() { while return; do true; done; }; false; fn; echo "$?" - fn() { for i in 1; do return; done; }; false; fn; echo "$?" - fn() { case 1 in 1) return ;; esac; }; false; fn; echo "$?" - fn() { { return; } 2>&1; }; false; fn; echo "$?" - -2020-09-05: - -- Fixed erroneous syntax errors in parameter expansions such as ${var:-wor)d} - or ${var+w(ord}. The parentheses now correctly lose their normal grammatical - meaning within the braces. Fix by Eric Scrivner backported from ksh2020. - -2020-09-04: - -- Fixed a bug that caused a syntax error to be thrown if the special parameter - expansions ${!} and ${$} (including braces) were used within a here-document. - Bug reported by @Saikiran-m on GitHub. - -2020-09-01: - -- The bash-style '&>file' redirection shorthand (for '>file 2>&1') is now - always recognised and not only when running rc/profile init scripts. It no - longer issues a warning. This brings ksh93 in line with mksh, bash and zsh. - -- A long-form shell option '-o posix' has been added, which implements a - mode for better compatibility with the POSIX standard. It is automatically - turned on if ksh is invoked under the name 'sh'. - For now, it: - * disables the &> redirection shorthand - * causes the 'let' arithmetic command to recognise octal numbers by - leading zeros regardless of the setting of the 'letoctal' option - * causes file descriptors > 2 to be left open when invoking another program - * makes the <> redirection operator default to stdin instead of stdout - (this keeps the 2020-05-13 BUG_REDIRIO fix for the POSIX mode while - restoring traditional ksh93 behaviour for backwards compatibility) - * disables a noncompliant 'test -t' == 'test -t 1' compatibility hack - * disables passing an exported variable's attributes (such as integer or - readonly) to a new ksh process through the environment - -2020-08-19: - -- Sped up the 'read' command on most systems by 15-25%. Fixed a hanging bug - on reading from a FIFO that could occur on macOS. - -2020-08-17: - -- 'command -p' incorrectly used the hash table entry (a.k.a. tracked alias) - for a command if its path was previously hashed. It has now been fixed so - it never consults the hash table. - -2020-08-16: - -- Fixed 'command -x' on macOS, Linux and Solaris by accounting for a 16-byte - argument alignment. If execution does fail, it now aborts with an internal - error message instead of entering an infinite retry loop. - -2020-08-13: - -- Fixed memory leaks and a crashing bug that occurred when defining and - running functions in subshells. - -2020-08-11: - -- Fixed an intermittent crash upon running a large number of subshells. - -2020-08-10: - -- A number of fixes have been applied to the printf formatting directives - %H and %#H (as well as the undocumented equivalents %(html)q and %(url)q): - 1. Both formatters have been made multibyte/UTF-8 aware, and no longer - delete multibyte characters. Invalid UTF-8 byte sequences are rendered - as ASCII question marks. - 2. %H no longer wrongly changes spaces to non-breaking spaces ( ). - 3. %H now converts the single quote (') to '%#39;' instead of ''' - which is not a valid entity in all HTML versions. - 4. %#H failed to encode some reserved characters (e.g. '?') while encoding - some unreserved ones (e.g. '~'). It now percent-encodes all characters - except those 'unreserved' as per RFC3986 (ASCII alphanumeric plus -._~). - -- Fixed a crash that occurred intermittently after running an external - command from a command substitution expanded from the $PS1 shell prompt. - -2020-08-09: - -- File name generation (a.k.a. pathname expansion, a.k.a. globbing) now - never matches the special navigational names '.' (current directory) and - '..' (parent directory). This change makes a pattern like .* useful; it - now matches all hidden files (dotfiles) in the current directory, without - the harmful inclusion of '.' and '..'. - -2020-08-08: - -- Argument checking in the 'redirect' builtin command (see 2020-06-11) has - been improved to error out before executing redirections. For example, an - error like 'redirect ls >foo.txt' now will not create 'foo.txt' and will - not leave your standard output permanently redirected to it. - -2020-08-06: - -- Added the '${.sh.pid}' variable as an alternative to Bash's '$BASHPID'. - This variable is set to the current shell's PID, unlike '$$' (which is - set to the main shell's PID). In virtual subshells '${.sh.pid}' is not - changed from its previous value, while in forked subshells '${.sh.pid}' - is set to the subshell's process ID. - -2020-08-05: - -- Fixed a bug in functions that caused ksh to crash when an array with an - unset method was turned into a multidimensional array. - -- Fixed a bug that caused scripts to continue running after over-shifting - in a function when the function call had a redirection. - -- When generating shellquoted strings (such as with 'printf %q'), the - hexadecimal value of a quoted unprintable character was not protected with - square braces, e.g. 0x12 followed by '3' would be quoted as '\x123', which - is a different value. Such strings are now quoted like '\x[12]3' if the - next character is a hexadecimal digit. - -2020-07-31: - -- Fixed a bug that caused multidimensional associative arrays to be created - with an extra array member. - -- Fixed a bug that caused the expansions of positional parameters $1 - $9, - as well as special parameters such as $? and $-, to corrupt any multibyte - characters immediately following the expansion if a UTF-8 locale is active. - -2020-07-29: - -- On a ksh compiled to use fork(2) to run external commands, a bug has been - fixed that caused signals (such as SIGINT, Ctrl+C) to be ignored within a - non-forked subshell after running an external command within that subshell. - -2020-07-25: - -- Fixed BUG_MULTIBIFS: Multibyte characters can now be used as IFS - delimiters. "$*" was incorrectly joining positional parameters on - the first byte of a multibyte character. This was due to truncation - based on the incorrect assumption the IFS would never be larger - than a single byte. - -- Fixed a bug that caused the sleep builtin to continue after being given - an unrecognized option. 'sleep -: 1' will now show a usage message and - exit instead of sleep for one second. - -- Fixed a bug that caused the 'typeset' variable attributes -a, -A, -l, and - -u to leak out of a subshell if they were set without assigning a value. - -2020-07-23: - -- Fixed an infinite loop that could occur when ksh is the system's /bin/sh. - -- A command substitution that is run on the same line as a here-document - will no longer cause a syntax error. - -2020-07-22: - -- Fixed two race conditions when running external commands on - interactive shells with job control active. - -2020-07-20: - -- If a shell function and a built-in command by the same name exist, - 'whence -a' and 'type -a' now report both. - -- Fixed a bug that caused file descriptors opened with 'redirect' or 'exec' - to survive a subshell environment after exiting it. - -2020-07-19: - -- Fixed a crash that occurred in the '.' command when using kshdb. - -- Fixed a crash that occurred when attempting to use redirection with an - invalid file descriptor. - -2020-07-16: - -- The 'history' and 'r' default aliases have been made regular built-ins, - leaving zero default aliases. - -- Fixed a bug that caused 'sleep -s' to have no effect with intervals longer - than 30 seconds. - -- The accuracy of the sleep builtin has been improved. It no longer ignores - microseconds and doesn't add extra milliseconds when the interval is less - than 31 seconds. - -2020-07-15: - -- The 'autoload', 'compound', 'float', 'functions', 'integer' and 'nameref' - default aliases have been converted into regular built-in commands, so - that 'unalias -a' does not remove them. Shell functions can now use - these names, which improves compatibility with POSIX shell scripts. - -- The End key escape sequence '^[[F' is now handled in the emacs and vi editing - modes. The End key moves the cursor to the end of the line (in contrast to - the Home key doing the opposite). - -2020-07-14: - -- Fixed a bug that caused 'set -b' to have no effect. - -- Following the 'time' keyword, the 'times' builtin command now also - supports millisecond precision. - -2020-07-13: - -- Fixed a fork bomb that could occur when the vi editor was sent SIGTSTP - while running in a ksh script. - -- Appending a lone percent to the end of a format specifier no longer - causes a syntax error. The extra percent will be treated as a literal - '%', like in Bash and zsh. - -- The 'time' keyword now has proper support for millisecond precision. - Although this feature was previously documented, the 'time' keyword - only supported up to centisecond precision, which caused a command - like the one below to return '0.000' on certain operating systems: - $ TIMEFORMAT='%3R'; time sleep .003 - -- The 'time' keyword now zero-pads seconds less than ten (like mksh). - -2020-07-10: - -- Fixed a bug that caused types created with 'typeset -T' to throw an error - when used if the type name started with a lowercase 'a'. - -- A potential crash due to memory corruption when using many file - descriptors has been fixed. - -2020-07-09: - -- Fixed a crash on syntax error when sourcing/dotting multiple files. - -- Fixed a crash when listing indexed arrays. - -- Fixed a memory leak when restoring PATH when temporarily setting PATH - for a command (e.g. PATH=/foo/bar command ...) or in a virtual subshell. - -- Combining ((...)) with redirections no longer causes a syntax error - due to the parser handling '>' incorrectly. - -- Fixed a bug that corrupted KIA/CQL cross-reference databases created using - ksh's -R option; shell warnings were wrongly included in the database file. - -- The shell's quoting algorithm (used in xtrace, printf %q, and more) has been - fixed for UTF-8 (Unicode) locales; it no longer needlessly and inconsistently - encodes normal printable UTF-8 characters into hexadecimal \u[xxxx] codes. - -2020-07-07: - -- Four of the date formats accepted by 'printf %()T' have had their - functionality altered to the common behavior of date(1): - - '%k' and '%l' print the current hour with blank padding, the former - based on a 24-hour clock and the latter a twelve hour clock. These - are common extensions present on Linux and *BSD. - - '%f' prints a date with the format string '%Y.%m.%d-%H:%M:%S' (BusyBox). - - '%q' prints the quarter of the year (GNU). - -2020-07-06: - -- 'notty' is now written to the ksh auditing file instead of '(null)' if - the user's tty could not be determined. - -- Unsetting an associative array no longer causes a memory leak to occur. - -2020-07-05: - -- In UTF-8 locales, fix corruption of the shell's internal string quoting - algorithm (as used by xtrace, 'printf %q', and more) that occurred when - the processing of a multibyte character was interrupted. - -2020-07-03: - -- Backslashes are no longer escaped in the raw Bourne Shell-like editing - mode in multibyte locales, i.e. backslashes are no longer treated like - Control-V if the emacs and vi modes are disabled. - -- Deleting a backslash in vi mode with Control-H or Backspace now only - escapes a backslash if it was the previous input. This means erasing a - string such as 'ab\\\' will only cause the first backslash to escape a - Backspace as '^?', like in emacs mode. - -- An odd interaction with Backspace when the last character of a separate - buffer created with Shift-C was '\' has been fixed. '^?' will no longer - be output repeatedly when attempting to erase a separate buffer with - a Backspace. Note that buffers created with Shift-C are not meant to be - erasable: - https://pubs.opengroup.org/onlinepubs/9699919799/utilities/vi.html#tag_20_152_13_49 - -- The 'kill' builtin now supports the SIGINFO signal (on operating systems - with support for SIGINFO). - -2020-07-02: - -- Fixed a crash that occurred if a directory named '.paths' existed in any - directory listed in $PATH. The fix was to only read '.paths' if it is a - regular file or a symlink to a regular file. - -2020-06-30: - -- 'read -u' will no longer crash with a memory fault when given an out of - range or negative file descriptor. - -- The '=~' operator no longer raises an error if a regular expression - combines the '{x}' quantifier with a sub-expression. - -2020-06-28: - -- Variables created with 'typeset -RF' no longer cause a memory fault - when accessed. - -- Unsetting an array that was turned into a compound variable will no - longer cause silent memory corruption. - -- Variables created with 'readonly' in functions are now set to the - specified value instead of nothing. Note that 'readonly' does not - create a function-local scope, unlike 'typeset -r' which does. - -2020-06-26: - -- Changing to a directory that has a name starting with a '.' will no - longer fail if preceded by '../' (i.e. 'cd ../.local' will now work). - -2020-06-24: - -- Fixed buggy tab completion of tilde-expanded paths such as - ~/some in 'vi' mode. - -- In the raw/default Bourne Shell-like editing mode that occurs when neither - the 'emacs' nor the 'vi' shell option is active: - * tab completion is now correctly disabled, instead of enabled and broken; - * entering tab characters now moves the cursor the correct amount. - -2020-06-23: - -- Fixed a bug that caused combining process substitution with redirection - to create a bizarre file in the user's current working directory. - -- Using process substitution while the shell is interactive no longer - causes the process ID of the asynchronous process to be printed. - -2020-06-22: - -- The 'stop' and 'suspend' default aliases have been converted into regular - built-in commands, so that 'unalias -a' does not remove them, 'suspend' - can do a couple of sanity checks, and something like - cmd=stop; $cmd $! - will now work. See 'stop --man' and 'suspend --man' for more information. - -- Fixed a bug that caused the kill and stop commands to segfault when given - a non-existent job. - -- Nested functions no longer ignore variable assignments that were prefixed - to their parent function, i.e. 'VAR=foo func' will now set $VAR to 'foo' - in the scope of any nested function 'func' runs. - -2020-06-20: - -- Fixed a bug that caused setting the following variables as readonly in - a virtual subshell to affect the environment outside of the subshell: - $_ - ${.sh.name} - ${.sh.subscript} - ${.sh.level} - $RANDOM - $LINENO - -- Fixed two bugs that caused 'unset .sh.lineno' to always produce a memory - fault and '(unset .sh.level)' to memory fault when run in nested - functions. - -2020-06-18: - -- A two decade old bug that caused 'whence -a' to base the path of - tracked aliases on the user's current working directory has been - fixed. Now the real path to tracked aliases is shown when '-a' is - passed to the whence command. - -2020-06-17: - -- A bug in 'unset -f' was fixed that prevented shell functions from - unsetting themselves while they were running. A POSIX function no longer - crashes when doing so, and a KornShell-style function no longer silently - ignores an 'unset -f' on itself. A function of either form now continues - running after unsetting itself, and is removed at the end of the run. - -2020-06-16: - -- Passing the '-d' flag to the read builtin will no longer cause the '-r' - flag to be discarded when 'read -r -d' is run. - -- Fix BUG_CMDSPASGN: preceding a "special builtin"[*] with 'command' now - prevents preceding invocation-local variable assignments from becoming global. - [*] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_14 - -2020-06-15: - -- The 'source' alias has been converted into a regular built-in command. - -- Functions that set variables in a virtual subshell will no longer affect - variables of the same name outside of the virtual subshell's environment. - -- Terse usage messages written by builtin commands now point the user to - the --help and --man options for more information. - -2020-06-14: - -- 'read -S' is now able to correctly handle strings with double quotes - nested inside of double quotes. - -2020-06-13: - -- Fixed a timezone name determination bug on FreeBSD that caused the - output from "LC_ALL=C printf '%T\n' now" to print the wrong time zone name. - -2020-06-11: - -- Fixed a bug that caused running 'builtin -d' on a special builtin to - delete it. The man page for the 'builtin' command documents that special - builtins cannot be deleted. - -- POSIX compliance fix: It is now possible to set shell functions named - 'alias' or 'unalias', overriding the commands by the same names. In - technical terms, they are now regular builtins, not special builtins. - -- The redirect='command exec' alias has been converted to a regular - 'redirect' builtin command that only accepts I/O redirections, which - persist as in 'exec'. This means that: - * 'unlias -a' no longer removes the 'redirect' command; - * users no longer accidentally get logged out of their shells if - they type something intuitive but wrong, like 'redirect ls >file'. - -- The undocumented 'login' and 'newgrp' builtin commands have been removed. - These replaced your shell session with the external commands by the same - name, as in 'exec'. If an error occurred (e.g. due to a typo), you would - end up immediately logged out. - If you do want this behaviour, you can restore it by setting: - alias login='exec login' - alias newgrp='exec newgrp' - -2020-06-10: - -- The 'hash' utility is now a regular builtin instead of an alias to - 'alias -t --'. The functionality of the old command has been removed - from the alias builtin. - -- 'set +r' is no longer able to unset the restricted option. This change - makes the behavior of 'set +r' identical to 'set +o restricted'. - -2020-06-09: - -- The 'unalias' builtin will now return a non-zero status if it tries - to remove a previously set alias that is not currently set. - -2020-06-08: - -- Fix an issue with the up arrow key in Emacs editing mode. - Emacs editing mode is bugged in ksh93u+ and ksh2020. Let's - say you were to run the following commands after starting - a fresh instance of ksh: - $ alias foo=true - $ unalias foo - If you type 'a' and then press the up arrow on your keyboard, - ksh will complete 'a' to 'alias foo=true' by doing a reverse - search for the last command that starts with 'a'. - Run the alias command again, then type 'u' and press the up - arrow key again. If ksh is in Vi mode, you will get 'unalias foo', - but in Emacs mode you will get 'alias foo=true' again. - All subsequent commands were ignored as ksh was saving the first - command and only based later searches off of it. - -- If 'set -u'/'set -o nounset' is active, then the shell now errors out if a - nonexistent positional parameter such as $1, $2, ... is accessed, as other - shells do and POSIX requires. (This does *not* apply to "$@" and "$*".) - -- If 'set -u'/'set -o nounset' is active, then the shell now errors out if $! - is accessed before the shell has launched any background process. - -- Removed support for an obscure early 1990s Bell Labs file system research - project called 3DFS, which has not existed for decades. This removes: - - an obnoxious default alias 2d='set -f;_2d' that turned off your file name - wildcard expansion and then tried to run a nonexistent '_2d' command - - undocumented builtins 'vmap' and 'vpath' that only printed error messages - - a non-functional -V unary operator for the test and [[ commands - -- If the last program run by a ksh script exits with a signal (e.g. crashed), - ksh itself now exits normally instead of repeating that same signal. - In addition, using 'exit x' for x > 256 no longer makes ksh issue a signal. - -2020-06-06: - -- The 'times' command is now a builtin command that conforms to POSIX - instead of an alias for the 'time' command. It displays the accumulated - user and system CPU times, one line with the times used by the shell and - another with those used by all of the shell's child processes. - https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_27 - -- The default aliases command='command ' and nohup='nohup ' have been - removed because they caused breakage in an attempt to circumvent other - breakage which is being fixed. In the unlikely even that anyone still - needs alias substitution to continue on the command argument following - 'command' or 'nohup', it's easy to set these aliases yourself. - -2020-06-05: - -- Fix a bug that caused special variables such as PATH, LANG, LC_ALL, - etc. to lose their effect after being unset in a subshell. For example: - (unset PATH; PATH=/dev/null; ls); : wrongly ran 'ls' - (unset LC_ALL; LC_ALL=badlocale); : failed to print a diagnostic - This also fixes BUG_KUNSETIFS: unsetting IFS in a subshell failed if IFS - was set to the empty value in the parent shell. - -- Fix crashes on some systems, including at least a crash in 'print -v' on - macOS, by eliminating an invalid/undefined use of memccpy() on overlapping - buffers in the commonly used sfputr() function. - -- Fix the ${.sh.subshell} level counter; it is no longer reset to zero when a - non-forked subshell happens to fork into a separate process for some reason - (an internal implementation detail that should be unnoticeable to scripts). - -2020-06-04: - -- Fix BUG_KBGPID: the $! special parameter was not set if a background job - (somecommand &) or co-process (somecommand |&) was launched as the only - command within a braces block with an attached redirection, for example: - { - somecommand & - } >&2 - With the bug, $! was unchanged; now it contains the PID of somecommand. - -2020-05-31: - -- Fix a bug in autoloading functions. Directories in the path search list - which should be skipped (e.g. because they don't exist) did not interact - correctly with autoloaded functions, so that a function to autoload was - not always found correctly. - Details: https://github.com/att/ast/issues/1454 - -2020-05-30: - -- Fix POSIX compliance of 'test'/'[' exit status on error. The command now - returns status 2 instead of 1 when given an invalid number or arithmetic - expression, e.g.: - [ 123 -eq 123x ]; echo $? - now outputs 2 instead of 1. - -2020-05-29: - -- Fix BUG_FNSUBSH: functions can now be correctly redefined and unset in - subshell environments (such as ( ... ), $(command substitutions), etc). - Before this fix, this was silently ignored, causing the function by the - same name from the parent shell environment to be executed instead. - fn() { echo mainsh; } - (fn() { echo subsh; }; fn); fn - This now correctly outputs "subsh mainsh" instead of "mainsh mainsh". - ls() { echo "ls executed"; } - (unset -f ls; ls); ls - This now correctly lists your directory and then prints "ls executed", - instead of printing "ls executed" twice. - -- Fix a similar bug with aliases. These can now be correctly unset - in subshell environments. - -2020-05-21: - -- Fix truncating of files with the combined redirections '<>;file' and - '<#pattern'. The bug was caused by out-of-sync streams. - Details and discussion: https://github.com/att/ast/issues/61 - -- Patched code injection vulnerability CVE-2019-14868. As a result, you can - no longer use expressions in imported numeric environment variables; only - integer literals are allowed. - -2020-05-20: - -- Fix BUG_ISSETLOOP. Expansions like ${var+set} remained static when used - within a 'for', 'while' or 'until' loop; the expansions din't change along - with the state of the variable, so they could not be used to check whether a - variable is set within a loop if the state of that variable changed in the - course of the loop. - -- Fix BUG_IFSISSET. ${IFS+s} always yielded 's', and [[ -v IFS ]] always - yielded true, even if IFS is unset. This applied to IFS only. - -2020-05-19: - -- Fix 'command -p'. The -p option causes the operating system's standard - utilities path (as output by 'getconf PATH') to be searched instead of $PATH. - Before this fix, this was broken on non-interactive shells as the internal - variable holding the default PATH value was not correctly initialised. - -2020-05-16: - -- Fix 'test -t 1', '[ -t 1 ]', '[[ -t 1 ]]' in command substitutions. - Standard output (file descriptor 1) tested as being on a terminal within a - command substitution, which makes no sense as the command substitution is - supposed to be catching standard output. - v=$(echo begincomsub - [ -t 1 ] && echo oops - echo endcomsub) - echo "$v" - This now does not output "oops". - -2020-05-14: - -- Fix syncing history when print -s -f is used. For example, the - following now correctly adds a 'cd' command to the history: - print -s -f 'cd -- %q\n' "$PWD" - Ref.: https://github.com/att/ast/issues/425 - https://github.com/att/ast/pull/442 - -- Fix BUG_PUTIOERR: Output builtins now correctly detect - input/output errors. This allows scripts to check for a nonzero exit - status on the 'print', 'printf' and 'echo' builtins and prevent possible - infinite loops if SIGPIPE is ignored. - -- Add a convenient bin/run_ksh_tests script to the source tree that - sets up the necessary environment and runs the ksh regression tests. - -2020-05-13: - -- Fix BUG_CASELIT: an undocumented 'case' pattern matching misbehaviour that - goes back to the original Bourne shell, but wasn't discovered until 2018. - If a pattern doesn't match as a pattern, it was tried again as a literal - string. This broke common validation use cases, e.g.: - n='[0-9]' - case $n in - ( [0-9] ) echo "$n is a number" ;; - esac - would output "[0-9] is a number" as the literal string fallback matches the - pattern. As this misbehaviour was never documented anywhere (not for Bourne, - ksh88, or ksh93), and it was never replicated in other shells (not even in - ksh88 clones pdksh and mksh), it is unlikely any scripts rely on it. - Of course, a literal string fallback, should it be needed, is trivial to - implement correctly without this breakage: - case $n in - ( [0-9] | "[0-9]") echo "$n is a number or the number pattern" ;; - esac - Ref.: https://github.com/att/ast/issues/476 - -- Fix BUG_REDIRIO: ksh used to redirect standard output by default when no - file descriptor was specified with the rarely used '<>' reading/writing - redirection operator. It now redirects standard input by default, as POSIX - specifies and as all other POSIX shells do. To redirect standard output - for reading and writing, you now need '1<>'. - Ref.: https://github.com/att/ast/issues/75 - http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_07_07 diff --git a/cde/programs/dtksh/ksh93/README.md b/cde/programs/dtksh/ksh93/README.md deleted file mode 100644 index 24eabdfec..000000000 --- a/cde/programs/dtksh/ksh93/README.md +++ /dev/null @@ -1,222 +0,0 @@ -![](https://github.com/ksh93/ksh/workflows/CI/badge.svg) - -# KornShell 93u+m - -This repository is used to develop bugfixes -to the last stable release (93u+ 2012-08-01) of -[ksh93](http://www.kornshell.com/), -formerly developed by AT&T Software Technology (AST). -The sources in this repository were forked from the -GitHub [AST repository](https://github.com/att/ast) -which is no longer under active development. - -For user-visible fixes, see [NEWS](https://github.com/ksh93/ksh/blame/master/NEWS) -and click on commit messages for full details. -For all fixes, see [the commit log](https://github.com/ksh93/ksh/commits/). -To see what's left to fix, see [the issue tracker](https://github.com/ksh93/ksh/issues). - -## Policy - -1. Fixing bugs is main focus of the 1.x series. - Major feature development is for future versions (2.x and up). -2. No major rewrites. No refactoring code that is not fully understood. -3. No changes in documented behaviour, except if required for compliance with the - [POSIX shell language standard](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/contents.html) - which David Korn [intended](http://www.kornshell.com/info/) for ksh to follow. -4. No 100% bug compatibility. Broken and undocumented behaviour gets fixed. -5. No bureaucracy, no formalities. Just fix it, or report it: create issues, - send pull requests. Every interested party is invited to contribute. -6. To help increase everyone's understanding of this code base, fixes and - significant changes should be fully documented in commit messages. -7. Code style varies somewhat in this historic code base. - Your changes should match the style of the code surrounding them. - Indent with tabs, assuming an 8-space tab width. - Opening braces are on a line of their own, at the same indentation level - as their corresponding closing brace. - Comments always use `/*`...`*/`. -8. Good judgment may override this policy. - -## Why? - -Between 2017 and 2020 there was an ultimately unsuccessful -[attempt](https://github.com/att/ast/tree/2020.0.1) -to breathe new life into the KornShell by extensively refactoring the last -unstable AST beta version (93v-). -While that ksh2020 branch is now abandoned and still has many critical bugs, -it also had a lot of bugs fixed. More importantly, the AST issue tracker -now contains a lot of documentation on how to fix those bugs, which made -it possible to backport many of them to the last stable release instead. -This ksh 93u+m reboot now incorporates many of these bugfixes, -plus patches from -[OpenSUSE](https://github.com/ksh93/ksh/wiki/Patch-Upstream-Report:-OpenSUSE), -[Red Hat](https://github.com/ksh93/ksh/wiki/Patch-Upstream-Report:-Red-Hat), -and -[Solaris](https://github.com/ksh93/ksh/wiki/Patch-Upstream-Report:-Solaris), -as well as many new fixes from the community -([1](https://github.com/ksh93/ksh/pulls?q=is%3Apr+is%3Amerged), -[2](https://github.com/ksh93/ksh/issues?q=is%3Aissue+is%3Aclosed+label%3Abug)). -Though there are many -[bugs left to fix](https://github.com/ksh93/ksh/issues), -we are confident at this point that 93u+m is already the least buggy branch -of ksh93 ever released. - -## Build - -To build ksh with a custom configuration of features, edit -[`src/cmd/ksh93/SHOPT.sh`](https://github.com/ksh93/ksh/blob/master/src/cmd/ksh93/SHOPT.sh). - -Then `cd` to the top directory and run: -```sh -bin/package make -``` - -The compiled binaries are stored in the `arch` directory, in a subdirectory -that corresponds to your architecture. The command `bin/package host type` -outputs the name of this subdirectory. - -If you have trouble or want to tune the binaries, you may pass additional -compiler and linker flags. It is usually best to export these as environment -variables *before* running `bin/package` as they could change the name of -the build subdirectory of the `arch` directory, so exporting them is a -convenient way to keep them consistent between build and test commands. -**Note that this system uses `CCFLAGS` instead of the usual `CFLAGS`.** -An example that makes Solaris Studio cc produce a 64-bit binary: -```sh -export CCFLAGS="-m64 -O" LDFLAGS="-m64" -bin/package make -``` -Alternatively you can append these to the command, and they will only be -used for that command. You can also specify an alternative shell in which -to run the build scripts this way. For example: -```sh -bin/package make SHELL=/bin/bash CCFLAGS="-O2 -I/opt/local/include" LDFLAGS="-L/opt/local/lib" -``` - -For more information run -```sh -bin/package help -``` -Many other commands in this repo self-document via the `--help`, `--man` and -`--html` options; those that do have no separate manual page. - -### Test - -After compiling, you can run the regression tests. -Start by reading the information printed by: -```sh -bin/shtests --man -``` - -### Install - -Automated installation is not supported yet. -To install manually: -```sh -cp arch/$(bin/package host type)/bin/ksh /usr/local/bin/ -cp src/cmd/ksh93/sh.1 /usr/local/share/man/man1/ksh.1 -``` -(adapting the destination directories as required). - -## What is ksh93? - -The following is the official AT&T description from 1993 that came with the -ast-open distribution. The text is original, but hyperlinks were added here. - ----- - -KSH-93 is the most recent version of the KornShell Language described in -"The KornShell Command and Programming Language," by Morris Bolsky and David -Korn of AT&T Bell Laboratories, ISBN 0-13-182700-6. The KornShell is a shell -programming language, which is upward compatible with "sh" (the Bourne -Shell), and is intended to conform to the IEEE P1003.2/ISO 9945.2 -[Shell and Utilities standard](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/contents.html). -KSH-93 provides an enhanced programming environment in addition to the major -command-entry features of the BSD shell "csh". With KSH-93, medium-sized -programming tasks can be performed at shell-level without a significant loss -in performance. In addition, "sh" scripts can be run on KSH-93 without -modification. - -The code should conform to the -[IEEE POSIX 1003.1 standard](http://www.opengroup.org/austin/papers/posix_faq.html) -and to the proposed ANSI C standard so that it should be portable to all -such systems. Like the previous version, KSH-88, it is designed to accept -eight bit character sets transparently, thereby making it internationally -compatible. It can support multi-byte characters sets with some -characteristics of the character set given at run time. - -KSH-93 provides the following features, many of which were also inherent in -KSH-88: - -* Enhanced Command Re-entry Capability: The KSH-93 history function records - commands entered at any shell level and stores them, up to a - user-specified limit, even after you log off. This allows you to re-enter - long commands with a few keystrokes - even those commands you entered - yesterday. The history file allows for eight bit characters in commands - and supports essentially unlimited size histories. -* In-line Editing: In "sh", the only way to fix mistyped commands is to - backspace or retype the line. KSH-93 allows you to edit a command line - using a choice of EMACS-TC or "vi" functions. You can use the in-line - editors to complete filenames as you type them. You may also use this - editing feature when entering command lines from your history file. A user - can capture keystrokes and rebind keys to customize the editing interface. -* Extended I/O Capabilities: KSH-93 provides several I/O capabilities not - available in "sh", including the ability to: - * specify a file descriptor for input and output - * start up and run co-processes - * produce a prompt at the terminal before a read - * easily format and interpret responses to a menu - * echo lines exactly as output without escape processing - * format output using printf formats. - * read and echo lines ending in "\\". -* Improved performance: KSH-93 executes many scripts faster than the System - V Bourne shell. A major reason for this is that many of the standard - utilities are built-in. To reduce the time to initiate a command, KSH-93 - allows commands to be added as built-ins at run time on systems that - support dynamic loading such as System V Release 4. -* Arithmetic: KSH-93 allows you to do integer arithmetic in any base from - two to sixty-four. You can also do double precision floating point - arithmetic. Almost the complete set of C language operators are available - with the same syntax and precedence. Arithmetic expressions can be used to - as an argument expansion or as a separate command. In addition, there is an - arithmetic for command that works like the for statement in C. -* Arrays: KSH-93 supports both indexed and associative arrays. The subscript - for an indexed array is an arithmetic expression, whereas, the subscript - for an associative array is a string. -* Shell Functions and Aliases: Two mechanisms - functions and aliases - can - be used to assign a user-selected identifier to an existing command or - shell script. Functions allow local variables and provide scoping for - exception handling. Functions can be searched for and loaded on first - reference the way scripts are. -* Substring Capabilities: KSH-93 allows you to create a substring of any - given string either by specifying the starting offset and length, or by - stripping off leading or trailing substrings during parameter - substitution. You can also specify attributes, such as upper and lower - case, field width, and justification to shell variables. -* More pattern matching capabilities: KSH-93 allows you to specify extended - regular expressions for file and string matches. -* KSH-93 uses a hierarchical name space for variables. Compound variables can - be defined and variables can be passed by reference. In addition, each - variable can have one or more disciplines associated with it to intercept - assignments and references. -* Improved debugging: KSH-93 can generate line numbers on execution traces. - Also, I/O redirections are now traced. There is a DEBUG trap that gets - evaluated before each command so that errors can be localized. -* Job Control: On systems that support job control, including System V - Release 4, KSH-93 provides a job-control mechanism almost identical to - that of the BSD "csh", version 4.1. This feature allows you to stop and - restart programs, and to move programs between the foreground and the - background. -* Added security: KSH-93 can execute scripts which do not have read - permission and scripts which have the setuid and/or setgid set when - invoked by name, rather than as an argument to the shell. It is possible - to log or control the execution of setuid and/or setgid scripts. The - noclobber option prevents you from accidentally erasing a file by - redirecting to an existing file. -* KSH-93 can be extended by adding built-in commands at run time. In - addition, KSH-93 can be used as a library that can be embedded into an - application to allow scripting. - -Documentation for KSH-93 consists of an "Introduction to KSH-93", -"Compatibility with the Bourne Shell" and a manual page and a README file. -In addition, the "New KornShell Command and Programming Language" book is -available from Prentice Hall. diff --git a/cde/programs/dtksh/ksh93/TODO b/cde/programs/dtksh/ksh93/TODO deleted file mode 100644 index eba7aeca9..000000000 --- a/cde/programs/dtksh/ksh93/TODO +++ /dev/null @@ -1,124 +0,0 @@ -TODO for ksh 93u+m - -See the issue tracker for up-to-date information: -https://github.com/ksh93/ksh/issues - -______ -Enhancements to do: - -* Add -T (-o functrace) option as in bash - https://github.com/ksh93/ksh/issues/162 - -* History pattern search menu (SHOPT_EDPREDICT) needs work - https://github.com/ksh93/ksh/issues/233 - -* Use real pipes instead of sockets - https://github.com/ksh93/ksh/issues/327 - -______ -Known bugs in ksh 93u+m 1.0.0-beta.2 (HELP IS WANTED to fix these): - -* Memory leak when initialising associative array in subshell - https://github.com/ksh93/ksh/issues/94 - -* command substitution botches output of non-waited-for child processes - https://github.com/ksh93/ksh/issues/124 - -* Intermittent coprocess hang on Debian/Ubuntu and Solaris - https://github.com/ksh93/ksh/issues/132 - -* wrong typeset -p output after unsetting multidimensional array elements - https://github.com/ksh93/ksh/issues/148 - -* File descriptor is unexpectedly closed after exec in subshell - https://github.com/ksh93/ksh/issues/161 - -* printf %T date parsing: GNU-style "ago" date spec completely broken - https://github.com/ksh93/ksh/issues/182 - -* typeset -L/-R: string length breaks on multibyte characters - https://github.com/ksh93/ksh/issues/189 - -* Linux i386: variable expansion corruption in single-line function - https://github.com/ksh93/ksh/issues/203 - -* Segfault with very large extended glob patterns - https://github.com/ksh93/ksh/issues/207 - -* funcname.ksh crashes under standard malloc - https://github.com/ksh93/ksh/issues/212 - -* process substitution cannot be part of a larger argument - https://github.com/ksh93/ksh/issues/215 - -* Compound array regression on OpenBSD with standard malloc - https://github.com/ksh93/ksh/issues/229 - -* 'typeset -m'-related crash on OpenBSD compiled with standard malloc - https://github.com/ksh93/ksh/issues/231 - -* Freeze/crash on OpenBSD with -D_std_malloc involving typeset and command substitution - https://github.com/ksh93/ksh/issues/264 - -* Nested compound assignment misparsed in $(...) command substitution - https://github.com/ksh93/ksh/issues/269 - -* Crash on bin/shtests -px heredoc - https://github.com/ksh93/ksh/issues/306 - -* Multibyte characters get corrupted when KEYBD trap is set - https://github.com/ksh93/ksh/issues/307 - -* .sh.match index array result issues, crash after unset - https://github.com/ksh93/ksh/issues/308 - -* Builtins don't handle I/O errors - https://github.com/ksh93/ksh/issues/313 - -* block devices not seekable when open on fd 0, 1 or 2 - https://github.com/ksh93/ksh/issues/318 - -* bug in printf when %b and %x$ are used in same format - https://github.com/ksh93/ksh/issues/324 - -* namespaces don't work properly when defined within functions - https://github.com/ksh93/ksh/issues/325 - -* Associative arrays of various types fail to be unset - https://github.com/ksh93/ksh/issues/345 - -* types survive exec of hashbangless script - https://github.com/ksh93/ksh/issues/350 - -* Backtick command substitutions can't nest double quotes - https://github.com/ksh93/ksh/issues/352 - -* Line continuation breakage within $(comsub) - https://github.com/ksh93/ksh/issues/367 - -______ -Fix regression test failures: - -- There are some serious regression test failures on OpenBSD when ksh - is compiled with AST vmalloc disabled, so the system standard malloc(3) - is used. These probably represent real ksh93 bugs exposed by OpenBSD's - security hardening mechanisms. - -- Several known memory leaks have their tests disabled in tests/leaks.sh - and are marked TODO. These need tracking down and fixing. - -______ -Fix currently known bugs affecting shell scripting. These are identified by -their modernish IDs. For exact details, see code/comments in: -https://github.com/modernish/modernish/tree/0.16/lib/modernish/cap/ - -- BUG_BRACQUOT: shell quoting within bracket patterns has no effect. This - bug means the '-' retains it special meaning of 'character range', and an - initial ! (and, on some shells, ^) retains the meaning of negation, even - in quoted strings within bracket patterns, including quoted variables. - -- BUG_IFSGLOBS: In glob pattern matching (as in case or parameter - substitution with # and %), if IFS starts with ? or * and the "$*" - parameter expansion inserts any IFS separator characters, those characters - are erroneously interpreted as wildcards when quoted "$*" is used as the - glob pattern. diff --git a/cde/programs/dtksh/ksh93/bin/Mamfile_indent b/cde/programs/dtksh/ksh93/bin/Mamfile_indent deleted file mode 100755 index c67a2cd82..000000000 --- a/cde/programs/dtksh/ksh93/bin/Mamfile_indent +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env sh -IFS=''; set -fCu # safe mode: no split/glob = no quoting headaches -let() { return $((!($1))); } - -# Automatically (re-)indent make...done blocks in a Mamfile. -# Usage: Mamfile_indent Mamfile.new -# -# Should work on all current POSIX compliant shells. -# By Martijn Dekker , 2021. Public domain. - -# Spacing per indentation level. Edit to change style. -indent=' ' # one tab - -# Remove existing indentation, add new indentation. -indentlvl=0 -sed 's/^[[:space:]]*//' \ -| while read -r line -do case $line in - '') continue ;; - done*) let "indentlvl -= 1" ;; - esac - - spc= - i=0 - while let "(i += 1) <= indentlvl" - do spc=$indent$spc - done - printf '%s\n' $spc$line - - case $line in - make*) let "indentlvl += 1" ;; - esac -done diff --git a/cde/programs/dtksh/ksh93/bin/Mamfile_rm_unused_vars b/cde/programs/dtksh/ksh93/bin/Mamfile_rm_unused_vars deleted file mode 100755 index 07b78e54e..000000000 --- a/cde/programs/dtksh/ksh93/bin/Mamfile_rm_unused_vars +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env sh -IFS=''; set -fCu # safe mode: no split/glob = no quoting headaches -CCn=' -' # newline -let() { return $((!($1))); } - -# Remove unused variable definitions from a Mamfile. -# Usage: Mamfile_rm_unused_vars Mamfile.new -# -# Should work on all current POSIX compliant shells. -# By Martijn Dekker , 2021. Public domain. -# -# All variables are declared with 'setv' and they are used if an expansion -# of the form ${varname} exists (the braces are mandatory in Mamfiles). - -mamfile=$(let $# && cat "$1" || cat) -vars=$(printf '%s\n' $mamfile | awk '$1 == "setv" { print $2; }') -rm_unused_ere= -IFS=$CCn; for varname in $vars; do IFS= - case $mamfile in - *"\${$varname}"* ) - ;; - * ) # add with '|' separator for Extended Regular Expression - rm_unused_ere="${rm_unused_ere:+$rm_unused_ere|}setv[[:blank:]]+$varname([[:blank:]]|$)" ;; - esac -done -case $rm_unused_ere in -'') printf '%s\n' $mamfile ;; -*) printf '%s\n' $mamfile | grep -vE $rm_unused_ere ;; -esac diff --git a/cde/programs/dtksh/ksh93/bin/ignore b/cde/programs/dtksh/ksh93/bin/ignore deleted file mode 100755 index 1c16225de..000000000 --- a/cde/programs/dtksh/ksh93/bin/ignore +++ /dev/null @@ -1,37 +0,0 @@ -######################################################################## -# # -# This software is part of the ast package # -# Copyright (c) 1994-2011 AT&T Intellectual Property # -# Copyright (c) 2020-2021 Contributors to ksh 93u+m # -# and is licensed under the # -# Eclipse Public License, Version 1.0 # -# by AT&T Intellectual Property # -# # -# A copy of the License is available at # -# http://www.eclipse.org/org/documents/epl-v10.html # -# (with md5 checksum b35adb5213ca9657e911e9befb180842) # -# # -# Information and Software Systems Research # -# AT&T Research # -# Florham Park NJ # -# # -# Glenn Fowler # -# # -######################################################################## -# non-ksh script for the nmake ignore prefix -# @(#)ignore (ksh 93u+m) 2021-12-31 - -while : -do case $# in - 0) exit 0 ;; - esac - case $1 in - *=*) export "$1" - shift - ;; - *) break - ;; - esac -done -"$@" -exit 0 diff --git a/cde/programs/dtksh/ksh93/bin/mamprobe b/cde/programs/dtksh/ksh93/bin/mamprobe deleted file mode 100755 index 294a9aaf6..000000000 --- a/cde/programs/dtksh/ksh93/bin/mamprobe +++ /dev/null @@ -1,274 +0,0 @@ -######################################################################## -# # -# This software is part of the ast package # -# Copyright (c) 1994-2011 AT&T Intellectual Property # -# Copyright (c) 2020-2021 Contributors to ksh 93u+m # -# and is licensed under the # -# Eclipse Public License, Version 1.0 # -# by AT&T Intellectual Property # -# # -# A copy of the License is available at # -# http://www.eclipse.org/org/documents/epl-v10.html # -# (with md5 checksum b35adb5213ca9657e911e9befb180842) # -# # -# Information and Software Systems Research # -# AT&T Research # -# Florham Park NJ # -# # -# Glenn Fowler # -# # -######################################################################## -### this script contains archaic constructs that work with all sh variants ### -# mamprobe - generate MAM cc probe info -# Glenn Fowler - -(command set -o posix) 2>/dev/null && set -o posix - -command=mamprobe - -bins=` - ( - userPATH=$PATH - PATH=/run/current-system/sw/bin:/usr/xpg7/bin:/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin:$PATH - getconf PATH 2>/dev/null && echo "$userPATH" || echo /bin:/usr/bin:/sbin:/usr/sbin:"$userPATH" - ) | sed 's/:/ /g' -` || exit - -# check the options - -opt= - -case `(getopts '[-][123:xyz]' opt --xyz; echo 0$opt) 2>/dev/null` in -0123) USAGE=$' -[-? -@(#)$Id: mamprobe (AT&T Labs Research) 2011-02-11 $ -] -[+NAME?mamprobe - generate MAM cc probe info] -[+DESCRIPTION?\bmamprobe\b generates MAM (make abstract machine) \bcc\b(1) - probe information for use by \bmamake\b(1). \acc-path\a is the - absolute path of the probed compiler and \ainfo-file\a is where - the information is placed. \ainfo-file\a is usually - \b$INSTALLROOT/lib/probe/C/mam/\b\ahash\a, where \ahash\a is a hash - of \acc-path\a. Any \ainfo-file\a directories are created if needed. - If \ainfo-file\a is \b-\b then the probe information is written to - the standard output.] -[+?\bmamprobe\b and \bmamake\b are used in the bootstrap phase of - \bpackage\b(1) installation before \bnmake\b(1) is built. The - probed variable names are the \bnmake\b(1) names with a \bmam_\b - prefix, \bCC\b converted to \bcc\b, and \b.\b converted to \b_\b. - Additional variables are:]{ - [+_hosttype_?the \bpackage\b(1) host type] - [+mam_cc_L?\b-L\b\adir\a supported] - [+STDCAT?command to execute for \bcat\b(1); prefixed by - \bexecrate\b(1) on \b.exe\b challenged systems] - [+STDCHMOD?command to execute for \bchmod\b(1); prefixed by - \bexecrate\b(1) on \b.exe\b challenged systems] - [+STDCMP?command to execute for \bcmp\b(1); prefixed by - \bexecrate\b(1) on \b.exe\b challenged systems] - [+STDCP?command to execute for \bcp\b(1); prefixed by - \bexecrate\b(1) on \b.exe\b challenged systems] - [+STDED?command to execute for \bed\b(1) or \bex\b(1)] - [+STDEDFLAGS?flags for \bSTDED\b] - [+STDLN?command to execute for \bln\b(1); prefixed by - \bexecrate\b(1) on \b.exe\b challenged systems] - [+STDMV?command to execute for \bmv\b(1); prefixed by - \bexecrate\b(1) on \b.exe\b challenged systems] - [+STDRM?command to execute for \brm\b(1); prefixed by - \bexecrate\b(1) on \b.exe\b challenged systems] -} -[d:debug?Enable probe script debug trace.] - -info-file cc-path - -[+SEE ALSO?\bexecrate\b(1), \bpackage\b(1), \bmamake\b(1), \bnmake\b(1), - \bprobe\b(1)] -' - while getopts -a "$command" "$USAGE" OPT - do case $OPT in - d) opt=-d ;; - esac - done - shift `expr $OPTIND - 1` - ;; -*) while : - do case $# in - 0) break ;; - esac - case $1 in - --) shift - break - ;; - -) break - ;; - -d) opt=-d - ;; - -*) echo $command: $1: unknown option >&2 - ;; - *) break - ;; - esac - set '' - break - done - ;; -esac - -# check the args - -case $1 in --) ;; -/*) ;; -*) set '' ;; -esac -case $2 in -/*) ;; -*) set '' ;; -esac -case $# in -0|1) echo "Usage: $command info-file cc-path" >&2; exit 2 ;; -esac -info=$1 -shift -cc=$* - -# find the make probe script - -ifs=${IFS-' - '} -IFS=: -set $PATH -IFS=$ifs -script=lib/probe/C/make/probe -while : -do case $# in - 0) echo "$0: ../$script: probe script not found on PATH" >&2 - exit 1 - ;; - esac - case $1 in - '') continue ;; - esac - makeprobe=`echo $1 | sed 's,[^/]*$,'$script,` - if test -x $makeprobe - then break - fi - shift -done - -# create the info dir if necessary - -case $info in -/*) i=X$info - ifs=${IFS-' - '} - IFS=/ - set $i - IFS=$ifs - while : - do i=$1 - shift - case $i in - X) break ;; - esac - done - case $info in - //*) path=/ ;; - *) path= ;; - esac - while : - do case $# in - 0|1) break ;; - esac - comp=$1 - shift - case $comp in - '') continue ;; - esac - path=$path/$comp - if test ! -d $path - then mkdir $path || exit - fi - done - ;; -esac - -# generate info in a tmp file and rename when finished - -case $info in --) ;; -*) tmp=${TMPDIR:-/tmp}/mam$$ - trap "exec >/dev/null; rm -f $tmp" 0 1 2 3 15 - exec > $tmp - echo "probing C language processor $cc for mam information" >&2 - ;; -esac - -echo "note generated by $0 for $cc" - -( - set '' $opt $cc - shift - . $makeprobe "$@" - - case " $CC_DIALECT " in - *" -L "*) echo "CC.L = 1" ;; - esac - -) | sed \ - -e '/^CC\./!d' \ - -e 's/^CC./setv mam_cc_/' \ - -e 's/^\([^=.]*\)\./\1_/' \ - -e 's/^\([^=.]*\)\./\1_/' \ - -e 's/ =//' \ - -e 's/\$("\([^"]*\)")/\1/g' \ - -e 's/\$(\([^)]*\))/${\1}/g' \ - -e 's/\${CC\./${mam_cc_}/g' - -echo 'setv _hosttype_ ${mam_cc_HOSTTYPE}' - -# STD* are standard commands/flags with possible execrate(1) - -if ( -ed < /dev/null 2>&1 -then STDED=ed -else STDED=ex -fi -STDEDFLAGS=- -set STDCAT cat STDCHMOD chmod STDCMP cmp STDCP cp STDLN ln STDMV mv STDRM rm -while : -do case $# in - 0|1) break ;; - esac - p=$2 - for d in $bins - do if test -x $d/$p - then p=$d/$p - break - fi - done - eval $1=\$p - shift - shift -done -if execrate -then for n in STDCAT STDCHMOD STDCMP STDCP STDLN STDMV STDRM - do eval $n=\"execrate \$$n\" - done -fi -for n in STDCAT STDCHMOD STDCMP STDCP STDED STDEDFLAGS STDLN STDMV STDRM -do eval echo setv \$n \$$n -done - -# all done - -case $info in --) ;; -*) exec >/dev/null - test -f "$info" && rm -f "$info" - cp "$tmp" "$info" - chmod -w "$info" - ;; -esac diff --git a/cde/programs/dtksh/ksh93/bin/package b/cde/programs/dtksh/ksh93/bin/package deleted file mode 100755 index 1559ef771..000000000 --- a/cde/programs/dtksh/ksh93/bin/package +++ /dev/null @@ -1,3562 +0,0 @@ -######################################################################## -# # -# This software is part of the ast package # -# Copyright (c) 1994-2012 AT&T Intellectual Property # -# Copyright (c) 2020-2021 Contributors to ksh 93u+m # -# and is licensed under the # -# Eclipse Public License, Version 1.0 # -# by AT&T Intellectual Property # -# # -# A copy of the License is available at # -# http://www.eclipse.org/org/documents/epl-v10.html # -# (with md5 checksum b35adb5213ca9657e911e9befb180842) # -# # -# Information and Software Systems Research # -# AT&T Research # -# Florham Park NJ # -# # -# Glenn Fowler # -# # -######################################################################## -### this sh script is POSIX compliant and compatible with shell bugs ### -# KornShell 93u+m build system, main control script # -# based on AST 'package' by Glenn Fowler # -# simplified and rewritten by Martijn Dekker # -######################################################################## - -# Escape from a non-POSIX shell -# ('test X -ef Y' is technically non-POSIX, but practically universal) -min_posix='test / -ef / && path=Bad && case $PATH in (Bad) exit 1;; esac && '\ -'PWD=Bad && cd -P -- / && case $PWD in (/) ;; (*) exit 1;; esac && '\ -'! { ! case x in ( x ) : ${0##*/} || : $( : ) ;; esac; } && '\ -'trap "exit 0" 0 && exit 1' -if (eval "$min_posix") 2>/dev/null -then : good shell -else "$SHELL" -c "$min_posix" 2>/dev/null && exec "$SHELL" -- "$0" ${1+"$@"} - sh -c "$min_posix" 2>/dev/null && exec sh -- "$0" ${1+"$@"} - DEFPATH=`getconf PATH` 2>/dev/null || DEFPATH=/usr/xpg4/bin:/bin:/usr/bin:/sbin:/usr/sbin - PATH=$DEFPATH:$PATH - export PATH - sh -c "$min_posix" 2>/dev/null && exec sh -- "$0" ${1+"$@"} - echo "$0: Can't escape from obsolete or broken shell. Run me with a POSIX shell." >&2 - exit 128 -fi -readonly min_posix # use for checksh() - -# Set standards compliance mode -(command set -o posix) 2>/dev/null && set -o posix - -# Sanitize 'cd' -unset CDPATH - -# Make the package root the current working directory -# This makes it possible to run '/my/path/package make' without cd'ing first -# (for all its featuritis, the AT&T version never could manage this) -case $0 in -[0123456789+-]*) - echo "dodgy \$0: $0" >&2 - exit 128 ;; -*/*) - me=$0 ;; -*) - me=$(command -v "$0") || exit 128 ;; -esac -me=$(dirname "$me") -cd "$me" || exit -unset -v me -case $PWD in -*/arch/*/*/bin) - cd .. ;; -*/arch/*/bin) - cd ../../.. ;; -*/bin) - cd .. ;; -*) - echo "this script must live in bin/" >&2 - exit 1 ;; -esac || exit - -# shell checks -checksh() -{ - "$1" -c "$min_posix" 2>/dev/null || return 1 -} - -LC_ALL=C -export LC_ALL - -TMPDIR=${TMPDIR:-/tmp} -export TMPDIR - -src="cmd contrib etc lib" -use="/usr/common /exp /usr/local /usr/add-on /usr/addon /usr/tools /usr /opt" -usr="/home" -lib="" # need /usr/local/lib /usr/local/shlib -ccs="/usr/kvm /usr/ccs/bin" -org="gnu GNU" -makefiles="Mamfile" # ksh 93u+m no longer uses these: Nmakefile nmakefile Makefile makefile -env="HOSTTYPE PACKAGEROOT INSTALLROOT PATH" - -package_use='=$HOSTTYPE=$PACKAGEROOT=$INSTALLROOT=$EXECROOT=$CC=' - -CROSS=0 - -MAKESKIP=${MAKESKIP:-"*[-.]*"} - -all_types='*.*|sun4' # all but sun4 match *.* - -command=${0##*/} -case $(getopts '[-][123:xyz]' opt --xyz 2>/dev/null; echo 0$opt) in -0123) USAGE=$' -[-? -@(#)$Id: '$command$' (ksh 93u+m) 2021-12-31 $ -] -[-author?Glenn Fowler ] -[-author?Contributors to https://github.com/ksh93/ksh] -[-copyright?(c) 1994-2012 AT&T Intellectual Property] -[-copyright?(c) 2020-2021 Contributors to https://github.com/ksh93/ksh] -[-license?http://www.eclipse.org/org/documents/epl-v10.html] -[+NAME?'$command$' - build, test and install ksh 93u+m] -[+DESCRIPTION?The \b'$command$'\b command is the main control script - for building and installing KornShell 93u+m. - It is a POSIX \bsh\b(1) script coded for maximal portability. - A POSIX shell and C compiler installation are the only requirements. - All package files are in the \b$PACKAGEROOT\b directory tree. - Binary package files are in the \b$INSTALLROOT\b - (\b$PACKAGEROOT/arch/\b\ahosttype\a) tree, where - \ahosttype\a=$(\bbin/package host type\b). - See \bDETAILS\b for more information.] -[+?Note that no environment variables need be set by the user; - \b'$command$'\b determines the environment based on the current working - directory. The \buse\b action starts a \bsh\b(1) with the environment - initialized. \bCC\b, \bCCFLAGS\b, \bHOSTTYPE\b and \bSHELL\b may be set - by explicit command argument assignments to override the defaults.] -[+?The command arguments are composed of a sequence of words: zero or - more \aqualifiers\a, one \aaction\a, and zero or more action-specific - \aarguments\a, and zero or more \aname=value\a definitions. - \boptget\b(3) documentation options such as \b--man\b, \b--html\b - and \b--nroff\b are also supported. - The default with no arguments is \bhost type\b.] -[+?The qualifiers are:] - { - [+debug|environment?Show environment and actions but do not - execute.] - [+flat?With the \bmake\b action, create a flat view by linking all - files from \b$INSTALLROOT\b, minus \b*.old\b files, - onto their corresponding path under \b$PACKAGEROOT\b. - Only one architecture can have a flat view. - If \bflat\b is specified with the \bclean\b action, then - only clean up this flat view and do not delete \b$INSTALLROOT\b.] - [+force?Force the action to override saved state.] - [+never?Run make -N and show other actions.] - [+only?Only operate on the specified packages.] - [+quiet?Do not list captured action output.] - [+show?Run make -n and show other actions.] - [+verbose?Provide detailed action output.] - [+DEBUG?Trace the package script actions in detail.] - } -[+?The actions are:] - { - [+clean | clobber?Clean up the flat view, if any. - Then, unless \bflat\b was given, - delete the \barch/\b\aHOSTTYPE\a hierarchy; this - deletes all generated files and directories for \aHOSTTYPE\a. - The hierarchy can be rebuilt by \b'$command$' make\b.] - [+export\b [ \avariable\a ...]]?List \aname\a=\avalue\a for - \avariable\a, one per line. If the \bonly\b attribute is - specified then only the variable values are listed. If no - variables are specified then \b'$env$'\b are assumed.] - [+help\b [ \aaction\a ]]?Display help text on the standard - error (standard output for \aaction\a).] - [+host\b [ \aattribute\a ... ]]?List - architecture/implementation dependent host information on the - standard output. \btype\b is listed if no attributes are - specified. Information is listed on a single line in - \aattribute\a order. The attributes are:] - { - [+canon \aname\a?An external host type name to be - converted to \b'$command$'\b syntax.] - [+cpu?The number of CPUs; 1 if the host is not a - multiprocessor.] - [+name?The host name.] - [+rating?The CPU rating in pseudo mips; the value is - useful useful only in comparisons with rating values of - other hosts. Other than a vax rating (mercifully) fixed - at 1, ratings can vary wildly but consistently from - vendor mips ratings. \bcc\b(1) may be required to - determine the rating.] - [+type?The host type, usually in the form - \avendor\a.\aarchitecture\a, with an optional trailing - -\aversion\a. The main theme is that type names within - a family of architectures are named in a similar, - predictable style. OS point release information is - avoided as much as possible, but vendor resistance to - release incompatibilities has for the most part been - futile.] - } - [+install\b To be reimplemented.] - [+make\b [ \apackage\a ]] [ \aoption\a ... ]] [ \atarget\a ... ]]?Build - and install. The default \atarget\a is \binstall\b, which makes - and installs \apackage\a. If the standard output is a terminal - then the output is also captured in - \b$INSTALLROOT/lib/package/gen/make.out\b. The build is done in - the \b$INSTALLROOT\b directory tree viewpathed on top of the - \b$PACKAGEROOT\b directory tree. Leaf directory names matching the - \b|\b-separated shell pattern \b$MAKESKIP\b are ignored. The - \bview\b action is done before making. \aoption\a operands are - passed to the underlying make command.] - [+results\b [ \bfailed\b ]] [ \bpath\b ]] [ \bold\b ]] [\bmake\b | \btest\b | \bwrite\b ]]?List - results and interesting messages captured by the most recent - \bmake\b (default), \btest\b or \bwrite\b action. \bold\b - specifies the previous results, if any (current and previous - results are retained). \b$HOME/.pkgresults\b, if it exists, - must contain an \begrep\b(1) expression of result lines to be - ignored. \bfailed\b lists failures only and \bpath\b lists the - results file path name only.] - [+test\b [ \aargument\a ... ]]?Run the regression tests for - \bksh\b. If the standard output is a terminal then the - output is also captured in \b$INSTALLROOT/lib/package/gen/test.out\b. - \bksh\b must be made before it can be tested. - All \aargument\as following \atest\a are passed to \bbin/shtests\b. - See \bbin/shtests --man\b for more information.] - [+use\b [ \auid\a | \apackage\a | . [ 32 | 64 ]] | 32 | 64 | - ]] [ command ...]]?Run - \acommand\a, or an interactive shell if \acommand\a is omitted, - with the environment initialized for using the package (can you - say \ashared\a \alibrary\a or \adll\a without cussing?) If - \auid\a or \apackage\a or \a.\a is specified then it is used - to determine a \b$PACKAGEROOT\b, possibly different from - the current directory. For example, to try out bozo'\'$'s package: - \bpackage use bozo\b. The \buse\b action may be run from any - directory. If the file \b$INSTALLROOT/lib/package/profile\b is - readable then it is sourced to initialize the environment. 32 or 64 - implies \b$PACKAGEROOT\b of . and specifies the target architecture - word size (which may be silently ignored).] - [+view\b?Initialize the architecture specific viewpath - hierarchy. The \bmake\b action implicitly calls this action.] - } -[+DETAILS?The package directory hierarchy is rooted at - \b$PACKAGEROOT\b. All source and binaries reside under this tree. A two - level viewpath is used to separate source and binaries. The top view is - architecture specific, the bottom view is shared source. All building - is done in the architecture specific view; no source view files are - intentionally changed. This means that many different binary - architectures can be made from a single copy of the source.] -[+?Independent \b$PACKAGEROOT\b hierarchies can be combined by - appending \b$INSTALLROOT:$PACKAGEROOT\b pairs to \bVPATH\b. The - \bVPATH\b viewing order is from left to right.] -[+?\b$HOSTYPE\b names the current binary architecture and is determined - by the output of \b'$command$'\b (no arguments). The \b$HOSTTYPE\b naming - scheme is used to separate incompatible executable and object formats. - All architecture specific binaries are placed under \b$INSTALLROOT\b - (\b$PACKAGEROOT/arch/$HOSTTYPE\b). There are a few places that match - against \b$HOSTTYPE\b when making binaries; these are limited to - makefile compiler workarounds, e.g., if \b$HOSTTYPE\b matches \bhp.*\b - then turn off the optimizer for these objects. All other architecture - dependent logic is handled either by the \bAST\b \biffe\b(1) command or - by component specific configure scripts. Explicit \b$HOSTYPE\b - values matching *,*cc*[,-*,...]] optionally set the default \bCC\b and - \bCCFLAGS\b. This is handy for build farms that support different - compilers on the same architecture.] -[+?Each component contains a \bMAM\b (make abstract machine) - file (\bMamfile\b). A Mamfile contains a portable makefile description - written in a simple dependency tree language using indented - \bmake\b...\bdone\b blocks.] -[+?All scripts and commands under \b$PACKAGEROOT\b use \b$PATH\b - relative pathnames (via the \bAST\b \bpathpath\b(3) function); there - are no embedded absolute pathnames. This means that binaries generated - under \b$PACKAGEROOT\b may be copied to a different root; users need - only change their \b$PATH\b variable to reference the new installation - root \bbin\b directory. \b'$command$' install\b installs binary packages in - a new \b$INSTALLROOT\b.] - -[ qualifier ... ] [ action ] [ arg ... ] [ n=v ... ] - -[+SEE ALSO?\bautoconfig\b(1), \bcksum\b(1), \bexecrate\b(1), \bexpmake\b(1), - \bgzip\b(1), \bmake\b(1), \bmamake\b(1), \bpax\b(1), - \bpkgadd\b(1), \bpkgmk\b(1), \brpm\b(1), - \bsh\b(1), \btar\b(1), \boptget\b(3)] -' - case $* in - help) set -- --man ;; - esac - while getopts -a "$command" "$USAGE" OPT - do : - done - shift $((OPTIND-1)) - ;; -esac - -# check the args - -case $AR in -'') AR=ar ;; -esac -case $CC in -'') CC=cc ;; -esac -case $LD in -'') LD=ld ;; -esac -case $NM in -'') NM=nm ;; -esac - -action= -bit= -exec= -flat=0 -force=0 -global= -hi= -ifs=${IFS-' - '} -lo= -make= -makeflags='-K' -nl=" -" -noexec= -only=0 -output= -quiet=0 -show=: -tab=" " -verbose=0 -AUTHORIZE= -DEBUG= -SHELLMAGIC=- - -unset FIGNORE BINDIR DLLDIR ETCDIR FUNDIR INCLUDEDIR LIBDIR LOCALEDIR MANDIR SHAREDIR 2>/dev/null || true - -while : -do case $# in - 0) set host type ;; - esac - case $1 in - clean|clobber|export|host|install|make|remove|results|test|use|view) - action=$1 - shift - break - ;; - debug|environment) - exec=echo make=echo show=echo - ;; - flat) flat=1 - ;; - force) force=1 - ;; - never) exec=echo noexec=-N - ;; - only) only=1 - ;; - quiet) quiet=1 - ;; - show) exec=echo noexec=-n - ;; - verbose)verbose=1 - ;; - DEBUG) DEBUG=1 - PS4='+$LINENO:$SECONDS+ ' - set -x - ;; - help|HELP|html|man|--[?m]*) - case $1 in - help) code=0 - case $2 in - '') exec 1>&2 ;; - esac - ;; - html) code=0 html=1 - echo "$command help

$command help

"
-			;;
-		*)	code=2
-			exec 1>&2
-			;;
-		esac
-		# Plain-text fallback. Regenerate with:
-		# ksh -c 'COLUMNS=80 bin/package --man' 2>&1 | sed "s/'/'\\\\''/g; 1s/^/echo '/; \$s/\$/'/"
-		echo 'NAME
-  package - build, test and install ksh 93u+m
-
-SYNOPSIS
-  package [ options ] [ qualifier ... ] [ action ] [ arg ... ] [ n=v ... ]
-
-DESCRIPTION
-  The package command is the main control script for building and installing
-  KornShell 93u+m. It is a POSIX sh(1) script coded for maximal portability. A
-  POSIX shell and C compiler installation are the only requirements. All
-  package files are in the $PACKAGEROOT directory tree. Binary package files
-  are in the $INSTALLROOT ($PACKAGEROOT/arch/hosttype) tree, where
-  hosttype=$(bin/package host type). See DETAILS for more information.
-
-  Note that no environment variables need be set by the user; package
-  determines the environment based on the current working directory. The use
-  action starts a sh(1) with the environment initialized. CC, CCFLAGS, HOSTTYPE
-  and SHELL may be set by explicit command argument assignments to override the
-  defaults.
-
-  The command arguments are composed of a sequence of words: zero or more
-  qualifiers, one action, and zero or more action-specific arguments, and zero
-  or more name=value definitions. optget(3) documentation options such as
-  --man, --html and --nroff are also supported. The default with no arguments
-  is host type.
-
-  The qualifiers are:
-    debug|environment
-          Show environment and actions but do not execute.
-    flat  With the make action, create a flat view by linking all files from
-          $INSTALLROOT, minus *.old files, onto their corresponding path under
-          $PACKAGEROOT. Only one architecture can have a flat view. If flat is
-          specified with the clean action, then only clean up this flat view
-          and do not delete $INSTALLROOT.
-    force Force the action to override saved state.
-    never Run make -N and show other actions.
-    only  Only operate on the specified packages.
-    quiet Do not list captured action output.
-    show  Run make -n and show other actions.
-    verbose
-          Provide detailed action output.
-    DEBUG Trace the package script actions in detail.
-
-  The actions are:
-    clean | clobber
-          Clean up the flat view, if any. Then, unless flat was given, delete
-          the arch/HOSTTYPE hierarchy; this deletes all generated files and
-          directories for HOSTTYPE. The hierarchy can be rebuilt by package
-          make.
-    export [ variable ...]
-          List name=value for variable, one per line. If the only attribute is
-          specified then only the variable values are listed. If no variables
-          are specified then HOSTTYPE PACKAGEROOT INSTALLROOT PATH are assumed.
-    help [ action ]
-          Display help text on the standard error (standard output for action).
-    host [ attribute ... ]
-          List architecture/implementation dependent host information on the
-          standard output. type is listed if no attributes are specified.
-          Information is listed on a single line in attribute order. The
-          attributes are:
-            canon name
-                  An external host type name to be converted to package syntax.
-            cpu   The number of CPUs; 1 if the host is not a multiprocessor.
-            name  The host name.
-            rating
-                  The CPU rating in pseudo mips; the value is useful useful
-                  only in comparisons with rating values of other hosts. Other
-                  than a vax rating (mercifully) fixed at 1, ratings can vary
-                  wildly but consistently from vendor mips ratings. cc(1) may
-                  be required to determine the rating.
-            type  The host type, usually in the form vendor.architecture, with
-                  an optional trailing -version. The main theme is that type
-                  names within a family of architectures are named in a
-                  similar, predictable style. OS point release information is
-                  avoided as much as possible, but vendor resistance to release
-                  incompatibilities has for the most part been futile.
-    install To be reimplemented.
-    make [ package ] [ option ... ] [ target ... ]
-          Build and install. The default target is install, which makes and
-          installs package. If the standard output is a terminal then the
-          output is also captured in $INSTALLROOT/lib/package/gen/make.out. The
-          build is done in the $INSTALLROOT directory tree viewpathed on top of
-          the $PACKAGEROOT directory tree. Leaf directory names matching the
-          |-separated shell pattern $MAKESKIP are ignored. The view action is
-          done before making. option operands are passed to the underlying make
-          command.
-    results [ failed ] [ path ] [ old ] [make | test | write ]
-          List results and interesting messages captured by the most recent
-          make (default), test or write action. old specifies the previous
-          results, if any (current and previous results are retained).
-          $HOME/.pkgresults, if it exists, must contain an egrep(1) expression
-          of result lines to be ignored. failed lists failures only and path
-          lists the results file path name only.
-    test [ argument ... ]
-          Run the regression tests for ksh. If the standard output is a
-          terminal then the output is also captured in
-          $INSTALLROOT/lib/package/gen/test.out. ksh must be made before it can
-          be tested. All arguments following test are passed to bin/shtests.
-          See bin/shtests --man for more information.
-    use [ uid | package | . [ 32 | 64 ] | 32 | 64 | - ] [ command ...]
-          Run command, or an interactive shell if command is omitted, with the
-          environment initialized for using the package (can you say shared
-          library or dll without cussing?) If uid or package or . is specified
-          then it is used to determine a $PACKAGEROOT, possibly different from
-          the current directory. For example, to try out bozo'\''s package:
-          package use bozo. The use action may be run from any directory. If
-          the file $INSTALLROOT/lib/package/profile is readable then it is
-          sourced to initialize the environment. 32 or 64 implies $PACKAGEROOT
-          of . and specifies the target architecture word size (which may be
-          silently ignored).
-    view  Initialize the architecture specific viewpath hierarchy. The make
-          action implicitly calls this action.
-
-DETAILS
-  The package directory hierarchy is rooted at $PACKAGEROOT. All source and
-  binaries reside under this tree. A two level viewpath is used to separate
-  source and binaries. The top view is architecture specific, the bottom view
-  is shared source. All building is done in the architecture specific view; no
-  source view files are intentionally changed. This means that many different
-  binary architectures can be made from a single copy of the source.
-
-  Independent $PACKAGEROOT hierarchies can be combined by appending
-  $INSTALLROOT:$PACKAGEROOT pairs to VPATH. The VPATH viewing order is from
-  left to right.
-
-  $HOSTYPE names the current binary architecture and is determined by the
-  output of package (no arguments). The $HOSTTYPE naming scheme is used to
-  separate incompatible executable and object formats. All architecture
-  specific binaries are placed under $INSTALLROOT
-  ($PACKAGEROOT/arch/$HOSTTYPE). There are a few places that match against
-  $HOSTTYPE when making binaries; these are limited to makefile compiler
-  workarounds, e.g., if $HOSTTYPE matches hp.* then turn off the optimizer for
-  these objects. All other architecture dependent logic is handled either by
-  the AST iffe(1) command or by component specific configure scripts. Explicit
-  $HOSTYPE values matching *,*cc*[,-*,...] optionally set the default CC and
-  CCFLAGS. This is handy for build farms that support different compilers on
-  the same architecture.
-
-  Each component contains a MAM (make abstract machine) file (Mamfile). A
-  Mamfile contains a portable makefile description written in a simple
-  dependency tree language using indented make...done blocks.
-
-  All scripts and commands under $PACKAGEROOT use $PATH relative pathnames (via
-  the AST pathpath(3) function); there are no embedded absolute pathnames. This
-  means that binaries generated under $PACKAGEROOT may be copied to a different
-  root; users need only change their $PATH variable to reference the new
-  installation root bin directory. package install installs binary packages in
-  a new $INSTALLROOT.
-
-SEE ALSO
-  autoconfig(1), cksum(1), execrate(1), expmake(1), gzip(1), make(1),
-  mamake(1), pax(1), pkgadd(1), pkgmk(1), rpm(1), sh(1), tar(1), optget(3)
-
-IMPLEMENTATION
-  version         package (ksh 93u+m) 2021-12-31
-  author          Glenn Fowler 
-  author          Contributors to https://github.com/ksh93/ksh
-  copyright       (c) 1994-2012 AT&T Intellectual Property
-  copyright       (c) 2020-2021 Contributors to https://github.com/ksh93/ksh
-  license         http://www.eclipse.org/org/documents/epl-v10.html'
-		case $1 in
-		html)	echo "
" ;; - esac - exit $code - ;; - *=*) set DEFAULT host type "$@" - ;; - *) # simulate AST getopt(3) usage output - echo "Usage: $command [ options ] [ qualifier ... ] [ action ] [ arg ... ] [ n=v ... ]" >&2 - echo " Help: $command [ --help | --man ] 2>&1" >&2 - exit 2 - ;; - esac - global="$global $1" - shift -done - -# gather HOSTTYPE *,* options -# ,*cc*,-*,... set CC and CCFLAGS - -hostopts() -{ - _ifs_=$IFS - IFS=, - set '' $HOSTTYPE - IFS=$_ifs_ - shift - while : - do case $# in - 0|1) break ;; - esac - shift - case $1 in - *cc*) CC=$1 - while : - do case $# in - 0|1) break ;; - esac - case $2 in - -*) case $assign_CCFLAGS in - ?*) assign_CCFLAGS="$assign_CCFLAGS " ;; - esac - assign_CCFLAGS="$assign_CCFLAGS$2" - shift - ;; - *) break - ;; - esac - done - ;; - esac - done -} - -# collect command line targets and definitions - -case $_PACKAGE_HOSTTYPE_ in -?*) HOSTTYPE=$_PACKAGE_HOSTTYPE_ - KEEP_HOSTTYPE=1 - ;; -*) KEEP_HOSTTYPE=0 - ;; -esac -KEEP_PACKAGEROOT=0 -KEEP_SHELL=0 -USER_VPATH= -args= -assign= -assign_CCFLAGS= -for i -do case $i in - *:*=*) args="$args $i" - continue - ;; - *=*) n=${i%%=*} v=${i#*=} - ;; - esac - case $i in - AR=*|LD=*|NM=*) - assign="$assign $n='$v'" - eval $n='$'v - ;; - CC=*) eval $n='$'v - ;; - CCFLAGS=*) - eval $n='$'v - assign_CCFLAGS="CCFLAGS=\"\$CCFLAGS\"" - ;; - HOSTTYPE=*) - eval $n='$'v - case $HOSTTYPE in - ?*) KEEP_HOSTTYPE=1 ;; - esac - ;; - PACKAGEROOT=*) - eval $n='$'v - case $PACKAGEROOT in - ?*) KEEP_PACKAGEROOT=1 ;; - esac - ;; - SHELL=*)eval $n='$'v - case $SHELL in - ?*) KEEP_SHELL=1 ;; - esac - ;; - VPATH=*)eval USER_$n='$'v - ;; - 'debug=1') - makeflags="$makeflags --debug-symbols" - ;; - 'strip=1') - makeflags="$makeflags --strip-symbols" - ;; - *=*) assign="$assign $n='$v'" - ;; - *) args="$args $i" - ;; - esac -done -case $HOSTTYPE in -*,*) hostopts $HOSTTYPE ;; -esac -case $assign_CCFLAGS in -?*) assign="$assign $assign_CCFLAGS" -esac -case $CC in -''|cc) ;; -*) export CC ;; -esac - -# Add build type flags via KSH_RELFLAGS, which is used in src/cmd/ksh93/Mamfile. -# (Avoid using CCFLAGS; setting it would overwrite autodetected optimization flags.) -ksh_relflags= -case $(git branch 2>/dev/null) in -'' | *\*\ [0-9]*.[0-9]*) - # If we're not on a git branch (tarball) or on a branch that starts - # with a number (release branch), then compile as a release version - ksh_relflags="${ksh_relflags:+$ksh_relflags }-D_AST_ksh_release" ;; -*) # Otherwise, add 8-character git commit hash if available, and if the working dir is clean - git_commit=$(git status >/dev/null 2>&1 && git diff-index --quiet HEAD && git rev-parse --short=8 HEAD) - case $git_commit in - ????????) - ksh_relflags="${ksh_relflags:+$ksh_relflags }-D_AST_git_commit=\\\"$git_commit\\\"" ;; - esac - unset git_commit ;; -esac -case $ksh_relflags in -?*) # add the extra flags as an argument to mamake - assign="${assign:+$assign }KSH_RELFLAGS=\"\$ksh_relflags\"" ;; -esac - -# Add ksh compile-options via KSH_SHOPTFLAGS. -SHOPT() -{ - case $1 in - *=?*) ksh_shoptflags="${ksh_shoptflags:+$ksh_shoptflags }-DSHOPT_$1" ;; - esac -} -ksh_shoptflags= -shopt_sh='src/cmd/ksh93/SHOPT.sh' # this script calls SHOPT() to set options -if test -f "$shopt_sh" -then . "$shopt_sh" -else echo "WARNING: $shopt_sh is missing" >&2 -fi -case $ksh_shoptflags in -?*) # add the extra flags as an argument to mamake - assign="${assign:+$assign }KSH_SHOPTFLAGS=\"\$ksh_shoptflags\"" ;; -esac - -# grab action specific args - -case $action in -use) case $1 in - .|32|64)case $1 in - 32|64) bit=$1 ;; - esac - shift - - # HOSTTYPE specific setup - - case $HOSTTYPE in - win32.*)sys=uwin - wow=$(uname -i) - case $bit in - 32) case $HOSTTYPE in - *-64) HOSTTYPE=${HOSTTYPE%-64} ;; - esac - ;; - 64) case $HOSTTYPE in - *-64) ;; - *) HOSTTYPE=$HOSTTYPE-64 ;; - esac - case $wow in - */32) err_out "cannot build $bit-bit on $wow $sys" ;; - esac - ;; - esac - case $bit in - '') PS1="($sys) " ;; - *) PS1="($sys-$bit) " ;; - esac - - $exec umask 002 - $exec unset MAKESKIP - - P=$PWD - A=$P/arch/$HOSTTYPE - - $exec export CDPATH=:..:$A/src/cmd:$A/src/lib:$A/src/uwin:$P/lib/package - $exec export INSTALLROOT=$A - $exec export PACKAGEROOT=$P - $exec export PATH=$A/bin:$P/bin:$PATH - $exec export PS1="$PS1" - $exec export VPATH=$A:$P - $exec export nativepp=/usr/lib - - if test '' != "$INSTALLROOT" -a -d $INSTALLROOT/include/ast - then $exec export PACKAGE_ast=$INSTALLROOT - elif test -d ${PWD%/*}/ast/arch/$HOSTTYPE - then $exec export PACKAGE_ast=${PWD%/*}/ast/arch/$HOSTTYPE - fi - - # run the command - - case $# in - 0) case $show in - ':') $exec exec $SHELL ;; - esac - ;; - *) $exec exec $SHELL -c "$@" - ;; - esac - exit - ;; - esac - PACKAGEROOT=$PWD - $show export PACKAGEROOT - esac - ;; -esac - -# true if arg is a valid PACKAGEROOT - -packageroot() # dir -{ - test -d $1/lib/$command -o -x $1/bin/$command -} - -# true if arg is executable - -executable() # [!] command -{ - case $1 in - '!') test ! -x "$2" -a ! -x "$2.exe"; return ;; - *) test -x "$1" -o -x "$1.exe"; return ;; - esac -} - -# initialize SHELLMAGIC -# tangible proof of Cygwin's disdain for Unix (well, this and execrate) - -shellmagic() -{ - case $SHELLMAGIC in - '') ;; - -) if test -f /emx/bin/sh.exe - then SHELLMAGIC='#!/emx/bin/sh.exe'$nl - elif test -f /bin/env.exe - then SHELLMAGIC='#!/bin/env sh'$nl - else SHELLMAGIC= - fi - ;; - esac -} - -# true if arg is executable command on $PATH - -onpath() # command -{ - _onpath_b=$1 - case $_onpath_b in - /*) if executable $_onpath_b - then _onpath_=$_onpath_b - return 0 - fi - return 1 - ;; - esac - IFS=':' - set '' $PATH - IFS=$ifs - shift - for _onpath_d - do case $_onpath_d in - '') _onpath_d=. ;; - esac - if executable "$_onpath_d/$_onpath_b" - then _onpath_=$_onpath_d/$_onpath_b - return 0 - fi - done - return 1 -} - -# determine local host attributes - -hostinfo() # attribute ... -{ - case $DEBUG in - 1) set -x ;; - esac - map= - something= - path=$PATH - for i in $ccs - do PATH=$PATH:$i - done - for i in $use - do for j in $org - do PATH=$PATH:$i/$j/bin - done - PATH=$PATH:$i/bin - done - case $PACKAGE_PATH in - ?*) for i in $(echo "$PACKAGE_PATH" | sed 's,:, ,g') - do PATH=$PATH:$i/bin - done - ;; - esac - - # validate the args - - canon= - cc=$CC - for info - do case $canon in - -) canon=$info - ;; - *) case $info in - */*|*[cC][cC]) - cc=$info - ;; - canon) canon=- - something=1 - ;; - cpu|name|rating|type) - something=1 - ;; - *) err_out "$action: $info: unknown attribute" - ;; - esac - ;; - esac - done - case $canon in - -) err_out "$action: canon: host type name expected" - ;; - esac - case $something in - "") set "$@" type ;; - esac - case $DEBUG in - '') exec 9>&2 - exec 2>/dev/null - ;; - esac - - # compute the info - - _hostinfo_= - for info - do - case $info in - cpu) cpu=$(sysctl -n hw.ncpu) - case $cpu in - [123456789]*) - _hostinfo_="$_hostinfo_ $cpu" - continue - ;; - esac - cpu=$(grep -ic '^processor[ ][ ]*:[ ]*[0123456789]' /proc/cpuinfo) - case $cpu in - [123456789]*) - _hostinfo_="$_hostinfo_ $cpu" - continue - ;; - esac - cpu=1 - # exact match - set \ - hinv '^Processor [0123456789]' \ - psrinfo 'on-line' \ - 'cat /reg/LOCAL_MACHINE/Hardware/Description/System/CentralProcessor' '.' \ - 'cat /proc/registry/HKEY_LOCAL_MACHINE/Hardware/Description/System/CentralProcessor' '.' \ - - while : - do case $# in - 0) break ;; - esac - i=$($1 2>/dev/null | grep -c "$2") - case $i in - [123456789]*) - cpu=$i - break - ;; - esac - shift;shift - done - case $cpu in - 0|1) set \ - /bin/mpstat - - while : - do case $# in - 0) break ;; - esac - if executable $1 - then case $($1 | grep -ic '^cpu ') in - 1) cpu=$($1 | grep -ic '^ *[0123456789][0123456789]* ') - break - ;; - esac - fi - shift - done - ;; - esac - case $cpu in - 0|1) # token match - set \ - /usr/kvm/mpstat 'cpu[0123456789]' \ - /usr/etc/cpustatus 'enable' \ - /usr/alliant/showsched 'CE' \ - 'ls /config/hw/system/cpu' 'cpu' \ - prtconf 'cpu-unit' \ - - while : - do case $# in - 0) break ;; - esac - i=$($1 2>/dev/null | tr ' ' ' - -' | grep -c "^$2") - case $i in - [123456789]*) - cpu=$i - break - ;; - esac - shift;shift - done - ;; - esac - case $cpu in - 0|1) # special match - set \ - \ - hinv \ - '/^[0123456789][0123456789]* .* Processors*$/' \ - '/[ ].*//' \ - \ - /usr/bin/hostinfo \ - '/^[0123456789][0123456789]* .* physically available\.*$/' \ - '/[ ].*//' \ - - while : - do case $# in - 0) break ;; - esac - i=$($1 2>/dev/null | sed -e "${2}!d" -e "s${3}") - case $i in - [123456789]*) - cpu=$i - break - ;; - esac - shift;shift;shift - done - ;; - esac - case $cpu in - 0|1) cpu=$( - cd "$TMPDIR" - tmp=hi$$ - trap 'rm -f $tmp.*' 0 1 2 - cat > $tmp.c < -#include -int main() -{ - printf("%d\n", pthread_num_processors_np()); - return 0; -} -! - for o in -lpthread '' - do if $CC $o -O -o $tmp.exe $tmp.c $o >/dev/null 2>&1 || - gcc $o -O -o $tmp.exe $tmp.c $o >/dev/null 2>&1 - then ./$tmp.exe - break - fi - done - ) - case $cpu in - [0123456789]*) ;; - *) cpu=1 ;; - esac - ;; - esac - _hostinfo_="$_hostinfo_ $cpu" - ;; - name) _name_=$(hostname || uname -n || cat /etc/whoami || echo local) - _hostinfo_="$_hostinfo_ $_name_" - ;; - rating) for rating in $(grep -i ^bogomips /proc/cpuinfo 2>/dev/null | sed -e 's,.*:[ ]*,,' -e 's,\(...*\)\..*,\1,' -e 's,\(\..\).*,\1,') - do case $rating in - [0123456789]*) break ;; - esac - done - case $rating in - [0123456789]*) ;; - *) cd "$TMPDIR" - tmp=hi$$ - trap 'rm -f $tmp.*' 0 1 2 - cat > $tmp.c < -#include -#if TD || TZ -#include -#else -extern time_t time(); -#endif -int main() -{ - register unsigned long i; - register unsigned long j; - register unsigned long k; - unsigned long l; - unsigned long m; - unsigned long t; - int x; -#if TD || TZ - struct timeval b; - struct timeval e; -#if TZ - struct timezone z; -#endif -#endif - l = 500; - m = 890; - x = 0; - for (;;) - { -#if TD || TZ -#if TZ - gettimeofday(&b, &z); -#else - gettimeofday(&b); -#endif -#else - t = (unsigned long)time((time_t*)0); -#endif - k = 0; - for (i = 0; i < l; i++) - for (j = 0; j < 50000; j++) - k += j; -#if TD || TZ -#if TZ - gettimeofday(&e, &z); -#else - gettimeofday(&e); -#endif - t = (e.tv_sec - b.tv_sec) * 1000 + (e.tv_usec - b.tv_usec) / 1000; - if (!x++ && t < 1000) - { - t = 10000 / t; - l = (l * t) / 10; - continue; - } -#else - t = ((unsigned long)time((time_t*)0) - t) * 1000; - if (!x++ && t < 20000) - { - t = 200000l / t; - l = (l * t) / 10; - continue; - } -#endif -#if PR - printf("[ k=%lu l=%lu m=%lu t=%lu ] ", k, l, m, t); -#endif - if (t == 0) - t = 1; - break; - } - printf("%lu\n", ((l * m) / 10) / t); - return k == 0; -} -! - rating= - for o in -DTZ -DTD '' - do if $CC $o -O -o $tmp.exe $tmp.c >/dev/null 2>&1 || - gcc $o -O -o $tmp.exe $tmp.c >/dev/null 2>&1 - then rating=$(./$tmp.exe) - break - fi - done - case $rating in - [0123456789]*) ;; - *) rating=1 ;; - esac - ;; - esac - _hostinfo_="$_hostinfo_ $rating" - ;; - type|canon) - case $CROSS:$canon in - 0:) case $cc in - cc) case $KEEP_HOSTTYPE:$HOSTTYPE in - 0:?*) if test -d ${PACKAGEROOT:-.}/arch/$HOSTTYPE - then KEEP_HOSTTYPE=1 - fi - ;; - esac - ;; - esac - case $KEEP_HOSTTYPE in - 1) _hostinfo_="$_hostinfo_ $HOSTTYPE" - continue - ;; - esac - ;; - esac - case $cc in - /*) a=$($cc -dumpmachine $CCFLAGS 2>/dev/null) - case $a in - '') case $CCFLAGS in - ?*) a=$($cc -dumpmachine 2>/dev/null) ;; - esac - ;; - esac - case $a in - ''|*' '*|*/*:*) - ;; - *.*-*) _hostinfo_="$_hostinfo_ $a" - continue - ;; - *-*-*) case $canon in - '') canon=$a ;; - esac - ;; - *) _hostinfo_="$_hostinfo_ $a" - continue - ;; - esac - ;; - esac - IFS=: - set /$IFS$PATH - IFS=$ifs - shift - f=../lib/hostinfo/typemap - for i - do case $i in - "") i=. ;; - esac - case $canon in - '') case $cc in - /*|cc) ;; - *) if executable $i/$cc - then a=$($i/$cc -dumpmachine $CCFLAGS 2>/dev/null) - case $a in - '') case $CCFLAGS in - ?*) a=$($cc -dumpmachine 2>/dev/null) ;; - esac - ;; - esac - case $a in - ''|*' '*|*/*:*) - ;; - *-*) canon=$a - ;; - *) _hostinfo_="$_hostinfo_ $a" - continue 2 - ;; - esac - fi - ;; - esac - ;; - esac - if test -f "$i/$f" - then map="$(grep -v '^#' $i/$f) $map" - fi - done - - # inconsistent -dumpmachine filtered here - - case -${canon}- in - --|*-powerpc-*) - h=$(hostname || uname -n || cat /etc/whoami) - case $h in - '') h=local ;; - esac - a=$(arch || uname -m || att uname -m || uname -s || att uname -s) - case $a in - *[\ \ ]*) a=$(echo $a | sed "s/[ ]/-/g") ;; - esac - case $a in - '') a=unknown ;; - esac - m=$(mach || machine || uname -p || att uname -p) - case $m in - *[\ \ ]*) m=$(echo $m | sed "s/[ ]/-/g") ;; - esac - case $m in - '') m=unknown ;; - esac - x=$(uname -a || att uname -a) - case $x in - '') x="unknown $host unknown unknown unknown unknown unknown" ;; - esac - set "" $h $a $m $x - expected=$1 host=$2 arch=$3 mach=$4 os=$5 sys=$6 rel=$7 ver=$8 - ;; - *) case $canon in - *-*) IFS=- - set "" $canon - shift - IFS=$ifs - case $# in - 2) host= mach= arch=$1 os=$2 sys= rel= ;; - *) host= mach=$2 arch=$1 os=$3 sys= rel= ;; - esac - case $os in - [abcdefghijklmnopqrstuvwxyz]*[0123456789]) - eval $(echo $os | sed -e 's/^\([^0123456789.]*\)\.*\(.*\)/os=\1 rel=\2/') - ;; - esac - ;; - *) arch=$canon mach= os= sys= rel= - ;; - esac - ;; - esac - type=unknown - case $host in - *.*) host=$(echo $host | sed -e 's/\..*//') ;; - esac - case $mach in - unknown) - mach= - ;; - [Rr][0123][0123456789][0123456789][0123456789]) - mach=mips1 - ;; - [Rr][4][0123456789][0123456789][0123456789]) - mach=mips2 - ;; - [Rr][56789][0123456789][0123456789][0123456789]|[Rr][123456789][0123456789][0123456789][0123456789][0123456789]) - mach=mips4 - ;; - pc) arch=i386 - mach= - ;; - [Pp][Oo][Ww][Ee][Rr][Pp][Cc]) - arch=ppc - mach= - ;; - *) case $arch in - 34[0123456789][0123456789]) - os=ncr - arch=i386 - ;; - esac - ;; - esac - case $canon in - '') set \ - \ - /NextDeveloper -d next - \ - /config/hw/system/cpu -d tandem mach \ - - while : - do case $# in - 0) break ;; - esac - if test $2 $1 - then os=$3 - case $4 in - arch) mach=$arch ;; - mach) arch=$mach ;; - esac - break - fi - shift;shift;shift;shift - done - ;; - esac - case $os in - AIX*|aix*) - type=ibm.risc - ;; - HP-UX) case $arch in - 9000/[78]*) - type=hp.pa - ;; - */*) type=hp.$(echo $arch | sed 's,/,_,g') - ;; - *) type=hp.$arch - ;; - esac - ;; - [Ii][Rr][Ii][Xx]*) - set xx $(hinv | sed -e '/^CPU:/!d' -e 's/CPU:[ ]*\([^ ]*\)[ ]*\([^ ]*\).*/\1 \2/' -e q | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz) - shift - type=$1 - n= - case $2 in - r[0123][0123456789][0123456789][0123456789]) - n=1 - ;; - r[4][0123][0123456789][0123456789]) - n=2 - ;; - r[4][456789][0123456789][0123456789]|r[5][0123456789][0123456789][0123456789]) - n=3 - ;; - r[6789][0123456789][0123456789][0123456789]|r[123456789][0123456789][0123456789][0123456789][0123456789]) - n=4 - ;; - esac - case $rel in - [01234].*|5.[012]|5.[012].*) - case $n in - 1) ;; - *) n=2 ;; - esac - ;; - 5.*) case $n in - 2) n=3 ;; - esac - ;; - esac - if executable $cc - then a=$cc - else IFS=: - set /$IFS$PATH - IFS=$ifs - shift - for i - do a=$i/$cc - if executable $a - then break - fi - done - fi - split=' -' - a=$(strings $a < /dev/null | sed -e 's/[^abcdefghijklmnopqrstuvwxyz0123456789]/ /g' -e 's/[ ][ ]*/\'"$split"'/g' | sed -e "/^${type}[0123456789]$/!d" -e "s/^${type}//" -e q) - case $a in - [0123456789]) n=$a ;; - esac - case $n in - 4) a=$($cc -${type}3 2>&1) - case $a in - *unknown*|*install*|*conflict*) - ;; - *) n=3 - ;; - esac - ;; - esac - a=$($cc -show F0oB@r.c 2>&1) - case $n:$a in - [!2]:*mips2*) n=2 ;; - [!23]:*mips3*) n=3 ;; - [!234]:*mips4*) n=4 ;; - esac - case $n:$a in - [!2]:*[Oo]32*) abi=-o32 ;; - [!3]:*[Nn]32*) abi=-n32 ;; - esac - mach=${type}$n - type=sgi.$mach - ;; - OSx*|SMP*|pyramid) - type=pyr - ;; - OS/390) type=mvs.390 - ;; - [Ss][Cc][Oo]*) - type=sco - ;; - [Ss]ol*) - v=$(echo $rel | sed -e 's/^[25]\.//' -e 's/\.[^.]*$//') - case $v in - [6789]|[1-9][0-9]) - ;; - *) v= - ;; - esac - case $arch in - '') case $mach in - '') arch=sun4 ;; - *) arch=$mach ;; - esac - ;; - esac - case $arch in - sparc) arch=sun4 ;; - esac - type=sol$v.$arch - ;; - [Ss]un*)type=$(echo $arch | sed -e 's/\(sun.\).*/\1/') - case $type in - sparc) type=sun4 ;; - esac - case $rel in - [01234]*) - ;; - '') case $os in - *[Oo][Ss]) - ;; - *) type=sol.$type - ;; - esac - ;; - *) case $type in - '') case $mach in - sparc*) type=sun4 ;; - *) type=$mach ;; - esac - ;; - esac - v=$(echo $rel | sed -e 's/^[25]\.//' -e 's/\.[^.]*$//') - case $v in - [6789]|[1-9][0-9]) - ;; - *) v= - ;; - esac - type=sol$v.$type - ;; - esac - case $type in - sun*|*.*) - ;; - *) type=sun.$type - ;; - esac - ;; - [Uu][Nn][Ii][Xx]_[Ss][Vv]) - type=unixware - ;; - UTS*|uts*) - if test -x /bin/u370 -o -x /bin/u390 - then type=uts.390 - else case $arch in - '') arch=$mach ;; - esac - type=uts.$arch - fi - ;; - $host) type=$arch - case $type in - *.*|*[0123456789]*86|*68*) - ;; - *) case $mach in - *[0123456789]*86|*68*|mips) - type=$type.$mach - ;; - esac - ;; - esac - ;; - unknown) - case $arch in - ?*) case $arch in - sun*) mach= ;; - esac - type=$arch - case $mach in - ?*) type=$type.$mach ;; - esac - ;; - esac - ;; - *) case $ver in - FTX*|ftx*) - case $mach in - *[0123456789][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]*) - mach=$(echo $mach | sed -e 's/[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]*$//') - ;; - esac - type=stratus.$mach - ;; - *) case $arch in - [Oo][Ss][-/.]2) - type=os2 - arch=$rel - ;; - *) type=$(echo $os | sed -e 's/[0123456789].*//' -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_0123456789.].*//') - ;; - esac - case $type in - [Cc][Yy][Gg][Ww][Ii][Nn]_*) - type=cygwin - ;; - [Uu][Ww][Ii][Nn]*|[Ww]indows_[0123456789][0123456789]|[Ww]indows_[Nn][Tt]) - type=win32 - arch=$(echo $arch | sed -e 's/_[^_]*$//') - ;; - esac - case $arch in - '') case $mach in - ?*) type=$type.$mach ;; - esac - ;; - *) type=$type.$arch ;; - esac - ;; - esac - esac - case $type in - [0123456789]*) - case $mach in - ?*) type=$mach ;; - esac - case $type in - */MC) type=ncr.$type ;; - esac - ;; - *.*) ;; - *[0123456789]*86|*68*) - case $rel in - [34].[0123456789]*) - type=att.$type - ;; - esac - ;; - [abcdefghijklmnopqrstuvwxyz]*[0123456789]) - ;; - [abcdefghijklmnopqrstuvwxyz]*) case $mach in - $type) case $ver in - Fault*|fault*|FAULT*) - type=ft.$type - ;; - esac - ;; - ?*) case $arch in - '') type=$type.$mach ;; - *) type=$type.$arch ;; - esac - ;; - esac - ;; - esac - case $type in - *[-_]32|*[-_]64|*[-_]128) - bits=$(echo $type | sed 's,.*[-_],,') - type=$(echo $type | sed 's,[-_][0-9]*$,,') - ;; - *) bits= - ;; - esac - type=$(echo $type | sed -e 's%[-+/].*%%' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz) - case $type in - *.*) lhs=$(echo $type | sed -e 's/\..*//') - rhs=$(echo $type | sed -e 's/.*\.//') - case $rhs in - [x0123456789]*86) rhs=i$rhs ;; - 68*) rhs=m$rhs ;; - esac - case $rhs in - i[x23456789]86|i?[x23456789]86|*86pc) - rhs=i386 ;; - powerpc) rhs=ppc ;; - s[0123456789]*[0123456789]x) - rhs=$(echo $rhs | sed -e 's/x$/-64/') ;; - esac - case $rhs in - arm[abcdefghijklmnopqrstuvwxyz_][0123456789]*) - rhs=arm ;; - hppa) rhs=pa ;; - esac - case $lhs in - ?*coff|?*dwarf|?*elf) - case $lhs in - ?*coff) x=coff ;; - ?*dwarf)x=coff ;; - ?*elf) x=elf ;; - esac - lhs=$(echo ${lhs}XXX | sed -e "s/${x}XXX//") - ;; - esac - case $lhs in - bsdi) lhs=bsd ;; - darwin) case $(/usr/bin/cc --version) in - *'(GCC)'*) case $rel in - [0-9].*|10.*) lhs=darwin07 ;; - *) lhs=darwin11 ;; - esac ;; - esac - ;; - freebsd) case $rel in - [01234].*) lhs=${lhs}4 ;; - [123456789]*.*) lhs=${lhs}$(echo $rel | sed -e 's/\..*//') ;; - esac - ;; - hpux) lhs=hp ;; - mvs) rhs=390 ;; - esac - case $lhs in - '') type=$rhs ;; - $rhs) type=$lhs ;; - *) type=$lhs.$rhs ;; - esac - ;; - esac - case $type in - sgi.mips*) - case $mach in - mips2) type=sgi.$mach - abi=-o32 - ;; - mips3) type=sgi.$mach - abi=-n32 - ;; - mips[456789]) - type=sgi.$mach - case $abi in - *-n32) ;; - *) abi=-64 ;; - esac - ;; - *) pwd=$PWD - cd "$TMPDIR" - tmp=hi$$ - trap 'rm -f $tmp.*' 0 1 2 - cat > $tmp.a.c < $tmp.b.c </dev/null 2>&1 - rm -f $tmp.* - trap - 0 1 2 - cd $pwd - ;; - esac - case $type$abi in - sgi.mips2-o32) - ;; - sgi.mips3) - type=$type-o32 - ;; - sgi.mips3-n32) - ;; - sgi.mips4) - type=$type-o32 - ;; - sgi.mips[456789]-64) - ;; - *) type=$type$abi - ;; - esac - ;; - *) case $bits in - '') bits=$( set -e - cd "$TMPDIR" - tmp=hi$$ - trap 'rm -rf "$tmp".*' 0 1 2 - echo 'int main() { return 0; }' > $tmp.a.c - checkcc - $cc $CCFLAGS -o $tmp.a.exe $tmp.a.c /dev/null 2>&1 - file $tmp.a.exe 2>/dev/null | sed "s/$tmp\.a\.exe//g" ) - case $bits in - *\ 64-bit* | *\ 64\ bit* | *\ 64bit*) - bits=64 ;; - *) bits= ;; - esac - ;; - esac - ;; - esac - case $bits in - 32) case $type in - *.i386) bits= ;; - esac - ;; - esac - case $bits in - ?*) type=$type-$bits ;; - esac - - # last chance mapping - - set "" "" $map - while : - do case $# in - [012]) break ;; - esac - shift;shift - eval " case \$type in - $1) type=\$2; break ;; - esac" - done - _hostinfo_="$_hostinfo_ $type" - ;; - esac - done - set '' $_hostinfo_ - shift - _hostinfo_=$* - - # restore the global state - - PATH=$path - case $DEBUG in - '') exec 2>&9 - exec 9>&- - ;; - esac -} - -# info message - -note() # message ... -{ - printf "$command: %s\\n" "$@" >&2 -} - -err_out() -{ - note "$@" - exit 1 -} - -# cc checks -# -# CC: compiler base name name -# cc: full path, empty if not found - -checkcc() -{ - cc= - if onpath $CC - then cc=$_onpath_ - else case $CC in - cc) if onpath clang - then CC=clang - cc=$_onpath_ - elif onpath gcc - then CC=gcc - cc=$_onpath_ - fi - ;; - esac - fi - case $cc in - '') case $action in - make|test) err_out "$CC: not found" ;; - *) note "warning: $CC: not found" ;; - esac - ;; - esac -} - -# some actions have their own PACKAGEROOT or kick out early - -case $action in -host) eval u=$package_use - case $u in - $PACKAGE_USE) - ;; - *) if onpath $0 - then case $_onpath_ in - */arch/$HOSTTYPE/bin/package) - KEEP_HOSTTYPE=1 - ;; - *) KEEP_HOSTTYPE=0 - ;; - esac - else KEEP_HOSTTYPE=0 - fi - ;; - esac - hostinfo $args - echo $_hostinfo_ - exit 0 - ;; -export|setup|use) - x= - ;; -*) x= - eval u=$package_use - case $u in - $PACKAGE_USE) - case :$PATH: in - *:$INSTALLROOT/bin:*) - case $LIBPATH: in - $INSTALLROOT/bin:$INSTALLROOT/lib:*) - case $SHLIB_PATH: in - $INSTALLROOT/lib:*) - x=1 - ;; - esac - ;; - esac - ;; - esac - ;; - esac - ;; -esac -run=- -case $x in -1) : accept the current package use environment - - OK=ok - KSH=$EXECROOT/bin/ksh - MAKE=mamake - SUM=$EXECROOT/bin/sum - TEE=$EXECROOT/bin/tee - INITROOT=$PACKAGEROOT/src/cmd/INIT - checkcc - ;; -*) hosttype= - case $KEEP_PACKAGEROOT in - 0) case $action in - use) PACKAGEROOT= - case $show in - echo) exec=echo make=echo show=echo ;; - esac - set '' $args - shift - case $# in - 0) ;; - *) case $1 in - -|.) ;; - /*) PACKAGEROOT=$1 - ;; - *) i=$(echo ~$1) - if packageroot $i - then PACKAGEROOT=$i - else for i in $(echo $HOME | sed -e 's,/[^/]*$,,') $usr $use - do if packageroot $i/$1 - then PACKAGEROOT=$i/$1 - break - fi - done - case $PACKAGEROOT in - '') hosttype=$1 ;; - esac - fi - ;; - esac - shift - ;; - esac - run="$@" - ;; - esac - case $PACKAGEROOT in - '') PACKAGEROOT=$PWD ;; - esac - - # . must be within the PACKAGEROOT tree - - i=X$PACKAGEROOT - IFS=/ - set $i - IFS=$ifs - while : - do i=$1 - shift - case $i in - X) break ;; - esac - done - case $PACKAGEROOT in - //*) d=/ ;; - *) d= ;; - esac - case $1 in - home) k=1 ;; - *) k=0 ;; - esac - for i - do case $i in - '') continue ;; - esac - d=$d/$i - case $k in - 2) k=1 - ;; - 1) k=0 - ;; - 0) case $i in - arch) k=2 - ;; - *) if packageroot $d - then PACKAGEROOT=$d - fi - ;; - esac - ;; - esac - done - ;; - esac - INITROOT=$PACKAGEROOT/src/cmd/INIT - $show PACKAGEROOT=$PACKAGEROOT - $show export PACKAGEROOT - export PACKAGEROOT - - # initialize the architecture environment - - case $KEEP_HOSTTYPE in - 0) hostinfo type - HOSTTYPE=$_hostinfo_ - ;; - 1) _PACKAGE_HOSTTYPE_=$HOSTTYPE - export _PACKAGE_HOSTTYPE_ - ;; - esac - $show HOSTTYPE=$HOSTTYPE - $show export HOSTTYPE - export HOSTTYPE - INSTALLROOT=$PACKAGEROOT/arch/$HOSTTYPE - case $action in - install|make|remove|test|view) - ;; - *) if test ! -d $INSTALLROOT - then INSTALLROOT=$PACKAGEROOT - fi - ;; - esac - $show INSTALLROOT=$INSTALLROOT - $show export INSTALLROOT - export INSTALLROOT - - # check the basic package hierarchy - - case $action in - export|use) - packageroot $PACKAGEROOT || err_out "$PACKAGEROOT: invalid package root directory" - case $KEEP_HOSTTYPE:$hosttype in - 0:?*) if test -d ${PACKAGEROOT:-.}/arch/$hosttype - then KEEP_HOSTTYPE=1 - HOSTTYPE=$hosttype - else err_out "$hosttype: package root not found" - fi - ;; - esac - ;; - *) packageroot $PACKAGEROOT || { - case $KEEP_PACKAGEROOT in - 1) ;; - *) err_out "$PACKAGEROOT: must be in the package root directory tree" - ;; - esac - } - - for i in arch arch/$HOSTTYPE - do test -d $PACKAGEROOT/$i || $exec mkdir $PACKAGEROOT/$i || exit - done - for i in lib - do test -d $INSTALLROOT/$i || $exec mkdir $INSTALLROOT/$i || exit - done - - # no $INITROOT means INIT already installed elsewhere - - if test -d $INITROOT - then - # update the basic package commands - - for i in execrate ignore mamprobe silent - do test -h $PACKAGEROOT/bin/$i 2>/dev/null || - case $(ls -t $INITROOT/$i.sh $PACKAGEROOT/bin/$i 2>/dev/null) in - "$INITROOT/$i.sh"*) - note "update $PACKAGEROOT/bin/$i" - shellmagic - case $SHELLMAGIC in - '') $exec cp $INITROOT/$i.sh $PACKAGEROOT/bin/$i || exit - ;; - *) case $exec in - '') { - echo "$SHELLMAGIC" - cat $INITROOT/$i.sh - } > $PACKAGEROOT/bin/$i || exit - ;; - *) echo "{ -echo \"$SHELLMAGIC\" -cat $INITROOT/$i.sh -} > $PACKAGEROOT/bin/$i" - ;; - esac - ;; - esac - $exec chmod +x $PACKAGEROOT/bin/$i || exit - ;; - esac - done - fi - ;; - esac - path=$PATH - PATH=$INSTALLROOT/bin:$PACKAGEROOT/bin:$PATH - checkcc - PATH=$path - case $cc in - ?*) if test -f $INITROOT/hello.c - then - # check if $CC (full path $cc) is a cross compiler - - ( - cd "$TMPDIR" || exit 3 - cp $INITROOT/hello.c pkg$$.c || exit 3 - $cc -o pkg$$.exe pkg$$.c > pkg$$.e 2>&1 || { - if $cc -Dnew=old -o pkg$$.exe pkg$$.c > /dev/null 2>&1 - then err_out "${warn}$CC: must be a C compiler (not C++)" - else cat pkg$$.e - err_out "${warn}$CC: failed to compile and link $INITROOT/hello.c -- is it a C compiler?" - fi - } - if ./pkg$$.exe >/dev/null 2>&1 - then code=0 - else code=1 - fi - rm -f pkg$$.* - exit $code - ) - code=$? - case $code in - 1) CROSS=1 ;; - esac - fi - ;; - esac - EXECTYPE=$HOSTTYPE - EXECROOT=$INSTALLROOT - case $CROSS in - 0) # dll hackery -- why is this so complicated? - - abi= - case $HOSTTYPE in - sgi.mips[0123456789]*) - x=rld - if executable /lib32/$x || executable /lib64/$x - then case $INSTALLROOT in - */sgi.mips[0123456789]*) - u=$(echo $INSTALLROOT | sed -e 's,-[^-/]*$,,' -e 's,.$,,') - ;; - *) u= - ;; - esac - for a in "n=2 v= l=" "n=3 v=N32 l=lib32" "n=4-n32 v=N32 l=lib32" "n=4 v=64 l=lib64" - do eval $a - case $v in - N32) case $n:$HOSTTYPE in - *-n32:*-n32) ;; - *-n32:*) continue ;; - *:*-n32) continue ;; - esac - ;; - esac - case $l in - ?*) if executable ! /$l/$x - then continue - fi - ;; - esac - case $u in - '') case $HOSTTYPE in - sgi.mips$n|sgi.mips$n-*) - abi="$abi 'd=$INSTALLROOT v=$v'" - ;; - *) continue - ;; - esac - ;; - *) if test -d $u$n - then abi="$abi 'd=$u$n v=$v'" - fi - ;; - esac - done - fi - ;; - esac - case $abi in - '') abi="'d=$INSTALLROOT v='" ;; - esac - p=0 - eval " - for a in $abi - do eval \$a - eval \" - case \\\$LD_LIBRARY\${v}_PATH: in - \\\$d/lib:*) - ;; - *) x=\\\$LD_LIBRARY\${v}_PATH - case \\\$x in - ''|:*) ;; - *) x=:\\\$x ;; - esac - LD_LIBRARY\${v}_PATH=\$d/lib\\\$x - export LD_LIBRARY\${v}_PATH - p=1 - ;; - esac - \" - done - " - case $LD_LIBRARY_PATH in - '') ;; - *) for d in $lib - do case $HOSTTYPE in - *64) if test -d ${d}64 - then d=${d}64 - fi - ;; - esac - case :$LD_LIBRARY_PATH: in - *:$d:*) ;; - *) if test -d $d - then LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$d - p=1 - fi - ;; - esac - done - ;; - esac - case $p in - 1) $show LD_LIBRARY_PATH=$LD_LIBRARY_PATH - $show export LD_LIBRARY_PATH - export LD_LIBRARY_PATH - ;; - esac - case $LIBPATH: in - $INSTALLROOT/bin:$INSTALLROOT/lib:*) - ;; - *) case $LIBPATH in - '') LIBPATH=/usr/lib:/lib ;; - esac - LIBPATH=$INSTALLROOT/bin:$INSTALLROOT/lib:$LIBPATH - $show LIBPATH=$LIBPATH - $show export LIBPATH - export LIBPATH - ;; - esac - case $SHLIB_PATH: in - $INSTALLROOT/lib:*) - ;; - *) SHLIB_PATH=$INSTALLROOT/lib${SHLIB_PATH:+:$SHLIB_PATH} - $show SHLIB_PATH=$SHLIB_PATH - $show export SHLIB_PATH - export SHLIB_PATH - ;; - esac - case $DYLD_LIBRARY_PATH: in - $INSTALLROOT/lib:*) - ;; - *) DYLD_LIBRARY_PATH=$INSTALLROOT/lib${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH} - $show DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH - $show export DYLD_LIBRARY_PATH - export DYLD_LIBRARY_PATH - ;; - esac - case $_RLD_ROOT in - $INSTALLROOT/arch*) ;; - ':') _RLD_ROOT=$INSTALLROOT/arch:/ ;; - /|*:/) _RLD_ROOT=$INSTALLROOT/arch:$_RLD_ROOT ;; - *) _RLD_ROOT=$INSTALLROOT/arch:$_RLD_ROOT:/ ;; - esac - $show _RLD_ROOT=$_RLD_ROOT - $show export _RLD_ROOT - export _RLD_ROOT - - # now set up PATH - # - # NOTE: PACKAGEROOT==INSTALLROOT is possible for binary installations - - case $PATH: in - $PACKAGEROOT/bin:*) - ;; - *) PATH=$PACKAGEROOT/bin:$PATH - ;; - esac - case $PATH: in - $INSTALLROOT/bin:*) - ;; - *) PATH=$INSTALLROOT/bin:$PATH - ;; - esac - $show PATH=$PATH - $show export PATH - export PATH - ;; - *) for i in package - do if onpath $i - then EXECROOT=$(echo $_onpath_ | sed -e 's,//*[^/]*//*[^/]*$,,') - EXECTYPE=$(echo $EXECROOT | sed -e 's,.*/,,') - break - fi - done - case $HOSTTYPE in - $EXECTYPE) - OCC=$CC - CC=cc - hostinfo type - EXECTYPE=$_hostinfo_ - case $HOSTTYPE in - $EXECTYPE) - err_out "$CC seems to be a cross-compiler." \ - "Set HOSTTYPE to something other than the native $EXECTYPE." \ - "If not, your $TMPDIR directory may be mounted without execute permission." \ - "Try exporting TMPDIR as a directory where you can execute binary files." - ;; - esac - ;; - esac - $show EXECTYPE=$EXECTYPE - $show export EXECTYPE - export EXECTYPE - ;; - esac - $show EXECROOT=$EXECROOT - $show export EXECROOT - export EXECROOT - - # use these if possible - - OK=ok - KSH=$EXECROOT/bin/ksh - MAKE=mamake - SUM=$EXECROOT/bin/sum - TEE=$EXECROOT/bin/tee - - # grab a decent default shell - - checksh "$SHELL" || KEEP_SHELL=0 - case $KEEP_SHELL in - 0) save_PATH=$PATH - if PATH=$(getconf PATH 2>/dev/null) - then PATH=$PATH:$path - else PATH=/bin:/usr/bin:/sbin:/usr/sbin:$path - fi - for i in ksh ksh93 mksh yash bash sh - do if onpath "$i" && checksh "$_onpath_" - then SHELL=$_onpath_ - KEEP_SHELL=1 - break - fi - done - PATH=$save_PATH - unset save_PATH - case $KEEP_SHELL in - 0) err_out "Cannot find a good default shell; please supply SHELL=/path/to/shell" - ;; - esac - ;; - esac - export SHELL - $show SHELL=$SHELL - $show export SHELL - - # tame the environment - - case $action in - use) ;; - *) ENV= - ERROR_OPTIONS= - export ENV ERROR_OPTIONS - ;; - esac - - # finalize the views - - case $USER_VPATH in - '') case $VPATH in - ?*) IFS=':' - set '' $VPATH - shift - IFS=$ifs - USER_VPATH= - for i - do case $i in - */arch/$HOSTTYPE) ;; - */arch/*/*) ;; - */arch/*) continue ;; - esac - if packageroot $i - then case $USER_VPATH in - '') USER_VPATH=$i ;; - ?*) USER_VPATH=$USER_VPATH:$i ;; - esac - fi - done - esac - ;; - esac - case $USER_VPATH in - ?*) IFS=':' - set '' $USER_VPATH - shift - IFS=$ifs - USER_VPATH= - USER_VPATH_CHAIN= - p=$PACKAGEROOT - for i - do case $i in - ''|$PACKAGEROOT|$INSTALLROOT) - ;; - ?*) USER_VPATH=$USER_VPATH:$i - USER_VPATH_CHAIN="$USER_VPATH_CHAIN $p $i" - p=$i - ;; - esac - done - ;; - esac - ;; -esac - -PACKAGEBIN=$INSTALLROOT/lib/package -case $action:$run in -use:-) set '' $args - shift - case $# in - 0) ;; - *) shift ;; - esac - run="$@" - ;; -esac - -# HOSTTYPE specific package profile - -if test -r $INSTALLROOT/lib/package/profile -then . $INSTALLROOT/lib/package/profile -fi - -# more Cygwin hassles - -case $HOSTTYPE in -cygwin.*) - lose= - case $CYGWIN in - *nontsec*) - lose=ntsec - ;; - *ntsec*);; - *) exe=$TMPDIR/pkg$$.exe - rm -f "$exe" - : > "$exe" - if test -x "$exe" - then lose=ntsec - fi - ;; - esac - case $CYGWIN in - *nobinmode*) - case $lose in - '') lose=binmode ;; - *) lose="$lose binmode" ;; - esac - ;; - esac - case $lose in - ?*) err_out "$HOSTTYPE: export '$lose' in CYGWIN or languish in Windows" - ;; - esac - ;; -esac - -# set up the view state - -VIEW_bin=$INSTALLROOT VIEW_src=$PACKAGEROOT VIEW_all="$INSTALLROOT $PACKAGEROOT" -VPATH=$INSTALLROOT:$PACKAGEROOT$USER_VPATH -$show VPATH=$VPATH -$show export VPATH -export VPATH -IFS=':' -set '' $VPATH -shift -IFS=$ifs -for i -do case $i in - */arch/*/*) - VIEW_src="$VIEW_src $i" - ;; - */arch/*) - VIEW_bin="$VIEW_bin $i" - ;; - *) - VIEW_src="$VIEW_src $i" - ;; - esac - VIEW_all="$VIEW_all $i" -done - -# return 0 if arg in src|bin|all view - -view() # [test] [-|type] [src|bin|all] file -{ - case $1 in - -[dfsx])_view_T_=$1; shift ;; - *) _view_T_=-f ;; - esac - case $1 in - -) _view_t_= ;; - *) _view_t_=$1 ;; - esac - shift - case $1 in - all) shift; _view_v_=$VIEW_all ;; - bin) shift; _view_v_=$VIEW_bin ;; - src) shift; _view_v_=$VIEW_src ;; - *) _view_v_=$VIEW_all ;; - esac - case $1 in - /*) if test $_view_T_ $1 - then _view_=$1 - return 0 - fi - ;; - *) for _view_d_ in $_view_v_ - do if test $_view_T_ $_view_d_/$1 - then _view_=$_view_d_/$1 - return 0 - fi - done - ;; - esac - _view_= - case $_view_t_ in - ?*) note "$1: $_view_t_ not found" ;; - esac - return 1 -} - -# determine the package and targets - -case $action in -*) package= - target= - set '' $args - while : - do shift - case $# in - 0) break ;; - esac - case $1 in - ''|-) target="$target $package" - package= - ;; - *) if view - src "lib/package/$1.pkg" - then package="$package $1" - else target="$target $package $1" - package= - fi - ;; - esac - done - ;; -esac - -# check that cmd args are up to date a.out's - -checkaout() # cmd ... -{ - case $cc in - '') _PACKAGE_cc=0 - ;; - *) _PACKAGE_cc=1 - test -f $INITROOT/hello.c -a -f $INITROOT/p.c || { - note "$INITROOT: INIT package source not found" - return 1 - } - - for i in arch arch/$HOSTTYPE arch/$HOSTTYPE/bin - do test -d $PACKAGEROOT/$i || $exec mkdir $PACKAGEROOT/$i || return - done - ;; - esac - case $_PACKAGE_cc in - '') case $cc in - '') _PACKAGE_cc=0 ;; - *) _PACKAGE_cc=1 ;; - esac - ;; - esac - for i - do eval j=\$_PACKAGE_AOUT_$i - case $j in - '') eval _PACKAGE_AOUT_$i=1 ;; - *) continue ;; - esac - k=$_PACKAGE_cc - if test -f $INITROOT/$i.c - then k=${k}1 - else k=${k}0 - fi - if executable $EXECROOT/bin/$i - then k=${k}1 - else k=${k}0 - fi - : $k : compiler : source : binary : - case $k in - *00) view - bin/$i && continue ;; - esac - case $k in - 000) note "$i: not found: download the INIT package $HOSTTYPE binary to continue" - return 1 - ;; - 010) note "$i: not found: set CC=C-compiler or download the INIT package $HOSTTYPE binary to continue" - return 1 - ;; - 100) note "$i: not found: download the INIT package source or $HOSTTYPE binary to continue" - return 1 - ;; - 110) case $CROSS in - 1) note "$i: not found: make the local $EXECTYPE binary package before $HOSTTYPE" - return 1 - ;; - esac - ;; - ?01) : accept binary - continue - ;; - 011) : accept binary - continue - ;; - ??1) case $CROSS in - 1) continue ;; - esac - ;; - esac - case $(ls -t $INITROOT/$i.c $INSTALLROOT/bin/$i 2>/dev/null) in - "$INITROOT/$i.c"*) - note "update $INSTALLROOT/bin/$i" - if test ! -d $INSTALLROOT/bin - then for j in arch arch/$HOSTTYPE arch/$HOSTTYPE/bin - do test -d $PACKAGEROOT/$j || $exec mkdir $PACKAGEROOT/$j || return - done - fi - $exec $CC $CCFLAGS -o $INSTALLROOT/bin/$i $INITROOT/$i.c || return - test -f $i.o && $exec rm -f $i.o - i=$PATH - PATH=/bin - PATH=$i - ;; - esac - done - return 0 -} - -# list main environment values - -showenv() -{ - case $1 in - ''|make)for __i__ in CC SHELL $env - do eval echo $__i__='$'$__i__ - done - ;; - esac -} - -# capture command output - -capture() # file command ... -{ - tee_pid= - case $make:$noexec in - :) case $action in - install|make|view) - o=$action - ;; - *) case $package in - ''|*' '*) - o=$action - ;; - *) o=$package - ;; - esac - ;; - esac - d=$PACKAGEBIN/gen - test -d $d || $exec mkdir $d - o=$d/$o - case $o in - $output)o=$o.out - s= - ;; - *) output=$o - if test -f $o.old - then mv $o.old $o.out.1 - if test -f $o.out - then mv $o.out $o.out.2 - fi - elif test -f $o.out - then for i in $(ls -t $o.out.? 2>/dev/null) - do break - done - case $i in - *.1) i=2 ;; - *.2) i=3 ;; - *.3) i=4 ;; - *.4) i=5 ;; - *.5) i=6 ;; - *.6) i=7 ;; - *.7) i=8 ;; - *.8) i=9 ;; - *) i=1 ;; - esac - mv $o.out $o.out.$i - fi - o=$o.out - : > $o - note "$action output captured in $o" - s="$command: $action start at $(date) in $INSTALLROOT" - cmd='case $error_status in 0) r=done;; *) r=failed;; esac;' - cmd=$cmd' echo "$command: $action $r at $(date) in $INSTALLROOT"' - case $quiet in - 0) cmd="$cmd 2>&1 | \$TEE -a $o" ;; - *) cmd="$cmd >> $o" ;; - esac - trap "$cmd" 0 - trap "error_status=1; $cmd; trap 1 0; kill -1 $$" 1 - trap "error_status=1; $cmd; trap 2 0; kill -2 $$" 2 - ;; - esac - case $quiet in - 0) if executable ! $TEE - then TEE=tee - fi - # Connect 'tee' to a FIFO instead of a pipe, so that we can obtain - # the build's exit status and use it for $error_status - rm -f $o.fifo - mkfifo -m 600 $o.fifo || exit - ( - sleep 1 - # unlink early - exec rm $o.fifo - ) & - $TEE -a $o < $o.fifo & - tee_pid=$! - o=$o.fifo - ;; - esac - { - case $s in - ?*) echo "$s" ;; - esac - showenv $action - "$@" - } < /dev/null > $o 2>&1 - ;; - *) $make "$@" - ;; - esac - exit_status=$? - if test "$exit_status" -gt "$error_status" - then error_status=$exit_status - fi - case $tee_pid in - ?*) # allow 'tee' to catch up before returning to prompt - wait "$tee_pid" - ;; - esac -} - -make_recurse() # dir -{ - for _make_recurse_j in $makefiles - do if view - $1/$_make_recurse_j - then return - fi - done -} - -# check for native ASCII 0:yes 1:no - -__isascii__= - -isascii() -{ - case $__isascii__ in - '') case $(echo A | od -o | sed -e 's/[ ]*$//' -e '/[ ]/!d' -e 's/.*[ ]//') in - 005101|040412) __isascii__=0 ;; - *) __isascii__=1 ;; - esac - esac - return $__isascii__ -} - -error_status=0 - -case $action in - -clean|clobber) - cd "$PACKAGEROOT" || exit - note "cleaning up flat view" - # clean up all links with arch dir except bin/package - $exec find "arch/$HOSTTYPE" -path "arch/$HOSTTYPE/bin/package" -o -type f -exec "$SHELL" -c ' - first=y - for h # loop through the PPs - do case $first in - y) set -- # clear PPs ("for" uses a copy) - first=n ;; - esac - p=${h#"arch/$HOSTTYPE/"} # get flat view path - if test "$p" -ef "$h" # is it part of the flat view? - then set -- "$@" "$p" # add to new PPs - fi - done - exec rm -f "$@" # rm all at once: fast - ' "$0" {} + - case $flat in - 0) note "deleting arch/$HOSTTYPE" - $exec rm -rf arch/$HOSTTYPE - ;; - esac - note "removing empty directories" - $exec find . -depth -type d -exec rmdir {} + 2>/dev/null - ;; - -export) case $INSTALLROOT in - $PACKAGEROOT) - INSTALLROOT=$INSTALLROOT/arch/$HOSTTYPE - ;; - esac - case $only in - 0) v='$i=' ;; - *) v= ;; - esac - set '' $target $package - case $# in - 1) set '' $env ;; - esac - while : - do case $# in - 1) break ;; - esac - shift - i=$1 - eval echo ${v}'$'${i} - done - ;; - -install)cd $PACKAGEROOT - echo "A proper installation command is coming back soon, sorry." >&2 - echo "Meanwhile, copy ksh and shcomp from: $INSTALLROOT/arch/$HOSTTYPE/bin" >&2 - exit 1 - ;; - -make|view) - cd $PACKAGEROOT - - # check for some required commands - - must="$AR" - warn="$NM yacc bison" - test="$must $warn" - have= - IFS=: - set /$IFS$PATH - IFS=$ifs - shift - for t in $test - do if executable $t - then have="$have $t" - fi - done - for d - do for t in $test - do case " $have " in - *" $t "*) - ;; - *) if executable $d/$t - then have="$have $t" - fi - ;; - esac - done - done - case " $have " in - *" bison "*) ;; - *" yacc "*) have="$have bison" ;; - esac - case " $have " in - *" yacc "*) ;; - *" bison "*) have="$have yacc" ;; - esac - for t in $test - do case " $have " in - *" $t "*) - ;; - *) case " $must " in - *" $t "*) - err_out "$t: not found -- must be on PATH to $action" - ;; - *) note "warning: $t: not found -- some $action actions may fail" - ;; - esac - ;; - esac - done - - # verify the top view - - if test ! -d $PACKAGEROOT/src - then note "no source packages to make" - exit 0 - elif test ! -d $INSTALLROOT/src - then note "initialize the $INSTALLROOT view" - fi - for i in arch arch/$HOSTTYPE - do test -d $PACKAGEROOT/$i || $exec mkdir $PACKAGEROOT/$i || exit - done - for i in bin bin/$OK bin/$OK/lib fun include lib lib/package lib/package/gen src man man/man1 man/man3 man/man8 - do test -d $INSTALLROOT/$i || $exec mkdir $INSTALLROOT/$i || exit - done - make_recurse src - o= k= - for i in $makefiles - do case $o in - ?*) o="$o -o" k="$k|" ;; - esac - o="$o -name $i" - k="$k$i" - done - o="( $o ) -print" - for d in $src - do i=src/$d - if test -d $i - then test -d $INSTALLROOT/$i || $exec mkdir $INSTALLROOT/$i || exit - make_recurse $i - for j in $(cd $i; find . $o 2>/dev/null | sed -e 's,^\./,,' -e '/\//!d' -e 's,/[^/]*$,,' | sort -u) - do case $j in - $k|$MAKESKIP) continue ;; - esac - test -d $INSTALLROOT/$i/$j || - $exec mkdir -p $INSTALLROOT/$i/$j || exit - done - fi - done - - # check $CC and { ar cc ld ldd } intercepts - - h="${HOSTTYPE} ${HOSTTYPE}.*" - case $HOSTTYPE in - *.*) t=$(echo $HOSTTYPE | sed 's/[.][^.]*//') - h="$h $t" - ;; - *) t=$HOSTTYPE - ;; - esac - case $t in - *[0123456789]) - t=$(echo $t | sed 's/[0123456789]*$//') - h="$h $t" - ;; - esac - case $CC in - cc) c=cc - b=$INSTALLROOT/bin/$c - t=$INSTALLROOT/lib/package/gen/$c.tim - intercept=0 - for k in $h - do for s in $INITROOT/$c.$k - do test -x "$s" || continue - if cmp -s "$s" "$b" >/dev/null 2>&1 - then intercept=1 - break 2 - fi - case $(ls -t "$t" "$b" "$s" 2>/dev/null) in - $t*) ;; - $b*) cc=$b - ;; - $s*) $exec cd $INSTALLROOT/lib/package/gen - tmp=pkg$$ - $exec eval "echo 'int main(){return 0;}' > $tmp.c" - if $exec $s -o $tmp.exe $tmp.c >/dev/null 2>&1 && - test -x $tmp.exe - then case $HOSTTYPE in - *.mips*)$s -version >/dev/null 2>&1 || s= ;; - esac - case $s in - ?*) $exec sed "s/^HOSTTYPE=.*/HOSTTYPE=$HOSTTYPE/" < "$s" > "$b" || exit - $exec chmod +x "$b" || exit - cc=$b - intercept=1 - note "update $b" - ;; - esac - fi - $exec rm -f $tmp.* - $exec touch "$t" - cd $PACKAGEROOT - ;; - esac - break 2 - done - done - case $intercept in - 1) c=ld - b=$INSTALLROOT/bin/$c - for k in $h - do for s in $INITROOT/$c.$k - do test -x "$s" || continue - case $(ls -t "$b" "$s" 2>/dev/null) in - $b*) ;; - $s*) $exec cp "$s" "$b" - note "update $b" - ;; - esac - done - done - ;; - esac - ;; - esac - c=ldd - b=$INSTALLROOT/bin/$c - for t in $h - do s=$INITROOT/$c.$t - test -x "$s" || continue - onpath $c || - case $(ls -t "$b" "$s" 2>/dev/null) in - $b*) ;; - $s*) $exec cp "$s" "$b" - note "update $b" - ;; - esac - done - c=ar - b=$INSTALLROOT/bin/$c - for t in $h - do s=$INITROOT/$c.$t - test -x "$s" || continue - case $(ls -t "$b" "$s" 2>/dev/null) in - $b*) ;; - $s*) $exec cp "$s" "$b" - note "update $b" - ;; - esac - done - case $cc in - /*) ;; - *) err_out "$CC: not found -- set CC=C-compiler" - ;; - esac - case $exec in - '') cd $INSTALLROOT/lib/package/gen - tmp=pkg$$ - echo 'int main(){return 0;}' > $tmp.c - if $CC -o $tmp.exe $tmp.c > /dev/null 2> $tmp.err && - test -x $tmp.exe - then : ok - else note "$CC: failed to compile this program:" - cat $tmp.c >&2 - if test -s $tmp.err - then cat $tmp.err >&2 - else note "$CC: not a C compiler" - fi - rm -f $tmp.* - exit 1 - fi - rm -f $tmp.* - cd $PACKAGEROOT - ;; - esac - - # remember the default $CC - - case $CC in - cc) ;; - *) if test -x $INSTALLROOT/bin/cc - then case $(sed 1q $INSTALLROOT/bin/cc) in - ": $CC :") - CC=cc - export CC - ;; - *) assign="$assign CC=\"\$CC\"" - ;; - esac - else case $CROSS in - 1) assign="$assign CC=\"\$CC\"" - ;; - *) case $exec in - '') { - echo ": $CC :" - echo "$CC \"\$@\"" - } > $INSTALLROOT/bin/cc - chmod +x $INSTALLROOT/bin/cc - ;; - *) note "generate a $INSTALLROOT/bin/cc wrapper for $CC" - ;; - esac - CC=cc - export CC - ;; - esac - fi - ;; - esac - - # no $INITROOT means INIT already installed elsewhere - - if test -d $INITROOT - then - # update probe scripts - - for i in lib/probe lib/probe/C lib/probe/C/make - do test -d $INSTALLROOT/$i || $exec mkdir $INSTALLROOT/$i || exit - done - i=$INSTALLROOT/lib/probe/C/make/probe - j=$INITROOT/C+probe - k=$INITROOT/make.probe - case $(ls -t $i $j $k 2>/dev/null) in - $i*) ;; - *) if test -f $j -a -f $k - then note "update $i" - shellmagic - case $exec in - '') { - case $SHELLMAGIC in - ?*) echo "$SHELLMAGIC" ;; - esac - cat $j $k - } > $i || exit - ;; - *) echo "{ -echo $SHELLMAGIC -cat $j $k -} > $i" - ;; - esac - $exec chmod +x $i || exit - fi - ;; - esac - fi - - # initialize mamake - - checkaout mamake || exit - - # execrate if necessary - - if (execrate) >/dev/null 2>&1 - then execrate=execrate - $make cd $INSTALLROOT/bin - for i in chmod chgrp cmp cp ln mv rm - do if test ! -x $OK/$i -a -x /bin/$i.exe - then shellmagic - case $exec in - '') echo "$SHELLMAGIC"'execrate /bin/'$i' "$@"' > $OK/$i - chmod +x $OK/$i - ;; - *) $exec echo \'"$SHELLMAGIC"'execrate /bin/'$i' "$@"'\'' >' $OK/$i - $exec chmod +x $OK/$i - ;; - esac - fi - done - PATH=$INSTALLROOT/bin/$OK:$PATH - export PATH - else execrate= - fi - case $action in - view) exit 0 ;; - esac - - # check against previous compiler and flags - - err= - for var in CC CCFLAGS CCLDFLAGS LDFLAGS KSH_RELFLAGS - do store=$INSTALLROOT/lib/package/gen/$var - eval "new=\$$var" - if test -f $store - then old=$(cat $store) - case $old in - "$new") ;; - *) case $old in - '') old="(none)" ;; - *) old="'$old'" ;; - esac - case $new in - '') new="(none)" ;; - *) new="'$new'" ;; - esac - note "$var changed from $old to $new" - err=y ;; - esac - else test -d $INSTALLROOT/lib/package/gen && case $new in - '') ;; - *) echo "$new" ;; - esac > $store - fi - done - case $err,${FORCE_FLAGS+f} in - y,) err_out "This would likely break the build. Restore the flag(s)," \ - "or delete the build directory and rebuild from scratch." - ;; - esac - unset err var store old new - - # all work under $INSTALLROOT/src - - $make cd $INSTALLROOT/src - - # record the build host name - - case $exec in - '') hostinfo name - echo "$_hostinfo_" | sed 's,\..*,,' > $PACKAGEBIN/gen/host - ;; - esac - - # separate flags from target list - - case $target in - *-*) a= - for t in $target - do case $t in - -*) makeflags="$makeflags $t" - ;; - *) a="$a $t" - ;; - esac - done - target=$a - ;; - esac - - # mamprobe data should have been generated by this point - - case $exec in - '') if test ! -f $INSTALLROOT/bin/.paths -o -w $INSTALLROOT/bin/.paths - then N=' -' - b= f= h= n= p= u= B= L= - if test -f $INSTALLROOT/bin/.paths - then exec < $INSTALLROOT/bin/.paths - while read x - do case $x in - '#'?*) case $h in - '') h=$x ;; - esac - ;; - *BUILTIN_LIB=*) b=$x - ;; - *FPATH=*) f=$x - ;; - *PLUGIN_LIB=*) p=$x - ;; - *) case $u in - ?*) u=$u$N ;; - esac - u=$u$x - ;; - esac - done - fi - ifs=$IFS - m= - case $p in - ?*) b= - ;; - esac - case $b in - ?*) IFS='=' - set $b - IFS=$ifs - shift - p="PLUGIN_LIB=$*" - case $b in - [Nn][Oo]*) p=no$p ;; - esac - m=1 - ;; - esac - case $f in - '') f="FPATH=../fun" - m=1 - ;; - esac - case $h in - '') h='# use { no NO } prefix to permanently disable #' ;; - esac - case $p in - '') p="PLUGIN_LIB=cmd" - if grep '^setv mam_cc_DIALECT .* EXPORT=[AD]LL' $INSTALLROOT/lib/probe/C/mam/* >/dev/null 2>&1 - then p=no$p - fi - m=1 - ;; - esac - case $m in - 1) case $u in - ?*) u=$N$u ;; - esac - echo "$h$N$p$N$f$N$u" > $INSTALLROOT/bin/.paths - ;; - esac - fi - ;; - esac - - # run from separate copies since ksh may be rebuilt - - case $EXECROOT in - $INSTALLROOT) - $make cd $INSTALLROOT/bin - if executable /bin/cp - then cp=/bin/cp - else cp=cp - fi - if executable /bin/mv - then mv=/bin/mv - else mv=mv - fi - if executable /bin/rm - then rm=/bin/rm - else rm=rm - fi - for i in \ - ksh tee cp ln mv rm \ - *ast*.dll *cmd*.dll *dll*.dll *shell*.dll - do executable $i && { - cmp -s $i $OK/$i 2>/dev/null || { - test -f $OK/$i && - $exec $execrate $rm $OK/$i /dev/null || ln -sf "$h" "$p" || exit - done - ' "$0" {} + - ;; - esac - ;; - -results)set '' $target - shift - def=make - dir=$PACKAGEBIN/gen - case $verbose in - 0) filter=yes ;; - *) filter=cat ;; - esac - path=0 - suf=out - on= - while : - do case $# in - 0) break ;; - esac - case $1 in - --) shift - break - ;; - error*|fail*) - filter=errors - ;; - make|test|view) - def=$1 - case $filter:$1:$SHELL in - errors:*:*) ;; - *:test:*/ksh*) filter=rt ;; - esac - ;; - old) suf=old - ;; - on) case $# in - 1) err_out "$action: $1: host pattern argument expected" - ;; - esac - shift - case $on in - ?*) on="$on|" ;; - esac - on="$on$1" - ;; - path) path=1 - ;; - test) def=test - filter=rt - ;; - *) break - ;; - esac - shift - done - case $dir in - */admin)case $on in - '') on="*" ;; - *) on="@($on)" ;; - esac - def=$def.log/$on - ;; - esac - case $# in - 0) set "$def" ;; - esac - m= - t= - for i - do k=0 - eval set '""' $i - $i.$suf - $dir/$i - $dir/$i.$suf - - shift - for j - do case $j in - -) case $k in - 1) continue 2 ;; - esac - ;; - *) if test -f $j - then k=1 - case /$j in - */test.*) t="$t $j" ;; - *) m="$m $j" ;; - esac - fi - ;; - esac - done - err_out "$i action output not found" - done - sep= - case $t in - ?*) case $path in - 0) for j in $t - do echo "$sep==> $j <==" - sep=$nl - case $filter in - cat) $exec cat $j - ;; - errors) $exec egrep -i '\*\*\*|FAIL[ES]|^TEST.* [123456789][0123456789]* error|core.*dump' $j | sed -e '/^TEST.\//s,/[^ ]*/,,' - ;; - rt) $exec $KSH rt - $j - ;; - *) $exec egrep -i '^TEST|FAIL' $j - ;; - esac - done - ;; - 1) echo $t - ;; - esac - ;; - esac - case $m in - ?*) case $path in - 0) case $filter in - cat) cat $m - ;; - *) if test -f $HOME/.pkgresults - then i=$(cat $HOME/.pkgresults) - case $i in - '|'*) ;; - *) i="|$i" ;; - esac - else i= - fi - for j in $m - do echo "$sep==> $j <==" - sep=$nl - case $filter in - errors) $exeg egrep '^pax:|\*\*\*' $j - ;; - *) $exec egrep -iv '^($||[\+\[]|cc[^-:]|kill |make.*(file system time|has been replaced)|so|[0123456789]+ error|uncrate |[0123456789]+ block|ar: creat|iffe: test: |conf: (check|generate|test)|[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789]*=|gsf@research|ar:.*warning|cpio:|ld:.*(duplicate symbol|to obtain more information)|[0123456789]*$|(checking|creating|touch) [/abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789])| obsolete predefined symbol | is (almost always misused|dangerous|deprecated|not implemented)| trigraph| assigned to | cast .* different size| integer overflow .*<<| optimization may be attained | passed as |::__builtin|^creating.*\.a$|warning.*not optimized|exceeds size thresh|ld:.*preempts|is unchanged|with value >=|(-l|lib)\*|/(ast|sys)/(dir|limits|param|stropts)\.h.*redefined|usage|base registers|`\.\.\.` obsolete'"$i" $j | - $exec grep : - ;; - esac - done - ;; - esac - ;; - 1) echo $m - ;; - esac - esac - ;; - -test) # pass control to ksh 93u+m test script - capture "$PACKAGEROOT/bin/shtests" $args - ;; - -use) # finalize the environment - - x=:.. - for d in $( cd $PACKAGEROOT; ls src/*/Mamfile 2>/dev/null | sed 's,/[^/]*$,,' | sort -u ) - do x=$x:$INSTALLROOT/$d - done - x=$x:$INSTALLROOT - case $CDPATH: in - $x:*) ;; - *) CDPATH=$x:$CDPATH - $show CDPATH=$CDPATH - $show export CDPATH - export CDPATH - ;; - esac - eval PACKAGE_USE=$package_use - export PACKAGE_USE - unset LC_ALL # respect the user's locale again; avoids multibyte corruption - - # run the command - - case $run in - '') note "You are now entering a new environment set up to use the package in:" \ - " $INSTALLROOT" \ - "You're using the shell:" \ - " $SHELL" \ - "Type 'exit' to leave and go back to normal." - case $show in - ':') $exec exec $SHELL ;; - esac - ;; - *) $exec exec $SHELL -c "$run" - ;; - esac - ;; - -*) err_out "$action: internal error" - ;; - -esac - -exit "$error_status" diff --git a/cde/programs/dtksh/ksh93/bin/shtests b/cde/programs/dtksh/ksh93/bin/shtests deleted file mode 100755 index 3755f18dc..000000000 --- a/cde/programs/dtksh/ksh93/bin/shtests +++ /dev/null @@ -1,54 +0,0 @@ -#! /bin/sh -# Wrapper script to run the ksh93 regression tests without requiring nmake. -# By Martijn Dekker 2020-05-14 -# Public domain. http://creativecommons.org/publicdomain/zero/1.0/ -# -# The manual: bin/shtests --man -# Brief help: bin/shtests --help -# -# By default, this runs your compiled arch/*/bin/ksh. -# -# Note: The test suite actually uses $SHELL to indicate the shell to test. But -# we cannot use the $SHELL environment value on entry to this wrapper script, -# as that is already used for the user's default login shell on most systems. - -# Process and remove any assignment-argument indicating the shell to test -for arg do - case $arg in - ( SHELL=* | KSH=* ) - KSH=${arg#*=} ;; - ( * ) set -- "$@" "$1" ;; - esac - shift -done - -# Find root dir of ksh source -mydir=$(dirname "$0") \ -&& mydir=$(CDPATH='' cd -P -- "$mydir/.." && printf '%sX' "$PWD") \ -&& mydir=${mydir%X} \ -|| exit -myarch=$("$mydir/bin/package" host type) || exit - -# Check if there is a ksh to test. -case ${KSH+set} in -( '' ) KSH=$mydir/arch/$myarch/bin/ksh ;; -esac -if ! test -x "$KSH" || ! test -f "$KSH"; then - printf '%s: shell not found: %s\n' "${0##*/}" "$KSH" >&2 - printf 'Specify a shell like: KSH=path/to/ksh bin/shtests\n' >&2 - exit 1 -fi - -# Ensure absolute path to ksh -KSH=$(CDPATH='' cd -P -- "$(dirname "$KSH")" \ - && printf '%s/%sX' "$PWD" "${KSH##*/}") \ -&& KSH=${KSH%X} - -# Run the test suite -CDPATH='' cd -P -- "$mydir/src/cmd/ksh93/tests" || exit -SHELL=$KSH -INSTALLROOT=${INSTALLROOT:-$mydir/arch/$myarch} -export SHELL INSTALLROOT -unset -v KSH -printf '#### Regression-testing %s ####\n' "$SHELL" -exec "$SHELL" shtests "$@" diff --git a/cde/programs/dtksh/ksh93/bin/silent b/cde/programs/dtksh/ksh93/bin/silent deleted file mode 100755 index 4ae93a22b..000000000 --- a/cde/programs/dtksh/ksh93/bin/silent +++ /dev/null @@ -1,36 +0,0 @@ -######################################################################## -# # -# This software is part of the ast package # -# Copyright (c) 1994-2011 AT&T Intellectual Property # -# Copyright (c) 2020-2021 Contributors to ksh 93u+m # -# and is licensed under the # -# Eclipse Public License, Version 1.0 # -# by AT&T Intellectual Property # -# # -# A copy of the License is available at # -# http://www.eclipse.org/org/documents/epl-v10.html # -# (with md5 checksum b35adb5213ca9657e911e9befb180842) # -# # -# Information and Software Systems Research # -# AT&T Research # -# Florham Park NJ # -# # -# Glenn Fowler # -# # -######################################################################## -# non-ksh stub for the nmake silent prefix -# @(#)silent (ksh 93u+m) 2021-12-31 - -while : -do case $# in - 0) exit 0 ;; - esac - case $1 in - *=*) export "$1" - shift - ;; - *) break - ;; - esac -done -"$@" diff --git a/cde/programs/dtksh/ksh93/docs/index.html b/cde/programs/dtksh/ksh93/docs/index.html deleted file mode 100644 index 1fedcdc14..000000000 --- a/cde/programs/dtksh/ksh93/docs/index.html +++ /dev/null @@ -1,6 +0,0 @@ - -AST Software - -The KornShell
- - diff --git a/cde/programs/dtksh/ksh93/docs/ksh/builtins.html b/cde/programs/dtksh/ksh93/docs/ksh/builtins.html deleted file mode 100644 index 30aa3cf40..000000000 --- a/cde/programs/dtksh/ksh93/docs/ksh/builtins.html +++ /dev/null @@ -1,710 +0,0 @@ - - - - - www/ksh/builtins.mm mm document - - - - - -
- -

-

-

Guidelines for writing ksh-93 built-in commands

-
David G. Korn -

-

-

-

Abstract

-One of the features of ksh93, the latest version of ksh, -is the ability to add built-in commands at run time. -This feature only works on operating systems that have the ability -to load and link code into the current process at run time. -Some examples of the systems that have this feature -are Linux, System V Release 4, Solaris, Sun OS, HP-UX Release 8 and above, -AIX 3.2 and above, and Microsoft Windows systems. -

-This memo describes how to write and compile programs -that can be loaded into ksh at run time as built-in -commands. -

-


INTRODUCTION

-A built-in command is executed without creating a separate process. -Instead, the command is invoked as a C function by ksh. -If this function has no side effects in the shell process, -then the behavior of this built-in is identical to that of -the equivalent stand-alone command. The primary difference -in this case is performance. The overhead of process creation -is eliminated. For commands of short duration, the effect -can be dramatic. For example, on SUN OS 4.1, the time to -run wc on a small file of about 1000 bytes, runs -about 50 times faster as a built-in command. -

-In addition, built-in commands may have side effects on the -shell environment. -This is usually done to extend the application domain for -shell programming. For example, there is a group of X-windows extension -built-ins that make heavy use of the shell variable namespace. -These built-ins are added at run time and -result in a windowing shell that can be used to write -X-windows applications. -

-While there are definite advantages to adding built-in -commands, there are some disadvantages as well. -Since the built-in command and ksh share the same -address space, a coding error in the built-in program -may affect the behavior of ksh; perhaps causing -it to core dump or hang. -Debugging is also more complex since your code is now -a part of a larger entity. -The isolation provided by a separate process -guarantees that all resources used by the command -will be freed when the command completes. -Resources used by a built-in must be meticulously maintained and freed. -Also, since the address space of ksh will be larger when built-in are loaded, -it may increase the time it takes ksh to fork() and -exec() non-built-in commands. -It makes no sense to add a built-in command that takes -a long time to run or that is run only once, since the performance -benefits will be negligible. -Built-ins that have side effects in the current shell -environment have the disadvantage of increasing the -coupling between the built-in and ksh, making -the overall system less modular and more monolithic. -

-Despite these drawbacks, in many cases extending -ksh by adding built-in -commands makes sense and allows reuse of the shell -scripting ability in an application specific domain. -This memo describes how to write ksh extensions. -

-


WRITING BUILT-IN COMMANDS

-There is a development kit available for writing ksh -built-ins as part of the AST (AT&T Software Technology) Toolkit. -The development kit has three directories, -include, lib, and bin. -It is best to set the value of the environment variable -PACKAGE_ast to the pathname of the directory -containing the development kit. -The include directory contains a subdirectory -named ast that contains interface prototypes -for functions that you can call from built-ins. The lib -directory contains the ast library -and a library named cmd that contains a version -of several of the standard POSIX[1] -utilities that can be made run time built-ins. -The lib/ksh directory contains shared libraries -that implement other ksh built-ins. -The bin directory contains build tools such as nmake[2]. -To add built-ins at runtime, it is necessary to build a shared library -containing one or more built-ins that you wish to add. -The built-ins are then added by running builtin -f shared_lib. -Since the procedure for building share libraries is system dependent, -it is best to use -nmake -using the sample nmake makefile below as a prototype. -The AST Toolkit also contains some examples of built-in libraries under -the src/cmd/kshlib directory. -

-There are two ways to code adding built-ins. One method is to replace -the function main with a function -b_name, where name is the name -of the built-in you wish to define. -A built-in command has a calling convention similar to -the main function of a program, -int main(int argc, char *argv[]). -except that it takes a third argument of type Shbltin_t* which can -be passed as NULL if it is not used. The definition for -Shbltin_t* is in <ast/shcmd.h>. -Instead of exit, you need to use return -to terminate your command. -The return value will become the exit status of the command. -The open built-in, installed in lib/ksh in the AST Toolkit, uses this method. -The Shbltin_t structure contains a field named shp which is -a pointer to the shell data that is needed for shell library callbacks. -It also contains the fields, shrun, shtrap, shexit, -and shbltin -that are function pointers to the shell library functions sh_run, sh_trap -sh_exit, and sh_addbuiltin, respectively. These functions -can be invoked without the need for runtime symbol lookup when the -shell is statically linked with libshell. -

-The alternative method is to create a function lib_init and -use the Shbltin_t.shbltin() function to add one or more built-ins. -The lib_init function will be called with two arguments. The -first argument will be 0 when the library is loaded and the second -argument will be of type Shbltin_t*. -The dbm_t and dss shell built-ins use this method. -

-No matter which way you add built-ins you should add the line -SHLIB(identifier) as the last line of one -of the built-in source file, where identifier is any C identifier. -This line provides version information to the shell builtin command -that it uses to verify compatibility between the built-in and ksh -implementation versions. builtin fails with a diagnostic on version -mismatch. The diagnostic helps determine whether ksh is out of -date and requires an upgrade or the built-in is out of date and requires -recompilation. -

-The steps necessary to create and add a run time built-in are -illustrated in the following simple example. -Suppose you wish to add a built-in command named hello -which requires one argument and prints the word hello followed -by its argument. First, write the following program in the file -hello.c: -

-
-#include     <stdio.h>
-int b_hello(int argc, char *argv[], void *context)
-{
-        if(argc != 2)
-        {
-                fprintf(stderr,"Usage: hello arg\n");
-                return(2);
-        }
-        printf("hello %s\n",argv[1]);
-        return(0);
-}
-SHLIB(hello)
-
- -

-Next, the program needs to be compiled. -If you are building with AT&T nmake use the following Makefile: -

-
-:PACKAGE: --shared ast
-hello plugin=ksh :LIBRARY: hello.c
-
- -and run nmake install to compile, link, and install the built-in shared library -in lib/ksh/ under PACKAGE_ast. -If the built-in extension uses several .c files, list all of these on -the :LIBRARY: line. -

-Otherwise you will have to compile hello.c with an option -to pick up the AST include directory -(since the AST <stdio.h> is required for ksh compatibility) -and options required for generating shared libraries. -For example, on Linux use this to compile: -

-
-cc -fpic -I$PACKAGE_ast/include/ast -c hello.c
-
- -and use the appropriate link line. -It really is best to use nmake because the 2 line Makefile above -will work on all systems that have ksh installed. -

-If you have several built-ins, it is desirable -to build a shared library that contains them all. -

-The final step is using the built-in. -This can be done with the ksh command builtin. -To load the shared library libhello.so from the current directory -and add the built-in hello, invoke the command, -

-
-builtin -f ./libhello.so hello
-
- -The shared library prefix (lib here) and suffix (.so here) be omitted; -the shell will add an appropriate suffix -for the system that it is loading from. -If you install the shared library in lib/ksh/, where ../lib/ksh/ is -a directory on $PATH, the command -
-
-builtin -f hello hello
-
- -will automatically find, load and install the built-in on any system. -Once this command has been invoked, you can invoke hello -as you do any other command. -If you are using lib_init method to add built-ins then no arguments -follow the -f option. -

-It is often desirable to make a command built-in -the first time that it is referenced. The first -time hello is invoked, ksh should load and execute it, -whereas for subsequent invocations ksh should just execute the built-in. -This can be done by creating a file named hello -with the following contents: -

-
-function hello
-{
-        unset -f hello
-        builtin -f hello hello
-        hello "$@"
-}
-
- -This file hello needs to be placed in a directory that is -in your FPATH variable, and the built-in shared library -should be installed in lib/ksh/, as described above. -

-


CODING REQUIREMENTS AND CONVENTIONS

-As mentioned above, the entry point for built-ins must either be of -the form b_name or else be loaded from a function named -lib_init. -Your built-ins can call functions from the standard C library, -the ast library, interface functions provided by ksh, -and your own functions. -You should avoid using any global symbols beginning with -sh_, -nv_, -and -ed_ -since these are used by ksh itself. -#define constants in ksh interface -files use symbols beginning with SH_ and NV_, -so avoid using names beginning with these too. -

-

Header Files

-The development kit provides a portable interface -to the C library and to libast. -The header files in the development kit are compatible with -K&R C[3], -ANSI C[4], -and C++[5]. -

-The best thing to do is to include the header file <shell.h>. -This header file causes the <ast.h> header, the -<error.h> header and the <stak.h> -header to be included as well as defining prototypes -for functions that you can call to get shell -services for your builtins. -The header file <ast.h> -provides prototypes for many libast functions -and all the symbol and function definitions from the -ANSI C headers, <stddef.h>, -<stdlib.h>, <stdarg.h>, <limits.h>, -and <string.h>. -It also provides all the symbols and definitions for the -POSIX[6] -headers <sys/types.h>, <fcntl.h>, and -<unistd.h>. -You should include <ast.h> instead of one or more of -these headers. -The <error.h> header provides the interface to the error -and option parsing routines defined below. -The <stak.h> header provides the interface to the memory -allocation routines described below. -

-Programs that want to use the information in <sys/stat.h> -should include the file <ls.h> instead. -This provides the complete POSIX interface to stat() -related functions even on non-POSIX systems. -

-

-

Input/Output

-ksh uses sfio, -the Safe/Fast I/O library[7], -to perform all I/O operations. -The sfio library, which is part of libast, -provides a superset of the functionality provided by the standard -I/O library defined in ANSI C. -If none of the additional functionality is required, -and if you are not familiar with sfio and -you do not want to spend the time learning it, -then you can use sfio via the stdio library -interface. The development kit contains the header <stdio.h> -which maps stdio calls to sfio calls. -In most instances the mapping is done -by macros or inline functions so that there is no overhead. -The man page for the sfio library is in an Appendix. -

-However, there are some very nice extensions and -performance improvements in sfio -and if you plan any major extensions I recommend -that you use it natively. -

-

Error Handling

-For error messages it is best to use the ast library -function errormsg() rather that sending output to -stderr or the equivalent sfstderr directly. -Using errormsg() will make error message appear -more uniform to the user. -Furthermore, using errormsg() should make it easier -to do error message translation for other locales -in future versions of ksh. -

-The first argument to -errormsg() specifies the dictionary in which the string -will be searched for translation. -The second argument to errormsg() contains that error type -and value. The third argument is a printf style format -and the remaining arguments are arguments to be printed -as part of the message. A new-line is inserted at the -end of each message and therefore, should not appear as -part of the format string. -The second argument should be one of the following: -

-
-
ERROR_exit(n):

-If n is not-zero, the builtin will exit value n after -printing the message. -
ERROR_system(n):

-Exit builtin with exit value n after printing the message. -The message will display the message corresponding to errno -enclosed within [ ] at the end of the message. -
ERROR_usage(n):

-Will generate a usage message and exit. If n is non-zero, -the exit value will be 2. Otherwise the exit value will be 0. -
ERROR_debug(n):

-Will print a level n debugging message and will then continue. -
ERROR_warn(n):

-Prints a warning message. n is ignored. -

-

Option Parsing

-The first thing that a built-in should do is to check -the arguments for correctness and to print any usage -messages on standard error. -For consistency with the rest of ksh, it is best -to use the libast functions optget() and -optusage()for this -purpose. -The header <error.h> includes prototypes for -these functions. -The optget() function is similar to the -System V C library function getopt(), -but provides some additional capabilities. -Built-ins that use optget() provide a more -consistent user interface. -

-The optget() function is invoked as -

-
-int optget(char *argv[], const char *optstring)
-
- -where argv is the argument list and optstring -is a string that specifies the allowable arguments and -additional information that is used to format usage -messages. -In fact a complete man page in troff or html -can be generated by passing a usage string as described -by the getopts command. -Like getopt(), -single letter options are represented by the letter itself, -and options that take a string argument are followed by the : -character. -Option strings have the following special characters: -
-
-
:
-Used after a letter option to indicate that the option -takes an option argument. -The variable opt_info.arg will point to this -value after the given argument is encountered. -
#
-Used after a letter option to indicate that the option -can only take a numerical value. -The variable opt_info.num will contain this -value after the given argument is encountered. -
?
-Used after a : or # (and after the optional ?) -to indicate the -preceding option argument is not required. -
[...]

-After a : or #, the characters contained -inside the brackets are used to identify the option -argument when generating a usage message. -
space

-The remainder of the string will only be used when generating -usage messages. -
-
-

-The optget() function returns the matching option letter if -one of the legal option is matched. -Otherwise, optget() returns -

-
-
':'
-If there is an error. In this case the variable opt_info.arg -contains the error string. -
0
-Indicates the end of options. -The variable opt_info.index contains the number of arguments -processed. -
'?'
-A usage message has been required. -You normally call optusage() to generate and display -the usage message. -
-
-

-The following is an example of the option parsing portion -of the wc utility. -

-
-#include <shell.h>
-while(1) switch(n=optget(argv,"xf:[file]"))
-{
-	case 'f':
-		file = opt_info.arg;
-		break;
-	case ':':
-		error(ERROR_exit(0), opt_info.arg);
-		break;
-	case '?':
-		error(ERROR_usage(2), opt_info.arg);
-		UNREACHABLE();
-}
-
- -

-

Storage Management

-It is important that any memory used by your built-in -be returned. Otherwise, if your built-in is called frequently, -ksh will eventually run out of memory. -You should avoid using malloc() for memory that must -be freed before returning from you built-in, because by default, -ksh will terminate you built-in in the event of an -interrupt and the memory will not be freed. -

-The best way to allocate variable sized storage is -through calls to the stak library -which is included in libast -and which is used extensively by ksh itself. -Objects allocated with the stakalloc() -function are freed when you function completes -or aborts. -The stak library provides a convenient way to -build variable length strings and other objects dynamically. -The man page for the stak library is contained -in the Appendix. -

-Before ksh calls each built-in command, it saves -the current stack location and restores it after -it returns. -It is not necessary to save and restore the stack -location in the b_ entry function, -but you may want to write functions that use this stack -are restore it when leaving the function. -The following coding convention will do this in -an efficient manner: -

-
-yourfunction()
-{
-        char	*savebase;
-        int	saveoffset;
-        if(saveoffset=staktell())
-        	savebase = stakfreeze(0);
-        ...
-        if(saveoffset)
-        	stakset(savebase,saveoffset);
-        else
-        	stakseek(0);
-}
-
- -

-


CALLING ksh SERVICES

-Some of the more interesting applications are those that extend -the functionality of ksh in application specific directions. -A prime example of this is the X-windows extension which adds -builtins to create and delete widgets. -The nval library is used to interface with the shell -name space. -The shell library is used to access other shell services. -

-

The nval library

-A great deal of power is derived from the ability to use -portions of the hierarchical variable namespace provided by ksh-93 -and turn these names into active objects. -

-The nval library is used to interface with shell -variables. -A man page for this file is provided in an Appendix. -You need to include the header <nval.h> -to access the functions defined in the nval library. -All the functions provided by the nval library begin -with the prefix nv_. -Each shell variable is an object in an associative table -that is referenced by name. -The type Namval_t* is pointer to a shell variable. -To operate on a shell variable, you first get a handle -to the variable with the nv_open() function -and then supply the handle returned as the first -argument of the function that provides an operation -on the variable. -You must call nv_close() when you are finished -using this handle so that the space can be freed once -the value is unset. -The two most frequent operations are to get the value of -the variable, and to assign value to the variable. -The nv_getval() function returns a pointer to the -value of the variable. -In some cases the pointer returned is to a region that -will be overwritten by the next nv_getval() call -so that if the value isn't used immediately, it should -be copied. -Many variables can also generate a numeric value. -The nv_getnum() function returns a numeric -value for the given variable pointer, calling the -arithmetic evaluator if necessary. -

-The nv_putval() function is used to assign a new -value to a given variable. -The second argument to putval() is the value -to be assigned -and the third argument is a flag which -is used in interpreting the second argument. -

-Each shell variable can have one or more attributes. -The nv_isattr() is used to test for the existence -of one or more attributes. -See the appendix for a complete list of attributes. -

-By default, each shell variable passively stores the string you -give with with nv_putval(), and returns the value -with getval(). However, it is possible to turn -any node into an active entity by assigning functions -to it that will be called whenever nv_putval() -and/or nv_getval() is called. -In fact there are up to five functions that can -associated with each variable to override the -default actions. -The type Namfun_t is used to define these functions. -Only those that are non-NULL override the -default actions. -To override the default actions, you must allocate an -instance of Namfun_t, and then assign -the functions that you wish to override. -The putval() -function is called by the nv_putval() function. -A NULL for the value argument -indicates a request to unset the variable. -The type argument might contain the NV_INTEGER -bit so you should be prepared to do a conversion if -necessary. -The getval() -function is called by nv_getval() -value and must return a string. -The getnum() -function is called by the arithmetic evaluator -and must return double. -If omitted, then it will call nv_getval() and -convert the result to a number. -

-The functionality of a variable can further be increased -by adding discipline functions that -can be associated with the variable. -A discipline function allows a script that uses your -variable to define functions whose name is -varname.discname -where varname is the name of the variable, and discname -is the name of the discipline. -When the user defines such a function, the settrap() -function will be called with the name of the discipline and -a pointer to the parse tree corresponding to the discipline -function. -The application determines when these functions are actually -executed. -By default, ksh defines get, -set, and unset as discipline functions. -

-In addition, it is possible to provide a data area that -will be passed as an argument to -each of these functions whenever any of these functions are called. -To have private data, you need to define and allocate a structure -that looks like -

-
-struct yours
-{
-        Namfun_t	fun;
-	your_data_fields;
-};
-
- -

-

The shell library

-There are several functions that are used by ksh itself -that can also be called from built-in commands. -The man page for these routines are in the Appendix. -

-The sh_addbuiltin() function can be used to add or delete -builtin commands. It takes the name of the built-in, the -address of the function that implements the built-in, and -a void* pointer that will be passed to this function -as the third argument whenever it is invoked. -If the function address is NULL, the specified built-in -will be deleted. However, special built-in functions cannot -be deleted or modified. -

-The sh_fmtq() function takes a string and returns -a string that is quoted as necessary so that it can -be used as shell input. -This function is used to implement the %q option -of the shell built-in printf command. -

-The sh_parse() function returns a parse tree corresponding -to a give file stream. The tree can be executed by supplying -it as the first argument to -the sh_trap() function and giving a value of 1 as the -second argument. -Alternatively, the sh_trap() function can parse and execute -a string by passing the string as the first argument and giving 0 -as the second argument. -

-The sh_isoption() function can be used to set to see whether one -or more of the option settings is enabled. -

-


References

-

-

- -
[1]
-POSIX - Part 2: Shell and Utilities, -IEEE Std 1003.2-1992, ISO/IEC 9945-2:1993. -
[2]
-Glenn Fowler, -A Case for make, -Software - Practice and Experience, Vol. 20 No. S1, pp. 30-46, June 1990. -
[3]
-Brian W. Kernighan and Dennis M. Ritchie, -The C Programming Language, -Prentice Hall, 1978. -
[4]
-American National Standard for Information Systems - Programming -Language - C, ANSI X3.159-1989. -
[5]
-Bjarne Stroustroup, -C++, -Addison Wesley, xxxx -
[6]
-POSIX - Part 1: System Application Program Interface, -IEEE Std 1003.1-1990, ISO/IEC 9945-1:1990. -
[7]
-David Korn and Kiem-Phong Vo, -SFIO - A Safe/Fast Input/Output library, -Proceedings of the Summer Usenix, -pp. , 1991. -
-

-


- - - - - - -
March 13, 2012
-

- -

- - - diff --git a/cde/programs/dtksh/ksh93/docs/ksh/examples.html b/cde/programs/dtksh/ksh93/docs/ksh/examples.html deleted file mode 100644 index e17bc007f..000000000 --- a/cde/programs/dtksh/ksh93/docs/ksh/examples.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - www/ksh/examples.mm mm document - - - - - -
- - - -

-

Sample Functions

-

- - - - -
-dirs    getopt    popd    title
-emacs_keybind    keybind    pushd    vi_keybind
- -

-


Sample Scripts

-

- - - - -
-cgi-lib.ksh    env    which     
-dump-cgi.ksh    line          
-

-


- - - - - - -
March 13, 2012
-

- -

- - - diff --git a/cde/programs/dtksh/ksh93/docs/ksh/faq.html b/cde/programs/dtksh/ksh93/docs/ksh/faq.html deleted file mode 100644 index 7ae85bf6d..000000000 --- a/cde/programs/dtksh/ksh93/docs/ksh/faq.html +++ /dev/null @@ -1,1004 +0,0 @@ - - - - - general shell - - - - - - -
- -

-

general

-
-
- -
What is KornShell?
- -KornShell is a command and scripting language that is a superset of the System V UNIX shell, -aka, BourneShell (or -sh). - -
What is ksh?
- -ksh is the name of the program that implements the KornShell language. - -
What is the history of ksh?
- -ksh was written by David Korn at Bell Telephone Laboratories. -David Korn is currently at AT&T Research. -The first version of ksh was in 1983. -It was the first shell to have command line editing with both emacs and vi style interaction. -The 1986 version was the first to offer multibyte support. -The 1988 version of ksh is the version that was adopted by System V Release 4 UNIX -and was a source document for the IEEE POSIX and ISO shell standards. -The 1993 version is a major rewrite of the 1988 version and focuses more on scripting. - -
Where is the official description of the KornShell language?
- -The Bolsky and Korn book, -The KornShell Command and Programming Language, -published by Prentice Hall, defines the 1988 version. -The newer Bolsky and Korn book, -The New KornShell Command and Programming Language, -also published by Prentice Hall, describes the 1993 version. -There are many new features since this book was published and -the man page for ksh93 is kept up to date. - -
What are the major new features of KornShell 1993?
- -The only major new interactive features are key binding and tab completion. -Major new language features are floating point arithmetic, -associative arrays, complete ANSI C printf, name reference -variables, new expansion operators, dynamic loading of -built-in commands, active variables, and compound variables. -Active and compound variables allow shell variables to -behave like objects. The ability to define types was added in 2009. -In addition, ksh93 has been written to be -extensible with an C language API for programming extensions. - -
Are any further releases of ksh planned?
- -Yes, the KornShell language and ksh implementation are in active development. -Most of the focus will be on scripting and reusability. - -
Why are newer release of ksh still called ksh93?
- -We started the AST/ksh OpenSource release process in the late 90's. -At that point ksh93 was the well-known name for ksh. -The OpenSource release was finally granted in March 2000. -No one has since volunteered to repeat that process for kshXX. - -
How can I determine the release or version of a particular ksh?
- -The current version and release string may be accessed by -${.sh.version} -and -$KSH_VERSION. -The format is Version features 93version[-/+] release: -
    -
  • -features -- -compile time features, typically enabled by SHOPT_foo state variables in the -ksh93 Makefile. -A single letter represents each feature: -
      -
    • -A -(SHOPT_AUDIT) -
    • -B -(SHOPT_BASH) -bash compatibility mode. -
    • -J -(SHOPT_COSHELL) --lcoshell job pools. -
    • -j -(SHOPT_BGX) -
    • -L -(SHOPT_ACCT) -
    • -M -(SHOPT_MULTIBYTE) -
    • -P -(SHOPT_PFSH) -
    • -R -(SHOPT_REGRESS) -
    -
  • -version-- -a lowercase letter signifying major release points. -An optional - following features signifies an alpha release. -The first stable release has no -. -An optional + signifies a stable release with bug patches and minor enhancements. -
  • -release-- -the release date in YYYY-MM-DD form. -This date corresponds to AST package and git repository releases. -
-KSH_VERSION -in a numeric context is an integer that encodes the release -YYYYMMDD. - -
What new features are planned for ksh?
- -We are in the early stage of planning but the likely additions -are namespaces, ability to read XML and JSON object into shell variables, -and handling of queued signals. -Support for multi-threading is also being considered. - -
Is KornShell public domain?
- -Yes, the language description is public domain and -can be reimplemented. -Some of the KornShell language features have been reimplemented -in the GNU shell, bash, in zsh and mksh, and in pdksh, a public domain -implementation. - -
Is ksh public domain?
- -No, earlier versions were owned by both AT&T and Novell. -The 1993 version is owned by both Lucent and AT&T. - -
Is source code available?
- -Starting in March 2000, the ksh93 source is available -as part of a larger collection of software called -the ast-open software package which can be downloaded -from the -github page. - -
What are the licensing terms?
- -The exact license terms can be found on the -licence page. - -
Does the license allow binaries to be freely redistributed?
- -Yes, provided you make the license terms available to -everyone you distribute binaries to. - -
If I make changes to the code, do I have to make them public?
- -No, you do not have to make them public. -However, if you distribute the changes, you must allow us to be able -to get these changes and distribute them along with the source. - -
Why do some vendors still ship ksh88, not ksh93?
- -Since ksh88 was included in System V release 4, most vendors -have just included this version. However most Linux systems -and Mac OS provide ksh93 version 's' or later. Solaris11 uses -ksh93 as /bin/sh. - -
Do you provide support for ksh?
- -No, we will try to fix any bugs we hear about in future -releases, but we do not provide any official support. - -
Is ksh supported commercially?
- -Software vendors that supply ksh with -their systems typically support it for that system. - -
What is pdksh and is it related to ksh or KornShell?
- -pdksh is a public domain version of a UNIX shell that is -unrelated to ksh. -It supports most of the 1988 KornShell language features and some of the 1993 features. -Some KornShell scripts will not run with pdksh. - -
How is the MKS Toolkit KornShell related to KornShell?
- -MKS Toolkit KornShell is a completely independent implementation -that supports a subset of the 1988 KornShell language. - -
What systems does ksh run on?
- -ksh has been written to be portable. -It has been ported to virtually run on every known UNIX system. -In addition, it runs on non-UNIX systems such as IBM's MVS using OpenEdition, and -Microsoft's Windows 9X, Windows NT and Windows 2000. -ksh is part of the UWIN (Unix for Windows) -software, - -
Does ksh conform to the IEEE POSIX and ISO shell standard?
- -The 1993 version should conform to the 1992 standard. -At one point it had passed the test suite created by X/OPEN. - -
Will KornShell 88 scripts run with KornShell 93?
- -In almost all cases, the answer is yes. -However, the IEEE POSIX and ISO standards required a few -changes that could cause scripts to fail. -There is a separate document that lists all known incompatibilities. - -
Can ksh run as /bin/sh?
- -We have installed ksh as /bin/sh on several systems without -encountering any problems. It is /bin/sh on Solaris11. -Our Linux systems use this instead of bash. - -
-
- -

-


interactive

-
-
- -
How do I get separate history files for shell?
- -ksh uses a shared history file for all shells that -use the same history file name. -This means that commands entered in one window will be seen by -shells in other windows. -To get separate windows, the HISTFILE variable needs to be set to different name -before the first history command is created. - -
How do I get the time of day in my prompt?
- -You can use printf with supports the %T format for time and date formatting. -For example, the format %(%H:%M:%S)T specifies time in hour, minute, second -format and if no argument is specified, the current time is used. Thus setting -PS1='$(printf "%(%H:%M:%S)T" $' will output the time of day before the -$ prompt. - -
Why does the screen width not function correctly when non-printing characters are in my prompt?
- -The shell computes the screen width by subtracting the width of the prompt from the screen width. -To account for non-printing characters, for example escape sequences that display in the title -bar, follow these characters with a carriage return. -The shell starts recomputing the width after each carriage return. - -
What is the PS4 prompt and how is it used?
- -The PS4 prompt is evaluated and displayed before each line when -running an execution trace. -If unset, a + and a <space> will -be output before each line in the trace. -Putting '$LINENO' inside PS4 will cause the line number to be displayed. -Putting '$SECONDS' in the PS4 prompt will cause the elapsed time -to be displayed before each line. -Note that single quotes are used to prevent the expansion from happening -when PS4 is defined. - -
How is keybinding done?
- -ksh93 provides a KEYBD trap that gets executed whenever a key -is entered from the keyboard. -Using this trap, and the associative -array feature of ksh93, a keybind function can easily be written -which will map any entered key sequence to another key sequence. - -
How do I get the arrow keys to work?
- -Starting with the 'h' point release, on most keyboards you -do not have to do anything to get the arrow keys to work. -However, if they do not generate standard escape sequences, -then you will have to use a keybinding function to get them -to work. - -
Does ksh support file name completion?
- -Yes, it does. -The default key binding is <ESC><ESC> -however, starting with the 'g' point release, <TAB> also works -for completion. - -
Does ksh support command completion?
- -If you perform completion on the first word of a command, -ksh will do completion using aliases, functions, and commands. - -
Is completion programmable?
- -Yes, using the key binding mechanism, you can script the behavior -of any key and therefore cause the current contents of any -line to be replaced by any other line. - -
Is there any way to get the command-line editor to go to more than a single line?
- -The multiline option (now on by default) allows lines longer than the width -of the screen to be displayed on multiple lines on the screen. -Also in vi-mode, if you hit 'v' while in control mode, it will bring -up a full screen version of vi on the current command. -The command -will execute when you exit vi. - -
What is predictive editing?
-In 2010, a compile option was added that cause the shell to try to predict -what you were trying to type by looking in the history file for all lines -that matched and presenting them as a menu. Any line starting with # would -use the characters you type to find matching lines from the history file. -If you find the line you wanted, you can enter the number followed by -<TAB> or newline. However bugs in earlier version led to core dumps. - - -
Can I use the shell line editor on other commands?
- -The command ie, that comes along with shell, can be used -to run line input oriented commands with command line editing. - -
When I do echo $?, I am getting 267. What does this mean?
- -ksh93 reports process that terminate with a signal as 256+signo. -Earlier versions used 128+signo but this makes it impossible -to distinguish from a command exit with that value. -If you run -
-
-kill -l $?
-
- -on this signal number, it will give the name of the signal -that caused this exit. - -
When I type builtin, I notice that some of these are full pathnames. What does this mean?
- -Builtins that are not bound to pathnames are always searched -for before doing a path search. -Builtins that are bound -to pathnames are only executed when the path search would -bind to this pathname. - -
What is a self generating man page?
- -A self generating man page is one that is generated by the -option parser within that command using an extended version -of the getopts function. -The man page can be generated in html, -troff, or directly for the terminal. -Most builtin commands -in the shell have self generating man pages so that you -can run for example, -kill --man -or -kill --html -to get -the description of kill to the screen or as an html file. -All self-documenting output is to the standard error, -so you must redirect 2>... to capture the output. -

-This same method can also be used for shell scripts. -Run -getopts --man -for more details. - -

What is autoloading?
- -Autoloading was a method used in ksh88, and still permitted in ksh93 -to declare that a name corresponded to a function. -The function -would be loaded and executed when first referenced. -This was -necessary since FPATH was always searched after PATH with ksh88 -and therefore if you defined a function whose name was the same -as that of a program on your path, the program on your path -would have been executed. -With ksh93, when a pathname is -encountered that is on PATH, but also is in FPATH, this directory -is assumed to be a function directory. -Thus, you can have -function directories searched before program directories so -that autoloading is no longer needed. - -
Why does the output from 'time command 2> file' come out on the screen?
- -The time command is a compound command in ksh and time is a reserved -word It can be followed by any pipeline. Thus, redirections applied -at the end are for the command, not to time itself. You can use -time {...;} 2> file to capture the timing output to a file. Note, -that with ksh, time works with all commands, for example, -time for i; do xxx;done. - -
When I run 'mv * ../elsewhere' I so that get '-ksh: mv: cannot execute [Arg list too long]', what causes this?
- -UNIX systems have a limit to the space consumed by command arguments and -environment variables when running commands that are not built into -the shell. The configuration parameter ARG_MAX defines this limit. -You can run 'getconf ARG_MAX' to find the limit for your system. Note -that the shell expands * to the list of files in the current directory -before running mv. In many case the xargs or tw command can be -used to work around this problem by splitting the line into chunks -and invoking the command. Another way to work around this limit -is to make the command a builtin. On systems in which the cmd -library is installed, you can invoke 'builtin -f cmd mv' to make -mv a shell builtin in which case the line length limit no longer -applies. Another alternative is to use a for loop and invoke -the mv command for each file, for example, -'for i in *;do mv $i ../elsewhere;done'. -Starting with ksh93o+, a new feature was added to ksh to overcome -this limit in some cases. If a command is preceded by -'command -x', and it fails because there are two many arguments, -the command will be run multiple times with subsets of the arguments. -However, the change in ksh93o+ does not work in the above case -because the ../elsewhere is not used for each subset. This problem -was resolved starting in ksh93p so that -command -x mv * ../elsewhere -should work. Note that it is possible to do alias mv='command -x mv' - -
Is there any way to generate the list of .c files in the current directory and all the subdirectories?
- -Starting with ksh93o+, the globstar option (set -G or set -o globstar) -was added. With globstar enabled, ** by itself matches zero or more -directories or files, and **/ matches zero or more directories so that -**/*.c will match all .c files under the current directory. - -
Is there any way to prevent sending a HUP signal to a job when I log out if I didn't nohup the job?
- -Yes, the disown command tells ksh not to forward the HUP signal -to the specified jobs when it disconnects. - -
-
- -

-


programming

-
-
- -
What is the difference between * and @, for example, and ?
- -When used outside of "", they are equivalent. -However, within -double quotes, "$@" produces one argument for each positional -parameter, and "$* produces a single argument. -Note that "$@" -preserves arguments lists, whereas $* may not unless both -word splitting and pathname expansion are disabled. - -
Why do I need spaces around { and } but not around ( and )?
- -The characters ( and ) are shell metacharacters and are always -treated specially. -For historical reasons, { and } were -treated as reserved words and are only special as separate -words at locations in which a command can begin. - -
How do I get read to maintain the \ characters?
- -Use read -r instead. - -
How can I a write a ksh script that responds directly to each character so that you user just has to enter y, not y<return>?
- -There are two ways to do this. -The easiest is to use -
-
-read -n1 x
-
- -Alternatively, you could do -
-
-function keytrap
-{
-	.sh.edchar=${sh.edchar}$'
-}
-trap keytrap KEYBD
-
- -and then -
-
-read x
-
- - -
What is the purpose of $'...'?
- -The $'...' string literal syntax was added to ksh93 to solve the problem -of entering special characters in scripts. -It uses -ANSI C rules to translate the string between the '...'. -It would have been cleaner to have all "..." strings handle -ANSI C escapes, but that would not be backward compatible. - -
What is the -n option used for?
- -You should always run ksh -n on each script you write. -The -n -option will check for syntax errors on paths that might not -even be checked when you run the script. -It also produces -a number of warning messages. - -
Why are both `...` and $(...) used for command substitution?
- -The `...` method has some rather strange quoting rules -and does not nest easily. -$(...) was added to ksh88 to -make command substitution easy to use. -`...` is provided -for backwards compatibility only. - -
How can I tell if all the commands of a pipeline have succeeded?
- -The pipefail option was added to the 'g' point release of ksh93. -With pipefail set, a pipeline will fail if any element of the -pipeline fails. -The exit status will be that of the first -command that has failed. - -
What is the difference between [...] and [[...]]?
- -The [[...]] is processed as part of the shell grammar -whereas [...] is processed like any other command. -Operators and operands are detected when the command is -read, not after expansions are performed. -The shell does not -do word splitting or pathname generation inside [[...]]. -This allows patterns to be specified for string matching -purposes. You should use [[...]] instead of [...] and test. - -
How come [[ $foo == $bar ]] is true and [[ $bar == $foo ]] is false?
- -The == operator is not symmetrical. -It takes a string on the left -and a pattern on the right. -However, if you double quote the right -hand side, which removes the special meaning of pattern match -characters, then this becomes a string comparison so that -[[ "$foo" == "bar" ]] and [[ "$bar" == "$foo" ]] are equivalent. - -
Why does ksh93 have print since echo already exists and is widely used?
- -The behavior of echo varies from system to system. -The POSIX standard does not define the behavior of echo when -the first argument beings with a - or when any argument -contains a  character. -This makes echo pretty useless for -use in portable scripts. - -
What is $bar after running 'echo foo | read bar'?
- -The answer is foo. -ksh runs the last component of a pipeline -in the current process. -Some shells run it as a subshell -as if you had invoked it as echo foo | (read bar). - -
How can I access a substring of a variable?
- -The syntax ${varname:offset:len} can be used to generate -the string of length len starting at the specified -offset. String offsets start at 0. If :len is omitted, -then the remainder of the string will be used. Both offset -and len can be arithmetic expressions. A negative offset is -subtracted from the last offset. - -
What is the difference between ((expr)) and $((expr))?
- -((expr)) is a command that evaluates an arithmetic expression. -The exit status of this command is 0 if the expression -evaluates to non-zero and is 1 if it evaluates to 0. -0 is an string expansion that expands to a string -representation of the value of this arithmetic expression. -It can be used anywhere a variable substitution is permitted. -

- -

What is the difference between $((x*y)) and $(($x*$y))?
- -In the first case the value of x and the value of y are multiplied -together, and then their result is converted to a string. -In the -second case variables $x, *, and $y are concatenated to form -an arithmetic expression which is then evaluated. -This can -yield different results, for example, -
-
-x=2+3 y=4+5
-print $((x*y)) \$(($x*$y))
-45 19
-When x and y are numeric the first form is recommended for better
-performance.
-
- - -
How do I handle filenames with spaces in them?
- -To be POSIX conforming, ksh has to do word splitting and -pathname expansion the results of substitutions. -You can -enclose variable substitutions in "..." to prevent both -word splitting and pathname expansion. -Alternatively, -you can disable word splitting by setting IFS='' and -pathname generation with set -o noglob. - -
What are active variables?
- -By default shell variables are passive. -They hold values -given to them on assignment, and return values on reference. -Active variables allow the assignment and reference (and -other actions) be controlled by functions specific to that -variable. -At the shell level, a 'get', 'set', or 'unset' -shell function can be defined for any variable to make them -active, so that the function foo.set will be invoked whenever -the variable foo is assigned a value. -At the C interface -level, several functions can be stacked together for an -active variable. - -
What is the difference between function name and name()?
- -In ksh88 these were the same. -However, the POSIX standard -choose foo() for functions and defined System V Release 2 -semantics to them so that there are no local variables -and so that traps are not scoped. -ksh93 keeps the ksh88 -semantics for functions defined as function name, and -has changed the name() semantics to match the POSIX -semantics. -Clearly, -function -name -is more useful. - -
What is the naming conventions for files in FPATH and can one file contain more than one function definition?
- -You can have more than one function defined in each file defined -in FPATH and all of them will be added to the list of known -functions. Any commands placed in this file outside of function -definitions will be invoked first. The name of the file must be -that of the first function you invoke. If you have several functions -defined in one file, then you should create a link to each of the -function names that can potentially be invoked first. - -
What are name reference variables and how are they used?
- -Reference variables are variables in which all references -and assignments refer to the variable that they reference. -For example, -
-
-typeset -n name=$1
-name=value
-
- -is equivalent to -
-
-eval \$1='value'
-
- -References are most useful for passing arguments such as -arrays to functions. - -
If i=1 and var1=some value, how do I print var$i to get its value?
- -Either use -
-
-eval print var\$i
-
- -or -
-
-typeset -n x=var$i
-print $x
-
- - -
How can I shift the elements of an array?
- -The shift special builtin-command only works for positional -parameters. -However, noting that array subscripts start at 0, you can use -
-
-typeset -A name "${name[@]:1}"
-
- -to shift the array. - -
Why are the braces required with array references, e.g. ${x[1]}?
- -It would be nice to do $x[1], but the POSIX shell would expand $x -and then search for the file pattern resulting by concatenating [1]. -ksh is POSIX compatible. - -
How do I get the list of subscript names for an associative array?
- -The prefix operator ! in variable expansions can be used to get names. -To get the names of subscripts for an array, associative -or indexed, use ${!var[@]}. - -
How do I do global substitutions on the contents of shell variables?
- -Use // instead of / for global substitution, ${var//aa/bb} will -expand to the value of var with each "aa" replaced by "bb". - -
How can I convert %XX values to ASCII?
- -You can convert this to a sequence of ANSI C strings and then eval that -string, for example suppose the variable 'foo' contains %XX strings, then -
-
-eval print -r -- "\$'${foo//'%'@(??)/'\x\1"'\$'"}'"
-
- -will print out the string in ASCII. - -
I want to use exec to open a file. How do I prevent the script from exiting if the exec fails?
- -If you run -
-
-command exec ... || error ...
-
- -then error will be executed if the exec fails, but the script -will not terminate. -The command builtin will prevent the shell -from exiting when special built-ins fail. - -
How do I execute a builtin inside a function of the same name?
- -You use the command builtin for this. -For example, -
-
-function cd
-{
-	command cd "$@" && title "$PWD"
-}
-
- -will run the builtin command cd from within the function cd -rather than calling the function cd recursively. - -
How are variables scoped in ksh?
- -The scoping of variables was not defined for ksh88 but in ksh93 -static scoping was specified. -For example the output from -
-
-function f1
-{
-	print foo=$foo
-}
-function f2
-{
-	typeset foo=local
-	f1
-}
-foo=global
-f2
-
- -will be "global". -To get f2 to cause f1 to print the local -value of foo, f2 can run "foo=$foo f1" instead. - -
Can you write a self reproducing program in KornShell?
- -Yes, the following program is self reproducing. -Any shorter ones? -
-
-n="
-" q="'" x="cat <<-!" y=! z='n="$n" q="$q" x="$x" y=$y z=$q$z$q$n$x$n$z$n$y'
-cat <<-!
-n="$n" q="$q" x="$x" y=$y z=$q$z$q$n$x$n$z$n$y
-!
-
- - -
-
- -

-


redirections

-
-
- -
How do I redirect both standard input and standard output to a file?
- -Add the following redirections to the command. -> file 2> &1. -This will redirect standard output (file descriptor 1) to "file" and -standard error (file descriptor 2) to the same place as file descriptor 1. -ksh redirection allows you to redirect any single digit file descriptor -by putting the descriptor number in front of the redirection operator -with no intervening space. - -
Is there a way for the shell to pick the file number when I open a file?
- -Yes, a redirection operator operator can be preceded by {n} without any -intervening space where n is the name of a variable. The file descriptor -will be placed in variable n. - -
How do I connect to a socket from a shell script?
- -exec 3<> /dev/tcp/hostname/portnum -will open a tcp connection to portnum on hostname for -reading and writing on file descriptor 3. -You can then -use read and print statements with file descriptor 3, -or redirection operators <&3 or >&3 to use these connections. - -
How do I seek to a given location in a file?
- -The redirection operators <# and ># allow you to seek to a specified -location in a file. The operator can be followed by an arithmetic -expression contained in ((...)). The variables CUR and EOF can be used -in the arithmetic expression to get relative locations or locations -relative to the end of file respectively. -Alternatively, <# and ># can be followed by a shell pattern. In this -case, the file will be positioned to beginning of the next line -containing this pattern. - -
What is the <<< redirection operator?
- -It denotes a here-document in which the document is contained the -argument that follows <<< and therefore there is no delimiter. - -
What is the >; redirection operator?
- -This operator writes the output into a temporary file in the same -directory as the file specified after >;. If the command completes -successfully, then the file is replaced. Otherwise, the -original file is unchanged and the temporary file removed. - -
What is the <>; redirection operator?
- -The file is opened for reading and writing as with <>. However, -when the file is closed it is truncated to the its current location. - -
-
- -

-


extensions

-
-
- -
Is there a shell compiler?
- -There is a separate command named shcomp that will convert -a script into an intermediate machine independent form. -The shell will detect this format whenever it runs a script and execute -directly from this intermediate format. - -
What is the advantage of making commands built-in?
- -The startup time is reduced by a couple of orders of magnitude. -In addition, built-in commands can access ksh internals. - -
What is the disadvantage of making commands built-in?
- -Errors in these built-ins can cause the shell to crash. - -
How do I add built-in commands?
- -There are two ways to do this. -One is write a shared library -with functions whose names are b_xxxx where xxxx is the name of -the builtin. -The function b_xxxx takes three arguments. -The first -two are the same as a mail program. -The third parameter is -a pointer argument which will point to the current shell context. -The second way is to write a shared library with a function named -lib_init(). -This function will be called with an argument of 0 -after the library is loaded. -This function can add built-ins -with the sh_addbuiltin() API function. -In both cases, the -library is loaded into the shell with the "builtin" utility. - -
Can ksh93 be embedded?
- -Yes, ksh93 can be compiled as a shared or dynamically linked -library which can be embedded into applications. -There is -an API for interfacing to shell variables and to several of -the internal shell functions. - -
Can I write GUI applications with ksh?
- -There are two extensions to ksh that can be used to write -GUI applications as shell script. -One is dtksh which -was written by Steve Pendergrast at Novell and is -included with the Common Desktop Environment, CDE. -The other is -tksh which was written by Jeff Korn. -tksh combines the tk graphics -package with ksh93 and reimplements the tcl language -as an extension so that both tcl and ksh scripts -can run in the same address space. -The source for tksh -is included in the ast-open package. - -
-
- - - - - -
show all answershide all answers
-

-


- - - - - - -
June 19, 2012
-

- -

- - - diff --git a/cde/programs/dtksh/ksh93/docs/ksh/features.html b/cde/programs/dtksh/ksh93/docs/ksh/features.html deleted file mode 100644 index 978f01df4..000000000 --- a/cde/programs/dtksh/ksh93/docs/ksh/features.html +++ /dev/null @@ -1,207 +0,0 @@ - - - - - www/ksh/features.mm mm document - - - - - -
- - - -

-

ksh features

-KSH-93 is the most recent version of the KornShell Language described in -The KornShell Command and Programming Language, -by Morris Bolsky and David Korn of AT&T Research. -The KornShell is a shell programming language, -which is upward compatible with -sh -(the Bourne Shell), -and is intended to conform to the IEEE P1003.2/ISO 9945.2 Shell and -Utilities standard. -KSH-93 provides an enhanced programming environment in -addition to the major command-entry features of the BSD -shell -csh. -With KSH-93, medium-sized programming tasks can be -performed at shell-level without a significant loss in performance. -In addition, -sh -scripts can be run on KSH-93 without modification. -

-The code should conform to the IEEE POSIX 1003.1 standard and to the -proposed ANSI C standard so that it should be portable to all -such systems. -Like the previous version, KSH-88, -it is designed to accept eight bit character sets -transparently, thereby making it internationally compatible. -It can support multi-byte characters sets with some characteristics -of the character set given at run time. -

-KSH-93 provides the following features, many of which were also inherent -in KSH-88: - -

-

Enhanced Command Re-entry Capability

-The KSH-93 history -function records commands entered at any shell level and stores -them, up to a user-specified limit, even after you log off. -This allows you to re-enter long commands with a few keystrokes -- even those commands you entered yesterday. -The history file allows for eight bit characters in -commands and supports essentially unlimited size histories. - -

-

In-line Editing

-In -sh -the only way to fix mistyped -commands is to backspace or retype the line. -KSH-93 allows you -to edit a command line using a choice of EMACS-TC or -vi -functions. -You can use the in-line editors to complete filenames as -you type them. -You may also use this editing feature when entering -command lines from your history file. -A user can capture keystrokes and rebind keys to customize the -editing interface. - -

-

Extended I/O Capabilities

-KSH-93 provides several I/O -capabilities not available in -sh, -including the ability to: -
    -
  • -specify a file descriptor for input and output -
  • -start up and run co-processes -
  • -produce a prompt at the terminal before a read -
  • -easily format and interpret responses to a menu -
  • -echo lines exactly as output without escape processing -
  • -format output using printf formats. -
  • -read and echo lines ending in "\e". -
- -

-

Improved performance

-KSH-93 executes many scripts faster -than the System V Bourne shell. -A major reason for this is -that many of the standard utilities are built-in. -To reduce the time to initiate a command, KSH-93 allows -commands to be added as built-ins at run time -on systems that support dynamic loading such as System V Release 4. - -

-

Arithmetic

-KSH-93 allows you to do integer arithmetic in any -base from two to sixty-four. -You can also do double -precision floating point arithmetic. -Almost the complete set of C language operators are available -with the same syntax and precedence. -Arithmetic expressions can be used to as an argument expansion -or as a separate command. -In addition, there is an arithmetic for command that works -like the for statement in C. - -

-

Arrays

-KSH-93 supports both indexed and associative arrays. -The subscript for an indexed array is an arithmetic expression, -whereas, the subscript for an associative array is a string. - -

-

Functions and Aliases

-Two mechanisms - functions and -aliases - can be used to assign a user-selected identifier to -an existing command or shell script. -Functions allow local variables and provide scoping -for exception handling. -Functions can be searched for and loaded on first reference the -way scripts are. - -

-

Substring Capabilities

-KSH-93 allows you to create a -substring of any given string either by specifying the starting -offset and length, or by stripping off leading -or trailing substrings during parameter substitution. -You can also specify attributes, such as upper and lower case, -field width, and justification to shell variables. - -

-

Enhanced pattern matching capabilities

-KSH-93 allows you to specify -regular expressions for file and string matches. - -

-

Improved debugging

-KSH-93 can generate line numbers on execution traces. -Also, I/O redirections are now traced. -There is a DEBUG trap that gets evaluated after each command -so that errors can be localized. - -

-

Job Control

-On systems that support job control, including -System V Release 4, KSH-93 -provides a job-control mechanism almost identical to that of -the BSD "csh", version 4.1. -This feature allows you -to stop and restart programs, and to move programs between the -foreground and the background. - -

-

Added security

-KSH-93 can execute scripts which do not have read permission -and scripts which have the setuid and/or setgid set when -invoked by name, rather than as an argument to the shell. -It is possible to log or control the execution of setuid and/or -setgid scripts. -The noclobber option prevents you from accidentally erasing -a file by redirecting to an existing file. - -

-

Documentation

-Documentation for KSH-93 consists of an -Introduction to KSH-93, -Compatibility with the Bourne Shell, -a manual page and a -README file. -In addition, the -New KornShell Command and Programming Language -book is available from Prentice Hall. -

-


- - - - - - -
March 13, 2012
-

- -

- - - diff --git a/cde/programs/dtksh/ksh93/docs/ksh/functions/dirs.txt b/cde/programs/dtksh/ksh93/docs/ksh/functions/dirs.txt deleted file mode 100644 index 1bc9346f4..000000000 --- a/cde/programs/dtksh/ksh93/docs/ksh/functions/dirs.txt +++ /dev/null @@ -1,111 +0,0 @@ -# -# DIRECTORY MANIPULATION FUNCTIONS PUSHD, POPD AND DIRS -# -# Uses global parameters _push_max _push_top _push_stack -integer _push_max=100 _push_top=100 -# Display directory stack -- $HOME displayed as ~ -function dirs -{ - typeset dir="${PWD#$HOME/}" - case $dir in - $HOME) - dir=\~ - ;; - /*) ;; - *) dir=\~/$dir - esac - print -r - "$dir ${_push_stack[@]}" -} - -# Change directory and put directory on front of stack -function pushd -{ - typeset dir= type=0 - integer i - case $1 in - "") # pushd - if ((_push_top >= _push_max)) - then print pushd: No other directory. - return 1 - fi - type=1 dir=${_push_stack[_push_top]} - ;; - +[1-9]|+[1-9][0-9]) # pushd +n - integer i=_push_top$1-1 - if ((i >= _push_max)) - then print pushd: Directory stack not that deep. - return 1 - fi - type=2 dir=${_push_stack[i]} - ;; - *) if ((_push_top <= 0)) - then print pushd: Directory stack overflow. - return 1 - fi - esac - case $dir in - \~*) dir=$HOME${dir#\~} - esac - cd "${dir:-$1}" > /dev/null || return 1 - dir=${OLDPWD#$HOME/} - case $dir in - $HOME) - dir=\~ - ;; - /*) ;; - *) dir=\~/$dir - esac - case $type in - 0) # pushd name - _push_stack[_push_top=_push_top-1]=$dir - ;; - 1) # pushd - _push_stack[_push_top]=$dir - ;; - 2) # push +n - type=${1#+} i=_push_top-1 - set -- "${_push_stack[@]}" "$dir" "${_push_stack[@]}" - shift $type - for dir - do (((i=i+1) < _push_max)) || break - _push_stack[i]=$dir - done - esac - dirs -} - -# Pops the top directory -function popd -{ - typeset dir - if ((_push_top >= _push_max)) - then print popd: Nothing to pop. - return 1 - fi - case $1 in - "") - dir=${_push_stack[_push_top]} - case $dir in - \~*) dir=$HOME${dir#\~} - esac - cd "$dir" || return 1 - ;; - +[1-9]|+[1-9][0-9]) - typeset savedir - integer i=_push_top$1-1 - if ((i >= _push_max)) - then print pushd: Directory stack not that deep. - return 1 - fi - while ((i > _push_top)) - do _push_stack[i]=${_push_stack[i-1]} - i=i-1 - done - ;; - *) print pushd: Bad directory. - return 1 - esac - unset '_push_stack[_push_top]' - _push_top=_push_top+1 - dirs -} diff --git a/cde/programs/dtksh/ksh93/docs/ksh/functions/emacs_keybind.txt b/cde/programs/dtksh/ksh93/docs/ksh/functions/emacs_keybind.txt deleted file mode 100644 index 1f2b8b747..000000000 --- a/cde/programs/dtksh/ksh93/docs/ksh/functions/emacs_keybind.txt +++ /dev/null @@ -1,12 +0,0 @@ -typeset -A Keytable -trap 'eval "${Keytable[${.sh.edchar}]}"' KEYBD -function emacs_keybind -{ - keybind $'\E[A' $'\020' # Up key - keybind $'\E[B' $'\016' # Down key - keybind $'\E[C' $'\06' # Right key - keybind $'\E[D' $'\02' # Left key - keybind $'\E[H' $'\01' # Home key - keybind $'\E[Y' $'\05' # End key - keybind $'\t' $'\E\E' # Tab for command-line completion -} diff --git a/cde/programs/dtksh/ksh93/docs/ksh/functions/getopt.txt b/cde/programs/dtksh/ksh93/docs/ksh/functions/getopt.txt deleted file mode 100644 index fe1e97fb0..000000000 --- a/cde/programs/dtksh/ksh93/docs/ksh/functions/getopt.txt +++ /dev/null @@ -1,28 +0,0 @@ -function getopt -{ - typeset c optstring=$1 options= sep= - shift - while getopts $optstring c - do case $c in - [:?]) - exit 2 - ;; - *) - options="$options$sep-$c" - sep=' ' - if [[ $optstring == *$c:* ]] - then options=" $options $OPTARG" - fi - #then print -rn -- " -$c" "$OPTARG" - #else print -rn -- " -$c" - ;; - esac - done - print -rn -- "$options" - if [[ ${@:$OPTIND-1} != -- ]] - then print -rn -- " --" - fi - if [[ -n ${@:$OPTIND} ]] - then print -r -- " ${@:$OPTIND}" - fi -} diff --git a/cde/programs/dtksh/ksh93/docs/ksh/functions/keybind.txt b/cde/programs/dtksh/ksh93/docs/ksh/functions/keybind.txt deleted file mode 100644 index 501170a73..000000000 --- a/cde/programs/dtksh/ksh93/docs/ksh/functions/keybind.txt +++ /dev/null @@ -1,14 +0,0 @@ -typeset -A Keytable -trap 'eval "${Keytable[${.sh.edchar}]}"' KEYBD -function keybind # key action -{ - typeset key=$(print -f "%q" "$2") - case $# in - 2) Keytable[$1]='.sh.edchar=${.sh.edmode}'"$key" - ;; - 1) unset Keytable[$1] - ;; - *) print -u2 "Usage: $0 key [action]" - ;; - esac -} diff --git a/cde/programs/dtksh/ksh93/docs/ksh/functions/popd.txt b/cde/programs/dtksh/ksh93/docs/ksh/functions/popd.txt deleted file mode 100644 index 4924c1616..000000000 --- a/cde/programs/dtksh/ksh93/docs/ksh/functions/popd.txt +++ /dev/null @@ -1,111 +0,0 @@ -# -# DIRECTORY MANIPULATION FUNCTIONS PUSHD, POPD AND DIRS -# -# Uses global parameters _push_max _push_top _push_stack -integer _push_max=100 _push_top=100 -# Display directory stack -- $HOME displayed as ~ -function dirs -{ - typeset dir="${PWD#$HOME/}" - case $dir in - $HOME) - dir=\~ - ;; - /*) ;; - *) dir=\~/$dir - esac - print -r - "$dir ${_push_stack[@]}" -} - -# Change directory and put directory on front of stack -function pushd -{ - typeset dir= type=0 - integer i - case $1 in - "") # pushd - if ((_push_top >= _push_max)) - then print pushd: No other directory. - return 1 - fi - type=1 dir=${_push_stack[_push_top]} - ;; - +[1-9]|+[1-9][0-9]) # pushd +n - integer i=_push_top$1-1 - if ((i >= _push_max)) - then print pushd: Directory stack not that deep. - return 1 - fi - type=2 dir=${_push_stack[i]} - ;; - *) if ((_push_top <= 0)) - then print pushd: Directory stack overflow. - return 1 - fi - esac - case $dir in - \~*) dir=$HOME${dir#~} - esac - cd "${dir:-$1}" > /dev/null || return 1 - dir=${OLDPWD#$HOME/} - case $dir in - $HOME) - dir=\~ - ;; - /*) ;; - *) dir=\~/$dir - esac - case $type in - 0) # pushd name - _push_stack[_push_top=_push_top-1]=$dir - ;; - 1) # pushd - _push_stack[_push_top]=$dir - ;; - 2) # push +n - type=${1#+} i=_push_top-1 - set -- "${_push_stack[@]}" "$dir" "${_push_stack[@]}" - shift $type - for dir - do (((i=i+1) < _push_max)) || break - _push_stack[i]=$dir - done - esac - dirs -} - -# Pops the top directory -function popd -{ - typeset dir - if ((_push_top >= _push_max)) - then print popd: Nothing to pop. - return 1 - fi - case $1 in - "") - dir=${_push_stack[_push_top]} - case $dir in - \~*) dir=$HOME${dir#~} - esac - cd "$dir" || return 1 - ;; - +[1-9]|+[1-9][0-9]) - typeset savedir - integer i=_push_top$1-1 - if ((i >= _push_max)) - then print pushd: Directory stack not that deep. - return 1 - fi - while ((i > _push_top)) - do _push_stack[i]=${_push_stack[i-1]} - i=i-1 - done - ;; - *) print pushd: Bad directory. - return 1 - esac - unset '_push_stack[_push_top]' - _push_top=_push_top+1 - dirs -} diff --git a/cde/programs/dtksh/ksh93/docs/ksh/functions/pushd.txt b/cde/programs/dtksh/ksh93/docs/ksh/functions/pushd.txt deleted file mode 100644 index 1bc9346f4..000000000 --- a/cde/programs/dtksh/ksh93/docs/ksh/functions/pushd.txt +++ /dev/null @@ -1,111 +0,0 @@ -# -# DIRECTORY MANIPULATION FUNCTIONS PUSHD, POPD AND DIRS -# -# Uses global parameters _push_max _push_top _push_stack -integer _push_max=100 _push_top=100 -# Display directory stack -- $HOME displayed as ~ -function dirs -{ - typeset dir="${PWD#$HOME/}" - case $dir in - $HOME) - dir=\~ - ;; - /*) ;; - *) dir=\~/$dir - esac - print -r - "$dir ${_push_stack[@]}" -} - -# Change directory and put directory on front of stack -function pushd -{ - typeset dir= type=0 - integer i - case $1 in - "") # pushd - if ((_push_top >= _push_max)) - then print pushd: No other directory. - return 1 - fi - type=1 dir=${_push_stack[_push_top]} - ;; - +[1-9]|+[1-9][0-9]) # pushd +n - integer i=_push_top$1-1 - if ((i >= _push_max)) - then print pushd: Directory stack not that deep. - return 1 - fi - type=2 dir=${_push_stack[i]} - ;; - *) if ((_push_top <= 0)) - then print pushd: Directory stack overflow. - return 1 - fi - esac - case $dir in - \~*) dir=$HOME${dir#\~} - esac - cd "${dir:-$1}" > /dev/null || return 1 - dir=${OLDPWD#$HOME/} - case $dir in - $HOME) - dir=\~ - ;; - /*) ;; - *) dir=\~/$dir - esac - case $type in - 0) # pushd name - _push_stack[_push_top=_push_top-1]=$dir - ;; - 1) # pushd - _push_stack[_push_top]=$dir - ;; - 2) # push +n - type=${1#+} i=_push_top-1 - set -- "${_push_stack[@]}" "$dir" "${_push_stack[@]}" - shift $type - for dir - do (((i=i+1) < _push_max)) || break - _push_stack[i]=$dir - done - esac - dirs -} - -# Pops the top directory -function popd -{ - typeset dir - if ((_push_top >= _push_max)) - then print popd: Nothing to pop. - return 1 - fi - case $1 in - "") - dir=${_push_stack[_push_top]} - case $dir in - \~*) dir=$HOME${dir#\~} - esac - cd "$dir" || return 1 - ;; - +[1-9]|+[1-9][0-9]) - typeset savedir - integer i=_push_top$1-1 - if ((i >= _push_max)) - then print pushd: Directory stack not that deep. - return 1 - fi - while ((i > _push_top)) - do _push_stack[i]=${_push_stack[i-1]} - i=i-1 - done - ;; - *) print pushd: Bad directory. - return 1 - esac - unset '_push_stack[_push_top]' - _push_top=_push_top+1 - dirs -} diff --git a/cde/programs/dtksh/ksh93/docs/ksh/functions/title.txt b/cde/programs/dtksh/ksh93/docs/ksh/functions/title.txt deleted file mode 100644 index 2338ce6b4..000000000 --- a/cde/programs/dtksh/ksh93/docs/ksh/functions/title.txt +++ /dev/null @@ -1,54 +0,0 @@ -# add to (+), delete from (-), print (.), or set ([=]) window title -# arguments are eval'd before printing -# title text string exported in TITLE_TEXT - -function title # [+ | - | =] title ... -{ - typeset x t="$TITLE_TEXT" - - case $1 in - +) shift - case $# in - 0) ;; - *) for x - do case " $t " in - *" $x "*) ;; - " ") t=$x ;; - *) t="$t $x" ;; - esac - done - case $t in - $TITLE_TEXT) return 1 ;; - esac - ;; - esac - ;; - -) shift - case $# in - 0) ;; - *) for x - do case " $t " in - *" $x "*) t="${t%?( )$x*}${t##*$x?( )}" ;; - esac - done - case $t in - $TITLE_TEXT) return 1 ;; - esac - ;; - esac - ;; - .) print -r -- "$TITLE_TEXT" - return 0 - ;; - *) t="$*" - ;; - esac - export TITLE_TEXT="$t" - eval x=\"$t\" - case $TERM in - 630*) print -nr -- "[?${#x};0v$x" ;; - vt100|xterm*) print -nr -- "]0;$x" ;; - *) return 1 ;; - esac - return 0 -} diff --git a/cde/programs/dtksh/ksh93/docs/ksh/functions/vi_keybind.txt b/cde/programs/dtksh/ksh93/docs/ksh/functions/vi_keybind.txt deleted file mode 100644 index 56256bfa4..000000000 --- a/cde/programs/dtksh/ksh93/docs/ksh/functions/vi_keybind.txt +++ /dev/null @@ -1,10 +0,0 @@ -typeset -A Keytable -trap 'eval "${Keytable[${.sh.edchar}]}"' KEYBD -function vi_keybind -{ - keybind $'\E[A' k # Up key - keybind $'\E[B' j # Down key - keybind $'\E[C' l # Right key - keybind $'\E[D' h # Left key - keybind $'\t' '\' # Tab for command-line completion -} diff --git a/cde/programs/dtksh/ksh93/docs/ksh/index.html b/cde/programs/dtksh/ksh93/docs/ksh/index.html deleted file mode 100644 index cf0663d35..000000000 --- a/cde/programs/dtksh/ksh93/docs/ksh/index.html +++ /dev/null @@ -1,10 +0,0 @@ - -KSH93 - -Overview
-FAQ
-Features
-Builtins
-Examples - - diff --git a/cde/programs/dtksh/ksh93/docs/ksh/ksh.html b/cde/programs/dtksh/ksh93/docs/ksh/ksh.html deleted file mode 100644 index 8df6639e8..000000000 --- a/cde/programs/dtksh/ksh93/docs/ksh/ksh.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - www/ksh/ksh.mm mm document - - - - - -
- - - -

-

ksh overview

-The -KornShell -language was designed and developed by David G. Korn at AT&T Bell Laboratories and AT&T Research. -It is an interactive command language that provides access to the UNIX system and to many other systems, -on the many different computers and workstations on which it is implemented. -The -KornShell -language is also a complete, powerful, high-level programming language for writing applications, -often more easily and quickly than with other high-level languages. -This makes it especially suitable for prototyping. -There are two other widely used shells, the Bourne shell developed by Steven Bourne at AT&T Bell Laboratories, -and the C shell developed by Bill Joy at the University of California. -ksh -has the best features of both, plus many new features of its own. -Thus -ksh -can do much to enhance your productivity and the quality of your work, -both in interacting with the system, and in programming. -ksh -programs are easier to write, and are more concise and readable than programs written in a lower level language such as C. -

-The new version of -ksh -has the functionality of other scripting languages such as awk, icon, perl, rexx, and tcl. -For this and many other reasons, -ksh -is a much better scripting language than any of the other popular shells. -The code size for -ksh -is larger than the Bourne shell or C shell programs. -The revised version is even larger. -

-In spite of its increased size, -ksh -provides better performance. -You can write programs to run faster with -ksh -than with either the Bourne shell or the C shell, sometimes an order of magnitude faster. -ksh -has evolved and matured with extensive user feedback. -It has been used by many thousands of people at AT&T since 1982, and at many other companies and universities. -A survey conducted at one of the largest AT&T Bell Laboratories computer centers showed that 80% of their customers, both programmers and non-programmers, use -ksh. -ksh -is compatible with the Bourne shell. -Virtually all programs written for the Bourne shell run with -ksh. -If you are familiar with the Bourne shell, you can use -ksh -immediately, without retraining. -The new version of -ksh -is compatible with earlier versions of -ksh. -ksh -is readily available. -It is sold (source and binary) by AT&T and Novell, and by other companies under license from AT&T both in the USA and abroad. -It has been purchased by dozens of major corporations, and by many individuals for use on home computers. -ksh -is extensible. -

-The -KornShell -language uses the same syntax for built-in commands as for non built-in commands. -Therefore, system developers can add new commands "transparently" to the -KornShell -language; that is, with minimum effort and with no differences visible to users other than faster execution. -On systems with dynamic linking, it is possible to add new built-in commands at run time. -Novell has extended the new version of -ksh -to enable X-windows programming for their desktop -ksh -product, -dtksh. -dtksh -is a standard part of CDE, the Common Desktop Environment defined by COSE (Common Operating System Environment), supported by most major UNIX system hardware vendors. -An extended version of -ksh -that enables Tk programming, called tksh, is available as well. -

-ksh -is intended to conform to the Shell Language Standard developed by the IEEE POSIX 1003.2 Shell and Utilities Language Committee. -

-


- - - - - - -
March 13, 2012
-

- -

- - - diff --git a/cde/programs/dtksh/ksh93/docs/ksh/scripts/cgi-lib.ksh.txt b/cde/programs/dtksh/ksh93/docs/ksh/scripts/cgi-lib.ksh.txt deleted file mode 100644 index 374b79bc6..000000000 --- a/cde/programs/dtksh/ksh93/docs/ksh/scripts/cgi-lib.ksh.txt +++ /dev/null @@ -1,129 +0,0 @@ -typeset -A COOKIE HEADER -typeset Cgi _CGI_c _CGI_multipart - -function cgi_header -{ - typeset h - for h in "${!HEADER[@]}" - do printf '%s: %s\n' "$h" "${HEADER[$h]}" - done - print -} - -function cgi_url -{ - if [[ $SERVER_PORT != 80 ]] - then print "http://$SERVER_NAME:$SERVER_PORT$SCRIPT_NAME" - else print "http://$SERVER_NAME$SCRIPT_NAME" - fi -} - -function cgi_parse -{ - if [[ $REQUEST_METHOD == POST ]] - then if [[ $CONTENT_TYPE == multipart/form-data* ]] - then _CGI_multipart=${TMPDIR-/tmp}/cgi-form-$$ - trap 'rm -rf "$_CGI_multipart"' EXIT - mkdir $_CGI_multipart - unset -f Cgi.set - typeset -A Cgi.file - typeset i b v - pax --nosummary --read --edit ",.*/,," --edit ",^,$_CGI_multipart/," - for i in $_CGI_multipart/* - do b=${i##*/} - if [[ $b == +([a-z]) ]] - then v=$(<$i) - eval Cgi.$b='$v' - else Cgi.file[$b]=$i - fi - done - else Cgi=$(<&0) # Read from stdin - fi - else Cgi="$QUERY_STRING" - fi - cgi_cookie "$HTTP_COOKIE" - HEADER["Content-type"]="text/html" -} - -function cgi_cookie -{ - typeset cookie=$1 name val c IFS=';' - set -- $cookie - for c - do - IFS='=' - set -- $c - name=${1##' '} val=${2##' '} # trim white space - name=${name%%' '} val=${val%%' '} - COOKIE[$name]=$val - done -} - -function cgi_setcookie # name value -{ - HEADER["Set-Cookie"]="$1=$2; path=$SCRIPT_NAME" -} - -## Cgi variable disciplines - -function Cgi.set -{ - set -f - typeset i j n val IFS='&' - set -- ${.sh.value} - for i - do n=${i%%=*} - [[ $n == [[:alpha:]_]*([[:alnum:]_]) ]] || continue - val=${i#$n=} - val=${val//+/ } - val=${val//@([\'\\])/'\'\1} - eval j=\${#${.sh.name}.${n}[@]} \ - "${.sh.name}.${n}[j]=\$'${val//'%'@(??)/'\x'\1"'\$'"}'" - done -} - -function cgi_C_init -{ - integer i - for ((i=1; i < 256; i++)) - do if (( i!=16#22 && i!=16#27 && i!=16#5C && i!=16#5B && i!=16#5D )) - then printf $'_CGI_c[$\'\\\\x%.2X\']=%%%.2X\n' $i $i - fi - done - print -} - -function cgi_encode -{ - typeset v=$1 - var=${v//' '/+} - cbrace='}' - eval var=${var//@([!a-zA-Z0-9_+])/\${_CGI_c[\\\1]$cbrace} - print -r -- "$var" -} - -function Cgi.get -{ - typeset i val name vname - if [[ ! ${_CGI_c[\\]} ]] - then val='"' - _CGI_c[""]=%00 - _CGI_c[$var]=%22 - _CGI_c[\']=%27 - _CGI_c[\]]=%5B - _CGI_c[\[]=%5D - _CGI_c[\\]=%5C - eval $(cgi_C_init) - unset -f cgi_C_init - fi - vname=${.sh.name} # .sh.name contains variable name - .sh.value= # .sh.value stores value - for i in ${!Cgi.@} - do - name=${i#$vname.} - nameref v=${i} - val=$(cgi_encode "$v") - .sh.value="${.sh.value}${.sh.value:+&}$name=$val" - done -} - diff --git a/cde/programs/dtksh/ksh93/docs/ksh/scripts/dump-cgi.ksh.txt b/cde/programs/dtksh/ksh93/docs/ksh/scripts/dump-cgi.ksh.txt deleted file mode 100644 index 579921626..000000000 --- a/cde/programs/dtksh/ksh93/docs/ksh/scripts/dump-cgi.ksh.txt +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/ksh - -. ./cgi-lib.ksh - -cgi_parse -cgi_header - -print "" -print "
"
-print -r "Url: $(cgi_url)"
-for i in ${!Cgi.*}
-do
-	nameref val=$i
-	print -r "$i = $val"
-done
-print "
" -print "" diff --git a/cde/programs/dtksh/ksh93/docs/ksh/scripts/env.txt b/cde/programs/dtksh/ksh93/docs/ksh/scripts/env.txt deleted file mode 100644 index 5989dd7e4..000000000 --- a/cde/programs/dtksh/ksh93/docs/ksh/scripts/env.txt +++ /dev/null @@ -1,66 +0,0 @@ -#! /usr/bin/ksh -# shell version of env command -case $(getopts '[-]' opt '--???man' 2>&1) in -version=[0-9]*) - usage=$'[-?@(#)env (AT&T Labs Research) 1999-05-20\n] - [-author?David Korn ] - [-license?http://www.research.att.com/sw/tools/reuse] - [+NAME?env - set environment for command invocation] - [+DESCRIPTION?\benv\b modifies the current environment according - to the \aname\a\b=\b\avalue\a arguments, and then - invokes \acommand\a with the modified environment.] - [+?If \acommand\a is not specified, the resulting environment - is written to standard output quoted as required for - reading by the \bsh\b.] - [i:ignore-environment?Invoke \acommand\a with the exact environment - specified by the \aname\a\b=\b\avalue\a arguments; inherited - environment variables are ignored. As an obsolete feature, - \b-\b by itself can be specified instead of \b-i\b.] - [u:unset]:[name?Unset the environment variable \aname\a if it was - in the environment. This option can be repeated to unset - additional variables.] - - [name=value]... [command ...] - - [+EXIT STATUS?If \acommand\a is invoked, the exit status of \benv\b - will be that of \acommand\a. Otherwise, it will be one of - the following:]{ - [+0?\benv\b completed successfully.] - [+126?\acommand\a was found but could not be invoked.] - [+127?\acommand\a could not be found.] - } - [+SEE ALSO?\bsh\b(1), \bexport\b(1)] - ' - ;; -*) - usage='iu:[name] [name=value]... [command ...]' - ;; -esac -clear= -while getopts "$usage" var -do case $var in - i) clear=1;; - u) command unset $OPTARG 2> /dev/null;; - esac -done -#[[ $var == "" ]] || exit 1 -shift $((OPTIND-1)) -if [[ $1 == - ]] # obsolete form -then clear=1 - shift -fi -if [[ $clear == 1 ]] -then typeset +x $(typeset +x) -fi -while true -do case $1 in - *=*) export "$1";; - *) break;; - esac - shift -done -if (( $# >0 )) -then exec "$@" -else export - exit 0 -fi diff --git a/cde/programs/dtksh/ksh93/docs/ksh/scripts/line.txt b/cde/programs/dtksh/ksh93/docs/ksh/scripts/line.txt deleted file mode 100644 index 7451ea51a..000000000 --- a/cde/programs/dtksh/ksh93/docs/ksh/scripts/line.txt +++ /dev/null @@ -1,2 +0,0 @@ -#! /bin/ksh -read -r && print -r -- "$REPLY" diff --git a/cde/programs/dtksh/ksh93/docs/ksh/scripts/which.txt b/cde/programs/dtksh/ksh93/docs/ksh/scripts/which.txt deleted file mode 100644 index 1e4b009cb..000000000 --- a/cde/programs/dtksh/ksh93/docs/ksh/scripts/which.txt +++ /dev/null @@ -1,2 +0,0 @@ -#! /bin/ksh -whence -p "$@" diff --git a/cde/programs/dtksh/ksh93/src/Mamfile b/cde/programs/dtksh/ksh93/src/Mamfile deleted file mode 100644 index fdf8ec6f0..000000000 --- a/cde/programs/dtksh/ksh93/src/Mamfile +++ /dev/null @@ -1,16 +0,0 @@ -info mam static -note * -note * This build file is in the Make Abstract Machine (MAM) language. It was -note * first generated by nmake, but in the ksh 93u+m distribution we maintain -note * it manually because nmake had too many problems to keep using. The -note * Mamfiles are processed by mamake (src/cmd/INIT/mamake.c); we added -note * support for indentation to improve readability. The language is -note * documented in Glenn Fowler's paper "A Make Abstract Machine": -note * http://web.archive.org/web/20041227143022/http://www2.research.att.com/~gsf/mam/mam.html -note * -note source level :MAKE: equivalent -make install - make all - exec - ${MAMAKE} -r '*/*' ${MAMAKEARGS} - done all virtual -done install virtual diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/C+probe b/cde/programs/dtksh/ksh93/src/cmd/INIT/C+probe deleted file mode 100644 index f42774233..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/C+probe +++ /dev/null @@ -1,870 +0,0 @@ -: -### this script contains archaic constructs that work with all sh variants ### -# Glenn Fowler -# AT&T Research -# -# @(#)C probe (AT&T Research) 2012-02-29 -# -# probe [ -d ] c-compiler-path [ attributes ] -# -# common C probe preamble for the tool specific probes -# -# NOTE: some cc -E's do syntax analysis! - -# -# probe_* are first eval'd and then attempted from left to right -# - -probe_binding="-dy -dn -Bdynamic -Bstatic '-Wl,-ashared -Wl,+s' -Wl,-aarchive -call_shared -non_shared -dynamic -static -bshared -bstatic '' -static" -probe_env="CC_OPTIONS CCOPTS LD_OPTIONS LDOPTS LIBPATH LPATH" -probe_include="stdio.h iostream.h complex.h ctype.h plot.h stdarg.h varargs.h ranlib.h hash.h sys/types.h stab.h cmath cstdio iostream string" -probe_longlong="long 'long long'" -probe_longlong_t="__int64_t _int64_t __int64 _int64 int64" -probe_l="l yyreject m sin mopt sin" -probe_lxx="C exit ++ exit g++ exit" -probe_ppprefix="a n" -probe_size="size" -probe_src="cxx C cc c" -probe_sa=".sa" -probe_sd=".dll .lib .dll .x" -probe_sdb=".pdb" -probe_so=".dylib .so .sl" -probe_symprefix="_" -probe_verbose="'-v -v' '-# -#' '-d -d' -dryrun '-V -V'" -probe_version="--version -V -version -v" - -# -# the following are set by the preamble for the tool specific probe -# - -cc=cc -debug= -dir=. -dll=.dll -dynamic= -exe=exe -executable="test -x" -hosted= -ifs=${IFS-' - '} -obj=o -ppenv= -ppopt= -predef= -prepred= -sa= -sd= -sdb= -so= -sov= -static= -stdlib= -stdpp= -suffix_command= -if test "" != "$TMPDIR" -a -d "$TMPDIR" -then tmpdir=$TMPDIR -else tmpdir=/tmp -fi -tmpdir=$tmpdir/probe$$ -undef="define defined elif else endif error if ifdef ifndef include line pragma undef __STDC__ __STDPP__ __ARGC__ __BASE__ __BASE_FILE__ __DATE__ __FILE__ __FUNCTION__ __INCLUDE_LEVEL__ __LINE__ __PATH__ __TIME__ __TIMESTAMP__ __VERSION__" -version_flags= -version_stamp= -version_string= - -# -# constrain the environment -# - -DISPLAY= -LC_ALL=C -export DISPLAY LC_ALL - -# -# now the common probes -# - -while : -do case $1 in - -d) debug=1 ;; - -*) set ''; break ;; - *) break ;; - esac - shift -done - -cc=$1 -case $cc in -[\\/]*|[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]:\\*) - ;; -*) echo "Usage: $0 [ -d ] c-compiler-path [ attributes ]" >&2 - exit 1 - ;; -esac -ATTRIBUTES= -eval $2 -_probe_PATH=$PATH -PATH=/usr/bin:/bin:$PATH - -case $0 in -*[\\/]*) dir=`echo $0 | sed -e 's,[\\/][\\/]*[^\\/]*\$,,'` ;; -esac - -$executable . 2>/dev/null || executable='test -r' - -case $SHELL in -[\\/]*|[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]:\\*) - sh=$SHELL - ;; -*) sh=/bin/sh - ;; -esac - -trap 'code=$?; cd ..; rm -rf $tmpdir; exit $code' 0 1 2 3 -mkdir $tmpdir -cd $tmpdir - -exec 3>&1 4>&2 /dev/null 2>&1 - (ulimit -c 0) >/dev/null 2>&1 && ulimit -c 0 - ;; -*) PS4='+$LINENO+ ' - set -x - ;; -esac - -if (xxx=xxx; unset xxx) -then UNSET=1 -else UNSET= -fi -eval set x $probe_env -while : -do shift - case $# in - 0) break ;; - esac - eval x='$'$1 - case $x in - '') continue ;; - esac - case $1 in - *PATH) _probe_export="$_probe_export $1='$x'" ;; - esac - case $UNSET in - '') eval $1= - export $1 - ;; - *) unset $1 - ;; - esac -done - -if test -f "$dir/probe.ini" -then . "$dir/probe.ini" - IFS=$ifs -fi - -mkdir suffix -cd suffix -for src in $probe_src -do echo "int main(){return 0;}" > ../test.$src - rm -f test* - if $cc -c ../test.$src - then set test.* - if test -f "$1" - then o="$*" - mv $* .. - for i in $o - do if $cc -o test.exe ../$i - then obj=`echo "$i" | sed -e 's,test.,,'` - $executable test.exe || executable="test -r" - set test* - rm * - if $cc -o test ../$i - then rm $* - set test.* - if $executable "$1" - then exe=`echo "$1" | sed -e 's,test.,,'` - suffix_command=.$exe - fi - fi - break 2 - fi - done - fi - fi -done -cd .. - -case $src in -c) ;; -*) echo '// ( -int -main() -{ - class { public: int i; } j; - j.i = 0; - int k = j.i + 1; - return k; -}' > dialect.$src - if $cc -c dialect.$src && $cc -o dialect.$exe dialect.$obj && $executable dialect.$exe - then mv dialect.$src dialect.c - rm -f dialect.$obj dialect.$exe - if $cc -c dialect.c && $cc -o dialect.$exe dialect.$obj && $executable dialect.$exe - then src=c - else set x $cc - while : - do shift - case $# in - 0) break ;; - esac - case $1 in - *=*) continue ;; - esac - case `echo $1 | sed -e 's,.*/,,'` in - *CC*|*++*|*[xX][xX]*|*[pP][lL][uU][sS]*) ;; - *) src=c ;; - esac - break - done - fi - else src=c - fi - ;; -esac - -set x x '(' 1 'int x;' 0 -while : -do shift - shift - case $# in - [01]) break ;; - esac - rm -f test.$obj - echo "$1" > test.$src - $cc -c test.$src - r=$? - case $r in - 0) test -f test.$obj || r=1 ;; - *) r=1 ;; - esac - case $2:$r in - 0:0) ;; - 0:1) echo "$cc: not a C compiler: failed to compile \`\`$1''" >&4 - exit 1 - ;; - 1:0) echo "$cc: not a C compiler: successfully compiled \`\`$1''" >&4 - exit 1 - ;; - esac -done - -hosttype=`package CC="$cc" || $SHELL -c "package CC='$cc'"` -case $hosttype in -*[Uu][Ss][Aa][Gg][Ee]:*) - hosttype=`PATH=$_probe_PATH; export PATH; package CC="$cc" || $SHELL -c "package CC='$cc'"` - ;; -esac - -echo '#include -int main(){printf("hello");return 0;}' > dynamic.$src -echo 'extern int sfclose() { return 0; }' > fun.$src -if $cc -c dynamic.$src && $cc -c fun.$src -then eval set x $probe_so - while : - do shift - case $# in - 0) break ;; - esac - for i in foo junk - do rm -f dynamic.$exe - if $cc -L. -o dynamic.$exe dynamic.$obj -l$i - then : "there's really a -l$i"? - else rm -f dynamic.$exe - cat fun.$obj > lib$i$1 - $cc -L. -o dynamic.$exe dynamic.$obj -l$i && $executable dynamic.$exe - x=$? - rm lib$i$1 - case $x in - 0) so=$1 - rm -f dynamic.$exe > lib$i$1.1 - $cc -L. -o dynamic.$exe dynamic.$obj -l$i && $executable dynamic.$exe - x=$? - rm lib$i$1.1 - case $x in - 0) sov=1 ;; - esac - break 2 - ;; - *) break - ;; - esac - fi - done - k= - for i in "" .1 .2 .3 .4 .5 .6 .7 .8 .9 - do rm -f dynamic.$exe > libc$1$i - $cc -L. -o dynamic.$exe dynamic.$obj && $executable dynamic.$exe - x=$? - (cd ..; rm $tmpdir/libc$1$i) - case $x in - 0) ;; - *) k=X$k - case $k in - XXX) break ;; - esac - ;; - esac - done - case $k in - XXX) so=$1 - sov=1 - break - ;; - ?*) so=$1 - break - ;; - esac - done - rm -f dynamic.$exe - if $cc -o dynamic.$exe dynamic.$obj 2>e && $executable dynamic.$exe - then e=`wc -l e` - maybe= - eval set x x $probe_binding - while : - do shift - shift - case $# in - 0) break ;; - esac - rm -f dynamic.$exe - $cc -o dynamic.$exe $1 dynamic.$obj 2>e && $executable dynamic.$exe || continue - case $1 in - ?*) case $maybe in - "") maybe=$1 ;; - *) maybe=-- ;; - esac - ;; - esac - case `wc -l e` in - $e) ;; - *) continue ;; - esac - d=`ls -s dynamic.$exe` - rm -f dynamic.$exe - $cc -o dynamic.$exe $2 dynamic.$obj 2>e && $executable dynamic.$exe || continue - case `wc -l e` in - $e) ;; - *) continue ;; - esac - case `ls -s dynamic.$exe` in - $d) ;; - *) dynamic=$1 - static=$2 - maybe= - break - ;; - esac - done - case $maybe in - ""|--) ;; - *) rm -f dynamic.$exe - if $cc -o dynamic.$exe $maybe dynamic.$obj 2>e && $executable dynamic.$exe - then e=`wc -l e` - if $cc -o dynamic.$exe $maybe-bogus-bogus-bogus dynamic.$obj 2>e && $executable dynamic.$exe - then case `wc -l e` in - $e) ;; - *) dynamic=$maybe ;; - esac - else dynamic=$maybe - fi - fi - ;; - esac - fi -fi - -eval set x $probe_version -shift -for o in "$@" -do if $cc $o > version.out 2>&1 - then version_string=`sed -e '/ is /d' -e 's/;/ /g' version.out | sed -e 1q` - case $version_string in - ''|*[Ee][Rr][Rr][Oo][Rr]*|*[Ff][Aa][Tt][Aa][Ll]*|*[Ww][Aa][Rr][Nn][Ii][Nn][Gg]*|*[Oo][Pp][Tt][Ii][Oo][Nn]*) - ;; - *) version_flags=$o - version_stamp=";VERSION;$o;$version_string;PATH;$cc" - break - ;; - esac - fi -done -case $version_stamp in -'') eval set x $probe_version - shift - echo 'int main() { return 0; }' > version.i - for o in "$@" - do if $cc -c $o version.i > version.out 2>&1 - then version_string=`sed -e '/ is /d' -e 's/;/ /g' version.out | sed -e 1q` - case $version_string in - ''|*[Ee][Rr][Rr][Oo][Rr]*|*[Ff][Aa][Tt][Aa][Ll]*|*[Ww][Aa][Rr][Nn][Ii][Nn][Gg]*|*[Oo][Pp][Tt][Ii][Oo][Nn]*) - ;; - *) version_flags=$o - break - ;; - esac - fi - done - ;; -esac - -echo 'int main(){return 0;}' > hosted.$src -$cc -o hosted.$exe hosted.$src && ./hosted.$exe && hosted=1 - -echo '#!'$sh' -echo "" $@' > cpp -chmod +x cpp -case `./cpp -Dprobe` in -*-Dprobe*) - ;; -*) cp /bin/echo cpp - chmod u+w cpp - ;; -esac -for prefix in $probe_ppprefix `echo $cc | sed -e '/cc\$/!d' -e 's,cc\$,,' -e 's,.*/,,'` -do cp cpp ${prefix}cpp -done - -echo "" > flags.$src -echo '#pragma pp:version' > libpp.$src - -if test `realcppC=./cpp $cc -Dprobe -E flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1 -then ppenv='realcppC=${ppcmd}' -elif test `cppC=./cpp $cc -Dprobe -E flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1 -then ppenv='cppC=${ppcmd}' -elif test `_CPPNAME=./cpp $cc -Dprobe -E flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1 -then ppenv='_CPPNAME=${ppcmd}' -elif test `_CPP=./cpp $cc -Dprobe -E flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1 -then ppenv='_CPP=${ppcmd}' -elif test `$cc -Dprobe -E -%p+. flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1 && test `$cc -Dprobe -E -%p+. flags.$src | wc -l` -eq 1 -then ppopt='-%p+${ppdir}' -elif test `$cc -Dprobe -E -Yp,. flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1 -then ppopt='-Yp,${ppdir}' -elif test `$cc -Dprobe -E -Qpath $tmpdir flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1 -then ppopt='-Qpath ${ppdir}' -elif test `$cc -Dprobe -E -tp -B./ flags.$src 2>err.out | tee cpp.out | grep -c '[-]Dprobe'` -eq 1 -a ! -s err.out -then ppopt='-tp -B${ppdir}/' -elif test `$cc -Dprobe -E -B./ flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1 -then ppopt='-B${ppdir}/' -elif test `$cc -Dprobe -E -tp -h./ -B flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1 -then ppopt='-tp -h${ppdir}/ -B' -elif test `$cc -Dprobe -E -t p,./cpp flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1 -then ppopt='-t p,${ppcmd}' -else { - eval set x $probe_verbose - shift - for o in "$@" - do $cc -E $o flags.$src - done - } 2>&1 | sed -e "s/['\"]//g" > cpp.out -fi - -set x `sed -e 's,[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]:\\\\,/,g' -e 's,\\\\,/,g' cpp.out` -def= -definclude="-I+C -I-H" -stdinclude=$definclude -case $hosted in -"") usrinclude= ;; -esac -cmdinclude= -while : -do case $# in - 0|1) break ;; - esac - shift - case $1 in - -A) case $2 in - *\(*\)) shift - prepred="$prepred `echo $1 | sed 's/\(.*\)(\(.*\))/\1 \2/'`" - ;; - esac - ;; - -A\(*\)) - prepred="$prepred `echo $1 | sed 's/-A\(.*\)(\(.*\))/\1 \2/'`" - ;; - -[DI][-+][ABCDEFGHIJKLMNOPQRSTUVWXYZ]*) - stdpp=1 - case $1 in - -I?[CH]) case $def in - ?*) definclude="$definclude $1" ;; - *) stdinclude="$stdinclude $1" ;; - esac - ;; - -I-S*|-YI,*) usrinclude="`echo $1 | sed 's/....//'`" ;; - -Y?,*) ;; - -Y*) usrinclude="`echo $1 | sed 's/..//'`" ;; - esac - ;; - -D) shift - case $1 in - [ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_]*=*) - predef="$predef -`echo $1 | sed -e 's/=.*//'`" - ;; - [ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_]*) - predef="$predef -$1" - ;; - esac - ;; - -Dprobe);; - -D*) case $1 in - -D[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_]*=*) - predef="$predef -`echo $1 | sed -e 's/^-D//' -e 's/=.*//'`" - ;; - -D[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_]*) - predef="$predef -`echo $1 | sed -e 's/^-D//'`" - ;; - esac - ;; - -I) shift - case $1 in - /*) case $def in - ?*) definclude="$definclude $1" ;; - *) stdinclude="$stdinclude $1" ;; - esac - cmdinclude="$cmdinclude $1" - ;; - esac - ;; - -I/*) f=`echo X$1 | sed 's/X-I//'` - case $def in - ?*) definclude="$definclude $f" ;; - *) stdinclude="$stdinclude $f" ;; - esac - cmdinclude="$cmdinclude $f" - ;; - -U) shift - undef="$undef $1" - ;; - -U*) undef="$undef `echo $1 | sed 's/^-U//'`" - ;; - flags.$src)def= - ;; - esac -done -stdinclude="$stdinclude $definclude" -case " $stdinclude " in -*\ $usrinclude\ *) - case $usrinclude in - /usr/include) - usrinclude= - ;; - *) case " $stdinclude " in - *\ /usr/include\ *) - usrinclude= - ;; - *) usrinclude=/usr/include - ;; - esac - ;; - esac - ;; -esac - -tstinclude=`$cc -v -E flags.$src 2>&1 | sed -e '1,/[iI][nN][cC][lL][uU][dD][eE][ ]*<[.][.][.]>/d' -e '/^[eE][nN][dD] [oO][fF] [sS][eE][aA][rR][cC][hH]/,\$d'` -j=$tstinclude -case $j in -*/*) ;; -*) j=$cmdinclude ;; -esac -tstinclude= -good= -nogood= -c_hdr="stdio.h ctype.h" -C_hdr="libc.h" -for i in $j -do if test -d "$i" - then tstinclude="$tstinclude $i" - h= - for f in $c_hdr - do if test -f "$i/$f" - then case $i in - */CC) nogood=1 ;; - *) good=1 ;; - esac - else h="$h $f" - fi - done - c_hdr=$h - h= - for f in $C_hdr - do if test -f "$i/$f" - then case $i in - */CC) nogood=1 ;; - *) good=1 ;; - esac - else h="$h $f" - fi - done - C_hdr=$h - fi -done -case $nogood in -1) good=0 ;; -esac -case $good in -1) case $c_hdr in - ?*) bad=1 - usrinclude=/usr/include - set '' $tstinclude /usr/include - ;; - *) set '' $tstinclude - ;; - esac - shift - stdinclude=$* - echo "#include " > include.$src - $cc -E include.$src | sed -e '/# 1 "[\\/]/!d' -e 's,[^"]*",,' -e 's,[\\/][^\\/]*".*,,' -e 's,[\\/]sys,,' > include.out - for f in `cat include.out` - do if test -d "$f" - then g=`echo $f | sed -e 's,[\\/][\\/]*[^\\/]*$,,'` - case " $stdinclude " in - *\ $f\ *|*\ $g\ *) - ;; - *) stdinclude="$stdinclude $f" - case $f in - /usr/include) usrinclude=$f ;; - esac - bad=1 - ;; - esac - fi - done - ;; -*) case $ppopt$ppenv in - ?*) echo '#!'$sh' - echo $VIRTUAL_ROOT | sed "s/:.*//"' > cpp - chmod +x cpp - ppcmd=cpp - ppdir=. - eval x='`'$ppenv '$'cc -E $ppopt flags.$src'`' - case $x in - ?*) tstinclude=$x/usr/include - ;; - esac - cp /bin/echo cpp - chmod u+w cpp - ;; - esac - - eval set x $probe_include - while : - do shift - case $# in - 0) break ;; - esac - echo "#include <$1>" > include.$src - $cc -E include.$src - done > include.out - - ccinclude= - x=$stdinclude - stdinclude= - subinclude= - for f in $x $tstinclude `sed -e 's,\\\\,/,g' -e 's,///*,/,g' -e 's,"[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]:/,"/,g' -e '/^#[line ]*[0123456789][0123456789]*[ ][ ]*"[\\/]/!d' -e 's/^#[line ]*[0123456789][0123456789]*[ ][ ]*"\(.*\)[\\/].*".*/\1/' include.out | sort -u` - do case $f in - -*) ;; - */) f=`echo $f | sed -e 's,//*\$,,'` ;; - */.) f=`echo $f | sed -e 's,//*.\$,,'` ;; - esac - case $f in - -I*) ;; - */cc) ccinclude=1 - ;; - */sys) continue - ;; - */include/*/*) - ;; - */include/*) - subinclude="$subinclude $f" - continue - ;; - esac - if test -d "$f" - then case " $stdinclude " in - *\ $f\ *) ;; - *) stdinclude="$stdinclude $f" ;; - esac - fi - done - rm include.out - case $ccinclude in - ?*) eval set x $probe_include - while : - do shift - case $# in - 0) break ;; - esac - echo "#include " > include.$src - if $cc -E include.$src > /dev/null - then break - fi - done - case $# in - 0) ;; - *) x=$stdinclude - stdinclude= - for f in $x - do case $f in - */cc) ;; - *) stdinclude="$stdinclude $f" ;; - esac - done - ;; - esac - ;; - esac - case $subinclude in - ?*) for i in $subinclude - do for j in $stdinclude - do case $i in - $j/*/*) ;; - $j/*) both= - eval set x $probe_include - while : - do shift - case $# in - 0) for k in $both - do echo "#include <$k>" > include.$src - $cc -E include.$src > include.out - I=`grep -c $i/$k < include.out` - J=`grep -c $j/$k < include.out` - case $I:$J in - 0:*) ;; - *:0) stdinclude="$i $stdinclude" - break - ;; - esac - done - continue 3 - ;; - esac - if test -f $i/$1 - then if test ! -f $j/$1 - then break 2 - fi - both="$both $1" - fi - done - ;; - $j) continue 2 - ;; - esac - done - stdinclude="$i $stdinclude" - done - ;; - esac - - { - - for i in $stdinclude - do - case $i in - $usrinclude) ;; - *) echo $i $i ;; - esac - done - - eval set x $probe_include - while : - do shift - case $# in - 0) break ;; - esac - echo "#include <$1>" > t.c - p= - for j in `$cc -E t.c | grep "$1" | sed -e 's,\\\\,/,g' -e 's,"[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]:/,"/,g' -e '/^#[line ]*1[ ][ ]*"[\\/]/!d' -e 's/^#[line ]*1[ ][ ]*"\(.*\)[\\/].*".*/\1/'` - do j=`echo $j | sed -e 's,///*,/,g' -e 's,/$,,'` - case $p in - ?*) echo $p $j ;; - esac - p=$j - done - done - - case $usrinclude in - ?*) echo $usrinclude $usrinclude ;; - esac - - } | tsort > tmp.tmp - tstinclude=`cat tmp.tmp` - bad= - for i in $stdinclude - do case " -$tstinclude -" in - *" -$i -"*) ;; - *) bad=1 - break - ;; - esac - done - ;; -esac - -case $bad in -"") x=$stdinclude - stdinclude= - z= - for i in $tstinclude - do case " $x " in - *" $i "*) - stdinclude="$stdinclude $i" - z=$i - ;; - esac - done - case $usrinclude in - '') usrinclude=$z ;; - esac - ;; -esac -case $hosted in -"") case $usrinclude in - /usr/include) usrinclude= ;; - esac - ;; -esac - -case $usrinclude in -?*) case " $stdinclude " in - *\ $usrinclude\ *) - x=$stdinclude - stdinclude= - for f in $x - do case $f in - $usrinclude) ;; - *) stdinclude="$stdinclude $f" ;; - esac - done - ;; - esac - ;; -esac - -# drop dups -- they creep in somehow - -x=$stdinclude -stdinclude= -for f in $x -do case " $stdinclude $usrinclude " in - *" $f "*) ;; - *) stdinclude="$stdinclude $f" ;; - esac -done diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/Mamfile b/cde/programs/dtksh/ksh93/src/cmd/INIT/Mamfile deleted file mode 100644 index 066858af6..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/Mamfile +++ /dev/null @@ -1,1130 +0,0 @@ -info mam static 00000 1994-07-17 make (AT&T Research) 5.7 2012-06-20 -note * -note * This build file is in the Make Abstract Machine (MAM) language. It was -note * first generated by nmake, but in the ksh 93u+m distribution we maintain -note * it manually because nmake had too many problems to keep using. The -note * Mamfiles are processed by mamake (src/cmd/INIT/mamake.c); we added -note * support for indentation to improve readability. The language is -note * documented in Glenn Fowler's paper "A Make Abstract Machine": -note * http://web.archive.org/web/20041227143022/http://www2.research.att.com/~gsf/mam/mam.html -note * -setv INSTALLROOT ../../.. -setv PACKAGEROOT ../../../../.. -setv CC cc -setv mam_cc_FLAGS -setv KSH_RELFLAGS -setv CCFLAGS ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${mam_cc_OPTIMIZE}?} -setv CCLDFLAGS ${-strip-symbols?1?${mam_cc_LD_STRIP}??} -setv COTEMP $$ -setv LDFLAGS -make install - make iffe - make iffe.sh - done iffe.sh - meta iffe %.sh>% iffe.sh iffe - prev iffe.sh - exec - case static,port:$OPTIND:$RANDOM in - exec - ?*:*:*|*::*|*:*:$RANDOM) - exec - ;; - exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null - exec - then if grep '### .*archaic.* ###' >/dev/null - exec - then : iffe contains archaic constructs : - exec - else ENV= LC_ALL=C $SHELL -n iffe.sh - exec - fi - exec - fi - exec - ;; - exec - esac - exec - case '${mam_cc_SHELLMAGIC}' in - exec - "") case 225 in - exec - 0) cp iffe.sh iffe - exec - ;; - exec - *) { - exec - i=`(read x; echo $x) < iffe.sh` - exec - case $i in - exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;; - exec - esac - exec - cat iffe.sh - exec - } > iffe - exec - ;; - exec - esac - exec - ;; - exec - *) cat - iffe.sh > iffe <<'!' - exec - ${mam_cc_SHELLMAGIC} - exec - ! - exec - ;; - exec - esac - exec - test -w iffe -a -x iffe || chmod u+w,+x iffe - done iffe generated - make mktest - make mktest.sh - done mktest.sh - meta mktest %.sh>% mktest.sh mktest - prev mktest.sh - exec - case static,port:$OPTIND:$RANDOM in - exec - ?*:*:*|*::*|*:*:$RANDOM) - exec - ;; - exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null - exec - then if grep '### .*archaic.* ###' >/dev/null - exec - then : mktest contains archaic constructs : - exec - else ENV= LC_ALL=C $SHELL -n mktest.sh - exec - fi - exec - fi - exec - ;; - exec - esac - exec - case '${mam_cc_SHELLMAGIC}' in - exec - "") case 184 in - exec - 0) cp mktest.sh mktest - exec - ;; - exec - *) { - exec - i=`(read x; echo $x) < mktest.sh` - exec - case $i in - exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;; - exec - esac - exec - cat mktest.sh - exec - } > mktest - exec - ;; - exec - esac - exec - ;; - exec - *) cat - mktest.sh > mktest <<'!' - exec - ${mam_cc_SHELLMAGIC} - exec - ! - exec - ;; - exec - esac - exec - test -w mktest -a -x mktest || chmod u+w,+x mktest - done mktest generated - make package - make package.sh - done package.sh - meta package %.sh>% package.sh package - prev package.sh - exec - case static,port:$OPTIND:$RANDOM in - exec - ?*:*:*|*::*|*:*:$RANDOM) - exec - ;; - exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null - exec - then if grep '### .*archaic.* ###' >/dev/null - exec - then : package contains archaic constructs : - exec - else ENV= LC_ALL=C $SHELL -n package.sh - exec - fi - exec - fi - exec - ;; - exec - esac - exec - case '${mam_cc_SHELLMAGIC}' in - exec - "") case 184 in - exec - 0) cp package.sh package - exec - ;; - exec - *) { - exec - i=`(read x; echo $x) < package.sh` - exec - case $i in - exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;; - exec - esac - exec - cat package.sh - exec - } > package - exec - ;; - exec - esac - exec - ;; - exec - *) cat - package.sh > package <<'!' - exec - ${mam_cc_SHELLMAGIC} - exec - ! - exec - ;; - exec - esac - exec - test -w package -a -x package || chmod u+w,+x package - done package generated - make regress - make regress.sh - done regress.sh - meta regress %.sh>% regress.sh regress - prev regress.sh - exec - case static,port:$OPTIND:$RANDOM in - exec - ?*:*:*|*::*|*:*:$RANDOM) - exec - ;; - exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null - exec - then if grep '### .*archaic.* ###' >/dev/null - exec - then : regress contains archaic constructs : - exec - else ENV= LC_ALL=C $SHELL -n regress.sh - exec - fi - exec - fi - exec - ;; - exec - esac - exec - case '${mam_cc_SHELLMAGIC}' in - exec - "") case 184 in - exec - 0) cp regress.sh regress - exec - ;; - exec - *) { - exec - i=`(read x; echo $x) < regress.sh` - exec - case $i in - exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;; - exec - esac - exec - cat regress.sh - exec - } > regress - exec - ;; - exec - esac - exec - ;; - exec - *) cat - regress.sh > regress <<'!' - exec - ${mam_cc_SHELLMAGIC} - exec - ! - exec - ;; - exec - esac - exec - test -w regress -a -x regress || chmod u+w,+x regress - done regress generated - make rt - make rt.sh - done rt.sh - meta rt %.sh>% rt.sh rt - prev rt.sh - exec - case static,port:$OPTIND:$RANDOM in - exec - ?*:*:*|*::*|*:*:$RANDOM) - exec - ;; - exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null - exec - then if grep '### .*archaic.* ###' >/dev/null - exec - then : rt contains archaic constructs : - exec - else ENV= LC_ALL=C $SHELL -n rt.sh - exec - fi - exec - fi - exec - ;; - exec - esac - exec - case '${mam_cc_SHELLMAGIC}' in - exec - "") case 184 in - exec - 0) cp rt.sh rt - exec - ;; - exec - *) { - exec - i=`(read x; echo $x) < rt.sh` - exec - case $i in - exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;; - exec - esac - exec - cat rt.sh - exec - } > rt - exec - ;; - exec - esac - exec - ;; - exec - *) cat - rt.sh > rt <<'!' - exec - ${mam_cc_SHELLMAGIC} - exec - ! - exec - ;; - exec - esac - exec - test -w rt -a -x rt || chmod u+w,+x rt - done rt generated - make crossexec - make crossexec.sh - done crossexec.sh - meta crossexec %.sh>% crossexec.sh crossexec - prev crossexec.sh - exec - case static,port:$OPTIND:$RANDOM in - exec - ?*:*:*|*::*|*:*:$RANDOM) - exec - ;; - exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null - exec - then if grep '### .*archaic.* ###' >/dev/null - exec - then : crossexec contains archaic constructs : - exec - else ENV= LC_ALL=C $SHELL -n crossexec.sh - exec - fi - exec - fi - exec - ;; - exec - esac - exec - case '${mam_cc_SHELLMAGIC}' in - exec - "") case 184 in - exec - 0) cp crossexec.sh crossexec - exec - ;; - exec - *) { - exec - i=`(read x; echo $x) < crossexec.sh` - exec - case $i in - exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;; - exec - esac - exec - cat crossexec.sh - exec - } > crossexec - exec - ;; - exec - esac - exec - ;; - exec - *) cat - crossexec.sh > crossexec <<'!' - exec - ${mam_cc_SHELLMAGIC} - exec - ! - exec - ;; - exec - esac - exec - test -w crossexec -a -x crossexec || chmod u+w,+x crossexec - done crossexec generated - make execrate - make execrate.sh - done execrate.sh - meta execrate %.sh>% execrate.sh execrate - prev execrate.sh - exec - case static,port:$OPTIND:$RANDOM in - exec - ?*:*:*|*::*|*:*:$RANDOM) - exec - ;; - exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null - exec - then if grep '### .*archaic.* ###' >/dev/null - exec - then : execrate contains archaic constructs : - exec - else ENV= LC_ALL=C $SHELL -n execrate.sh - exec - fi - exec - fi - exec - ;; - exec - esac - exec - case '${mam_cc_SHELLMAGIC}' in - exec - "") case 184 in - exec - 0) cp execrate.sh execrate - exec - ;; - exec - *) { - exec - i=`(read x; echo $x) < execrate.sh` - exec - case $i in - exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;; - exec - esac - exec - cat execrate.sh - exec - } > execrate - exec - ;; - exec - esac - exec - ;; - exec - *) cat - execrate.sh > execrate <<'!' - exec - ${mam_cc_SHELLMAGIC} - exec - ! - exec - ;; - exec - esac - exec - test -w execrate -a -x execrate || chmod u+w,+x execrate - done execrate generated - make filter - make filter.sh - done filter.sh - meta filter %.sh>% filter.sh filter - prev filter.sh - exec - case static,port:$OPTIND:$RANDOM in - exec - ?*:*:*|*::*|*:*:$RANDOM) - exec - ;; - exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null - exec - then if grep '### .*archaic.* ###' >/dev/null - exec - then : filter contains archaic constructs : - exec - else ENV= LC_ALL=C $SHELL -n filter.sh - exec - fi - exec - fi - exec - ;; - exec - esac - exec - case '${mam_cc_SHELLMAGIC}' in - exec - "") case 184 in - exec - 0) cp filter.sh filter - exec - ;; - exec - *) { - exec - i=`(read x; echo $x) < filter.sh` - exec - case $i in - exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;; - exec - esac - exec - cat filter.sh - exec - } > filter - exec - ;; - exec - esac - exec - ;; - exec - *) cat - filter.sh > filter <<'!' - exec - ${mam_cc_SHELLMAGIC} - exec - ! - exec - ;; - exec - esac - exec - test -w filter -a -x filter || chmod u+w,+x filter - done filter generated - make ignore - make ignore.sh - done ignore.sh - meta ignore %.sh>% ignore.sh ignore - prev ignore.sh - exec - case static,port:$OPTIND:$RANDOM in - exec - ?*:*:*|*::*|*:*:$RANDOM) - exec - ;; - exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null - exec - then if grep '### .*archaic.* ###' >/dev/null - exec - then : ignore contains archaic constructs : - exec - else ENV= LC_ALL=C $SHELL -n ignore.sh - exec - fi - exec - fi - exec - ;; - exec - esac - exec - case '${mam_cc_SHELLMAGIC}' in - exec - "") case 0 in - exec - 0) cp ignore.sh ignore - exec - ;; - exec - *) { - exec - i=`(read x; echo $x) < ignore.sh` - exec - case $i in - exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;; - exec - esac - exec - cat - ignore.sh <<'!' - exec - - exec - ! - exec - } > ignore - exec - ;; - exec - esac - exec - ;; - exec - *) cat - ignore.sh > ignore <<'!' - exec - ${mam_cc_SHELLMAGIC} - exec - - exec - ! - exec - ;; - exec - esac - exec - test -w ignore -a -x ignore || chmod u+w,+x ignore - done ignore generated - make silent - make silent.sh - done silent.sh - meta silent %.sh>% silent.sh silent - prev silent.sh - exec - case static,port:$OPTIND:$RANDOM in - exec - ?*:*:*|*::*|*:*:$RANDOM) - exec - ;; - exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null - exec - then if grep '### .*archaic.* ###' >/dev/null - exec - then : silent contains archaic constructs : - exec - else ENV= LC_ALL=C $SHELL -n silent.sh - exec - fi - exec - fi - exec - ;; - exec - esac - exec - case '${mam_cc_SHELLMAGIC}' in - exec - "") case 0 in - exec - 0) cp silent.sh silent - exec - ;; - exec - *) { - exec - i=`(read x; echo $x) < silent.sh` - exec - case $i in - exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;; - exec - esac - exec - cat - silent.sh <<'!' - exec - - exec - ! - exec - } > silent - exec - ;; - exec - esac - exec - ;; - exec - *) cat - silent.sh > silent <<'!' - exec - ${mam_cc_SHELLMAGIC} - exec - - exec - ! - exec - ;; - exec - esac - exec - test -w silent -a -x silent || chmod u+w,+x silent - done silent generated - make mamake - make mamake.o - make mamake.c - make shlib-compat.h implicit - done shlib-compat.h dontcare virtual - make ast.h implicit - done ast.h dontcare virtual - done mamake.c - meta mamake.o %.c>%.o mamake.c mamake - prev mamake.c - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -c mamake.c - done mamake.o generated - exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} ${LDFLAGS} -o mamake mamake.o - done mamake generated - make mprobe - make mprobe.sh - done mprobe.sh - meta mprobe %.sh>% mprobe.sh mprobe - prev mprobe.sh - exec - case static,port:$OPTIND:$RANDOM in - exec - ?*:*:*|*::*|*:*:$RANDOM) - exec - ;; - exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null - exec - then if grep '### .*archaic.* ###' >/dev/null - exec - then : mprobe contains archaic constructs : - exec - else ENV= LC_ALL=C $SHELL -n mprobe.sh - exec - fi - exec - fi - exec - ;; - exec - esac - exec - case '${mam_cc_SHELLMAGIC}' in - exec - "") case 0 in - exec - 0) cp mprobe.sh mprobe - exec - ;; - exec - *) { - exec - i=`(read x; echo $x) < mprobe.sh` - exec - case $i in - exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;; - exec - esac - exec - cat - mprobe.sh <<'!' - exec - - exec - ! - exec - } > mprobe - exec - ;; - exec - esac - exec - ;; - exec - *) cat - mprobe.sh > mprobe <<'!' - exec - ${mam_cc_SHELLMAGIC} - exec - - exec - ! - exec - ;; - exec - esac - exec - test -w mprobe -a -x mprobe || chmod u+w,+x mprobe - done mprobe generated - make probe - make probe.sh - make C+probe - done C+probe - make make.probe - done make.probe - exec - cat C+probe make.probe > probe.sh - done probe.sh generated - meta probe %.sh>% probe.sh probe - prev probe.sh - exec - case static,port:$OPTIND:$RANDOM in - exec - ?*:*:*|*::*|*:*:$RANDOM) - exec - ;; - exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null - exec - then if grep '### .*archaic.* ###' >/dev/null - exec - then : probe contains archaic constructs : - exec - else ENV= LC_ALL=C $SHELL -n probe.sh - exec - fi - exec - fi - exec - ;; - exec - esac - exec - case '${mam_cc_SHELLMAGIC}' in - exec - "") case 0 in - exec - 0) cp probe.sh probe - exec - ;; - exec - *) { - exec - i=`(read x; echo $x) < probe.sh` - exec - case $i in - exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;; - exec - esac - exec - cat - probe.sh <<'!' - exec - - exec - ! - exec - } > probe - exec - ;; - exec - esac - exec - ;; - exec - *) cat - probe.sh > probe <<'!' - exec - ${mam_cc_SHELLMAGIC} - exec - - exec - ! - exec - ;; - exec - esac - exec - test -w probe -a -x probe || chmod u+w,+x probe - done probe generated - make ${INSTALLROOT}/bin - exec - if test ! -d ${INSTALLROOT}/bin - exec - then mkdir -p ${INSTALLROOT}/bin - exec - fi - done ${INSTALLROOT}/bin generated - make ${INSTALLROOT}/bin/iffe - prev iffe - exec - test '' = 'iffe' || ${STDCMP} 2>/dev/null -s iffe ${INSTALLROOT}/bin/iffe || { ${STDMV} ${INSTALLROOT}/bin/iffe ${INSTALLROOT}/bin/iffe.old 2>/dev/null || true; ${STDCP} iffe ${INSTALLROOT}/bin/iffe ;} - done ${INSTALLROOT}/bin/iffe generated - make ${INSTALLROOT}/bin/mktest - prev mktest - exec - test '' = 'mktest' || ${STDCMP} 2>/dev/null -s mktest ${INSTALLROOT}/bin/mktest || { ${STDMV} ${INSTALLROOT}/bin/mktest ${INSTALLROOT}/bin/mktest.old 2>/dev/null || true; ${STDCP} mktest ${INSTALLROOT}/bin/mktest ;} - done ${INSTALLROOT}/bin/mktest generated - make ${INSTALLROOT}/bin/package - prev package - exec - test '' = 'package' || ${STDCMP} 2>/dev/null -s package ${INSTALLROOT}/bin/package || { ${STDMV} ${INSTALLROOT}/bin/package ${INSTALLROOT}/bin/package.old 2>/dev/null || true; ${STDCP} package ${INSTALLROOT}/bin/package ;} - done ${INSTALLROOT}/bin/package generated - make ${INSTALLROOT}/bin/regress - prev regress - exec - test '' = 'regress' || ${STDCMP} 2>/dev/null -s regress ${INSTALLROOT}/bin/regress || { ${STDMV} ${INSTALLROOT}/bin/regress ${INSTALLROOT}/bin/regress.old 2>/dev/null || true; ${STDCP} regress ${INSTALLROOT}/bin/regress ;} - done ${INSTALLROOT}/bin/regress generated - make ${INSTALLROOT}/bin/rt - prev rt - exec - test '' = 'rt' || ${STDCMP} 2>/dev/null -s rt ${INSTALLROOT}/bin/rt || { ${STDMV} ${INSTALLROOT}/bin/rt ${INSTALLROOT}/bin/rt.old 2>/dev/null || true; ${STDCP} rt ${INSTALLROOT}/bin/rt ;} - done ${INSTALLROOT}/bin/rt generated - make ${PACKAGEROOT}/bin - exec - if test ! -d ${PACKAGEROOT}/bin - exec - then mkdir -p ${PACKAGEROOT}/bin - exec - fi - done ${PACKAGEROOT}/bin generated - make ${PACKAGEROOT}/bin/execrate - prev ${PACKAGEROOT}/bin - prev execrate - exec - test '' = 'execrate' || ${STDCMP} 2>/dev/null -s execrate ${PACKAGEROOT}/bin/execrate || { ${STDMV} ${PACKAGEROOT}/bin/execrate ${PACKAGEROOT}/bin/execrate.old 2>/dev/null || true; ${STDCP} execrate ${PACKAGEROOT}/bin/execrate ;} - done ${PACKAGEROOT}/bin/execrate generated - make ${PACKAGEROOT}/bin/ignore - prev ignore - exec - test '' = 'ignore' || ${STDCMP} 2>/dev/null -s ignore ${PACKAGEROOT}/bin/ignore || { ${STDMV} ${PACKAGEROOT}/bin/ignore ${PACKAGEROOT}/bin/ignore.old 2>/dev/null || true; ${STDCP} ignore ${PACKAGEROOT}/bin/ignore ;} - done ${PACKAGEROOT}/bin/ignore generated - make ${PACKAGEROOT}/bin/mamprobe - make mamprobe - meta mamprobe %.sh>% mamprobe.sh mamprobe - make mamprobe.sh - done mamprobe.sh - exec - case static,port:$OPTIND:$RANDOM in - exec - ?*:*:*|*::*|*:*:$RANDOM) - exec - ;; - exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null - exec - then if grep '### .*archaic.* ###' >/dev/null - exec - then : mamprobe contains archaic constructs : - exec - else ENV= LC_ALL=C $SHELL -n mamprobe.sh - exec - fi - exec - fi - exec - ;; - exec - esac - exec - case '${mam_cc_SHELLMAGIC}' in - exec - "") case 0 in - exec - 0) cp mamprobe.sh mamprobe - exec - ;; - exec - *) { - exec - i=`(read x; echo $x) < mamprobe.sh` - exec - case $i in - exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;; - exec - esac - exec - cat - mamprobe.sh <<'!' - exec - - exec - ! - exec - } > mamprobe - exec - ;; - exec - esac - exec - ;; - exec - *) cat - mamprobe.sh > mamprobe <<'!' - exec - ${mam_cc_SHELLMAGIC} - exec - - exec - ! - exec - ;; - exec - esac - exec - test -w mamprobe -a -x mamprobe || chmod u+w,+x mamprobe - done mamprobe generated - exec - test '' = 'mamprobe' || ${STDCMP} 2>/dev/null -s mamprobe ${PACKAGEROOT}/bin/mamprobe || { ${STDMV} ${PACKAGEROOT}/bin/mamprobe ${PACKAGEROOT}/bin/mamprobe.old 2>/dev/null || true; ${STDCP} mamprobe ${PACKAGEROOT}/bin/mamprobe ;} - done ${PACKAGEROOT}/bin/mamprobe generated - make ${PACKAGEROOT}/bin/package - prev package - exec - test '' = 'package' || ${STDCMP} 2>/dev/null -s package ${PACKAGEROOT}/bin/package || { ${STDMV} ${PACKAGEROOT}/bin/package ${PACKAGEROOT}/bin/package.old 2>/dev/null || true; ${STDCP} package ${PACKAGEROOT}/bin/package ;} - done ${PACKAGEROOT}/bin/package generated - make ${PACKAGEROOT}/bin/silent - prev silent - exec - test '' = 'silent' || ${STDCMP} 2>/dev/null -s silent ${PACKAGEROOT}/bin/silent || { ${STDMV} ${PACKAGEROOT}/bin/silent ${PACKAGEROOT}/bin/silent.old 2>/dev/null || true; ${STDCP} silent ${PACKAGEROOT}/bin/silent ;} - done ${PACKAGEROOT}/bin/silent generated - make ${INSTALLROOT}/bin/crossexec - prev crossexec - exec - test '' = 'crossexec' || ${STDCMP} 2>/dev/null -s crossexec ${INSTALLROOT}/bin/crossexec || { ${STDMV} ${INSTALLROOT}/bin/crossexec ${INSTALLROOT}/bin/crossexec.old 2>/dev/null || true; ${STDCP} crossexec ${INSTALLROOT}/bin/crossexec ;} - done ${INSTALLROOT}/bin/crossexec generated - make ${INSTALLROOT}/bin/filter - prev filter - exec - test '' = 'filter' || ${STDCMP} 2>/dev/null -s filter ${INSTALLROOT}/bin/filter || { ${STDMV} ${INSTALLROOT}/bin/filter ${INSTALLROOT}/bin/filter.old 2>/dev/null || true; ${STDCP} filter ${INSTALLROOT}/bin/filter ;} - done ${INSTALLROOT}/bin/filter generated - make ${INSTALLROOT}/bin/mamake - prev mamake - exec - test '' = 'mamake' || ${STDCMP} 2>/dev/null -s mamake ${INSTALLROOT}/bin/mamake || { ${STDMV} ${INSTALLROOT}/bin/mamake ${INSTALLROOT}/bin/mamake.old 2>/dev/null || true; ${STDCP} mamake ${INSTALLROOT}/bin/mamake ;} - done ${INSTALLROOT}/bin/mamake generated - make __proto_stub - note * - note * proto(1) has been removed, but install a backwards compatibility stub - note * that allows old Mamfiles containing proto commands to keep working. - note * - exec - src=${PACKAGEROOT}/src/cmd/INIT/proto.sh - exec - dst=${INSTALLROOT}/bin/proto - exec - ${STDCMP} 2>/dev/null -s $src $dst || { ${STDMV} $dst $dst.old 2>/dev/null || true; ${STDCP} $src $dst ;} - exec - test -w $dst && test -x $dst || chmod u+w,+x $dst - done __proto_stub dontcare virtual - make ${INSTALLROOT}/bin/mkdir - make mkdir.sh - done mkdir.sh - exec - if test ! -x ${INSTALLROOT}/bin/mkdir -a -x /bin/mkdir - exec - then mkdir -p 2>/dev/null || : - exec - if test -d ./-p - exec - then rmdir ./-p - exec - cp mkdir.sh ${INSTALLROOT}/bin/mkdir - exec - chmod +x ${INSTALLROOT}/bin/mkdir - exec - fi - exec - fi - done ${INSTALLROOT}/bin/mkdir generated - make ${INSTALLROOT}/bin/.paths - exec - if test ! -f ${INSTALLROOT}/bin/.paths -o -w ${INSTALLROOT}/bin/.paths - exec - then N=' - exec - ' - exec - H=${mam_cc_HOSTTYPE} - exec - P="" - exec - b= f= h= l= n= p= u= B= L= - exec - set : $P - exec - while : - exec - do while : - exec - do case $1 in - exec - '') break 2 ;; - exec - :) shift; break ;; - exec - esac - exec - shift - exec - done - exec - case $# in - exec - 0|1) break ;; - exec - esac - exec - case $L in - exec - ?*) L="$L|" ;; - exec - esac - exec - L="$L$2=*" - exec - B=$1 - exec - done - exec - if test -f ${INSTALLROOT}/bin/.paths - exec - then while read x - exec - do case $x in - exec - *\$\(\"*) break - exec - ;; - exec - '#'?*) case $h in - exec - '') h=$x ;; - exec - esac - exec - ;; - exec - $L) l=$x - exec - ;; - exec - *BUILTIN_LIB=*) b=$x - exec - ;; - exec - *FPATH=*) f=$x - exec - ;; - exec - *PLUGIN_LIB=*) p=$x - exec - ;; - exec - *) case $u in - exec - ?*) u=$u$N ;; - exec - esac - exec - u=$u$x - exec - ;; - exec - esac - exec - done < ${INSTALLROOT}/bin/.paths - exec - fi - exec - ifs=$IFS - exec - m= - exec - case $p in - exec - ?*) b= - exec - ;; - exec - esac - exec - case $b in - exec - ?*) IFS='=' - exec - set $b - exec - IFS=$ifs - exec - shift - exec - p="PLUGIN_LIB=$*" - exec - case $b in - exec - [Nn][Oo]*) p=no$p ;; - exec - esac - exec - m=1 - exec - ;; - exec - esac - exec - case $f in - exec - '') f="FPATH=../fun" - exec - m=1 - exec - ;; - exec - esac - exec - case $h in - exec - '') h='# use { no NO } prefix to permanently disable #' ;; - exec - esac - exec - case $l in - exec - '') set x x : $P - exec - l= - exec - while : - exec - do while : - exec - do case $# in - exec - 0) break ;; - exec - esac - exec - x=$1 - exec - shift - exec - case $x in - exec - :) break ;; - exec - esac - exec - done - exec - case $# in - exec - 0|1) break - exec - ;; - exec - 2) l=$2 - exec - ;; - exec - *) case "$H" in - exec - $3) l=$2; break ;; - exec - esac - exec - ;; - exec - esac - exec - done - exec - case $l in - exec - '') if test -x /lib/dld.sl - exec - then l=SHLIB_PATH - exec - elif test -x /usr/lib/dyld - exec - then l=DYLD_LIBRARY_PATH - exec - else case "$H" in - exec - ibm.*|mvs.*) - exec - l=LIBPATH - exec - ;; - exec - sgi.mips3) - exec - l=LD_LIBRARYN32_PATH - exec - ;; - exec - sgi.mips4) - exec - l=LD_LIBRARYN64_PATH - exec - ;; - exec - *) l=LD_LIBRARY_PATH - exec - ;; - exec - esac - exec - fi - exec - ;; - exec - esac - exec - case $l in - exec - ?*) case $B in - exec - '') B=lib ;; - exec - esac - exec - l="$l=../$B" - exec - m=1 - exec - ;; - exec - esac - exec - ;; - exec - esac - exec - case $p in - exec - '') p="PLUGIN_LIB=cmd" - exec - case '' in - exec - '') p=no$p ;; - exec - esac - exec - m=1 - exec - ;; - exec - esac - exec - case $m in - exec - 1) case $u in - exec - ?*) u=$N$u ;; - exec - esac - exec - echo "$h$N$p$N$f$N$l$u" > ${INSTALLROOT}/bin/.paths - exec - ;; - exec - esac - exec - fi - done ${INSTALLROOT}/bin/.paths generated - make ${INSTALLROOT}/lib/probe/C - exec - if test ! -d ${INSTALLROOT}/lib/probe/C - exec - then mkdir -p ${INSTALLROOT}/lib/probe/C - exec - fi - done ${INSTALLROOT}/lib/probe/C generated - make ${INSTALLROOT}/lib/probe/C/probe - prev ${INSTALLROOT}/lib/probe/C - prev C+probe - exec - test '' = 'C+probe' || ${STDCMP} 2>/dev/null -s C+probe ${INSTALLROOT}/lib/probe/C/probe || { ${STDMV} ${INSTALLROOT}/lib/probe/C/probe ${INSTALLROOT}/lib/probe/C/probe.old 2>/dev/null || true; ${STDCP} C+probe ${INSTALLROOT}/lib/probe/C/probe ;} - done ${INSTALLROOT}/lib/probe/C/probe generated - make ${INSTALLROOT}/lib/probe/C/make - exec - if test ! -d ${INSTALLROOT}/lib/probe/C/make - exec - then mkdir -p ${INSTALLROOT}/lib/probe/C/make - exec - fi - done ${INSTALLROOT}/lib/probe/C/make generated - prev ${INSTALLROOT}/lib/probe/C/make - make ${INSTALLROOT}/lib/probe/C/pp - exec - if test ! -d ${INSTALLROOT}/lib/probe/C/pp - exec - then mkdir -p ${INSTALLROOT}/lib/probe/C/pp - exec - fi - done ${INSTALLROOT}/lib/probe/C/pp generated - prev ${INSTALLROOT}/lib/probe/C/pp - make ${INSTALLROOT}/lib/probe/C/mam - exec - if test ! -d ${INSTALLROOT}/lib/probe/C/mam - exec - then mkdir -p ${INSTALLROOT}/lib/probe/C/mam - exec - fi - done ${INSTALLROOT}/lib/probe/C/mam generated - make ${INSTALLROOT}/lib/probe/C/mam/probe - prev ${INSTALLROOT}/lib/probe/C/mam - prev mprobe - exec - test '' = 'mprobe' || ${STDCMP} 2>/dev/null -s mprobe ${INSTALLROOT}/lib/probe/C/mam/probe || { ${STDMV} ${INSTALLROOT}/lib/probe/C/mam/probe ${INSTALLROOT}/lib/probe/C/mam/probe.old 2>/dev/null || true; ${STDCP} mprobe ${INSTALLROOT}/lib/probe/C/mam/probe ;} - done ${INSTALLROOT}/lib/probe/C/mam/probe generated - make ${INSTALLROOT}/lib/probe/C/mam/mprobe - prev mprobe - exec - test '' = 'mprobe' || ${STDCMP} 2>/dev/null -s mprobe ${INSTALLROOT}/lib/probe/C/mam/mprobe || { ${STDMV} ${INSTALLROOT}/lib/probe/C/mam/mprobe ${INSTALLROOT}/lib/probe/C/mam/mprobe.old 2>/dev/null || true; ${STDCP} mprobe ${INSTALLROOT}/lib/probe/C/mam/mprobe ;} - done ${INSTALLROOT}/lib/probe/C/mam/mprobe generated - make ${INSTALLROOT}/lib/probe/C/make/probe - prev probe - exec - test '' = 'probe' || ${STDCMP} 2>/dev/null -s probe ${INSTALLROOT}/lib/probe/C/make/probe || { ${STDMV} ${INSTALLROOT}/lib/probe/C/make/probe ${INSTALLROOT}/lib/probe/C/make/probe.old 2>/dev/null || true; ${STDCP} probe ${INSTALLROOT}/lib/probe/C/make/probe ;} - done ${INSTALLROOT}/lib/probe/C/make/probe generated - make ${INSTALLROOT}/lib/probe/C/make/probe.ini - make probe.ini - make probe.win32 - done probe.win32 - exec - t=${mam_cc_HOSTTYPE} - exec - ifs=$IFS - exec - IFS=. - exec - set x $t - exec - IFS=$ifs - exec - t=$2 - exec - set x probe.win32 - exec - while : - exec - do shift - exec - case $# in - exec - 0) break ;; - exec - esac - exec - case $1 in - exec - *probe.$t) - exec - break - exec - esac - exec - done - exec - case $1 in - exec - ?*) cmp -s $1 probe.ini || cp $1 probe.ini ;; - exec - *) : > probe.ini - exec - esac - done probe.ini generated - exec - test '' = 'probe.ini' || ${STDCMP} 2>/dev/null -s probe.ini ${INSTALLROOT}/lib/probe/C/make/probe.ini || { ${STDMV} ${INSTALLROOT}/lib/probe/C/make/probe.ini ${INSTALLROOT}/lib/probe/C/make/probe.ini.old 2>/dev/null || true; ${STDCP} probe.ini ${INSTALLROOT}/lib/probe/C/make/probe.ini ;} - done ${INSTALLROOT}/lib/probe/C/make/probe.ini generated - make ${INSTALLROOT}/include/ast - exec - if test ! -d ${INSTALLROOT}/include/ast - exec - then mkdir -p ${INSTALLROOT}/include/ast - exec - fi - done ${INSTALLROOT}/include/ast generated - make ${INSTALLROOT}/lib/lib - exec - if test ! -d ${INSTALLROOT}/lib/lib - exec - then mkdir -p ${INSTALLROOT}/lib/lib - exec - fi - done ${INSTALLROOT}/lib/lib generated - make ${INSTALLROOT}/lib/lib/dl - prev ${INSTALLROOT}/lib/lib - make dl.req - make dl.c - done dl.c - exec - set - - exec - r='-' - exec - for i in dl.c - exec - do if ${CC} -c $i > /dev/null - exec - then g= - exec - for p in dl - - exec - do case $p in - exec - -) if ${CC} -o dl.exe $i $g > /dev/null 2>&1 - exec - then ${CC} -o dl.exe $i > /dev/null 2>&1 || { - exec - r="$g" - exec - break 2 - exec - } - exec - fi - exec - g= - exec - ;; - exec - *) g="$g -l$p" - exec - ;; - exec - esac - exec - done - exec - fi - exec - done 2>/dev/null - exec - echo " $r" > dl.req - exec - rm -f dl.exe dl - done dl.req generated - exec - test '' = 'dl.req' || ${STDCMP} 2>/dev/null -s dl.req ${INSTALLROOT}/lib/lib/dl || { ${STDMV} ${INSTALLROOT}/lib/lib/dl ${INSTALLROOT}/lib/lib/dl.old 2>/dev/null || true; ${STDCP} dl.req ${INSTALLROOT}/lib/lib/dl ;} - done ${INSTALLROOT}/lib/lib/dl generated - make ${INSTALLROOT}/lib/lib/iconv - make iconv.req - make iconv.c - done iconv.c - exec - set - - exec - r='-' - exec - for i in iconv.c - exec - do if ${CC} -c $i > /dev/null - exec - then g= - exec - for p in iconv - - exec - do case $p in - exec - -) if ${CC} -o iconv.exe $i $g > /dev/null 2>&1 - exec - then ${CC} -o iconv.exe $i > /dev/null 2>&1 || { - exec - r="$g" - exec - break 2 - exec - } - exec - fi - exec - g= - exec - ;; - exec - *) g="$g -l$p" - exec - ;; - exec - esac - exec - done - exec - fi - exec - done 2>/dev/null - exec - echo " $r" > iconv.req - exec - rm -f iconv.exe iconv - done iconv.req generated - exec - test '' = 'iconv.req' || ${STDCMP} 2>/dev/null -s iconv.req ${INSTALLROOT}/lib/lib/iconv || { ${STDMV} ${INSTALLROOT}/lib/lib/iconv ${INSTALLROOT}/lib/lib/iconv.old 2>/dev/null || true; ${STDCP} iconv.req ${INSTALLROOT}/lib/lib/iconv ;} - done ${INSTALLROOT}/lib/lib/iconv generated - make ${INSTALLROOT}/lib/lib/w - make w.req - make w.c - done w.c - make w2.c - done w2.c - exec - set - - exec - r='-' - exec - for i in w.c w2.c - exec - do if ${CC} -c $i > /dev/null - exec - then g= - exec - for p in w - - exec - do case $p in - exec - -) if ${CC} -o w.exe $i $g > /dev/null 2>&1 - exec - then ${CC} -o w.exe $i > /dev/null 2>&1 || { - exec - r="$g" - exec - break 2 - exec - } - exec - fi - exec - g= - exec - ;; - exec - *) g="$g -l$p" - exec - ;; - exec - esac - exec - done - exec - fi - exec - done 2>/dev/null - exec - echo " $r" > w.req - exec - rm -f w.exe w w2 - done w.req generated - exec - test '' = 'w.req' || ${STDCMP} 2>/dev/null -s w.req ${INSTALLROOT}/lib/lib/w || { ${STDMV} ${INSTALLROOT}/lib/lib/w ${INSTALLROOT}/lib/lib/w.old 2>/dev/null || true; ${STDCP} w.req ${INSTALLROOT}/lib/lib/w ;} - done ${INSTALLROOT}/lib/lib/w generated - make ${INSTALLROOT}/lib/lib/intl - make intl.req - make intl.c - done intl.c - exec - set - - exec - r='-' - exec - for i in intl.c - exec - do if ${CC} -c $i > /dev/null - exec - then g= - exec - for p in intl - - exec - do case $p in - exec - -) if ${CC} -o intl.exe $i $g > /dev/null 2>&1 - exec - then ${CC} -o intl.exe $i > /dev/null 2>&1 || { - exec - r="$g" - exec - break 2 - exec - } - exec - fi - exec - g= - exec - ;; - exec - *) g="$g -l$p" - exec - ;; - exec - esac - exec - done - exec - fi - exec - done 2>/dev/null - exec - echo " $r" > intl.req - exec - rm -f intl.exe intl - done intl.req generated - exec - test '' = 'intl.req' || ${STDCMP} 2>/dev/null -s intl.req ${INSTALLROOT}/lib/lib/intl || { ${STDMV} ${INSTALLROOT}/lib/lib/intl ${INSTALLROOT}/lib/lib/intl.old 2>/dev/null || true; ${STDCP} intl.req ${INSTALLROOT}/lib/lib/intl ;} - done ${INSTALLROOT}/lib/lib/intl generated - make ${INSTALLROOT}/lib/lib/m - make m.req - make m.c - done m.c - make m2.c - done m2.c - make m3.c - done m3.c - make m4.c - done m4.c - make m5.c - done m5.c - make m6.c - done m6.c - exec - set - - exec - r='-' - exec - for i in m.c m2.c m3.c m4.c m5.c m6.c - exec - do if ${CC} -c $i > /dev/null - exec - then g= - exec - for p in m - - exec - do case $p in - exec - -) if ${CC} -o m.exe $i $g > /dev/null 2>&1 - exec - then ${CC} -o m.exe $i > /dev/null 2>&1 || { - exec - r="$g" - exec - break 2 - exec - } - exec - fi - exec - g= - exec - ;; - exec - *) g="$g -l$p" - exec - ;; - exec - esac - exec - done - exec - fi - exec - done 2>/dev/null - exec - echo " $r" > m.req - exec - rm -f m.exe m m2 m3 m4 m5 m6 - done m.req generated - exec - test '' = 'm.req' || ${STDCMP} 2>/dev/null -s m.req ${INSTALLROOT}/lib/lib/m || { ${STDMV} ${INSTALLROOT}/lib/lib/m ${INSTALLROOT}/lib/lib/m.old 2>/dev/null || true; ${STDCP} m.req ${INSTALLROOT}/lib/lib/m ;} - done ${INSTALLROOT}/lib/lib/m generated - make ${INSTALLROOT}/lib/lib/nsl - make nsl.req - make nsl.c - done nsl.c - exec - set - - exec - r='-' - exec - for i in nsl.c - exec - do if ${CC} -c $i > /dev/null - exec - then g= - exec - for p in nsl - - exec - do case $p in - exec - -) if ${CC} -o nsl.exe $i $g > /dev/null 2>&1 - exec - then ${CC} -o nsl.exe $i > /dev/null 2>&1 || { - exec - r="$g" - exec - break 2 - exec - } - exec - fi - exec - g= - exec - ;; - exec - *) g="$g -l$p" - exec - ;; - exec - esac - exec - done - exec - fi - exec - done 2>/dev/null - exec - echo " $r" > nsl.req - exec - rm -f nsl.exe nsl - done nsl.req generated - exec - test '' = 'nsl.req' || ${STDCMP} 2>/dev/null -s nsl.req ${INSTALLROOT}/lib/lib/nsl || { ${STDMV} ${INSTALLROOT}/lib/lib/nsl ${INSTALLROOT}/lib/lib/nsl.old 2>/dev/null || true; ${STDCP} nsl.req ${INSTALLROOT}/lib/lib/nsl ;} - done ${INSTALLROOT}/lib/lib/nsl generated - make ${INSTALLROOT}/lib/lib/socket - make socket.req - make socket.c - done socket.c - prev nsl.c - exec - set - - exec - r='-' - exec - for i in socket.c nsl.c - exec - do if ${CC} -c $i > /dev/null - exec - then g= - exec - for p in socket - - exec - do case $p in - exec - -) if ${CC} -o socket.exe $i $g > /dev/null 2>&1 - exec - then ${CC} -o socket.exe $i > /dev/null 2>&1 || { - exec - r="$g" - exec - break 2 - exec - } - exec - fi - exec - g= - exec - ;; - exec - *) g="$g -l$p" - exec - ;; - exec - esac - exec - done - exec - fi - exec - done 2>/dev/null - exec - echo " $r" > socket.req - exec - rm -f socket.exe socket nsl - done socket.req generated - exec - test '' = 'socket.req' || ${STDCMP} 2>/dev/null -s socket.req ${INSTALLROOT}/lib/lib/socket || { ${STDMV} ${INSTALLROOT}/lib/lib/socket ${INSTALLROOT}/lib/lib/socket.old 2>/dev/null || true; ${STDCP} socket.req ${INSTALLROOT}/lib/lib/socket ;} - done ${INSTALLROOT}/lib/lib/socket generated - make ${INSTALLROOT}/lib/lib/dbm - make dbm.req - make db.c - done db.c - make gdbm.c - done gdbm.c - make gdbm1.c - make gdbm-ndbm.h implicit - done gdbm-ndbm.h dontcare virtual - done gdbm1.c - make gdbm2.c - make ndbm.h implicit - done ndbm.h dontcare virtual - done gdbm2.c - exec - set - - exec - r='-' - exec - for i in db.c gdbm.c gdbm1.c gdbm2.c - exec - do if ${CC} -c $i > /dev/null - exec - then g= - exec - for p in db - gdbm_compat - gdbm - ndbm - dbm - - exec - do case $p in - exec - -) if ${CC} -o dbm.exe $i $g > /dev/null 2>&1 - exec - then ${CC} -o dbm.exe $i > /dev/null 2>&1 || { - exec - r="$g" - exec - break 2 - exec - } - exec - fi - exec - g= - exec - ;; - exec - *) g="$g -l$p" - exec - ;; - exec - esac - exec - done - exec - fi - exec - done 2>/dev/null - exec - echo " $r" > dbm.req - exec - rm -f dbm.exe db gdbm gdbm1 gdbm2 - done dbm.req generated - exec - test '' = 'dbm.req' || ${STDCMP} 2>/dev/null -s dbm.req ${INSTALLROOT}/lib/lib/dbm || { ${STDMV} ${INSTALLROOT}/lib/lib/dbm ${INSTALLROOT}/lib/lib/dbm.old 2>/dev/null || true; ${STDCP} dbm.req ${INSTALLROOT}/lib/lib/dbm ;} - done ${INSTALLROOT}/lib/lib/dbm generated -done install virtual -make test - make test.iffe - prev iffe - make iffe.tst - done iffe.tst - exec - regress iffe.tst iffe - done test.iffe virtual - make test.mamake - prev mamake - make mamake.tst - meta mamake.tst %.rt>%.tst mamake.rt mamake - make mamake.rt - done mamake.rt - exec - if [[ "1" || "mamake.rt" -nt "mamake.tst" ]] - exec - then mktest --style=regress mamake.rt > mamake.tst - exec - fi - done mamake.tst generated - exec - regress mamake.tst mamake - done test.mamake virtual -done test dontcare virtual diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/RELEASE b/cde/programs/dtksh/ksh93/src/cmd/INIT/RELEASE deleted file mode 100644 index 677586b25..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/RELEASE +++ /dev/null @@ -1,934 +0,0 @@ -12-07-17 iffe.sh: add C code NOTE("...") to amend --verbose output -12-06-26 iffe.sh: fix "npt foo" to handle function-like macro foo() -12-06-20 package.sh: use $KSH for rt in "results test" -12-06-15 Makefile: add PLUGIN_LIB to $INSTALLROOT/bin/.paths and BUILTIN_LIB => PLUGIN_LIB -12-06-15 package.sh: add PLUGIN_LIB to $INSTALLROOT/bin/.paths and BUILTIN_LIB => PLUGIN_LIB -12-06-13 package.sh: handle admin.db column output -12-06-08 iffe.sh: fix 12-06-06 typo -12-06-06 iffe.sh: check for -l* in reverse and accumulative order (e.g., for -last & -lm) -12-06-04 package.sh: always check $INSTALLROOT/lib/package/profile -12-05-31 Makefile: ID=ast; $(INSTALLROOT)/prototyped.h => $(INSTALLROOT)/$(ID)/prototyped.h -12-05-28 iffe.sh: API foo YYYYMMDD => FOOAPI(rel) test macro -12-05-24 package.sh: change admin.db comment => owner attributes -12-04-25 ratz.c: add sear -k option to keep installation tmp dir on exit -12-04-17 package.sh: skip sh version logic for ``use'' -12-04-17 cc.ibm.risc*: _LARGEFILE64_SOURCE => _LARGE_FILE_API moved to libast/features -12-04-09 cc.ibm.risc*: speak aixese for _LARGEFILE64_SOURCE -12-02-29 cc.darwin.i386*: handle default cc vs kernel bittedness -12-02-29 C+probe: add __TIMESTAMP__ to the nopredefined list -12-02-29 package.sh: don't assume grep -q or /usr/local/lib in LD_LIBRARY_PATH -12-02-29 package.sh: fix ksh vs -lcmd compatibility checks -12-02-23 iffe.sh: checkcc() before checkread() for sensible diagnostics -12-02-14 package.mk: { --clobber --compare --link=lib*.a* } for --mam=static -12-02-14 package.mk: export LICENSEFILEDEFAULT instead of LICENSEFILE -12-02-14 package.sh: handle @(cc|ld).${HOSTTYPE}* intercepts -12-02-07 package.sh: add { clean clobber } actions -12-02-02 regress.sh: fix ulimit -c defaults for --nokeep -12-01-18 regress.sh: add INPUT|OUTPUT|ERROR -e 'filter' to filter before comparison -12-01-21 package.sh: fix `admin make' bug that created unused $INSTALLROOT/lib -12-01-21 Makefile: :PACKAGE: license=ast -- oops -12-01-20 cc.darwin,cc.mvs.390: tmp=/tmp/cc.${USER:-$LOGNAME}.$$.err -12-01-12 package.sh: add admin make share closure to handle alternate HOSTTYPEs -11-12-13 iffe.sh: add /**/ test code comment to disable default #include -11-11-11 C+probe: test for .so before .sl -11-10-26 package.sh: don't forget about *.pkg for admin update -11-10-18 cc.*-icc: update and add more -11-10-11 package.sh: handle package make|view when no source installed -11-09-11 package.sh: count admin '*** termination code' errors -11-08-31 mamake.c: add -e, ignore use recursive prereq timestamps -11-08-29 iffe.sh: add ``set stdio try1.h - try2.h ...'' -11-08-29 iffe.sh: trap EXIT => trap 0 for ancient sh -11-08-11 iffe.sh: handle ancient sort that doesn't have -k -11-06-01 make.probe: add more /lib64 logic -11-05-01 package.sh: fix admin ditto to sync LICENSES too -11-03-25 package.sh: initialize { $SED $TR } before first use! -11-03-21 package.sh: fix vpath probes -11-03-17 iffe.sh: fix cleanup to rm $tmp* instead of $tmp*.* -11-02-24 package.sh: change curl usage to "curl -L ..." -11-02-11 package.sh,C+probe,make.probe,mamprobe.sh: add ###.*archaic.*### -11-02-02 Makefile: add :MAPLIB: check for ancient -lw -11-02-02 make.probe: handle -print-multi-directory => 64 => /usr/lib64 /lib64 -11-02-02 package.sh: HOSTTYPE=*,*cc*[,-*,...] sets CC [ and CCFLAGS ] -11-02-02 make.probe: handle gcc $ORIGIN link but exec failure -- gee thanks -11-01-25 cc.hp.ia64: bundled cc is a pile of shaving cream -11-01-07 iffe.sh: check debug==3 for is_hdr() failure -10-11-22 ditto.sh: fix timing problem between |& and exec &p -10-11-10 package.sh: fix cc cross compile check to use checkcc absolute path -10-10-10 package.sh: list main env vars at start of make action -10-10-10 ratz.c: tweak windows delays -10-09-10 ratz.c: add _SEAR_ARGS for _SEAR_EXEC -10-09-01 package.sh: fix ratz from source logic -10-08-25 package.mk: consolidate license file search in .package.licenses. -10-08-22 ratz.c: run sear bootstrap command detached -10-08-20 C+probe: version_stamp only if version_flags works -10-08-17 package.sh: unset makerules *DIR variables in env -10-08-15 package.sh: "make" action now lists some env values -10-08-11 mktest.sh: add "DO command ..." -10-07-27 rt.sh: handle "rt X=Y ..." -10-06-29 ratz.c: non-option sear args passed to sear_exec() -10-06-25 iffe.sh: "api" op changed to not do "map-libc" type mappings -10-06-25 package.sh: "force admin ditto" => no ditto --update option -10-06-22 C+probe: handle cc that require .[ci] input for version info -10-06-21 ditto.sh: change default remote access to ssh (about time) -10-06-12 regress.sh: DIAGNOSTICS [ 1 | 0 | pattern ] and fix EXIT for all -10-06-09 package.sh: add AT&T to usable nmake check -10-06-06 iffe.sh,iffe.tst: add { api ver } ops -10-04-22 package.sh: update "html binary|source" NAME/PASSWORD info -10-04-15 iffe.sh: don't forget candidate headers for hdr|sys! -10-04-11 WWW.mk: disable man page metarule -- now done by admin-man(1) -10-02-14 package.sh: $CC verification needs $INSTALLROOT/bin in PATH -10-02-11 package.sh: fix package admin make report error count -10-02-02 package.sh: fix write binary bug that did scp on local fs -10-02-02 package.mk: up to date binary targets must still be in PACKAGE.*.lst -10-01-01 package.sh: fix premature $INSTALLROOT/bin during cross compile check -10-01-01 make.probe: handle ['"] in CC.VERSION.STRING -09-12-04 iffe.sh: add "opt name" to check for name in $PACKAGE_OPTIONS -09-11-30 mktest.sh: change RESET to STATE.RESET to make it global -09-11-14 make.probe: use gcc { -print-multi-directory -print-search-dirs } -09-11-11 package.sh: re-order and combine cc checks -09-10-27 C+probe,make.probe,probe.win32: add CC.SUFFIX.DEBUG -09-10-21 iffe.sh,Makefile: test -e is not in ksh88! -09-10-06 iffe.sh: handle cc -E #error with 0 exit status (sgi) -09-10-06 package.sh: stub in ar intercept checks -- not used yet -09-10-06 ar.ibm.risc: add ar intercept because some AIX require -Xfoo first!! -09-09-24 regress.sh: fix UMASK logic to create test support files before umask -09-08-28 release.c: change docs to mention stdin if no file operands -09-08-24 package.sh: fix isascii() bug that failed on od(1) trailing space -09-08-20 make.probe: add CC.SHARED.NAME -09-08-20 regress.sh: add { JOB CONTINUE EXITED KILL FIFO } -09-08-11 package.sh: filter lines containing : for package results -09-07-31 make.probe: add CC.AR.ARFLAGS (for AIX ar -xany) -09-07-31 package.sh,cc.*: fix -dumpmachine to handle 32/64/* bit options -09-06-24 package.sh: fix admin.db output formatting -09-05-05 package.sh: export dll hackery environment vars -09-05-05 package.sh: handle non-identifier hostnames -09-05-05 mamake.c: pass undefined ${...} identifiers to the shell -09-05-05 mamake.rt: add macro expansion regression tests -09-05-01 iffe.sh: fix output initialization *again* -09-04-28 package.sh: handle admin.db contact field $9 -09-04-15 iffe.sh: add implicit "ini" op to initialize io for subsequent ops -09-03-31 regress.sh: EXPORT before test => global ENVIRON[] -09-03-26 package.sh: test fail pattern is 'fail[es]' -09-03-26 UNIT - ... appends (options) to command line -09-03-19 TEST.mk: x.tst => x only if x is command target -09-03-15 regress.sh: add ${MAIN} for base name of main unit -09-03-10 TEST.mk: add .SOURCE:tests if tests is a dir -09-03-03 regress.sh: allow command line unit to override UNIT -09-03-03 mktest.sh: handle IO == $'\n' -09-02-02 package.sh: delay $INSTALLROOT/bin/.paths generation until mamprobe runs -09-01-30 cc.mvs.390: c89 balks at [ ()] in -Dname="..."! -09-01-27 package.sh: add isascii() to use ratz instead of tar -09-01-20 hurl.sh: add --size=bytes option -09-01-08 TEST.mk: add test.* prereqs, multiple arg lists with :T=*: binding -09-01-03 regress.sh: fix UNIT to allow command line override -09-01-03 mktest.sh: handle TWD -08-12-24 package.sh: fix cross-compile HOSTTYPE logic -08-12-15 package.sh,hurl.sh: handle http codes { 301 302 303 } -08-10-16 make.probe '-fno-stack-protector -fno-stack-protector-all' to cop out!! -08-09-30 rt.sh: fix ksh93 regression test signal count -08-09-26 regress.sh: ignore SIGPIPE for SET pipe-input -08-09-24 package.sh: package only test foo => make --recurse=only recurse tests foo -08-09-20 make.probe: handle another /usr/bin/file shared lib description -08-09-20 regress.sh: add --pipefail for SET pipe-input ... -08-09-17 Makefile: add gdbm1.c for -08-09-10 make.probe: add CC.NOPROTECT -08-08-08 mktest.sh: add --width=width -08-08-05 dbm.req: favor sleepycat ndbm compatibility -08-08-04 C+probe: fix stdlib initialization logic -08-06-24 package.sh: fix $INSTALLROOT/bin/cc intercept time stamp file typo -08-06-20 TEST.mk: make the localyunit before *.rt => *.tst -- doh -08-06-20 mktest.sh: prepend $PWD onto PATH for local units -- doh^2 -08-06-11 regress.sh: fix bug that skipped the last test -08-05-20 regress.sh: add --local to put *.tmp dir in local fs -08-05-05 regress.sh: add IF command ... ELIF command ... ELSE ... FI -08-05-01 package.sh: package test => ulimit -c 0 -08-04-28 regress.sh: fix EXPORT quoting -08-04-28 regress.sh: fix UNIT set check args too -08-04-24 rt.sh: exit code > 256 => signal termination -08-04-10 C+probe: change probe_so order to check .so last (Mac OS X ld workaround) -08-04-01 package.sh: handle multiple admin HOSTTYPEs per HOST -08-03-28 C+probe: add C++ #include (no extension) dir probes -08-03-17 regress.sh: fix trap on EXIT, add terminated note to final tally -08-02-28 make.probe: fix probe_warn to include ld! -08-02-02 make.probe: add CC.RUNPATH to match default -L order -08-01-31 package.sh: check lib64 for LD_LIBRARY_PATH -08-01-31 iffe.sh: tweak ancient /bin/sh workarounds -08-01-28 make.probe: Darwin ld export dynamic is -force_flat_namespace -08-01-28 C+probe: handle SGI cc error message but exit 0 botch(es) -08-01-23 package.sh: fix checksum doc typo -08-01-09 C+probe: add __FUNCTION__ to the undef (don't check) list -07-12-14 iffe.sh: add set nooptimize -07-12-03 package.sh: add LC_ALL=C -07-11-27 package.sh: fix overaggressive *.md5 cleanup -07-11-20 iffe.sh: treat exit status >= 250 as normal error with no signal -07-11-05 package.sh: fix write op error count pattern -07-11-05 package.mk: fix $(~req) .ver binding -07-08-11 probe.win32: add cl.exe setuid workaround, CC.VERSION[.STRING] -07-08-01 package.sh: handle 'package read lcl|tgz' -07-05-08 regress.sh: execute basename instead of absolute path for short $0 -07-04-27 cc.sgi.mips[34]: for #error to exit non-zero -- a no brainer -07-04-20 mktest.sh: defer to systems without 'grep -q' -- sigh -07-04-11 mamprobe.sh: handle $(CC.*) => ${mam_cc_*}, $(...) => ${...} -07-04-11 make.probe: fix CC.PICBIG probe, default { CC.PIC CC.DLL } to BIG -07-04-04 iffe.sh: prepend ${tst}${ext} to each .c probe -07-03-28 package.sh: fix binary tgz architecture type duplication -07-03-28 package.mk: add binary write PACKAGE.$HOSTTYPE.lst -07-03-28 iffe.sh: add -F header to mac test -07-03-23 make.probe: handle file(1) that returns 'archive' for .so -07-03-22 mamprobe.sh: fix STDED probe for implementations that ignore EOF -07-03-11 package.sh: add nocopyright and tst => nocopyright -07-03-11 package.mk: add copyright=0 -07-03-08 C+probe: restore IFS after probe.ini -07-02-26 mamake.c: expand first of ${mam_lib*} for ${AR} -07-01-05 package.sh: fix "admin write binary" logic -07-01-01 iffe.sh: add "cmd" --verbose trace -07-01-01 iffe.sh: sort => LC_ALL=C sort -07-01-01 C+probe: LC_ALL=C -06-12-22 make.probe: lean on gcc -v for stdlib, but preserve /usr/local! -06-11-23 package.sh: *.md5 are not tarballs -- doh -06-11-23 iffe.sh: add -F, --features=feature-test-header -06-11-11 make.probe: favor lib64 over lib for hosttype==*64 -06-10-31 make.probe: add "-ignore-source-dir -iquote" test -06-10-31 iffe.sh: add status{...} code block -06-10-11 regress.sh: fix DO to handle {...} (time for regress.tst?) -06-10-11 package.sh: handle already gunzip'd *.tgz -06-10-06 iffe.sh: add reference for header content tests -06-09-27 regress.sh: fix UMASK to do DO too (duh) -06-09-22 iffe.sh: drop -O for npt tests (for msvc intrinsics) -06-09-14 cc.darwin: drop -O until gcc 4.* gets its act together -06-09-11 package.sh: { cc ld ldd } intercepts check ${HOSTTYPE%.*} too -06-09-08 regress.sh: add PIPE INPUT|OUTPUT for pipe io -06-09-05 C+probe: add { probe_version version_stamp version_string } -06-09-05 make.probe: add version stamp comment, CC.VERSION[.STRING] -06-08-27 regress.sh,mktest.sh: add UMASK -06-08-25 regress.sh: add -b,--ignore-space,IGNORESPACE -06-08-25 mktest.sh: add IGNORESPACE -06-08-24 mktest.sh: handle \000 in data -06-08-24 regress.sh: handle -f* for INPUT|OUTPUT|ERROR -06-08-16 package.sh: fix 'install flat' logic -06-08-11 rt.sh: handle style=shell %K date format -06-07-17 ratz.c: fix __MVS__ FAR definition -06-07-17 iffe.sh: "header x.h" -- deprecate "include x.h" for .SCAN.iffe -06-07-17 package.sh: differentiate urls vs. assignments -06-06-27 rt.sh: add --failed, --heading -06-06-27 C+probe,TEST.mk,make.probe,mktest.sh,regress.sh: 'ulimit -c 0' -06-06-26 cc.darwin.ppc: handle -lcc_dynamic disappearance -06-06-25 mktest.sh: implement PROG -06-06-11 Makefile: add -ldbm :MAPLIB:, provide public MAPLIB.mk -06-05-06 package.sh: add PACKAGE_admin_tail_timeout -06-05-22 ratz.c: upgrade to zlib-1.2.3 -06-05-09 package.sh: fix admin.db docs -06-03-11 package.sh: fix `package use - command ...' -06-03-05 make.probe: work around pedantic bash 3.1 mismatched " in `.` -06-02-14 package.sh: "results failed test" == "results test failed" - cc.sgi.*: add _AST_cc_OPTIONS parameterization, -OPT:Olimit=0 - cc.linux.ia64-icc: add for Intel cc -06-02-02 package.sh: FreeBSD stuck with OS version for all arch -06-02-01 package.mk: fix locale logic (tw -d requires dir arg) -06-01-31 package.sh: require $CC only for make|test -06-01-30 package.sh,hurl.sh: use the backwards-compatible --http-passwd - package.sh: add more pdksh => /bin/sh checks -06-01-26 package.sh: wget --http-pass => --http-password - package.sh: fix wget error logic - hurl.sh: wget --http-pass => --http-password -06-01-11 package.mk: pass package.license.class to make --mam too - package.mk: variants=pattern => --variants=pattern - package.sh: Darwin rel<=7 => darwin7.ppc - package.sh: FreeBSD rel<=4 => freebsd4 - package.sh: FreeBSD rel<=5 => freebsd5 -05-12-07 iffe.sh: don't emit if | (XXX) -05-12-05 make.probe: disable readonly.exe core dump via ulimit -c 0 -05-09-22 mktest.sh: add EXEC [ ++NOOUTPUT ++NOERROR ++NOEXIT ] -05-09-21 mktest.sh: fix --style=shell compare to ignore \r -05-09-12 TEST.mk: all --force to force %.rt regeneration -05-09-05 TEST.mk: regenerate from %.rt only if newer, :SAVE: %.tst -05-08-25 mktest.sh: add - TEST.mk: add %.rt=>%.tst for mktest -05-08-18 package.sh: 'package host cpu' now checks $NPROC first -05-07-17 iffe.sh: add { define extern include print } ops - iffe.sh: accept output{...}end output on success only -- doh -05-07-01 package.sh: add TARPROBE for tar B flag probe -05-06-24 package.sh: fix binary read chmod via *.sum -05-06-06 package.sh: fix KEEP_HOSTTYPE logic to handle synthesized types -05-06-01 make.probe: verify that cc_pic works for hosted cc - cc.lynxos.ppc: make -mshared the default - package.sh: note $INSTALLROOT/bin/@(cc|ld|ldd) installation -05-05-25 make.probe: add CC.INCLUDE.LOCAL instead of -I- in CC.DIALECT -05-05-24 iffe.sh: really fix grouping logic -- with tests this time - package.sh: pipe/socket configuration mismatches => use /bin/sh -05-04-28 TEST.mk: add $(TESTS) -05-04-19 package.sh: package results test uses rt if possible - iffe.sh: fix 'op var - ... - ...' grouping logic -05-04-15 rt.sh: handle autom4ate style -05-04-11 regress.sh: fix unit name when command line unit also specified - rt.sh: handle all AST package test output formats - package.sh: fix make docs for options passed to underlying make -05-04-08 package.sh: cp -p makerules.mo to $OK to preserve mtime - regress.sh: add "TITLE name" to change TEST output title -05-04-01 rt.sh: add pretty make test + regress.sh wrapper -05-03-29 package.sh: test -e path => test -f path -o -d path -05-03-24 make.probe: fix CC.PICBIG probe to prefer -fPIC over -fpic -- doh -05-03-19 mamake.c: command line name=var also defines name.FORCE=var -05-03-11 regress.sh: unset LC_ALL when LC_* EXPORT'd - package.sh: old make.out saved in circular make.out.[1-9] - mamake.c: sync with nmake :W=O: -05-03-01 package.sh: fix flat hierarchy initialization - package.sh: admin action now properly resets sibling remote logs - package.mk: relax unknown/unwritten package messages to warnings - package.sh: handle space in command line name=value - make.probe: add MVS -Wc,dll,exportall,longname,rent to CC.DLL probe -05-02-24 package.sh: hosttype *.powerpc => *.ppc - cc.lynxos.ppc,ldd.lynxos.ppc: add -05-02-22 mamake.c: fix { -G --debug-symbols -S --strip-symbols } MAMAKEFLAGS bug -05-02-20 probe.win32: handle /platformsdk mount -05-02-19 package.sh,package.mk: add write tst for tgz in tst subdir -05-02-18 package.sh: accept cc -dumpmachine with 0 or 1 - -05-02-14 package.sh: handle multiple architectures per host in admin.db - Makefile,package.sh: honor $INSTALLROOT/bin/.paths overrides - package.sh: normalize trailing [-_]bits in host type - iffe.sh: some ksh-compatible shells don't do *(pattern) -05-02-11 iffe.sh: back out 05-01-11 child process stdin hijack - cc.lynxos.i386: -dynamic instead of -static default -05-02-10 package.sh: cyg usr/doc => usr/share/doc -05-02-08 package.sh: drop -m with pax -- delta bug fixed 2005-02-08 - iffe.sh: work around old bash 0<... redirection bug -05-02-06 package.mk: source.tgz: update generated files only when they change -05-02-02 *.sh,*probe: IFS may be unset and { ash bsh } don't on startup -- wow -05-01-11 package.sh: update setup docs to include authorize+password - package.mk: fix .source.cyg final directory edit - package.mk: notice=1 for conspicuous empty NOTICE file - WWW.mk: fix *-index.html installation - filter.sh: retain input file suffix in tmp copy - mamexec.c: fix non-contiguous "exec" bug that skipped lines - iffe.sh: fix candidate lib test to try grouping subsequent libs - iffe.sh: fix child process stdin hijack that skipped input lines - iffe.sh: --shell=osh to force read -r compatibility command - iffe.sh: chop iffe input leading space before # for KnR compatibility -05-01-05 package.sh: add ${TAR} ${TARFLAGS} and tar B flag for pipes - mamake.c: fix makefile scan to ignore lib*.[hH] - iffe.sh: immunize function/symbol tests from aggressive -O -04-12-28 WWW.mk: add :WWWPAGE: faq.*.mm index generator -04-12-21 ratz.c: make sure tmp dir is writable -- doh -04-12-08 iffe.sh: fix dat test for aggressive -O -04-12-01 iffe.sh: add `include file' to pull in #define's for `exp' -04-11-11 package.sh: default MAKESKIP is "*[-.]*" -04-10-22 ratz.c: change docs to note zlib license - mamake.c: handle --debug-symbols and --strip-symbols - package.sh: make (debug|strip)=1 => --(debug|strip)-symbols - package.mk: add :LICENSE: => package.license.class - mamake.c: fix recursive order logic -04-10-18 package.mk: add :LICENSE:, :OMIT: to omit package subdirs -04-10-11 package.sh: add 'authorize name' and 'password password' -04-10-01 iffe.sh: double check $static link with ! $static - Makefile: add BUILTIN_LIB to $INSTALLROOT/bin/.paths - make.probe: add CC.DIALECT EXPORT={ALL,REF,EXT,DLL} - package.sh: add BUILTIN_LIB to $INSTALLROOT/bin/.paths -04-09-21 package.mk: $(init)$(name) is now an implicit prereq -04-09-09 package.sh: copy makerules.mo to $INSTALLROOT/bin/ok -04-09-01 package.mk,package.sh: rename *.txt => *.README - package.mk: add the runtime package type (no *.[ah]) - iffe.sh: fix key test reports -04-08-26 Makefile: { add m2.c m3.c } -lm tests for { frexp[l] ldexp[l] } -04-08-11 package.mk: handle HOSTTYPE for Solaris > 9 - package.sh: add `checkaout proto' for { make view } - package.sh: check for { md5sum md5 } - iffe.sh: add {if|elif|else|endif} test ... - iffe.sh: add 'exp - expression' and '( expression )' - iffe.sh: add 'name = test ...' user defined macros - iffe.sh: add '! test ...' negation - TEST.mk: add implied { .c .sh } generated prereq - cc.darwin.ppc: handle 10.3 -dylib mess -04-08-01 package.mk: let include handle nested requirements -- duh -04-07-31 package.sh: attempt a second ping before admin assumes host down -04-07-26 package.sh: fix hp.ia64 HOSTTYPE -04-07-23 probe.win32: generalize #include dir order search -04-07-17 regress.sh: add INPUT -x for chmod +x -04-07-01 regress.sh: TMP => TWD -04-06-29 regress.sh: put COMMAND in $TWD too -04-06-21 regress.sh: mkdir -p INPUT and OUTPUT intermediate dirs - TEST.mk: add :TEST: -- to disable .c .sh search -04-06-18 TEST.mk: add .SCAN.tst -04-06-17 regress.sh: TEST returns true if active, false otherwise - regress.sh: add CD to change test pwd from $TWD -04-06-16 regress.sh: add TWD for ./unit.tmp override - regress.sh: DO now flushes previous test - regress.sh: INPUT and OUTPUT handle -f for printf instead of print -04-06-11 package.sh: make sure $INSTALLROOT/bin is in front of $PATH - package.sh: skip nmake if older than 2000-10-31 -04-05-20 package.sh: fix arg vs. package parse with - or '' to disambiguate -04-05-11 package.sh: package verbose update lists closure for package setup - package.sh: add src/lib/libardir to nmake proto bootstrap - regress.sh: probe for rm -u vs. chmod -R u+rwx -04-05-01 package.sh: $CC must be C, not C++; allow release command on $PATH -04-04-15 make.probe: check probe_libdir false positives - package.sh: add lib/package/*.lic src package subdirs - package.mk: add mamfile=0 to inhibit Mamfile generation - iffe.sh: config name_DECLARED => HAVE_name_DECL - iffe.sh: fix mac to handle default value -04-04-11 iffe.sh: normalize sed [\\\\/] quoting -04-04-04 package.mk: only checksum generated tarballs - mamprobe.sh: add STDCHMOD -04-04-01 C+probe: set export LANG=C for uniform error messages - make.probe: another CC.STDLIB tweak - package.sh: fix regress core dump pattern, expand [a-z] match ranges -04-03-31 Makefile: add intl :MAPLIB: test - make.probe: fix CC.STDLIB search; drop CC.* path duplicates -04-03-28 iffe.sh: drop unused exec $stdin<&0 dup -04-03-25 Makefile: add iconv :MAPLIB: - package.sh: use ${PING:-ping -c 1 -w 4}, allowing admin.db override -04-03-24 package.mk: add *.md5 checksum for each *.(c|exe|tgz) - package.sh: update base change on md5 sum instead of size - iffe.sh: adjust case label \ and keyword quoting for ancient /bin/sh -04-03-22 probe.win32: ncc => nld -04-03-19 CONVERT.mk: change the instructions and old source dir default - package.mk: fix recurse=list check - package.mk: add *.md5 checksum for each *.(c|exe|tgz) - package.sh: fix update base/delta/sync existence check -04-03-18 iffe.sh: -d2 does not remove core dumps on exit -04-03-17 package.sh: fix make recurse arg/action order -04-02-29 package.sh: add regress action to compare current and previous tests - package.sh: fix sgi.mips[23] HOSTTYPE test for old IRIX cc - package.sh: add `export variable ...' - package.sh: admin action now handles host name with non-id chars - package.sh: non-numeric M T W in admin.db disables that action - package.sh: fix admin write binary local vs. shared clash - cc.hp.pa: add _AST_CC_hp_pa_DEFAULT=+DAportable - cc.hp.pa64: sync with cc.hp.pa - cc.ibm.risc: -bnolibpath => -blibpath:/usr/lib:/lib - probe.win32: sync with make.probe - make.probe: fix last chance dynamic test - make.probe: add hp.pa CC.EXPORT.DYNAMIC -Wl,-E - make.probe: add ibm.risc CC.EXPORT.DYNAMIC -bexpall - make.probe: move probe_dll_def to the end of probe_dll - package.mk: capture subcomponent mamfile recursion -04-02-24 make.probe: strip "..." from cc/ld traces - iffe.sh: add ``set [no]define'' to disable macro #define/#undef -04-02-23 make.probe: rework CC.LD search -04-02-14 make.probe: add CC.EXPORT.DYNAMIC for main dynamic sym export - make.probe: resurrect CC.PIC with separate semantics from CC.DLL - make.probe: add CC.SHARED.LD for CC.SHARED linker - C+probe: clear DISPLAY to stifle interactive windows -04-02-11 iffe.sh: handle ``siz void*'', add cross{ ... }end - make.probe: add { CC.AR CC.SIZE }, fix cross command search - cc.darwin.ppc: change $cc => $CC for old ksh + libast conf bug -04-02-09 make.probe: drop -nostartfiles from CC.SHARED for C++ -04-02-04 package.sh: fix cross compilation bug that mixed binary formats -04-02-02 package.sh: package admin now ditto's bin/package too -04-01-30 cc.sgi.mips3: drop warning 3421 -04-01-11 regress.sh: output label#count for tests in loops -04-01-05 regress.sh: fix bug that ignored the first SAME -04-01-04 crossexec.sh: fix typo that did not recognize rcp -03-12-19 mamake.c: add `foolib:foo:libfoo' to recurse() -03-10-11 regress.sh: add EXPORT, export COLUMNS=80 for message consistency -03-09-23 ratz.c: fix tar header number parse bug that skipped to next number - regress.sh: rm cleanup now handles files matching -* -03-09-11 iffe.sh: add unnamed { ... } blocks - regress.sh: add COPY from to, like MOVE but comparison still done - regress.sh: rm -rfu to handle test dirs w/o u+rwx -03-08-14 Makefile: add hello.c to the manifest -03-08-11 package.sh: fix `html binary' generation -03-06-21 package.sh: fix INITROOT initialization bug - package.sh: make sure admin logs exists before tail'ing -03-06-11 probe.win32: fix $(BINDIR) typo that expanded in sh instead of make - cc.mvs.390: return code 4 yields exit code 3 but it's *really* ok - package.sh: fix onpath function global var conflict - make.probe: add CC.DIALECT { GNU -dD } - package.mk: add Mamfile to lcl manifest -03-06-10 package.sh: fix setup action typo that only checked the INIT package - package.sh: *.s390x => *.s390-64 -03-06-09 package.mk: add cyg :POSTINSTALL: -03-06-08 make.probe: fix CC.STDLIB logic - hurl.sh: add User-Agent identification - package.sh: tweak source and binary installation instructions - cc.hp.pa,ld.hp.pa: +-Wl,+cdp,${INSTALLROOT}/lib/: drops abs lib paths - ldd.hp.pa: add -03-06-06 package.sh: fix $INSTALLROOT/bin/ldd check - make.probe: add CC.STDLIB verification -03-06-04 make.probe: add +forceread +noforceread -03-05-11 hurl.sh: handle http://host:port/path -03-05-06 package.sh: fix setup action PACKAGEROOT and INIT logic -03-05-05 package.mk: fix Cygwin tarball names -03-04-30 package.sh: move (cc|ld|ldd).$HOSTTYPE updates from Makefile -03-04-27 make.probe: fix MVS CC.PREFIX.SHARED "lib" => "" - make.probe: add CC.DLL.DIR = $(BINDIR) or $(LIBDIR) - make.probe: add { CC.LD.LAZY CC.LD.NOLAZY CC.LD.RECORD CC.LD.NORECORD } - probe.win32: sync with latest CC.* -03-04-25 mamprobe.sh: add args to `. $makeprobe' for ancient sh -03-04-23 package.mk: fix dup "covered by" licenses -03-04-22 probe.win32: CC.DIALECT += "LIBPP -I-" for all cc's - package.sh: fix admin write binary tarball snarf -03-04-21 package.mk: package covered *.@(pkg|lic) too -03-04-15 package.mk: don't generate incremental archives for lcl - package.mk: add incremental=[source:1 binary:0] archive control - package.sh: generate $INSTALLROOT/bin/cc wrapper for CC != cc - package.sh: admin must ditto lib/package/*.@(pkg|lic) too - mamake.c: ignore time of ignore prereqs - mamake.c: -D2 lists propagated times -03-04-11 package.mk: tidy up cyg tarballs - package.sh: fix old shell clash between get() and $get -03-04-05 package.mk: restore *.inx generation somehow lost during cyg additions - package.sh: add pthread_num_processors_np() last resort for CPU count - package.sh: use `make believe' to accept mamake generated files - package.sh: handle `make [make-flags] [target ...]' - mamake.c: ignore -e -03-03-21 package.mk: fix cyg old make typo - package.sh: switch to `package setup' instructions -03-03-19 package.sh: add registry checks for `host cpu' - package.sh: `results failed' now lists core dump messages -03-03-17 package.sh: on Cygwin verify 'ntsec binmode' in $CYGWIN or die - Makefile: install gcc wrapper if no cc - package.mk: add :DETAILS: { :README: :EXPORT: :INSTALL: :TEST: } ops -03-03-12 package.mk: add :DETAILS: for style-specific details -03-03-11 package.sh: add beta setup/update support - TEST.mk: add (TESTCC) prereq for .sh tests -03-03-07 hurl.sh: add -03-03-06 iffe.sh: fix lib Win32 test Cygwin vs native incompatibility - iffe.sh: change internal stdio.h guard to handle C++ inline vs. macro -03-03-03 package.sh: check for curl or wget for update - package.sh: add setup action == update read make - package.sh: fix packageroot() typo that showed up in non ~user shells - mamake.c: treat name+=value args like name=value - mamake.c: add ${var?*|value?match?no-match?} - mamake.c: fix archive vs. dynamic bind logic -03-02-28 package.sh: add the "cyg" (Cygwin) package type - package.mk: add "cyg" stubs, :CATEGORY: for category name(s) -03-02-25 mamake.c: add -D4 system(3) debug trace -03-02-24 package.mk: change --mismatch to --corrupt=accept -03-02-14 ratz.c: add _WIN32 setmode([01],O_BINARY) and fopen "rb"/"wb" -03-02-12 Makefile: handle getconf LIBPATH with host pattern -03-01-31 package.mk: fix .lic search -03-01-30 package.sh: handle { INIT ksh nmake } already installed elsewhere - package.sh: admin handles command outside of $PACKAGEROOT/bin - Makefile: install $(INSTALLROOT)/lib/make/package.mk -03-01-28 package.sh: admin remote commands on one line to please syslog -03-01-23 probe.win32: borland and mingw32 tweaks -03-01-22 package.sh: fix $CC test to ignore set -x trace -- duh -03-01-16 ditto.sh: tw --chop on by default -03-01-14 package.sh: use /bin/cp to copy previous binaries to bin/ok/ - package.sh: admin now initiates remote exec and copy from local host -03-01-12 package.sh: handle admin "xxx:" default root -03-01-03 probe.win32: add /usr/include/borland path truncation workaround -02-12-10 iffe.sh: add <&$nullin >&$nullout to checkread() $cc -02-12-06 probe.win32: fix inlcude => include typo, add lcc lib - probe.win32: CC.MAKE.OPTIONS = nativepp=0 -02-12-04 mamake.c: fix ${foo-bar} to expand foo if defined -02-11-28 probe.win32: add C++ and -I- CC.DIALECT checks -02-11-26 package.sh: package release now checks for second level files -02-11-22 package.sh: update action now uses HTTP/1.0 -02-11-21 probe.win32: update the vc include dir test -02-11-20 make.probe: fix CC.LD.ORIGIN typo that expanded make var -02-11-13 packahe.mk: fix list.install => list.installed typo -02-11-12 make.probe: add CC.LD.ORIGIN for a.out origin dir relative dll search - make.probe: add CC.LD.STRIP for link time a.out strip - package.sh: fix package_use vs. PACKAGE_USE check -02-10-24 WWW.mk: fix bug that required a :WWWBIN: assertion to post -02-10-23 mamake.c: fix uninitialized time in make() - ratz.c: fix meter buffer overflow -02-10-20 package.sh: fix lib/probe/C/make/probe update test -02-10-18 probe.win32: update for mingw - make.probe: add bash workaround to SHELLMAGIC test - package.sh: work around yet another Cygwin hassle -02-10-17 iffe.sh: short circuit id check for *[-+/\\]* -02-10-08 regress.sh: unset FIGNORE to avoid rm . errors - package.sh: unset FIGNORE to avoid rm . errors - package.sh: $CC must at least compile and executable hello world -02-10-04 package.sh: $INSTALLROOT/lib/package/tgz=>$PACKAGEROOT/lib/package/tgz - package.mk: $(ED) => $(STDED), $(EDFLAGS) => $(STDEDFLAGS) - iffe.sh: add identifier checks for tests that (implicitly) require them - iffe.sh: disambiguate a few --config macros -02-10-02 iffe.sh: fix shell=bsh `hdr a/b' -02-09-30 package.sh: handle chmod of -* files - package.sh: verify that $SHELL is Bourne compatible - package.sh: tighten PACKAGE_USE logic PATH,LIBPATH,etc. validation - iffe.sh: fix bug that didn't define mac variable on success -02-09-22 package.sh: handle admin_action=ditto - iffe.sh: --config sizeof(foo) macro is SIZEOF_foo - iffe.sh: fix long.long test so it doesn't defeat UWIN "typ long.long" - mamprobe.sh: convert $("foo") nmake string constants -02-09-21 mamprobe.sh: "-" info-path writes probe info to stdout -02-09-11 make.probe: move from nmake src to be part of mamprobe.sh - mamprobe: generate from mamprobe.beg C.probe make.probe mamprobe.end - mamake.c: pass cc absolute path to mamprobe - package.sh: generate mamprobe -- yuk (at least it's confined to INIT) - iffe.sh: lcl,nxt: drop default sys/ check - ditto.sh: tw --logical by default; add --physical -02-09-10 package.sh: SHELLMAGIC creeps into package too -- duh and fooey -02-09-09 ditto.sh: test that remote .profile exists before sourcing -02-09-06 package.sh: don't ditto nfs junk - ditto.sh: --show now lists directory ops instead of enumerating all -02-09-05 ditto.sh: add --remote={rsh|ssh} - package.sh: add admin [[{rsh|ssh|-}]:]directory -02-09-02 iffe.sh: change 'print -r --' to 'print -r -' for ksh86 compatibility -02-09-01 cc.unix.mc68k: add for ancient 3b1 -02-08-22 package.sh: fix component() to test for components -- duh - Makefile: add LICENSE:.DONTCARE to workaround mam -02-08-11 iffe.sh: provide defaults for LD_* additions -02-08-07 ratz.c: change -m to use * instead of non-portable inverse video -02-07-17 mamprobe.sh: close tmp file in trap before rm for Cygwin - package.sh: fix "type" to handle i1586 (P4) - package.sh: add the view action -02-06-28 package.sh: handle multiple packages for release action -02-06-27 package.sh: catch sol*.sparc=>sol*.sun4 when CC=gcc -02-06-14 package.sh: fix admin_action to not include qualifiers - package.sh: fix help/html doc typo -02-06-11 package.sh: fix ditto update doc to `PACKAGEROOT field matching *:*' -02-06-07 WWW.mk: change substitute $("\n") to \n -02-06-06 package.sh: clarify output streams for help/html -02-05-22 mamake.c: fix executable file check to use (S_IXUSR|S_IXGRP|S_IXOTH) -02-04-04 package.sh: fix update to differentiate *.sun4 and sun4 -02-03-27 package.sh: yacc/bison warning only if both missing -02-03-24 mamake.c: all shell actions wrapped with -c to avoid #! problems -02-03-23 package.sh: recover $PACKAGEROOT/bin/package if not in INIT package - package.sh: precheck $CC, not `cc' - package.sh: fix install to use pax -ps to preserve set-uid/gid - package.sh: fix install to use list.installed for existing files only -02-03-17 package.sh: fix PAX initialization that was sometimes omitted for read - package.sh: fix update delta sync fetch -02-02-14 iffe.sh: fix macro{ }end docs to include " - iffe.sh: add dfn to extract #define from headers - iffe.sh: handle nxt #include ok but no line sync - iffe.sh: drop local header clash logic - iffe.sh: add -X, --exclude=dir to exclude -I dirs - iffe.sh: lcl,nxt now generate <...> headers instead of "..." - package.sh: admin.db root dir matching -* disables host - package.mk: fix package.src.pat typo -- too many ) - package.mk: add { :COVERS: :DESCRIPTION: :REQUIRES: } - package.sh: handle { :COVERS: :DESCRIPTION: :REQUIRES: } - Makefile: move proto.c generation to the proto component dir -02-02-02 execrate.sh: add for .exe challenged Win32 systems/commands - mamprobe.sh: add STD* commands/flags - mamake.c: update mamprobe info when older than mamprobe executable - package.sh: move ed/ex workaround to mamprobe.sh - package.sh: fix `host type' bug that incorrectly assumed sun4 for sol - package.sh: add execrate(1) hooks for challenged systems - package.sh: add check for { cc ar nm yacc/bison } before make - ratz.c: fix "rb" vs. "r" macro tests - iffe.sh: add nxt, similar to lcl but defines _nxt_foo for #include - iffe.sh,package.sh: remove variable from sccs,cvs ident strings -- duh -02-01-24 C+probe: check CC.DYNAMIC to handle cc that accept but ignore -B* - iffe.sh: handle 'mem struct.a.b' -02-01-22 iffe.sh: cache (internal) `foo vs. struct foo' test results - package.sh: uts.370 => uts.390 -02-01-18 package.sh: fix uts hosttype -02-01-17 package.sh: add 'results failed ...' to list failures only - package.sh: change ARCH internal var to all_types to avoid env conflict - iffe.sh: fix hdr/lib precheck that missed some -- ouch - iffe.sh: fix noexecute test that forgot to check compile first! -02-01-15 ratz.c: fix path[] type typo -02-01-01 package.mk: tighten license search -02-01-08 package.sh: `pwd` => ${PWD:-`pwd`} - package.mk: expand license file pattern match -02-01-04 iffe.sh: fix `exp name "value"' bug that duped "value" - iffe.sh: fix initial check to honor --config -01-12-25 iffe.sh: fix bug where -o file restored old file -01-12-23 package.mk: uniq the closure lists -01-12-07 ratz.c: fix --meter to retain paths containing " -- " -01-11-30 ratz.c: use sear_system() to execute; should work on all windows -01-11-28 ratz.c: fix sear_rm_r() to check SetCurrentDirectory() status -01-11-26 ditto.sh: drop n+=v for ksh compatibility -01-11-21 ditto.sh: add rsync script replacement [hey, it works!] - package.sh: add [ditto]:directory notation to admin.db -01-10-31 package.sh: handle *.sum paths with embedded space - package.sh: change executable() to onpath() - package.sh: executable([!] foo) replaces test [!] -x foo (.exe hack) - package.sh: add os2 fix to `host type' - mamake.c: add .exe hack - iffe.sh: fix intrinsic function lib test - mamprobe.sh: update pic probe to match make.probe for linux.ia64 -01-10-30 package.sh: make action skeleton view now checks subdirs -01-10-20 package.sh: don't recurse into leaf dirs matching $MAKESKIP - package.mk: tarball package.notice replaces `license accepted' prompt - package.sh: eliminate `license accepted' prompt - package.sh: add update to download latest from a url - package.sh: use builtin arithmetic when we know it's ksh - iffe.sh: unkown -> unknown -01-10-18 package.sh: convert to YYYY-MM-DD delta releases instead of NNNN - package.mk: convert to YYYY-MM-DD delta releases instead of NNNN - ratz.c: fix -m for paths containing \f\n\r\v -01-10-16 ratz.c: _SEA_* => SEAR_* - ratz.c: preserve stdin for sear_exec() - ratz.c: add recursive sear_rm_r() to sear_exec() tmp dir cleanup -01-10-10 mamprobe.sh: add mam_cc_SHELLMAGIC - package.sh: add nfs wakeup call to admin to avoid stale file handles -01-10-04 cc.darwin.ppc: -flat_namespace is not longer the default (huh) -01-10-01 package make: prepend $INSTALLROOT/bin/ok to PATH - package read: save cpy of bin/package when reading the INIT package - mamprobe.sh: allow cc path with optional arguments -01-09-24 Makefile,package.sh: add $INSTALLROOT/bin/.paths initialization -01-09-19 package.mk: add recurse to list.package.* - package.sh: bootstrap build nmake with _BLD_STATIC for _WIN32 -01-09-11 ratz.c: add _SEA_SKIP & _SEA_COMMAND for self extracting archives -01-09-07 package.mk: fix output capture to not generate files names with spaces -01-09-07 package.mk: fix delta release number search -01-08-11 package.mk: handle single gz executable packages (e.g., for ksh) - package.sh: fix package install to require nmake only if no *.sum - iffe.sh: drop ancient menu and prompt actions; check ./hdr.h clash -01-07-17 package: fix use cross compile test to generate files in /tmp -01-06-27 ratz: handle hard and soft links if possible -01-06-07 Makefile: fix :MAPLIB: for sco -01-05-31 crossexec.sh: add - iffe.sh: add -x crosstype to run crossexec - iffe.sh: exp test now handles pass{}end fail{}end yes{}end no{}end - package.sh: add package host canon external-host-type-name - package.sh: fix `use USER' lookup for shells that support ~USER - cc.*: add -dumpmachine to dump target HOSTTYPE -01-05-18 iffe.sh: drop $HOME/tmp/t.sh debug trace -- oops -01-05-01 mamake.c: scan() now handles :PACKAGE: foo:command -01-04-26 *.sh: expand [a-z][A-Z][0-9] for non-contiguous character codes - iffe.sh: fix run *.sh for shells that don't $* across . command - cc.mvs.390: recode for /bin/sh -01-04-25 package.mk: include non cc-g variants by default - package.sh: *[._]* => *?[_.]* for mvs.390 /bin/sh -01-04-24 TEST.mk: no tests for VARIANT=="DLL" -01-04-22 package.mk,package.sh: tarball text members are ASCII encoded -01-04-18 package.mk: allow package name to be the same as one of its components - cc.mvs.390: handle .C .cpp .cxx - cc.mvs.390: compensate for -o that does not overwrite -01-04-01 regress: fix SAME that just skipped it -- we should regress regress! - iffe: fix bug that didn't emit _hdr_foo for internal hdr tests - iffe: fix lcl bug for cc -E that doesn't emit line syncs - ratz: add ASCII=>EBCDIC conversion for text archive members - mamake: fix buffer overlap bug that clobbered the probe file path -01-03-17 iffe: handle : separator as first arg -01-03-15 mamake.c,ratz.c,release.c: add and -01-02-26 iffe.sh: fix bug that omitted runtime #define for `mac' op -01-02-22 cc.ibm.risc: handle SF_CLOSE clash in -01-02-14 cc.sgi.mips3,cc.sgi.mips4: handle -mips2 -mips3 -mips4 for cross cc - C+probe: quote "$cc" when it's an argument! - mamake: execute actions with $SHELL, ignored signals back to default - package.sh: nmake check error output to /dev/null - package.sh: fix INIT a.out updates for knr cc - package.sh: package list now handles large tgz dirs - package.sh: *-ok executables moved to ok/* for *.dll systems - iffe.sh: change "exec >&-" to "exec >/dev/null" else Linux mkdir fails! - mamake: handle `bind -lx [dontcare]' -01-02-12 ratz.c: fix _PACKAGE_ast includes - package.sh: $HOSTTYPE env overrides if $PACKAGEROOT/arch/$HOSTTYPE/ - package.sh: $CC ^HOSTTYPE=[A-Za-z_0-9.]*$ overrides HOSTTYPE - iffe.sh: fix dat code that used previous $tmp.exe - iffe.sh: fix dat code for _DLL imports -01-02-09 iffe.sh: add copy() for shells with the disappearing here doc bug -01-02-08 Makefile: guard against null $(CC.HOSTTYPE) -01-02-06 Makefile: separate out cc,ld,ldd workarounds (so they will be packaged) -01-02-02 package.sh: fix package use for $INSTALLROOT != */$HOSTTYPE - package.sh: create intermediate recursion makefiles when needed - package.sh: add $SECONDS to the DEBUG trace prompt -01-01-01 ratz.c: #ifdef for UWIN ncc - iffe.sh,package.sh: check PACKAGE_PATH for local installations - package.sh: add psrinfo for osf.alpha host cpu - package.sh: change pax --meter probe; some hang on /dev/tty - package.sh: fix `install flat ARCH' - mamake: eliminate loops from scan order - C+probe: add probe_verbose -V for AIX cc=xlc - cc.ibm.risc,ldd.ibm.risc: add - package.mk: list refs to top-level licenses only - package.mk: add local link table to change log html -00-12-25 package.sh: `no package archives' is a hard error, duh - package.sh: reorder host type logic for lame shells - mamake.c: getcwd => getwd for NeXT -- how about posix==default guys - iffe.sh: really gross workaround for NeXT -lposix stdout null's - iffe.sh: handle cc -E that insists on compiling -00-12-15 iffe.sh: ancient sh function call blows $*; call only when $# == 0 - *.sh: `getopts 2>/dev/null` => `(getopts)2>/dev/null` for ancient sh - package.sh: fix LD_LIBRARY*_PATH initialization - cc.next.m68k: add for _POSIX_SOURCE and linker multiply defined syms -00-12-12 ratz: add --meter - package.sh: a few VPATH fixes - Makefile: don't override *.mips* cc if -version not accepted -00-12-11 package.mk: *.inx now contains name=value -00-12-07 package.sh: handle PC netscape . => _ pathname mangle - WWW.mk: .tar.gz => .tgz -00-11-27 package.sh: add checklicense() to do license checks at read time - package.mk: change component list from preformat to table -00-10-31 package.mk: *.pkg must assert closure - package.mk: add cc- variants to list.package.binary - package.sh: omit dups from package list - package.sh: invalid arg gives one line Usage - package.sh: relax checkaout checks for non-owners - package.sh: package use sets NPROC if not already set or [01] - proto.c: add $(INSTALLROOT)/include/ast hack -00-10-26 WWW.mk: add .SOURCE rhs to :WWWPAGE: -00-10-25 package: fix install - package.mk: add list.install -00-10-22 regress: fix VIEW to skip empty dirs -00-10-19 package.mk: $(PACKAGEROOT)/bin/nmake => $(PACKAGEROOT)/bin/manmake - iffe: validate #define identifiers -00-10-18 C+probe: Mac OS X additions - package: add DYLD_LIBRARY_PATH initialization - add ldd.$(CC.HOSTTYPE) -00-10-01 iffe: handle -I* -L* options -00-09-21 mamake: add libxxx and xxx to makefile ordered prereqs -00-09-19 C+probe: add probe_longlong -00-09-11 package: drop manmake and $PACKAGEROOT/bin/nmake -00-09-08 iffe: verify that $cc is a C compiler -00-06-14 mamprobe: fix win32.* probe - mamake: fix bug that used lower view path for generation - package: don't clobber $PACKAGEROOT/bin/nmake -00-06-01 C+probe: fix stdinclude *again* - package: fix write delta source to use default pax format - package: add disambiguating bias for sgi.mips3 over sgi.mips4 - package.mk: fix for directory content packages lib ast-locale -00-05-01 iffe: fix invalid _LIB_ macro identifier -00-04-11 C+probe: uniq stdinclude and stdlib, fix usrinclude -00-04-01 regress: fix explicit OUTPUT bug that didn't compare with expected -00-03-17 package: all archives are .tgz for binary download - package: $(PACKAGEROOT)/LICENSES/* in source and binary archives - package: implement install and verify actions - iffe: add exp, pth file dir ..., fix lib - -lfoo, fix lib - - -la -lb - iffe: -L* must affect LD_LIBRARY* hacks for .exe tests -- yuk - package.mk: add *.pkg :INDEX: -00-03-07 package: add admin action -00-03-06 makefile: install optional make probe override script C+make+probe.lcl -00-02-14 --- release 1.0 --- - ratz: treat "foo/" as a dir, not a regular file - package: clarify source and binary installation instructions - package: fix so binary packages can install without cc - package: "ratz" now a non-archive package (the only one) for bootstrap - package: handle VPATH=a:b arg - package.mk: "ratz" package adjustments - Makefile: use :PACKAGE_INIT: to support binary INIT packages - WWW.mk: add :WWWALL: - C.probe: fix .so check that let .dll slip through - iffe: fix config sh var assignment for HAVE_member_IN_struct - iffe: fix config sh var assignment for symbol_DECLARED - package: delay PATH export until dll hack exports complete - package: don't forget binary package $(INSTALLROOT)/lib(32|64) - package: add delta change log for source packages -00-02-10 mamprobe: add mam_cc_DLLBIG - package: fix spelling typos - package: add html help output - package.mk: beef up source and binary help => html -00-02-08 package: mkdir man/man[138] in the new arch to cover MAM bug -00-01-28 package,release: add -rcount to release - package: fix Linux "host cpu" and "host rating" - package: copy *.lic to $PACKAGEBIN for "make" and "write binary" - package: fix 'release change log' case match -00-01-24 package: add copyright action - mamprobe: add -D_BLD_DLL to mam_cc_DLL -00-01-11 package: tsort for package write - package: early verification that $CC works - package: add non-interactive command arg for use action - proto: fix -C intermediate mkdir() - mamprobe: unixware.i386 ksh workaround - C.probe: move hosttype to C.probe (with unixware.i386 workaround) - WWW.mk: fix mm2html option quoting - WWW.mk: add .SCAN.mm - WWW.mk: don't force static=1; grab dll's instead - *.sh: fix getopts test to handle botched implementations like osf.alpha - iffe.sh: fix read -r test -99-12-25 iffe: tweak verbose messages - iffe: hand code non-optget getopts parse - iffe: fix bash quoting bug again - iffe: do test -w . after option parse - package: fix PACKAGEROOT search -99-11-19 --- release 0.2 --- -99-11-19 first working package & friends -99-10-31 change from lib0ast to INIT; add MAM and package bootstrap - hostinfo: gobbled by package -99-10-01 iffe: add --config, yes{...}end no{...}end, fix read -r workaround -99-09-27 iffe: add --all --verbose, --* set options -99-09-22 regress: -v disables long line truncation -99-09-11 WWW.mk: WWWDIR and MM2HTMLINFO are now lists searched in $(HOME) -99-08-11 hostinfo: fix type sgi.mips4 -99-06-24 WWW.mk: add -99-06-08 hostinfo.sh: ${TMPDIR:-/tmp} -99-06-07 TEST.mk: add -99-06-01 iffe: add `siz type' for _siz_type == sizeof(type) -99-05-11 hostinfo,iffe,regress,use: long options -99-05-01 C.probe: fix over aggressive stdinclude, e.g., /usr/include/machine -99-04-01 hostinfo: sgi.mips? -o32 and -n32 checks - iffe: check that . is writable -99-03-17 hostinfo: fix for cc not found - dl.c,hello.c,m.c: headers in conditionals to force .DONTCARE - C.probe: extra check for include dirs pulled in by -99-03-03 regress: add `UNIT - ...' for extra args - Makefile: add (_hosttype_) prereq for cc -99-01-23 hostinfo: tweak rating, use /proc/cpuinfo if there -99-01-11 C.probe: shlib before lib, /usr before / -98-12-25 iffe: work around win32.alpha intrinsic clash with -O -98-11-11 regress: fix UNIT PATH lookup -98-11-01 regress: add PROG -98-10-01 hostinfo: add unixware.* - use: export PACKAGE_* -98-08-11 C.probe: add /usr/include check (for sco CC) - hostinfo: handle UWIN uname update -98-05-01 regress: fix bug sometimes didn't list last test -98-04-01 hostinfo: add cc path arg - hostinfo: now works with /bin/sh - Makefile: strengthen -lm probe -98-01-23 Makefile: check for -ldl -lm - C.probe: handle gcc -v -E phony include dirs - iffe: fix lcl by dropping sort -u -- we need the real first - iffe: `mem x' to test if x is a non-opaque struct -98-01-11 $(INSTALLROOT)/lib32 for sgi.mips3 - $(INSTALLROOT)/lib64 for sgi.mips4 - add cc.hp.pa -98-01-01 cc.sgi.mips*: turn off ld library multiply defined -97-10-11 regress: add VIEW function for locating data -97-10-01 Makefile: -ldl test moved to libdll Makefile -97-08-11 regress: add MOVE - regress: add SAME - regress: use getopts - regress: `EXEC' repeats previous test -97-07-17 use: tweak PATH and LIBPATH bootstrap order - iffe: fix lcl bug that botched pathnames with embedded spaces -97-06-12 iffe: add npt `needs prototype' test -97-05-09 hostinfo: mvs.* => mvs.390 - Makefile: cc.$(_hosttype_) workaround installed here - iffe: fix nolink{ ... }end - iffe: add [no]static{ ... }end for static link test - C.probe: _probe_PATH => _probe_export which must be eval'd -97-04-01 use: _RLD_ROOT set too -97-03-17 mm2html: changed inner loop - mm2html: handle .if|.ie|.el, .so - mm2html: handle different man styles - mm2html: differentiate mm/man in some non-obvious cases - hostinfo: r5000 is not mips4 -97-02-14 hostinfo: validate type with cc -96-12-25 C.probe: UWIN tweaks - iffe: use `...` instead of $(...) for alpha /bin/sh - iffe: fix `typ' divide by 0 - iffe: `lcl' now drops X: prefix - iffe: +l* -> -l* - iffe: eval around ${...#%...} for BSD /bin/sh - use: add sgi.mips LD_LIBRARY_PATH variants - use: add -e to list exports - iffe: lcl leaves leading [a-zA-Z]: for DOS - iffe: fix no{link|output|execute} logic - C.probe: don't automatically add /usr/include for non-hosted compilers - C.probe: don't automatically place /usr/include last - C.probe: check gcc style -v -E for stdinclude usrinclude -96-11-28 iffe: check BASH_VERSION for IFS botch - iffe: typ long.xxx only if sizeof(long xxx) != sizeof(xxx) - hostinfo: fix sgi.mips[234] tests - hostinfo: fix ncr.i386 tests -96-10-31 iffe: work around old bsh here doc bug by running separate sh -96-10-11 iffe: *.iffe and *.iff for iffe src files - hostinfo: tighten sgi.mips CPU type check -96-10-01 C.probe: add probe_libdir to catch alpha /usr/shlib -96-09-17 iffe: fix typ bug that failed for single id types! -96-08-31 hostinfo: handle recent SGI hinv CPU changes -96-07-17 make sure sizeof(long xxx)>sizeof(xxx) for typ long.xxx -96-05-09 C.probe: drop multiple / in stdinclude -96-02-29 use: package root must have bin and lib subdir - mm2html: add - C.probe: probe_members += -whole-archive for gcc - iffe: add + fix the blasted `...'...\\...'...` -96-01-31 use: add pkg dir - hostinfo: add tandem -96-01-01 hostinfo: windows_nt|windows[0-9][0-9] -> win32 -95-11-24 hostinfo: linux-aout.* for non-ELF Linux -95-11-11 use: add AIX LIBPATH -95-10-11 hostinfo: no args prints type -95-08-11 use: add -95-05-09 save original PATH in _probe_PATH - beef up library dir probe -95-04-01 use c source suffix if it still preserves the dialect - add hostinfo - add lib/hostinfo/typemap user type map - add sol.sun4 CPU count - fix C.probe to properly handle C/C++ combined compiler drivers - add NeXT to hostinfo - bummer: mach has /usr/bin/hostinfo -95-03-19 fix dialect executable test -95-03-19 --- release 0.0 --- diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/ar.ibm.risc b/cde/programs/dtksh/ksh93/src/cmd/INIT/ar.ibm.risc deleted file mode 100755 index 0247643e7..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/ar.ibm.risc +++ /dev/null @@ -1,9 +0,0 @@ -: stupid stupid stupid to require a non-standard option for ar to work : 2009-10-06 : - -op=$1 -shift -case $op in --*) ;; -*) op=-$op ;; -esac -/usr/bin/ar -Xany "$op" "$@" diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.hp.ia64 b/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.hp.ia64 deleted file mode 100755 index 6b758c1b0..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.hp.ia64 +++ /dev/null @@ -1,13 +0,0 @@ -: hp.ia64 cc wrapper for reasonable ANSI C defaults : 2011-01-25 : - -[ /usr/bin/cc -ef /usr/ccs/bin/cc ] || exit 1 - -: bundled cc -- really, in the face of gcc you ship a subpar /usr/bin/cc? : - -HOSTTYPE=hp.ia64 - -case " $* " in -*" -dumpmachine "*) echo $HOSTTYPE; exit ;; -esac - -/usr/bin/cc -D_HPUX_SOURCE -D_INCLUDE__STDC_A1_SOURCE -D_INCLUDE_XOPEN_SOURCE_500 "$@" diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.hp.pa b/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.hp.pa deleted file mode 100755 index ed644d002..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.hp.pa +++ /dev/null @@ -1,13 +0,0 @@ -: hp.pa cc wrapper for reasonable ANSI C defaults : 2004-02-29 : - -HOSTTYPE=hp.pa - -case " $* " in -*" -dumpmachine "*) echo $HOSTTYPE; exit ;; -esac - -_AST_CC_hp_pa_DEFAULT=${_AST_CC_hp_pa_DEFAULT-"+DAportable"} - -/opt/ansic/bin/cc -Ae +e -Wl,+s $_AST_CC_hp_pa_DEFAULT \ - ${INSTALLROOT:+-Wl,+cdp,${INSTALLROOT}/lib/:} \ - -Wl,+vnocompatwarnings "$@" diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.hp.pa64 b/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.hp.pa64 deleted file mode 100755 index bbd2cf664..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.hp.pa64 +++ /dev/null @@ -1,11 +0,0 @@ -: hp.pa64 cc wrapper for reasonable ANSI C defaults : 2001-02-11 : - -HOSTTYPE=hp.pa64 - -case " $* " in -*" -dumpmachine "*) echo $HOSTTYPE; exit ;; -esac - -/opt/ansic/bin/cc +D2.0W -Ae +e -Wl,+s \ - ${INSTALLROOT:+-Wl,+cdp,${INSTALLROOT}/lib/:} \ - -Wl,+vnocompatwarnings "$@" diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.ibm.risc b/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.ibm.risc deleted file mode 100755 index 9df88088c..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.ibm.risc +++ /dev/null @@ -1,63 +0,0 @@ -: cc wrapper for AIX RISC xlc : 2012-04-17 : - -hosttype=ibm.risc - -case $HOSTTYPE in -$hosttype-64) - case " $* " in - *" -q64 "*) ;; - *) set -- -q64 "$@" ;; - esac - ;; -*) case " $* " in - *" -q64 "*) HOSTTYPE=$hosttype-64 ;; - *) HOSTTYPE=$hosttype ;; - esac - ;; -esac - -case " $* " in -*" -dumpmachine "*) - echo $HOSTTYPE - exit - ;; -esac - -bin=/usr/vac/bin -cc=$bin/xlc - -ccflags="-brtl -qhalt=e -qsuppress=1506-224:1506-507" -case " $@ " in -*" -G "*) - ccflags="$ccflags -berok" - ;; -esac -if test -x $bin/c99 -then # the xlc optimizer vintage that supports c99 is flawed and causes the AST build to fail # - case " $* " in - *" -O "*) - set '' "$@" '' - shift - while : - do a=$1 - shift - case $a in - '') break ;; - -O) ;; - *) set '' "$@" $a ;; - esac - shift - done - ;; - esac - $cc $ccflags "$@" - code=$? -else export PATH=/bin:$PATH LIBPATH=/usr/lib:/lib - ccflags="$ccflags -blibpath:$LIBPATH" -fi -$cc $ccflags "$@" -code=$? -case $code in -127|255) code=1 ;; -esac -exit $code diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.ibm.risc.gcc b/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.ibm.risc.gcc deleted file mode 100755 index 961650db8..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.ibm.risc.gcc +++ /dev/null @@ -1,36 +0,0 @@ -: cc wrapper for AIX RISC gcc : 2012-04-17 : - -hosttype=ibm.risc - -case $HOSTTYPE in -$hosttype-64) - case " $* " in - *" -maix64 "*) ;; - *) set -- -maix64 "$@" ;; - esac - ;; -*) case " $* " in - *" -maix64 "*) HOSTTYPE=$hosttype-64 ;; - *) HOSTTYPE=$hosttype ;; - esac - ;; -esac - -case " $* " in -*" -dumpmachine "*) - echo $HOSTTYPE - exit - ;; -esac - -cc=gcc -ccflags= - -case " $@ " in -*" -shared "*) - ccflags="$ccflags -shared -Wl,-G -Wl,-berok" - ;; -*) ccflags="-Wl,-brtl" - ;; -esac -$cc $ccflags "$@" diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.lynxos.i386 b/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.lynxos.i386 deleted file mode 100755 index acd0d02d6..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.lynxos.i386 +++ /dev/null @@ -1,81 +0,0 @@ -: lynxos.i386 cc wrapper with -dynamic default : 2005-02-14 : - -HOSTTYPE=lynxos.i386 - -case " $* " in -*" -dumpmachine "*) echo $HOSTTYPE; exit ;; -esac - -cc=gcc - -link=1 -static=0 -set . "$@" /../ -while : -do shift - case $1 in - /../) break ;; - esac - case $1 in - *.[cChHiI]|*.[cChHiI][pPxX][pPxX]) - set . -D__NO_INCLUDE_WARN__ -I/sys/include/kernel -I/sys/include/family/x86 "$@" - shift - break - ;; - -o) case $2 in - /../) ;; - *) x=$1 - shift - set . "$@" "$x" - shift - ;; - esac - ;; - -static)static=1 - ;; - -l*) case $static in - 0) static=n - set . -L/lib/shlib "$@" - shift - ;; - esac - ;; - -[cE]) link=0 - ;; - esac - x=$1 - shift - set . "$@" "$x" -done -while : -do case $1 in - /../) shift - break - ;; - -l*) case $static in - 0) static=n - set . -L/lib/shlib "$@" - shift - ;; - esac - ;; - -[cE]) link=0 - ;; - esac - x=$1 - shift - set . "$@" "$x" - shift -done -case $link:$static in -1:0) static=n ;; -esac -case $static in -n) specs=/tmp/cc$$.specs - trap 'status=$?; rm -f $specs; exit $status' 0 1 2 - echo '*link: %{shared:-shared} %{static:-static} %{mshared|shared: %{static: %eerror: -shared and -static may not be combined. }}' > $specs - $cc -specs=$specs "$@" - ;; -*) $cc "$@" - ;; -esac diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.lynxos.ppc b/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.lynxos.ppc deleted file mode 100755 index 32738f289..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.lynxos.ppc +++ /dev/null @@ -1,85 +0,0 @@ -: lynxos.ppc cc wrapper with -mshared default : 2005-06-01 : - -HOSTTYPE=lynxos.ppc - -case " $* " in -*" -dumpmachine "*) echo $HOSTTYPE; exit ;; -esac - -cc=gcc - -link=1 -static=0 -set . "$@" /../ -while : -do shift - case $1 in - /../) break ;; - esac - case $1 in - *.[cChHiI]|*.[cChHiI][pPxX][pPxX]) - set . -D__NO_INCLUDE_WARN__ -I/sys/include/kernel -I/sys/include/family/ppc "$@" - shift - break - ;; - -o) case $2 in - /../) ;; - *) x=$1 - shift - set . "$@" "$x" - shift - ;; - esac - ;; - -static)static=1 - ;; - -mshared) - static=n - continue - ;; - -l*) case $static in - 0) static=n - set . -L/lib/shlib "$@" - shift - ;; - esac - ;; - -[cE]) link=0 - ;; - esac - x=$1 - shift - set . "$@" "$x" -done -while : -do case $1 in - /../) shift - break - ;; - -l*) case $static in - 0) static=n - set . -L/lib/shlib "$@" - shift - ;; - esac - ;; - -[cE]) link=0 - ;; - esac - x=$1 - shift - set . "$@" "$x" - shift -done -case $link:$static in -1:0) static=n ;; -esac -case $static in -n) specs=/tmp/cc$$.specs - trap 'status=$?; rm -f $specs; exit $status' 0 1 2 - echo '*link: %{shared:-shared} %{static:-static} %{mshared|shared: %{static: %eerror: -shared and -static may not be combined. }}' > $specs - $cc -specs=$specs -mshared "$@" - ;; -*) $cc "$@" - ;; -esac diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.mvs.390 b/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.mvs.390 deleted file mode 100755 index 3c1d89ec7..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.mvs.390 +++ /dev/null @@ -1,279 +0,0 @@ -: mvs.390 cc wrapper for Unix message and exit code semantics : 2012-01-20 : - -HOSTTYPE=mvs.390 - -case " $* " in -*" -dumpmachine "*) echo $HOSTTYPE; exit ;; -esac - -ar=ar -cc=/bin/c89 -CC=/bin/c++ -ccflags="-D_ALL_SOURCE -Wc,dll" -objmax=60 -tmpfiles= -unbotch= - -# -n as *first* arg shows but does not do -# -Wc,exportall => -Wl,dll -# -Bdynamic => .c,.o dynamic -# -Bstatic => .c,.o static -# *.C => cc=$CC -# *.cpp => cc=$CC -# *.cxx => cc=$CC -# no optimization until the optimizer is fixed: -# -O dropped (no optimization) -# -0 dropped (no optimization) -# -1 -O (default level 1 optimization) -# -2 -2 (maximal level 2 optimization) - -let argc=0 cmp=0 dll=0 libc=0 dynamic=1 dynamic_objc=0 static_objc=0 relc=0 botched=0 -case $1 in --n) exec=print - shift - ;; -*) exec= - ;; -esac -export _CC_ACCEPTABLE_RC=1 -export _C89_ACCEPTABLE_RC=$_CC_ACCEPTABLE_RC -export _CXX_ACCEPTABLE_RC=$_CC_ACCEPTABLE_RC -case " $* " in -*.C" "*)let dll=2 - cc=$CC - export _CXXSUFFIX=C - ;; -*.cpp" "*)let dll=2 - cc=$CC - export _CXXSUFFIX=cpp - ;; -*.cxx" "*)let dll=2 - cc=$CC - export _CXXSUFFIX=cxx - ;; -esac -exe= -xxx= -while : -do case $# in - 0) break ;; - esac - arg=$1 - case $arg in - -1) arg=-O - ;; - -Bdynamic) - let dynamic=1 - ;; - -Bstatic) - let dynamic=0 - ;; - -c) let cmp=1 - ;; - -D_ALL_SOURCE|-D_ALL_SOURCE=*) - arg= - ;; - -D*[\ \(\)]*) - arg=${arg#-D} - botch_macro[botched]=${arg%%=*} - botch_value[botched]=${arg#*=} - let botched=botched+1 - arg= - ;; - -o) argv[argc]=$arg - let argc=argc+1 - shift - arg=$1 - exe=$arg - rm -f "$exe" - ;; - -[O0]) arg= - ;; - -Wc,dll)arg= - ;; - -Wc,exportall) - let dll=1 - ;; - -Wl,dll)arg= - let dll=1 - ;; - *.c) if [[ $botched != 0 ]] - then src=$arg - arg=${arg##*/} - unbotch="$unbotch ${arg%.c}.o" - arg=__$arg - tmpfiles="$tmpfiles $arg" - { - while [[ $botched != 0 ]] - do let botched=botched-1 - print -r -- "#define ${botch_macro[botched]} ${botch_value[botched]}" - done - cat $src - } > $arg - fi - ;; - *.o) if test 0 != $dynamic - then let dynamic_objc=dynamic_objc+1 - else let static_objc=static_objc+1 - fi - ;; - *.x) a=${arg%.x}.a - if test -f $a - then argv[argc]=$a - let argc=argc+1 - xxx=-Wl,dll - case $a in - ast.a|*/ast.a) - cc="$CC -u_ast_init" - ;; - esac - fi - ;; - esac - case $arg in - ?*) argv[argc]=$arg - let argc=argc+1 - ;; - esac - shift -done - -tmp=/tmp/cc.${USER:-$LOGNAME}.$$.err -tmpfiles="$tmp $tmpfiles" - -# if any dll .o's are in .a then a .x gets generated -# but the native cc doesn't jcl for the .x -# -Wl,dll does that, so we nuke the .x and keep the exe - -test 0 != $dll && xxx= -case $xxx in -?*) case $exe in - ?*) a=${exe##*/} - a=${a%.*} - case $exe in - */*) tmpfiles="$tmpfiles ${exe%/*}/${a}.x" ;; - *) tmpfiles="$tmpfiles ${a}.x" ;; - esac - ;; - esac - ;; -esac -if test 0 != $dll -then if test 0 != $cmp - then xxx="-D_SHARE_EXT_VARS $xxx" - else xxx="-Wl,dll $xxx" - fi -fi -set -- $xxx "${argv[@]}" - -# can't handle more than objmax .o's -# -r into intermediates doesn't work, but the cat trick does -# also, the runtime dll file must be executable but cc -Wl,dll forgets - -if test 0 != $dll -a \( $dynamic_objc -ge $objmax -o 0 != $static_objc \) -then unset argv - argc=0 libc=0 dynamic=1 dynamic_objc=0 static_objc=0 endc=0 - while : - do case $# in - 0) break ;; - esac - case $1 in - -Bdynamic) - let dynamic=1 - ;; - -Bstatic) - let dynamic=0 - ;; - *.o) if test 0 != $dynamic - then dynamic_objv[dynamic_objc]=$1 - let dynamic_objc=dynamic_objc+1 - else static_objv[static_objc]=$1 - let static_objc=static_objc+1 - fi - ;; - -l*) libv[libc]=$1 - let libc=libc+1 - ;; - -o) argv[argc]=$1 - let argc=argc+1 - shift - argv[argc]=$1 - let argc=argc+1 - exe=$1 - ;; - *) argv[argc]=$1 - let argc=argc+1 - ;; - esac - shift - done - if test 0 != $static_objc - then case $exe in - ?*) $exec $ar cr ${exe%.*}.a "${static_objv[@]}" ;; - esac - fi - if test 0 != $dynamic_objc - then cat=0.0.o - tmpfiles="$tmpfiles $cat" - cat "${dynamic_objv[@]}" > $cat || exit - else cat= - fi - set -- "${argv[@]}" $cat "${libv[@]}" -fi - -# grep through the warning/error messages to get the true exit code -# some annoying messages are dropped while we're at it - -trap 'rm -f $tmpfiles' 0 1 2 15 -$exec $cc $ccflags "$@" 2> $tmp -code=$? -for i in $unbotch -do test -f __$i && mv __$i $i -done -typeset -l lc -while : -do if read line - then lc=$line - case $lc in - *'#include file'*'not found'*) - code=1 - ;; - *'#pragma ignored'*) - continue - ;; - *'definition side file is not defined'*) - continue - ;; - *'step ended with return code 4'*) - code=0 - continue - ;; - *'step ended with return code'*) - code=1 - continue - ;; - *'try again'*) - code=1 - continue - ;; - *'unknown preprocessing directive'*) - code=1 - case $lc in - 'warning '*) - set -- $line - shift - line=$* - ;; - esac - ;; - *'unresolved writable static references are detected'*) - test 0 != $dll && continue - ;; - esac - else case $code:$exe in - 0:?*) $exec chmod +x $exe ;; - esac - exit $code - fi - echo "$line" >&2 -done < $tmp diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.next.i386 b/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.next.i386 deleted file mode 100755 index e8ad8dccc..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.next.i386 +++ /dev/null @@ -1,158 +0,0 @@ -: next.i386 cc wrapper for Unix message and exit code semantics : 1995-05-09 : - -HOSTTYPE=next.i386 - -case " $* " in -*" -dumpmachine "*) echo $HOSTTYPE; exit ;; -esac - -# 1995-05-09 -lposix termios.o waitpid.o setpgid.o *do* work -# 1994-11-04 -posix has old redirection hole bug -# -D_POSIX_SOURCE requires manual fixes -# libexpr/exeval.c bombs -O, no -O ok - -command=cc -cc="/bin/cc -D_POSIX_SOURCE" -nooptimize="exeval" - -# first check $INSTALLROOT/botch - -case $INSTALLROOT in -"") echo "$command: INSTALLROOT: must be defined and exported" >&2; exit 1 ;; -esac -if test ! -d $INSTALLROOT/botch -a -dryrun != "$1" -then if mkdir $INSTALLROOT/botch - then : ok to initialize - else echo "$command: $INSTALLROOT/botch must be initialized by the owner of $INSTALLROOT" 2>&1 - exit 1 - fi - ( - cd $INSTALLROOT/botch - dir=. - for i in lib . include sys - do case $i in - .) dir=. - ;; - *) case $i in - /*) dir=$i ;; - *) dir=$dir/$i ;; - esac - test -d $dir || mkdir $dir - ;; - esac - done - if test ! -f include/sys/dirent.h - then echo "#include " > tmp.c - header=`$cc -E tmp.c | sed -e '/^#[ ]*1[ ].*\/sys\/dirent\.h"/!d' -e 's/.*"\(.*\)".*/\1/'` - sed -e 's/[ ]off_t[ ][ ]*d_off[ ]*;//' $header > include/sys/dirent.h - fi - if test ! -f lib/libbotch.a - then lipo /usr/lib/libposix.a -thin i386 -output tmp.a - ar x tmp.a termios.o waitpid.o setpgid.o - ar cr lib/libbotch.a *.o - ranlib lib/libbotch.a - fi - rm -f *.[aco] - ) -fi - -# now slip in our args - -case $nooptimize in -"") nooptimize=. - ;; -*) optimize= - for arg in $nooptimize - do case $optimize in - ?*) optimize="$optimize|" ;; - esac - optimize="$optimize$arg.[ci]|*/$arg.[ci]" - done - nooptimize=$optimize - ;; -esac -set . "$@" . -noexec= -library= -local= -optimize= -verbose= -while : -do shift - arg=$1 - shift - case $arg in - .) break - ;; - -[cES]) library=1 - ;; - -O) optimize=1 - ;; - -v) verbose=1 - ;; - -dryrun)noexec=1 - verbose=1 - ;; - -I-) case $local in - "") local=1 - set . "$@" -I$INSTALLROOT/botch/include -I- -I$INSTALLROOT/botch/include - ;; - *) set . "$@" -I- -I$INSTALLROOT/botch/include - ;; - esac - continue - ;; - -I*|*.[cChHiI]|*.[cChHiI][pPxX][pPxX]) - case $optimize in - 1) eval " - case \$arg in - $nooptimize) - optimize=0 - ;; - esac - " - ;; - esac - case $local in - "") local=1 - set . "$@" -I$INSTALLROOT/botch/include "$arg" - continue - ;; - esac - ;; - -last|*/libast.a) - case $library in - "") library=1 - set . "$@" $INSTALLROOT/botch/lib/libbotch.a "$arg" $INSTALLROOT/botch/lib/libbotch.a - continue - ;; - esac - ;; - esac - set . "$@" "$arg" -done -case $library in -"") set . "$@" $INSTALLROOT/botch/lib/libbotch.a - shift - ;; -esac -case $optimize in -0) set . "$@" . - while : - do shift - arg=$1 - shift - case $arg in - .) break ;; - -O) set . "$@" ;; - *) set . "$@" "$arg" ;; - esac - done - ;; -esac -case $verbose in -?*) echo $cc "$@" ;; -esac -case $noexec in -"") $cc "$@" ;; -esac diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.next.m68k b/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.next.m68k deleted file mode 100755 index 1e8dda7ce..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.next.m68k +++ /dev/null @@ -1,9 +0,0 @@ -: next.m68k cc wrapper that enables POSIX : 2000-12-15 : - -HOSTTYPE=next.m68k - -case " $* " in -*" -dumpmachine "*) echo $HOSTTYPE; exit ;; -esac - -/bin/cc -posix -Xlinker -m "$@" diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.osf.alpha b/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.osf.alpha deleted file mode 100755 index fe19bb4fc..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.osf.alpha +++ /dev/null @@ -1,9 +0,0 @@ -: osf.alpha cc wrapper with reasonable namespace defaults : 1998-02-04 : - -HOSTTYPE=osf.alpha - -case " $* " in -*" -dumpmachine "*) echo $HOSTTYPE; exit ;; -esac - -/usr/bin/cc -std -Dnoshare=_noshare_ -Dreadonly=_readonly_ "$@" diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.pentium4 b/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.pentium4 deleted file mode 100755 index 8794cda1c..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.pentium4 +++ /dev/null @@ -1,26 +0,0 @@ -: linux.pentium4 gcc wrapper : 2005-10-24 : - -HOSTTYPE=linux.pentium4 - -case " $* " in -*" -dumpmachine "*) echo $HOSTTYPE; exit ;; -esac - -case " $* " in -*" -O "*) - set -A argv -- "$@" - set -A nargv - integer i j - for ((i = j = 0; i < ${#argv[@]}; i++)) - do if [[ ${argv[i]} == -O ]] - then nargv[j++]=-O3 - nargv[j++]=-march=pentium4 - else nargv[j++]=${argv[i]} - fi - done - gcc "${nargv[@]}" - exit - ;; -esac - -gcc "$@" diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sco.i386 b/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sco.i386 deleted file mode 100755 index d0cba572d..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sco.i386 +++ /dev/null @@ -1,9 +0,0 @@ -: sco.i386 cc wrapper with reasonable binary and namespace : 1998-02-04 : - -HOSTTYPE=sco.i386 - -case " $* " in -*" -dumpmachine "*) echo $HOSTTYPE; exit ;; -esac - -/bin/cc -b elf -D_SVID3 "$@" diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sgi.mips2 b/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sgi.mips2 deleted file mode 100755 index e6e8f92e2..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sgi.mips2 +++ /dev/null @@ -1,68 +0,0 @@ -: sgi.mips2 cc wrapper that generates MIPS II binaries : 2006-02-14 : - -HOSTTYPE=sgi.mips2 - -case " $* " in -*" -dumpmachine "*) echo $HOSTTYPE; exit ;; -esac - -cc=/usr/bin/cc -debug= -dynamic=-G0 -flags=-OPT:Olimit=0 -ignore=1685,733,1048,1155,1171,1184,1209,1343,3169,3170,3433 -ldignore=15,84,85,13 -optimize= - -case $_AST_cc_OPTIONS in -?*) eval $_AST_cc_OPTIONS ;; -esac -case $ignore in -?*) ignore="-woff $ignore" ;; -esac -case $ldignore in -?*) ifs=$IFS - IFS=, - v=$ldignore - ldignore= - for i in $v - do ldignore="$ldignore -Wl,-woff,$i" - done - IFS=$ifs - ;; -esac -case $debug in -?*) integer n=0 - for i - do case $i in - -g*) case $debug in - -) continue ;; - esac - i=$debug - ;; - esac - a[n++]=$i - done - set -- ${a[@]} - ;; -esac -case $optimize in -?*) integer n=0 - for i - do case $i in - -O*) case $optimize in - -) continue ;; - esac - i=$optimize - ;; - esac - a[n++]=$i - done - set -- ${a[@]} - ;; -esac - -if test -d /usr/lib32 -then LD_LIBRARYN32_PATH=/lib32 $cc -32 -mips2 $flags $dynamic $ldignore $ignore "$@" -else $cc -mips2 $flags $ignore "$@" -fi diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sgi.mips3 b/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sgi.mips3 deleted file mode 100755 index 85ce521a0..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sgi.mips3 +++ /dev/null @@ -1,110 +0,0 @@ -: sgi.mips3 cc wrapper that generates MIPS III binaries : 2007-04-27 : - -HOSTTYPE=sgi.mips3 - -case " $* " in -*" -dumpmachine "*) echo $HOSTTYPE; exit ;; -esac - -# ld: -# 15 -# 84 -# 85 -# 134 -# cc: -# 1685 (first!!) Invalid error number: X. -# 1035 cpp #error -- 0 exit status by default - botch botch botch -# 1048 -# 1155 -# 1171 The indicated expression has no effect. -# 1184 "=" is used where where "==" may have been intended. -# 1209 The controlling expression is constant. -# 1343 -# 3169 X not marked as intrinsic because it is not yet declared -# 3170 X not marked as intrinsic because it is not yet declared -# 3421 expecting function name #pragma intrinsic (X) -# 3433 X not marked as intrinsic because it is not yet declared -# 3434 X not marked as intrinsic because it is not yet declared - -cc=/usr/bin/cc -debug= -dynamic=-G0 -flags=-OPT:Olimit=0 -fatal=1035 -ignore=1685,733,1048,1155,1171,1184,1209,1343,3169,3170,3421,3433,3434 -ldignore=15,84,85,13 -optimize= - -case $_AST_cc_OPTIONS in -?*) eval $_AST_cc_OPTIONS ;; -esac -case $fatal in -?*) fatal="-diag_error $fatal" ;; -esac -case $ignore in -?*) ignore="-woff $ignore" ;; -esac -case $ldignore in -?*) ifs=$IFS - IFS=, - v=$ldignore - ldignore= - for i in $v - do ldignore="$ldignore -Wl,-woff,$i" - done - IFS=$ifs - ;; -esac -case $debug in -?*) integer n=0 - for i - do case $i in - -g*) case $debug in - -) continue ;; - esac - i=$debug - ;; - esac - a[n++]=$i - done - set -- ${a[@]} - ;; -esac -case $optimize in -?*) integer n=0 - for i - do case $i in - -O*) case $optimize in - -) continue ;; - esac - i=$optimize - ;; - esac - a[n++]=$i - done - set -- ${a[@]} - ;; -esac - -case $1 in --mips2) if test -d /usr/lib32 - then LD_LIBRARYN32_PATH=/lib32 $cc -32 -mips2 $flags $dynamic $ldignore $ignore "$@" - else $cc -mips2 $flags $ignore "$@" - fi - ;; --mips4) case " $* " in - *" -ldl "*) - integer n=0 - for i - do case $i in - -ldl) ;; - *) a[n++]=$i ;; - esac - done - set -- ${a[@]} - esac - $cc -64 -mips4 $flags $dynamic $fatal $ldignore $ignore "$@" - ;; -*) $cc -n32 -mips3 $flags $dynamic $fatal $ldignore $ignore "$@" - ;; -esac diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sgi.mips3-o32 b/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sgi.mips3-o32 deleted file mode 100755 index 334145ce0..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sgi.mips3-o32 +++ /dev/null @@ -1,65 +0,0 @@ -: sgi.mips3-o32 cc wrapper that generates MIPS III O32 binaries : 2006-02-14 : - -HOSTTYPE=sgi.mips3-o32 - -case " $* " in -*" -dumpmachine "*) echo $HOSTTYPE; exit ;; -esac - -cc=/usr/bin/cc -debug= -dynamic=-G0 -flags= -ignore=1685,733,1048,1155,1171,1184,1209,1343,3169,3170,3433 -ldignore=15,84,85,13 -optimize= - -case $_AST_cc_OPTIONS in -?*) eval $_AST_cc_OPTIONS ;; -esac -case $ignore in -?*) ignore="-woff $ignore" ;; -esac -case $ldignore in -?*) ifs=$IFS - IFS=, - v=$ldignore - ldignore= - for i in $v - do ldignore="$ldignore -Wl,-woff,$i" - done - IFS=$ifs - ;; -esac -case $debug in -?*) integer n=0 - for i - do case $i in - -g*) case $debug in - -) continue ;; - esac - i=$debug - ;; - esac - a[n++]=$i - done - set -- ${a[@]} - ;; -esac -case $optimize in -?*) integer n=0 - for i - do case $i in - -O*) case $optimize in - -) continue ;; - esac - i=$optimize - ;; - esac - a[n++]=$i - done - set -- ${a[@]} - ;; -esac - -$cc -o32 -mips3 $flags $dynamic $ldignore $ignore "$@" diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sgi.mips4 b/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sgi.mips4 deleted file mode 100755 index 915080341..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sgi.mips4 +++ /dev/null @@ -1,90 +0,0 @@ -: sgi.mips4 cc wrapper that generates MIPS IV binaries : 2007-04-27 : - -HOSTTYPE=sgi.mips4 - -case " $* " in -*" -dumpmachine "*) echo $HOSTTYPE; exit ;; -esac - -cc=/usr/bin/cc -debug= -dynamic=-G0 -flags=-OPT:Olimit=0 -fatal=1035 -ignore=1685,733,1048,1155,1171,1184,1209,1343,3169,3170,3433 -ldignore=15,84,85,13 -optimize= - -case $_AST_cc_OPTIONS in -?*) eval $_AST_cc_OPTIONS ;; -esac -case $fatal in -?*) fatal="-diag_error $fatal" ;; -esac -case $ignore in -?*) ignore="-woff $ignore" ;; -esac -case $ldignore in -?*) ifs=$IFS - IFS=, - v=$ldignore - ldignore= - for i in $v - do ldignore="$ldignore -Wl,-woff,$i" - done - IFS=$ifs - ;; -esac -case $debug in -?*) integer n=0 - for i - do case $i in - -g*) case $debug in - -) continue ;; - esac - i=$debug - ;; - esac - a[n++]=$i - done - set -- ${a[@]} - ;; -esac -case $optimize in -?*) integer n=0 - for i - do case $i in - -O*) case $optimize in - -) continue ;; - esac - i=$optimize - ;; - esac - a[n++]=$i - done - set -- ${a[@]} - ;; -esac - -case $1 in --mips2) if test -d /usr/lib32 - then LD_LIBRARYN32_PATH=/lib32 $cc -32 -mips2 $flags $dynamic $ldignore $ignore "$@" - else $cc -mips2 $flags $ignore "$@" - fi - ;; --mips3) $cc -n32 -mips3 $flags $dynamic $fatal $ldignore $ignore "$@" - ;; -*) case " $* " in - *" -ldl "*) - integer n=0 - for i - do case $i in - -ldl) ;; - *) a[n++]=$i ;; - esac - done - set -- ${a[@]} - esac - $cc -64 -mips4 $flags $dynamic $fatal $ldignore $ignore "$@" - ;; -esac diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sgi.mips4-n32 b/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sgi.mips4-n32 deleted file mode 100755 index c54027faa..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sgi.mips4-n32 +++ /dev/null @@ -1,65 +0,0 @@ -: sgi.mips4-n32 cc wrapper that generates MIPS IV N32 binaries : 2006-02-14 : - -HOSTTYPE=sgi.mips4-n32 - -case " $* " in -*" -dumpmachine "*) echo $HOSTTYPE; exit ;; -esac - -cc=/usr/bin/cc -debug= -dynamic=-G0 -flags= -ignore=1685,733,1048,1155,1171,1184,1209,1343,3169,3170,3433 -ldignore=15,84,85,13 -optimize= - -case $_AST_cc_OPTIONS in -?*) eval $_AST_cc_OPTIONS ;; -esac -case $ignore in -?*) ignore="-woff $ignore" ;; -esac -case $ldignore in -?*) ifs=$IFS - IFS=, - v=$ldignore - ldignore= - for i in $v - do ldignore="$ldignore -Wl,-woff,$i" - done - IFS=$ifs - ;; -esac -case $debug in -?*) integer n=0 - for i - do case $i in - -g*) case $debug in - -) continue ;; - esac - i=$debug - ;; - esac - a[n++]=$i - done - set -- ${a[@]} - ;; -esac -case $optimize in -?*) integer n=0 - for i - do case $i in - -O*) case $optimize in - -) continue ;; - esac - i=$optimize - ;; - esac - a[n++]=$i - done - set -- ${a[@]} - ;; -esac - -$cc -n32 -mips4 $flags $dynamic $ldignore $ignore "$@" diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.specialize b/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.specialize deleted file mode 100755 index 87077b5a9..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.specialize +++ /dev/null @@ -1,35 +0,0 @@ -: -O* specialization cc wrapper : 2011-11-11 : - -case " $* " in -*" -dumpmachine "*) echo $HOSTTYPE; exit ;; -esac - -cc=cc - -CCREPLACE='' # these (possibly empty) options replace -O* -CCALWAYS='' # these (possibly empty) options always set - -case $CCREPLACE in -'') ;; -*) case " $* " in - *" -O"*) - set '' "$@" '' - shift - while : - do a=$1 - shift - case $a in - '') break - ;; - -O*) set '' "$@" $CCREPLACE - ;; - *) set '' "$@" "$a" - ;; - esac - shift - done - ;; - esac - ;; -esac -$cc $CCALWAYS "$@" diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.unix.mc68k b/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.unix.mc68k deleted file mode 100755 index ebdfa0d1c..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.unix.mc68k +++ /dev/null @@ -1,76 +0,0 @@ -: 3B1/PC7300 unix.mc68k cc wrapper for ANSI C : 2002-09-01 : - -HOSTTYPE=unix.mc68k - -case " $* " in -*" -dumpmachine "*) echo $HOSTTYPE; exit ;; -esac - -# /bin/cc predates ANSI C; use gcc -# some headers depend on SYSTEM5 or mc68k being defined -# headers for Ethernet software are under /usr/ethernet/include -# both /usr/lib/libnet.a and /usr/lib/libcurses.a define select() -# -lcurses uses a version of select for napms(), but that -# implementation always returns an error if given file -# descriptors to watch -# the one in -lnet must be used if fds (instead of or in addition to -# a timeout) are of interest therefore, -lnet should be -# specified before -lcurses -# rename(old, new) in /usr/lib/libnet.a fails if new exists -# (permitted by ANSI/ISO C-1990 7.9.4.2) -# gcc -fpic doesn't work as there's no _GLOBAL_OFFSET_TABLE symbol - -cc="gcc" - -exec= -show=: -inc=0 -lib=0 -set '' -DSYSTEM5 -Dmc68k "$@" '' -shift -while : -do a=$1 - shift - case $a in - '') break - ;; - -lcurses|libcurses.a|*/libcurses.a) - lib=1 - set '' "$@" -lnet - shift - ;; - -lnet|libnet.a|*/libnet.a) - lib=1 - ;; - -o) a=$1 - shift - set '' "$@" -o - shift - ;; - -fpic) continue - ;; - -n) exec=: - continue - ;; - -v) show=echo - continue - ;; - -*) ;; - *) case $inc in - 0) inc=1 - set '' "$@" -I/usr/ethernet/include - shift - ;; - esac - ;; - esac - set '' "$@" "$a" - shift -done -case $lib in -0) set '' "$@" -lnet - shift - ;; -esac -$show $cc "$@" -$exec $cc "$@" diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.unixware.i386 b/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.unixware.i386 deleted file mode 100755 index b1b1a2cb7..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/cc.unixware.i386 +++ /dev/null @@ -1,9 +0,0 @@ -: unixware.i386 cc wrapper - -HOSTTYPE=unixware.i386 - -case " $* " in -*" -dumpmachine "*) echo $HOSTTYPE; exit ;; -esac - -/bin/cc -D_XOPEN_UNIX -D_XOPEN_SOURCE_EXTENDED "$@" diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/crossexec.sh b/cde/programs/dtksh/ksh93/src/cmd/INIT/crossexec.sh deleted file mode 100644 index 6b78843bf..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/crossexec.sh +++ /dev/null @@ -1,144 +0,0 @@ -######################################################################## -# # -# This software is part of the ast package # -# Copyright (c) 1994-2011 AT&T Intellectual Property # -# Copyright (c) 2020-2021 Contributors to ksh 93u+m # -# and is licensed under the # -# Eclipse Public License, Version 1.0 # -# by AT&T Intellectual Property # -# # -# A copy of the License is available at # -# http://www.eclipse.org/org/documents/epl-v10.html # -# (with md5 checksum b35adb5213ca9657e911e9befb180842) # -# # -# Information and Software Systems Research # -# AT&T Research # -# Florham Park NJ # -# # -# Glenn Fowler # -# # -######################################################################## -: cross compiler a.out execution - -(command set -o posix) 2>/dev/null && set -o posix - -command=crossexec - -tmp=/tmp/cross$$ - -case `(getopts '[-][123:xyz]' opt --xyz; echo 0$opt) 2>/dev/null` in -0123) ARGV0="-a $command" - USAGE=$' -[-? -@(#)$Id: crossexec (AT&T Labs Research) 2004-01-04 $ -] -[-author?Glenn Fowler ] -[-copyright?Copyright (c) 1994-2012 AT&T Intellectual Property] -[-license?http://www.eclipse.org/org/documents/epl-v10.html] -[+NAME?crossexec - cross compiler a.out execution] -[+DESCRIPTION?\bcrossexec\b runs a cross-compiled \acommand\a in an environment - that supports a cross-compilation architecture different from the - current host. The cross environment is determined by \acrosstype\a, - usually a host type name produced by \bpackage\b(1). \acrosstype\a - is used to find an entry in \b$HOME/.crossexec\b that specifies - the cross compiler host and access details.] -[+?The exit status of \bcrossexec\b is the exit status of \acommand\a.] -[+CROSS ENVIRONMENT FILE?\b$HOME/.crossexec\b contains one line for each - supported \acrosstype\a. Each line contains 5 tab separated fields. - Field default values are specified as \b-\b. The fields are:]{ - [+crosstype?The host type produced by \bpackage\b(1).] - [+host?The host name.] - [+user?The user name on \ahost\a. The default is the current user.] - [+dir?The directory to copy \acommand\a and execute it. The default - is the \auser\a \b$HOME\b on \ahost\a.] - [+shell?The command used to get shell access to \ahost\a. Currently - only \brsh\b and \bssh\b are supported.] - [+copy?The command used to copy \acommand\a to \ahost\a. Currently - only \brcp\b and \bscp\b are supported.] -} -[n:show?Show the underlying commands but do not execute.] - -crosstype command [ option ... ] [ file ... ] - -[+SEE ALSO?\brcp\b(1), \brsh\b(1), \bscp\b(1), \bssh\b(1)] -' - ;; -*) ARGV0="" - USAGE="crosstype command [ option ... ] [ file ... ]" - ;; -esac - -usage() -{ - OPTIND=0 - getopts $ARGV0 "$USAGE" OPT '-?' - exit 2 -} - -exec= - -# get the options and operands - -while getopts $ARGV0 "$USAGE" OPT -do case $OPT in - n) exec=echo ;; - *) usage ;; - esac -done -shift $OPTIND-1 -case $# in -[01]) usage ;; -esac - -type=$1 -shift -cmd=$1 -shift - -# get the host info - -info=$HOME/.$command -if test ! -r $info -then echo "$command: $info: not found" >&2 - exit 1 -fi -ifs=${IFS-' - '} -while : -do IFS=' ' - read hosttype hostname usr dir sh cp - code=$? - IFS=$ifs - case $code in - 0) ;; - *) echo "$command: $type: unknown cross compiler host type" >&2 - exit 1 - ;; - esac - case $hosttype in - $type) break ;; - esac -done < $info - -# fill in the defaults - -case $usr in --) cpu= shu= ;; -*) cpu=${usr}@ shu="-l $usr" ;; -esac -case $dir in --) dir= ;; -esac -case $sh in -''|-) sh=ssh ;; -esac -case $cp in -''|-) cp=scp ;; -scp) cp="$cp -q" ;; -esac - -trap "rm -f $tmp" 0 1 2 3 15 -$exec $cp $cmd $cpu$hostname:$dir /dev/null; code=\$?; rm -f $cmd; echo $command: exit \$code >&2" $tmp -exit `sed -e '/^'$command': exit [0-9][0-9]*$/!d' -e 's/.* //' $tmp` diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/db.c b/cde/programs/dtksh/ksh93/src/cmd/INIT/db.c deleted file mode 100644 index 77c636fce..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/db.c +++ /dev/null @@ -1,38 +0,0 @@ -/*********************************************************************** -* * -* This software is part of the ast package * -* Copyright (c) 1994-2011 AT&T Intellectual Property * -* Copyright (c) 2020-2021 Contributors to ksh 93u+m * -* and is licensed under the * -* Eclipse Public License, Version 1.0 * -* by AT&T Intellectual Property * -* * -* A copy of the License is available at * -* http://www.eclipse.org/org/documents/epl-v10.html * -* (with md5 checksum b35adb5213ca9657e911e9befb180842) * -* * -* Information and Software Systems Research * -* AT&T Research * -* Florham Park NJ * -* * -* Glenn Fowler * -* * -***********************************************************************/ -/* - * small test for sleepycat dbm compatibility - */ - -#define DB_DBM_HSEARCH 1 - -#if DB_DBM_HSEARCH -#include -#endif - -int -main() -{ - DBM* dbm = 0; - - dbm_close(dbm); - return 0; -} diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/dl.c b/cde/programs/dtksh/ksh93/src/cmd/INIT/dl.c deleted file mode 100644 index 528905fcf..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/dl.c +++ /dev/null @@ -1,34 +0,0 @@ -/*********************************************************************** -* * -* This software is part of the ast package * -* Copyright (c) 1994-2011 AT&T Intellectual Property * -* Copyright (c) 2020-2021 Contributors to ksh 93u+m * -* and is licensed under the * -* Eclipse Public License, Version 1.0 * -* by AT&T Intellectual Property * -* * -* A copy of the License is available at * -* http://www.eclipse.org/org/documents/epl-v10.html * -* (with md5 checksum b35adb5213ca9657e911e9befb180842) * -* * -* Information and Software Systems Research * -* AT&T Research * -* Florham Park NJ * -* * -* Glenn Fowler * -* * -***********************************************************************/ -/* - * small test for -ldl - */ - -#ifndef dlopen -#include -#endif - -int -main() -{ - dlopen("libdl.so",0); - return 0; -} diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/execrate.sh b/cde/programs/dtksh/ksh93/src/cmd/INIT/execrate.sh deleted file mode 100644 index 513b43dc9..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/execrate.sh +++ /dev/null @@ -1,190 +0,0 @@ -######################################################################## -# # -# This software is part of the ast package # -# Copyright (c) 1994-2011 AT&T Intellectual Property # -# Copyright (c) 2020-2021 Contributors to ksh 93u+m # -# and is licensed under the # -# Eclipse Public License, Version 1.0 # -# by AT&T Intellectual Property # -# # -# A copy of the License is available at # -# http://www.eclipse.org/org/documents/epl-v10.html # -# (with md5 checksum b35adb5213ca9657e911e9befb180842) # -# # -# Information and Software Systems Research # -# AT&T Research # -# Florham Park NJ # -# # -# Glenn Fowler # -# # -######################################################################## -: wrapper for .exe challenged Win32 systems/commands - -(command set -o posix) 2>/dev/null && set -o posix - -command=execrate - -bins=` - ( - userPATH=$PATH - PATH=/run/current-system/sw/bin:/usr/xpg7/bin:/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin:$PATH - getconf PATH 2>/dev/null && echo "$userPATH" || echo /bin:/usr/bin:/sbin:/usr/sbin:"$userPATH" - ) | sed 's/:/ /g' -` || exit - -case `(getopts '[-][123:xyz]' opt --xyz; echo 0$opt) 2>/dev/null` in -0123) ARGV0="-a $command" - USAGE=$' -[-? -@(#)$Id: execrate (AT&T Labs Research) 2002-02-02 $ -] -[-author?Glenn Fowler ] -[-copyright?Copyright (c) 2002-2012 AT&T Intellectual Property] -[-license?http://www.eclipse.org/org/documents/epl-v10.html] -[+NAME?execrate - wrapper for .exe challenged commands] -[+DESCRIPTION?\bexecrate\b runs \acommand\a after checking the \afile\a - operands for standard semantics with respect to \bWin32\b \b.exe\b - suffix conventions. This command is only needed on \bWin32\b - systems that inconsistently handle \b.exe\b across library and - command interfaces. \acommand\a may be one of \bcat\b(1), \bchmod\b(1), - \bcmp\b(1), \bcp\b(1), \bln\b(1), \bmv\b(1), or \brm\b(1). - Only the 2 argument forms of \bcp\b, \bln\b and \bmv\b are handled. - Unsupported commands and commands requiring no change are - silently executed.] -[+?With no arguments \bexecrate\b exits with status 0 if the current system - is \b.exe\b challenged, 1 if the current system is normal.] -[n:show?Show the underlying commands but do not execute.] - -command [ option ... ] file ... - -[+SEE ALSO?\bwebster\b(1)] -' - usage() - { - OPTIND=0 - getopts $ARGV0 "$USAGE" OPT '-?' - exit 2 - } - exec=1 - while getopts $ARGV0 "$USAGE" OPT - do case $OPT in - n) exec=0 ;; - *) usage ;; - esac - done - shift `expr $OPTIND - 1` - ;; -*) usage() - { - echo "Usage: execrate [ -n ] [ command [ option ... ] file ... ]" >&2 - exit 2 - } - exec=1 - while : - do case $1 in - -n) exec=0 ;; - -*) usage ;; - *) break ;; - esac - shift - done - ;; -esac -case $# in -0) if test ! -x /bin/cat.exe - then exit 1 # normal - fi - if /bin/cat /bin/cat >/dev/null 2>&1 - then exit 1 # normal - fi - exit 0 # challenged - ;; -1) usage - ;; -esac -case $1 in -*cat|*rm) - NUM=0 - ;; -*chgrp|*chmod) - NUM=1 - ;; -*cmp|*cp|*ln|*mv) - NUM=2 - ;; -*) case $exec in - 0) echo "$@" ;; - *) "$@" ;; - esac - exit - ;; -esac -CMD=$1 -shift -case $CMD in -*/*) ;; -*) for d in $bins - do if test -x $d/$1 -o -x $d/$1.exe - then CMD=$d/$1 - break - fi - done - ;; -esac -while : -do case $1 in - -*) CMD="$CMD $1" ;; - *) break ;; - esac - shift -done -case $exec in -0) CMD="echo $CMD" ;; -esac -case $NUM:$# in -*:0) ;; -1:*) CMD="$CMD $1" - NUM=0 - shift - ;; -esac -case $NUM:$# in -0:*) status=0 - for f - do if test "$f" -ef "$f".exe - then f=$f.exe - fi - $CMD "$f" - case $? in - 0) ;; - *) status=$? ;; - esac - done - exit $status - ;; -2:2) f=$1 - case $f in - *.exe) ;; - *) if test "$f" -ef "$f".exe - then f=$f.exe - fi - ;; - esac - case $f in - *.exe) if test -d "$2" - then t=$2/$f - else t=$2 - fi - case $t in - */*) b=`basename "$t"` ;; - *) b=$t ;; - esac - case $b in - *.*) $CMD "$f" "$t"; exit ;; - *) $CMD "$f" "$t".exe; exit ;; - esac - ;; - esac - ;; -esac -$CMD "$@" diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/filter.sh b/cde/programs/dtksh/ksh93/src/cmd/INIT/filter.sh deleted file mode 100644 index dd46bbfa0..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/filter.sh +++ /dev/null @@ -1,105 +0,0 @@ -######################################################################## -# # -# This software is part of the ast package # -# Copyright (c) 1994-2011 AT&T Intellectual Property # -# Copyright (c) 2020-2021 Contributors to ksh 93u+m # -# and is licensed under the # -# Eclipse Public License, Version 1.0 # -# by AT&T Intellectual Property # -# # -# A copy of the License is available at # -# http://www.eclipse.org/org/documents/epl-v10.html # -# (with md5 checksum b35adb5213ca9657e911e9befb180842) # -# # -# Information and Software Systems Research # -# AT&T Research # -# Florham Park NJ # -# # -# Glenn Fowler # -# # -######################################################################## -: convert command that operates on file args to pipeline filter - -(command set -o posix) 2>/dev/null && set -o posix - -command=filter - -TMPDIR=${TMPDIR:-/tmp} -export TMPDIR -tmp=$TMPDIR/$command$$ -suf= - -case `(getopts '[-][123:xyz]' opt --xyz; echo 0$opt) 2>/dev/null` in -0123) ARGV0="-a $command" - USAGE=$' -[-? -@(#)$Id: filter (AT&T Labs Research) 2001-05-31 $ -] -[-author?Glenn Fowler ] -[-copyright?Copyright (c) 1994-2012 AT&T Intellectual Property] -[-license?http://www.eclipse.org/org/documents/epl-v10.html] -[+NAME?filter - run a command in stdin/stdout mode] -[+DESCRIPTION?\bfilter\b runs \acommand\a in a mode that takes input from - the \afile\a operands, or from the standard input if no \afile\a - operands are specified, and writes the results to the standard output. - It can be used to run commands like \bsplit\b(1), that normally modify - \afile\a operands in-place, in pipelines. The \afile\a operands are - not modified; \acommand\a is run on copies in \b/tmp\b.] - -command [ option ... ] [ file ... ] - -[+SEE ALSO?\bstrip\b(1)] -' - ;; -*) ARGV0="" - USAGE="command [ option ... ] [ file ... ]" - ;; -esac - -usage() -{ - OPTIND=0 - getopts $ARGV0 "$USAGE" OPT '-?' - exit 2 -} - -while getopts $ARGV0 "$USAGE" OPT -do case $OPT in - *) usage ;; - esac -done -shift `expr $OPTIND - 1` -case $# in -0) usage ;; -esac - -cmd=$1 -while : -do shift - case $# in - 0) break ;; - esac - case $1 in - -*) cmd="$cmd $1" ;; - *) break ;; - esac -done -trap 'rm -f $tmp$suf' 0 1 2 3 15 -case $# in -0) cat > $tmp - $cmd $tmp - ;; -*) for file - do suf=${file##*/} - case $suf in - *.*) suf=.${suf#*.} ;; - *) suf= ;; - esac - cp $file $tmp$suf || exit 1 - chmod u+rwx $tmp$suf || exit 1 - $cmd $tmp$suf || exit 1 - cat $tmp$suf - rm -f $tmp$suf - done - ;; -esac diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/gdbm.c b/cde/programs/dtksh/ksh93/src/cmd/INIT/gdbm.c deleted file mode 100644 index 5e21b5908..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/gdbm.c +++ /dev/null @@ -1,38 +0,0 @@ -/*********************************************************************** -* * -* This software is part of the ast package * -* Copyright (c) 1994-2011 AT&T Intellectual Property * -* Copyright (c) 2020-2021 Contributors to ksh 93u+m * -* and is licensed under the * -* Eclipse Public License, Version 1.0 * -* by AT&T Intellectual Property * -* * -* A copy of the License is available at * -* http://www.eclipse.org/org/documents/epl-v10.html * -* (with md5 checksum b35adb5213ca9657e911e9befb180842) * -* * -* Information and Software Systems Research * -* AT&T Research * -* Florham Park NJ * -* * -* Glenn Fowler * -* * -***********************************************************************/ -/* - * small test for -lgdbm - */ - -#define _hdr_gdbm_ndbm 1 - -#if _hdr_gdbm_ndbm -#include -#endif - -int -main() -{ - DBM* dbm = 0; - - dbm_close(dbm); - return 0; -} diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/gdbm1.c b/cde/programs/dtksh/ksh93/src/cmd/INIT/gdbm1.c deleted file mode 100644 index 68d231751..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/gdbm1.c +++ /dev/null @@ -1,38 +0,0 @@ -/*********************************************************************** -* * -* This software is part of the ast package * -* Copyright (c) 1994-2011 AT&T Intellectual Property * -* Copyright (c) 2020-2021 Contributors to ksh 93u+m * -* and is licensed under the * -* Eclipse Public License, Version 1.0 * -* by AT&T Intellectual Property * -* * -* A copy of the License is available at * -* http://www.eclipse.org/org/documents/epl-v10.html * -* (with md5 checksum b35adb5213ca9657e911e9befb180842) * -* * -* Information and Software Systems Research * -* AT&T Research * -* Florham Park NJ * -* * -* Glenn Fowler * -* * -***********************************************************************/ -/* - * small test for -lgdbm - */ - -#define _hdr_gdbm_ndbm 1 - -#if _hdr_gdbm_ndbm -#include -#endif - -int -main() -{ - DBM* dbm = 0; - - dbm_close(dbm); - return 0; -} diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/gdbm2.c b/cde/programs/dtksh/ksh93/src/cmd/INIT/gdbm2.c deleted file mode 100644 index 9e052ff95..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/gdbm2.c +++ /dev/null @@ -1,38 +0,0 @@ -/*********************************************************************** -* * -* This software is part of the ast package * -* Copyright (c) 1994-2011 AT&T Intellectual Property * -* Copyright (c) 2020-2021 Contributors to ksh 93u+m * -* and is licensed under the * -* Eclipse Public License, Version 1.0 * -* by AT&T Intellectual Property * -* * -* A copy of the License is available at * -* http://www.eclipse.org/org/documents/epl-v10.html * -* (with md5 checksum b35adb5213ca9657e911e9befb180842) * -* * -* Information and Software Systems Research * -* AT&T Research * -* Florham Park NJ * -* * -* Glenn Fowler * -* * -***********************************************************************/ -/* - * small test for -lgdbm - */ - -#define _hdr_ndbm 1 - -#if _hdr_ndbm -#include -#endif - -int -main() -{ - DBM* dbm = 0; - - dbm_close(dbm); - return 0; -} diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/hello.c b/cde/programs/dtksh/ksh93/src/cmd/INIT/hello.c deleted file mode 100644 index 7a6176373..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/hello.c +++ /dev/null @@ -1,24 +0,0 @@ -/*********************************************************************** -* * -* This software is part of the ast package * -* Copyright (c) 1994-2011 AT&T Intellectual Property * -* Copyright (c) 2020-2021 Contributors to ksh 93u+m * -* and is licensed under the * -* Eclipse Public License, Version 1.0 * -* by AT&T Intellectual Property * -* * -* A copy of the License is available at * -* http://www.eclipse.org/org/documents/epl-v10.html * -* (with md5 checksum b35adb5213ca9657e911e9befb180842) * -* * -* Information and Software Systems Research * -* AT&T Research * -* Florham Park NJ * -* * -* Glenn Fowler * -* * -***********************************************************************/ -#ifndef printf -#include -#endif -int main() { int new = 0; printf("hello world\n"); return new;} diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/hosttype.tst b/cde/programs/dtksh/ksh93/src/cmd/INIT/hosttype.tst deleted file mode 100644 index 7a6458848..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/hosttype.tst +++ /dev/null @@ -1,6 +0,0 @@ -hp.pa hostname 9000/730 hp9000s700 HP-UX hostname A.09.01 A -linux-aout.i386 hostname i586 i386 linux hostname 1.1.59 #1 -sgi.mips2 hostname.domain IP22 mips IRIX hostname 5.2 02282016 -osf.alpha hostname.domain alpha alpha OSF1 hostname.domain V3.2 62 -sun4 hostname.domain sun4 sparc SunOS hostname.domain 4.1.1 1 sun4c -sol.sun4 hostname.domain sun4 sparc SunOS hostname.domain 5.4 Generic_101945-13 diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/iconv.c b/cde/programs/dtksh/ksh93/src/cmd/INIT/iconv.c deleted file mode 100644 index 0fd7aa941..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/iconv.c +++ /dev/null @@ -1,30 +0,0 @@ -/*********************************************************************** -* * -* This software is part of the ast package * -* Copyright (c) 1994-2011 AT&T Intellectual Property * -* Copyright (c) 2020-2021 Contributors to ksh 93u+m * -* and is licensed under the * -* Eclipse Public License, Version 1.0 * -* by AT&T Intellectual Property * -* * -* A copy of the License is available at * -* http://www.eclipse.org/org/documents/epl-v10.html * -* (with md5 checksum b35adb5213ca9657e911e9befb180842) * -* * -* Information and Software Systems Research * -* AT&T Research * -* Florham Park NJ * -* * -* Glenn Fowler * -* * -***********************************************************************/ -#ifndef iconv -#include -#endif - -int -main() -{ - iconv(0, 0, 0, 0, 0); - return 0; -} diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/iffe.sh b/cde/programs/dtksh/ksh93/src/cmd/INIT/iffe.sh deleted file mode 100644 index 9729587f5..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/iffe.sh +++ /dev/null @@ -1,4420 +0,0 @@ -######################################################################## -# # -# This software is part of the ast package # -# Copyright (c) 1994-2012 AT&T Intellectual Property # -# Copyright (c) 2020-2021 Contributors to ksh 93u+m # -# and is licensed under the # -# Eclipse Public License, Version 1.0 # -# by AT&T Intellectual Property # -# # -# A copy of the License is available at # -# http://www.eclipse.org/org/documents/epl-v10.html # -# (with md5 checksum b35adb5213ca9657e911e9befb180842) # -# # -# Information and Software Systems Research # -# AT&T Research # -# Florham Park NJ # -# # -# Glenn Fowler # -# # -######################################################################## -# Glenn Fowler & Phong Vo -# AT&T Research -# -# test if feature exists -# this script is written to make it through POSIX sh variants -# -# NOTE: .exe a.out suffix and [\\/] in path patterns for DOS/NT - -case ${ZSH_VERSION+z} in -z) emulate ksh ;; -*) (command set -o posix) 2>/dev/null && set -o posix ;; -esac -case $HOSTTYPE in -ibm.*) unset LIBPATH ;; # AIX: avoid failure to link to libiconv -esac - -command=iffe -version=2021-12-31 - -compile() # $cc ... -{ - "$@" 2>$tmp.err - _compile_status=$? - if test -s $tmp.err - then cat $tmp.err >&2 - fi - if test "$_compile_status" -gt 128 - then echo "$command: $@" >&$stderr - cat $tmp.err >&$stderr - sig=$(kill -l "$_compile_status") - case $sig in - [!0-9]?*) - echo "$command: $1: terminated by SIG$sig" ;; - *) echo "$command: $1: fatal interruption ($_compile_status)" ;; - esac >&$stderr - exit $_compile_status - fi - return $_compile_status -} - -is_hdr() # [ - ] [ file.c ] hdr -{ - case $1 in - -) _is_hdr_flag=-; shift ;; - *) _is_hdr_flag= ;; - esac - case $1 in - *.c) _is_hdr_file=$1; shift ;; - *) _is_hdr_file=$tmp.c ;; - esac - is hdr $1 - compile $cc -c $_is_hdr_file <&$nullin >&$nullout 2>$tmp.e - _is_hdr_status=$? - case $_is_hdr_status in - 0) if test -s $tmp.e - then case $(grep '#.*error' $tmp.e) in - ?*) _is_hdr_status=1 ;; - esac - fi - ;; - esac - case $_is_hdr_status in - 0) success $_is_hdr_flag - ;; - *) case $debug in - 3) cat $tmp.e >&$stderr ;; - esac - failure $_is_hdr_flag - ;; - esac - return $_is_hdr_status -} - -pkg() # package -{ - case $1 in - '') # Determine default system path, store in $pth. - pth=$( - PATH=/run/current-system/sw/bin:/usr/xpg7/bin:/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin:$PATH - exec getconf PATH 2>/dev/null - ) - case $pth in - '' | [!/]* | *:[!/]* | *: ) - pth="/bin /usr/bin /sbin /usr/sbin" ;; - *:*) pth=$(echo "$pth" | sed 's/:/ /g') ;; - esac - # Fix for NixOS. Not all POSIX standard utilities come with the default system, - # e.g. 'bc', 'file', 'vi'. The command that NixOS recommends to get missing - # utilities, e.g. 'nix-env -iA nixos.bc', installs them in a default profile - # directory that is not in $(getconf PATH). So add this path to the standard path. - # See: https://github.com/NixOS/nixpkgs/issues/65512 - if test -e /etc/NIXOS && - nix_profile_dir=/nix/var/nix/profiles/default/bin && - test -d "$nix_profile_dir" - then case " $pth " in - *" $nix_profile_dir "* ) - # nothing to do - ;; - * ) # insert the default profile directory as the second entry - pth=$( - set $pth - one=$1 - shift - echo "$one $nix_profile_dir${1+ }$@" - ) ;; - esac - fi - # Fix for AIX. At least as of version 7.1, the system default 'find', 'diff -u' and 'patch' utilities - # are broken and/or non-compliant in ways that make them incompatible with POSIX 2018. However, GNU - # utilities are commonly installed in /opt/freeware/bin, and under standard names (no g- prefix). - if test -d /opt/freeware/bin - then case $(uname) in - AIX ) pth="/opt/freeware/bin $pth" ;; - esac - fi - return - ;; - '<') shift - ;; - *) return - ;; - esac - case $1 in - X|X11*) i="openwin" - case $1 in - X) set X11 ;; - esac - case $1 in - X11) case $# in - 1) set $1 6 5 4 ;; - esac - ;; - esac - ;; - *) i= - ;; - esac - pth="{ usr . - . contrib local $i - . share - . lib - $1" - i=$1 - while : - do shift - case $# in - 0) break ;; - esac - case $1 in - '>') shift; break ;; - esac - pth="$pth ${i}R$1 ${i}.$1" - done - pth="$pth . } $*" -} - -is() # op name -{ - case $verbose in - 1) case $complete in - 1) failure ;; - esac - oo=$1 - shift - case $1 in - ?*) yy=is - ii=$1 - complete=1 - case $oo in - cmd) mm="a command" ;; - dat) mm="a library data symbol" ;; - dfn) mm="a macro with extractable value" ;; - exp) mm="true" ;; - hdr) mm="a header" ;; - id) mm="an identifier" ;; - lcl) mm="a native header" ;; - key) mm="a reserved keyword" ;; - lib) mm="a library function" ;; - LIB) case $2 in - "") mm="a library" ;; - *) ii=$*; mm="a library group" ;; - esac - ;; - mac) mm="a macro" ;; - mem) mm="a member of $2" ;; - mth) mm="a math library symbol" ;; - nos) mm="a non-opaque struct" ;; - npt) mm="a symbol that needs a prototype" ;; - num) mm="a numeric constant or enum" ;; - nxt) mm="an include path for the native header" ;; - opt) mm="set in \$PACKAGE_OPTIONS" ;; - pth) mm="a file" ;; - run) yy="capture output of" mm= ;; - siz) mm="a type with known size" ;; - sym) mm="a typed variable" ;; - sys) mm="a system header" ;; - typ) mm="a type or typedef" ;; - val) yy="determine" mm="value" ;; - *) yy= mm= ;; - esac - case $ii in - [abcdefghijklmnopqrstuvwxyz]*[abcdefghijklmnopqrstuvwxyz]'{') ii="$ii ... }end" ;; - esac - $show "$command: test:" $yy $ii $mm "...$SHOW" >&$stderr - complete=1 - ;; - esac - ;; - esac -} - -success() -{ - case $1 in - -) shift - ;; - *) case $result in - UNKNOWN) result=SUCCESS ;; - esac - case $1 in - +) return ;; - esac - ;; - esac - case $complete:$verbose in - 1:1) case $suspended in - 1) suspended=0 - $show "$command: test:" $yy $ii $mm "...$SHOW" >&$stderr - ;; - esac - complete=0 - case $# in - 0) mm="yes" ;; - *) mm="'$*'" ;; - esac - case $debug in - 0) echo " $mm" >&$stderr ;; - *) echo "$command: ... $mm" >&$stderr ;; - esac - ;; - esac -} - -failure() -{ - case $1 in - -) shift ;; - *) result=FAILURE - case $1 in - +) return ;; - esac - ;; - esac - case $complete:$verbose in - 1:1) case $suspended in - 1) suspended=0 - $show "$command: test:" $yy $ii $mm "...$SHOW" >&$stderr - ;; - esac - complete=0 - case $group in - '') case $# in - 0) mm="no" ;; - *) mm=$* ;; - esac - ;; - *) mm= - ;; - esac - case $debug in - 0) echo " $mm" >&$stderr ;; - *) echo "$command: ... $mm" >&$stderr ;; - esac - ;; - esac -} - -# report -# -# - ignore global status -# -0 normal sense -# -1 inverted sense if ! def -# status test status 0:success *:failure -# success success comment -# failure failure comment -# default default setting comment -# -# globals -# -# $not invert test sense -# $M test variable -# $m test macro -# $v default macro - -report() # [-] [-0] [-1] status value success failure default -{ - case $1 in - -) _report_ignore=$1 - shift - ;; - *) _report_ignore= - ;; - esac - _report_not=$not - case $1 in - -0) shift - ;; - -1) shift - case $def in - ''|-) case $_report_not in - 1) _report_not= ;; - *) _report_not=1 ;; - esac - ;; - esac - ;; - esac - _report_status=$1 - case $_report_ignore:$_report_status in - -:*) ;; - *:0) success $_report_ignore - ;; - *) failure $_report_ignore - case $group in - ?*) return ;; - esac - ;; - esac - _report_value=$2 - case $_report_not in - 1) case $_report_status in - 0) _report_status=1 ;; - *) _report_status=0 ;; - esac - _report_success=$4 - _report_failure=$3 - ;; - *) _report_success=$3 - _report_failure=$4 - ;; - esac - _report_default=$5 - case $_report_status in - 0) case $M in - *-*) ;; - *) usr="$usr$nl#define $m $_report_value" - case $_report_success in - ''|-) ;; - *) case $define in - 1) echo "#define $m $_report_value /* $_report_success */" ;; - n) echo "$m=$_report_value" - esac - ;; - esac - eval $m=\'$_report_value\' - ;; - esac - ;; - *) case $M in - *-*) ;; - *) case $_report_failure in - ''|-) ;; - *) case $define$all$config$undef in - 1?1?|1??1)echo "#undef $m /* $_report_failure */" ;; - 11??) echo "#define $m 0 /* $_report_failure */" ;; - n1?1) echo "$m=" ;; - n1??) echo "$m=0" ;; - esac - ;; - esac - case $_report_default in - ''|-) ;; - *) case $define$set in - 1?*) echo "#define $v $set /* $_report_default */" ;; - n?*) echo "$v=$set" ;; - esac - ;; - esac - eval $m=0 - ;; - esac - ;; - esac -} - -noisy() -{ - case $complete:$verbose in - 1:1) suspended=1 - echo >&$stderr - ;; - esac -} - -copy() # "output-file" "data-that-must-not-be-processed-by-echo" -{ - case $1 in - -) case $shell in - ksh) print -r - "$2" - ;; - *) printf '%s\n' "$2" - ;; - esac - ;; - *) case $shell in - ksh) print -r - "$2" - ;; - *) printf '%s\n' "$2" - ;; - esac > "$1" - ;; - esac -} - -# verify that cc is a C compiler - -checkcc() -{ - # check for local package root directories - - case $PACKAGE_PATH in - ?*) for i in $(echo $PACKAGE_PATH | sed 's,:, ,g') - do if test -d $i/include - then cc="$cc -I$i/include" - occ="$occ -I$i/include" - fi - if test -d $i/lib - then cc="$cc -L$i/lib" - occ="$occ -L$i/lib" - for y in $libpaths - do eval $y=\"\$$y:\$i/lib\$${y}_default\" - eval export $y - done - fi - done - ;; - esac - echo "int i = 1;" > $tmp.c - if compile $cc -c $tmp.c <&$nullin >&$nullout - then echo "(;" > $tmp.c - if compile $cc -c $tmp.c <&$nullin >&$nullout - then cctest="should not compile '(;'" - fi - else cctest="should compile 'int i = 1;'" - fi - case $cctest in - "") cctest=0 - ;; - *) echo "$command: $cc: not a C compiler: $cctest" >&$stderr - exit 1 - ;; - esac -} - -execute() -{ - case $verbose in - 0) noteout=$nullout ;; - *) noteout=$stderr ;; - esac - if test "" != "$cross" - then crossexec $cross "$@" 9>&$noteout - _execute_=$? - elif test -d /NextDeveloper - then "$@" <&$nullin >&$nullout 9>&$noteout - _execute_=$? - "$@" <&$nullin | cat - else "$@" 9>&$noteout - _execute_=$? - fi - return $_execute_ -} - -exclude() -{ - case $excludes in - '') return 0 ;; - esac - for _exclude_var - do eval _exclude_old=\$$_exclude_var - case $_exclude_old in - *" -I"*);; - *) continue ;; - esac - _exclude_new= - _exclude_sep= - for _exclude_arg in $_exclude_old - do _exclude_skip= - for _exclude_dir in $excludes - do case $_exclude_arg in - -I$_exclude_dir|-I*/$_exclude_dir) - _exclude_skip=1 - break; - ;; - esac - done - case $_exclude_skip in - '') _exclude_new="$_exclude_new$_exclude_sep$_exclude_arg" - _exclude_sep=" " - ;; - esac - done - eval $_exclude_var=\$_exclude_new - case $debug in - 0) ;; - *) echo $command: exclude $_exclude_var: "$_exclude_old => $_exclude_new" >&$stderr - ;; - esac - done -} - -all=0 -apis= -binding="-dy -dn -Bdynamic -Bstatic -Wl,-ashared -Wl,-aarchive -call_shared -non_shared '' -static" -complete=0 -config=0 -defhdr= -define=1 -explicit=0 -iff= -usr= -cross= -debug=0 -deflib= -dir=FEATURE -excludes= -executable="test -x" -exists="test -e" -gothdr= -gotlib= -idno= -idyes= -ifs=${IFS-' - '} -in= -includes= -intrinsic= -libpaths="DYLD_LIBRARY_PATH LD_LIBRARY_PATH LD_LIBRARYN32_PATH LD_LIBRARY64_PATH LIBPATH SHLIB_PATH" - DYLD_LIBRARY_PATH_default=:/lib:/usr/lib - LD_LIBRARY_PATH_default=:/lib:/usr/lib - LD_LIBRARYN32_PATH_default=:/lib32:/usr/lib32 - LD_LIBRARY64_PATH_default=:/lib64:/usr/lib64 - LIBPATH_default=:/lib:/usr/lib - SHLIB_PATH_default=:/shlib:/usr/shlib:/lib:/usr/lib -nl=" -" -optimize=1 -occ=cc -one= -out= -case $( (set -f && set x * && echo $# && set +f) 2>/dev/null ) in -2) posix_noglob="set -f" posix_glob="set +f" ;; -*) case $( (set -F && set x * && echo $# && set +F) 2>/dev/null ) in - 2) posix_noglob="set -F" posix_glob="set +F" ;; - *) posix_noglob=":" posix_glob=":" ;; - esac - ;; -esac -puthdr= -putlib= -pragma= - -shell=posix -case $(eval 'PATH=/dev/null && let i=93-5 && typeset -u v=ksh$i && print -r - "$v"' 2>/dev/null) in -KSH88) shell=ksh ;; # also pdksh, mksh, zsh -esac - -reallystatic= -reallystatictest= -regress= -static=. -statictest= -case $COTEMP in -"") case $HOSTNAME in - ""|?|??|???|????|????) - tmp=${HOSTNAME} - ;; - *) tmp=${HOSTNAME%${HOSTNAME#????}} - ;; - esac - tmp=${tmp}$$ - ;; -*) tmp=x${COTEMP} - ;; -esac -COTEMP=${tmp} -export COTEMP -case $tmp in -./*) ;; -??????????*) - tmp=${tmp%${tmp#?????????}} - ;; -?????????) - ;; -????????) - tmp=F$tmp - ;; -esac -case $tmp in -./*) ;; -*) tmp=./$tmp ;; -esac -undef=0 -verbose=0 -vers= - -# options -- `-' for output to stdout otherwise usage - -case $1 in --) out=-; shift ;; -esac -set= - -case $( (getopts '[-][123:xyz]' opt --xyz; echo 0$opt) 2>/dev/null ) in -0123) USAGE=$' -[-? -@(#)$Id: iffe (ksh 93u+m) '${version}$' $ -] -[-author?Glenn Fowler ] -[-author?Phong Vo ] -[-copyright?(c) 1994-2012 AT&T Intellectual Property] -[-copyright?(c) 2020-2021 Contributors to https://github.com/ksh93/ksh] -[-license?http://www.eclipse.org/org/documents/epl-v10.html] -[+NAME?iffe - C compilation environment feature probe] -[+DESCRIPTION?\biffe\b is a command interpreter that probes the C - compilation environment for features. A feature is any file, option - or symbol that controls or is controlled by the C compiler. \biffe\b - tests features by generating and compiling C programs and observing - the behavior of the C compiler and generated programs.] -[+?\biffe\b statements are line oriented. Statements may appear in the - operand list with the \b:\b operand or \bnewline\b as the line - delimiter. The standard input is read if there are no command - line statements or if \afile\a\b.iffe\b is omitted.] -[+?Though similar in concept to \bautoconf\b(1) and \bconfig\b(1), there - are fundamental differences. The latter tend to generate global - headers accessed by all components in a package, whereas \biffe\b is - aimed at localized, self contained feature testing.] -[+?Output is generated in \bFEATURE/\b\atest\a by default, where \atest\a is - the base name of \afile\a\b.iffe\b or the \biffe\b \brun\b - file operand. Output is first generated in a temporary file; the - output file is updated if it does not exist or if the temporary file - is different. If the first operand is \b-\b then the output is written - to the standard output and no update checks are done.] -[+?Files with suffixes \b.iffe\b and \b.iff\b are assumed to contain - \biffe\b statements.] -[a:all?Define failed test macros \b0\b. By default only successful test macros - are defined \b1\b.] -[c:cc?Sets the C compiler name and flags to be used in the feature - tests.]:[C-compiler-name [C-compiler-flags ...]]] -[C:config?Generate \bconfig\b(1) style \aHAVE_\a* macro names. This implies - \b--undef\b. Since \bconfig\b(1) has inconsistent naming conventions, - the \bexp\b op may be needed to translate from the (consistent) - \biffe\b names. Unless otherwise noted a \bconfig\b macro name - is the \biffe\b macro name prefixed with \bHAVE\b and converted to - upper case. \b--config\b is set by default if the command arguments - contain a \brun\b op on an input file with the base name \bconfig\b.] -[d:debug?Sets the debug level. Level 0 inhibits most - error messages, level 1 shows compiler messages, and - level 2 traces internal \biffe\b \bsh\b(1) actions and does - not remove core dumps on exit.]#[level] -[D:define?Successful test macro definitions are emitted. This is the default.] -[E:explicit?Disable implicit test output.] -[F:features?Sets the feature test header to \ahdr\a. This header typically - defines *_SOURCE feature test macros.]:[hdr:=NONE] -[i:input?Sets the input file name to \afile\a, which - must contain \biffe\b statements.]:[file] -[I:include?Adds \b-I\b\adir\a to the C compiler flags.]:[dir] -[L:library?Adds \b-L\b\adir\a to the C compiler flags.]:[dir] -[n:name-value?Output \aname\a=\avalue\a assignments only.] -[N!:optimize?\b--nooptimize\b disables compiler optimization options.] -[o:output?Sets the output file name to \afile\a.]:[file] -[O:stdio?Sets the standard io header to \ahdr\a.]:[hdr:=stdio.h] -[e:package?Obsolete; ignored.] -[p:prototyped?Obsolete; ignored.] -[P:pragma?Emits \b#pragma\b \atext\a at the top of the output file.]:[text] -[r:regress?Massage output for regression testing.] -[s:shell?Sets the internal shell name to \aname\a. Used for debugging - Bourne shell compatibility (otherwise \biffe\b uses \aksh\a constructs - if available). The supported names are \bksh\b, \bbsh\b, \bbash\b, and - \bosh\b. \bosh\b forces the \bread -r\b compatibility read command to - be compiled and used instead of \bread -r\b. The default is determined - by probing the shell at startup.]:[name] -[S:static?Sets the C compiler flags that force static linking. If not set - then \biffe\b probes the compiler to determine the flags. \biffe\b - must use static linking (no dlls) because on some systems missing - library symbols are only detected when referenced at runtime from - dynamically linked executables.]:[flags] -[u:undef?\b#undef\b failed test macros. By default only successful test macros - are defined \b1\b.] -[v:verbose?Produce a message line on the standard error for each test as - it is performed.] -[x:cross?Some tests compile an executable (\ba.out\b) and then run it. - If the C compiler is a cross compiler and the executable format is - incompatible with the execution environment then the generated - executables must be run in a different environment, possibly on - another host. \acrosstype\a is the HOSTTYPE for generated executables - (the \bpackage\b(1) command generates a consistent HOSTTYPE namespace). - Generated executables are run via \bcrossexec\b(1) with \acrosstype\a - as the first argument. \bcrossexec\b supports remote execution for - cross-compiled executables. See \bcrossexec\b(1) for - details.]:[crosstype] -[X:exclude?Removes \b-I\b\adir\a and \b-I\b*/\adir\a C compiler flags.]:[dir] - -[ - ] [ file.iffe | statement [ : statement ... ] ] - -[+SYNTAX?\biffe\b input consists of a sequence of statement lines. Statements - that span more than one line contain \abegin\a\b{\b as the last - operand (where \abegin\a is command specific) and zero - or more data lines terminated by a line containing - \b}end\b as the first operand. The statement syntax is: - [\aname\a \b=\b]] [\b!\b]] \atest\a[,\atest\a...]] [\b-\b]] - [\aarg\a[,\aarg\a...]]]] [\aprereq\a ...]] - [\abegin\a{ ... |\bend\b ...]] [= [\adefault\a]]]]. - \atest\as and \aarg\as may be combined, separated by commas, to perform - a set of tests on a set of arguments. \aname\a \b=\b before \atest\a - overrides the default test variable and macro name, and \b-\b after - \atest\a performs the test but does not define the test variable and - macro values. \b!\b before \atest\a inverts the test sense for \bif\b, - \belif\b, and \byes{\b and \bno{\b blocks.] -[+?\aprereq\as are used when applying the features tests and may be - combinations of:]{ - [+compiler options?\b-D\b*, \b-L\b*, etc.] - [+library references?\b-l\b*, *\b.a\b, etc. \b_LIB_\b\aname\a - is defined to be 1 if \b-l\b\aname\a is a library.] - [+header references?*\b.h\b. \a_dir_name\a is defined to be 1 - if \adir/name\a\b.h\b is a header, or if \adir\a is - omitted, \b_hdr_\b\aname\a is defined to be 1 if - \aname\a\b.h\b is a header.] - [+-?Prereq grouping mark; prereqs before the first \b-\b are - passed to all feature tests. Subsequent groups - are attempted in left-to-right order until the first - successful group is found.] - } -[+?\abegin\a\b{\b ... \b}end\b delimit multiline code blocks that override - or augment the default code provided by \biffe\b. User supplied code - blocks should be compatible with the C89/C90 C language - standard for maximal portability. Test code may call the function - \bNOTE("...")\b to emit short text in \b--verbose\b output; only one - \bNOTE()\b should be called per test for readability. In addition to - all macro definitions generated by previous tests, all generated - code contains the following at the top:]{ - [+ ?/* AST backwards compatibility macros */] - [+ ?#define _NIL_(x) ((x)0)] - [+ ?#define _STD_ 1] - [+ ?#define _ARG_(x) x] - [+ ?#define _VOID_ void] - [+ ?#define _BEGIN_EXTERNS_] - [+ ?#define _END_EXTERNS_] - [+ ?/* if/when available, "$INSTALLROOT/src/lib/libast/FEATURE/standards" is included here */] - [+ ?/* then is included, unless this was disabled using the "stdio" option */] - } -[+?= \adefault\a may be specified for the \bkey\b, \blib\b, \bmac\b, \bmth\b - and \btyp\b tests. If the test fails for \aarg\a then - \b#define\b \aarg\a \adefault\a is emitted. \bkey\b accepts multiple - \b= \b\adefault\a values; the first valid one is used.] -[+?Each test statement generates a portion of a C language header that contains - macro definitions, comments, and other text corresponding to the feature - tests. \b#ifndef _def_\b\aname\a\b_\b\adirectory\a ... - \b#endif\b guards the generated header from multiple \b#include\bs, - where \aname\a is determined by either the \brun\b statement input file - name if any, or the first \atest\a in the first statement, and \adirectory\a - is the basename component of either the \brun\b statement file, if any, - or the current working directory. The output file name is determined - in this order:]{ - [+-?If the first command line operand is \b-\b then the output - is written to the standard output.] - [+--output=\afile\a?Output is \afile\a.] - [+set out \afile\a?Output is \afile\a.] - [+[run]] [\adirectory\a/]]\abase\a[\a.suffix\a]]?Output is - \bFEATURE/\b\abase\a.] - } -[+?Generated \biffe\b headers are often referenced in C source as: - \b#include "FEATURE/\b\afile\a". The \bnmake\b(1) base rules contain - metarules for generating \bFEATURE/\b\afile\a from - \bfeatures/\b\afile\a[\asuffix\a]], where \asuffix\a may be omitted, - \b.c\b, or \b.sh\b (see the \brun\b test below). Because - \b#include\b prerequisites are automatically detected, \bnmake\b(1) - ensures that all prerequisite \biffe\b headers are generated before - compilation. Note that the directories are deliberately named - \bFEATURE\b and \bfeatures\b to keep case-ignorant file systems - happy.] -[+?The feature tests are:]{ - [+# \acomment\a?Comment line - ignored.] - [+api \aname\a \aYYYYMMDD\a \asymbol ...\a?Emit API compatibility tests - for \aname\a and \b#define\b \asymbol\a \asymbol\a_\aYYYYMMDD\a - when \aNAME\a_API is >= \aYYYYMMDD\a (\aNAME\a is \aname\a - converted to upper case). If \aNAME\a_API is not defined - then \asymbol\a maps to the newest \aYYYYMMDD\a for \aname\a.] - [+define \aname\a [ (\aarg,...\a) ]] [ \avalue\a ]]?Emit a macro - \b#define\b for \aname\a if it is not already defined. The - definition is passed to subsequent tests.] - [+extern \aname\a \atype\a [ (\aarg,...\a) | [\adimension\a]] ]]?Emit - an \bextern\b prototype for \aname\a if one is not already - defined. The prototype is passed to subsequent tests.] - [+header \aheader\a?Emit \b#include <\b\aheader\a\b>\b if \aheader\a - exists. The \b#include\b is passed to subsequent tests.] - [+print \atext\a?Copy \atext\a to the output file. \atext\a is passed - to subsequent tests.] - [+reference \aheader\a?If \aheader\a exists then add \b#include\b - \aheader\a to subsequent tests.] - [+ver \aname\a \aYYYYMMDD\a?\b#define\b \aNAME\a_VERSION \aYYYYMMDD\a - (\aNAME\a is \aname\a converted to upper case).] - [+cmd \aname\a?Defines \b_cmd_\b\aname\a if \aname\a is an executable - in one of the standard system directories - (as output by \bgetconf PATH\b). - \b_\b\adirectory\a\b_\b\aname\a is defined for \adirectory\a - in which \aname\a is found (with \b/\b translated to \b_\b).] - [+dat \aname\a?Defines \b_dat_\b\aname\a if \aname\a is a data symbol - in the default libraries.] - [+def \aname\a?Equivalent to \bcmd,dat,hdr,key,lib,mth,sys,typ\b - \aname\a.] - [+dfn \aname\a?If \aname\a is a macro in the candidate headers then - a \b#define\b \aname\a \avalue\a statement is output for the - \avalue\a defined in the headers. The definition is \b#ifndef\b - guarded.] - [+exp \aname\a \aexpression\a?If \aexpression\a is a \"...\" string - then \aname\a is defined to be the string, else if the - \bexpr\b(1) evaluation of \aexpression\a is not 0 then \aname\a - is defined to be 1, otherwise \aname\a is defined to be 0. - Identifiers in \aexpression\a may be previously defined names - from other \biffe\b tests; undefined names evaluate to 0. - If \aname\a was defined in a previous successful test then - the current and subsequent \bexp\b test on \aname\a are - skipped. If \aname\a is \b-\b then the \aexpression\a is - simply evaluated.] - [+hdr \aname\a?Defines \b_hdr_\b\aname\a if the header - \b<\b\aname\a\b.h>\b exists. The \b--config\b macro name is - \bHAVE_\b\aNAME\a\b_H\b.] - [+if \astatement\a ... | \belif\b \astatement\a ... | \belse\b | \bendif\b? - Nested if-else test control.] - [+iff \aname\a?The generated header \b#ifndef-#endif\b macro guard is - \b_\b\aname\a\b_H\b.] - [+inc \afile\a [ re ]]?Read #define macro names from \afile\a - and arrange for those names to evaluate to 1 in \bexp\b - expressions. If \are\a is specified then macros not matching - \are\a are ignored.] - [+key \aname\a?Defines \b_key_\b\aname\a if \aname\a is a reserved - word (keyword).] - [+lcl \aname\a?Generates a \b#include\b statement for the native version - of the header \b<\b\aname\a\b.h>\b if it exists. Defines - \b_lcl_\b\aname\a on success. The \b--config\b macro name is - \bHAVE_\b\aNAME\a\b_H\b. The default \are\a is \b^HAVE_\b - for \b--config\b and \b^_\b otherwise.] - [+lib \aname\a?Defines \b_lib_\b\aname\a if \aname\a is an external - symbol in the default libraries.] - [+mac \aname\a?Defines \b_mac_\b\aname\a if \aname\a is a macro.] - [+mem \astruct.member\a?Defines \b_mem_\b\amember\a\b_\b\astruct\a - if \amember\a is a member of the structure \astruct\a.] - [+mth \aname\a?Defines \b_mth_\b\aname\a if \aname\a is an external - symbol in the math library.] - [+nop \aname\a?If this is the first test then \aname\a may be used - to name the output file and/or the output header guard macro. - Otherwise this test is ignored.] - [+npt \aname\a?Defines \b_npt_\b\aname\a if the \aname\a symbol - requires a prototype. The \b--config\b macro name is - \bHAVE_\aNAME\a\b_DECL\b with the opposite sense.] - [+num \aname\a?Defines \b_num_\b\aname\a if \aname\a is a numeric - constant \aenum\a or \amacro\a.] - [+nxt \aname\a?Defines a string macro \b_nxt_\b\aname\a suitable for - a \b#include\b statement to include the next (on the include - path) or native version of the header \b<\b\aname\a\b.h>\b - if it exists. Also defines the \"...\" form - \b_nxt_\b\aname\a\b_str\b. The \b--config\b macro name is - \bHAVE_\b\aNAME\a\b_NEXT\b.] - [+one \aheader\a ...?Generates a \b#include\b statement for the first - header found in the \aheader\a list.] - [+opt \aname\a?Defines \b_opt_\b\aname\a if \aname\a is a space-separated - token in the global environment variable \bPACKAGE_OPTIONS\b.] - [+pth \afile\a [ \adir\a ... | { \ag1\a - ... - \agn\a } | < \apkg\a [\aver\a ...]] > ]]?Defines - \b_pth_\b\afile\a, with embedded \b/\b chars translated to - \b_\b, to the path of the first instance of \afile\a in the - \adir\a directories. \b{\b ... \b}\b forms a directory list - from the cross-product of \b-\b separated directory groups - \ag1\a ... \agn\a. < ... > forms a directory list for the - package \apkg\a with optional versions. If no operands are - specified then the default PATH directories are used. The - \b--config\b macro name is \aNAME\a\b_PATH\b.] - [+run \afile\a?Runs the tests in \afile\a based on the \afile\a - suffix:]{ - [+.c?\afile\a is compiled and executed and the output is copied - to the \biffe\b output file. Macros and headers supplied - to \bbegin{\b ... \b}end\b are also supplied to - \afile\a.] - [+.sh?\afile\a is executed as a shell script and the output is - copied to the \biffe\b output file.] - [+.iffe \bor no suffix?\afile\a contains \biffe\b - statements.] - } - [+set \aoption value\a?Sets option values. The options are described - above.] - [+siz \aname\a?Defines \b_siz_\b\aname\a to be \bsizeof\b(\aname\a) if - \aname\a is a type in any of \b, , - , \b. Any \b.\b characters in \aname\a are - translated to space before testing and are translated to \b_\b - in the output macro name.] - [+sym \aname\a?Defines \b_ary_\b\aname\a if \aname\a is an array, - \b_fun_\b\aname\a if \aname\a is a function pointer, - \b_ptr_\b\aname\a if \aname\a is a pointer, or - \b_reg_\b\aname\a if \aname\a is a scalar. In most cases - \aname\a is part of a macro expansion.] - [+sys \aname\a?Defines \b_sys_\b\aname\a if the header - \b\b exists. The \b--config\b macro name is - \bHAVE_SYS_\b\aNAME\a\b_H\b.] - [+tst \aname\a?A user defined test on name. A source block must be - supplied. Defines \b_\b\aname\a on success. \btst - ...\b is - treated as \btst - - ...\b.] - [+typ \aname\a?Defines \b_typ_\b\aname\a if \aname\a is a type in any - of \b, , , \b. Any - \b.\b characters in \aname\a are translated to space before - testing and are translated to \b_\b in the output macro name.] - [+val \aname\a?The output of \becho\b \aname\a is written to the - output file.] - [+var \aname\a?A user defined test on name. A source block must be - supplied. Sets the \bexp\b variable \b_\b\aname\a on success - but does not define a macro.] - [+(\aexpression\a)?Equivalent to \bexp -\b \aexpression\a.] -} -[+?Code block names may be prefixed by \bno\b to invert the test sense. The - block names are:]{ - [+cat?The block is copied to the output file.] - [+compile?The block is compiled (\bcc -c\b).] - [+cross?The block is executed as a shell script using \bcrossexec\b(1) - if \b--cross\b is on, or on the local host otherwise, and the - output is copied to the output file. Test macros are not - exported to the script.] - [+execute?The block is compiled, linked, and executed. \b0\b exit - status means success.] - [+fail?If the test fails then the block text is evaluated by - \bsh\b(1) in \biffe\b'\'$'s current shell environment. - Changes in the shell state, such as variables, will survive the block. - Standard input is redirected to \b/dev/null\b. - Standard output is copied to the output file. - Standard error may be used to log informative or error messages. - The block may use \bexit\b to abort the \biffe\b run.] - [+link?The block is compiled and linked (\bcc -o\b).] - [+macro?The block is preprocessed (\bcc -E\b) and lines containing - text bracketed by \b<<"\b ... \b">>\b (\aless-than\a \aless-than\a - \adouble-quote\a ... \adouble-quote\a \agreater-than\a \agreater-than\a) - are copied to the output file with the brackets omitted.] - [+no?If the test fails then the block text is copied to the - output file. Deprecated: use { \bif\b \belif\b \belse\b - \bendif\b } with unnamed \b{\b ... \b}\b blocks.] - [+note?If the test succeeds then the block is copied to the output - as a \b/*\b ... \b*/\b comment.] - [+output?The block is compiled, linked, and executed, and the output - is copied to the output file.] - [+pass?If the test succeeds then the block text is evaluated by - \bsh\b(1) in the same manner as \bfail\b above.] - [+preprocess?The block is preprocessed (\bcc -E\b).] - [+run?The block is executed as a shell script and the output is - copied to the output file. Successful test macros are also - defined as shell variables with value \b1\b and are available - within the block. Likewise, failed test macros are defined - as shell variables with value \b0\b.] - [+status?The block is compiled, linked, and executed, and the exit - status is the test outcome, 0 for \afailure\a, the value - otherwise.] - [+yes?If the test succeeds then the block text is copied to the output - file. \byes{\b ... \b}end\b is equivalent to the unnamed block - \b{\b ... \b}\b. Deprecated: use { \bif\b \belif\b \belse\b - \bendif\b } with unnamed \b{\b ... \b}\b blocks.] -} -[+SEE ALSO?\bautoconf\b(1), \bconfig\b(1), \bgetconf\b(1), \bcrossexec\b(1), - \bnmake\b(1), \bpackage\b(1), \bsh\b(1)] -' - while getopts -a "$command" "$USAGE" OPT - do case $OPT in - a) set="$set set all :" ;; - c) set="$set set cc $OPTARG :" ;; - C) set="$set set config :" ;; - d) set="$set set debug $OPTARG :" ;; - D) set="$set set define :" ;; - E) set="$set set explicit :" ;; - F) set="$set set features $OPTARG :" ;; - i) set="$set set input $OPTARG :" ;; - I) set="$set set include $OPTARG :" ;; - L) set="$set set library $OPTARG :" ;; - n) set="$set set namval $OPTARG :" ;; - N) set="$set set nooptimize $OPTARG :" ;; - o) set="$set set output $OPTARG :" ;; - e) ;; # obsolete - p) ;; # obsolete - P) set="$set set pragma $OPTARG :" ;; - r) set="$set set regress :" ;; - s) set="$set set shell $OPTARG :" ;; - S) set="$set set static $OPTARG :" ;; - O) set="$set set stdio $OPTARG :" ;; - u) set="$set set undef :" ;; - v) set="$set set verbose :" ;; - x) set="$set set cross $OPTARG :" ;; - X) set="$set set exclude $OPTARG :" ;; - esac - done - shift $((OPTIND - 1)) - ;; -*) while : - do case $# in - 0) break ;; - esac - case $1 in - -) break - ;; - --) shift - break - ;; - --a|--al|--all) - REM=a - ;; - --cc=*) REM=c$(echo X$1 | sed 's,[^=]*=,,') - ;; - --co|--con|--conf|--confi|--config) - REM=C - ;; - --cr=*|--cro=*|--cros=*|--cross=*) - REM=x$(echo X$1 | sed -e 's,[^=]*=,,') - ;; - --d=*|--de=*|--deb=*|--debu=*|--debug=*) - REM=d$(echo X$1 | sed 's,[^=]*=,,') - ;; - --def|--defi|--defin|--define) - REM=D - ;; - --e=*|--ex=*|--exc=*|--excl=*|--exclu=*|--exclud=*|--exclude=*) - REM=X$(echo X$1 | sed 's,[^=]*=,,') - ;; - --e|--ex|--exp|--expl|--expli|--explic|--explici|--explicit) - REM=E - ;; - --f=*|--fe=*|--fea=*|--feat=*|--featu=*|--featur=*|--feature=*|--features=*) - REM=F$(echo X$1 | sed 's,[^=]*=,,') - ;; - --inp=*|--inpu=*|--input=*) - REM=i$(echo X$1 | sed 's,[^=]*=,,') - ;; - --inc=*|--incl=*|--inclu=*|--includ=*|--include=*) - REM=I$(echo X$1 | sed 's,[^=]*=,,') - ;; - --l=*|--li=*|--lib=*|--libr=*|--libra=*|--librar=*|--library=*) - REM=L$(echo X$1 | sed 's,[^=]*=,,') - ;; - --n|--na|--nam|--name|--name-v|--name-va|--name-val|--name-valu|--name-value) - REM=n - ;; - --o=*|--ou=*|--out=*|--outp=*|--outpu=*|--output=*) - REM=o$(echo X$1 | sed 's,[^=]*=,,') - ;; - --pa=*|--pac=*|--pack=*|--packa=*|--packag=*|--package=*) - # obsolete - ;; - --pro|--prot|--proto|--protot|--prototy|--prototyp|--prototype|--prototyped) - # obsolete - ;; - --pra=*|--prag=*|--pragma=*) - REM=P$(echo X$1 | sed 's,[^=]*=,,') - ;; - --r|--re|--reg|--regre|--regres|--regress) - REM=r - ;; - --sh=*|--she=*|--shel=*|--shell=*) - REM=s$(echo X$1 | sed 's,[^=]*=,,') - ;; - --sta=*|--stat=*|--stati=*|--static=*) - REM=S$(echo X$1 | sed 's,[^=]*=,,') - ;; - --std=*|--stdi=*|--stdio=*) - REM=O$(echo X$1 | sed 's,[^=]*=,,') - ;; - --u|--un|--und|--unde|--undef) - REM=u - ;; - --v|--ve|--ver|--verb|--verbo|--verbos|--verbose) - REM=v - ;; - --*) echo $command: $1: unknown option >&2 - exit 2 - ;; - -*) REM=$(echo X$1 | sed 's,X-,,') - ;; - *) break - ;; - esac - shift - while : - do case $REM in - '') break ;; - esac - eval $(echo $REM | sed "s,\(.\)\(.*\),OPT='\1' REM='\2',") - case $OPT in - [cdFiILoOePsSxX]) - case $REM in - '') case $# in - 0) echo $command: -$OPT: option argument expected >&2 - exit 1 - ;; - esac - OPTARG=$1 - shift - ;; - *) OPTARG=$REM - REM='' - ;; - esac - esac - case $OPT in - a) set="$set set all :" ;; - c) set="$set set cc $OPTARG :" ;; - C) set="$set set config :" ;; - d) set="$set set debug $OPTARG :" ;; - D) set="$set set define :" ;; - E) set="$set set explicit :" ;; - F) set="$set set features $OPTARG :" ;; - i) set="$set set input $OPTARG :" ;; - I) set="$set set include $OPTARG :" ;; - L) set="$set set library $OPTARG :" ;; - n) set="$set set namval $OPTARG :" ;; - N) set="$set set nooptimize $OPTARG :" ;; - o) set="$set set output $OPTARG :" ;; - e) ;; # obsolete - p) ;; # obsolete - P) set="$set set pragma $OPTARG :" ;; - r) set="$set set regress :" ;; - s) set="$set set shell $OPTARG :" ;; - S) set="$set set static $OPTARG :" ;; - O) set="$set set stdio $OPTARG :" ;; - u) set="$set set undef :" ;; - v) set="$set set verbose :" ;; - x) set="$set set cross $OPTARG :" ;; - X) set="$set set exclude $OPTARG :" ;; - *) echo "Usage: $command [-aCDEnpruv] [-c C-compiler-name [C-compiler-flags ...]] [-d level] - [-F features-header] [-i file] [-o file] [-O stdio-header] [-e name] [-P text] - [-s shell-path] [-S[flags]] [-x cross-exec-prefix] [-I dir] [-L dir] [-X dir] [ - ] - [ file.iffe | statement [ : statement ... ] ]" >&2 - exit 2 - ;; - esac - done - done - ;; -esac -case $1 in --) out=-; shift ;; -esac -case $# in -0) in=- ;; -esac -set -- $set "$@" -case " $* " in -*' set config '*|*' run config.'*|*' run '*' config.'*|*' run '*'/config.'*) - config=1 - ;; -esac - -# standard error to /dev/null unless debugging -# standard output to the current output file -# -# stdout original standard output -# stderr original standard error -# nullin /dev/null input -# nullout /dev/null output - -stdout=5 stderr=6 nullin=7 nullout=8 -eval "exec $nullin/dev/null $stdout>&1 $stderr>&2" -case " $* " in -*" set debug "[3456789]*) - ;; -*) eval "exec 2>&$nullout" - ;; -esac - -# prompt complications - -case $(print -n aha /dev/null) in -aha) show='print -n' SHOW='' ;; -*) case $(echo -n aha 2>/dev/null) in - -n*) show=echo SHOW='\c' ;; - *) show='echo -n' SHOW='' ;; - esac - ;; -esac - -# tmp files cleaned up on exit -# status: 0:success 1:failure 2:interrupt - -status=1 -case $debug in -2) core= - ;; -*) if (ulimit -c 0) >/dev/null 2>&1 - then ulimit -c 0 - core= - else core="core core.??*" - fi - ;; -esac -trap "rm -f $core $tmp*" 0 -if (:>$tmp.c) 2>/dev/null -then rm -f $tmp.c -else echo "$command: cannot create tmp files in current dir" >&2 - exit 1 -fi -status=2 - -# standard header for c source - -std='/* AST backwards compatibility macros */ -#define _NIL_(x) ((x)0) -#define _STD_ 1 -#define _ARG_(x) x -#define _VOID_ void -#define _BEGIN_EXTERNS_ -#define _END_EXTERNS_' -# To ensure the environment tested is the same as that used, add standards -# compliance macros as probed by libast as soon as they are available. -if test -f "${INSTALLROOT}/src/lib/libast/FEATURE/standards" -then std=${std}${nl}$(cat "${INSTALLROOT}/src/lib/libast/FEATURE/standards") -fi -tst= -ext="#include " - -# loop on op [ arg [ ... ] ] [ : op [ arg [ ... ] ] ] - -argx=0 -cur=. -can= -cansep= -cctest= -file= -hdrtest= -ifelse=NONE -ifstack= -ini= -init=1 -line=0 -nan= -while : -do case $in in - "") case $argx:$* in - 1:$argv);; - 1:*) argx=0 - set x $argv - shift - ;; - esac - ;; - *) case $ini in - '') if read lin - then line=$((line+1)) - $posix_noglob - set x $lin - $posix_glob - case $# in - 1) continue ;; - esac - else set x - fi - ;; - *) $posix_noglob - set x $ini - $posix_glob - ini= - ;; - esac - shift - case $init in - 1) case $1 in - iff) init=0 - ;; - print|ref|set) - ;; - *) init=0 - ini=$* - set ini - ;; - esac - esac - ;; - esac - case $# in - 0) case $ifstack in - ?*) echo "$command: $file$line: missing endif" >&$stderr - exit 1 - ;; - esac - set set out + - ;; - esac - - # if nesting - - while : - do case $1 in - "if") ifstack="$ifelse:$ifstack" - case $ifelse in - KEEP|NONE) - ifelse=TEST - ;; - TEST) ;; - *) ifelse=DONE - ;; - esac - shift - case $explicit in - 1) set '' - "$@"; shift ;; - esac - ;; - "elif") case $ifelse in - SKIP) ifelse=TEST - ;; - TEST) ;; - *) ifelse=DONE - ;; - NONE) echo "$command: $file$line: $1: no matching if" >&$stderr - exit 1 - ;; - esac - shift - case $explicit in - 1) set '' - "$@"; shift ;; - esac - ;; - "else") case $ifelse in - KEEP) ifelse=DONE - ;; - SKIP|TEST) - ifelse=KEEP - ;; - NONE) echo "$command: $file$line: $1: no matching if" >&$stderr - exit 1 - ;; - esac - shift - ;; - "endif")case $ifelse in - NONE) echo "$command: $file$line: $1: no matching if" >&$stderr - exit 1 - ;; - esac - case $shell in - ksh) ifelse=${ifstack%%:*} - ifstack=${ifstack#*:} - ;; - *) eval $(echo $ifstack | sed 's,\([^:]*\):\(.*\),ifelse=\1 ifstack=\2,') - ;; - esac - shift - ;; - *) break - ;; - esac - done - - # check if "run xxx" is equivalent to "set in xxx" - - case $1 in - "("*) set exp - "$@" ;; - *.iffe|*.iff) set run "$@" ;; - esac - case $1 in - :) shift - continue - ;; - run) case ${2##*[\\/]} in - *.iffe|*.iff) - set set in $2 ;; - *.*) ;; - *) set set in $2 ;; - esac - ;; - esac - - # { inc set } drop out early - - case $1 in - ""|"#"*)continue - ;; - inc) case $ifelse in - DONE|SKIP) set ''; shift; continue ;; - esac - shift - case $# in - 0) echo "$command: $file$line: path expected" >&$stderr - exit 1 - ;; - esac - p=$1 - shift - if test ! -f $p - then echo "$command: $file$line: $p: file not found" >&$stderr - exit 1 - fi - case $# in - 0) case $config in - 1) e="^HAVE_" ;; - *) e="^_" ;; - esac - ;; - 1) e=$1 - ;; - *) shift - echo "$command: $file$line: warning: $*: operands ignored" >&$stderr - ;; - esac - eval $(sed -e '/^#define[ ]/!d' -e 's/#define[ ]//' -e 's/[ (].*//' ${e:+"-e/$e/!d"} -e 's/.*/&=1/' $p | LC_ALL=C sort -u) - continue - ;; - set) case $ifelse in - DONE|SKIP) set ''; shift; continue ;; - esac - shift - case $1 in - ""|"#"*)op= - ;; - *) arg= - op=$1 - case $op in - --*) op=${op#--} - ;; - -*) case $op in - -??*) arg=${op#-?} - op=${op%$arg} - ;; - esac - case $op in - a) op=all ;; - c) op=cc ;; - C) op=config ;; - d) op=debug ;; - D) op=define ;; - E) op=explicit ;; - F) op=features ;; - i) op=input ;; - I) op=include ;; - L) op=library ;; - n) op=namval ;; - N) op=nooptimize ;; - o) op=output ;; - e) ;; # obsolete - p) ;; # obsolete - P) op=pragma ;; - r) op=regress ;; - s) op=shell ;; - S) op=static ;; - O) op=stdio ;; - u) op=undef ;; - v) op=verbose ;; - x) op=cross ;; - X) op=exclude ;; - esac - ;; - esac - shift - while : - do case $# in - 0) break ;; - esac - case $1 in - *" "*) shift - continue - ;; - ""|"#"*)break - ;; - :) shift - break - ;; - esac - case $arg in - "") arg=$1 ;; - *) arg="$arg $1" ;; - esac - shift - done - ;; - esac - case $op in - all) all=1 - continue - ;; - cc) occ= - for x in $arg - do case $occ in - "") case $x in - *=*) export "$x" - ;; - -O*) case $optimize in - 1) occ=$x ;; - esac - ;; - *) occ=$x - ;; - esac - ;; - *) occ="$occ $x" - ;; - esac - done - exclude occ - continue - ;; - config) config=1 - continue - ;; - cross) case $arg in - ""|-) cross= ;; - *) cross="$arg" libpaths= ;; - esac - continue - ;; - debug) debug=$arg - case $arg in - 0) exec 2>&$nullout - set - - show=echo - SHOW= - ;; - ""|1) exec 2>&$stderr - set - - show=echo - SHOW= - ;; - 2|3) exec 2>&$stderr - case $shell in - ksh) eval 'PS4="${PS4%+*([ ])}+\$LINENO+ "' - esac - show=echo - SHOW= - set -x - ;; - *) echo "$command: $arg: debug levels are 0, 1, 2, 3" >&$stderr - ;; - esac - continue - ;; - define) define=1 - continue - ;; - exclude)case $arg in - ""|-) excludes= ;; - *) excludes="$excludes $arg" ;; - esac - exclude includes occ - continue - ;; - explicit) - explicit=1 - continue - ;; - features)case $arg in - '') tst= ;; - *) tst="#include \"$arg\"" ;; - esac - continue - ;; - "in"|input) - case $arg in - "") in=- - ;; - *) in=$arg - if test ! -r $in - then echo "$command: $in: not found" >&$stderr - exit 1 - fi - exec < $in - file=$in: - case $out in - "") case $in in - *[.\\/]*) - out=${in##*[\\/]} - out=${out%.*} - ;; - *) out=$in - ;; - esac - ;; - esac - ;; - esac - continue - ;; - include)case $arg in - ""|-) includes= ;; - *) includes="$includes -I$arg" ;; - esac - exclude includes - continue - ;; - library)for y in $libpaths - do eval $y=\"\$$y:\$arg\$${y}_default\" - eval export $y - done - continue - ;; - namval) define=n - continue - ;; - nodebug)exec 2>&$nullout - set - - continue - ;; - nodefine) - define=0 - continue - ;; - nooptimize) - optimize=0 - case $occ in - *" -O"*)occ=$(echo $occ | sed 's/ -O[^ ]*//g') - cc=$occ - ;; - esac - ;; - optimize) - optimize=1 - ;; - out|output) - out=$arg - defhdr= - usr= - deflib= - one= - puthdr= - putlib= - case $op in - output) continue ;; - esac - def= - test= - ;; - package)# obsolete - continue - ;; - prototyped|noprototyped) - # obsolete - continue - ;; - pragma) pragma="$pragma $arg" - continue - ;; - regress)regress=1 - version=1995-03-19 - continue - ;; - shell) shell=$arg - continue - ;; - static) static=$arg - continue - ;; - stdio) case $arg in - '') ext= - ;; - *) ext= - sep= - for i in $arg - do case $i in - -) case $ext in - '') continue ;; - *) break ;; - esac - ;; - esac - echo "#include \"$i\"" > t.c - if $cc -E t.c > /dev/null 2>&1 - then ext="$ext$sep#include \"$arg\"" - sep=$nl - fi - done - ;; - esac - continue - ;; - undef) undef=1 - continue - ;; - verbose)verbose=1 - continue - ;; - *) echo "$command: $op: unknown option" >&$stderr - exit 1 - ;; - esac - ;; - api|define|extern|header|include|print|reference|ver) - op=$1 - shift - arg= - ;; - *) case $2 in - '=') def=$1 - shift - shift - ;; - *) case $1 in - '-'|'?')def=- - shift - ;; - *) def= - ;; - esac - ;; - esac - case $1 in - '!') not=1 - shift - ;; - *) not= - ;; - esac - case $1 in - *'{') op=- - ;; - '('*|'"'*'"'|'<'*'>') - op=exp - case $def in - '') def=- ;; - esac - ;; - *) op=$1 - shift - ;; - esac - arg= - cc="$occ $includes" - group= - groups= - fail= - hdr= - lib= - mac= - no= - note= - opt= - pass= - pth= - run= - set= - src= - test= - yes= - case $# in - 0) ;; - *) case $1 in - "#"*) set x - shift - ;; - *) case $op in - ref) ;; - *) case $1 in - '-') case $op:$2 in - tst:*) arg=$1 - case $2 in - -) shift ;; - esac - ;; - *:-*) arg=$1 - shift - ;; - *) def=- - shift - case $1 in - '('*|*'{'|'"'*'"'|'<'*'>') - arg=- - ;; - *) arg=$1 - case $# in - 0) ;; - *) shift ;; - esac - ;; - esac - ;; - esac - ;; - -*|+*|'('*|*'{'|'"'*'"'|'<'*'>') - arg=- - ;; - *) arg=$1 - shift - ;; - esac - ;; - esac - ;; - esac - case $1 in - '('*|'"'*'"'|'<'*'>') - while : - do case $# in - 0) break ;; - esac - case $1 in - *[.{}]*)break ;; - esac - case $test in - '') test=$1 ;; - *) test="$test $1" ;; - esac - shift - done - case $arg in - '') arg=- ;; - esac - case $op in - exp) case $def in - ''|'-') ;; - *) arg=$def ;; - esac - ;; - esac - ;; - esac - sline=$line - while : - do case $# in - 0) break ;; - esac - case $1 in - "") ;; - "#"*) set x - ;; - "=") shift - set=$* - case $set in - "") set=" " ;; - esac - while : - do case $# in - 0) break ;; - esac - shift - done - break - ;; - [abcdefghijklmnopqrstuvwxyz]*'{'|'{') - v=$1 - shift - x= - case $v in - "note{") - sep=" " ;; - *) sep=$nl ;; - esac - case $v in - '{') e='}' ;; - *) e='}end' ;; - esac - n=1 - SEP= - while : - do case $# in - 0) case $in in - "") echo "$command: $file$line: missing }end" >&$stderr - exit 1 - ;; - esac - while : - do IFS= read -r lin - eof=$? - while : - do lin="${lin#[' ']}" - case $lin in - [' ']*'#'*);; - *) break ;; - esac - done - case $eof in - 0) line=$((line+1)) - $posix_noglob - set x $lin - $posix_glob - case $2 in - $v) n=$((n+1)) - ;; - $e|$e';') - case $n in - 1) shift - break 2 - ;; - esac - n=$((n-1)) - ;; - esac - x="$x$SEP$lin" - SEP=$sep - ;; - *) echo "$command: $file$line: missing $e" >&$stderr - exit 1 - ;; - esac - done - ;; - esac - case $1 in - $v) n=$((n+1)) - ;; - $e|$e';') - case $n in - 1) break ;; - esac - n=$((n-1)) - ;; - esac - x="$x$SEP$1" - SEP=$sep - shift - done - case $v in - 'note{');; - *) x="$x$nl" # \r\n bash needs this barf # ;; - esac - case $v in - 'fail{') fail=$x ;; - 'nofail{') pass=$x v='pass{' ;; - 'nopass{') fail=$x v='fail{' ;; - 'no{') no=$x ;; - 'note{') note=$x ;; - 'pass{') pass=$x ;; - 'test{') test=$x ;; - 'yes{'|'{') yes=$x ;; - *) src=$x run=$v ;; - esac - ;; - :) shift - break - ;; - *[\"\'\(\)\{\}\ \ ]*) - case $op in - pth) pth="$pth $1" - ;; - *) case $test in - '') test=$1 ;; - *) test="$test $1" ;; - esac - ;; - esac - ;; - -) group=$group$1 - case $group in - -) com_hdr=$hdr - com_lib=$lib - com_mac=$mac - com_opt=$opt - com_pth=$pth - com_test=$test - ;; - *) groups="$groups $1" - ;; - esac - ;; - -l*) case $group in - --*) groups="$groups $1" ;; - *) lib="$lib $1" ;; - esac - ;; - +l*) x=-${1#+} - case $group in - --*) groups="$groups $x" ;; - *) lib="$lib $x" ;; - esac - ;; - -*|+*) case $op in - ref) cc="$cc $1" - occ="$occ $1" - case $1 in - -L*) case $shell in - ksh) x=${1#-L} ;; - *) x=$(echo x$1 | sed 's,^x-L,,') ;; - esac - for y in $libpaths - do eval $y=\"\$$y:\$x\$${y}_default\" - eval export $y - done - ;; - esac - ;; - *) case $group in - --*) groups="$groups $1" - ;; - *) case $op in - run) opt="$opt $1" - ;; - *) case $1 in - -D*) mac="$mac $1" ;; - *) cc="$cc $1" ;; - esac - ;; - esac - ;; - esac - ;; - esac - ;; - *.[aAxX]|*.[dD][lL][lL]|*.[lL][iI][bB]) - case $group in - --*) groups="$groups $1" ;; - *) lib="$lib $1" ;; - esac - ;; - *[.\\/]*) - case $group in - --*) groups="$groups $1" - ;; - *) case $op in - pth) pth="$pth $1" ;; - *) hdr="$hdr $1" ;; - esac - ;; - esac - ;; - *) case $group in - --*) groups="$groups $1" - ;; - *) case $op in - pth) pth="$pth $1" - ;; - *) case $test in - '') test=$1 ;; - *) test="$test $1" ;; - esac - ;; - esac - ;; - esac - ;; - esac - shift - done - case $group in - -) group= ;; - esac - ;; - esac - ;; - esac - case $ifelse in - DONE|SKIP) continue ;; - esac - - # make sure $cc compiles C - - case $cc in - "") cc="$occ $includes" ;; - esac - case $cctest in - "") checkcc ;; - esac - - # some ops allow no args - - case $arg in - '') case $op in - api) arg=- - case $1:$2 in - [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]*:[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]) - a=$1 - shift - case " $apis " in - *" $a "*) - ;; - *) apis="$apis $a" - eval api_sym_${a}= api_ver_${a}= - ;; - esac - rel= - while : - do case $# in - 0) break ;; - esac - case $1 in - [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]) - rel="$rel $1" - ;; - *) break - ;; - esac - shift - done - while : - do case $# in - 0) break ;; - esac - case $1 in - :) break ;; - esac - eval syms='$'api_sym_${a} - case $syms in - '') sep='' ;; - *) sep=$nl ;; - esac - for r in $rel - do syms=$syms$sep${1}:${r} - sep=$nl - done - eval api_sym_${a}='$'syms - shift - done - ;; - *) echo "$command: $op: expected: name YYYYMMDD symbol ..." >&$stderr - ;; - esac - while : - do case $# in - 0) break ;; - esac - case $1 in - :) break ;; - esac - shift - done - ;; - iff|ini)arg=- - ;; - comment)copy - "/* $* */" - continue - ;; - define) x=$1 - shift - case $1 in - '('*')') - arg=$1 - shift - ;; - esac - case $in in - "") v= - while : - do case $# in - 0) break ;; - esac - t=$1 - shift - case $t in - ":") break ;; - esac - v="$v $t" - done - ;; - *) v=$* - ;; - esac - is mac $x - copy $tmp.c "$std -$usr -#ifndef $x -( -#endif -int x; -" - if compile $cc -c $tmp.c <&$nullin >&$nullout - then success - - else failure - - copy - "#define $x$arg $v" - usr="$usr${nl}#define $x$arg $v" - fi - continue - ;; - extern) x=$1 - shift - t=$1 - shift - is npt $x - copy $tmp.c " -$std -#include -$usr -struct _iffe_struct { int _iffe_member; }; -extern struct _iffe_struct* $x (struct _iffe_struct*); -" - # some compilers with -O only warn for invalid intrinsic prototypes - case " $cc " in - *" -O "*) xx=$(echo $cc | sed 's/ -O / /g') ;; - *) xx=$cc ;; - esac - if compile $xx -c $tmp.c <&$nullin >&$nullout - then success - - while : - do case $1 in - ''|'('*|'['*) - break - ;; - esac - t="$t $1" - shift - done - case $in in - "") v= - while : - do case $# in - 0) break ;; - esac - t=$1 - shift - case $t in - ":") break ;; - esac - v="$v $t" - done - ;; - *) v=$* - ;; - esac - copy - "extern $t $x$v;" - usr="$usr${nl}extern $t $x$v;" - else failure - - case $in in - "") while : - do case $# in - 0) break ;; - esac - case $1 in - ":") break ;; - esac - done - ;; - esac - fi - continue - ;; - header|include|reference) - while : - do case $# in - 0) break ;; - esac - x=$1 - shift - case $x in - ":") break ;; - esac - case " $gothdr " in - *" - $x "*) - ;; - *" + $x "*) - case $usr in - *"# include <"$x">"*) - ;; - *) case $op in - reference) - ;; - *) copy - "#include <$x>" - ;; - esac - usr="$usr${nl}#include <$x>" - ;; - esac - ;; - *) copy $tmp.c "$std -$usr -#include <$x> -int x; -" - if is_hdr - $x - then gothdr="$gothdr + $x" - case $op in - reference) - ;; - *) copy - "#include <$x>" - ;; - esac - usr="$usr${nl}#include <$x>" - else gothdr="$gothdr - $x" - fi - ;; - esac - done - continue - ;; - print) case $in in - "") v= - while : - do case $# in - 0) break ;; - esac - t=$1 - shift - case $t in - ":") break ;; - esac - v="$v $t" - done - ;; - *) v=$* - ;; - esac - copy - "$*" - usr="$usr${nl}$v" - continue - ;; - ver) arg=- - case $1:$2 in - [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]*:[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]) - vers="$vers$nl$1" - eval ver_$1=$2 - ;; - *) echo "$command: $op: expected: name YYYYMMDD" >&$stderr - ;; - esac - while : - do case $# in - 0) break ;; - esac - case $1 in - :) break ;; - esac - shift - done - ;; - esac - ;; - esac - - # NOTE() support - - case $ext in - *""*) - case $ext in - *"#define NOTE("*) - ;; - *) ext="$ext -#define NOTE(s) do{write(9,\" \",1);write(9,s,strlen(s));write(9,\" ...\",4);}while(0)" - ;; - esac - ;; - esac - - # save $* for ancient shells - - argx=1 - argv=$* - - # loop on all candidate groups - - while : - do - # check the candidate macros - - cc="$cc $mac" - - # check for global default headers (some cc -E insist on compiling) - - case $hdrtest in - '') hdrtest=1 - allinc= - for x in types - do case $config in - 0) c=_sys_${x} - ;; - 1) case $shell in - ksh) typeset -u u=$x ;; - *) u=$(echo $x | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ) ;; - esac - c=HAVE_SYS_${u}_H - ;; - esac - x=sys/$x.h - echo "${allinc}#include <$x>" > $tmp.c - if is_hdr $x - then gothdr="$gothdr + $x" - case $explicit in - 0) can="$can$cansep#define $c 1 /* #include <$x> ok */" - nan="$nan$cansep$c=1" - cansep=$nl - ;; - esac - eval $c=1 - allinc="${allinc}#include <$x>$nl" - else gothdr="$gothdr - $x" - case $explicit$all$config$undef in - 0?1?|0??1) - can="$can$cansep#undef $c /* #include <$x> not ok */" - nan="$nan$cansep$c=" - cansep=$nl - ;; - 01??) can="$can$cansep#define $c 0 /* #include <$x> not ok */" - nan="$nan$cansep$c=0" - cansep=$nl - ;; - esac - fi - done - ;; - esac - - # add implicit headers/libraries before the checks - - case $op in - npt) hdr="sys/types.h stdlib.h unistd.h $hdr" - ;; - siz|typ)hdr="sys/types.h time.h sys/time.h sys/times.h stddef.h stdlib.h $hdr" - ;; - esac - - # check the candidate headers - - case $hdr in - ?*) z=$hdr - hdr= - dis=0 - for x in $z - do case $x in - *.h) case " $gothdr " in - *" - $x "*) - continue - ;; - *" + $x "*) - ;; - *) c=${x##*[\\/]} - c=${c%%.*} - case $x in - */*) c=${x%%[\\/]*}_${c} ;; - esac - case $explicit in - 0) dis=0 - ;; - *) case $x in - */*) dis=$c ;; - *) dis=hdr ;; - esac - case ${dis}_ in - ${op}_*)dis=0 ;; - *) dis=1 ;; - esac - ;; - esac - case $config in - 0) case $x in - */*) c=_${c} ;; - *) c=_hdr_${c} ;; - esac - ;; - 1) case $shell in - ksh) typeset -u u=$c ;; - *) u=$(echo $c | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ) ;; - esac - c=HAVE_${u}_H - ;; - esac - echo "${allinc}#include <$x>" > $tmp.c - if is_hdr $x - then gothdr="$gothdr + $x" - case $dis in - 0) can="$can$cansep#define $c 1 /* #include <$x> ok */" - nan="$nan$cansep$c=1" - cansep=$nl - ;; - esac - eval $c=1 - else gothdr="$gothdr - $x" - case $dis$all$config$undef in - 0?1?|0??1) - can="$can$cansep#undef $c /* #include <$x> not ok */" - nan="$nan$cansep$c=" - cansep=$nl - ;; - 01??) can="$can$cansep#define $c 0 /* #include <$x> not ok */" - nan="$nan$cansep$c=0" - cansep=$nl - ;; - esac - continue - fi - ;; - esac - ;; - *) test -r $x || continue - ;; - esac - hdr="$hdr $x" - done - ;; - esac - - # check the candidate libraries - - case $lib in - ?*) z= - for p in $lib - do z="$p $z" - done - lib= - p= - hit=0 - echo "int main(){return(0);}" > $tmp.c - for x in $z - do p=$x - case " $gotlib " in - *"- $p "*) - failure + - p= - ;; - *"+ $p "*) - success + - lib="$p $lib" - ;; - *) rm -f $tmp.exe - is LIB $p - if compile $cc -o $tmp.exe $tmp.c $p $lib <&$nullin >&$nullout - then success - gotlib="$gotlib + $p" - lib="$p $lib" - e=0 - else a= - e=1 - for l in $z - do case $l in - -) a= - continue - ;; - $p) a=$p - continue - ;; - *) case $gotlib in - *" $l "*) continue ;; - esac - ;; - esac - case $a in - $p) a="$a $l" - if compile $cc -o $tmp.exe $tmp.c $a <&$nullin >&$nullout - then success - gotlib="$gotlib + $p" - lib="$p $lib" - e=0 - break - fi - ;; - esac - done - case $e in - 1) failure - gotlib="$gotlib - $p" - ;; - esac - fi - y= - for x in $p - do c=${x#-l} - case $c in - *[!abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*) - c=$(echo '' $c | sed -e 's,.*[\\\\/],,' -e 's,\.[^.]*$,,' -e 's,[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_],_,g' -e '/^lib./s,^lib,,') - ;; - esac - case $config in - 0) case $e$p in - 0*' '*) case " $gotlib " in - *[-+]" $x "*) - ;; - *) can="$can$cansep#define _LIB_$c 1 /* $x is a library */" - nan="$nan${cansep}_LIB_$c=1" - cansep=$nl - eval _LIB_$c=1 - ;; - esac - ;; - esac - ;; - 1) case $shell in - ksh) typeset -u u=$c ;; - *) u=$(echo $c | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ) ;; - esac - c=$u - case $e in - 0*' '*) case " $gotlib " in - *[-+]" $x "*) - ;; - *) can="$can$cansep#define HAVE_${c}_LIB 1 /* $x is a library */" - nan="$nan${cansep}HAVE_${c}_LIB=1" - cansep=$nl - eval HAVE_${c}_LIB=1 - ;; - esac - ;; - esac - ;; - esac - y=${y}_$c - done - case $config in - 0) c=_LIB${y} ;; - 1) c=HAVE${y}_LIB ;; - esac - case $p in - *' '*) q="a library group" ;; - *) q="a library" ;; - esac - case $e in - 0) can="$can$cansep#define $c 1 /* $p is $q */" - nan="$nan$cansep$c=1" - cansep=$nl - eval $c=1 - case $hit in - 1) break ;; - esac - ;; - 1) case $all$config$undef in - ?1?|??1)can="$can$cansep#undef $c /* $p is not $q */" - nan="$nan$cansep$c=" - cansep=$nl - ;; - 1??) can="$can$cansep#define $c 0 /* $p is not $q */" - nan="$nan$cansep$c=0" - cansep=$nl - ;; - esac - eval $c=0 - ;; - esac - p= - ;; - esac - done - ;; - esac - - # last op precheck - - case $op in - ref) deflib="$deflib $lib" - defhdr="$defhdr $hdr" - break - ;; - esac - IFS=" ," - eval op=\"$op\" - eval arg=\"$arg\" - IFS=$ifs - - # check for op aliases - - x= - for o in $op - do case $o in - def|default) x="$x cmd dat hdr key lib mth sys typ" ;; - *) x="$x $o" ;; - esac - done - - # loop on the ops o and args a - - result=UNKNOWN - for o in $x - do for a in $arg - do c= - case $a in - *[.\\/]*) - case $o in - hdr|lcl|nxt|pth|sys) - x=$a - case $x in - *.lcl|*.nxt) - case $o in - sys) x=sys/$x ;; - esac - o=${x##*.} - x=${x%.${o}} - v=$x - ;; - esac - case $x in - *[\\/]*) - p=${x%/*} - v=${x##*/} - ;; - *.*) p=${x%.*} - v=${x##*.} - ;; - *) p= - ;; - esac - case $o in - lcl|nxt) c=$v.$o ;; - *) c=$v ;; - esac - ;; - *) p=${a%.*} - p=${p##*[\\/]} - v=${a##*.} - v=${v##*[\\/]} - ;; - esac - case $p in - '') f=${v} ;; - *) f=${p}/${v} ;; - esac - case $o in - run) v=$p - p= - m=_${v} - ;; - mem) case $p in - *.*) m=${p#*.} - p=${p%%.*} - v=${m}.${v} - esac - case $config in - 0) m=_${v}_${p} ;; - 1) m=_${v}_in_${p} ;; - esac - ;; - *) case $p in - '') m=_${v} ;; - *) m=_${p}_${v} ;; - esac - ;; - esac - ;; - *) p= - v=$a - f=$a - m=_${v} - ;; - esac - case $c in - '') c=$v ;; - esac - M=$m - case $o in - out) case $a in - -) a=- - ;; - ?*) test="$a $test" - a= - ;; - esac - ;; - *) case " $idyes " in - *" $m "*) - i=1 - ;; - *) case " $idno " in - *" $m "*) - i=0 - ;; - *) case $m in - *'*') m=$(echo "$m" | sed 's,\*,_ptr,g') ;; - esac - case $m in - *[-+/\\]*) - i=0 - ;; - *[!abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*) - is id $m - copy $tmp.c "int $m = 0;" - if compile $cc -c $tmp.c - then success - - idyes="$idyes $m" - i=1 - else failure - - idno="$idno $m" - i=0 - fi - ;; - *) i=1 - ;; - esac - ;; - esac - case $i in - 0) case $o in - dat|dfn|key|lib|mac|mth|nos|npt|siz|sym|typ|val) - continue - ;; - esac - ;; - esac - ;; - esac - ;; - esac - case $m in - *[!abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*) - m=$(echo "X$m" | sed -e 's,^.,,' -e 's,[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_],_,g') - ;; - esac - - # check output redirection - - case $out in - $cur) ;; - *) case $cur in - $a|$c) ;; - *) case $cur in - .) ;; - *) case $vers in - ?*) echo - for api in $vers - do API=$(echo $api | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ) - eval ver='${'ver_${api}'}' - echo "#define ${API}_VERSION ${ver}" - done - esac - case $apis in - ?*) for api in $apis - do API=$(echo $api | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ) - echo "#define ${API}API(rel) ( _BLD_${api} || !_API_${api} || _API_${api} >= rel )" - map= - sep= - eval syms='"${'api_sym_${api}'}"' - # old Solaris requires -k # - set x x $(echo "$syms" | sort -t: -u -k 1,1 -k 2,2nr 2>/dev/null | sed 's/:/ /') - case $# in - 2) # ancient sort doesn't have -k # - set x x $(echo "$syms" | sort -t: -u +0 -1 +1 -2nr 2>/dev/null | sed 's/:/ /') - ;; - esac - sym= - while : - do shift 2 - case $# in - [01]) break ;; - esac - prv=$sym - sym=$1 - rel=$2 - case $prv in - $sym) echo "#elif _API_${api} >= $rel" - ;; - *) case $prv in - '') echo - echo "#if !defined(_API_${api}) && defined(_API_DEFAULT)" - echo "#define _API_${api} _API_DEFAULT" - echo "#endif" - ;; - *) echo "#endif" - ;; - esac - echo - echo "#if ${API}API($rel)" - ;; - esac - echo "#undef ${sym}" - echo "#define ${sym} ${sym}_${rel}" - map=$map$sep${sym}_${rel} - sep=' ' - done - echo "#endif" - echo - echo "#define _API_${api}_MAP \"$map\"" - done - echo - ;; - esac - case $iff in - ?*) echo "#endif" ;; - esac - case $cur in - -) ;; - *) exec >/dev/null - case $cur in - *[\\/]*|*.h) x=$cur ;; - *) x=$dir/$cur ;; - esac - case $define in - n) sed '/^#/d' $tmp.h > $tmp.c - sed '/^#/d' $x > $tmp.t - ;; - *) sed 's,/\*[^/]*\*/, ,g' $tmp.h > $tmp.c - sed 's,/\*[^/]*\*/, ,g' $x > $tmp.t - ;; - esac - if cmp -s $tmp.c $tmp.t - then rm -f $tmp.h - case $verbose in - 1) echo "$command: $x: unchanged" >&$stderr ;; - esac - touch "$x" # avoid rerunning test on subsequent runs - else case $x in - ${dir}[\\/]$cur) test -d $dir || mkdir $dir || exit 1 ;; - esac - mv $tmp.h $x - fi - ;; - esac - ;; - esac - case $out in - +) case $status in - 1) ;; - *) status=0 ;; - esac - exit $status - ;; - -) eval "exec >&$stdout" - ;; - *) exec >$tmp.h - ;; - esac - case $out in - "") case $a in - *[\\/]*|???????????????*) cur=$c ;; - *) cur=$a ;; - esac - ;; - *) cur=$out - ;; - esac - case $in in - ""|-|+) case $o in - run) x=" from $a" ;; - *) x= ;; - esac - ;; - *) x=" from $in" - ;; - esac - - # output header comments - - case $define in - n) ;; - ?) echo "/* : : generated$x by $command version $version : : */" - for x in $pragma - do echo "#pragma $x" - done - case $out in - ""|-|+) x=$m - ;; - *.*) i=$out - x=_ - while : - do case $i in - *.*) x=$x${i%%.*}_ - i=${i#*.} - ;; - *) x=$x$i - break - ;; - esac - done - ;; - *) x=_$out - ;; - esac - case $o in - iff) case $M in - ""|*-*) ;; - *) iff=${m}_H ;; - esac - ;; - *) case $regress in - '') case $x in - *-*) ;; - *) x=$(pwd | sed -e 's,.*[\\\\/],,' -e 's,\\..*,,' -e 's,^lib,,' -e 's,^,'${x}_',' -e 's,[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_],_,g') - # ksh n+ bug workaround - case $x in - *[!_]*) ;; - *) x=_$$ ;; - esac - iff=_def${x} - ;; - esac - ;; - *) case $x in - *-*) ;; - *) iff=_REGRESS - ;; - esac - ;; - esac - ;; - esac - case $iff in - ?*) echo "#ifndef $iff" - echo "#define $iff 1" - ;; - esac - ;; - esac - ;; - esac - ;; - esac - case $can in - ?*) case $define in - 1) echo "$can" ;; - n) echo "$nan" ;; - esac - can= - nan= - cansep= - ;; - esac - - # set up the candidate include list - - pre= - inc= - for x in $defhdr - $hdr - do case $x in - -) case $pre in - ?*) continue ;; - esac - case $v in - *.*) for x in $(echo $v | sed 's,\\., ,g') - do pre="$pre$nl#undef $x" - done - ;; - *) case $o in - siz|typ)case $v in - char|short|int|long) - ;; - *) pre="#undef $v" - ;; - esac - ;; - *) pre="#undef $v" - ;; - esac - ;; - esac - ;; - *.h) c=${x##*[\\/]} - c=${c%%.*} - case $x in - */*) c=${x%%[\\/]*}_${c} ;; - esac - case $config in - 0) case $x in - */*) c=_${c} ;; - *) c=_hdr_${c} ;; - esac - ;; - 1) case $shell in - ksh) typeset -u u=$c ;; - *) u=$(echo "$c" | LC_ALL=C tr a-z A-Z) ;; - esac - c=HAVE_${u}_H - ;; - esac - case " $puthdr " in - *" $c "*) - ;; - *) puthdr="$puthdr $c" - usr="$usr$nl#define $c 1" - ;; - esac - inc="$inc$nl#include <$x>" - ;; - esac - done - - # set up the candidate lib list - - for x in $lib $deflib - do case $shell in - ksh) eval 'c=${x#-l}' ;; - *) c=$(echo X$x | sed 's,X-l,,') ;; - esac - case $c in - *[!abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*) - c=$(echo '' $c | sed -e 's,.*[\\\\/],,' -e 's,\.[^.]*$,,' -e 's,[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_],_,g' -e '/^lib./s,^lib,,') - ;; - esac - case $config in - 0) c=_LIB_${c} - ;; - 1) case $shell in - ksh) typeset -u u=$c ;; - *) u=$(echo $c | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ) ;; - esac - c=HAVE_${u}_LIB - ;; - esac - case " $putlib " in - *" $c "*) - ;; - *) putlib="$putlib $c" - usr="$usr$nl#define $c 1" - ;; - esac - done - - # src overrides builtin test - - case $config:$def in - 0:) case $o in - tst|var);; - *) m=_${o}${m} ;; - esac - ;; - 1:) case $o in - tst|var)m=${v} ;; - esac - case $shell in - ksh) typeset -u u=$m ;; - *) u=$(echo $m | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ) ;; - esac - case $o in - tst|var)case $m in - $u) ;; - *) case $m in - hdr_*|lib_*|sys_*) - case $shell in - ksh) u=${u#????} ;; - *) u=$(echo $u | sed 's/....//') ;; - esac - ;; - esac - m=HAVE_${u} - ;; - esac - ;; - dat) m=HAVE${u}_DATA ;; - hdr|lcl)m=HAVE${u}_H ;; - key) m=HAVE${u}_RESERVED ;; - mth) m=HAVE${u}_MATH ;; - npt) m=HAVE${u}_DECL ;; - pth) m=${u}_PATH - case $shell in - ksh) m=${m#_} ;; - *) m=$(echo $m | sed 's,^_,,') ;; - esac - ;; - nxt) m=HAVE${u}_NEXT ;; - siz) m=SIZEOF${u} ;; - sys) m=HAVE_SYS${u}_H ;; - *) m=HAVE${u} ;; - esac - ;; - *) m=$def - M=$m - ;; - esac - case $src in - ?*) case $src in - *[\<\"][Ss][Tt][Dd][Ii][Oo].[Hh][\"\>]* | *\* | *\* | */[*]\[*]/*) - EXT= - ;; - *) EXT="$tst -$ext" - ;; - esac - copy $tmp.c "$std -$EXT -$usr -$inc -$src -" - V=1 - e=0 - is tst "${note:-$run}" - case $run in - cat*|nocat*) - copy - "$src" - ;; - cross*|nocross*) - copy $tmp.sh "$src" - chmod +x $tmp.sh - execute $tmp.sh <&$nullin || e=1 - ;; - run*|norun*) - (eval "$src") <&$nullin || e=1 - ;; - mac*|nomac*) - if compile $cc -E -P $tmp.c <&$nullin >$tmp.i - then sed -e '/<<[ ]*".*"[ ]*>>/!d' -e 's/<<[ ]*"//g' -e 's/"[ ]*>>//g' $tmp.i - else e=1 - fi - ;; - p*|nop*)compile $cc -DTEST=$p -DID=$v -E $tmp.c <&$nullin >&$nullout || e=1 - ;; - c*|noc*)compile $cc -DTEST=$p -DID=$v -c $tmp.c <&$nullin >&$nullout || e=1 - ;; - *) case $run in - status*)ccflags= - ;; - s*|nos*)case $reallystatictest in - '') #UNDENT... - - reallystatictest=. - echo "$tst$nl$ext${nl}int main(){printf("hello");return(0);}" > ${tmp}s.c - rm -f ${tmp}s.exe - if compile $cc -c ${tmp}s.c <&$nullin >&$nullout && - compile $cc -o ${tmp}s.exe ${tmp}s.o <&$nullin >&$nullout 2>${tmp}s.e && - $executable ${tmp}s.exe - then e=$(wc -l ${tmp}s.e) - eval set x x $binding - while : - do shift - shift - case $# in - 0) break ;; - esac - rm -f ${tmp}s.exe - compile $cc -o ${tmp}s.exe $1 ${tmp}s.o <&$nullin >&$nullout 2>${tmp}s.e && $executable ${tmp}s.exe || continue - case $(wc -l ${tmp}s.e) in - $e) ;; - *) continue ;; - esac - d=$(ls -s ${tmp}s.exe) - rm -f ${tmp}s.exe - compile $cc -o ${tmp}s.exe $2 ${tmp}s.o <&$nullin >&$nullout 2>${tmp}s.e && $executable ${tmp}s.exe || continue - case $(wc -l ${tmp}s.e) in - $e) ;; - *) continue ;; - esac - case $(ls -s ${tmp}s.exe) in - $d) ;; - *) reallystatic=$2 - set x - shift - break - ;; - esac - done - fi - rm -f ${tmp}s.* - #...INDENT - ;; - esac - ccflags=$reallystatic - ;; - *) ccflags= - ;; - esac - set x $mac - e=1 - while : - do o= - shift - while : - do case $# in - 0) break ;; - esac - case $1 in - -) break ;; - esac - o="$o $1" - shift - done - rm -f $tmp.exe - if compile $cc $ccflags $o -DTEST=$p -DID=$v -o $tmp.exe $tmp.c $lib $deflib <&$nullin >&$nullout && $executable $tmp.exe - then case $run in - - status*)execute $tmp.exe <&$nullin >&$nullout - V=$? - case $V in - 0) e=1 ;; - *) e=0 ;; - esac - break - ;; - no[ls]*);; - [ls]*) e=0 && break ;; - noo*) execute $tmp.exe <&$nullin >$tmp.out || break ;; - o*) execute $tmp.exe <&$nullin >$tmp.out && e=0 && break ;; - no*) execute $tmp.exe <&$nullin >&$nullout || break ;; - *) execute $tmp.exe <&$nullin >&$nullout && e=0 && break ;; - - esac - else case $run in - no[els]*)e=1 && break ;; - esac - fi - case $# in - 0) case $run in - no*) e=0 ;; - esac - break - ;; - esac - done - ;; - esac - o=1 - case $run in - no*) case $e in - 0) e=1 ;; - *) e=0 ;; - esac - ;; - esac - case $run in - o*|noo*)case $e in - 0) cat $tmp.out ;; - esac - rm -f $tmp.out - ;; - esac - report $e $V "${note:-$run\ passed}" "${note:-$run} failed" - continue - ;; - esac - - # initialize common builtin state - - case $o in - dat|lib|mth|run) - case $statictest in - "") statictest=FoobaR - copy $tmp.c " -$tst -$ext -$std -$usr -extern int $statictest; -int main(){char* i = (char*)&$statictest; return ((unsigned int)i)^0xaaaa;} -" - rm -f $tmp.exe - if compile $cc -o $tmp.exe $tmp.c <&$nullin >&$nullout && $executable $tmp.exe - then case $static in - .) static= - copy $tmp.c " -$tst -$ext -int main(){printf("hello");return(0);} -" - rm -f $tmp.exe - if compile $cc -c $tmp.c <&$nullin >&$nullout && - compile $cc -o $tmp.exe $tmp.o <&$nullin >&$nullout && - $executable $tmp.exe - then e=$(wc -l $tmp.e) - eval set x x $binding - while : - do shift - shift - case $# in - 0) break ;; - esac - rm -f $tmp.exe - compile $cc -o $tmp.exe $1 $tmp.o <&$nullin >&$nullout && $executable $tmp.exe || continue - case $(wc -l $tmp.e) in - $e) ;; - *) continue ;; - esac - d=$(ls -s $tmp.exe) - rm -f $tmp.exe - compile $cc -o $tmp.exe $2 $tmp.o <&$nullin >&$nullout && $executable $tmp.exe || continue - case $(wc -l $tmp.e) in - $e) ;; - *) continue ;; - esac - case $(ls -s $tmp.exe) in - $d) ;; - *) static=$2 - set x - shift - break - ;; - esac - done - fi - ;; - esac - else static= - fi - ;; - esac - ;; - esac - - # builtin tests - - case $o in - api) ;; - cmd) case $p in - ?*) continue ;; - esac - is $o $a - k=1 - pkg $pth # set system default path - for d in $pth - do if test -f "$d/$a" - then s=$(echo "$d" | LC_ALL=C sed 's,[^0-9A-Za-z],_,g') - case $k in - 1) k=0 - case $M in - *-*) ;; - *) usr="$usr$nl#define $m 1" - case $define in - 1) echo "#define $m 1 /* $a in $pth */" ;; - n) echo "$m=1" ;; - esac - ;; - esac - ;; - esac - c=${s}_${v} - usr="$usr$nl#define $c 1" - case $define in - 1) echo "#define $c 1 /* $d/$a found */" ;; - n) echo "$c=1" ;; - esac - fi - done - case $k in - 0) success ;; - 1) failure ;; - esac - ;; - dat) case $p in - ?*) continue ;; - esac - { - copy - " -$tst -$ext -$std -$usr -$pre -" - case $inc in - ?*) echo "$inc" - ;; - *) echo "extern int $v;" - ;; - esac - echo " -#ifdef _DLL -#define _REF_ -#else -#define _REF_ & -#endif -int main(){char* i = (char*) _REF_ $v; return ((unsigned int)i)^0xaaaa;}" - } > $tmp.c - is $o $v - rm -f $tmp.exe - compile $cc -c $tmp.c <&$nullin >&$nullout && - compile $cc $static -o $tmp.exe $tmp.o $lib $deflib <&$nullin >&$nullout && - $executable $tmp.exe - report $? 1 "$v in default lib(s)" "$v not in default lib(s)" - ;; - dfn) case $p in - ?*) continue ;; - esac - is dfn $v - echo "$pre -$tst -$ext -$inc -#ifdef $v -<<\"#ifndef $v\">> -<<\"#define $v\">> $v <<\"/* native $v */\">> -<<\"#endif\">> -#endif" > $tmp.c - if compile $cc -E -P $tmp.c <&$nullin >$tmp.i - then sed -e '/<<[ ]*".*"[ ]*>>/!d' -e 's/<<[ ]*"//g' -e 's/"[ ]*>>//g' $tmp.i > $tmp.t - if test -s $tmp.t - then success - cat $tmp.t - else failure - fi - else failure - fi - ;; - exp) case $test in - '') echo "$command: $file$sline: test expression expected for $o" >&$stderr - exit 1 - ;; - esac - case $a in - -|'') ;; - *) eval x='$'$a - case $x in - 1) result=FAILURE - continue - ;; - esac - ;; - esac - case $test in - [01]|'"'*'"'|'<'*'>') - case $a in - -|'') ;; - *) case $define$note in - 1) echo "#define $a $test" ;; - 1*) echo "#define $a $test /* $note */" ;; - n) echo "$a=$test" ;; - esac - eval $a='$test' - ;; - esac - ;; - *) case $note in - '') note=$test ;; - esac - case $test in - '') c=1 - ;; - *) is exp "$note" - x= - for i in $(echo '' $test | sed 's,[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_], & ,g') - do case $i in - [\ \ ]) - ;; - [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_]*) - eval i='${'$i'}' - case $i in - '') i=0 - ;; - '"'*'"');; - *[!-+0123456789]*) - case $i in - *'"'*) i=1 ;; - *) i='"'$i'"' ;; - esac - ;; - esac - x="$x $i" - ;; - '!') x="$x 0 =" - ;; - '&'|'|')case $x in - *"$i") ;; - *) x="$x \\$i" ;; - esac - ;; - *) x="$x \\$i" - ;; - esac - done - c=$(eval expr $x 2>&$stderr) - ;; - esac - case $c in - 0) c=1 ;; - *) c=0 ;; - esac - M=$a - m=$a - report $c 1 "$note is true" "$note is false" - ;; - esac - ;; - hdr|lcl|nxt|sys) - case $o in - lcl|nxt)case $M in - *-*) continue ;; - esac - eval x='$'_$m - case $x in - ?*) continue ;; - esac - eval _$m=1 - is $o $f - echo "$pre -$tst -$ext -$inc -#include <$f.h>" > $tmp.c - case $f in - sys/*) e= ;; - *) e='-e /[\\\\\/]sys[\\\\\/]'$f'\\.h"/d' ;; - esac - if compile $cc -E $tmp.c <&$nullin >$tmp.i - then i=$(sed -e '/^#[line ]*[0123456789][0123456789]*[ ][ ]*"[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:]*[\\\\\/].*[\\\\\/]'$f'\\.h"/!d' $e -e s'/.*"\\(.*\\)".*/\\1/' -e 's,\\\\,/,g' -e 's,///*,/,g' $tmp.i | sed 1q) - case $i in - [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]:[\\/]*) - ;; - */*/*) k=$(echo "$i" | sed 's,.*/\([^/]*/[^/]*\)$,../\1,') - echo "$pre -$tst -$ext -$inc -#include <$k>" > $tmp.c - if compile $cc -E $tmp.c <&$nullin >$tmp.i - then j=$(sed -e '/^#[line ]*[0123456789][0123456789]*[ ][ ]*"[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:]*[\\\\\/].*[\\\\\/]'$f'\\.h"/!d' $e -e s'/.*"\\(.*\\)".*/\\1/' -e 's,\\\\,/,g' -e 's,///*,/,g' $tmp.i | sed 1q) - wi=$(wc < "$i") - wj=$(wc < "$j") - case $wi in - $wj) i=$k ;; - esac - fi - ;; - *) echo "$pre -$tst -$ext -$inc -#include <../include/$f.h>" > $tmp.c - if compile $cc -E $tmp.c <&$nullin >&$nullout - then i=../include/$f.h - fi - ;; - esac - else i= - fi - case $i in - [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]:[\\/]*|[\\/]*) - success - case $o in - lcl) echo "#if defined(__STDPP__directive)" - echo "__STDPP__directive pragma pp:hosted" - echo "#endif" - echo "#include <$i> /* the native <$f.h> */" - echo "#undef $m" - usr="$usr$nl#define $m 1" - echo "#define $m 1" - ;; - nxt) echo "#define $m <$i> /* include path for the native <$f.h> */" - echo "#define ${m}_str \"$i\" /* include string for the native <$f.h> */" - usr="$usr$nl#define $m <$i>$nl#define ${m}_str \"$i\"" - eval $m=\\\<$i\\\> - ;; - esac - break - ;; - ../*/*) success - case $o in - lcl) echo "#include <$i> /* the native <$f.h> */" - echo "#undef $m" - usr="$usr$nl#define $m 1" - echo "#define $m 1" - eval $m=1 - ;; - nxt) echo "#define $m <$i> /* include path for the native <$f.h> */" - echo "#define ${m}_str \"$i\" /* include string for the native <$f.h> */" - usr="$usr$nl#define $m <$i>$nl#define ${m}_str \"$i\"" - eval $m=\\\<$i\\\> - ;; - esac - break - ;; - *) failure - case $o in - lcl) case $all$config$undef in - ?1?|??1)echo "#undef $m /* no native <$f.h> */" ;; - 1??) echo "#define $m 0 /* no native <$f.h> */" ;; - esac - eval $m=0 - ;; - nxt) case $all$config$undef in - ?1?|??1)echo "#undef $m /* no include path for the native <$f.h> */" ;; - esac - ;; - esac - ;; - esac - ;; - *) case $o in - hdr) x=$f.h ;; - sys) x=sys/$f.h ;; - esac - case " $gothdr " in - *" - $x "*) - failure + - ;; - *" + $x "*) - success + - ;; - *) echo " -$tst -$ext -$allinc -$inc -#include <$x>" > $tmp.c - if is_hdr $x - then gothdr="$gothdr + $x" - case $M in - *-*) ;; - *) case " $puthdr " in - *" $m "*) - ;; - *) puthdr="$puthdr $m" - usr="$usr$nl#define $m 1" - ;; - esac - case $define in - 1) echo "#define $m 1 /* #include <$x> ok */" ;; - n) echo "$m=1" ;; - esac - eval $m=1 - ;; - esac - else gothdr="$gothdr - $x" - case $M in - *-*) ;; - *) case $define$all$config$undef in - 1?1?|1??1)echo "#undef $m /* #include <$x> not ok */" ;; - 11??) echo "#define $m 0 /* #include <$x> not ok */" ;; - n1?1) echo "$m=" ;; - n1??) echo "$m=0" ;; - esac - eval $m=0 - ;; - esac - fi - ;; - esac - continue - ;; - esac - ;; - iff) ;; - ini) ;; - key) case $p in - ?*) continue ;; - esac - w=$v - while : - do is $o $w - echo "$pre -$tst -$ext -int f(){int $w = 1;return($w);}" > $tmp.c - if compile $cc -c $tmp.c <&$nullin >&$nullout - then failure - case $set in - *" ="|*" = "*) - set x $set - shift - w= - while : - do case $# in - 0) break ;; - esac - case $1 in - =) break ;; - esac - case $w in - '') w=$1 ;; - *) w="$w $1" ;; - esac - shift - done - case $1 in - =) shift - case $# in - 0) set=" " ;; - *) set=$* ;; - esac - ;; - *) set= - ;; - esac - case $shell in - ksh) typeset -u u=$w ;; - *) u=$(echo $w | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ) ;; - esac - u=_$u - M=$w - case $M in - *[!abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*) - M=$(echo "X$m" | sed -e 's,^.,,' -e 's,[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_],_,g') - ;; - esac - case $config in - 1) m=HAVE${u}_RESERVED ;; - *) m=_key_${w} ;; - esac - continue - ;; - esac - report - 1 - - "$w is not a reserved keyword" "default for reserved keyword $v" - else report 0 1 "$w is a reserved keyword" - - case $M in - *-*) ;; - *) case $define$w in - 1$v) ;; - 1*) echo "#define $v $w /* alternate for reserved keyword $v */" ;; - n*) echo "$v=$w" ;; - esac - ;; - esac - fi - break - done - ;; - lib|mth)case $p in - ?*) continue ;; - esac - case $v in - -) continue ;; - esac - is $o $v - copy $tmp.c " -$tst -$ext -$std -$usr -$pre -$inc -#ifdef _IFFE_type -$v i; -#else -typedef int (*_IFFE_fun)(); -#ifdef _IFFE_extern -extern int $v(); -#endif -static _IFFE_fun i=(_IFFE_fun)$v;int main(){return ((unsigned int)i)^0xaaaa;} -#endif -" - d=-D_IFFE_extern - if compile $cc -c $tmp.c <&$nullin >&$nullout - then d= - elif compile $cc $d -c $tmp.c <&$nullin >&$nullout - then : - else d=error - fi - if test error != "$d" - then rm -f $tmp.exe - if compile $cc $d $static -o $tmp.exe $tmp.o $lib $deflib <&$nullin >&$nullout && - $executable $tmp.exe - then case $o in - lib) c=0 ;; - *) c=1 ;; - esac - report $c 1 "$v() in default lib(s)" "$v() not in default lib(s)" "default for function $v()" - else case $o in - mth) rm -f $tmp.exe - compile $cc $d $static -o $tmp.exe $tmp.o -lm <&$nullin >&$nullout && - $executable $tmp.exe - report $? 1 "$v() in math lib" "$v() not in math lib" "default for function $v()" - ;; - *) report 1 1 - "$v() not in default lib(s)" "default for function $v()" - ;; - esac - fi - else if compile $cc -D_IFFE_type -c $tmp.c <&$nullin >&$nullout - then c=1 - else case $intrinsic in - '') copy $tmp.c " -$tst -$ext -$std -$usr -$pre -$inc -extern int foo(); -static int ((*i)())=foo;int main(){return(i==0);} -" - compile $cc -c $tmp.c <&$nullin >&$nullout - intrinsic=$? - ;; - esac - c=$intrinsic - fi - case $o in - mth) report $c 1 "$v() in math lib" "$v() not in math lib" "default for function $v()" ;; - *) report $c 1 "$v() in default lib(s)" "$v() not in default lib(s)" "default for function $v()" ;; - esac - fi - ;; - mac) case $p in - ?*) continue ;; - esac - is mac $v - echo " -$tst -$ext -$pre -$inc -#ifdef $v -'$m:$v' -#endif" > $tmp.c - compile $cc -E $tmp.c <&$nullin | grep -c "'$m:$v'" >&$nullout - report $? 1 "$v is a macro" "$v is not a macro" "default for macro $v" - ;; - mem) case $p in - ?*) eval i='$'_iffe_typedef_$p - case $i in - 0|1) ;; - *) echo "$pre -$tst -$ext -$inc -static $p i; -int n = sizeof(i);" > $tmp.c - is typ $p - if compile $cc -c $tmp.c <&$nullin >&$nullout - then success - - eval _iffe_typedef_$p=1 - i=1 - else failure - - eval _iffe_typedef_$p=0 - i=0 - fi - ;; - esac - case $i in - 0) i="$v is not a member of $p" p="struct $p" ;; - *) i=- ;; - esac - is mem $v "$p" - echo "$pre -$tst -$ext -$inc -static $p i; -int n = sizeof(i.$v);" > $tmp.c - compile $cc -c $tmp.c <&$nullin >&$nullout - report $? 1 "$v is a member of $p" "$i" - ;; - *) p=$v - eval i='$'_iffe_typedef_$p - case $i in - 0|1) ;; - *) echo "$pre -$tst -$ext -$inc -static $p i; -int n = sizeof(i);" > $tmp.c - is typ $p - if compile $cc -c $tmp.c <&$nullin >&$nullout - then success - - eval _iffe_typedef_$p=1 - i=1 - else failure - - eval _iffe_typedef_$p=0 - i=0 - fi - ;; - esac - case $i in - 0) i="$p is not a non-opaque struct" p="struct $p" ;; - *) i=- ;; - esac - is nos "$p" - echo "$pre -$tst -$ext -$inc -static $p i; -int n = sizeof(i);" > $tmp.c - if compile $cc -c $tmp.c <&$nullin >&$nullout - then echo "$pre -$tst -$ext -$inc -static $p i; -unsigned long f() { return (unsigned long)i; }" > $tmp.c - if compile $cc -c $tmp.c <&$nullin >&$nullout - then c=1 - else c=0 - fi - else c=1 - fi - report $c 1 "$p is a non-opaque struct" "$i" - esac - ;; - nop) ;; - npt) is npt $v - copy $tmp.c " -$tst -$ext -$std -$usr -$pre -$inc -struct _iffe_struct { int _iffe_member; }; -extern struct _iffe_struct* $v(struct _iffe_struct*); -" - # some compilers with -O only warn for invalid intrinsic prototypes - case " $cc " in - *" -O "*) xx=$(echo $cc | sed 's/ -O / /g') ;; - *) xx=$cc ;; - esac - compile $xx -c $tmp.c <&$nullin >&$nullout - report -$config $? 1 "$v() needs a prototype" "$v() does not need a prototype" - ;; - num) is num $v - copy $tmp.c " -$tst -$ext -$std -$usr -$pre -$inc -int _iffe_int = $v / 2; -" - compile $cc -c $tmp.c <&$nullin >&$nullout - report $? 1 "$v is a numeric constant" "$v is not a numeric constant" - ;; - one) for i in $a $hdr - do x="#include <$i>" - case " $gothdr " in - *" - $i "*) - continue - ;; - *" + $i "*) - ;; - *) echo "$x" > $tmp.c - if is_hdr $x - then gothdr="$gothdr + $x" - else gothdr="$gothdr - $x" - continue - fi - ;; - esac - case $one in - "") one=$x - ;; - *"$x"*) break - ;; - *) echo "$one" > $tmp.c - if compile $cc -E $tmp.c <&$nullin >$tmp.i - then c=$i - case $c in - *[\\/]*) c=$(echo $c | sed 's,[\\\\/],[\\\\/],g') ;; - esac - case $(sed -e '/^#[line ]*1[ ][ ]*"[\\\\\/].*[\\\\\/]'$c'"/!d' $tmp.i) in - ?*) break ;; - esac - fi - one="$one$nl$x" - ;; - esac - echo "$x" - break - done - ;; - opt) M=$m - is opt $a - case " $PACKAGE_OPTIONS " in - *" $a "*) c=0 ;; - *) c=1 ;; - esac - report $c 1 "$a is set in \$PACKAGE_OPTIONS" "$a is not set in \$PACKAGE_OPTIONS" - ;; - out|output) - ;; - pth) is pth $a - pkg $pth - tab=" " - e= - f= - for i in $pth - do case $i in - '{') e="${nl}}" - l= - x=i - v="\$${x}" - t=${nl}${tab} - b="fnd()${nl}{${t}for ${x} in" - ;; - '}') b="${b}${t}do${tab}if $exists ${v}/\${1}${t}${tab}${tab}then${tab}f=${v}/\${1}${t}${tab}${tab}${tab}return${t}${tab}${tab}fi" - e="${t}done${e}" - eval "${b}${e}" - fnd $a - case $f in - ?*) break ;; - esac - ;; - -) b="${b}${t}do${tab}test \"${v}\" = '' -o -d \"${v}\" &&${t}${tab}${tab}" - x=${x}i - v="${v}\$${x}" - b="${b}for ${x} in" - e="${t}done${e}" - t="${t}${tab}${tab}" - ;; - *) case $e in - '') if $exists ${i}/${a} - then f=${i}/${a} - break - fi - ;; - *) case $i in - /|.) b="${b} ''" ;; - *) b="${b} /${i}" ;; - esac - ;; - esac - ;; - esac - done - case $f in - '') case $set in - ' ') f=$a ;; - ?*) f=$set ;; - esac - ;; - esac - case $f in - '') c=1 - ;; - *) c=0 - f="\"$f\"" - ;; - esac - report $c "$f" "${note:-$a path}" "$a path not found" - ;; - run) is run $a - if test ! -r $a - then failure not found - case $verbose in - 0) echo "$command: $file$line: $a: not found" >&$stderr ;; - esac - exit 1 - fi - noisy - case $a in - *.c) rm -f $tmp.exe - { - echo "$tst -$ext -$std -$usr -$inc" - cat $a - } > $tmp.c - compile $cc -o $tmp.exe $tmp.c $lib $deflib <&$nullin >&$stderr 2>&$stderr && - $executable $tmp.exe && - execute $tmp.exe $opt <&$nullin - ;; - *.sh) { - copy - ": -set \"cc='$cc' executable='$executable' id='$m' static='$static' tmp='$tmp'\" $opt $hdr $test" - cat $a - } > $tmp.sh - chmod +x $tmp.sh - ( . $tmp.sh ) <&$nullin - ;; - *) false - ;; - esac - case $? in - 0) success - ;; - *) failure cannot run - case $verbose in - 0) echo "$command: $file$line: $a: cannot run" >&$stderr ;; - esac - exit 1 - ;; - esac - ;; - siz) case $p in - "") x= ;; - *) x="$p " ;; - esac - is siz "$x$v" - { - case $p:$v in - long:*|*:*[_0123456789]int[_0123456789]*) - echo "$pre -$tst -$ext -$inc -static $x$v i; -$x$v f() { -$x$v v; i = 1; v = i;" - echo "i = v * i; i = i / v; v = v + i; i = i - v;" - case $v in - float|double) ;; - *) echo "v <<= 4; i = v >> 2; i = 10; i = v % i; i |= v; v ^= i; i = 123; v &= i;" ;; - esac - echo "return v; }" - ;; - *) echo "$pre -$inc -struct xxx { $x$v mem; }; -static struct xxx v; -struct xxx* f() { return &v; }" - ;; - esac - case $x in - ""|"struct "|"union ") - echo "int g() { return 0; }" - ;; - *) echo "int g() { return sizeof($x$v)<=sizeof($v); }" ;; - esac - copy - " -int main() { - f(); - g(); - printf(\"%u\\n\", sizeof($x$v)); - return 0; -}" - } > $tmp.c - rm -f $tmp.exe $tmp.dat - if compile $cc -o $tmp.exe $tmp.c $lib $deflib <&$nullin >&$nullout && - $executable $tmp.exe && - execute $tmp.exe > $tmp.dat - then z=$(cat $tmp.dat) - c=0 - else z=0 - c=1 - fi - report $c "$z" "sizeof($x$v)" "$x$v not a type with known size" - ;; - sym) case $test in - "") x=$v ;; - *) x=$test ;; - esac - echo "$pre -$tst -$ext -$inc -'=' $x '='" > $tmp.c - compile $cc -E $tmp.c <&$nullin \ - | sed \ - -e "/'='/!d" \ - -e "s/'='//g" \ - -e 's/[ ]//g' \ - -e 's/((([^()]*)))->/->/g' \ - -e 's/(([^()]*))->/->/g' \ - -e 's/([^()]*)->/->/g' \ - -e 's/\([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789]*\)\[/\ -ary \1[/g' \ - -e 's/\([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789]*\)(/\ -fun \1[/g' \ - -e 's/\*->\([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_]\)/->\ -ptr \1/g' \ - -e 's/->\([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_]\)/->\ -reg \1/g' \ - -e "/^$v\$/d" \ - -e 's/^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789]*$/\ -nam &/g' \ - | sed \ - -e '/^... /!d' \ - | LC_ALL=C sort \ - -u \ - | sed \ - -e 's/\(...\) \([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789]*\).*/#ifndef _\1_'$v'\ -#define _\1_'$v' \2\ -#define _\1_'$v'_str "\2"\ -#endif/' - ;; - typ) case $p in - "") x= ;; - *) x="$p " ;; - esac - is typ "$x$v" - { - case $p:$v in - long:*|*:*[_0123456789]int[_0123456789]*) - echo "$pre -$tst -$ext -$inc -static $x$v i; -$x$v f() { -$x$v v; i = 1; v = i;" - echo "i = v * i; i = i / v; v = v + i; i = i - v;" - case $v in - float|double) ;; - *) echo "v <<= 4; i = v >> 2; i = 10; i = v % i; i |= v; v ^= i; i = 123; v &= i;" ;; - esac - echo "return v; }" - ;; - *) echo "$pre -$tst -$ext -$inc -struct xxx { $x$v mem; }; -static struct xxx v; -struct xxx* f() { return &v; }" - ;; - esac - case $x in - ""|"struct "|"union ") - echo "int main() { f(); return 0; }" ;; - *) echo "int main() { f(); return sizeof($x$v)<=sizeof($v); }" ;; - esac - } > $tmp.c - rm -f $tmp.exe - compile $cc -o $tmp.exe $tmp.c $lib $deflib <&$nullin >&$nullout && - $executable $tmp.exe && - execute $tmp.exe - report $? 1 "$x$v is a type" "$x$v is not a type" "default for type $x$v" - ;; - val) case $arg in - '"'*'"')echo $arg=\'$val\' ;; - *) echo $arg=\"$val\" ;; - esac - ;; - ver) ;; - 0) result=FAILURE - ;; - 1) result=SUCCESS - ;; - :) ;; - -) ;; - *) echo "$command: $file$line: $o: unknown feature test" >&$stderr - status=1 - ;; - esac - done - done - case $not in - 1) case $result in - FAILURE) result=SUCCESS ;; - *) result=FAILURE ;; - esac - ;; - esac - case $result in - FAILURE) user_pf=$fail user_yn=$no ;; - *) user_pf=$pass user_yn=$yes ;; - esac - case $user_pf in - ?*) # Run a pass{ or fail{ block in iffe's current environment - eval "$user_pf" <&$nullin 2>&$stderr ;; - esac - case $user_yn in - ?*) case $def in - -) ;; - *) case $note in - ?*) case $user_yn in - *$nl*) user_yn="/* $note */$nl$user_yn" ;; - *) user_yn="$user_yn /* $note */" ;; - esac - ;; - esac - ;; - esac - copy - "$user_yn" - ;; - esac - case $ifelse:$result in - TEST:SUCCESS) ifelse=KEEP ;; - TEST:*) ifelse=SKIP ;; - esac - case $group:$result in - :*|*:SUCCESS) break ;; - esac - set '' $groups '' "$@" - shift - case $1 in - '') shift; break ;; - esac - shift - - # set up and try the next group - - hdr=$com_hdr - lib=$com_lib - mac=$com_mac - opt=$com_opt - pth=$com_pth - test=$com_test - cc="$occ $includes" - group= - groups= - while : - do case $1 in - '') shift; break ;; - esac - case $1 in - *[\"\'\(\)\{\}\ \ ]*) - case $op in - pth) pth="$pth $1" - ;; - *) case $test in - '') test=$1 ;; - *) test="$test $1" ;; - esac - ;; - esac - ;; - -) group=$group$1 - groups="$groups $1" - ;; - -l*) case $group in - -*) groups="$groups $1" ;; - *) lib="$lib $1" ;; - esac - ;; - +l*) x=-${1#+} - case $group in - -*) groups="$groups $x" ;; - *) lib="$lib $x" ;; - esac - ;; - -*|+*) case $group in - -*) groups="$groups $1" - ;; - *) case $op in - run) opt="$opt $1" - ;; - *) case $1 in - -D*) mac="$mac $1" ;; - *) cc="$cc $1" ;; - esac - ;; - esac - ;; - esac - ;; - *.[aAxX]|*.[dD][lL][lL]|*.[lL][iI][bB]) - case $group in - -*) groups="$groups $1" ;; - *) lib="$lib $1" ;; - esac - ;; - *[.\\/]*) - case $group in - -*) groups="$groups $1" - ;; - *) case $op in - pth) pth="$pth $1" ;; - *) hdr="$hdr $1" ;; - esac - ;; - esac - ;; - *) case $group in - -*) groups="$groups $1" - ;; - *) case $op in - pth) pth="$pth $1" - ;; - *) case $test in - '') test=$1 ;; - *) test="$test $1" ;; - esac - ;; - esac - ;; - esac - ;; - esac - shift - done - done -done diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/iffe.tst b/cde/programs/dtksh/ksh93/src/cmd/INIT/iffe.tst deleted file mode 100644 index dc6a40ff3..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/iffe.tst +++ /dev/null @@ -1,1881 +0,0 @@ -# regression tests for the iffe command - -TEST 01 'command line basics' - - EXEC -r -v - hdr stdio - OUTPUT - $'/* : : generated by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define _sys_types 1 /* #include ok */ -#define _hdr_stdio 1 /* #include ok */ -#endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: test: is stdio.h a header ... yes' - - EXEC -r -v -s posix - hdr stdio - - EXEC -r -v - hdr stdio,limits - OUTPUT - $'/* : : generated by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define _sys_types 1 /* #include ok */ -#define _hdr_stdio 1 /* #include ok */ -#define _hdr_limits 1 /* #include ok */ -#endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: test: is stdio.h a header ... yes -iffe: test: is limits.h a header ... yes' - - EXEC -r -v -s posix - hdr stdio,limits - - EXEC -r -v - hdr,lib no_foo_bar,no_bar_foo stdio.h - OUTPUT - $'/* : : generated by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define _sys_types 1 /* #include ok */ -#define _hdr_stdio 1 /* #include ok */ -#endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: test: is stdio.h a header ... yes -iffe: test: is no_foo_bar.h a header ... no -iffe: test: is no_bar_foo.h a header ... no -iffe: test: is no_foo_bar a library function ... no -iffe: test: is no_bar_foo a library function ... no' - - EXEC -r -v -s posix - hdr,lib no_foo_bar,no_bar_foo stdio.h - - EXEC -r -v - hdr no_foo_bar,no_bar_foo stdio.h : lib no_foo_bar,no_bar_foo stdio.h - - EXEC -r -v -s posix - hdr no_foo_bar,no_bar_foo stdio.h : lib no_foo_bar,no_bar_foo stdio.h - -TEST 02 'file input basics' - - EXEC -r -v - t1.iffe - INPUT t1.iffe $'hdr stdio' - OUTPUT - $'/* : : generated from t1.iffe by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define _sys_types 1 /* #include ok */ -#define _hdr_stdio 1 /* #include ok */ -#endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: test: is stdio.h a header ... yes' - - EXEC -r -v -s posix - t1.iffe - - EXEC -r -v - t2.iffe - INPUT t2.iffe $'hdr stdio,limits' - OUTPUT - $'/* : : generated from t2.iffe by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define _sys_types 1 /* #include ok */ -#define _hdr_stdio 1 /* #include ok */ -#define _hdr_limits 1 /* #include ok */ -#endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: test: is stdio.h a header ... yes -iffe: test: is limits.h a header ... yes' - - EXEC -r -v -s posix - t2.iffe - - EXEC -r -v - t3.iffe - INPUT t3.iffe $'hdr,lib no_foo_bar,no_bar_foo stdio.h' - OUTPUT - $'/* : : generated from t3.iffe by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define _sys_types 1 /* #include ok */ -#define _hdr_stdio 1 /* #include ok */ -#endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: test: is stdio.h a header ... yes -iffe: test: is no_foo_bar.h a header ... no -iffe: test: is no_bar_foo.h a header ... no -iffe: test: is no_foo_bar a library function ... no -iffe: test: is no_bar_foo a library function ... no' - - EXEC -r -v -s posix - t3.iffe - - EXEC -r -v - t3.iffe - INPUT t3.iffe $'hdr no_foo_bar,no_bar_foo stdio.h -lib no_foo_bar,no_bar_foo stdio.h' - - EXEC -r -v -s posix - t3.iffe - -TEST 03 'nested if' - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff ifelse -if hdr stdio - if lib open { - HIT 1 - } - elif lib close { - HIT 2 - } - else { - HIT 3 - } - endif -elif hdr limits { - HIT 4 -} -else { - HIT 5 -} -endif' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _ifelse_H -#define _ifelse_H 1 -#define _sys_types 1 /* #include ok */ -#define _hdr_stdio 1 /* #include ok */ -#define _lib_open 1 /* open() in default lib(s) */ - HIT 1 - -#endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: test: is stdio.h a header ... yes -iffe: test: is open a library function ... yes' - - EXEC -r -v -s posix - t.iffe - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff ifelse -if hdr _XXX_stdio - if lib open { - HIT 1 - } - elif lib close { - HIT 2 - } - else { - HIT 3 - } - endif -elif hdr limits { - HIT 4 -} -else { - HIT 5 -} -endif' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _ifelse_H -#define _ifelse_H 1 -#define _sys_types 1 /* #include ok */ -#define _hdr_limits 1 /* #include ok */ -HIT 4 - -#endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: test: is _XXX_stdio.h a header ... no -iffe: test: is limits.h a header ... yes' - - EXEC -r -v -s posix - t.iffe - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff ifelse -if hdr _XXX_stdio - if lib open { - HIT 1 - } - elif lib close { - HIT 2 - } - else { - HIT 3 - } - endif -elif hdr _XXX_limits { - HIT 4 -} -else { - HIT 5 -} -endif' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _ifelse_H -#define _ifelse_H 1 -#define _sys_types 1 /* #include ok */ -HIT 5 - -#endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: test: is _XXX_stdio.h a header ... no -iffe: test: is _XXX_limits.h a header ... no' - - EXEC -r -v -s posix - t.iffe - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff ifelse -if hdr stdio - if lib _XXX_open { - HIT 1 - } - elif lib close { - HIT 2 - } - else { - HIT 3 - } - endif -elif hdr limits { - HIT 4 -} -else { - HIT 5 -} -endif' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _ifelse_H -#define _ifelse_H 1 -#define _sys_types 1 /* #include ok */ -#define _hdr_stdio 1 /* #include ok */ -#define _lib_close 1 /* close() in default lib(s) */ - HIT 2 - -#endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: test: is stdio.h a header ... yes -iffe: test: is _XXX_open a library function ... no -iffe: test: is close a library function ... yes' - - EXEC -r -v -s posix - t.iffe - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff ifelse -if hdr stdio - if lib _XXX_open { - HIT 1 - } - elif lib _XXX_close { - HIT 2 - } - else { - HIT 3 - } - endif -elif hdr limits { - HIT 4 -} -else { - HIT 5 -} -endif' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _ifelse_H -#define _ifelse_H 1 -#define _sys_types 1 /* #include ok */ -#define _hdr_stdio 1 /* #include ok */ - HIT 3 - -#endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: test: is stdio.h a header ... yes -iffe: test: is _XXX_open a library function ... no -iffe: test: is _XXX_close a library function ... no' - - EXEC -r -v -s posix - t.iffe - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff ifelse -if mem stat.st_atime sys/types.h sys/stat.h { - #define ATIME 1 -} -elif mem stat.st_ctime sys/types.h sys/stat.h { - #define CTIME 1 -} -elif mem stat.st_mtime sys/types.h sys/stat.h { - #define MTIME 1 -} -else pass{ no_stat_time=1 }end { - #define NOTIME 1 -} -endif -if ( !no_stat_time ) { - #define YESTIME 1 -} -endif' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _ifelse_H -#define _ifelse_H 1 -#define _sys_types 1 /* #include ok */ -#define _sys_stat 1 /* #include ok */ -#define _mem_st_atime_stat 1 /* st_atime is a member of struct stat */ -#define ATIME 1 - -#define YESTIME 1 - -#endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: test: is sys/stat.h a header ... yes -iffe: test: is stat a type or typedef ... no -iffe: test: is st_atime a member of struct stat ... yes -iffe: test: is ( !no_stat_time ) true ... yes' - - EXEC -r -v -s posix - t.iffe - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff ifelse -if mem foo_stat.st_atime sys/types.h sys/stat.h { - #define ATIME 1 -} -elif mem stat.st_ctime sys/types.h sys/stat.h { - #define CTIME 1 -} -elif mem stat.st_mtime sys/types.h sys/stat.h { - #define MTIME 1 -} -else pass{ no_stat_time=1 }end { - #define NOTIME 1 -} -endif -if ( !no_stat_time ) { - #define YESTIME 1 -} -endif' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _ifelse_H -#define _ifelse_H 1 -#define _sys_types 1 /* #include ok */ -#define _sys_stat 1 /* #include ok */ -#define _mem_st_ctime_stat 1 /* st_ctime is a member of struct stat */ -#define CTIME 1 - -#define YESTIME 1 - -#endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: test: is sys/stat.h a header ... yes -iffe: test: is foo_stat a type or typedef ... no -iffe: test: is st_atime a member of struct foo_stat ... no -iffe: test: is stat a type or typedef ... no -iffe: test: is st_ctime a member of struct stat ... yes -iffe: test: is ( !no_stat_time ) true ... yes' - - EXEC -r -v -s posix - t.iffe - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff ifelse -if mem foo_stat.st_atime sys/types.h sys/stat.h { - #define ATIME 1 -} -elif mem foo_stat.st_ctime sys/types.h sys/stat.h { - #define CTIME 1 -} -elif mem stat.st_mtime sys/types.h sys/stat.h { - #define MTIME 1 -} -else pass{ no_stat_time=1 }end { - #define NOTIME 1 -} -endif -if ( !no_stat_time ) { - #define YESTIME 1 -} -endif' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _ifelse_H -#define _ifelse_H 1 -#define _sys_types 1 /* #include ok */ -#define _sys_stat 1 /* #include ok */ -#define _mem_st_mtime_stat 1 /* st_mtime is a member of struct stat */ -#define MTIME 1 - -#define YESTIME 1 - -#endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: test: is sys/stat.h a header ... yes -iffe: test: is foo_stat a type or typedef ... no -iffe: test: is st_atime a member of struct foo_stat ... no -iffe: test: is st_ctime a member of struct foo_stat ... no -iffe: test: is stat a type or typedef ... no -iffe: test: is st_mtime a member of struct stat ... yes -iffe: test: is ( !no_stat_time ) true ... yes' - - EXEC -r -v -s posix - t.iffe - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff ifelse -if mem foo_stat.st_atime sys/types.h sys/stat.h { - #define ATIME 1 -} -elif mem foo_stat.st_ctime sys/types.h sys/stat.h { - #define CTIME 1 -} -elif mem foo_stat.st_mtime sys/types.h sys/stat.h { - #define MTIME 1 -} -else pass{ no_stat_time=1 }end { - #define NOTIME 1 -} -endif -if ( !no_stat_time ) { - #define YESTIME 1 -} -endif' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _ifelse_H -#define _ifelse_H 1 -#define _sys_types 1 /* #include ok */ -#define _sys_stat 1 /* #include ok */ -#define NOTIME 1 - -#endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: test: is sys/stat.h a header ... yes -iffe: test: is foo_stat a type or typedef ... no -iffe: test: is st_atime a member of struct foo_stat ... no -iffe: test: is st_ctime a member of struct foo_stat ... no -iffe: test: is st_mtime a member of struct foo_stat ... no -iffe: test: is ( !no_stat_time ) true ... no' - - EXEC -r -v -s posix - t.iffe - - EXEC -r -v - t.iffe - INPUT t.iffe $'set explicit -iff previous -hdr stdio -if hdr stdio { - OK -} -else { - OK -} -endif' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _previous_H -#define _previous_H 1 -#define _hdr_stdio 1 /* #include ok */ -OK - -#endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: test: is stdio.h a header ... yes' - - EXEC -r -v -s posix - t.iffe - -TEST 04 'test variable/macro override' - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff macro -HAVE_STDIO = hdr stdio' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _macro_H -#define _macro_H 1 -#define _sys_types 1 /* #include ok */ -#define HAVE_STDIO 1 /* #include ok */ -#endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: test: is stdio.h a header ... yes' - - EXEC -r -v -s posix - t.iffe - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff macro -if hdr - stdio { - #define HIT 1 -} -endif' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _macro_H -#define _macro_H 1 -#define _sys_types 1 /* #include ok */ -#define HIT 1 - -#endif' - - EXEC -r -v -s posix - t.iffe - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff macro -if - hdr stdio { - #define HIT 1 -} -endif' - - EXEC -r -v -s posix - t.iffe - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff macro -if ? hdr stdio { - #define HIT 1 -} -endif' - - EXEC -r -v -s posix - t.iffe - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff macro -if hdr - stdio { - #define HIT 1 -} -endif' - - EXEC -r -v -s posix - t.iffe - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff macro -if HAVE_STDIO = hdr stdio { - #define HIT 1 -} -endif -if ( HAVE_STDIO ) { - #define TOO ALSO -} -endif' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _macro_H -#define _macro_H 1 -#define _sys_types 1 /* #include ok */ -#define HAVE_STDIO 1 /* #include ok */ -#define HIT 1 - -#define TOO ALSO - -#endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: test: is stdio.h a header ... yes -iffe: test: is ( HAVE_STDIO ) true ... yes' - - EXEC -r -v -s posix - t.iffe - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff macro -if HAVE_STDIO = hdr stdio { - #define HIT 1 -} -endif -exp ALSO HAVE_STDIO' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _macro_H -#define _macro_H 1 -#define _sys_types 1 /* #include ok */ -#define HAVE_STDIO 1 /* #include ok */ -#define HIT 1 - -#define ALSO 1 /* HAVE_STDIO is true */ -#endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: test: is stdio.h a header ... yes -iffe: test: is HAVE_STDIO true ... yes' - - EXEC -r -v -s posix - t.iffe - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff macro -if HAVE_STDIO = hdr stdio { - #define HIT 1 -} -endif -ALSO = ( HAVE_STDIO )' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _macro_H -#define _macro_H 1 -#define _sys_types 1 /* #include ok */ -#define HAVE_STDIO 1 /* #include ok */ -#define HIT 1 - -#define ALSO 1 /* ( HAVE_STDIO ) is true */ -#endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: test: is stdio.h a header ... yes -iffe: test: is ( HAVE_STDIO ) true ... yes' - - EXEC -r -v -s posix - t.iffe - -TEST 05 'test code option sequence' - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff macro -tst seq - -DA=1 - -DB=1 note{ long int type }end compile{ - #if A == 1 && B == 0 - #define t long - #else - #define t error - #endif - t n = 0; -}end' - OUTPUT - '/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _macro_H -#define _macro_H 1 -#define _sys_types 1 /* #include ok */ -#define _seq 1 /* long int type */ -#endif' - ERROR - 'iffe: test: is sys/types.h a header ... yes -iffe: test: long int type ... yes' - - EXEC -r -v -s posix - t.iffe - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff macro -tst seq -DG=1 - -DN=1 - -DN=2 note{ long int type }end compile{ - #if G == 1 && N == 1 - #define t long - #else - #define t error - #endif - t n = 0; -}end' - - EXEC -r -v -s posix - t.iffe - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff macro -tst seq - -DA=1 - -DB=1 note{ long int type }end compile{ - #if A == 0 && B == 1 - #define t long - #else - #define t error - #endif - t n = 0; -}end' - ERROR - 'iffe: test: is sys/types.h a header ... yes -iffe: test: long int type ... -iffe: test: long int type ... yes' - - EXEC -r -v -s posix - t.iffe - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff macro -tst seq -DG=1 - -DN=1 - -DN=2 note{ long int type }end compile{ - #if G == 1 && N == 2 - #define t long - #else - #define t error - #endif - t n = 0; -}end' - - EXEC -r -v -s posix - t.iffe - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff macro -tst seq - -DA=1 - -DB=1 note{ long int type }end compile{ - #if A == 0 && B == 0 - #define t long - #else - #define t error - #endif - t n = 0; -}end' - OUTPUT - '/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _macro_H -#define _macro_H 1 -#define _sys_types 1 /* #include ok */ -#endif' - ERROR - 'iffe: test: is sys/types.h a header ... yes -iffe: test: long int type ... -iffe: test: long int type ... no' - - EXEC -r -v -s posix - t.iffe - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff macro -tst seq -DG=1 - -DN=1 - -DN=2 note{ long int type }end compile{ - #if G == 1 && N == 0 - #define t long - #else - #define t error - #endif - t n = 0; -}end' - - EXEC -r -v -s posix - t.iffe - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff macro -if tst - -DA=1 - -DB=1 note{ long int type }end compile{ - #if A == 1 && B == 0 - #define t long - #else - #define t error - #endif - t n = 0; -}end { - #define seq 1 -} -endif' - OUTPUT - '/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _macro_H -#define _macro_H 1 -#define _sys_types 1 /* #include ok */ -/* long int type */ -#define seq 1 - -#endif' - ERROR - 'iffe: test: is sys/types.h a header ... yes -iffe: test: long int type ... yes' - - EXEC -r -v -s posix - t.iffe - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff macro -if tst -DG=1 - -DN=1 - -DN=2 note{ long int type }end compile{ - #if G == 1 && N == 1 - #define t long - #else - #define t error - #endif - t n = 0; -}end { - #define seq 1 -} -endif' - - EXEC -r -v -s posix - t.iffe - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff macro -if tst - -DA=1 - -DB=1 note{ long int type }end compile{ - #if A == 0 && B == 1 - #define t long - #else - #define t error - #endif - t n = 0; -}end { - #define seq 1 -} -endif' - ERROR - 'iffe: test: is sys/types.h a header ... yes -iffe: test: long int type ... -iffe: test: long int type ... yes' - - EXEC -r -v -s posix - t.iffe - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff macro -if tst -DG=1 - -DN=1 - -DN=2 note{ long int type }end compile{ - #if G == 1 && N == 2 - #define t long - #else - #define t error - #endif - t n = 0; -}end { - #define seq 1 -} -endif' - - EXEC -r -v -s posix - t.iffe - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff macro -if tst - -DA=1 - -DB=1 note{ long int type }end compile{ - #if A == 0 && B == 0 - #define t long - #else - #define t error - #endif - t n = 0; -}end { - #define seq 1 -} -endif' - OUTPUT - '/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _macro_H -#define _macro_H 1 -#define _sys_types 1 /* #include ok */ -#endif' - ERROR - 'iffe: test: is sys/types.h a header ... yes -iffe: test: long int type ... -iffe: test: long int type ... no' - - EXEC -r -v -s posix - t.iffe - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff macro -if tst -DG=1 - -DN=1 - -DN=2 note{ long int type }end compile{ - #if G == 1 && N == 0 - #define t long - #else - #define t error - #endif - t n = 0; -}end { - #define seq 1 -} -endif' - - EXEC -r -v -s posix - t.iffe - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff macro -if tst - -DN=1 - -DN=2 - -DN=3 note{ long int type }end compile{ - #if N == 1 - #define t long - #else - #define t error - #endif - t n = 0; -}end { - #define seq 1 -} -endif' - OUTPUT - '/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _macro_H -#define _macro_H 1 -#define _sys_types 1 /* #include ok */ -/* long int type */ -#define seq 1 - -#endif' - ERROR - 'iffe: test: is sys/types.h a header ... yes -iffe: test: long int type ... yes' - - EXEC -r -v -s posix - t.iffe - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff macro -if tst - -DN=1 - -DN=2 - -DN=3 note{ long int type }end compile{ - #if N == 2 - #define t long - #else - #define t error - #endif - t n = 0; -}end { - #define seq 1 -} -endif' - ERROR - 'iffe: test: is sys/types.h a header ... yes -iffe: test: long int type ... -iffe: test: long int type ... yes' - - EXEC -r -v -s posix - t.iffe - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff macro -if tst - -DN=1 - -DN=2 - -DN=3 note{ long int type }end compile{ - #if N == 3 - #define t long - #else - #define t error - #endif - t n = 0; -}end { - #define seq 1 -} -endif' - ERROR - 'iffe: test: is sys/types.h a header ... yes -iffe: test: long int type ... -iffe: test: long int type ... -iffe: test: long int type ... yes' - - EXEC -r -v -s posix - t.iffe - - EXEC -r -v - t.iffe - INPUT t.iffe $'iff macro -if tst - -DN=1 - -DN=2 - -DN=3 note{ long int type }end compile{ - #if N == 0 - #define t long - #else - #define t error - #endif - t n = 0; -}end { - #define seq 1 -} -endif' - OUTPUT - '/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _macro_H -#define _macro_H 1 -#define _sys_types 1 /* #include ok */ -#endif' - ERROR - 'iffe: test: is sys/types.h a header ... yes -iffe: test: long int type ... -iffe: test: long int type ... -iffe: test: long int type ... no' - - EXEC -r -v -s posix - t.iffe - -TEST 06 'block side effects' - - EXEC -r - t.iffe - INPUT t.iffe $'iff - -tst output{ - int - main() - { - printf("HIT\\n"); - return 0; - } -}end' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#define _sys_types 1 /* #include ok */ -HIT' - - EXEC -r -s posix - t.iffe - - EXEC -r - t.iffe - INPUT t.iffe $'iff -tst - output{ - int - main() - { - printf("HIT\\n"); - return 0; - } -}end' - - EXEC -r -s posix - t.iffe - - EXEC -r - t.iffe - INPUT t.iffe $'iff -tst - output{ - int - main() - { - printf("HIT\\n"); - return 1; - } -}end' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#define _sys_types 1 /* #include ok */' - - EXEC -r -s posix - t.iffe - - EXEC -r - t.iffe - INPUT t.iffe $'iff -tst - nooutput{ - int - main() - { - printf("HIT\\n"); - return 1; - } -}end' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#define _sys_types 1 /* #include ok */ -HIT' - - EXEC -r -s posix - t.iffe - -TEST 07 'diagnostics' - - EXEC -r - t.iffe - INPUT t.iffe $'tst foo' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define _sys_types 1 /* #include ok */ -#endif' - ERROR - $'iffe: t.iffe:1: tst: unknown feature test' - EXIT 1 - - EXEC -r -s posix - t.iffe - - EXEC -r - t.iffe - INPUT t.iffe $'if (1)' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define _sys_types 1 /* #include ok */' - ERROR - $'iffe: t.iffe:1: missing endif' - EXIT 1 - - EXEC -r -s posix - t.iffe - - EXEC -r - t.iffe - INPUT t.iffe $'if' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define _sys_types 1 /* #include ok */' - ERROR - $'iffe: t.iffe:1: missing endif' - - EXEC -r -s posix - t.iffe - - EXEC -r - t.iffe - INPUT t.iffe $'endif' - ERROR - $'iffe: t.iffe:1: endif: no matching if' - - EXEC -r -s posix - t.iffe - - EXEC -r - t.iffe - INPUT t.iffe $'if { -}end' - ERROR - $'iffe: t.iffe:2: missing }' - - EXEC -r -s posix - t.iffe - -TEST 08 'negation consternation' - - EXEC -r - t.iffe - INPUT t.iffe $'npt fopen,fooon stdio.h' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define _sys_types 1 /* #include ok */ -#define _hdr_stdlib 1 /* #include ok */ -#define _hdr_unistd 1 /* #include ok */ -#define _hdr_stdio 1 /* #include ok */ -#define _npt_fooon 1 /* fooon() needs a prototype */ -#endif' - - EXEC -r -u - t.iffe - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define _sys_types 1 /* #include ok */ -#define _hdr_stdlib 1 /* #include ok */ -#define _hdr_unistd 1 /* #include ok */ -#define _hdr_stdio 1 /* #include ok */ -#undef _npt_fopen /* fopen() does not need a prototype */ -#define _npt_fooon 1 /* fooon() needs a prototype */ -#endif' - - EXEC -r -a - t.iffe - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define _sys_types 1 /* #include ok */ -#define _hdr_stdlib 1 /* #include ok */ -#define _hdr_unistd 1 /* #include ok */ -#define _hdr_stdio 1 /* #include ok */ -#define _npt_fopen 0 /* fopen() does not need a prototype */ -#define _npt_fooon 1 /* fooon() needs a prototype */ -#endif' - - EXEC -r -C - t.iffe - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define HAVE_SYS_TYPES_H 1 /* #include ok */ -#define HAVE_STDLIB_H 1 /* #include ok */ -#define HAVE_UNISTD_H 1 /* #include ok */ -#define HAVE_STDIO_H 1 /* #include ok */ -#define HAVE_FOPEN_DECL 1 /* fopen() does not need a prototype */ -#undef HAVE_FOOON_DECL /* fooon() needs a prototype */ -#endif' - - EXEC -r - t.iffe - INPUT t.iffe $'NEED_FOPEN = npt fopen stdio.h -HAVE_FOPEN = ! npt fopen stdio.h -NEED_FOOON = npt fooon stdio.h -HAVE_FOOON = ! npt fooon stdio.h' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define _sys_types 1 /* #include ok */ -#define _hdr_stdlib 1 /* #include ok */ -#define _hdr_unistd 1 /* #include ok */ -#define _hdr_stdio 1 /* #include ok */ -#define HAVE_FOPEN 1 /* fopen() does not need a prototype */ -#define NEED_FOOON 1 /* fooon() needs a prototype */ -#endif' - - EXEC -r -u - t.iffe - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define _sys_types 1 /* #include ok */ -#define _hdr_stdlib 1 /* #include ok */ -#define _hdr_unistd 1 /* #include ok */ -#define _hdr_stdio 1 /* #include ok */ -#undef NEED_FOPEN /* fopen() does not need a prototype */ -#define HAVE_FOPEN 1 /* fopen() does not need a prototype */ -#define NEED_FOOON 1 /* fooon() needs a prototype */ -#undef HAVE_FOOON /* fooon() needs a prototype */ -#endif' - - EXEC -r -C - t.iffe - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define HAVE_SYS_TYPES_H 1 /* #include ok */ -#define HAVE_STDLIB_H 1 /* #include ok */ -#define HAVE_UNISTD_H 1 /* #include ok */ -#define HAVE_STDIO_H 1 /* #include ok */ -#undef NEED_FOPEN /* fopen() does not need a prototype */ -#define HAVE_FOPEN 1 /* fopen() does not need a prototype */ -#define NEED_FOOON 1 /* fooon() needs a prototype */ -#undef HAVE_FOOON /* fooon() needs a prototype */ -#endif' - -TEST 09 'exp vs. if' - - EXEC -r - t.iffe - INPUT t.iffe $'_tst_false = ( 0 ) -_tst_true = ( 1 ) -exp _tst_hit !_tst_false { - ONE -} -exp _tst_hit !_tst_hit&_tst_true pass{ -cat < ok */ -#define _tst_true 1 /* ( 1 ) is true */ -#define _tst_hit 1 /* !_tst_false is true */ -/* !_tst_false */ -ONE - -#endif' - - EXEC -r -s posix - t.iffe - - EXEC -r - t.iffe - INPUT t.iffe $'_tst_false = ( 0 ) -_tst_true = ( 1 ) -exp _tst_hit !_tst_true { - ONE -} -exp _tst_hit !_tst_hit&_tst_true pass{ -cat < ok */ -#define _tst_true 1 /* ( 1 ) is true */ -#define _tst_hit 1 /* !_tst_hit&_tst_true is true */ -TWO 0 1 -#endif' - - EXEC -r -s posix - t.iffe - - EXEC -r - t.iffe - INPUT t.iffe $'_tst_false = ( 0 ) -_tst_true = ( 1 ) -exp _tst_hit !_tst_true { - ONE -} -exp _tst_hit !_tst_hit&_tst_false pass{ -cat < ok */ -#define _tst_true 1 /* ( 1 ) is true */ -#define _tst_hit 1 /* !_tst_hit&_tst_true is true */ -/* !_tst_hit&_tst_true */ -THREE - -#endif' - - EXEC -r -s posix - t.iffe - - EXEC -r - t.iffe - INPUT t.iffe $'_tst_false = ( 0 ) -_tst_true = ( 1 ) -exp _tst_hit !_tst_true { - ONE -} -exp _tst_hit !_tst_hit&_tst_false pass{ -cat < ok */ -#define _tst_true 1 /* ( 1 ) is true */ -#endif' - - EXEC -r -s posix - t.iffe - - EXEC -r - t.iffe - INPUT t.iffe $'_tst_false = ( 0 ) -_tst_true = ( 1 ) -exp _tst_hit !_tst_false { - ONE -} -exp _tst_hit !_tst_hit&&_tst_true pass{ -cat < ok */ -#define _tst_true 1 /* ( 1 ) is true */ -#define _tst_hit 1 /* !_tst_false is true */ -/* !_tst_false */ -ONE - -#endif' - - EXEC -r -s posix - t.iffe - - EXEC -r - t.iffe - INPUT t.iffe $'_tst_false = ( 0 ) -_tst_true = ( 1 ) -exp _tst_hit !_tst_true { - ONE -} -exp _tst_hit !_tst_hit&&_tst_true pass{ -cat < ok */ -#define _tst_true 1 /* ( 1 ) is true */ -#define _tst_hit 1 /* !_tst_hit&&_tst_true is true */ -TWO 0 1 -#endif' - - EXEC -r -s posix - t.iffe - - EXEC -r - t.iffe - INPUT t.iffe $'_tst_false = ( 0 ) -_tst_true = ( 1 ) -exp _tst_hit !_tst_true { - ONE -} -exp _tst_hit !_tst_hit&&_tst_false pass{ -cat < ok */ -#define _tst_true 1 /* ( 1 ) is true */ -#define _tst_hit 1 /* !_tst_hit&&_tst_true is true */ -/* !_tst_hit&&_tst_true */ -THREE - -#endif' - - EXEC -r -s posix - t.iffe - - EXEC -r - t.iffe - INPUT t.iffe $'_tst_false = ( 0 ) -_tst_true = ( 1 ) -exp _tst_hit !_tst_true { - ONE -} -exp _tst_hit !_tst_hit&&_tst_false pass{ -cat < ok */ -#define _tst_true 1 /* ( 1 ) is true */ -#endif' - - EXEC -r -s posix - t.iffe - - EXEC -r - t.iffe - INPUT t.iffe $'_tst_false = ( 0 ) -_tst_true = ( 1 ) -if ( ! _tst_false ) { - ONE -} -elif ( _tst_true ) pass{ -cat < ok */ -#define _tst_true 1 /* ( 1 ) is true */ -ONE - -#endif' - - EXEC -r -s posix - t.iffe - - EXEC -r - t.iffe - INPUT t.iffe $'_tst_false = ( 0 ) -_tst_true = ( 1 ) -if ( ! _tst_true ) { - ONE -} -elif ( _tst_true ) pass{ -cat < ok */ -#define _tst_true 1 /* ( 1 ) is true */ -TWO -#endif' - - EXEC -r -s posix - t.iffe - - EXEC -r - t.iffe - INPUT t.iffe $'_tst_false = ( 0 ) -_tst_true = ( 1 ) -if ( ! _tst_true ) { - ONE -} -elif ( _tst_false ) pass{ -cat < ok */ -#define _tst_true 1 /* ( 1 ) is true */ -THREE - -#endif' - - EXEC -r -s posix - t.iffe - - EXEC -r - t.iffe - INPUT t.iffe $'_tst_false = ( 0 ) -_tst_true = ( 1 ) -if ( ! _tst_true ) yes{ - typedef struct - { - int dd_fd; /* file descriptor */ - } DIR; -}end -endif' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define _sys_types 1 /* #include ok */ -#define _tst_true 1 /* ( 1 ) is true */ -#endif' - - EXEC -r -s posix - t.iffe - - EXEC -r - t.iffe - INPUT t.iffe $'_tst_false = ( 0 ) -_tst_true = ( 1 ) -if ( ! _tst_true ) { - typedef struct - { - int dd_fd; /* file descriptor */ - } DIR; -} -else { - OK -} -endif' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define _sys_types 1 /* #include ok */ -#define _tst_true 1 /* ( 1 ) is true */ -OK - -#endif' - - EXEC -r -s posix - t.iffe - - EXEC -r - t.iffe - INPUT t.iffe $'_tst_false = ( 0 ) -_tst_true = ( 1 ) -if ( ! _tst_true ) { - typedef struct - { - int dd_fd; /* file descriptor */ - }; -} -else { - OK -} -endif' - - EXEC -r -s posix - t.iffe - -TEST 10 'exp details' - - EXEC -r -v - t.iffe - INPUT t.iffe $'_str = "string" -_hdr =
-_aaa = ( 0 ) -_zzz = ( 1 ) -( _str ) -( ! _str ) -( _hdr ) -( ! _hdr ) -( _aaa ) -( ! _aaa ) -( _zzz ) -( ! _zzz )' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define _sys_types 1 /* #include ok */ -#define _str "string" -#define _hdr
-#define _zzz 1 /* ( 1 ) is true */ -#endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: test: is ( 0 ) true ... no -iffe: test: is ( 1 ) true ... yes -iffe: test: is ( _str ) true ... yes -iffe: test: is ( ! _str ) true ... no -iffe: test: is ( _hdr ) true ... yes -iffe: test: is ( ! _hdr ) true ... no -iffe: test: is ( _aaa ) true ... no -iffe: test: is ( ! _aaa ) true ... yes -iffe: test: is ( _zzz ) true ... yes -iffe: test: is ( ! _zzz ) true ... no' - - EXEC -r -v -s posix - t.iffe - -TEST 11 'set [no]define' - - EXEC -r -v - t.iffe - INPUT t.iffe $'set nodefine -mem stat.st_mtime sys/types.h sys/stat.h -set define -mem stat.st_mode sys/types.h sys/stat.h -if ( _mem_st_mtime_stat ) { - 1 -} -endif -if ( _mem_st_mode_stat ) { - 2 -} -endif' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define _mem_st_mode_stat 1 /* st_mode is a member of struct stat */ -1 - -2 - -#endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: test: is sys/stat.h a header ... yes -iffe: test: is stat a type or typedef ... no -iffe: test: is st_mtime a member of struct stat ... yes -iffe: test: is st_mode a member of struct stat ... yes -iffe: test: is ( _mem_st_mtime_stat ) true ... yes -iffe: test: is ( _mem_st_mode_stat ) true ... yes' - - EXEC -r -v -s posix - t.iffe - -TEST 12 'non-opaque mem' - - EXEC -r -v - mem OPAQUE -I. t.h - INPUT t.h $'typedef struct opaque OPAQUE;' - OUTPUT - $'/* : : generated by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define _sys_types 1 /* #include ok */ -#define _hdr_t 1 /* #include ok */ -#endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: test: is t.h a header ... yes -iffe: test: is OPAQUE a type or typedef ... no -iffe: test: is struct OPAQUE a non-opaque struct ... no' - - EXEC -r -v - mem NONOPAQUE -I. t.h - INPUT t.h $'struct nonopaque { int pad; }; -typedef struct nonopaque NONOPAQUE;' - OUTPUT - $'/* : : generated by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define _sys_types 1 /* #include ok */ -#define _hdr_t 1 /* #include ok */ -#define _mem_NONOPAQUE 1 /* NONOPAQUE is a non-opaque struct */ -#endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: test: is t.h a header ... yes -iffe: test: is NONOPAQUE a type or typedef ... yes -iffe: test: is NONOPAQUE a non-opaque struct ... yes' - -TEST 13 'key states' - - EXEC -r -v - t.iffe - INPUT t.iffe $'key int -key const = -key foo -key bar = -key aha = huh = int -key chr = char = int' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define _sys_types 1 /* #include ok */ -#define _key_int 1 /* int is a reserved keyword */ -#define _key_const 1 /* const is a reserved keyword */ -#define bar /* default for reserved keyword bar */ -#define aha int /* default for reserved keyword aha */ -#define _key_char 1 /* char is a reserved keyword */ -#define chr char /* alternate for reserved keyword chr */ -#endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: test: is int a reserved keyword ... yes -iffe: test: is const a reserved keyword ... yes -iffe: test: is foo a reserved keyword ... no -iffe: test: is bar a reserved keyword ... no -iffe: test: is aha a reserved keyword ... no -iffe: test: is huh a reserved keyword ... no -iffe: test: is chr a reserved keyword ... no -iffe: test: is char a reserved keyword ... yes' - - EXEC -r -v -s posix - t.iffe - - EXEC -u -r -v - t.iffe - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define _sys_types 1 /* #include ok */ -#define _key_int 1 /* int is a reserved keyword */ -#define _key_const 1 /* const is a reserved keyword */ -#undef _key_foo /* foo is not a reserved keyword */ -#undef _key_bar /* bar is not a reserved keyword */ -#define bar /* default for reserved keyword bar */ -#undef _key_huh /* huh is not a reserved keyword */ -#define aha int /* default for reserved keyword aha */ -#define _key_char 1 /* char is a reserved keyword */ -#define chr char /* alternate for reserved keyword chr */ -#endif' - - EXEC -u -r -v -s posix - t.iffe - - EXEC -a -r -v - t.iffe - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define _sys_types 1 /* #include ok */ -#define _key_int 1 /* int is a reserved keyword */ -#define _key_const 1 /* const is a reserved keyword */ -#define _key_foo 0 /* foo is not a reserved keyword */ -#define _key_bar 0 /* bar is not a reserved keyword */ -#define bar /* default for reserved keyword bar */ -#define _key_huh 0 /* huh is not a reserved keyword */ -#define aha int /* default for reserved keyword aha */ -#define _key_char 1 /* char is a reserved keyword */ -#define chr char /* alternate for reserved keyword chr */ -#endif' - - EXEC -a -r -v -s posix - t.iffe - - EXEC -C -r -v - t.iffe - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define HAVE_SYS_TYPES_H 1 /* #include ok */ -#define HAVE_INT_RESERVED 1 /* int is a reserved keyword */ -#define HAVE_CONST_RESERVED 1 /* const is a reserved keyword */ -#undef HAVE_FOO_RESERVED /* foo is not a reserved keyword */ -#undef HAVE_BAR_RESERVED /* bar is not a reserved keyword */ -#define bar /* default for reserved keyword bar */ -#undef HAVE_HUH_RESERVED /* huh is not a reserved keyword */ -#define aha int /* default for reserved keyword aha */ -#define HAVE_CHAR_RESERVED 1 /* char is a reserved keyword */ -#define chr char /* alternate for reserved keyword chr */ -#endif' - - EXEC -C -r -v -s posix - t.iffe - -TEST 14 'inc file' - - EXEC -r -v - t.iffe - INPUT t.iffe $'inc t_lib.h -if ( bar_foo ) { - #define all 1 -} -elif ( _foo_bar ) { - #define some 1 -} -endif' - INPUT t_lib.h '#define bar_foo ALL -#define _foo_bar SOME' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define _sys_types 1 /* #include ok */ -#define some 1 - -#endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: test: is ( bar_foo ) true ... no -iffe: test: is ( _foo_bar ) true ... yes' - - EXEC -r -v - t.iffe - INPUT t.iffe $'inc t_lib.h . -if ( bar_foo ) { - #define all 1 -} -elif ( _foo_bar ) { - #define ok 1 -} -endif' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define _sys_types 1 /* #include ok */ -#define all 1 - -#endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: test: is ( bar_foo ) true ... yes' - - EXEC -r -v - t.iffe - INPUT t.iffe $'inc t_lib.h . ? -if ( bar_foo ) { - #define all 1 -} -elif ( _foo_bar ) { - #define ok 1 -} -endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: t.iffe:1: warning: ?: operands ignored -iffe: test: is ( bar_foo ) true ... yes' - - EXEC -r -v - t.iffe - INPUT t.iffe $'inc foo_lib.h' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define _sys_types 1 /* #include ok */' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: t.iffe:1: foo_lib.h: file not found' - EXIT 1 - - EXEC -r -v - t.iffe - INPUT t.iffe $'inc' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: t.iffe:1: path expected' - -TEST 15 'KnR compatibility' - - EXEC -r -v - t.iffe - INPUT t.iffe $' -if ( 1 ) { - #define all 1 -} -endif -if ( 2 ) { - #define some 1 -} -endif -cat{ -#define a 1 - #define b 2 - #define c 3 - #define d 4 -}end' -#define _foo_bar SOME' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define _sys_types 1 /* #include ok */ -#define some 1 - -#endif' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define _sys_types 1 /* #include ok */ -#define all 1 - -#define some 1 - -#define a 1 -#define b 2 -#define c 3 -#define d 4 - -#endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: test: is ( 1 ) true ... yes -iffe: test: is ( 2 ) true ... yes -iffe: test: cat{ ... }end ... yes' - - EXEC -r -v -s posix - t.iffe - -TEST 16 '{ define extern include print }' - - EXEC -r -v - t.iffe - INPUT t.iffe $' -print /* test header */ -header stdio.h -define EOF -1 -define FoobaR (a,b) ((a)+(b)) -define FoomaC -1 -extern fopen FILE* (char*, char*) -extern BarfoO struct barfoo* (int) -extern Tab_lE struct barfoo* [10]' - OUTPUT - $'/* test header */ -/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define _sys_types 1 /* #include ok */ -#include -#define FoobaR(a,b) ((a)+(b)) -#define FoomaC -1 -extern struct barfoo* BarfoO(int); -extern struct barfoo* Tab_lE[10]; -#endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: test: is stdio.h a header ... yes -iffe: test: is EOF a macro ... yes -iffe: test: is FoobaR a macro ... no -iffe: test: is FoomaC a macro ... no -iffe: test: is fopen a symbol that needs a prototype ... no -iffe: test: is BarfoO a symbol that needs a prototype ... yes -iffe: test: is Tab_lE a symbol that needs a prototype ... yes' - -TEST 17 'features/* => FEATURE/*' - - EXEC -r -v run features/stdio - INPUT features/stdio $'header stdio.h' - OUTPUT FEATURE/stdio $'/* : : generated from features/stdio by iffe version 1995-03-19 : : */ -#ifndef _REGRESS -#define _REGRESS 1 -#define _sys_types 1 /* #include ok */ -#include -#endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes -iffe: test: is stdio.h a header ... yes' - -TEST 18 'api + ver' - EXEC -r -v - t.iffe - INPUT t.iffe $'iff api -ver foo 20100606 -ver bar 19840919 - -api foo 19991231 dis dat tother -api foo 20100601 dat -api foo 20100606 dis -api bar 19991231 moe larry shemp -api bar 20020202 curly -api bar 20030303 shemp -api bar 20040404 joe_b -api bar 20050505 joe_d -' - OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ -#ifndef _api_H -#define _api_H 1 -#define _sys_types 1 /* #include ok */ - -#define FOO_VERSION 20100606 -#define BAR_VERSION 19840919 -#define FOOAPI(rel) ( _BLD_foo || !_API_foo || _API_foo >= rel ) - -#if !defined(_API_foo) && defined(_API_DEFAULT) -#define _API_foo _API_DEFAULT -#endif - -#if FOOAPI(20100601) -#undef dat -#define dat dat_20100601 -#elif _API_foo >= 19991231 -#undef dat -#define dat dat_19991231 -#endif - -#if FOOAPI(20100606) -#undef dis -#define dis dis_20100606 -#elif _API_foo >= 19991231 -#undef dis -#define dis dis_19991231 -#endif - -#if FOOAPI(19991231) -#undef tother -#define tother tother_19991231 -#endif - -#define _API_foo_MAP "dat_20100601 dat_19991231 dis_20100606 dis_19991231 tother_19991231" -#define BARAPI(rel) ( _BLD_bar || !_API_bar || _API_bar >= rel ) - -#if !defined(_API_bar) && defined(_API_DEFAULT) -#define _API_bar _API_DEFAULT -#endif - -#if BARAPI(20020202) -#undef curly -#define curly curly_20020202 -#endif - -#if BARAPI(20040404) -#undef joe_b -#define joe_b joe_b_20040404 -#endif - -#if BARAPI(20050505) -#undef joe_d -#define joe_d joe_d_20050505 -#endif - -#if BARAPI(19991231) -#undef larry -#define larry larry_19991231 -#endif - -#if BARAPI(19991231) -#undef moe -#define moe moe_19991231 -#endif - -#if BARAPI(20030303) -#undef shemp -#define shemp shemp_20030303 -#elif _API_bar >= 19991231 -#undef shemp -#define shemp shemp_19991231 -#endif - -#define _API_bar_MAP "curly_20020202 joe_b_20040404 joe_d_20050505 larry_19991231 moe_19991231 shemp_20030303 shemp_19991231" - -#endif' - ERROR - $'iffe: test: is sys/types.h a header ... yes' diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/ignore.sh b/cde/programs/dtksh/ksh93/src/cmd/INIT/ignore.sh deleted file mode 100644 index 1c16225de..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/ignore.sh +++ /dev/null @@ -1,37 +0,0 @@ -######################################################################## -# # -# This software is part of the ast package # -# Copyright (c) 1994-2011 AT&T Intellectual Property # -# Copyright (c) 2020-2021 Contributors to ksh 93u+m # -# and is licensed under the # -# Eclipse Public License, Version 1.0 # -# by AT&T Intellectual Property # -# # -# A copy of the License is available at # -# http://www.eclipse.org/org/documents/epl-v10.html # -# (with md5 checksum b35adb5213ca9657e911e9befb180842) # -# # -# Information and Software Systems Research # -# AT&T Research # -# Florham Park NJ # -# # -# Glenn Fowler # -# # -######################################################################## -# non-ksh script for the nmake ignore prefix -# @(#)ignore (ksh 93u+m) 2021-12-31 - -while : -do case $# in - 0) exit 0 ;; - esac - case $1 in - *=*) export "$1" - shift - ;; - *) break - ;; - esac -done -"$@" -exit 0 diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/intl.c b/cde/programs/dtksh/ksh93/src/cmd/INIT/intl.c deleted file mode 100644 index 803cd5cd5..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/intl.c +++ /dev/null @@ -1,30 +0,0 @@ -/*********************************************************************** -* * -* This software is part of the ast package * -* Copyright (c) 1994-2011 AT&T Intellectual Property * -* Copyright (c) 2020-2021 Contributors to ksh 93u+m * -* and is licensed under the * -* Eclipse Public License, Version 1.0 * -* by AT&T Intellectual Property * -* * -* A copy of the License is available at * -* http://www.eclipse.org/org/documents/epl-v10.html * -* (with md5 checksum b35adb5213ca9657e911e9befb180842) * -* * -* Information and Software Systems Research * -* AT&T Research * -* Florham Park NJ * -* * -* Glenn Fowler * -* * -***********************************************************************/ -#ifndef gettext -#include -#endif - -int -main() -{ - gettext(0); - return 0; -} diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/ld.hp.pa b/cde/programs/dtksh/ksh93/src/cmd/INIT/ld.hp.pa deleted file mode 100755 index 99d39f0dc..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/ld.hp.pa +++ /dev/null @@ -1,5 +0,0 @@ -: hp.pa ld wrapper for reasonable warning defaults - -# @(#)ld.hp.pa (AT&T Labs Research) 1998-01-23 - -/bin/ld +s +vnocompatwarnings "$@" diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/ldd.cygwin.i386 b/cde/programs/dtksh/ksh93/src/cmd/INIT/ldd.cygwin.i386 deleted file mode 100755 index b9df84f19..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/ldd.cygwin.i386 +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/env sh -: cygwin.i386 ldd -- how many ways does this confirm the Windows bias? -for f -do case $f in - *.exe) ;; - *) f=$f.exe ;; - esac - p=$(type $f) - case $p in - *" not found"*) - ;; - *) p=${p##* } - case $p in - ?*) f=$p ;; - esac - ;; - esac - cygcheck $(cygpath -aw $f) | - for w in $(sed -e 's/^[[:space:]]*//' -e '/^$/d' -e '/^Use /d') - do cygpath -u "$w" - done -done diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/ldd.darwin b/cde/programs/dtksh/ksh93/src/cmd/INIT/ldd.darwin deleted file mode 100755 index 6f06d9830..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/ldd.darwin +++ /dev/null @@ -1,2 +0,0 @@ -: Mac OS X ldd -otool -L "$@" diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/ldd.hp.pa b/cde/programs/dtksh/ksh93/src/cmd/INIT/ldd.hp.pa deleted file mode 100755 index 34874b413..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/ldd.hp.pa +++ /dev/null @@ -1,21 +0,0 @@ -: hp.pa ldd -while : -do case $# in - 0) break ;; - esac - case $1 in - -*|+*) ;; - *) break ;; - esac - shift -done -trap ':' 15 -for cmd -do case $# in - 1) ;; - *) echo $cmd: ;; - esac - _HP_DLDOPTS=-ldd "$cmd" < /dev/null 2> /dev/null | sort -u - # chatr "$cmd" | - # sed -e '/^[ ]*dynamic[ ][ ]*/!d' -e 's// /' -done diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/ldd.ibm.risc b/cde/programs/dtksh/ksh93/src/cmd/INIT/ldd.ibm.risc deleted file mode 100755 index 984ef6da7..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/ldd.ibm.risc +++ /dev/null @@ -1,16 +0,0 @@ -: ibm.risc ldd -case $# in -1) header=0 ;; -*) header=1 ;; -esac -for file -do case $header in - 1) echo "$file:" - header=2 - ;; - 2) echo - echo "$file:" - ;; - esac - dump -H "$file" | sed '1,/\*\*\*Import/d' -done diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/ldd.lynxos b/cde/programs/dtksh/ksh93/src/cmd/INIT/ldd.lynxos deleted file mode 100755 index 43904a831..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/ldd.lynxos +++ /dev/null @@ -1 +0,0 @@ -elflook -L "$@" | sed -e '/^NEEDED:/!d' -e 's/.*: *//' diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/ldd.mvs.390 b/cde/programs/dtksh/ksh93/src/cmd/INIT/ldd.mvs.390 deleted file mode 100755 index 341c4cc65..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/ldd.mvs.390 +++ /dev/null @@ -1,18 +0,0 @@ -: mvs.390 ldd -case $# in -1) header=0 ;; -*) header=1 ;; -esac -for file -do case $header in - 1) echo "$file:" - header=2 - ;; - 2) echo - echo "$file:" - ;; - esac - strings $file | - sed -e '/\<[[:lower:]][[:alnum:]]*\.dll\>/!d' -e 's/^/ /' | - sort -u -done diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/ldd.sgi b/cde/programs/dtksh/ksh93/src/cmd/INIT/ldd.sgi deleted file mode 100755 index d3c534734..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/ldd.sgi +++ /dev/null @@ -1,2 +0,0 @@ -: sgi.mips ldd -odump -Dl "$@" diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/m.c b/cde/programs/dtksh/ksh93/src/cmd/INIT/m.c deleted file mode 100644 index e597bfde9..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/m.c +++ /dev/null @@ -1,35 +0,0 @@ -/*********************************************************************** -* * -* This software is part of the ast package * -* Copyright (c) 1994-2011 AT&T Intellectual Property * -* Copyright (c) 2020-2021 Contributors to ksh 93u+m * -* and is licensed under the * -* Eclipse Public License, Version 1.0 * -* by AT&T Intellectual Property * -* * -* A copy of the License is available at * -* http://www.eclipse.org/org/documents/epl-v10.html * -* (with md5 checksum b35adb5213ca9657e911e9befb180842) * -* * -* Information and Software Systems Research * -* AT&T Research * -* Florham Park NJ * -* * -* Glenn Fowler * -* * -***********************************************************************/ -/* - * -lm test #1 - */ - -#ifndef sin -#include -#endif - -int -main() -{ - sin(0.0); - fmod(100.234, 11.0); - return 0; -} diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/m2.c b/cde/programs/dtksh/ksh93/src/cmd/INIT/m2.c deleted file mode 100644 index 25b1f136c..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/m2.c +++ /dev/null @@ -1,37 +0,0 @@ -/*********************************************************************** -* * -* This software is part of the ast package * -* Copyright (c) 1994-2011 AT&T Intellectual Property * -* Copyright (c) 2020-2021 Contributors to ksh 93u+m * -* and is licensed under the * -* Eclipse Public License, Version 1.0 * -* by AT&T Intellectual Property * -* * -* A copy of the License is available at * -* http://www.eclipse.org/org/documents/epl-v10.html * -* (with md5 checksum b35adb5213ca9657e911e9befb180842) * -* * -* Information and Software Systems Research * -* AT&T Research * -* Florham Park NJ * -* * -* Glenn Fowler * -* * -***********************************************************************/ -/* - * -lm test #2 - */ - -#include - -int -main() -{ - double value = 0; - int exp = 0; - int r = 0; - - r |= ldexp(value, exp) != 0; - r |= frexp(value, &exp) != 0; - return r; -} diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/m3.c b/cde/programs/dtksh/ksh93/src/cmd/INIT/m3.c deleted file mode 100644 index f630bb9fb..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/m3.c +++ /dev/null @@ -1,37 +0,0 @@ -/*********************************************************************** -* * -* This software is part of the ast package * -* Copyright (c) 1994-2011 AT&T Intellectual Property * -* Copyright (c) 2020-2021 Contributors to ksh 93u+m * -* and is licensed under the * -* Eclipse Public License, Version 1.0 * -* by AT&T Intellectual Property * -* * -* A copy of the License is available at * -* http://www.eclipse.org/org/documents/epl-v10.html * -* (with md5 checksum b35adb5213ca9657e911e9befb180842) * -* * -* Information and Software Systems Research * -* AT&T Research * -* Florham Park NJ * -* * -* Glenn Fowler * -* * -***********************************************************************/ -/* - * -lm test #3 - */ - -#include - -int -main() -{ - long double value = 0; - int exp = 0; - int r = 0; - - r |= ldexpl(value, exp) != 0; - r |= frexpl(value, &exp) != 0; - return r; -} diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/m4.c b/cde/programs/dtksh/ksh93/src/cmd/INIT/m4.c deleted file mode 100644 index e573b4343..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/m4.c +++ /dev/null @@ -1,33 +0,0 @@ -/*********************************************************************** -* * -* This software is part of the ast package * -* Copyright (c) 1994-2011 AT&T Intellectual Property * -* Copyright (c) 2020-2021 Contributors to ksh 93u+m * -* and is licensed under the * -* Eclipse Public License, Version 1.0 * -* by AT&T Intellectual Property * -* * -* A copy of the License is available at * -* http://www.eclipse.org/org/documents/epl-v10.html * -* (with md5 checksum b35adb5213ca9657e911e9befb180842) * -* * -* Information and Software Systems Research * -* AT&T Research * -* Florham Park NJ * -* * -* Glenn Fowler * -* * -***********************************************************************/ -/* - * -lm test #4 - */ - -#include - -int -main() -{ - double value = 0; - - return isnan(value); -} diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/m5.c b/cde/programs/dtksh/ksh93/src/cmd/INIT/m5.c deleted file mode 100644 index b73f358c6..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/m5.c +++ /dev/null @@ -1,33 +0,0 @@ -/*********************************************************************** -* * -* This software is part of the ast package * -* Copyright (c) 1994-2011 AT&T Intellectual Property * -* Copyright (c) 2020-2021 Contributors to ksh 93u+m * -* and is licensed under the * -* Eclipse Public License, Version 1.0 * -* by AT&T Intellectual Property * -* * -* A copy of the License is available at * -* http://www.eclipse.org/org/documents/epl-v10.html * -* (with md5 checksum b35adb5213ca9657e911e9befb180842) * -* * -* Information and Software Systems Research * -* AT&T Research * -* Florham Park NJ * -* * -* Glenn Fowler * -* * -***********************************************************************/ -/* - * -lm test #5 - */ - -#include - -int -main() -{ - long double value = 0; - - return isnanl(value); -} diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/m6.c b/cde/programs/dtksh/ksh93/src/cmd/INIT/m6.c deleted file mode 100644 index fab55f8f8..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/m6.c +++ /dev/null @@ -1,35 +0,0 @@ -/*********************************************************************** -* * -* This software is part of the ast package * -* Copyright (c) 1994-2011 AT&T Intellectual Property * -* Copyright (c) 2020-2021 Contributors to ksh 93u+m * -* and is licensed under the * -* Eclipse Public License, Version 1.0 * -* by AT&T Intellectual Property * -* * -* A copy of the License is available at * -* http://www.eclipse.org/org/documents/epl-v10.html * -* (with md5 checksum b35adb5213ca9657e911e9befb180842) * -* * -* Information and Software Systems Research * -* AT&T Research * -* Florham Park NJ * -* * -* Glenn Fowler * -* * -***********************************************************************/ -/* - * -lm test #6 - */ - -#define _ISOC99_SOURCE 1 - -#include - -int -main() -{ - double value = -0.0; - - return !signbit(value); -} diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/make.probe b/cde/programs/dtksh/ksh93/src/cmd/INIT/make.probe deleted file mode 100644 index d02a18afd..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/make.probe +++ /dev/null @@ -1,2145 +0,0 @@ -: -### this script contains archaic constructs that work with all sh variants ### -# Glenn Fowler -# AT&T Research -# -# @(#)make.probe (AT&T Research) 2011-06-01 -# -# C probe for make -# -# NOTE: C.probe must be included or .'d here -# - -cc_dll_def=-D_BLD_DLL - -probe_ar_arflags="-Xany" -probe_arflags="-xar" -probe_ccs="strip size nm ld ar" # longest to shortest -probe_debug="-g" -probe_dll="'-G 0' -Wc,dll,exportall,longname,rent -Wc,exportall -dynamic $cc_dll_def" -probe_export_dynamic="-rdynamic -export-dynamic -Wl,-export-dynamic -Wl,-E -bexpall -force_flat_namespace" -probe_gcc_optimize="-Os" -probe_gcc_version="*[Gg][Cc][Cc]*" -probe_include_local="'-ignore-source-dir -iquote' -iquote -I-" -probe_ldlazy='-zlazyload -znolazyload -Wl,-zlazyload -Wl,-znolazyload' -probe_ldlib="LD_LIBRARY_PATH LIBPATH LPATH" -probe_ldmap="'-Wl,-M' '-Qoption ld -M' '-Wl,-m' '-m'" -probe_ldorigin="-Wl,-z,origin" -probe_ldrecord='-zrecord -zignore -Wl,-zrecord -Wl,-zignore' -probe_ldrunpath="-Wl,-R, -R -Wl,-rpath, -L" -probe_ldstrip="'-s -mr' -Wl,-s" -probe_lib="a lib" -probe_lib_append="/usr/lib/pa1.1" -probe_lib_all_undef="-all -notall -all -none -Bwhole-archive -Bno-whole-archive -whole-archive -no-whole-archive -Wl,-whole-archive -Wl,-no-whole-archive -all_load '' -Wl,-zallextract -Wl,-zdefaultextract +forceload +noforceload" -probe_lib_multiple="-Wl,-zmuldefs" -probe_libdir="shlib lib" -probe_nmflags="'' -p -B" -probe_optimize="-Os -O" -probe_pic="-Kpic -KPIC -fpic -fPIC -pic -PIC +z +Z" -probe_no_protect="'-fno-stack-protector -fno-stack-protector-all' -GS-" -probe_readonly="-R -Krodata -xMerge -Wa,-r" -probe_shared="'' -G -b -c -shared -Wl,dll" -probe_shared_name="-Wl,-soname= -h" -probe_shared_nostart="-nostartfiles" -case `gcc -v 2>&1 | egrep gcc.version` in -*version' '[0123456].*) ;; -*) probe_shared_nostart= ;; # gcc 7+ -esac -probe_shared_registry='"-update_registry $probe_shared_registry_file"' -probe_shared_registry_file='registry.ld' -probe_shared_registry_path="\$(LIBDIR)/$probe_shared_registry_file" -probe_strict="'-ansi -pedantic' '-ansi -strict' -strict -ansi" -probe_stripflags="'-f -s' -f -s" -probe_unresolved="'-expect_unresolved \"*\"'" -probe_warn="-Wall -fullwarn -w3 '-A -A' +w1" - -echo '#pragma pp:version' > libpp.$src -echo '#define dDflag on' > dDflag.$src -echo 'int main(){return 0;}' > doti.$src -echo 'int code(){return 0;} int main(){return code();}' > export.$src -echo '#include ' > imstd.$src -echo '#include "_i_.h"' > imusr.$src -echo 'int x;' > _i_.h -mkdir im -echo '(' > im/stdio.h -echo '#include "implc_x.h" -int main(){f(1);return 0;}' > implc.$src -echo 'template void f(T){}' > implc_x.$src -echo 'template void f(T);' > implc_x.h -echo 'extern int NotalL(){return(0);}' > notall.$src -echo '#include -extern int i; -int i = 1; -extern int f(){return(!i);} -int main(){FILE* fp=stdin;return(f());}' > pic.$src -echo 'int prefix(){return 0;}' > prefix.$src -echo 'template int gt(T a, T b); -template int gt(T a, T b) { return a > b; } -int main () { return gt(2,1); }' > ptr.$src -echo 'int main(){return 0;}' > require.$src -echo '#if mips && !sgi || __CYGWIN__ -( /* some systems choke on this probe */ -#else -#if test_const -#define CONST const -#else -#define CONST -#endif -CONST char x[]={1,2,3,4,5,6,7,8,9,0}; -int main(){*(char*)x=0; return x[0];} -#endif' > readonly.$src -# NOTE: sfclose() defined on UWIN, not defined on all other systems -echo 'extern int sfclose(); extern int ShareD(){return(sfclose());}' > shared.$src -echo '#define g(a,b) a ## b -volatile int a; -const int g(x,y)=1; -extern int c(int);' > stdc.$src -echo 'extern int f(); int main() { return f(); }' > sovmain.$src -echo 'int f() { return 0; }' > sovlib.$src -echo '#include -int i; -int main(){int j;j = i * 10;return j;}' > strip.$src -echo 'template void f(T){} -int main(){f(1);return 0;}' > toucho.$src -echo 'extern type call(int); -int main() {call(0);return(0);}' > tstlib.$src -echo 'int main(){return 0;}' > warn.$src -echo 'int f(){return 0;}' > warn1.$src -echo 'int f(){}' > warn2.$src -echo 'int f(){int i; return 0;}' > warn3.$src -echo 'int f(){int i; return i;}' > warn4.$src -echo 'int f(){return g();}' > warn5.$src -warn_enum="1 2 3 4 5" - -chmod -w *.$src - -ar_arflags= -arflags= -cc_dll= -cc_pic= -cc_PIC= -dDflag= -debug= -dialect= -dll_dir='$(LIBDIR)' -dll_libraries= -dll_variants= -doti= -exectype= -export_dynamic= -gnu= -implicitc= -include_local= -lddynamic= -ldlazy= -ldnolazy= -ldnorecord= -ldorigin= -ldrecord= -ldrunpath= -ldscript= -ldstatic= -ldstrip= -Lflag= -lib_dll= -lib_all= -lib_undef= -libpath= -libpp= -makeoptions= -nmedit= -nmflags= -no_protect= -optimize= -prefix_archive=lib -prefix_dynamic= -prefix_shared=lib -ptrcopy= -ptrimplicit= -ptrmkdir= -readonly= -repository= -require= -runpath= -shared= -shared_name= -shared_registry= -shellmagic= -soversion= -stdc= -strict= -stripflags= -symprefix= -toucho= -warn= - -set $probe_lib -lib=$1 - -d= -for f in $stdinclude $usrinclude -do case $f in - -I*) ;; - *) d="$d $f" ;; - esac -done -stdinclude=$d - -set x $cc -cc_dir=`echo $2 | sed -e 's,/*[^/]*$,,'` -for c in $probe_ccs -do if $executable $cc_dir/$c - then x=$cc_dir/$c - else x=$c - fi - eval $c='$x' -done -ld_dir= -rm -f doti.$obj -if $cc -c doti.$src -then eval set x $probe_verbose - shift - for o - do $cc $o doti.$obj - $cc $o doti.$obj -lF0oB@r - done 2>&1 | sed -e 's/^[+ ]*//' -e 's/[ ].*//' -e '/^\//!d' -e 's/:$//' -e '/ld[a-zA-Z0-9.]*$/!d' -e 's,///*,/,g' > t - for i in `cat t` - do rm -f t.$obj - if test -x $i && $i -r -o t.$obj doti.$obj && test -f t.$obj - then case $ld in - ld) ld=$i ;; - esac - ld_dir=`echo $i | sed 's,/[^/]*$,,'` - break - fi - done -fi -IFS=: -set x $PATH -IFS=$ifs -path=$* -m= -for c in $probe_ccs -do eval o='$'$c - case $o in - $c) ;; - *) continue ;; - esac - C='${c}' - for x in $cc_dir $ld_dir - do cd $x - for p in "${C}" "${C}[!a-zA-Z]*" "*[!a-zA-Z]${C}" "*[!a-zA-Z]${C}[!a-zA-Z]*" - do eval set x $p - case $# in - 2) if $executable $2 - then case $2 in - *$c*$c*);; - *) m=$p - break 3 - ;; - esac - fi - ;; - esac - done - done -done -cd $tmpdir -for c in $probe_ccs -do eval o='$'$c - case $o in - $c) ;; - *) continue ;; - esac - for x in $cc_dir $ld_dir - do if $executable $x/$c - then eval $c='$x/$c' - continue 2 - fi - case $m in - ?*) eval set x $x/$m - case $# in - 2) if $executable $2 - then eval $c='$2' - continue 2 - fi - ;; - esac - ;; - esac - done - for x in $path - do if $executable $x/$c - then eval $c='$x/$c' - break - fi - done -done -dld=$cc - -rm -f dynamic.$exe -if $cc -o dynamic.$exe dynamic.$obj && $executable dynamic.$exe -then mkdir mylib - echo > mylib/libc.$lib - eval set x $probe_ldlib - while : - do shift - case $# in - 0) break ;; - esac - rm -f dynamic.$exe - if eval $1=./mylib '$'cc -o dynamic.$exe dynamic.$obj - then : - else libpath=$1 - break - fi - done -fi -test `$cc -E libpp.$src | grep -c '^#pragma pp:version "libpp '` -eq 1 && libpp=1 -$cc -E doti.$src > doti.i && $cc -c doti.i && test -s doti.$obj && doti=1 -if $cc -c imusr.$src -then eval set x $probe_include_local - while : - do shift - case $# in - 0) break ;; - esac - if $cc -c $1 imusr.$src - then : "$1 should skip \"_i_.h\" in ." - elif $cc -c imstd.$src - then if $cc -c -Iim imstd.$src - then : '-Idir should find in dir' - elif $cc -c $1 -Iim imstd.$src - then : "$1 -Idir should find in dir" - elif $cc -c -Iim $1 imstd.$src - then include_local=$1 - break - else : "-Idir $1 should skip in dir" - fi - else : should find stdio.h - fi - done -else : 'should find "_i_.h" in .' -fi - -if $cc -c pic.$src 2>e -then e=`wc -l e` - s=`$size pic.$obj; wc pic.$obj` - eval set x $probe_pic - shift - while : - do case $# in - 0|1) break ;; - esac - pic=$1 - shift - PIC=$1 - shift - rm -f pic.$obj - $cc $pic -c pic.$src 2>e && test -f pic.$obj || continue - $cc $pic -o pic.$exe pic.$obj && test -f pic.$exe || { - rm -f pic.$exe - $cc -o pic.$exe pic.$obj && test -f pic.$exe && continue - } - case `wc -l e` in - $e) ;; - *) continue ;; - esac - case $pic in - ???*) m=`echo " $pic" | sed -e 's/^ [-+]//g' -e 's/./-& /g' -e 's/[-+] //g'` - rm -f pic.$obj pic1.$exe - if $cc $m -c pic.$src 2>e && test -f pic.$obj && - $cc -o pic1.$exe pic.$obj && test -f pic1.$exe - then case `wc -l e` in - $e) cc_pic=$m - break - ;; - esac - fi - cc_pic=$pic - break - ;; - *) case `$size pic.$obj; wc pic.$obj` in - $s) ;; - *) cc_pic=$pic - break - ;; - esac - ;; - esac - done - # this works around gcc 2.95 sun4 -fpic a.out core dump after exit - case $hosted:$cc_pic in - 1:?*) if ./pic.$exe - then # this catches lynxos.ppc gcc that dumps -fpic and not -mshared - echo 'static int* f() { static int v; return &v; } -int main() { f(); return 0; }' > picok.$src - $cc $cc_pic -o picok.$exe picok.$src && ./picok.$exe || cc_pic= - else cc_pic= - fi - ;; - esac - case $cc_pic in - ?*) rm -f pic.$obj - if $cc $PIC -c pic.$src 2>e && test -f pic.$obj - then cc_PIC=$PIC - else cc_PIC=$cc_pic - fi - ;; - *) eval set x $probe_dll - while : - do shift - case $# in - 0) break ;; - esac - rm -f pic.$obj pic.$exe - $cc $1 -c pic.$src 2>e && test -f pic.$obj || continue - $cc $1 -o pic.$exe pic.$obj && test -f pic.$exe || { - rm -f pic.$exe - $cc -o pic.$exe pic.$obj && test -f pic.$exe && continue - } - case $1 in - -Wc,*exportall*) - # get specific since SGI gets this far too - rm -f pic.$exe pic.x - $cc -Wl,dll -o pic.$exe pic.$obj || continue - test -f pic.$exe || continue - test -f pic.x || continue - cc_dll="-D_SHARE_EXT_VARS $1" - so=.x - sd=.dll - dld=$cc - shared=-Wl,dll - prefix_shared= - probe_sd= - probe_shared= - #unused# lddynamic=-Bdynamic - #unused# ldstatic=-Bstatic - lib_dll=SYMBOL - break - ;; - esac - case `wc -l e` in - $e) cc_dll=$1 - break - ;; - esac - done - ;; - esac -fi - -$cc -E -dD dDflag.$src > t -case `grep '#define[ ][ ]*dDflag[ ][ ]*on' t` in -?*) dDflag=1 ;; -esac -case `grep '#define.*_GNUC_' t` in -?*) gnu=1 ;; -esac -$cc -c stdc.$src && stdc=1 - -if $cc -c pic.$src -then eval set x $probe_nmflags - while : - do shift - case $# in - 0) break ;; - esac - case `$nm $1 pic.$obj | grep -c '[0123456789][ ][ ]*T[ ][ ]*[_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]'` in - 0) ;; - *) nmflags=$1 - break - ;; - esac - done - case $# in - 0) case `$nm -gh pic.$obj | grep -c '|\.*[TtDdBbC][EeAaSsOo][XxTtSsMm]'` in - 0) ;; - *) nmflags=-gh - nmedit="-e '/\.*[TtDdBbC][EeAaSsOo][XxTtSsMm]/!d' -e 's/[| ].*//'" - ;; - esac - ;; - *) nmedit="-e '/[ ]T[ ][ ]*[_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]/!d' -e 's/.*[ ]T[ ][ ]*//'" - ;; - esac -fi - -if $cc -c doti.$src -then eval set x $probe_stripflags - while : - do shift - case $# in - 0) break ;; - esac - if $strip $1 doti.$obj - then stripflags=$1 - break - fi - done -fi - -rm -f export.$obj export.exe -if $cc -c export.$src -then lm= - if $cc -o export.exe export.$obj -lm 2>e && lm=-lm || - $cc -o export.exe export.$obj 2>e - then z=`wc -c < export.exe; $size export.exe 2>/dev/null` - eval set x $probe_export_dynamic - while : - do shift - case $# in - 0) break ;; - esac - rm -f export.exe - if $cc -o export.exe $1 export.$obj $lm 2>f && $executable export.exe - then y=`wc -c < export.exe; $size export.exe 2>/dev/null` - case $y in - $z) ;; - *) if cmp -s e f - then export_dynamic=$1 - break - fi - ;; - esac - fi - done - fi -fi -rm -f export.$obj export.exe - -rm -f strip.exe -if $cc -o strip.exe strip.$src -then z=`wc -c < strip.exe` - eval set x $probe_ldstrip - while : - do shift - case $# in - 0) break ;; - esac - rm -f strip.exe - if $cc -o strip.exe $1 strip.$src - then case `wc -c < strip.exe` in - $z) ;; - *) ldstrip=$1 - break - ;; - esac - fi - done -fi - -rm -f strip.exe strip.$obj -if $cc -c strip.$src && $cc -o strip.exe strip.$obj 2>e -then eval set x x $probe_ldlazy - while : - do shift - shift - case $# in - 0) break ;; - esac - rm -f strip.$exe - $cc -o strip.$exe $1 strip.$obj $2 2>f && test -f strip.$exe || continue - cmp -s e f || continue - ldlazy=$1 - ldnolazy=$2 - break - done - eval set x x $probe_ldrecord - while : - do shift - shift - case $# in - 0) break ;; - esac - rm -f strip.$exe - $cc -o strip.$exe $1 strip.$obj $2 2>f && test -f strip.$exe || continue - cmp -s e f || continue - ldrecord=$1 - ldnorecord=$2 - break - done -fi - -case $cc_dll:$cc_pic:$so:$dynamic:$static in -::::|$cc_dll_def::::) - : last chance dynamic checks - while : - do - echo '__declspec(dllexport) int fun() { return 0; }' > exp.$src - if $cc -c $cc_dll_def exp.$src - then rm -f xxx.dll xxx.lib - if $cc -shared -Wl,--enable-auto-image-base -Wl,--out-implib=xxx.lib -o xxx.dll exp.$obj && - test -f xxx.lib -a -f xxx.dll - then - : Cygwin - cc_dll=$cc_dll_def - dll_dir='$(BINDIR)' - sd=.dll - so=.dll.a - ldscript=".def .exp .ign .res" - lib_dll=option - lib_all=-Wl,-whole-archive - lib_undef=-Wl,-no-whole-archive - dld=$cc - shared='-shared -Wl,--enable-auto-image-base -Wl,--out-implib=$(<:N=*'$so')' - prefix_dynamic=cyg - prefix_shared=lib - break - fi - fi - break - done - ;; -*) if $cc -c $cc_dll $cc_pic shared.$src && $cc -c $cc_dll $cc_pic notall.$src - then for xx in "$cc" "$ld" - do eval set x $probe_shared - while : - do shift - case $# in - 0) break ;; - esac - rm -f xxx$dll - # UNDENT ... - - if $xx $1 -o xxx$dll shared.$obj 2>e && test -r xxx$dll - then if test -s e && egrep -i 'unknown|invalid|option' e > /dev/null - then continue - fi - case `PATH=/bin:/usr/bin:$PATH file xxx$dll` in - *lib*|*obj*|*shared*) - ;; - "") $executable xxx$dll || continue - ;; - *ELF*|*elf*) - $executable xxx$dll || continue - case `strings xxx$dll | sed -e 's,.*[ |],,' | sort -u | egrep -i '^([._](dynamic|dynstr|dynsym))$'` in - [012]) continue ;; - esac - ;; - *archive*not*stripped*|*data*dynamic*not*stripped*) - $executable xxx$dll || continue - ;; - *) continue - ;; - esac - dld=$xx - shared=$1 - # does -nostartfiles make sense? - z=`wc -c < xxx$dll` - eval set x $probe_shared_nostart - while : - do shift - case $# in - 0) break ;; - esac - rm -f xxx$dll - if $dld $shared $1 -o xxx$dll shared.$obj 2>e && test -r xxx$dll - then case `wc -c < xxx$dll` in - $z) ;; - *) if test -s e - then case `cat e` in - *[Ee][Rr][Rr][Oo][Rr]*|*[Ww][Aa][Rr][Nn][Ii][Nn][Gg]*|*[Oo][Pp][Tt][Ii][Oo][Nn]*) - continue - ;; - esac - fi - case $shared in - '') shared=$1 ;; - *) shared="$shared $1" ;; - esac - break - ;; - esac - fi - done - case $cc_dll in - "") cc_dll=$cc_dll_def ;; - esac - eval set x x $probe_sd - while : - do shift - shift - case $# in - [01]) break ;; - esac - rm -f xxx xxx$1 xxx$2 - if $dld $shared -o xxx shared.$obj 2>e - then if test -f xxx$1 -a \( -f xxx$2 -o "$cc_dll" = "$cc_dll_def" \) - then sd=$1 - so=$2 - lddynamic=-Bdynamic - ldstatic=-Bstatic - break 2 - elif test -f xxx -a -f xxx$2 - then sd=$1 - so=$2 - break 2 - else case $so in - '') so=$1 ;; - esac - break - fi - fi - done - rm -f libxxx.$lib - $ar cr libxxx.$lib shared.$obj - ranlib libxxx.$lib - eval set x x $probe_lib_all_undef - rm -f xxx$dll - if $dld $shared -o xxx$dll libxxx.$lib && test -r xxx$dll - then if $nm $nmflags xxx$dll | grep ShareD - then lib_dll=OPTION - set x x - fi - fi - while : - do shift - shift - case $# in - 0|1) break ;; - esac - rm -f xxx$dll - if $dld $shared -o xxx$dll $1 libxxx.$lib $2 && test -r xxx$dll - then if $nm $nmflags xxx$dll | grep ShareD - then lib_dll=option - lib_all=$1 - lib_undef=$2 - break - fi - fi - case $2 in - ?*) if $dld $shared -o xxx$dll $1 libxxx.$lib && test -r xxx$dll - then if $nm $nmflags xxx$dll | grep ShareD - then lib_dll=option - lib_all=$1 - break - fi - fi - ;; - esac - done - case $lib_dll in - OPTION) lib_dll=option - ;; - option) case $lib_undef in - "") rm -f libyyy.$lib - $ar cr libyyy.$lib notall.$obj - ranlib libyyy.$lib - $cc -c prefix.$src - eval set x x $probe_lib_all_undef - while : - do shift - shift - case $# in - 0|1) break ;; - esac - rm -f xxx$dll - if $dld $shared -o xxx$dll prefix.$obj $lib_all libxxx.$lib $2 libyyy.$lib && test -r xxx$dll - then rm -f t - $nm $nmflags xxx$dll > t - case `grep -c ShareD t`:`grep -c NotalL t` in - 0:*) ;; - *:0) lib_undef=$2 - break - ;; - esac - fi - done - ;; - esac - case $lib_undef in - "") eval set x $probe_lib_multiple - rm -f libyyy.$lib - cp libxxx.$lib libyyy.$lib - rm -f xxx$dll - if $dld $shared -o xxx$dll prefix.$obj $lib_all libxxx.$lib libyyy.$lib && test -r xxx$dll - then : - else while : - do shift - case $# in - 0) break ;; - esac - rm -f xxx$dll - if $dld $shared -o xxx$dll prefix.$obj $lib_all $1 libxxx.$lib libyyy.$lib && test -r xxx$dll - then rm -f t - $nm $nmflags xxx$dll > t - case `grep -c ShareD t` in - 0) ;; - *) lib_all="$lib_all $1" - break - ;; - esac - fi - done - fi - lib_dll=symbol - ;; - esac - ;; - *) lib_dll=symbol - ;; - esac - case `cat e` in - ?*) eval set x $probe_unresolved - while : - do shift - case $# in - 0) break ;; - esac - rm -f xxx$dll - if eval '$dld $shared' $1 '-o xxx$dll shared.$obj 2>e && test -r xxx$dll' - then case `cat e` in - "") shared="$shared $1"; break ;; - esac - fi - done - ;; - esac - r= - eval set x $probe_shared_registry - while : - do shift - r=x$r - case $# in - 0) break ;; - esac - rm -f xxx$dll - if eval \$dld \$shared -o xxx\$dll $1 shared.\$obj && - test -r xxx$dll -a -r $probe_shared_registry_file - then probe_shared_registry_file='$(CC.SHARED.REGISTRY.PATH)' - eval set x $probe_shared_registry - i= - while : - do shift - i=x$i - case $i in - $r) break ;; - esac - done - shared_registry=$1 - fi - done - break 2 - fi - - # ... INDENT - done - done - fi - case $so in - ?*) rm -f xxx* - if $dld $shared -g -o xxx shared.$obj 2>e - then set x $probe_sdb - while : - do shift - case $1 in - 0) break ;; - esac - if test -f xxx$1 - then sdb=$1 - break - fi - done - fi - if $cc -c require.$src - then p=' -/usr/proberun/lib:/local/runprobe/lib -' - eval set x $probe_ldrunpath - while : - do shift - case $# in - 0) break ;; - esac - rm -f require.exe - if $cc -o require.exe $1"$p" require.$obj && - grep -c /proberun/ require.exe >/dev/null && - grep -c /runprobe/ require.exe > /dev/null - then ldrunpath=$1 - eval set x $probe_ldorigin - while : - do shift - case $# in - 0) break ;; - esac - rm -f origin.exe - if $cc -o origin.exe $1 $ldrunpath'$ORIGIN' require.$obj - then if ./origin.exe > /dev/null 2>&1 - then ldorigin="$1 $ldrunpath"'\$ORIGIN/$(BINDIR:P=R=$(DLLDIR))' - fi - break - fi - done - break - fi - done - fi - rm -f libxxx$so - if $cc -c sovmain.$src && - $cc -c $cc_dll $cc_pic sovlib.c && - $dld $shared -o libxxx$so sovlib.$obj && - $cc -o sovmain.$exe -L. sovmain.$obj -lxxx - then rm -f sovmain.$exe - mv libxxx$so libxxx$so.5.6 - if $cc -o sovmain.$exe -L. sovmain.$obj -lxxx - then soversion=1 - fi - fi - rm -f doti.$obj - std64=/lib64 - lcl64=/usr/local/lib64 - if test -d $std64 -a -d $lcl64 && $cc -c doti.$src - then for i in `cd $lcl64; ls *$so 2>/dev/null | sed 's/lib\([^.]*\).*/\1/'` - do if $cc -o runpath.$exe doti.$obj -l$i >/dev/null 2>&1 - then LD_LIBRARY_PATH= ./runpath.$exe >/dev/null 2>&1 && continue - if LD_LIBRARY_PATH=$lcl64 ./runpath.$exe >/dev/null 2>&1 - then runpath=$lcl64 - break - elif LD_LIBRARY_PATH=$std64 ./runpath.$exe >/dev/null 2>&1 - then runpath=$std64 - break - elif LD_LIBRARY_PATH=$lcl64:$std64 ./runpath.$exe >/dev/null 2>&1 - then runpath=$lcl64:$std64 - break - fi - fi - done - fi - ;; - esac - ;; -esac - -rm -f shared.$obj -if $cc -c shared.$src -then eval set x $probe_ar_arflags - while : - do shift - case $# in - 0) break ;; - esac - rm -f libxxx.$lib - if $ar $1 r libxxx.$lib shared.$obj && $ar $1 t libxxx.$lib 2>&1 | grep shared.$obj >/dev/null - then ar_arflags=$1 - break - fi - done - eval set x $probe_arflags - while : - do shift - case $# in - 0) break ;; - esac - rm -f libxxx.$lib - if $cc $1 -o libxxx.$lib shared.$obj && $ar t libxxx.$lib 2>&1 | grep shared.$obj >/dev/null - then arflags=$1 - break - fi - done -fi - -case $shared in --G) case $cc_dll in - "") cc_dll=$cc_dll_def ;; - esac - ;; -*) case $lib_dll in - symbol) echo 'extern int f(); - int main() { f(); return 0; }' > main.$src - echo '#include - int f() { printf("hello world"); return 0; }' > member.$src - if $cc -c main.$src && $cc -c member.$src - then echo f > lib.exp - rm -f lib.$obj main.exe - if $ld -o lib.$obj -L: -bexport:lib.exp -berok -bmodtype:SRE -T512 -H512 -lm -lc member.$obj && $cc -o main.exe main.$obj lib.$obj - then dld=$ld - shared='-T512 -H512 -L$(LIBDIR): -berok -bmodtype:SRE' - lib_dll=export - dll_libraries='-lm -lc' - ldscript=.exp - case $cc_dll in - "") cc_dll=$cc_dll_def ;; - esac - case $so in - "") so=.$obj ;; - esac - fi - fi - ;; - esac - ;; -esac -case $shared in -?*) if $cc -c $cc_dll $cc_pic shared.$src - then eval set x $probe_shared_name - while : - do shift - case $# in - 0) break ;; - esac - rm -f xxx$dll - if $dld $shared ${1}libfoo.1.2 -o xxx$dll shared.$obj 2>e && test -r xxx$dll - then shared_name=$1 - break - fi - done - fi - ;; -esac -case " $cc_dll " in -*" $cc_dll_def "*) - ;; -" ") ;; -*) cc_dll="$cc_dll_def $cc_dll" - ;; -esac - -case $hosttype in -win32.*|cygwin.*|os2.*) - Lflag=1 - ;; -*) if $cc -c doti.$src - then if $cc -L. doti.$obj -lc >/dev/null - then case $cc_dll in - '') ;; - *) Lflag=1 ;; - esac - fi - fi - ;; -esac - -case $lib_dll in -option) case $hosttype in - linux.*) dll_libraries=-lc ;; - esac - ;; -SYMBOL) lib_dll=symbol - ;; -symbol) echo "#include -extern int fun() -{ - puts(\"fun\"); - return 0; -}" > dllib.$src - echo "extern int fun(); -int -main() -{ - return fun(); -}" > dlmain.$src - pwd=`pwd` - while : - do - if $cc -c $cc_dll $cc_pic dlmain.$src && - $cc -c $cc_dll $cc_pic dllib.$src - then rm -f libxxx$so - if $dld $shared -o libxxx$so dllib.$obj && - chmod 555 libxxx$so - then rm -f dlmain.$exe - if $cc -o dlmain.$exe dlmain.$obj $pwd/libxxx$so && - (./dlmain.$exe) >/dev/null 2>&1 - then break - fi - fi - rm -f libxxx$so dlmain.$exe - if $dld $shared -o libxxx$so dllib.$obj -lm -lc && - chmod 555 libxxx$so && - $cc -o dlmain.$exe dlmain.$obj $pwd/libxxx$so && - (./dlmain.$exe) >/dev/null 2>&1 - then dll_libraries='-lm -lc' - fi - fi - break - done - # the dll_libraries probe is still lame - case $dll_libraries in - '') case $hosttype in - sco.*|sol*.*|sun*) ;; - *) dll_libraries='-lm -lc' ;; - esac - ;; - esac - ;; -esac - -stdlib= -a=`$cc -print-multi-directory 2>/dev/null` -case $a in -.) ;; -*) for d in `$cc -print-search-dirs 2>/dev/null | sed -e '/^libraries:/!d' -e 's/.*=//' | tr : '\n' | grep /lib/` - do if [ -d ${d}${a} ] - then stdlib="$stdlib ${d}${a}" - else case $d in - */lib/) d=`echo '' $d | sed -e 's,/$,,'` - if [ -d ${d}${a} ] - then stdlib="$stdlib ${d}${a}" - fi - ;; - esac - fi - done - ;; -esac -case $stdlib in -'') stdlib=`$cc -v doti.$src 2>&1 | - sed 's/ */\n/g' | - sed -e '/^-L/!d' -e 's/^-L//' | - while read dir - do if test -d "$dir" - then (cd "$dir"; pwd) - fi - done` - ;; -*) eval set x $probe_verbose - shift - for o in "$@" - do stdlib="$stdlib "`$cc $o doti.$src 2>&1 | - sed 's/ */\n/g' | - sed -e '/^-L/!d' -e '/\/lib64$/!d' -e 's/^-L//'` - done - ;; -esac -case $stdlib in -?*) keepstdlib=1 - o=$stdlib - stdlib= - for dir in $o - do case " $stdlib " in - *" $o "*) continue ;; - esac - case $dir in - /usr/lib64) - i=/usr/local/lib64 - a=/lib64 - ;; - /lib64) i=/usr/local/lib64 - a=/usr/lib64 - ;; - /usr/lib) - i=/usr/local/lib - a=/lib - ;; - lib) i=/usr/local/lib - a=/usr/lib - ;; - *) i= - a= - ;; - esac - if test "" != "$i" -a -d "$i" - then case " $o " in - *" $i "*) - ;; - *) stdlib="$stdlib $i" - ;; - esac - fi - stdlib="$stdlib $dir" - if test "" != "$a" -a -d "$a" - then case " $o " in - *" $a "*) - ;; - *) stdlib="$stdlib $a" - ;; - esac - fi - done - case $hosted in - 1) case " $stdlib " in - *" /usr/lib "*) - ;; - *) case " $stdlib " in - *" /usr/local/lib "*) - ;; - *) stdlib="$stdlib /usr/local/lib" - ;; - esac - stdlib="$stdlib /usr/lib" - ;; - esac - case " $stdlib " in - *" /lib "*) - ;; - *) stdlib="$stdlib /lib" - ;; - esac - esac - ;; -*) keepstdlib=0 - case $dir in - */arch/$hosttype/lib/*) - notlib=`echo $dir | sed "s,/arch/$hosttype/lib/.*,/arch/$hosttype/lib,"` - ;; - *) notlib=//// - ;; - esac - tstlib= - implib= - if $cc -c hosted.$src - then for f in `( - eval set x $probe_verbose - while : - do shift - case $# in - 0) break ;; - esac - $cc $1 hosted.$obj - done - ) 2>&1 | sed -e 's/[ :]/\\ - /g' -e 's/-L//g' -e 's/^P,//' -e "s/[\"']//g" -e 's,^[\\\\/]*[\\\\/],/,' | sed -e '/^\$/d' -e '/^[-+]/d' -e '/^[^\\\\\\/]/d' -e '/[\\\\\\/]tmp[\\\\\\/]/d' -e 's/:\$//' -e 's,//*$,,'` - do case " $tstlib $implib " in - *" $f "*) continue ;; - esac - case $f in - $notlib) continue ;; - esac - if test -d $f - then tstlib="$tstlib $f" - elif test -f $f - then d=`echo $f | sed -e 's,[\\\\/]*[^\\\\/]*\$,,'` - case " $tstlib $implib " in - *" $d "*) continue ;; - esac - case $d in - *[\\/]usr[\\/]lib) - x=$d - d="`echo $d | sed -e 's,[\\\\/][\\\\/]*usr[\\\\/]lib\$,/lib,'`" - case " $tstlib $implib " in - *" $d "*) ;; - *) implib="$implib $d" ;; - esac - implib="$implib $x" - ;; - *[\\/]lib) - implib="$implib $d" - d="`echo $d | sed -e 's,[\\\\/][\\\\/]*lib\$,/usr/lib,'`" - case " $tstlib $implib " in - *" $d "*) ;; - *) implib="$implib $d" ;; - esac - ;; - *) implib="$implib $d" - ;; - esac - fi - done - fi - tstlib="$tstlib $implib" - if $cc -Dtype=void -Dcall=exit -c tstlib.$src && mv tstlib.$obj tst.$obj - then probe_lxx= - l= - for sym in $probe_l $probe_lxx - do case $l in - "") l=$sym; continue ;; - esac - rm -f tstlib.$exe - if $cc -o tstlib.$exe tst.$obj -l$l - then eval set x $probe_ldmap - while : - do shift - case $# in - 0) break ;; - esac - d=`$cc -Dtype=int -Dcall=$sym $static $1 tstlib.$src -l$l 2>&1 | sed -e '/[\\\\\\/].*[\\\\\\/]lib[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+]*\.[^\\\\\\/]*\$/!d' -e 's,^[^\\\\\/]*,,' -e 's,[\\\\\\/]lib[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+]*\.[^\\\\\\/]*\$,,' -e '/^[\\\\\\/]/!d' | sort -u` - case $d in - ?*) tstlib="$tstlib $d" ;; - esac - done - fi - l= - done - fi - libstd= - libset= - stdlibroot="/ /usr/" - for d in $tstlib - do case $d in - [\\/]lib|[\\/]usr[\\/]lib) - ;; - *) case " $stdlib " in - *\ $d\ *) - ;; - *) if ls $d ${PREROOT+$PREROOT/../$d} > tmp.tmp && test -s tmp.tmp - then for i in $probe_lib $obj - do if grep -i "\\.$i\$" tmp.tmp >/dev/null - then case " $probe_lib_append " in - *\ $d\ *) - libstd="$libstd $d" - ;; - *) stdlib="$stdlib $d" - case $d in - /usr/lib|/usr/lib/*) - ;; - /usr/lib?*) - e=`echo $d | sed -e 's,/usr,,'` - g=`echo $d/libc.* $e/libc.*` - case "$e $g " in - *".* "*);; - *) stdlib="$stdlib $e" - stdlibroot= - ;; - esac - ;; - esac - ;; - esac - case $libset in - "") case $i in - $obj) ;; - *) libset=1 - lib=$i - ;; - esac - ;; - esac - break - fi - done - fi - ;; - esac - ;; - esac - done - for d in `$ld --verbose 2>&1 | sed -e '/SEARCH_DIR/!d' -e 's/[ ][ ][ ]*/ /g' -e 's/SEARCH_DIR(\([^ ]*\));/\1/g' -e 's, //[^ ]*,,' -e 's,",,g'` - do if test -d $d - then case " $stdlib $libstd " in - *\ ${d}\ *) - ;; - *) libstd="$libstd $d" - ;; - esac - fi - done - case $hosted in - "") tstlib= ;; - *) tstlib="$stdlibroot /usr/ccs/ /usr/local/" ;; - esac - case $stdlibroot in - ?*) d= - for f in $stdinclude - do f=`echo $f | sed -e 's,[^\\\\/]*\$,,'` - d="$d $f" - done - tstlib="$d $tstlib" - ;; - esac - $cc -c doti.$src > all.tmp - for f in $probe_libdir - do for d in $stdlib $libstd $tstlib - do if test -d ${d}${f} - then ls ${d}${f} ${PREROOT:+$PREROOT/../${d}${f}} | - while read i - do for j in ${d}${f}/${i} ${PREROOT:+$PREROOT/../${d}${f}/${i}} - do if test -f $j -a -r $j -a -s $j - then echo $i - break - fi - done - done > tmp.tmp - if test -s tmp.tmp - then if egrep -i "^${prefix_archive}[abcdefghijklmnopqrstuvwxyz0123456789_][abcdefghijklmnopqrstuvwxyz0123456789_]*\\.$lib\$" tmp.tmp >lib.tmp || - egrep -i "\\.$obj\$" tmp.tmp >/dev/null || - egrep -i "^${prefix_shared}[abcdefghijklmnopqrstuvwxyz0123456789_][abcdefghijklmnopqrstuvwxyz0123456789_]*\\$so(.[0-9]+)*\$" tmp.tmp >>lib.tmp - then if test -s lib.tmp - then sed -e "s,.*/,," -e 's,^'${prefix_archive}'\(.*\)\.'$lib'$,\1,g' -e 's,^'${prefix_shared}'\(.*\)\'$so'[.0-9]*,\1,g' lib.tmp | sort -u > tmp.tmp - xs=`sort all.tmp all.tmp tmp.tmp | uniq -u` - case $xs in - '') continue ;; - esac - ok=0 - for x in $xs - do case $x in - *_p) continue ;; # Linux gcc known to hang for -lc_p - esac - if $cc -o doti.$exe doti.$obj -l$x 2>e - then ok=1 - else if test -s e && egrep -i ":.*[ ](find|found|locate|search|-l$x)[ ]" e > /dev/null - then if egrep -i ":.*[ ](access|permission)[ ]" e - then : maybe - else ok=0 - break - fi - fi - case $Lflag in - 1) if $cc -L${d}${f} -o doti.$exe doti.$obj -l$x - then ok=0 - break - fi - ;; - esac - fi - done - case $ok in - 0) continue ;; - esac - sort -u all.tmp tmp.tmp > lib.tmp - mv lib.tmp all.tmp - fi - case " $stdlib $libstd " in - *" ${d}${f} "*) - ;; - *) if test -d ${d}${f}/fsoft - then stdlib="$stdlib ${d}${f}/"'$(FLOAT_OPTION)' - fi - stdlib="$stdlib ${d}${f}" - ;; - esac - fi - fi - fi - done - done - stdlib="$stdlib $libstd" - case $stdlib in - */shlib*) - dy= - st= - for i in $stdlib $libstd - do case $i in - */shlib) dy="$dy $i" ;; - *) st="$st $i" ;; - esac - done - for i in /var - do if test -d $i/shlib - then dy="$dy $i/shlib" - fi - done - stdlib="$dy $st" - ;; - esac - ;; -esac - -if $cc -c prefix.$src -then eval set x $probe_symprefix - while : - do shift - case $# in - 0) break ;; - esac - if $nm $nmflags prefix.$obj | grep -c ${1}prefix >/dev/null - then symprefix=$1 - break - fi - done -fi - -if $cc -c warn.$src 2>e && test -f warn.$obj -then e=`wc -c < e` - - eval set x $probe_debug - while : - do shift - case $# in - 0) break ;; - esac - rm -f warn.$obj - $cc $1 -c warn.$src 2>e && test -f warn.$obj || continue - case `wc -c < e` in - $e) debug=$1; break ;; - esac - done - - eval set x $probe_no_protect - while : - do shift - case $# in - 0) break ;; - esac - rm -f warn.$obj - $cc $1 -c warn.$src 2>e && test -f warn.$obj || continue - case `wc -c < e` in - $e) no_protect=$1; break ;; - esac - done - - case $version_string in - $probe_gcc_version) probe_optimize="$probe_gcc_optimize $probe_optimize" ;; - esac - for i in $probe_optimize - do rm -f warn.$obj - $cc $i -c warn.$src 2>e && test -f warn.$obj || continue - case `wc -c < e` in - $e) optimize=$i; break ;; - esac - done - - eval set x $probe_strict - while : - do shift - case $# in - 0) break ;; - esac - rm -f warn.$obj - $cc $1 -c warn.$src 2>e && test -f warn.$obj || continue - n=`wc -c < e` - if test $n -ge $e - then strict=$1 - break - fi - done - - $cc -c warn1.$src 2>e - o=`wc -c < e` - eval set x $probe_warn - while : - do shift - case $# in - 0) break ;; - esac - rm -f warn.$obj warn.$exe - $cc -o warn.$exe $1 warn.$src 2>e && test -f warn.$exe || continue - n=`wc -c < e` - for i in $warn_enum - do rm -f warn$i.$obj - $cc -c $1 warn$i.$src 2>e && test -f warn$i.$obj || continue - n=`wc -c < e` - if test $n -gt $o - then warn=$1 - break 2 - fi - done - done - -fi - -while : -do case $hosted in - 1) rm -f readonly.$exe - eval set x '""' $probe_readonly - while : - do shift - case $# in - 0) break ;; - esac - for co in '' -Dtest_const - do rm -f readonly.$exe - if $cc -o readonly.$exe $co $1 readonly.$src && $executable readonly.$exe - then if ./readonly.$exe >/dev/null 2>&1 - then : - else readonly=$1 - break 3 - fi - fi - done - done - rm -f readonly.$exe readonly.s - if $cc -S readonly.$src && test -f readonly.s - then if sed -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)data/\1text/' \ - -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)zero[ ][ ]*/\1set .,.+/' \ - -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)space[ ][ ]*1/\1byte 0/' \ - -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)space[ ][ ]*2/\1byte 0,0/' \ - -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)space[ ][ ]*3/\1byte 0,0,0/' \ - -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)space[ ][ ]*4/\1byte 0,0,0,0/' \ - readonly.s > ro.s && $cc -o readonly.$exe ro.s && $executable readonly.$exe - then if ./readonly.$exe >/dev/null 2>&1 - then : - else readonly='-S.data' - break - fi - fi - rm -f readonly.$exe - if sed -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)idat/\1code/' \ - -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)zero[ ][ ]*/\1set .,.+/' \ - -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)space[ ][ ]*1/\1byte 0/' \ - -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)space[ ][ ]*2/\1byte 0,0/' \ - -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)space[ ][ ]*3/\1byte 0,0,0/' \ - -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)space[ ][ ]*4/\1byte 0,0,0,0/' \ - readonly.s > ro.s && $cc -o readonly.$exe ro.s && $executable readonly.$exe - then if ./readonly.$exe >/dev/null 2>&1 - then : - else readonly='-S.idat' - break - fi - fi - if sed -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)data/\1rdata/' \ - readonly.s > ro.s && $cc -o readonly.$exe ro.s && $executable readonly.$exe - then if ./readonly.$exe >/dev/null 2>&1 - then : - else readonly='-S.rdata' - break - fi - fi - fi - ;; - esac - break -done - -case $stdc in -?*) dialect="$dialect ANSI" ;; -esac -case $hosted in -"") dialect="$dialect CROSS" ;; -esac -case $doti in -?*) dialect="$dialect DOTI" ;; -esac -case $gnu in -?*) dialect="$dialect GNU" ;; -esac -case $so:$dynamic:$static in -::) ;; -*) dialect="$dialect DYNAMIC" - case $soversion in - ?*) dialect="$dialect VERSION" ;; - esac - ;; -esac -case $implicitc in -?*) dialect="$dialect IMPLICITC" ;; -esac -case $ptrcopy in -?*) dialect="$dialect PTRCOPY" ;; -esac -case $ptrimplicit in -?*) dialect="$dialect PTRIMPLICIT" ;; -esac -case $ptrmkdir in -?*) dialect="$dialect PTRMKDIR" ;; -esac -case $libpp in -?*) dialect="$dialect LIBPP" ;; -esac -case $toucho in -?*) dialect="$dialect TOUCHO" ;; -esac -case $dDflag in -?*) dialect="$dialect -dD" ;; -esac -# 2005-05-25 use $(CC.INCLUDE.LOCAL) instead -case $include_local in -?*) dialect="$dialect -I-" ;; -esac -case $Lflag in -?*) dialect="$dialect -L" ;; -esac - -ppcmd='$(CPP)' -ppdir='$(CPP:D)' -eval ppopt='"'$ppopt'"' -eval ppenv='"'$ppenv'"' - -set x "" .$exe -shift -exe= -for i -do rm -f require$i -done -if $cc -o require require.$src -then for i - do if $executable require$i - then exe=$i - break - fi - done -fi -case $sa:$sd:$so in -::?*) eval set x $probe_sa - while : - do shift - case $# in - 0) break ;; - esac - for i in $stdlib - do eval j="'" $i/lib*$1 "'" - case $j in - " $i/lib*$1 ") - eval j="'" $i/lib*$1.[0123456789]* "'" - case $j in - " $i/lib*$1.[0123456789]* ") - continue - ;; - esac - ;; - esac - sa=$1 - lddynamic=-Bdynamic - ldstatic=-Bstatic - break 2 - done - done - ;; -esac -case $ldscript in -"") case $so in - .lib) ldscript=".def .exp" ;; - *) ldscript=".ld" ;; - esac - ;; -esac -case $hosttype in -'') hosttype=unknown ;; -sgi.mips3) dll_variants='sgi.mips2:o32:-mips2 sgi.mips4:64:-mips4' ;; -sgi.mips4) dll_variants='sgi.mips2:o32:-mips2 sgi.mips3:n32:-mips3' ;; -esac - -case $hosted in -"") ccnative=`echo $cc | sed -e 's,.*/,,'` - ccs=$ccnative - for c in cc gcc - do case " $ccs " in - *" $c "*) ;; - *) ccs="$ccs $c" ;; - esac - done - for p in $path - do for c in $ccs - do if $executable $p/$c - then rm -f native.$exe - if $p/$c -o native.$exe doti.$src && ./native.$exe - then ccnative=$p/$c - exectype=`package CC="$ccnative" || $SHELL -c "package CC='$ccnative'"` - case $exectype in - *[Uu][Ss][Aa][Gg][Ee]:*) - exectype=`PATH=$_probe_PATH; export PATH; package CC="$ccnative" || $SHELL -c "package CC='$ccnative'"` - ;; - esac - break 2 - fi - fi - done - done - ;; -*) ccnative=$cc - exectype=$hosttype - ;; -esac - -# runtime shared lib exported symbol resolution - -case $cc_dll:$shared in -:|:*|*:);; -*) cat > cmd.c <<'!' -#include -#include -typedef int (*Lib_f)(int**, int**, int**); -int gbl_def = 1; -int gbl_ref = 1; -int gbl_ext; -int main(int argc, char** argv) -{ - void* dll; - Lib_f lib; - int* def; - int* ref; - int* ext; - - if (!(dll = dlopen(*++argv, RTLD_LAZY))) - fprintf(stderr, "library not found\n"); - else if (!((lib = (Lib_f)dlsym(dll, "lib"))) && !(lib = (Lib_f)dlsym(dll, "_lib"))) - fprintf(stderr, "symbol not found\n"); - else if ((*lib)(&def, &ref, &ext)) - fprintf(stderr, "function failed\n"); - else if (def == &gbl_def && ref == &gbl_ref && ext == &gbl_ext) - printf("ALL\n"); - else if (ref == &gbl_ref && ext == &gbl_ext) - printf("REF\n"); - else if (ext == &gbl_ext) - printf("EXT\n"); - return 0; -} -! - cat > lib.c <<'!' -int gbl_def = 1; -int gbl_ref; -int gbl_ext; -int lib(int** def, int** ref, int** ext) -{ - *def = &gbl_def; - *ref = &gbl_ref; - *ext = &gbl_ext; - return 0; -} -! - if $cc -c $cc_dll $cc_pic cmd.c && - $cc -c $cc_dll $cc_pic lib.c && { - $cc $cc_dll $export_dynamic -o cmd.exe cmd.o || - $cc $cc_dll $export_dynamic -o cmd.exe cmd.o -ldl - } && - $dld $shared -o libgbl.dll lib.o - then x=`./cmd.exe ./libgbl.dll` - case $x in - ?*) dialect="$dialect EXPORT=$x" ;; - esac - else case $sd:$hosttype in - .dll:*win*) dialect="$dialect EXPORT=DLL" ;; - esac - fi - ;; -esac - -# shellmagic defined if installed shell scripts need magic - -echo ': got magic : -echo ok' > ok -chmod +x ok -case `(eval ./ok | /bin/sh) 2>/dev/null` in -ok) ;; -*) echo '#!/bin/env sh -: got magic : -echo ok' > ok - chmod +x ok - case `(eval ./ok | /bin/sh) 2>/dev/null` in - ok) shellmagic='$("#")!/bin/env sh' - ;; - *) for i in /emx/bin/bash.exe /emx/bin/sh.exe - do if test -x $i - then shellmagic='$("#")!'$i - break - fi - done - ;; - esac - ;; -esac - -# -# path cleanup -# - -for i in ar ccnative dld ld nm size stdinclude stdlib strip -do eval o='$'$i - v=$o - case $v in - *//*) v=`echo $v | sed 's,///*,/,g'` ;; - esac - if (test . -ef "`pwd`") - then k= - for x in $v - do case $x in - */../*|*/..) - case $x in - /*) a=/ ;; - *) a= ;; - esac - IFS=/ - set '' $x - IFS=$ifs - r= - for d - do r="$d $r" - done - p= - g= - for d in $r - do case $d in - ..) g="$g $d" ;; - *) case $g in - '') case $p in - '') p=$d ;; - *) p=$d/$p ;; - esac - ;; - *) set $g - shift - g=$* - ;; - esac - ;; - esac - done - case $a in - '') for d in $g - do p=$d/$p - done - ;; - *) p=$a$p - ;; - esac - case $p in - /) continue ;; - esac - test $x -ef $p && x=$p - ;; - esac - k="$k $x" - done - set '' $k - shift - v=$1 - case $# in - 0) ;; - *) shift - while : - do case $# in - 0) break ;; - esac - k= - for d - do for j in $v - do test $d -ef $j && continue 2 - done - k="$k $d" - done - set '' $k - case $# in - 1) break ;; - esac - shift - v="$v $1" - shift - done - ;; - esac - fi - case $v in - $o) ;; - *) eval $i='$'v ;; - esac -done - -case $keepstdlib in -1) ;; -*) # - # favor lib64 over lib - # - case $hosttype in - *64|*[!0-9]64[!a-zA-Z0-9]*) - o=$stdlib - stdlib= - for i in $o - do case " $stdlib " in - *" $i "*) - continue - ;; - esac - case $i in - *64) stdlib="$stdlib $i" - continue - ;; - esac - case " $o " in - *" ${i}64 "*) - case " $stdlib " in - *" ${i}64 "*) - ;; - *) stdlib="$stdlib ${i}64" - ;; - esac - ;; - esac - stdlib="$stdlib $i" - done - ;; - esac - ;; -esac - -# -# set up for local override -# - -CC_VERSION_STAMP=$version_stamp -CC_VERSION_STRING=$version_string -CC_CC=$cc -CC_NATIVE=$ccnative -CC_EXECTYPE=$exectype -CC_HOSTTYPE=$hosttype -CC_ALTPP_FLAGS=$ppopt -CC_ALTPP_ENV=$ppenv -CC_AR=$ar -CC_AR_ARFLAGS=$ar_arflags -CC_ARFLAGS=$arflags -CC_DEBUG=$debug -CC_DIALECT=$dialect -CC_PICBIG=$cc_PIC -CC_PICSMALL=$cc_pic -CC_PIC=$CC_PICBIG -CC_DLL_ONLY=$cc_dll -case $CC_DLL_ONLY in -'') CC_DLLBIG= - CC_DLLSMALL= - CC_DLL= - ;; -*) CC_DLLBIG="$CC_DLL_ONLY $CC_PICBIG" - CC_DLLSMALL="$CC_DLL_ONLY $CC_PICSMALL" - CC_DLL="$CC_DLL_ONLY $CC_PICBIG" - ;; -esac -CC_DLL_DIR=$dll_dir -CC_DLL_LIBRARIES=$dll_libraries -CC_DLL_VARIANTS=$dll_variants -CC_DYNAMIC=$dynamic -CC_EXPORT_DYNAMIC=$export_dynamic -CC_INCLUDE_LOCAL=$include_local -CC_LD=$ld -CC_LD_DYNAMIC=$lddynamic -CC_LD_LAZY=$ldlazy -CC_LD_NOLAZY=$ldnolazy -CC_LD_ORIGIN=$ldorigin -CC_LD_RECORD=$ldrecord -CC_LD_NORECORD=$ldnorecord -CC_LD_RUNPATH=$ldrunpath -CC_LD_STATIC=$ldstatic -CC_LD_STRIP=$ldstrip -CC_LIB_DLL=$lib_dll -CC_LIB_ALL=$lib_all -CC_LIB_UNDEF=$lib_undef -CC_MAKE_OPTIONS=$makeoptions -CC_NM=$nm -CC_NMEDIT=$nmedit -CC_NMFLAGS=$nmflags -CC_NOPROTECT=$no_protect -CC_OPTIMIZE=$optimize -CC_READONLY=$readonly -CC_REPOSITORY=$repository -CC_REQUIRE=$require -CC_RUNPATH=$runpath -CC_SHARED=$shared -CC_SHARED_LD=$dld -CC_SHARED_NAME=$shared_name -CC_SHARED_REGISTRY=$shared_registry -CC_SHARED_REGISTRY_PATH=$probe_shared_registry_path -CC_SHELLMAGIC=$shellmagic -CC_SIZE=$size -CC_STATIC=$static -CC_STDINCLUDE=$stdinclude -CC_STDLIB=$stdlib -CC_STRICT=$strict -CC_STRIP=$strip -CC_STRIP_FLAGS=$stripflags -CC_PREFIX_ARCHIVE=$prefix_archive -CC_PREFIX_DYNAMIC=$prefix_dynamic -CC_PREFIX_SHARED=$prefix_shared -CC_PREFIX_SYMBOL=$symprefix -CC_SUFFIX_ARCHIVE=.$lib -CC_SUFFIX_COMMAND=$suffix_command -CC_SUFFIX_DEBUG=$sdb -CC_SUFFIX_DYNAMIC=$sd -CC_SUFFIX_LD=$ldscript -CC_SUFFIX_OBJECT=.$obj -CC_SUFFIX_SHARED=$so -CC_SUFFIX_SOURCE=.$src -CC_SUFFIX_STATIC=$sa -CC_VERSION=$version_flags -CC_WARN=$warn -CC_ATTRIBUTES=$ATTRIBUTES - -exec >&3 - -# -# check for local override -# all CC_* but { CC_CC CC_VERSION_STAMP CC_VERSION_STRING } may be modified -# additional CC.* may be printed on stdout -# - -if test -f "$dir/probe.lcl" -then . "$dir/probe.lcl" -fi - -# -# the payoff -# - -case $version_stamp in -?*) echo "# $version_stamp" ;; -esac -echo CC.CC = $cc -echo CC.NATIVE = $CC_NATIVE -echo CC.EXECTYPE = $CC_EXECTYPE -echo CC.HOSTTYPE = $CC_HOSTTYPE -echo CC.ALTPP.FLAGS = $CC_ALTPP_FLAGS -echo CC.ALTPP.ENV = $CC_ALTPP_ENV -echo CC.AR = $CC_AR -echo CC.AR.ARFLAGS = $CC_AR_ARFLAGS -echo CC.ARFLAGS = $CC_ARFLAGS -echo CC.DEBUG = $CC_DEBUG -echo CC.DIALECT = $CC_DIALECT -echo CC.DLLBIG = $CC_DLLBIG -echo CC.DLLSMALL = $CC_DLLSMALL -echo CC.DLL = $CC_DLL -echo CC.DLL.DEF = $cc_dll_def -echo CC.DLL.DIR = $CC_DLL_DIR -echo CC.DLL.LIBRARIES = $CC_DLL_LIBRARIES -echo CC.DLL.VARIANTS = $CC_DLL_VARIANTS -echo CC.DYNAMIC = $CC_DYNAMIC -echo CC.EXPORT.DYNAMIC = $CC_EXPORT_DYNAMIC -echo CC.INCLUDE.LOCAL = $CC_INCLUDE_LOCAL -# -# 2004-02-14 release workaround -# -case $CC_SHARED_LD in -$CC_CC) echo if LDSHARED - echo CC.LD = $CC_LD - echo else - echo CC.LD = $CC_CC - echo end - ;; -*) echo CC.LD = $CC_LD - ;; -esac -echo CC.LD.DYNAMIC = $CC_LD_DYNAMIC -echo CC.LD.LAZY = $CC_LD_LAZY -echo CC.LD.NOLAZY = $CC_LD_NOLAZY -echo CC.LD.ORIGIN = $CC_LD_ORIGIN -echo CC.LD.RECORD = $CC_LD_RECORD -echo CC.LD.NORECORD = $CC_LD_NORECORD -echo CC.LD.RUNPATH = $CC_LD_RUNPATH -echo CC.LD.STATIC = $CC_LD_STATIC -echo CC.LD.STRIP = $CC_LD_STRIP -echo CC.LIB.DLL = $CC_LIB_DLL -echo CC.LIB.ALL = $CC_LIB_ALL -echo CC.LIB.UNDEF = $CC_LIB_UNDEF -echo CC.MAKE.OPTIONS = $CC_MAKE_OPTIONS -echo CC.NM = $CC_NM -case $CC_NMEDIT in -?*) CC_NMEDIT=" $CC_NMEDIT" ;; -esac -echo CC.NMEDIT ="$CC_NMEDIT" -echo CC.NMFLAGS = $CC_NMFLAGS -echo CC.NOPROTECT = $CC_NOPROTECT -echo CC.OPTIMIZE = $CC_OPTIMIZE -echo CC.PICBIG = $CC_PICBIG -echo CC.PICSMALL = $CC_PICSMALL -echo CC.PIC = $CC_PIC -echo CC.READONLY = $CC_READONLY -echo CC.REPOSITORY = $CC_REPOSITORY -for f in $CC_REQUIRE -do echo CC.REQUIRE.$f =`cat req.$f` -done -echo CC.RUNPATH = $CC_RUNPATH -echo CC.SHARED = $CC_SHARED -echo CC.SHARED.LD = $CC_SHARED_LD -echo CC.SHARED.NAME = $CC_SHARED_NAME -echo CC.SHARED.REGISTRY = $CC_SHARED_REGISTRY -echo CC.SHARED.REGISTRY.PATH = $CC_SHARED_REGISTRY_PATH -echo CC.SHELLMAGIC = $CC_SHELLMAGIC -echo CC.SIZE = $CC_SIZE -echo CC.STATIC = $CC_STATIC -echo CC.STDINCLUDE = $CC_STDINCLUDE -echo CC.STDLIB = $CC_STDLIB -echo CC.STRICT = $CC_STRICT -echo CC.STRIP = $CC_STRIP -echo CC.STRIP.FLAGS = $CC_STRIP_FLAGS -echo CC.PREFIX.ARCHIVE = $CC_PREFIX_ARCHIVE -echo CC.PREFIX.DYNAMIC = $CC_PREFIX_DYNAMIC -echo CC.PREFIX.SHARED = $CC_PREFIX_SHARED -echo CC.PREFIX.SYMBOL = $CC_PREFIX_SYMBOL -echo CC.SUFFIX.ARCHIVE = $CC_SUFFIX_ARCHIVE -echo CC.SUFFIX.COMMAND = $CC_SUFFIX_COMMAND -echo CC.SUFFIX.DEBUG = $CC_SUFFIX_DEBUG -echo CC.SUFFIX.DYNAMIC = $CC_SUFFIX_DYNAMIC -echo CC.SUFFIX.LD = $CC_SUFFIX_LD -echo CC.SUFFIX.OBJECT = $CC_SUFFIX_OBJECT -echo CC.SUFFIX.SHARED = $CC_SUFFIX_SHARED -echo CC.SUFFIX.SOURCE = $CC_SUFFIX_SOURCE -echo CC.SUFFIX.STATIC = $CC_SUFFIX_STATIC -echo CC.VERSION = $CC_VERSION -case $CC_VERSION_STRING in -*\"*) i=`echo " $CC_VERSION_STRING" | sed -e 's,",\\\\",g' -e 's,^ ,,' -e 's,.*,"&",'` ;; -*\'*) i=\"$CC_VERSION_STRING\" ;; -*) i=$CC_VERSION_STRING ;; -esac -cat < * -* * -***********************************************************************/ -#pragma clang diagnostic ignored "-Wdeprecated-register" -#pragma clang diagnostic ignored "-Wparentheses" - -/* - * mamake -- MAM make - * - * coded for portability - */ - -#define RELEASE_DATE "2021-01-21" -static char id[] = "\n@(#)$Id: mamake (ksh 93u+m) " RELEASE_DATE " $\0\n"; - -#if _PACKAGE_ast - -#include -#include - -static const char usage[] = -"[-?\n@(#)$Id: mamake (ksh 93u+m) " RELEASE_DATE " $\n]" -"[-author?Glenn Fowler ]" -"[-copyright?(c) 1994-2012 AT&T Intellectual Property]" -"[-copyright?(c) 2020-2021 Contributors to https://github.com/ksh93/ksh]" -"[-license?http://www.eclipse.org/org/documents/epl-v10.html]" -"[+NAME?mamake - make abstract machine make]" -"[+DESCRIPTION?\bmamake\b reads \amake abstract machine\a target and" -" prerequisite file descriptions from a mamfile (see \b-f\b) and executes" -" actions to update targets that are older than their prerequisites." -" Mamfiles are portable to environments that only have" -" \bsh\b(1) and \bcc\b(1).]" -"[+?Mamfiles are used rather than" -" old-\bmake\b makefiles because some features are not reliably supported" -" across all \bmake\b variants:]{" -" [+action execution?Multi-line actions are executed as a" -" unit by \b$SHELL\b. There are some shell constructs" -" that cannot be expressed in an old-\bmake\b makefile.]" -" [+viewpathing?\bVPATH\b is properly interpreted. This allows" -" source to be separate from generated files.]" -" [+recursion?Ordered subdirectory recursion over unrelated" -" makefiles.]" -" }" -"[+?\bmamprobe\b(1) is called to probe and generate system specific variable" -" definitions. The probe information is regenerated when it is older" -" than the \bmamprobe\b command.]" -"[+?For compatibility with \bnmake\b(1) the \b-K\b option and the" -" \brecurse\b and \bcc-*\b command line targets are ignored.]" -"[e:?Explain reason for triggering action. Ignored if -F is on.]" -"[f:?Read \afile\a instead of the default.]:[file:=Mamfile]" -"[i:?Ignore action errors.]" -"[k:?Continue after error with sibling prerequisites.]" -"[n:?Print actions but do not execute. Recursion actions (see \b-r\b) are still" -" executed. Use \b-N\b to disable recursion actions too.]" -"[r:?Recursively make leaf directories matching \apattern\a. Only leaf" -" directories containing a makefile named \bNmakefile\b, \bnmakefile\b," -" \bMakefile\b or \bmakefile\b are considered. The first makefile" -" found in each leaf directory is scanned for leaf directory" -" prerequisites; the recursion order is determined by a topological sort" -" of these prerequisites.]:[pattern]" -"[C:?Do all work in \adirectory\a. All messages will mention" -" \adirectory\a.]:[directory]" -"[D:?Set the debug trace level to \alevel\a. Higher levels produce more" -" output.]#[level]" -"[F:?Force all targets to be out of date.]" -"[K:?Ignored.]" -"[N:?Like \b-n\b but recursion actions (see \b-r\b) are also disabled.]" -"[V:?Print the program version and exit.]" -"[G:debug-symbols?Compile and link with debugging symbol options enabled.]" -"[S:strip-symbols?Strip link-time static symbols from executables.]" - -"\n" -"\n[ target ... ] [ name=value ... ]\n" -"\n" - -"[+SEE ALSO?\bgmake\b(1), \bmake\b(1), \bmamprobe\b(1)," -" \bnmake\b(1), \bsh\b(1)]" -; - -#else - -#define elementsof(x) (sizeof(x)/sizeof(x[0])) -#define newof(p,t,n,x) ((p)?(t*)realloc((char*)(p),sizeof(t)*(n)+(x)):(t*)calloc(1,sizeof(t)*(n)+(x))) - -#define NiL ((char*)0) - -#endif - -#include -#include -#include -#include -#include -#include - -#if !_PACKAGE_ast -#include -#include -#endif - -#define delimiter(c) ((c)==' '||(c)=='\t'||(c)=='\n'||(c)==';'||(c)=='('||(c)==')'||(c)=='`'||(c)=='|'||(c)=='&'||(c)=='=') - -#define add(b,c) (((b)->nxt >= (b)->end) ? append(b, "") : NiL, *(b)->nxt++ = (c)) -#define get(b) ((b)->nxt-(b)->buf) -#define set(b,o) ((b)->nxt=(b)->buf+(o)) -#define use(b) (*(b)->nxt=0,(b)->nxt=(b)->buf) - -#define CHUNK 4096 -#define KEY(a,b,c,d) ((((unsigned long)(a))<<15)|(((unsigned long)(b))<<10)|(((unsigned long)(c))<<5)|(((unsigned long)(d)))) -#define NOW ((unsigned long)time((time_t*)0)) -#define ROTATE(p,l,r,t) ((t)=(p)->l,(p)->l=(t)->r,(t)->r=(p),(p)=(t)) - -#define RULE_active 0x0001 /* active target */ -#define RULE_dontcare 0x0002 /* ok if not found */ -#define RULE_error 0x0004 /* not found or not generated */ -#define RULE_exists 0x0008 /* target file exists */ -#define RULE_generated 0x0010 /* generated target */ -#define RULE_ignore 0x0020 /* ignore time */ -#define RULE_implicit 0x0040 /* implicit prerequisite */ -#define RULE_made 0x0080 /* already made */ -#define RULE_virtual 0x0100 /* not a file */ - -#define STREAM_KEEP 0x0001 /* don't fclose() on pop() */ -#define STREAM_MUST 0x0002 /* push() file must exist */ -#define STREAM_PIPE 0x0004 /* pclose() on pop() */ - -#ifndef S_IXUSR -#define S_IXUSR 0100 /* owner execute permission */ -#endif -#ifndef S_IXGRP -#define S_IXGRP 0010 /* group execute permission */ -#endif -#ifndef S_IXOTH -#define S_IXOTH 0001 /* other execute permission */ -#endif - -struct Rule_s; - -typedef struct stat Stat_t; -typedef FILE Stdio_t; - -typedef struct Buf_s /* buffer stream */ -{ - struct Buf_s* old; /* next dropped buffer */ - char* end; /* 1 past end of buffer */ - char* nxt; /* next char to add */ - char* buf; /* buffer space */ -} Buf_t; - -typedef struct Dict_item_s /* dictionary item */ -{ - struct Dict_item_s* left; /* left child */ - struct Dict_item_s* right; /* right child */ - void* value; /* user defined value */ - char name[1];/* 0 terminated name */ -} Dict_item_t; - -typedef struct Dict_s /* dictionary handle */ -{ - Dict_item_t* root; /* root item */ -} Dict_t; - -typedef struct List_s /* Rule_t list */ -{ - struct List_s* next; /* next in list */ - struct Rule_s* rule; /* list item */ -} List_t; - -typedef struct Rule_s /* rule item */ -{ - char* name; /* unbound name */ - char* path; /* bound path */ - List_t* prereqs; /* prerequisites */ - struct Rule_s* leaf; /* recursion leaf alias */ - int flags; /* RULE_* flags */ - int making; /* currently make()ing */ - unsigned long time; /* modification time */ -} Rule_t; - -typedef struct Stream_s /* input file stream stack */ -{ - Stdio_t* fp; /* read stream */ - char* file; /* stream path */ - unsigned long line; /* stream line */ - int flags; /* stream flags */ -} Stream_t; - -typedef struct View_s /* viewpath level */ -{ - struct View_s* next; /* next level in viewpath */ - int node; /* viewpath node path length */ - char dir[1]; /* viewpath level dir prefix */ -} View_t; - -static struct /* program state */ -{ - Buf_t* buf; /* work buffer */ - Buf_t* old; /* dropped buffers */ - Buf_t* opt; /* option buffer */ - - Dict_t* leaf; /* recursion leaf dictionary */ - Dict_t* libs; /* library dictionary */ - Dict_t* rules; /* rule dictionary */ - Dict_t* vars; /* variable dictionary */ - - View_t* view; /* viewpath levels */ - - char* directory; /* work in this directory */ - char* id; /* command name */ - char* file; /* first input file */ - char* pwd; /* current directory */ - char* recurse; /* recursion pattern */ - char* shell; /* ${SHELL} */ - - int active; /* targets currently active */ - int debug; /* negative of debug level */ - int errors; /* some error(s) occurred */ - int exec; /* execute actions */ - int explain; /* explain actions */ - int force; /* all targets out of date */ - int ignore; /* ignore command errors */ - int indent; /* debug indent */ - int keepgoing; /* do siblings on error */ - int never; /* never execute */ - int peek; /* next line already in input */ - int probed; /* probe already done */ - int verified; /* don't bother with verify() */ - - Stream_t streams[4]; /* input file stream stack */ - Stream_t* sp; /* input stream stack pointer */ - - char input[8*CHUNK]; /* input buffer */ -} state; - -static unsigned long make(Rule_t*); - -static char mamfile[] = "Mamfile"; -static char sh[] = "/bin/sh"; - -extern char** environ; - -#if !_PACKAGE_ast - -#if defined(NeXT) || defined(__NeXT) -#define getcwd(a,b) getwd(a) -#endif - -/* - * emit usage message and exit - */ - -static void -usage() -{ - fprintf(stderr, "Usage: %s [-iknFKNV] [-f mamfile] [-r pattern] [-C directory] [-D level] [target ...] [name=value ...]\n", state.id); - exit(2); -} - -#endif - -/* - * output error message identification - */ - -static void -identify(Stdio_t* sp) -{ - if (state.directory) - fprintf(sp, "%s [%s]: ", state.id, state.directory); - else - fprintf(sp, "%s: ", state.id); -} - -/* - * emit error message - * level: - * <0 debug - * 0 info - * 1 warning - * 2 error - * >2 exit(level-2) - */ - -static void -report(int level, char* text, char* item, unsigned long stamp) -{ - int i; - - if (level >= state.debug) - { - if (level) - identify(stderr); - if (level < 0) - { - fprintf(stderr, "debug%d: ", level); - for (i = 1; i < state.indent; i++) - fprintf(stderr, " "); - } - else - { - if (state.sp && state.sp->line) - { - if (state.sp->file) - fprintf(stderr, "%s: ", state.sp->file); - fprintf(stderr, "%ld: ", state.sp->line); - } - if (level == 1) - fprintf(stderr, "warning: "); - else if (level > 1) - state.errors = 1; - } - if (item) - fprintf(stderr, "%s: ", item); - fprintf(stderr, "%s", text); - if (stamp && state.debug <= -2) - fprintf(stderr, " %10lu", stamp); - fprintf(stderr, "\n"); - if (level > 2) - exit(level - 2); - } -} - -/* - * don't know how to make or exit code making - */ - -static void -dont(Rule_t* r, int code, int keepgoing) -{ - identify(stderr); - if (!code) - fprintf(stderr, "don't know how to make %s\n", r->name); - else - { - fprintf(stderr, "*** exit code %d making %s%s\n", code, r->name, state.ignore ? " ignored" : ""); - unlink(r->name); - if (state.ignore) - return; - } - if (!keepgoing) - exit(1); - state.errors++; - r->flags |= RULE_error; -} - -/* - * local strrchr() - */ - -static char* -last(register char* s, register int c) -{ - register char* r = 0; - - for (r = 0; *s; s++) - if (*s == c) - r = s; - return r; -} - -/* - * open a buffer stream - */ - -static Buf_t* -buffer(void) -{ - register Buf_t* buf; - - if (buf = state.old) - state.old = state.old->old; - else if (!(buf = newof(0, Buf_t, 1, 0)) || !(buf->buf = newof(0, char, CHUNK, 0))) - report(3, "out of memory [buffer]", NiL, (unsigned long)0); - buf->end = buf->buf + CHUNK; - buf->nxt = buf->buf; - return buf; -} - -/* - * close a buffer stream - */ - -static void -drop(Buf_t* buf) -{ - buf->old = state.old; - state.old = buf; -} - -/* - * append str length n to buffer and return the buffer base - */ - -static char* -appendn(Buf_t* buf, char* str, int n) -{ - int m; - int i; - - if ((n + 1) >= (buf->end - buf->nxt)) - { - i = buf->nxt - buf->buf; - m = (((buf->end - buf->buf) + n + CHUNK + 1) / CHUNK) * CHUNK; - if (!(buf->buf = newof(buf->buf, char, m, 0))) - report(3, "out of memory [buffer resize]", NiL, (unsigned long)0); - buf->end = buf->buf + m; - buf->nxt = buf->buf + i; - } - memcpy(buf->nxt, str, n + 1); - buf->nxt += n; - return buf->buf; -} - -/* - * append str to buffer and return the buffer base - * if str==0 then next pointer reset to base - */ - -static char* -append(Buf_t* buf, char* str) -{ - if (str) - return appendn(buf, str, strlen(str)); - buf->nxt = buf->buf; - return buf->buf; -} - -/* - * allocate space for s and return the copy - */ - -static char* -duplicate(char* s) -{ - char* t; - int n; - - n = strlen(s); - if (!(t = newof(0, char, n, 1))) - report(3, "out of memory [duplicate]", s, (unsigned long)0); - strcpy(t, s); - return t; -} - -/* - * open a new dictionary - */ - -static Dict_t* -dictionary(void) -{ - Dict_t* dict; - - if (!(dict = newof(0, Dict_t, 1, 0))) - report(3, "out of memory [dictionary]", NiL, (unsigned long)0); - return dict; -} - -/* - * return the value for item name in dictionary dict - * if value!=0 then name entry value is created if necessary and set - * uses top-down splaying (ala Tarjan and Sleator) - */ - -static void* -search(register Dict_t* dict, char* name, void* value) -{ - register int cmp; - register Dict_item_t* root; - register Dict_item_t* t; - register Dict_item_t* left; - register Dict_item_t* right; - register Dict_item_t* lroot; - register Dict_item_t* rroot; - - root = dict->root; - left = right = lroot = rroot = 0; - while (root) - { - if (!(cmp = strcmp(name, root->name))) - break; - else if (cmp < 0) - { - if (root->left && (cmp = strcmp(name, root->left->name)) <= 0) - { - ROTATE(root, left, right, t); - if (!cmp) - break; - } - if (right) - right->left = root; - else - rroot = root; - right = root; - root = root->left; - right->left = 0; - } - else - { - if (root->right && (cmp = strcmp(name, root->right->name)) >= 0) - { - ROTATE(root, right, left, t); - if (!cmp) - break; - } - if (left) - left->right = root; - else - lroot = root; - left = root; - root = root->right; - left->right = 0; - } - } - if (root) - { - if (right) - right->left = root->right; - else - rroot = root->right; - if (left) - left->right = root->left; - else - lroot = root->left; - } - else if (value) - { - if (!(root = newof(0, Dict_item_t, 1, strlen(name)))) - report(3, "out of memory [dictionary]", name, (unsigned long)0); - strcpy(root->name, name); - } - if (root) - { - if (value) - root->value = value; - root->left = lroot; - root->right = rroot; - dict->root = root; - return value ? (void*)root->name : root->value; - } - if (left) - { - left->right = rroot; - dict->root = lroot; - } - else if (right) - { - right->left = lroot; - dict->root = rroot; - } - return 0; -} - -/* - * low level for walk() - */ - -static int -apply(Dict_t* dict, Dict_item_t* item, int (*func)(Dict_item_t*, void*), void* handle) -{ - register Dict_item_t* right; - - do - { - right = item->right; - if (item->left && apply(dict, item->left, func, handle)) - return -1; - if ((*func)(item, handle)) - return -1; - } while (item = right); - return 0; -} - -/* - * apply func to each dictionary item - */ - -static int -walk(Dict_t* dict, int (*func)(Dict_item_t*, void*), void* handle) -{ - return dict->root ? apply(dict, dict->root, func, handle) : 0; -} - -/* - * return a rule pointer for name - */ - -static Rule_t* -rule(char* name) -{ - Rule_t* r; - - if (!(r = (Rule_t*)search(state.rules, name, NiL))) - { - if (!(r = newof(0, Rule_t, 1, 0))) - report(3, "out of memory [rule]", name, (unsigned long)0); - r->name = (char*)search(state.rules, name, (void*)r); - } - return r; -} - -/* - * prepend p onto rule r prereqs - */ - -static void -cons(Rule_t* r, Rule_t* p) -{ - register List_t* x; - - for (x = r->prereqs; x && x->rule != p; x = x->next); - if (!x) - { - if (!(x = newof(0, List_t, 1, 0))) - report(3, "out of memory [list]", r->name, (unsigned long)0); - x->rule = p; - x->next = r->prereqs; - r->prereqs = x; - } -} - -/* - * initialize the viewpath - */ - -static void -view(void) -{ - register char* s; - register char* t; - register char* p; - register View_t* vp; - - View_t* zp; - int c; - int n; - - Stat_t st; - Stat_t ts; - - char buf[CHUNK]; - - if (stat(".", &st)) - report(3, "cannot stat", ".", (unsigned long)0); - if ((s = (char*)search(state.vars, "PWD", NiL)) && !stat(s, &ts) && - ts.st_dev == st.st_dev && ts.st_ino == st.st_ino) - state.pwd = s; - if (!state.pwd) - { - if (!getcwd(buf, sizeof(buf) - 1)) - report(3, "cannot determine PWD", NiL, (unsigned long)0); - state.pwd = duplicate(buf); - search(state.vars, "PWD", state.pwd); - } - if ((s = (char*)search(state.vars, "VPATH", NiL)) && *s) - { - zp = 0; - for (;;) - { - for (t = s; *t && *t != ':'; t++); - if (c = *t) - *t = 0; - if (!state.view) - { - /* - * determine the viewpath offset - */ - - if (stat(s, &st)) - report(3, "cannot stat top view", s, (unsigned long)0); - if (stat(state.pwd, &ts)) - report(3, "cannot stat", state.pwd, (unsigned long)0); - if (ts.st_dev == st.st_dev && ts.st_ino == st.st_ino) - p = "."; - else - { - p = state.pwd + strlen(state.pwd); - while (p > state.pwd) - if (*--p == '/') - { - if (p == state.pwd) - report(3, ". not under VPATH", s, (unsigned long)0); - *p = 0; - if (stat(state.pwd, &ts)) - report(3, "cannot stat", state.pwd, (unsigned long)0); - *p = '/'; - if (ts.st_dev == st.st_dev && ts.st_ino == st.st_ino) - { - p++; - break; - } - } - if (p <= state.pwd) - report(3, "cannot determine viewpath offset", s, (unsigned long)0); - } - } - n = strlen(s); - if (!(vp = newof(0, View_t, 1, strlen(p) + n + 1))) - report(3, "out of memory [view]", s, (unsigned long)0); - vp->node = n + 1; - strcpy(vp->dir, s); - *(vp->dir + n) = '/'; - strcpy(vp->dir + n + 1, p); - report(-4, vp->dir, "view", (unsigned long)0); - if (!state.view) - state.view = zp = vp; - else - zp = zp->next = vp; - if (!c) - break; - *t++ = c; - s = t; - } - } -} - -/* - * return next '?' or '}' in nested '}' - */ - -static char* -cond(register char* s) -{ - register int n; - - if (*s == '?') - s++; - n = 0; - for (;;) - { - switch (*s++) - { - case 0: - break; - case '{': - n++; - continue; - case '}': - if (!n--) - break; - continue; - case '?': - if (!n) - break; - continue; - default: - continue; - } - break; - } - return s - 1; -} - -/* - * expand var refs from s into buf - */ - -static void -substitute(Buf_t* buf, register char* s) -{ - register char* t; - register char* v; - register char* q; - register char* b; - register int c; - register int n; - int a = 0; - int i; - - while (c = *s++) - { - if (c == '$' && *s == '{') - { - b = s - 1; - i = 1; - for (n = *(t = ++s) == '-' ? 0 : '-'; (c = *s) && c != '?' && c != '+' && c != n && c != ':' && c != '=' && c != '[' && c != '}'; s++) - if (!isalnum(c) && c != '_') - i = 0; - *s = 0; - if (c == '[') - { - append(buf, b); - *s = c; - continue; - } - v = (char*)search(state.vars, t, NiL); - if ((c == ':' || c == '=') && (!v || c == ':' && !*v)) - { - append(buf, b); - *s = c; - continue; - } - if (t[0] == 'A' && t[1] == 'R' && t[2] == 0) - a = 1; - *s = c; - if (c && c != '}') - { - n = 1; - for (t = ++s; *s; s++) - if (*s == '{') - n++; - else if (*s == '}' && !--n) - break; - } - switch (c) - { - case '?': - q = cond(t - 1); - if (v) - { - if (((q - t) != 1 || *t != '*') && strncmp(v, t, q - t)) - v = 0; - } - else if (q == t) - v = s; - t = cond(q); - if (v) - { - if (t > q) - { - c = *t; - *t = 0; - substitute(buf, q + 1); - *t = c; - } - } - else - { - q = cond(t); - if (q > t) - { - c = *q; - *q = 0; - substitute(buf, t + 1); - *q = c; - } - } - break; - case '+': - case '-': - if ((v == 0 || *v == 0) == (c == '-')) - { - c = *s; - *s = 0; - substitute(buf, t); - *s = c; - break; - } - if (c != '-') - break; - /* FALLTHROUGH */ - case 0: - case '=': - case '}': - if (v) - { - if (a && t[0] == 'm' && t[1] == 'a' && t[2] == 'm' && t[3] == '_' && t[4] == 'l' && t[5] == 'i' && t[6] == 'b') - { - for (t = v; *t == ' '; t++); - for (; *t && *t != ' '; t++); - if (*t) - *t = 0; - else - t = 0; - substitute(buf, v); - if (t) - *t = ' '; - } - else - substitute(buf, v); - } - else if (i) - { - c = *s; - *s = 0; - append(buf, b); - *s = c; - continue; - } - break; - } - if (*s) - s++; - } - else - add(buf, c); - } -} - -/* - * expand var refs from s into buf and return buf base - */ - -static char* -expand(Buf_t* buf, char* s) -{ - substitute(buf, s); - return use(buf); -} - -/* - * stat() with .exe check - */ - -static char* -status(Buf_t* buf, int off, char* path, struct stat* st) -{ - int r; - char* s; - Buf_t* tmp; - - if (!stat(path, st)) - return path; - if (!(tmp = buf)) - { - tmp = buffer(); - off = 0; - } - if (off) - set(tmp, off); - else - append(tmp, path); - append(tmp, ".exe"); - s = use(tmp); - r = stat(s, st); - if (!buf) - { - drop(tmp); - s = path; - } - if (r) - { - if (off) - s[off] = 0; - s = 0; - } - return s; -} - -/* - * return path to file - */ - -static char* -find(Buf_t* buf, char* file, struct stat* st) -{ - char* s; - View_t* vp; - int node; - int c; - int o; - - if (s = status(buf, 0, file, st)) - { - report(-3, s, "find", (unsigned long)0); - return s; - } - if (vp = state.view) - { - node = 0; - if (*file == '/') - { - do - { - if (!strncmp(file, vp->dir, vp->node)) - { - file += vp->node; - node = 2; - break; - } - } while (vp = vp->next); - } - else - vp = vp->next; - if (vp) - do - { - if (node) - { - c = vp->dir[vp->node]; - vp->dir[vp->node] = 0; - append(buf, vp->dir); - vp->dir[vp->node] = c; - } - else - { - append(buf, vp->dir); - append(buf, "/"); - } - append(buf, file); - o = get(buf); - s = use(buf); - if (s = status(buf, o, s, st)) - { - report(-3, s, "find", (unsigned long)0); - return s; - } - } while (vp = vp->next); - } - return 0; -} - -/* - * bind r to a file and return the modify time - */ - -static unsigned long -bind(Rule_t* r) -{ - char* s; - Buf_t* buf; - struct stat st; - - buf = buffer(); - if (s = find(buf, r->name, &st)) - { - if (s != r->name) - r->path = duplicate(s); - r->time = st.st_mtime; - r->flags |= RULE_exists; - } - drop(buf); - return r->time; -} - -/* - * pop the current input file - */ - -static int -pop(void) -{ - int r; - - if (!state.sp) - report(3, "input stack underflow", NiL, (unsigned long)0); - if (!state.sp->fp || (state.sp->flags & STREAM_KEEP)) - r = 0; - else if (state.sp->flags & STREAM_PIPE) - r = pclose(state.sp->fp); - else - r = fclose(state.sp->fp); - if (state.sp == state.streams) - state.sp = 0; - else - state.sp--; - return r; -} - -/* - * push file onto the input stack - */ - -static int -push(char* file, Stdio_t* fp, int flags) -{ - char* path; - Buf_t* buf; - struct stat st; - - if (!state.sp) - state.sp = state.streams; - else if (++state.sp >= &state.streams[elementsof(state.streams)]) - report(3, "input stream stack overflow", NiL, (unsigned long)0); - if (state.sp->fp = fp) - { - if(state.sp->file) - free(state.sp->file); - state.sp->file = strdup("pipeline"); - if(!state.sp->file) - report(3, "out of memory [push]", NiL, (unsigned long)0); - } - else if (flags & STREAM_PIPE) - report(3, "pipe error", file, (unsigned long)0); - else if (!file || !strcmp(file, "-") || !strcmp(file, "/dev/stdin")) - { - flags |= STREAM_KEEP; - if(state.sp->file) - free(state.sp->file); - state.sp->file = strdup("/dev/stdin"); - if(!state.sp->file) - report(3, "out of memory [push]", NiL, (unsigned long)0); - state.sp->fp = stdin; - } - else - { - buf = buffer(); - if (path = find(buf, file, &st)) - { - if (!(state.sp->fp = fopen(path, "r"))) - report(3, "cannot read", path, (unsigned long)0); - if(state.sp->file) - free(state.sp->file); - state.sp->file = duplicate(path); - drop(buf); - } - else - { - drop(buf); - pop(); - if (flags & STREAM_MUST) - report(3, "not found", file, (unsigned long)0); - return 0; - } - } - state.sp->flags = flags; - state.sp->line = 0; - return 1; -} - -/* - * return the next input line - */ - -static char* -input(void) -{ - char* e; - - if (!state.sp) - report(3, "no input file stream", NiL, (unsigned long)0); - if (state.peek) - state.peek = 0; - else if (!fgets(state.input, sizeof(state.input), state.sp->fp)) - return 0; - else if (*state.input && *(e = state.input + strlen(state.input) - 1) == '\n') - *e = 0; - state.sp->line++; - e = state.input; - while (isspace(*e)) - e++; /* allow indentation */ - return e; -} - -/* - * pass shell action s to ${SHELL:-/bin/sh} - * the -c wrapper ensures that scripts are run in the selected shell - * even on systems that otherwise demand #! magic (can you say Cygwin) - */ - -static int -execute(register char* s) -{ - register int c; - Buf_t* buf; - - if (!state.shell && (!(state.shell = (char*)search(state.vars, "SHELL", NiL)) || !strcmp(state.shell, sh))) - state.shell = sh; - buf = buffer(); - append(buf, state.shell); - append(buf, " -c '"); - while (c = *s++) - { - if (c == '\'') - { - add(buf, c); - for (s--; *s == c; s++) - { - add(buf, '\\'); - add(buf, c); - } - } - add(buf, c); - } - add(buf, '\''); - s = use(buf); - report(-5, s, "exec", (unsigned long)0); - if ((c = system(s)) > 255) - c >>= 8; - drop(buf); - return c; -} - -/* - * run action s to update r - */ - -static unsigned long -run(Rule_t* r, register char* s) -{ - register Rule_t* q; - register char* t; - register int c; - register View_t* v; - int i; - int j; - int x; - Stat_t st; - Buf_t* buf; - - if (r->flags & RULE_error) - return r->time; - buf = buffer(); - if (!strncmp(s, "mamake -r ", 10)) - { - state.verified = 1; - x = !state.never; - } - else - x = state.exec; - if (x) - append(buf, "trap - 1 2 3 15\nPATH=.:$PATH\nset -x\n"); - if (state.view) - { - do - { - for (; delimiter(*s); s++) - add(buf, *s); - for (t = s; *s && !delimiter(*s); s++); - c = *s; - *s = 0; - if (c == '=') - { - append(buf, t); - continue; - } - if ((q = (Rule_t*)search(state.rules, t, NiL)) && q->path && !(q->flags & RULE_generated)) - append(buf, q->path); - else - { - append(buf, t); - if (*t == '-' && *(t + 1) == 'I' && (*(t + 2) || c)) - { - if (*(t + 2)) - i = 2; - else - { - for (i = 3; *(t + i) == ' ' || *(t + i) == '\t'; i++); - *s = c; - for (s = t + i; *s && *s != ' ' && *s != '\t' && *s != '\n'; s++); - c = *s; - *s = 0; - append(buf, t + 2); - } - if (*(t + i) && *(t + i) != '/') - { - v = state.view; - while (v = v->next) - { - add(buf, ' '); - for (j = 0; j < i; j++) - add(buf, *(t + j)); - append(buf, v->dir); - if (*(t + i) != '.' || *(t + i + 1)) - { - add(buf, '/'); - append(buf, t + i); - } - } - } - } - } - } while (*s = c); - s = use(buf); - } - else if (x) - { - append(buf, s); - s = use(buf); - } - if (x) - { - if (c = execute(s)) - dont(r, c, state.keepgoing); - if (status((Buf_t*)0, 0, r->name, &st)) - { - r->time = st.st_mtime; - r->flags |= RULE_exists; - } - else - r->time = NOW; - } - else - { - fprintf(stdout, "%s\n", s); - if (state.debug) - fflush(stdout); - r->time = NOW; - r->flags |= RULE_exists; - } - drop(buf); - return r->time; -} - -/* - * return the full path for s using buf workspace - */ - -static char* -path(Buf_t* buf, char* s, int must) -{ - register char* p; - register char* d; - register char* x; - char* e; - register int c; - int t; - int o; - Stat_t st; - - for (e = s; *e && *e != ' ' && *e != '\t'; e++); - t = *e; - if ((x = status(buf, 0, s, &st)) && (st.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH))) - return x; - if (!(p = (char*)search(state.vars, "PATH", NiL))) - report(3, "variable not defined", "PATH", (unsigned long)0); - do - { - for (d = p; *p && *p != ':'; p++); - c = *p; - *p = 0; - if (*d && (*d != '.' || *(d + 1))) - { - append(buf, d); - add(buf, '/'); - } - *p = c; - if (t) - *e = 0; - append(buf, s); - if (t) - *e = t; - o = get(buf); - x = use(buf); - if ((x = status(buf, o, x, &st)) && (st.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH))) - return x; - } while (*p++); - if (must) - report(3, "command not found", s, (unsigned long)0); - return 0; -} - -/* - * generate (if necessary) and read the MAM probe information - * done on the first `setv CC ...' - */ - -static void -probe(void) -{ - register char* cc; - register char* s; - unsigned long h; - unsigned long q; - Buf_t* buf; - Buf_t* pro; - Buf_t* tmp; - struct stat st; - - static char let[] = "ABCDEFGHIJKLMNOP"; - static char cmd[] = "mamprobe"; - - if (!(cc = (char*)search(state.vars, "CC", NiL))) - cc = "cc"; - buf = buffer(); - s = path(buf, cmd, 1); - q = stat(s, &st) ? (unsigned long)0 : (unsigned long)st.st_mtime; - pro = buffer(); - s = cc = path(pro, cc, 1); - for (h = 0; *s; s++) - h = h * 0x63c63cd9L + *s + 0x9c39c33dL; - if (!(s = (char*)search(state.vars, "INSTALLROOT", NiL))) - report(3, "variable must be defined", "INSTALLROOT", (unsigned long)0); - append(buf, s); - append(buf, "/lib/probe/C/mam/"); - for (h &= 0xffffffffL; h; h >>= 4) - add(buf, let[h & 0xf]); - s = use(buf); - h = stat(s, &st) ? (unsigned long)0 : (unsigned long)st.st_mtime; - if (h < q || !push(s, (Stdio_t*)0, 0)) - { - tmp = buffer(); - append(tmp, cmd); - add(tmp, ' '); - append(tmp, s); - add(tmp, ' '); - append(tmp, cc); - if (execute(use(tmp))) - report(3, "cannot generate probe info", s, (unsigned long)0); - drop(tmp); - if (!push(s, (Stdio_t*)0, 0)) - report(3, "cannot read probe info", s, (unsigned long)0); - } - drop(pro); - drop(buf); - make(rule("")); - pop(); -} - -/* - * add attributes in s to r - */ - -static void -attributes(register Rule_t* r, register char* s) -{ - register char* t; - register int n; - - for (;;) - { - for (; *s == ' '; s++); - for (t = s; *s && *s != ' '; s++); - if (!(n = s - t)) - break; - switch (*t) - { - case 'd': - if (n == 8 && !strncmp(t, "dontcare", n)) - r->flags |= RULE_dontcare; - break; - case 'g': - if (n == 9 && !strncmp(t, "generated", n)) - r->flags |= RULE_generated; - break; - case 'i': - if (n == 6 && !strncmp(t, "ignore", n)) - r->flags |= RULE_ignore; - else if (n == 8 && !strncmp(t, "implicit", n)) - r->flags |= RULE_implicit; - break; - case 'v': - if (n == 7 && !strncmp(t, "virtual", n)) - r->flags |= RULE_virtual; - break; - } - } -} - -/* - * define ${mam_libX} for library reference lib - */ - -static char* -require(char* lib, int dontcare) -{ - register int c; - char* s; - char* r; - FILE* f; - Buf_t* buf; - Buf_t* tmp; - struct stat st; - - int tofree = 0; - static int dynamic = -1; - - if (dynamic < 0) - dynamic = (s = search(state.vars, "mam_cc_L", NiL)) ? atoi(s) : 0; - if (!(r = search(state.vars, lib, NiL))) - { - buf = buffer(); - tmp = buffer(); - s = 0; - for (;;) - { - if (s) - append(buf, s); - if (r = search(state.vars, "mam_cc_PREFIX_ARCHIVE", NiL)) - append(buf, r); - append(buf, lib + 2); - if (r = search(state.vars, "mam_cc_SUFFIX_ARCHIVE", NiL)) - append(buf, r); - r = expand(tmp, use(buf)); - if (!stat(r, &st)) - break; - if (s) - { - r = lib; - break; - } - s = "${INSTALLROOT}/lib/"; - if (dynamic) - { - append(buf, s); - if (r = search(state.vars, "mam_cc_PREFIX_SHARED", NiL)) - append(buf, r); - append(buf, lib + 2); - if (r = search(state.vars, "mam_cc_SUFFIX_SHARED", NiL)) - append(buf, r); - r = expand(tmp, use(buf)); - if (!stat(r, &st)) - { - r = lib; - break; - } - } - } - if (r != lib) - { - tofree = 1; - r = duplicate(r); - } - search(state.vars, lib, r); - append(tmp, lib + 2); - append(tmp, ".req"); - if (!(f = fopen(use(tmp), "r"))) - { - append(tmp, "${INSTALLROOT}/lib/lib/"); - append(tmp, lib + 2); - f = fopen(expand(buf, use(tmp)), "r"); - } - if (f) - { - for (;;) - { - while ((c = fgetc(f)) == ' ' || c == '\t' || c == '\n'); - if (c == EOF) - break; - do - { - add(tmp, c); - } while ((c = fgetc(f)) != EOF && c != ' ' && c != '\t' && c != '\n'); - s = use(tmp); - if (s[0] && (s[0] != '-' || s[1])) - { - add(buf, ' '); - append(buf, require(s, 0)); - } - } - fclose(f); - if(tofree) - free(r); - r = use(buf); - } - else if (dontcare) - { - append(tmp, "set -\n"); - append(tmp, "cd \"${TMPDIR:-/tmp}\"\n"); - append(tmp, "echo 'int main(){return 0;}' > x.${!-$$}.c\n"); - append(tmp, "${CC} ${CCFLAGS} -o x.${!-$$}.x x.${!-$$}.c "); - append(tmp, r); - append(tmp, " >/dev/null 2>&1\n"); - append(tmp, "c=$?\n"); - append(tmp, "rm -f x.${!-$$}.[cox]\n"); - append(tmp, "exit $c\n"); - if (execute(expand(buf, use(tmp)))) - { - if(tofree) - free(r); - r = ""; - } - } - r = duplicate(r); - search(state.vars, lib, r); - append(tmp, "mam_lib"); - append(tmp, lib + 2); - search(state.vars, use(tmp), r); - drop(tmp); - drop(buf); - } - return r; -} - -/* - * input() until `done r' - */ - -static unsigned long -make(Rule_t* r) -{ - register char* s; - register char* t; - register char* u; - register char* v; - register Rule_t* q; - unsigned long z; - unsigned long x; - Buf_t* buf; - Buf_t* cmd; - - r->making++; - if (r->flags & RULE_active) - state.active++; - if (*r->name) - { - z = bind(r); - state.indent++; - report(-1, r->name, "make", r->time); - } - else - z = 0; - buf = buffer(); - cmd = 0; - while (s = input()) - { - for (; *s == ' '; s++); - for (; isdigit(*s); s++); - for (; *s == ' '; s++); - for (u = s; *s && *s != ' '; s++); - if (*s) - { - for (*s++ = 0; *s == ' '; s++); - for (t = s; *s && *s != ' '; s++); - if (*s) - for (*s++ = 0; *s == ' '; s++); - v = s; - } - else - t = v = s; - switch (KEY(u[0], u[1], u[2], u[3])) - { - case KEY('b','i','n','d'): - if ((t[0] == '-' || t[0] == '+') && t[1] == 'l' && (s = require(t, !strcmp(v, "dontcare"))) && strncmp(r->name, "FEATURE/", 8) && strcmp(r->name, "configure.h")) - for (;;) - { - for (t = s; *s && *s != ' '; s++); - if (*s) - *s = 0; - else - s = 0; - if (*t) - { - q = rule(expand(buf, t)); - attributes(q, v); - x = bind(q); - if (z < x) - z = x; - if (q->flags & RULE_error) - r->flags |= RULE_error; - } - if (!s) - break; - for (*s++ = ' '; *s == ' '; s++); - } - continue; - case KEY('d','o','n','e'): - q = rule(expand(buf, t)); - if (q != r) - report(2, "improper done statement", t, (unsigned long)0); - attributes(r, v); - if (cmd && state.active && (state.force || r->time < z || !r->time && !z)) - { - if (state.explain && !state.force) - { - if (!r->time) - fprintf(stderr, "%s [not found]\n", r->name); - else - fprintf(stderr, "%s [%lu] older than prerequisites [%lu]\n", r->name, r->time, z); - } - substitute(buf, use(cmd)); - x = run(r, use(buf)); - if (z < x) - z = x; - } - r->flags |= RULE_made; - if (!(r->flags & (RULE_dontcare|RULE_error|RULE_exists|RULE_generated|RULE_implicit|RULE_virtual))) - dont(r, 0, state.keepgoing); - break; - case KEY('e','x','e','c'): - r->flags |= RULE_generated; - if (r->path) - { - free(r->path); - r->path = 0; - r->time = 0; - } - if (state.active) - { - if (cmd) - add(cmd, '\n'); - else - cmd = buffer(); - append(cmd, v); - } - continue; - case KEY('m','a','k','e'): - q = rule(expand(buf, t)); - if (!q->making) - { - attributes(q, v); - x = make(q); - if (!(q->flags & RULE_ignore) && z < x) - z = x; - if (q->flags & RULE_error) - r->flags |= RULE_error; - } - continue; - case KEY('p','r','e','v'): - q = rule(expand(buf, t)); - if (!q->making) - { - if (!(q->flags & RULE_ignore) && z < q->time) - z = q->time; - if (q->flags & RULE_error) - r->flags |= RULE_error; - state.indent++; - report(-2, q->name, "prev", q->time); - state.indent--; - } - continue; - case KEY('s','e','t','v'): - if (!search(state.vars, t, NiL)) - { - if (*v == '"') - { - s = v + strlen(v) - 1; - if (*s == '"') - { - *s = 0; - v++; - } - } - search(state.vars, t, duplicate(expand(buf, v))); - } - if (!state.probed && t[0] == 'C' && t[1] == 'C' && !t[2]) - { - state.probed = 1; - probe(); - } - continue; - default: - continue; - } - break; - } - drop(buf); - if (cmd) - drop(cmd); - if (*r->name) - { - report(-1, r->name, "done", z); - state.indent--; - } - if (r->flags & RULE_active) - state.active--; - r->making--; - return r->time = z; -} - -/* - * verify that active targets were made - */ - -static int -verify(Dict_item_t* item, void* handle) -{ - Rule_t* r = (Rule_t*)item->value; - - if ((r->flags & (RULE_active|RULE_error|RULE_made)) == RULE_active) - dont(r, 0, 1); - return 0; -} - -/* - * return 1 if name is an initializer - */ - -static int -initializer(char* name) -{ - register char* s; - - if (s = last(name, '/')) - s++; - else - s = name; - return s[0] == 'I' && s[1] == 'N' && s[2] == 'I' && s[3] == 'T'; -} - -/* - * update recursion leaf r and its prerequisites - */ - -static int -update(register Rule_t* r) -{ - register List_t* x; - Buf_t* buf; - - static char cmd[] = "${MAMAKE} -C "; - static char arg[] = " ${MAMAKEARGS}"; - - r->flags |= RULE_made; - if (r->leaf) - r->leaf->flags |= RULE_made; - for (x = r->prereqs; x; x = x->next) - if (x->rule->leaf && !(x->rule->flags & RULE_made)) - update(x->rule); - buf = buffer(); - substitute(buf, cmd); - append(buf, r->name); - substitute(buf, arg); - run(r, use(buf)); - drop(buf); - return 0; -} - -/* - * scan makefile prereqs - */ - -static int -scan(Dict_item_t* item, void* handle) -{ - register Rule_t* r = (Rule_t*)item->value; - register char* s; - register char* t; - register char* u; - register char* w; - Rule_t* q; - int i; - int j; - int k; - int p; - Buf_t* buf; - - static char* files[] = - { - "Mamfile" - /* ksh 93u+m no longer uses these: - * "Nmakefile", - * "nmakefile", - * "Makefile", - * "makefile" - */ - }; - - /* - * drop non-leaf rules - */ - - if (!r->leaf) - return 0; - - /* - * always make initializers - */ - - if (initializer(r->name)) - { - if (!(r->flags & RULE_made)) - update(r); - return 0; - } - buf = buffer(); - for (i = 0; i < elementsof(files); i++) - { - append(buf, r->name); - add(buf, '/'); - append(buf, files[i]); - if (push(use(buf), (Stdio_t*)0, 0)) - { - while (s = input()) - { - j = p = 0; - while (*s) - { - for (k = 1; (i = *s) == ' ' || i == '\t' || i == '"' || i == '\''; s++); - for (t = s; (i = *s) && i != ' ' && i != '\t' && i != '"' && i != '\'' && i != '\\' && i != ':'; s++) - if (i == '/') - t = s + 1; - else if (i == '.' && *(s + 1) != 'c' && *(s + 1) != 'C' && *(s + 1) != 'h' && *(s + 1) != 'H' && t[0] == 'l' && t[1] == 'i' && t[2] == 'b') - *s = 0; - if (*s) - *s++ = 0; - if (!t[0]) - k = 0; - else if ((t[0] == '-' || t[0] == '+') && t[1] == 'l' && t[2]) - { - append(buf, "lib"); - append(buf, t + 2); - t = use(buf); - } - else if (p) - { - if (t[0] == '+' && !t[1]) - p = 2; - else if (p == 1) - { - if (i != ':' || strncmp(s, "command", 7)) - { - append(buf, "lib"); - append(buf, t); - t = use(buf); - } - if (i == ':') - while (*s && (*s == ' ' || *s == '\t')) - s++; - } - } - else if (i == ':') - { - if (j != ':' || !isupper(*t)) - k = 0; - else if (!strcmp(t, "PACKAGE")) - { - p = 1; - k = 0; - } - else - for (u = t; *u; u++) - if (isupper(*u)) - *u = tolower(*u); - else if (!isalnum(*u)) - { - k = 0; - break; - } - } - else if (t[0] != 'l' || t[1] != 'i' || t[2] != 'b') - k = 0; - else - for (u = t + 3; *u; u++) - if (!isalnum(*u)) - { - k = 0; - break; - } - if (k && ((q = (Rule_t*)search(state.leaf, t, NiL)) && q != r || *t++ == 'l' && *t++ == 'i' && *t++ == 'b' && *t && (q = (Rule_t*)search(state.leaf, t, NiL)) && q != r)) - { - for (t = w = r->name; *w; w++) - if (*w == '/') - t = w + 1; - if (t[0] == 'l' && t[1] == 'i' && t[2] == 'b') - t += 3; - for (u = w = q->name; *w; w++) - if (*w == '/') - u = w + 1; - if (strcmp(t, u)) - cons(r, q); - } - j = i; - } - } - pop(); - for (s = 0, w = r->name; *w; w++) - if (*w == '/') - s = w; - if (s) - { - if ((s - r->name) > 3 && *(s - 1) == 'b' && *(s - 2) == 'i' && *(s - 3) == 'l' && *(s - 4) != '/') - { - /* - * foolib : foo : libfoo - */ - - *(s - 3) = 0; - q = (Rule_t*)search(state.leaf, r->name, NiL); - if (q && q != r) - cons(r, q); - for (t = w = r->name; *w; w++) - if (*w == '/') - t = w + 1; - append(buf, "lib"); - append(buf, t); - q = (Rule_t*)search(state.leaf, use(buf), NiL); - if (q && q != r) - cons(r, q); - *(s - 3) = 'l'; - } - else if (((s - r->name) != 3 || *(s - 1) != 'b' || *(s - 2) != 'i' || *(s - 3) != 'l') && (*(s + 1) != 'l' || *(s + 2) != 'i' || *(s + 3) != 'b')) - { - /* - * huh/foobar : lib/libfoo - */ - - s++; - t = s + strlen(s); - while (--t > s) - { - append(buf, "lib/lib"); - appendn(buf, s, t - s); - q = (Rule_t*)search(state.leaf, use(buf), NiL); - if (q && q != r) - cons(r, q); - } - } - } - break; - } - } - drop(buf); - return 0; -} - -/* - * descend into op and its prereqs - */ - -static int -descend(Dict_item_t* item, void* handle) -{ - Rule_t* r = (Rule_t*)item->value; - - if (!state.active && (!(r->flags & RULE_active) || !(r = (Rule_t*)search(state.leaf, r->name, NiL)))) - return 0; - return r->leaf && !(r->flags & RULE_made) ? update(r) : 0; -} - -/* - * append the non-leaf active targets to state.opt - */ - -static int -active(Dict_item_t* item, void* handle) -{ - Rule_t* r = (Rule_t*)item->value; - - if (r->flags & RULE_active) - { - if (r->leaf || search(state.leaf, r->name, NiL)) - state.active = 0; - else - { - add(state.opt, ' '); - append(state.opt, r->name); - } - } - return 0; -} - -/* - * recurse on mamfiles in subdirs matching pattern - */ - -static int -recurse(char* pattern) -{ - register char* s; - register char* t; - Rule_t* r; - Buf_t* buf; - Buf_t* tmp; - struct stat st; - - /* - * first determine the MAM subdirs - */ - - tmp = buffer(); - buf = buffer(); - state.exec = !state.never; - state.leaf = dictionary(); - append(buf, "ls -d "); - append(buf, pattern); - s = use(buf); - push("recurse", popen(s, "r"), STREAM_PIPE); - while (s = input()) - { - append(buf, s); - add(buf, '/'); - append(buf, mamfile); - if (find(tmp, use(buf), &st)) - { - r = rule(s); - if (t = last(r->name, '/')) - t++; - else - t = r->name; - r->leaf = rule(t); - search(state.leaf, t, r); - } - } - pop(); - drop(buf); - drop(tmp); - - /* - * grab the non-leaf active targets - */ - - if (!state.active) - { - state.active = 1; - walk(state.rules, active, NiL); - } - search(state.vars, "MAMAKEARGS", duplicate(use(state.opt) + 1)); - - /* - * scan the makefile and descend - */ - - walk(state.rules, scan, NiL); - state.view = 0; - walk(state.rules, descend, NiL); - return 0; -} - -int -main(int argc, char** argv) -{ - register char** e; - register char* s; - register char* t; - register char* v; - Buf_t* tmp; - int c; - - /* - * initialize the state - */ - - state.id = "mamake"; - state.active = 1; - state.exec = 1; - state.file = mamfile; - state.opt = buffer(); - state.rules = dictionary(); - state.vars = dictionary(); - search(state.vars, "MAMAKE", *argv); - - /* - * parse the options - */ - -#if _PACKAGE_ast - error_info.id = state.id; - for (;;) - { - switch (optget(argv, usage)) - { - case 'e': - append(state.opt, " -e"); - state.explain = 1; - continue; - case 'i': - append(state.opt, " -i"); - state.ignore = 1; - continue; - case 'k': - append(state.opt, " -k"); - state.keepgoing = 1; - continue; - case 'N': - state.never = 1; - /* FALLTHROUGH */ - case 'n': - append(state.opt, " -n"); - state.exec = 0; - continue; - case 'F': - append(state.opt, " -F"); - state.force = 1; - continue; - case 'K': - continue; - case 'V': - fprintf(stdout, "%s\n", id + 10); - exit(0); - case 'f': - append(state.opt, " -f "); - append(state.opt, opt_info.arg); - state.file = opt_info.arg; - continue; - case 'r': - state.recurse = opt_info.arg; - continue; - case 'C': - state.directory = opt_info.arg; - continue; - case 'D': - append(state.opt, " -D"); - append(state.opt, opt_info.arg); - state.debug = -opt_info.num; - continue; - case 'G': - append(state.opt, " -G"); - search(state.vars, "-debug-symbols", "1"); - continue; - case 'S': - append(state.opt, " -S"); - search(state.vars, "-strip-symbols", "1"); - continue; - case '?': - error(ERROR_usage(2), "%s", opt_info.arg); - UNREACHABLE(); - case ':': - error(2, "%s", opt_info.arg); - continue; - } - break; - } - if (error_info.errors) - { - error(ERROR_usage(2), "%s", optusage(NiL)); - UNREACHABLE(); - } - argv += opt_info.index; -#else - while ((s = *++argv) && *s == '-') - { - if (*(s + 1) == '-') - { - if (!*(s + 2)) - { - append(state.opt, " --"); - argv++; - break; - } - for (t = s += 2; *t && *t != '='; t++); - if (!strncmp(s, "debug-symbols", t - s) && append(state.opt, " -G") || !strncmp(s, "strip-symbols", t - s) && append(state.opt, " -S")) - { - if (*t) - { - v = t + 1; - if (t > s && *(t - 1) == '+') - t--; - c = *t; - *t = 0; - } - else - { - c = 0; - v = "1"; - } - search(state.vars, s - 1, v); - if (c) - *t = c; - continue; - } - usage(); - break; - } - for (;;) - { - switch (*++s) - { - case 0: - break; - case 'e': - append(state.opt, " -e"); - state.explain = 1; - continue; - case 'i': - append(state.opt, " -i"); - state.ignore = 1; - continue; - case 'k': - append(state.opt, " -k"); - state.keepgoing = 1; - continue; - case 'N': - state.never = 1; - /* FALLTHROUGH */ - case 'n': - append(state.opt, " -n"); - state.exec = 0; - continue; - case 'F': - append(state.opt, " -F"); - state.force = 1; - continue; - case 'G': - append(state.opt, " -G"); - search(state.vars, "-debug-symbols", "1"); - continue; - case 'K': - continue; - case 'S': - append(state.opt, " -S"); - search(state.vars, "-strip-symbols", "1"); - continue; - case 'V': - fprintf(stdout, "%s\n", id + 10); - exit(0); - case 'f': - case 'r': - case 'C': - case 'D': - t = s; - if (!*++s && !(s = *++argv)) - { - report(2, "option value expected", t, (unsigned long)0); - usage(); - } - else - switch (*t) - { - case 'f': - append(state.opt, " -f "); - append(state.opt, s); - state.file = s; - break; - case 'r': - state.recurse = s; - break; - case 'C': - state.directory = s; - break; - case 'D': - append(state.opt, " -D"); - append(state.opt, s); - state.debug = -atoi(s); - break; - } - break; - default: - report(2, "unknown option", s, (unsigned long)0); - /* FALLTHROUGH */ - case '?': - usage(); - break; - } - break; - } - } -#endif - - /* - * load the environment - */ - - for (e = environ; s = *e; e++) - for (t = s; *t; t++) - if (*t == '=') - { - *t = 0; - search(state.vars, s, t + 1); - *t = '='; - break; - } - - /* - * grab the command line targets and variable definitions - */ - - while (s = *argv++) - { - for (t = s; *t; t++) - if (*t == '=') - { - v = t + 1; - if (t > s && *(t - 1) == '+') - t--; - c = *t; - *t = 0; - search(state.vars, s, v); - tmp = buffer(); - append(tmp, s); - append(tmp, ".FORCE"); - search(state.vars, use(tmp), v); - drop(tmp); - *t = c; - break; - } - if (!*t) - { - /* - * handle a few targets for nmake compatibility - */ - - if (*s == 'e' && !strncmp(s, "error 0 $(MAKEVERSION:", 22)) - exit(1); - if (*s == 'r' && !strcmp(s, "recurse") || *s == 'c' && !strncmp(s, "cc-", 3)) - continue; - rule(s)->flags |= RULE_active; - state.active = 0; - if (state.recurse) - continue; - } - add(state.opt, ' '); - add(state.opt, '\''); - append(state.opt, s); - add(state.opt, '\''); - } - - /* - * initialize the views - */ - - if (state.directory && chdir(state.directory)) - report(3, "cannot change working directory", NiL, (unsigned long)0); - view(); - - /* - * recursion drops out here - */ - - if (state.recurse) - return recurse(state.recurse); - - /* - * read the mamfile(s) and bring the targets up to date - */ - - search(state.vars, "MAMAKEARGS", duplicate(use(state.opt) + 1)); - push(state.file, (Stdio_t*)0, STREAM_MUST); - make(rule("")); - pop(); - - /* - * verify that active targets were made - */ - - if (!state.active && !state.verified) - walk(state.rules, verify, NiL); - - /* - * done - */ - - return state.errors != 0; -} diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/mamake.rt b/cde/programs/dtksh/ksh93/src/cmd/INIT/mamake.rt deleted file mode 100644 index 5f7603d54..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/mamake.rt +++ /dev/null @@ -1,40 +0,0 @@ -NOTE regression tests for the mamake command - -UNIT mamake - -TEST macros - -DATA Mamfile <<'!' -info mam static 00000 1994-07-17 make (AT&T Research) 5.3 2009-05-05 -setv DEFINED defined -setv EMPTY -make all - -exec - echo DEFINED ${DEFINED} -exec - echo DEFINED:VALUE ${DEFINED:VALUE} -exec - echo DEFINED:-VALUE ${DEFINED:-VALUE} -exec - echo DEFINED=VALUE ${DEFINED=VALUE} -exec - echo DEFINED[VALUE] ${DEFINED[VALUE]} -exec - echo DEFINED.COMPONENT ${DEFINED.COMPONENT} -exec - echo DEFINED.COMPONENT[VALUE] ${DEFINED.COMPONENT[VALUE]} - -exec - echo EMPTY ${EMPTY} -exec - echo EMPTY:VALUE ${EMPTY:VALUE} -exec - echo EMPTY:-VALUE ${EMPTY:-VALUE} -exec - echo EMPTY=VALUE ${EMPTY=VALUE} -exec - echo EMPTY[VALUE] ${EMPTY[VALUE]} -exec - echo EMPTY.COMPONENT ${EMPTY.COMPONENT} -exec - echo EMPTY.COMPONENT[VALUE] ${EMPTY.COMPONENT[VALUE]} - -exec - echo __NoT_DeFiNeD__ ${__NoT_DeFiNeD__} -exec - echo __NoT_DeFiNeD__:VALUE ${__NoT_DeFiNeD__:VALUE} -exec - echo __NoT_DeFiNeD__:-VALUE ${__NoT_DeFiNeD__:-VALUE} -exec - echo __NoT_DeFiNeD__=VALUE ${__NoT_DeFiNeD__=VALUE} -exec - echo __NoT_DeFiNeD__[VALUE] ${__NoT_DeFiNeD__[VALUE]} -exec - echo __NoT_DeFiNeD__.COMPONENT ${__NoT_DeFiNeD__.COMPONENT} -exec - echo __NoT_DeFiNeD__.COMPONENT[VALUE] ${__NoT_DeFiNeD__.COMPONENT[VALUE]} - -done all generated virtual -! - -EXEC -n diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/mamake.tst b/cde/programs/dtksh/ksh93/src/cmd/INIT/mamake.tst deleted file mode 100644 index 3c7f94d64..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/mamake.tst +++ /dev/null @@ -1,63 +0,0 @@ -# : : generated from mamake.rt by mktest : : # - -# regression tests for the mamake command - -UNIT mamake - -TEST 01 macros - - EXEC -n - INPUT -n - - INPUT Mamfile $'info mam static 00000 1994-07-17 make (AT&T Research) 5.3 2009-05-05 -setv DEFINED defined -setv EMPTY -make all - -exec - echo DEFINED ${DEFINED} -exec - echo DEFINED:VALUE ${DEFINED:VALUE} -exec - echo DEFINED:-VALUE ${DEFINED:-VALUE} -exec - echo DEFINED=VALUE ${DEFINED=VALUE} -exec - echo DEFINED[VALUE] ${DEFINED[VALUE]} -exec - echo DEFINED.COMPONENT ${DEFINED.COMPONENT} -exec - echo DEFINED.COMPONENT[VALUE] ${DEFINED.COMPONENT[VALUE]} - -exec - echo EMPTY ${EMPTY} -exec - echo EMPTY:VALUE ${EMPTY:VALUE} -exec - echo EMPTY:-VALUE ${EMPTY:-VALUE} -exec - echo EMPTY=VALUE ${EMPTY=VALUE} -exec - echo EMPTY[VALUE] ${EMPTY[VALUE]} -exec - echo EMPTY.COMPONENT ${EMPTY.COMPONENT} -exec - echo EMPTY.COMPONENT[VALUE] ${EMPTY.COMPONENT[VALUE]} - -exec - echo __NoT_DeFiNeD__ ${__NoT_DeFiNeD__} -exec - echo __NoT_DeFiNeD__:VALUE ${__NoT_DeFiNeD__:VALUE} -exec - echo __NoT_DeFiNeD__:-VALUE ${__NoT_DeFiNeD__:-VALUE} -exec - echo __NoT_DeFiNeD__=VALUE ${__NoT_DeFiNeD__=VALUE} -exec - echo __NoT_DeFiNeD__[VALUE] ${__NoT_DeFiNeD__[VALUE]} -exec - echo __NoT_DeFiNeD__.COMPONENT ${__NoT_DeFiNeD__.COMPONENT} -exec - echo __NoT_DeFiNeD__.COMPONENT[VALUE] ${__NoT_DeFiNeD__.COMPONENT[VAL'\ -$'UE]} - -done all generated virtual' - OUTPUT - $'echo DEFINED defined -echo DEFINED:VALUE -echo DEFINED:-VALUE -echo DEFINED=VALUE defined -echo DEFINED[VALUE] ${DEFINED[VALUE]} -echo DEFINED.COMPONENT -echo DEFINED.COMPONENT[VALUE] ${DEFINED.COMPONENT[VALUE]} -echo EMPTY -echo EMPTY:VALUE ${EMPTY:VALUE} -echo EMPTY:-VALUE ${EMPTY:-VALUE} -echo EMPTY=VALUE -echo EMPTY[VALUE] ${EMPTY[VALUE]} -echo EMPTY.COMPONENT -echo EMPTY.COMPONENT[VALUE] ${EMPTY.COMPONENT[VALUE]} -echo __NoT_DeFiNeD__ ${__NoT_DeFiNeD__} -echo __NoT_DeFiNeD__:VALUE ${__NoT_DeFiNeD__:VALUE} -echo __NoT_DeFiNeD__:-VALUE ${__NoT_DeFiNeD__:-VALUE} -echo __NoT_DeFiNeD__=VALUE ${__NoT_DeFiNeD__=VALUE} -echo __NoT_DeFiNeD__[VALUE] ${__NoT_DeFiNeD__[VALUE]} -echo __NoT_DeFiNeD__.COMPONENT -echo __NoT_DeFiNeD__.COMPONENT[VALUE] ${__NoT_DeFiNeD__.COMPONENT[VALUE]}' - ERROR -n - diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/mamprobe.sh b/cde/programs/dtksh/ksh93/src/cmd/INIT/mamprobe.sh deleted file mode 100644 index 294a9aaf6..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/mamprobe.sh +++ /dev/null @@ -1,274 +0,0 @@ -######################################################################## -# # -# This software is part of the ast package # -# Copyright (c) 1994-2011 AT&T Intellectual Property # -# Copyright (c) 2020-2021 Contributors to ksh 93u+m # -# and is licensed under the # -# Eclipse Public License, Version 1.0 # -# by AT&T Intellectual Property # -# # -# A copy of the License is available at # -# http://www.eclipse.org/org/documents/epl-v10.html # -# (with md5 checksum b35adb5213ca9657e911e9befb180842) # -# # -# Information and Software Systems Research # -# AT&T Research # -# Florham Park NJ # -# # -# Glenn Fowler # -# # -######################################################################## -### this script contains archaic constructs that work with all sh variants ### -# mamprobe - generate MAM cc probe info -# Glenn Fowler - -(command set -o posix) 2>/dev/null && set -o posix - -command=mamprobe - -bins=` - ( - userPATH=$PATH - PATH=/run/current-system/sw/bin:/usr/xpg7/bin:/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin:$PATH - getconf PATH 2>/dev/null && echo "$userPATH" || echo /bin:/usr/bin:/sbin:/usr/sbin:"$userPATH" - ) | sed 's/:/ /g' -` || exit - -# check the options - -opt= - -case `(getopts '[-][123:xyz]' opt --xyz; echo 0$opt) 2>/dev/null` in -0123) USAGE=$' -[-? -@(#)$Id: mamprobe (AT&T Labs Research) 2011-02-11 $ -] -[+NAME?mamprobe - generate MAM cc probe info] -[+DESCRIPTION?\bmamprobe\b generates MAM (make abstract machine) \bcc\b(1) - probe information for use by \bmamake\b(1). \acc-path\a is the - absolute path of the probed compiler and \ainfo-file\a is where - the information is placed. \ainfo-file\a is usually - \b$INSTALLROOT/lib/probe/C/mam/\b\ahash\a, where \ahash\a is a hash - of \acc-path\a. Any \ainfo-file\a directories are created if needed. - If \ainfo-file\a is \b-\b then the probe information is written to - the standard output.] -[+?\bmamprobe\b and \bmamake\b are used in the bootstrap phase of - \bpackage\b(1) installation before \bnmake\b(1) is built. The - probed variable names are the \bnmake\b(1) names with a \bmam_\b - prefix, \bCC\b converted to \bcc\b, and \b.\b converted to \b_\b. - Additional variables are:]{ - [+_hosttype_?the \bpackage\b(1) host type] - [+mam_cc_L?\b-L\b\adir\a supported] - [+STDCAT?command to execute for \bcat\b(1); prefixed by - \bexecrate\b(1) on \b.exe\b challenged systems] - [+STDCHMOD?command to execute for \bchmod\b(1); prefixed by - \bexecrate\b(1) on \b.exe\b challenged systems] - [+STDCMP?command to execute for \bcmp\b(1); prefixed by - \bexecrate\b(1) on \b.exe\b challenged systems] - [+STDCP?command to execute for \bcp\b(1); prefixed by - \bexecrate\b(1) on \b.exe\b challenged systems] - [+STDED?command to execute for \bed\b(1) or \bex\b(1)] - [+STDEDFLAGS?flags for \bSTDED\b] - [+STDLN?command to execute for \bln\b(1); prefixed by - \bexecrate\b(1) on \b.exe\b challenged systems] - [+STDMV?command to execute for \bmv\b(1); prefixed by - \bexecrate\b(1) on \b.exe\b challenged systems] - [+STDRM?command to execute for \brm\b(1); prefixed by - \bexecrate\b(1) on \b.exe\b challenged systems] -} -[d:debug?Enable probe script debug trace.] - -info-file cc-path - -[+SEE ALSO?\bexecrate\b(1), \bpackage\b(1), \bmamake\b(1), \bnmake\b(1), - \bprobe\b(1)] -' - while getopts -a "$command" "$USAGE" OPT - do case $OPT in - d) opt=-d ;; - esac - done - shift `expr $OPTIND - 1` - ;; -*) while : - do case $# in - 0) break ;; - esac - case $1 in - --) shift - break - ;; - -) break - ;; - -d) opt=-d - ;; - -*) echo $command: $1: unknown option >&2 - ;; - *) break - ;; - esac - set '' - break - done - ;; -esac - -# check the args - -case $1 in --) ;; -/*) ;; -*) set '' ;; -esac -case $2 in -/*) ;; -*) set '' ;; -esac -case $# in -0|1) echo "Usage: $command info-file cc-path" >&2; exit 2 ;; -esac -info=$1 -shift -cc=$* - -# find the make probe script - -ifs=${IFS-' - '} -IFS=: -set $PATH -IFS=$ifs -script=lib/probe/C/make/probe -while : -do case $# in - 0) echo "$0: ../$script: probe script not found on PATH" >&2 - exit 1 - ;; - esac - case $1 in - '') continue ;; - esac - makeprobe=`echo $1 | sed 's,[^/]*$,'$script,` - if test -x $makeprobe - then break - fi - shift -done - -# create the info dir if necessary - -case $info in -/*) i=X$info - ifs=${IFS-' - '} - IFS=/ - set $i - IFS=$ifs - while : - do i=$1 - shift - case $i in - X) break ;; - esac - done - case $info in - //*) path=/ ;; - *) path= ;; - esac - while : - do case $# in - 0|1) break ;; - esac - comp=$1 - shift - case $comp in - '') continue ;; - esac - path=$path/$comp - if test ! -d $path - then mkdir $path || exit - fi - done - ;; -esac - -# generate info in a tmp file and rename when finished - -case $info in --) ;; -*) tmp=${TMPDIR:-/tmp}/mam$$ - trap "exec >/dev/null; rm -f $tmp" 0 1 2 3 15 - exec > $tmp - echo "probing C language processor $cc for mam information" >&2 - ;; -esac - -echo "note generated by $0 for $cc" - -( - set '' $opt $cc - shift - . $makeprobe "$@" - - case " $CC_DIALECT " in - *" -L "*) echo "CC.L = 1" ;; - esac - -) | sed \ - -e '/^CC\./!d' \ - -e 's/^CC./setv mam_cc_/' \ - -e 's/^\([^=.]*\)\./\1_/' \ - -e 's/^\([^=.]*\)\./\1_/' \ - -e 's/ =//' \ - -e 's/\$("\([^"]*\)")/\1/g' \ - -e 's/\$(\([^)]*\))/${\1}/g' \ - -e 's/\${CC\./${mam_cc_}/g' - -echo 'setv _hosttype_ ${mam_cc_HOSTTYPE}' - -# STD* are standard commands/flags with possible execrate(1) - -if ( -ed < /dev/null 2>&1 -then STDED=ed -else STDED=ex -fi -STDEDFLAGS=- -set STDCAT cat STDCHMOD chmod STDCMP cmp STDCP cp STDLN ln STDMV mv STDRM rm -while : -do case $# in - 0|1) break ;; - esac - p=$2 - for d in $bins - do if test -x $d/$p - then p=$d/$p - break - fi - done - eval $1=\$p - shift - shift -done -if execrate -then for n in STDCAT STDCHMOD STDCMP STDCP STDLN STDMV STDRM - do eval $n=\"execrate \$$n\" - done -fi -for n in STDCAT STDCHMOD STDCMP STDCP STDED STDEDFLAGS STDLN STDMV STDRM -do eval echo setv \$n \$$n -done - -# all done - -case $info in --) ;; -*) exec >/dev/null - test -f "$info" && rm -f "$info" - cp "$tmp" "$info" - chmod -w "$info" - ;; -esac diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/mkdir.sh b/cde/programs/dtksh/ksh93/src/cmd/INIT/mkdir.sh deleted file mode 100644 index 78830f1e9..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/mkdir.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/sh -######################################################################## -# # -# This software is part of the ast package # -# Copyright (c) 1994-2011 AT&T Intellectual Property # -# and is licensed under the # -# Eclipse Public License, Version 1.0 # -# by AT&T Intellectual Property # -# # -# A copy of the License is available at # -# http://www.eclipse.org/org/documents/epl-v10.html # -# (with md5 checksum b35adb5213ca9657e911e9befb180842) # -# # -# Information and Software Systems Research # -# AT&T Research # -# Florham Park NJ # -# # -# Glenn Fowler # -# # -######################################################################## -: mkdir for systems that do not support -p : 2002-09-01 : - -(command set -o posix) 2>/dev/null && set -o posix - -MKDIR=mkdir -CHMOD=chmod -mode= -parents= -while : -do case $1 in - -m) case $# in - 1) echo "mkdir: -m: mode argument expected" >&2 - exit 1 - ;; - esac - shift - mode=$1 - ;; - -m*) mode=`echo X$1 | sed 's/X-m//'` - ;; - -p) parents=1 - ;; - *) break - ;; - esac - shift -done -if test "" != "$parents" -then for d - do if test ! -d $d - then ifs=${IFS-' - '} - IFS=/ - set '' $d - IFS=$ifs - shift - dir=$1 - shift - if test -n "$dir" -a ! -d "$dir" - then $MKDIR "$dir" || exit 1 - if test "" != "$mode" - then $CHMOD "$mode" "$dir" || exit 1 - fi - fi - for d - do dir=$dir/$d - if test ! -d "$dir" - then $MKDIR "$dir" || exit 1 - if test "" != "$mode" - then $CHMOD "$mode" "$dir" || exit 1 - fi - fi - done - fi - done -else $MKDIR "$@" || exit 1 - if test "" != "$mode" - then for d - do $CHMOD "$mode" "$d" || exit 1 - done - fi -fi -exit 0 diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/mktest.sh b/cde/programs/dtksh/ksh93/src/cmd/INIT/mktest.sh deleted file mode 100755 index cc237b7ee..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/mktest.sh +++ /dev/null @@ -1,644 +0,0 @@ -######################################################################## -# # -# This software is part of the ast package # -# Copyright (c) 1994-2011 AT&T Intellectual Property # -# Copyright (c) 2020-2021 Contributors to ksh 93u+m # -# and is licensed under the # -# Eclipse Public License, Version 1.0 # -# by AT&T Intellectual Property # -# # -# A copy of the License is available at # -# http://www.eclipse.org/org/documents/epl-v10.html # -# (with md5 checksum b35adb5213ca9657e911e9befb180842) # -# # -# Information and Software Systems Research # -# AT&T Research # -# Florham Park NJ # -# # -# Glenn Fowler # -# # -######################################################################## -: mktest - generate regress or shell regression test scripts - -command=mktest -stdin=8 -stdout=9 -PREFIX=test -STYLE=regress -WIDTH=80 - -eval "exec $stdout>&1" - -case $(getopts '[-][123:xyz]' opt --xyz 2>/dev/null; echo 0$opt) in -0123) ARGV0="-a $command" - USAGE=$' -[-? -@(#)$Id: mktest (AT&T Labs Research) 2010-08-11 $ -] -[-author?Glenn Fowler ] -[-copyright?Copyright (c) 2005-2012 AT&T Intellectual Property] -[-license?http://www.eclipse.org/org/documents/epl-v10.html] -[+NAME?mktest - generate a regression test scripts] -[+DESCRIPTION?\bmktest\b generates regression test scripts from test - template commands in the \aunit\a.\brt\b file. The generated test - script writes temporary output to '$PREFIX$'\aunit\a.tmp and compares - it to the expected output in '$PREFIX$'\aunit\a.out. Run the test - script with the \b--accept\b option to (re)generate the - '$PREFIX$'\aunit\a.out.] -[s:style?The script style:]:[style:='$STYLE$'] - { - [+regress?\bregress\b(1) command input.] - [+shell?Standalone test shell script.] - } -[w:width?Set the output format width to approximately - \awidth\a.]:[width:='$WIDTH$'] - -unit.rt [ unit [ arg ... ] ] - -[+INPUT FILES?The regression test command file \aunit\a\b.rt\b is a - \bksh\b(1) script that makes calls to the following functions:] - { - [+DATA \afile\a [ - | [ options ]] data]]?Create input data - \afile\a that is empty (-) or contains \adata\a subject to - \bprint\b(1) \aoptions\a or that is a copy of the DATA command - standard input. Set \afile\a to \b-\b to name the standard - input.] - [+DIAGNOSTICS?Diagnostic messages of unspecified format are - expected.] - [+DO \acommand\a [ \aarg\a ... ]]?Execute \acommand\a if the - current test is active.] - [+EXEC [ \aarg\a ... ]]?Run the command under test with - optional arguments. If the standard input is not specified then - the standard input of the previous EXEC is used. The standard - input of the first EXEC in a TEST group is an empty regular - file.] - [+EXPORT \aname\a=\avalue\a ...?Export list for subsequent - commands in the TEST group or for all TEST groups if before - the first TEST group.] - [+IGNORESPACE [ 0 | 1 ] - ?Ignore space differences when comparing expected output.] - [+KEEP \apattern\a ...?File match patterns of files to retain - between TEST groups.] - [+NOTE \acomment\a?\acomment\a is added to the current test - script.] - [+PROG \acommand\a [ \aarg\a ... ]]?Run \acommand\a with - optional arguments.] - [+TEST [ \anumber\a ]] [ \adescription\a ... ]]?Define a new - test group with optional \anumber\a and \adescription\a.] - [+TWD [ \adir\a ... ]]?Set the temporary test dir to \adir\a. - The default is \aunit\a\b.tmp\b, where \aunit\a is the test - input file sans directory and suffix. If \adir\a matches \b/*\b - then it is the directory name; if \adir\a is non-null then the - prefix \b${TMPDIR:-/tmp}\b is added; otherwise if \adir\a is - omitted then - \b${TMPDIR:-/tmp}/tst-\b\aunit\a-$$-$RANDOM.\b\aunit\a is - used.] - [+UMASK [ \amask\a ]]?Run subsequent tests with \bumask\b(1) - \amask\a. If \amask\a is omitted then the original \bumask\b is - used.] - [+UNIT \acommand\a [ \aarg\a ... ]]?Define the command and - optional default arguments to be tested. \bUNIT\b explicitly - overrides the default command name derived from the test script - file name.] - [+WIDTH \awidth\a?Set the output format width to approximately - \awidth\a.] - } -[+SEE ALSO?\bregress\b(1), \bksh\b(1)] -' - ;; -*) ARGV0="" - USAGE='s: unit.rt [ arg ... ]' - ;; -esac - -typeset ARG SCRIPT UNIT TEMP=${TMPDIR:-/tmp}/$command.$$.tmp WORK -typeset IO INPUT INPUT_N OUTPUT OUTPUT_N ERROR ERROR_N KEEP -typeset -C STATE -typeset -A DATA STATE.RESET REMOVE FORMAT -integer KEEP_UNIT=0 SCRIPT_UNIT=0 TEST=0 CODE=0 EXIT=0 ACCEPT=0 DIAGNOSTICS=0 code - -while getopts $ARGV0 "$USAGE" OPT -do case $OPT in - s) case $OPTARG in - regress|shell) - STYLE=$OPTARG - ;; - *) print -u2 -r -- $command: --style=$OPTARG: regress or shell expected - exit 1 - ;; - esac - ;; - w) WIDTH=$OPTARG - ;; - *) OPTIND=0 - getopts $ARGV0 "$USAGE" OPT '-?' - exit 2 - ;; - esac -done -shift $OPTIND-1 - -typeset SINGLE= quote='%${SINGLE}..${WIDTH}q' - -if [[ $1 == - ]] -then shift -fi -if (( ! $# )) -then - print -u2 -r -- $command: test command script path expected - exit 1 -fi -SCRIPT=$1 -shift -if [[ ! -r $SCRIPT ]] -then print -u2 -r -- $command: $SCRIPT: cannot read - exit 1 -fi -(ulimit -c 0) >/dev/null 2>&1 && ulimit -c 0 -if (( $# )) -then set -A UNIT -- "$@" - KEEP_UNIT=1 -else ARG=${SCRIPT##*/} - set -A UNIT -- "${ARG%.*}" -fi -WORK=${UNIT[0]}.tmp -rm -rf $WORK -mkdir $WORK || exit -export PATH=$PWD:$PATH - -function LINE -{ - if [[ $STYLE == regress ]] - then print -u$stdout - fi -} - -function NOTE -{ - case $STYLE in - regress)LINE - print -u$stdout -r -- '#' "$@" - ;; - shell) print -u$stdout -r -f ": $QUOTE"$'\n' -- "$*" - ;; - esac -} - -function UNIT -{ - (( KEEP_UNIT )) || set -A UNIT -- "$@" - case $STYLE in - regress)LINE - print -u$stdout -r -f $'UNIT' - for ARG in "$@" - do print -u$stdout -r -f " $QUOTE" -- "$ARG" - done - print -u$stdout - ;; - shell) print -u$stdout -r -f $'set x' - for ARG in "$@" - do print -u$stdout -r -f " $QUOTE" -- "$ARG" - done - print -u$stdout - print -u$stdout shift - ;; - esac -} - -function TEST -{ - typeset i - typeset -A REM - if (( ${#STATE.RESET[@]} )) - then unset ${!STATE.RESET[@]} - case $STYLE in - shell) print -u$stdout -r -- unset ${!STATE.RESET[@]} ;; - esac - unset STATE.RESET - typeset -A STATE.RESET - fi - if (( ${#REMOVE[@]} )) - then rm -f -- "${!REMOVE[@]}" - case $STYLE in - shell) print -u$stdout -r -f $'rm -f' - for i in ${!REMOVE[@]} - do print -u$stdout -r -f " $QUOTE" "$i" - done - print -u$stdout - ;; - esac - for i in ${!REMOVE[@]} - do unset REMOVE[$i] - done - fi - rm -rf $WORK/* - if [[ $1 == +([0-9]) ]] - then TEST=${1##0} - shift - else ((TEST++)) - fi - LINE - case $STYLE in - regress)print -u$stdout -r -f "TEST %02d $QUOTE"$'\n' -- $TEST "$*" - ;; - shell) print -u$stdout -r -f ": TEST %02d $QUOTE"$'\n' -- $TEST "$*" - ;; - esac - : > $TEMP.INPUT > $TEMP.in - INPUT= - INPUT_N= - OUTPUT= - OUTPUT_N= - ERROR= - ERROR_N= - UMASK=$UMASK_ORIG - UMASK_DONE=$UMASK - CODE=0 -} - -function TWD -{ - case $STYLE in - regress)LINE - print -u$stdout -r -f $'TWD' - for ARG in "$@" - do print -u$stdout -r -f " $QUOTE" -- "$ARG" - done - print -u$stdout - ;; - esac -} - -function RUN -{ - typeset i n p op unit sep output=1 error=1 exitcode=1 - op=$1 - shift - while : - do case $1 in - ++NOOUTPUT) output= ;; - ++NOERROR) error= ;; - ++NOEXIT) exitcode= ;; - ++*) print -u2 -r -- $command: $0: $1: unknown option; exit 1 ;; - *) break ;; - esac - shift - done - if [[ $op == PROG ]] - then unit=$1 - shift - elif (( ! ${#UNIT[@]} )) - then print -u2 -r -- $command: $SCRIPT: UNIT statement or operand expected - exit 1 - fi - LINE - case $STYLE in - regress)if [[ $op == PROG ]] - then print -u$stdout -r -f $'\t'"$op"$'\t'"$unit" - sep=$' ' - else print -u$stdout -r -f $'\t'"$op" - sep=$'\t' - fi - for ARG in "$@" - do LC_CTYPE=C print -u$stdout -r -f "$sep$QUOTE" -- "$ARG" - sep=$' ' - done - print -u$stdout - [[ ${DATA[-]} || /dev/fd/0 -ef /dev/fd/$stdin ]] || cat > $TEMP.in - IO=$(cat $TEMP.in; print :) - if [[ $IO == ?*$'\n:' ]] - then IO=${IO%??} - n= - else IO=${IO%?} - n=-n - fi - { - [[ $UMASK != $UMASK_ORIG ]] && umask $UMASK - cd $WORK - if [[ $op == PROG ]] - then "$unit" "$@" - code=$? - else "${UNIT[@]}" "$@" - code=$? - fi - cd .. - [[ $UMASK != $UMASK_ORIG ]] && umask $UMASK_ORIG - } < $TEMP.in > $TEMP.out 2> $TEMP.err - if [[ $IO != "$INPUT" || $n != "$INPUT_N" ]] - then INPUT=$IO - INPUT_N=$n - if [[ ${FORMAT[-]} ]] - then print -u$stdout -n -r -- $'\t\tINPUT' - print -u$stdout -r -f " $QUOTE" -- "${FORMAT[-]}" - print -u$stdout -r -f " $QUOTE" -- - - unset FORMAT[-] - else print -u$stdout -n -r -- $'\t\tINPUT' $n - - [[ $IO ]] && LC_CTYPE=C print -u$stdout -r -f " $QUOTE" -- "$IO" - fi - print -u$stdout - unset DATA[-] - fi - for i in ${!DATA[@]} - do if [[ ${FORMAT[$i]} ]] - then print -u$stdout -n -r -- $'\t\tINPUT' - print -u$stdout -r -f " $QUOTE" -- "${FORMAT[$i]}" - print -u$stdout -r -f " $QUOTE" -- "$i" - unset FORMAT[$i] - else case $i in - -) p=$TEMP.in ;; - *) p=$WORK/$i ;; - esac - IO=$(cat $p; print :) - if [[ $IO == ?*$'\n:' ]] - then IO=${IO%??} - n= - else IO=${IO%?} - n=-n - fi - print -u$stdout -n -r -- $'\t\tINPUT' $n - print -u$stdout -r -f " $QUOTE" -- "$i" - [[ $IO ]] && LC_CTYPE=C print -u$stdout -r -f " $QUOTE" -- "$IO" - fi - print -u$stdout - unset DATA[$i] - done - IO=$(cat $TEMP.out; print :) - if [[ $IO == ?*$'\n:' ]] - then IO=${IO%??} - n= - else IO=${IO%?} - n=-n - fi - if [[ $IO != "$OUTPUT" || $n != "$OUTPUT_N" ]] - then OUTPUT=$IO - OUTPUT_N=$n - if [[ $output ]] - then if [[ ! -s $TEMP.out ]] - then print -u$stdout -n -r -- $'\t\tOUTPUT' - - elif cmp -s $TEMP.in $TEMP.out - then OUTPUT=not-$OUTPUT - print -u$stdout -n -r -- $'\t\tSAME OUTPUT INPUT' - else print -u$stdout -n -r -- $'\t\tOUTPUT' $n - - [[ $IO ]] && LC_CTYPE=C print -u$stdout -r -f " $QUOTE" -- "$IO" - fi - print -u$stdout - fi - fi - IO=$(cat $TEMP.err; print :) - IO=${IO//$command\[*([0-9])\]:\ .\[*([0-9])\]:\ @(EXEC|PROG)\[*([0-9])\]:\ /} - if [[ $IO == ?*$'\n:' ]] - then IO=${IO%??} - n= - else IO=${IO%?} - n=-n - fi - if [[ $IO != "$ERROR" || $n != "$ERROR_N" ]] - then ERROR=$IO - ERROR_N=$n - if [[ $error ]] - then print -u$stdout -n -r -- $'\t\tERROR' $n - - [[ $IO ]] && LC_CTYPE=C print -u$stdout -r -f " $QUOTE" -- "$IO" - print -u$stdout - fi - fi - case $output:$error in - :) OUTPUT= - OUTPUT_N= - ERROR= - ERROR_N= - print -u$stdout -r -- $'\t\tIGNORE OUTPUT ERROR' - ;; - :1) OUTPUT= - OUTPUT_N= - print -u$stdout -r -- $'\t\tIGNORE OUTPUT' - ;; - 1:) ERROR= - ERROR_N= - print -u$stdout -r -- $'\t\tIGNORE ERROR' - ;; - esac - if [[ $UMASK_DONE != $UMASK ]] - then UMASK_DONE=$UMASK - print -u$stdout -r -f $'\t\tUMASK %s\n' $UMASK - fi - if (( code != CODE )) - then (( CODE=code )) - if [[ $exitcode ]] - then print -u$stdout -r -f $'\t\tEXIT %d\n' $CODE - fi - fi - ;; - shell) [[ $UMASK != $UMASK_ORIG ]] && print -u$stdout -r -f "{ umask $UMASK; " - if [[ $op == PROG ]] - then print -u$stdout -r -f $'"'"$unit"$'"' - else print -u$stdout -r -f $'"$@"' - fi - for ARG in "$@" - do print -u$stdout -r -f " $QUOTE" -- "$ARG" - done - [[ $UMASK != $UMASK_ORIG ]] && print -u$stdout -r -f "umask $UMASK_ORIG; } " - if [[ ! $output ]] - then print -u$stdout -r -f " >/dev/null" - fi - if [[ ! $error ]] - then if [[ ! $output ]] - then print -u$stdout -r -f " 2>&1" - else print -u$stdout -r -f " 2>/dev/null" - fi - fi - IO=$(cat) - if [[ $IO ]] - then print -u$stdout -r -- "<<'!TEST-INPUT!'" - print -u$stdout -r -- "$IO" - print -u$stdout -r -- !TEST-INPUT! - else print -u$stdout - fi - if [[ $exitcode ]] - then print -u$stdout -r -- $'CODE=$?\ncase $CODE in\n0) ;;\n*) echo exit status $CODE ;;\nesac' - fi - ;; - esac -} - -function DO -{ - LINE - print -r $'\t'DO "$@" -} - -function EXEC -{ - RUN EXEC "$@" -} - -function DATA -{ - typeset f p o - f=$1 - shift - case $f in - -) p=$TEMP.in ;; - *) p=$WORK/$f ;; - esac - case $1 in - '') cat ;; - -) ;; - *) print -r "$@" ;; - esac > $p - DATA[$f]=1 - if (( $# == 1 )) && [[ $1 == -?* ]] - then FORMAT[$f]=$1 - else FORMAT[$f]= - fi - if [[ $f != $KEEP ]] - then REMOVE[$f]=1 - fi - if [[ $STYLE == shell ]] - then { - print -r -f "cat > $QUOTE <<'!TEST-INPUT!'"$'\n' -- "$f" - cat "$p" - print -r -- !TEST-INPUT! - } >&$stdout - fi -} - -function KEEP -{ - typeset p - for p - do if [[ $KEEP ]] - then KEEP=$KEEP'|' - fi - KEEP=$KEEP$p - done -} - -function DIAGNOSTICS -{ - LINE - case $STYLE in - regress) print -u$stdout -r $'DIAGNOSTICS' ;; - shell) DIAGNOSTICS=1 ;; - esac -} - -function EXPORT -{ - typeset x n v - LINE - case $STYLE in - regress) print -u$stdout -r -f $'EXPORT' ;; - shell) print -u$stdout -r -f $'export' ;; - esac - for x - do n=${x%%=*} - v=${x#*=} - export "$x" - print -u$stdout -r -f " %s=$QUOTE" "$n" "$v" - (( TEST )) && STATE.RESET["$n"]=1 - done - print -u$stdout -} - -function PROG -{ - RUN PROG "$@" -} - -function WIDTH -{ - WIDTH=${1:-80} - eval QUOTE='"'$quote'"' -} - -function IGNORESPACE -{ - IGNORESPACE=-b - LINE - print -u$stdout -r IGNORESPACE -} - -function UMASK # [ mask ] -{ - [[ $UMASK_ORIG ]] || UMASK_ORIG=$(umask) - UMASK=$1 - [[ $UMASK ]] || UMASK=$UMASK_ORIG -} - -trap 'CODE=$?; rm -rf $TEMP.* $WORK; exit $CODE' 0 1 2 3 15 - -typeset IGNORESPACE UMASK UMASK_ORIG UMASK_DONE -UMASK_ORIG=$(umask) -IFS=$IFS$'\n' - -print -u$stdout -r "# : : generated from $SCRIPT by $command : : #" -case $STYLE in -shell) cat <&2 <&2 - exit 1 - ;; - *) break - ;; - esac - shift -done -export COLUMNS=80 -{ -! - ;; -esac - -export COLUMNS=80 - -case $STYLE in -shell) SINGLE='#' - eval QUOTE='"'$quote'"' - . $SCRIPT < /dev/null | sed -e $'s,\\\\n,\n,g' -e $'s,\\\\t,\t,g' -e $'s,\\$\',\',g' - ;; -*) eval QUOTE='"'$quote'"' - : > $TEMP.INPUT > $TEMP.in - eval "exec $stdin<$TEMP.INPUT" - . $SCRIPT <&$stdin - ;; -esac - -case $STYLE in -shell) cat < $PREFIX${UNIT[0]}.tmp 2>&1 < /dev/null -case \$ACCEPT in -0) if grep ' $' $PREFIX${UNIT[0]}.tmp >/dev/null - then mv $PREFIX${UNIT[0]}.tmp $PREFIX${UNIT[0]}.junk - sed 's/ $//' < $PREFIX${UNIT[0]}.junk > $PREFIX${UNIT[0]}.tmp - rm -f $PREFIX${UNIT[0]}.junk - fi - if cmp -s $PREFIX${UNIT[0]}.tmp $PREFIX${UNIT[0]}.out - then echo ${UNIT[0]} tests PASSED - rm -f $PREFIX${UNIT[0]}.tmp - else echo ${UNIT[0]} tests FAILED - diff $IGNORESPACE $PREFIX${UNIT[0]}.tmp $PREFIX${UNIT[0]}.out - fi - ;; - -*) mv $PREFIX${UNIT[0]}.tmp $PREFIX${UNIT[0]}.out - ;; -esac -! - ;; -esac diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/mprobe.sh b/cde/programs/dtksh/ksh93/src/cmd/INIT/mprobe.sh deleted file mode 100644 index 92279603f..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/mprobe.sh +++ /dev/null @@ -1,31 +0,0 @@ -######################################################################## -# # -# This software is part of the ast package # -# Copyright (c) 1994-2011 AT&T Intellectual Property # -# Copyright (c) 2020-2021 Contributors to ksh 93u+m # -# and is licensed under the # -# Eclipse Public License, Version 1.0 # -# by AT&T Intellectual Property # -# # -# A copy of the License is available at # -# http://www.eclipse.org/org/documents/epl-v10.html # -# (with md5 checksum b35adb5213ca9657e911e9befb180842) # -# # -# Information and Software Systems Research # -# AT&T Research # -# Florham Park NJ # -# # -# Glenn Fowler # -# # -######################################################################## -: mam probe script -opt= -while : -do case $1 in - -d) opt=-d ;; - -*) ;; - *) break ;; - esac - shift -done -mamprobe $opt - "$1" diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/nsl.c b/cde/programs/dtksh/ksh93/src/cmd/INIT/nsl.c deleted file mode 100644 index f168303ea..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/nsl.c +++ /dev/null @@ -1,32 +0,0 @@ -/*********************************************************************** -* * -* This software is part of the ast package * -* Copyright (c) 1994-2011 AT&T Intellectual Property * -* Copyright (c) 2020-2021 Contributors to ksh 93u+m * -* and is licensed under the * -* Eclipse Public License, Version 1.0 * -* by AT&T Intellectual Property * -* * -* A copy of the License is available at * -* http://www.eclipse.org/org/documents/epl-v10.html * -* (with md5 checksum b35adb5213ca9657e911e9befb180842) * -* * -* Information and Software Systems Research * -* AT&T Research * -* Florham Park NJ * -* * -* Glenn Fowler * -* * -***********************************************************************/ -/* - * small test for -lnsl - */ - - -extern void* gethostbyname(); - -int -main() -{ - return gethostbyname(0) == 0; -} diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/p.c b/cde/programs/dtksh/ksh93/src/cmd/INIT/p.c deleted file mode 100644 index 73f826cc0..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/p.c +++ /dev/null @@ -1,25 +0,0 @@ -/*********************************************************************** -* * -* This software is part of the ast package * -* Copyright (c) 1994-2011 AT&T Intellectual Property * -* Copyright (c) 2020-2021 Contributors to ksh 93u+m * -* and is licensed under the * -* Eclipse Public License, Version 1.0 * -* by AT&T Intellectual Property * -* * -* A copy of the License is available at * -* http://www.eclipse.org/org/documents/epl-v10.html * -* (with md5 checksum b35adb5213ca9657e911e9befb180842) * -* * -* Information and Software Systems Research * -* AT&T Research * -* Florham Park NJ * -* * -* Glenn Fowler * -* * -***********************************************************************/ -/* - * small test for prototyping cc - */ - -int main(int argc, char** argv) { return argc || argv; } diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/package.sh b/cde/programs/dtksh/ksh93/src/cmd/INIT/package.sh deleted file mode 100644 index 1559ef771..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/package.sh +++ /dev/null @@ -1,3562 +0,0 @@ -######################################################################## -# # -# This software is part of the ast package # -# Copyright (c) 1994-2012 AT&T Intellectual Property # -# Copyright (c) 2020-2021 Contributors to ksh 93u+m # -# and is licensed under the # -# Eclipse Public License, Version 1.0 # -# by AT&T Intellectual Property # -# # -# A copy of the License is available at # -# http://www.eclipse.org/org/documents/epl-v10.html # -# (with md5 checksum b35adb5213ca9657e911e9befb180842) # -# # -# Information and Software Systems Research # -# AT&T Research # -# Florham Park NJ # -# # -# Glenn Fowler # -# # -######################################################################## -### this sh script is POSIX compliant and compatible with shell bugs ### -# KornShell 93u+m build system, main control script # -# based on AST 'package' by Glenn Fowler # -# simplified and rewritten by Martijn Dekker # -######################################################################## - -# Escape from a non-POSIX shell -# ('test X -ef Y' is technically non-POSIX, but practically universal) -min_posix='test / -ef / && path=Bad && case $PATH in (Bad) exit 1;; esac && '\ -'PWD=Bad && cd -P -- / && case $PWD in (/) ;; (*) exit 1;; esac && '\ -'! { ! case x in ( x ) : ${0##*/} || : $( : ) ;; esac; } && '\ -'trap "exit 0" 0 && exit 1' -if (eval "$min_posix") 2>/dev/null -then : good shell -else "$SHELL" -c "$min_posix" 2>/dev/null && exec "$SHELL" -- "$0" ${1+"$@"} - sh -c "$min_posix" 2>/dev/null && exec sh -- "$0" ${1+"$@"} - DEFPATH=`getconf PATH` 2>/dev/null || DEFPATH=/usr/xpg4/bin:/bin:/usr/bin:/sbin:/usr/sbin - PATH=$DEFPATH:$PATH - export PATH - sh -c "$min_posix" 2>/dev/null && exec sh -- "$0" ${1+"$@"} - echo "$0: Can't escape from obsolete or broken shell. Run me with a POSIX shell." >&2 - exit 128 -fi -readonly min_posix # use for checksh() - -# Set standards compliance mode -(command set -o posix) 2>/dev/null && set -o posix - -# Sanitize 'cd' -unset CDPATH - -# Make the package root the current working directory -# This makes it possible to run '/my/path/package make' without cd'ing first -# (for all its featuritis, the AT&T version never could manage this) -case $0 in -[0123456789+-]*) - echo "dodgy \$0: $0" >&2 - exit 128 ;; -*/*) - me=$0 ;; -*) - me=$(command -v "$0") || exit 128 ;; -esac -me=$(dirname "$me") -cd "$me" || exit -unset -v me -case $PWD in -*/arch/*/*/bin) - cd .. ;; -*/arch/*/bin) - cd ../../.. ;; -*/bin) - cd .. ;; -*) - echo "this script must live in bin/" >&2 - exit 1 ;; -esac || exit - -# shell checks -checksh() -{ - "$1" -c "$min_posix" 2>/dev/null || return 1 -} - -LC_ALL=C -export LC_ALL - -TMPDIR=${TMPDIR:-/tmp} -export TMPDIR - -src="cmd contrib etc lib" -use="/usr/common /exp /usr/local /usr/add-on /usr/addon /usr/tools /usr /opt" -usr="/home" -lib="" # need /usr/local/lib /usr/local/shlib -ccs="/usr/kvm /usr/ccs/bin" -org="gnu GNU" -makefiles="Mamfile" # ksh 93u+m no longer uses these: Nmakefile nmakefile Makefile makefile -env="HOSTTYPE PACKAGEROOT INSTALLROOT PATH" - -package_use='=$HOSTTYPE=$PACKAGEROOT=$INSTALLROOT=$EXECROOT=$CC=' - -CROSS=0 - -MAKESKIP=${MAKESKIP:-"*[-.]*"} - -all_types='*.*|sun4' # all but sun4 match *.* - -command=${0##*/} -case $(getopts '[-][123:xyz]' opt --xyz 2>/dev/null; echo 0$opt) in -0123) USAGE=$' -[-? -@(#)$Id: '$command$' (ksh 93u+m) 2021-12-31 $ -] -[-author?Glenn Fowler ] -[-author?Contributors to https://github.com/ksh93/ksh] -[-copyright?(c) 1994-2012 AT&T Intellectual Property] -[-copyright?(c) 2020-2021 Contributors to https://github.com/ksh93/ksh] -[-license?http://www.eclipse.org/org/documents/epl-v10.html] -[+NAME?'$command$' - build, test and install ksh 93u+m] -[+DESCRIPTION?The \b'$command$'\b command is the main control script - for building and installing KornShell 93u+m. - It is a POSIX \bsh\b(1) script coded for maximal portability. - A POSIX shell and C compiler installation are the only requirements. - All package files are in the \b$PACKAGEROOT\b directory tree. - Binary package files are in the \b$INSTALLROOT\b - (\b$PACKAGEROOT/arch/\b\ahosttype\a) tree, where - \ahosttype\a=$(\bbin/package host type\b). - See \bDETAILS\b for more information.] -[+?Note that no environment variables need be set by the user; - \b'$command$'\b determines the environment based on the current working - directory. The \buse\b action starts a \bsh\b(1) with the environment - initialized. \bCC\b, \bCCFLAGS\b, \bHOSTTYPE\b and \bSHELL\b may be set - by explicit command argument assignments to override the defaults.] -[+?The command arguments are composed of a sequence of words: zero or - more \aqualifiers\a, one \aaction\a, and zero or more action-specific - \aarguments\a, and zero or more \aname=value\a definitions. - \boptget\b(3) documentation options such as \b--man\b, \b--html\b - and \b--nroff\b are also supported. - The default with no arguments is \bhost type\b.] -[+?The qualifiers are:] - { - [+debug|environment?Show environment and actions but do not - execute.] - [+flat?With the \bmake\b action, create a flat view by linking all - files from \b$INSTALLROOT\b, minus \b*.old\b files, - onto their corresponding path under \b$PACKAGEROOT\b. - Only one architecture can have a flat view. - If \bflat\b is specified with the \bclean\b action, then - only clean up this flat view and do not delete \b$INSTALLROOT\b.] - [+force?Force the action to override saved state.] - [+never?Run make -N and show other actions.] - [+only?Only operate on the specified packages.] - [+quiet?Do not list captured action output.] - [+show?Run make -n and show other actions.] - [+verbose?Provide detailed action output.] - [+DEBUG?Trace the package script actions in detail.] - } -[+?The actions are:] - { - [+clean | clobber?Clean up the flat view, if any. - Then, unless \bflat\b was given, - delete the \barch/\b\aHOSTTYPE\a hierarchy; this - deletes all generated files and directories for \aHOSTTYPE\a. - The hierarchy can be rebuilt by \b'$command$' make\b.] - [+export\b [ \avariable\a ...]]?List \aname\a=\avalue\a for - \avariable\a, one per line. If the \bonly\b attribute is - specified then only the variable values are listed. If no - variables are specified then \b'$env$'\b are assumed.] - [+help\b [ \aaction\a ]]?Display help text on the standard - error (standard output for \aaction\a).] - [+host\b [ \aattribute\a ... ]]?List - architecture/implementation dependent host information on the - standard output. \btype\b is listed if no attributes are - specified. Information is listed on a single line in - \aattribute\a order. The attributes are:] - { - [+canon \aname\a?An external host type name to be - converted to \b'$command$'\b syntax.] - [+cpu?The number of CPUs; 1 if the host is not a - multiprocessor.] - [+name?The host name.] - [+rating?The CPU rating in pseudo mips; the value is - useful useful only in comparisons with rating values of - other hosts. Other than a vax rating (mercifully) fixed - at 1, ratings can vary wildly but consistently from - vendor mips ratings. \bcc\b(1) may be required to - determine the rating.] - [+type?The host type, usually in the form - \avendor\a.\aarchitecture\a, with an optional trailing - -\aversion\a. The main theme is that type names within - a family of architectures are named in a similar, - predictable style. OS point release information is - avoided as much as possible, but vendor resistance to - release incompatibilities has for the most part been - futile.] - } - [+install\b To be reimplemented.] - [+make\b [ \apackage\a ]] [ \aoption\a ... ]] [ \atarget\a ... ]]?Build - and install. The default \atarget\a is \binstall\b, which makes - and installs \apackage\a. If the standard output is a terminal - then the output is also captured in - \b$INSTALLROOT/lib/package/gen/make.out\b. The build is done in - the \b$INSTALLROOT\b directory tree viewpathed on top of the - \b$PACKAGEROOT\b directory tree. Leaf directory names matching the - \b|\b-separated shell pattern \b$MAKESKIP\b are ignored. The - \bview\b action is done before making. \aoption\a operands are - passed to the underlying make command.] - [+results\b [ \bfailed\b ]] [ \bpath\b ]] [ \bold\b ]] [\bmake\b | \btest\b | \bwrite\b ]]?List - results and interesting messages captured by the most recent - \bmake\b (default), \btest\b or \bwrite\b action. \bold\b - specifies the previous results, if any (current and previous - results are retained). \b$HOME/.pkgresults\b, if it exists, - must contain an \begrep\b(1) expression of result lines to be - ignored. \bfailed\b lists failures only and \bpath\b lists the - results file path name only.] - [+test\b [ \aargument\a ... ]]?Run the regression tests for - \bksh\b. If the standard output is a terminal then the - output is also captured in \b$INSTALLROOT/lib/package/gen/test.out\b. - \bksh\b must be made before it can be tested. - All \aargument\as following \atest\a are passed to \bbin/shtests\b. - See \bbin/shtests --man\b for more information.] - [+use\b [ \auid\a | \apackage\a | . [ 32 | 64 ]] | 32 | 64 | - ]] [ command ...]]?Run - \acommand\a, or an interactive shell if \acommand\a is omitted, - with the environment initialized for using the package (can you - say \ashared\a \alibrary\a or \adll\a without cussing?) If - \auid\a or \apackage\a or \a.\a is specified then it is used - to determine a \b$PACKAGEROOT\b, possibly different from - the current directory. For example, to try out bozo'\'$'s package: - \bpackage use bozo\b. The \buse\b action may be run from any - directory. If the file \b$INSTALLROOT/lib/package/profile\b is - readable then it is sourced to initialize the environment. 32 or 64 - implies \b$PACKAGEROOT\b of . and specifies the target architecture - word size (which may be silently ignored).] - [+view\b?Initialize the architecture specific viewpath - hierarchy. The \bmake\b action implicitly calls this action.] - } -[+DETAILS?The package directory hierarchy is rooted at - \b$PACKAGEROOT\b. All source and binaries reside under this tree. A two - level viewpath is used to separate source and binaries. The top view is - architecture specific, the bottom view is shared source. All building - is done in the architecture specific view; no source view files are - intentionally changed. This means that many different binary - architectures can be made from a single copy of the source.] -[+?Independent \b$PACKAGEROOT\b hierarchies can be combined by - appending \b$INSTALLROOT:$PACKAGEROOT\b pairs to \bVPATH\b. The - \bVPATH\b viewing order is from left to right.] -[+?\b$HOSTYPE\b names the current binary architecture and is determined - by the output of \b'$command$'\b (no arguments). The \b$HOSTTYPE\b naming - scheme is used to separate incompatible executable and object formats. - All architecture specific binaries are placed under \b$INSTALLROOT\b - (\b$PACKAGEROOT/arch/$HOSTTYPE\b). There are a few places that match - against \b$HOSTTYPE\b when making binaries; these are limited to - makefile compiler workarounds, e.g., if \b$HOSTTYPE\b matches \bhp.*\b - then turn off the optimizer for these objects. All other architecture - dependent logic is handled either by the \bAST\b \biffe\b(1) command or - by component specific configure scripts. Explicit \b$HOSTYPE\b - values matching *,*cc*[,-*,...]] optionally set the default \bCC\b and - \bCCFLAGS\b. This is handy for build farms that support different - compilers on the same architecture.] -[+?Each component contains a \bMAM\b (make abstract machine) - file (\bMamfile\b). A Mamfile contains a portable makefile description - written in a simple dependency tree language using indented - \bmake\b...\bdone\b blocks.] -[+?All scripts and commands under \b$PACKAGEROOT\b use \b$PATH\b - relative pathnames (via the \bAST\b \bpathpath\b(3) function); there - are no embedded absolute pathnames. This means that binaries generated - under \b$PACKAGEROOT\b may be copied to a different root; users need - only change their \b$PATH\b variable to reference the new installation - root \bbin\b directory. \b'$command$' install\b installs binary packages in - a new \b$INSTALLROOT\b.] - -[ qualifier ... ] [ action ] [ arg ... ] [ n=v ... ] - -[+SEE ALSO?\bautoconfig\b(1), \bcksum\b(1), \bexecrate\b(1), \bexpmake\b(1), - \bgzip\b(1), \bmake\b(1), \bmamake\b(1), \bpax\b(1), - \bpkgadd\b(1), \bpkgmk\b(1), \brpm\b(1), - \bsh\b(1), \btar\b(1), \boptget\b(3)] -' - case $* in - help) set -- --man ;; - esac - while getopts -a "$command" "$USAGE" OPT - do : - done - shift $((OPTIND-1)) - ;; -esac - -# check the args - -case $AR in -'') AR=ar ;; -esac -case $CC in -'') CC=cc ;; -esac -case $LD in -'') LD=ld ;; -esac -case $NM in -'') NM=nm ;; -esac - -action= -bit= -exec= -flat=0 -force=0 -global= -hi= -ifs=${IFS-' - '} -lo= -make= -makeflags='-K' -nl=" -" -noexec= -only=0 -output= -quiet=0 -show=: -tab=" " -verbose=0 -AUTHORIZE= -DEBUG= -SHELLMAGIC=- - -unset FIGNORE BINDIR DLLDIR ETCDIR FUNDIR INCLUDEDIR LIBDIR LOCALEDIR MANDIR SHAREDIR 2>/dev/null || true - -while : -do case $# in - 0) set host type ;; - esac - case $1 in - clean|clobber|export|host|install|make|remove|results|test|use|view) - action=$1 - shift - break - ;; - debug|environment) - exec=echo make=echo show=echo - ;; - flat) flat=1 - ;; - force) force=1 - ;; - never) exec=echo noexec=-N - ;; - only) only=1 - ;; - quiet) quiet=1 - ;; - show) exec=echo noexec=-n - ;; - verbose)verbose=1 - ;; - DEBUG) DEBUG=1 - PS4='+$LINENO:$SECONDS+ ' - set -x - ;; - help|HELP|html|man|--[?m]*) - case $1 in - help) code=0 - case $2 in - '') exec 1>&2 ;; - esac - ;; - html) code=0 html=1 - echo "$command help

$command help

"
-			;;
-		*)	code=2
-			exec 1>&2
-			;;
-		esac
-		# Plain-text fallback. Regenerate with:
-		# ksh -c 'COLUMNS=80 bin/package --man' 2>&1 | sed "s/'/'\\\\''/g; 1s/^/echo '/; \$s/\$/'/"
-		echo 'NAME
-  package - build, test and install ksh 93u+m
-
-SYNOPSIS
-  package [ options ] [ qualifier ... ] [ action ] [ arg ... ] [ n=v ... ]
-
-DESCRIPTION
-  The package command is the main control script for building and installing
-  KornShell 93u+m. It is a POSIX sh(1) script coded for maximal portability. A
-  POSIX shell and C compiler installation are the only requirements. All
-  package files are in the $PACKAGEROOT directory tree. Binary package files
-  are in the $INSTALLROOT ($PACKAGEROOT/arch/hosttype) tree, where
-  hosttype=$(bin/package host type). See DETAILS for more information.
-
-  Note that no environment variables need be set by the user; package
-  determines the environment based on the current working directory. The use
-  action starts a sh(1) with the environment initialized. CC, CCFLAGS, HOSTTYPE
-  and SHELL may be set by explicit command argument assignments to override the
-  defaults.
-
-  The command arguments are composed of a sequence of words: zero or more
-  qualifiers, one action, and zero or more action-specific arguments, and zero
-  or more name=value definitions. optget(3) documentation options such as
-  --man, --html and --nroff are also supported. The default with no arguments
-  is host type.
-
-  The qualifiers are:
-    debug|environment
-          Show environment and actions but do not execute.
-    flat  With the make action, create a flat view by linking all files from
-          $INSTALLROOT, minus *.old files, onto their corresponding path under
-          $PACKAGEROOT. Only one architecture can have a flat view. If flat is
-          specified with the clean action, then only clean up this flat view
-          and do not delete $INSTALLROOT.
-    force Force the action to override saved state.
-    never Run make -N and show other actions.
-    only  Only operate on the specified packages.
-    quiet Do not list captured action output.
-    show  Run make -n and show other actions.
-    verbose
-          Provide detailed action output.
-    DEBUG Trace the package script actions in detail.
-
-  The actions are:
-    clean | clobber
-          Clean up the flat view, if any. Then, unless flat was given, delete
-          the arch/HOSTTYPE hierarchy; this deletes all generated files and
-          directories for HOSTTYPE. The hierarchy can be rebuilt by package
-          make.
-    export [ variable ...]
-          List name=value for variable, one per line. If the only attribute is
-          specified then only the variable values are listed. If no variables
-          are specified then HOSTTYPE PACKAGEROOT INSTALLROOT PATH are assumed.
-    help [ action ]
-          Display help text on the standard error (standard output for action).
-    host [ attribute ... ]
-          List architecture/implementation dependent host information on the
-          standard output. type is listed if no attributes are specified.
-          Information is listed on a single line in attribute order. The
-          attributes are:
-            canon name
-                  An external host type name to be converted to package syntax.
-            cpu   The number of CPUs; 1 if the host is not a multiprocessor.
-            name  The host name.
-            rating
-                  The CPU rating in pseudo mips; the value is useful useful
-                  only in comparisons with rating values of other hosts. Other
-                  than a vax rating (mercifully) fixed at 1, ratings can vary
-                  wildly but consistently from vendor mips ratings. cc(1) may
-                  be required to determine the rating.
-            type  The host type, usually in the form vendor.architecture, with
-                  an optional trailing -version. The main theme is that type
-                  names within a family of architectures are named in a
-                  similar, predictable style. OS point release information is
-                  avoided as much as possible, but vendor resistance to release
-                  incompatibilities has for the most part been futile.
-    install To be reimplemented.
-    make [ package ] [ option ... ] [ target ... ]
-          Build and install. The default target is install, which makes and
-          installs package. If the standard output is a terminal then the
-          output is also captured in $INSTALLROOT/lib/package/gen/make.out. The
-          build is done in the $INSTALLROOT directory tree viewpathed on top of
-          the $PACKAGEROOT directory tree. Leaf directory names matching the
-          |-separated shell pattern $MAKESKIP are ignored. The view action is
-          done before making. option operands are passed to the underlying make
-          command.
-    results [ failed ] [ path ] [ old ] [make | test | write ]
-          List results and interesting messages captured by the most recent
-          make (default), test or write action. old specifies the previous
-          results, if any (current and previous results are retained).
-          $HOME/.pkgresults, if it exists, must contain an egrep(1) expression
-          of result lines to be ignored. failed lists failures only and path
-          lists the results file path name only.
-    test [ argument ... ]
-          Run the regression tests for ksh. If the standard output is a
-          terminal then the output is also captured in
-          $INSTALLROOT/lib/package/gen/test.out. ksh must be made before it can
-          be tested. All arguments following test are passed to bin/shtests.
-          See bin/shtests --man for more information.
-    use [ uid | package | . [ 32 | 64 ] | 32 | 64 | - ] [ command ...]
-          Run command, or an interactive shell if command is omitted, with the
-          environment initialized for using the package (can you say shared
-          library or dll without cussing?) If uid or package or . is specified
-          then it is used to determine a $PACKAGEROOT, possibly different from
-          the current directory. For example, to try out bozo'\''s package:
-          package use bozo. The use action may be run from any directory. If
-          the file $INSTALLROOT/lib/package/profile is readable then it is
-          sourced to initialize the environment. 32 or 64 implies $PACKAGEROOT
-          of . and specifies the target architecture word size (which may be
-          silently ignored).
-    view  Initialize the architecture specific viewpath hierarchy. The make
-          action implicitly calls this action.
-
-DETAILS
-  The package directory hierarchy is rooted at $PACKAGEROOT. All source and
-  binaries reside under this tree. A two level viewpath is used to separate
-  source and binaries. The top view is architecture specific, the bottom view
-  is shared source. All building is done in the architecture specific view; no
-  source view files are intentionally changed. This means that many different
-  binary architectures can be made from a single copy of the source.
-
-  Independent $PACKAGEROOT hierarchies can be combined by appending
-  $INSTALLROOT:$PACKAGEROOT pairs to VPATH. The VPATH viewing order is from
-  left to right.
-
-  $HOSTYPE names the current binary architecture and is determined by the
-  output of package (no arguments). The $HOSTTYPE naming scheme is used to
-  separate incompatible executable and object formats. All architecture
-  specific binaries are placed under $INSTALLROOT
-  ($PACKAGEROOT/arch/$HOSTTYPE). There are a few places that match against
-  $HOSTTYPE when making binaries; these are limited to makefile compiler
-  workarounds, e.g., if $HOSTTYPE matches hp.* then turn off the optimizer for
-  these objects. All other architecture dependent logic is handled either by
-  the AST iffe(1) command or by component specific configure scripts. Explicit
-  $HOSTYPE values matching *,*cc*[,-*,...] optionally set the default CC and
-  CCFLAGS. This is handy for build farms that support different compilers on
-  the same architecture.
-
-  Each component contains a MAM (make abstract machine) file (Mamfile). A
-  Mamfile contains a portable makefile description written in a simple
-  dependency tree language using indented make...done blocks.
-
-  All scripts and commands under $PACKAGEROOT use $PATH relative pathnames (via
-  the AST pathpath(3) function); there are no embedded absolute pathnames. This
-  means that binaries generated under $PACKAGEROOT may be copied to a different
-  root; users need only change their $PATH variable to reference the new
-  installation root bin directory. package install installs binary packages in
-  a new $INSTALLROOT.
-
-SEE ALSO
-  autoconfig(1), cksum(1), execrate(1), expmake(1), gzip(1), make(1),
-  mamake(1), pax(1), pkgadd(1), pkgmk(1), rpm(1), sh(1), tar(1), optget(3)
-
-IMPLEMENTATION
-  version         package (ksh 93u+m) 2021-12-31
-  author          Glenn Fowler 
-  author          Contributors to https://github.com/ksh93/ksh
-  copyright       (c) 1994-2012 AT&T Intellectual Property
-  copyright       (c) 2020-2021 Contributors to https://github.com/ksh93/ksh
-  license         http://www.eclipse.org/org/documents/epl-v10.html'
-		case $1 in
-		html)	echo "
" ;; - esac - exit $code - ;; - *=*) set DEFAULT host type "$@" - ;; - *) # simulate AST getopt(3) usage output - echo "Usage: $command [ options ] [ qualifier ... ] [ action ] [ arg ... ] [ n=v ... ]" >&2 - echo " Help: $command [ --help | --man ] 2>&1" >&2 - exit 2 - ;; - esac - global="$global $1" - shift -done - -# gather HOSTTYPE *,* options -# ,*cc*,-*,... set CC and CCFLAGS - -hostopts() -{ - _ifs_=$IFS - IFS=, - set '' $HOSTTYPE - IFS=$_ifs_ - shift - while : - do case $# in - 0|1) break ;; - esac - shift - case $1 in - *cc*) CC=$1 - while : - do case $# in - 0|1) break ;; - esac - case $2 in - -*) case $assign_CCFLAGS in - ?*) assign_CCFLAGS="$assign_CCFLAGS " ;; - esac - assign_CCFLAGS="$assign_CCFLAGS$2" - shift - ;; - *) break - ;; - esac - done - ;; - esac - done -} - -# collect command line targets and definitions - -case $_PACKAGE_HOSTTYPE_ in -?*) HOSTTYPE=$_PACKAGE_HOSTTYPE_ - KEEP_HOSTTYPE=1 - ;; -*) KEEP_HOSTTYPE=0 - ;; -esac -KEEP_PACKAGEROOT=0 -KEEP_SHELL=0 -USER_VPATH= -args= -assign= -assign_CCFLAGS= -for i -do case $i in - *:*=*) args="$args $i" - continue - ;; - *=*) n=${i%%=*} v=${i#*=} - ;; - esac - case $i in - AR=*|LD=*|NM=*) - assign="$assign $n='$v'" - eval $n='$'v - ;; - CC=*) eval $n='$'v - ;; - CCFLAGS=*) - eval $n='$'v - assign_CCFLAGS="CCFLAGS=\"\$CCFLAGS\"" - ;; - HOSTTYPE=*) - eval $n='$'v - case $HOSTTYPE in - ?*) KEEP_HOSTTYPE=1 ;; - esac - ;; - PACKAGEROOT=*) - eval $n='$'v - case $PACKAGEROOT in - ?*) KEEP_PACKAGEROOT=1 ;; - esac - ;; - SHELL=*)eval $n='$'v - case $SHELL in - ?*) KEEP_SHELL=1 ;; - esac - ;; - VPATH=*)eval USER_$n='$'v - ;; - 'debug=1') - makeflags="$makeflags --debug-symbols" - ;; - 'strip=1') - makeflags="$makeflags --strip-symbols" - ;; - *=*) assign="$assign $n='$v'" - ;; - *) args="$args $i" - ;; - esac -done -case $HOSTTYPE in -*,*) hostopts $HOSTTYPE ;; -esac -case $assign_CCFLAGS in -?*) assign="$assign $assign_CCFLAGS" -esac -case $CC in -''|cc) ;; -*) export CC ;; -esac - -# Add build type flags via KSH_RELFLAGS, which is used in src/cmd/ksh93/Mamfile. -# (Avoid using CCFLAGS; setting it would overwrite autodetected optimization flags.) -ksh_relflags= -case $(git branch 2>/dev/null) in -'' | *\*\ [0-9]*.[0-9]*) - # If we're not on a git branch (tarball) or on a branch that starts - # with a number (release branch), then compile as a release version - ksh_relflags="${ksh_relflags:+$ksh_relflags }-D_AST_ksh_release" ;; -*) # Otherwise, add 8-character git commit hash if available, and if the working dir is clean - git_commit=$(git status >/dev/null 2>&1 && git diff-index --quiet HEAD && git rev-parse --short=8 HEAD) - case $git_commit in - ????????) - ksh_relflags="${ksh_relflags:+$ksh_relflags }-D_AST_git_commit=\\\"$git_commit\\\"" ;; - esac - unset git_commit ;; -esac -case $ksh_relflags in -?*) # add the extra flags as an argument to mamake - assign="${assign:+$assign }KSH_RELFLAGS=\"\$ksh_relflags\"" ;; -esac - -# Add ksh compile-options via KSH_SHOPTFLAGS. -SHOPT() -{ - case $1 in - *=?*) ksh_shoptflags="${ksh_shoptflags:+$ksh_shoptflags }-DSHOPT_$1" ;; - esac -} -ksh_shoptflags= -shopt_sh='src/cmd/ksh93/SHOPT.sh' # this script calls SHOPT() to set options -if test -f "$shopt_sh" -then . "$shopt_sh" -else echo "WARNING: $shopt_sh is missing" >&2 -fi -case $ksh_shoptflags in -?*) # add the extra flags as an argument to mamake - assign="${assign:+$assign }KSH_SHOPTFLAGS=\"\$ksh_shoptflags\"" ;; -esac - -# grab action specific args - -case $action in -use) case $1 in - .|32|64)case $1 in - 32|64) bit=$1 ;; - esac - shift - - # HOSTTYPE specific setup - - case $HOSTTYPE in - win32.*)sys=uwin - wow=$(uname -i) - case $bit in - 32) case $HOSTTYPE in - *-64) HOSTTYPE=${HOSTTYPE%-64} ;; - esac - ;; - 64) case $HOSTTYPE in - *-64) ;; - *) HOSTTYPE=$HOSTTYPE-64 ;; - esac - case $wow in - */32) err_out "cannot build $bit-bit on $wow $sys" ;; - esac - ;; - esac - case $bit in - '') PS1="($sys) " ;; - *) PS1="($sys-$bit) " ;; - esac - - $exec umask 002 - $exec unset MAKESKIP - - P=$PWD - A=$P/arch/$HOSTTYPE - - $exec export CDPATH=:..:$A/src/cmd:$A/src/lib:$A/src/uwin:$P/lib/package - $exec export INSTALLROOT=$A - $exec export PACKAGEROOT=$P - $exec export PATH=$A/bin:$P/bin:$PATH - $exec export PS1="$PS1" - $exec export VPATH=$A:$P - $exec export nativepp=/usr/lib - - if test '' != "$INSTALLROOT" -a -d $INSTALLROOT/include/ast - then $exec export PACKAGE_ast=$INSTALLROOT - elif test -d ${PWD%/*}/ast/arch/$HOSTTYPE - then $exec export PACKAGE_ast=${PWD%/*}/ast/arch/$HOSTTYPE - fi - - # run the command - - case $# in - 0) case $show in - ':') $exec exec $SHELL ;; - esac - ;; - *) $exec exec $SHELL -c "$@" - ;; - esac - exit - ;; - esac - PACKAGEROOT=$PWD - $show export PACKAGEROOT - esac - ;; -esac - -# true if arg is a valid PACKAGEROOT - -packageroot() # dir -{ - test -d $1/lib/$command -o -x $1/bin/$command -} - -# true if arg is executable - -executable() # [!] command -{ - case $1 in - '!') test ! -x "$2" -a ! -x "$2.exe"; return ;; - *) test -x "$1" -o -x "$1.exe"; return ;; - esac -} - -# initialize SHELLMAGIC -# tangible proof of Cygwin's disdain for Unix (well, this and execrate) - -shellmagic() -{ - case $SHELLMAGIC in - '') ;; - -) if test -f /emx/bin/sh.exe - then SHELLMAGIC='#!/emx/bin/sh.exe'$nl - elif test -f /bin/env.exe - then SHELLMAGIC='#!/bin/env sh'$nl - else SHELLMAGIC= - fi - ;; - esac -} - -# true if arg is executable command on $PATH - -onpath() # command -{ - _onpath_b=$1 - case $_onpath_b in - /*) if executable $_onpath_b - then _onpath_=$_onpath_b - return 0 - fi - return 1 - ;; - esac - IFS=':' - set '' $PATH - IFS=$ifs - shift - for _onpath_d - do case $_onpath_d in - '') _onpath_d=. ;; - esac - if executable "$_onpath_d/$_onpath_b" - then _onpath_=$_onpath_d/$_onpath_b - return 0 - fi - done - return 1 -} - -# determine local host attributes - -hostinfo() # attribute ... -{ - case $DEBUG in - 1) set -x ;; - esac - map= - something= - path=$PATH - for i in $ccs - do PATH=$PATH:$i - done - for i in $use - do for j in $org - do PATH=$PATH:$i/$j/bin - done - PATH=$PATH:$i/bin - done - case $PACKAGE_PATH in - ?*) for i in $(echo "$PACKAGE_PATH" | sed 's,:, ,g') - do PATH=$PATH:$i/bin - done - ;; - esac - - # validate the args - - canon= - cc=$CC - for info - do case $canon in - -) canon=$info - ;; - *) case $info in - */*|*[cC][cC]) - cc=$info - ;; - canon) canon=- - something=1 - ;; - cpu|name|rating|type) - something=1 - ;; - *) err_out "$action: $info: unknown attribute" - ;; - esac - ;; - esac - done - case $canon in - -) err_out "$action: canon: host type name expected" - ;; - esac - case $something in - "") set "$@" type ;; - esac - case $DEBUG in - '') exec 9>&2 - exec 2>/dev/null - ;; - esac - - # compute the info - - _hostinfo_= - for info - do - case $info in - cpu) cpu=$(sysctl -n hw.ncpu) - case $cpu in - [123456789]*) - _hostinfo_="$_hostinfo_ $cpu" - continue - ;; - esac - cpu=$(grep -ic '^processor[ ][ ]*:[ ]*[0123456789]' /proc/cpuinfo) - case $cpu in - [123456789]*) - _hostinfo_="$_hostinfo_ $cpu" - continue - ;; - esac - cpu=1 - # exact match - set \ - hinv '^Processor [0123456789]' \ - psrinfo 'on-line' \ - 'cat /reg/LOCAL_MACHINE/Hardware/Description/System/CentralProcessor' '.' \ - 'cat /proc/registry/HKEY_LOCAL_MACHINE/Hardware/Description/System/CentralProcessor' '.' \ - - while : - do case $# in - 0) break ;; - esac - i=$($1 2>/dev/null | grep -c "$2") - case $i in - [123456789]*) - cpu=$i - break - ;; - esac - shift;shift - done - case $cpu in - 0|1) set \ - /bin/mpstat - - while : - do case $# in - 0) break ;; - esac - if executable $1 - then case $($1 | grep -ic '^cpu ') in - 1) cpu=$($1 | grep -ic '^ *[0123456789][0123456789]* ') - break - ;; - esac - fi - shift - done - ;; - esac - case $cpu in - 0|1) # token match - set \ - /usr/kvm/mpstat 'cpu[0123456789]' \ - /usr/etc/cpustatus 'enable' \ - /usr/alliant/showsched 'CE' \ - 'ls /config/hw/system/cpu' 'cpu' \ - prtconf 'cpu-unit' \ - - while : - do case $# in - 0) break ;; - esac - i=$($1 2>/dev/null | tr ' ' ' - -' | grep -c "^$2") - case $i in - [123456789]*) - cpu=$i - break - ;; - esac - shift;shift - done - ;; - esac - case $cpu in - 0|1) # special match - set \ - \ - hinv \ - '/^[0123456789][0123456789]* .* Processors*$/' \ - '/[ ].*//' \ - \ - /usr/bin/hostinfo \ - '/^[0123456789][0123456789]* .* physically available\.*$/' \ - '/[ ].*//' \ - - while : - do case $# in - 0) break ;; - esac - i=$($1 2>/dev/null | sed -e "${2}!d" -e "s${3}") - case $i in - [123456789]*) - cpu=$i - break - ;; - esac - shift;shift;shift - done - ;; - esac - case $cpu in - 0|1) cpu=$( - cd "$TMPDIR" - tmp=hi$$ - trap 'rm -f $tmp.*' 0 1 2 - cat > $tmp.c < -#include -int main() -{ - printf("%d\n", pthread_num_processors_np()); - return 0; -} -! - for o in -lpthread '' - do if $CC $o -O -o $tmp.exe $tmp.c $o >/dev/null 2>&1 || - gcc $o -O -o $tmp.exe $tmp.c $o >/dev/null 2>&1 - then ./$tmp.exe - break - fi - done - ) - case $cpu in - [0123456789]*) ;; - *) cpu=1 ;; - esac - ;; - esac - _hostinfo_="$_hostinfo_ $cpu" - ;; - name) _name_=$(hostname || uname -n || cat /etc/whoami || echo local) - _hostinfo_="$_hostinfo_ $_name_" - ;; - rating) for rating in $(grep -i ^bogomips /proc/cpuinfo 2>/dev/null | sed -e 's,.*:[ ]*,,' -e 's,\(...*\)\..*,\1,' -e 's,\(\..\).*,\1,') - do case $rating in - [0123456789]*) break ;; - esac - done - case $rating in - [0123456789]*) ;; - *) cd "$TMPDIR" - tmp=hi$$ - trap 'rm -f $tmp.*' 0 1 2 - cat > $tmp.c < -#include -#if TD || TZ -#include -#else -extern time_t time(); -#endif -int main() -{ - register unsigned long i; - register unsigned long j; - register unsigned long k; - unsigned long l; - unsigned long m; - unsigned long t; - int x; -#if TD || TZ - struct timeval b; - struct timeval e; -#if TZ - struct timezone z; -#endif -#endif - l = 500; - m = 890; - x = 0; - for (;;) - { -#if TD || TZ -#if TZ - gettimeofday(&b, &z); -#else - gettimeofday(&b); -#endif -#else - t = (unsigned long)time((time_t*)0); -#endif - k = 0; - for (i = 0; i < l; i++) - for (j = 0; j < 50000; j++) - k += j; -#if TD || TZ -#if TZ - gettimeofday(&e, &z); -#else - gettimeofday(&e); -#endif - t = (e.tv_sec - b.tv_sec) * 1000 + (e.tv_usec - b.tv_usec) / 1000; - if (!x++ && t < 1000) - { - t = 10000 / t; - l = (l * t) / 10; - continue; - } -#else - t = ((unsigned long)time((time_t*)0) - t) * 1000; - if (!x++ && t < 20000) - { - t = 200000l / t; - l = (l * t) / 10; - continue; - } -#endif -#if PR - printf("[ k=%lu l=%lu m=%lu t=%lu ] ", k, l, m, t); -#endif - if (t == 0) - t = 1; - break; - } - printf("%lu\n", ((l * m) / 10) / t); - return k == 0; -} -! - rating= - for o in -DTZ -DTD '' - do if $CC $o -O -o $tmp.exe $tmp.c >/dev/null 2>&1 || - gcc $o -O -o $tmp.exe $tmp.c >/dev/null 2>&1 - then rating=$(./$tmp.exe) - break - fi - done - case $rating in - [0123456789]*) ;; - *) rating=1 ;; - esac - ;; - esac - _hostinfo_="$_hostinfo_ $rating" - ;; - type|canon) - case $CROSS:$canon in - 0:) case $cc in - cc) case $KEEP_HOSTTYPE:$HOSTTYPE in - 0:?*) if test -d ${PACKAGEROOT:-.}/arch/$HOSTTYPE - then KEEP_HOSTTYPE=1 - fi - ;; - esac - ;; - esac - case $KEEP_HOSTTYPE in - 1) _hostinfo_="$_hostinfo_ $HOSTTYPE" - continue - ;; - esac - ;; - esac - case $cc in - /*) a=$($cc -dumpmachine $CCFLAGS 2>/dev/null) - case $a in - '') case $CCFLAGS in - ?*) a=$($cc -dumpmachine 2>/dev/null) ;; - esac - ;; - esac - case $a in - ''|*' '*|*/*:*) - ;; - *.*-*) _hostinfo_="$_hostinfo_ $a" - continue - ;; - *-*-*) case $canon in - '') canon=$a ;; - esac - ;; - *) _hostinfo_="$_hostinfo_ $a" - continue - ;; - esac - ;; - esac - IFS=: - set /$IFS$PATH - IFS=$ifs - shift - f=../lib/hostinfo/typemap - for i - do case $i in - "") i=. ;; - esac - case $canon in - '') case $cc in - /*|cc) ;; - *) if executable $i/$cc - then a=$($i/$cc -dumpmachine $CCFLAGS 2>/dev/null) - case $a in - '') case $CCFLAGS in - ?*) a=$($cc -dumpmachine 2>/dev/null) ;; - esac - ;; - esac - case $a in - ''|*' '*|*/*:*) - ;; - *-*) canon=$a - ;; - *) _hostinfo_="$_hostinfo_ $a" - continue 2 - ;; - esac - fi - ;; - esac - ;; - esac - if test -f "$i/$f" - then map="$(grep -v '^#' $i/$f) $map" - fi - done - - # inconsistent -dumpmachine filtered here - - case -${canon}- in - --|*-powerpc-*) - h=$(hostname || uname -n || cat /etc/whoami) - case $h in - '') h=local ;; - esac - a=$(arch || uname -m || att uname -m || uname -s || att uname -s) - case $a in - *[\ \ ]*) a=$(echo $a | sed "s/[ ]/-/g") ;; - esac - case $a in - '') a=unknown ;; - esac - m=$(mach || machine || uname -p || att uname -p) - case $m in - *[\ \ ]*) m=$(echo $m | sed "s/[ ]/-/g") ;; - esac - case $m in - '') m=unknown ;; - esac - x=$(uname -a || att uname -a) - case $x in - '') x="unknown $host unknown unknown unknown unknown unknown" ;; - esac - set "" $h $a $m $x - expected=$1 host=$2 arch=$3 mach=$4 os=$5 sys=$6 rel=$7 ver=$8 - ;; - *) case $canon in - *-*) IFS=- - set "" $canon - shift - IFS=$ifs - case $# in - 2) host= mach= arch=$1 os=$2 sys= rel= ;; - *) host= mach=$2 arch=$1 os=$3 sys= rel= ;; - esac - case $os in - [abcdefghijklmnopqrstuvwxyz]*[0123456789]) - eval $(echo $os | sed -e 's/^\([^0123456789.]*\)\.*\(.*\)/os=\1 rel=\2/') - ;; - esac - ;; - *) arch=$canon mach= os= sys= rel= - ;; - esac - ;; - esac - type=unknown - case $host in - *.*) host=$(echo $host | sed -e 's/\..*//') ;; - esac - case $mach in - unknown) - mach= - ;; - [Rr][0123][0123456789][0123456789][0123456789]) - mach=mips1 - ;; - [Rr][4][0123456789][0123456789][0123456789]) - mach=mips2 - ;; - [Rr][56789][0123456789][0123456789][0123456789]|[Rr][123456789][0123456789][0123456789][0123456789][0123456789]) - mach=mips4 - ;; - pc) arch=i386 - mach= - ;; - [Pp][Oo][Ww][Ee][Rr][Pp][Cc]) - arch=ppc - mach= - ;; - *) case $arch in - 34[0123456789][0123456789]) - os=ncr - arch=i386 - ;; - esac - ;; - esac - case $canon in - '') set \ - \ - /NextDeveloper -d next - \ - /config/hw/system/cpu -d tandem mach \ - - while : - do case $# in - 0) break ;; - esac - if test $2 $1 - then os=$3 - case $4 in - arch) mach=$arch ;; - mach) arch=$mach ;; - esac - break - fi - shift;shift;shift;shift - done - ;; - esac - case $os in - AIX*|aix*) - type=ibm.risc - ;; - HP-UX) case $arch in - 9000/[78]*) - type=hp.pa - ;; - */*) type=hp.$(echo $arch | sed 's,/,_,g') - ;; - *) type=hp.$arch - ;; - esac - ;; - [Ii][Rr][Ii][Xx]*) - set xx $(hinv | sed -e '/^CPU:/!d' -e 's/CPU:[ ]*\([^ ]*\)[ ]*\([^ ]*\).*/\1 \2/' -e q | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz) - shift - type=$1 - n= - case $2 in - r[0123][0123456789][0123456789][0123456789]) - n=1 - ;; - r[4][0123][0123456789][0123456789]) - n=2 - ;; - r[4][456789][0123456789][0123456789]|r[5][0123456789][0123456789][0123456789]) - n=3 - ;; - r[6789][0123456789][0123456789][0123456789]|r[123456789][0123456789][0123456789][0123456789][0123456789]) - n=4 - ;; - esac - case $rel in - [01234].*|5.[012]|5.[012].*) - case $n in - 1) ;; - *) n=2 ;; - esac - ;; - 5.*) case $n in - 2) n=3 ;; - esac - ;; - esac - if executable $cc - then a=$cc - else IFS=: - set /$IFS$PATH - IFS=$ifs - shift - for i - do a=$i/$cc - if executable $a - then break - fi - done - fi - split=' -' - a=$(strings $a < /dev/null | sed -e 's/[^abcdefghijklmnopqrstuvwxyz0123456789]/ /g' -e 's/[ ][ ]*/\'"$split"'/g' | sed -e "/^${type}[0123456789]$/!d" -e "s/^${type}//" -e q) - case $a in - [0123456789]) n=$a ;; - esac - case $n in - 4) a=$($cc -${type}3 2>&1) - case $a in - *unknown*|*install*|*conflict*) - ;; - *) n=3 - ;; - esac - ;; - esac - a=$($cc -show F0oB@r.c 2>&1) - case $n:$a in - [!2]:*mips2*) n=2 ;; - [!23]:*mips3*) n=3 ;; - [!234]:*mips4*) n=4 ;; - esac - case $n:$a in - [!2]:*[Oo]32*) abi=-o32 ;; - [!3]:*[Nn]32*) abi=-n32 ;; - esac - mach=${type}$n - type=sgi.$mach - ;; - OSx*|SMP*|pyramid) - type=pyr - ;; - OS/390) type=mvs.390 - ;; - [Ss][Cc][Oo]*) - type=sco - ;; - [Ss]ol*) - v=$(echo $rel | sed -e 's/^[25]\.//' -e 's/\.[^.]*$//') - case $v in - [6789]|[1-9][0-9]) - ;; - *) v= - ;; - esac - case $arch in - '') case $mach in - '') arch=sun4 ;; - *) arch=$mach ;; - esac - ;; - esac - case $arch in - sparc) arch=sun4 ;; - esac - type=sol$v.$arch - ;; - [Ss]un*)type=$(echo $arch | sed -e 's/\(sun.\).*/\1/') - case $type in - sparc) type=sun4 ;; - esac - case $rel in - [01234]*) - ;; - '') case $os in - *[Oo][Ss]) - ;; - *) type=sol.$type - ;; - esac - ;; - *) case $type in - '') case $mach in - sparc*) type=sun4 ;; - *) type=$mach ;; - esac - ;; - esac - v=$(echo $rel | sed -e 's/^[25]\.//' -e 's/\.[^.]*$//') - case $v in - [6789]|[1-9][0-9]) - ;; - *) v= - ;; - esac - type=sol$v.$type - ;; - esac - case $type in - sun*|*.*) - ;; - *) type=sun.$type - ;; - esac - ;; - [Uu][Nn][Ii][Xx]_[Ss][Vv]) - type=unixware - ;; - UTS*|uts*) - if test -x /bin/u370 -o -x /bin/u390 - then type=uts.390 - else case $arch in - '') arch=$mach ;; - esac - type=uts.$arch - fi - ;; - $host) type=$arch - case $type in - *.*|*[0123456789]*86|*68*) - ;; - *) case $mach in - *[0123456789]*86|*68*|mips) - type=$type.$mach - ;; - esac - ;; - esac - ;; - unknown) - case $arch in - ?*) case $arch in - sun*) mach= ;; - esac - type=$arch - case $mach in - ?*) type=$type.$mach ;; - esac - ;; - esac - ;; - *) case $ver in - FTX*|ftx*) - case $mach in - *[0123456789][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]*) - mach=$(echo $mach | sed -e 's/[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]*$//') - ;; - esac - type=stratus.$mach - ;; - *) case $arch in - [Oo][Ss][-/.]2) - type=os2 - arch=$rel - ;; - *) type=$(echo $os | sed -e 's/[0123456789].*//' -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_0123456789.].*//') - ;; - esac - case $type in - [Cc][Yy][Gg][Ww][Ii][Nn]_*) - type=cygwin - ;; - [Uu][Ww][Ii][Nn]*|[Ww]indows_[0123456789][0123456789]|[Ww]indows_[Nn][Tt]) - type=win32 - arch=$(echo $arch | sed -e 's/_[^_]*$//') - ;; - esac - case $arch in - '') case $mach in - ?*) type=$type.$mach ;; - esac - ;; - *) type=$type.$arch ;; - esac - ;; - esac - esac - case $type in - [0123456789]*) - case $mach in - ?*) type=$mach ;; - esac - case $type in - */MC) type=ncr.$type ;; - esac - ;; - *.*) ;; - *[0123456789]*86|*68*) - case $rel in - [34].[0123456789]*) - type=att.$type - ;; - esac - ;; - [abcdefghijklmnopqrstuvwxyz]*[0123456789]) - ;; - [abcdefghijklmnopqrstuvwxyz]*) case $mach in - $type) case $ver in - Fault*|fault*|FAULT*) - type=ft.$type - ;; - esac - ;; - ?*) case $arch in - '') type=$type.$mach ;; - *) type=$type.$arch ;; - esac - ;; - esac - ;; - esac - case $type in - *[-_]32|*[-_]64|*[-_]128) - bits=$(echo $type | sed 's,.*[-_],,') - type=$(echo $type | sed 's,[-_][0-9]*$,,') - ;; - *) bits= - ;; - esac - type=$(echo $type | sed -e 's%[-+/].*%%' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz) - case $type in - *.*) lhs=$(echo $type | sed -e 's/\..*//') - rhs=$(echo $type | sed -e 's/.*\.//') - case $rhs in - [x0123456789]*86) rhs=i$rhs ;; - 68*) rhs=m$rhs ;; - esac - case $rhs in - i[x23456789]86|i?[x23456789]86|*86pc) - rhs=i386 ;; - powerpc) rhs=ppc ;; - s[0123456789]*[0123456789]x) - rhs=$(echo $rhs | sed -e 's/x$/-64/') ;; - esac - case $rhs in - arm[abcdefghijklmnopqrstuvwxyz_][0123456789]*) - rhs=arm ;; - hppa) rhs=pa ;; - esac - case $lhs in - ?*coff|?*dwarf|?*elf) - case $lhs in - ?*coff) x=coff ;; - ?*dwarf)x=coff ;; - ?*elf) x=elf ;; - esac - lhs=$(echo ${lhs}XXX | sed -e "s/${x}XXX//") - ;; - esac - case $lhs in - bsdi) lhs=bsd ;; - darwin) case $(/usr/bin/cc --version) in - *'(GCC)'*) case $rel in - [0-9].*|10.*) lhs=darwin07 ;; - *) lhs=darwin11 ;; - esac ;; - esac - ;; - freebsd) case $rel in - [01234].*) lhs=${lhs}4 ;; - [123456789]*.*) lhs=${lhs}$(echo $rel | sed -e 's/\..*//') ;; - esac - ;; - hpux) lhs=hp ;; - mvs) rhs=390 ;; - esac - case $lhs in - '') type=$rhs ;; - $rhs) type=$lhs ;; - *) type=$lhs.$rhs ;; - esac - ;; - esac - case $type in - sgi.mips*) - case $mach in - mips2) type=sgi.$mach - abi=-o32 - ;; - mips3) type=sgi.$mach - abi=-n32 - ;; - mips[456789]) - type=sgi.$mach - case $abi in - *-n32) ;; - *) abi=-64 ;; - esac - ;; - *) pwd=$PWD - cd "$TMPDIR" - tmp=hi$$ - trap 'rm -f $tmp.*' 0 1 2 - cat > $tmp.a.c < $tmp.b.c </dev/null 2>&1 - rm -f $tmp.* - trap - 0 1 2 - cd $pwd - ;; - esac - case $type$abi in - sgi.mips2-o32) - ;; - sgi.mips3) - type=$type-o32 - ;; - sgi.mips3-n32) - ;; - sgi.mips4) - type=$type-o32 - ;; - sgi.mips[456789]-64) - ;; - *) type=$type$abi - ;; - esac - ;; - *) case $bits in - '') bits=$( set -e - cd "$TMPDIR" - tmp=hi$$ - trap 'rm -rf "$tmp".*' 0 1 2 - echo 'int main() { return 0; }' > $tmp.a.c - checkcc - $cc $CCFLAGS -o $tmp.a.exe $tmp.a.c /dev/null 2>&1 - file $tmp.a.exe 2>/dev/null | sed "s/$tmp\.a\.exe//g" ) - case $bits in - *\ 64-bit* | *\ 64\ bit* | *\ 64bit*) - bits=64 ;; - *) bits= ;; - esac - ;; - esac - ;; - esac - case $bits in - 32) case $type in - *.i386) bits= ;; - esac - ;; - esac - case $bits in - ?*) type=$type-$bits ;; - esac - - # last chance mapping - - set "" "" $map - while : - do case $# in - [012]) break ;; - esac - shift;shift - eval " case \$type in - $1) type=\$2; break ;; - esac" - done - _hostinfo_="$_hostinfo_ $type" - ;; - esac - done - set '' $_hostinfo_ - shift - _hostinfo_=$* - - # restore the global state - - PATH=$path - case $DEBUG in - '') exec 2>&9 - exec 9>&- - ;; - esac -} - -# info message - -note() # message ... -{ - printf "$command: %s\\n" "$@" >&2 -} - -err_out() -{ - note "$@" - exit 1 -} - -# cc checks -# -# CC: compiler base name name -# cc: full path, empty if not found - -checkcc() -{ - cc= - if onpath $CC - then cc=$_onpath_ - else case $CC in - cc) if onpath clang - then CC=clang - cc=$_onpath_ - elif onpath gcc - then CC=gcc - cc=$_onpath_ - fi - ;; - esac - fi - case $cc in - '') case $action in - make|test) err_out "$CC: not found" ;; - *) note "warning: $CC: not found" ;; - esac - ;; - esac -} - -# some actions have their own PACKAGEROOT or kick out early - -case $action in -host) eval u=$package_use - case $u in - $PACKAGE_USE) - ;; - *) if onpath $0 - then case $_onpath_ in - */arch/$HOSTTYPE/bin/package) - KEEP_HOSTTYPE=1 - ;; - *) KEEP_HOSTTYPE=0 - ;; - esac - else KEEP_HOSTTYPE=0 - fi - ;; - esac - hostinfo $args - echo $_hostinfo_ - exit 0 - ;; -export|setup|use) - x= - ;; -*) x= - eval u=$package_use - case $u in - $PACKAGE_USE) - case :$PATH: in - *:$INSTALLROOT/bin:*) - case $LIBPATH: in - $INSTALLROOT/bin:$INSTALLROOT/lib:*) - case $SHLIB_PATH: in - $INSTALLROOT/lib:*) - x=1 - ;; - esac - ;; - esac - ;; - esac - ;; - esac - ;; -esac -run=- -case $x in -1) : accept the current package use environment - - OK=ok - KSH=$EXECROOT/bin/ksh - MAKE=mamake - SUM=$EXECROOT/bin/sum - TEE=$EXECROOT/bin/tee - INITROOT=$PACKAGEROOT/src/cmd/INIT - checkcc - ;; -*) hosttype= - case $KEEP_PACKAGEROOT in - 0) case $action in - use) PACKAGEROOT= - case $show in - echo) exec=echo make=echo show=echo ;; - esac - set '' $args - shift - case $# in - 0) ;; - *) case $1 in - -|.) ;; - /*) PACKAGEROOT=$1 - ;; - *) i=$(echo ~$1) - if packageroot $i - then PACKAGEROOT=$i - else for i in $(echo $HOME | sed -e 's,/[^/]*$,,') $usr $use - do if packageroot $i/$1 - then PACKAGEROOT=$i/$1 - break - fi - done - case $PACKAGEROOT in - '') hosttype=$1 ;; - esac - fi - ;; - esac - shift - ;; - esac - run="$@" - ;; - esac - case $PACKAGEROOT in - '') PACKAGEROOT=$PWD ;; - esac - - # . must be within the PACKAGEROOT tree - - i=X$PACKAGEROOT - IFS=/ - set $i - IFS=$ifs - while : - do i=$1 - shift - case $i in - X) break ;; - esac - done - case $PACKAGEROOT in - //*) d=/ ;; - *) d= ;; - esac - case $1 in - home) k=1 ;; - *) k=0 ;; - esac - for i - do case $i in - '') continue ;; - esac - d=$d/$i - case $k in - 2) k=1 - ;; - 1) k=0 - ;; - 0) case $i in - arch) k=2 - ;; - *) if packageroot $d - then PACKAGEROOT=$d - fi - ;; - esac - ;; - esac - done - ;; - esac - INITROOT=$PACKAGEROOT/src/cmd/INIT - $show PACKAGEROOT=$PACKAGEROOT - $show export PACKAGEROOT - export PACKAGEROOT - - # initialize the architecture environment - - case $KEEP_HOSTTYPE in - 0) hostinfo type - HOSTTYPE=$_hostinfo_ - ;; - 1) _PACKAGE_HOSTTYPE_=$HOSTTYPE - export _PACKAGE_HOSTTYPE_ - ;; - esac - $show HOSTTYPE=$HOSTTYPE - $show export HOSTTYPE - export HOSTTYPE - INSTALLROOT=$PACKAGEROOT/arch/$HOSTTYPE - case $action in - install|make|remove|test|view) - ;; - *) if test ! -d $INSTALLROOT - then INSTALLROOT=$PACKAGEROOT - fi - ;; - esac - $show INSTALLROOT=$INSTALLROOT - $show export INSTALLROOT - export INSTALLROOT - - # check the basic package hierarchy - - case $action in - export|use) - packageroot $PACKAGEROOT || err_out "$PACKAGEROOT: invalid package root directory" - case $KEEP_HOSTTYPE:$hosttype in - 0:?*) if test -d ${PACKAGEROOT:-.}/arch/$hosttype - then KEEP_HOSTTYPE=1 - HOSTTYPE=$hosttype - else err_out "$hosttype: package root not found" - fi - ;; - esac - ;; - *) packageroot $PACKAGEROOT || { - case $KEEP_PACKAGEROOT in - 1) ;; - *) err_out "$PACKAGEROOT: must be in the package root directory tree" - ;; - esac - } - - for i in arch arch/$HOSTTYPE - do test -d $PACKAGEROOT/$i || $exec mkdir $PACKAGEROOT/$i || exit - done - for i in lib - do test -d $INSTALLROOT/$i || $exec mkdir $INSTALLROOT/$i || exit - done - - # no $INITROOT means INIT already installed elsewhere - - if test -d $INITROOT - then - # update the basic package commands - - for i in execrate ignore mamprobe silent - do test -h $PACKAGEROOT/bin/$i 2>/dev/null || - case $(ls -t $INITROOT/$i.sh $PACKAGEROOT/bin/$i 2>/dev/null) in - "$INITROOT/$i.sh"*) - note "update $PACKAGEROOT/bin/$i" - shellmagic - case $SHELLMAGIC in - '') $exec cp $INITROOT/$i.sh $PACKAGEROOT/bin/$i || exit - ;; - *) case $exec in - '') { - echo "$SHELLMAGIC" - cat $INITROOT/$i.sh - } > $PACKAGEROOT/bin/$i || exit - ;; - *) echo "{ -echo \"$SHELLMAGIC\" -cat $INITROOT/$i.sh -} > $PACKAGEROOT/bin/$i" - ;; - esac - ;; - esac - $exec chmod +x $PACKAGEROOT/bin/$i || exit - ;; - esac - done - fi - ;; - esac - path=$PATH - PATH=$INSTALLROOT/bin:$PACKAGEROOT/bin:$PATH - checkcc - PATH=$path - case $cc in - ?*) if test -f $INITROOT/hello.c - then - # check if $CC (full path $cc) is a cross compiler - - ( - cd "$TMPDIR" || exit 3 - cp $INITROOT/hello.c pkg$$.c || exit 3 - $cc -o pkg$$.exe pkg$$.c > pkg$$.e 2>&1 || { - if $cc -Dnew=old -o pkg$$.exe pkg$$.c > /dev/null 2>&1 - then err_out "${warn}$CC: must be a C compiler (not C++)" - else cat pkg$$.e - err_out "${warn}$CC: failed to compile and link $INITROOT/hello.c -- is it a C compiler?" - fi - } - if ./pkg$$.exe >/dev/null 2>&1 - then code=0 - else code=1 - fi - rm -f pkg$$.* - exit $code - ) - code=$? - case $code in - 1) CROSS=1 ;; - esac - fi - ;; - esac - EXECTYPE=$HOSTTYPE - EXECROOT=$INSTALLROOT - case $CROSS in - 0) # dll hackery -- why is this so complicated? - - abi= - case $HOSTTYPE in - sgi.mips[0123456789]*) - x=rld - if executable /lib32/$x || executable /lib64/$x - then case $INSTALLROOT in - */sgi.mips[0123456789]*) - u=$(echo $INSTALLROOT | sed -e 's,-[^-/]*$,,' -e 's,.$,,') - ;; - *) u= - ;; - esac - for a in "n=2 v= l=" "n=3 v=N32 l=lib32" "n=4-n32 v=N32 l=lib32" "n=4 v=64 l=lib64" - do eval $a - case $v in - N32) case $n:$HOSTTYPE in - *-n32:*-n32) ;; - *-n32:*) continue ;; - *:*-n32) continue ;; - esac - ;; - esac - case $l in - ?*) if executable ! /$l/$x - then continue - fi - ;; - esac - case $u in - '') case $HOSTTYPE in - sgi.mips$n|sgi.mips$n-*) - abi="$abi 'd=$INSTALLROOT v=$v'" - ;; - *) continue - ;; - esac - ;; - *) if test -d $u$n - then abi="$abi 'd=$u$n v=$v'" - fi - ;; - esac - done - fi - ;; - esac - case $abi in - '') abi="'d=$INSTALLROOT v='" ;; - esac - p=0 - eval " - for a in $abi - do eval \$a - eval \" - case \\\$LD_LIBRARY\${v}_PATH: in - \\\$d/lib:*) - ;; - *) x=\\\$LD_LIBRARY\${v}_PATH - case \\\$x in - ''|:*) ;; - *) x=:\\\$x ;; - esac - LD_LIBRARY\${v}_PATH=\$d/lib\\\$x - export LD_LIBRARY\${v}_PATH - p=1 - ;; - esac - \" - done - " - case $LD_LIBRARY_PATH in - '') ;; - *) for d in $lib - do case $HOSTTYPE in - *64) if test -d ${d}64 - then d=${d}64 - fi - ;; - esac - case :$LD_LIBRARY_PATH: in - *:$d:*) ;; - *) if test -d $d - then LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$d - p=1 - fi - ;; - esac - done - ;; - esac - case $p in - 1) $show LD_LIBRARY_PATH=$LD_LIBRARY_PATH - $show export LD_LIBRARY_PATH - export LD_LIBRARY_PATH - ;; - esac - case $LIBPATH: in - $INSTALLROOT/bin:$INSTALLROOT/lib:*) - ;; - *) case $LIBPATH in - '') LIBPATH=/usr/lib:/lib ;; - esac - LIBPATH=$INSTALLROOT/bin:$INSTALLROOT/lib:$LIBPATH - $show LIBPATH=$LIBPATH - $show export LIBPATH - export LIBPATH - ;; - esac - case $SHLIB_PATH: in - $INSTALLROOT/lib:*) - ;; - *) SHLIB_PATH=$INSTALLROOT/lib${SHLIB_PATH:+:$SHLIB_PATH} - $show SHLIB_PATH=$SHLIB_PATH - $show export SHLIB_PATH - export SHLIB_PATH - ;; - esac - case $DYLD_LIBRARY_PATH: in - $INSTALLROOT/lib:*) - ;; - *) DYLD_LIBRARY_PATH=$INSTALLROOT/lib${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH} - $show DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH - $show export DYLD_LIBRARY_PATH - export DYLD_LIBRARY_PATH - ;; - esac - case $_RLD_ROOT in - $INSTALLROOT/arch*) ;; - ':') _RLD_ROOT=$INSTALLROOT/arch:/ ;; - /|*:/) _RLD_ROOT=$INSTALLROOT/arch:$_RLD_ROOT ;; - *) _RLD_ROOT=$INSTALLROOT/arch:$_RLD_ROOT:/ ;; - esac - $show _RLD_ROOT=$_RLD_ROOT - $show export _RLD_ROOT - export _RLD_ROOT - - # now set up PATH - # - # NOTE: PACKAGEROOT==INSTALLROOT is possible for binary installations - - case $PATH: in - $PACKAGEROOT/bin:*) - ;; - *) PATH=$PACKAGEROOT/bin:$PATH - ;; - esac - case $PATH: in - $INSTALLROOT/bin:*) - ;; - *) PATH=$INSTALLROOT/bin:$PATH - ;; - esac - $show PATH=$PATH - $show export PATH - export PATH - ;; - *) for i in package - do if onpath $i - then EXECROOT=$(echo $_onpath_ | sed -e 's,//*[^/]*//*[^/]*$,,') - EXECTYPE=$(echo $EXECROOT | sed -e 's,.*/,,') - break - fi - done - case $HOSTTYPE in - $EXECTYPE) - OCC=$CC - CC=cc - hostinfo type - EXECTYPE=$_hostinfo_ - case $HOSTTYPE in - $EXECTYPE) - err_out "$CC seems to be a cross-compiler." \ - "Set HOSTTYPE to something other than the native $EXECTYPE." \ - "If not, your $TMPDIR directory may be mounted without execute permission." \ - "Try exporting TMPDIR as a directory where you can execute binary files." - ;; - esac - ;; - esac - $show EXECTYPE=$EXECTYPE - $show export EXECTYPE - export EXECTYPE - ;; - esac - $show EXECROOT=$EXECROOT - $show export EXECROOT - export EXECROOT - - # use these if possible - - OK=ok - KSH=$EXECROOT/bin/ksh - MAKE=mamake - SUM=$EXECROOT/bin/sum - TEE=$EXECROOT/bin/tee - - # grab a decent default shell - - checksh "$SHELL" || KEEP_SHELL=0 - case $KEEP_SHELL in - 0) save_PATH=$PATH - if PATH=$(getconf PATH 2>/dev/null) - then PATH=$PATH:$path - else PATH=/bin:/usr/bin:/sbin:/usr/sbin:$path - fi - for i in ksh ksh93 mksh yash bash sh - do if onpath "$i" && checksh "$_onpath_" - then SHELL=$_onpath_ - KEEP_SHELL=1 - break - fi - done - PATH=$save_PATH - unset save_PATH - case $KEEP_SHELL in - 0) err_out "Cannot find a good default shell; please supply SHELL=/path/to/shell" - ;; - esac - ;; - esac - export SHELL - $show SHELL=$SHELL - $show export SHELL - - # tame the environment - - case $action in - use) ;; - *) ENV= - ERROR_OPTIONS= - export ENV ERROR_OPTIONS - ;; - esac - - # finalize the views - - case $USER_VPATH in - '') case $VPATH in - ?*) IFS=':' - set '' $VPATH - shift - IFS=$ifs - USER_VPATH= - for i - do case $i in - */arch/$HOSTTYPE) ;; - */arch/*/*) ;; - */arch/*) continue ;; - esac - if packageroot $i - then case $USER_VPATH in - '') USER_VPATH=$i ;; - ?*) USER_VPATH=$USER_VPATH:$i ;; - esac - fi - done - esac - ;; - esac - case $USER_VPATH in - ?*) IFS=':' - set '' $USER_VPATH - shift - IFS=$ifs - USER_VPATH= - USER_VPATH_CHAIN= - p=$PACKAGEROOT - for i - do case $i in - ''|$PACKAGEROOT|$INSTALLROOT) - ;; - ?*) USER_VPATH=$USER_VPATH:$i - USER_VPATH_CHAIN="$USER_VPATH_CHAIN $p $i" - p=$i - ;; - esac - done - ;; - esac - ;; -esac - -PACKAGEBIN=$INSTALLROOT/lib/package -case $action:$run in -use:-) set '' $args - shift - case $# in - 0) ;; - *) shift ;; - esac - run="$@" - ;; -esac - -# HOSTTYPE specific package profile - -if test -r $INSTALLROOT/lib/package/profile -then . $INSTALLROOT/lib/package/profile -fi - -# more Cygwin hassles - -case $HOSTTYPE in -cygwin.*) - lose= - case $CYGWIN in - *nontsec*) - lose=ntsec - ;; - *ntsec*);; - *) exe=$TMPDIR/pkg$$.exe - rm -f "$exe" - : > "$exe" - if test -x "$exe" - then lose=ntsec - fi - ;; - esac - case $CYGWIN in - *nobinmode*) - case $lose in - '') lose=binmode ;; - *) lose="$lose binmode" ;; - esac - ;; - esac - case $lose in - ?*) err_out "$HOSTTYPE: export '$lose' in CYGWIN or languish in Windows" - ;; - esac - ;; -esac - -# set up the view state - -VIEW_bin=$INSTALLROOT VIEW_src=$PACKAGEROOT VIEW_all="$INSTALLROOT $PACKAGEROOT" -VPATH=$INSTALLROOT:$PACKAGEROOT$USER_VPATH -$show VPATH=$VPATH -$show export VPATH -export VPATH -IFS=':' -set '' $VPATH -shift -IFS=$ifs -for i -do case $i in - */arch/*/*) - VIEW_src="$VIEW_src $i" - ;; - */arch/*) - VIEW_bin="$VIEW_bin $i" - ;; - *) - VIEW_src="$VIEW_src $i" - ;; - esac - VIEW_all="$VIEW_all $i" -done - -# return 0 if arg in src|bin|all view - -view() # [test] [-|type] [src|bin|all] file -{ - case $1 in - -[dfsx])_view_T_=$1; shift ;; - *) _view_T_=-f ;; - esac - case $1 in - -) _view_t_= ;; - *) _view_t_=$1 ;; - esac - shift - case $1 in - all) shift; _view_v_=$VIEW_all ;; - bin) shift; _view_v_=$VIEW_bin ;; - src) shift; _view_v_=$VIEW_src ;; - *) _view_v_=$VIEW_all ;; - esac - case $1 in - /*) if test $_view_T_ $1 - then _view_=$1 - return 0 - fi - ;; - *) for _view_d_ in $_view_v_ - do if test $_view_T_ $_view_d_/$1 - then _view_=$_view_d_/$1 - return 0 - fi - done - ;; - esac - _view_= - case $_view_t_ in - ?*) note "$1: $_view_t_ not found" ;; - esac - return 1 -} - -# determine the package and targets - -case $action in -*) package= - target= - set '' $args - while : - do shift - case $# in - 0) break ;; - esac - case $1 in - ''|-) target="$target $package" - package= - ;; - *) if view - src "lib/package/$1.pkg" - then package="$package $1" - else target="$target $package $1" - package= - fi - ;; - esac - done - ;; -esac - -# check that cmd args are up to date a.out's - -checkaout() # cmd ... -{ - case $cc in - '') _PACKAGE_cc=0 - ;; - *) _PACKAGE_cc=1 - test -f $INITROOT/hello.c -a -f $INITROOT/p.c || { - note "$INITROOT: INIT package source not found" - return 1 - } - - for i in arch arch/$HOSTTYPE arch/$HOSTTYPE/bin - do test -d $PACKAGEROOT/$i || $exec mkdir $PACKAGEROOT/$i || return - done - ;; - esac - case $_PACKAGE_cc in - '') case $cc in - '') _PACKAGE_cc=0 ;; - *) _PACKAGE_cc=1 ;; - esac - ;; - esac - for i - do eval j=\$_PACKAGE_AOUT_$i - case $j in - '') eval _PACKAGE_AOUT_$i=1 ;; - *) continue ;; - esac - k=$_PACKAGE_cc - if test -f $INITROOT/$i.c - then k=${k}1 - else k=${k}0 - fi - if executable $EXECROOT/bin/$i - then k=${k}1 - else k=${k}0 - fi - : $k : compiler : source : binary : - case $k in - *00) view - bin/$i && continue ;; - esac - case $k in - 000) note "$i: not found: download the INIT package $HOSTTYPE binary to continue" - return 1 - ;; - 010) note "$i: not found: set CC=C-compiler or download the INIT package $HOSTTYPE binary to continue" - return 1 - ;; - 100) note "$i: not found: download the INIT package source or $HOSTTYPE binary to continue" - return 1 - ;; - 110) case $CROSS in - 1) note "$i: not found: make the local $EXECTYPE binary package before $HOSTTYPE" - return 1 - ;; - esac - ;; - ?01) : accept binary - continue - ;; - 011) : accept binary - continue - ;; - ??1) case $CROSS in - 1) continue ;; - esac - ;; - esac - case $(ls -t $INITROOT/$i.c $INSTALLROOT/bin/$i 2>/dev/null) in - "$INITROOT/$i.c"*) - note "update $INSTALLROOT/bin/$i" - if test ! -d $INSTALLROOT/bin - then for j in arch arch/$HOSTTYPE arch/$HOSTTYPE/bin - do test -d $PACKAGEROOT/$j || $exec mkdir $PACKAGEROOT/$j || return - done - fi - $exec $CC $CCFLAGS -o $INSTALLROOT/bin/$i $INITROOT/$i.c || return - test -f $i.o && $exec rm -f $i.o - i=$PATH - PATH=/bin - PATH=$i - ;; - esac - done - return 0 -} - -# list main environment values - -showenv() -{ - case $1 in - ''|make)for __i__ in CC SHELL $env - do eval echo $__i__='$'$__i__ - done - ;; - esac -} - -# capture command output - -capture() # file command ... -{ - tee_pid= - case $make:$noexec in - :) case $action in - install|make|view) - o=$action - ;; - *) case $package in - ''|*' '*) - o=$action - ;; - *) o=$package - ;; - esac - ;; - esac - d=$PACKAGEBIN/gen - test -d $d || $exec mkdir $d - o=$d/$o - case $o in - $output)o=$o.out - s= - ;; - *) output=$o - if test -f $o.old - then mv $o.old $o.out.1 - if test -f $o.out - then mv $o.out $o.out.2 - fi - elif test -f $o.out - then for i in $(ls -t $o.out.? 2>/dev/null) - do break - done - case $i in - *.1) i=2 ;; - *.2) i=3 ;; - *.3) i=4 ;; - *.4) i=5 ;; - *.5) i=6 ;; - *.6) i=7 ;; - *.7) i=8 ;; - *.8) i=9 ;; - *) i=1 ;; - esac - mv $o.out $o.out.$i - fi - o=$o.out - : > $o - note "$action output captured in $o" - s="$command: $action start at $(date) in $INSTALLROOT" - cmd='case $error_status in 0) r=done;; *) r=failed;; esac;' - cmd=$cmd' echo "$command: $action $r at $(date) in $INSTALLROOT"' - case $quiet in - 0) cmd="$cmd 2>&1 | \$TEE -a $o" ;; - *) cmd="$cmd >> $o" ;; - esac - trap "$cmd" 0 - trap "error_status=1; $cmd; trap 1 0; kill -1 $$" 1 - trap "error_status=1; $cmd; trap 2 0; kill -2 $$" 2 - ;; - esac - case $quiet in - 0) if executable ! $TEE - then TEE=tee - fi - # Connect 'tee' to a FIFO instead of a pipe, so that we can obtain - # the build's exit status and use it for $error_status - rm -f $o.fifo - mkfifo -m 600 $o.fifo || exit - ( - sleep 1 - # unlink early - exec rm $o.fifo - ) & - $TEE -a $o < $o.fifo & - tee_pid=$! - o=$o.fifo - ;; - esac - { - case $s in - ?*) echo "$s" ;; - esac - showenv $action - "$@" - } < /dev/null > $o 2>&1 - ;; - *) $make "$@" - ;; - esac - exit_status=$? - if test "$exit_status" -gt "$error_status" - then error_status=$exit_status - fi - case $tee_pid in - ?*) # allow 'tee' to catch up before returning to prompt - wait "$tee_pid" - ;; - esac -} - -make_recurse() # dir -{ - for _make_recurse_j in $makefiles - do if view - $1/$_make_recurse_j - then return - fi - done -} - -# check for native ASCII 0:yes 1:no - -__isascii__= - -isascii() -{ - case $__isascii__ in - '') case $(echo A | od -o | sed -e 's/[ ]*$//' -e '/[ ]/!d' -e 's/.*[ ]//') in - 005101|040412) __isascii__=0 ;; - *) __isascii__=1 ;; - esac - esac - return $__isascii__ -} - -error_status=0 - -case $action in - -clean|clobber) - cd "$PACKAGEROOT" || exit - note "cleaning up flat view" - # clean up all links with arch dir except bin/package - $exec find "arch/$HOSTTYPE" -path "arch/$HOSTTYPE/bin/package" -o -type f -exec "$SHELL" -c ' - first=y - for h # loop through the PPs - do case $first in - y) set -- # clear PPs ("for" uses a copy) - first=n ;; - esac - p=${h#"arch/$HOSTTYPE/"} # get flat view path - if test "$p" -ef "$h" # is it part of the flat view? - then set -- "$@" "$p" # add to new PPs - fi - done - exec rm -f "$@" # rm all at once: fast - ' "$0" {} + - case $flat in - 0) note "deleting arch/$HOSTTYPE" - $exec rm -rf arch/$HOSTTYPE - ;; - esac - note "removing empty directories" - $exec find . -depth -type d -exec rmdir {} + 2>/dev/null - ;; - -export) case $INSTALLROOT in - $PACKAGEROOT) - INSTALLROOT=$INSTALLROOT/arch/$HOSTTYPE - ;; - esac - case $only in - 0) v='$i=' ;; - *) v= ;; - esac - set '' $target $package - case $# in - 1) set '' $env ;; - esac - while : - do case $# in - 1) break ;; - esac - shift - i=$1 - eval echo ${v}'$'${i} - done - ;; - -install)cd $PACKAGEROOT - echo "A proper installation command is coming back soon, sorry." >&2 - echo "Meanwhile, copy ksh and shcomp from: $INSTALLROOT/arch/$HOSTTYPE/bin" >&2 - exit 1 - ;; - -make|view) - cd $PACKAGEROOT - - # check for some required commands - - must="$AR" - warn="$NM yacc bison" - test="$must $warn" - have= - IFS=: - set /$IFS$PATH - IFS=$ifs - shift - for t in $test - do if executable $t - then have="$have $t" - fi - done - for d - do for t in $test - do case " $have " in - *" $t "*) - ;; - *) if executable $d/$t - then have="$have $t" - fi - ;; - esac - done - done - case " $have " in - *" bison "*) ;; - *" yacc "*) have="$have bison" ;; - esac - case " $have " in - *" yacc "*) ;; - *" bison "*) have="$have yacc" ;; - esac - for t in $test - do case " $have " in - *" $t "*) - ;; - *) case " $must " in - *" $t "*) - err_out "$t: not found -- must be on PATH to $action" - ;; - *) note "warning: $t: not found -- some $action actions may fail" - ;; - esac - ;; - esac - done - - # verify the top view - - if test ! -d $PACKAGEROOT/src - then note "no source packages to make" - exit 0 - elif test ! -d $INSTALLROOT/src - then note "initialize the $INSTALLROOT view" - fi - for i in arch arch/$HOSTTYPE - do test -d $PACKAGEROOT/$i || $exec mkdir $PACKAGEROOT/$i || exit - done - for i in bin bin/$OK bin/$OK/lib fun include lib lib/package lib/package/gen src man man/man1 man/man3 man/man8 - do test -d $INSTALLROOT/$i || $exec mkdir $INSTALLROOT/$i || exit - done - make_recurse src - o= k= - for i in $makefiles - do case $o in - ?*) o="$o -o" k="$k|" ;; - esac - o="$o -name $i" - k="$k$i" - done - o="( $o ) -print" - for d in $src - do i=src/$d - if test -d $i - then test -d $INSTALLROOT/$i || $exec mkdir $INSTALLROOT/$i || exit - make_recurse $i - for j in $(cd $i; find . $o 2>/dev/null | sed -e 's,^\./,,' -e '/\//!d' -e 's,/[^/]*$,,' | sort -u) - do case $j in - $k|$MAKESKIP) continue ;; - esac - test -d $INSTALLROOT/$i/$j || - $exec mkdir -p $INSTALLROOT/$i/$j || exit - done - fi - done - - # check $CC and { ar cc ld ldd } intercepts - - h="${HOSTTYPE} ${HOSTTYPE}.*" - case $HOSTTYPE in - *.*) t=$(echo $HOSTTYPE | sed 's/[.][^.]*//') - h="$h $t" - ;; - *) t=$HOSTTYPE - ;; - esac - case $t in - *[0123456789]) - t=$(echo $t | sed 's/[0123456789]*$//') - h="$h $t" - ;; - esac - case $CC in - cc) c=cc - b=$INSTALLROOT/bin/$c - t=$INSTALLROOT/lib/package/gen/$c.tim - intercept=0 - for k in $h - do for s in $INITROOT/$c.$k - do test -x "$s" || continue - if cmp -s "$s" "$b" >/dev/null 2>&1 - then intercept=1 - break 2 - fi - case $(ls -t "$t" "$b" "$s" 2>/dev/null) in - $t*) ;; - $b*) cc=$b - ;; - $s*) $exec cd $INSTALLROOT/lib/package/gen - tmp=pkg$$ - $exec eval "echo 'int main(){return 0;}' > $tmp.c" - if $exec $s -o $tmp.exe $tmp.c >/dev/null 2>&1 && - test -x $tmp.exe - then case $HOSTTYPE in - *.mips*)$s -version >/dev/null 2>&1 || s= ;; - esac - case $s in - ?*) $exec sed "s/^HOSTTYPE=.*/HOSTTYPE=$HOSTTYPE/" < "$s" > "$b" || exit - $exec chmod +x "$b" || exit - cc=$b - intercept=1 - note "update $b" - ;; - esac - fi - $exec rm -f $tmp.* - $exec touch "$t" - cd $PACKAGEROOT - ;; - esac - break 2 - done - done - case $intercept in - 1) c=ld - b=$INSTALLROOT/bin/$c - for k in $h - do for s in $INITROOT/$c.$k - do test -x "$s" || continue - case $(ls -t "$b" "$s" 2>/dev/null) in - $b*) ;; - $s*) $exec cp "$s" "$b" - note "update $b" - ;; - esac - done - done - ;; - esac - ;; - esac - c=ldd - b=$INSTALLROOT/bin/$c - for t in $h - do s=$INITROOT/$c.$t - test -x "$s" || continue - onpath $c || - case $(ls -t "$b" "$s" 2>/dev/null) in - $b*) ;; - $s*) $exec cp "$s" "$b" - note "update $b" - ;; - esac - done - c=ar - b=$INSTALLROOT/bin/$c - for t in $h - do s=$INITROOT/$c.$t - test -x "$s" || continue - case $(ls -t "$b" "$s" 2>/dev/null) in - $b*) ;; - $s*) $exec cp "$s" "$b" - note "update $b" - ;; - esac - done - case $cc in - /*) ;; - *) err_out "$CC: not found -- set CC=C-compiler" - ;; - esac - case $exec in - '') cd $INSTALLROOT/lib/package/gen - tmp=pkg$$ - echo 'int main(){return 0;}' > $tmp.c - if $CC -o $tmp.exe $tmp.c > /dev/null 2> $tmp.err && - test -x $tmp.exe - then : ok - else note "$CC: failed to compile this program:" - cat $tmp.c >&2 - if test -s $tmp.err - then cat $tmp.err >&2 - else note "$CC: not a C compiler" - fi - rm -f $tmp.* - exit 1 - fi - rm -f $tmp.* - cd $PACKAGEROOT - ;; - esac - - # remember the default $CC - - case $CC in - cc) ;; - *) if test -x $INSTALLROOT/bin/cc - then case $(sed 1q $INSTALLROOT/bin/cc) in - ": $CC :") - CC=cc - export CC - ;; - *) assign="$assign CC=\"\$CC\"" - ;; - esac - else case $CROSS in - 1) assign="$assign CC=\"\$CC\"" - ;; - *) case $exec in - '') { - echo ": $CC :" - echo "$CC \"\$@\"" - } > $INSTALLROOT/bin/cc - chmod +x $INSTALLROOT/bin/cc - ;; - *) note "generate a $INSTALLROOT/bin/cc wrapper for $CC" - ;; - esac - CC=cc - export CC - ;; - esac - fi - ;; - esac - - # no $INITROOT means INIT already installed elsewhere - - if test -d $INITROOT - then - # update probe scripts - - for i in lib/probe lib/probe/C lib/probe/C/make - do test -d $INSTALLROOT/$i || $exec mkdir $INSTALLROOT/$i || exit - done - i=$INSTALLROOT/lib/probe/C/make/probe - j=$INITROOT/C+probe - k=$INITROOT/make.probe - case $(ls -t $i $j $k 2>/dev/null) in - $i*) ;; - *) if test -f $j -a -f $k - then note "update $i" - shellmagic - case $exec in - '') { - case $SHELLMAGIC in - ?*) echo "$SHELLMAGIC" ;; - esac - cat $j $k - } > $i || exit - ;; - *) echo "{ -echo $SHELLMAGIC -cat $j $k -} > $i" - ;; - esac - $exec chmod +x $i || exit - fi - ;; - esac - fi - - # initialize mamake - - checkaout mamake || exit - - # execrate if necessary - - if (execrate) >/dev/null 2>&1 - then execrate=execrate - $make cd $INSTALLROOT/bin - for i in chmod chgrp cmp cp ln mv rm - do if test ! -x $OK/$i -a -x /bin/$i.exe - then shellmagic - case $exec in - '') echo "$SHELLMAGIC"'execrate /bin/'$i' "$@"' > $OK/$i - chmod +x $OK/$i - ;; - *) $exec echo \'"$SHELLMAGIC"'execrate /bin/'$i' "$@"'\'' >' $OK/$i - $exec chmod +x $OK/$i - ;; - esac - fi - done - PATH=$INSTALLROOT/bin/$OK:$PATH - export PATH - else execrate= - fi - case $action in - view) exit 0 ;; - esac - - # check against previous compiler and flags - - err= - for var in CC CCFLAGS CCLDFLAGS LDFLAGS KSH_RELFLAGS - do store=$INSTALLROOT/lib/package/gen/$var - eval "new=\$$var" - if test -f $store - then old=$(cat $store) - case $old in - "$new") ;; - *) case $old in - '') old="(none)" ;; - *) old="'$old'" ;; - esac - case $new in - '') new="(none)" ;; - *) new="'$new'" ;; - esac - note "$var changed from $old to $new" - err=y ;; - esac - else test -d $INSTALLROOT/lib/package/gen && case $new in - '') ;; - *) echo "$new" ;; - esac > $store - fi - done - case $err,${FORCE_FLAGS+f} in - y,) err_out "This would likely break the build. Restore the flag(s)," \ - "or delete the build directory and rebuild from scratch." - ;; - esac - unset err var store old new - - # all work under $INSTALLROOT/src - - $make cd $INSTALLROOT/src - - # record the build host name - - case $exec in - '') hostinfo name - echo "$_hostinfo_" | sed 's,\..*,,' > $PACKAGEBIN/gen/host - ;; - esac - - # separate flags from target list - - case $target in - *-*) a= - for t in $target - do case $t in - -*) makeflags="$makeflags $t" - ;; - *) a="$a $t" - ;; - esac - done - target=$a - ;; - esac - - # mamprobe data should have been generated by this point - - case $exec in - '') if test ! -f $INSTALLROOT/bin/.paths -o -w $INSTALLROOT/bin/.paths - then N=' -' - b= f= h= n= p= u= B= L= - if test -f $INSTALLROOT/bin/.paths - then exec < $INSTALLROOT/bin/.paths - while read x - do case $x in - '#'?*) case $h in - '') h=$x ;; - esac - ;; - *BUILTIN_LIB=*) b=$x - ;; - *FPATH=*) f=$x - ;; - *PLUGIN_LIB=*) p=$x - ;; - *) case $u in - ?*) u=$u$N ;; - esac - u=$u$x - ;; - esac - done - fi - ifs=$IFS - m= - case $p in - ?*) b= - ;; - esac - case $b in - ?*) IFS='=' - set $b - IFS=$ifs - shift - p="PLUGIN_LIB=$*" - case $b in - [Nn][Oo]*) p=no$p ;; - esac - m=1 - ;; - esac - case $f in - '') f="FPATH=../fun" - m=1 - ;; - esac - case $h in - '') h='# use { no NO } prefix to permanently disable #' ;; - esac - case $p in - '') p="PLUGIN_LIB=cmd" - if grep '^setv mam_cc_DIALECT .* EXPORT=[AD]LL' $INSTALLROOT/lib/probe/C/mam/* >/dev/null 2>&1 - then p=no$p - fi - m=1 - ;; - esac - case $m in - 1) case $u in - ?*) u=$N$u ;; - esac - echo "$h$N$p$N$f$N$u" > $INSTALLROOT/bin/.paths - ;; - esac - fi - ;; - esac - - # run from separate copies since ksh may be rebuilt - - case $EXECROOT in - $INSTALLROOT) - $make cd $INSTALLROOT/bin - if executable /bin/cp - then cp=/bin/cp - else cp=cp - fi - if executable /bin/mv - then mv=/bin/mv - else mv=mv - fi - if executable /bin/rm - then rm=/bin/rm - else rm=rm - fi - for i in \ - ksh tee cp ln mv rm \ - *ast*.dll *cmd*.dll *dll*.dll *shell*.dll - do executable $i && { - cmp -s $i $OK/$i 2>/dev/null || { - test -f $OK/$i && - $exec $execrate $rm $OK/$i /dev/null || ln -sf "$h" "$p" || exit - done - ' "$0" {} + - ;; - esac - ;; - -results)set '' $target - shift - def=make - dir=$PACKAGEBIN/gen - case $verbose in - 0) filter=yes ;; - *) filter=cat ;; - esac - path=0 - suf=out - on= - while : - do case $# in - 0) break ;; - esac - case $1 in - --) shift - break - ;; - error*|fail*) - filter=errors - ;; - make|test|view) - def=$1 - case $filter:$1:$SHELL in - errors:*:*) ;; - *:test:*/ksh*) filter=rt ;; - esac - ;; - old) suf=old - ;; - on) case $# in - 1) err_out "$action: $1: host pattern argument expected" - ;; - esac - shift - case $on in - ?*) on="$on|" ;; - esac - on="$on$1" - ;; - path) path=1 - ;; - test) def=test - filter=rt - ;; - *) break - ;; - esac - shift - done - case $dir in - */admin)case $on in - '') on="*" ;; - *) on="@($on)" ;; - esac - def=$def.log/$on - ;; - esac - case $# in - 0) set "$def" ;; - esac - m= - t= - for i - do k=0 - eval set '""' $i - $i.$suf - $dir/$i - $dir/$i.$suf - - shift - for j - do case $j in - -) case $k in - 1) continue 2 ;; - esac - ;; - *) if test -f $j - then k=1 - case /$j in - */test.*) t="$t $j" ;; - *) m="$m $j" ;; - esac - fi - ;; - esac - done - err_out "$i action output not found" - done - sep= - case $t in - ?*) case $path in - 0) for j in $t - do echo "$sep==> $j <==" - sep=$nl - case $filter in - cat) $exec cat $j - ;; - errors) $exec egrep -i '\*\*\*|FAIL[ES]|^TEST.* [123456789][0123456789]* error|core.*dump' $j | sed -e '/^TEST.\//s,/[^ ]*/,,' - ;; - rt) $exec $KSH rt - $j - ;; - *) $exec egrep -i '^TEST|FAIL' $j - ;; - esac - done - ;; - 1) echo $t - ;; - esac - ;; - esac - case $m in - ?*) case $path in - 0) case $filter in - cat) cat $m - ;; - *) if test -f $HOME/.pkgresults - then i=$(cat $HOME/.pkgresults) - case $i in - '|'*) ;; - *) i="|$i" ;; - esac - else i= - fi - for j in $m - do echo "$sep==> $j <==" - sep=$nl - case $filter in - errors) $exeg egrep '^pax:|\*\*\*' $j - ;; - *) $exec egrep -iv '^($||[\+\[]|cc[^-:]|kill |make.*(file system time|has been replaced)|so|[0123456789]+ error|uncrate |[0123456789]+ block|ar: creat|iffe: test: |conf: (check|generate|test)|[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789]*=|gsf@research|ar:.*warning|cpio:|ld:.*(duplicate symbol|to obtain more information)|[0123456789]*$|(checking|creating|touch) [/abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789])| obsolete predefined symbol | is (almost always misused|dangerous|deprecated|not implemented)| trigraph| assigned to | cast .* different size| integer overflow .*<<| optimization may be attained | passed as |::__builtin|^creating.*\.a$|warning.*not optimized|exceeds size thresh|ld:.*preempts|is unchanged|with value >=|(-l|lib)\*|/(ast|sys)/(dir|limits|param|stropts)\.h.*redefined|usage|base registers|`\.\.\.` obsolete'"$i" $j | - $exec grep : - ;; - esac - done - ;; - esac - ;; - 1) echo $m - ;; - esac - esac - ;; - -test) # pass control to ksh 93u+m test script - capture "$PACKAGEROOT/bin/shtests" $args - ;; - -use) # finalize the environment - - x=:.. - for d in $( cd $PACKAGEROOT; ls src/*/Mamfile 2>/dev/null | sed 's,/[^/]*$,,' | sort -u ) - do x=$x:$INSTALLROOT/$d - done - x=$x:$INSTALLROOT - case $CDPATH: in - $x:*) ;; - *) CDPATH=$x:$CDPATH - $show CDPATH=$CDPATH - $show export CDPATH - export CDPATH - ;; - esac - eval PACKAGE_USE=$package_use - export PACKAGE_USE - unset LC_ALL # respect the user's locale again; avoids multibyte corruption - - # run the command - - case $run in - '') note "You are now entering a new environment set up to use the package in:" \ - " $INSTALLROOT" \ - "You're using the shell:" \ - " $SHELL" \ - "Type 'exit' to leave and go back to normal." - case $show in - ':') $exec exec $SHELL ;; - esac - ;; - *) $exec exec $SHELL -c "$run" - ;; - esac - ;; - -*) err_out "$action: internal error" - ;; - -esac - -exit "$error_status" diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/probe.win32 b/cde/programs/dtksh/ksh93/src/cmd/INIT/probe.win32 deleted file mode 100644 index 2774bb34c..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/probe.win32 +++ /dev/null @@ -1,274 +0,0 @@ -: -# @(#)probe.win32 (AT&T Research) 2010-01-01 -# -# Win32 specific make C probe initialization -# wrapped cc's are easy on UWIN -# -# 2> easy.err to avoid mysterious hang with bcc - -# begin preamble shared with the pp probe.ini - -IFS=$'\n' - -chmod 777 . # cl.exe setuid workaround - -typeset -A header version - -# we are probing on behalf of libpp and nmake -# so the native preprocessor must be forced in -# order to bootstrap libpp and nmake - -nativepp=-1 -export nativepp - -probe_header=" -stddef.h -" -for inc in syslimits.h winerror.h ostream bits/ctype_base.h stream.h -do echo "#include <$inc>" > easy.c - if $cc -E easy.c > /dev/null 2> easy.err - then probe_header="$probe_header -$inc -" - fi -done - -{ -for i in $probe_header -do echo "#include <$i>" -done -echo '#ifdef _UWIN' -echo "int _Pr0b3_uwin=_UWIN;" -echo '#endif' -echo '#ifdef __BORLANDC__' -echo "int _Pr0b3_version_BORLAND=__BORLANDC__;" -echo '#endif' -echo '#ifdef __DMC__' -echo "int _Pr0b3_version_DM=__DMC__;" -echo '#endif' -echo '#ifdef _MSC_VER' -echo "int _Pr0b3_version_MS=_MSC_VER;" -echo '#endif' -echo '#ifdef __ICL' -echo "int _Pr0b3_version_ICL=__ICL;" -echo '#endif' -echo '#ifdef __LCC__' -echo "int _Pr0b3_version_LCC=0+__LCC__;" -echo '#endif' -echo '#ifdef __MINGW32__' -echo "int _Pr0b3_version_MINGW=__MINGW32__;" -echo '#endif' -echo '#ifdef __INTERIX' -echo "int _Pr0b3_version_INTERIX=__INTERIX;" -echo '#endif' -echo '#ifdef __WATCOMC__' -echo "int _Pr0b3_version_WATCOM=__WATCOMC__;" -echo '#endif' -} > easy.c - -include= -uwin= - -$cc -E easy.c 2>&1 | -egrep -i '^(#(line)? 1 .*\.[hH]| *int +_Pr0b3_[a-zA-Z_]* *= *[0-9])' | -sed -e 's,_Pr0b3_,,' \ - -e 's/.*"\(.*\)".*/\1/' \ - -e 's,^ *,,' \ - -e 's, *$,,' \ - -e 's, *= *,=,' \ - -e 's,^\(.\):[\\/]*,/\1/,' \ - -e 's,[\\/][\\/]*,/,g' \ - -e 's,^\(/.*\)/\(.*\)$,header[\2]="\1",' \ - -e 's, *int *\(.*\);.*,\1,' \ - -e 's,^version_\(.*\)=,version[\1]=,' \ - > easy.sh -. ./easy.sh - -include= -for i in $probe_header -do d=${header[$i]} - if [[ $d ]] - then include="$include -$d" - elif [[ $i == */* ]] - then d=${header[${i##*/}]} - if [[ $d == */${i%/*} ]] - then include="$include -${d%/${i%/*}}" - fi - fi -done - -i=$($cc -V 2> easy.err) -if test "" != "$i" -a -d "$i/include" -then include="$i/include -$include" -fi - -stdinclude= -for inc in $include -do if [[ ${inc%/*} -ef /msdev/platformsdk ]] - then inc=/msdev/platformsdk/${inc##*/} - elif [[ ${inc%/*} -ef /platformsdk ]] - then inc=/platformsdk/${inc##*/} - fi - for dup in $stdinclude - do [[ $inc -ef $dup ]] && continue 2 - done - stdinclude="$stdinclude -$inc" -done - -# end preamble shared with the pp probe.ini - -if [[ ${version[@]} == [0-9]* && $stdinclude ]] -then : the payoff - set -- $cc - cmd=$1 - shift - set -- $(whence $cmd) "$@" - typ=$(package) - dialect="ANSI CLOSURE DYNAMIC EXPORT=DLL LIBPP -I-" - ld=${cc%cc}ld - if [[ ! -x $ld ]] - then ld=${cc%/*}/ld - if [[ ! -x $ld ]] - then case $cc in - */ncc) ld=/usr/bin/nld ;; - *) ld=/usr/bin/ld ;; - esac - fi - fi - { - if $cc -v >/dev/null 2>&1 - then v=$($cc -v 2>/dev/null) - if [[ $v ]] - then print "# ;VERSION;-v;$v;PATH;$cc" - fi - else v= - fi - cat <&3 - exit 0 -fi diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/proto.sh b/cde/programs/dtksh/ksh93/src/cmd/INIT/proto.sh deleted file mode 100644 index d9f35fce6..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/proto.sh +++ /dev/null @@ -1,35 +0,0 @@ -######################################################################## -# # -# This file is part of the ksh 93u+m package # -# Copyright (c) 2021 Contributors to ksh 93u+m # -# # -# and is licensed under the # -# Eclipse Public License, Version 1.0 # -# # -# A copy of the License is available at # -# http://www.eclipse.org/org/documents/epl-v10.html # -# (with md5 checksum b35adb5213ca9657e911e9befb180842) # -# # -# Martijn Dekker # -# # -######################################################################## - -# proto(1) has been removed. This is a backwards compatibility stub that allows -# compiling older AST code (with Mamfiles containing proto commands) using the -# current INIT system. This stub ignores all options, then invokes 'cat'. - -while getopts ':dfhinprstvzPSC:e:l:o:L:' opt -do case $opt in - \?) case $OPTARG in - +) ;; - *) echo "proto: $OPTARG: unknown option" - echo 'Usage: proto [-dfhinprstvzP+S] [-C directory] [-e package] [-l file]' - echo ' [-o "name='\''value'\'' ..."] [-L file] file ...' - exit 2 - ;; - esac >&2 - ;; - esac -done -shift $((OPTIND - 1)) -exec cat -- "$@" diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/regress.sh b/cde/programs/dtksh/ksh93/src/cmd/INIT/regress.sh deleted file mode 100644 index a53ab61ff..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/regress.sh +++ /dev/null @@ -1,1466 +0,0 @@ -######################################################################## -# # -# This software is part of the ast package # -# Copyright (c) 1994-2012 AT&T Intellectual Property # -# Copyright (c) 2020-2021 Contributors to ksh 93u+m # -# and is licensed under the # -# Eclipse Public License, Version 1.0 # -# by AT&T Intellectual Property # -# # -# A copy of the License is available at # -# http://www.eclipse.org/org/documents/epl-v10.html # -# (with md5 checksum b35adb5213ca9657e911e9befb180842) # -# # -# Information and Software Systems Research # -# AT&T Research # -# Florham Park NJ # -# # -# Glenn Fowler # -# # -######################################################################## -: regress - run regression tests in command.tst - -command=regress -case $(getopts '[-][123:xyz]' opt --xyz 2>/dev/null; echo 0$opt) in -0123) USAGE=$' -[-? -@(#)$Id: regress (AT&T Research) 2012-02-02 $ -] -[-author?Glenn Fowler ] -[-copyright?Copyright (c) 1995-2012 AT&T Intellectual Property] -[-license?http://www.eclipse.org/org/documents/epl-v10.html] -[+NAME?regress - run regression tests] -[+DESCRIPTION?\bregress\b runs the tests in \aunit\a, or - \aunit\a\b.tst\b if \aunit\a does not exist. If \acommand\a is omitted - then it is assumed to be the base name of \aunit\a. All testing is done - in the temporary directory \aunit\a\b.tmp\b.] -[+?Default test output lists the \anumber\a and \adescription\a for - each active \bTEST\b group and the \anumber\a:\aline\a for each - individual \bEXEC\b test. Each test that fails results in a diagnostic - that contains the word \bFAILED\b; no other diagnostics contain this - word.] -[b:ignore-space?Ignore space differences when comparing expected - output.] -[i:pipe-input?Repeat each test with the standard input redirected through a - pipe.] -[k:keep?Enable \bcore\b dumps, exit after the first test that fails, - and do not remove the temporary directory \aunit\a\b.tmp\b.] -[l:local-fs?Force \aunit\a\b.tmp\b to be in a local filesystem.] -[o:pipe-output?Repeat each test with the standard output redirected through - a pipe.] -[p:pipe-io?Repeat each test with the standard input and standard output - redirected through pipes.] -[q:quiet?Output information on \bFAILED\b tests only.] -[r!:regular?Run each test with the standard input and standard output - redirected through regular files.] -[t:test?Run only tests matching \apattern\a. Tests are numbered and - consist of at least two digits (0 filled if necessary). Tests matching - \b+(0)\b are always run.]:[pattern] -[x:trace?Enable debug tracing.] -[v:verbose?List differences between actual (<) and expected (>) output, - errors and exit codes. Also disable long output line truncation.] - -unit [ command [ arg ... ] ] - -[+INPUT FILES?The regression test file \aunit\a\b.tst\b is a \bksh\b(1) - script that is executed in an environment with the following functions - defined:] - { - [+BODY \b{ ... }?Defines the test body; used for complex tests.] - [+CD \b\adirectory\a?Create and change to working directory for - one test.] - [+CLEANUP \b\astatus\a?Called at exit time to remove the - temporary directory \aunit\a\b.tmp\b, list the tests totals via - \bTALLY\b, and exit with status \astatus\a.] - [+COMMAND \b\aarg\a ...?Runs the current command under test with - \aarg\a ... appended to the default args.] - [+CONTINUE?The background job must be running.] - [+COPY \b\afrom to\a?Copy file \afrom\a to \ato\a. \afrom\a may - be a regular file or \bINPUT\b, \bOUTPUT\b or \bERROR\b. Post - test comparisons are still done for \afrom\a.] - [+DIAGNOSTICS \b[ \b1\b | \b0\b | \apattern\a ]]?No argument or an - argument of \b1\b declares that diagnostics are to expected for - the remainder of the current \bTEST\b; \b0\b reverts to the default - state that diagnostics are not expected; otherwise the argument - is a \bksh\b(1) pattern that must match the non-empty contents - of the standard error.] - [+DO \b\astatement\a?Defines additional statements to be executed - for the current test. \astatement\a may be a { ... } group.] - [+EMPTY \bINPUT|OUTPUT|ERROR|SAME?The corresponding file is - expected to be empty.] - [+ERROR \b[ \b-e\b \afilter\a ]] [ \b-n\b ]] \afile\a | - \adata\a ...?The - standard error is expected to match either the contents - of \afile\a or the line \adata\a. \bERROR -n\b does not - append a newline to \adata\a. \afilter\a is a shell command - or pipeline that reads standard input and writes standard - output that is applied to ERROR before comparison with the - expected contents.] - [+EXEC \b[ \aarg\a ... ]]?Runs the command under test with - optional arguments. \bINPUT\b, \bOUTPUT\b, \bERROR\b, \bEXIT\b - and \bSAME\b calls following this \bEXEC\b up until the next - \bEXEC\b or the end of the script provide details for the - expected results. If no arguments are specified then the - arguments from the previous \bEXEC\b in the current \bTEST\b - group are used, or no arguments if this is the first \bEXEC\b - in the group.] - [+EXIT \b\astatus\a?The command exit status is expected to match - the pattern \astatus\a.] - [+EXITED?The background job must have exited.] - [+EXPORT \b[-]] \aname\a=\avalue\a ...?Export environment - variables for one test.] - [+FATAL \b\amessage\a ...?\amessage\a is printed on the standard - error and \bregress\b exits with status \b1\b.] - [+FIFO \bINPUT|OUTPUT|ERROR\b [ \b-n\b ]] \afile\a | - \adata\a ...?The - \bIO\B file is a fifo.] - [+IF \b\acommand\a [\anote\a]]?If the \bsh\b(1) \acommand\a exits - 0 then tests until the next \bELIF\b, \bELSE\b or \bFI\b are - enabled. Otherwise those tests are skipped. \bIF\b ... \bFI\b - may be nested, but must not cross \bTEST\b boundaries. \anote\a - is listed on the standard error if the corresponding test block - is enabled; \bIF\b, \bELIF\b, \bELSE\b may nave a \anote\a - operand.] - [+IGNORE \b\afile\a ...?\afile\a is ignored for subsequent result - comparisons. \afile\a may be \bOUTPUT\b or \bERROR\b.] - [+IGNORESPACE?Ignore space differences when comparing expected - output.] - [+INCLUDE \b\afile\a ...?One or more \afile\a operands are read - via the \bksh\b(1) \b.\b(1) command. \bVIEW\b is used to locate - the files.] - [+INFO \b\adescription\a?\adescription\a is printed on the - standard error.] - [+INITIALIZE?Called by \bregress\b to initialize a each - \bTEST\b group.] - [+INPUT \b[ \b-e\b \afilter\a ]] [ \b-n\b ]] \afile\a | - \adata\a ...?The - standard input is set to either the contents of \afile\a - or the line \adata\a. \bINPUT -n\b does not append a newline - to \adata\a. \afilter\a is a shell command or pipeline that - reads standard input and writes standard output that is - applied to OUTPUT before comparison with the expected contents.] - [+INTRO?Called by \bregress\b to introduce all \bTEST\b - groups.] - [+IO \b[ \bFIFO\b | \bPIPE\b ]] \bINPUT|OUTPUT|ERROR\b [ \b-e\b \afilter\a ]] [ \b-n\b ]] \afile\a | - \adata\a ...?Internal - support for the \bINPUT\b, \bOUTPUT\b and \bERROR\b functions.] - [+JOB \b\aop\a [ ... ]]?Like \bEXEC\b except the command is run - as a background job for the duration of the group or until it - is killed via \bKILL\b.] - [+KEEP \b\apattern\a ...?The temporary directory is cleared for - each test. Files matching \apattern\a are retained between - tests.] - [+KILL \b[ \asignal\a ]]?Kill the background job with \asignal\a - [ \bSIGKILL\b ]].] - [+MOVE \b\afrom to\a?Rename file \afrom\a to \ato\a. \afrom\a may - be a regular file or \bINPUT\b, \bOUTPUT\b or \bERROR\b. Post - test comparisons are ignored for \afrom\a.] - [+NOTE \b\acomment\a?\acomment\a is added to the current test - trace output.] - [+OUTPUT \b[ \b-e\b \afilter\a ]] [ \b-n\b ]] \afile\a | - \adata\a ...?The - standard output is expected to match either the contents - of \afile\a or the line \adata\a. \bOUTPUT -n\b does not - append a newline to \adata\a. \afilter\a is a shell command - or pipeline that reads standard input and writes standard - output that is applied to ERROR before comparison with the - expected contents.] - [+PIPE \bINPUT|OUTPUT|ERROR\b [ \b-n\b ]] \afile\a | - \adata\a ...?The - \bIO\B file is a pipe.] - [+PROG \b\acommand\a [ \aarg\a ... ]]?\acommand\a is run with - optional arguments.] - [+REMOVE \b\afile\a ...?\afile\a ... are removed after the - current test is done.] - [+RUN?Called by \bregress\b to run the current test.] - [+SAME \b\anew old\a?\anew\a is expected to be the same as - \aold\a after the current test completes.] - [+SET \b[\bno\b]]\aname\a[=\avalue\a]]?Set the command line - option --\aname\a. The setting is in effect for all tests until - the next explicit \bSET\b.] - [+TALLY?Called by \bregress\b display the \bTEST\b results.] - [+TEST \b\anumber\a [ \adescription\a ... ]]?Define a new test - group labelled \anumber\a with optional \adescription\a.] - [+TITLE \b[+]] \atext\a?Set the \bTEST\b output title to - \atext\a. If \b+\b is specified then \atext\a is appended to - the default title. The default title is the test file base - name, and, if different from the test file base name, the test - unit base name.] - [+TWD \b[ \adir\a ... ]]?Set the temporary test dir to \adir\a. - The default is \aunit\a\b.tmp\b, where \aunit\a is the test - input file sans directory and suffix. If \adir\a matches \b/*\b - then it is the directory name; if \adir\a is non-null then the - prefix \b${TMPDIR:-/tmp}\b is added; otherwise if \adir\a is - omitted then - \b${TMPDIR:-/tmp}/tst-\b\aunit\a-$$-$RANDOM.\b\aunit\a is - used.] - [+UMASK \b[ \amask\a ]]?Run subsequent tests with \bumask\b(1) - \amask\a. If \amask\a is omitted then the original \bumask\b is - used.] - [+UNIT \b\acommand\a [ \aarg\a ... ]]?Define the command and - optional default arguments to be tested. \bUNIT\b explicitly - overrides the default command name derived from the test script - file name. A \acommand\a operand with optional arguments - overrides the \bUNIT\b \acommand\a and arguments, with the - exception that if the \bUNIT\b \acommand\a is \b-\b or \b+\b - the \bUNIT\b arguments are appended to the operand or default - unit command and arguments.] - [+VIEW \b\avar\a [ \afile\a ]]?\avar\a is set to the full - pathname of \avar\a [ \afile\a ]] in the current \b$VPATH\b - view if defined.] - } -[+SEE ALSO?\bnmake\b(1), \bksh\b(1)] -' - ;; -*) USAGE='ko:[[no]name[=value]]t:[test]v unit [path [arg ...]]' - ;; -esac - -function FATAL # message -{ - print -r -u2 "$command: $*" - GROUP=FINI - exit 1 -} - -function EMPTY -{ - typeset i - typeset -n ARRAY=$1 - for i in ${!ARRAY[@]} - do unset ARRAY[$i] - done -} - -function INITIALIZE # void -{ - typeset i j - cd "$TWD" - case $KEEP in - "") RM * - ;; - *) for i in * - do case $i in - !($KEEP)) j="$j $i" ;; - esac - done - case $j in - ?*) RM $j ;; - esac - ;; - esac - : >INPUT >OUTPUT.ex >ERROR.ex - BODY="" - COPY="" - DIAGNOSTICS="" - DONE="" - ERROR="" - EXIT=0 - IGNORE="" - INIT="" - INPUT="" - MOVE="" - OUTPUT="" - EMPTY FILE - EMPTY FILTER - EMPTY SAME - EMPTY TYPE -} - -function INTRO -{ - typeset base command - - if [[ ! $TEST_quiet ]] - then base=${REGRESS##*/} - base=${base%.tst} - command=${COMMAND##*/} - command=${command%' '*} - set -- $TITLE - TITLE= - case $1 in - ''|+) if [[ $command == $base ]] - then TITLE=$COMMAND - else TITLE="$COMMAND, $base" - fi - if (( $# )) - then shift - fi - ;; - esac - while (( $# )) - do if [[ $TITLE ]] - then TITLE="$TITLE, $1" - else TITLE="$1" - fi - shift - done - print -u2 "TEST $TITLE" - fi -} - -function TALLY # extra message text -{ - typeset msg - case $GROUP in - INIT) ;; - *) msg="TEST $TITLE, $TESTS test" - case $TESTS in - 1) ;; - *) msg=${msg}s ;; - esac - msg="$msg, $ERRORS error" - case $ERRORS in - 1) ;; - *) msg=${msg}s ;; - esac - if (( $# )) - then msg="$msg, $*" - fi - print -u2 "$msg" - GROUP=INIT - TESTS=0 - ERRORS=0 - ;; - esac -} - -function TITLE # text -{ - TITLE=$@ -} - -function UNWIND -{ - while (( COND > 1 )) - do print -r -u2 "$command: line $LINE: no matching FI for IF on line ${COND_LINE[COND]}" - (( COND-- )) - done - if (( COND > 0 )) - then (( COND = 0 )) - FATAL "line $LINE: no matching FI for IF on line ${COND_LINE[COND+1]}" - fi - if [[ $JOBPID ]] - then if [[ $JOBPID != 0 ]] - then kill -KILL $JOBPID 2>/dev/null - wait - fi - JOBPID= - fi - JOBSTATUS= - JOBOP= - wait -} - -function CLEANUP # status -{ - typeset note - - if [[ $GROUP != INIT ]] - then if [[ ! $TEST_keep ]] - then cd $SOURCE - if [[ $TEST_local ]] - then RM ${TEST_local} - fi - RM "$TWD" - fi - if (( $1 )) && [[ $GROUP != FINI ]] - then note=terminated - fi - fi - TALLY $note - [[ $TEST_keep ]] || UNWIND - exit $1 -} - -function RUN # [ op ] -{ - typeset i r=1 - [[ $UMASK != $UMASK_ORIG ]] && umask $UMASK_ORIG -#print -u2 AHA#$LINENO $0 GROUP=$GROUP ITEM=$ITEM FLUSHED=$FLUSHED JOBOP=$JOBOP - case $GROUP in - INIT) RM "$TWD" - if [[ $TEST_local ]] - then TEST_local=${TMPDIR:-/tmp}/rt-$$/${TWD##*/} - mkdir -p "$TEST_local" && ln -s "$TEST_local" "$TWD" || FATAL "$TWD": cannot create directory - TEST_local=${TEST_local%/*} - else mkdir "$TWD" || FATAL "$TWD": cannot create directory - fi - cd "$TWD" - TWD=$PWD - : > rmu - if rm -u rmu >/dev/null 2>&1 - then TEST_rmu=-u - else rm rmu - fi - if [[ $UNIT ]] - then set -- "${ARGV[@]}" - case $1 in - ""|[-+]*) - UNIT $UNIT "${ARGV[@]}" - ;; - *) UNIT "${ARGV[@]}" - ;; - esac - fi - INTRO - ;; - FINI) ;; - $TEST_select) - if [[ $ITEM == $FLUSHED ]] - then return 0 - fi - FLUSHED=$ITEM - if (( COND_SKIP[COND] )) - then return 1 - fi - ((COUNT++)) - if (( $ITEM <= $LASTITEM )) - then LABEL=$TEST#$COUNT - else LASTITEM=$ITEM - LABEL=$TEST:$ITEM - fi - TEST_file="" - exec >/dev/null - for i in $INPUT - do case " $OUTPUT " in - *" $i "*) - if [[ -f $i.sav ]] - then cp $i.sav $i - COMPARE="$COMPARE $i" - elif [[ -f $i ]] - then cp $i $i.sav - COMPARE="$COMPARE $i" - fi - ;; - esac - done - for i in $OUTPUT - do case " $COMPARE " in - *" $i "*) - ;; - *) COMPARE="$COMPARE $i" - ;; - esac - done - for i in $INIT - do $i $TEST INIT - done -#print -u2 AHA#$LINENO $0 GROUP=$GROUP ITEM=$ITEM JOBOP=$JOBOP JOBPID=$JOBPID JOBSTATUS=$JOBSTATUS - if [[ $JOBPID != 0 && ( $JOBPID || $JOBSTATUS ) ]] - then if [[ ! $TEST_quiet ]] - then print -nu2 "$LABEL" - fi - RESULTS - elif [[ $BODY ]] - then SHOW=$NOTE - if [[ ! $TEST_quiet ]] - then print -r -u2 " $SHOW" - fi - for i in $BODY - do $i $TEST BODY - done - else SHOW= - if [[ ${TYPE[INPUT]} == PIPE ]] - then if [[ ${TYPE[OUTPUT]} == PIPE ]] - then if [[ ! $TEST_quiet ]] - then print -nu2 "$LABEL" - fi - cat <$TWD/INPUT | COMMAND "${ARGS[@]}" | cat >$TWD/OUTPUT - RESULTS 'pipe input' - else if [[ ! $TEST_quiet ]] - then print -nu2 "$LABEL" - fi - cat <$TWD/INPUT | COMMAND "${ARGS[@]}" >$TWD/OUTPUT - RESULTS 'pipe io' - fi - elif [[ ${TYPE[OUTPUT]} == PIPE ]] - then if [[ ! $TEST_quiet ]] - then print -nu2 "$LABEL" - fi - COMMAND "${ARGS[@]}" <$TWD/INPUT | cat >$TWD/OUTPUT - RESULTS 'pipe output' - else if [[ $TEST_regular ]] - then if [[ ! $TEST_quiet ]] - then print -nu2 "$LABEL" - fi - if [[ ${TYPE[INPUT]} == FIFO ]] - then COMMAND "${ARGS[@]}" >$TWD/OUTPUT - else COMMAND "${ARGS[@]}" <$TWD/INPUT >$TWD/OUTPUT - fi - RESULTS - fi - if [[ $TEST_pipe_input ]] - then if [[ ! $TEST_quiet ]] - then print -nu2 "$LABEL" - fi - (trap '' PIPE; cat <$TWD/INPUT 2>/dev/null; exit 0) | COMMAND "${ARGS[@]}" >$TWD/OUTPUT - STATUS=$? - RESULTS 'pipe input' - fi - if [[ $TEST_pipe_output ]] - then if [[ ! $TEST_quiet ]] - then print -nu2 "$LABEL" - fi - COMMAND "${ARGS[@]}" <$TWD/INPUT | cat >$TWD/OUTPUT - STATUS=$? - RESULTS 'pipe output' - fi - if [[ $TEST_pipe_io ]] - then if [[ ! $TEST_quiet ]] - then print -nu2 "$LABEL" - fi - (trap '' PIPE; cat <$TWD/INPUT 2>/dev/null; exit 0) | COMMAND "${ARGS[@]}" | cat >$TWD/OUTPUT - STATUS=$? - RESULTS 'pipe io' - fi - fi - set -- $COPY - COPY="" - while : - do case $# in - 0|1) break ;; - *) cp $1 $2 ;; - esac - shift 2 - done - set -- $MOVE - MOVE="" - while (( $# > 1 )) - do mv $1 $2 - shift 2 - done - fi - for i in $DONE - do $i $TEST DONE $STATUS - done - COMPARE="" - r=0 - ;; - esac - if [[ $COMMAND_ORIG ]] - then COMMAND=$COMMAND_ORIG - COMMAND_ORIG= - ARGS=(${ARGS_ORIG[@]}) - fi - return $r -} - -function DO # cmd ... -{ - [[ $GROUP == $TEST_select ]] || return 1 - (( COND_SKIP[COND] )) && return 1 - [[ $UMASK != $UMASK_ORIG ]] && umask $UMASK - return 0 -} - -function UNIT # cmd arg ... -{ - typeset cmd=$1 - case $cmd in - [-+]) shift - if (( UNIT_READONLY )) - then COMMAND="$COMMAND $*" - else #BUG# ARGV=("${ARGV[@]}" "$@") - set -- "${ARGV[@]}" "$@" - ARGV=("$@") - fi - return - ;; - esac - (( UNIT_READONLY )) && return - if [[ $UNIT ]] && (( $# <= 1 )) - then set -- "${ARGV[@]}" - case $1 in - "") set -- "$cmd" ;; - [-+]*) set -- "$cmd" "${ARGV[@]}" ;; - *) cmd=$1 ;; - esac - fi - UNIT= - COMMAND=$cmd - shift - typeset cmd=$(whence $COMMAND) - if [[ ! $cmd ]] - then FATAL $COMMAND: not found - elif [[ ! $cmd ]] - then FATAL $cmd: not found - fi - case $# in - 0) ;; - *) COMMAND="$COMMAND $*" ;; - esac -} - -function TWD # [ dir ] -{ - case $1 in - '') TWD=${TWD##*/}; TWD=${TMPDIR:-/tmp}/tst-${TWD%.*}-$$-$RANDOM ;; - /*) TWD=$1 ;; - *) TWD=${TMPDIR:-/tmp}/$1 ;; - esac -} - -function TEST # number description arg ... -{ - RUN - LINE=$TESTLINE - UNWIND - COUNT=0 - LASTITEM=0 - case $1 in - -) ((LAST++)); TEST=$LAST ;; - +([0123456789])) LAST=$1 TEST=$1 ;; - *) LAST=0${1/[!0123456789]/} TEST=$1 ;; - esac - NOTE= - if [[ ! $TEST_quiet && $TEST == $TEST_select ]] && (( ! COND_SKIP[COND] )) - then print -r -u2 "$TEST $2" - fi - unset ARGS - unset EXPORT - EXPORTS=0 - TEST_file="" - if [[ $TEST != ${GROUP}* ]] - then GROUP=${TEST%%+([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ])} - if [[ $GROUP == $TEST_select ]] && (( ! COND_SKIP[COND] )) - then INITIALIZE - fi - fi - ((SUBTESTS=0)) - [[ $TEST == $TEST_select ]] && (( ! COND_SKIP[COND] )) -} - -function EXEC # arg ... -{ - if [[ $GROUP != $TEST_select ]] || (( COND_SKIP[COND] )) - then return - fi - if ((SUBTESTS++)) - then RUN - fi - case $# in - 0) set -- "${ARGS[@]}" ;; - esac - ITEM=$LINE - NOTE="$(print -r -f '%q ' -- $COMMAND_ORIG "$@")${JOBPID:+&}" - ARGS=("$@") -} - -function JOB # arg ... -{ - JOBPID=0 - EXEC "$@" -} - -function CONTINUE -{ - RUN || return - JOBOP=CONTINUE - ITEM=$LINE - NOTE="$(print -r -f '%q ' -- $JOBOP)" -#print -u2 AHA#$LINENO JOBOP=$JOBOP ITEM=$ITEM NOTE=$NOTE -} - -function EXITED -{ - RUN || return - JOBOP=EXITED - ITEM=$LINE - NOTE="$(print -r -f '%q ' -- $JOBOP)" -#print -u2 AHA#$LINENO JOBOP=$JOBOP ITEM=$ITEM NOTE=$NOTE -} - -function KILL # [ signal ] -{ - RUN || return - JOBOP=$2 - [[ $JOBOP ]] || JOBOP=KILL - ITEM=$LINE - NOTE="$(print -r -f '%q ' -- $JOBOP)" -} - -function CD -{ - RUN - if [[ $GROUP == $TEST_select ]] && (( ! COND_SKIP[COND] )) - then mkdir -p "$@" && cd "$@" || FATAL cannot initialize working directory "$@" - fi -} - -function EXPORT -{ - typeset x n v - if [[ $GROUP == INIT ]] - then for x - do n=${x%%=*} - v=${x#*=} - ENVIRON[ENVIRONS++]=$n="'$v'" - done - else RUN - if [[ $GROUP != $TEST_select ]] || (( COND_SKIP[COND] )) - then return - fi - for x - do n=${x%%=*} - v=${x#*=} - EXPORT[EXPORTS++]=$n="'$v'" - done - fi -} - -function FLUSH -{ - if [[ $GROUP != $TEST_select ]] || (( COND_SKIP[COND] )) - then return - fi - if ((SUBTESTS++)) - then RUN - fi -} - -function PROG # cmd arg ... -{ - typeset command args - if [[ $GROUP != $TEST_select ]] || (( COND_SKIP[COND] )) - then return - fi - ITEM=$LINE - NOTE="$(print -r -f '%q ' -- "$@")" - COMMAND_ORIG=$COMMAND - COMMAND=$1 - shift - ARGS_ORIG=(${ARGS[@]}) - ARGS=("$@") -} - -function NOTE # description -{ - NOTE=$* -} - -function IO # [ PIPE ] INPUT|OUTPUT|ERROR [-f*|-n] file|- data ... -{ - typeset op i v f file type x - if [[ $GROUP != $TEST_select ]] || (( COND_SKIP[COND] )) - then return - fi - [[ $UMASK != $UMASK_ORIG ]] && umask $UMASK_ORIG - while : - do case $1 in - FIFO|PIPE) type=$1; shift ;; - *) break ;; - esac - done - op=$1 - shift - [[ $type ]] && TYPE[$op]=$type - FILTER[$op]= - file=$TWD/$op - while : - do case $1 in - -x) x=1 - shift - ;; - -e) (( $# > 1 )) && shift - FILTER[$op]=$1 - shift - ;; - -e*) FILTER[$op]=${1#-e} - shift - ;; - -f*|-n) f=$1 - shift - ;; - *) break - ;; - esac - done - case $# in - 0) ;; - *) case $1 in - -) ;; - *) file=$1 - eval i='$'$op - case " $i " in - *" $file "*) - ;; - *) eval $op='"$'$op' $file"' - ;; - esac - ;; - esac - shift - ;; - esac - case " $IGNORE " in - *" $file "*) - for i in $IGNORE - do case $i in - $file) ;; - *) v="$v $i" ;; - esac - done - IGNORE=$v - ;; - esac - FILE[$op]=$file - case $op in - OUTPUT|ERROR) - file=$file.ex - if [[ $file != /* ]] - then file=$TWD/$file - fi - ;; - esac - #unset SAME[$op] - SAME[$op]= - if [[ $file == /* ]] - then RM $file.sav - else RM $TWD/$file.sav - fi - if [[ $file == */* ]] - then mkdir -p ${file%/*} - fi - if [[ $file != */ ]] - then if [[ $type == FIFO ]] - then rm -f $file - mkfifo $file - fi - if [[ ${TYPE[$op]} != FIFO ]] - then if [[ $JOBOP ]] - then case $#:$f in - 0:) ;; - *:-f) printf -- "$@" ;; - *:-f*) printf -- "${f#-f}""$@" ;; - *) print $f -r -- "$@" ;; - esac >> $file - else case $#:$f in - 0:) ;; - *:-f) printf -- "$@" ;; - *:-f*) printf -- "${f#-f}""$@" ;; - *) print $f -r -- "$@" ;; - esac > $file - fi - elif [[ $#:$f != 0: ]] - then case $#:$f in - *:-f) printf -- "$@" ;; - *:-f*) printf -- "${f#-f}""$@" ;; - *) print $f -r -- "$@" ;; - esac >> $file & - fi - if [[ $x ]] - then chmod +x $file - fi - fi -} - -function INPUT # file|- data ... -{ - IO $0 "$@" -} - -function COPY # from to -{ - if [[ $GROUP != $TEST_select ]] || (( COND_SKIP[COND] )) - then return - fi - COPY="$COPY $@" -} - -function MOVE # from to -{ - typeset f - if [[ $GROUP != $TEST_select ]] || (( COND_SKIP[COND] )) - then return - fi - for f - do case $f in - INPUT|OUTPUT|ERROR) - f=$TWD/$f - ;; - /*) ;; - *) f=$PWD/$f - ;; - esac - MOVE="$MOVE $f" - done -} - -function SAME # new old -{ - typeset i file v - if [[ $GROUP != $TEST_select ]] || (( COND_SKIP[COND] )) - then return - fi - case $# in - 2) case $1 in - INPUT) cat $2 > $1; return ;; - esac - SAME[$1]=$2 - file=$1 - COMPARE="$COMPARE $1" - ;; - 3) SAME[$2]=$3 - file=$2 - eval i='$'$1 - case " $i " in - *" $2 "*) - ;; - *) eval $1='"$'$1' $2"' - ;; - esac - COMPARE="$COMPARE $2" - ;; - esac - case " $IGNORE " in - *" $file "*) - for i in $IGNORE - do case $i in - $file) ;; - *) v="$v $i" ;; - esac - done - IGNORE=$v - ;; - esac -} - -function OUTPUT # file|- data ... -{ - IO $0 "$@" -} - -function ERROR # file|- data ... -{ - IO $0 "$@" -} - -function RM # rm(1) args -{ - if [[ ! $TEST_rmu ]] - then chmod -R u+rwx "$@" >/dev/null 2>&1 - fi - rm $TEST_rmu $TEST_rmflags "$@" -} - -function REMOVE # file ... -{ - typeset i - for i - do RM $i $i.sav - done -} - -function IGNORE # file ... -{ - typeset i - for i - do case $i in - INPUT|OUTPUT|ERROR) - i=$TWD/$i - ;; - esac - case " $IGNORE " in - *" $i "*) - ;; - *) IGNORE="$IGNORE $i" - ;; - esac - done -} - -function KEEP # pattern ... -{ - typeset i - for i - do case $KEEP in - "") KEEP="$i" ;; - *) KEEP="$KEEP|$i" ;; - esac - done -} - -function DIAGNOSTICS # [ 1 | 0 ] -{ - case $#:$1 in - 0:|1:1) DIAGNOSTICS=1 - EXIT='*' - ;; - 1:|1:0) DIAGNOSTICS="" - EXIT=0 - ;; - *) DIAGNOSTICS=$1 - EXIT='*' - ;; - esac -} - -function IGNORESPACE -{ - : ${IGNORESPACE=-b} -} - -function EXIT # status -{ - EXIT=$1 -} - -function INFO # info description -{ - typeset -R15 info=$1 - if [[ ! $1 ]] - then info=no - fi - shift - if [[ ! $TEST_quiet ]] - then print -r -u2 "$info " "$@" - fi -} - -function COMMAND # arg ... -{ - typeset input - ((TESTS++)) - case " ${ENVIRON[*]} ${EXPORT[*]}" in - *' 'LC_ALL=*) - ;; - *' 'LC_+([A-Z])=*) - EXPORT[EXPORTS++]="LC_ALL=" - ;; - esac - if [[ $TEST_keep ]] - then ( - PS4='' - set -x - print -r -- "${ENVIRON[@]}" "${EXPORT[@]}" "PATH=$PATH" $COMMAND "$@" - ) 2>&1 >/dev/null | - sed -e 's,^print -r -- ,,' -e 's,$, "$@",' >$TWD/COMMAND - chmod +x $TWD/COMMAND - fi - if [[ $UMASK != $UMASK_ORIG ]] - then : >$TWD/ERROR - umask $UMASK - fi - if [[ ${TYPE[INPUT]} == FIFO && ${FILE[INPUT]} == */INPUT ]] - then input="< ${FILE[INPUT]}" - fi - if [[ $TEST_trace ]] - then set +x - eval print -u2 "$PS4" "${ENVIRON[@]}" "${EXPORT[@]}" PATH='$PATH' '$'COMMAND '"$@"' '$input' '"2>$TWD/ERROR"' '"${JOBPID:+&}"' - fi - eval "${ENVIRON[@]}" "${EXPORT[@]}" PATH='$PATH' '$'COMMAND '"$@"' $input "2>$TWD/ERROR" "${JOBPID:+&}" - STATUS=$? - [[ $TEST_trace ]] && set -x - if [[ $JOBPID ]] - then JOBPID=$! - fi - [[ $UMASK != $UMASK_ORIG ]] && umask $UMASK_ORIG - return $STATUS -} - -function RESULTS # pipe* -{ - typeset i j k s failed ignore io op - if [[ $1 ]] - then io="$1 " - fi - [[ $JOBOP || $JOBPID || $JOBSTATUS ]] && sleep 1 - for i in $COMPARE $TWD/OUTPUT $TWD/ERROR - do case " $IGNORE $ignore $MOVE " in - *" $i "*) continue ;; - esac - ignore="$ignore $i" - op=${i##*/} - if [[ ${FILTER[$op]} ]] - then eval "{ ${FILTER[$op]} ;} < $i > $i.fi" - mv $i.fi $i - fi - j=${SAME[$op]} - if [[ ! $j ]] - then if [[ $i == /* ]] - then k=$i - else k=$TWD/$i - fi - for s in ex sav err - do [[ -f $k.$s ]] && break - done - j=$k.$s - fi - if [[ "$DIAGNOSTICS" && $i == */ERROR ]] - then if [[ $STATUS == 0 && ! -s $TWD/ERROR || $DIAGNOSTICS != 1 && $(<$i) != $DIAGNOSTICS ]] - then failed=$failed${failed:+,}DIAGNOSTICS - if [[ $TEST_verbose && $DIAGNOSTICS != 1 ]] - then print -u2 " ===" "diagnostic pattern '$DIAGNOSTICS' did not match" ${i#$TWD/} "===" - cat $i >&2 - fi - fi - continue - fi - diff $IGNORESPACE $i $j >$i.diff 2>&1 - if [[ -s $i.diff ]] - then failed=$failed${failed:+,}${i#$TWD/} - if [[ $TEST_verbose ]] - then print -u2 " ===" diff $IGNORESPACE ${i#$TWD/} "expected ===" - cat $i.diff >&2 - fi - fi - done - if [[ $JOBOP ]] - then if [[ $JOBPID ]] && ! kill -0 $JOBPID 2>/dev/null - then wait $JOBPID - JOBSTATUS=$? - JOBPID= - fi -#print -u2 AHA#$LINENO JOBOP=$JOBOP JOBPID=$JOBPID JOBSTATUS=$JOBSTATUS - case $JOBOP in - CONTINUE) - if [[ ! $JOBPID ]] - then failed=$failed${failed:+,}EXITED - fi - ;; - EXITED) if [[ $JOBPID ]] - then failed=$failed${failed:+,}RUNNING - fi - ;; - *) if [[ ! $JOBPID ]] - then failed=$failed${failed:+,}EXITED - fi - if ! kill -$JOBOP $JOBPID 2>/dev/null - then failed=$failed${failed:+,}KILL-$JOBOP - fi - ;; - esac - JOBOP= - fi - if [[ ! $failed && $STATUS != $EXIT ]] - then failed="exit code $EXIT expected -- got $STATUS" - fi - if [[ $failed ]] - then ((ERRORS++)) - if [[ ! $TEST_quiet ]] - then SHOW="FAILED ${io}[ $failed ] $NOTE" - print -r -u2 " $SHOW" - fi - if [[ $TEST_keep ]] - then GROUP=FINI - exit - fi - elif [[ ! $TEST_quiet ]] - then SHOW=$NOTE - print -r -u2 " $SHOW" - fi -} - -function SET # [no]name[=value] -{ - typeset i r - if [[ $TEST ]] - then RUN - fi - for i - do if [[ $i == - ]] - then r=1 - elif [[ $i == + ]] - then r= - else if [[ $i == no?* ]] - then i=${i#no} - v= - elif [[ $i == *=* ]] - then v=${i#*=} - if [[ $v == 0 ]] - then v= - fi - i=${i%%=*} - else v=1 - fi - i=${i//-/_} - if [[ $r ]] - then READONLY[$i]=1 - elif [[ ${READONLY[$i]} ]] - then continue - fi - eval TEST_$i=$v - fi - done -} - -function VIEW # var [ file ] -{ - nameref var=$1 - typeset i bwd file pwd view root offset - if [[ $var ]] - then return 0 - fi - case $# in - 1) file=$1 ;; - *) file=$2 ;; - esac - pwd=${TWD%/*} - bwd=${PMP%/*} - if [[ -r $file ]] - then if [[ ! -d $file ]] - then var=$PWD/$file - return 0 - fi - for i in $file/* - do if [[ -r $i ]] - then var=$PWD/$file - return 0 - fi - break - done - fi - for view in ${VIEWS[@]} - do case $view in - /*) ;; - *) view=$pwd/$view ;; - esac - case $offset in - '') case $pwd in - $view/*) offset=${pwd#$view} ;; - *) offset=${bwd#$view} ;; - esac - ;; - esac - if [[ -r $view$offset/$file ]] - then if [[ ! -d $view$offset/$file ]] - then var=$view$offset/$file - return 0 - fi - for i in $view$offset/$file/* - do if [[ -f $i ]] - then var=$view$offset/$file - return 0 - fi - break - done - fi - done - var= - return 1 -} - -function INCLUDE # file ... -{ - typeset f v x - for f - do if VIEW v $f || [[ $PREFIX && $f != /* ]] && VIEW v $PREFIX$f - then x=$x$'\n'". $v" - else FATAL $f: not found - fi - done - [[ $x ]] && trap "$x" 0 -} - -function UMASK # [ mask ] -{ - if (( $# )) - then UMASK=$1 - else UMASK=$UMASK_ORIG - fi -} - -function PIPE # INPUT|OUTPUT|ERROR file|- data ... -{ - IO $0 "$@" -} - -function FIFO # INPUT|OUTPUT|ERROR file|- data ... -{ - IO $0 "$@" -} - -function IF # command(s) [note] -{ - [[ $GROUP == $TEST_select ]] || return - RUN - (( COND++ )) - COND_LINE[COND]=$LINE - if (( COND > 1 && COND_SKIP[COND-1] )) - then (( COND_KEPT[COND] = 1 )) - (( COND_SKIP[COND] = 1 )) - elif eval "{ $1 ;} >/dev/null 2>&1" - then (( COND_KEPT[COND] = 1 )) - (( COND_SKIP[COND] = 0 )) - [[ $2 && ! $TEST_quiet ]] && print -u2 "NOTE $2" - else (( COND_KEPT[COND] = 0 )) - (( COND_SKIP[COND] = 1 )) - fi -} - -function ELIF # command(s) [note] -{ - [[ $GROUP == $TEST_select ]] || return - RUN - if (( COND <= 0 )) - then FATAL line $LINE: no matching IF for ELIF - fi - if (( COND_KEPT[COND] )) - then (( COND_SKIP[COND] = 0 )) - elif eval "$* > /dev/null 2>&1" - then (( COND_KEPT[COND] = 1 )) - (( COND_SKIP[COND] = 0 )) - [[ $2 && ! $TEST_quiet ]] && print -u2 "NOTE $2" - else (( COND_SKIP[COND] = 1 )) - fi -} - -function ELSE # [note] -{ - [[ $GROUP == $TEST_select ]] || return - RUN - if (( COND <= 0 )) - then FATAL line $LINE: no matching IF for ELSE - fi - if (( COND_KEPT[COND] )) - then (( COND_SKIP[COND] = 1 )) - else (( COND_KEPT[COND] = 1 )) - (( COND_SKIP[COND] = 0 )) - [[ $1 && ! $TEST_quiet ]] && print -u2 "NOTE $1" - fi -} - -function FI -{ - [[ $GROUP == $TEST_select ]] || return - RUN - if (( COND <= 0 )) - then FATAL line $LINE: no matching IF for FI on line $LINE - fi - (( ! COND_KEPT[COND] )) && [[ $1 && ! $TEST_quiet ]] && print -u2 "NOTE $1" - (( COND-- )) -} - -# main - -integer ERRORS=0 ENVIRONS=0 EXPORTS=0 TESTS=0 SUBTESTS=0 LINE=0 TESTLINE=0 -integer ITEM=0 LASTITEM=0 COND=0 UNIT_READONLY=0 COUNT -typeset ARGS COMMAND COPY DIAGNOSTICS ERROR EXEC FLUSHED=0 GROUP=INIT -typeset IGNORE INPUT KEEP OUTPUT TEST SOURCE MOVE NOTE UMASK UMASK_ORIG -typeset ARGS_ORIG COMMAND_ORIG TITLE UNIT ARGV PREFIX OFFSET IGNORESPACE -typeset COMPARE MAIN JOBPID='' JOBSTATUS='' -typeset TEST_file TEST_keep TEST_pipe_input TEST_pipe_io TEST_pipe_output TEST_local -typeset TEST_quiet TEST_regular=1 TEST_rmflags='-rf --' TEST_rmu TEST_select - -typeset -A SAME VIEWS FILE TYPE READONLY FILTER -typeset -a COND_LINE COND_SKIP COND_KEPT ENVIRON EXPORT -typeset -Z LAST=00 - -unset FIGNORE - -while getopts -a $command "$USAGE" OPT -do case $OPT in - b) (( $OPTARG )) && IGNORESPACE=-b - ;; - i) SET - pipe-input=$OPTARG - ;; - k) SET - keep=$OPTARG - ;; - l) SET - local - ;; - o) SET - pipe-output=$OPTARG - ;; - p) SET - pipe-io=$OPTARG - ;; - q) SET - quiet=$OPTARG - ;; - r) SET - regular=$OPTARG - ;; - t) if [[ $TEST_select ]] - then TEST_select="$TEST_select|${OPTARG//,/\|}" - else TEST_select="${OPTARG//,/\|}" - fi - ;; - x) SET - trace=$OPTARG - ;; - v) SET - verbose=$OPTARG - ;; - *) GROUP=FINI - exit 2 - ;; - esac -done -shift $OPTIND-1 -case $# in -0) FATAL test unit name omitted ;; -esac -export COLUMNS=80 -SOURCE=$PWD -PATH=$SOURCE:${PATH#?(.):} -PATH=${PATH%%:?(.)}:/bin:/usr/bin -UNIT=$1 -shift -if [[ -f $UNIT && ! -x $UNIT ]] -then REGRESS=$UNIT -else REGRESS=${UNIT%.tst} - REGRESS=$REGRESS.tst - [[ -f $REGRESS ]] || FATAL $REGRESS: regression tests not found -fi -UNIT=${UNIT##*/} -UNIT=${UNIT%.tst} -MAIN=$UNIT -if [[ $VPATH ]] -then set -A VIEWS ${VPATH//:/' '} - OFFSET=${SOURCE#${VIEWS[0]}} - if [[ $OFFSET ]] - then OFFSET=${OFFSET#/}/ - fi -fi -if [[ $REGRESS == */* ]] -then PREFIX=${REGRESS%/*} - if [[ ${#VIEWS[@]} ]] - then for i in ${VIEWS[@]} - do PREFIX=${PREFIX#$i/} - done - fi - PREFIX=${PREFIX#$OFFSET} - if [[ $PREFIX ]] - then PREFIX=$PREFIX/ - fi -fi -TWD=$PWD/$UNIT.tmp -PMP=$(pwd -P)/$UNIT.tmp -UMASK_ORIG=$(umask) -UMASK=$UMASK_ORIG -ARGV=("$@") -if [[ ${ARGV[0]} && ${ARGV[0]} != [-+]* ]] -then UNIT "${ARGV[@]}" - UNIT_READONLY=1 -fi -trap 'code=$?; CLEANUP $code' EXIT -if [[ ! $TEST_select ]] -then TEST_select="[0123456789]*" -fi -TEST_select="@($TEST_select|+(0))" -if [[ $TEST_trace ]] -then export PS4=':$LINENO: ' - typeset -ft $(typeset +f) - set -x -fi -if [[ $TEST_verbose ]] -then typeset SHOW -else typeset -L70 SHOW -fi -if [[ ! $TEST_keep ]] && (ulimit -c 0) >/dev/null 2>&1 -then ulimit -c 0 -fi -set --pipefail - -# some last minute shenanigans - -alias BODY='BODY=BODY; function BODY' -alias CONTINUE='LINE=$LINENO; CONTINUE' -alias DO='(( $ITEM != $FLUSHED )) && RUN DO; DO &&' -alias DONE='DONE=DONE; function DONE' -alias EXEC='LINE=$LINENO; EXEC' -alias EXITED='LINE=$LINENO; EXITED' -alias INIT='INIT=INIT; function INIT' -alias JOB='LINE=$LINENO; JOB' -alias KILL='LINE=$LINENO; KILL' -alias PROG='LINE=$LINENO; FLUSH; PROG' -alias TEST='TESTLINE=$LINENO; TEST' -alias IF='LINE=$LINENO; FLUSH; IF' -alias ELIF='LINE=$LINENO; FLUSH; ELIF' -alias ELSE='LINE=$LINENO; FLUSH; ELSE' -alias FI='LINE=$LINENO; FLUSH; FI' - -# do the tests - -. $REGRESS -RUN -GROUP=FINI diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/rt.sh b/cde/programs/dtksh/ksh93/src/cmd/INIT/rt.sh deleted file mode 100644 index 84484a7c9..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/rt.sh +++ /dev/null @@ -1,482 +0,0 @@ -######################################################################## -# # -# This software is part of the ast package # -# Copyright (c) 1994-2011 AT&T Intellectual Property # -# Copyright (c) 2020-2021 Contributors to ksh 93u+m # -# and is licensed under the # -# Eclipse Public License, Version 1.0 # -# by AT&T Intellectual Property # -# # -# A copy of the License is available at # -# http://www.eclipse.org/org/documents/epl-v10.html # -# (with md5 checksum b35adb5213ca9657e911e9befb180842) # -# # -# Information and Software Systems Research # -# AT&T Research # -# Florham Park NJ # -# # -# Glenn Fowler # -# # -######################################################################## -: rt - nmake test output filter - -command=rt -flags='--silent --keepgoing' -failed=0 -heading=1 -verbose=0 - -case `(getopts '[-][123:xyz]' opt --xyz; echo 0$opt) 2>/dev/null` in -0123) ARGV0="-a $command" - USAGE=$' -[-? -@(#)$Id: rt (AT&T Research) 2010-07-27 $ -] -[-author?Glenn Fowler ] -[-copyright?Copyright (c) 2005-2012 AT&T Intellectual Property] -[-license?http://www.eclipse.org/org/documents/epl-v10.html] -[+NAME?rt - run "nmake test" and filter output] -[+DESCRIPTION?\brt\b runs \bnmake test\b and filters the regression - test output to contain only test summary lines. If no \atest\a - operands are specified then \btest\b is assumed. If \b-\b is - specified then the \afile\a operands, or the standard input - if no \afile\a operands are specified, are filtered instead - of the output from \bnmake\b.] -[f:failed?Only list failed test results.] -[h!:heading?Enable per-file heading when more than one \afile\a operand - follows \b-\b.] -[v:verbose?Run with \bREGRESSFLAGS=-v\b.] - -[ test ... | - [ file ... ] ] - -[+SEE ALSO?\bnmake\b(1), \bregress\b(1)] -[+CAVEATS?\brt\b guesses the regression test output style. Garbled - output indicates a bad guess.] -' - ;; -*) ARGV0="" - USAGE="fhv" - ;; -esac - -function usage -{ - OPTIND=0 - getopts $ARGV0 "$USAGE" OPT '-?' - exit 2 -} - -while getopts $ARGV0 "$USAGE" OPT -do case $OPT in - f) failed=1 ;; - h) heading=0 ;; - v) (( verbose=$OPTARG )) && flags="$flags REGRESSFLAGS=-v" ;; - esac -done -shift `expr $OPTIND - 1` - -ifs=${IFS:-$' \t\n'} -set -o noglob -component= -dots='............................................' -bad=' ***' -style=unknown -integer tests errors signals lineno=0 skip=0 -typeset -l lower - -function results # tests errors signals -{ - integer t=$1 e=$2 s=$3 - typeset label note - if [[ $style != unknown ]] && (( errors >= 0 )) - then style=unknown - if (( !failed || errors )) - then if (( failed )) - then print -r -n -- "$unit" - fi - if (( t >= 0 )) - then if (( t == 1)) - then label="test " - else label=tests - fi - printf $'%s%5d %s' "$prefix" "$t" "$label" - prefix= - else prefix="$prefix..........." - fi - if (( s )) - then label=signal - (( e=s )) - else label=error - fi - if (( e != 1)) - then label=${label}s - fi - if (( e == 1 )) - then note=" $bad" - elif (( e > 1 )) - then note=$bad - fi - printf $'%s%5d %s%s\n' "$prefix" "$e" "$label" "$note" - fi - fi -} - -function unit -{ - typeset x - if [[ $component ]] - then x=${component##*/} - if [[ " $x " != *' '$unit' '* && " $unit " != *' '$x' '* ]] - then if [[ $component == cmd/?*lib/* ]] - then unit="$unit $x" - else unit="$x $unit" - fi - fi - fi - unit="$unit ${dots:1:${#dots}-${#unit}}" - if [[ $1 ]] - then unit="$unit..........." - fi - if (( ! failed )) - then print -r -n -- "$unit" - fi -} - -if [[ $1 == - ]] -then shift - if (( $# <= 1 )) - then heading=0 - fi - if (( heading )) - then for i - do print test heading $i - cat -- "$i" - done - else cat "$@" - fi -else if [[ $1 == *=* ]] - then set test "$@" - elif (( ! $# )) - then set test - fi - nmake "$@" $flags 2>&1 -fi | -while read -r line -do set '' $line - shift - case $line in - TEST[' ']*', '*' error'*) - IFS=${IFS}"," - set '' $line - IFS=$ifs - set '' $* - while : - do case $2 in - '') break - ;; - error|errors) - errors=$1 - break - ;; - test|tests) - tests=$1 - ;; - esac - shift - done - results $tests $errors - continue - ;; - TEST[' ']*) - results $tests $errors - IFS=${IFS}"," - set '' $line - IFS=$ifs - set '' $* - unit=${3##*/} - case $4 in - [a-zA-Z]*) unit="$unit $4" ;; - esac - unit - prefix= - errors=0 - signals=0 - style=regress - continue - ;; - 'pathname and options of item under test') - read -r line || break - results $tests $errors $signals - set '' $line - unit=${2##*/} - unit - tests=0 - errors=0 - signals=0 - style=script - continue - ;; - 'test heading '*) - if (( heading )) - then if (( heading > 1 )) - then print - else heading=2 - fi - set '' $line - shift 3 - print -r -- "==> $* <==" - fi - continue - ;; - 'test '*' begins at '????-??-??+??:??:??|'test '*' begins at '*' '*' '*' '*' '*) - results $tests $errors $signals - unit=${2##*/} - unit=${unit%.sh} - unit - prefix= - tests=-1 - errors=0 - signals=0 - style=shell - continue - ;; - 'test '*' at '????-??-??+??:??:??' [ '*' ]'|'test '*' at '*' '*' '*' '*' '*) - case $line in - *' [ '*test*error*' ]') - while : - do case $1 in - '[') tests=$2 - errors=$4 - if (( errors > 256 )) - then (( signals++ )) - fi - break - ;; - esac - shift - done - ;; - *' [ '*test*signal*' ]') - while : - do case $1 in - '[') tests=$2 - signals=$4 - if (( signals )) - then (( errors++ )) - fi - break - ;; - esac - shift - done - ;; - *) if [[ $3 != passed ]] - then (( errors )) || (( errors++ )) - fi - ;; - esac - results $tests $errors $signals - continue - ;; - '## ---'*(-)'--- ##') - (( ++lineno > skip )) || continue - read -r line || break - lower=$line - set '' $lower - case $lower in - '##'*'test suite:'*'##') - results $tests $errors $signals - set -- ${lower//*suite:} - set -- ${*//[.#]/} - unit=$* - if [[ $unit == *' tests' ]] - then unit=${unit/' tests'/} - fi - main=$unit - prefix= - tests=0 - errors=0 - signals=0 - category= - style=autotest - (( skip = lineno + 1 )) - unit - continue - ;; - esac - ;; - +(-)) case $style in - regress) continue ;; - esac - (( ++lineno > skip )) || continue - read -r line || break - set '' $line - case $line in - 'Running tests for '*) - results $tests $errors $signals - shift 4 - unit= - while (( $# )) - do if [[ $1 == on ]] - then break - fi - if [[ $unit ]] - then unit="$unit " - fi - unit=$unit${1##*/} - shift - done - main=$unit - prefix= - tests=-1 - errors=-1 - category= - style=perl - (( skip = lineno + 1 )) - continue - ;; - *' : '*)results $tests $errors $signals - unit=${2##*/} - unit=${unit%.sh} - unit - prefix= - tests=0 - errors=0 - signals=0 - style=timing - (( skip = lineno + 1 )) - continue - ;; - esac - ;; - +([0-9])*([a-zA-Z0-9])' '*) - case $style in - script) case $line in - *FAILED*|*failed*) - (( errors++ )) - ;; - *) (( tests++ )) - ;; - esac - ;; - esac - ;; - make:*|'make ['*']:'*) - case $line in - *': warning:'*|*'making test'*|*'action'?(s)' failed'*|*': *** '*) - ;; - *) results $tests $errors $signals - print -r -u2 -- "$line" - ;; - esac - continue - ;; - +([/a-zA-Z_0-9]):) - component=${line%:} - ;; - '') continue - ;; - esac - case $style in - autotest) - case $line in - +([0-9]):*ok) - (( tests++ )) - ;; - +([0-9]):*FAILED*) - (( tests++ )) - (( errors++ )) - if (( $verbose )) - then if [[ ! $prefix ]] - then prefix=$unit - print - fi - print -r -- " ${line//*'FAILED '/}" - fi - ;; - esac - continue - ;; - perl) case $line in - *'........ '*) - if [[ $1 == */* ]] - then cat=${1%%/*} - if [[ $cat != $category ]] - then results $tests $errors $signals - category=$cat - unit="$main $category" - unit - prefix= - tests=0 - errors=0 - signals=0 - fi - (( tests++ )) - case $line in - *' ok') ;; - *) (( errors++ )) - if (( $verbose )) - then if [[ ! $prefix ]] - then prefix=$unit - print - fi - print -r -- "$line" - fi - ;; - esac - else results $tests $errors $signals - case $line in - *' ok') errors=0 ;; - *) errors=1 ;; - esac - unit="$main $1" - unit - if (( $verbose && errors )) - then prefix=$unit - print - shift 2 - print -r -- "$@" - else prefix= - fi - results $tests $errors $signals - tests=-1 - errors=-1 - category= - fi - style=perl - ;; - esac - continue - ;; - esac - case $line in - *FAILED*|*failed*) - (( errors++ )) - ;; - *) case $style in - regress)case $line in - ['<>']*);; - *) continue ;; - esac - ;; - script) continue - ;; - shell) ((errors++ )) - ;; - timing) (( tests++ )) - continue - ;; - unknown)continue - ;; - esac - ;; - esac - if (( $verbose )) - then if [[ ! $prefix ]] - then prefix=$unit - print - fi - print -r -- "$line" - fi -done -results $tests $errors $signals diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/silent.sh b/cde/programs/dtksh/ksh93/src/cmd/INIT/silent.sh deleted file mode 100644 index 4ae93a22b..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/silent.sh +++ /dev/null @@ -1,36 +0,0 @@ -######################################################################## -# # -# This software is part of the ast package # -# Copyright (c) 1994-2011 AT&T Intellectual Property # -# Copyright (c) 2020-2021 Contributors to ksh 93u+m # -# and is licensed under the # -# Eclipse Public License, Version 1.0 # -# by AT&T Intellectual Property # -# # -# A copy of the License is available at # -# http://www.eclipse.org/org/documents/epl-v10.html # -# (with md5 checksum b35adb5213ca9657e911e9befb180842) # -# # -# Information and Software Systems Research # -# AT&T Research # -# Florham Park NJ # -# # -# Glenn Fowler # -# # -######################################################################## -# non-ksh stub for the nmake silent prefix -# @(#)silent (ksh 93u+m) 2021-12-31 - -while : -do case $# in - 0) exit 0 ;; - esac - case $1 in - *=*) export "$1" - shift - ;; - *) break - ;; - esac -done -"$@" diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/socket.c b/cde/programs/dtksh/ksh93/src/cmd/INIT/socket.c deleted file mode 100644 index 05d0435f9..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/socket.c +++ /dev/null @@ -1,34 +0,0 @@ -/*********************************************************************** -* * -* This software is part of the ast package * -* Copyright (c) 1994-2011 AT&T Intellectual Property * -* Copyright (c) 2020-2021 Contributors to ksh 93u+m * -* and is licensed under the * -* Eclipse Public License, Version 1.0 * -* by AT&T Intellectual Property * -* * -* A copy of the License is available at * -* http://www.eclipse.org/org/documents/epl-v10.html * -* (with md5 checksum b35adb5213ca9657e911e9befb180842) * -* * -* Information and Software Systems Research * -* AT&T Research * -* Florham Park NJ * -* * -* Glenn Fowler * -* * -***********************************************************************/ -/* - * small test for -lnsl - */ - -#ifndef socket -#include -#include -#endif - -int -main() -{ - return socket(0, 0, 0) < 0; -} diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/w.c b/cde/programs/dtksh/ksh93/src/cmd/INIT/w.c deleted file mode 100644 index 8e0c76787..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/w.c +++ /dev/null @@ -1,31 +0,0 @@ -/*********************************************************************** -* * -* This software is part of the ast package * -* Copyright (c) 1994-2011 AT&T Intellectual Property * -* Copyright (c) 2020-2021 Contributors to ksh 93u+m * -* and is licensed under the * -* Eclipse Public License, Version 1.0 * -* by AT&T Intellectual Property * -* * -* A copy of the License is available at * -* http://www.eclipse.org/org/documents/epl-v10.html * -* (with md5 checksum b35adb5213ca9657e911e9befb180842) * -* * -* Information and Software Systems Research * -* AT&T Research * -* Florham Park NJ * -* * -* Glenn Fowler * -* * -***********************************************************************/ -#ifndef DONTCARE -#include -#include -#endif - -int -main() -{ - wchar_t w = ' '; - return iswspace(w) == 0; -} diff --git a/cde/programs/dtksh/ksh93/src/cmd/INIT/w2.c b/cde/programs/dtksh/ksh93/src/cmd/INIT/w2.c deleted file mode 100644 index 909306234..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/INIT/w2.c +++ /dev/null @@ -1,28 +0,0 @@ -/*********************************************************************** -* * -* This software is part of the ast package * -* Copyright (c) 1994-2011 AT&T Intellectual Property * -* Copyright (c) 2020-2021 Contributors to ksh 93u+m * -* and is licensed under the * -* Eclipse Public License, Version 1.0 * -* by AT&T Intellectual Property * -* * -* A copy of the License is available at * -* http://www.eclipse.org/org/documents/epl-v10.html * -* (with md5 checksum b35adb5213ca9657e911e9befb180842) * -* * -* Information and Software Systems Research * -* AT&T Research * -* Florham Park NJ * -* * -* Glenn Fowler * -* * -***********************************************************************/ -#include - -int -main() -{ - wchar_t w = ' '; - return iswspace(w) == 0; -} diff --git a/cde/programs/dtksh/ksh93/src/cmd/Mamfile b/cde/programs/dtksh/ksh93/src/cmd/Mamfile deleted file mode 100644 index 3d2449604..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/Mamfile +++ /dev/null @@ -1,16 +0,0 @@ -info mam static -note * -note * This build file is in the Make Abstract Machine (MAM) language. It was -note * first generated by nmake, but in the ksh 93u+m distribution we maintain -note * it manually because nmake had too many problems to keep using. The -note * Mamfiles are processed by mamake (src/cmd/INIT/mamake.c); we added -note * support for indentation to improve readability. The language is -note * documented in Glenn Fowler's paper "A Make Abstract Machine": -note * http://web.archive.org/web/20041227143022/http://www2.research.att.com/~gsf/mam/mam.html -note * -note component level :MAKE: equivalent -make install - make all - exec - ${MAMAKE} -r '*' ${MAMAKEARGS} - done all virtual -done install virtual diff --git a/cde/programs/dtksh/ksh93/src/cmd/builtin/Mamfile b/cde/programs/dtksh/ksh93/src/cmd/builtin/Mamfile deleted file mode 100644 index 4f2993ed2..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/builtin/Mamfile +++ /dev/null @@ -1,69 +0,0 @@ -info mam static 00000 1994-07-17 make (AT&T Research) 5.7 2012-06-20 -note * -note * This build file is in the Make Abstract Machine (MAM) language. It was -note * first generated by nmake, but in the ksh 93u+m distribution we maintain -note * it manually because nmake had too many problems to keep using. The -note * Mamfiles are processed by mamake (src/cmd/INIT/mamake.c); we added -note * support for indentation to improve readability. The language is -note * documented in Glenn Fowler's paper "A Make Abstract Machine": -note * http://web.archive.org/web/20041227143022/http://www2.research.att.com/~gsf/mam/mam.html -note * -setv INSTALLROOT ../../.. -setv PACKAGE_ast_INCLUDE ${INSTALLROOT}/include/ast -setv PACKAGE_cmd ${INSTALLROOT} -setv PACKAGEROOT ../../../../.. -setv CC cc -setv mam_cc_FLAGS -setv KSH_RELFLAGS -setv CCFLAGS ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${mam_cc_OPTIMIZE}?} -setv CCLDFLAGS ${-strip-symbols?1?${mam_cc_LD_STRIP}??} -setv IFFEFLAGS -setv LDFLAGS -make .INIT - make ${PACKAGE_ast_INCLUDE}/cmdlist.h - done ${PACKAGE_ast_INCLUDE}/cmdlist.h - exec - sed -e '/^CMDLIST(.*)$/!d' -e 's/CMDLIST(\(.*\))/\1/' -e '/^getconf$/d' -e '/^ln$/d' -e '/^mv$/d' -e '/^md5sum$/d' -e '/^sum$/d' ${PACKAGE_ast_INCLUDE}/cmdlist.h - bind -lcmd -done .INIT dontcare virtual -make install - make pty - make pty.o - make pty.c - make FEATURE/pty implicit - meta FEATURE/pty features/%>FEATURE/% features/pty pty - make features/pty - done features/pty - exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libast} ${mam_libcmd} : run features/pty - done FEATURE/pty generated - make ${PACKAGE_ast_INCLUDE}/ast_time.h implicit - done ${PACKAGE_ast_INCLUDE}/ast_time.h - prev ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit - prev ${PACKAGE_ast_INCLUDE}/regex.h implicit - make ${PACKAGE_ast_INCLUDE}/proc.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done ${PACKAGE_ast_INCLUDE}/proc.h - prev ${PACKAGE_ast_INCLUDE}/error.h implicit - prev ${PACKAGE_ast_INCLUDE}/cmd.h implicit - done pty.c - meta pty.o %.c>%.o pty.c pty - prev pty.c - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""builtin"\" -D_PACKAGE_ast -DCMD_STANDALONE=b_pty -c pty.c - done pty.o generated - bind -lutil dontcare - exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} ${LDFLAGS} -lm ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -o pty pty.o ${mam_libutil} ${mam_libast} ${mam_libcmd} - done pty generated - make ${INSTALLROOT}/bin - exec - if silent test ! -d ${INSTALLROOT}/bin - exec - then mkdir -p ${INSTALLROOT}/bin - exec - fi - done ${INSTALLROOT}/bin generated - make ${INSTALLROOT}/bin/pty - prev pty - exec - test '' = 'pty' || ${STDCMP} 2>/dev/null -s pty ${INSTALLROOT}/bin/pty || { ${STDMV} ${INSTALLROOT}/bin/pty ${INSTALLROOT}/bin/pty.old 2>/dev/null || true; ${STDCP} pty ${INSTALLROOT}/bin/pty ;} - done ${INSTALLROOT}/bin/pty generated - make ${INSTALLROOT}/bin - exec - if silent test ! -d ${INSTALLROOT}/bin - exec - then mkdir -p ${INSTALLROOT}/bin - exec - fi - done ${INSTALLROOT}/bin virtual -done install virtual diff --git a/cde/programs/dtksh/ksh93/src/cmd/builtin/RELEASE b/cde/programs/dtksh/ksh93/src/cmd/builtin/RELEASE deleted file mode 100644 index bb5a5bb70..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/builtin/RELEASE +++ /dev/null @@ -1,10 +0,0 @@ -12-02-28 pty.c: change --verbose[=level] to --debug=level -12-01-26 pty.c: fix --man docs -10-06-21 pty.c: add 4 sec timeout for initial handshake -- fix me!! -10-04-12 pty: fix sfpoll() result read/write bug -10-04-01 pty: add --tty='stty-settings' -10-03-19 pty: add --dialogue -10-03-15 pty: fix select() fd management -09-03-31 features/pty,Makefile: add pty.h and -lutil refs for Linux -- great, another util library -09-01-30 pty.c: add (for fd_set!! on mvs.390) -06-07-20 pty.c: add diff --git a/cde/programs/dtksh/ksh93/src/cmd/builtin/features/pty b/cde/programs/dtksh/ksh93/src/cmd/builtin/features/pty deleted file mode 100644 index 317816c2c..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/builtin/features/pty +++ /dev/null @@ -1,59 +0,0 @@ -header sys/types.h -header pty.h -header libutil.h -header sys/pty.h -header sys/ptyio.h -header sys/vty.h -header sys/ioctl.h -header stropts.h - -lib openpty,_getpty,ptsname -lutil -lib grantpt,unlockpt,posix_openpt stdlib.h -lib cfmakeraw termios.h - -tst - -lm output{ - #include - #if _lib_ptsname - #include - #endif - #include - #include - #include - #include - int main() - { - int i; - struct stat statb; - static char* pty[] = { "/dev/ptyp0000", "/dev/ptym/ptyp0", "/dev/ptyp0" }; - #if _lib_ptsname - int fd; - static char* ptc[] = { "/dev/ptmx", "/dev/ptc", "/dev/ptmx_bsd" }; - - for (i = 0; i < sizeof(ptc) / sizeof(ptc[0]); i++) - if((fd = open(ptc[i], 2))>=0) - { - if (ptsname(fd)) - { - sfprintf(sfstdout, "#define _pty_clone\t\"%s\"\n", ptc[i]); - close(fd); - break; - } - close(fd); - } - #endif - for (i = 0;; i++) - if(i >= (sizeof(pty) / sizeof(pty[0]) - 1) || stat(pty[i], &statb)>=0) - { - sfprintf(sfstdout, "#define _pty_first\t\"%s\"\n", pty[i]); - break; - } - return 0; - } -}end fail{ - echo "$0: Output block failed to compile. Export IFFEFLAGS=-d1 to debug." >&2 - exit 1 -}end - -extern _getpty char* (int*, int, mode_t, int) -extern openpty int (int*, int*, char*, struct termios*, struct winsize*) -extern ptsname char* (int) diff --git a/cde/programs/dtksh/ksh93/src/cmd/builtin/pty.c b/cde/programs/dtksh/ksh93/src/cmd/builtin/pty.c deleted file mode 100644 index 8aaa3ef3f..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/builtin/pty.c +++ /dev/null @@ -1,1150 +0,0 @@ -/*********************************************************************** -* * -* This software is part of the ast package * -* Copyright (c) 1992-2013 AT&T Intellectual Property * -* Copyright (c) 2020-2021 Contributors to ksh 93u+m * -* and is licensed under the * -* Eclipse Public License, Version 1.0 * -* by AT&T Intellectual Property * -* * -* A copy of the License is available at * -* http://www.eclipse.org/org/documents/epl-v10.html * -* (with md5 checksum b35adb5213ca9657e911e9befb180842) * -* * -* Information and Software Systems Research * -* AT&T Research * -* Florham Park NJ * -* * -* Glenn Fowler * -* David Korn * -* * -***********************************************************************/ - -static const char usage[] = -"[-?\n@(#)pty (AT&T Research) 2013-05-22\n]" -"[-author?Glenn Fowler ]" -"[-author?David Korn ]" -"[-copyright?Copyright (c) 2001-2013 AT&T Intellectual Property]" -"[-license?http://www.eclipse.org/org/documents/epl-v10.html]" -"[--catalog?builtin]" -"[+NAME?pty - create pseudo terminal and run command]" -"[+DESCRIPTION?\bpty\b creates a pseudo pty and then runs \bcommand\b " - "with arguments given by \aarg\a and the standard input, standard " - "output, and standard error connected to the pseudo terminal. By " - "default, the \bpty\b creates a new session.]" -"[+?If \bcommand\b does not contain a \b/\b, the \bPATH\b variable will " - "be used to locate the \bcommand\b.]" -"[+?Input to \bpty\b will be written to the standard input of this " - "command. The standard output and standard error from the command will " - "be written to the standard output of \bpty\b.]" -"[+?The \bpty\b command terminates when the command completes.]" -"[d:dialogue?Execute the dialogue on the standard input. A dialogue is a " - "sequence of commands, one command per line. All \are\a patterns are " - "extended regular expressions. The \are\a \b?1\b will print the subject " - "string on the standard error and match the string; the \are\a \b?0\b " - "will print the subject string on the standard error and not match the " - "string. The \are\a \b?.\b matches EOF. The commands are:]" - "{" - "[\b#\b \acomment\a?comment line]" - "[c \atext\a?write \atext\a to the master; C style escapes " - "in text are converted, including \\E for ESC and \\cX for " - "control-X]" - "[d \amilliseconds\a?set the delay before each master write to " - "\amilliseconds\a; the default is no delay]" - "[i \are\a?read a line from the master; if it matches \are\a " - "then execute lines until matching \be\b or \bf\b]" - "[e [re]]?else [if match re]] then execute lines until matching " - "\be\b or \bf\b]" - "[f?end of \bi\b/\be\b block]" - "[m \atext\a?write \atext\a to the standard error]" - "[p \atext\a?peek input until \atext\a is found at the beginning " - "of a line; input is not consumed]" - "[r [\are\a]]?read a line from the master [and it should match " - "re]]]" - "[s \amilliseconds\a?sleep for \amilliseconds\a]" - "[t \amilliseconds\a?set the master read timeout to " - "\amilliseconds\a; the default is \b1000\b]" - "[u \are\a?read lines from the master until one matches \are\a]" - "[v \alevel\a?set the verbose trace \alevel\a, more output for " - "higher levels, disabled for level 0]" - "[w \atext\a?write \atext\a\\r\\n to the master; C style escapes " - "in text are converted, including \\E for ESC and \\cX for " - "control-X]" - "[x [\acode\a]]" - "?exit \bpty\b with exit code \b0\b [\acode\a]]]" - "[I \are\a?ignore master lines matching \are\a]" - "[L \alabel\a?prefix all diagnostics with \alabel\a:]" - "[P \atext\a?delay each master write until the beginning of " - "an unread input line exactly matches \atext\a]" - "}" -"[D:debug?Set the debug trace \alevel\a, higher levels produce more " - "output, disabled for level 0.]#[level]" -"[l:log?Log the master stdout and stderr to \afile\a.]:[file]" -"[m:messages?Redirect diagnostic message output to \afile\a.]:[file]" -"[s!:session?Create a separate session for the process started by " - "\bpty\b.]" -"[t:timeout?Set the master read timeout to " - "\amilliseconds\a.]#[milliseconds:=1000]" -"[T:tty?Pass \astty\a to the \bstty\b(1) command to initialize the " - "pty.]:[stty]" -"[w:delay?Set the delay before each master write to " - "\amilliseconds\a.]#[milliseconds:=0]" - -"\n" -"\ncommand [arg ...]\n" -"\n" - -"[+EXIT STATUS?If the command determined by \bcommand\b is run the exit " - "status of \bpty\b is that of this command. Otherwise, the exit status " - "is one of the following:]" - "{" - "[+127?The command is found but cannot be executed.]" - "[+128?The command could not be found.]" - "}" -"[+SEE ALSO?\bcommand\b(1), \bexec\b(1)]" -; - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "FEATURE/pty" - -#define MODE_666 (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) -#define MAXNAME 64 - -#ifndef CMIN -#define CMIN 1 -#endif - -static noreturn void outofmemory(void) -{ - error(ERROR_SYSTEM|ERROR_PANIC, "out of memory"); - UNREACHABLE(); -} - -#if !_lib_openpty && !_lib__getpty && !defined(_pty_clone) -# if !_lib_grantpt || !_lib_unlock -# if !_lib_ptsname - static char *minionname(const char *name) - { - static char sname[MAXNAME]; - char *last; - strncpy(sname,name,sizeof(sname)); - last = strrchr(sname,'/'); - last[1] = 't'; - return(sname); - } -# endif - - static char *master_name(char *name) - { - static char sname[MAXNAME]; - int n; - if(!name) - { - strcpy(sname,_pty_first); - return(sname); - } - n = strlen(_pty_first); - if(name[n-1]=='9') - name[n-1]='a'; - else if(name[n-1]=='f') - { - if(_pty_first[n-2]=='0' && name[n-2]=='9') - { - name[n-2]='0'; - if(name[n-3]=='9' || name[n-3]=='z') - return(NULL); - name[n-3]++; - } - if(_pty_first[n-2]=='p' && (name[n-2]=='z' || name[n-2]=='Z')) - { - if(name[n-2]=='z') - name[n-2]=='P'; - else - return(0); - } - else - name[n-2]++; - name[n-1]='0'; - } - else - name[n-1]++; - return(name); - } -#endif - -#if !_lib_openpty - static char *ptymopen(int *master) - { - char *minion=0; -# if _lib__getpty - return(_getpty(master,O_RDWR,MODE_666,0)); -# else -# if defined(_pty_clone) - *master = open(_pty_clone,O_RDWR|O_CREAT,MODE_666); - if(*master>=0) - minion = ptsname(*master); -# else - int fdm; - char *name=0; - while(name=master_name(name)) - { - fdm = open(name,O_RDWR|O_CREAT,MODE_666); - if(fdm >= 0) - { - *master = fdm; -# if _lib_ptsname - minion = ptsname(fdm); -# else - minion = minionname(name); -# endif - break; - } - } -# endif -# endif - return(minion); - } -# endif -#endif - -static int -mkpty(int* master, int* minion) -{ - struct termios tty; - struct termios* ttyp; -#ifdef TIOCGWINSZ - struct winsize win; - struct winsize* winp; -#endif -#if !_lib_openpty - char* sname; -#endif -#ifdef SIGTTOU - sigset_t blckttou, oldset; - (void)sigemptyset(&blckttou); - (void)sigaddset(&blckttou, SIGTTOU); - sigprocmask(SIG_BLOCK, &blckttou, &oldset); -#endif - alarm(6); - if (tcgetattr(sffileno(sfstderr), &tty) < 0) - { - if (errno != ENOTTY) - error(-1, "unable to get standard error terminal attributes"); -#if _lib_cfmakeraw - cfmakeraw(&tty); -#else - tty.c_iflag |= IGNPAR; - tty.c_iflag &= ~(ISTRIP | INLCR | IGNCR | ICRNL | IXON | IXANY | IXOFF); - tty.c_oflag &= ~OPOST; - tty.c_lflag &= ~(ISIG | ICANON | ECHO | ECHOE | ECHOK | ECHONL); -#endif /* _lib_cfmakeraw */ - ttyp = 0; - } - tty.c_lflag |= ICANON | IEXTEN | ISIG | ECHO | ECHOE | ECHOK; -#ifdef ECHOKE - tty.c_lflag |= ECHOKE; -#endif - tty.c_oflag |= (ONLCR | OPOST); -#ifdef OCRNL - tty.c_oflag &= ~OCRNL; -#endif -#ifdef ONLRET - tty.c_oflag &= ~ONLRET; -#endif - tty.c_iflag |= BRKINT; - tty.c_iflag &= ~IGNBRK; - tty.c_cc[VTIME] = 0; - tty.c_cc[VMIN] = CMIN; -#ifdef B115200 - cfsetispeed(&tty, B115200); - cfsetospeed(&tty, B115200); -#elif defined(B57600) - cfsetispeed(&tty, B57600); - cfsetospeed(&tty, B57600); -#elif defined(B38400) - cfsetispeed(&tty, B38400); - cfsetospeed(&tty, B38400); -#endif - ttyp = &tty; -#ifdef TIOCGWINSZ - if (ioctl(sffileno(sfstderr), TIOCGWINSZ, &win) < 0) - { - if (errno != ENOTTY) - error(-1, "unable to get standard error window size"); - win.ws_row = 0; - win.ws_col = 0; - winp = 0; - } - if (win.ws_row < 24) - win.ws_row = 24; - if (win.ws_col < 80) - win.ws_col = 80; - winp = &win; -#endif -#ifdef __linux__ -# if !_lib_openpty -# undef _lib_openpty -# define _lib_openpty 1 -# endif -#endif -#if _lib_openpty - if (openpty(master, minion, NULL, ttyp, winp) < 0) - return -1; -#else -#if _lib_grantpt && _lib_unlockpt -#if !_lib_posix_openpt -#ifndef _pty_clone -#define _pty_clone "/dev/ptmx" -#endif -#define posix_openpt(m) open(_pty_clone,m) -#endif - if ((*master = posix_openpt(O_RDWR)) < 0) - return -1; - if (grantpt(*master) || unlockpt(*master) || !(sname = ptsname(*master)) || (*minion = open(sname, O_RDWR|O_cloexec)) < 0) - { - close(*master); - return -1; - } -#else - if (!(sname = ptymopen(master)) || (*minion = open(sname, O_RDWR|O_cloexec)) < 0) - return -1; -#endif -#ifdef I_PUSH - struct termios tst; - if (tcgetattr(*minion, &tst) < 0 && (ioctl(*minion, I_PUSH, "ptem") < 0 || ioctl(*minion, I_PUSH, "ldterm") < 0)) - { - close(*minion); - close(*master); - return -1; - } -#endif -#endif - if (ttyp && tcsetattr(*minion, TCSANOW, ttyp) < 0) - error(ERROR_warn(0), "unable to set pty terminal attributes"); -#ifdef TIOCSWINSZ - if (winp && ioctl(*minion, TIOCSWINSZ, winp) < 0) - error(ERROR_warn(0), "unable to set pty window size"); -#endif - fcntl(*master, F_SETFD, FD_CLOEXEC); -#if !O_cloexec - fcntl(*minion, F_SETFD, FD_CLOEXEC); -#endif -#ifdef SIGTTOU - sigprocmask(SIG_SETMASK, &oldset, NULL); -#endif - alarm(0); - return 0; -} - -static Proc_t* -runcmd(char** argv, int minion, int session) -{ - long ops[4]; - - if (session) - { - ops[0] = PROC_FD_CTTY(minion); - ops[1] = 0; - } - else - { - ops[0] = PROC_FD_DUP(minion, 0, PROC_FD_CHILD); - ops[1] = PROC_FD_DUP(minion, 1, PROC_FD_CHILD); - ops[2] = PROC_FD_DUP(minion, 2, PROC_FD_CHILD); - ops[3] = 0; - } - return procopen(argv[0], argv, NiL, ops, 0); -} - -/* - * default master dance - */ - -static int -process(Sfio_t* mp, Sfio_t* lp, int delay, int timeout) -{ - int i; - int n; - int t; - ssize_t r; - char* s; - Sfio_t* ip; - Sfio_t* sps[2]; - struct stat dst; - struct stat fst; - - ip = sfstdin; - if (!fstat(sffileno(ip), &dst) && !stat("/dev/null", &fst) && dst.st_dev == fst.st_dev && dst.st_ino == fst.st_ino) - ip = 0; - do - { - i = 0; - t = timeout; - if (mp) - sps[i++] = mp; - if (ip) - { - sps[i++] = ip; - t = -1; - } - if (!i) - break; - if ((n = sfpoll(sps, i, t)) <= 0) - { - if (n < 0) - error(ERROR_SYSTEM|2, "poll failed"); - break; - } - for (i = t = 0; i < n; i++) - { - if (!(sfvalue(sps[i]) & SF_READ)) - /*skip*/; - else if (sps[i] == mp) - { - t++; - if (!(s = (char*)sfreserve(mp, SF_UNBOUND, -1))) - { - sfclose(mp); - mp = 0; - } - else if ((r = sfvalue(mp)) > 0 && (sfwrite(sfstdout, s, r) != r || sfsync(sfstdout))) - { - error(ERROR_SYSTEM|2, "output write failed"); - goto done; - } - } - else - { - t++; - if (!(s = sfgetr(ip, '\n', 1))) - ip = 0; - else if (sfputr(mp, s, '\r') < 0 || sfsync(mp)) - { - error(ERROR_SYSTEM|2, "write failed"); - goto done; - } - } - } - } while (t); - done: - if (mp) - sfclose(mp); - return error_info.errors != 0; -} - -/* - * return 1 is extended re pattern matches text - */ - -static int -match(char* pattern, char* text, int must) -{ - regex_t* re; - int code; - char buf[64]; - - if (!pattern[0]) - return 1; - if (pattern[0] == '?' && pattern[1] && !pattern[2]) - { - switch (pattern[1]) - { - case '0': - case '1': - if (text) - error(2, "got \"%s\"", fmtesq(text, "\"")); - else - error(2, "got EOF"); - return pattern[1] == '1'; - case '.': - if (!text) - return 1; - if (must) - error(2, "expected EOF, got \"%s\"", fmtesq(text, "\"")); - return 0; - } - } - if (!text) - { - if (must) - error(2, "expected \"%s\", got EOF", pattern); - return 0; - } - if (!(re = regcache(pattern, REG_EXTENDED, &code))) - { - regerror(code, re, buf, sizeof(buf)); - error(2, "%s: %s", pattern, buf); - return 0; - } - if (regexec(re, text, 0, NiL, 0)) - { - if (must) - error(2, "expected \"%s\", got \"%s\"", pattern, fmtesq(text, "\"")); - return 0; - } - return 1; -} - -typedef struct Master_s -{ - Vmalloc_t* vm; /* allocation region */ - char* ignore; /* ignore master lines matching this re */ - char* peek; /* peek buffer pointer */ - char* cur; /* current line */ - char* nxt; /* next line */ - char* end; /* end of lines */ - char* max; /* end of buf */ - char* buf; /* current buffer */ - char* prompt; /* peek prompt */ - int cursor; /* cursor in buf, 0 if fresh line */ - int line; /* prompt line number */ - int restore; /* previous line save char */ -} Master_t; - -/* - * read one line from the master - */ - -#define MASTER_EOF (-1) -#define MASTER_TIMEOUT (-2) - -static char* -masterline(Sfio_t* mp, Sfio_t* lp, char* prompt, int must, int timeout, Master_t* bp) -{ - char* r; - char* s; - char* t; - ssize_t n; - ssize_t a; - size_t promptlen = 0; - ptrdiff_t d; - char promptbuf[64]; - - if (prompt) - promptlen = sfsprintf(promptbuf, sizeof(promptbuf), prompt, ++bp->line); - again: - if (prompt) - { - if (bp->cur < bp->end && bp->restore >= 0) - *bp->cur = bp->restore; - if (strneq(bp->cur, promptbuf, promptlen)) - r = bp->cur; - else - r = 0; - if (bp->cur < bp->end && bp->restore >= 0) - *bp->cur = 0; - if (r) - { - error(-1, "p \"%s\"", fmtnesq(promptbuf, "\"", promptlen)); - return r; - } - if (r = bp->nxt) - { - if (strneq(r, promptbuf, promptlen)) - { - error(-1, "p \"%s\"", fmtnesq(promptbuf, "\"", promptlen)); - return r; - } - while (r = memchr(r, '\n', bp->end - r)) - { - if (strneq(r, promptbuf, promptlen)) - { - error(-1, "p \"%s\"", fmtnesq(promptbuf, "\"", promptlen)); - return r; - } - r++; - } - } - *bp->cur = 0; - } - else if (bp->nxt) - { - if (bp->restore >= 0) - *bp->cur = bp->restore; - r = bp->cur; - bp->restore = *bp->nxt; - *bp->nxt = 0; - if (bp->nxt >= bp->end) - { - bp->cur = bp->end = bp->buf; - bp->nxt = 0; - } - else - { - bp->cur = bp->nxt; - if (bp->nxt = memchr(bp->nxt + 1, '\n', bp->end - bp->nxt - 1)) - bp->nxt++; - } - goto done; - } - if ((n = sfpoll(&mp, 1, timeout)) <= 0 || !((int)sfvalue(mp) & SF_READ)) - { - if (n < 0) - { - if (must) - error(ERROR_SYSTEM|2, "poll failed"); - else - error(-1, "r poll failed"); - } - else if (bp->cur < bp->end) - { - if (bp->restore >= 0) - { - *bp->cur = bp->restore; - bp->restore = -1; - } - r = bp->cur; - *bp->end = 0; - bp->nxt = 0; - if (prompt && strneq(r, promptbuf, promptlen)) - { - error(-1, "p \"%s\"", fmtnesq(promptbuf, "\"", promptlen)); - return r; - } - bp->cur = bp->end = bp->buf; - goto done; - } - else if (must >= 0) - error(2, "read timeout"); - else - { - errno = 0; - error(-1, "r EOF"); - } - return 0; - } - if (!(s = sfreserve(mp, SF_UNBOUND, -1))) - { - if (!prompt) - { - if (bp->cur < bp->end) - { - if (bp->restore >= 0) - { - *bp->cur = bp->restore; - bp->restore = -1; - } - r = bp->cur; - *bp->end = 0; - bp->cur = bp->end = bp->buf; - bp->nxt = 0; - goto done; - } - else - { - errno = 0; - error(-1, "r EOF"); - } - } - return 0; - } - n = sfvalue(mp); - error(-2, "b \"%s\"", fmtnesq(s, "\"", n)); - if ((bp->max - bp->end) < n) - { - a = roundof(bp->max - bp->buf + n, SF_BUFSIZE); - r = bp->buf; - if (!(bp->buf = vmnewof(bp->vm, bp->buf, char, a, 0))) - outofmemory(); - bp->max = bp->buf + a; - if (bp->buf != r) - { - d = bp->buf - r; - bp->cur += d; - bp->end += d; - } - } - memcpy(bp->end, s, n); - bp->end += n; - if ((r = bp->cur) > bp->buf && bp->restore >= 0) - *r = bp->restore; - if (bp->cur = memchr(bp->cur, '\n', bp->end - bp->cur)) - { - bp->restore = *++bp->cur; - *bp->cur = 0; - if (bp->cur >= bp->end) - { - bp->cur = bp->end = bp->buf; - bp->nxt = 0; - } - else if (bp->nxt = memchr(bp->cur + 1, '\n', bp->end - bp->cur - 1)) - bp->nxt++; - if (prompt) - goto again; - } - else - { - bp->restore = -1; - bp->cur = r; - bp->nxt = 0; - must = 0; - goto again; - } - done: - error(-3, "Q \"%s\"", fmtesq(r, "\"")); - s = r; - if (bp->cursor) - { - r -= bp->cursor; - bp->cursor = 0; - } - for (t = 0, n = 0; *s; s++) - if (*s == '\n') - { - if (t) - { - *t++ = '\n'; - *t = 0; - t = 0; - n = 0; - } - } - else if (*s == '\r' && *(s + 1) != '\n') - { - if (t = strchr(s + 1, '\r')) - n += t - s; - else - n += strlen(s); - t = r; - } - else if (*s == '\a') - { - if (!t) - t = s; - *t = ' '; - n++; - } - else if (*s == '\b') - { - if (!t) - t = s; - if (t > r) - t--; - else - n++; - } - else if (t) - *t++ = *s; - if (t) - error(-3, "R \"%s\"", fmtesq(r, "\"")); - if (n) - *(r + strlen(r) - n) = 0; - error(-1, "r \"%s\"", fmtesq(r, "\"")); - if (lp) - sfputr(lp, fmtesq(r, "\""), '\n'); - if (t) - bp->cursor = t - r; - if (bp->ignore && match(bp->ignore, r, 0)) - goto again; - return r; -} - -/* - * execute dialogue script on stdin - */ - -#define NESTING 64 - -#define ELSE 0x01 -#define IF 0x02 -#define KEPT 0x04 -#define SKIP 0x08 - -struct Cond_s; -typedef struct Cond_s Cond_t; - -struct Cond_s -{ - Cond_t* next; - Cond_t* prev; - char* text; - int flags; -}; - -static int -dialogue(Sfio_t* mp, Sfio_t* lp, int delay, int timeout) -{ - int op; - int line; - int n; - char* s; - char* m; - char* e; - char* id; - Vmalloc_t* vm; - Cond_t* cond; - Master_t* master; - - int status = 0; - - if (!(vm = vmopen(Vmdcheap, Vmbest, 0)) || - !(cond = vmnewof(vm, 0, Cond_t, 1, 0)) || - !(master = vmnewof(vm, 0, Master_t, 1, 0)) || - !(master->buf = vmnewof(vm, 0, char, 2 * SF_BUFSIZE, 0))) - outofmemory(); - master->vm = vm; - master->cur = master->end = master->buf; - master->max = master->buf + 2 * SF_BUFSIZE - 1; - master->restore = -1; - errno = 0; - id = error_info.id; - error_info.id = 0; - line = error_info.line; - error_info.line = 0; - while (s = sfgetr(sfstdin, '\n', 1)) - { - error_info.line++; - while (isspace(*s)) - s++; - if ((op = *s++) && isspace(*s)) - s++; - switch (op) - { - case 0: - case '#': - break; - case 'c': - case 'w': - if (cond->flags & SKIP) - continue; - if (master->prompt && !masterline(mp, lp, master->prompt, 0, timeout, master)) - goto done; - if (delay) - usleep((unsigned long)delay * 1000); - if (op == 'w') - error(-1, "w \"%s\\r\"", s); - else - error(-1, "w \"%s\"", s); - if ((n = stresc(s)) >= 0) - s[n] = 0; - if (sfputr(mp, s, op == 'w' ? '\n' : -1) < 0 || sfsync(mp)) - { - error(ERROR_SYSTEM|2, "write failed"); - goto done; - } - if (delay) - usleep((unsigned long)delay * 1000); - break; - case 'd': - delay = (int)strtol(s, &e, 0); - if (*e) - error(2, "%s: invalid delay -- milliseconds expected", s); - break; - case 'i': - if (!cond->next && !(cond->next = vmnewof(vm, 0, Cond_t, 1, 0))) - outofmemory(); - cond = cond->next; - cond->flags = IF; - if ((cond->prev->flags & SKIP) && !(cond->text = 0) || !(cond->text = masterline(mp, lp, 0, 0, timeout, master))) - cond->flags |= KEPT|SKIP; - else if (match(s, cond->text, 0)) - cond->flags |= KEPT; - else - cond->flags |= SKIP; - break; - case 'e': - if (!(cond->flags & IF)) - { - error(2, "no matching i for e"); - goto done; - } - if (!*s) - { - if (cond->flags & ELSE) - { - error(2, "i block already has a default e"); - goto done; - } - cond->flags |= ELSE; - if (cond->flags & KEPT) - cond->flags |= SKIP; - else - { - cond->flags |= KEPT; - cond->flags &= ~SKIP; - } - } - else if ((cond->flags & KEPT) || !match(s, cond->text, 0)) - cond->flags |= SKIP; - else - cond->flags |= KEPT; - break; - case 'f': - if (!(cond->flags & IF)) - { - error(2, "no matching i for f"); - goto done; - } - cond = cond->prev; - break; - case 'm': - if (cond->flags & SKIP) - continue; - if (sfputr(sfstderr, s, '\n') < 0 || sfsync(sfstderr)) - { - error(ERROR_SYSTEM|2, "standard error write failed"); - goto done; - } - break; - case 'p': - if (cond->flags & SKIP) - continue; - if (!(m = masterline(mp, lp, s, 1, timeout, master))) - goto done; - break; - case 'r': - if (cond->flags & SKIP) - continue; - if (!(m = masterline(mp, lp, 0, s[0] == '?' && s[1] == '.' ? -1 : 1, timeout, master))) - goto done; - match(s, m, 1); - break; - case 's': - n = (int)strtol(s, &e, 0); - if (*e) - error(2, "%s: invalid delay -- milliseconds expected", s); - if (n) - usleep((unsigned long)n * 1000); - break; - case 't': - timeout = (int)strtol(s, &e, 0); - if (*e) - error(2, "%s: invalid timeout -- milliseconds expected", s); - break; - case 'u': - if (cond->flags & SKIP) - continue; - do - { - if (!(m = masterline(mp, lp, 0, -1, timeout, master))) - { - match(s, m, 1); - goto done; - } - } while (!match(s, m, 0)); - break; - case 'v': - error_info.trace = -(int)strtol(s, &e, 0); - if (*e) - error(2, "%s: invalid verbose level -- number expected", s); - break; - case 'x': - status = (int)strtol(s, &e, 0); - if (*e) - error(2, "%s: invalid exit code", s); - break; - case 'I': - if (master->ignore) - { - vmfree(vm, master->ignore); - master->ignore = 0; - } - if (*s && !(master->ignore = vmstrdup(vm, s))) - { - error(ERROR_SYSTEM|2, "out of memory"); - goto done; - } - break; - case 'L': - if (error_info.id) - { - vmfree(vm, error_info.id); - error_info.id = 0; - } - if (*s && !(error_info.id = vmstrdup(vm, s))) - { - error(ERROR_SYSTEM|2, "out of memory"); - goto done; - } - break; - case 'P': - if (master->prompt) - { - vmfree(vm, master->prompt); - master->prompt = 0; - } - if (*s && !(master->prompt = vmstrdup(vm, s))) - { - error(ERROR_SYSTEM|2, "out of memory"); - goto done; - } - break; - default: - if (cond->flags & SKIP) - continue; - error(2, "'%c': unknown op", op); - goto done; - } - } - if (cond->prev) - error(2, "missing 1 or more f statements"); - done: - if (mp) - sfclose(mp); - error_info.id = id; - error_info.line = line; - if (vm) - vmclose(vm); - return status ? status : error_info.errors != 0; -} - -typedef struct Argv_s -{ - char** argv; - char* args; - int argc; -} Argv_t; - -int -b_pty(int argc, char** argv, Shbltin_t* context) -{ - int master; - int minion; - int fd; - int drop; - int n; - char* s; - Proc_t* proc; - Sfio_t* mp; - Sfio_t* lp; - Argv_t* ap; - char buf[64]; - - int delay = 0; - char* log = 0; - char* messages = 0; - char* stty = 0; - int session = 1; - int timeout = 1000; - int (*fun)(Sfio_t*,Sfio_t*,int,int) = process; - - cmdinit(argc, argv, context, ERROR_CATALOG, 0); - for (;;) - { - switch (optget(argv, usage)) - { - case 'd': - if (opt_info.num) - fun = dialogue; - continue; - case 'D': - error_info.trace = -(int)opt_info.num; - continue; - case 'l': - log = opt_info.arg; - /* FALLTHROUGH */ - case 'm': - messages = opt_info.arg; - continue; - case 's': - session = !!opt_info.num; - continue; - case 't': - timeout = (int)opt_info.num; - continue; - case 'T': - stty = opt_info.arg; - continue; - case 'w': - delay = (int)opt_info.num; - continue; - case ':': - break; - case '?': - error(ERROR_usage(2), "%s", opt_info.arg); - UNREACHABLE(); - } - break; - } - argv += opt_info.index; - if (!argv[0]) - { - error(ERROR_exit(1), "command must be specified"); - UNREACHABLE(); - } - if (mkpty(&master, &minion) < 0) - { - error(ERROR_system(1), "unable to create pty"); - UNREACHABLE(); - } - if (!(mp = sfnew(NiL, 0, SF_UNBOUND, master, SF_READ|SF_WRITE))) - { - error(ERROR_system(1), "cannot open master stream"); - UNREACHABLE(); - } - if (stty) - { - n = 2; - for (s = stty; *s; s++) - if (isspace(*s)) - n++; - if (!(ap = newof(0, Argv_t, 1, (n + 2) * sizeof(char*) + (s - stty + 1)))) - outofmemory(); - ap->argc = n + 1; - ap->argv = (char**)(ap + 1); - ap->args = (char*)(ap->argv + n + 2); - strcpy(ap->args, stty); - ap->argv[0] = "stty"; - sfsprintf(ap->argv[1] = buf, sizeof(buf), "--fd=%d", minion); - ap->argv[2] = s = ap->args; - for (n = 2; *s; s++) - if (isspace(*s)) - { - *s = 0; - ap->argv[++n] = s + 1; - } - ap->argv[n + 1] = 0; - b_stty(ap->argc, ap->argv, 0); - } - if (!log) - lp = 0; - else if (!(lp = sfopen(NiL, log, "w"))) - { - error(ERROR_system(1), "%s: cannot write", log); - UNREACHABLE(); - } - if (!(proc = runcmd(argv, minion, session))) - { - error(ERROR_system(1), "unable run %s", argv[0]); - UNREACHABLE(); - } - close(minion); - if (messages) - { - drop = 1; - if (strneq(messages, "/dev/fd/", 8)) - fd = atoi(messages + 8); - else if (streq(messages, "/dev/stdout")) - fd = 1; - else if ((fd = open(messages, O_CREAT|O_WRONLY, MODE_666)) >= 0) - drop = 0; - else - { - error(ERROR_system(1), "%s: cannot redirect messages", messages); - UNREACHABLE(); - } - close(2); - dup(fd); - if (drop) - close(fd); - } - minion = (*fun)(mp, lp, delay, timeout); - master = procclose(proc); - if (lp && sfclose(lp)) - { - error(ERROR_system(1), "%s: write error", log); - UNREACHABLE(); - } - return minion ? minion : master; -} diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/COMPATIBILITY b/cde/programs/dtksh/ksh93/src/cmd/ksh93/COMPATIBILITY deleted file mode 100644 index f80020aea..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/COMPATIBILITY +++ /dev/null @@ -1,313 +0,0 @@ - ksh 93u+m vs. ksh 93u+ - -The following is a list of changes between ksh 93u+ 2012-08-01 and the new -ksh 93u+m reboot that could cause incompatibilities in rare corner cases. -Fixes of clear bugs in ksh 93u+ are not included here, even though any bugfix -could potentially cause an incompatibility in a script that relies on the bug. -For more details, see the NEWS file and for complete details, see the git log. - -0. A new '-o posix' shell option has been added to ksh 93u+m that makes - the ksh language more compatible with other shells by following the - POSIX standard more closely. See the manual page for details. It is - enabled by default if ksh is invoked as sh. - -1. Bytecode compiled by shcomp 93u+m will not run on older ksh versions. - (However, bytecode compiled by older shcomp will run on ksh 93u+m.) - -2. Pathname expansion (a.k.a. filename generation, a.k.a. globbing) now - never matches the special navigational names '.' (current directory) - and '..' (parent directory). This change makes a pattern like .* - useful; it now matches all hidden 'dotfiles' in the current directory. - -3. The bash-style &>foo redirection operator (shorthand for >foo 2>&1) can - now always be used if -o posix is off, and not only in profile scripts. - -4. Redirections that store a file descriptor > 9 in a variable, such as - {var}>file, now continue to work if brace expansion is turned off. - -5. Most predefined aliases have been converted to regular built-in - commands that work the same way. 'unalias' no longer removes these. - To remove a built-in command, use 'builtin -d'. The 'history' and 'r' - predefined aliases remain, but are now only set on interactive shells. - There are some minor changes in behavior in some former aliases: - - 'redirect' now checks if all arguments are valid redirections - before performing them. If an error occurs, it issues an error - message instead of terminating the shell. - - 'suspend' now refuses to suspend a login shell, as there is probably - no parent shell to return to and the login session would freeze. - If you really want to suspend a login shell, use 'kill -s STOP $$'. - - 'times' now gives high precision output in a POSIX compliant format. - -6. 'command' and 'nohup' no longer expand aliases in their first argument, - as this is no longer required after the foregoing change. In the - unlikely event that you still need this behavior, you can set: - alias command='command ' - alias nohup='nohup ' - -7. The 'login' and 'newgrp' special built-in commands have been removed, - so it is no longer an error to define shell functions by these names. - These built-ins replaced your shell session with the external commands - by the same name, as in 'exec'. If an error occurred (e.g. due to a - typo), you would end up immediately logged out, except on a few - commercial Unix systems whose 'login' and 'newgrp' cope with this - by starting a new shell session upon error. If you do want the old - behavior, you can restore it by setting: - alias login='exec login' - alias newgrp='exec newgrp' - -8. 'case' no longer retries to match patterns as literal strings if they - fail to match as patterns. This undocumented behaviour broke validation - use cases that are expected to work. For example: - n='[0-9]' - case $n in - [0-9]) echo "$n is a digit" ;; - esac - would output "[0-9] is a digit". In the unlikely event that a script - does rely on this behavior, it can be fixed like this: - case $n in - [0-9] | "[0-9]") - echo "$n is a digit or the digit pattern" ;; - esac - -9. If 'set -u'/'set -o nounset' is active, then the shell now errors out - if a nonexistent positional parameter such as $1, $2, ... is accessed. - (This does *not* apply to "$@" and "$*".) - -10. If 'set -u'/'set -o nounset' is active, then the shell now errors out - if $! is accessed before the shell has launched any background process. - -11. The 'print', 'printf' and 'echo' built-in commands now return a nonzero - exit status if an input/output error occurs. - -12. Four obsolete date format specifiers for 'printf %(format)T' were - changed to make them compatible with modern date(1) commands: - - %k and %l now return a blank-padded hour (24-hour and 12-hour clock). - - %f now returns a date with the format '%Y.%m.%d-%H:%M:%S'. - - %q now returns the quarter of the current year. - -13. The 'typeset' built-in now properly detects and reports options that - cannot be used together if they are given as part of the same command. - -14. The DEBUG trap has reverted to pre-93t behavior. It is now once again - reset like other traps upon entering a subshell or ksh-style function, - as documented, and it is no longer prone to crash or get corrupted. - -15. 'command -x' now always runs an external command, bypassing built-ins. - -16. Unbalanced quotes and backticks now correctly produce a syntax error - in -c scripts, 'eval', and backtick-style command substitutions. - -17. -G/--globstar: Symbolic links to directories are now followed if they - match a normal (non-**) glob pattern. For example, if '/lnk' is a - symlink to a directory, '/lnk/**' and '/l?k/**' now work as expected. - -18. The variable name search expansions ${!prefix@} and ${!prefix*} now - also include the variable 'prefix' itself in the possible results. - -19. [[ -v var ]] is now properly equivalent to [[ -n ${var+set} ]]. - Undocumented special-casing for numeric types has been removed. - For example, the following no longer produces an unexpected error: - $ ksh -o nounset -c 'float n; [[ -v n ]] && echo $n' - -20. If the HOME variable is unset, the bare tilde ~ now expands to the - current user's system home directory instead of merely the username. - -21. On Windows/Cygwin, globbing is no longer case-insensitive by default. - Turning on the new --globcasedetect shell option restores - case-insensitive globbing for case-insensitive file systems. - -22. If $PWD or $OLDPWD are passed as invocation-local assignments to cd, - their values are no longer altered in the outer scope when cd finishes. - For example: - ksh -c 'OLDPWD=/bin; OLDPWD=/tmp cd - > /dev/null; echo $OLDPWD' - ksh -c 'cd /var; PWD=/tmp cd /usr; echo $PWD' - now prints '/bin' followed by '/var'. - -23. Path-bound built-ins (such as /opt/ast/bin/cat) can now be executed - by invoking the canonical path, so the following will now work: - $ /opt/ast/bin/cat --version - version cat (AT&T Research) 2012-05-31 - $ (PATH=/opt/ast/bin:$PATH; "$(whence -p cat)" --version) - version cat (AT&T Research) 2012-05-31 - In the event an external command by that path exists, the path-bound - built-in will now override it when invoked using the canonical path. - To invoke a possible external command at that path, you can still use - a non-canonical path, e.g.: /opt//ast/bin/cat or /opt/ast/./bin/cat - -24. The readonly attribute of ksh variables is no longer imported from - or exported to other ksh shell instances through the environment. - -25. Subshells (even if non-forked) now keep a properly separated state - of the pseudorandom generator used for $RANDOM, so that using - $RANDOM in a non-forked subshell no longer influences a reproducible - $RANDOM sequence in the parent environment. In addition, upon - invoking a subshell, $RANDOM is now reseeded (as mksh and bash do). - -26. The built-in arithmetic function int() has changed to round towards - zero instead of negative infinity. Previously, int() was an alias to - floor(), but now it behaves like trunc(). - -27. The '!' logical negation operator in the '[[' compound command now - correctly negates another '!', e.g., [[ ! ! 1 -eq 1 ]] now returns - 0/true. Note that this has always been the case for 'test'/'['. - -28. By default, arithmetic expressions in ksh no longer interpret a number - with a leading zero as octal in any context. Use 8#octalnumber instead. - Before, ksh would arbitrarily recognize the leading octal zero in some - contexts but not others. One of several examples is: - x=010; echo "$((x)), $(($x))" - would output '10, 8'. This now outputs '10, 10'. Arithmetic - expressions now also behave identically within and outside ((...)) - and $((...)). Setting the --posix compliance option turns on the - recognition of the leading octal zero for all arithmetic contexts. - -29. It is now an error for arithmetic expressions to assign an out-of-range - index value to a variable of an enumeration type created with 'enum'. - -30. For the 'return' built-in command, you can now freely specify any - return value that fits in a signed integer, typically a 32-bit value. - Note that $? is truncated to 8 bits when the current (sub)shell exits. - -____________________________________________________________________________ - - KSH-93 VS. KSH-88 - -(Written by David Korn for ksh 93u+ 2012-08-01) - -The following is a list of known incompatibilities between ksh-93 and ksh-88. -I have not included cases that are clearly bugs in ksh-88. I also have -omitted features that are completely upward compatible. - -1. Functions, defined with name() with ksh-93 are compatible with - the POSIX standard, not with ksh-88. No local variables are - permitted, and there is no separate scope. Functions defined - with the function name syntax have local variables as in ksh-88, - but are statically scoped as in C so that a function does not - automatically have access to local variables of the caller. - This change also affects function traces. - -2. ! is now a reserved word. As a result, any command by that - name will no longer work with ksh-93. - -3. The -x attribute of alias and typeset -f is no longer - effective and the ENV file is only read for interactive - shells. You need to use FPATH to make function definitions - visible to scripts. - -4. A built-in command named command has been added which is - always found before the PATH search. Any script which uses - this name as the name of a command (or function) will not - be compatible. - -5. The output format for some built-ins has changed. In particular - the output format for set, typeset and alias now have single - quotes around values that have special characters. The output - for trap without arguments has a format that can be used as input. - -6. With ksh-88, a dollar sign ($') followed by a single quote was - interpreted literally. Now it is an ANSI C string. You - must quote the dollar sign to get the previous behavior. - Also, a $ in front of a " indicates that the string needs - to be translated for locales other than C or POSIX. The $ - is ignored in the C and POSIX locale. - -7. With ksh-88, tilde expansion did not take place inside ${...}. - with ksh-93, ${foo-~} will cause tilde expansion if foo is - not set. You need to escape the ~ for the previous behavior. - -8. Some changes in the tokenizing rules were made that might - cause some scripts with previously ambiguous use of quoting - to produce syntax errors. - -9. Programs that rely on specific exit values for the shell, - (rather than 0 or non-zero) may not be compatible. The - exit status for many shell failures has been changed. - -10. Built-ins in ksh-88 were always executed before looking for - the command in the PATH variable. This is no longer true. - Thus, with ksh-93, if you have the current directory first - in your PATH, and you have a program named test in your - directory, it will be executed when you type test; the - built-in version will be run at the point /bin is found - in your PATH. - -11. Some undocumented combinations of argument passing to ksh - builtins no longer works since ksh-93 is getopts conforming - with respect to its built-ins. For example, typeset -8i - previously would work as a synonym for typeset -i8. - -12. Command substitution and arithmetic expansion are now performed - on PS1, PS3, and ENV when they are expanded. Thus, ` and $( - as part of the value of these variables must be preceded by a \ - to preserve their previous behavior. - -13. The ERRNO variable has been dropped. - -14. If the file name following a redirection symbol contain pattern - characters they will only be expanded for interactive shells. - -15. The arguments to a dot script will be restored when it completes. - -16. The list of tracked aliases is not displayed with alias unless - the -t option is specified. - -17. The POSIX standard requires that test "$arg" have exit status - of 0, if and only if $arg is null. However, since this breaks - programs that use test -t, ksh-93 treats an explicit test -t - as if the user had entered test -t 1. - -18. The ^T directive of emacs mode has been changed to work the - way it does in gnu-emacs. - -19. ksh-88 allowed unbalanced parentheses within ${name op val} whereas - ksh-93 does not. Thus, ${foo-(} needs to be written as ${foo-\(} - which works with both versions. - [2021 UPDATE: This is now once again allowed in ksh 93u+m. Note that - balanced parentheses ${foo-()} were also broken and are now fixed.] - -20. kill -l in ksh-93 lists only the signal names, not their numerical - values. - -21. Local variables defined by typeset are statically scoped in - ksh-93. In ksh-88 they were dynamically scoped although this - behavior was never documented. - -22. The value of the variable given to getopts is set to ? when - the end-of-options is reached to conform to the POSIX standard. - -23. Since the POSIX standard requires that octal constants be - recognized, doing arithmetic on typeset -Z variables can - yield different results that with ksh-88. Most of these - differences were eliminated in ksh-93o. Starting in ksh-93u+, the - let command no longer recognizes octal constants starting with 0 - for compatibility with ksh-88 unless the option letoctal is on. - -24. Starting after ksh-93l, If you run ksh name, where name does - not contain a /, the current directory will be searched - before doing a path search on name as required by the POSIX - shell standard. - -25. In ksh-93, cd - will output the directory that it changes - to on standard output as required by X/Open. With ksh-88, - this only happened for interactive shells. - -26. As an undocumented feature of ksh-88, a leading 0 to an - assignment of an integer variable caused that variable - to be treated as unsigned. This behavior was removed - starting in ksh-93p. - -27. The getopts builtin in ksh-93 requires that optstring contain - a leading + to allow options to begin with a +. - -28. In emacs/gmacs mode, control-v will not display the version when - the stty lnext character is set to control-v or is unset. - The sequence escape control-v will display the shell version. - -29. In ksh-88, DEBUG traps were executed after each command. In ksh-93 - DEBUG traps are executed before each command. - -30. In ksh-88, a redirection to a file name given by an empty string was - ignored. In ksh-93, this is an error. - -I am interested in expanding this list so please let me know if you -uncover any others. diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/DESIGN b/cde/programs/dtksh/ksh93/src/cmd/ksh93/DESIGN deleted file mode 100644 index 022d6870e..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/DESIGN +++ /dev/null @@ -1,171 +0,0 @@ -Here is an overview of the source code organization for ksh93. - -Directory layout: - - The directory include contains header files for ksh93. - The files nval.h and shell.h are intended to be public - headers and can be used to add runtime builtin command. - The remainder are private. - - The directory data contains readonly data files for ksh93. - The man pages for built-ins are in builtins.c rather - than included as statics with the implementations in the - bltins directory because some systems don't make static const - data readonly and we want these to be shared by all running - shells. - - The directory edit contains the code for command line - editing and history. - - The fun directory contains some shell function such as - pushd, popd, and dirs. - - The directory features contains files that are used to generate - header files in the FEATURE directory. Most of these files - are in a format that is processed by iffe. - - The directory bltins contains code for most of the built-in - commands. Additional built-in commands are part of libcmd. - - The directory sh contains most of the code for ksh93. - - The directory tests contains a number of regression tests. - In most cases, when a bug gets fixed, a test is added to - one of these files. The regression tests can be run by - going to this directory and running - SHELL=shell_path shell_path shtests - where shell_path is an absolute pathname for the shell to - be tested. - - The top level directory contains the nmake Makefile, the - RELEASE file, the ksh93 man file (sh.1) and nval.3 and shell.3 - documentation files. The RELEASE file contains the list of bug - fixes and new features since the original ksh93 release. The file - COMPATIBILITY is a list of all known incompatibilities with ksh88. - -Include directory: - 1. argnod.h contains the type definitions for command - nodes, io nodes, argument nodes, and for positional - parameters. It defines the prototypes for - all the positional parameters functions. - 2. builtins.h contains prototypes for builtins as well - as symbolic constants that refer to the name-pairs - that are associated with some of the built-ins. - It also contains prototypes for many of the strings. - 3. defs.h is the catch all for all definitions that - don't fit elsewhere and it includes several other - headers. It defines a structure that contains ksh - global data, sh, and a structure that contains per - function data, sh.st. - 4. edit.h contains definitions that are common to both - vi and emacs edit modes. - 5. fault.h contains prototypes for signal related - functions and trap and fault handling. - 6. fcin.h contains macro and function definitions for - reading from a file or string. - 7. history.h contains macros and functions definitions - related to history file processing. - 8. jobs.h contains the definitions relating to job - processing and control. - 9. lexstates.h contains the states associated with - lexical processing. - 10. name.h contains the internal definitions related - to name-value pair processing. - 11. national.h contains a few I18N definitions, mostly - obsolete. - 12. nval.h is the public interface to the name-value - pair library that is documented with nval.3. - 13. path.h contains the interface for pathname processing - and pathname searching. - 14. shell.h is the public interface for shell functions - that are documented int shell.3. - 15. shlex.h contains the lexical token definitions and - interfaces for lexical analysis. - 16. shnodes.h contains the definition of the structures - for each of the parse nodes and flags for the attributes. - 17. shtable.h contains some interfaces and functions for - table lookup. - 18. streval.h contains the interface to the arithmetic - functions. - 19. terminal.h is a header file that includes the appropriate - terminal include. - 20. test.h contains the definitions for the test and [[ ... ]] - commands. - 21. timeout.h contains the define constant for the maximum - shell timeout. - 22. ulimit.h includes the appropriate resource header. - 23. variables.h contains symbolic constants for the built-in - shell variables. - 24. version.h contains the version string for this release. - -sh directory: - 1. args.c contains functions for parsing shell options - and for processing positional parameters. - 2. arith.c contains callback functions for the streval.c - library and the interface to shell arithmetic. - 3. array.c contains the code for indexed and associative - arrays. - 4. defs.c contains the data definitions for global symbols. - 5. deparse.c contains code to generate shell script from - a parse tree. - 6. expand.c contains code for file name expansion and - pathname expansion. - 7. fault.c contains code for signal processing, trap - handling and termination. - 8. fcin.c contains code for reading and writing a character - at a time from a file or string. - 9. init.c contains initialization code and callbacks - for get and set functions for built-in variables. - 10. io.o contains code for redirections and managing file - descriptors and file streams. - 11. jobs.c contains the code for job management. - 12. lex.c contains the code for the lexical analyzer. - 13. macro.c contains code for the $ macro expansions, including - here-documents. - 14. main.c contains the calls to initialization, profile - processing and the main evaluation loop as well as - mail processing. - 15. name.c contains the name-value pair routines that are - built on the hash library in libast. - 16. nvdisc.c contains code related to name-value pair disciplines. - 17. nvtree.c contains code for compound variables and for - walking the namespace. - 18. nvtype.c contains most of the code related to types that - are created with typeset -T. - 19. parse.c contains the code for the shell parser. - 20. path.c contains the code for pathname lookup and - some path functions. It also contains the code - that executes commands and scripts. - 21. pmain.c is just a calls sh_main() so that all of the - rest of the shell can be in a shared library. - 22. shcomp.c contains the main program to the shell - compiler. This program parses a script and creates - a file that the shell can read containing the parse tree. - 23. streval.c is an C arithmetic evaluator. - 24. string.c contains some string related functions. - 25. subshell.c contains the code to save and restore - environments so that subshells can run without creating - a new process. - 26. suid_exec.c contains the program from running execute - only and/or setuid/setgid scripts. - 27. tdump.c contains the code to dump a parse tree into - a file. - 28. timers.c contains code for multiple event timeouts. - 29. trestore contains the code for restoring the parse - tree from the file created by tdump. - 30. userinit.c contains a dummy userinit() function. - This is now obsolete with the new version of sh_main(). - 31. waitevent.c contains the sh_waitnotify function so - that builtins can handle processing events when the - shell is waiting for input or for process completion. - 32. xec.c is the main shell execution loop. - -edit directory: - 1. completion.c contains code for command and file generation and - completion. - 2. edit.c contains common editing and terminal code for vi and - emacs. - 3. emacs.c contains code for the emacs editor. - 4. hexpand.c contains code for C-shell style history expansions. - 5. history.c contains code for creating managing the history file. - 6. vi.c contains the code for the vi editor. diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/Mamfile b/cde/programs/dtksh/ksh93/src/cmd/ksh93/Mamfile deleted file mode 100644 index d604c138e..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/Mamfile +++ /dev/null @@ -1,1564 +0,0 @@ -info mam static 00000 1994-07-17 make (AT&T Research) 5.7 2012-06-20 -note * -note * This build file is in the Make Abstract Machine (MAM) language. It was -note * first generated by nmake, but in the ksh 93u+m distribution we maintain -note * it manually because nmake had too many problems to keep using. The -note * Mamfiles are processed by mamake (src/cmd/INIT/mamake.c); we added -note * support for indentation to improve readability. The language is -note * documented in Glenn Fowler's paper "A Make Abstract Machine": -note * http://web.archive.org/web/20041227143022/http://www2.research.att.com/~gsf/mam/mam.html -note * -setv INSTALLROOT ../../.. -setv PACKAGE_ast_INCLUDE ${INSTALLROOT}/include/ast -setv PACKAGEROOT ../../../../.. -setv AR ${mam_cc_AR} ${mam_cc_AR_ARFLAGS} -setv CC cc -setv mam_cc_FLAGS -setv KSH_RELFLAGS -setv KSH_SHOPTFLAGS -setv CCFLAGS ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${mam_cc_OPTIMIZE}?} -setv CCLDFLAGS ${-strip-symbols?1?${mam_cc_LD_STRIP}??} -setv COTEMP $$ -setv IFFEFLAGS -setv LDFLAGS -setv SH_DICT \"libshell\" -make install - make ksh - make SHOPT.sh implicit - done SHOPT.sh generated - make pmain.o - make sh/pmain.c - make FEATURE/externs implicit - meta FEATURE/externs features/%>FEATURE/% features/externs externs - make features/externs - done features/externs - exec - set - - exec - echo 'int main(){return 0;}' > 1.${COTEMP}.c - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -c 1.${COTEMP}.c && - exec - x=`${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l'*' 2>&1 | sed -e 's/[][()+@?]/#/g' || :` && - exec - { - exec - case "" in - exec - *?) echo " " ;; - exec - esac - exec - for i in shell dll cmd ast m jobs i socket nsl secdb - exec - do case $i in - exec - "shell"|shell) - exec - ;; - exec - *) if test -f ${INSTALLROOT}/lib/lib/$i - exec - then y=`cat ${INSTALLROOT}/lib/lib/$i` - exec - case $y in - exec - *-?*) echo "" $y ;; - exec - esac - exec - continue - exec - elif test ! -f ${INSTALLROOT}/lib/lib$i.a - exec - then case `{ ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -L${INSTALLROOT}/lib ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l$i 2>&1 || echo '' "$x" ;} | sed -e 's/[][()+@?]/#/g' || :` in - exec - *$x*) case `{ ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l$i 2>&1 || echo '' "$x" ;} | sed -e 's/[][()+@?]/#/g' || :` in - exec - *$x*) continue ;; - exec - esac - exec - ;; - exec - esac - exec - fi - exec - ;; - exec - esac - exec - echo " -l$i" - exec - done - exec - } > shell.req - exec - rm -f 1.${COTEMP}.* - bind -ldll - bind -lcmd - bind -last - bind -lm dontcare - bind -lnsl dontcare - exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/externs - done FEATURE/externs generated - make include/shell.h implicit - make include/fault.h implicit - make FEATURE/sigfeatures implicit - meta FEATURE/sigfeatures features/%>FEATURE/% features/sigfeatures sigfeatures - make features/sigfeatures - done features/sigfeatures - exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/sigfeatures - done FEATURE/sigfeatures dontcare generated - make FEATURE/setjmp implicit - meta FEATURE/setjmp features/%>FEATURE/% features/setjmp setjmp - make features/setjmp - done features/setjmp - exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/setjmp - done FEATURE/setjmp dontcare generated - prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit - prev ${PACKAGE_ast_INCLUDE}/error.h implicit - make ${PACKAGE_ast_INCLUDE}/sig.h implicit - done ${PACKAGE_ast_INCLUDE}/sig.h dontcare - done include/fault.h dontcare - make ${PACKAGE_ast_INCLUDE}/stk.h implicit - make ${PACKAGE_ast_INCLUDE}/sfio.h implicit - make ${PACKAGE_ast_INCLUDE}/sfio_s.h implicit - done ${PACKAGE_ast_INCLUDE}/sfio_s.h dontcare - make ${PACKAGE_ast_INCLUDE}/ast_common.h implicit - make ${PACKAGE_ast_INCLUDE}/ast_map.h implicit - done ${PACKAGE_ast_INCLUDE}/ast_map.h dontcare - make ${PACKAGE_ast_INCLUDE}/endian.h implicit - make ${PACKAGE_ast_INCLUDE}/bytesex.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit - done ${PACKAGE_ast_INCLUDE}/bytesex.h dontcare - done ${PACKAGE_ast_INCLUDE}/endian.h dontcare - done ${PACKAGE_ast_INCLUDE}/ast_common.h dontcare - make ${PACKAGE_ast_INCLUDE}/ast_std.h implicit - make ${PACKAGE_ast_INCLUDE}/regex.h implicit - make ${PACKAGE_ast_INCLUDE}/ast_api.h implicit - done ${PACKAGE_ast_INCLUDE}/ast_api.h dontcare - make ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit - make ${PACKAGE_ast_INCLUDE}/wctype.h implicit - make ${PACKAGE_ast_INCLUDE}/ast_wctype.h implicit - prev ${PACKAGE_ast_INCLUDE}/endian.h implicit - make ${PACKAGE_ast_INCLUDE}/wchar.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit - done ${PACKAGE_ast_INCLUDE}/wchar.h dontcare - done ${PACKAGE_ast_INCLUDE}/ast_wctype.h dontcare - done ${PACKAGE_ast_INCLUDE}/wctype.h dontcare - make ${PACKAGE_ast_INCLUDE}/stdio.h implicit - make ${PACKAGE_ast_INCLUDE}/ast_stdio.h implicit - prev ${PACKAGE_ast_INCLUDE}/sfio_s.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit - done ${PACKAGE_ast_INCLUDE}/ast_stdio.h dontcare - done ${PACKAGE_ast_INCLUDE}/stdio.h dontcare - prev ${PACKAGE_ast_INCLUDE}/stdio.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit - done ${PACKAGE_ast_INCLUDE}/ast_wchar.h dontcare - prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit - done ${PACKAGE_ast_INCLUDE}/regex.h dontcare - make ${PACKAGE_ast_INCLUDE}/getopt.h implicit - make ${PACKAGE_ast_INCLUDE}/ast_getopt.h implicit - done ${PACKAGE_ast_INCLUDE}/ast_getopt.h dontcare - done ${PACKAGE_ast_INCLUDE}/getopt.h dontcare - prev ${PACKAGE_ast_INCLUDE}/ast_map.h implicit - make ${PACKAGE_ast_INCLUDE}/ast_botch.h implicit - done ${PACKAGE_ast_INCLUDE}/ast_botch.h dontcare - make ${PACKAGE_ast_INCLUDE}/ast_limits.h implicit - done ${PACKAGE_ast_INCLUDE}/ast_limits.h dontcare - make ${PACKAGE_ast_INCLUDE}/ast_fcntl.h implicit - make ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit - done ${PACKAGE_ast_INCLUDE}/ast_fs.h dontcare - done ${PACKAGE_ast_INCLUDE}/ast_fcntl.h dontcare - prev ${PACKAGE_ast_INCLUDE}/ast_getopt.h implicit - make ${PACKAGE_ast_INCLUDE}/ast_sys.h implicit - prev ${PACKAGE_ast_INCLUDE}/getopt.h implicit - prev ${PACKAGE_ast_INCLUDE}/endian.h implicit - prev ${PACKAGE_ast_INCLUDE}/endian.h implicit - done ${PACKAGE_ast_INCLUDE}/ast_sys.h dontcare - make ${PACKAGE_ast_INCLUDE}/ast_lib.h implicit - done ${PACKAGE_ast_INCLUDE}/ast_lib.h dontcare - prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit - done ${PACKAGE_ast_INCLUDE}/ast_std.h dontcare - done ${PACKAGE_ast_INCLUDE}/sfio.h dontcare - done ${PACKAGE_ast_INCLUDE}/stk.h dontcare - make include/history.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done include/history.h dontcare - make ${PACKAGE_ast_INCLUDE}/cmd.h implicit - make ${PACKAGE_ast_INCLUDE}/dlldefs.h implicit - done ${PACKAGE_ast_INCLUDE}/dlldefs.h dontcare - make ${PACKAGE_ast_INCLUDE}/cmdext.h implicit - make ${PACKAGE_ast_INCLUDE}/shcmd.h implicit - done ${PACKAGE_ast_INCLUDE}/shcmd.h dontcare - done ${PACKAGE_ast_INCLUDE}/cmdext.h dontcare - prev ${PACKAGE_ast_INCLUDE}/shcmd.h implicit - make ${PACKAGE_ast_INCLUDE}/stak.h implicit - prev ${PACKAGE_ast_INCLUDE}/stk.h implicit - done ${PACKAGE_ast_INCLUDE}/stak.h dontcare - make ${PACKAGE_ast_INCLUDE}/error.h implicit - make ${PACKAGE_ast_INCLUDE}/option.h implicit - make ${PACKAGE_ast_INCLUDE}/ast.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast_api.h implicit - make ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit - done ${PACKAGE_ast_INCLUDE}/vmalloc.h dontcare - prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit - done ${PACKAGE_ast_INCLUDE}/ast.h dontcare - done ${PACKAGE_ast_INCLUDE}/option.h dontcare - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done ${PACKAGE_ast_INCLUDE}/error.h dontcare - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done ${PACKAGE_ast_INCLUDE}/cmd.h dontcare - prev ${PACKAGE_ast_INCLUDE}/shcmd.h implicit - make include/nval.h implicit - make ${PACKAGE_ast_INCLUDE}/hash.h implicit - make ${PACKAGE_ast_INCLUDE}/hashpart.h implicit - done ${PACKAGE_ast_INCLUDE}/hashpart.h dontcare - done ${PACKAGE_ast_INCLUDE}/hash.h dontcare - prev ${PACKAGE_ast_INCLUDE}/option.h implicit - make ${PACKAGE_ast_INCLUDE}/cdt.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit - done ${PACKAGE_ast_INCLUDE}/cdt.h dontcare - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done include/nval.h dontcare - make include/name.h implicit - prev include/nval.h implicit - prev ${PACKAGE_ast_INCLUDE}/cdt.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done include/name.h dontcare - prev ${PACKAGE_ast_INCLUDE}/cdt.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done include/shell.h - done sh/pmain.c - 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_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 - make alarm.o - make bltins/alarm.c - make FEATURE/time implicit - meta FEATURE/time features/%>FEATURE/% features/time time - make features/time - done features/time - exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/time - make ${PACKAGE_ast_INCLUDE}/times.h implicit - make ${PACKAGE_ast_INCLUDE}/ast_time.h implicit - done ${PACKAGE_ast_INCLUDE}/ast_time.h dontcare - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done ${PACKAGE_ast_INCLUDE}/times.h dontcare - done FEATURE/time generated - make include/builtins.h implicit - make include/shtable.h implicit - done include/shtable.h dontcare - make FEATURE/dynamic implicit - meta FEATURE/dynamic features/%>FEATURE/% features/dynamic dynamic - make features/dynamic - done features/dynamic - exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/dynamic - prev ${PACKAGE_ast_INCLUDE}/dlldefs.h implicit - done FEATURE/dynamic dontcare generated - make FEATURE/options implicit - meta FEATURE/options features/%>FEATURE/% features/options options - make features/options - done features/options - exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/options - done FEATURE/options dontcare generated - prev ${PACKAGE_ast_INCLUDE}/option.h implicit - done include/builtins.h - prev ${PACKAGE_ast_INCLUDE}/stak.h implicit - prev ${PACKAGE_ast_INCLUDE}/error.h implicit - make include/defs.h implicit - make include/regress.h implicit - done include/regress.h dontcare - prev include/shtable.h implicit - prev include/shell.h implicit - prev ${PACKAGE_ast_INCLUDE}/endian.h implicit - prev include/name.h implicit - make include/argnod.h implicit - prev ${PACKAGE_ast_INCLUDE}/stak.h implicit - done include/argnod.h dontcare - prev ${PACKAGE_ast_INCLUDE}/cdt.h implicit - prev FEATURE/options implicit - prev FEATURE/externs implicit - prev ${PACKAGE_ast_INCLUDE}/error.h implicit - prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done include/defs.h - done bltins/alarm.c - 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 -DERROR_CONTEXT_T=Error_context_t -c bltins/alarm.c - done alarm.o generated - make cd_pwd.o - make bltins/cd_pwd.c - make include/test.h implicit - prev include/shtable.h implicit - prev include/defs.h implicit - prev FEATURE/options implicit - done include/test.h - make ${PACKAGE_ast_INCLUDE}/ls.h implicit - make ${PACKAGE_ast_INCLUDE}/ast_mode.h implicit - done ${PACKAGE_ast_INCLUDE}/ast_mode.h dontcare - prev ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit - done ${PACKAGE_ast_INCLUDE}/ls.h - prev include/builtins.h implicit - prev include/name.h implicit - make include/path.h implicit - make FEATURE/acct implicit - meta FEATURE/acct >FEATURE/% acct - exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : def acct - done FEATURE/acct dontcare generated - prev include/defs.h implicit - prev include/nval.h implicit - prev FEATURE/options implicit - done include/path.h - make include/variables.h implicit - prev FEATURE/dynamic implicit - prev FEATURE/options implicit - prev ${PACKAGE_ast_INCLUDE}/option.h implicit - prev include/nval.h implicit - done include/variables.h - prev ${PACKAGE_ast_INCLUDE}/error.h implicit - prev ${PACKAGE_ast_INCLUDE}/stak.h implicit - prev include/defs.h implicit - done bltins/cd_pwd.c - 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_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 - prev include/builtins.h implicit - make include/shnodes.h implicit - prev include/argnod.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done include/shnodes.h - prev ${PACKAGE_ast_INCLUDE}/error.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - prev include/defs.h implicit - done bltins/cflow.c - 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_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 - prev include/test.h implicit - prev include/shnodes.h implicit - prev include/defs.h implicit - done sh/deparse.c - 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_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 - prev include/defs.h implicit - 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_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 - make bltins/getopts.c - prev include/builtins.h implicit - prev include/nval.h implicit - prev ${PACKAGE_ast_INCLUDE}/error.h implicit - prev include/variables.h implicit - prev include/defs.h implicit - done bltins/getopts.c - 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_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 - make include/edit.h implicit - make include/national.h implicit - done include/national.h dontcare - make include/terminal.h implicit - make FEATURE/ttys implicit - meta FEATURE/ttys features/%>FEATURE/% features/ttys ttys - make features/ttys - done features/ttys - exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/ttys - done FEATURE/ttys dontcare generated - done include/terminal.h dontcare - prev FEATURE/setjmp implicit - prev ${PACKAGE_ast_INCLUDE}/sig.h implicit - make FEATURE/locale implicit - meta FEATURE/locale features/%>FEATURE/% features/locale locale - make features/locale - done features/locale - exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/locale - done FEATURE/locale dontcare generated - prev FEATURE/options implicit - done include/edit.h dontcare - prev include/builtins.h implicit - prev include/history.h implicit - prev include/name.h implicit - make include/io.h implicit - prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done include/io.h - prev include/variables.h implicit - prev ${PACKAGE_ast_INCLUDE}/error.h implicit - prev ${PACKAGE_ast_INCLUDE}/ls.h implicit - prev ${PACKAGE_ast_INCLUDE}/stak.h implicit - prev include/defs.h implicit - done bltins/hist.c - 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} -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 - prev ${PACKAGE_ast_INCLUDE}/times.h implicit - prev FEATURE/time implicit - prev FEATURE/locale implicit - make include/jobs.h implicit - prev ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit - prev include/terminal.h implicit - prev FEATURE/options implicit - prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done include/jobs.h - prev include/builtins.h implicit - prev include/history.h implicit - prev include/name.h implicit - prev include/io.h implicit - prev include/path.h implicit - prev include/shnodes.h implicit - prev include/variables.h implicit - prev include/defs.h implicit - done bltins/misc.c - 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 -DERROR_CONTEXT_T=Error_context_t -c bltins/misc.c - done misc.o generated - make mkservice.o - make bltins/mkservice.c - prev ${PACKAGE_ast_INCLUDE}/cmd.h implicit - prev ${PACKAGE_ast_INCLUDE}/error.h implicit - prev include/nval.h implicit - prev include/defs.h implicit - done bltins/mkservice.c - meta mkservice.o %.c>%.o bltins/mkservice.c mkservice - prev bltins/mkservice.c - prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSH_DICT=${SH_DICT} -D_PACKAGE_ast -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c bltins/mkservice.c - done mkservice.o generated - make print.o - make bltins/print.c - make ${PACKAGE_ast_INCLUDE}/ccode.h implicit - make ${PACKAGE_ast_INCLUDE}/ast_ccode.h implicit - done ${PACKAGE_ast_INCLUDE}/ast_ccode.h dontcare - prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit - done ${PACKAGE_ast_INCLUDE}/ccode.h - make ${PACKAGE_ast_INCLUDE}/tmx.h implicit - make ${PACKAGE_ast_INCLUDE}/tv.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done ${PACKAGE_ast_INCLUDE}/tv.h dontcare - make ${PACKAGE_ast_INCLUDE}/tm.h implicit - prev ${PACKAGE_ast_INCLUDE}/times.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done ${PACKAGE_ast_INCLUDE}/tm.h dontcare - done ${PACKAGE_ast_INCLUDE}/tmx.h - make include/streval.h implicit - make ${PACKAGE_ast_INCLUDE}/ast_float.h implicit - prev ${PACKAGE_ast_INCLUDE}/endian.h implicit - prev ${PACKAGE_ast_INCLUDE}/endian.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit - done ${PACKAGE_ast_INCLUDE}/ast_float.h dontcare - prev include/defs.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done include/streval.h - prev include/builtins.h implicit - prev include/history.h implicit - prev include/name.h implicit - prev include/io.h implicit - prev ${PACKAGE_ast_INCLUDE}/stak.h implicit - prev ${PACKAGE_ast_INCLUDE}/error.h implicit - prev include/defs.h implicit - done bltins/print.c - 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 -DERROR_CONTEXT_T=Error_context_t -c bltins/print.c - done print.o generated - make read.o - make bltins/read.c - prev include/edit.h implicit - prev include/terminal.h implicit - prev include/history.h implicit - prev include/builtins.h implicit - prev include/name.h implicit - prev include/io.h implicit - make include/lexstates.h implicit - prev ${PACKAGE_ast_INCLUDE}/wctype.h implicit - prev ${PACKAGE_ast_INCLUDE}/wchar.h implicit - prev FEATURE/locale implicit - done include/lexstates.h - prev include/variables.h implicit - prev include/defs.h implicit - prev ${PACKAGE_ast_INCLUDE}/error.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done bltins/read.c - 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} -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 - make FEATURE/poll implicit - meta FEATURE/poll features/%>FEATURE/% features/poll poll - make features/poll - done features/poll - exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/poll - done FEATURE/poll generated - prev FEATURE/time implicit - prev include/builtins.h implicit - prev ${PACKAGE_ast_INCLUDE}/tmx.h implicit - prev ${PACKAGE_ast_INCLUDE}/error.h implicit - prev include/defs.h implicit - done bltins/sleep.c - 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 -DERROR_CONTEXT_T=Error_context_t -c bltins/sleep.c - done sleep.o generated - make trap.o - make bltins/trap.c - prev include/builtins.h implicit - prev include/jobs.h implicit - prev include/defs.h implicit - done bltins/trap.c - 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_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 - prev ${PACKAGE_ast_INCLUDE}/tmx.h implicit - prev FEATURE/poll implicit - prev FEATURE/externs implicit - prev include/builtins.h implicit - prev include/test.h implicit - prev include/terminal.h implicit - prev include/io.h implicit - prev ${PACKAGE_ast_INCLUDE}/regex.h implicit - prev ${PACKAGE_ast_INCLUDE}/ls.h implicit - prev ${PACKAGE_ast_INCLUDE}/error.h implicit - prev include/defs.h implicit - done bltins/test.c - 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 -DERROR_CONTEXT_T=Error_context_t -c bltins/test.c - done test.o generated - make typeset.o - make bltins/typeset.c - prev FEATURE/dynamic implicit - prev include/variables.h implicit - prev include/builtins.h implicit - prev include/history.h implicit - prev include/name.h implicit - prev include/path.h implicit - prev ${PACKAGE_ast_INCLUDE}/error.h implicit - prev include/defs.h implicit - done bltins/typeset.c - 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 -DERROR_CONTEXT_T=Error_context_t -c bltins/typeset.c - done typeset.o generated - make ulimit.o - make bltins/ulimit.c - make include/ulimit.h implicit - make FEATURE/rlimits implicit - meta FEATURE/rlimits features/%>FEATURE/% features/rlimits rlimits - make features/rlimits - done features/rlimits - exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/rlimits - done FEATURE/rlimits dontcare generated - prev FEATURE/time implicit - done include/ulimit.h - prev include/name.h implicit - prev include/builtins.h implicit - prev include/defs.h implicit - prev ${PACKAGE_ast_INCLUDE}/error.h implicit - prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done bltins/ulimit.c - 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 -DERROR_CONTEXT_T=Error_context_t -c bltins/ulimit.c - done ulimit.o generated - make umask.o - make bltins/umask.c - prev include/builtins.h implicit - prev include/shell.h implicit - prev ${PACKAGE_ast_INCLUDE}/ls.h implicit - prev ${PACKAGE_ast_INCLUDE}/error.h implicit - prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done bltins/umask.c - 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_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 - prev include/builtins.h implicit - make include/shlex.h implicit - prev include/lexstates.h implicit - prev include/shtable.h implicit - prev include/shnodes.h implicit - prev FEATURE/options implicit - prev ${PACKAGE_ast_INCLUDE}/cdt.h implicit - done include/shlex.h - prev include/path.h implicit - prev include/name.h implicit - prev include/shtable.h implicit - prev ${PACKAGE_ast_INCLUDE}/error.h implicit - prev include/defs.h implicit - done bltins/whence.c - 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_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 - make execargs.h implicit - done execargs.h dontcare virtual - make nc.h implicit - done nc.h dontcare virtual - prev FEATURE/externs implicit - make FEATURE/execargs implicit - meta FEATURE/execargs >FEATURE/% execargs - exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : def execargs - done FEATURE/execargs generated - make FEATURE/pstat implicit - meta FEATURE/pstat >FEATURE/% pstat - exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : def pstat - done FEATURE/pstat generated - make FEATURE/setproctitle implicit - meta FEATURE/setproctitle >FEATURE/% setproctitle - exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : def setproctitle - done FEATURE/setproctitle generated - prev FEATURE/time implicit - make include/timeout.h implicit - done include/timeout.h - prev include/history.h implicit - prev include/shnodes.h implicit - prev include/shlex.h implicit - prev include/jobs.h implicit - prev include/io.h implicit - prev include/path.h implicit - prev include/variables.h implicit - prev include/defs.h implicit - make include/fcin.h implicit - prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit - done include/fcin.h - prev ${PACKAGE_ast_INCLUDE}/ls.h implicit - prev ${PACKAGE_ast_INCLUDE}/stak.h implicit - prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done sh/main.c - 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 -DERROR_CONTEXT_T=Error_context_t -c sh/main.c - done main.o generated - make nvdisc.o - make sh/nvdisc.c - prev include/shlex.h implicit - prev include/io.h implicit - prev include/path.h implicit - prev include/builtins.h implicit - prev include/variables.h implicit - prev include/defs.h implicit - done sh/nvdisc.c - 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_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 - prev include/variables.h implicit - prev include/io.h implicit - prev include/defs.h implicit - done sh/nvtype.c - 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 -DERROR_CONTEXT_T=Error_context_t -c sh/nvtype.c - done nvtype.o generated - make arith.o - make sh/arith.c - prev include/builtins.h implicit - prev include/variables.h implicit - prev include/streval.h implicit - prev include/name.h implicit - prev include/lexstates.h implicit - prev include/defs.h implicit - done sh/arith.c - 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_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 - prev include/io.h implicit - prev include/shlex.h implicit - prev FEATURE/poll implicit - prev include/edit.h implicit - prev include/terminal.h implicit - prev include/builtins.h implicit - prev include/jobs.h implicit - prev include/path.h implicit - prev include/defs.h implicit - done sh/args.c - 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_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 - prev include/name.h implicit - prev ${PACKAGE_ast_INCLUDE}/stak.h implicit - prev include/defs.h implicit - done sh/array.c - 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_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 - prev include/history.h implicit - prev include/edit.h implicit - prev include/io.h implicit - prev include/path.h implicit - prev include/lexstates.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit - prev include/defs.h implicit - done edit/completion.c - 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 -DERROR_CONTEXT_T=Error_context_t -c edit/completion.c - done completion.o generated - make defs.o - make sh/defs.c - prev include/timeout.h implicit - prev include/edit.h implicit - prev include/shlex.h implicit - prev include/jobs.h implicit - prev include/defs.h implicit - done sh/defs.c - 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} -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 - prev include/shlex.h implicit - prev include/edit.h implicit - prev include/history.h implicit - prev include/terminal.h implicit - prev include/io.h implicit - prev include/variables.h implicit - prev include/defs.h implicit - prev ${PACKAGE_ast_INCLUDE}/ls.h implicit - make FEATURE/cmds implicit - meta FEATURE/cmds features/%>FEATURE/% features/cmds cmds - make features/cmds - done features/cmds - exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/cmds - done FEATURE/cmds generated - prev FEATURE/time implicit - prev FEATURE/options implicit - prev include/fault.h implicit - prev ${PACKAGE_ast_INCLUDE}/ccode.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done edit/edit.c - 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} -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 - prev include/path.h implicit - prev include/io.h implicit - make ${PACKAGE_ast_INCLUDE}/ast_dir.h implicit - make ${PACKAGE_ast_INCLUDE}/dirent.h implicit - make ${PACKAGE_ast_INCLUDE}/ast_dirent.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit - done ${PACKAGE_ast_INCLUDE}/ast_dirent.h dontcare - done ${PACKAGE_ast_INCLUDE}/dirent.h dontcare - make dirlib.h implicit - done dirlib.h dontcare virtual - prev ${PACKAGE_ast_INCLUDE}/ast_lib.h implicit - done ${PACKAGE_ast_INCLUDE}/ast_dir.h - prev ${PACKAGE_ast_INCLUDE}/stak.h implicit - prev ${PACKAGE_ast_INCLUDE}/ls.h implicit - make ${PACKAGE_ast_INCLUDE}/glob.h implicit - done ${PACKAGE_ast_INCLUDE}/glob.h - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - prev include/test.h implicit - prev include/variables.h implicit - prev include/defs.h implicit - done sh/expand.c - 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_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 - prev ${PACKAGE_ast_INCLUDE}/tmx.h implicit - prev include/builtins.h implicit - prev include/io.h implicit - prev ${PACKAGE_ast_INCLUDE}/ls.h implicit - prev ${PACKAGE_ast_INCLUDE}/error.h implicit - prev include/defs.h implicit - done bltins/regress.c - 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 -DERROR_CONTEXT_T=Error_context_t -c bltins/regress.c - done regress.o generated - make fault.o - make sh/fault.c - prev ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit - prev include/ulimit.h implicit - prev include/builtins.h implicit - prev include/path.h implicit - prev include/jobs.h implicit - prev include/variables.h implicit - prev include/shlex.h implicit - prev include/history.h implicit - prev include/io.h implicit - prev include/fcin.h implicit - prev include/defs.h implicit - done sh/fault.c - 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 -DERROR_CONTEXT_T=Error_context_t -c sh/fault.c - done fault.o generated - make fcin.o - make sh/fcin.c - prev include/fcin.h implicit - prev ${PACKAGE_ast_INCLUDE}/error.h implicit - prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done sh/fcin.c - meta fcin.o %.c>%.o sh/fcin.c fcin - prev sh/fcin.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 -DERROR_CONTEXT_T=Error_context_t -c sh/fcin.c - done fcin.o generated - make history.o - make edit/history.c - prev ${PACKAGE_ast_INCLUDE}/stdio.h implicit - prev include/history.h implicit - prev include/io.h implicit - prev include/builtins.h implicit - prev include/path.h implicit - prev include/variables.h implicit - prev include/defs.h implicit - prev ${PACKAGE_ast_INCLUDE}/ls.h implicit - prev ${PACKAGE_ast_INCLUDE}/error.h implicit - prev FEATURE/time implicit - prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done edit/history.c - 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 -DERROR_CONTEXT_T=Error_context_t -c edit/history.c - done history.o generated - make init.o - make sh/init.c - prev ${PACKAGE_ast_INCLUDE}/wctype.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit - make include/version.h implicit - done include/version.h - prev include/lexstates.h implicit - prev FEATURE/externs implicit - prev FEATURE/dynamic implicit - prev FEATURE/time implicit - prev include/builtins.h implicit - prev include/shlex.h implicit - prev include/io.h implicit - prev include/jobs.h implicit - prev include/edit.h implicit - prev include/name.h implicit - prev include/fault.h implicit - prev include/path.h implicit - prev include/variables.h implicit - prev ${PACKAGE_ast_INCLUDE}/regex.h implicit - prev ${PACKAGE_ast_INCLUDE}/tmx.h implicit - prev ${PACKAGE_ast_INCLUDE}/ccode.h implicit - prev ${PACKAGE_ast_INCLUDE}/stak.h implicit - prev include/defs.h implicit - done sh/init.c - 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 -DERROR_CONTEXT_T=Error_context_t -c sh/init.c - done init.o generated - make io.o - make sh/io.c - prev ${PACKAGE_ast_INCLUDE}/endian.h implicit - prev FEATURE/poll implicit - prev FEATURE/dynamic implicit - prev FEATURE/externs implicit - prev include/timeout.h implicit - prev include/edit.h implicit - prev include/history.h implicit - prev include/shnodes.h implicit - prev include/shlex.h implicit - prev include/jobs.h implicit - prev include/io.h implicit - prev include/path.h implicit - prev include/variables.h implicit - prev ${PACKAGE_ast_INCLUDE}/regex.h implicit - prev ${PACKAGE_ast_INCLUDE}/ls.h implicit - prev include/fcin.h implicit - prev include/defs.h implicit - done sh/io.c - 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} -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 - prev include/history.h implicit - prev include/jobs.h implicit - prev include/io.h implicit - make ${PACKAGE_ast_INCLUDE}/wait.h implicit - make ${PACKAGE_ast_INCLUDE}/ast_wait.h implicit - done ${PACKAGE_ast_INCLUDE}/ast_wait.h dontcare - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done ${PACKAGE_ast_INCLUDE}/wait.h - prev include/defs.h implicit - done sh/jobs.c - 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 -DERROR_CONTEXT_T=Error_context_t -c sh/jobs.c - done jobs.o generated - make lex.o - make sh/lex.c - prev include/shlex.h implicit - prev include/io.h implicit - prev include/lexstates.h implicit - prev include/test.h implicit - prev include/argnod.h implicit - prev include/shell.h implicit - prev include/defs.h implicit - prev FEATURE/options implicit - prev include/nval.h implicit - prev include/fcin.h implicit - prev ${PACKAGE_ast_INCLUDE}/stak.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done sh/lex.c - 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 -DERROR_CONTEXT_T=Error_context_t -c sh/lex.c - done lex.o generated - make macro.o - make sh/macro.c - prev include/streval.h implicit - prev include/national.h implicit - prev include/path.h implicit - prev include/shnodes.h implicit - prev include/jobs.h implicit - prev include/io.h implicit - prev include/shlex.h implicit - prev include/variables.h implicit - prev include/name.h implicit - prev ${PACKAGE_ast_INCLUDE}/regex.h implicit - prev include/fcin.h implicit - prev include/defs.h implicit - done sh/macro.c - 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} -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 - prev include/builtins.h implicit - prev include/shnodes.h implicit - prev include/streval.h implicit - prev FEATURE/externs implicit - prev include/timeout.h implicit - prev include/lexstates.h implicit - prev include/path.h implicit - prev include/variables.h implicit - prev include/defs.h implicit - done sh/name.c - 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_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 - prev include/lexstates.h implicit - prev include/argnod.h implicit - prev include/name.h implicit - prev include/defs.h implicit - done sh/nvtree.c - 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 -DERROR_CONTEXT_T=Error_context_t -c sh/nvtree.c - done nvtree.o generated - make parse.o - make sh/parse.c - prev include/path.h implicit - prev include/test.h implicit - prev include/builtins.h implicit - prev include/history.h implicit - prev include/shlex.h implicit - prev ${PACKAGE_ast_INCLUDE}/error.h implicit - prev include/fcin.h implicit - prev include/shell.h implicit - prev include/defs.h implicit - prev include/version.h implicit - done sh/parse.c - 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_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 - prev FEATURE/time implicit - prev ${PACKAGE_ast_INCLUDE}/endian.h implicit - make ${PACKAGE_ast_INCLUDE}/ast_vfork.h implicit - done ${PACKAGE_ast_INCLUDE}/ast_vfork.h dontcare - make exec_attr.h implicit - done exec_attr.h dontcare virtual - prev FEATURE/externs implicit - prev FEATURE/dynamic implicit - prev include/test.h implicit - prev include/history.h implicit - prev include/jobs.h implicit - prev include/io.h implicit - prev include/path.h implicit - prev include/variables.h implicit - prev include/nval.h implicit - prev ${PACKAGE_ast_INCLUDE}/ls.h implicit - prev include/fcin.h implicit - prev include/defs.h implicit - done sh/path.c - 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 -DERROR_CONTEXT_T=Error_context_t -c sh/path.c - done path.o generated - make string.o - make sh/string.c - prev ${PACKAGE_ast_INCLUDE}/wctype.h implicit - prev include/national.h implicit - prev include/lexstates.h implicit - prev include/shtable.h implicit - prev ${PACKAGE_ast_INCLUDE}/ccode.h implicit - prev ${PACKAGE_ast_INCLUDE}/stak.h implicit - prev include/defs.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done sh/string.c - 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 -DERROR_CONTEXT_T=Error_context_t -c sh/string.c - done string.o generated - make streval.o - make sh/streval.c - prev include/defs.h implicit - prev FEATURE/externs implicit - prev ${PACKAGE_ast_INCLUDE}/stak.h implicit - prev ${PACKAGE_ast_INCLUDE}/error.h implicit - prev include/streval.h implicit - done sh/streval.c - 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_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 - prev include/path.h implicit - prev include/variables.h implicit - prev include/jobs.h implicit - prev include/shlex.h implicit - prev include/shnodes.h implicit - prev include/fault.h implicit - prev include/io.h implicit - prev ${PACKAGE_ast_INCLUDE}/ls.h implicit - prev include/defs.h implicit - done sh/subshell.c - 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_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 - prev ${PACKAGE_ast_INCLUDE}/ccode.h implicit - prev include/io.h implicit - prev include/path.h implicit - prev include/shnodes.h implicit - prev include/defs.h implicit - done sh/tdump.c - 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_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 - prev FEATURE/time implicit - prev FEATURE/sigfeatures implicit - prev include/defs.h implicit - prev include/fault.h implicit - prev ${PACKAGE_ast_INCLUDE}/error.h implicit - prev ${PACKAGE_ast_INCLUDE}/sig.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done sh/timers.c - 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 -DERROR_CONTEXT_T=Error_context_t -c sh/timers.c - done timers.o generated - make trestore.o - make sh/trestore.c - prev ${PACKAGE_ast_INCLUDE}/ccode.h implicit - prev include/io.h implicit - prev include/path.h implicit - prev include/shnodes.h implicit - prev include/defs.h implicit - done sh/trestore.c - 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_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 - prev include/defs.h implicit - done sh/waitevent.c - 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_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 - prev ${PACKAGE_ast_INCLUDE}/ast_vfork.h implicit - prev ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit - prev include/streval.h implicit - prev FEATURE/locale implicit - prev FEATURE/externs implicit - prev FEATURE/time implicit - prev include/builtins.h implicit - prev include/test.h implicit - prev include/jobs.h implicit - prev include/shnodes.h implicit - prev include/io.h implicit - prev include/name.h implicit - prev include/path.h implicit - prev include/variables.h implicit - prev include/fcin.h implicit - prev include/defs.h implicit - done sh/xec.c - 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 -DERROR_CONTEXT_T=Error_context_t -c sh/xec.c - done xec.o generated - make limits.o - make data/limits.c - prev include/ulimit.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done data/limits.c - meta limits.o %.c>%.o data/limits.c limits - prev data/limits.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 -c data/limits.c - done limits.o generated - make msg.o - make data/msg.c - prev FEATURE/cmds implicit - prev include/edit.h implicit - prev include/jobs.h implicit - prev include/builtins.h implicit - prev include/history.h implicit - prev include/timeout.h implicit - prev include/shlex.h implicit - prev include/io.h implicit - prev include/path.h implicit - prev include/defs.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done data/msg.c - 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} -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 - make FEATURE/math implicit - meta FEATURE/math features/%.sh>FEATURE/% features/math.sh math - make features/math.sh - make data/math.tab implicit - done data/math.tab - done features/math.sh dontcare - exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/math.sh ${PACKAGEROOT}/src/cmd/ksh93/data/math.tab - make ${PACKAGE_ast_INCLUDE}/ast_standards.h implicit - done ${PACKAGE_ast_INCLUDE}/ast_standards.h dontcare - make ${INSTALLROOT}/src/lib/libast/FEATURE/float implicit - make ${INSTALLROOT}/src/lib/libast/FEATURE/standards implicit - done ${INSTALLROOT}/src/lib/libast/FEATURE/standards dontcare - prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit - done ${INSTALLROOT}/src/lib/libast/FEATURE/float dontcare - done FEATURE/math generated - prev include/streval.h implicit - prev FEATURE/options implicit - prev ${PACKAGE_ast_INCLUDE}/ast_standards.h implicit - done data/strdata.c - 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_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 - prev include/test.h implicit - prev include/defs.h implicit - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done data/testops.c - 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_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 - prev FEATURE/options implicit - prev include/shlex.h implicit - prev include/shell.h implicit - done data/keywords.c - 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 -DERROR_CONTEXT_T=Error_context_t -c data/keywords.c - done keywords.o generated - make options.o - make data/options.c - prev include/shtable.h implicit - prev include/name.h implicit - prev include/defs.h implicit - done data/options.c - 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_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 - prev include/jobs.h implicit - prev include/defs.h implicit - done data/signals.c - 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_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 - prev FEATURE/dynamic implicit - prev FEATURE/options implicit - prev include/defs.h implicit - done data/aliases.c - 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_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c data/aliases.c - done aliases.o generated - make builtins.o - make data/builtins.c - prev FEATURE/cmds implicit - prev include/jobs.h implicit - prev include/builtins.h implicit - prev include/version.h implicit - prev include/name.h implicit - prev include/ulimit.h implicit - prev include/shtable.h implicit - prev include/defs.h implicit - done data/builtins.c - 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 -DERROR_CONTEXT_T=Error_context_t -c data/builtins.c - done builtins.o generated - make variables.o - make data/variables.c - prev include/builtins.h implicit - prev include/variables.h implicit - prev include/defs.h implicit - prev include/name.h implicit - prev include/shtable.h implicit - prev include/shell.h implicit - prev FEATURE/dynamic implicit - prev FEATURE/options implicit - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done data/variables.c - 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_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 - prev include/lexstates.h implicit - prev FEATURE/options implicit - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done data/lexstates.c - meta lexstates.o %.c>%.o data/lexstates.c lexstates - prev data/lexstates.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 -c data/lexstates.c - done lexstates.o generated - make emacs.o - make edit/emacs.c - prev include/terminal.h implicit - prev include/edit.h implicit - prev include/history.h implicit - prev include/io.h implicit - prev include/defs.h implicit - prev FEATURE/cmds implicit - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done edit/emacs.c - 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} -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 - prev include/lexstates.h implicit - prev FEATURE/time implicit - prev include/terminal.h implicit - prev include/edit.h implicit - prev include/history.h implicit - prev include/io.h implicit - prev FEATURE/options implicit - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - prev include/defs.h implicit - done edit/vi.c - 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 -DERROR_CONTEXT_T=Error_context_t -c edit/vi.c - done vi.o generated - make hexpand.o - make edit/hexpand.c - prev include/edit.h implicit - prev include/defs.h implicit - done edit/hexpand.c - 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} -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 mkservice.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 - exec - (ranlib libshell.a) >/dev/null 2>&1 || true - done libshell.a generated - bind -lshell - prev +ljobs - prev +li - prev ${mam_libsocket} - prev ${mam_libsecdb} - exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${LDFLAGS} ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -o ksh pmain.o ${mam_libshell} ${mam_libnsl} ${mam_libast} - done ksh generated - make shcomp - make shcomp.o - make sh/shcomp.c - prev include/terminal.h implicit - prev include/shnodes.h implicit - prev include/path.h implicit - prev include/defs.h implicit - prev include/shell.h implicit - prev include/version.h implicit - done sh/shcomp.c - meta shcomp.o %.c>%.o sh/shcomp.c shcomp - prev sh/shcomp.c - prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSH_DICT=${SH_DICT} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/shcomp.c - done shcomp.o generated - prev libshell.a archive - prev +ljobs - prev +li - prev ${mam_libsocket} - prev ${mam_libsecdb} - exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${LDFLAGS} ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -o shcomp shcomp.o ${mam_libshell} ${mam_libnsl} ${mam_libast} - done shcomp generated - make suid_exec - make suid_exec.o - make sh/suid_exec.c - prev include/version.h implicit - prev ${PACKAGE_ast_INCLUDE}/error.h implicit - prev ${PACKAGE_ast_INCLUDE}/sig.h implicit - prev ${PACKAGE_ast_INCLUDE}/ls.h implicit - prev FEATURE/externs implicit - prev ${PACKAGE_ast_INCLUDE}/ast.h implicit - done sh/suid_exec.c - meta suid_exec.o %.c>%.o sh/suid_exec.c suid_exec - prev sh/suid_exec.c - prev SHOPT.sh - exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DERROR_CONTEXT_T=Error_context_t -D_API_ast=20100309 -D_PACKAGE_ast -c sh/suid_exec.c - done suid_exec.o generated - prev +ljobs - prev +li - prev ${mam_libsocket} - prev ${mam_libsecdb} - exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${KSH_SHOPTFLAGS} ${CCFLAGS} ${LDFLAGS} -lm ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -o suid_exec suid_exec.o ${mam_libast} ${mam_libnsl} ${mam_libast} - done suid_exec generated - make shell - prev libshell.a archive - done shell virtual - prev libshell.a archive - make ${INSTALLROOT}/bin - exec - if silent test ! -d ${INSTALLROOT}/bin - exec - then mkdir -p ${INSTALLROOT}/bin - exec - fi - done ${INSTALLROOT}/bin generated - make ${INSTALLROOT}/bin/ksh - prev ${INSTALLROOT}/bin - prev ksh - exec - test '' = 'ksh' || ${STDCMP} 2>/dev/null -s ksh ${INSTALLROOT}/bin/ksh || { ${STDMV} ${INSTALLROOT}/bin/ksh ${INSTALLROOT}/bin/ksh.old 2>/dev/null || true; ${STDCP} ksh ${INSTALLROOT}/bin/ksh ;} - done ${INSTALLROOT}/bin/ksh generated - make ${INSTALLROOT}/man/man1 - exec - if silent test ! -d ${INSTALLROOT}/man/man1 - exec - then mkdir -p ${INSTALLROOT}/man/man1 - exec - fi - done ${INSTALLROOT}/man/man1 generated - make ${INSTALLROOT}/man/man1/sh.1 - prev ${INSTALLROOT}/man/man1 - make sh.1 - done sh.1 - exec - test '' = 'sh.1' || ${STDCMP} 2>/dev/null -s sh.1 ${INSTALLROOT}/man/man1/sh.1 || { ${STDMV} ${INSTALLROOT}/man/man1/sh.1 ${INSTALLROOT}/man/man1/sh.1.old 2>/dev/null || true; ${STDCP} sh.1 ${INSTALLROOT}/man/man1/sh.1 ;} - done ${INSTALLROOT}/man/man1/sh.1 generated - make ${INSTALLROOT}/lib - exec - if silent test ! -d ${INSTALLROOT}/lib - exec - then mkdir -p ${INSTALLROOT}/lib - exec - fi - done ${INSTALLROOT}/lib generated - make ${INSTALLROOT}/lib/libshell.a archive - prev ${INSTALLROOT}/lib - prev libshell.a archive - exec - test '' = 'libshell.a' || ${STDCMP} 2>/dev/null -s libshell.a ${INSTALLROOT}/lib/libshell.a || { ${STDMV} ${INSTALLROOT}/lib/libshell.a ${INSTALLROOT}/lib/libshell.a.old 2>/dev/null || true; ${STDCP} libshell.a ${INSTALLROOT}/lib/libshell.a ;} - exec - (ranlib ${INSTALLROOT}/lib/libshell.a) >/dev/null 2>&1 || true - done ${INSTALLROOT}/lib/libshell.a generated - make ${INSTALLROOT}/man/man3 - exec - if silent test ! -d ${INSTALLROOT}/man/man3 - exec - then mkdir -p ${INSTALLROOT}/man/man3 - exec - fi - done ${INSTALLROOT}/man/man3 generated - make ${INSTALLROOT}/man/man3/shell.3 - prev ${INSTALLROOT}/man/man3 - make shell.3 - done shell.3 - exec - test '' = 'shell.3' || ${STDCMP} 2>/dev/null -s shell.3 ${INSTALLROOT}/man/man3/shell.3 || { ${STDMV} ${INSTALLROOT}/man/man3/shell.3 ${INSTALLROOT}/man/man3/shell.3.old 2>/dev/null || true; ${STDCP} shell.3 ${INSTALLROOT}/man/man3/shell.3 ;} - done ${INSTALLROOT}/man/man3/shell.3 generated - make ${INSTALLROOT}/man/man3/nval.3 - make nval.3 - done nval.3 - exec - test '' = 'nval.3' || ${STDCMP} 2>/dev/null -s nval.3 ${INSTALLROOT}/man/man3/nval.3 || { ${STDMV} ${INSTALLROOT}/man/man3/nval.3 ${INSTALLROOT}/man/man3/nval.3.old 2>/dev/null || true; ${STDCP} nval.3 ${INSTALLROOT}/man/man3/nval.3 ;} - done ${INSTALLROOT}/man/man3/nval.3 generated - make ${INSTALLROOT}/lib/lib - exec - if silent test ! -d ${INSTALLROOT}/lib/lib - exec - then mkdir -p ${INSTALLROOT}/lib/lib - exec - fi - done ${INSTALLROOT}/lib/lib generated - make ${INSTALLROOT}/lib/lib/shell - prev ${INSTALLROOT}/lib/lib - prev shell.req - exec - test '' = 'shell.req' || ${STDCMP} 2>/dev/null -s shell.req ${INSTALLROOT}/lib/lib/shell || { ${STDMV} ${INSTALLROOT}/lib/lib/shell ${INSTALLROOT}/lib/lib/shell.old 2>/dev/null || true; ${STDCP} shell.req ${INSTALLROOT}/lib/lib/shell ;} - done ${INSTALLROOT}/lib/lib/shell generated - make ${PACKAGE_ast_INCLUDE} - exec - if silent test ! -d ${PACKAGE_ast_INCLUDE} - exec - then mkdir -p ${PACKAGE_ast_INCLUDE} - exec - fi - done ${PACKAGE_ast_INCLUDE} generated - make ${PACKAGE_ast_INCLUDE}/nval.h - prev ${PACKAGE_ast_INCLUDE} - prev include/nval.h - exec - if cmp 2>/dev/null -s include/nval.h ${PACKAGE_ast_INCLUDE}/nval.h - exec - then : - exec - else ${STDCP} include/nval.h ${PACKAGE_ast_INCLUDE}/nval.h - exec - fi - done ${PACKAGE_ast_INCLUDE}/nval.h generated - make ${PACKAGE_ast_INCLUDE}/shell.h - prev include/shell.h - exec - if cmp 2>/dev/null -s include/shell.h ${PACKAGE_ast_INCLUDE}/shell.h - exec - then : - exec - else ${STDCP} include/shell.h ${PACKAGE_ast_INCLUDE}/shell.h - exec - fi - done ${PACKAGE_ast_INCLUDE}/shell.h generated - make ${PACKAGE_ast_INCLUDE}/history.h - prev include/history.h - exec - if cmp 2>/dev/null -s include/history.h ${PACKAGE_ast_INCLUDE}/history.h - exec - then : - exec - else ${STDCP} include/history.h ${PACKAGE_ast_INCLUDE}/history.h - exec - fi - done ${PACKAGE_ast_INCLUDE}/history.h generated - make ${INSTALLROOT}/bin/suid_exec - prev suid_exec - exec - test '' = 'suid_exec' || ${STDCMP} 2>/dev/null -s suid_exec ${INSTALLROOT}/bin/suid_exec || { ${STDMV} ${INSTALLROOT}/bin/suid_exec ${INSTALLROOT}/bin/suid_exec.old 2>/dev/null || true; ${STDCP} suid_exec ${INSTALLROOT}/bin/suid_exec ;} - done ${INSTALLROOT}/bin/suid_exec generated - make ${INSTALLROOT}/bin/shcomp - prev shcomp - exec - test '' = 'shcomp' || ${STDCMP} 2>/dev/null -s shcomp ${INSTALLROOT}/bin/shcomp || { ${STDMV} ${INSTALLROOT}/bin/shcomp ${INSTALLROOT}/bin/shcomp.old 2>/dev/null || true; ${STDCP} shcomp ${INSTALLROOT}/bin/shcomp ;} - done ${INSTALLROOT}/bin/shcomp generated - make ${INSTALLROOT}/fun - exec - if silent test ! -d ${INSTALLROOT}/fun - exec - then mkdir -p ${INSTALLROOT}/fun - exec - fi - done ${INSTALLROOT}/fun generated - make ${INSTALLROOT}/fun/dirs - prev ${INSTALLROOT}/fun - make fun/dirs - done fun/dirs - exec - test '' = 'fun/dirs' || ${STDCMP} 2>/dev/null -s fun/dirs ${INSTALLROOT}/fun/dirs || { ${STDMV} ${INSTALLROOT}/fun/dirs ${INSTALLROOT}/fun/dirs.old 2>/dev/null || true; ${STDCP} fun/dirs ${INSTALLROOT}/fun/dirs && chmod ugo+x ${INSTALLROOT}/fun/dirs ;} - done ${INSTALLROOT}/fun/dirs generated - make ${INSTALLROOT}/fun/popd - make fun/popd - done fun/popd - exec - test '' = 'fun/popd' || ${STDCMP} 2>/dev/null -s fun/popd ${INSTALLROOT}/fun/popd || { ${STDMV} ${INSTALLROOT}/fun/popd ${INSTALLROOT}/fun/popd.old 2>/dev/null || true; ${STDCP} fun/popd ${INSTALLROOT}/fun/popd && chmod ugo+x ${INSTALLROOT}/fun/popd ;} - done ${INSTALLROOT}/fun/popd generated - make ${INSTALLROOT}/fun/pushd - make fun/pushd - done fun/pushd - exec - test '' = 'fun/pushd' || ${STDCMP} 2>/dev/null -s fun/pushd ${INSTALLROOT}/fun/pushd || { ${STDMV} ${INSTALLROOT}/fun/pushd ${INSTALLROOT}/fun/pushd.old 2>/dev/null || true; ${STDCP} fun/pushd ${INSTALLROOT}/fun/pushd && chmod ugo+x ${INSTALLROOT}/fun/pushd ;} - done ${INSTALLROOT}/fun/pushd generated -done install virtual -make test - make test.ksh - prev ${INSTALLROOT}/bin/ksh - prev ksh - make tests/shtests - done tests/shtests - exec - silent cmp 2>/dev/null -s ${INSTALLROOT}/bin/ksh ksh 2>/dev/null || - exec - echo "make install to run the tests on the latest ksh" >&2 - exec - cd - exec - SHELL=${INSTALLROOT}/bin/ksh ${INSTALLROOT}/bin/ksh shtests - done test.ksh virtual -done test dontcare virtual diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/OBSOLETE b/cde/programs/dtksh/ksh93/src/cmd/ksh93/OBSOLETE deleted file mode 100644 index 006e5de4c..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/OBSOLETE +++ /dev/null @@ -1,152 +0,0 @@ -.sp 3 -.tl ''Ksh Features That Are Obsolete in Ksh93'' -.sp 2 -.AL 1 -.LI -Using a pair of grave accents \^\fB\(ga\fR ... \fB\(ga\fR\^ -for command substitution. Use \fB$(\fR ... \fB)\fR instead. -.LI -.B FCEDIT -is an obsolete name for -the default editor name for the -.B hist -command. -.B FCEDIT -is not used when -.B HISTEDIT -is set. Use -.B HISTEDIT -instead. -.LI -The newtest (\fB[[\fR ... \fB]]\fR) operator -\fB\-a\fP \fIfile\fP -is obsolete. Use -\fB\-e\fP instead. -.LI -The newtest (\fB[[\fR ... \fB]]\fR) operator -.BR = , -as used in -\fIstring\fP \fB=\fP \fIpattern\fP -is obsolete. Use -\fB==\fP instead. -.LI -The following obsolete arithmetic comparisons are also permitted: -.in +5 -.VL 20 -.LI "\fIexp1\fP \fB\-eq\fP \fIexp2\fP" -True, if -.I exp1 -is equal to -.IR exp2 . -.LI "\fIexp1\fP \fB\-ne\fP \fIexp2\fP" -True, if -.I exp1 -is not equal to -.IR exp2 . -.LI "\fIexp1\fP \fB\-lt\fP \fIexp2\fP" -True, if -.I exp1 -is less than -.IR exp2 . -.LI "\fIexp1\fP \fB\-gt\fP \fIexp2\fP" -True, if -.I exp1 -is greater than -.IR exp2 . -.LI "\fIexp1\fP \fB\-le\fP \fIexp2\fP" -True, if -.I exp1 -is less than or equal to -.IR exp2 . -.LI "\fIexp1\fP \fB\-ge\fP \fIexp2\fP" -True, if -.I exp1 -is greater than or equal to -.IR exp2 . -.LE \" End .VL -.in -5 -.LI -Using test -t or [ -t ] without specifying the file unit number. -.LI -The -.B \-k -option to the \fBset\fR builtin is obsolete. It causes -.I all\^ -variable assignment arguments are placed in the environment, -even if they occur after the command name. -The following -first prints -.B "a=b c" -and then -.BR c : -There is no alternative. -.LI -The obsolete -.B \-xf -option of the -.B typeset -command allows a function to be exported -to scripts that are executed without a separate -invocation of the shell. -Functions that need to be defined across separate -invocations of the shell should -be placed in a directory and the -.B FPATH -variable should contains the name of this directory. -They may also -be specified in the -.B ENV -file with the -.B \-xf -option of -.BR typeset . -.LI -The shell environment variable -.B FCEDIT -is obsolete. Use -.B HISTEDIT -instead. -.LI -In the -.B \-s -option -(to \fBfc\fR or \fBhist\fR command???) -( -and in obsolete versions, the editor name -.B \- -) -is used to skip the editing phase and -to re-execute the command. -.LI -The -.B \-t -option to \fBalias\fR builtin is obsolete. It -is used to set and list tracked aliases. -There is no replacement. -.LI -The shell command line option -.B \-t -is obsolete. This option causes the shell to exit after reading -and executing one command. The is no replacement (although ending -\&"command" with the exit builtin should have the same effect). -.LI -As an obsolete feature of the "set" builtin, -if the first -.I arg\^ -is -.B \- -then the -.B \-x -and -.B \-v -options are turned off and the next -.I arg -is treated as the first argument. -Using -.B \+ -rather than -.B \- -causes these options to be turned off. -These options can also be used upon invocation of the shell. -.LE - diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/PROMO.mm b/cde/programs/dtksh/ksh93/src/cmd/ksh93/PROMO.mm deleted file mode 100644 index f69795510..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/PROMO.mm +++ /dev/null @@ -1,141 +0,0 @@ -.H 1 ksh93 -KSH-93 is the most recent version of the KornShell Language -described in -"The KornShell Command and Programming Language," -by Morris Bolsky and David Korn of AT&T Bell Laboratories, ISBN 0-13-182700-6. -The KornShell is a shell programming language, -which is upward compatible with "sh" (the Bourne Shell), -and is intended to conform to the IEEE P1003.2/ISO 9945.2 Shell and -Utilities standard. -KSH-93 provides an enhanced programming environment in -addition to the major command-entry features of the BSD -shell "csh". With KSH-93, medium-sized programming tasks can be -performed at shell-level without a significant loss in performance. -In addition, "sh" scripts can be run on KSH-93 without modification. -.P -The code should conform to the IEEE POSIX 1003.1 standard and to the -proposed ANSI C standard so that it should be portable to all -such systems. Like the previous version, KSH-88, -it is designed to accept eight bit character sets -transparently, thereby making it internationally compatible. -It can support multi-byte characters sets with some characteristics -of the character set given at run time. -.P -KSH-93 provides the following features, many of which were also inherent -in KSH-88: -.BL -.LI -Enhanced Command Re-entry Capability: The KSH-93 history -function records commands entered at any shell level and stores -them, up to a user-specified limit, even after you log off. -This allows you to re-enter long commands with a few keystrokes -- even those commands you entered yesterday. -The history file allows for eight bit characters in -commands and supports essentially unlimited size histories. -.LI -In-line Editing: In "sh", the only way to fix mistyped -commands is to backspace or retype the line. KSH-93 allows you -to edit a command line using a choice of EMACS-TC or "vi" -functions. -You can use the in-line editors to complete filenames as -you type them. -You may also use this editing feature when entering -command lines from your history file. -A user can capture keystrokes and rebind keys to customize the -editing interface. -.LI -Extended I/O Capabilities: KSH-93 provides several I/O -capabilities not available in "sh", including the ability to: -.BL -.LI -specify a file descriptor for input and output -.LI -start up and run co-processes -.LI -produce a prompt at the terminal before a read -.LI -easily format and interpret responses to a menu -.LI -echo lines exactly as output without escape processing -.LI -format output using printf formats. -.LI -read and echo lines ending in "\e". -.LE -.LI -Improved performance: KSH-93 executes many scripts faster -than the System V Bourne shell. A major reason for this is -that many of the standard utilities are built-in. -To reduce the time to initiate a command, KSH-93 allows -commands to be added as built-ins at run time -on systems that support dynamic loading such as System V Release 4. -.LI -Arithmetic: KSH-93 allows you to do integer arithmetic in any -base from two to sixty-four. You can also do double -precision floating point arithmetic. -Almost the complete set of C language operators are available -with the same syntax and precedence. -Arithmetic expressions can be used to as an argument expansion -or as a separate command. -In addition there is an arithmetic for command that works -like the for statement in C. -.LI -Arrays: KSH-93 supports both indexed and associative arrays. -The subscript for an indexed array is an arithmetic expression, -whereas, the subscript for an associative array is a string. -.LI -Shell Functions and Aliases: Two mechanisms - functions and -aliases - can be used to assign a user-selected identifier to -an existing command or shell script. -Functions allow local variables and provide scoping -for exception handling. -Functions can be searched for and loaded on first reference the -way scripts are. -.LI -Substring Capabilities: KSH-93 allows you to create a -substring of any given string either by specifying the starting -offset and length, or by stripping off leading -or trailing substrings during parameter expansion. -You can also specify attributes, such as upper and lower case, -field width, and justification to shell variables. -.LI -More pattern matching capabilities: KSH-93 allows you to specify -extended regular expressions for file and string matches. -.LI -KSH-93 uses a hierarchical name space for variables. -Compound variables can be defined and variables can -be passed by reference. In addition, each variable -can have one or more disciplines associated with -it to intercept assignments and references. -.LI -Improved debugging: KSH-93 can generate line numbers on execution -traces. Also, I/O redirections are now traced. -There is a DEBUG trap that gets evaluated before each command -so that errors can be localized. -.LI -Job Control: On systems that support job control, including -System V Release 4, KSH-93 -provides a job-control mechanism almost identical to that of -the BSD "csh", version 4.1. -This feature allows you -to stop and restart programs, and to move programs between the -foreground and the background. -.LI -Added security: -KSH-93 can execute scripts which do not have read permission -and scripts which have the setuid and/or setgid set when -invoked by name, rather than as an argument to the shell. -It is possible to log or control the execution of setuid and/or -setgid scripts. -The noclobber option prevents you from accidentally erasing -a file by redirecting to an existing file. -.LI -KSH-93 can be extended by adding built-in commands at run time. -In addition, KSH-93 can be used as a library that can -be embedded into an application to allow scripting. -.LE -Documentation for KSH-93 consists of an "Introduction to KSH-93", -"Compatibility with the Bourne Shell" and a manual page and a -README file. In addition, the "New KornShell Command and Programming -Language" book is available from Prentice Hall. - diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/README b/cde/programs/dtksh/ksh93/src/cmd/ksh93/README deleted file mode 100644 index 949c49611..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/README +++ /dev/null @@ -1,294 +0,0 @@ -This directory, and its subdirectories contain the source code -for ksh-93; the language described in the second edition of -the book, "The KornShell Command and Programming Language," by -Morris Bolsky and David Korn which is published by Prentice Hall. -ksh-93 has been compiled and run on several machines with several -operating systems. The end of this file contains a partial list of -operating systems and machines that ksh-93 has been known to run on. - -Most of the source code for ksh is in the src/cmd/ksh93/sh -directory. For information on what's where, see the file DESIGN. - -#### COMPILE-TIME OPTIONS #### - -The SHOPT.sh file contains several compilation options that can be set -before compiling ksh. Options are of the form SHOPT_option and become -#define inside the code. These options are set to their recommended -value and some of these may disappear as options in future releases. -A value of 0 represents off, 1 represents on, no value means probe. For -options where no feature probe is available, probe is the same as off. - -The options have the following defaults and meanings: - - 2DMATCH on Two-dimensional ${.sh.match} for ${var//pat/str}. - - ACCT off Shell accounting. - - ACCTFILE off Enable per user accounting info. - - AUDIT off For auditing specific users - - AUDITFILE "/etc/ksh_audit" - - BGX on Enables background job extensions. Noted by "J" in the - version string when enabled. (1) JOBMAX=n limits the - number of concurrent background jobs to n; the (n+1)th - background job will block until a running background job - completes. (2) SIGCHLD traps are queued so that each - completing background job gets its own trap; $! is set to - the job pid and $? is set to the job exit status at the - beginning of the trap. - - BRACEPAT on Brace expansion. Expands abc{d,e}f to abcdf abcef. - This feature was inspired by the C shell. - - CMDLIB_HDR "" - The header in which you can provide a custom list of - libcmd commands to provide as path-bound built-ins. - - CMDLIB_DIR "\"/opt/ast/bin\"" - The default virtual directory prefix for path-bound - built-ins. The value must include double quotes. - - CRNL off treated as in shell grammar. - - DEVFD Use the more secure /dev/fd mechanism instead of FIFOs for - process substitutions. On by default on OSs with /dev/fd. - - DYNAMIC on Dynamic loading of builtins. (Requires dlopen() interface.) - - ECHOPRINT off Make echo equivalent to print. - - EDPREDICT off Enables history pattern search menu. As you begin a line - with a #, the following characters are treated as a shell - pattern and cause matching lines from the history file to - be displayed as a numbered list as you type. You can - scroll up and down this list or you can use nTAB to - make this the current line (n defaults to 1 if omitted). - Experimental. Bugs: https://github.com/ksh93/ksh/issues/233 - - ESH on Compile with emacs command line editing. The original - emacs line editor code was provided by Mike Veach at IH. - - FILESCAN on Experimental option that allows fast reading of files - using while < file;do ...; done and allowing fields in - each line to be accessed as positional parameters. - - FIXEDARRAY on When using typeset, a name in the format NAME[N] - creates a fixed-size array and any attempt to access a - subscript N or higher is an error. Multidimensional - fixed-size arrays NAME[N1][N2]... are also supported. - - GLOBCASEDET Adds the 'globcasedetect' shell option. When this shell - option is turned on, pathname expansion (globbing) - and file name listing and completion automatically become - case-insensitive on file systems where the difference - between upper- and lowercase is ignored for file names. - This compile-time option is enabled by default on operating - systems that can support case-insensitive file systems. - - HISTEXPAND on Enable !-style history expansion similar to csh(1). - - KIA off Allow generation of shell cross-reference database with -R. - As of 2021-05-10, no tool that can parse this database is - known. If you know of any, please contact us. - - MULTIBYTE on Multibyte character handling. Requires mblen() and - mbctowc(). - - NAMESPACE on Adds a 'namespace' reserved word that allows defining name - spaces. Variables and functions defined within a block like - namespace ExampleSpace { commandlist; } - all have their names automatically prefixed with - '.ExampleSpace.' when defining or using them, creating a - separate space of names unique to the block. Outside of - the namespace block, they can be accessed using - .ExampleSpace.function or ${.ExampleSpace.variable}. - Name spaces within name spaces are also supported. - - MKSERVICE off Enables the 'mkservice' builtin which creates a TCP or UDP - server that is implemented by shell functions, and the - 'eloop' builtin which causes the shell to block waiting for - events to process. Experimental and probably insecure. - - NOECHOE off Disable the '-e' option to the 'echo' command, - unless SHOPT_ECHOPRINT is enabled. - - OLDTERMIO off Use either termios or termio at runtime. - - OPTIMIZE on Optimize loop invariants for with for and while loops. - - PFSH off Compile with support for profile shell. (Solaris; obsolete) - - P_SUID off If set, all real uids, greater than or equal to this - value will require the -p flag to run suid/sgid scripts. - - RAWONLY on Turn on if the vi line mode doesn't work right unless - you do a set -o viraw. - - REGRESS off Enable the __regress__ built-in command and instrumented - intercepts for testing. - - REMOTE off Set --rc (read profile scripts) even if ksh was invoked - with standard input on a socket, i.e. as a remote shell. - - SPAWN on Use posix_spawn(3) as combined fork/exec if job control - is not active. Improves speed. - - STATS on Add .sh.stats compound variable. - - SUID_EXEC on Execute /etc/suid_exec for setuid, setgid script. - - SYSRC Source /etc/ksh.kshrc on initializing an interactive - shell. This is on by default if /etc/ksh.kshrc or - /etc/bash.bashrc exists at compile time. - - TEST_L Add 'test -l' as an alias for 'test -L'. This is on by - default if the OS's external 'test' command supports it. - - TIMEOUT off Set this to the number of seconds for timing out and - exiting the shell when you don't enter a command. If - non-zero, TMOUT can not be set larger than this value. - - TYPEDEF on Enable typeset type definitions. - - VSH on Compile with vi command line editing. The original vi - line editor code was provided by Pat Sullivan at CB. - -#### BUILDING KSH 93U+M #### - -To build ksh (as well as libcmd and libast libraries on which ksh depends), -cd to the top directory and run: - - bin/package make - -The compiled binaries are stored in the arch directory, in a subdirectory -that corresponds to your architecture. The command 'bin/package host type' -outputs the name of this subdirectory. - -If you have trouble or want to tune the binaries, you may pass additional -compiler and linker flags. It is usually best to export these as environment -variables before running bin/package as they could change the name of the -build subdirectory of the arch directory, so exporting them is a convenient -way to keep them consistent between build and test commands. Note that this -system uses CCFLAGS instead of the usual CFLAGS. An example that makes -Solaris Studio cc produce a 64-bit binary: - - export CCFLAGS="-m64 -O" LDFLAGS="-m64" - bin/package make - -Alternatively you can append these to the command, and they will only be -used for that command. You can also specify an alternative shell in which to -run the build scripts this way. For example: - - bin/package make SHELL=/bin/bash CCFLAGS="-O2 -I/opt/local/include" \ - LDFLAGS="-L/opt/local/lib" - -For more information, run: - - bin/package help - -Many other commands in this repo self-document via the --help, --man and ---html options; those that do have no separate manual page. - -Automated installation is not supported yet. To install manually: - - cp arch/$(bin/package host type)/bin/ksh /usr/local/bin/ - cp src/cmd/ksh93/sh.1 /usr/local/share/man/man1/ksh.1 - -(adapting the destination directories as required). - -The build should also generate shcomp, a program that will precompile -a script. ksh93 is able to recognize files in this format and process -them as scripts. You can use shcomp to send out scripts when you -don't want to give away the original script source. - -To be able to run setuid/setgid shell scripts, or scripts without read -permission, the SUID_EXEC compile option must be on, and ksh must be installed -in the /bin directory, the /usr/bin directory, the /usr/lbin directory, -or the /usr/local/bin directory and the name must end in sh. The program -suid_exec must be installed in the /etc directory, must be owned by root, -and must be a suid program. If you must install ksh in some other directory -and want to be able to run setuid/setgid and execute only scripts, then -you will have to change the source code file sh/suid_exec.c explicitly. -If you do not have ksh in one of these secure locations, /bin/sh will -be invoked with the -p options and will fail when you execute a setuid/setgid -and/or execute only script. Note that ksh does not read the .profile -or $ENV file when the real and effective user/group IDs are not equal. - -#### TESTING KSH #### - -The tests subdirectory contains a number of regression tests for ksh. -To run all these tests with the shell you just built, run the command - bin/shtests -For help and more options, type - bin/shtests --man - -#### OTHER DOCUMENTATION #### - -The file PROMO.mm is an advertisement that extolls the virtues of ksh. -The file sh.1 contains the troff (man) description of this Shell. -The file nval.3 contains the troff (man) description of the name-value -pair library that is needed for writing built-ins that need to -access shell variables. - -The file sh.memo contains a draft troff (mm) memo describing ksh. The -file builtins.mm is a draft troff (mm) memo describing how to write -built-in commands that can be loaded at run time. - -The file NEWS in the top-level directory contains bug fixes and other -changes made in the ksh 93u+m fork and supporting libraries. The file -COMPATIBILITY contains a list of potential incompatibilities. - -#### TESTED SYSTEMS #### - -ksh 93u+m 1.0.0.beta-1 has been compiled and tested on the following. -An asterisk signifies minor regression test failures (one or two minor -things amiss), two asterisks signify moderate regression test failures -(some functionality does not work), and three asterisks signify serious -failures (crashes, and/or important functionality does not work). - -* AIX 7.1 on RISC (PowerPC) -* DragonFly BSD 5.8 on x86_64 - FreeBSD 12.2 on x86_64 - FreeBSD 12.2 on arm64 (thanks to hyenias for donating access to a Pi) - GNU/Linux: Alpine 3.12.3 (musl C library) on x86_64 - GNU/Linux: CentOS 8.2 on x86_64 - GNU/Linux: Debian 10.7 on x86_64 - GNU/Linux: Gentoo 2.7 on i386 - GNU/Linux: NixOS 19.09 on x86_64 - GNU/Linux: Slackware 14.2 on x86_64 - GNU/Linux: Ubuntu 16.04 on x86_64 - GNU/Linux: Ubuntu 18.04 on armv7l (32-bit) - GNU/Linux: Ubuntu 20.04 on arm64 - GNU/Linux: Void Linux (musl C library) on x86_64 -*** HP-UX B.11.11 on pa-risc -* illumos: OmniOS 2020-08-19 (gcc) on x86_64 - macOS 10.13.6 (High Sierra) on x86_64 - macOS 10.14.6 (Mojave) on x86_64 -* macOS 12.0.1 (Monterey) on arm64 -* NetBSD 8.1 on x86_64 -* NetBSD 9.2 on x86_64 -* OpenBSD 6.8 on x86_64 -** QNX 6.5.0 on i386 -* Solaris 11.4 (gcc) on x86_64 - Solaris 11.4 (Solaris Studio 12.5 cc) on x86_64 -* UnixWare 7.1.4 on x86 -*** Windows 7 using Cygwin on x86 -*** Windows 10 using Cygwin on x86_64 -*** Windows 11 using Cygwin on x86_64 - -#### REPORTING BUGS #### - -Please report any problems or suggestions by opening an issue at: -https://github.com/ksh93/ksh -Alternatively, email martijn@inlv.org (timely response *not* promised). - -Good luck!! - -The ksh 93u+m contributors -https://github.com/ksh93/ksh - -Originally written by: -David Korn -dgk@research.att.com diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/RELEASE b/cde/programs/dtksh/ksh93/src/cmd/ksh93/RELEASE deleted file mode 100644 index a5aa4944c..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/RELEASE +++ /dev/null @@ -1,3114 +0,0 @@ -This file is of historic interest. For recent changes in both ksh 93u+m and -the accompanying libraries, see the file NEWS in the top-level directory. -____ - -12-08-01 --- Release ksh93u+ --- -12-08-01 A bug that ignored interrupts for some builtins (e.g. cmdtst::grep) - that read from stdin has been fixed. -12-08-01 A bug that interpreted "cd .foo" as "cd foo" has been fixed. -12-07-30 Added automatic restart for EINTR for ioctl, tcgetattr, and tcsetattr. -12-07-23 A scoping error with namrefs to compound associative arrays has - been fixed. -12-07-20 A bug where builtin -d /path/foo deleted foo has been fixed. -12-07-18 A bug in which /dev/stdout did not work in command substitution on - some systems has been fixed. -12-07-17 A bug in which the restricted option set in a subshell prevented - some variables from getting restored when the subshell completed - has been fixed. -12-07-09 A bug in which the directory is not restored after a subshell changes - the name of the directory for subshells executed in the same process - has been fixed. -12-07-09 A bug in which file descriptors created with {n}< file were not being - closed has been fixed. -12-07-09 The 12-04-04 fix for cd .. was not correct causing cd /etc;cd .. to - remain in /etc. This has been fixed. -12-07-02 A bug in which builtin name did now work for builtins found in a - library added by builtin -f lib has been fixed. -12-07-02 A bug in the edit modes which after a directory did not refresh - the input line has been fixed. -12-07-02 A bug in which an exit status > 256 corresponding to a signal was - not returned by a function to indicate a signal exit has been fixed. -12-06-28 Fix ulimit -a to list (Kibytes) instead of (kbytes). -12-06-27 Fix uninitialized data reference for as first char in --vi mode. -12-06-26 The formatting of printf "%q" for multibyte locales has changed to - output using \u[xxx] format for valid wide characters. -12-06-25 The size limit for read -N and read -n has been raised to INT_MAX. -12-06-22 A bug in which an exit trap set in a subshell might not be triggered - when the last command was a simple executable has been fixed. -12-06-22 A bug which could cause the shell to hang when a coprocess exits - while a command inside a command substitution is reading from it has - been fixed. -12-06-21 +ksh new accepts for commands of the form for i; do;...;done -12-06-19 Tab completion after a / when there is only one match not completes - with that match rather than generating a menu of matches. -12-06-19 A bug in which patterns containing {...} where not processed - correctly inside ${var/pattern/string} has been fixed. -12-06-18 Code modified to eliminate fts_notify variable. -12-06-15 Change the .paths plugin/builtin library variable name from - BUILTIN_LIB to PLUGIN_LIB to prevent new plugin_version() aware - -lcmd from causing older non-plugin_version() aware ksh to dump core. -12-06-14 builtin without argument no longer lists .sh.tilde as a built-in. -12-06-12 For assignments if the form x=(foo bar), foo is only check for an - alias if it is float, integer, compound, or nameref. -12-06-12 +The shell supports 64 bit i-nodes even for 32 bit binaries. -12-06-11 A bug with >; redirection systems for which vfork() was the same a - fork() has been fixed. -12-06-11 A bug in path lookup that ignored buffer boundaries has been fixed. -12-06-08 typeset -a var and typeset -A var, first unset var when var is - a compound variable. -12-06-08 A bug in which running shcomp on a program containing namespace - could core dump has been fixed. -12-06-06 A bug in which unset of an associative array of compound variables - did not completely unset the variable has been fixed. -12-06-06 A bug in which exporting left or right justified fields could lose - the field width has been fixed. -12-06-06 A bug on Solaris 11 in which >; did not work for /dev/null was fixed. -12-06-05 A race condition which occurred when stopping a builtin command - invoked from a subshell has been fixed. -12-06-05 A bug with appending elements to an empty indexed array has been - fixed. -12-06-04 A bug in which continuing a stopped builtin could cause it to - terminate has been fixed. -12-06-04 By default, builtins added at runtime will restore the current - directory if they are killed or stopped. -12-06-04 A bug in handling \\ in read has been fixed. -12-05-31 Use getrlimit64/setrlimit64 on systems that support it. -12-05-31 Fix 64 bit big-endian arithmetic bug that mishandled NaN and Inf. -12-05-31 Handle ECONNRESET like EPIPE. -12-05-31 Change .paths parse to use only the last BUILTIN_LIB from the top - and treat BUILTIN_LIB value as a ':' separated list of lib names. -12-05-29 Fix BUILTIN_LIB binding bug that ignored subsequent lookups. -12-05-29 shtests: --nocompile omits the compile test and --compile does only - the compile test. -12-05-25 A command substitution containing a here-document that itself contains - a here-document no longer hangs. -12-05-24 When the redirection operator >; is directed to a symlink, it now - overwrites the file named by the link rather than the link. -12-05-21 +Added printf formats %(type)q where type can be html, url, pattern, - ere, or csv. -12-05-18 A bug with appending elements to an indexed array has been fixed. -12-05-18 The exit status from getopts --man interactively was 0 instead of 2 - and has been fixed. -12-05-18 Another bug with SHOPT_EDPREDICT which could cause a core dump has - been fixed. -12-05-17 A bug with fixed size arrays which could cause a core dump has been - fixed. -12-05-17 A bug in which the here-document <<< $(^V, the terminal was not - restored to insert mode after a character is entered has been fixed. -12-04-27 A bug in which old attributes were not cleared when assigning a - value using typeset has been fixed. -12-04-26 +Enabled multiline editing by default. set +o multiline can disable. -12-04-25 The 12-04-17 PATH fix created a new bug which was fixed. -12-04-25 Fixed a big memory leak problem in which unsetting compound variables - did not free all the space. -12-04-25 A bug in which test ! ! ! was treated as an error has been fixed. -12-04-24 A bug with print -v for a compound variable that contained fixed - arrays which prevented the output from being used again as input - has been fixed. -12-04-23 +kill provides the STKFLT signal on systems that support it. -12-04-23 +The -L option was added to kill. The -L option is the same as -l - except that without arguments the output format is in the form of - a select menu. -12-04-23 A bug in which the exit status for an interactive shell was always - 0 has been fixed. -12-04-20 Entering blank lines interactively no longer resets the exit status. -12-04-18 A bug in file completion in which the second tab completion on a file - would list the completion rather than inserting the completion has - been fixed. -12-04-18 A bug in which "${arr[@]:i:j}" and "${@:i:j}" generated the empty - string when i was a valid subscript and j was <=0 rather than - generating nothing has been fixed. -12-04-17 A bug in which read -d delim from a terminal did not respond to - interrupt and did not terminate when the delimiter was entered - has been fixed. -12-04-17 A bug in which a directory in PATH containing a .paths file that - contains a line with FPATH=dir, where dir does not exist could - cause the path search to fail has been fixed. -12-04-16 A bug in which $(trap -p) did not display traps such as ERR and - DEBUG that are not associated with signals has been fixed. -12-04-11 A bug in which unsetting a variable did not unset attributes when - the variable did not have a value has been fixed. -12-04-11 A bug in which read -A for an array whose index is an enumeration - type, lost the enumeration type has been fixed. -12-04-10 Shared libraries loaded from a library named by a BUILTIN_LIB= found - in a .paths file found in a directory on PATH now add builtins that - are associated with the directory in PATH containing the .paths file. -12-04-09 Increased I/O buffer sizes for better performance. -12-04-09 A bug in which the leading 0 was stripped from $x, when $x contained - a hexadecimal constant inside an arithmetic expression inside - a for or while loop. -12-04-06 Modified namespaces to hand variables FPATH, PATH, and OPTIND that - are defined in name spaces appropriately. This also fixed OPTIND - and OPTARG processing for functions. -12-04-04 A bug in which cd .. fails when the current directory has been - renamed has been fixed. -12-04-02 Made some namespace changes and added a regression test. -12-03-30 A bug with namespaces in which PATH and FPATH set in a namespace was - not restored when leaving the namespace has been fixed. -12-03-29 A bug in which appending an indexed array onto an array without elements - caused the first element to be 1 rather than 0 has been fixed. -12-03-29 A bug which could cause a core dump when copying a large indexed array - has been fixed. -12-03-28 The shell now generates an error message when the sizes with L, Z, and - R are > 32767 on 32 bit binaries instead of generating a core dump. -12-03-28 A bug in left and right justification in which the width of invalid - characters was not taken as zero has been fixed. -12-03-26 A bug in which typeset -p ref, when ref is a reference to an index - array element did not display the subscript has been fixed. -12-03-23 A bug in lowercase and uppercase fields when expanding ${name:=val} - when name is the empty string has been fixed. -12-03-22 A namespace bug in which a type t defined in namespace foo could not - be referenced outside the namespace as .foo.t has been fixed. -12-03-22 A bug in name reference scoping in which a name function called from - another function is pass a name reference to a compound variable - instance to be created and the compound variable is in the global - scope. -12-03-22 A bug in which ${ref[@}} did not behave like ${arr[i][@]} when - ref is a name reference to arr[i] has been fixed. -12-03-21 A bug in which assigning a compound variable into arr[i], where - arr[i] is an array variable did not work correctly has been fixed. -12-03-21 A bug with multidimensional indexed arrays in which ${arr[i][j]} - could generate a bogus error message when i was > 9 has been fixed. -12-03-21 A bug in which typeset v=foo, typeset -p v[0] generated a core dump - has been fixed. -12-03-20 A bug in vi edit mode in which the sequence bar0il left the - cursor on the b rather than the a has been fixed. -12-03-20 A bug which caused a core dump when defining a type with a field - as ' integer -a data=([0]=0)' has been fixed. -12-03-19 Using typeset -a array when array is an associative array not - generated an error message. -12-03-19 typeset +a, typeset +A, and typeset +C not displays the variables - with the attributes a, A, and C respectively instead of an error. -12-03-19 A bug in which typeset -pC, typeset -pa, and typeset -pA output all - variables rather than those of type C, a, or A only has been fixed. -12-03-18 A bug in which unset foo where foo is a name reference to a compound - variable defined inside a function is not unset has been fixed. -12-03-18 A bug with SHOPT_EDPREDICT which could cause a core dump when the - list of matches became empty has been fixed. -12-03-15 The assignment, typeset -C foo=(a b c) now generates a syntax - error since a is not an assignment command. -12-03-16 A bug in which an unset discipline from a variable defined in a - subshell is not invoked in the subshell has been fixed. -12-03-08 The assignment typeset -a (x=1 y=2) now creates an indexed array - of two elements rather than an array of one element which is - a compound variable. -12-03-02 +The vi and emacs edit modes now list all the entries in a directory - when entering a for completion after a /. -12-03-02 A bug in which a program that exits with value 12 when called - from a command substitution in which standard output has been - redirected caused the shell to hang has been fixed. -12-03-01 A bug in which the shell could not parse [[ ']' == ~(E)[]] ]] - has been fixed. - -12-02-29 --- Release ksh93u+ --- -12-02-29 A bug in which ~user expanded first in a subshell prevented it - from expanding later in a program has been fixed. -12-02-29 A bug which could lead to a core dump when more than four shared - libraries were added with the builtin command has been fixed. -12-02-29 Fixed a few bugs which caused SIGCHLD to be blocked preventing - background jobs from being reaped until a foreground job was run. -12-02-27 A bug in which sh -c for a simple command caused a fork() has been - fixed. -12-02-27 A timing bug on systems such as AIX that doesn't support vfork() - that could cause the exist status to get lost has been fixed. -12-02-22 A private file descriptor that was not close-on-exec for a command - substitution and has been fixed. -12-02-14 A bug in which ^Z did not stop a pipeline when the last component - was a shell built-in has been fixed. -12-02-14 getconf("PATH") used to initialize ed(1) path. -12-02-13 +In earlier version read from standard input would fail when called - from the KEYBD trap. Now read options -N, -n, and -t should work - when called from a KEYBD trap. -12-02-13 If FCEDIT is not set and fc is invoked without the -e option, - ed will be invoked if found instead of /bin/ed. -12-02-10 Another bug in the saving and restoring of IFS in a subshell - that caused a core dump has been fixed. -12-02-08 A bug in which .sh.fun disciplines could be cleared after a - function completes has been fixed. -12-02-08 A bug in job control in which the foreground process group was not - set correctly after restarting a stopped pipeline has been fixed. -12-02-07 A bug in which numbers with leading zeros could be treated as - octal constants outside of ((...)) has been fixed. -12-02-06 A bug in arithmetic with compound variables containing multiple - array elements has been fixed. -12-02-02 A bug in the ulimit option table was fixed. -12-01-26 A bug in which a set command that did not change monitor could - affect the behavior of the monitor when monitor mode is on is fixed. -12-01-21 +You can now test whether the shell implements a math function using - typeset -f .sh.math.name, where name is the name of the function. -12-01-21 A bug in which typeset -L and typeset -R did not handle multibyte - characters correctly has been fixed. -12-01-20 A bug that could cause the shell to hang waiting for an incorrect - job pid has been fixed. -12-01-19 A memory leak which occurred for a nested command substitution has been - fixed. -12-01-17 A bug in which typeset -u PS1 could enable the uppercase attribute - for some other variables, for example, HISTFILE has been fixed. -12-01-16 A bug in which .sh.match was not correct after a substring match when - the replacement string contained a substring match has been fixed. -12-01-12 +Files that are sourced from profile files are now read and executed - one command at a time so that alias definitions take effect as they - do for profile files. -12-01-12 A bug in which whence -p would find a function if one existed and - there was no command of that name on PATH. -12-01-11 Change b_* prototype (int, char**, void*) => (int, char**, Shbltin_t*). -12-01-05 A bug in which read was not terminating for a signal that had a trap - set has been fixed. -12-01-01 A timing problem with >; has been fixed. -12-01-01 A macro expansion memory leak has been fixed. -11-12-26 A bug in array assignments of the form arr=( $arr[i] ...) in which - arr was not unset before the assignment has been fixed. -11-12-20 A number of code changes were made based on the results of errors - indicated by static code analysis. -11-12-13 In vi edit mode a literal can now be entered by preceding it - with a backslash. -11-12-13 When tab is entered for completion after a ' or ", the ' and " - characters are no longer deleted. -11-12-07 A bug in which a program in the current directory with a . in the - name could fail to execute when both PATH and FPATH end with :. has - been fixed. -11-12-07 I fixed a bug in which a variable expansion in a large here-document - could be expanded to a null string. -11-12-06 An optimization to read was added in the case the read command - was redirected from a file. -11-12-06 Changes were made to make the line limit for read unlimited by - default. -11-12-05 A bug in which unsetting an array variable did not completely clear - the variable in some cases has been fixed. -11-12-02 +The printf alternative character # when applied to the %q format will - quote argument in a form suitable for a field in a .csv format file. -11-12-02 +A -S option was added to read to be able to read .csv format files. -11-11-28 A bug in which redirection of standard error in a function called from - command substitution caused standard error to be lost has been fixed. -11-11-21 [[ (-n foo) ]] no longer requires a space before (. -11-11-11 The readonly attribute for a variable now applies to compound - assignments to that variable. -11-11-07 Changes were made to reduce the stack size to allow deeper function - recursion. -11-10-10 +Added alternate flag to printf %H for encoding of URI's. -11-10-10 A bug which could lead to a core dump when the shell was invoked - with more than twenty-five open files has been fixed. -11-10-06 A bug in the scoping of name references in functions called by other - functions has been fixed. -11-10-05 A bug in which wait on a pid may return the exit status of an - earlier background job with that pid instead has been fixed. -11-09-22 A bug in which a read timed out with TMOUT did not always restore - the terminal state has been fixed. -11-09-21 An optimization that allowed the last command in a script to use - the same process id as the script has been eliminated. -11-09-21 Added letoctal option that enables the let command to recognize - octal constants starting with 0. -11-09-20 A bug in which ${var.} could cause a core dump has been fixed. -11-09-20 A bug with SHOPT_EDPREDICT when neither vi nor emacs was enabled for - lines beginning with # when in a multibyte locale has been fixed. -11-09-20 A bug in emacs edit mode with SHOPT_EDPREDICT that would cause - history searches matching comments lines to generate predictions - has been fixed. Only user typed comment lines generate predictions. -11-09-20 A bug in emacs edit mode with a search that matches a comment line - that could cause a core dump has been fixed. -11-09-16 A bug in which a command name ending in .. could cause the shell to - abort has been fixed. -11-09-16 The characters ! + - % and @ in file names are no longer escaped with - file name completion. -11-09-13 The let command no longer treats numbers starting with 0 as octal - constants. -11-09-08 A bug in which printf "%R" could cause a core dump for invalid shell - patterns has been fixed. -11-08-09 With set -u, ${var#pattern} reported that var was unset for special - variables. -11-08-03 A bug in which the shell did not preserve the exit status for a - coprocess has been fixed. -11-08-02 A bug in the saving and restoring of IFS in command substitution that - caused a core dump has been fixed. -11-07-21 Modified the 10-08-27 bug fix so that background jobs started in for - and while loops created interactively generate completion messages. -11-07-20 I fixed a bug in here documents in which multi-byte characters that - crossed buffer boundaries were not processed correctly. -11-06-22 The shell compiler now supports process substitution. -11-06-22 +Added code to support process substitution on systems that do - not supply the /dev/fd directory. -11-06-21 Fixed extraneous jobs Done messages when builtin is at the end of a - pipeline. -11-06-20 Fixed two regression tests. -11-06-20 Fixed a bug introduced on last update. -11-06-14 A bug with pipefail in which the shell would wait for background - jobs to complete has been fixed. -11-06-09 A bug which caused the options.sh regression test to fail on OS390 - Linux has been fixed. The bug could also have affected other systems. -11-06-07 +A number of changes to support the still undocumented namespace option - have been added. -11-06-06 A bug in which command substitution of eval would hang when it had - standard error redirected to standard output has been fixed. -11-06-01 A bug in case statement fall through (;&) ignoring set -e was fixed. -11-06-01 A bug in which creating a left or right justified upper or lowercase - variable with an empty string has been fixed. -11-06-01 A bug in which the .paths directory wasn't read when a subshell was - executed before any other command has been fixed. -11-05-31 The shell now gives an error when a type variable is assigned to - an array instance when the array has been declared a compound variable - array. -11-05-31 A bug in which typeset -m of an array instance did not remove the - original instance has been fixed. -11-05-28 A bug in which typeset -m dest=src fails when src and are passed as - name references was fixed. -11-05-28 A bug in which typeset -m "c.board[1][i]=el", where el is a compound - variable core dumps has been fixed. -11-05-28 Two bugs in the display of arrays of compound variables with print -v - have been fixed. -11-05-27 A bug with command substitution in the Shift JIS locale has been - fixed. -11-05-25 A bug in which unset -f foo, called within function foo could cause - the shell to core dump has been fixed. -11-05-24 A bug in unsetting arrays of compound variables that could lead to - a core dump has been fixed. -11-05-24 A scoping bug in with typeset -m for variables passed as references - has been fixed. -11-05-09 A bug in which 'typeset +p array[$i]' in a subshell could cause an - exception has been fixed. -11-05-03 Two more scoping bugs with name references and read -C were fixed. -11-05-03 A potential race condition which occurs when here-documents are - processed in asynchronous blocks has been eliminated. -11-05-02 Another scoping bug with name references defined in a function has - been fixed. -11-05-02 A bug in which the shell discards saved exit status of a job if it is - followed by a subshell execution has been fixed. -11-04-28 The shell now checks for numerical overflows with process ids. -11-04-28 Another scoping bug with compound variables defined by name references - inside a function has been fixed. -11-04-28 A bug which caused a core dump on 32 bit systems with the basic.sh - regression test has been fixed. -11-04-27 A scope binding error for name references has been fixed. -11-04-27 Assignment of compound variable to compound array element by name - is now working. -11-04-26 I fixed a bug with SHOPT_FIXEDARRAY compilation that could cause - an a core dump for not fixed arrays. -11-04-25 A bug in the references to two dimensional compound arrays has - been fixed. -11-04-20 A bug in which a name reference to a multidimensional indexed array - index, nameref x=foo[3][4], did not work correctly has been fixed. -11-04-18 Changes were added to allow fixed size arrays of variable sized - objects when the SHOPT_FIXEDARRAY compile option defined on 10-09-28. -11-04-18 A bug in which name references to array elements could fail has - been fixed. -11-04-15 +A compile option, SHOPT_2DMATCH, has been added which causes - .sh.match to be a two dimensional array after ${var//pat/str} - where the first dimension is the pattern number and the second is - the match instance. -11-04-11 A bug in which readonly var, where var is exported could cause var - to be unset has been fixed. -11-04-06 A tokenizer bug in which ${x/{3}(\d)/ } would cause an infinite - loop has been fixed. -11-04-05 A bug in which ${!x.} could cause a core dump has been fixed. -11-04-04 A bug in which cleaning out the history file could terminate before - keeping all the recent history events has been fixed. -11-03-29 A bug in which ${#array[@]} was 1 rather than 0 after issuing - typeset array[7] has been fixed. -11-03-29 The subscript out or range message for fixed arrays has been fixed. -11-03-29 A bug in which suspend could cause a core dump has been fixed. -11-03-24 For the showme option added 09-09-09, commands beginning with a ; - inside an arithmetic for loop, no longer produce syntax errors. -11-03-18 A bug in _WINIX ~domain/user expansion has been fixed. -11-03-16 A bug in the pipefail option which could cause a script to hang - has been fixed. -11-03-12 The shell no longer treats ${##pattern} as a syntax error. -11-03-11 A bug in typeset -u on systems that don't supply the towctrans() - function has been fixed. -11-03-11 A bug in which a compound assignment of the form var[sub]=(...) - would evaluate sub for each assignment has been fixed. -11-03-07 A bug in which reassigning a compound variable to an associative - array index could incorrectly increase the count of the number - of elements has been fixed. -11-03-04 +The tilde expansion on Windows has been modified to handle user - names of the form domain/user so that ~domain/user now expands - to the home directory of that domain user. -11-03-03 A bug in which the width of the prompt was calculated incorrectly - which cause the wrong line length for edit commands has been fixed. -11-03-02 A bug in which a global variables set from within a function inside - a subshell can leave side effects in parent shell has been fixed. -11-03-01 A bug in which whence -a could dump core when the first match - was due to : in PATH and the program was in the current directory. -11-02-28 A bug in emacs mode with SHOPT_EDPREDICT (added on 10-05-20) which - disabled prediction on a line starting with # when the cursor was not - at the end of line has been fixed. -11-02-28 The output format for compound variables with set has been fixed. -11-02-25 A bug which could lead to a core dump occurred when a shell script - without #! is invoked by name from a parent shell that has name - references defined and the script creates name references of the - same name. -11-02-21 The shell now fails with a syntax error when a here-document in a - command substitution is not completed before the closing ), for - example, $( foobar <&- doesn't work has been fixed. -11-02-07 A bug on some systems for which a command substitution could hang - has been fixed. -11-01-28 A bug in file name completion for files containing both multibyte - characters shell special characters has been fixed. -11-01-18 The .sh.match variable now shows elements that do not match as - as not set rather than an empty string. -11-01-18 A bug with typeset -m of an array into an element of an indexed - array has been fixed. -11-01-13 A bug in handling of arrays of compound variables inside ((...)) which - reported a syntax error been fixed. -11-01-10 A bug in arithmetic assignment operators of the form op= for array - variables when the same array was referenced on the left and the - right hand side with different indices has been fixed. -11-01-10 A bug in which the output of time was lost when { time...;} 2>&1 - occurred inside command substitution has been fixed. -11-01-07 [[ -v sh.match[i] ]] was returning false when sh.match[i] was set. -11-01-05 Added and modified warning messages with sh -n. -11-01-02 Fixed bugs with typeset -l/-u/-M and arrays. -10-12-28 Fixed a bug with typeset -l/-u/-M values in arithmetic expressions. -10-12-26 Fixed a time parsing bug in sleep and localeconv() initialization. -10-12-23 Prevented the shell from generating a core dump when it sends itself - a termination signal because the last command terminated with that - signal. This prevents a core dump to be overwritten by the shell. -10-12-22 A bug in the expansion of ${A[@]} ${B[@]}, introduced in 10-12-01 - when A="" B=B has been fixed. -10-12-21 +Use MS_3D in b_vpath() for setting Win32 WoW mount defaults. -10-12-17 A bug in the expansion of ${var:i:j} which caused a core dump when - i > ${#var} has been fixed. -10-12-16 +sleep now treats . as decimal point even in locales that use comma. -10-12-16 +typeset -M mapname was added to generalize on toupper and tolowwer - mapping as provided with wctrans(). -10-12-10 A bug in which typeset -l displayed namespaces as well as lower case - variables has been fixed. -10-12-06 A bug in which a pipeline could terminate prematurely for a pipeline - whose right hand side is a builtin, and whose left hand side ends in - a simple command that has standard output redirected has been fixed. -10-12-06 A bug in hexfloat assignments when the right hand side is a string - variable starting with 0x has been fixed. -10-12-01 A bug in the expansion of ${$1+"$@"} which causes the last positional - parameter to disappear when it is empty has been fixed. -10-12-01 A number of changes were made to reduce the startup time. -10-11-29 When wait is interrupted by a signal that is caught, it now exits - with a non-zero exit status. -10-11-29 When a variable is used directly in an arithmetic expression, - leading zeros no longer cause the value to be treated as an - octal constant. This was true in previous versions for justified - variables. -10-11-29 An incorrect warning message was eliminated with the -n option for - arithmetic expressions with associative arrays. -10-11-29 Some changes were made to slightly reduce startup time. -10-11-24 A bug in which a name reference is make to arr[0] when arr is not - an array has been fixed. -10-11-23 If a type definition is made without a compound variable assignment it - produces an error message and no longer shows up as a defined type. -10-11-22 The handling of \ inside [...] for shell and ~(E) patterns has - been fixed. -10-11-22 A patch was made to pfsh to handle an error case. -10-11-22 +Modified types defined in namespace so that they do not clash with - types in other namespaces. Types can be referenced using - .namespace.typename. -10-11-22 A bug which caused functions addressed as .namespace.funct to not - work has been fixed. -10-11-22 A bug in which if nr was a name reference to an unset associative - array subscript, then ${!nr} did not output the subscript correctly - has been fixed. -10-11-18 A bug in which shcomp -n was not processing double quotes correctly - has been fixed. -10-11-18 Fixed a bug in which typeset -T foo; typeset -T could cause a - core dump. -10-11-17 Fixed a bug in which the error message for set -u could come out - garbled. -10-11-17 Modified the parser so that typeset -a var=(...) no longer checks - the first index for aliases and reserved words. -10-11-17 A bug in which a subshell command consisted of only a for or until - command has been fixed. -10-11-16 Fixed a bug in which typeset -u would display namespace variables - as well as upper case variables. -10-11-16 A bug which could cause a core dump when unsetting a type variable - when there are references to type elements has been fixed. -10-11-15 A bug which could cause a core dump when unsetting a compound - array variable when there are references to array subscripts has - been fixed. -10-11-15 A bug in which using typeset -m to move an indexed array instance - to another array could cause the array to display incorrectly has - been fixed. -10-11-12 A bug in which the unset discipline function for a type is called - when the type is initialized has been fixed. -10-11-12 The sequences \< and \> are now preserved after patterns containing - ~(E) in ${var/pattern/string} expansions. -10-11-11 A bug in typeset -m when the variables were compound array instances - has been fixed. -10-11-10 A bug in output of a compound variable with types containing types - has been fixed. -10-11-10 Fixed ``name=value export [-p]'' to list environment. -10-11-09 shtests resets SIGPIPE to SIG_DFL for all tests. -10-11-09 Fixed a bug in expansion of $"..." when used in assignments. -10-11-09 Fixed a getaddrinfo() memory leak that didn't call freeaddrinfo() - after an interrupt. -10-11-08 Modified the behavior of set -u so that the shell terminates with - error message when when var is unset with ${!var} and ${#var}. -10-11-02 Fix a bug in which a signal received while in a subshell could be - ignored. -10-10-26 Fix a bug where terminal interrupt was ignored while in vi/emacs - edit search mode. -10-10-26 Fix $'a\0b'c to expand to 'ac'. -10-10-26 Provide user defined round() if not in . -10-10-26 Fix bug where $((undefined_function(1))) dumped core. -10-10-22 Provide user defined iszero() if not in . -10-10-22 Fixed a bug with BGX compile option that could cause the shell to - hang. -10-10-22 Fixed a bug with user define math function on systems for which - char is unsigned. -10-10-21 A bug in which function autoloaded in a function leaves a file open - has been fixed. -10-10-20 Modified the behavior of set -u so that the shell terminates when - when var is unset with ${var op string} when op is #, % or /. -10-10-20 Fixed a bug with the AUDIT option in which the audit file was not - not close-on-exec. -10-10-20 +Made a number of changes and fixes for the NAMESPACE compile option - which as added on 10-06-09 but some problems still remain. -10-10-15 Fixed a bug in which arithmetic functions (added on 10-03-24) did - not work when the function definition was in the same compound - command in which the function was referenced. -10-10-13 A bug in which creating an associative array of compound variables - with no members as an element of a compound variable did not work - has been fixed. -10-10-08 A bug in which killing the last command in a function defined - with function name, terminated the calling script has been fixed. -10-10-08 A bug which could cause a core dump if IFS is unset inside a function - has been fixed. -10-10-07 +To reduce unwanted side effects, invoking typeset without the export - option and without an assignment now causes the variables to be unset - if the variable is inherited from the environment. -10-10-06 The closing brace for ${ command } is now a token no matter what - character follows it. -10-10-04 The change for $'...' expansion on 10-08-09 did not expand parameters - contained in the error message and this has been fixed. -10-10-04 A bug in which a declaration of indexed array (-a) in a type - definition would be displayed as a compound indexed array (-C -a) - has been fixed. -10-09-30 The C99 math function ldexp has been added. -10-09-30 A bug with two dimensional arrays with expansion of the form - ${ref[0..5]} where ref is a nameref to array[i] has been fixed. -10-09-29 A bug in which an eval with redirections invoked from a dot script - would not restore the file has been fixed. -10-09-29 A bug in which loading a function from FPATH could leave a file - descriptor open has been fixed. -10-09-28 +A new compile option SHOPT_FIXEDARRAY has been added and is being - evaluated. It allows fixed-size indexed arrays be to defined - using "typeset array[dim1][dim2]...[dimn]". Fixed-size arrays - are used the same way indexed arrays are. Currently, only fixed - arrays of fixed objects (float, int, and justified objects) are - supported. -10-09-22 A bug which could cause an exception when a function with static - variables was redefined has been fixed. -10-09-21 A bug in the processing of (command&) which created a job in the - parent process has been fixed. -10-09-21 A for loop optimization bug with arithmetic expression evaluation - has been fixed. -10-09-21 A bug in which a recursive function containing a pipeline could - lead to an exception fixed after 8 levels of recursion has been - fixed. -10-09-18 A bug in which the count of elements in an array was wrong leading - to an exception has been fixed. -10-09-13 A bug which occurred when both xtrace and showme options where - specified in which the xtrace option disabled showme has been fixed. -10-09-13 A bug in which creating a reference to an array variable with any - elements could cause subsequent array elements to be treated as - compound variables has been fixed. -10-09-09 A bug which caused ((c.ar[x][y])) to be treated as a syntax error - has been fixed. -10-09-08 A bug in the processing of references to multidimensional arrays - in arithmetic expressions has been fixed. -10-09-08 A bug in the handling of multidimensional arrays which caused - the number of elements in each dimension to be incorrect has - been fixed. -10-09-07 The change for messages on 10-08-09 did not handle message in - assignments and this has been fixed. -10-09-07 A bug in the indentation of compound variables in arrays when - output with print -v has been fixed. -10-09-07 A rare bug with indexed arrays when assigned a null string that could - cause a core dump has been fixed. -10-09-03 A number of changes were made for jobs pools. -10-08-31 typeset -p was modified to output name references after other - variables so that the output could be used as input. -10-08-31 A bug with typeset -p in which variables with attributes but - without attributes were not displayed correctly has been fixed. -10-08-27 +When running a subshell, the current pool is unset. -10-08-27 A bug in which jobs started from within for or while lists in - interactive shells could generate completion messages has been fixed. -10-08-25 Fixed a couple of bugs related to job pools. -10-08-24 +[[ -e /dev/xxx/ ]] can be used to check whether special files of - those names are handled by the shell. -10-08-24 A bug in the running of a compiled dot script in which only the - first command was executed has been fixed. -10-08-23 A bug which sometimes caused a core dump with a configure script - has been fixed. -10-08-20 A bug in command substitution which caused a configure script to - hang has been fixed. -10-08-19 Eliminated unnecessary ; from output of compound variable with - typeset -p. -10-08-17 Fixed a bug in command substitution in which under certain - circumstances a file whose size is a power of 2 plus one, and the last - character was not a new-line, could cause memory corruption. -10-08-13 +Added static discipline functions to type similar to C++ static - class functions. -10-08-11 A bug in time when applied to a pipeline in which the shell did - not wait for all elements of the pipeline to complete has been fixed. -10-08-11 Restored sh_fmtq() quoting to not quote NAME= in NAME=VALUE. -10-08-09 +Modified the expansion of message strings, $"...", so that they - are expanded each time they are referenced rather than expanding - them when the script is compiled or read in. -10-08-06 +The process id for jobs in job pools is now of the form poolname.n - where n is the jobid in that pool. Commands that accept job names - or numbers now understand names in this format. -10-08-05 A bug in which an assignment from within an arithmetic expression - inside a function would create a local variable has been fixed. -10-08-04 A bug in the expanding of variables whose names contain multibyte - characters has been fixed. -10-08-04 A bug which caused an exception when processing scripts compiled - with shcomp -n has been fixed. -10-08-02 Tests using very small buffer sizes uncovered a number of bug most - connected with here documents which have been fixed. -10-07-27 The format modifier , used for digit grouping with d and f formats - has been documented. -10-07-26 cd '' now produces and error rather than changing to the current - directory. -10-07-26 A bug in multi-byte locales which the last character of a - multi-byte character is a \ or pattern character which could occur - when the character was the last character of a command substitution - has been fixed. -10-07-23 Another bug in the processing of ${var:offset;len} in multi-byte - locales when len is larger than the number of characters has been - fixed. -10-07-23 Many coding changes have been made to eliminate most of the uses - of global variables in the shell code. -10-07-22 Fixed a bug in which discipline functions were not being invoked - when it was invoked as ref.discipline where ref was a name reference - to an array instance. -10-07-22 Fixed a bug in which discipline functions were not being invoked it - was invoked on a two dimensional array, i.e., arr[5][9].discipline. -10-07-19 Fixed a buffering problem which occurred when running a script with - ssh and the parent ssh process is killed. -10-07-14 Modified the parser to treat ((...)) inside [[ ... ]] as ( (...) ) so - that it is a nested (...). -10-07-09 A bug in the handling of process substitution inside command - substitution as part of a pipeline has been fixed. -10-07-07 A bug in the output for compound variables containing - multidimensional arrays has been fixed. -10-07-06 ksh now recovers from changes made by bash to the history file without - losing history commands. -10-06-25 A bug in which a large here document containing command substitutions - of a dynamically loaded function that contained a here document - could get truncated has been fixed. -10-06-24 If after executing a script found in FPATH, if a function, builtin, - or type name corresponding to that script is not defined, the shell - now outputs an error message and returns value 126. -10-06-23 Floating point functions that happened to return integer values - were being treated as if the function returned integers so that - integer division could be used instead of floating point division. -10-06-22 Fixed a bug in earlier ksh93u in which an arithmetic assignment to a - variable in the global scope would instead create a local variable if - the variable had an attribute but did not have a value. -10-06-18 Modified trap handling so that if the same signal is received when - executing the handler, it is deferred until the handler completes. -10-06-16 Fixed a bug in which ulimit -v was setting the CPU limit - on Linux. -10-06-14 +The command 'typeset -T' now generates the list of type definitions - in a format that can be used as input to the shell. -10-06-09 Put in patch from Solaris for output quoting with %q. -10-06-09 +Made changes to the NAMESPACE compile option so that it now seems - to work. With this option, namespace { command;} will - run command in the namespace .name so that all variables and - functions created by command are accessible outside the name - space via .name.var and .name.fun. Variables and functions that - are not in the namespace are not modified when running command. -10-06-07 Change most internal interfaces to take Sh_t* argument. -10-06-03 +Types can be loaded on first reference by putting definitions in - PFPATH. -10-06-03 +The shell is now able to parse commands which use type statements - before the typeset -T command to define the type executes. -10-06-03 A bug in the quoting for name reference declarations which did - not properly handle [ and ] in subscripts for associative arrays. -10-06-02 A bug in which a discipline function defined by a type instance to - override the default was not being registered has been fixed. -10-06-02 A bug in which read -C of an associative array of compound variables - was not working has been fixed. -10-06-02 A bug in which the error message for an unset parameter with set -u - did not contain the name of the variable has been fixed. -10-06-01 A bug in typeset -m for moving an indexed array instance to a variable - has been fixed. -10-06-01 A bug in which caused memory to be freed twice when unset was called - for an indexed array that had get or set disciplines has been fixed. -10-06-01 A bug in which the %b format of printf was not preserving NUL bytes - with \0 has been fixed. -10-06-01 A bug in the handling of name references to array variables in - arithmetic expressions has been fixed. -10-05-28 Fixed bugs in changing attributes for two dimensional arrays. -10-05-28 Eliminated a few unreferenced variables and a reference to - uninitialized memory. -10-05-27 Rewrote the subshell code to avoid using pipes an many cases. -10-05-24 Fixed a bug which cause an exception when both -l and -s were - specified with typeset -i. -10-05-21 Inputting of three dimensional indexed arrays with ( ( (...)...)...) - was not working and has been fixed. -10-05-21 A bug in which adding the attributes -Ai to a variable via a name - reference could cause the value to display incorrectly has been fixed. -10-05-21 A bug in which using $var inside ((...)) did not work when var was - a hex float variable. -10-05-20 +The compile option SHOPT_EDPREDICT has been added. When this option - is on, as you type a line beginning with a # the following characters - are treated as a shell pattern and cause matching lines from the - history file to be displayed as a numbered list as you type. - You can scroll up and down this list or you can use nTAB - to make this the current line (n defaults to 1 of omitted) or - n to execute. -10-05-20 A bug which caused an exception when multiple levels of composite - functions in arithmetic expressions has been fixed. -10-05-19 <<< with an empty string no longer gives an error. -10-05-19 A bug in arithmetic evaluation when a name reference to an array - instance was used has been fixed. -10-05-14 A bug in which the shell treats a valid indexed array assignment, - typeset -a x=(foo (x=3;y=4) bar) as a syntax error has been fixed. -10-05-13 A bug in creating name references to associative array variable - after a lookup of one of its elements has been fixed. -10-05-12 Two bugs in the handling of function static type variables in - subshells have been fixed. One could cause an exception and the - other would leave side effects in the parent shell. -10-05-10 A bug in which static variables in functions were not being saved and - restored properly when running subshells has been fixed. -10-05-05 A bug in which print -v did not work correctly when an operand was an - indexed array element referring to a compound variable has been fixed. -10-05-05 A change to improve performance by special casing empty string - assignments to avoid repeated malloc() and free(). -10-05-05 A bug in which creating a name reference to a non-existent associative - array element would create the array element has been fixed. -10-05-04 A bug in which name references to static variables in the static - scope were not found has been fixed. -10-04-30 Do not use socketpair() on systems that implement ioctl(I_PEEK) - on pipes. -10-04-29 +When the current job pool is set, coprocess are run in a job pool. -10-04-28 A type defined with a member foo that is an associative array without - elements followed by an expansion ${bar.foo[a]} and an assignment - bar.foo[a]=b, no longer indicates that ${#bar.foo[@]} has 0 members. -10-04-27 Another bug in which a nested command substitution could hang if it - generated too much data has been fixed. -10-04-26 A type defined with a member that is an indexed array without elements - would behave as if the 0th element of each instance was defined after - a non-zero element was specified and this has been fixed. -10-04-26 A bug in which types defined in a subshell were not undefined when - the subshell completed has been fixed. -10-04-23 For file completion in command line editing, file names starting - with # are now escaped so that they are not treated as comments. -10-04-23 A bug in which ${t.var:=value}, where t is an instance of a type - variable, could assign value to the type variable rather than to - the type instance has been fixed. -10-04-23 +Added &| which can be used in place of | to have portions of a - pipeline executed in the pool. -10-04-22 +The .sh.pool variable was added for use with job pools. -10-04-22 A bug in which a nested command substitution could hang if it - generated too much data has been fixed. -10-04-20 A bug which corrupted one byte of memory when read was called with - reads that did not use a delimiter has been fixed. -10-04-19 The display of a compound variable with an embedded array with - attributes was sometimes not working correctly and has been fixed. -10-04-16 A bug in which attributes were not be propagated to elements in - an associative array has been fixed. -10-04-15 A bug which caused scripts containing user defined math functions to - fail to compile with shcomp has been fixed. -10-04-15 +Job pools have been added with the SHOPT_COSHELL compilation option. - A job pool allows a collection of background jobs to run either locally - or remotely and to be managed as a unit. The command '& name ...' - creates or uses a named job pool for subsequent background jobs. - kill, wait, and jobs allow the pool name as operands. -10-04-14 A bug in which a coprocess connection could terminate prematurely - when running a nested subshell has been fixed. -10-04-12 +Enumeration constants can be used in arithmetic expressions with the - ==, != and = operators when the left hand side is an enum variable - and the right hand side is an enumeration constant. -10-04-07 A bug in which setting the trap on CHLD to ignore could cause - an incorrect exit status has been fixed. -10-04-06 A bug in which LINENO was not incremented for a here-document when - the here-document word was followed by a comment has been fixed. -10-04-06 The optimization that execs the last process of a script rather - than creating a new process has been removed when a trap on - interrupt has been set. -10-04-06 Unsetting the 'C', 'A' or 'a' typeset attribute now produces an - error message rather than generating an exception. -10-04-06 A bug in which .sh.name contained the subscript and .sh.subscript - was empty in some cases with discipline functions on array instances - has been fixed. -10-04-05 A bug in the edit modes where preceding the interrupt character with - the literal next character did not work has been fixed. -10-04-05 A bug in the creation of type instances of arrays which could cause - an exception has been fixed. -10-03-30 A bug in the display of a compound variable containing an indexed - array of compound variables has been fixed. -10-03-24 +Arithmetic functions can be defined using the shell function syntax, - 'function .sh.math.name x y z{...}' , where name is the function name - invoked within ((...)) and x y z are long double arguments passed - as name references. y and z are used for functions with two and - three arguments respectively. The value of the function is the value - of the long double .sh.value variable when the function returns. -10-03-24 A bug in which integer division was mistakenly used when the - numerator was a binary operator with the first operand floating - point and the second integer, e.g. (.1**3)/3, has been fixed. -10-03-24 The >; file operator was modified so that the temporary file is - created in the same physical directory as file. -10-03-23 A warning message was added to sh -n when $var was used inside - ((...)) instead of var. -10-03-19 fmin was added to the list of math function on the man page. -10-03-19 Fixed the return value for unalias when the alias did not - exist. -10-03-19 A bug in which the SHLVL variable exported the value it had on - input rather than the incremented value has been fixed. -10-03-19 A bug which causes whence -q to go into an infinite loop has been - fixed. -10-03-19 Removed space between Stopped message and (SIGTTIN) and (SIGTTOUT). -10-03-17 Modified profile shell execution so that when builtins that - correspond to executable have extended attributes, they are - executed by pfksh instead of being treated as built-ins. -10-03-16 A bug in whence -a which produced duplicate lines of output has - been fixed. -10-03-16 A bug in the handling of process groups in monitor mode for - command substitutions has been fixed. -10-03-15 Fixed a bug in which read -u[fd] could cause the shell to core - dump when fd was greater than open_max. -10-03-15 +Modified the shell I/O so that the shell will not fail if the - ulimit for open_max is increased as part of the script. -10-03-12 A bug in which a here-document containing command substitutions - that contained here-documents did not process correctly has been - fixed. -10-03-12 A bug in which the terminal is not restored to canonical mode - after read times out when in a multibyte locale with no edit mode - enabled has been fixed. - -10-03-05 --- Release ksh93t+ --- -10-03-05 A variable unset memory leak has been fixed and tests/leaks.sh - has been added to verify the fix. -10-03-04 Documentation, comment, and diagnostic spelling typos corrected. -10-02-14 Fix sh_getenv() initialization to cooperate with the 3d fs. -10-02-12 A bug in which the get discipline function was not invoked for - associative array subscripts for unset array elements has been fixed. -10-02-12 A bug which could occur if the last line of a script was an eval - that executed multiple commands has been fixed. -10-02-02 A buffer overflow in read and another in binary type base64 - encoding were fixed. -10-01-20 A bug in the evaluation of arithmetic expression in which the - subscript was evaluated twice for $((foo[x++]++)) has been fixed. -10-01-19 A workaround for a double-free of a trap in both a subshell and its - parent has been added. -10-01-18 A bug in type handling of typeset -H has been fixed. -10-01-15 The "adding empty subscript" warning now only emitted with -x set. -10-01-01 A bug in the parser in which '$((case i in i):;esac);:))' was not - parsed correctly was fixed. -10-01-01 A bug in the parser in which '$(( 2 , 3.6 ))' dumped core for locales - with radix char , and thousands separator . has been fixed. -09-12-28 A bug in the handling of SIGCLD on systems that generated SIGCLD - while blocked waiting for process to complete has been fixed. -09-12-24 AST setlocale() reworked to differentiate env var changes from user - override. -09-12-18 A bug with the SHOPT_BGX option set which disabled traps for signals - < SIGCHLD when a trap for a signal > SIGCHLD was set has been fixed. -09-12-18 A bug where [[ -v var ]] was incorrect for some variables (including - LC_* vars) has been fixed. -09-12-15 A bug that produced a syntax error when a multibyte character - straddled a buffer boundary has been fixed. -09-12-11 A bug where the subscript of an unset variable was not evaluated has - been fixed. -09-12-09 A bug where shcomp dumped core on certain syntax errors has been fixed. -09-12-07 A bug where a parent shell environment var reset in a subshell removed - the value in subsequent children of the parent shell has been fixed. -09-12-04 A bug in which in some cases a trap in a function executed in - a subshell could trigger twice has been fixed. -09-12-03 A bug in which SHLVL exported with some attributes could cause - the shell to abort at startup has been fixed. -09-12-02 A bug with pipefail in which the shell could hang waiting for the - writer to complete before the last reader command has been fixed. -09-11-30 A bug in which a trap could be inherited by the first element of - a pipeline when the command had more than 63 arguments that did - not contain any macro expansions has been fixed. -09-11-19 When read from a terminal was called from with a while or for loop, - and an edit mode was on, a backspace or erase no longer will - overwrite the prompt. -09-11-17 +Change .paths parse to handle BUILTIN_LIB=foo BUILTIN_LIB=foo-1.2. -09-11-17 Inside a function, typeset foo.bar will bind foo to global variable - foo if local variable foo does not exist, instead of creating a - local variable. -09-11-17 "read -n1" from the terminal has been fixed to read exactly one character. -09-11-11 Job control now works for subshell commands, (...). -09-11-11 If set -e is on for an interactive shell errors in special builtins - now cause the shell to exit. -09-11-11 A bug in which an interrupt handler processed during the read builtin - when IFS did not contain a new line has been fixed. -09-11-09 A bug in which a variable that has been unset in a subshell and then - exported from that subshell does not show up in the environment - has been fixed. -09-11-02 ``,2'' is now a valid numeric constant for locales with - decimal_point=','. -09-11-02 A bug where "return" in .profile did not restore the shell state - has been fixed. -09-10-31 A bug that corrupted saved exit status when pids wrapped around has - been fixed. -09-10-26 A bug in { LANG LC_ALL LC_category } ordering has been fixed in -last. -09-10-16 A bug where notification to libast that the environment has changed - has been fixed. -09-10-12 A bug in which a function loaded in a subshell could leave side - effects in the parent shell has been fixed. -09-10-12 A bug in converting a printf %d operand to a number when the operand - contains multiple subscripts for the same variable has been fixed. -09-10-09 A bug in the handling of the escape character \ in directory prefixes - in command completion has been fixed. -09-10-09 $PATH processing has been changed to delay dir stat() and .paths - lookup until the directory is needed in the path search. -09-09-28 Call the AST setlocale() intercept on unset too. -09-09-24 A bug in which LANG=foo; LC_ALL=foo; unset LC_ALL; did not revert - LC_CTYPE etc. to the LANG value has been fixed. -09-09-17 A bug in which unsetting SVLVL could cause a script invoked by - name without #! to core dump has been fixed. -09-09-16 A bug in which a pipeline in a here-document could hang when the - pipefail option was on has been fixed. -09-09-09 A bug in the processing of line joining in here documents which - occurred when a buffer began with has been fixed. -09-09-09 +A leading ; with commands in a brace group or parenthesis group - no longer causes an error. It now is used for the "showme" option. -09-09-09 A bug in which a subshell containing a background process could - block until the background process completed has been fixed. -09-09-04 A bug in handling ${var[sub]}, where var is a nameref has been fixed. -09-09-03 A bug which caused an indexed array to have the wrong number of elements - when it was converted from a compound variable by adding an another - element has been fixed. -09-09-03 Specifying export for a compound variable now generates an error. -09-09-02 $"..." localizations strings are no longer recognized inside `...`. -09-09-01 A bug in the for loop optimizer in the handling of type static - variables has been fixed. -09-09-01 An error message is not displayed when * and @ are used as subscripts. -09-09-01 Several bugs in the processing for types that included an associative - array of another type has been fixed. -09-09-01 A bug in the tracing of [[ a < b ]] and [[ a > b ]] has been fixed. -09-08-26 The .sh.file variable was not being set for a script that was run - by name and didn't start with #! and this has been fixed. -09-08-25 A bug in which a function called to deeply from command substitution - did not display an error message has been fixed. -09-08-24 +When processing profiles, ksh93 now violates the POSIX standard and - treats &> as a redirection operator similar to bash. -09-08-23 A bug in the handling of the trap on SIGPIPE that could lead to a - memory fault has been fixed. -09-08-21 A bug in the handling of the comma operator in arithmetic expressions - that could cause a core dump on some systems has been fixed. -09-08-20 A bug in which a compound variable containing an array of a type - that doesn't have any elements now expands correctly. -09-08-19 A bug which disabled function tracing inside a function after - a call to another function has been fixed. -09-08-19 A bug in which initializing a compound variable instance to another - compound variable by name has been fixed. -09-08-18 A bug in which compound variable instances could be lost after - an instance that invoked a type method discipline has been fixed. -09-08-18 A bug in which a discipline function for a type applied to an - array instance when invoked in a function ignored the subscript - has been fixed. -09-08-18 A scoping error with variables in arithmetic expression with - type variables when reference with a name reference has been fixed. -09-08-10 Several memory leaks were fixed primarily related to subshells. -09-08-06 A bug in which setting the trap on CHLD to ignore could cause - a script to hang has been fixed. -09-07-08 A bug in the processing of name reference assignments when it - contained pattern expansions with quoting has been fixed. -09-06-22 +The default width for typeset -X has been changed so that there - should be no loss of precision when converting to a string. -09-06-19 A bug in the printing of array elements for binary variables with - printf %B has been fixed. -09-06-19 A bug which caused a core dump with trap DEBUG set with an array - assignment with no elements has been fixed. -09-06-19 A bug with read with typeset -b -Z has been fixed. -09-06-19 Two bugs related to read -b for array variables has been fixed. -09-06-19 A bug with typeset for compound variables containing arrays of - compound variables has been fixed. -09-06-18 A bug in appending a compound variable to an indexed array of - compound variables has been fixed. -09-06-18 A bug which occurs when appending a compound variable to an indexed - array element has been fixed. -09-06-18 Setting VISUAL to a value other than one ending in vi or emacs will - no longer unset the edit mode. -09-06-17 A bug in typeset -m when moving a local compound variable to a - global compound variable via a name reference has been fixed. -09-06-17 A bug in appending to nodes of an array of compound variables when - addressing them via nameref has been fixed. -09-06-17 A bug in typeset -p var, when var is an array of compound variables - in which the output only contained on array element has been fixed. -09-06-17 The prefix expansion ${!y.@} now works when y is a name - reference to an element of an array. -09-06-16 Traps on signals that are ignored when the shell is invoked - no longer display. Previously they were ignored as required but - would be listed with trap -p. -09-06-12 A bug in vi edit mode in which hitting the up arrow key at the - end of a line longer than 40 characters which caused a core dump - has been fixed. -09-06-11 A bug in which "eval non-builtin &" would create two processes, - one for the & and another for non-builtin has been fixed. -09-06-08 When var is an identifier and is unset, ${var} no longer tries to - run command substitution on the command var. -09-06-08 +Process substitution arguments of the form <(command) can now be - used following the < redirection operator to redirect from command. -09-05-13 A bug in which redirections of the form 2>&1 1>&5 inside command - substitution could cause the command substitution to hang has been - fixed. -09-05-12 To conform with POSIX, the -u option only checks for unset variables - and subscript elements rather than checking for all parameters. -09-05-12 A bug which could cause a core dump when a variable whose name - begins with a . was referenced as part of a name reference inside - a function has been fixed. -09-05-01 A bug that caused a core dump when SIGWINCH was received and - both vi and emacs mode were off has been fixed. -09-04-22 +Default alias compound='typeset -C' added. -09-04-15 A bug that caused ${...;} to hang for large files has been fixed. -09-04-08 A change was made in the -n option which printed out an incorrect - warning with <>. -09-04-07 The emacs edit command M-_ and M_. and the vi command _ was fixed - to handle the case there there is no history file. -09-04-05 A bug in handling new-lines with read -n has been fixed. -09-04-05 The ENV variable defaults to the file named by $HOME/.kshrc rather - then to the string $HOME/.kshrc. -09-03-31 A bug in which a nested command substitution with redirections could - leave a file descriptor open has been fixed. -09-03-24 +ksh now only uses the value of the _ variable on startup if it can - verify that it was set by the invoking process rather than being - inherited by some other ancestor. -09-03-24 +When ksh is invoked without -p and ruid!=euid, and the shell is - compiled without SHOPT_P_UID or ruid=SHOPT_P_UID then euid is set - to ruid. A bug that did the wrong test (ruid&1 inside a command substitution wasn't working - correctly has been fixed. -09-02-02 A bug in the call stack of arithmetic function with 2 args - returning int has been fixed. -09-01-30 A bug in which 'eval print \$0' inside a function was giving the - wrong value for $0 has been fixed. -09-01-28 A bug in which a command substitution could return an exit status - of 127 when the pipefail option is enabled has been fixed. -09-01-26 ksh93 now generates an error message if you attempt to create - a global name reference to a local variable. -09-01-26 +The [[ -v var ]] operator was modified to test for array elements. -09-01-23 +The redirection operator <>; was added. It is similar to <> - except that if the command it is applied to succeeds, the file - is truncated to the offset at the command completion. -09-01-23 The default file descriptor for <> was changed to 1. -09-01-20 A bug in which the exit status specified in an exit trap was - not used when a process terminated with a signal has been fixed. -09-01-19 A bug in which a signal whose default action is to terminate - a process could be ignored when the process is running a subshell - has been fixed. -09-01-19 A bug in which sending SIGWINCH to a process that reads from a pipe - could cause a memory fault has been fixed. -09-01-16 +The -R unary operator was added to [[ ... ]] and test to check whether - a variable is a name reference. -09-01-16 +The -v unary operator was added to [[ ... ]] and test to check whether - a variable is set. -09-01-14 The unset built-in was modified to return 0 exit status when - unsetting a variable that was unset to conform with the POSIX - standard. -09-01-14 The unset built-in was modified to continue to unset variables - after encountering a variable that it could not unset to - conform to the POSIX standard. -09-01-14 The parameter expansion ${x+value} no longer expands the value of - the variable x when determining whether x is set or not. -09-01-13 A bug in which background jobs and pipelines that were not waited - for could, in rare instances, cause the shell to go into an infinite - loop or fail has been fixed. -09-01-06 A bug in indexed arrays of compound variables in which referencing - non-existent sub-variable in an arithmetic expression could cause - the sub-variable to be created has been fixed. -09-01-05 A bug in which the \ character did not escape extended regular - expression pattern characters has been fixed. -08-12-24 A bug in which killing the last element of a pipe did not cause - a write to the pipe to generate a SIGPIPE has been fixed. -08-12-19 A bug which could cause command substitution to hang when the - last element of a pipeline in a command substitution was a built-in - and the output was more that PIPE_BUFF. -08-12-18 A bug which occurs when a here documented marker embedded in a - command substitution occurs on a buffer boundary has been fixed. -08-12-17 A bug in the output of typeset -p for variables that had attributes - but did not have a value has been fixed. -08-12-16 A bug in which a name reference to a name reference variable that - references an array element has been fixed. -08-12-16 A bug in which a variable given both the -A and -C attribute along - with an initial assignment didn't work correctly has been fixed. -08-12-10 The [[ -t fd ]] test was fixed to handle fd>9. -08-12-10 A bug where function stack misalignment could cause a bus error - has been fixed. -08-12-09 Command completion was changed to use \ to quote special characters - instead of quoting the argument in single quotes. -08-12-07 A bug in typeset -m which occurred when the target node was an - associative array element has been fixed. -08-12-07 A timing bug on some systems (for example Darwin), that could - cause the last process of a pipeline entered interactively to fail - with an "Exec format error" has been fixed. -08-12-04 +SHOPT_BGX enables background job extensions. Noted by "J" in - the version string when enabled. (1) JOBMAX=n limits the number - of concurrent & jobs to n; the n+1 & job will block until a - running background job completes. (2) SIGCHLD traps are queued - so that each completing background job gets its own trap; $! is - set to the job pid and $? is set to the job exit status at the - beginning of the trap. (3) sleep -s added to sleep until the time - expires or until a signal is delivered. -08-12-04 The sign of floating point zero is preserved across arithmetic - function calls. -08-12-04 A bug that caused print(1) to produce garbled stdout/stderr - output has been fixed. -08-12-04 A bug in which printf "%d\n" "''" did not output the - numerical value of the EURO symbol, 8354, has been fixed. -08-11-24 + /dev/fd* and /dev/std* redirections are first attempted with - open() to preserve seek semantics; failing that the corresponding - file descriptors are dup()'d. -08-11-20 A bug which could cause a core dump if a function compiled with - shcomp was found has been fixed. -08-11-20 A bug in which jobs were not cleared from the jobs table for - interactive shells when the pipefail option is on has been fixed. -08-11-11 A bug in which a field that was unset in a type definition and later - set for an instance could appear twice when displaying the variable - has been fixed. -08-11-11 A bug in which running a simple command & inside a function would - not return the correct process id has been fixed. -08-11-10 A bug in which the exit status of a command could be lost if the pid - was that of the most recent command substitution that had completed - has been fixed. -08-11-10 The maximum depth for subshells has been increased from 256 to 65536. -08-11-06 A bug which could cause a core dump when the _ reference variable was - used as an embedded type with a compound assignment has been fixed. - -08-10-31 --- Release ksh93t --- -08-10-31 Variable scoping/initialization bugs that could dump core were fixed. -08-10-24 The lexer now accepts all RE characters for patterns prefixed - with a ksh ~(...) option expression. -08-10-24 +For ${var/pat/sub} \0 in sub expands to the text matched by pat. -08-10-18 A bug in array scoping that could dump core has been fixed. -08-10-10 read -n and -N fixed to count characters in multibyte locales. -08-10-10 A bug that mishandled _.array[] type references has been fixed. -08-10-09 +${.sh.version} now contains a concatenation of the following (after - 'Version') denoting compile time features: - A SHOPT_AUDIT - B SHOPT_BASH - L SHOPT_ACCT - M SHOPT_MULTIBYTE -08-10-09 A bug that caused subshell command substitution with redirection - to hang has been fixed. -08-10-08 Output errors, other than to stderr, now result in a diagnostic. -08-10-08 ksh93 now supports types that contain arrays of other types as - members. Earlier versions core dumped in this case. -08-10-05 A bug which caused the shell to emit a syntax error for an arithmetic - statement of the form (( var.name[sub] = value)) has been fixed. -08-10-01 A bug that caused subshell command substitution to hang has - been fixed. -08-09-29 When the -p export option of typeset is used with other options, - only those variables matching the specified options are displayed. -08-09-29 When the shell reads the environment and finds variables that are - not valid shell assignments, it now passes these on to subsequent - commands rather than deleting them. -08-09-29 A bug in the display of compound variables containing an indexed - array of compound variables has been fixed. -08-09-29 A bug in the display of compound variables containing an associative - array with a subscript containing a . in the name has been fixed. -08-09-26 A core dump in the subshell environment restore has been fixed. -08-09-24 $(...) has been fixed to properly set the exit status in $?. -08-09-23 $(<...) with IFS=$'\n\n' has been fixed to retain all but the last - of multiple trailing newlines. -08-09-23 The -p option to typeset when used with other attributes, restricts - the output to variables with the specified attributes. -08-09-22 A bug that sometimes lost the exit status of a job has been fixed. -08-09-21 A bug that retained trailing command substitution newlines in - cases where the command caused the shell to fork has been fixed. -08-09-19 type, whence -v, and command -v were fixed to comply with POSIX - by writing 'not found' diagnostics to the standard error. -08-09-18 test and [ ... ] were fixed to comply with POSIX in the case - of test '(' binop ')' where binop is a valid binary test operator. -08-09-16 +If a method discipline named create is specified when defining a - type, this function will be called when an instance is created. -08-09-15 +The variable _ is now set as a reference to the compound variable - when defining a compound variable or a type. -08-09-10 The shell now prints an error message when the type name specified - for an indexed array subscript is not an enumeration type. -08-09-10 A bug in which a subshell that spawned a background process could - lose output that was produced after the foreground completed - has been fixed. -08-09-10 A timing bug on some systems that could cause coprocesses started by a - subshell to not clean up and prevent other coprocesses has been fixed. -08-09-09 The typeset -m option is now able to rename array elements from - the same array. -08-09-09 The exit status of 2 from the DEBUG trap causes the next command - to be skipped. An exit value of 255 from a DEBUG trap called from - a function causes the function to return. -08-09-08 A bug in which a coprocess created in a subshell that did not - complete when the subshell terminated could prevent a coprocess - from being created in the parent shell has been fixed. -08-09-05 An assignment of the form name1=name2 where name1 and name2 - are both compound variables causes name1 to get a copy of name2. - name1+=name2 causes name2 sub-variables to be appended to name1. -08-09-05 A bug in which unsetting a compound variable did not unset all - the sub-variables has been fixed. -08-09-01 A bug in the subshell cleanup code that could cause SIGSEGV has - been fixed. -06-08-26 +The SHLVL variable which is an environment variable used by bash - and zsh that gets incremented when the shell starts. -08-08-25 +For an indexed array, a negative subscript now refers to offsets - from the end so that -1 refers to the last element. -08-08-24 An alignment error for shorts on 64 bit architectures has been fixed. -08-08-22 If oldvar is a compound variable, typeset -C newvar=oldvar creates - newvar as a copy of oldvar. -08-08-19 +The ALRM signal no longer cause the sleep builtin to terminate. -08-08-13 When used in an arithmetic expression, the .sh.version variable - now produces a number that will be increasing for each release. -08-08-11 A bug in which type instantiation with a compound assignment in - a dot script in which the type is defined has been fixed. -08-08-07 +The -m option has been added to typeset to move or rename a - variable. Not documented yet. -08-08-06 A bug in read when used in a loop when a prompt was specified - when reading from a terminal has been fixed. -08-08-01 A bug with the pipefail option in which a nested pipeline could - cause an asynchronous command to block has been fixed. -08-08-01 A for loop optimizer bug that treats .sh.lineno as an invariant - has been fixed. -08-07-30 A bug in which expanding compound variable that had a get discipline - from with a here document could cause a syntax error has been fixed. -08-07-18 A bug in which a nameref caused a local variable to be created - rather than binding to an existing variable in the global scope - has been fixed. -08-07-17 A bug which occurred when a nameref was created from within a - function that was part of a pipeline has been fixed. -08-07-14 +The compile option SHOPT_STATS was added. With this option the - compound variable .sh.stats keeps usage statistics that could help - with performance tuning. -08-07-10 +The output of set now always uses a single line for each variable. - For array variables, the complete set of values is now displayed. -08-07-09 +The typeset -C option can be used with arrays to indicate that - each element should default to a compound variable. -08-07-08 +The %B format now outputs compound variables and arrays. The - alternate flag # can be used to cause output into a single line. -08-07-03 When the window change signal, WINCH, is received, the current - edit line is redrawn in place. -08-07-01 A bug in the handling of shared variables when inside an embedded - type has been fixed. -08-06-29 A bug in multiline edit mode which occurred when the prompt length - was three characters or less has been fixed. -08-06-23 A bug in which the SIGCLD was not be triggered when background - jobs completed has been fixed. -08-06-23 _KSH_VERSION added as a name reference to .sh.version. -08-06-20 type now outputs 'special builtin' for special builtins. -08-06-19 A couple of bugs in multidimensional arrays have been fixed. -08-06-19 A bug in which a syntax error in a dot script could generate - a syntax error in the next subsequent command has been fixed. -08-06-17 Reduced the maximum function call depth to 2048 to avoid exceptions - on some architectures. -08-06-16 A bug in which printf "%B" could generate an exception when the - specified variable was not set has been fixed. -08-06-16 +When typeset -p is followed by variable names, it now displays - the attributes names and values for the specific names. -08-06-14 A bug that could affect the drawing of the screen from multiline - emacs or gmacs mode when walking up the history file has been fixed. -08-06-13 A bug in which a compound variable defined in a subshell could - have side effects into the parent shell has been fixed. -08-06-13 A number of bugs related to using .sh.level to set the stack from - for DEBUG traps have been fixed. -08-06-13 +The .sh.lineno variable has been added. When .sh.level is changed - inside a DEBUG trap, the .sh.lineno contains the calling line number - for the specified stack frame. -08-06-13 The .sh.level variable has been documented and now works. -08-06-11 +The -C option has been added to read for reading compound command - definitions from a file. -08-06-11 +The . command is now permitted inside a compound command definition. - The dot script can contain declaration commands and dot commands. -08-06-09 +Add -C option to typeset so that typeset -C foo, is equivalent - to foo=(). -08-06-09 Added -n warning message for typeset option orderings that are valid - with ksh88 but not valid with ksh93, for example Lx5. -08-06-09 A bug in which the return value for an assignment command containing - a command substitution with that failed was zero when the assignment - contained redirections has been fixed. -08-06-09 A bug in the quoting of $ inside a ERE pattern ~(E)(pattern) - has been fixed. -08-06-06 A bug when processing `` command substitution with the character - sequence \$' has been fixed. -08-06-02 +When defining a type, the typeset -r attribute causes this field - to be required to be specified for each instance of the type and - does not allow a default value. -08-06-02 Several bugs in which compound variables were modified by - subshells have been fixed. -08-05-22 +The ceil function has been added to the math functions. -08-05-21 A bug in which a name reference defined in a function and passed - as an argument to another function could cause an incorrect binding. -08-05-21 A bug in freeing compound variables that are local to functions - has been fixed. -08-05-19 +The array expansions ${array[sub1..sub2]} and ${!array[sub1..sub2]} - to expand to the value (or subscripts) for array between sub1 and - sub2 inclusive. For associative arrays, the range is based on - location in the POSIX locale. The .. must be explicit and cannot - result from an expansion. -08-05-15 The trap on SIGCLD is no longer triggered by the completion of - the foreground job as with ksh88. -08-05-14 A bug in the implementation of the editing feature added on - 07-09-19 in emacs mode has been fixed. -08-05-12 A bug in processing the test built-in with parenthesis has been - fixed. -08-05-12 The unset built-in now returns non-zero when deleting an array - subscript that is not set. -08-05-08 +Changing the value of HISTFILE or HISTSIZE will cause the old - history file to be close and reopened with the new name or size. -08-05-08 When FPATH is changed functions that were found via a path search - will be searched for again. -08-05-08 A parser bug in which reserved words and labels were recognized - inside compound indexed array assignment after a new-line has - been fixed. -08-05-07 A bug in getopts when handling numerical option arguments has - been fixed. -08-05-07 +The typeset -S option was added for variables outside type - definitions to provide a storage class similar to C static - inside a function defined with function name. When outside - type definitions and outside a function, the -S option cause - the specified variable so be unset before the assignment and - before the remaining attributes are supplied. -08-05-07 A bug that affected the cursor movement in multiline mode when - a character was deleted from near the beginning of the any - line other than the first. -08-05-01 In multiline edit mode, the refresh operation will now clear - the remaining portion of the last line. -08-05-01 A bug in computing prompt widths for the edit modes for prompts - with multibyte characters has been fixed. -08-05-01 A bug in the multiline edit mode which could cause the current - line to be displayed incorrectly when moving backwards from third - or higher line to the previous line has been fixed. -08-05-01 A bug in which options set in functions declared with the function - name syntax were carried across into functions invoked by these - functions has been fixed. -08-04-30 A bug which could cause a coprocess to hang when the read end - is a builtin command has been fixed. -08-04-30 +The emacs and vi editors have been modified to handle window - change commands as soon as they happen rather than waiting for - the next command. -08-04-28 A bug in which ${!x} did not expand to x when x was unset has been - fixed. -08-04-27 A bug in which the assignment x=(typeset -a foo=([0]=abc)) created - x.foo as an associative array has been fixed. -08-04-25 A bug in which $# did not report correctly when there were more - than 32K positional parameters has been fixed. -08-04-04 Choose the name _ as the sub-variable that holds type or instance - specific data used by discipline functions. -08-03-27 A bug in which the terminal group was not given back to the parent - shell when the last part of a pipeline was handled by the parent shell - and the other parts of the pipeline complete has been fixed. - The symptom was that the pipeline became uninterruptible. -08-03-25 A bug in restricted mode introduced in ksh93s that caused scripts - that did not use #! to executed in restricted mode has been fixed. -08-03-25 A bug in which the pipefail option did not work for a pipeline - within a pipeline has been fixed. -08-03-24 A bug in which OPTIND was not set correctly in subshells has - been fixed. -08-03-24 A bug which could cause a memory exception when a compound variable - containing an indexed array with only element 0 defined was expanded. -08-03-20 A bug in which ${!var[sub].*} was treated as an error has been fixed. -08-03-20 Associative array assignments of the form ([name]=value ...) - now allow ; as well as space tab and new line to separate elements. -08-03-18 A buffering problem in which standard error was sometimes - not flushed before sleep has been fixed. -08-03-17 A bug in which a signal sent to $$ while in a subshell would be - sent to the subshell rather than the parent has been fixed. -08-03-17 + A --default option added to set(1) to handle set +o POSIX semantics. - set --state added as a long name alias for set +o. -08-03-14 A bug in which using monitor mode from within a script could - cause the terminal group to change has been fixed. -08-03-10 The new ${...} command substitution will treat the trailing } - as a reserved word even if it is not at the beginning of a command, - for example, ${ date }. -08-03-10 If the name of the ENV begins with /./ or ././ then the - /etc/ksh.kshrc file will not be executed on systems that support - this interactive initialization file. -08-03-07 A bug in which ksh -i did not run the ENV file has been fixed. -08-03-07 A bug in which ulimit did not always produce the same output as - ulimit -fS has been fixed. -08-03-04 A bug in multiline mode in emacs and vi mode which could cause the - cursor to be on the wrong line when interrupt was hit has been fixed. -08-03-03 The change made in ksh93s+ on 07-06-18 in which braces became - optional for ${a[i]} inside [[ ... ]] was restored in the case - where the argument can be a pattern. -08-03-03 A bug in which creating a name reference to an associative array - instance would fail when the subscript contained characters [ or - ] has been fixed. -08-02-29 +The redirection operator >; has been added which for non-special - files, generates the output in a temporary file and writes the - specified file only of the command has completed successfully. -08-02-15 A bug in ${var/pattern/string} for patterns of the form ?(*) and +(*) - has been fixed. -08-02-07 A bug in which test \( ! -e \) produced an error has been fixed. -08-02-14 +The typeset -a option can now optionally be followed by the name - of an enumeration type which allows subscripts to be enumerations. -08-02-14 +The enum builtin which creates enumeration types has been added. -08-02-12 The backoff logic when there are no more processes has been fixed. -08-02-07 The -X option has been added to typeset. The -X option creates - a double precision number that gets displayed using the C99 %a - format. It can be used along with -l for long double. -08-01-31 The -T option to typeset has been added for creating typed - variables. Also the -h and -S options have been added to - typeset that are only applicable when defining a type. -08-01-31 The prefix expansion operator @ has been added. ${@name} - expands to the type of name or yields the attributes. -07-11-15 A bug in the macro expander for multibyte characters in which - part of the character contains a file pattern byte has been fixed. -07-10-03 A bug in which : was not allowed as part of an alias name has been - fixed. -07-09-26 A bug in which appending a compound variable to a compound variable - or to an indexed array didn't work has been fixed. -07-09-19 In both emacs and vi edit mode, the escape sequence \E[A (usually - cursor up, when the cursor is at the end of the line will fetch - the most recent line starting with the current line. -07-09-18 The value of ${!var} was correct when var was a reference to an - array instance. -07-09-18 The value of ${!var[sub]} was not expanding to var[sub] and this - was fixed. It also fixed ${name} where name is a name reference - to var[sub]. -07-09-18 +It is now legal to create a name reference without an initialization. - It will be bound to a variable on the first assignment. -07-08-30 +A discipline function can be invoked as ${x.foo} and is equivalent - to ${ x.foo;} and can be invoked as x.foo inside ((...)). -07-07-09 A bug in which typeset -a did not list indexed arrays has been - fixed. -07-07-03 +The command substitution ${ command;} has been added. It behaves - like $(command) except that command is executed in the current - shell environment. The ${ must be followed by a blank or an - operator. - -08-04-17 --- Release ksh93s+ --- -08-04-17 A bug in which umask was not being restored correctly after a - subshell has been fixed. -08-04-15 A bug in which sending a STOP signal to a job control shell started - from within a shell function caused cause the invoking shell to - terminate has been fixed. -08-04-11 A bug which caused $(exec > /dev/null) to go into an infinite loop - has been fixed. -08-03-27 A bug in which typeset -LZ was being treated as -RZ has been fixed. -08-03-06 A bug with ksh -P on systems that support the profile shell, - in which it would exit after running a non-builtin has been fixed. -08-01-31 A bug in which command substitution inside ((...)) could cause - syntax errors or lead to core dumps has been fixed. -08-01-17 A bug in which discipline functions could be deleted when invoked - from a subshell has been fixed. -08-01-17 A bug in which a command substitution consisting only of - assignments was treated as a noop has been fixed. -08-01-17 A bug in which discipline functions invoked from within a - compound assignment could fail has been fixed. -08-01-16 Incomplete arithmetic assignments, for example ((x += )), now - generate an error message. -08-01-16 A bug in which a set discipline defined for a variable before - an array assignment could cause a core dump has been fixed. -08-01-03 A bug in on some systems in which exit status 0 is incorrectly - returned by a process that catches the SIGCONT signal is stopped - and then continued. -07-12-13 A race condition in which a program that has been stopped and then - continued could lose its exit status has been fixed. -07-12-12 Code to check for file system out of space write errors for all - writes has been added. -07-12-11 A bug in the macro expander for multibyte characters in which - part of the character contains a file pattern byte has been fixed. -07-12-06 A bug in the emacs edit mode when multiline was set that output - a backspace before the newline to the screen has been fixed. -07-12-04 A bug in which using TAB after a variable name listing expansion - in the edit modes would cause the $ to disappear has been fixed. -07-11-28 A bug in which setting IFS to readonly could cause a subsequent - command substitution to fail has been fixed. -07-11-27 A work around for a gcc 4.* C99 "feature" that could cause a job - control shell to go into an infinite loop by adding the volatile - attribute to some auto vars in functions that call setjmp(). -07-11-27 A bug in which the shell could read ahead on a pipe causing the - standard input to be incorrectly positioned has been fixed. -07-11-27 A bug in which compound variable UTF-8 multibyte values were not - expanded or traced properly has been fixed. -07-11-21 A bug where an unbalanced '[' in a command argument was not treated - properly has been fixed. -07-11-15 A bug in which compatibility mode (no long option names) getopts(1) - incorrectly set the value of OPTARG for flag options has been fixed. -07-11-15 A bug in which "hash -- name" treated "--" as an invalid name operand - has been fixed. -07-11-15 typeset now handles "-t -- [-r] [--]" for s5r4 hash(1) compatibility. -07-11-15 A bug in which the umask builtin mishandled symbolic mode operands - has been fixed. -07-11-15 Bugs in which shell arithmetic and the printf builtin mishandled the - signs of { -NaN -Inf -0.0 } have been fixed. -07-11-15 +The full { SIGRTMIN SIGRTMIN+1 ... SIGRTMAX-1 SIGRTMAX } range - of signals, determined at runtime, are now supported. -07-11-15 A bug in which creating an indexed array with only subscript 0 created - only a simple variable has been fixed. -07-11-14 A bug in which appending to an indexed array using the form - name+=([sub]=value) could cause the array to become an associative - array has been fixed. -07-11-14 A bug in which typeset without arguments could coredump if a - variable is declared as an indexed array and has no elements has - been fixed. -07-11-14 A bug in which creating a local SECONDS variable with typeset in - a function could corrupt memory has been fixed. -07-11-14 A bug which could cause a core dump when a script invoked by name - from a function used compound variables has been fixed. -07-11-05 A bug in which printf %d "'AB" did not diagnose unconverted characters - has been fixed. -07-11-05 printf %g "'A" support added for all floating point formats. -07-11-01 A bug in which typeset -f fun did not display the function definition - when invoked in a subshell has been fixed. -07-10-29 The sleep builtin was fixed so that all floating point constants - are valid operands. -07-10-10 A bug in which the locale was not being restored after - LANG=value command has been fixed. -07-09-20 A bug in which a nameref to a compound variable that was local - to the calling function would not expand correctly when displaying - is value has been fixed. -07-09-19 A bug which could cause a core dump if .sh.edchar returned - 80 characters or more from a keyboard trap has been fixed. -07-09-14 A bug in which could cause a core dump when more than 8 file - descriptors were in use has been fixed. -07-09-10 A bug in which creating a name reference to an instance of - an array when the array name is itself a reference has been fixed. -07-09-10 The file completion code has been modified so that after an = in - any word, each : will be considered a path delimiter. -07-09-06 A bug in which subprocess cleanup could corrupt the malloc() heap - has been fixed. -07-08-26 A bug in which a name reference to an associative array instance - could cause the subscript to be evaluated as an arithmetic expression - has been fixed. -07-08-22 A bug in which the value of an array instance was of a compound - variable was not expanded correctly has been fixed. -07-08-14 A bug which could cause a core dump when a compound assignment was - made to a compound variable element with a typeset -a attribute - has been fixed. -07-08-08 A bug in which a trap ignored in a subshell caused it to be - ignored by the parent has been fixed. -07-08-07 A bug in which the set command would generate erroneous output - for a variable with the -RZ attribute if the variable name had been - passed to a function has been fixed. -07-08-02 A bug in which read x[1] could core dump has been fixed. -07-08-02 A second bug in which after read x[sub] into an associative array - of an element that hasn't been assigned could lead to a core dump - has been fixed. -07-07-31 A bug in which a pipeline that completed correctly could have - an exit status of 127 when pipefail was enabled has been fixed. -07-07-09 +The SHOPT_AUDIT compile option has been added for keyboard logging. -07-06-25 In vi insert mode, ksh no longer emits a backspace character - before the carriage return when the newline is entered. -07-06-25 A bug in which pipefail would cause a command to return 0 - when the pipeline was the last command and the failure happened - on a component other than the last has been fixed. -07-06-25 A bug in the expansion of ${var/pattern/rep} when pattern or rep - contained a left parenthesis in single quotes has been fixed. -07-06-18 The braces for a subscripted variable with ${var[sub]} are now - optional when inside [[ ... ]], ((...)) or as a subscript. -07-05-28 A bug in brace expansion in which single and double quotes did - not treat the comma as a literal character has been fixed. -07-05-24 The -p option of whence now disables -v. -07-05-23 Several bug fixes in compound variables and arrays of arrays - have been made. -07-05-15 A bug in which the %B format of printf was affected by the - locale has been fixed. -07-05-14 A bug in which \ was not removed in the replacement pattern with - ${var/pattern/rep} when it was not followed by \ or a digit has - been fixed. -07-05-10 A bug in which ksh -R file core dumped if no script was specified - has been fixed. it not displays an error message. -07-05-07 Added additional Solaris signals to signal table. -07-04-30 A bug in which a pipeline with command substitution inside a - function could cause a pipeline that invokes this function to - hang when the pipefail option is on has been fixed. -07-04-30 +Added -q to whence. -07-04-18 A small memory leak with each redirection of a non-builtin has - been fixed. -07-03-08 A bug in which set +o output command line options has been fixed. -07-03-08 A bug in which an error in read (for example, an invalid variable - name), could leave the terminal in raw mode has been fixed. -07-03-06 A bug in which read could core dump when specified with an array - variable with a subscript that is an arithmetic expression has - been fixed. -07-03-06 Several serious bugs with the restricted shell were reported and - fixed. -07-03-02 If a job is stopped, and subsequently restarted with a CONT - signal and exits normally, ksh93 was incorrectly exiting with - the exit status of the stop signal number. -07-02-26 +M-^L added to emacs mode to clear the screen. -07-02-26 A bug in which setting a variable readonly in a subshell would - cause an unset error when the subshell completed has been fixed. -07-02-19 +The format with printf uses the new = flag to center the output. -07-02-19 A bug in which ksh93 did not allow multibyte characters in - identifier names has been fixed. -07-02-19 A bug introduced in ksh93 that causes global compound variable - definitions inside functions to exit with "no parent" has been fixed. -07-02-19 A bug in which using compound commands in process redirection - arguments would give syntax errors <(...) and >(...) has been fixed. -07-01-29 A bug which caused the shell to core dump which can occur when a - built-in exits without closing files that it opens has been fixed. -07-01-26 A bug in which ~(E) in patterns containing \ that are not inside () - has been fixed. - -06-12-29 --- Release ksh93s --- -06-12-29 A bug in which the value of IFS could be changed after a command - substitution has been fixed. -06-12-22 +/dev/(tcp|udp|sctp)/HOST/SEVRICE now handles IPv6 addresses on - systems that provide getaddrinfo(3). -06-12-19 +A -v option was added to read. With this option the value of - the first variable name argument will become the default value - when read from a terminal device. -06-11-20 A bug in which "${foo[@]:1}}" expands a null argument (instead of - no argument), when foo[0] is not empty has been fixed. -06-11-16 The discipline functions have been modified to allow each subscript - to act independently. Currently, the discipline function will not - be called when called from a discipline function of the same variable. -06-11-14 A bug which could cause a core dump if a file descriptor for - an internal file was closed from with a subshell has been fixed. -06-10-30 +The redirections <# pattern, and <## pattern have been added. - Both seek forward to the beginning of the next line that contains - the pattern. The <## form copies the skipped portion to standard - output. -06-10-26 +On systems that support stream control transport, the virtual file - name /dev/sctp/host/port can now be used to establish connections. -06-10-26 +The printf modifier # when used with d produces units in thousands - with a single letter suffix added. The modifier # when used with - the i specification provides units of 1024 with a two letter suffix. -06-10-24 The value of $! is now set to the process id of a job put - into the background with the bg command as required by POSIX. -06-10-23 A bug in which the value of $! was affected by a background - job started from a subshell has been fixed. -06-10-23 A bug in ${var:offset:len} in multibyte locales has been fixed. -06-10-15 +The remaining math functions from C99 were added for any system - that supports them. -06-10-13 The klockwork.com software detected a few coding errors that - have been fixed. -06-10-12 A bug when skipping over `...` with ${x:=`...`} when x is set - has been fixed. -06-10-11 A bug in process floating constants produced by the %a format - of printf has been fixed. -06-10-06 A bug in which IFS was not being restored correctly in some - cases after a subshell has been fixed. -06-10-06 A bug in which pipefail was not detecting some failures in - pipelines with 3 or more states has been fixed. -06-10-03 A bug in the processing of >(...) with builtins which could - cause the builtin to hang has been fixed. -06-10-03 A bug in the for loop optimizer which causes >(...) process - substitution to be ignored has been fixed. -06-09-17 +The -a option was added to typeset for indexed arrays. This - is only needed when using the ([subscript]=value ...) form. -06-09-06 +The showme option was added. Each simple command not beginning - with a redirection and not occurring with in the while, until, if, - select condition can be preceded by a semi-colon which will - be ignored when showme is off. When showme is on, any command - preceded by a colon will be traced but not executed. -06-08-16 +As a new feature, a leading ~(N) on a pattern has no effect - except when used for file expansion. In this case if not - matches are found, the pattern is replaced by nothing rather - than itself. -06-08-11 A bug in the expansion of ${.sh.match[i]:${#.shmatch[i]}} has - been fixed. -06-08-10 +The read builtin options -n and -N have been modified to treat - the size as characters rather than bytes unless storing into a - binary (typeset -B) variable. -06-07-27 +When the here document operator << is followed directly by a # - rather than a -, the first line of the here-document determines - how much whitespace is removed for each line. -06-07-26 A bug in the C-shell history (enabled with set -H) in which the - history event !$ was not processed has been fixed. -06-07-21 A bug on some systems in which assigning PATH on a command line - would not take effect has been fixed. -06-07-20 Add ksh93 and rksh93 as allowable names for ksh binaries. -06-07-20 Removed the SHOPT_OO compilation option which was only partially - implemented. -06-07-20 The ability to use egrep, grep, and fgrep expressions within - shell patterns has been documented. -06-07-17 A bug with arithmetic command expressions for locales in which - the comma is a thousands separator has been fixed. -06-07-13 +The default HISTSIZE was increased from 128 to 512. -06-07-13 A multibyte problem with locales that use shift codes has been fixed. -06-06-23 A number of bug fixes for command, file, and variable completion - have been mode. -06-06-20 +Floating point division by zero now yields the constant Inf or -Inf - and floating functions with invalid arguments yield NaN. -06-06-20 +The floating point constants Inf and NaN can be used in arithmetic - expressions. -06-06-20 +The functions isinf(), isnan(), tanhl() have been added for - arithmetic expressions. -06-06-13 Internal change to use ordering for variables instead of hashing - to speed up prefix matching. -06-06-13 A window between fork/exec in which a signal could get lost - and cause a program to hang has been eliminated -06-06-13 A bug in edit completion with quoted strings has been fixed. -06-06-07 The restricted options can now be enabled by set as well as on - the command line. Once set, it can not be disabled. -06-06-04 Modified built-in binding so that for systems for which /bin - and /usr/bin are the same, a builtin bound to /bin will get - selected when either /bin or /usr/bin is scanned. -06-06-04 +Added literal-next character processing for emacs/gmacs mode. - This change is not compatible with earlier versions of ksh93 - and ksh88 when the stty lnext is control-v. The sequence - escape-control-v will display the shell version. -06-05-31 +Modified emacs and vi mode so that entering a TAB after a partial - TAB completion, generates a listing of possible completions. - After the second TAB, a number followed by a TAB will perform - the completion with the corresponding item. -06-05-19 +Modified arithmetic so that conversions to strings default to - the maximum number of precision digits. -06-05-16 Bug fixes for multibyte locales. -06-05-10 The =~ operator was added to [[ ... ]] and [[ string ~= ERE ]] - is equivalent to [[ string == ~(E)ERE ]]. -06-04-25 A bug in the vi edit mode which could cause the shell to core dump - when switching from emacs mode. -06-04-17 A bug in which using LANG or LC_ in assignment lists with builtins - did not restore the locale correctly has been fixed. -06-04-04 A bug in which discipline functions could not be added to variables - whose names started with .sh has been fixed. -06-03-28 +The -s option to typeset was added to modify -i to indicate short - integers. -06-03-28 A bug in which variables assignment lists before functions - defined with function name were not passed on the functions - invoked by this function has been fixed. -06-03-28 A bug in which name references defined within a function defined - with function name could not be used with compound variables has - been fixed. -06-03-27 A bug in which read <&p (print >&p) would cause the coprocess input - (output) pipe to close before reading from (after writing to) - it has been fixed. -06-02-28 A bug in which stopping a job created with the hist builtin command - would create a job that could not be restarted has been fixed. - -06-01-24 --- Release ksh93r --- -06-01-24 A bug in which running commands with standard output closed would - not work as expected has been fixed. -06-01-23 A bug in which print -u could fail when file descriptor was - open for writing has been fixed. -06-01-19 The ?: arithmetic operator fixed to work when the operation after - the colon was an assignment. -05-12-24 A bug which could lead to a core dump when elements of a compound - variable were array elements, i.e. foo=(bar=(1 2)), has been fixed. -05-12-13 An arithmetic bug in which x+=y+=z was not working has been fixed. -05-12-13 An arithmetic bug in which x||y was returning x when x was non-zero - rather than 1 has been fixed. -05-12-07 +The aliases for integer and float have been changed to use attributes - -li and -lE to handle long long and long double types. -05-12-07 +The histexpand (-H) option has been added which allows C-shell - style history expansions using the history character !. -05-12-07 +The multiline option was added which changes that way the edit - modes handle lines longer than the window width. Instead of - horizontal scrolling, multiple lines on the screen are used. -05-12-05 The whence builtin now returns an absolute pathname when the - command is found in the current directory. -05-11-29 A bug which caused ksh -c '[[ ! ((' to core dump rather than - report a syntax error has been fixed. -05-11-29 A bug when reading fixed length records into typeset -b variables - which caused a zero byte to terminate the value has been fixed. -05-11-22 +The ability to seek to an offset within a file has been added - with the new I/O redirection operators, <# and >#. Currently, - these redirection operators must be followed by ((expr)) - but in a future release, it should be able to used to seek forward - to the specified shell pattern. In addition $(n<#) expands to the - current byte offset for file descriptor n. -05-11-22 +The .sh.match array variable is now set after each [[ ... ]] - pattern match. Previously it was only set for substring matches. -05-10-17 A bug in which the library path variable could be prefixed - with a directory when a .path file was not encountered in - the directory of the executable has been fixed. -05-09-15 A for/while loop optimizer bug in which $OPTIND was not - correctly expanded has been fixed. -05-09-05 A bug in which a history command that invoked a history - command could go into an infinite loop has been fixed. -05-08-31 +In the case that IFS contains to adjacent new-lines so that - new-line is not treated as a space delimiter, only a single - new-line is deleted at the end of a command substitution. -05-08-19 +When a tilde expansion expands to the / directory and is - followed by a /, it is replaced by the empty string. -05-08-16 A bug in which n<&m did not synchronize m has been fixed. -05-08-16 A bug in which process substitution ( <() and >() ) was not - working within for and while loops has been fixed. -05-07-24 A bug in which the pattern ~(E)(foo|bar) was treated as a syntax - error has been fixed. -05-07-24 A bug in completion with =, where n was the one of the - previous selection choices has been fixed. -05-07-21 A bug with multibyte input when no edit mode was specified which - caused the input line to shift left/right has been fixed. -05-06-24 A race condition which could cause the exit status to get lost - on some fast systems has been fixed. -05-06-21 A bug in which nested patterns of the form {m,n}(pat) would cause - syntax errors has been fixed. -05-06-21 A bug in the macro expander has been fixed which could cause a - syntax error for an expansion of the form ${x-$(...)} when - x is set and the command substitution contained certain strings. -05-06-08 +On systems for which echo does not do System V style \ expansions, - the -e option was added to enable these expansion. -05-06-08 A bug in which ${var op pattern} to not work when inside an - arithmetic expression has been fixed. -05-05-23 +An extension to shell patterns that allows matching of nested - groups while skipping over quoted strings has been added. -05-05-18 A bug in which the line number for errors was not correct for - functions loaded from FPATH has been fixed. -05-04-18 A bug in which the exit status $? is not set when a trap triggered - by the [[ ... ]] command is executed has been fixed. -05-04-08 +Redirection operators can be directly preceded with {varname} - with no intervening space, where varname is a variable name which - allows the shell to select a file descriptor > 10 and store it - into varname. -05-04-08 +SHOPT_CMDLIB_BLTIN=1 now includes generated table. -05-04-07 +[[ -o ?option ]] is true if "option" is a supported option. -05-04-05 A bug in handling file completion with spaces in the names - has been fixed. -05-03-25 +The SIGWINCH signal is caught by default to keeps the LINES and - COLUMNS variables in sync with the actual window size. -05-03-25 +Building ksh with SHOPT_REMOTE=1 causes ksh to set --rc if stdin is - a socket (presumably part of a remote shell invocation.) -05-03-25 +Building ksh with SHOPT_SYSRC=1 causes interactive ksh to source - /etc/ksh.kshrc (if it exists) before sourcing the $ENV file. -05-03-25 +{first..last[..incr][%fmt]} sequences added to brace expansions - when braceexpand is enabled. -05-03-03 A bug where a SIGCHLD interrupt could cause a fifo open to fail has - been fixed. -05-02-25 A bug in which a builtin command run in the background could - keep a file descriptor open which could cause a foreground - process to hang has been fixed. -05-02-24 A bug where builtin library commands (e.g., date and TZ) failed to - detect environment variable changes has been fixed. -05-02-22 +The read builtin and word splitting are now consistent with respect - to IFS -- both treat IFS as field delimiters. -05-02-22 +The read builtin no longer strips off trailing delimiters that - are not space characters when there are fewer variables than fields. -05-02-17 A builtin bug on systems where dlsym(libcmd) returns link-time - bindings has been fixed. -05-02-12 A bug in which the lib_init() function for .paths BUILTIN_LIB - libraries was not called has been fixed. -05-02-06 A bug on some systems in which moving the write end of a co-process - to a numbered file descriptor could cause it to close has been fixed. -05-02-06 A bug in the vi-edit mode in which the character under the cursor - was not deleted in some cases with the d% directive has been fixed. -05-02-06 A bug where external builtin stdout/stderr redirection corrupted - stdout has been fixed. -05-02-04 A bug where times formatting assumed CLK_TCK==60 has been fixed. - -05-01-11 --- Release ksh93q --- -05-01-11 A bug in the integral divide by zero check has been fixed. -05-01-11 +The -l option has been added to read /etc/profile and - $HOME/.profile, if they exist, before the first command. -05-01-11 An argument parsing bug that caused `kill -s x -- n' to fail has - been fixed. -05-01-11 +The .paths file, introduced in ksh93m, which can appear in - any directory in PATH, now allows a line of the form 'BUILTIN_LIB=.' - When a command is searched for this directory, and the full path - matches the path of the built-in version of the command (listed - by the 'builtin' command) then the built-in version of the command - is used. When ksh is built with SHOPT_CMDLIB_DIR=1 then all libcmd - functions become builtins with the '/opt/ast/bin/' directory prefix. -05-01-10 A bug in which a nameref to a compound name caused a core dump has - been fixed. -05-01-09 A bug in which some SIGCHLD interrupts (from child processes exiting) - caused a fatal print/echo error diagnostic has been fixed. -04-12-24 A bug in which some SIGCHLD interrupts (from child processes exiting) - corrupted the internal process/job list, sometimes causing the shell - to hang, has been fixed. -04-12-01 A bug in which typeset -Fn truncated less than n digits for large - numbers has been fixed. -04-11-25 A bug in which standard error could be closed after a redirection - to /dev/stderr has been fixed. -04-11-17 A bug in which an expansion of the form ${array[@]:3} could expand - to ${array[0]} when ${array[3]} was not set has been fixed. -04-10-22 +The -E or -orc command line option reads ${ENV-$HOME/.kshrc} file. -04-10-22 +`-o foo' equivalent to `+o nofoo', `-o nobar' equivalent to `+o bar'. - `--foo' equivalent to `-o foo', `--nofoo' equivalent to `+o foo' -04-10-05 +The .paths file, introduced in ksh93m, which can appear in - any directory in PATH, now allows a line of the form - 'BUILTIN_LIB=libname'. When a command is searched for this directory, - the shared library named by libname will first be searched for a - built-in version of the command. -04-09-03 <<< here documents now handle quotes in the word token correctly. -04-08-08 +The maximum size for read -n and read -N was increased from - 4095 to 32M. -04-08-04 +printf %q was modified so that if an no operand was supplied, no - no output would be generated rather than a quoted empty string. -04-08-01 +The -n and -N options of the read builtin has been modified - when reading variables with the binary attribute so that the - data is stored directly rather than through assignment. -04-08-01 +The shcomp command has been modified to process alias commands - under some conditions. -04-07-31 +The .sh.match variable added in ksh93l, now works like other - indexed arrays. -04-07-08 A loop optimizer bug which occurs when typeset is used in - a for or while loop inside a function has been fixed. -04-06-24 +The number of subexpressions in a pattern was increased to 64 - from the current number of 20. -04-06-17 +The -t option to read was modified to allow seconds to be - specified as any arithmetic expression rather than just - an integral number of seconds, for example even -t 'sin(.5)' - is now valid. -04-06-16 Two small memory leak problems were fixed. -04-06-15 A bug in ${var/pattern/"string"} which occurred when string - contained pattern matching characters has been fixed. -04-05-08 printf $'%d\n' produced an erroneous error message and has - been fixed. -04-05-24 A bug in which an associative array without any elements could - cause a core dump when a script with an associative array with - the same name was declared in a script invoked by name has - been fixed. -04-05-11 A bug in which an exec statement could close the script that - is being processed in a script that is run by name causing - a failure has been fixed. -04-04-28 +If the first character of assignment to an integer variable was 0, - the variable had been treated as unsigned. This behavior was - undocumented and has been removed. -04-04-05 A bug in which the positioning of standard input could be incorrect - after reading from standard input from a subshell has been fixed. -04-03-30 A bug in the for loop optimizer which in rare cases could cause - memory corruption has been fixed. -04-03-29 +The preset alias source='command .' has been added. -04-03-29 A bug introduced in ksh93p on some systems in which invoked by - name with #! on the first line would not get the signals handling - initialized correctly has been fixed. -04-03-29 A bug introduced in ksh93p in which a HUP signal received by - a shell that is a session group leader was not passed down to - its children has been fixed. - -04-02-28 --- Release ksh93p --- -04-02-28 +The ability to apply an append discipline to any variable has - been added. -04-02-14 A bug in which the exportall option (set -a) would cause incorrect - results for arrays has been fixed. -04-02-02 A bug in which an exported array would pass more than - the first element to a script invoked by name has been fixed. -04-02-02 A bug on some systems in which name=value pairs preceding a script - invoked by name was not getting passed to the script has been fixed. -04-01-20 A bug in which an unset discipline function could cause a core - dump on some systems has been fixed. -04-01-12 A bug in which a continue or break called outside a loop from - inside a function defined with name() syntax could affect - the invoking function has been fixed. -04-01-08 If a command name begins with ~, only filename completion will be - attempted rather than pathname completion using the builtin editors. -04-01-08 A bug in the vi edit mode in which the wrong repeat count on - multiple word replacements with the . directive has been fixed. -04-01-06 Backspace characters are now handled correctly in prompt strings. -04-01-06 +The getopts builtin has been modified to accept numerical - arguments of size long long on systems that support this. -04-01-06 A bug in which unsetting all elements of an associative array - would cause it to be treated as an indexed array has been fixed. -03-12-15 A bug in which a quoted string ending with an unescaped $ would - delete the ending $ in certain cases has been fixed. -03-12-05 A bug in which the shell could hang when set -x tracing a command - when an invalid multibyte character is encountered has been fixed. -03-12-05 On some systems, if the KEYBD trap is set, then commands that use - the meta key were not processed until return was hit. This - has been fixed. -03-12-05 A problem which occurred when the login shell was not a group - leader that could cause it to fail has been fixed. -03-12-05 A problem in which a shell could core dump after receiving a signal - that should cause it to terminate while it was in the process - of acquiring more space has been fixed. -03-12-05 +If ENV is not specified, the shell will default to $HOME/.kshrc - for interactive shells. -03-11-21 A bug introduced in ksh93o in which the DEBUG trap could get - disabled after it triggered has been fixed. -03-11-04 A bug in which using arithmetic prefix operators ++ or -- on a - non-lvalue could cause a core dump has been fixed. -03-11-04 A bug in which leading zeros were stripped from variable - expansions within arithmetic computation to avoid being treated - as octal constants when they should not have, has been fixed. -03-10-08 A bug introduced in ksh93o in which a large here document inside - a function definition could get corrupted has been fixed. -03-09-22 A bug in which the .get discipline function was not being - called when a string variable was implicitly referenced from - within a numerical expression has been fixed. -03-09-22 A bug in which a script without a leading #! could get executed - by /bin/sh rather than the current shell on some systems has - been fixed. -03-09-12 +To improve conformance with ksh88, leading zeros will be ignored - when getting the numerical value of a string variable so that - they will not be treated as octal constants. -03-09-03 +The builtin kill command now processes obsolete invocations - such as kill -1 -pid. -03-09-02 The restriction on modifying FPATH in a restricted shell (sh -r) - has been documented. -03-09-02 +The restricted shell (sh -r) has been modified to disallow - executing command -p. -03-08-07 A bug in which the KEYBD trap was not being invoked when - characters with the 8th bit set has been fixed. -03-08-02 A parser bug introduced in ksh93o which caused the character - after () in a POSIX function definition to be skipped - when reading from standard input has been fixed. -03-08-01 A bug in which "${foo#pattern}(x)" treated (x) as if it were - part of the pattern has been fixed. -03-08-01 +The command -x option has been modified so that any trailing - arguments that do expand to a single word will be included - on each invocation, so that commands like command -x mv * dir - work as expected. - -03-07-20 --- Release ksh93o+ --- -03-07-20 A bug in which could cause memory corruption when a POSIX - function invoked another one has been fixed. -03-07-15 A bug in which a file descriptor>2 could be closed before - executing a script has been fixed. -03-07-15 A parsing error for <() and >() process substitutions inside - command substitution has been fixed. -03-07-15 A parsing error for patterns of the form {...}(...) when - used inside ${...} has been fixed. -03-07-15 An error in which expanding an indexed array inside a compound - variable could cause a core dump has been fixed. -03-07-15 A bug in which on rare occasions a job completion interrupt - could cause to core dump has been fixed. -03-06-26 A bug in which process substitution embedded within command - substitution would generate a syntax error has been fixed. -03-96-23 A bug in which ${@:offset:len} could core dump when there - were no arguments has been fixed. -03-96-23 A bug in which ${X[@]:offset:len} could core dump when X - was unset has been fixed. -03-06-22 +The -x option was added to the command builtin. If this - option is on, and the number of arguments would exceed ARG_MAX, - the command will be invoked multiple times with a subset of - the arguments. For example, with alias grep='command -x grep, - any number of arguments can be specified. -03-06-14 A bug in which could cause a core dump on some systems with - vi and emacs editors with the MULTIBYTE option has been fixed. -03-06-06 A bug in which the shell could core dump when a script was - run from its directory, and the script name a symlink to a file - beginning with .., has been fixed. -03-06-05 A bug in which the shell could core dump when a child process - that it is unaware of terminates while it is calling malloc() - has been fixed. -03-06-02 +An option named globstar (set -G) has been added. When enabled, - during pathname expansion, any component that consists only of ** is - matches all files and any number of directory levels. -03-05-30 A bug in which the PATH search could give incorrect results when - run from directory foo and PATH contained .:foo:xxx has been fixed. -03-05-29 +Some changes were made to the code that displays the prompt in edit - mode to better handle escape sequences in the prompt. -03-05-27 I added = to the list of characters that mark the beginning of - a word for edit completion so that filenames in assignments - can be completed. -03-05-20 A bug in which read -N could hang on some systems when reading - from a terminal or a pipe has been fixed. -03-05-19 A bug in which the output of uname from a command substitution - would go to the standard output of the invoking command when - uname was invoked with a non-standard option has been fixed. -03-05-19 A job control bug which would cause the shell to exit because - it hadn't taken back the terminal has been fixed. The bug - could occur when running a function that contained a pipeline - whose last element was a function. -03-05-19 A job control timing bug introduced in ksh93o on some systems - which could cause a pipeline to hang if the first component - completed quickly has been fixed. -03-05-13 +The read builtin has been modified so that the builtin editors - will not overwrite output from a previous incomplete line. -03-05-13 A bug in which the name of an identifier could have the string - .sh. prefixed to it after expanding a variable whose name begins - with .sh. has been fixed. -03-05-13 A bug in the expansion of $var for compound variables in which - some elements would not be output when the name was a prefix - of another name in the compound variable has been fixed. -03-05-08 The last item in the ksh93o release on 03-01-02 has been - altered slightly to preserve the leading 0's when the - preceding character is a digit. Thus, with typeset -LZ3 x=10, - $(( 1$x)) will be 1010 whereas $(( $x) will be 10. -03-04-25 A bug in which if x is a name reference, then nameref y=x.foo - did not follow x has been fixed. - -03-03-18 --- Release ksh93o --- -03-03-18 +A -N unary operator was added to test and [[ ... ]] which returns - true if the file exists and the file has been modified since it - was last read. -03-03-18 +The TIMEFORMAT variable was added to control the format for - the time compound command. The formatting description is - described in the man page. -03-03-06 +A -N n option was added to read which causes exactly n bytes - to be read unlike -n n which causes at most n bytes to be read. -03-03-03 +Three new shell variables were added. The variable .sh.file - stores the full pathname of the file that the current command - was found in. The variable .sh.fun names the current function - that is running. The variable .sh.subshell contains the depth - of the current subshell or command substitution. -03-03-03 +When the DEBUG trap is executed, the current command line after - expansions is placed in the variable .sh.command. The trap - is also now triggered before each iteration of a for, select, - and case command and before each assignment and redirection. -03-02-28 +Function definitions are no longer stored in the history file so - that set -o nolog no longer has any meaning. -03-02-28 +All function definitions can be displayed with typeset -f not - just those stored in the history file. In addition, typeset +f - displays the function name followed by a comment containing the - line number and the path name for the file that defined this function. -03-02-28 A bug in which the value of $LINENO was not correct when executing - command contained inside multi-line command substitutions has been - fixed. -03-02-19 +Since some existing ksh88 scripts use the undocumented and - unintended ability to insert a : in front of the % and # parameter - expansion operators, ksh93 was modified to accept :% as equivalent - to % and :# as equivalent to # with ${name op word}. -03-02-14 A bug which could cause a core dump when reading from standard - error when standard error was a pty has been fixed. -03-02-14 +The shell arithmetic was modified to use long double on systems - that provide this data type. -03-02-09 A bug in which a function located in the first directory in FPATH - would not be found when the last component of PATH was . and the - current directory was one of the directories in PATH has been fixed. -03-02-07 +The trap and kill builtin commands now accept a leading SIG prefix - on the signal names as documented. -03-02-05 A bug in the expansion of ${var/$pattern}, when pattern contained - \[ has been fixed. -03-02-05 A bug in which .sh.match[n], n>0, was not being set for substring - matches with % and %% has been fixed. -03-01-15 A bug in which getopts did not work for numerical arguments specified - as n#var in the getopts string has been fixed. -03-01-09 A bug in which using ${.sh.match} multiple times could lead to - a memory exception has been fixed. -03-01-06 A bug in the expansion of ${var/pattern/$string} in the case that - $string contains \digit has been fixed. -03-01-02 +A -P option was added for systems such as Solaris 8 that support - profile shell. -03-01-02 For backward compatibility with ksh88, arithmetic expansion - with ((...)) and let has been modified so that if x is a zero-filled - variable, $x will not be treated as an octal constant. - -02-12-05 --- Release ksh93n+ --- -02-11-30 A bug that can show up in evaluating arithmetic statements that - are in an autoloaded function when the function is autoload from - another function has been fixed. -02-11-30 An optimization bug in which an expansion of the form ${!name.@}, - which occurred inside a for or a while loop, when name is a name - reference, has been fixed. -02-11-18 A bug in which modifying array variables in a subshell could leave - side effects in the parent shell environment has been fixed. -02-11-18 A memory leak when unsetting an associative array has been fixed. -02-11-14 +The code to display compound objects was rewritten to make - it easier for runtime extensions to reuse this code. -02-11-14 +A change was made to allow runtime builtins to be notified when - a signal is received so that cleanup can be performed. -02-10-31 +User applications can now trap the ALRM signal. Previously, - the ALRM signal was used internally and could not be used - by applications. -02-10-31 A bug in which signals received while reading from a coprocess - for which traps were set was not handled correctly has been fixed. -02-10-31 A bug in which a file opened with exec inside a subshell could - be closed before the subshell completed has been fixed. -02-10-21 A bug in which setting PATH or FPATH inside a function might not - take effect has been fixed. -02-10-21 A bug which could cause a core dump when a local SECONDS variable - is defined in a function has been fixed. -02-10-15 A bug in which the associative array name operator ${!array[@]} - could return the same name multiple times has been fixed. -02-10-15 A bug in which the zero'th element of an associative array was - not getting set when an assignment was made without a subscript - specified has been fixed. - -02-09-30 --- Release ksh93n --- -02-09-30 +The maximum indexed array size was increased to 16Megs. -02-09-30 A bug which could cause a core dump when changing attributes - of associative array has been fixed. -02-09-30 A bug in which exporting an array variable would not export the - 0-th element has been fixed. -02-09-30 A bug in which an array assignment of the form a=($a ...) would unset - 'a' before the right hand side was evaluated has been fixed. -02-09-27 A bug in which the error message for ${var?message} when var was - null or unset did not contain the variable name var has been fixed. -02-09-27 A bug in which closing file descriptors 0 through 2 could - cause a subsequent here document to fail has been fixed. -02-09-14 A bug in whence which occurs when the specified name contained - a / has been fixed. -02-09-14 A bug in the parser for strings of the form name$((expr))=value - has been fixed. -02-09-14 A for loop optimization bug in which the number of elements in - an array was treated as an invariant has been fixed. -02-09-09 A bug in which redirection or closing of a file descriptor between - 3 and 9 could cause a subsequent here document to fail has been - fixed. -02-09-09 A bug in which a background job was not removed from the job list - when a subshell completed has been fixed, for example (prog&). -02-09-03 A bug in which an assignment of the form name=(integer x=3) - could be interpreted as an array assignment rather than a - compound variable assignment has been fixed. -02-08-19 A command completion bug which occurred on file systems that - are case insensitive has been fixed. -02-08-19 A bug which could lead to an exception on some systems (for - example FREEBSD) which occurred when setting PATH has been fixed. -02-08-11 A bug in arithmetic rounding in which a value input as a decimal - string would output as a rounded version of the string has - been fixed. -02-08-11 A bug in which the last character could be deleted from shell - traces and from whence when called from a multibyte locale - has been fixed. -02-08-01 A bug which could cause a core dump to occur when a shell script - is executed while a coprocess is running that has closed the - output pipe has been fixed. -02-08-01 A bug in which command completion in multibyte mode could - corrupt memory for long command lines has been fixed. - -02-06-17 --- Release ksh93n- --- -02-06-17 A bug in which user defined macros could cause a core dump in - with MULTIBYTE mode has been fixed. -02-06-17 A bug in which printf format specifiers of the form %2$s were causing - a core dump has been fixed. -02-06-17 A bug in which setting stty to noecho mode did not prevent the - echoing of characters by ksh when emacs or viraw mode - was enabled has been fixed. -02-06-17 A bug in which background job completion could cause the sleep - builtin to terminate prematurely has been fixed. -02-06-17 A bug in which the shell could core dump if getopts was called - when the OPTIND variable contained a negative value has been fixed. -02-06-10 +The edit mode prompt has been modified to handle escape sequences. -02-06-10 A bug which occurred for interactive shells in which the builtin - cat command was used in command substitution on a file whose - size was larger than PIPE_BUF has been fixed. -02-06-10 A bug in which the trap on ERR was not being processed when - set inside a function has been fixed. -02-06-07 A bug in which function definitions could cause the history count - to be decremented by one (and even become negative) has been fixed. -02-06-05 A bug in read in which share mode could be enabled has been fixed. -02-05-28 A bug which could occur when the last command of a script was - a case statement and the action selected ended in ;& instead of ;; - has been fixed. -02-05-23 A bug with unary + introduced in ksh93k has been fixed. -02-05-07 A bug in substitutions of the form ${var/pattern/string} in which - a backslash was inserted in the replacement string when it contained - a special pattern character has been fixed. -02-05-01 A bug in the emacs edit mode which occurred in versions compiled - for multibyte character sets which occurred when a repeated search - was requested after a long line had been returned for the previous - search has been fixed. -02-04-02 +vi and emacs edit modes were modified so that tab completion is - disabled when invoked from the read built-in. - -02-03-26 --- Release ksh93m+ --- -02-03-26 A bug in which \ was not handled correctly when used in file - expansion has been fixed. -02-02-18 A bug in which lines beginning with a # were deleted from here - documents when the here-document delimiter was followed by - a comment has been fixed. -02-12-06 An optimization bug in which ${!x[@]) was treated as invariant in - a for loop has been fixed. -02-02-06 A bug in which the ERR trap is not cleared for a script invoked - by name from within a function has been fixed. -02-01-08 A bug in which a shell script executed from within a subshell - could cause this script to have an invalid pointer leading - to a memory fault has been fixed. -02-01-07 +Added here documents of the form <<< word (as per zsh) which - is equivalent to << delim\nword\ndelim. -02-01-07 A bug in which the first word of a compound assignment, - x=(word ...), was treated as a reserved word has been fixed. -02-01-07 A bug in the handling of \ when noglob was enabled and a - substitution of the form ${word op pattern} occurred in the - same word has been fixed. -02-01-07 +A compilation option, CMDLIB_BLTIN in the file OPTION, has - been added. When this options is set, all commands implemented - in libcmd become shell builtin commands by default. -02-01-07 A bug in which builtin foo, where foo is already a builtin - would result in the builtin foo getting removed has been fixed. -02-01-07 A bug which the shell executed a command found in the current - directory when PATH have no valid directories has been fixed. -01-11-28 The value of $? was not being set when called with exit. -01-11-28 If the last command was of the form (...) and a trap on EXIT or - ERR was set, and the command inside () modified the trap, then - the original trap wasn't executed. -01-11-26 +The value for 0 is now preceded by the base number when - the base was not 10. -01-11-26 +The default has compilation mode has been changes so that - viraw mode will always be on. - -01-10-31 --- Release ksh93m --- -01-10-31 A for loop optimizer bug for subshells contained within for - loops has been fixed. -01-10-16 typeset without arguments no longer outputs variable names - that do not have any attributes that are set. -01-10-16 A bug introduced in ksh93l in which assignments specified with - the exec built-in were not being expanded properly has been - fixed. -01-10-11 An optimization bug in which ${!x) was treated as invariant in - a for loop has been fixed. -01-10-11 Unsigned integer variables in bases other than 10 are printed now - expand in that base with the base prefix. -01-10-10 A number of typos in the self generating man pages for shell - built-ins have been fixed. -01-10-04 The self generated man pages for hist and fc were not working - correctly and have been fixed. -01-10-03 Yet another optimizer bug in which shell patterns were - treated as invariants has been fixed. -01-09-27 Two bugs relating to multibyte history searches and to find - have been fixed. -01-09-27 A bug introduced in ksh93k in which the PATH searching was - not restored after running a command with an assignment list - has been fixed. -01-09-26 A bug in which a zero filled field was treated as octal when - converted to integer has been fixed. -01-09-26 Yet another bug in the optimization of for loops related to - recursive functions with break or continue statements has been fixed. -01-09-25 +The exponentiation operator ** was added to the shell arithmetic - evaluation. It has higher precedence than * and is left - associative. -01-09-25 The code was modified to use the AST multibyte macros - and functions for handling multibyte locales. -01-09-25 +The expansion ${parameter:offset:length} now handles negative - offsets which cause offsets to be measured from the end. -01-09-25 Some spelling errors in the documentation were corrected. -01-09-24 +The /dev/tcp/host/port and /dev/udp/host/port now allow - the ports to be specified by service name. -01-09-24 +The change starting with ksh93g in which the appropriate - library path variable is prepended with a corresponding library - directory has been modified. With the new method, only the - library path defined in the file named .paths in the directory - where the executable is found will be modified. See the - man page for more details. -01-09-23 +The .fpath file (see ksh93h) is no longer looked for in each - directory on the path to locate function directories. The - file named .paths is used instead. -01-09-23 A bug in which IFS was not being restored after being changed in - a subshell has been fixed. -01-09-16 +With the vi and emacs edit modes, after a list of command - or functions is generated with = or M-= respectively, - any element from the list can be pasted on the command line - by preceding the = or M-= with a numeric parameter specifying - the position on the list. -01-09-16 A bug in ksh93l caused command completion not to find aliases - and functions. Command listing from the edit mode was presented - in reverse order. This has been fixed. -01-09-13 Another bug in the optimization of for loops related to subshells - when traps were set has been fixed. -01-09-07 A change in ksh93l caused brace expansion to stop working - and this has been fixed. -01-09-04 A bug introduced in ksh93k in which an arithmetic statement - within a function that used name references did not follow the - reference has been fixed. -01-09-04 A bug introduced in ksh93l in which export -p did not prefix - each export with the word export has been fixed. -01-08-29 A bug in multibyte input which occurred when a partial multibyte - character was received has been fixed. -01-08-29 A bug introduced in ksh93l which could cause a core dump - when an assignment list containing PATH is specified inside - command substitution has been fixed. -01-08-09 Another bug in the optimization of for loops in ksh93l caused - errors in recursive functions using local variables that - contained for loops has been fixed. -01-07-27 A bug in which IFS would be unset after a command substitution - inside a here document has been fixed. -01-07-26 To conform to the POSIX standard, if you invoked ksh name, - and name does not contain a /, it will first try to run - one in the current directory whether it is executable or not - before doing a path search for an executable script. Earlier - versions first checked for an executable script using the - PATH variable. -01-07-23 A bug in which unset -f invoked in a subshell could unset a - function defined in the parent has been fixed. -01-07-16 A bug in the optimization of for loops in ksh93l caused - name references to be treated as invariants has been fixed. -01-07-09 A bug in which a discipline function applied to a local variable - could cause a shell exception has been fixed. Discipline - functions can only be specified for global variables. - -01-06-18 --- Release ksh93l --- -01-06-18 A bug in assigning integers larger than can be represented as - long integers to floating point variables has been fixed. -01-06-18 A bug in the handling of unsigned integers (typeset -ui) has - been fixed. -01-06-04 The evaluation of the PS1 prompt no longer affects the value - of the $? variable. -01-06-01 A small memory leak from subshells has been fixed. -01-05-22 A bug in which attributes for variables that did not have - values would be lost after a subshell has been fixed. -01-05-22 +The %R format has been added to convert a shell pattern into - an extended regular expression. -01-05-22 +The escape sequences \e, \cX, \C[.collating-element.], and - \x{hex} have been added to ASCII-C strings and to printf format - strings. -01-05-20 +Patterns of the form {n}(pattern) and {m,n}(pattern) are now - recognized. The first form matches exactly n of pattern whereas, - the second form matches from m to n instances of pattern. -01-05-20 +The shell allows *-(pattern), +-(pattern), ?-(pattern), - {m,n}-(pattern}, and @-(pattern) to cause the minimal - match of pattern to be selected whenever possible rather - than the maximal (greedy) match. -01-05-20 +The character class [:word:] has been added to patterns. - The word class is the union of [:alnum:] and the character _. -01-05-20 +Inside (...) pattern groups, the \ character is now treated - specially even when in an enclosing character class. The - sequences, \w, \d, \s are equivalent to the character classes - word, digit, and space respectively. The sequences \W, \D, - and \S are their complement sets. -01-05-20 +The shell now recognizes pattern groups of the form - ~(options:pattern) where options or :pattern can be omitted. - Options use the letters + and - to enable and disable options - respectively. The option letters g (greedy), i (ignore case) - are used to cause maximal matching and to cause case - insensitive matching respectively. If :pattern is also - specified, these options are only in effect while this - pattern is being processed. Otherwise, these options remain - in effect until the end of the pattern group that they are contained - in or until another ~(...) is encountered. These pattern groups - are not counted with respect to group numbering. -01-05-14 When edit completion, expansion, or listing occurs in the - middle of a quoted string, the leading quote is ignored when - performing the completion, expansion, or listing. -01-05-14 A small memory leak from subshells has been fixed. -01-05-10 A bug in which open files were not restored after a subshell - that had used exec to replace a file has been fixed. -01-05-10 +Redirection to a null file name now generates an error message. -01-05-09 The shell now rejects some invalid parameter substitutions that - were previously processed in undefined ways. -01-05-09 A bug in which the output of select was not flushed before the - read when input did not come from the terminal has been fixed. -01-05-08 A bug in which job ids would not be freed for interactive shells - when subshells ran built-ins in the background has been fixed. -01-05-08 +The FPATH variable now requires an explicit . to cause the - current directory to be treated as a function directory. -01-05-08 A bug in read -n when echo mode was disabled has been fixed. -01-05-07 A bug in which function definitions could be listed as part - of the history has been fixed. -01-04-30 +This release uses a new and often much faster pattern matcher than - earlier releases. -01-04-30 +An optimizer now eliminates invariant parameter expansions from - for while and until loops. -01-04-30 +The variable .sh.match is set after each pattern match (# % or /) - in a variable substitution. The variable .sh.match is an - indexed array with element 0 being the complete match. - The array is only valid until the next subsequent pattern - match or until the value of the variable changes which ever - comes first. -01-04-30 +A self generating man page has been added to shcomp. Also, - shcomp now stops compiling when it finds an exit or exec - command and copies the remainder so that it can be used - for standard input. -01-04-30 +The shcomp command was modified so that it can work in an - EBCDIC environment and that binary scripts are portable - across environments. -01-04-30 A bug in the handling of a trailing : in PATH has been fixed. -01-04-30 A bug in which the builtin version of a command would get invoked - even though the full pathname for the command was specified - has been fixed. -01-04-30 A bug in which read would lose the last character when - reading the last line of a file that did not contain a new-line - character has been fixed. -01-04-23 A bug on some systems in which in vi mode the end of file - character and end of line character could be swapped has - been fixed. -01-04-23 A bug on some systems in which invoking a shell script that - did not have execute permission could set the exit value to - 127 rather than 126 has been fixed. -01-04-20 A bug in which read -n from a pipe would block if fewer than - n characters was received has been fixed. -01-04-09 A bug in which invalid patterns, for example, ) by itself, - was not treated as a string has been fixed so that if i=')', - then [[ $i == $i ]] is true. -01-04-09 +The shell arithmetic now interprets C character constants. -01-04-09 A bug in which a non-zero return from a function defined - with the function reserved word did not trigger the ERR - trap or exit with set -e has been fixed. -01-04-02 A bug on some systems, in which characters above 127 were - not displayed correctly in vi or emacs edit mode has been fixed. -01-04-02 A bug on some systems, introduced in the 'k' point release, in - which the erase character in viraw mode was moving the cursor - to the left without erasing the character has been fixed. -01-04-02 On some systems the wcwith() function was returning a wrong - value for characters and caused characters to be displayed - incorrectly from the shell edit modes. A work around for - this problem has been added. -01-03-26 A bug in which valid scripts could produce syntax errors - when run with locales that considered characters such as "'" - to be space characters has been fixed. -01-03-20 A bug in which an syntax error in an arithmetic expression - entered interactively could cause the shell to go into - an infinite loop outputting the error message has been fixed. -01-03-10 +ksh93 accepts -l as a synonym for -L in test on systems for - which /bin/test -l tests for symbolic links. -01-03-10 A bug in parsing scripts in which { and } are used in place of - in and esac in case statements embedded in compound commands - has been fixed. Use of { and } for in and esac is obsolete. -01-03-06 A bug in which an argument of the form foo=bar was not - being passed correctly to a traced function whose name - was foo has been fixed. -01-03-02 Using $(trap -p name) did not print the name of the current - trap setting for trap name. -01-02-26 Exported floating point variables gave incorrect results - when passing them to ksh88. This has been fixed. -01-02-25 A race condition in which a coprocess which completed too quickly - would not allow subsequent coprocesses to start has been fixed. -01-02-25 The 'g' format specifier is now handled by printf. It had - inadvertently been omitted. -01-02-20 The + was not being displayed during an execution trace - with the += assignment operator. -01-02-19 The error message which occurs when the interpreter name - defined on the #! line does not exist is more informative. -01-02-19 A bug in which $0 would not be set correctly when a - script with #! was invoked by full pathname from the - directory of the script has been fixed. -01-02-19 A shell script did not always pick up tty mode changes - made by external commands such as stty which could - effect the behavior of read. -01-02-19 The -u, -g, and -k unary tests did not give the correct - results when used with negation and this has been fixed. - -01-02-05 --- Release ksh93k+ --- -01-02-05 The sequence \ inside $'...' was not incrementing - the line count and this has been fixed. -01-02-05 +Modified expansion of "${@-}" so that if no arguments are set - it results in null string rather than nothing. -01-02-02 memory leak problem with local variables in functions fixed. -01-01-25 +allow arithmetic expressions with float%int and treat them - as ((int)float)%int rather than as an error. -01-01-19 read -n1 was not working and has been fixed. -01-01-17 +ksh now handles the case in which a here document in command - substitution $() is terminated by the trailing ). Previously, - a new-line was needed at the end of the delimiter word. -01-01-02 A bug in which a KEYBD trap would cause a multi-line token - to be processed incorrectly has been fixed. -00-12-10 +Arithmetic integer constants can now have L and U suffices. -00-12-10 A bug in the processing of arithmetic expressions with compound - variables when the -n option is on has been fixed. -00-12-08 A bug in M-f and M-b from emacs mode has been fixed. This - bug only occurs when ksh93 is compiled without MULTIBYTE enabled. -00-11-29 A bug in which jobs -p would yield 0 for background - jobs run in a script has been fixed. -00-11-21 A bug in integer arrays in which the number of elements is - incorrect when the ++ operator is applied to a non-existing - element has been fixed. For example, integer x; ((x[3]++)). -00-11-20 A timing bug in which the shell could reset the terminal - group to the wrong value in the case that the a new process - changes the terminal group during startup has been fixed. - -00-10-27 --- Release ksh93k --- -00-10-27 Using tab for completion now works only when applied - after a non-blank character at the end of the current line. - In other case a tab is inserted. -00-10-27 A bug in the emacs edit mode for ^X^E has been fixed. - The ^X^E sequence is supposed to invoke the full editor - on the current command. -00-10-18 A bug in which expansions of the form ${var//pattern/string} - did not work correctly when pattern was '/' or "/" has - been fixed. -00-10-18 +The output format for indexed arrays in compound variables - has been modified so that it can be used as input. -00-10-18 Assignments with name references (typeset -n) will now - implicitly unreference an existing name reference. -00-10-17 A bug the += append operator when a single array element - is appended to a variable that is not an array has been fixed. -00-10-16 A bug in which the SIGCONT signal was being sent to - each process will kill -0 or kill -n 0 has been fixed. -00-10-12 +The arithmetic evaluation portion has been rewritten to - perform a number of optimizations. -00-10-10 A bug in which name prefix matching ${!name.*} was not - checking name to see if it was a name reference has been fixed. -00-09-26 A bug in the multibyte version in which the width of for - non-printing characters was not correct has been fixed. -00-09-12 +Made changes to get multibyte editing work on UWIN for Windows. -00-09-12 A bug in which multibyte characters would be displayed incorrectly - has been fixed. -00-08-08 Removed build dependency on iswprint() and iswalph(). -00-07-20 In some cases the read builtin would read more than a single - line from a pipe on standard input and therefore leave the seek - position in the wrong location. -00-07-05 +If the directory / is on the path, a / will not be inserted - between the directory and the file name during path searching - to avoid searching // for systems that treat this specially. -00-06-26 A bug in which on rare occasions wait could return before all - jobs have completed has been fixed. -00-06-21 A bug in which backspace did not work correctly during the - R replace directive in vi-mode has been fixed. -00-06-12 +Added variable name completion/expansion/listing to the set of - completions. Variable name completions begin with $ or "$ followed - by a letter. -00-05-09 --- Release ksh93j --- -00-05-09 Modified command substitution to avoid using /tmp files when - run on read-only file systems. -00-04-17 +Modified printf to handle '%..Xc' and '%..Xs' options where X - is not an alpha character. Previous versions core dumped with this. -00-04-10 +Changes to multibyte editing code were made to use standard - ISO C functions rather than methods devised before the standard. -00-04-09 Add %H options to printf to output strings with <"'&\t> properly - converted for use in HTML and XML documents. -00-04-07 +Modified getopts builtin to handle \f...\f in usage string - by invoking specified function. -00-04-04 Added self generating man pages for bg, fc, fg, disown, jobs, - hist, let, ., and ulimit. -00-03-30 +The append operator += has been added and can be used - for all assignments, strings, arrays, and compound variables. -00-03-30 +Code was modified in several places to support automatic - generation of C locale dictionaries. -00-03-28 A bug in which the set and trap commands invoked with --name - type arguments would terminate the invoking script has - been fixed. -00-03-27 A bug in which the library path variable was not updated - correctly on some systems as described in the 'g' point - release has been fixed. -00-03-07 printf now returns a non-zero exit status when one of - its arguments cannot be converted to the given type. -00-03-05 The return value and error message for a command that - was found on the path but was not executable was set - incorrectly. -00-03-05 A prototype for ioctl() was removed from the vi edit mode. - -00-01-28 --- Release ksh93i --- -00-01-28 +Most of the built-in commands and ksh itself are now - self documenting. Running command --man will produce - screen output. Running command --html produces the - man page in html format. -00-01-28 +The getopts builtin can process command description - strings to produce man pages. -00-01-28 A bug in which a script could terminate when getopts - encountered an error when invoked inside a function - has been fixed. -00-01-28 When a symbolic link was specified as the name of - the script to invoke by name, the value of $0 was - set to the real file name rather than the link name - in some cases and this has been fixed. -00-01-28 A bug in which the precision given as an argument - to printf was not working has been fixed. - -99-03-31 --- Release ksh93h --- -99-03-31 +The PATH search algorithm has been modified to look - for a file named .fpath in each bin directory and if - found, to search for functions in this directory if - it cannot find the command in that directory. -99-03-31 +When performing pathname expansion, the shell checks - to see whether each directory it reads is case sensitive - or not, and performs the matching accordingly. -99-03-31 +The %T format for printing formatted date/time. -99-03-31 +The emacs and vi modes now handle arrow keys when - they use standard ANSI escape sequences. -99-03-31 +The TAB key can be used for completion in emacs and viraw mode. -99-03-31 A bug in setting .sh.editchar during the KEYBD trap - for the MULTIBYTE option was fixed in release ksh93h. -99-03-31 A bug in shcomp for compilation of unary operators with [[ ... ]] - has been fixed. -99-03-31 A bug in which the value of $? was changed when executing - a keyboard trap has been fixed. -99-03-31 The handling of SIGCHLD has been changed so that the - trap is not triggered while executing trap commands - to avoid recursive trap calls. -99-03-31 A bug in which a local variable in a function declared readonly - would generate an error when the function went out of - scope has been fixed. -99-03-31 A bug in which \ entered from the keyboard - with the KEYBD trap enabled has been fixed. -99-03-31 The error message for a misplaced ((, for example print ((3), - was often garbled and has been fixed. -99-03-31 A bug in the KEYBD trap in which escape sequences of the form - [#~ were not being handled as a unit has been fixed. -99-03-31 A bug in which ksh would consider expressions like [[ (a) ]] - as syntax errors has been fixed. -99-03-31 A function defined as foo() without a function body - was not reported as a syntax error. -99-03-31 A bug in which ksh could run out of file descriptors when - a stream was repeatedly opened with exec and read from - has been fixed. - -98-04-30 --- Release ksh93g --- -98-04-30 +The pipefail option has been added. With pipefail - enabled, a pipeline will not complete until all - commands are complete, and the return value will - be that of the last command to fail, or zero if - all complete successfully. -98-04-30 +The name-value pair library uses the cdt library rather - than the hash library. This change should be transparent - to applications. -98-04-30 +On the U/WIN version for Window 95 and Windows NT, - when a directory beginning with a letter followed by - a colon is given to cd, it is assumed to be an absolute - directory -98-04-30 +When an executable is found on a given path, - the appropriate library path variable is prepended - with a corresponding library directory. -98-04-30 A bug in which a name reference could be created to - itself and later cause the shell to get into an infinite - loop has been fixed. -98-04-30 A bug in shcomp relating to compound variables was fixed. -98-04-30 A bug introduced in ksh93e in which leading 0's in -Z - fields caused the value to be treated as octal for arithmetic - evaluation has been fixed. -98-04-30 A bug when a name reference with a shorter name than - the variable it references was the subject of a compound - assignment has been fixed. -98-04-30 A bug which in which assignment to array variables in - a subshell could affect the parent shell has been - fixed. -98-04-30 read name?prompt was putting a 0 byte at the end of the - prompt on standard error. -98-04-30 A bug in [[ string1 > string2 ]] when ksh was run with -x - has been fixed. -98-04-30 A bug in which the escape character was not processed - correctly inside {...} when brace expansion is enabled - has been fixed, for example {\$foo}. -98-04-30 A bug in line continuation in here-documents has been - fixed. -98-04-30 The default base when not specified with typeset -i is - 10 in accordance with the documentation. Previously, - the value was determined by the first assignment. -98-04-30 A parsing bug in which a # preceded alphanumeric - characters inside a command substitution caused - a syntax error to be reported has been fixed. -98-04-30 A bug in which a decimal constant represented as 10#ddd - where ddd was more than five digits generated a syntax - error has been fixed. -98-04-30 A bug in here document expansion in which ${...} expansions - were split across buffer boundaries has been fixed. -98-04-30 +The sh_fun() function now takes third argument which - is an argument list for the invoked discipline function - or built-in. -98-04-30 +A callback function can be installed which will give - notification of file duplications and file closes. -98-04-30 When ksh is compiled on systems that do not use fork() - current option settings where not propagated to subshells. - -97-06-30 --- Release ksh93f --- -97-06-30 +Hostnames in addition to host addresses can be given in - /dev/tcp/host/port virtual file names. -97-06-30 File name completion and expansion now quotes special - characters in file names from both emacs and vi edit modes. -97-06-30 An empty for list behave like a for list with null expansions. - It produces a warning message with sh -n. -97-06-30 +The code has been modified to work with EBCDIC as well as ASCII. -97-06-30 A bug which would cause the secondary prompt to be - displayed when a user entered a literal carriage - return has been fixed. -97-06-30 A bug which caused ksh read -s name to core dump was - fixed. -97-06-30 A bug with the expansion of \} and \] inside double - quoted strings that also contained variable expansions - has been fixed -97-06-30 Changes in the ksh93e point release caused autoload - functions invoked from within command substitution - to fail. This has been fixed. -97-06-30 A bug in the processing of here-documents that could - prevent variable substitution to occur after $(...) command - substitution for long here documents has been fixed. -97-06-30 A bug caused by a race condition that could cause SIGTERM - to be ignored by a child process has been fixed. -97-06-30 A bug which prevented the startup of a coprocess immediately - after killing a running coprocess has been fixed. -97-06-30 ulimit foobar, where foobar is not an arithmetic - expression, now gives an error message as it did with ksh88 - instead of setting the file size limit to 0. -97-06-30 A bug which could cause an interactive shell to terminate when - the last process of a pipeline was a POSIX function was fixed. -97-06-30 A bug which could cause command substitution of a shell script - to core dump has been fixed. -97-06-30 A security hole was fixed in suid_exec. -97-06-30 Arithmetic functions such as pow() that take more than - one argument, did not work if arguments other than the - first contained parenthesized sub-expression. -97-06-30 The error message from a script containing an incomplete - arithmetic expression has been corrected. -97-06-30 A bug which caused a core dump on some machines when - the value of a name reference contained a positional - parameter and the name reference was not defined inside - a function has been fixed. -97-06-30 Arithmetic expressions now correctly handle hexadecimal - constants. -97-06-30 A bug in which integer variables could be expanded - with a leading 10# when declared with typeset -i - multiple times has been corrected. -97-06-30 A bug in which IFS wasn't correctly restored when - set within command substitution has been fixed. -97-06-30 The _ character is now considered as part of a word - with the M-f and M-b emacs directives as it was in ksh88. -97-06-30 A bug in brace pattern expansions that caused expressions - such as {foo\,bar,bam} to expand incorrectly have been fixed. - - -96-07-31 --- Release ksh93e --- -96-07-31 +The math functions, atan2, hypot, fmod, and pow were added. -96-07-31 +When a shared library is loaded, if the function lib_init() - is defined in the library, it is invoked the first time that - the library is loaded with builtin -f library. -96-07-31 The k-shell information abstraction database option, KIA, - has been revamped. -96-07-31 Empty command substitutions of the form $() now work. - whence -v foo now gives the correct result after calling - builtin -d foo. -96-07-31 A bug in right to left arithmetic assignment for which - the arithmetic expression (( y = x = 1.5 )) did not - yield 1 for y when x was declared typeset -i was fixed. -96-07-31 printf has been fixed to handle format containing \0 - and/or \0145 correctly. In addition, characters following - %b in the format string are no longer displayed when - the operand contains \c. -96-07-31 A bug in printf that could cause the %E format to - produce unnormalized results has been fixed. -96-07-31 A bug which causes some arithmetic expressions to be - incorrectly evaluated as integer expressions rather - than floating point has been fixed. -96-07-31 Functions defined inside a subshell no longer remain - defined when the subshell completes. -96-07-31 The error message from sh -c ';echo foo' has been - corrected. -96-07-31 The format for umask -S has been changed to agree - with the specification in the POSIX standard. -96-07-31 A bug that caused side effects in subscript evaluation - when tracing was enabled for subscripts using ++ or -- - has been fixed. -96-07-31 To conform to the POSIX standard getopts has been changed - so that the option char is set to ? when it returns with - a non-zero exit status. -96-07-31 The handling of \} inside ${name...} has been fixed so - that the \ quotes the }. -96-07-31 A bug that caused the read builtin to resume execution - after processing a trap has been fixed. -96-07-31 [[ -s file ]] has been fixed so that if file is open - by ksh, it is flushed first. -96-07-31 In some cases attributes and sizes for non exported - variables weren't being reset before running a script. -96-07-31 The value of TMOUT was affected by changes make to - it in a subshell. -96-07-31 The jobs command did not reflect changes make by - sending the CONT signal to a command. -96-07-31 The error message for ksh -o unknown was incorrect. -96-07-31 Functions invoked as name=value name, did not use - values from the calling scope when evaluating value. -96-07-31 A bug in which the shell would re-execute previously - executed code when a shell script or coprocess was - run in the background has been fixed. -96-07-31 A bug in which an empty here-document would leave - a file descriptor open has been fixed. -96-07-31 A bug in which $(set -A array ...) would leave a - side effect has been fixed. -96-07-31 A discipline function for a global variable defined - within a function defined with the function keyword, - incorrectly created a local variable of the same name - and applied the discipline to it. - -95-08-28 --- Release ksh93d --- -95-08-28 The \ character was not handled correctly in replacement - patterns with ${x/pattern/replace}. -95-08-28 A bug with read in which the line did not end with - a new-line has been fixed. -95-08-28 A bug in file name generation which sometimes - appended a . for filenames that ended in / has - been fixed. -95-08-28 +If a process is waited for after a status has - been returned by a previous wait, wait now - returns 127. -95-08-28 A bug with hist (fc) -e which prevented a command - to re-executed after it had been edited has been fixed. -95-08-28 A bug which prevented quoting from removing the meaning - of unary test operators has been fixed. -95-08-28 A bug with typeahead and KEYBOARD traps with the - MULTIBYTE option set has been fixed. -95-08-28 +Builtin functions can take a third argument which is - a void*. -95-08-28 The nv_scan() function can restrict the scope of a walk - to the top scope. - -95-04-31 --- Release ksh93c --- -95-04-31 The expansion of "$@" was incorrect when $1 was the null - string. -95-04-31 A bug which could incorrectly report a syntax error in - a backquoted expression when a $ was preceded by \\ - has been fixed. -95-04-31 A bug which prevented the shell from exiting after - reporting an error when failing to open a script - has been fixed. -95-04-31 A bug that could lead to memory corruption when a - large here document that required parameter or command - substitution was expanded has been fixed. -95-04-31 A bug that could cause a core dump on some systems - after ksh detected an error when reading a function - has been fixed. -95-04-31 A bug which could cause a coprocess to hang when - reading from a process that has terminated has been fixed. -95-04-31 A bug which caused a script to terminate when set -e - was on and the first command of and && or || list - failed has been fixed. -95-04-31 A bug with here documents inside $(...) when the delimiter - word is an identifier has been fixed. -95-04-31 A bug which caused $0 to display the wrong value when - a script was invoked as an argument to the . command - and the eval command has been fixed. -95-04-31 A bug that could cause the built-in sleep to hang - has been fixed. -95-04-31 A bug introduces in 12/28/93b which caused the backslash - to be removed when it was followed by digit inside double - quotes in some instances has been fixed. -95-04-31 A bug which could cause a core dump if ksh was invoked with - standard input closed has been fixed. -95-04-31 A bug which could cause a core dump if typeset -A was - specified for an existing variable has been fixed. -95-04-31 Variables that were unset but had attributes such as readonly - and export were not listed with readonly, export and typeset. -95-04-31 Several problems with signals have been fixed. -95-04-31 A bug which prevented ulimit -t from working has been fixed. - Also, a bug in which failed ulimits could cause a core dump - has also been fixed. -95-04-31 A bug in expansion of the form ${name/#pattern/string} and - ${name/%pattern/string} has been fixed. -95-04-31 A bug which caused read -r on a line that contained only - blanks to get a non-null value has been fixed. -95-04-31 A bug introduced in the 'a' point release in which - ${x='\\'} expanded to \ when x was unset has been fixed. -95-04-31 A bug which prevented a trap on EXIT from being executed - when the last command in a script was a function invocation - has been fixed. -95-04-31 A bug which caused an interactive shell ignore input when - standard error was redirected to a file with exec, - and then restored with exec 2>&1 has been fixed. -95-04-31 An interactive shell turns on monitor mode even when - standard error has been redirected to a file. -95-04-31 A bug which could cause standard input to be incorrectly - positioned for the last command of a script has been fixed. -95-04-31 A bug in the edit modes which allowed walking back in - the history file for more than HISTSIZE commands has - been fixed. -95-04-31 A bug which could cause a core dump if variable TMPDIR was - changed between two command substitutions has been fixed. -95-04-31. A bug which prevented a trap on EXIT from being cleared - has been fixed. -95-04-31 A bug fixed for the v directive in vi MULTIBYTE has been - fixed. -95-04-31 Code to for IFS handling of multibyte characters has - been added. -95-04-31 The displaying of multibyte strings in export, readonly, - typeset, and execution traces has been fixed. -95-04-31 Variables inside functions are now statically scoped. - The previous behavior was never documented. -95-04-31 Variables inside functions are now statically scoped. - The previous behavior was never documented. -95-04-31 A few changes have been made to the name-value library - that affect built-ins that use disciplines. The - changes allow disciplines to be shared by variables - and should make it possible to add new disciplines - without recompilation. -95-04-31 +The name-value library interface has undergone significant - change for this revision. See the new nval.3 man page. - -94-12-31 --- Release ksh93b --- -94-12-31 +Variables inside functions are now statically scoped. - The previous behavior was never documented. -94-12-31 +If IFS contains two consecutive identical characters belonging - to the [:space:] class, then this character is treated as - a non-space delimiter so that each instance will delimit - a field. For example, IFS=$'\t\t' will cause two consecutive - tabs to delimit a null field. -94-12-31 +The getopts command has a -a name option that specifies a - name that will be used for usage messages. -94-12-31 A bug which caused unset RANDOM to dump core has been - fixed. -94-12-31 A bug which prevented return for terminating a profile - or ENV file has been fixed. -94-12-31 A bug which prevented standard input from being - directed to /dev/null for background jobs when - monitor mode was turned off has been fixed. -94-12-31 Statements of the form typeset -options var[expr]=value - did not perform substitutions on expr as expected. -94-12-31 A bug which prevented the shell from sending a HUP - signal to some background jobs that were not disowned - has been fixed. -94-12-31 A bug which allowed a script to trap signals that are - ignored at the time that the shell was invoked by exec - has been fixed. -94-12-31 A bug which could cause a core dump when a discipline - function was unset within a discipline was fixed. -94-12-31 The typeset builtin now accepts a first argument of - + or - for compatibility with ksh88. -94-12-31 For compatibility with ksh88, the results of expansions - of command arguments will treat the extended character - match characters ()|& as ordinary characters. -94-12-31 A bug which caused read to fail on a file that was - open for read/write with <> when the first operation - was print or printf has been fixed. -94-12-31 When a job is suspended, it is put on the top of - the job list as required by the POSIX standard. -94-12-31 The value of OPTARG when an option that required - an argument but didn't have one was incorrect in the - case the option string began with a :. -94-12-31 A bug which caused the terminal to get into a bad - state with some KEYBD traps in vi-mode has been fixed. -94-12-31 A bug which caused an invalid trap to cause a script - to terminate, rather than just return an error, has - been fixed. -94-12-31 Backreferencing sub-expressions in patterns and replacement - strings now works. -94-12-31 A bug in chmod which caused the -R option to fail has - been fixed. -94-12-31 +More signal names have been added for Solaris - -94-06-30 --- Release ksh93a --- -94-06-30 An expansion bug which causes portions of a word after - a $((...)) expansion that contains a nested $var expansion - to be lost has been fixed. -94-06-30 A bug that caused a core dump when a script that did not - have PWD set and did a cd inside command substitution - has been fixed. -94-06-30 A bug which caused a core dump on some machines when - the LANG variable was assigned to has been fixed. -94-06-30 A bug which incorrectly handled set disciplines that - performed arithmetic evaluation when the discipline - was called from the arithmetic evaluator has been fixed. -94-06-30 A bug caused by an EXIT trap inside a function that - was executed in a subshell was fixed. -94-06-30 If foo is a function, and not a program, then command foo - now reports that foo isn't found rather than invoking foo. -94-06-30 The previous version incorrectly listed -A as an - invocation option. The -A option is only for set. -94-06-30 A bug was fixed which caused ksh to loop when execution trace - was enabled and the PS4 prompt required command substitution. -94-06-30 A bug which could cause the job control switch character - to be disabled when a script that enabled monitor mode - terminated was fixed. -94-06-30 A bug in the macro expansion global replacement operator //, - when the pattern began with a [ or +( has been fixed. -94-06-30 A bug which prevented ~ expansion from occurring when - it was terminated with a colon inside an assignment - has been fixed. -94-06-30 A bug in the dot command which prevented autoload functions - from working has been fixed. -94-06-30 A bug which caused a variable to be unset if the - its value were expanded inside a set discipline has - been fixed. -94-06-30 Whence -a now longer reports that a defined function - is undefined. -94-06-30 A bug on some systems in which $0 would be incorrect - in scripts invoked by name has been fixed. -94-06-30 Here documents with an empty body now work. -94-06-30 A bug which disabled argument passing and resetting - of options for a script invoked by name inside a - function has been fixed. -94-06-30 A bug in which an EXIT trap set the caller of a function - would be executed if a command called inside a function - was not found has been fixed. -94-06-30 A bug which allowed a script to trap signals that are - ignored at the time that the shell was invoked has - been fixed. -94-06-30 A bug which caused 2<&1- when applied to a shell built-in - to leave standard input closed has been fixed. -94-06-30 A bug which caused the shell to incorrectly parse - $() command substitutions with nested case statements - has been fixed. - diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/RELEASE88 b/cde/programs/dtksh/ksh93/src/cmd/ksh93/RELEASE88 deleted file mode 100644 index ac6d817a0..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/RELEASE88 +++ /dev/null @@ -1,426 +0,0 @@ -This file is of historic interest. For recent changes in both ksh 93u+m and -the accompanying libraries, see the file NEWS in the top-level directory. -____ - -This is a list of changes that have been made since the 11/16/88 version -of ksh. - -1. New features in 12/28/93 - a. Associative arrays. The new version of ksh supports both - associative arrays and the older indexed arrays with the same - array syntax. A new -A option of typeset is used to declare - an array to be associative. As with indexed arrays, $name is - equivalent to ${name[0]}. The prefix operator ! was added - to the parameter expansion syntax to expand to the list of - indices. For example, ${!name[@]} expands to the list of array - indices for variable name. - - b. Several additions have been made to shell arithmetic: - 1. The shell now performs floating point arithmetic. The - typeset options -F and -E have been added for floating - point and scientific notation respectively. - 2. The prefix and postfix ++ and -- operators. - 3. The comma and ?: operators. - 4. The math library functions. - 5. An arithmetic for statement of the form - for ((expr1; expr2; expr3)) - do ... - done - 6. Integer arithmetic extended up to base 64. - - c. Some additions to the macro expansion syntax have been made - to specify substrings and sub-arrays: - 1. ${name:expr} expands to the substring of ${name} starting at - the character position defined by arithmetic expression expr. - 2. ${name:expr1:expr2} expands to the substring of ${name} starting - at expr1 and consisting of at most expr2 characters. - 3. ${name[@]:expr} expands to the values of ${name[@]} starting at - the element defined by arithmetic expression expr. - 4. ${name[@]:expr1:expr2} expands to at most expr2 values of - ${name} starting at expr1. - 5. ${@:expr} expands the positional parameters starting at expr. - 6. ${@:expr1:expr2} expands to at most expr2 positional parameters - starting at expr1. - 7. ${!name} expands to the name of the variable named by name. - It will expand to name unless name is a reference variable. - 8. ${!name[sub]} expands to the name of the subscript of the - given variable. If sub is @ or * the list of subscripts - is generated. - 9. ${!prefix*} and ${!prefix@} expand to the list of variable - names beginning with prefix. - 10. The substring operators, # and % can be now be applied - with aggregates (@ or *) and are applied to each. - 11. ${name/pattern/string} expands to the value of name with - the first occurrence of pattern replaced by string. - With aggregates (@ or *) this operation is applied to each. - 12. ${name/#pattern/string} Same as above but the pattern - to be replaced must match at the beginning. - 13. ${name/%pattern/string} Same as above but the pattern - to be replaced must match at the end. - 14. ${name//pattern/string} expands to the value of name with - each occurrence of pattern replaced by string. - With aggregates (@ or *) this operation is applied to each. - - d. The name space for variables has been extended. The character '.' - can be used at the beginning of a name, and to separate identifiers - within a name. However, to create a name of the form, foo.bar, - the variable foo must exist. The namespace starting with .sh - is reserved for shell implementation variables. Exported - variables cannot contain a '.'. - - e. Compound assignments. The assignment syntax, varname=value, - has been extended to allow assignments of the form - varname=(assignment_list). As elsewhere in the shell - spaces or tabs are optional around the parentheses, and - no space is permitted between the varname and the =. The - assignment_list can be one of the following: - 1. A list of words. In this case each word is expanded as - in a for list and the resulting items become elements - of the indexed array varname. - 2. A list of subscript assignments in the form - [subscript]=value. In this, these elements become - elements of the associative array varname. - 3. A list of assignments; simple or compound. In this - case, each assignment is made to varname.name, where - name is the name of the enclosed assignment. - 4. Assignments in the form of readonly or typeset - statements. In this case each assignment is made as - in 3 above, and the attributes are given to the - corresponding variable. - In case 3 and 4 above, the value of "$varname" after - the above assignment is (assignment_list), where the - assignment_list produced would reproduce all of the - variables under varname.*. - - f. Function names of the form variable.action (called discipline - functions) can be defined where variable is any valid variable - name and action is get, set, or unset. The function variable.get - is invoked each time the variable is referenced. The set - discipline is invoked each time the variable is assigned to. - The unset discipline is invoked when a variable is unset. - The new variables .sh.name, .sh.subscript, and .sh.value are - defined inside the function body. Other shell extensions - may have their own set of discipline functions. - - g. The compound command !, which negates the return value of the - following pipeline, has been added. - - h. On systems that support dynamic loading with dlopen(), it is - now possible to add built-in commands at runtime with the - builtin command named 'builtin'. - - i. The following builtins have been added: - 1. command name [ ... ] - 2. sleep [decimal-seconds] - 3. builtin [-ds] [-f file] [name...] - 4. getconf name [pathname] - 5. disown [job...] - - j. An addition format for literal strings, $'....' can - be used where ever literal strings are valid. The string - inside the single quotes will be converted using the ANSI C - escape conventions. Additionally, the escape sequence \E - expands to the escape character (default \033) whenever ANSI C - escape sequences are recognized. - - k. A typeset -n option has been added which causes the value of a - variable to be treated as a reference to another variable so that - variables can be indirectly named. For example, if $1 contains - the name of a variable, then typeset -n foo=$1 causes the variable - foo to be synonymous with the variable whose name is $1. A builtin - alias, nameref='typeset -n' has been added to aid mnemonics. - Reference names cannot contain a '.'. Whenever that portion of - a variable up to the first '.' matches a reference name, the - reference value is substituted. For example, with nameref foo=.top, - then ${foo.bar} is equivalent to ${.top.bar}. When used as the - index of a for or select loop, each assignment causes a - new name reference to occur. - - l. The KEYBD trap has been added which is triggered when a key - or escape sequence is typed while reading from the keyboard - in an edit mode. This, combined with some new variables - makes it possible to program your key bindings in ksh. - - m. New variables have been added: - 1. FIGNORE defines a set of file names to be ignored in each - directory when performing pathname expansion, replacing - the rule that requires that a leading . be matched explicitly. - 2. Variable sh.edchar contains the value of the keyboard character - that has been entered when processing a KEYBD trap. If the value - is changed as part of the trap action, then the new value replaces - the key or keys that caused the trap. - 3. Variable sh.edcol is set to the character position of the cursor - within the input buffer during a KEYBD trap. - 4. Variable sh.edmode is set to the escape character when in vi - insert mode. - 5. Variable sh.edtext is set to the contents of the input buffer - during a KEYBD trap. - 6. HISTEDIT is checked before FCEDIT. FCEDIT is obsolete. - 7. HISTCMD is the number of the current command in the history - file. - 8. Variable .sh.version is set to the version string for - this shell. - 9. Variable .sh.name is set to the name of the variable - that was referenced or assigned to when executing a get - or set discipline function. - 10. Variable .sh.subscript is set to the subscript for the variable - that was referenced or assign to when executing a get or - set discipline function. - 11. Variable .sh.value is set to the new value for the variable - that was assigned to when executing the set discipline function. - - n. New invocation and set -o options have been added: - 1. set -o notify (or set -b) causes background completion messages - to be displayed as soon as the job completes. - 2. There is a compile time option named KIA which enables - creation of a relational database for commands, variables - and functions defined and referenced by a script. The - option -I , causes the database to be generated - in . The database format can be queried via - the cql command. - o. ksh93 can read and evaluate pre-compiled scripts generated by - a separate program called shcomp. - p. More work on internationalization has been added: - 1. The decimal point character is processed per locale - 2. A $ can be placed in front of each string to indicate - that the string needs translation but is otherwise ignored. - This means that if a message catalog of all $"..." strings - is generated, then a program such as print $"hello world" - could display "bonjour monde" in the French locale. - q. Backreferences have been added to pattern matching. The sequence - \d, where d is a digit from 1-9, matches the same string as - the d-th previous parenthesis group. Backreferences - can be used within patterns, and within replacement strings - with any of the ${name/...} operators. - -2. Changes made in 12/28/93 - a. The output format of many commands has changed as follows: - 1. System error messages are displayed whenever a failure - is caused by a system call. - 2. The exit status has changed in many cases: - a. USAGE messages cause an exit status of 2. - b. Commands not found cause exit - 127. - c. Command found, but not executable - 126. - d. Terminated because of signal - 256+sig - 3. The output of values from built-ins that contain special - characters are quoted in a manner that then can be re-input. - 4. The trace output puts quotes around the output so that it - can be reused as input. - 5. The output for trap is in a format that can be reinput to - the shell to restore the traps. - 6. kill -l lists the signal names without numbers as - required by the POSIX standard. - - b. The following changes have been made to shell functions: - 1. The semantics of functions declared with name() has changed - to conform with the IEEE-POSIX 1003.2 standard. In particular, - these functions are executed in a dot script environment rather - than a separated function environment so that there are no - local variables and no scoping for traps. - 2. Functions declared as function name, preserve the old ksh - semantics can be also used as the first argument to the dot (.) - command to have them executed in a dot script environment. - - c. The command search rules have changed as follows: - 1. Special built-ins (those with a dagger in front of them) are - executed first. - 2. Functions are executed next. - 3. Other built-ins that do not require an executable version - (for example cd and read) come next. - 4. If the command name contains a slash, the pathname corresponding - to the command name is executed. - 5. If name corresponds to a previously encountered pathname - on the PATH variable, the corresponding command is executed. - 6. If the command name does not contain a slash, then the PATH - variable is used to find an executable by that name. If - the directory that the command is found is also contained in - the FPATH variable, then the command treated as a function. - If the shell has a built-in version of the command corresponding - to this command, then the built-in version of this command - is executed. Otherwise, the shell remembers that pathname - corresponding to this command name and executes this pathname. - 7. If the name is not found on PATH, then the directories in - FPATH are searched. If found, then the command is executed - as a function. - - d. Built-in commands options now conform to the IEEE-POSIX 1003.2 - conventions with some additions. In particular, - name -? - will now print a Usage line for name, except for true, false, - colon, login, newgrp, echo, [, and command. - - e. Tilde expansion is now performed as part of the word expansions. - The effect of this is that if word begins with ~ in ${name op word}, - it will be expanded unless escaped. - - f. Pathname expansion is no longer performed on redirection words - unless the shell is interactive. - - g. Changes to shell and options: - 1. The -n option has been enhanced to produce more warning and - portability messages. - 2. The -C option is equivalent to -o noclobber. Files are - created with O_EXCL when -C is on. - - h. The following changes have been made to [[ ... ]]: - 1. A string by itself is equivalent to -n string. - 2. -e has been added as equivalent to -a. - 3. == has been added as equivalent =. - 4. -a and = are now considered obsolete. - 5. Arithmetic comparisons are now considered obsolete. - - i. kill has been changed as follows: - 1. Signal names can be upper case or lower case. - 2. Numerical arguments to kill -l cause the given signal names to - be displayed. - 3. String arguments to kill -l cause the given signal numbers to - be displayed. - 4. Synopsis changed for getopts conformance. - - j. print has a -f format option which is equivalent to - the IEEE POSIX printf. Both print -f format, and - printf have the following extensions from IEEE POSIX: - 1. Floating point formats are supported. - 2. Size and precision specifications can be *. - 3. The %d option can take an argument after precision to - specify the base that the number will be displayed. - 4. A %q format can be used to output a string quoted so - that it can be re-input to the shell. - 5. A %P format can be used to output the shell pattern which - corresponds to the give extended regular expression. - 6. For numerical fields, the arguments can be arithmetic - expressions which will be evaluated. - 7. The %n format works as described in ANSI C. - - k. The following changes have been made to fc: - 1. It has been renamed hist. fc is now a predefined alias. - 2. hist uses ${HISTEDIT:-$FCEDIT}. FCEDIT is obsolete. - 3. A new -s option is equivalent to the obsolete -e -. - 4. If the first argument refers to a command earlier than the - first accessible command, it now implies the first accessible - command, so that hist -l 1 lists all accessible history commands. - - l. The dot command (.) has changed as follows: - 1. The argument can be the name of a function declared as - function name. The function will execute without creating a - new scope. - 2. If there are arguments to the given script or function, - the positional parameters are restored to their original - value when . completes. - - m. The read built-in has been changed as follows: - 1. A -A option to read has been added to allow the fields to be - read into an indexed array. - 2. A -t n option has been added which causes read to - timeout after n seconds when reading from a slow device. - 3. A -d char option has been added which causes the read - to terminate at char rather than at new-line. - - n. The trap command has been changed as follows: - 1. Trap names can be either upper case or lower case. - 2. Trap -p only causes the specified trap values to be displayed. - 3. The value of trap in a subshell will be the value in the parent - shell until a call to trap which changes the trap settings has - been made. Thus, savetraps=$(trap) works as required by the - POSIX standard. - - o. The exec command has been extended as follows: - 1. The -c option clears the environment first. - 2. The -a name option sets argv[0] to name for the program. - - p. true and false are built-ins, not aliases to built-ins. - - q. test has been modified to conform to the IEEE-POSIX 1003.2 - standard when there are three or less arguments. - - r. umask -S option displays the mask in a symbolic format. - - s. wait now returns the correct exit status of any previous - background job that has not been waited for, not just - the most recent one. - - t. The whence built-in has an option -a which causes all - uses for the given command name to be reported. - - u. unalias has -a option to clear all the aliases. - - v. The times built-in command has been removed. The time - reserved word, without a command, gives time cumulative - time for the shell and its children. A built-in alias - for times should enable scripts using times to continue - to run. - - w. Command substitution and arithmetic substitution will now be - performed for PS1, ENV, and PS4 evaluation in addition to - parameter expansion. - - x. The SECONDS variable now displays elapsed time in floating - point seconds with 3 places after the decimal point by - default. - - y. The getopts built-in now handles the complete libast optget - functionality. If any errors have occurred with getopts - when it has reached the end of arguments, then the Usage - message will be generated from the option string and the - exit status from getopts will be 2 rather than 1. The - usage message will be stored in the OPTARG variable if - the option string contains a leading colon; otherwise - it will be printed on standard error automatically. - - z. THE ENV file is only processed for interactive shell - invocations. In addition, the -x attributes for - aliases and functions is ignored. - - aa. The built-in edit modes have been changed as follows: - 1. The pathname completion and pathname listing options - now perform command completion and command listing - when applied to a word in the command position. - 2. In emacs mode ^N as the first related command after - the prompt will move to the next command relative to the - last known history position. - 3. In emacs mode, successive kill and delete commands will - accumulate their data in the kill buffer, by appending or - prepending as appropriate. This mode will be reset by any - command not adding something to the kill buffer. - 4. The control-T of emacs mode has been changed to behave like - control-T in gnu-emacs. - bb. The TMOUT variable also sets a limit for select timeouts - and default timeouts for read. - - -4. The source code has undergone significant modification. - a. Much of the code has been rewritten, In many cases this has - resulted in significant performance improvement. - - b. The code is organized differently. See the README files - for more details. - - c. Most configuration parameters now get generated using - the FEATURE mechanism of nmake. Other options are set - in the OPTIONS file. - - c. There are several new compile time options. See the README - file for details. Some of the old ones have been removed. - - d. The install script is a Mamfile that is generated by - nmake and processed by a script that comes with the - distribution. - - e. There are far fewer global names. This should make it - must easier to add built-in commands without worrying - about conflicts. - - f. The code uses the sfio library which makes it possible - to mix with stdio. - - g. The code is written in ANSI C with full prototypes. - The code is based on the IEEE POSIX 1003.1 standard. - The code can be compiled with K&R C and with C++ by - using the ANSI cpp that comes with nmake or running - the code through the proto filter before pre-processing. - This happens automatically with our shipping system. - - h. There is a programming interface for capturing references - and assignment to shell variables. It is also possible - to intercept variable creation and supply the array processing - function for that variable. See nval.3 for a description. diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/RELEASE93 b/cde/programs/dtksh/ksh93/src/cmd/ksh93/RELEASE93 deleted file mode 100644 index afd108065..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/RELEASE93 +++ /dev/null @@ -1,458 +0,0 @@ -This file is of historic interest. For recent changes in both ksh 93u+m and -the accompanying libraries, see the file NEWS in the top-level directory. -____ - -This is a list of changes that have been made since the 12/28/93 version -of ksh. - -1. New features in 12/28/93b - a. If IFS contains two consecutive identical characters belonging - to the [:space:] class, then this character is treated as - a non-space delimiter so that each instance will delimit - a field. For example, IFS=$'\t\t' will cause two consecutive - tabs to delimit a null field. - b. The getopts command has a -a name option that specifies a - name that will be used for usage messages. - -2. New features in 12/28/93e - a. The math functions, atan2, hypot, fmod, and pow were added. - b. When a shared library is loaded, if the function lib_init() - is defined in the library, it is invoked the first time that - the library is loaded with builtin -f library. - -3. New features in 12/28/93f - a. Hostnames in addition to host addresses can be given in - /dev/tcp/host/port virtual file names. - b. File name completion and expansion now quotes special - characters in file names from both emacs and vi edit modes. - -4. New features in 12/28/93g - a. The pipefail option has been added. With pipefail - enabled, a pipeline will not complete until all - commands are complete, and the return value will - be that of the last command to fail, or zero if - all complete successfully. - b. When an executable is found on a given path, - the appropriate library path variable is prepended - with a corresponding library directory. -5. New features in 12/28/93h - a. The PATH search algorithm has been modified to look - for a file named .fpath in each bin directory and if - found, to search for functions in this directory if - it cannot find the command in that directory. - b. When performing pathname expansion, the shell checks - to see whether each directory it reads is case sensitive - or not, and performs the matching accordingly. - c. The %T format for printing formatted date/time. -6. New features in 12/28/93i - a. Most of the built-in commands and ksh itself are now - self documenting. Running command --man will produce - screen output. Running command --html produces the - man page in html format. - b. The getopts builtin can process command description - strings to produce man pages. - -7. Bugs fixed in 12/28/93a for default OPTIONS - a. An expansion bug which causes portions of a word after - a $((...)) expansion that contains a nested $var expansion - to be lost has been fixed. - b. A bug that caused a core dump when a script that did not - have PWD set and did a cd inside command substitution - has been fixed. - c. A bug which caused a core dump on some machines when - the LANG variable was assigned to has been fixed. - d. A bug which incorrectly handled set disciplines that - performed arithmetic evaluation when the discipline - was called from the arithmetic evaluator has been fixed. - e. A bug caused by an EXIT trap inside a function that - was executed in a subshell was fixed. - f. If foo is a function, and not a program, then command foo - now reports that foo isn't found rather than invoking foo. - g. The previous version incorrectly listed -A as an - invocation option. The -A option is only for set. - h. A bug was fixed which caused ksh to loop when execution trace - was enabled and the PS4 prompt required command substitution. - i. A bug which could cause the job control switch character - to be disabled when a script that enabled monitor mode - terminated was fixed. - j. A bug in the macro expansion global replacement operator //, - when the pattern began with a [ or +( has been fixed. - k. A bug which prevented ~ expansion from occurring when - it was terminated with a colon inside an assignment - has been fixed. - l. A bug in the dot command which prevented autoload functions - from working has been fixed. - m. A bug which caused a variable to be unset if the - its value were expanded inside a set discipline has - been fixed. - n. Whence -a now longer reports that a defined function - is undefined. - o. A bug on some systems in which $0 would be incorrect - in scripts invoked by name has been fixed. - p. Here documents with an empty body now work. - 1. A bug which disabled argument passing and resetting - of options for a script invoked by name inside a - function has been fixed. - r. A bug in which an EXIT trap set the caller of a function - would be executed if a command called inside a function - was not found has been fixed. - s. A bug which allowed a script to trap signals that are - ignored at the time that the shell was invoked has - been fixed. - t. A bug which caused 2<&1- when applied to a shell built-in - to leave standard input closed has been fixed. - u. A bug which caused the shell to incorrectly parse - $() command substitutions with nested case statements - has been fixed. - -8. Bugs fixed in 12/28/93b for default OPTIONS - a. A bug which caused unset RANDOM to dump core has been - fixed. - b. A bug which prevented return for terminating a profile - or ENV file has been fixed. - c. A bug which prevented standard input from being - directed to /dev/null for background jobs when - monitor mode was turned off has been fixed. - d. Statements of the form typeset -options var[expr]=value - did not perform substitutions on expr as expected. - e. A bug which prevented the shell from sending a HUP - signal to some background jobs that were not disowned - has been fixed. - f. A bug which allowed a script to trap signals that are - ignored at the time that the shell was invoked by exec - has been fixed. - g. A bug which could cause a core dump when a discipline - function was unset within a discipline was fixed. - h. The typeset builtin now accepts a first argument of - + or - for compatibility with ksh88. - i. For compatibility with ksh88, the results of expansions - of command arguments will treat the extended character - match characters ()|& as ordinary characters. - j. A bug which caused read to fail on a file that was - open for read/write with <> when the first operation - was print or printf has been fixed. - k. When a job is suspended, it is put on the top of - the job list as required by the POSIX standard. - l. The value of OPTARG when an option that required - an argument but didn't have one was incorrect in the - case the option string began with a :. - m. A bug which caused the terminal to get into a bad - state with some KEYBD traps in vi-mode has been fixed. - n. A bug which caused an invalid trap to cause a script - to terminate, rather than just return an error, has - been fixed. - o. Backreferencing sub-expressions in patterns and replacement - strings now works. - p. A bug in chmod which caused the -R option to fail has - been fixed. - -9. Bugs fixed in 12/28/93c for default OPTIONS - a. The expansion of "$@" was incorrect when $1 was the null - string. - b. A bug which could incorrectly report a syntax error in - a backquoted expression when a $ was preceded by \\ - has been fixed. - c. A bug which prevented the shell from exiting after - reporting an error when failing to open a script - has been fixed. - d. A bug that could lead to memory corruption when a - large here document that required parameter or command - substitution was expanded has been fixed. - e. A bug that could cause a core dump on some systems - after ksh detected an error when reading a function - has been fixed. - f. A bug which could cause a coprocess to hang when - reading from a process that has terminated has been fixed. - g. A bug which caused a script to terminate when set -e - was on and the first command of and && or || list - failed has been fixed. - h. A bug with here documents inside $(...) when the delimiter - word is an identifier has been fixed. - i. A bug which caused $0 to display the wrong value when - a script was invoked as an argument to the . command - and the eval command has been fixed. - j. A bug that could cause the built-in sleep to hang - has been fixed. - k. A bug introduces in 12/28/93b which caused the backslash - to be removed when it was followed by digit inside double - quotes in some instances has been fixed. - l. A bug which could cause a core dump if ksh was invoked with - standard input closed has been fixed. - m. A bug which could cause a core dump if typeset -A was - specified for an existing variable has been fixed. - n. Variables that were unset but had attributes such as readonly - and export were not listed with readonly, export and typeset. - o. Several problems with signals have been fixed. - p. A bug which prevented ulimit -t from working has been fixed. - Also, a bug in which failed ulimits could cause a core dump - has also been fixed. - q. A bug in expansion of the form ${name/#pattern/string} and - ${name/%pattern/string} has been fixed. - r. A bug which caused read -r on a line that contained only - blanks to get a non-null value has been fixed. - s. A bug introduced in the 'a' point release in which - ${x='\\'} expanded to \ when x was unset has been fixed. - t. A bug which prevented a trap on EXIT from being executed - when the last command in a script was a function invocation - has been fixed. - u. A bug which caused an interactive shell ignore input when - standard error was redirected to a file with exec, - and then restored with exec 2>&1 has been fixed. - v. An interactive shell turns on monitor mode even when - standard error has been redirected to a file. - w. A bug which could cause standard input to be incorrectly - positioned for the last command of a script has been fixed. - y. A bug in the edit modes which allowed walking back in - the history file for more than HISTSIZE commands has - been fixed. - z. A bug which could cause a core dump if variable TMPDIR was - changed between two command substitutions has been fixed. - aa. A bug which prevented a trap on EXIT from being cleared - has been fixed. - -10. Bugs fixed in 12/28/93d for default OPTIONS - a. The \ character was not handled correctly in replacement - patterns with ${x/pattern/replace}. - b. A bug with read in which the line did not end with - a new-line has been fixed. - c. A bug in file name generation which sometimes - appended a . for filenames that ended in / has - been fixed. - d. If a process is waited for after a status has - been returned by a previous wait, wait now - returns 127. - e. A bug with hist (fc) -e which prevented a command - to re-executed after it had been edited has been fixed. - f. A bug which prevented quoting from removing the meaning - of unary test operators has been fixed. - -11. Bugs fixed in 12/28/93e for default OPTIONS - a. Empty command substitutions of the form $() now work. - b. whence -v foo now gives the correct result after calling - builtin -d foo. - c. A bug in right to left arithmetic assignment for which - the arithmetic expression (( y = x = 1.5 )) did not - yield 1 for y when x was declared typeset -i was fixed. - d. printf has been fixed to handle format containing \0 - and/or \0145 correctly. In addition, characters following - %b in the format string are no longer displayed when - the operand contains \c. - e. A bug in printf that could cause the %E format to - produce unnormalized results has been fixed. - f. A bug which causes some arithmetic expressions to be - incorrectly evaluated as integer expressions rather - that floating point has been fixed. - g. Functions defined inside a subshell no longer remain - defined when the subshell completes. - h. The error message from sh -c ';echo foo' has been - corrected. - i. The format for umask -S has been changed to agree - with the specification in the POSIX standard. - j. A bug that caused side effects in subscript evaluation - when tracing was enabled for subscripts using ++ or -- - has been fixed. - k. To conform to the POSIX standard getopts has been changed - so that the option char is set to ? when it returns with - a non-zero exit status. - l. The handling of \} inside ${name...} has been fixed so - that the \ quotes the }. - m. A bug that caused the read builtin to resume execution - after processing a trap has been fixed. - n. [[ -s file ]] has been fixed so that if file is open - by ksh, it is flushed first. - o. In some cases attributes and sizes for non exported - variables weren't being reset before running a script. - p. The value of TMOUT was affected by changes make to - it in a subshell. - q. The jobs command did not reflect changes make by - sending the CONT signal to a command. - r. The error message for ksh -o unknown was incorrect. - s. Functions invoked as name=value name, did not use - values from the calling scope when evaluating value. - t. A bug in which the shell would re-execute previously - executed code when a shell script or coprocess was - run in the background has been fixed. - u. A bug in which an empty here-document would leave - a file descriptor open has been fixed. - v. A bug in which $(set -A array ...) would leave a - side effect has been fixed. - w. A discipline function for a global variable defined - within a function defined with the function keyword, - incorrectly created a local variable of the same name - and applied the discipline to it. - -12. Bugs fixed in 12/28/93f for default OPTIONS - a. A bug which would cause the secondary prompt to be - displayed when a user entered a literal carriage - return has been fixed. - b. I bug which caused ksh read -s name to core dump was - fixed. - c. I bug with the expansion of \} and \] inside double - quoted strings that also contained variable expansions - has been fixed - d. Changes in the 'e' point release caused autoload - functions invoked from within command substitution - to fail. This has been fixed. - e. A bug in the processing of here-documents that could - prevent variable substitution to occur after $(...) command - substitution for long here documents has been fixed. - f. A bug caused by a race condition that could cause SIGTERM - to be ignored by a child process has been fixed. - g. A bug which prevented the startup of a coprocess immediately - after killing a running coprocess has been fixed. - h. ulimit foobar, where foobar is not an arithmetic - expression, now gives an error message as it did with ksh88 - instead of setting the file size limit to 0. - i. A bug which could cause an interactive shell to terminate when - the last process of a pipeline was a POSIX function was fixed. - j. A bug which could cause command substitution of a shell script - to core dump has been fixed. - k. A security hole was fixed in suid_exec. - l. Arithmetic functions such as pow() that take more than - one argument, did not work if arguments other than the - first contained parenthesized sub-expression. - m. The error message from a script containing an incomplete - arithmetic expression has been corrected. - n. A bug which caused a core dump on some machines when - the value of a name reference contained a positional - parameter and the name reference was not defined inside - a function has been fixed. - o. Arithmetic expressions now correctly handle hexadecimal - constants. - p. A bug in which integer variables could be expanded - with a leading 10# when declared with typeset -i - multiple times has been corrected. - q. A bug in which IFS wasn't correctly restored when - set within command substitution has been fixed. - r. The _ character is now considered as part of a word - with the M-f and M-b emacs directives as it was in ksh88. - -13. Bugs fixed in 12/28/93g for default OPTIONS - a. A bug in which a name reference could be created to - itself and later cause the shell to get into an infinite - loop has been fixed. - b. A bug in shcomp relating to compound variables was fixed. - c. A bug introduced in 'e' in which leading 0's in -Z - fields caused the value to be treated as octal for arithmetic - evaluation has been fixed. - d. A bug when a name reference with a shorter name than - the variable it references was the subject of a compound - assignment has been fixed. - e. A bug which in which assignment to array variables in - a subshell could effect the parent shell has been - fixed. - f. read name?prompt was putting a 0 byte at the end of the - prompt on standard error. - g. A bug in [[ string1 > string2 ]] when ksh was run with -x - has been fixed. - k. A bug in which the escape character was not processed - correctly inside {...} when brace expansion is enabled - has been fixed, for example {\$foo}. - l. A bug in line continuation in here-documents has been - fixed. - m. The default base when not specified with typeset -i is - 10 in accordance with the documentation. Previously, - the value was determined by the first assignment. - n. A parsing bug in which a # preceded alphanumeric - characters inside a command substitution caused - a syntax error to be reported has been fixed. - o. A bug in which a decimal constant represented as 10#ddd - where ddd was more than five digits generated a syntax - error has been fixed. - p. A bug in here document expansion in which ${...} expansions - were split across buffer boundaries has been fixed. - -14. Bugs fixed in 12/28/93h for default OPTIONS - a. I bug in shcomp for compilation of unary operators with [[ ... ]] - has been fixed. - b. A bug in which the value of $? was changed when executing - a keyboard trap has been fixed. - c. The handling of SIGCHLD has been changed so that the - trap is not triggered while executing trap commands - to avoid recursive trap calls. - d. I bug in which a local variable in a function declared readonly - would generated an error when the function went out of - scope has been fixed. - e. I bug in which \ entered from the keyboard - with the KEYBD trap enabled has been fixed. - f. The error message for a misplaced ((, for example print ((3), - was often garbled and has been fixed. - g. I bug in the KEYBD trap in which escape sequences of the form - [#~ were not being handled as a unit has been fixed. - h. A bug in which ksh would consider expressions like [[ (a) ]] - as syntax errors has been fixed. - i. A function defined as foo() without a function body - was not reported as a syntax error. - j. A bug in which ksh could run out of file descriptors when - a stream was repeatedly opened with exec and read from - has been fixed. - k. A bug introduced when fixing item n from the 'g' point - release has been fixed. - -15. Bugs fixed in 12/28/93i for default OPTIONS - a. A bug in which a script could terminate when getopts - encountered an error when invoked inside a function - has been fixed. - b. When a symbolic link was specified as the name of - the script to invoke by name, the value of $0 was - set to the real file name rather than the link name - in some cases and this has been fixed. - -16. Bug fixes for specific non-default option combinations. - a. More signal names have been added for Solaris - b. A bug fixed for the v directive in vi MULTIBYTE has been - fixed. - c. Code to for IFS handling of multibyte characters has - been added. - d. The displaying of multibyte strings in export, readonly, - typeset, and execution traces has been fixed. - e. A bug with type ahead and KEYBOARD traps with the - MULTIBYTE option set has been fixed. - f. The k-shell information abstraction database option, KIA, - has been revamped for the 'e' point release. - g. A bug in brace pattern expansions that caused expressions - such as {foo\,bar,bam} to expand incorrectly have been fixed. - h. On the U/WIN version for Window 95 and Windows NT, - when a directory beginning with a letter followed by - a colon is given to cd, it is assumed to be an absolute - directory. - i. There was a bug in the compile option that does not - use fork() in which the current option settings where - not propagated to sub-shells. - j. A bug in setting .sh.editchar during the KEYBD trap - for the MULTIBYTE option was fixed in release 'h'. - k. A bug in which the precision given as an argument - to printf was not working has been fixed. - -17. Other changes to 12/28/93[abcdefghi] - a. A couple of minor changes to make adding built-ins easier. - b. Variables inside functions are now statically scoped. - The previous behavior was never documented. - c. A few changes have been made to the name-value library - that affect built-ins that use disciplines. The - changes allow disciplines to be shared by variables - and should make it possible to add new disciplines - without recompilation. - d. The name-value library interface has undergone significant - change for this revision. See the new nval.3 man page. - e. Builtin functions can take a third argument which is - a void*. - f. The nv_scan() function can restrict the scope of a walk - to the top scope. Starting in 'f', nv_scan() has an - additional pointer argument that is passed to each invoked - function. - g. Starting with release 'f', an empty for list behave like - a for list with null expansions. It produces a warning - message with sh -n. - h. Starting with release 'f' the code has been modified to - work with EBCDIC as well as ASCII. - i. Starting with the release 'g', the name-value pair library - uses the cdt library rather than the hash library. - j. The sh_fun() function now takes third argument which - is an argument list for the invoked discipline function - or built-in. - k. A callback function can be installed which will give - notification of file duplications and file closes. - -18. Incompatibilities with 12/28/93 version. - None intentional. diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/SHOPT.sh b/cde/programs/dtksh/ksh93/src/cmd/ksh93/SHOPT.sh deleted file mode 100644 index 23a6ec0a0..000000000 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/SHOPT.sh +++ /dev/null @@ -1,46 +0,0 @@ -# -# Compile-time SHOPT_* options for ksh93. -# 1 to enable, 0 to disable, empty value to probe. -# -# For a more complete description of the options, see src/cmd/ksh93/README. -# - -SHOPT 2DMATCH=1 # two dimensional ${.sh.match} for ${var//pat/str} -SHOPT ACCT= # accounting -SHOPT ACCTFILE= # per-user accounting info -SHOPT AUDIT=1 # enable auditing per SHOPT_AUDITFILE -SHOPT AUDITFILE='\"/etc/ksh_audit\"' # auditing file -SHOPT BGX=1 # one SIGCHLD trap per completed job -SHOPT BRACEPAT=1 # C-shell {...,...} expansions (, required) -SHOPT CMDLIB_HDR= # '' # custom -lcmd list for path-bound builtins -SHOPT CMDLIB_DIR= # '\"/opt/ast/bin\"' # virtual directory prefix for path-bound builtins -SHOPT CRNL= # accept MS Windows newlines () for -SHOPT DEVFD= # use /dev/fd instead of FIFOs for process substitutions -SHOPT DYNAMIC=1 # dynamic loading for builtins -SHOPT ECHOPRINT= # make echo equivalent to print -SHOPT EDPREDICT=0 # History pattern search menu (type #, then ESC TAB). Experimental. -SHOPT ESH=1 # emacs/gmacs edit mode -SHOPT FILESCAN=1 # fast file scan -SHOPT FIXEDARRAY=1 # fixed dimension indexed array -SHOPT GLOBCASEDET= # -o globcasedetect: adapt globbing/completion to case-insensitive file systems -SHOPT HISTEXPAND=1 # csh-style history file expansions -SHOPT KIA= # ksh -R + + + + +
+ +

+

general

+
+
+ +
What is KornShell?
+ +KornShell is a command and scripting language that is a superset of the System V UNIX shell, +aka, BourneShell (or +sh). + +
What is ksh?
+ +ksh is the name of the program that implements the KornShell language. + +
What is the history of ksh?
+ +ksh was written by David Korn at Bell Telephone Laboratories. +David Korn is currently at AT&T Research. +The first version of ksh was in 1983. +It was the first shell to have command line editing with both emacs and vi style interaction. +The 1986 version was the first to offer multibyte support. +The 1988 version of ksh is the version that was adopted by System V Release 4 UNIX +and was a source document for the IEEE POSIX and ISO shell standards. +The 1993 version is a major rewrite of the 1988 version and focuses more on scripting. + +
Where is the official description of the KornShell language?
+ +The Bolsky and Korn book, +The KornShell Command and Programming Language, +published by Prentice Hall, defines the 1988 version. +The newer Bolsky and Korn book, +The New KornShell Command and Programming Language, +also published by Prentice Hall, describes the 1993 version. +There are many new features since this book was published and +the man page for ksh93 is kept up to date. + +
What are the major new features of KornShell 1993?
+ +The only major new interactive features are key binding and tab completion. +Major new language features are floating point arithmetic, +associative arrays, complete ANSI C printf, name reference +variables, new expansion operators, dynamic loading of +built-in commands, active variables, and compound variables. +Active and compound variables allow shell variables to +behave like objects. The ability to define types was added in 2009. +In addition, ksh93 has been written to be +extensible with an C language API for programming extensions. + +
Are any further releases of ksh planned?
+ +Yes, the KornShell language and ksh implementation are in active development. +Most of the focus will be on scripting and reusability. + +
Why are newer release of ksh still called ksh93?
+ +We started the AST/ksh OpenSource release process in the late 90's. +At that point ksh93 was the well-known name for ksh. +The OpenSource release was finally granted in March 2000. +No one has since volunteered to repeat that process for kshXX. + +
How can I determine the release or version of a particular ksh?
+ +The current version and release string may be accessed by +${.sh.version} +and +$KSH_VERSION. +The format is Version features 93version[-/+] release: +
    +
  • +features -- +compile time features, typically enabled by SHOPT_foo state variables in the +ksh93 Makefile. +A single letter represents each feature: +
      +
    • +A +(SHOPT_AUDIT) +
    • +B +(SHOPT_BASH) +bash compatibility mode. +
    • +J +(SHOPT_COSHELL) +-lcoshell job pools. +
    • +j +(SHOPT_BGX) +
    • +L +(SHOPT_ACCT) +
    • +M +(SHOPT_MULTIBYTE) +
    • +P +(SHOPT_PFSH) +
    • +R +(SHOPT_REGRESS) +
    +
  • +version-- +a lowercase letter signifying major release points. +An optional - following features signifies an alpha release. +The first stable release has no -. +An optional + signifies a stable release with bug patches and minor enhancements. +
  • +release-- +the release date in YYYY-MM-DD form. +This date corresponds to AST package and git repository releases. +
+KSH_VERSION +in a numeric context is an integer that encodes the release +YYYYMMDD. + +
What new features are planned for ksh?
+ +We are in the early stage of planning but the likely additions +are namespaces, ability to read XML and JSON object into shell variables, +and handling of queued signals. +Support for multi-threading is also being considered. + +
Is KornShell public domain?
+ +Yes, the language description is public domain and +can be reimplemented. +Some of the KornShell language features have been reimplemented +in the GNU shell, bash, in zsh and mksh, and in pdksh, a public domain +implementation. + +
Is ksh public domain?
+ +No, earlier versions were owned by both AT&T and Novell. +The 1993 version is owned by both Lucent and AT&T. + +
Is source code available?
+ +Starting in March 2000, the ksh93 source is available +as part of a larger collection of software called +the ast-open software package which can be downloaded +from the +github page. + +
What are the licensing terms?
+ +The exact license terms can be found on the +licence page. + +
Does the license allow binaries to be freely redistributed?
+ +Yes, provided you make the license terms available to +everyone you distribute binaries to. + +
If I make changes to the code, do I have to make them public?
+ +No, you do not have to make them public. +However, if you distribute the changes, you must allow us to be able +to get these changes and distribute them along with the source. + +
Why do some vendors still ship ksh88, not ksh93?
+ +Since ksh88 was included in System V release 4, most vendors +have just included this version. However most Linux systems +and Mac OS provide ksh93 version 's' or later. Solaris11 uses +ksh93 as /bin/sh. + +
Do you provide support for ksh?
+ +No, we will try to fix any bugs we hear about in future +releases, but we do not provide any official support. + +
Is ksh supported commercially?
+ +Software vendors that supply ksh with +their systems typically support it for that system. + +
What is pdksh and is it related to ksh or KornShell?
+ +pdksh is a public domain version of a UNIX shell that is +unrelated to ksh. +It supports most of the 1988 KornShell language features and some of the 1993 features. +Some KornShell scripts will not run with pdksh. + +
How is the MKS Toolkit KornShell related to KornShell?
+ +MKS Toolkit KornShell is a completely independent implementation +that supports a subset of the 1988 KornShell language. + +
What systems does ksh run on?
+ +ksh has been written to be portable. +It has been ported to virtually run on every known UNIX system. +In addition, it runs on non-UNIX systems such as IBM's MVS using OpenEdition, and +Microsoft's Windows 9X, Windows NT and Windows 2000. +ksh is part of the UWIN (Unix for Windows) +software, + +
Does ksh conform to the IEEE POSIX and ISO shell standard?
+ +The 1993 version should conform to the 1992 standard. +At one point it had passed the test suite created by X/OPEN. + +
Will KornShell 88 scripts run with KornShell 93?
+ +In almost all cases, the answer is yes. +However, the IEEE POSIX and ISO standards required a few +changes that could cause scripts to fail. +There is a separate document that lists all known incompatibilities. + +
Can ksh run as /bin/sh?
+ +We have installed ksh as /bin/sh on several systems without +encountering any problems. It is /bin/sh on Solaris11. +Our Linux systems use this instead of bash. + +
+
+ +

+


interactive

+
+
+ +
How do I get separate history files for shell?
+ +ksh uses a shared history file for all shells that +use the same history file name. +This means that commands entered in one window will be seen by +shells in other windows. +To get separate windows, the HISTFILE variable needs to be set to different name +before the first history command is created. + +
How do I get the time of day in my prompt?
+ +You can use printf with supports the %T format for time and date formatting. +For example, the format %(%H:%M:%S)T specifies time in hour, minute, second +format and if no argument is specified, the current time is used. Thus setting +PS1='$(printf "%(%H:%M:%S)T" $' will output the time of day before the +$ prompt. + +
Why does the screen width not function correctly when non-printing characters are in my prompt?
+ +The shell computes the screen width by subtracting the width of the prompt from the screen width. +To account for non-printing characters, for example escape sequences that display in the title +bar, follow these characters with a carriage return. +The shell starts recomputing the width after each carriage return. + +
What is the PS4 prompt and how is it used?
+ +The PS4 prompt is evaluated and displayed before each line when +running an execution trace. +If unset, a + and a <space> will +be output before each line in the trace. +Putting '$LINENO' inside PS4 will cause the line number to be displayed. +Putting '$SECONDS' in the PS4 prompt will cause the elapsed time +to be displayed before each line. +Note that single quotes are used to prevent the expansion from happening +when PS4 is defined. + +
How is keybinding done?
+ +ksh93 provides a KEYBD trap that gets executed whenever a key +is entered from the keyboard. +Using this trap, and the associative +array feature of ksh93, a keybind function can easily be written +which will map any entered key sequence to another key sequence. + +
How do I get the arrow keys to work?
+ +Starting with the 'h' point release, on most keyboards you +do not have to do anything to get the arrow keys to work. +However, if they do not generate standard escape sequences, +then you will have to use a keybinding function to get them +to work. + +
Does ksh support file name completion?
+ +Yes, it does. +The default key binding is <ESC><ESC> +however, starting with the 'g' point release, <TAB> also works +for completion. + +
Does ksh support command completion?
+ +If you perform completion on the first word of a command, +ksh will do completion using aliases, functions, and commands. + +
Is completion programmable?
+ +Yes, using the key binding mechanism, you can script the behavior +of any key and therefore cause the current contents of any +line to be replaced by any other line. + +
Is there any way to get the command-line editor to go to more than a single line?
+ +The multiline option (now on by default) allows lines longer than the width +of the screen to be displayed on multiple lines on the screen. +Also in vi-mode, if you hit 'v' while in control mode, it will bring +up a full screen version of vi on the current command. +The command +will execute when you exit vi. + +
What is predictive editing?
+In 2010, a compile option was added that cause the shell to try to predict +what you were trying to type by looking in the history file for all lines +that matched and presenting them as a menu. Any line starting with # would +use the characters you type to find matching lines from the history file. +If you find the line you wanted, you can enter the number followed by +<TAB> or newline. However bugs in earlier version led to core dumps. + + +
Can I use the shell line editor on other commands?
+ +The command ie, that comes along with shell, can be used +to run line input oriented commands with command line editing. + +
When I do echo $?, I am getting 267. What does this mean?
+ +ksh93 reports process that terminate with a signal as 256+signo. +Earlier versions used 128+signo but this makes it impossible +to distinguish from a command exit with that value. +If you run +
+
+kill -l $?
+
+ +on this signal number, it will give the name of the signal +that caused this exit. + +
When I type builtin, I notice that some of these are full pathnames. What does this mean?
+ +Builtins that are not bound to pathnames are always searched +for before doing a path search. +Builtins that are bound +to pathnames are only executed when the path search would +bind to this pathname. + +
What is a self generating man page?
+ +A self generating man page is one that is generated by the +option parser within that command using an extended version +of the getopts function. +The man page can be generated in html, +troff, or directly for the terminal. +Most builtin commands +in the shell have self generating man pages so that you +can run for example, +kill --man +or +kill --html +to get +the description of kill to the screen or as an html file. +All self-documenting output is to the standard error, +so you must redirect 2>... to capture the output. +

+This same method can also be used for shell scripts. +Run +getopts --man +for more details. + +

What is autoloading?
+ +Autoloading was a method used in ksh88, and still permitted in ksh93 +to declare that a name corresponded to a function. +The function +would be loaded and executed when first referenced. +This was +necessary since FPATH was always searched after PATH with ksh88 +and therefore if you defined a function whose name was the same +as that of a program on your path, the program on your path +would have been executed. +With ksh93, when a pathname is +encountered that is on PATH, but also is in FPATH, this directory +is assumed to be a function directory. +Thus, you can have +function directories searched before program directories so +that autoloading is no longer needed. + +
Why does the output from 'time command 2> file' come out on the screen?
+ +The time command is a compound command in ksh and time is a reserved +word It can be followed by any pipeline. Thus, redirections applied +at the end are for the command, not to time itself. You can use +time {...;} 2> file to capture the timing output to a file. Note, +that with ksh, time works with all commands, for example, +time for i; do xxx;done. + +
When I run 'mv * ../elsewhere' I so that get '-ksh: mv: cannot execute [Arg list too long]', what causes this?
+ +UNIX systems have a limit to the space consumed by command arguments and +environment variables when running commands that are not built into +the shell. The configuration parameter ARG_MAX defines this limit. +You can run 'getconf ARG_MAX' to find the limit for your system. Note +that the shell expands * to the list of files in the current directory +before running mv. In many case the xargs or tw command can be +used to work around this problem by splitting the line into chunks +and invoking the command. Another way to work around this limit +is to make the command a builtin. On systems in which the cmd +library is installed, you can invoke 'builtin -f cmd mv' to make +mv a shell builtin in which case the line length limit no longer +applies. Another alternative is to use a for loop and invoke +the mv command for each file, for example, +'for i in *;do mv $i ../elsewhere;done'. +Starting with ksh93o+, a new feature was added to ksh to overcome +this limit in some cases. If a command is preceded by +'command -x', and it fails because there are two many arguments, +the command will be run multiple times with subsets of the arguments. +However, the change in ksh93o+ does not work in the above case +because the ../elsewhere is not used for each subset. This problem +was resolved starting in ksh93p so that +command -x mv * ../elsewhere +should work. Note that it is possible to do alias mv='command -x mv' + +
Is there any way to generate the list of .c files in the current directory and all the subdirectories?
+ +Starting with ksh93o+, the globstar option (set -G or set -o globstar) +was added. With globstar enabled, ** by itself matches zero or more +directories or files, and **/ matches zero or more directories so that +**/*.c will match all .c files under the current directory. + +
Is there any way to prevent sending a HUP signal to a job when I log out if I didn't nohup the job?
+ +Yes, the disown command tells ksh not to forward the HUP signal +to the specified jobs when it disconnects. + +
+
+ +

+


programming

+
+
+ +
What is the difference between * and @, for example, and ?
+ +When used outside of "", they are equivalent. +However, within +double quotes, "$@" produces one argument for each positional +parameter, and "$* produces a single argument. +Note that "$@" +preserves arguments lists, whereas $* may not unless both +word splitting and pathname expansion are disabled. + +
Why do I need spaces around { and } but not around ( and )?
+ +The characters ( and ) are shell metacharacters and are always +treated specially. +For historical reasons, { and } were +treated as reserved words and are only special as separate +words at locations in which a command can begin. + +
How do I get read to maintain the \ characters?
+ +Use read -r instead. + +
How can I a write a ksh script that responds directly to each character so that you user just has to enter y, not y<return>?
+ +There are two ways to do this. +The easiest is to use +
+
+read -n1 x
+
+ +Alternatively, you could do +
+
+function keytrap
+{
+	.sh.edchar=${sh.edchar}$'
+}
+trap keytrap KEYBD
+
+ +and then +
+
+read x
+
+ + +
What is the purpose of $'...'?
+ +The $'...' string literal syntax was added to ksh93 to solve the problem +of entering special characters in scripts. +It uses +ANSI C rules to translate the string between the '...'. +It would have been cleaner to have all "..." strings handle +ANSI C escapes, but that would not be backward compatible. + +
What is the -n option used for?
+ +You should always run ksh -n on each script you write. +The -n +option will check for syntax errors on paths that might not +even be checked when you run the script. +It also produces +a number of warning messages. + +
Why are both `...` and $(...) used for command substitution?
+ +The `...` method has some rather strange quoting rules +and does not nest easily. +$(...) was added to ksh88 to +make command substitution easy to use. +`...` is provided +for backwards compatibility only. + +
How can I tell if all the commands of a pipeline have succeeded?
+ +The pipefail option was added to the 'g' point release of ksh93. +With pipefail set, a pipeline will fail if any element of the +pipeline fails. +The exit status will be that of the first +command that has failed. + +
What is the difference between [...] and [[...]]?
+ +The [[...]] is processed as part of the shell grammar +whereas [...] is processed like any other command. +Operators and operands are detected when the command is +read, not after expansions are performed. +The shell does not +do word splitting or pathname generation inside [[...]]. +This allows patterns to be specified for string matching +purposes. You should use [[...]] instead of [...] and test. + +
How come [[ $foo == $bar ]] is true and [[ $bar == $foo ]] is false?
+ +The == operator is not symmetrical. +It takes a string on the left +and a pattern on the right. +However, if you double quote the right +hand side, which removes the special meaning of pattern match +characters, then this becomes a string comparison so that +[[ "$foo" == "bar" ]] and [[ "$bar" == "$foo" ]] are equivalent. + +
Why does ksh93 have print since echo already exists and is widely used?
+ +The behavior of echo varies from system to system. +The POSIX standard does not define the behavior of echo when +the first argument beings with a - or when any argument +contains a  character. +This makes echo pretty useless for +use in portable scripts. + +
What is $bar after running 'echo foo | read bar'?
+ +The answer is foo. +ksh runs the last component of a pipeline +in the current process. +Some shells run it as a subshell +as if you had invoked it as echo foo | (read bar). + +
How can I access a substring of a variable?
+ +The syntax ${varname:offset:len} can be used to generate +the string of length len starting at the specified +offset. String offsets start at 0. If :len is omitted, +then the remainder of the string will be used. Both offset +and len can be arithmetic expressions. A negative offset is +subtracted from the last offset. + +
What is the difference between ((expr)) and $((expr))?
+ +((expr)) is a command that evaluates an arithmetic expression. +The exit status of this command is 0 if the expression +evaluates to non-zero and is 1 if it evaluates to 0. +0 is an string expansion that expands to a string +representation of the value of this arithmetic expression. +It can be used anywhere a variable substitution is permitted. +

+ +

What is the difference between $((x*y)) and $(($x*$y))?
+ +In the first case the value of x and the value of y are multiplied +together, and then their result is converted to a string. +In the +second case variables $x, *, and $y are concatenated to form +an arithmetic expression which is then evaluated. +This can +yield different results, for example, +
+
+x=2+3 y=4+5
+print $((x*y)) \$(($x*$y))
+45 19
+When x and y are numeric the first form is recommended for better
+performance.
+
+ + +
How do I handle filenames with spaces in them?
+ +To be POSIX conforming, ksh has to do word splitting and +pathname expansion the results of substitutions. +You can +enclose variable substitutions in "..." to prevent both +word splitting and pathname expansion. +Alternatively, +you can disable word splitting by setting IFS='' and +pathname generation with set -o noglob. + +
What are active variables?
+ +By default shell variables are passive. +They hold values +given to them on assignment, and return values on reference. +Active variables allow the assignment and reference (and +other actions) be controlled by functions specific to that +variable. +At the shell level, a 'get', 'set', or 'unset' +shell function can be defined for any variable to make them +active, so that the function foo.set will be invoked whenever +the variable foo is assigned a value. +At the C interface +level, several functions can be stacked together for an +active variable. + +
What is the difference between function name and name()?
+ +In ksh88 these were the same. +However, the POSIX standard +choose foo() for functions and defined System V Release 2 +semantics to them so that there are no local variables +and so that traps are not scoped. +ksh93 keeps the ksh88 +semantics for functions defined as function name, and +has changed the name() semantics to match the POSIX +semantics. +Clearly, +function +name +is more useful. + +
What is the naming conventions for files in FPATH and can one file contain more than one function definition?
+ +You can have more than one function defined in each file defined +in FPATH and all of them will be added to the list of known +functions. Any commands placed in this file outside of function +definitions will be invoked first. The name of the file must be +that of the first function you invoke. If you have several functions +defined in one file, then you should create a link to each of the +function names that can potentially be invoked first. + +
What are name reference variables and how are they used?
+ +Reference variables are variables in which all references +and assignments refer to the variable that they reference. +For example, +
+
+typeset -n name=$1
+name=value
+
+ +is equivalent to +
+
+eval \$1='value'
+
+ +References are most useful for passing arguments such as +arrays to functions. + +
If i=1 and var1=some value, how do I print var$i to get its value?
+ +Either use +
+
+eval print var\$i
+
+ +or +
+
+typeset -n x=var$i
+print $x
+
+ + +
How can I shift the elements of an array?
+ +The shift special builtin-command only works for positional +parameters. +However, noting that array subscripts start at 0, you can use +
+
+typeset -A name "${name[@]:1}"
+
+ +to shift the array. + +
Why are the braces required with array references, e.g. ${x[1]}?
+ +It would be nice to do $x[1], but the POSIX shell would expand $x +and then search for the file pattern resulting by concatenating [1]. +ksh is POSIX compatible. + +
How do I get the list of subscript names for an associative array?
+ +The prefix operator ! in variable expansions can be used to get names. +To get the names of subscripts for an array, associative +or indexed, use ${!var[@]}. + +
How do I do global substitutions on the contents of shell variables?
+ +Use // instead of / for global substitution, ${var//aa/bb} will +expand to the value of var with each "aa" replaced by "bb". + +
How can I convert %XX values to ASCII?
+ +You can convert this to a sequence of ANSI C strings and then eval that +string, for example suppose the variable 'foo' contains %XX strings, then +
+
+eval print -r -- "\$'${foo//'%'@(??)/'\x\1"'\$'"}'"
+
+ +will print out the string in ASCII. + +
I want to use exec to open a file. How do I prevent the script from exiting if the exec fails?
+ +If you run +
+
+command exec ... || error ...
+
+ +then error will be executed if the exec fails, but the script +will not terminate. +The command builtin will prevent the shell +from exiting when special built-ins fail. + +
How do I execute a builtin inside a function of the same name?
+ +You use the command builtin for this. +For example, +
+
+function cd
+{
+	command cd "$@" && title "$PWD"
+}
+
+ +will run the builtin command cd from within the function cd +rather than calling the function cd recursively. + +
How are variables scoped in ksh?
+ +The scoping of variables was not defined for ksh88 but in ksh93 +static scoping was specified. +For example the output from +
+
+function f1
+{
+	print foo=$foo
+}
+function f2
+{
+	typeset foo=local
+	f1
+}
+foo=global
+f2
+
+ +will be "global". +To get f2 to cause f1 to print the local +value of foo, f2 can run "foo=$foo f1" instead. + +
Can you write a self reproducing program in KornShell?
+ +Yes, the following program is self reproducing. +Any shorter ones? +
+
+n="
+" q="'" x="cat <<-!" y=! z='n="$n" q="$q" x="$x" y=$y z=$q$z$q$n$x$n$z$n$y'
+cat <<-!
+n="$n" q="$q" x="$x" y=$y z=$q$z$q$n$x$n$z$n$y
+!
+
+ + +
+
+ +

+


redirections

+
+
+ +
How do I redirect both standard input and standard output to a file?
+ +Add the following redirections to the command. +> file 2> &1. +This will redirect standard output (file descriptor 1) to "file" and +standard error (file descriptor 2) to the same place as file descriptor 1. +ksh redirection allows you to redirect any single digit file descriptor +by putting the descriptor number in front of the redirection operator +with no intervening space. + +
Is there a way for the shell to pick the file number when I open a file?
+ +Yes, a redirection operator operator can be preceded by {n} without any +intervening space where n is the name of a variable. The file descriptor +will be placed in variable n. + +
How do I connect to a socket from a shell script?
+ +exec 3<> /dev/tcp/hostname/portnum +will open a tcp connection to portnum on hostname for +reading and writing on file descriptor 3. +You can then +use read and print statements with file descriptor 3, +or redirection operators <&3 or >&3 to use these connections. + +
How do I seek to a given location in a file?
+ +The redirection operators <# and ># allow you to seek to a specified +location in a file. The operator can be followed by an arithmetic +expression contained in ((...)). The variables CUR and EOF can be used +in the arithmetic expression to get relative locations or locations +relative to the end of file respectively. +Alternatively, <# and ># can be followed by a shell pattern. In this +case, the file will be positioned to beginning of the next line +containing this pattern. + +
What is the <<< redirection operator?
+ +It denotes a here-document in which the document is contained the +argument that follows <<< and therefore there is no delimiter. + +
What is the >; redirection operator?
+ +This operator writes the output into a temporary file in the same +directory as the file specified after >;. If the command completes +successfully, then the file is replaced. Otherwise, the +original file is unchanged and the temporary file removed. + +
What is the <>; redirection operator?
+ +The file is opened for reading and writing as with <>. However, +when the file is closed it is truncated to the its current location. + +
+
+ +

+


extensions

+
+
+ +
Is there a shell compiler?
+ +There is a separate command named shcomp that will convert +a script into an intermediate machine independent form. +The shell will detect this format whenever it runs a script and execute +directly from this intermediate format. + +
What is the advantage of making commands built-in?
+ +The startup time is reduced by a couple of orders of magnitude. +In addition, built-in commands can access ksh internals. + +
What is the disadvantage of making commands built-in?
+ +Errors in these built-ins can cause the shell to crash. + +
How do I add built-in commands?
+ +There are two ways to do this. +One is write a shared library +with functions whose names are b_xxxx where xxxx is the name of +the builtin. +The function b_xxxx takes three arguments. +The first +two are the same as a mail program. +The third parameter is +a pointer argument which will point to the current shell context. +The second way is to write a shared library with a function named +lib_init(). +This function will be called with an argument of 0 +after the library is loaded. +This function can add built-ins +with the sh_addbuiltin() API function. +In both cases, the +library is loaded into the shell with the "builtin" utility. + +
Can ksh93 be embedded?
+ +Yes, ksh93 can be compiled as a shared or dynamically linked +library which can be embedded into applications. +There is +an API for interfacing to shell variables and to several of +the internal shell functions. + +
Can I write GUI applications with ksh?
+ +There are two extensions to ksh that can be used to write +GUI applications as shell script. +One is dtksh which +was written by Steve Pendergrast at Novell and is +included with the Common Desktop Environment, CDE. +The other is +tksh which was written by Jeff Korn. +tksh combines the tk graphics +package with ksh93 and reimplements the tcl language +as an extension so that both tcl and ksh scripts +can run in the same address space. +The source for tksh +is included in the ast-open package. + +
+
+ + + + + +
show all answershide all answers
+

+


+ + + + + + +
June 19, 2012
+

+ +

+ + + diff --git a/docs/ksh/features.html b/docs/ksh/features.html new file mode 100644 index 000000000..978f01df4 --- /dev/null +++ b/docs/ksh/features.html @@ -0,0 +1,207 @@ + + + + + www/ksh/features.mm mm document + + + + + +
+ + + +

+

ksh features

+KSH-93 is the most recent version of the KornShell Language described in +The KornShell Command and Programming Language, +by Morris Bolsky and David Korn of AT&T Research. +The KornShell is a shell programming language, +which is upward compatible with +sh +(the Bourne Shell), +and is intended to conform to the IEEE P1003.2/ISO 9945.2 Shell and +Utilities standard. +KSH-93 provides an enhanced programming environment in +addition to the major command-entry features of the BSD +shell +csh. +With KSH-93, medium-sized programming tasks can be +performed at shell-level without a significant loss in performance. +In addition, +sh +scripts can be run on KSH-93 without modification. +

+The code should conform to the IEEE POSIX 1003.1 standard and to the +proposed ANSI C standard so that it should be portable to all +such systems. +Like the previous version, KSH-88, +it is designed to accept eight bit character sets +transparently, thereby making it internationally compatible. +It can support multi-byte characters sets with some characteristics +of the character set given at run time. +

+KSH-93 provides the following features, many of which were also inherent +in KSH-88: + +

+

Enhanced Command Re-entry Capability

+The KSH-93 history +function records commands entered at any shell level and stores +them, up to a user-specified limit, even after you log off. +This allows you to re-enter long commands with a few keystrokes +- even those commands you entered yesterday. +The history file allows for eight bit characters in +commands and supports essentially unlimited size histories. + +

+

In-line Editing

+In +sh +the only way to fix mistyped +commands is to backspace or retype the line. +KSH-93 allows you +to edit a command line using a choice of EMACS-TC or +vi +functions. +You can use the in-line editors to complete filenames as +you type them. +You may also use this editing feature when entering +command lines from your history file. +A user can capture keystrokes and rebind keys to customize the +editing interface. + +

+

Extended I/O Capabilities

+KSH-93 provides several I/O +capabilities not available in +sh, +including the ability to: +
    +
  • +specify a file descriptor for input and output +
  • +start up and run co-processes +
  • +produce a prompt at the terminal before a read +
  • +easily format and interpret responses to a menu +
  • +echo lines exactly as output without escape processing +
  • +format output using printf formats. +
  • +read and echo lines ending in "\e". +
+ +

+

Improved performance

+KSH-93 executes many scripts faster +than the System V Bourne shell. +A major reason for this is +that many of the standard utilities are built-in. +To reduce the time to initiate a command, KSH-93 allows +commands to be added as built-ins at run time +on systems that support dynamic loading such as System V Release 4. + +

+

Arithmetic

+KSH-93 allows you to do integer arithmetic in any +base from two to sixty-four. +You can also do double +precision floating point arithmetic. +Almost the complete set of C language operators are available +with the same syntax and precedence. +Arithmetic expressions can be used to as an argument expansion +or as a separate command. +In addition, there is an arithmetic for command that works +like the for statement in C. + +

+

Arrays

+KSH-93 supports both indexed and associative arrays. +The subscript for an indexed array is an arithmetic expression, +whereas, the subscript for an associative array is a string. + +

+

Functions and Aliases

+Two mechanisms - functions and +aliases - can be used to assign a user-selected identifier to +an existing command or shell script. +Functions allow local variables and provide scoping +for exception handling. +Functions can be searched for and loaded on first reference the +way scripts are. + +

+

Substring Capabilities

+KSH-93 allows you to create a +substring of any given string either by specifying the starting +offset and length, or by stripping off leading +or trailing substrings during parameter substitution. +You can also specify attributes, such as upper and lower case, +field width, and justification to shell variables. + +

+

Enhanced pattern matching capabilities

+KSH-93 allows you to specify +regular expressions for file and string matches. + +

+

Improved debugging

+KSH-93 can generate line numbers on execution traces. +Also, I/O redirections are now traced. +There is a DEBUG trap that gets evaluated after each command +so that errors can be localized. + +

+

Job Control

+On systems that support job control, including +System V Release 4, KSH-93 +provides a job-control mechanism almost identical to that of +the BSD "csh", version 4.1. +This feature allows you +to stop and restart programs, and to move programs between the +foreground and the background. + +

+

Added security

+KSH-93 can execute scripts which do not have read permission +and scripts which have the setuid and/or setgid set when +invoked by name, rather than as an argument to the shell. +It is possible to log or control the execution of setuid and/or +setgid scripts. +The noclobber option prevents you from accidentally erasing +a file by redirecting to an existing file. + +

+

Documentation

+Documentation for KSH-93 consists of an +Introduction to KSH-93, +Compatibility with the Bourne Shell, +a manual page and a +README file. +In addition, the +New KornShell Command and Programming Language +book is available from Prentice Hall. +

+


+ + + + + + +
March 13, 2012
+

+ +

+ + + diff --git a/docs/ksh/functions/dirs.txt b/docs/ksh/functions/dirs.txt new file mode 100644 index 000000000..1bc9346f4 --- /dev/null +++ b/docs/ksh/functions/dirs.txt @@ -0,0 +1,111 @@ +# +# DIRECTORY MANIPULATION FUNCTIONS PUSHD, POPD AND DIRS +# +# Uses global parameters _push_max _push_top _push_stack +integer _push_max=100 _push_top=100 +# Display directory stack -- $HOME displayed as ~ +function dirs +{ + typeset dir="${PWD#$HOME/}" + case $dir in + $HOME) + dir=\~ + ;; + /*) ;; + *) dir=\~/$dir + esac + print -r - "$dir ${_push_stack[@]}" +} + +# Change directory and put directory on front of stack +function pushd +{ + typeset dir= type=0 + integer i + case $1 in + "") # pushd + if ((_push_top >= _push_max)) + then print pushd: No other directory. + return 1 + fi + type=1 dir=${_push_stack[_push_top]} + ;; + +[1-9]|+[1-9][0-9]) # pushd +n + integer i=_push_top$1-1 + if ((i >= _push_max)) + then print pushd: Directory stack not that deep. + return 1 + fi + type=2 dir=${_push_stack[i]} + ;; + *) if ((_push_top <= 0)) + then print pushd: Directory stack overflow. + return 1 + fi + esac + case $dir in + \~*) dir=$HOME${dir#\~} + esac + cd "${dir:-$1}" > /dev/null || return 1 + dir=${OLDPWD#$HOME/} + case $dir in + $HOME) + dir=\~ + ;; + /*) ;; + *) dir=\~/$dir + esac + case $type in + 0) # pushd name + _push_stack[_push_top=_push_top-1]=$dir + ;; + 1) # pushd + _push_stack[_push_top]=$dir + ;; + 2) # push +n + type=${1#+} i=_push_top-1 + set -- "${_push_stack[@]}" "$dir" "${_push_stack[@]}" + shift $type + for dir + do (((i=i+1) < _push_max)) || break + _push_stack[i]=$dir + done + esac + dirs +} + +# Pops the top directory +function popd +{ + typeset dir + if ((_push_top >= _push_max)) + then print popd: Nothing to pop. + return 1 + fi + case $1 in + "") + dir=${_push_stack[_push_top]} + case $dir in + \~*) dir=$HOME${dir#\~} + esac + cd "$dir" || return 1 + ;; + +[1-9]|+[1-9][0-9]) + typeset savedir + integer i=_push_top$1-1 + if ((i >= _push_max)) + then print pushd: Directory stack not that deep. + return 1 + fi + while ((i > _push_top)) + do _push_stack[i]=${_push_stack[i-1]} + i=i-1 + done + ;; + *) print pushd: Bad directory. + return 1 + esac + unset '_push_stack[_push_top]' + _push_top=_push_top+1 + dirs +} diff --git a/docs/ksh/functions/emacs_keybind.txt b/docs/ksh/functions/emacs_keybind.txt new file mode 100644 index 000000000..1f2b8b747 --- /dev/null +++ b/docs/ksh/functions/emacs_keybind.txt @@ -0,0 +1,12 @@ +typeset -A Keytable +trap 'eval "${Keytable[${.sh.edchar}]}"' KEYBD +function emacs_keybind +{ + keybind $'\E[A' $'\020' # Up key + keybind $'\E[B' $'\016' # Down key + keybind $'\E[C' $'\06' # Right key + keybind $'\E[D' $'\02' # Left key + keybind $'\E[H' $'\01' # Home key + keybind $'\E[Y' $'\05' # End key + keybind $'\t' $'\E\E' # Tab for command-line completion +} diff --git a/docs/ksh/functions/getopt.txt b/docs/ksh/functions/getopt.txt new file mode 100644 index 000000000..fe1e97fb0 --- /dev/null +++ b/docs/ksh/functions/getopt.txt @@ -0,0 +1,28 @@ +function getopt +{ + typeset c optstring=$1 options= sep= + shift + while getopts $optstring c + do case $c in + [:?]) + exit 2 + ;; + *) + options="$options$sep-$c" + sep=' ' + if [[ $optstring == *$c:* ]] + then options=" $options $OPTARG" + fi + #then print -rn -- " -$c" "$OPTARG" + #else print -rn -- " -$c" + ;; + esac + done + print -rn -- "$options" + if [[ ${@:$OPTIND-1} != -- ]] + then print -rn -- " --" + fi + if [[ -n ${@:$OPTIND} ]] + then print -r -- " ${@:$OPTIND}" + fi +} diff --git a/docs/ksh/functions/keybind.txt b/docs/ksh/functions/keybind.txt new file mode 100644 index 000000000..501170a73 --- /dev/null +++ b/docs/ksh/functions/keybind.txt @@ -0,0 +1,14 @@ +typeset -A Keytable +trap 'eval "${Keytable[${.sh.edchar}]}"' KEYBD +function keybind # key action +{ + typeset key=$(print -f "%q" "$2") + case $# in + 2) Keytable[$1]='.sh.edchar=${.sh.edmode}'"$key" + ;; + 1) unset Keytable[$1] + ;; + *) print -u2 "Usage: $0 key [action]" + ;; + esac +} diff --git a/docs/ksh/functions/popd.txt b/docs/ksh/functions/popd.txt new file mode 100644 index 000000000..4924c1616 --- /dev/null +++ b/docs/ksh/functions/popd.txt @@ -0,0 +1,111 @@ +# +# DIRECTORY MANIPULATION FUNCTIONS PUSHD, POPD AND DIRS +# +# Uses global parameters _push_max _push_top _push_stack +integer _push_max=100 _push_top=100 +# Display directory stack -- $HOME displayed as ~ +function dirs +{ + typeset dir="${PWD#$HOME/}" + case $dir in + $HOME) + dir=\~ + ;; + /*) ;; + *) dir=\~/$dir + esac + print -r - "$dir ${_push_stack[@]}" +} + +# Change directory and put directory on front of stack +function pushd +{ + typeset dir= type=0 + integer i + case $1 in + "") # pushd + if ((_push_top >= _push_max)) + then print pushd: No other directory. + return 1 + fi + type=1 dir=${_push_stack[_push_top]} + ;; + +[1-9]|+[1-9][0-9]) # pushd +n + integer i=_push_top$1-1 + if ((i >= _push_max)) + then print pushd: Directory stack not that deep. + return 1 + fi + type=2 dir=${_push_stack[i]} + ;; + *) if ((_push_top <= 0)) + then print pushd: Directory stack overflow. + return 1 + fi + esac + case $dir in + \~*) dir=$HOME${dir#~} + esac + cd "${dir:-$1}" > /dev/null || return 1 + dir=${OLDPWD#$HOME/} + case $dir in + $HOME) + dir=\~ + ;; + /*) ;; + *) dir=\~/$dir + esac + case $type in + 0) # pushd name + _push_stack[_push_top=_push_top-1]=$dir + ;; + 1) # pushd + _push_stack[_push_top]=$dir + ;; + 2) # push +n + type=${1#+} i=_push_top-1 + set -- "${_push_stack[@]}" "$dir" "${_push_stack[@]}" + shift $type + for dir + do (((i=i+1) < _push_max)) || break + _push_stack[i]=$dir + done + esac + dirs +} + +# Pops the top directory +function popd +{ + typeset dir + if ((_push_top >= _push_max)) + then print popd: Nothing to pop. + return 1 + fi + case $1 in + "") + dir=${_push_stack[_push_top]} + case $dir in + \~*) dir=$HOME${dir#~} + esac + cd "$dir" || return 1 + ;; + +[1-9]|+[1-9][0-9]) + typeset savedir + integer i=_push_top$1-1 + if ((i >= _push_max)) + then print pushd: Directory stack not that deep. + return 1 + fi + while ((i > _push_top)) + do _push_stack[i]=${_push_stack[i-1]} + i=i-1 + done + ;; + *) print pushd: Bad directory. + return 1 + esac + unset '_push_stack[_push_top]' + _push_top=_push_top+1 + dirs +} diff --git a/docs/ksh/functions/pushd.txt b/docs/ksh/functions/pushd.txt new file mode 100644 index 000000000..1bc9346f4 --- /dev/null +++ b/docs/ksh/functions/pushd.txt @@ -0,0 +1,111 @@ +# +# DIRECTORY MANIPULATION FUNCTIONS PUSHD, POPD AND DIRS +# +# Uses global parameters _push_max _push_top _push_stack +integer _push_max=100 _push_top=100 +# Display directory stack -- $HOME displayed as ~ +function dirs +{ + typeset dir="${PWD#$HOME/}" + case $dir in + $HOME) + dir=\~ + ;; + /*) ;; + *) dir=\~/$dir + esac + print -r - "$dir ${_push_stack[@]}" +} + +# Change directory and put directory on front of stack +function pushd +{ + typeset dir= type=0 + integer i + case $1 in + "") # pushd + if ((_push_top >= _push_max)) + then print pushd: No other directory. + return 1 + fi + type=1 dir=${_push_stack[_push_top]} + ;; + +[1-9]|+[1-9][0-9]) # pushd +n + integer i=_push_top$1-1 + if ((i >= _push_max)) + then print pushd: Directory stack not that deep. + return 1 + fi + type=2 dir=${_push_stack[i]} + ;; + *) if ((_push_top <= 0)) + then print pushd: Directory stack overflow. + return 1 + fi + esac + case $dir in + \~*) dir=$HOME${dir#\~} + esac + cd "${dir:-$1}" > /dev/null || return 1 + dir=${OLDPWD#$HOME/} + case $dir in + $HOME) + dir=\~ + ;; + /*) ;; + *) dir=\~/$dir + esac + case $type in + 0) # pushd name + _push_stack[_push_top=_push_top-1]=$dir + ;; + 1) # pushd + _push_stack[_push_top]=$dir + ;; + 2) # push +n + type=${1#+} i=_push_top-1 + set -- "${_push_stack[@]}" "$dir" "${_push_stack[@]}" + shift $type + for dir + do (((i=i+1) < _push_max)) || break + _push_stack[i]=$dir + done + esac + dirs +} + +# Pops the top directory +function popd +{ + typeset dir + if ((_push_top >= _push_max)) + then print popd: Nothing to pop. + return 1 + fi + case $1 in + "") + dir=${_push_stack[_push_top]} + case $dir in + \~*) dir=$HOME${dir#\~} + esac + cd "$dir" || return 1 + ;; + +[1-9]|+[1-9][0-9]) + typeset savedir + integer i=_push_top$1-1 + if ((i >= _push_max)) + then print pushd: Directory stack not that deep. + return 1 + fi + while ((i > _push_top)) + do _push_stack[i]=${_push_stack[i-1]} + i=i-1 + done + ;; + *) print pushd: Bad directory. + return 1 + esac + unset '_push_stack[_push_top]' + _push_top=_push_top+1 + dirs +} diff --git a/docs/ksh/functions/title.txt b/docs/ksh/functions/title.txt new file mode 100644 index 000000000..2338ce6b4 --- /dev/null +++ b/docs/ksh/functions/title.txt @@ -0,0 +1,54 @@ +# add to (+), delete from (-), print (.), or set ([=]) window title +# arguments are eval'd before printing +# title text string exported in TITLE_TEXT + +function title # [+ | - | =] title ... +{ + typeset x t="$TITLE_TEXT" + + case $1 in + +) shift + case $# in + 0) ;; + *) for x + do case " $t " in + *" $x "*) ;; + " ") t=$x ;; + *) t="$t $x" ;; + esac + done + case $t in + $TITLE_TEXT) return 1 ;; + esac + ;; + esac + ;; + -) shift + case $# in + 0) ;; + *) for x + do case " $t " in + *" $x "*) t="${t%?( )$x*}${t##*$x?( )}" ;; + esac + done + case $t in + $TITLE_TEXT) return 1 ;; + esac + ;; + esac + ;; + .) print -r -- "$TITLE_TEXT" + return 0 + ;; + *) t="$*" + ;; + esac + export TITLE_TEXT="$t" + eval x=\"$t\" + case $TERM in + 630*) print -nr -- "[?${#x};0v$x" ;; + vt100|xterm*) print -nr -- "]0;$x" ;; + *) return 1 ;; + esac + return 0 +} diff --git a/docs/ksh/functions/vi_keybind.txt b/docs/ksh/functions/vi_keybind.txt new file mode 100644 index 000000000..56256bfa4 --- /dev/null +++ b/docs/ksh/functions/vi_keybind.txt @@ -0,0 +1,10 @@ +typeset -A Keytable +trap 'eval "${Keytable[${.sh.edchar}]}"' KEYBD +function vi_keybind +{ + keybind $'\E[A' k # Up key + keybind $'\E[B' j # Down key + keybind $'\E[C' l # Right key + keybind $'\E[D' h # Left key + keybind $'\t' '\' # Tab for command-line completion +} diff --git a/docs/ksh/index.html b/docs/ksh/index.html new file mode 100644 index 000000000..cf0663d35 --- /dev/null +++ b/docs/ksh/index.html @@ -0,0 +1,10 @@ + +KSH93 + +Overview
+FAQ
+Features
+Builtins
+Examples + + diff --git a/docs/ksh/ksh.html b/docs/ksh/ksh.html new file mode 100644 index 000000000..8df6639e8 --- /dev/null +++ b/docs/ksh/ksh.html @@ -0,0 +1,118 @@ + + + + + www/ksh/ksh.mm mm document + + + + + +
+ + + +

+

ksh overview

+The +KornShell +language was designed and developed by David G. Korn at AT&T Bell Laboratories and AT&T Research. +It is an interactive command language that provides access to the UNIX system and to many other systems, +on the many different computers and workstations on which it is implemented. +The +KornShell +language is also a complete, powerful, high-level programming language for writing applications, +often more easily and quickly than with other high-level languages. +This makes it especially suitable for prototyping. +There are two other widely used shells, the Bourne shell developed by Steven Bourne at AT&T Bell Laboratories, +and the C shell developed by Bill Joy at the University of California. +ksh +has the best features of both, plus many new features of its own. +Thus +ksh +can do much to enhance your productivity and the quality of your work, +both in interacting with the system, and in programming. +ksh +programs are easier to write, and are more concise and readable than programs written in a lower level language such as C. +

+The new version of +ksh +has the functionality of other scripting languages such as awk, icon, perl, rexx, and tcl. +For this and many other reasons, +ksh +is a much better scripting language than any of the other popular shells. +The code size for +ksh +is larger than the Bourne shell or C shell programs. +The revised version is even larger. +

+In spite of its increased size, +ksh +provides better performance. +You can write programs to run faster with +ksh +than with either the Bourne shell or the C shell, sometimes an order of magnitude faster. +ksh +has evolved and matured with extensive user feedback. +It has been used by many thousands of people at AT&T since 1982, and at many other companies and universities. +A survey conducted at one of the largest AT&T Bell Laboratories computer centers showed that 80% of their customers, both programmers and non-programmers, use +ksh. +ksh +is compatible with the Bourne shell. +Virtually all programs written for the Bourne shell run with +ksh. +If you are familiar with the Bourne shell, you can use +ksh +immediately, without retraining. +The new version of +ksh +is compatible with earlier versions of +ksh. +ksh +is readily available. +It is sold (source and binary) by AT&T and Novell, and by other companies under license from AT&T both in the USA and abroad. +It has been purchased by dozens of major corporations, and by many individuals for use on home computers. +ksh +is extensible. +

+The +KornShell +language uses the same syntax for built-in commands as for non built-in commands. +Therefore, system developers can add new commands "transparently" to the +KornShell +language; that is, with minimum effort and with no differences visible to users other than faster execution. +On systems with dynamic linking, it is possible to add new built-in commands at run time. +Novell has extended the new version of +ksh +to enable X-windows programming for their desktop +ksh +product, +dtksh. +dtksh +is a standard part of CDE, the Common Desktop Environment defined by COSE (Common Operating System Environment), supported by most major UNIX system hardware vendors. +An extended version of +ksh +that enables Tk programming, called tksh, is available as well. +

+ksh +is intended to conform to the Shell Language Standard developed by the IEEE POSIX 1003.2 Shell and Utilities Language Committee. +

+


+ + + + + + +
March 13, 2012
+

+ +

+ + + diff --git a/docs/ksh/scripts/cgi-lib.ksh.txt b/docs/ksh/scripts/cgi-lib.ksh.txt new file mode 100644 index 000000000..374b79bc6 --- /dev/null +++ b/docs/ksh/scripts/cgi-lib.ksh.txt @@ -0,0 +1,129 @@ +typeset -A COOKIE HEADER +typeset Cgi _CGI_c _CGI_multipart + +function cgi_header +{ + typeset h + for h in "${!HEADER[@]}" + do printf '%s: %s\n' "$h" "${HEADER[$h]}" + done + print +} + +function cgi_url +{ + if [[ $SERVER_PORT != 80 ]] + then print "http://$SERVER_NAME:$SERVER_PORT$SCRIPT_NAME" + else print "http://$SERVER_NAME$SCRIPT_NAME" + fi +} + +function cgi_parse +{ + if [[ $REQUEST_METHOD == POST ]] + then if [[ $CONTENT_TYPE == multipart/form-data* ]] + then _CGI_multipart=${TMPDIR-/tmp}/cgi-form-$$ + trap 'rm -rf "$_CGI_multipart"' EXIT + mkdir $_CGI_multipart + unset -f Cgi.set + typeset -A Cgi.file + typeset i b v + pax --nosummary --read --edit ",.*/,," --edit ",^,$_CGI_multipart/," + for i in $_CGI_multipart/* + do b=${i##*/} + if [[ $b == +([a-z]) ]] + then v=$(<$i) + eval Cgi.$b='$v' + else Cgi.file[$b]=$i + fi + done + else Cgi=$(<&0) # Read from stdin + fi + else Cgi="$QUERY_STRING" + fi + cgi_cookie "$HTTP_COOKIE" + HEADER["Content-type"]="text/html" +} + +function cgi_cookie +{ + typeset cookie=$1 name val c IFS=';' + set -- $cookie + for c + do + IFS='=' + set -- $c + name=${1##' '} val=${2##' '} # trim white space + name=${name%%' '} val=${val%%' '} + COOKIE[$name]=$val + done +} + +function cgi_setcookie # name value +{ + HEADER["Set-Cookie"]="$1=$2; path=$SCRIPT_NAME" +} + +## Cgi variable disciplines + +function Cgi.set +{ + set -f + typeset i j n val IFS='&' + set -- ${.sh.value} + for i + do n=${i%%=*} + [[ $n == [[:alpha:]_]*([[:alnum:]_]) ]] || continue + val=${i#$n=} + val=${val//+/ } + val=${val//@([\'\\])/'\'\1} + eval j=\${#${.sh.name}.${n}[@]} \ + "${.sh.name}.${n}[j]=\$'${val//'%'@(??)/'\x'\1"'\$'"}'" + done +} + +function cgi_C_init +{ + integer i + for ((i=1; i < 256; i++)) + do if (( i!=16#22 && i!=16#27 && i!=16#5C && i!=16#5B && i!=16#5D )) + then printf $'_CGI_c[$\'\\\\x%.2X\']=%%%.2X\n' $i $i + fi + done + print +} + +function cgi_encode +{ + typeset v=$1 + var=${v//' '/+} + cbrace='}' + eval var=${var//@([!a-zA-Z0-9_+])/\${_CGI_c[\\\1]$cbrace} + print -r -- "$var" +} + +function Cgi.get +{ + typeset i val name vname + if [[ ! ${_CGI_c[\\]} ]] + then val='"' + _CGI_c[""]=%00 + _CGI_c[$var]=%22 + _CGI_c[\']=%27 + _CGI_c[\]]=%5B + _CGI_c[\[]=%5D + _CGI_c[\\]=%5C + eval $(cgi_C_init) + unset -f cgi_C_init + fi + vname=${.sh.name} # .sh.name contains variable name + .sh.value= # .sh.value stores value + for i in ${!Cgi.@} + do + name=${i#$vname.} + nameref v=${i} + val=$(cgi_encode "$v") + .sh.value="${.sh.value}${.sh.value:+&}$name=$val" + done +} + diff --git a/docs/ksh/scripts/dump-cgi.ksh.txt b/docs/ksh/scripts/dump-cgi.ksh.txt new file mode 100644 index 000000000..579921626 --- /dev/null +++ b/docs/ksh/scripts/dump-cgi.ksh.txt @@ -0,0 +1,17 @@ +#!/bin/ksh + +. ./cgi-lib.ksh + +cgi_parse +cgi_header + +print "" +print "
"
+print -r "Url: $(cgi_url)"
+for i in ${!Cgi.*}
+do
+	nameref val=$i
+	print -r "$i = $val"
+done
+print "
" +print "" diff --git a/docs/ksh/scripts/env.txt b/docs/ksh/scripts/env.txt new file mode 100644 index 000000000..5989dd7e4 --- /dev/null +++ b/docs/ksh/scripts/env.txt @@ -0,0 +1,66 @@ +#! /usr/bin/ksh +# shell version of env command +case $(getopts '[-]' opt '--???man' 2>&1) in +version=[0-9]*) + usage=$'[-?@(#)env (AT&T Labs Research) 1999-05-20\n] + [-author?David Korn ] + [-license?http://www.research.att.com/sw/tools/reuse] + [+NAME?env - set environment for command invocation] + [+DESCRIPTION?\benv\b modifies the current environment according + to the \aname\a\b=\b\avalue\a arguments, and then + invokes \acommand\a with the modified environment.] + [+?If \acommand\a is not specified, the resulting environment + is written to standard output quoted as required for + reading by the \bsh\b.] + [i:ignore-environment?Invoke \acommand\a with the exact environment + specified by the \aname\a\b=\b\avalue\a arguments; inherited + environment variables are ignored. As an obsolete feature, + \b-\b by itself can be specified instead of \b-i\b.] + [u:unset]:[name?Unset the environment variable \aname\a if it was + in the environment. This option can be repeated to unset + additional variables.] + + [name=value]... [command ...] + + [+EXIT STATUS?If \acommand\a is invoked, the exit status of \benv\b + will be that of \acommand\a. Otherwise, it will be one of + the following:]{ + [+0?\benv\b completed successfully.] + [+126?\acommand\a was found but could not be invoked.] + [+127?\acommand\a could not be found.] + } + [+SEE ALSO?\bsh\b(1), \bexport\b(1)] + ' + ;; +*) + usage='iu:[name] [name=value]... [command ...]' + ;; +esac +clear= +while getopts "$usage" var +do case $var in + i) clear=1;; + u) command unset $OPTARG 2> /dev/null;; + esac +done +#[[ $var == "" ]] || exit 1 +shift $((OPTIND-1)) +if [[ $1 == - ]] # obsolete form +then clear=1 + shift +fi +if [[ $clear == 1 ]] +then typeset +x $(typeset +x) +fi +while true +do case $1 in + *=*) export "$1";; + *) break;; + esac + shift +done +if (( $# >0 )) +then exec "$@" +else export + exit 0 +fi diff --git a/docs/ksh/scripts/line.txt b/docs/ksh/scripts/line.txt new file mode 100644 index 000000000..7451ea51a --- /dev/null +++ b/docs/ksh/scripts/line.txt @@ -0,0 +1,2 @@ +#! /bin/ksh +read -r && print -r -- "$REPLY" diff --git a/docs/ksh/scripts/which.txt b/docs/ksh/scripts/which.txt new file mode 100644 index 000000000..1e4b009cb --- /dev/null +++ b/docs/ksh/scripts/which.txt @@ -0,0 +1,2 @@ +#! /bin/ksh +whence -p "$@" diff --git a/src/Mamfile b/src/Mamfile new file mode 100644 index 000000000..24e5bcaa3 --- /dev/null +++ b/src/Mamfile @@ -0,0 +1,15 @@ +note * +note * This build file is in the Make Abstract Machine (MAM) language. It was +note * first generated by nmake, but in the ksh 93u+m distribution we maintain +note * it manually because nmake had too many problems to keep using. The +note * Mamfiles are processed by mamake (src/cmd/INIT/mamake.c); we added +note * indentation to improve readability. The language is documented in +note * src/cmd/INIT/README-mamake.md. +note * +make test + make install + make all + exec - ${MAMAKE} -r '*/*' ${MAMAKEARGS} + done all virtual + done install virtual +done test virtual diff --git a/src/cmd/INIT/C+probe b/src/cmd/INIT/C+probe new file mode 100644 index 000000000..16077241d --- /dev/null +++ b/src/cmd/INIT/C+probe @@ -0,0 +1,870 @@ +: +### this script contains archaic constructs that work with all sh variants ### +# Glenn Fowler +# AT&T Research +# +# @(#)C probe (AT&T Research) 2012-02-29 +# +# probe [ -d ] c-compiler-path [ attributes ] +# +# common C probe preamble for the tool specific probes +# +# NOTE: some cc -E's do syntax analysis! + +# +# probe_* are first eval'd and then attempted from left to right +# + +probe_binding="-dy -dn -Bdynamic -Bstatic '-Wl,-ashared -Wl,+s' -Wl,-aarchive -call_shared -non_shared -dynamic -static -bshared -bstatic '' -static" +probe_env="CC_OPTIONS CCOPTS LD_OPTIONS LDOPTS LIBPATH LPATH" +probe_include="stdio.h iostream.h complex.h ctype.h plot.h stdarg.h varargs.h ranlib.h hash.h sys/types.h stab.h cmath cstdio iostream string" +probe_longlong="long 'long long'" +probe_longlong_t="__int64_t _int64_t __int64 _int64 int64" +probe_l="l yyreject m sin mopt sin" +probe_lxx="C exit ++ exit g++ exit" +probe_ppprefix="a n" +probe_size="size" +probe_src="cxx C cc c" +probe_sa=".sa" +probe_sd=".dll .lib .dll .x" +probe_sdb=".pdb" +probe_so=".dylib .so .sl" +probe_symprefix="_" +probe_verbose="'-v -v' '-# -#' '-d -d' -dryrun '-V -V'" +probe_version="--version -V -version -v" + +# +# the following are set by the preamble for the tool specific probe +# + +cc=cc +debug= +dir=. +dll=.dll +dynamic= +exe=exe +executable="test -x" +hosted= +ifs=${IFS-' + '} +obj=o +ppenv= +ppopt= +predef= +prepred= +sa= +sd= +sdb= +so= +sov= +static= +stdlib= +stdpp= +suffix_command= +if test "" != "$TMPDIR" -a -d "$TMPDIR" +then tmpdir=$TMPDIR +else tmpdir=/tmp +fi +tmpdir=$tmpdir/probe$$ +undef="define defined elif else endif error if ifdef ifndef include line pragma undef __STDC__ __ARGC__ __BASE__ __BASE_FILE__ __DATE__ __FILE__ __FUNCTION__ __INCLUDE_LEVEL__ __LINE__ __PATH__ __TIME__ __TIMESTAMP__ __VERSION__" +version_flags= +version_stamp= +version_string= + +# +# constrain the environment +# + +DISPLAY= +LC_ALL=C +export DISPLAY LC_ALL + +# +# now the common probes +# + +while : +do case $1 in + -d) debug=1 ;; + -*) set ''; break ;; + *) break ;; + esac + shift +done + +cc=$1 +case $cc in +[\\/]*|[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]:\\*) + ;; +*) echo "Usage: $0 [ -d ] c-compiler-path [ attributes ]" >&2 + exit 1 + ;; +esac +ATTRIBUTES= +eval $2 +_probe_PATH=$PATH +PATH=/usr/bin:/bin:$PATH + +case $0 in +*[\\/]*) dir=`echo $0 | sed -e 's,[\\/][\\/]*[^\\/]*\$,,'` ;; +esac + +$executable . 2>/dev/null || executable='test -r' + +case $SHELL in +[\\/]*|[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]:\\*) + sh=$SHELL + ;; +*) sh=/bin/sh + ;; +esac + +trap 'code=$?; cd ..; rm -rf $tmpdir; exit $code' 0 1 2 3 +mkdir $tmpdir +cd $tmpdir + +exec 3>&1 4>&2 /dev/null 2>&1 + (ulimit -c 0) >/dev/null 2>&1 && ulimit -c 0 + ;; +*) PS4='+$LINENO+ ' + set -x + ;; +esac + +if (xxx=xxx; unset xxx) +then UNSET=1 +else UNSET= +fi +eval set x $probe_env +while : +do shift + case $# in + 0) break ;; + esac + eval x='$'$1 + case $x in + '') continue ;; + esac + case $1 in + *PATH) _probe_export="$_probe_export $1='$x'" ;; + esac + case $UNSET in + '') eval $1= + export $1 + ;; + *) unset $1 + ;; + esac +done + +if test -f "$dir/probe.ini" +then . "$dir/probe.ini" + IFS=$ifs +fi + +mkdir suffix +cd suffix +for src in $probe_src +do echo "int main(){return 0;}" > ../test.$src + rm -f test* + if $cc -c ../test.$src + then set test.* + if test -f "$1" + then o="$*" + mv $* .. + for i in $o + do if $cc -o test.exe ../$i + then obj=`echo "$i" | sed -e 's,test.,,'` + $executable test.exe || executable="test -r" + set test* + rm * + if $cc -o test ../$i + then rm $* + set test.* + if $executable "$1" + then exe=`echo "$1" | sed -e 's,test.,,'` + suffix_command=.$exe + fi + fi + break 2 + fi + done + fi + fi +done +cd .. + +case $src in +c) ;; +*) echo '// ( +int +main() +{ + class { public: int i; } j; + j.i = 0; + int k = j.i + 1; + return k; +}' > dialect.$src + if $cc -c dialect.$src && $cc -o dialect.$exe dialect.$obj && $executable dialect.$exe + then mv dialect.$src dialect.c + rm -f dialect.$obj dialect.$exe + if $cc -c dialect.c && $cc -o dialect.$exe dialect.$obj && $executable dialect.$exe + then src=c + else set x $cc + while : + do shift + case $# in + 0) break ;; + esac + case $1 in + *=*) continue ;; + esac + case `echo $1 | sed -e 's,.*/,,'` in + *CC*|*++*|*[xX][xX]*|*[pP][lL][uU][sS]*) ;; + *) src=c ;; + esac + break + done + fi + else src=c + fi + ;; +esac + +set x x '(' 1 'int x;' 0 +while : +do shift + shift + case $# in + [01]) break ;; + esac + rm -f test.$obj + echo "$1" > test.$src + $cc -c test.$src + r=$? + case $r in + 0) test -f test.$obj || r=1 ;; + *) r=1 ;; + esac + case $2:$r in + 0:0) ;; + 0:1) echo "$cc: not a C compiler: failed to compile \`\`$1''" >&4 + exit 1 + ;; + 1:0) echo "$cc: not a C compiler: successfully compiled \`\`$1''" >&4 + exit 1 + ;; + esac +done + +hosttype=`package CC="$cc" || $SHELL -c "package CC='$cc'"` +case $hosttype in +*[Uu][Ss][Aa][Gg][Ee]:*) + hosttype=`PATH=$_probe_PATH; export PATH; package CC="$cc" || $SHELL -c "package CC='$cc'"` + ;; +esac + +echo '#include +int main(){printf("hello");return 0;}' > dynamic.$src +echo 'extern int sfclose() { return 0; }' > fun.$src +if $cc -c dynamic.$src && $cc -c fun.$src +then eval set x $probe_so + while : + do shift + case $# in + 0) break ;; + esac + for i in foo junk + do rm -f dynamic.$exe + if $cc -L. -o dynamic.$exe dynamic.$obj -l$i + then : "there's really a -l$i"? + else rm -f dynamic.$exe + cat fun.$obj > lib$i$1 + $cc -L. -o dynamic.$exe dynamic.$obj -l$i && $executable dynamic.$exe + x=$? + rm lib$i$1 + case $x in + 0) so=$1 + rm -f dynamic.$exe > lib$i$1.1 + $cc -L. -o dynamic.$exe dynamic.$obj -l$i && $executable dynamic.$exe + x=$? + rm lib$i$1.1 + case $x in + 0) sov=1 ;; + esac + break 2 + ;; + *) break + ;; + esac + fi + done + k= + for i in "" .1 .2 .3 .4 .5 .6 .7 .8 .9 + do rm -f dynamic.$exe > libc$1$i + $cc -L. -o dynamic.$exe dynamic.$obj && $executable dynamic.$exe + x=$? + (cd ..; rm $tmpdir/libc$1$i) + case $x in + 0) ;; + *) k=X$k + case $k in + XXX) break ;; + esac + ;; + esac + done + case $k in + XXX) so=$1 + sov=1 + break + ;; + ?*) so=$1 + break + ;; + esac + done + rm -f dynamic.$exe + if $cc -o dynamic.$exe dynamic.$obj 2>e && $executable dynamic.$exe + then e=`wc -l e` + maybe= + eval set x x $probe_binding + while : + do shift + shift + case $# in + 0) break ;; + esac + rm -f dynamic.$exe + $cc -o dynamic.$exe $1 dynamic.$obj 2>e && $executable dynamic.$exe || continue + case $1 in + ?*) case $maybe in + "") maybe=$1 ;; + *) maybe=-- ;; + esac + ;; + esac + case `wc -l e` in + $e) ;; + *) continue ;; + esac + d=`ls -s dynamic.$exe` + rm -f dynamic.$exe + $cc -o dynamic.$exe $2 dynamic.$obj 2>e && $executable dynamic.$exe || continue + case `wc -l e` in + $e) ;; + *) continue ;; + esac + case `ls -s dynamic.$exe` in + $d) ;; + *) dynamic=$1 + static=$2 + maybe= + break + ;; + esac + done + case $maybe in + ""|--) ;; + *) rm -f dynamic.$exe + if $cc -o dynamic.$exe $maybe dynamic.$obj 2>e && $executable dynamic.$exe + then e=`wc -l e` + if $cc -o dynamic.$exe $maybe-bogus-bogus-bogus dynamic.$obj 2>e && $executable dynamic.$exe + then case `wc -l e` in + $e) ;; + *) dynamic=$maybe ;; + esac + else dynamic=$maybe + fi + fi + ;; + esac + fi +fi + +eval set x $probe_version +shift +for o in "$@" +do if $cc $o > version.out 2>&1 + then version_string=`sed -e '/ is /d' -e 's/;/ /g' version.out | sed -e 1q` + case $version_string in + ''|*[Ee][Rr][Rr][Oo][Rr]*|*[Ff][Aa][Tt][Aa][Ll]*|*[Ww][Aa][Rr][Nn][Ii][Nn][Gg]*|*[Oo][Pp][Tt][Ii][Oo][Nn]*) + ;; + *) version_flags=$o + version_stamp=";VERSION;$o;$version_string;PATH;$cc" + break + ;; + esac + fi +done +case $version_stamp in +'') eval set x $probe_version + shift + echo 'int main() { return 0; }' > version.i + for o in "$@" + do if $cc -c $o version.i > version.out 2>&1 + then version_string=`sed -e '/ is /d' -e 's/;/ /g' version.out | sed -e 1q` + case $version_string in + ''|*[Ee][Rr][Rr][Oo][Rr]*|*[Ff][Aa][Tt][Aa][Ll]*|*[Ww][Aa][Rr][Nn][Ii][Nn][Gg]*|*[Oo][Pp][Tt][Ii][Oo][Nn]*) + ;; + *) version_flags=$o + break + ;; + esac + fi + done + ;; +esac + +echo 'int main(){return 0;}' > hosted.$src +$cc -o hosted.$exe hosted.$src && ./hosted.$exe && hosted=1 + +echo '#!'$sh' +echo "" $@' > cpp +chmod +x cpp +case `./cpp -Dprobe` in +*-Dprobe*) + ;; +*) cp /bin/echo cpp + chmod u+w cpp + ;; +esac +for prefix in $probe_ppprefix `echo $cc | sed -e '/cc\$/!d' -e 's,cc\$,,' -e 's,.*/,,'` +do cp cpp ${prefix}cpp +done + +echo "" > flags.$src +echo '#pragma pp:version' > libpp.$src + +if test `realcppC=./cpp $cc -Dprobe -E flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1 +then ppenv='realcppC=${ppcmd}' +elif test `cppC=./cpp $cc -Dprobe -E flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1 +then ppenv='cppC=${ppcmd}' +elif test `_CPPNAME=./cpp $cc -Dprobe -E flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1 +then ppenv='_CPPNAME=${ppcmd}' +elif test `_CPP=./cpp $cc -Dprobe -E flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1 +then ppenv='_CPP=${ppcmd}' +elif test `$cc -Dprobe -E -%p+. flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1 && test `$cc -Dprobe -E -%p+. flags.$src | wc -l` -eq 1 +then ppopt='-%p+${ppdir}' +elif test `$cc -Dprobe -E -Yp,. flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1 +then ppopt='-Yp,${ppdir}' +elif test `$cc -Dprobe -E -Qpath $tmpdir flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1 +then ppopt='-Qpath ${ppdir}' +elif test `$cc -Dprobe -E -tp -B./ flags.$src 2>err.out | tee cpp.out | grep -c '[-]Dprobe'` -eq 1 -a ! -s err.out +then ppopt='-tp -B${ppdir}/' +elif test `$cc -Dprobe -E -B./ flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1 +then ppopt='-B${ppdir}/' +elif test `$cc -Dprobe -E -tp -h./ -B flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1 +then ppopt='-tp -h${ppdir}/ -B' +elif test `$cc -Dprobe -E -t p,./cpp flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1 +then ppopt='-t p,${ppcmd}' +else { + eval set x $probe_verbose + shift + for o in "$@" + do $cc -E $o flags.$src + done + } 2>&1 | sed -e "s/['\"]//g" > cpp.out +fi + +set x `sed -e 's,[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]:\\\\,/,g' -e 's,\\\\,/,g' cpp.out` +def= +definclude="-I+C -I-H" +stdinclude=$definclude +case $hosted in +"") usrinclude= ;; +esac +cmdinclude= +while : +do case $# in + 0|1) break ;; + esac + shift + case $1 in + -A) case $2 in + *\(*\)) shift + prepred="$prepred `echo $1 | sed 's/\(.*\)(\(.*\))/\1 \2/'`" + ;; + esac + ;; + -A\(*\)) + prepred="$prepred `echo $1 | sed 's/-A\(.*\)(\(.*\))/\1 \2/'`" + ;; + -[DI][-+][ABCDEFGHIJKLMNOPQRSTUVWXYZ]*) + stdpp=1 + case $1 in + -I?[CH]) case $def in + ?*) definclude="$definclude $1" ;; + *) stdinclude="$stdinclude $1" ;; + esac + ;; + -I-S*|-YI,*) usrinclude="`echo $1 | sed 's/....//'`" ;; + -Y?,*) ;; + -Y*) usrinclude="`echo $1 | sed 's/..//'`" ;; + esac + ;; + -D) shift + case $1 in + [ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_]*=*) + predef="$predef +`echo $1 | sed -e 's/=.*//'`" + ;; + [ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_]*) + predef="$predef +$1" + ;; + esac + ;; + -Dprobe);; + -D*) case $1 in + -D[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_]*=*) + predef="$predef +`echo $1 | sed -e 's/^-D//' -e 's/=.*//'`" + ;; + -D[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_]*) + predef="$predef +`echo $1 | sed -e 's/^-D//'`" + ;; + esac + ;; + -I) shift + case $1 in + /*) case $def in + ?*) definclude="$definclude $1" ;; + *) stdinclude="$stdinclude $1" ;; + esac + cmdinclude="$cmdinclude $1" + ;; + esac + ;; + -I/*) f=`echo X$1 | sed 's/X-I//'` + case $def in + ?*) definclude="$definclude $f" ;; + *) stdinclude="$stdinclude $f" ;; + esac + cmdinclude="$cmdinclude $f" + ;; + -U) shift + undef="$undef $1" + ;; + -U*) undef="$undef `echo $1 | sed 's/^-U//'`" + ;; + flags.$src)def= + ;; + esac +done +stdinclude="$stdinclude $definclude" +case " $stdinclude " in +*\ $usrinclude\ *) + case $usrinclude in + /usr/include) + usrinclude= + ;; + *) case " $stdinclude " in + *\ /usr/include\ *) + usrinclude= + ;; + *) usrinclude=/usr/include + ;; + esac + ;; + esac + ;; +esac + +tstinclude=`$cc -v -E flags.$src 2>&1 | sed -e '1,/[iI][nN][cC][lL][uU][dD][eE][ ]*<[.][.][.]>/d' -e '/^[eE][nN][dD] [oO][fF] [sS][eE][aA][rR][cC][hH]/,\$d'` +j=$tstinclude +case $j in +*/*) ;; +*) j=$cmdinclude ;; +esac +tstinclude= +good= +nogood= +c_hdr="stdio.h ctype.h" +C_hdr="libc.h" +for i in $j +do if test -d "$i" + then tstinclude="$tstinclude $i" + h= + for f in $c_hdr + do if test -f "$i/$f" + then case $i in + */CC) nogood=1 ;; + *) good=1 ;; + esac + else h="$h $f" + fi + done + c_hdr=$h + h= + for f in $C_hdr + do if test -f "$i/$f" + then case $i in + */CC) nogood=1 ;; + *) good=1 ;; + esac + else h="$h $f" + fi + done + C_hdr=$h + fi +done +case $nogood in +1) good=0 ;; +esac +case $good in +1) case $c_hdr in + ?*) bad=1 + usrinclude=/usr/include + set '' $tstinclude /usr/include + ;; + *) set '' $tstinclude + ;; + esac + shift + stdinclude=$* + echo "#include " > include.$src + $cc -E include.$src | sed -e '/# 1 "[\\/]/!d' -e 's,[^"]*",,' -e 's,[\\/][^\\/]*".*,,' -e 's,[\\/]sys,,' > include.out + for f in `cat include.out` + do if test -d "$f" + then g=`echo $f | sed -e 's,[\\/][\\/]*[^\\/]*$,,'` + case " $stdinclude " in + *\ $f\ *|*\ $g\ *) + ;; + *) stdinclude="$stdinclude $f" + case $f in + /usr/include) usrinclude=$f ;; + esac + bad=1 + ;; + esac + fi + done + ;; +*) case $ppopt$ppenv in + ?*) echo '#!'$sh' + echo $VIRTUAL_ROOT | sed "s/:.*//"' > cpp + chmod +x cpp + ppcmd=cpp + ppdir=. + eval x='`'$ppenv '$'cc -E $ppopt flags.$src'`' + case $x in + ?*) tstinclude=$x/usr/include + ;; + esac + cp /bin/echo cpp + chmod u+w cpp + ;; + esac + + eval set x $probe_include + while : + do shift + case $# in + 0) break ;; + esac + echo "#include <$1>" > include.$src + $cc -E include.$src + done > include.out + + ccinclude= + x=$stdinclude + stdinclude= + subinclude= + for f in $x $tstinclude `sed -e 's,\\\\,/,g' -e 's,///*,/,g' -e 's,"[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]:/,"/,g' -e '/^#[line ]*[0123456789][0123456789]*[ ][ ]*"[\\/]/!d' -e 's/^#[line ]*[0123456789][0123456789]*[ ][ ]*"\(.*\)[\\/].*".*/\1/' include.out | sort -u` + do case $f in + -*) ;; + */) f=`echo $f | sed -e 's,//*\$,,'` ;; + */.) f=`echo $f | sed -e 's,//*.\$,,'` ;; + esac + case $f in + -I*) ;; + */cc) ccinclude=1 + ;; + */sys) continue + ;; + */include/*/*) + ;; + */include/*) + subinclude="$subinclude $f" + continue + ;; + esac + if test -d "$f" + then case " $stdinclude " in + *\ $f\ *) ;; + *) stdinclude="$stdinclude $f" ;; + esac + fi + done + rm include.out + case $ccinclude in + ?*) eval set x $probe_include + while : + do shift + case $# in + 0) break ;; + esac + echo "#include " > include.$src + if $cc -E include.$src > /dev/null + then break + fi + done + case $# in + 0) ;; + *) x=$stdinclude + stdinclude= + for f in $x + do case $f in + */cc) ;; + *) stdinclude="$stdinclude $f" ;; + esac + done + ;; + esac + ;; + esac + case $subinclude in + ?*) for i in $subinclude + do for j in $stdinclude + do case $i in + $j/*/*) ;; + $j/*) both= + eval set x $probe_include + while : + do shift + case $# in + 0) for k in $both + do echo "#include <$k>" > include.$src + $cc -E include.$src > include.out + I=`grep -c $i/$k < include.out` + J=`grep -c $j/$k < include.out` + case $I:$J in + 0:*) ;; + *:0) stdinclude="$i $stdinclude" + break + ;; + esac + done + continue 3 + ;; + esac + if test -f $i/$1 + then if test ! -f $j/$1 + then break 2 + fi + both="$both $1" + fi + done + ;; + $j) continue 2 + ;; + esac + done + stdinclude="$i $stdinclude" + done + ;; + esac + + { + + for i in $stdinclude + do + case $i in + $usrinclude) ;; + *) echo $i $i ;; + esac + done + + eval set x $probe_include + while : + do shift + case $# in + 0) break ;; + esac + echo "#include <$1>" > t.c + p= + for j in `$cc -E t.c | grep "$1" | sed -e 's,\\\\,/,g' -e 's,"[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]:/,"/,g' -e '/^#[line ]*1[ ][ ]*"[\\/]/!d' -e 's/^#[line ]*1[ ][ ]*"\(.*\)[\\/].*".*/\1/'` + do j=`echo $j | sed -e 's,///*,/,g' -e 's,/$,,'` + case $p in + ?*) echo $p $j ;; + esac + p=$j + done + done + + case $usrinclude in + ?*) echo $usrinclude $usrinclude ;; + esac + + } | tsort > tmp.tmp + tstinclude=`cat tmp.tmp` + bad= + for i in $stdinclude + do case " +$tstinclude +" in + *" +$i +"*) ;; + *) bad=1 + break + ;; + esac + done + ;; +esac + +case $bad in +"") x=$stdinclude + stdinclude= + z= + for i in $tstinclude + do case " $x " in + *" $i "*) + stdinclude="$stdinclude $i" + z=$i + ;; + esac + done + case $usrinclude in + '') usrinclude=$z ;; + esac + ;; +esac +case $hosted in +"") case $usrinclude in + /usr/include) usrinclude= ;; + esac + ;; +esac + +case $usrinclude in +?*) case " $stdinclude " in + *\ $usrinclude\ *) + x=$stdinclude + stdinclude= + for f in $x + do case $f in + $usrinclude) ;; + *) stdinclude="$stdinclude $f" ;; + esac + done + ;; + esac + ;; +esac + +# drop dups -- they creep in somehow + +x=$stdinclude +stdinclude= +for f in $x +do case " $stdinclude $usrinclude " in + *" $f "*) ;; + *) stdinclude="$stdinclude $f" ;; + esac +done diff --git a/src/cmd/INIT/Mamfile b/src/cmd/INIT/Mamfile new file mode 100644 index 000000000..612840057 --- /dev/null +++ b/src/cmd/INIT/Mamfile @@ -0,0 +1,1070 @@ +note * +note * This build file is in the Make Abstract Machine (MAM) language. It was +note * first generated by nmake, but in the ksh 93u+m distribution we maintain +note * it manually because nmake had too many problems to keep using. The +note * Mamfiles are processed by mamake (src/cmd/INIT/mamake.c); we added +note * indentation to improve readability. The language is documented in +note * src/cmd/INIT/README-mamake.md. +note * +setv INSTALLROOT ../../.. +setv PACKAGEROOT ../../../../.. +setv CC cc +setv mam_cc_FLAGS +setv CCFLAGS ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${mam_cc_OPTIMIZE}?} +setv CCLDFLAGS ${-strip-symbols?1?${mam_cc_LD_STRIP}??} +setv COTEMP $$ +setv LDFLAGS +make install + make iffe + make iffe.sh + done iffe.sh + prev iffe.sh + exec - case static,port:$OPTIND:$RANDOM in + exec - ?*:*:*|*::*|*:*:$RANDOM) + exec - ;; + exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null + exec - then if grep '### .*archaic.* ###' >/dev/null + exec - then : iffe contains archaic constructs : + exec - else ENV= LC_ALL=C $SHELL -n iffe.sh + exec - fi + exec - fi + exec - ;; + exec - esac + exec - case '${mam_cc_SHELLMAGIC}' in + exec - "") case 225 in + exec - 0) cp iffe.sh iffe + exec - ;; + exec - *) { + exec - i=`(read x; echo $x) < iffe.sh` + exec - case $i in + exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;; + exec - esac + exec - cat iffe.sh + exec - } > iffe + exec - ;; + exec - esac + exec - ;; + exec - *) cat - iffe.sh > iffe <<'!' + exec - ${mam_cc_SHELLMAGIC} + exec - ! + exec - ;; + exec - esac + exec - test -w iffe -a -x iffe || chmod u+w,+x iffe + done iffe generated + make mktest + make mktest.sh + done mktest.sh + prev mktest.sh + exec - case static,port:$OPTIND:$RANDOM in + exec - ?*:*:*|*::*|*:*:$RANDOM) + exec - ;; + exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null + exec - then if grep '### .*archaic.* ###' >/dev/null + exec - then : mktest contains archaic constructs : + exec - else ENV= LC_ALL=C $SHELL -n mktest.sh + exec - fi + exec - fi + exec - ;; + exec - esac + exec - case '${mam_cc_SHELLMAGIC}' in + exec - "") case 184 in + exec - 0) cp mktest.sh mktest + exec - ;; + exec - *) { + exec - i=`(read x; echo $x) < mktest.sh` + exec - case $i in + exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;; + exec - esac + exec - cat mktest.sh + exec - } > mktest + exec - ;; + exec - esac + exec - ;; + exec - *) cat - mktest.sh > mktest <<'!' + exec - ${mam_cc_SHELLMAGIC} + exec - ! + exec - ;; + exec - esac + exec - test -w mktest -a -x mktest || chmod u+w,+x mktest + done mktest generated + make package + make package.sh + done package.sh + prev package.sh + exec - case static,port:$OPTIND:$RANDOM in + exec - ?*:*:*|*::*|*:*:$RANDOM) + exec - ;; + exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null + exec - then if grep '### .*archaic.* ###' >/dev/null + exec - then : package contains archaic constructs : + exec - else ENV= LC_ALL=C $SHELL -n package.sh + exec - fi + exec - fi + exec - ;; + exec - esac + exec - case '${mam_cc_SHELLMAGIC}' in + exec - "") case 184 in + exec - 0) cp package.sh package + exec - ;; + exec - *) { + exec - i=`(read x; echo $x) < package.sh` + exec - case $i in + exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;; + exec - esac + exec - cat package.sh + exec - } > package + exec - ;; + exec - esac + exec - ;; + exec - *) cat - package.sh > package <<'!' + exec - ${mam_cc_SHELLMAGIC} + exec - ! + exec - ;; + exec - esac + exec - test -w package -a -x package || chmod u+w,+x package + done package generated + make regress + make regress.sh + done regress.sh + prev regress.sh + exec - case static,port:$OPTIND:$RANDOM in + exec - ?*:*:*|*::*|*:*:$RANDOM) + exec - ;; + exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null + exec - then if grep '### .*archaic.* ###' >/dev/null + exec - then : regress contains archaic constructs : + exec - else ENV= LC_ALL=C $SHELL -n regress.sh + exec - fi + exec - fi + exec - ;; + exec - esac + exec - case '${mam_cc_SHELLMAGIC}' in + exec - "") case 184 in + exec - 0) cp regress.sh regress + exec - ;; + exec - *) { + exec - i=`(read x; echo $x) < regress.sh` + exec - case $i in + exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;; + exec - esac + exec - cat regress.sh + exec - } > regress + exec - ;; + exec - esac + exec - ;; + exec - *) cat - regress.sh > regress <<'!' + exec - ${mam_cc_SHELLMAGIC} + exec - ! + exec - ;; + exec - esac + exec - test -w regress -a -x regress || chmod u+w,+x regress + done regress generated + make crossexec + make crossexec.sh + done crossexec.sh + prev crossexec.sh + exec - case static,port:$OPTIND:$RANDOM in + exec - ?*:*:*|*::*|*:*:$RANDOM) + exec - ;; + exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null + exec - then if grep '### .*archaic.* ###' >/dev/null + exec - then : crossexec contains archaic constructs : + exec - else ENV= LC_ALL=C $SHELL -n crossexec.sh + exec - fi + exec - fi + exec - ;; + exec - esac + exec - case '${mam_cc_SHELLMAGIC}' in + exec - "") case 184 in + exec - 0) cp crossexec.sh crossexec + exec - ;; + exec - *) { + exec - i=`(read x; echo $x) < crossexec.sh` + exec - case $i in + exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;; + exec - esac + exec - cat crossexec.sh + exec - } > crossexec + exec - ;; + exec - esac + exec - ;; + exec - *) cat - crossexec.sh > crossexec <<'!' + exec - ${mam_cc_SHELLMAGIC} + exec - ! + exec - ;; + exec - esac + exec - test -w crossexec -a -x crossexec || chmod u+w,+x crossexec + done crossexec generated + make execrate + make execrate.sh + done execrate.sh + prev execrate.sh + exec - case static,port:$OPTIND:$RANDOM in + exec - ?*:*:*|*::*|*:*:$RANDOM) + exec - ;; + exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null + exec - then if grep '### .*archaic.* ###' >/dev/null + exec - then : execrate contains archaic constructs : + exec - else ENV= LC_ALL=C $SHELL -n execrate.sh + exec - fi + exec - fi + exec - ;; + exec - esac + exec - case '${mam_cc_SHELLMAGIC}' in + exec - "") case 184 in + exec - 0) cp execrate.sh execrate + exec - ;; + exec - *) { + exec - i=`(read x; echo $x) < execrate.sh` + exec - case $i in + exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;; + exec - esac + exec - cat execrate.sh + exec - } > execrate + exec - ;; + exec - esac + exec - ;; + exec - *) cat - execrate.sh > execrate <<'!' + exec - ${mam_cc_SHELLMAGIC} + exec - ! + exec - ;; + exec - esac + exec - test -w execrate -a -x execrate || chmod u+w,+x execrate + done execrate generated + make filter + make filter.sh + done filter.sh + prev filter.sh + exec - case static,port:$OPTIND:$RANDOM in + exec - ?*:*:*|*::*|*:*:$RANDOM) + exec - ;; + exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null + exec - then if grep '### .*archaic.* ###' >/dev/null + exec - then : filter contains archaic constructs : + exec - else ENV= LC_ALL=C $SHELL -n filter.sh + exec - fi + exec - fi + exec - ;; + exec - esac + exec - case '${mam_cc_SHELLMAGIC}' in + exec - "") case 184 in + exec - 0) cp filter.sh filter + exec - ;; + exec - *) { + exec - i=`(read x; echo $x) < filter.sh` + exec - case $i in + exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;; + exec - esac + exec - cat filter.sh + exec - } > filter + exec - ;; + exec - esac + exec - ;; + exec - *) cat - filter.sh > filter <<'!' + exec - ${mam_cc_SHELLMAGIC} + exec - ! + exec - ;; + exec - esac + exec - test -w filter -a -x filter || chmod u+w,+x filter + done filter generated + make ignore + make ignore.sh + done ignore.sh + prev ignore.sh + exec - case static,port:$OPTIND:$RANDOM in + exec - ?*:*:*|*::*|*:*:$RANDOM) + exec - ;; + exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null + exec - then if grep '### .*archaic.* ###' >/dev/null + exec - then : ignore contains archaic constructs : + exec - else ENV= LC_ALL=C $SHELL -n ignore.sh + exec - fi + exec - fi + exec - ;; + exec - esac + exec - case '${mam_cc_SHELLMAGIC}' in + exec - "") case 0 in + exec - 0) cp ignore.sh ignore + exec - ;; + exec - *) { + exec - i=`(read x; echo $x) < ignore.sh` + exec - case $i in + exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;; + exec - esac + exec - cat - ignore.sh <<'!' + exec - + exec - ! + exec - } > ignore + exec - ;; + exec - esac + exec - ;; + exec - *) cat - ignore.sh > ignore <<'!' + exec - ${mam_cc_SHELLMAGIC} + exec - + exec - ! + exec - ;; + exec - esac + exec - test -w ignore -a -x ignore || chmod u+w,+x ignore + done ignore generated + make silent + make silent.sh + done silent.sh + prev silent.sh + exec - case static,port:$OPTIND:$RANDOM in + exec - ?*:*:*|*::*|*:*:$RANDOM) + exec - ;; + exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null + exec - then if grep '### .*archaic.* ###' >/dev/null + exec - then : silent contains archaic constructs : + exec - else ENV= LC_ALL=C $SHELL -n silent.sh + exec - fi + exec - fi + exec - ;; + exec - esac + exec - case '${mam_cc_SHELLMAGIC}' in + exec - "") case 0 in + exec - 0) cp silent.sh silent + exec - ;; + exec - *) { + exec - i=`(read x; echo $x) < silent.sh` + exec - case $i in + exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;; + exec - esac + exec - cat - silent.sh <<'!' + exec - + exec - ! + exec - } > silent + exec - ;; + exec - esac + exec - ;; + exec - *) cat - silent.sh > silent <<'!' + exec - ${mam_cc_SHELLMAGIC} + exec - + exec - ! + exec - ;; + exec - esac + exec - test -w silent -a -x silent || chmod u+w,+x silent + done silent generated + make mamake + make mamake.o + make mamake.c + make shlib-compat.h implicit + done shlib-compat.h dontcare virtual + make ast.h implicit + done ast.h dontcare virtual + done mamake.c + prev mamake.c + exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -c mamake.c + done mamake.o generated + exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} -o mamake mamake.o + done mamake generated + make mprobe + make mprobe.sh + done mprobe.sh + prev mprobe.sh + exec - case static,port:$OPTIND:$RANDOM in + exec - ?*:*:*|*::*|*:*:$RANDOM) + exec - ;; + exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null + exec - then if grep '### .*archaic.* ###' >/dev/null + exec - then : mprobe contains archaic constructs : + exec - else ENV= LC_ALL=C $SHELL -n mprobe.sh + exec - fi + exec - fi + exec - ;; + exec - esac + exec - case '${mam_cc_SHELLMAGIC}' in + exec - "") case 0 in + exec - 0) cp mprobe.sh mprobe + exec - ;; + exec - *) { + exec - i=`(read x; echo $x) < mprobe.sh` + exec - case $i in + exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;; + exec - esac + exec - cat - mprobe.sh <<'!' + exec - + exec - ! + exec - } > mprobe + exec - ;; + exec - esac + exec - ;; + exec - *) cat - mprobe.sh > mprobe <<'!' + exec - ${mam_cc_SHELLMAGIC} + exec - + exec - ! + exec - ;; + exec - esac + exec - test -w mprobe -a -x mprobe || chmod u+w,+x mprobe + done mprobe generated + make probe + make probe.sh + make C+probe + done C+probe + make make.probe + done make.probe + exec - cat C+probe make.probe > probe.sh + done probe.sh generated + prev probe.sh + exec - case static,port:$OPTIND:$RANDOM in + exec - ?*:*:*|*::*|*:*:$RANDOM) + exec - ;; + exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null + exec - then if grep '### .*archaic.* ###' >/dev/null + exec - then : probe contains archaic constructs : + exec - else ENV= LC_ALL=C $SHELL -n probe.sh + exec - fi + exec - fi + exec - ;; + exec - esac + exec - case '${mam_cc_SHELLMAGIC}' in + exec - "") case 0 in + exec - 0) cp probe.sh probe + exec - ;; + exec - *) { + exec - i=`(read x; echo $x) < probe.sh` + exec - case $i in + exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;; + exec - esac + exec - cat - probe.sh <<'!' + exec - + exec - ! + exec - } > probe + exec - ;; + exec - esac + exec - ;; + exec - *) cat - probe.sh > probe <<'!' + exec - ${mam_cc_SHELLMAGIC} + exec - + exec - ! + exec - ;; + exec - esac + exec - test -w probe -a -x probe || chmod u+w,+x probe + done probe generated + make ${INSTALLROOT}/bin + exec - if test ! -d ${INSTALLROOT}/bin + exec - then mkdir -p ${INSTALLROOT}/bin + exec - fi + done ${INSTALLROOT}/bin generated + make ${INSTALLROOT}/bin/iffe + prev iffe + exec - ${STDCMP} 2>/dev/null -s iffe ${INSTALLROOT}/bin/iffe || { ${STDMV} ${INSTALLROOT}/bin/iffe ${INSTALLROOT}/bin/iffe.old 2>/dev/null || true; ${STDCP} iffe ${INSTALLROOT}/bin/iffe ;} + done ${INSTALLROOT}/bin/iffe generated + make ${INSTALLROOT}/bin/mktest + prev mktest + exec - ${STDCMP} 2>/dev/null -s mktest ${INSTALLROOT}/bin/mktest || { ${STDMV} ${INSTALLROOT}/bin/mktest ${INSTALLROOT}/bin/mktest.old 2>/dev/null || true; ${STDCP} mktest ${INSTALLROOT}/bin/mktest ;} + done ${INSTALLROOT}/bin/mktest generated + make ${INSTALLROOT}/bin/package + prev package + exec - ${STDCMP} 2>/dev/null -s package ${INSTALLROOT}/bin/package || { ${STDMV} ${INSTALLROOT}/bin/package ${INSTALLROOT}/bin/package.old 2>/dev/null || true; ${STDCP} package ${INSTALLROOT}/bin/package ;} + done ${INSTALLROOT}/bin/package generated + make ${INSTALLROOT}/bin/regress + prev regress + exec - ${STDCMP} 2>/dev/null -s regress ${INSTALLROOT}/bin/regress || { ${STDMV} ${INSTALLROOT}/bin/regress ${INSTALLROOT}/bin/regress.old 2>/dev/null || true; ${STDCP} regress ${INSTALLROOT}/bin/regress ;} + done ${INSTALLROOT}/bin/regress generated + make ${PACKAGEROOT}/bin + exec - if test ! -d ${PACKAGEROOT}/bin + exec - then mkdir -p ${PACKAGEROOT}/bin + exec - fi + done ${PACKAGEROOT}/bin generated + make ${PACKAGEROOT}/bin/execrate + prev ${PACKAGEROOT}/bin + prev execrate + exec - ${STDCMP} 2>/dev/null -s execrate ${PACKAGEROOT}/bin/execrate || { ${STDMV} ${PACKAGEROOT}/bin/execrate ${PACKAGEROOT}/bin/execrate.old 2>/dev/null || true; ${STDCP} execrate ${PACKAGEROOT}/bin/execrate ;} + done ${PACKAGEROOT}/bin/execrate generated + make ${PACKAGEROOT}/bin/ignore + prev ignore + exec - ${STDCMP} 2>/dev/null -s ignore ${PACKAGEROOT}/bin/ignore || { ${STDMV} ${PACKAGEROOT}/bin/ignore ${PACKAGEROOT}/bin/ignore.old 2>/dev/null || true; ${STDCP} ignore ${PACKAGEROOT}/bin/ignore ;} + done ${PACKAGEROOT}/bin/ignore generated + make ${PACKAGEROOT}/bin/mamprobe + make mamprobe + make mamprobe.sh + done mamprobe.sh + exec - case static,port:$OPTIND:$RANDOM in + exec - ?*:*:*|*::*|*:*:$RANDOM) + exec - ;; + exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]} !(pattern)' 2>/dev/null + exec - then if grep '### .*archaic.* ###' >/dev/null + exec - then : mamprobe contains archaic constructs : + exec - else ENV= LC_ALL=C $SHELL -n mamprobe.sh + exec - fi + exec - fi + exec - ;; + exec - esac + exec - case '${mam_cc_SHELLMAGIC}' in + exec - "") case 0 in + exec - 0) cp mamprobe.sh mamprobe + exec - ;; + exec - *) { + exec - i=`(read x; echo $x) < mamprobe.sh` + exec - case $i in + exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;; + exec - esac + exec - cat - mamprobe.sh <<'!' + exec - + exec - ! + exec - } > mamprobe + exec - ;; + exec - esac + exec - ;; + exec - *) cat - mamprobe.sh > mamprobe <<'!' + exec - ${mam_cc_SHELLMAGIC} + exec - + exec - ! + exec - ;; + exec - esac + exec - test -w mamprobe -a -x mamprobe || chmod u+w,+x mamprobe + done mamprobe generated + exec - ${STDCMP} 2>/dev/null -s mamprobe ${PACKAGEROOT}/bin/mamprobe || { ${STDMV} ${PACKAGEROOT}/bin/mamprobe ${PACKAGEROOT}/bin/mamprobe.old 2>/dev/null || true; ${STDCP} mamprobe ${PACKAGEROOT}/bin/mamprobe ;} + done ${PACKAGEROOT}/bin/mamprobe generated + make ${PACKAGEROOT}/bin/package + prev package + exec - ${STDCMP} 2>/dev/null -s package ${PACKAGEROOT}/bin/package || { ${STDMV} ${PACKAGEROOT}/bin/package ${PACKAGEROOT}/bin/package.old 2>/dev/null || true; ${STDCP} package ${PACKAGEROOT}/bin/package ;} + done ${PACKAGEROOT}/bin/package generated + make ${PACKAGEROOT}/bin/silent + prev silent + exec - ${STDCMP} 2>/dev/null -s silent ${PACKAGEROOT}/bin/silent || { ${STDMV} ${PACKAGEROOT}/bin/silent ${PACKAGEROOT}/bin/silent.old 2>/dev/null || true; ${STDCP} silent ${PACKAGEROOT}/bin/silent ;} + done ${PACKAGEROOT}/bin/silent generated + make ${INSTALLROOT}/bin/crossexec + prev crossexec + exec - ${STDCMP} 2>/dev/null -s crossexec ${INSTALLROOT}/bin/crossexec || { ${STDMV} ${INSTALLROOT}/bin/crossexec ${INSTALLROOT}/bin/crossexec.old 2>/dev/null || true; ${STDCP} crossexec ${INSTALLROOT}/bin/crossexec ;} + done ${INSTALLROOT}/bin/crossexec generated + make ${INSTALLROOT}/bin/filter + prev filter + exec - ${STDCMP} 2>/dev/null -s filter ${INSTALLROOT}/bin/filter || { ${STDMV} ${INSTALLROOT}/bin/filter ${INSTALLROOT}/bin/filter.old 2>/dev/null || true; ${STDCP} filter ${INSTALLROOT}/bin/filter ;} + done ${INSTALLROOT}/bin/filter generated + make ${INSTALLROOT}/bin/mamake + prev mamake + exec - ${STDCMP} 2>/dev/null -s mamake ${INSTALLROOT}/bin/mamake || { ${STDMV} ${INSTALLROOT}/bin/mamake ${INSTALLROOT}/bin/mamake.old 2>/dev/null || true; ${STDCP} mamake ${INSTALLROOT}/bin/mamake ;} + done ${INSTALLROOT}/bin/mamake generated + make __proto_stub + note * + note * proto(1) has been removed, but install a backwards compatibility stub + note * that allows old Mamfiles containing proto commands to keep working. + note * + exec - src=${PACKAGEROOT}/src/cmd/INIT/proto.sh + exec - dst=${INSTALLROOT}/bin/proto + exec - ${STDCMP} 2>/dev/null -s $src $dst || { ${STDMV} $dst $dst.old 2>/dev/null || true; ${STDCP} $src $dst ;} + exec - test -w $dst && test -x $dst || chmod u+w,+x $dst + done __proto_stub dontcare virtual + make ${INSTALLROOT}/bin/mkdir + make mkdir.sh + done mkdir.sh + exec - if test ! -x ${INSTALLROOT}/bin/mkdir -a -x /bin/mkdir + exec - then mkdir -p 2>/dev/null || : + exec - if test -d ./-p + exec - then rmdir ./-p + exec - cp mkdir.sh ${INSTALLROOT}/bin/mkdir + exec - chmod +x ${INSTALLROOT}/bin/mkdir + exec - fi + exec - fi + done ${INSTALLROOT}/bin/mkdir generated + make ${INSTALLROOT}/bin/.paths + exec - if test ! -f ${INSTALLROOT}/bin/.paths -o -w ${INSTALLROOT}/bin/.paths + exec - then N=' + exec - ' + exec - H=${mam_cc_HOSTTYPE} + exec - P="" + exec - b= f= h= l= n= p= u= B= L= + exec - set : $P + exec - while : + exec - do while : + exec - do case $1 in + exec - '') break 2 ;; + exec - :) shift; break ;; + exec - esac + exec - shift + exec - done + exec - case $# in + exec - 0|1) break ;; + exec - esac + exec - case $L in + exec - ?*) L="$L|" ;; + exec - esac + exec - L="$L$2=*" + exec - B=$1 + exec - done + exec - if test -f ${INSTALLROOT}/bin/.paths + exec - then while read x + exec - do case $x in + exec - *\$\(\"*) break + exec - ;; + exec - '#'?*) case $h in + exec - '') h=$x ;; + exec - esac + exec - ;; + exec - $L) l=$x + exec - ;; + exec - *BUILTIN_LIB=*) b=$x + exec - ;; + exec - *FPATH=*) f=$x + exec - ;; + exec - *PLUGIN_LIB=*) p=$x + exec - ;; + exec - *) case $u in + exec - ?*) u=$u$N ;; + exec - esac + exec - u=$u$x + exec - ;; + exec - esac + exec - done < ${INSTALLROOT}/bin/.paths + exec - fi + exec - ifs=$IFS + exec - m= + exec - case $p in + exec - ?*) b= + exec - ;; + exec - esac + exec - case $b in + exec - ?*) IFS='=' + exec - set $b + exec - IFS=$ifs + exec - shift + exec - p="PLUGIN_LIB=$*" + exec - case $b in + exec - [Nn][Oo]*) p=no$p ;; + exec - esac + exec - m=1 + exec - ;; + exec - esac + exec - case $f in + exec - '') f="FPATH=../fun" + exec - m=1 + exec - ;; + exec - esac + exec - case $h in + exec - '') h='# use { no NO } prefix to permanently disable #' ;; + exec - esac + exec - case $l in + exec - '') set x x : $P + exec - l= + exec - while : + exec - do while : + exec - do case $# in + exec - 0) break ;; + exec - esac + exec - x=$1 + exec - shift + exec - case $x in + exec - :) break ;; + exec - esac + exec - done + exec - case $# in + exec - 0|1) break + exec - ;; + exec - 2) l=$2 + exec - ;; + exec - *) case "$H" in + exec - $3) l=$2; break ;; + exec - esac + exec - ;; + exec - esac + exec - done + exec - case $l in + exec - '') if test -x /lib/dld.sl + exec - then l=SHLIB_PATH + exec - elif test -x /usr/lib/dyld + exec - then l=DYLD_LIBRARY_PATH + exec - else case "$H" in + exec - ibm.*|mvs.*) + exec - l=LIBPATH + exec - ;; + exec - sgi.mips3) + exec - l=LD_LIBRARYN32_PATH + exec - ;; + exec - sgi.mips4) + exec - l=LD_LIBRARYN64_PATH + exec - ;; + exec - *) l=LD_LIBRARY_PATH + exec - ;; + exec - esac + exec - fi + exec - ;; + exec - esac + exec - case $l in + exec - ?*) case $B in + exec - '') B=lib ;; + exec - esac + exec - l="$l=../$B" + exec - m=1 + exec - ;; + exec - esac + exec - ;; + exec - esac + exec - case $p in + exec - '') p="PLUGIN_LIB=cmd" + exec - case '' in + exec - '') p=no$p ;; + exec - esac + exec - m=1 + exec - ;; + exec - esac + exec - case $m in + exec - 1) case $u in + exec - ?*) u=$N$u ;; + exec - esac + exec - echo "$h$N$p$N$f$N$l$u" > ${INSTALLROOT}/bin/.paths + exec - ;; + exec - esac + exec - fi + done ${INSTALLROOT}/bin/.paths generated + make ${INSTALLROOT}/lib/probe/C + exec - if test ! -d ${INSTALLROOT}/lib/probe/C + exec - then mkdir -p ${INSTALLROOT}/lib/probe/C + exec - fi + done ${INSTALLROOT}/lib/probe/C generated + make ${INSTALLROOT}/lib/probe/C/probe + prev ${INSTALLROOT}/lib/probe/C + prev C+probe + exec - ${STDCMP} 2>/dev/null -s C+probe ${INSTALLROOT}/lib/probe/C/probe || { ${STDMV} ${INSTALLROOT}/lib/probe/C/probe ${INSTALLROOT}/lib/probe/C/probe.old 2>/dev/null || true; ${STDCP} C+probe ${INSTALLROOT}/lib/probe/C/probe ;} + done ${INSTALLROOT}/lib/probe/C/probe generated + make ${INSTALLROOT}/lib/probe/C/make + exec - if test ! -d ${INSTALLROOT}/lib/probe/C/make + exec - then mkdir -p ${INSTALLROOT}/lib/probe/C/make + exec - fi + done ${INSTALLROOT}/lib/probe/C/make generated + prev ${INSTALLROOT}/lib/probe/C/make + make ${INSTALLROOT}/lib/probe/C/pp + exec - if test ! -d ${INSTALLROOT}/lib/probe/C/pp + exec - then mkdir -p ${INSTALLROOT}/lib/probe/C/pp + exec - fi + done ${INSTALLROOT}/lib/probe/C/pp generated + prev ${INSTALLROOT}/lib/probe/C/pp + make ${INSTALLROOT}/lib/probe/C/mam + exec - if test ! -d ${INSTALLROOT}/lib/probe/C/mam + exec - then mkdir -p ${INSTALLROOT}/lib/probe/C/mam + exec - fi + done ${INSTALLROOT}/lib/probe/C/mam generated + make ${INSTALLROOT}/lib/probe/C/mam/probe + prev ${INSTALLROOT}/lib/probe/C/mam + prev mprobe + exec - ${STDCMP} 2>/dev/null -s mprobe ${INSTALLROOT}/lib/probe/C/mam/probe || { ${STDMV} ${INSTALLROOT}/lib/probe/C/mam/probe ${INSTALLROOT}/lib/probe/C/mam/probe.old 2>/dev/null || true; ${STDCP} mprobe ${INSTALLROOT}/lib/probe/C/mam/probe ;} + done ${INSTALLROOT}/lib/probe/C/mam/probe generated + make ${INSTALLROOT}/lib/probe/C/mam/mprobe + prev mprobe + exec - ${STDCMP} 2>/dev/null -s mprobe ${INSTALLROOT}/lib/probe/C/mam/mprobe || { ${STDMV} ${INSTALLROOT}/lib/probe/C/mam/mprobe ${INSTALLROOT}/lib/probe/C/mam/mprobe.old 2>/dev/null || true; ${STDCP} mprobe ${INSTALLROOT}/lib/probe/C/mam/mprobe ;} + done ${INSTALLROOT}/lib/probe/C/mam/mprobe generated + make ${INSTALLROOT}/lib/probe/C/make/probe + prev probe + exec - ${STDCMP} 2>/dev/null -s probe ${INSTALLROOT}/lib/probe/C/make/probe || { ${STDMV} ${INSTALLROOT}/lib/probe/C/make/probe ${INSTALLROOT}/lib/probe/C/make/probe.old 2>/dev/null || true; ${STDCP} probe ${INSTALLROOT}/lib/probe/C/make/probe ;} + done ${INSTALLROOT}/lib/probe/C/make/probe generated + make ${INSTALLROOT}/lib/probe/C/make/probe.ini + make probe.ini + make probe.win32 + done probe.win32 + exec - t=${mam_cc_HOSTTYPE} + exec - ifs=$IFS + exec - IFS=. + exec - set x $t + exec - IFS=$ifs + exec - t=$2 + exec - set x probe.win32 + exec - while : + exec - do shift + exec - case $# in + exec - 0) break ;; + exec - esac + exec - case $1 in + exec - *probe.$t) + exec - break + exec - esac + exec - done + exec - case $1 in + exec - ?*) cmp -s $1 probe.ini || cp $1 probe.ini ;; + exec - *) : > probe.ini + exec - esac + done probe.ini generated + exec - ${STDCMP} 2>/dev/null -s probe.ini ${INSTALLROOT}/lib/probe/C/make/probe.ini || { ${STDMV} ${INSTALLROOT}/lib/probe/C/make/probe.ini ${INSTALLROOT}/lib/probe/C/make/probe.ini.old 2>/dev/null || true; ${STDCP} probe.ini ${INSTALLROOT}/lib/probe/C/make/probe.ini ;} + done ${INSTALLROOT}/lib/probe/C/make/probe.ini generated + make ${INSTALLROOT}/include/ast + exec - if test ! -d ${INSTALLROOT}/include/ast + exec - then mkdir -p ${INSTALLROOT}/include/ast + exec - fi + done ${INSTALLROOT}/include/ast generated + make ${INSTALLROOT}/lib/lib + exec - if test ! -d ${INSTALLROOT}/lib/lib + exec - then mkdir -p ${INSTALLROOT}/lib/lib + exec - fi + done ${INSTALLROOT}/lib/lib generated + make ${INSTALLROOT}/lib/lib/dl + prev ${INSTALLROOT}/lib/lib + make dl.req + make dl.c + done dl.c + exec - set - + exec - r='-' + exec - for i in dl.c + exec - do if ${CC} -c $i > /dev/null + exec - then g= + exec - for p in dl - + exec - do case $p in + exec - -) if ${CC} -o dl.exe $i $g > /dev/null 2>&1 + exec - then ${CC} -o dl.exe $i > /dev/null 2>&1 || { + exec - r="$g" + exec - break 2 + exec - } + exec - fi + exec - g= + exec - ;; + exec - *) g="$g -l$p" + exec - ;; + exec - esac + exec - done + exec - fi + exec - done 2>/dev/null + exec - echo " $r" > dl.req + exec - rm -f dl.exe dl + done dl.req generated + exec - ${STDCMP} 2>/dev/null -s dl.req ${INSTALLROOT}/lib/lib/dl || { ${STDMV} ${INSTALLROOT}/lib/lib/dl ${INSTALLROOT}/lib/lib/dl.old 2>/dev/null || true; ${STDCP} dl.req ${INSTALLROOT}/lib/lib/dl ;} + done ${INSTALLROOT}/lib/lib/dl generated + make ${INSTALLROOT}/lib/lib/iconv + make iconv.req + make iconv.c + done iconv.c + exec - set - + exec - r='-' + exec - for i in iconv.c + exec - do if ${CC} -c $i > /dev/null + exec - then g= + exec - for p in iconv - + exec - do case $p in + exec - -) if ${CC} -o iconv.exe $i $g > /dev/null 2>&1 + exec - then ${CC} -o iconv.exe $i > /dev/null 2>&1 || { + exec - r="$g" + exec - break 2 + exec - } + exec - fi + exec - g= + exec - ;; + exec - *) g="$g -l$p" + exec - ;; + exec - esac + exec - done + exec - fi + exec - done 2>/dev/null + exec - echo " $r" > iconv.req + exec - rm -f iconv.exe iconv + done iconv.req generated + exec - ${STDCMP} 2>/dev/null -s iconv.req ${INSTALLROOT}/lib/lib/iconv || { ${STDMV} ${INSTALLROOT}/lib/lib/iconv ${INSTALLROOT}/lib/lib/iconv.old 2>/dev/null || true; ${STDCP} iconv.req ${INSTALLROOT}/lib/lib/iconv ;} + done ${INSTALLROOT}/lib/lib/iconv generated + make ${INSTALLROOT}/lib/lib/w + make w.req + make w.c + done w.c + make w2.c + done w2.c + exec - set - + exec - r='-' + exec - for i in w.c w2.c + exec - do if ${CC} -c $i > /dev/null + exec - then g= + exec - for p in w - + exec - do case $p in + exec - -) if ${CC} -o w.exe $i $g > /dev/null 2>&1 + exec - then ${CC} -o w.exe $i > /dev/null 2>&1 || { + exec - r="$g" + exec - break 2 + exec - } + exec - fi + exec - g= + exec - ;; + exec - *) g="$g -l$p" + exec - ;; + exec - esac + exec - done + exec - fi + exec - done 2>/dev/null + exec - echo " $r" > w.req + exec - rm -f w.exe w w2 + done w.req generated + exec - ${STDCMP} 2>/dev/null -s w.req ${INSTALLROOT}/lib/lib/w || { ${STDMV} ${INSTALLROOT}/lib/lib/w ${INSTALLROOT}/lib/lib/w.old 2>/dev/null || true; ${STDCP} w.req ${INSTALLROOT}/lib/lib/w ;} + done ${INSTALLROOT}/lib/lib/w generated + make ${INSTALLROOT}/lib/lib/intl + make intl.req + make intl.c + done intl.c + exec - set - + exec - r='-' + exec - for i in intl.c + exec - do if ${CC} -c $i > /dev/null + exec - then g= + exec - for p in intl - + exec - do case $p in + exec - -) if ${CC} -o intl.exe $i $g > /dev/null 2>&1 + exec - then ${CC} -o intl.exe $i > /dev/null 2>&1 || { + exec - r="$g" + exec - break 2 + exec - } + exec - fi + exec - g= + exec - ;; + exec - *) g="$g -l$p" + exec - ;; + exec - esac + exec - done + exec - fi + exec - done 2>/dev/null + exec - echo " $r" > intl.req + exec - rm -f intl.exe intl + done intl.req generated + exec - ${STDCMP} 2>/dev/null -s intl.req ${INSTALLROOT}/lib/lib/intl || { ${STDMV} ${INSTALLROOT}/lib/lib/intl ${INSTALLROOT}/lib/lib/intl.old 2>/dev/null || true; ${STDCP} intl.req ${INSTALLROOT}/lib/lib/intl ;} + done ${INSTALLROOT}/lib/lib/intl generated + make ${INSTALLROOT}/lib/lib/m + make m.req + make m.c + done m.c + make m2.c + done m2.c + make m3.c + done m3.c + make m4.c + done m4.c + make m5.c + done m5.c + make m6.c + done m6.c + exec - set - + exec - r='-' + exec - for i in m.c m2.c m3.c m4.c m5.c m6.c + exec - do if ${CC} -c $i > /dev/null + exec - then g= + exec - for p in m - + exec - do case $p in + exec - -) if ${CC} -o m.exe $i $g > /dev/null 2>&1 + exec - then ${CC} -o m.exe $i > /dev/null 2>&1 || { + exec - r="$g" + exec - break 2 + exec - } + exec - fi + exec - g= + exec - ;; + exec - *) g="$g -l$p" + exec - ;; + exec - esac + exec - done + exec - fi + exec - done 2>/dev/null + exec - echo " $r" > m.req + exec - rm -f m.exe m m2 m3 m4 m5 m6 + done m.req generated + exec - ${STDCMP} 2>/dev/null -s m.req ${INSTALLROOT}/lib/lib/m || { ${STDMV} ${INSTALLROOT}/lib/lib/m ${INSTALLROOT}/lib/lib/m.old 2>/dev/null || true; ${STDCP} m.req ${INSTALLROOT}/lib/lib/m ;} + done ${INSTALLROOT}/lib/lib/m generated + make ${INSTALLROOT}/lib/lib/nsl + make nsl.req + make nsl.c + done nsl.c + exec - set - + exec - r='-' + exec - for i in nsl.c + exec - do if ${CC} -c $i > /dev/null + exec - then g= + exec - for p in nsl - + exec - do case $p in + exec - -) if ${CC} -o nsl.exe $i $g > /dev/null 2>&1 + exec - then ${CC} -o nsl.exe $i > /dev/null 2>&1 || { + exec - r="$g" + exec - break 2 + exec - } + exec - fi + exec - g= + exec - ;; + exec - *) g="$g -l$p" + exec - ;; + exec - esac + exec - done + exec - fi + exec - done 2>/dev/null + exec - echo " $r" > nsl.req + exec - rm -f nsl.exe nsl + done nsl.req generated + exec - ${STDCMP} 2>/dev/null -s nsl.req ${INSTALLROOT}/lib/lib/nsl || { ${STDMV} ${INSTALLROOT}/lib/lib/nsl ${INSTALLROOT}/lib/lib/nsl.old 2>/dev/null || true; ${STDCP} nsl.req ${INSTALLROOT}/lib/lib/nsl ;} + done ${INSTALLROOT}/lib/lib/nsl generated + make ${INSTALLROOT}/lib/lib/socket + make socket.req + make socket.c + done socket.c + prev nsl.c + exec - set - + exec - r='-' + exec - for i in socket.c nsl.c + exec - do if ${CC} -c $i > /dev/null + exec - then g= + exec - for p in socket - + exec - do case $p in + exec - -) if ${CC} -o socket.exe $i $g > /dev/null 2>&1 + exec - then ${CC} -o socket.exe $i > /dev/null 2>&1 || { + exec - r="$g" + exec - break 2 + exec - } + exec - fi + exec - g= + exec - ;; + exec - *) g="$g -l$p" + exec - ;; + exec - esac + exec - done + exec - fi + exec - done 2>/dev/null + exec - echo " $r" > socket.req + exec - rm -f socket.exe socket nsl + done socket.req generated + exec - ${STDCMP} 2>/dev/null -s socket.req ${INSTALLROOT}/lib/lib/socket || { ${STDMV} ${INSTALLROOT}/lib/lib/socket ${INSTALLROOT}/lib/lib/socket.old 2>/dev/null || true; ${STDCP} socket.req ${INSTALLROOT}/lib/lib/socket ;} + done ${INSTALLROOT}/lib/lib/socket generated + make ${INSTALLROOT}/lib/lib/dbm + make dbm.req + make db.c + done db.c + make gdbm.c + done gdbm.c + make gdbm1.c + make gdbm-ndbm.h implicit + done gdbm-ndbm.h dontcare virtual + done gdbm1.c + make gdbm2.c + make ndbm.h implicit + done ndbm.h dontcare virtual + done gdbm2.c + exec - set - + exec - r='-' + exec - for i in db.c gdbm.c gdbm1.c gdbm2.c + exec - do if ${CC} -c $i > /dev/null + exec - then g= + exec - for p in db - gdbm_compat - gdbm - ndbm - dbm - + exec - do case $p in + exec - -) if ${CC} -o dbm.exe $i $g > /dev/null 2>&1 + exec - then ${CC} -o dbm.exe $i > /dev/null 2>&1 || { + exec - r="$g" + exec - break 2 + exec - } + exec - fi + exec - g= + exec - ;; + exec - *) g="$g -l$p" + exec - ;; + exec - esac + exec - done + exec - fi + exec - done 2>/dev/null + exec - echo " $r" > dbm.req + exec - rm -f dbm.exe db gdbm gdbm1 gdbm2 + done dbm.req generated + exec - ${STDCMP} 2>/dev/null -s dbm.req ${INSTALLROOT}/lib/lib/dbm || { ${STDMV} ${INSTALLROOT}/lib/lib/dbm ${INSTALLROOT}/lib/lib/dbm.old 2>/dev/null || true; ${STDCP} dbm.req ${INSTALLROOT}/lib/lib/dbm ;} + done ${INSTALLROOT}/lib/lib/dbm generated +done install virtual +make test + make test.iffe + make iffe.tst + done iffe.tst + exec - exec "$SHELL" "$INSTALLROOT/bin/regress" iffe.tst iffe + done test.iffe virtual + make test.mamake + make mamake.tst + make mamake.rt + done mamake.rt + exec - if test mamake.rt -nt mamake.tst + exec - then "$SHELL" "$INSTALLROOT/bin/mktest" --style=regress mamake.rt > mamake.tst + exec - fi + done mamake.tst generated + exec - exec "$SHELL" "$INSTALLROOT/bin/regress" mamake.tst mamake + done test.mamake virtual +done test dontcare virtual diff --git a/src/cmd/INIT/README-mamake.md b/src/cmd/INIT/README-mamake.md new file mode 100644 index 000000000..9525dc7b5 --- /dev/null +++ b/src/cmd/INIT/README-mamake.md @@ -0,0 +1,170 @@ +## mamake and the MAM language ## + +MAM (Make Abstract Machine) is a simple rule-based make language +that is implemented in just six four-letter commands and five attributes, +yet allows unlimited flexibility as it can execute arbitrary shell code. +The program implementing MAM, `mamake`, +is a portable C90 program written in a single file, `mamake.c`. +This allows ksh 93u+m, +or other programs using this build system, +to be built using only a standard C compiler and utilities installation +without any other dependencies or complications. + +MAM was designed by Glenn Fowler at AT&T. +The [original documentation](http://web.archive.org/web/20041227143022/http://www2.research.att.com/~gsf/mam/mam.html) +for MAM specified a more extensive language than was actually implemented in `mamake.c`, +while the `ignore` attribute is not documented there. +This file documents the MAM implementation that we are actually using. + +`mamake` processes make files called `Mamfile`. +These were originally generated by a complex AT&T make system called `nmake`. +The intention was for `mamake` to process generated Mamfiles only +and not for it to replace `make`. +Yet, we are using it as our `make` in the ksh 93u+m distribution. +`nmake` was slow, brittle, and did not work on some modern systems, e.g. macOS. +It was not worth fixing because it is about as complex as ksh itself -- +whereas `mamake` is simple and portable, and offers all the same flexibility. + +Compared to the 2012-08-01 AT&T distribution, +ksh 93u+m made a few minor changes to `mamake` that make it easier to maintain Mamfiles by hand: +* All Mamfiles have been indented for legibility. (See `bin/Mamfile_indent` in the distribution.) +* Indentation and word separators may use any whitespace (e.g. tabs), not only spaces. +* Unrecognized commands and rule attributes throw an error instead of being silently ignored. +* Fixed some crashing bugs and memory leaks. + +## Commands ## + +MAM commands have the following basic form: + +*command* [ *argument* [ *operand string* ] ] + +The *command* name consists of four lower-case letters. +Unrecognized commands or attributes are an error. +The *argument* is a single word. +The *operand string* is any arbitrary text until the end of the line. + +### Comments ### + +`note` is the comment command and is ignored. +For historical reasons, `info` and `meta` are also ignored. + +### Rules ### + +`make` *rule* [ *attribute* ... ] +`done` *rule* [ *attribute* ... ] + +A `make`...`done` block defines the target rule named *rule* using the other commands described here. +Unless the `virtual` attribute is used, *rule* names the pathname of the file generated or referenced by the rule. + +Dependencies may be defined in two ways: +1. By nesting `make`...`done` blocks: + the enclosing *rule* is the parent + and the enclosed *rule*s are the prerequisites. +2. By using the `prev` command (see **Referencing previously defined rules** below) + to reference a previous `make`...`done` block. + The dependency is defined as if that block were repeated at the `prev` command's location. + +If the block contains one or more `exec` commands (see **Shell actions** below), +the `done` command executes the shell script defined by them. + +One or more of the following *attribute*s may be specified +by appending them to the `make` or `done` command: +* `archive`: Ignored. + Historically used to mark the generation of an `ar`(1) archive. +* `dontcare`: Marks files that do not need to exist. + If the file exists then its last-modified timestamp is checked and propagated, + otherwise it is silently ignored. +* `generated`: Marks rules that produce output files generated by a shell action. + The `exec` command implicitly assigns this attribute, but it is customary to specify it regardless. +* `ignore`: The timestamp associated with *rule* is ignored in dependency resolution. +* `implicit`: Marks the current rule as an implicit prerequisite of the enclosing parent rule. + An implicit prerequisite can make the parent rule out of date without triggering the parent action. + Implicit prerequisites usually correspond to `#include` prerequisites. + For example, if `foo.o` is generated from `foo.c` and `foo.c` includes `foo.h`, + then `foo.h` should be marked as an implicit prerequisite of `foo.c` + so that touching `foo.h` does not make `foo.c` out of date while making `foo.o` out of date. +* `joint`: Ignored. + Historically used to mark one of a group of rules that are built by a single shell action. +* `virtual`: Marks a rule that is not associated with any file. + The commands within are executed every time the Mamfile is processed. + By convention, a virtual rule named `all` makes everything, + and a virtual rule named `install` performs installation. + +### Referencing previously defined rules ### + +`prev` *rule* [ *attribute* ... ] + +This command references a rule that has previously been defined by `make`...`done`, +regardless of block nesting level. +It can be used to make a rule a prerequisite of multiple `make`...`done` blocks without repeating the rule. +By convention, the *attribute*s of the referenced block are repeated in the `prev` command. +However, `mamake` ignores anything after *rule*. + +### MAM variables ### + +`setv` *variable* [ *defaultvalue* ] + +Defines a new MAM *variable*, optionally assigning the initial *defaultvalue*. +If the *defaultvalue* begins and ends with double quotes (`"`), those are discarded. +If the variable already has a value, the `setv` command is ignored; assigning a new value is not possible. +When `mamake` starts, it imports all environment variables as MAM variables, +so any variable's default value can be overridden by exporting an environment variable by its name. + +MAM variables are referenced using the sh-style `${`...`}` syntax, though the braces are *not* optional. +Any reference to an undefined variable is silently left unexpanded (and not replaced by the empty string). +Expansion of MAM variable references is recursive, i.e., the value may itself contain other variable references. +Beware: there is no reference loop detection. + +[`TODO`: figure out and document advanced expansion syntax supported by `substitute()` in `mamake.c`] + +### Shell actions ### + +`exec` `-` *code* + +One or more `exec` commands within a `make`...`done` block +define a shell script that is executed for *rule*. +The word following `exec` is ignored; by convention it is `-`. +Each `exec` command appends a line of code to the shell script for the current rule. +It is customary for a rule's `exec` commands to be contiguous, but not necessary. +Before adding each line of code to the script, +MAM variable references (see **MAM variables** above) +are expanded; their literal values are inserted into the *code* line +(beware: no quoting is applied!). +When `mamake` encounters the `done` command, +the script is executed by the shell whose path is in the `SHELL` environment variable +or, absent that, by `/bin/sh`. +The `exec` command assigns the `generated` attribute to the current rule, even if it was not specified. + +### Binding libraries ### + +`bind` `-l`*libraryname* [ `dontcare` ] + +An argument of `-l`*libraryname* (or `+l`*libraryname*) +causes a MAM variable `mam_lib`*libraryname* to be defined (see **MAM variables** above). +The variable will contain either the compiler argument for linking to the library *libraryname* +(either the `-l`*libraryname* flag, or the full path in case of a static library) +or, if the `dontcare` attribute is specified, possibly the empty string. +This can be used both for AST libraries shipped with the distribution and for system libraries. +If the library file is found in the distribution, +its time stamp is checked and the current target is marked as outdated if it is newer. + +There is also a mechanism to communicate library dependency information across Mamfiles and `mamake` invocations. +If a file named *libraryname* in the current directory +or an `${INSTALLROOT}/lib/lib/`*libraryname*`.req` file +exists, `mamake` processes each of the words in the form `-l`*libraryname* in its contents +as if they were arguments to `bind` commands +and the resulting values are appended to the value of `mam_lib`*libraryname* +as dependencies separated by spaces. +`mamake` does not create these dependency files; +they are expected to be generated by Mamfile shell actions (see **Shell actions** above). + +If no such dependency file exists, and the `dontcare` attribute is added, +then `mamake` compiles a small test program on the fly to check if the library exists; +if this fails, the `mam_lib`*libraryname* variable will be emptied. + +Any `bind` command whose argument does not start with `-l` or `+l` is ignored. + +[`TODO`: `bind` is not yet fully understood; more `mamake.c` code analysis is required. +In `require()` in `mamake.c` there is some special handling for dynamic libraries. +Note that the `bind` functionality implemented in `mamake.c` +is completely different from that described in the original documentation.] diff --git a/src/cmd/INIT/RELEASE b/src/cmd/INIT/RELEASE new file mode 100644 index 000000000..fdf66b88f --- /dev/null +++ b/src/cmd/INIT/RELEASE @@ -0,0 +1,938 @@ +This file is of historical interest only. For recent changes in both ksh 93u+m +and the accompanying libraries, see the file NEWS in the top-level directory. +____ + +12-07-17 iffe.sh: add C code NOTE("...") to amend --verbose output +12-06-26 iffe.sh: fix "npt foo" to handle function-like macro foo() +12-06-20 package.sh: use $KSH for rt in "results test" +12-06-15 Makefile: add PLUGIN_LIB to $INSTALLROOT/bin/.paths and BUILTIN_LIB => PLUGIN_LIB +12-06-15 package.sh: add PLUGIN_LIB to $INSTALLROOT/bin/.paths and BUILTIN_LIB => PLUGIN_LIB +12-06-13 package.sh: handle admin.db column output +12-06-08 iffe.sh: fix 12-06-06 typo +12-06-06 iffe.sh: check for -l* in reverse and accumulative order (e.g., for -last & -lm) +12-06-04 package.sh: always check $INSTALLROOT/lib/package/profile +12-05-31 Makefile: ID=ast; $(INSTALLROOT)/prototyped.h => $(INSTALLROOT)/$(ID)/prototyped.h +12-05-28 iffe.sh: API foo YYYYMMDD => FOOAPI(rel) test macro +12-05-24 package.sh: change admin.db comment => owner attributes +12-04-25 ratz.c: add sear -k option to keep installation tmp dir on exit +12-04-17 package.sh: skip sh version logic for ``use'' +12-04-17 cc.ibm.risc*: _LARGEFILE64_SOURCE => _LARGE_FILE_API moved to libast/features +12-04-09 cc.ibm.risc*: speak aixese for _LARGEFILE64_SOURCE +12-02-29 cc.darwin.i386*: handle default cc vs kernel bittedness +12-02-29 C+probe: add __TIMESTAMP__ to the nopredefined list +12-02-29 package.sh: don't assume grep -q or /usr/local/lib in LD_LIBRARY_PATH +12-02-29 package.sh: fix ksh vs -lcmd compatibility checks +12-02-23 iffe.sh: checkcc() before checkread() for sensible diagnostics +12-02-14 package.mk: { --clobber --compare --link=lib*.a* } for --mam=static +12-02-14 package.mk: export LICENSEFILEDEFAULT instead of LICENSEFILE +12-02-14 package.sh: handle @(cc|ld).${HOSTTYPE}* intercepts +12-02-07 package.sh: add { clean clobber } actions +12-02-02 regress.sh: fix ulimit -c defaults for --nokeep +12-01-18 regress.sh: add INPUT|OUTPUT|ERROR -e 'filter' to filter before comparison +12-01-21 package.sh: fix `admin make' bug that created unused $INSTALLROOT/lib +12-01-21 Makefile: :PACKAGE: license=ast -- oops +12-01-20 cc.darwin,cc.mvs.390: tmp=/tmp/cc.${USER:-$LOGNAME}.$$.err +12-01-12 package.sh: add admin make share closure to handle alternate HOSTTYPEs +11-12-13 iffe.sh: add /**/ test code comment to disable default #include +11-11-11 C+probe: test for .so before .sl +11-10-26 package.sh: don't forget about *.pkg for admin update +11-10-18 cc.*-icc: update and add more +11-10-11 package.sh: handle package make|view when no source installed +11-09-11 package.sh: count admin '*** termination code' errors +11-08-31 mamake.c: add -e, ignore use recursive prereq timestamps +11-08-29 iffe.sh: add ``set stdio try1.h - try2.h ...'' +11-08-29 iffe.sh: trap EXIT => trap 0 for ancient sh +11-08-11 iffe.sh: handle ancient sort that doesn't have -k +11-06-01 make.probe: add more /lib64 logic +11-05-01 package.sh: fix admin ditto to sync LICENSES too +11-03-25 package.sh: initialize { $SED $TR } before first use! +11-03-21 package.sh: fix vpath probes +11-03-17 iffe.sh: fix cleanup to rm $tmp* instead of $tmp*.* +11-02-24 package.sh: change curl usage to "curl -L ..." +11-02-11 package.sh,C+probe,make.probe,mamprobe.sh: add ###.*archaic.*### +11-02-02 Makefile: add :MAPLIB: check for ancient -lw +11-02-02 make.probe: handle -print-multi-directory => 64 => /usr/lib64 /lib64 +11-02-02 package.sh: HOSTTYPE=*,*cc*[,-*,...] sets CC [ and CCFLAGS ] +11-02-02 make.probe: handle gcc $ORIGIN link but exec failure -- gee thanks +11-01-25 cc.hp.ia64: bundled cc is a pile of shaving cream +11-01-07 iffe.sh: check debug==3 for is_hdr() failure +10-11-22 ditto.sh: fix timing problem between |& and exec &p +10-11-10 package.sh: fix cc cross compile check to use checkcc absolute path +10-10-10 package.sh: list main env vars at start of make action +10-10-10 ratz.c: tweak windows delays +10-09-10 ratz.c: add _SEAR_ARGS for _SEAR_EXEC +10-09-01 package.sh: fix ratz from source logic +10-08-25 package.mk: consolidate license file search in .package.licenses. +10-08-22 ratz.c: run sear bootstrap command detached +10-08-20 C+probe: version_stamp only if version_flags works +10-08-17 package.sh: unset makerules *DIR variables in env +10-08-15 package.sh: "make" action now lists some env values +10-08-11 mktest.sh: add "DO command ..." +10-07-27 rt.sh: handle "rt X=Y ..." +10-06-29 ratz.c: non-option sear args passed to sear_exec() +10-06-25 iffe.sh: "api" op changed to not do "map-libc" type mappings +10-06-25 package.sh: "force admin ditto" => no ditto --update option +10-06-22 C+probe: handle cc that require .[ci] input for version info +10-06-21 ditto.sh: change default remote access to ssh (about time) +10-06-12 regress.sh: DIAGNOSTICS [ 1 | 0 | pattern ] and fix EXIT for all +10-06-09 package.sh: add AT&T to usable nmake check +10-06-06 iffe.sh,iffe.tst: add { api ver } ops +10-04-22 package.sh: update "html binary|source" NAME/PASSWORD info +10-04-15 iffe.sh: don't forget candidate headers for hdr|sys! +10-04-11 WWW.mk: disable man page metarule -- now done by admin-man(1) +10-02-14 package.sh: $CC verification needs $INSTALLROOT/bin in PATH +10-02-11 package.sh: fix package admin make report error count +10-02-02 package.sh: fix write binary bug that did scp on local fs +10-02-02 package.mk: up to date binary targets must still be in PACKAGE.*.lst +10-01-01 package.sh: fix premature $INSTALLROOT/bin during cross compile check +10-01-01 make.probe: handle ['"] in CC.VERSION.STRING +09-12-04 iffe.sh: add "opt name" to check for name in $PACKAGE_OPTIONS +09-11-30 mktest.sh: change RESET to STATE.RESET to make it global +09-11-14 make.probe: use gcc { -print-multi-directory -print-search-dirs } +09-11-11 package.sh: re-order and combine cc checks +09-10-27 C+probe,make.probe,probe.win32: add CC.SUFFIX.DEBUG +09-10-21 iffe.sh,Makefile: test -e is not in ksh88! +09-10-06 iffe.sh: handle cc -E #error with 0 exit status (sgi) +09-10-06 package.sh: stub in ar intercept checks -- not used yet +09-10-06 ar.ibm.risc: add ar intercept because some AIX require -Xfoo first!! +09-09-24 regress.sh: fix UMASK logic to create test support files before umask +09-08-28 release.c: change docs to mention stdin if no file operands +09-08-24 package.sh: fix isascii() bug that failed on od(1) trailing space +09-08-20 make.probe: add CC.SHARED.NAME +09-08-20 regress.sh: add { JOB CONTINUE EXITED KILL FIFO } +09-08-11 package.sh: filter lines containing : for package results +09-07-31 make.probe: add CC.AR.ARFLAGS (for AIX ar -xany) +09-07-31 package.sh,cc.*: fix -dumpmachine to handle 32/64/* bit options +09-06-24 package.sh: fix admin.db output formatting +09-05-05 package.sh: export dll hackery environment vars +09-05-05 package.sh: handle non-identifier hostnames +09-05-05 mamake.c: pass undefined ${...} identifiers to the shell +09-05-05 mamake.rt: add macro expansion regression tests +09-05-01 iffe.sh: fix output initialization *again* +09-04-28 package.sh: handle admin.db contact field $9 +09-04-15 iffe.sh: add implicit "ini" op to initialize io for subsequent ops +09-03-31 regress.sh: EXPORT before test => global ENVIRON[] +09-03-26 package.sh: test fail pattern is 'fail[es]' +09-03-26 UNIT - ... appends (options) to command line +09-03-19 TEST.mk: x.tst => x only if x is command target +09-03-15 regress.sh: add ${MAIN} for base name of main unit +09-03-10 TEST.mk: add .SOURCE:tests if tests is a dir +09-03-03 regress.sh: allow command line unit to override UNIT +09-03-03 mktest.sh: handle IO == $'\n' +09-02-02 package.sh: delay $INSTALLROOT/bin/.paths generation until mamprobe runs +09-01-30 cc.mvs.390: c89 balks at [ ()] in -Dname="..."! +09-01-27 package.sh: add isascii() to use ratz instead of tar +09-01-20 hurl.sh: add --size=bytes option +09-01-08 TEST.mk: add test.* prereqs, multiple arg lists with :T=*: binding +09-01-03 regress.sh: fix UNIT to allow command line override +09-01-03 mktest.sh: handle TWD +08-12-24 package.sh: fix cross-compile HOSTTYPE logic +08-12-15 package.sh,hurl.sh: handle http codes { 301 302 303 } +08-10-16 make.probe '-fno-stack-protector -fno-stack-protector-all' to cop out!! +08-09-30 rt.sh: fix ksh93 regression test signal count +08-09-26 regress.sh: ignore SIGPIPE for SET pipe-input +08-09-24 package.sh: package only test foo => make --recurse=only recurse tests foo +08-09-20 make.probe: handle another /usr/bin/file shared lib description +08-09-20 regress.sh: add --pipefail for SET pipe-input ... +08-09-17 Makefile: add gdbm1.c for +08-09-10 make.probe: add CC.NOPROTECT +08-08-08 mktest.sh: add --width=width +08-08-05 dbm.req: favor sleepycat ndbm compatibility +08-08-04 C+probe: fix stdlib initialization logic +08-06-24 package.sh: fix $INSTALLROOT/bin/cc intercept time stamp file typo +08-06-20 TEST.mk: make the localyunit before *.rt => *.tst -- doh +08-06-20 mktest.sh: prepend $PWD onto PATH for local units -- doh^2 +08-06-11 regress.sh: fix bug that skipped the last test +08-05-20 regress.sh: add --local to put *.tmp dir in local fs +08-05-05 regress.sh: add IF command ... ELIF command ... ELSE ... FI +08-05-01 package.sh: package test => ulimit -c 0 +08-04-28 regress.sh: fix EXPORT quoting +08-04-28 regress.sh: fix UNIT set check args too +08-04-24 rt.sh: exit code > 256 => signal termination +08-04-10 C+probe: change probe_so order to check .so last (Mac OS X ld workaround) +08-04-01 package.sh: handle multiple admin HOSTTYPEs per HOST +08-03-28 C+probe: add C++ #include (no extension) dir probes +08-03-17 regress.sh: fix trap on EXIT, add terminated note to final tally +08-02-28 make.probe: fix probe_warn to include ld! +08-02-02 make.probe: add CC.RUNPATH to match default -L order +08-01-31 package.sh: check lib64 for LD_LIBRARY_PATH +08-01-31 iffe.sh: tweak ancient /bin/sh workarounds +08-01-28 make.probe: Darwin ld export dynamic is -force_flat_namespace +08-01-28 C+probe: handle SGI cc error message but exit 0 botch(es) +08-01-23 package.sh: fix checksum doc typo +08-01-09 C+probe: add __FUNCTION__ to the undef (don't check) list +07-12-14 iffe.sh: add set nooptimize +07-12-03 package.sh: add LC_ALL=C +07-11-27 package.sh: fix overaggressive *.md5 cleanup +07-11-20 iffe.sh: treat exit status >= 250 as normal error with no signal +07-11-05 package.sh: fix write op error count pattern +07-11-05 package.mk: fix $(~req) .ver binding +07-08-11 probe.win32: add cl.exe setuid workaround, CC.VERSION[.STRING] +07-08-01 package.sh: handle 'package read lcl|tgz' +07-05-08 regress.sh: execute basename instead of absolute path for short $0 +07-04-27 cc.sgi.mips[34]: for #error to exit non-zero -- a no brainer +07-04-20 mktest.sh: defer to systems without 'grep -q' -- sigh +07-04-11 mamprobe.sh: handle $(CC.*) => ${mam_cc_*}, $(...) => ${...} +07-04-11 make.probe: fix CC.PICBIG probe, default { CC.PIC CC.DLL } to BIG +07-04-04 iffe.sh: prepend ${tst}${ext} to each .c probe +07-03-28 package.sh: fix binary tgz architecture type duplication +07-03-28 package.mk: add binary write PACKAGE.$HOSTTYPE.lst +07-03-28 iffe.sh: add -F header to mac test +07-03-23 make.probe: handle file(1) that returns 'archive' for .so +07-03-22 mamprobe.sh: fix STDED probe for implementations that ignore EOF +07-03-11 package.sh: add nocopyright and tst => nocopyright +07-03-11 package.mk: add copyright=0 +07-03-08 C+probe: restore IFS after probe.ini +07-02-26 mamake.c: expand first of ${mam_lib*} for ${AR} +07-01-05 package.sh: fix "admin write binary" logic +07-01-01 iffe.sh: add "cmd" --verbose trace +07-01-01 iffe.sh: sort => LC_ALL=C sort +07-01-01 C+probe: LC_ALL=C +06-12-22 make.probe: lean on gcc -v for stdlib, but preserve /usr/local! +06-11-23 package.sh: *.md5 are not tarballs -- doh +06-11-23 iffe.sh: add -F, --features=feature-test-header +06-11-11 make.probe: favor lib64 over lib for hosttype==*64 +06-10-31 make.probe: add "-ignore-source-dir -iquote" test +06-10-31 iffe.sh: add status{...} code block +06-10-11 regress.sh: fix DO to handle {...} (time for regress.tst?) +06-10-11 package.sh: handle already gunzip'd *.tgz +06-10-06 iffe.sh: add reference for header content tests +06-09-27 regress.sh: fix UMASK to do DO too (duh) +06-09-22 iffe.sh: drop -O for npt tests (for msvc intrinsics) +06-09-14 cc.darwin: drop -O until gcc 4.* gets its act together +06-09-11 package.sh: { cc ld ldd } intercepts check ${HOSTTYPE%.*} too +06-09-08 regress.sh: add PIPE INPUT|OUTPUT for pipe io +06-09-05 C+probe: add { probe_version version_stamp version_string } +06-09-05 make.probe: add version stamp comment, CC.VERSION[.STRING] +06-08-27 regress.sh,mktest.sh: add UMASK +06-08-25 regress.sh: add -b,--ignore-space,IGNORESPACE +06-08-25 mktest.sh: add IGNORESPACE +06-08-24 mktest.sh: handle \000 in data +06-08-24 regress.sh: handle -f* for INPUT|OUTPUT|ERROR +06-08-16 package.sh: fix 'install flat' logic +06-08-11 rt.sh: handle style=shell %K date format +06-07-17 ratz.c: fix __MVS__ FAR definition +06-07-17 iffe.sh: "header x.h" -- deprecate "include x.h" for .SCAN.iffe +06-07-17 package.sh: differentiate urls vs. assignments +06-06-27 rt.sh: add --failed, --heading +06-06-27 C+probe,TEST.mk,make.probe,mktest.sh,regress.sh: 'ulimit -c 0' +06-06-26 cc.darwin.ppc: handle -lcc_dynamic disappearance +06-06-25 mktest.sh: implement PROG +06-06-11 Makefile: add -ldbm :MAPLIB:, provide public MAPLIB.mk +06-05-06 package.sh: add PACKAGE_admin_tail_timeout +06-05-22 ratz.c: upgrade to zlib-1.2.3 +06-05-09 package.sh: fix admin.db docs +06-03-11 package.sh: fix `package use - command ...' +06-03-05 make.probe: work around pedantic bash 3.1 mismatched " in `.` +06-02-14 package.sh: "results failed test" == "results test failed" + cc.sgi.*: add _AST_cc_OPTIONS parameterization, -OPT:Olimit=0 + cc.linux.ia64-icc: add for Intel cc +06-02-02 package.sh: FreeBSD stuck with OS version for all arch +06-02-01 package.mk: fix locale logic (tw -d requires dir arg) +06-01-31 package.sh: require $CC only for make|test +06-01-30 package.sh,hurl.sh: use the backwards-compatible --http-passwd + package.sh: add more pdksh => /bin/sh checks +06-01-26 package.sh: wget --http-pass => --http-password + package.sh: fix wget error logic + hurl.sh: wget --http-pass => --http-password +06-01-11 package.mk: pass package.license.class to make --mam too + package.mk: variants=pattern => --variants=pattern + package.sh: Darwin rel<=7 => darwin7.ppc + package.sh: FreeBSD rel<=4 => freebsd4 + package.sh: FreeBSD rel<=5 => freebsd5 +05-12-07 iffe.sh: don't emit if | (XXX) +05-12-05 make.probe: disable readonly.exe core dump via ulimit -c 0 +05-09-22 mktest.sh: add EXEC [ ++NOOUTPUT ++NOERROR ++NOEXIT ] +05-09-21 mktest.sh: fix --style=shell compare to ignore \r +05-09-12 TEST.mk: all --force to force %.rt regeneration +05-09-05 TEST.mk: regenerate from %.rt only if newer, :SAVE: %.tst +05-08-25 mktest.sh: add + TEST.mk: add %.rt=>%.tst for mktest +05-08-18 package.sh: 'package host cpu' now checks $NPROC first +05-07-17 iffe.sh: add { define extern include print } ops + iffe.sh: accept output{...}end output on success only -- doh +05-07-01 package.sh: add TARPROBE for tar B flag probe +05-06-24 package.sh: fix binary read chmod via *.sum +05-06-06 package.sh: fix KEEP_HOSTTYPE logic to handle synthesized types +05-06-01 make.probe: verify that cc_pic works for hosted cc + cc.lynxos.ppc: make -mshared the default + package.sh: note $INSTALLROOT/bin/@(cc|ld|ldd) installation +05-05-25 make.probe: add CC.INCLUDE.LOCAL instead of -I- in CC.DIALECT +05-05-24 iffe.sh: really fix grouping logic -- with tests this time + package.sh: pipe/socket configuration mismatches => use /bin/sh +05-04-28 TEST.mk: add $(TESTS) +05-04-19 package.sh: package results test uses rt if possible + iffe.sh: fix 'op var - ... - ...' grouping logic +05-04-15 rt.sh: handle autom4ate style +05-04-11 regress.sh: fix unit name when command line unit also specified + rt.sh: handle all AST package test output formats + package.sh: fix make docs for options passed to underlying make +05-04-08 package.sh: cp -p makerules.mo to $OK to preserve mtime + regress.sh: add "TITLE name" to change TEST output title +05-04-01 rt.sh: add pretty make test + regress.sh wrapper +05-03-29 package.sh: test -e path => test -f path -o -d path +05-03-24 make.probe: fix CC.PICBIG probe to prefer -fPIC over -fpic -- doh +05-03-19 mamake.c: command line name=var also defines name.FORCE=var +05-03-11 regress.sh: unset LC_ALL when LC_* EXPORT'd + package.sh: old make.out saved in circular make.out.[1-9] + mamake.c: sync with nmake :W=O: +05-03-01 package.sh: fix flat hierarchy initialization + package.sh: admin action now properly resets sibling remote logs + package.mk: relax unknown/unwritten package messages to warnings + package.sh: handle space in command line name=value + make.probe: add MVS -Wc,dll,exportall,longname,rent to CC.DLL probe +05-02-24 package.sh: hosttype *.powerpc => *.ppc + cc.lynxos.ppc,ldd.lynxos.ppc: add +05-02-22 mamake.c: fix { -G --debug-symbols -S --strip-symbols } MAMAKEFLAGS bug +05-02-20 probe.win32: handle /platformsdk mount +05-02-19 package.sh,package.mk: add write tst for tgz in tst subdir +05-02-18 package.sh: accept cc -dumpmachine with 0 or 1 - +05-02-14 package.sh: handle multiple architectures per host in admin.db + Makefile,package.sh: honor $INSTALLROOT/bin/.paths overrides + package.sh: normalize trailing [-_]bits in host type + iffe.sh: some ksh-compatible shells don't do *(pattern) +05-02-11 iffe.sh: back out 05-01-11 child process stdin hijack + cc.lynxos.i386: -dynamic instead of -static default +05-02-10 package.sh: cyg usr/doc => usr/share/doc +05-02-08 package.sh: drop -m with pax -- delta bug fixed 2005-02-08 + iffe.sh: work around old bash 0<... redirection bug +05-02-06 package.mk: source.tgz: update generated files only when they change +05-02-02 *.sh,*probe: IFS may be unset and { ash bsh } don't on startup -- wow +05-01-11 package.sh: update setup docs to include authorize+password + package.mk: fix .source.cyg final directory edit + package.mk: notice=1 for conspicuous empty NOTICE file + WWW.mk: fix *-index.html installation + filter.sh: retain input file suffix in tmp copy + mamexec.c: fix non-contiguous "exec" bug that skipped lines + iffe.sh: fix candidate lib test to try grouping subsequent libs + iffe.sh: fix child process stdin hijack that skipped input lines + iffe.sh: --shell=osh to force read -r compatibility command + iffe.sh: chop iffe input leading space before # for KnR compatibility +05-01-05 package.sh: add ${TAR} ${TARFLAGS} and tar B flag for pipes + mamake.c: fix makefile scan to ignore lib*.[hH] + iffe.sh: immunize function/symbol tests from aggressive -O +04-12-28 WWW.mk: add :WWWPAGE: faq.*.mm index generator +04-12-21 ratz.c: make sure tmp dir is writable -- doh +04-12-08 iffe.sh: fix dat test for aggressive -O +04-12-01 iffe.sh: add `include file' to pull in #define's for `exp' +04-11-11 package.sh: default MAKESKIP is "*[-.]*" +04-10-22 ratz.c: change docs to note zlib license + mamake.c: handle --debug-symbols and --strip-symbols + package.sh: make (debug|strip)=1 => --(debug|strip)-symbols + package.mk: add :LICENSE: => package.license.class + mamake.c: fix recursive order logic +04-10-18 package.mk: add :LICENSE:, :OMIT: to omit package subdirs +04-10-11 package.sh: add 'authorize name' and 'password password' +04-10-01 iffe.sh: double check $static link with ! $static + Makefile: add BUILTIN_LIB to $INSTALLROOT/bin/.paths + make.probe: add CC.DIALECT EXPORT={ALL,REF,EXT,DLL} + package.sh: add BUILTIN_LIB to $INSTALLROOT/bin/.paths +04-09-21 package.mk: $(init)$(name) is now an implicit prereq +04-09-09 package.sh: copy makerules.mo to $INSTALLROOT/bin/ok +04-09-01 package.mk,package.sh: rename *.txt => *.README + package.mk: add the runtime package type (no *.[ah]) + iffe.sh: fix key test reports +04-08-26 Makefile: { add m2.c m3.c } -lm tests for { frexp[l] ldexp[l] } +04-08-11 package.mk: handle HOSTTYPE for Solaris > 9 + package.sh: add `checkaout proto' for { make view } + package.sh: check for { md5sum md5 } + iffe.sh: add {if|elif|else|endif} test ... + iffe.sh: add 'exp - expression' and '( expression )' + iffe.sh: add 'name = test ...' user defined macros + iffe.sh: add '! test ...' negation + TEST.mk: add implied { .c .sh } generated prereq + cc.darwin.ppc: handle 10.3 -dylib mess +04-08-01 package.mk: let include handle nested requirements -- duh +04-07-31 package.sh: attempt a second ping before admin assumes host down +04-07-26 package.sh: fix hp.ia64 HOSTTYPE +04-07-23 probe.win32: generalize #include dir order search +04-07-17 regress.sh: add INPUT -x for chmod +x +04-07-01 regress.sh: TMP => TWD +04-06-29 regress.sh: put COMMAND in $TWD too +04-06-21 regress.sh: mkdir -p INPUT and OUTPUT intermediate dirs + TEST.mk: add :TEST: -- to disable .c .sh search +04-06-18 TEST.mk: add .SCAN.tst +04-06-17 regress.sh: TEST returns true if active, false otherwise + regress.sh: add CD to change test pwd from $TWD +04-06-16 regress.sh: add TWD for ./unit.tmp override + regress.sh: DO now flushes previous test + regress.sh: INPUT and OUTPUT handle -f for printf instead of print +04-06-11 package.sh: make sure $INSTALLROOT/bin is in front of $PATH + package.sh: skip nmake if older than 2000-10-31 +04-05-20 package.sh: fix arg vs. package parse with - or '' to disambiguate +04-05-11 package.sh: package verbose update lists closure for package setup + package.sh: add src/lib/libardir to nmake proto bootstrap + regress.sh: probe for rm -u vs. chmod -R u+rwx +04-05-01 package.sh: $CC must be C, not C++; allow release command on $PATH +04-04-15 make.probe: check probe_libdir false positives + package.sh: add lib/package/*.lic src package subdirs + package.mk: add mamfile=0 to inhibit Mamfile generation + iffe.sh: config name_DECLARED => HAVE_name_DECL + iffe.sh: fix mac to handle default value +04-04-11 iffe.sh: normalize sed [\\\\/] quoting +04-04-04 package.mk: only checksum generated tarballs + mamprobe.sh: add STDCHMOD +04-04-01 C+probe: set export LANG=C for uniform error messages + make.probe: another CC.STDLIB tweak + package.sh: fix regress core dump pattern, expand [a-z] match ranges +04-03-31 Makefile: add intl :MAPLIB: test + make.probe: fix CC.STDLIB search; drop CC.* path duplicates +04-03-28 iffe.sh: drop unused exec $stdin<&0 dup +04-03-25 Makefile: add iconv :MAPLIB: + package.sh: use ${PING:-ping -c 1 -w 4}, allowing admin.db override +04-03-24 package.mk: add *.md5 checksum for each *.(c|exe|tgz) + package.sh: update base change on md5 sum instead of size + iffe.sh: adjust case label \ and keyword quoting for ancient /bin/sh +04-03-22 probe.win32: ncc => nld +04-03-19 CONVERT.mk: change the instructions and old source dir default + package.mk: fix recurse=list check + package.mk: add *.md5 checksum for each *.(c|exe|tgz) + package.sh: fix update base/delta/sync existence check +04-03-18 iffe.sh: -d2 does not remove core dumps on exit +04-03-17 package.sh: fix make recurse arg/action order +04-02-29 package.sh: add regress action to compare current and previous tests + package.sh: fix sgi.mips[23] HOSTTYPE test for old IRIX cc + package.sh: add `export variable ...' + package.sh: admin action now handles host name with non-id chars + package.sh: non-numeric M T W in admin.db disables that action + package.sh: fix admin write binary local vs. shared clash + cc.hp.pa: add _AST_CC_hp_pa_DEFAULT=+DAportable + cc.hp.pa64: sync with cc.hp.pa + cc.ibm.risc: -bnolibpath => -blibpath:/usr/lib:/lib + probe.win32: sync with make.probe + make.probe: fix last chance dynamic test + make.probe: add hp.pa CC.EXPORT.DYNAMIC -Wl,-E + make.probe: add ibm.risc CC.EXPORT.DYNAMIC -bexpall + make.probe: move probe_dll_def to the end of probe_dll + package.mk: capture subcomponent mamfile recursion +04-02-24 make.probe: strip "..." from cc/ld traces + iffe.sh: add ``set [no]define'' to disable macro #define/#undef +04-02-23 make.probe: rework CC.LD search +04-02-14 make.probe: add CC.EXPORT.DYNAMIC for main dynamic sym export + make.probe: resurrect CC.PIC with separate semantics from CC.DLL + make.probe: add CC.SHARED.LD for CC.SHARED linker + C+probe: clear DISPLAY to stifle interactive windows +04-02-11 iffe.sh: handle ``siz void*'', add cross{ ... }end + make.probe: add { CC.AR CC.SIZE }, fix cross command search + cc.darwin.ppc: change $cc => $CC for old ksh + libast conf bug +04-02-09 make.probe: drop -nostartfiles from CC.SHARED for C++ +04-02-04 package.sh: fix cross compilation bug that mixed binary formats +04-02-02 package.sh: package admin now ditto's bin/package too +04-01-30 cc.sgi.mips3: drop warning 3421 +04-01-11 regress.sh: output label#count for tests in loops +04-01-05 regress.sh: fix bug that ignored the first SAME +04-01-04 crossexec.sh: fix typo that did not recognize rcp +03-12-19 mamake.c: add `foolib:foo:libfoo' to recurse() +03-10-11 regress.sh: add EXPORT, export COLUMNS=80 for message consistency +03-09-23 ratz.c: fix tar header number parse bug that skipped to next number + regress.sh: rm cleanup now handles files matching -* +03-09-11 iffe.sh: add unnamed { ... } blocks + regress.sh: add COPY from to, like MOVE but comparison still done + regress.sh: rm -rfu to handle test dirs w/o u+rwx +03-08-14 Makefile: add hello.c to the manifest +03-08-11 package.sh: fix `html binary' generation +03-06-21 package.sh: fix INITROOT initialization bug + package.sh: make sure admin logs exists before tail'ing +03-06-11 probe.win32: fix $(BINDIR) typo that expanded in sh instead of make + cc.mvs.390: return code 4 yields exit code 3 but it's *really* ok + package.sh: fix onpath function global var conflict + make.probe: add CC.DIALECT { GNU -dD } + package.mk: add Mamfile to lcl manifest +03-06-10 package.sh: fix setup action typo that only checked the INIT package + package.sh: *.s390x => *.s390-64 +03-06-09 package.mk: add cyg :POSTINSTALL: +03-06-08 make.probe: fix CC.STDLIB logic + hurl.sh: add User-Agent identification + package.sh: tweak source and binary installation instructions + cc.hp.pa,ld.hp.pa: +-Wl,+cdp,${INSTALLROOT}/lib/: drops abs lib paths + ldd.hp.pa: add +03-06-06 package.sh: fix $INSTALLROOT/bin/ldd check + make.probe: add CC.STDLIB verification +03-06-04 make.probe: add +forceread +noforceread +03-05-11 hurl.sh: handle http://host:port/path +03-05-06 package.sh: fix setup action PACKAGEROOT and INIT logic +03-05-05 package.mk: fix Cygwin tarball names +03-04-30 package.sh: move (cc|ld|ldd).$HOSTTYPE updates from Makefile +03-04-27 make.probe: fix MVS CC.PREFIX.SHARED "lib" => "" + make.probe: add CC.DLL.DIR = $(BINDIR) or $(LIBDIR) + make.probe: add { CC.LD.LAZY CC.LD.NOLAZY CC.LD.RECORD CC.LD.NORECORD } + probe.win32: sync with latest CC.* +03-04-25 mamprobe.sh: add args to `. $makeprobe' for ancient sh +03-04-23 package.mk: fix dup "covered by" licenses +03-04-22 probe.win32: CC.DIALECT += "LIBPP -I-" for all cc's + package.sh: fix admin write binary tarball snarf +03-04-21 package.mk: package covered *.@(pkg|lic) too +03-04-15 package.mk: don't generate incremental archives for lcl + package.mk: add incremental=[source:1 binary:0] archive control + package.sh: generate $INSTALLROOT/bin/cc wrapper for CC != cc + package.sh: admin must ditto lib/package/*.@(pkg|lic) too + mamake.c: ignore time of ignore prereqs + mamake.c: -D2 lists propagated times +03-04-11 package.mk: tidy up cyg tarballs + package.sh: fix old shell clash between get() and $get +03-04-05 package.mk: restore *.inx generation somehow lost during cyg additions + package.sh: add pthread_num_processors_np() last resort for CPU count + package.sh: use `make believe' to accept mamake generated files + package.sh: handle `make [make-flags] [target ...]' + mamake.c: ignore -e +03-03-21 package.mk: fix cyg old make typo + package.sh: switch to `package setup' instructions +03-03-19 package.sh: add registry checks for `host cpu' + package.sh: `results failed' now lists core dump messages +03-03-17 package.sh: on Cygwin verify 'ntsec binmode' in $CYGWIN or die + Makefile: install gcc wrapper if no cc + package.mk: add :DETAILS: { :README: :EXPORT: :INSTALL: :TEST: } ops +03-03-12 package.mk: add :DETAILS: for style-specific details +03-03-11 package.sh: add beta setup/update support + TEST.mk: add (TESTCC) prereq for .sh tests +03-03-07 hurl.sh: add +03-03-06 iffe.sh: fix lib Win32 test Cygwin vs native incompatibility + iffe.sh: change internal stdio.h guard to handle C++ inline vs. macro +03-03-03 package.sh: check for curl or wget for update + package.sh: add setup action == update read make + package.sh: fix packageroot() typo that showed up in non ~user shells + mamake.c: treat name+=value args like name=value + mamake.c: add ${var?*|value?match?no-match?} + mamake.c: fix archive vs. dynamic bind logic +03-02-28 package.sh: add the "cyg" (Cygwin) package type + package.mk: add "cyg" stubs, :CATEGORY: for category name(s) +03-02-25 mamake.c: add -D4 system(3) debug trace +03-02-24 package.mk: change --mismatch to --corrupt=accept +03-02-14 ratz.c: add _WIN32 setmode([01],O_BINARY) and fopen "rb"/"wb" +03-02-12 Makefile: handle getconf LIBPATH with host pattern +03-01-31 package.mk: fix .lic search +03-01-30 package.sh: handle { INIT ksh nmake } already installed elsewhere + package.sh: admin handles command outside of $PACKAGEROOT/bin + Makefile: install $(INSTALLROOT)/lib/make/package.mk +03-01-28 package.sh: admin remote commands on one line to please syslog +03-01-23 probe.win32: borland and mingw32 tweaks +03-01-22 package.sh: fix $CC test to ignore set -x trace -- duh +03-01-16 ditto.sh: tw --chop on by default +03-01-14 package.sh: use /bin/cp to copy previous binaries to bin/ok/ + package.sh: admin now initiates remote exec and copy from local host +03-01-12 package.sh: handle admin "xxx:" default root +03-01-03 probe.win32: add /usr/include/borland path truncation workaround +02-12-10 iffe.sh: add <&$nullin >&$nullout to checkread() $cc +02-12-06 probe.win32: fix inlcude => include typo, add lcc lib + probe.win32: CC.MAKE.OPTIONS = nativepp=0 +02-12-04 mamake.c: fix ${foo-bar} to expand foo if defined +02-11-28 probe.win32: add C++ and -I- CC.DIALECT checks +02-11-26 package.sh: package release now checks for second level files +02-11-22 package.sh: update action now uses HTTP/1.0 +02-11-21 probe.win32: update the vc include dir test +02-11-20 make.probe: fix CC.LD.ORIGIN typo that expanded make var +02-11-13 packahe.mk: fix list.install => list.installed typo +02-11-12 make.probe: add CC.LD.ORIGIN for a.out origin dir relative dll search + make.probe: add CC.LD.STRIP for link time a.out strip + package.sh: fix package_use vs. PACKAGE_USE check +02-10-24 WWW.mk: fix bug that required a :WWWBIN: assertion to post +02-10-23 mamake.c: fix uninitialized time in make() + ratz.c: fix meter buffer overflow +02-10-20 package.sh: fix lib/probe/C/make/probe update test +02-10-18 probe.win32: update for mingw + make.probe: add bash workaround to SHELLMAGIC test + package.sh: work around yet another Cygwin hassle +02-10-17 iffe.sh: short circuit ID check for *[-+/\\]* +02-10-08 regress.sh: unset FIGNORE to avoid rm . errors + package.sh: unset FIGNORE to avoid rm . errors + package.sh: $CC must at least compile and executable hello world +02-10-04 package.sh: $INSTALLROOT/lib/package/tgz=>$PACKAGEROOT/lib/package/tgz + package.mk: $(ED) => $(STDED), $(EDFLAGS) => $(STDEDFLAGS) + iffe.sh: add identifier checks for tests that (implicitly) require them + iffe.sh: disambiguate a few --config macros +02-10-02 iffe.sh: fix shell=bsh `hdr a/b' +02-09-30 package.sh: handle chmod of -* files + package.sh: verify that $SHELL is Bourne compatible + package.sh: tighten PACKAGE_USE logic PATH,LIBPATH,etc. validation + iffe.sh: fix bug that didn't define mac variable on success +02-09-22 package.sh: handle admin_action=ditto + iffe.sh: --config sizeof(foo) macro is SIZEOF_foo + iffe.sh: fix long.long test so it doesn't defeat UWIN "typ long.long" + mamprobe.sh: convert $("foo") nmake string constants +02-09-21 mamprobe.sh: "-" info-path writes probe info to stdout +02-09-11 make.probe: move from nmake src to be part of mamprobe.sh + mamprobe: generate from mamprobe.beg C.probe make.probe mamprobe.end + mamake.c: pass cc absolute path to mamprobe + package.sh: generate mamprobe -- yuk (at least it's confined to INIT) + iffe.sh: lcl,nxt: drop default sys/ check + ditto.sh: tw --logical by default; add --physical +02-09-10 package.sh: SHELLMAGIC creeps into package too -- duh and fooey +02-09-09 ditto.sh: test that remote .profile exists before sourcing +02-09-06 package.sh: don't ditto nfs junk + ditto.sh: --show now lists directory ops instead of enumerating all +02-09-05 ditto.sh: add --remote={rsh|ssh} + package.sh: add admin [[{rsh|ssh|-}]:]directory +02-09-02 iffe.sh: change 'print -r --' to 'print -r -' for ksh86 compatibility +02-09-01 cc.unix.mc68k: add for ancient 3b1 +02-08-22 package.sh: fix component() to test for components -- duh + Makefile: add LICENSE:.DONTCARE to workaround mam +02-08-11 iffe.sh: provide defaults for LD_* additions +02-08-07 ratz.c: change -m to use * instead of non-portable inverse video +02-07-17 mamprobe.sh: close tmp file in trap before rm for Cygwin + package.sh: fix "type" to handle i1586 (P4) + package.sh: add the view action +02-06-28 package.sh: handle multiple packages for release action +02-06-27 package.sh: catch sol*.sparc=>sol*.sun4 when CC=gcc +02-06-14 package.sh: fix admin_action to not include qualifiers + package.sh: fix help/html doc typo +02-06-11 package.sh: fix ditto update doc to `PACKAGEROOT field matching *:*' +02-06-07 WWW.mk: change substitute $("\n") to \n +02-06-06 package.sh: clarify output streams for help/html +02-05-22 mamake.c: fix executable file check to use (S_IXUSR|S_IXGRP|S_IXOTH) +02-04-04 package.sh: fix update to differentiate *.sun4 and sun4 +02-03-27 package.sh: yacc/bison warning only if both missing +02-03-24 mamake.c: all shell actions wrapped with -c to avoid #! problems +02-03-23 package.sh: recover $PACKAGEROOT/bin/package if not in INIT package + package.sh: precheck $CC, not `cc' + package.sh: fix install to use pax -ps to preserve setuid/setgid + package.sh: fix install to use list.installed for existing files only +02-03-17 package.sh: fix PAX initialization that was sometimes omitted for read + package.sh: fix update delta sync fetch +02-02-14 iffe.sh: fix macro{ }end docs to include " + iffe.sh: add dfn to extract #define from headers + iffe.sh: handle nxt #include ok but no line sync + iffe.sh: drop local header clash logic + iffe.sh: add -X, --exclude=dir to exclude -I dirs + iffe.sh: lcl,nxt now generate <...> headers instead of "..." + package.sh: admin.db root dir matching -* disables host + package.mk: fix package.src.pat typo -- too many ) + package.mk: add { :COVERS: :DESCRIPTION: :REQUIRES: } + package.sh: handle { :COVERS: :DESCRIPTION: :REQUIRES: } + Makefile: move proto.c generation to the proto component dir +02-02-02 execrate.sh: add for .exe challenged Win32 systems/commands + mamprobe.sh: add STD* commands/flags + mamake.c: update mamprobe info when older than mamprobe executable + package.sh: move ed/ex workaround to mamprobe.sh + package.sh: fix `host type' bug that incorrectly assumed sun4 for sol + package.sh: add execrate(1) hooks for challenged systems + package.sh: add check for { cc ar nm yacc/bison } before make + ratz.c: fix "rb" vs. "r" macro tests + iffe.sh: add nxt, similar to lcl but defines _nxt_foo for #include + iffe.sh,package.sh: remove variable from sccs,cvs ident strings -- duh +02-01-24 C+probe: check CC.DYNAMIC to handle cc that accept but ignore -B* + iffe.sh: handle 'mem struct.a.b' +02-01-22 iffe.sh: cache (internal) `foo vs. struct foo' test results + package.sh: uts.370 => uts.390 +02-01-18 package.sh: fix uts hosttype +02-01-17 package.sh: add 'results failed ...' to list failures only + package.sh: change ARCH internal var to all_types to avoid env conflict + iffe.sh: fix hdr/lib precheck that missed some -- ouch + iffe.sh: fix noexecute test that forgot to check compile first! +02-01-15 ratz.c: fix path[] type typo +02-01-01 package.mk: tighten license search +02-01-08 package.sh: `pwd` => ${PWD:-`pwd`} + package.mk: expand license file pattern match +02-01-04 iffe.sh: fix `exp name "value"' bug that duped "value" + iffe.sh: fix initial check to honor --config +01-12-25 iffe.sh: fix bug where -o file restored old file +01-12-23 package.mk: uniq the closure lists +01-12-07 ratz.c: fix --meter to retain paths containing " -- " +01-11-30 ratz.c: use sear_system() to execute; should work on all windows +01-11-28 ratz.c: fix sear_rm_r() to check SetCurrentDirectory() status +01-11-26 ditto.sh: drop n+=v for ksh compatibility +01-11-21 ditto.sh: add rsync script replacement [hey, it works!] + package.sh: add [ditto]:directory notation to admin.db +01-10-31 package.sh: handle *.sum paths with embedded space + package.sh: change executable() to onpath() + package.sh: executable([!] foo) replaces test [!] -x foo (.exe hack) + package.sh: add os2 fix to `host type' + mamake.c: add .exe hack + iffe.sh: fix intrinsic function lib test + mamprobe.sh: update pic probe to match make.probe for linux.ia64 +01-10-30 package.sh: make action skeleton view now checks subdirs +01-10-20 package.sh: don't recurse into leaf dirs matching $MAKESKIP + package.mk: tarball package.notice replaces `license accepted' prompt + package.sh: eliminate `license accepted' prompt + package.sh: add update to download latest from a url + package.sh: use builtin arithmetic when we know it's ksh + iffe.sh: unkown -> unknown +01-10-18 package.sh: convert to YYYY-MM-DD delta releases instead of NNNN + package.mk: convert to YYYY-MM-DD delta releases instead of NNNN + ratz.c: fix -m for paths containing \f\n\r\v +01-10-16 ratz.c: _SEA_* => SEAR_* + ratz.c: preserve stdin for sear_exec() + ratz.c: add recursive sear_rm_r() to sear_exec() tmp dir cleanup +01-10-10 mamprobe.sh: add mam_cc_SHELLMAGIC + package.sh: add nfs wakeup call to admin to avoid stale file handles +01-10-04 cc.darwin.ppc: -flat_namespace is not longer the default (huh) +01-10-01 package make: prepend $INSTALLROOT/bin/ok to PATH + package read: save cpy of bin/package when reading the INIT package + mamprobe.sh: allow cc path with optional arguments +01-09-24 Makefile,package.sh: add $INSTALLROOT/bin/.paths initialization +01-09-19 package.mk: add recurse to list.package.* + package.sh: bootstrap build nmake with _BLD_STATIC for _WIN32 +01-09-11 ratz.c: add _SEA_SKIP & _SEA_COMMAND for self extracting archives +01-09-07 package.mk: fix output capture to not generate files names with spaces +01-09-07 package.mk: fix delta release number search +01-08-11 package.mk: handle single gz executable packages (e.g., for ksh) + package.sh: fix package install to require nmake only if no *.sum + iffe.sh: drop ancient menu and prompt actions; check ./hdr.h clash +01-07-17 package: fix use cross compile test to generate files in /tmp +01-06-27 ratz: handle hard and soft links if possible +01-06-07 Makefile: fix :MAPLIB: for sco +01-05-31 crossexec.sh: add + iffe.sh: add -x crosstype to run crossexec + iffe.sh: exp test now handles pass{}end fail{}end yes{}end no{}end + package.sh: add package host canon external-host-type-name + package.sh: fix `use USER' lookup for shells that support ~USER + cc.*: add -dumpmachine to dump target HOSTTYPE +01-05-18 iffe.sh: drop $HOME/tmp/t.sh debug trace -- oops +01-05-01 mamake.c: scan() now handles :PACKAGE: foo:command +01-04-26 *.sh: expand [a-z][A-Z][0-9] for non-contiguous character codes + iffe.sh: fix run *.sh for shells that don't $* across . command + cc.mvs.390: recode for /bin/sh +01-04-25 package.mk: include non cc-g variants by default + package.sh: *[._]* => *?[_.]* for mvs.390 /bin/sh +01-04-24 TEST.mk: no tests for VARIANT=="DLL" +01-04-22 package.mk,package.sh: tarball text members are ASCII encoded +01-04-18 package.mk: allow package name to be the same as one of its components + cc.mvs.390: handle .C .cpp .cxx + cc.mvs.390: compensate for -o that does not overwrite +01-04-01 regress: fix SAME that just skipped it -- we should regress regress! + iffe: fix bug that didn't emit _hdr_foo for internal hdr tests + iffe: fix lcl bug for cc -E that doesn't emit line syncs + ratz: add ASCII=>EBCDIC conversion for text archive members + mamake: fix buffer overlap bug that clobbered the probe file path +01-03-17 iffe: handle : separator as first arg +01-03-15 mamake.c,ratz.c,release.c: add and +01-02-26 iffe.sh: fix bug that omitted runtime #define for `mac' op +01-02-22 cc.ibm.risc: handle SF_CLOSE clash in +01-02-14 cc.sgi.mips3,cc.sgi.mips4: handle -mips2 -mips3 -mips4 for cross cc + C+probe: quote "$cc" when it's an argument! + mamake: execute actions with $SHELL, ignored signals back to default + package.sh: nmake check error output to /dev/null + package.sh: fix INIT a.out updates for knr cc + package.sh: package list now handles large tgz dirs + package.sh: *-ok executables moved to ok/* for *.dll systems + iffe.sh: change "exec >&-" to "exec >/dev/null" else Linux mkdir fails! + mamake: handle `bind -lx [dontcare]' +01-02-12 ratz.c: fix _PACKAGE_ast includes + package.sh: $HOSTTYPE env overrides if $PACKAGEROOT/arch/$HOSTTYPE/ + package.sh: $CC ^HOSTTYPE=[A-Za-z_0-9.]*$ overrides HOSTTYPE + iffe.sh: fix dat code that used previous $tmp.exe + iffe.sh: fix dat code for _DLL imports +01-02-09 iffe.sh: add copy() for shells with the disappearing here doc bug +01-02-08 Makefile: guard against null $(CC.HOSTTYPE) +01-02-06 Makefile: separate out cc,ld,ldd workarounds (so they will be packaged) +01-02-02 package.sh: fix package use for $INSTALLROOT != */$HOSTTYPE + package.sh: create intermediate recursion makefiles when needed + package.sh: add $SECONDS to the DEBUG trace prompt +01-01-01 ratz.c: #ifdef for UWIN ncc + iffe.sh,package.sh: check PACKAGE_PATH for local installations + package.sh: add psrinfo for osf.alpha host cpu + package.sh: change pax --meter probe; some hang on /dev/tty + package.sh: fix `install flat ARCH' + mamake: eliminate loops from scan order + C+probe: add probe_verbose -V for AIX cc=xlc + cc.ibm.risc,ldd.ibm.risc: add + package.mk: list refs to top-level licenses only + package.mk: add local link table to change log html +00-12-25 package.sh: `no package archives' is a hard error, duh + package.sh: reorder host type logic for lame shells + mamake.c: getcwd => getwd for NeXT -- how about posix==default guys + iffe.sh: really gross workaround for NeXT -lposix stdout null's + iffe.sh: handle cc -E that insists on compiling +00-12-15 iffe.sh: ancient sh function call blows $*; call only when $# == 0 + *.sh: `getopts 2>/dev/null` => `(getopts)2>/dev/null` for ancient sh + package.sh: fix LD_LIBRARY*_PATH initialization + cc.next.m68k: add for _POSIX_SOURCE and linker multiply defined syms +00-12-12 ratz: add --meter + package.sh: a few VPATH fixes + Makefile: don't override *.mips* cc if -version not accepted +00-12-11 package.mk: *.inx now contains name=value +00-12-07 package.sh: handle PC netscape . => _ pathname mangle + WWW.mk: .tar.gz => .tgz +00-11-27 package.sh: add checklicense() to do license checks at read time + package.mk: change component list from preformat to table +00-10-31 package.mk: *.pkg must assert closure + package.mk: add cc- variants to list.package.binary + package.sh: omit dups from package list + package.sh: invalid arg gives one line Usage + package.sh: relax checkaout checks for non-owners + package.sh: package use sets NPROC if not already set or [01] + proto.c: add $(INSTALLROOT)/include/ast hack +00-10-26 WWW.mk: add .SOURCE rhs to :WWWPAGE: +00-10-25 package: fix install + package.mk: add list.install +00-10-22 regress: fix VIEW to skip empty dirs +00-10-19 package.mk: $(PACKAGEROOT)/bin/nmake => $(PACKAGEROOT)/bin/manmake + iffe: validate #define identifiers +00-10-18 C+probe: Mac OS X additions + package: add DYLD_LIBRARY_PATH initialization + add ldd.$(CC.HOSTTYPE) +00-10-01 iffe: handle -I* -L* options +00-09-21 mamake: add libxxx and xxx to makefile ordered prereqs +00-09-19 C+probe: add probe_longlong +00-09-11 package: drop manmake and $PACKAGEROOT/bin/nmake +00-09-08 iffe: verify that $cc is a C compiler +00-06-14 mamprobe: fix win32.* probe + mamake: fix bug that used lower view path for generation + package: don't clobber $PACKAGEROOT/bin/nmake +00-06-01 C+probe: fix stdinclude *again* + package: fix write delta source to use default pax format + package: add disambiguating bias for sgi.mips3 over sgi.mips4 + package.mk: fix for directory content packages lib ast-locale +00-05-01 iffe: fix invalid _LIB_ macro identifier +00-04-11 C+probe: uniq stdinclude and stdlib, fix usrinclude +00-04-01 regress: fix explicit OUTPUT bug that didn't compare with expected +00-03-17 package: all archives are .tgz for binary download + package: $(PACKAGEROOT)/LICENSES/* in source and binary archives + package: implement install and verify actions + iffe: add exp, pth file dir ..., fix lib - -lfoo, fix lib - - -la -lb + iffe: -L* must affect LD_LIBRARY* hacks for .exe tests -- yuk + package.mk: add *.pkg :INDEX: +00-03-07 package: add admin action +00-03-06 makefile: install optional make probe override script C+make+probe.lcl +00-02-14 --- release 1.0 --- + ratz: treat "foo/" as a dir, not a regular file + package: clarify source and binary installation instructions + package: fix so binary packages can install without cc + package: "ratz" now a non-archive package (the only one) for bootstrap + package: handle VPATH=a:b arg + package.mk: "ratz" package adjustments + Makefile: use :PACKAGE_INIT: to support binary INIT packages + WWW.mk: add :WWWALL: + C.probe: fix .so check that let .dll slip through + iffe: fix config sh var assignment for HAVE_member_IN_struct + iffe: fix config sh var assignment for symbol_DECLARED + package: delay PATH export until dll hack exports complete + package: don't forget binary package $(INSTALLROOT)/lib(32|64) + package: add delta change log for source packages +00-02-10 mamprobe: add mam_cc_DLLBIG + package: fix spelling typos + package: add html help output + package.mk: beef up source and binary help => html +00-02-08 package: mkdir man/man[138] in the new arch to cover MAM bug +00-01-28 package,release: add -rcount to release + package: fix Linux "host cpu" and "host rating" + package: copy *.lic to $PACKAGEBIN for "make" and "write binary" + package: fix 'release change log' case match +00-01-24 package: add copyright action + mamprobe: add -D_BLD_DLL to mam_cc_DLL +00-01-11 package: tsort for package write + package: early verification that $CC works + package: add non-interactive command arg for use action + proto: fix -C intermediate mkdir() + mamprobe: unixware.i386 ksh workaround + C.probe: move hosttype to C.probe (with unixware.i386 workaround) + WWW.mk: fix mm2html option quoting + WWW.mk: add .SCAN.mm + WWW.mk: don't force static=1; grab dll's instead + *.sh: fix getopts test to handle botched implementations like osf.alpha + iffe.sh: fix read -r test +99-12-25 iffe: tweak verbose messages + iffe: hand code non-optget getopts parse + iffe: fix bash quoting bug again + iffe: do test -w . after option parse + package: fix PACKAGEROOT search +99-11-19 --- release 0.2 --- +99-11-19 first working package & friends +99-10-31 change from lib0ast to INIT; add MAM and package bootstrap + hostinfo: gobbled by package +99-10-01 iffe: add --config, yes{...}end no{...}end, fix read -r workaround +99-09-27 iffe: add --all --verbose, --* set options +99-09-22 regress: -v disables long line truncation +99-09-11 WWW.mk: WWWDIR and MM2HTMLINFO are now lists searched in $(HOME) +99-08-11 hostinfo: fix type sgi.mips4 +99-06-24 WWW.mk: add +99-06-08 hostinfo.sh: ${TMPDIR:-/tmp} +99-06-07 TEST.mk: add +99-06-01 iffe: add `siz type' for _siz_type == sizeof(type) +99-05-11 hostinfo,iffe,regress,use: long options +99-05-01 C.probe: fix over aggressive stdinclude, e.g., /usr/include/machine +99-04-01 hostinfo: sgi.mips? -o32 and -n32 checks + iffe: check that . is writable +99-03-17 hostinfo: fix for cc not found + dl.c,hello.c,m.c: headers in conditionals to force .DONTCARE + C.probe: extra check for include dirs pulled in by +99-03-03 regress: add `UNIT - ...' for extra args + Makefile: add (_hosttype_) prereq for cc +99-01-23 hostinfo: tweak rating, use /proc/cpuinfo if there +99-01-11 C.probe: shlib before lib, /usr before / +98-12-25 iffe: work around win32.alpha intrinsic clash with -O +98-11-11 regress: fix UNIT PATH lookup +98-11-01 regress: add PROG +98-10-01 hostinfo: add unixware.* + use: export PACKAGE_* +98-08-11 C.probe: add /usr/include check (for sco CC) + hostinfo: handle UWIN uname update +98-05-01 regress: fix bug sometimes didn't list last test +98-04-01 hostinfo: add cc path arg + hostinfo: now works with /bin/sh + Makefile: strengthen -lm probe +98-01-23 Makefile: check for -ldl -lm + C.probe: handle gcc -v -E phony include dirs + iffe: fix lcl by dropping sort -u -- we need the real first + iffe: `mem x' to test if x is a non-opaque struct +98-01-11 $(INSTALLROOT)/lib32 for sgi.mips3 + $(INSTALLROOT)/lib64 for sgi.mips4 + add cc.hp.pa +98-01-01 cc.sgi.mips*: turn off ld library multiply defined +97-10-11 regress: add VIEW function for locating data +97-10-01 Makefile: -ldl test moved to libdll Makefile +97-08-11 regress: add MOVE + regress: add SAME + regress: use getopts + regress: `EXEC' repeats previous test +97-07-17 use: tweak PATH and LIBPATH bootstrap order + iffe: fix lcl bug that botched pathnames with embedded spaces +97-06-12 iffe: add npt `needs prototype' test +97-05-09 hostinfo: mvs.* => mvs.390 + Makefile: cc.$(_hosttype_) workaround installed here + iffe: fix nolink{ ... }end + iffe: add [no]static{ ... }end for static link test + C.probe: _probe_PATH => _probe_export which must be eval'd +97-04-01 use: _RLD_ROOT set too +97-03-17 mm2html: changed inner loop + mm2html: handle .if|.ie|.el, .so + mm2html: handle different man styles + mm2html: differentiate mm/man in some non-obvious cases + hostinfo: r5000 is not mips4 +97-02-14 hostinfo: validate type with cc +96-12-25 C.probe: UWIN tweaks + iffe: use `...` instead of $(...) for alpha /bin/sh + iffe: fix `typ' divide by 0 + iffe: `lcl' now drops X: prefix + iffe: +l* -> -l* + iffe: eval around ${...#%...} for BSD /bin/sh + use: add sgi.mips LD_LIBRARY_PATH variants + use: add -e to list exports + iffe: lcl leaves leading [a-zA-Z]: for DOS + iffe: fix no{link|output|execute} logic + C.probe: don't automatically add /usr/include for non-hosted compilers + C.probe: don't automatically place /usr/include last + C.probe: check gcc style -v -E for stdinclude usrinclude +96-11-28 iffe: check BASH_VERSION for IFS botch + iffe: typ long.xxx only if sizeof(long xxx) != sizeof(xxx) + hostinfo: fix sgi.mips[234] tests + hostinfo: fix ncr.i386 tests +96-10-31 iffe: work around old bsh here doc bug by running separate sh +96-10-11 iffe: *.iffe and *.iff for iffe src files + hostinfo: tighten sgi.mips CPU type check +96-10-01 C.probe: add probe_libdir to catch alpha /usr/shlib +96-09-17 iffe: fix typ bug that failed for single ID types! +96-08-31 hostinfo: handle recent SGI hinv CPU changes +96-07-17 make sure sizeof(long xxx)>sizeof(xxx) for typ long.xxx +96-05-09 C.probe: drop multiple / in stdinclude +96-02-29 use: package root must have bin and lib subdir + mm2html: add + C.probe: probe_members += -whole-archive for gcc + iffe: add + fix the blasted `...'...\\...'...` +96-01-31 use: add pkg dir + hostinfo: add tandem +96-01-01 hostinfo: windows_nt|windows[0-9][0-9] -> win32 +95-11-24 hostinfo: linux-aout.* for non-ELF Linux +95-11-11 use: add AIX LIBPATH +95-10-11 hostinfo: no args prints type +95-08-11 use: add +95-05-09 save original PATH in _probe_PATH + beef up library dir probe +95-04-01 use c source suffix if it still preserves the dialect + add hostinfo + add lib/hostinfo/typemap user type map + add sol.sun4 CPU count + fix C.probe to properly handle C/C++ combined compiler drivers + add NeXT to hostinfo + bummer: mach has /usr/bin/hostinfo +95-03-19 fix dialect executable test +95-03-19 --- release 0.0 --- diff --git a/src/cmd/INIT/ar.ibm.risc b/src/cmd/INIT/ar.ibm.risc new file mode 100755 index 000000000..022dc08b6 --- /dev/null +++ b/src/cmd/INIT/ar.ibm.risc @@ -0,0 +1,9 @@ +: ar requires a non-standard option to work : 2009-10-06 : + +op=$1 +shift +case $op in +-*) ;; +*) op=-$op ;; +esac +/usr/bin/ar -Xany "$op" "$@" diff --git a/src/cmd/INIT/ar.ibm.risc-64 b/src/cmd/INIT/ar.ibm.risc-64 new file mode 100755 index 000000000..ca3122b2c --- /dev/null +++ b/src/cmd/INIT/ar.ibm.risc-64 @@ -0,0 +1,9 @@ +: ar requires a non-standard option to work : 2022-01-14 : + +op=$1 +shift +case $op in +-*) ;; +*) op=-$op ;; +esac +/usr/bin/ar -X64 "$op" "$@" diff --git a/src/cmd/INIT/cc.hp.ia64 b/src/cmd/INIT/cc.hp.ia64 new file mode 100755 index 000000000..6b758c1b0 --- /dev/null +++ b/src/cmd/INIT/cc.hp.ia64 @@ -0,0 +1,13 @@ +: hp.ia64 cc wrapper for reasonable ANSI C defaults : 2011-01-25 : + +[ /usr/bin/cc -ef /usr/ccs/bin/cc ] || exit 1 + +: bundled cc -- really, in the face of gcc you ship a subpar /usr/bin/cc? : + +HOSTTYPE=hp.ia64 + +case " $* " in +*" -dumpmachine "*) echo $HOSTTYPE; exit ;; +esac + +/usr/bin/cc -D_HPUX_SOURCE -D_INCLUDE__STDC_A1_SOURCE -D_INCLUDE_XOPEN_SOURCE_500 "$@" diff --git a/src/cmd/INIT/cc.hp.pa b/src/cmd/INIT/cc.hp.pa new file mode 100755 index 000000000..ed644d002 --- /dev/null +++ b/src/cmd/INIT/cc.hp.pa @@ -0,0 +1,13 @@ +: hp.pa cc wrapper for reasonable ANSI C defaults : 2004-02-29 : + +HOSTTYPE=hp.pa + +case " $* " in +*" -dumpmachine "*) echo $HOSTTYPE; exit ;; +esac + +_AST_CC_hp_pa_DEFAULT=${_AST_CC_hp_pa_DEFAULT-"+DAportable"} + +/opt/ansic/bin/cc -Ae +e -Wl,+s $_AST_CC_hp_pa_DEFAULT \ + ${INSTALLROOT:+-Wl,+cdp,${INSTALLROOT}/lib/:} \ + -Wl,+vnocompatwarnings "$@" diff --git a/src/cmd/INIT/cc.hp.pa64 b/src/cmd/INIT/cc.hp.pa64 new file mode 100755 index 000000000..bbd2cf664 --- /dev/null +++ b/src/cmd/INIT/cc.hp.pa64 @@ -0,0 +1,11 @@ +: hp.pa64 cc wrapper for reasonable ANSI C defaults : 2001-02-11 : + +HOSTTYPE=hp.pa64 + +case " $* " in +*" -dumpmachine "*) echo $HOSTTYPE; exit ;; +esac + +/opt/ansic/bin/cc +D2.0W -Ae +e -Wl,+s \ + ${INSTALLROOT:+-Wl,+cdp,${INSTALLROOT}/lib/:} \ + -Wl,+vnocompatwarnings "$@" diff --git a/src/cmd/INIT/cc.ibm.risc b/src/cmd/INIT/cc.ibm.risc new file mode 100755 index 000000000..9df88088c --- /dev/null +++ b/src/cmd/INIT/cc.ibm.risc @@ -0,0 +1,63 @@ +: cc wrapper for AIX RISC xlc : 2012-04-17 : + +hosttype=ibm.risc + +case $HOSTTYPE in +$hosttype-64) + case " $* " in + *" -q64 "*) ;; + *) set -- -q64 "$@" ;; + esac + ;; +*) case " $* " in + *" -q64 "*) HOSTTYPE=$hosttype-64 ;; + *) HOSTTYPE=$hosttype ;; + esac + ;; +esac + +case " $* " in +*" -dumpmachine "*) + echo $HOSTTYPE + exit + ;; +esac + +bin=/usr/vac/bin +cc=$bin/xlc + +ccflags="-brtl -qhalt=e -qsuppress=1506-224:1506-507" +case " $@ " in +*" -G "*) + ccflags="$ccflags -berok" + ;; +esac +if test -x $bin/c99 +then # the xlc optimizer vintage that supports c99 is flawed and causes the AST build to fail # + case " $* " in + *" -O "*) + set '' "$@" '' + shift + while : + do a=$1 + shift + case $a in + '') break ;; + -O) ;; + *) set '' "$@" $a ;; + esac + shift + done + ;; + esac + $cc $ccflags "$@" + code=$? +else export PATH=/bin:$PATH LIBPATH=/usr/lib:/lib + ccflags="$ccflags -blibpath:$LIBPATH" +fi +$cc $ccflags "$@" +code=$? +case $code in +127|255) code=1 ;; +esac +exit $code diff --git a/src/cmd/INIT/cc.ibm.risc.gcc b/src/cmd/INIT/cc.ibm.risc.gcc new file mode 100755 index 000000000..961650db8 --- /dev/null +++ b/src/cmd/INIT/cc.ibm.risc.gcc @@ -0,0 +1,36 @@ +: cc wrapper for AIX RISC gcc : 2012-04-17 : + +hosttype=ibm.risc + +case $HOSTTYPE in +$hosttype-64) + case " $* " in + *" -maix64 "*) ;; + *) set -- -maix64 "$@" ;; + esac + ;; +*) case " $* " in + *" -maix64 "*) HOSTTYPE=$hosttype-64 ;; + *) HOSTTYPE=$hosttype ;; + esac + ;; +esac + +case " $* " in +*" -dumpmachine "*) + echo $HOSTTYPE + exit + ;; +esac + +cc=gcc +ccflags= + +case " $@ " in +*" -shared "*) + ccflags="$ccflags -shared -Wl,-G -Wl,-berok" + ;; +*) ccflags="-Wl,-brtl" + ;; +esac +$cc $ccflags "$@" diff --git a/src/cmd/INIT/cc.lynxos.i386 b/src/cmd/INIT/cc.lynxos.i386 new file mode 100755 index 000000000..acd0d02d6 --- /dev/null +++ b/src/cmd/INIT/cc.lynxos.i386 @@ -0,0 +1,81 @@ +: lynxos.i386 cc wrapper with -dynamic default : 2005-02-14 : + +HOSTTYPE=lynxos.i386 + +case " $* " in +*" -dumpmachine "*) echo $HOSTTYPE; exit ;; +esac + +cc=gcc + +link=1 +static=0 +set . "$@" /../ +while : +do shift + case $1 in + /../) break ;; + esac + case $1 in + *.[cChHiI]|*.[cChHiI][pPxX][pPxX]) + set . -D__NO_INCLUDE_WARN__ -I/sys/include/kernel -I/sys/include/family/x86 "$@" + shift + break + ;; + -o) case $2 in + /../) ;; + *) x=$1 + shift + set . "$@" "$x" + shift + ;; + esac + ;; + -static)static=1 + ;; + -l*) case $static in + 0) static=n + set . -L/lib/shlib "$@" + shift + ;; + esac + ;; + -[cE]) link=0 + ;; + esac + x=$1 + shift + set . "$@" "$x" +done +while : +do case $1 in + /../) shift + break + ;; + -l*) case $static in + 0) static=n + set . -L/lib/shlib "$@" + shift + ;; + esac + ;; + -[cE]) link=0 + ;; + esac + x=$1 + shift + set . "$@" "$x" + shift +done +case $link:$static in +1:0) static=n ;; +esac +case $static in +n) specs=/tmp/cc$$.specs + trap 'status=$?; rm -f $specs; exit $status' 0 1 2 + echo '*link: %{shared:-shared} %{static:-static} %{mshared|shared: %{static: %eerror: -shared and -static may not be combined. }}' > $specs + $cc -specs=$specs "$@" + ;; +*) $cc "$@" + ;; +esac diff --git a/src/cmd/INIT/cc.lynxos.ppc b/src/cmd/INIT/cc.lynxos.ppc new file mode 100755 index 000000000..32738f289 --- /dev/null +++ b/src/cmd/INIT/cc.lynxos.ppc @@ -0,0 +1,85 @@ +: lynxos.ppc cc wrapper with -mshared default : 2005-06-01 : + +HOSTTYPE=lynxos.ppc + +case " $* " in +*" -dumpmachine "*) echo $HOSTTYPE; exit ;; +esac + +cc=gcc + +link=1 +static=0 +set . "$@" /../ +while : +do shift + case $1 in + /../) break ;; + esac + case $1 in + *.[cChHiI]|*.[cChHiI][pPxX][pPxX]) + set . -D__NO_INCLUDE_WARN__ -I/sys/include/kernel -I/sys/include/family/ppc "$@" + shift + break + ;; + -o) case $2 in + /../) ;; + *) x=$1 + shift + set . "$@" "$x" + shift + ;; + esac + ;; + -static)static=1 + ;; + -mshared) + static=n + continue + ;; + -l*) case $static in + 0) static=n + set . -L/lib/shlib "$@" + shift + ;; + esac + ;; + -[cE]) link=0 + ;; + esac + x=$1 + shift + set . "$@" "$x" +done +while : +do case $1 in + /../) shift + break + ;; + -l*) case $static in + 0) static=n + set . -L/lib/shlib "$@" + shift + ;; + esac + ;; + -[cE]) link=0 + ;; + esac + x=$1 + shift + set . "$@" "$x" + shift +done +case $link:$static in +1:0) static=n ;; +esac +case $static in +n) specs=/tmp/cc$$.specs + trap 'status=$?; rm -f $specs; exit $status' 0 1 2 + echo '*link: %{shared:-shared} %{static:-static} %{mshared|shared: %{static: %eerror: -shared and -static may not be combined. }}' > $specs + $cc -specs=$specs -mshared "$@" + ;; +*) $cc "$@" + ;; +esac diff --git a/src/cmd/INIT/cc.mvs.390 b/src/cmd/INIT/cc.mvs.390 new file mode 100755 index 000000000..3c1d89ec7 --- /dev/null +++ b/src/cmd/INIT/cc.mvs.390 @@ -0,0 +1,279 @@ +: mvs.390 cc wrapper for Unix message and exit code semantics : 2012-01-20 : + +HOSTTYPE=mvs.390 + +case " $* " in +*" -dumpmachine "*) echo $HOSTTYPE; exit ;; +esac + +ar=ar +cc=/bin/c89 +CC=/bin/c++ +ccflags="-D_ALL_SOURCE -Wc,dll" +objmax=60 +tmpfiles= +unbotch= + +# -n as *first* arg shows but does not do +# -Wc,exportall => -Wl,dll +# -Bdynamic => .c,.o dynamic +# -Bstatic => .c,.o static +# *.C => cc=$CC +# *.cpp => cc=$CC +# *.cxx => cc=$CC +# no optimization until the optimizer is fixed: +# -O dropped (no optimization) +# -0 dropped (no optimization) +# -1 -O (default level 1 optimization) +# -2 -2 (maximal level 2 optimization) + +let argc=0 cmp=0 dll=0 libc=0 dynamic=1 dynamic_objc=0 static_objc=0 relc=0 botched=0 +case $1 in +-n) exec=print + shift + ;; +*) exec= + ;; +esac +export _CC_ACCEPTABLE_RC=1 +export _C89_ACCEPTABLE_RC=$_CC_ACCEPTABLE_RC +export _CXX_ACCEPTABLE_RC=$_CC_ACCEPTABLE_RC +case " $* " in +*.C" "*)let dll=2 + cc=$CC + export _CXXSUFFIX=C + ;; +*.cpp" "*)let dll=2 + cc=$CC + export _CXXSUFFIX=cpp + ;; +*.cxx" "*)let dll=2 + cc=$CC + export _CXXSUFFIX=cxx + ;; +esac +exe= +xxx= +while : +do case $# in + 0) break ;; + esac + arg=$1 + case $arg in + -1) arg=-O + ;; + -Bdynamic) + let dynamic=1 + ;; + -Bstatic) + let dynamic=0 + ;; + -c) let cmp=1 + ;; + -D_ALL_SOURCE|-D_ALL_SOURCE=*) + arg= + ;; + -D*[\ \(\)]*) + arg=${arg#-D} + botch_macro[botched]=${arg%%=*} + botch_value[botched]=${arg#*=} + let botched=botched+1 + arg= + ;; + -o) argv[argc]=$arg + let argc=argc+1 + shift + arg=$1 + exe=$arg + rm -f "$exe" + ;; + -[O0]) arg= + ;; + -Wc,dll)arg= + ;; + -Wc,exportall) + let dll=1 + ;; + -Wl,dll)arg= + let dll=1 + ;; + *.c) if [[ $botched != 0 ]] + then src=$arg + arg=${arg##*/} + unbotch="$unbotch ${arg%.c}.o" + arg=__$arg + tmpfiles="$tmpfiles $arg" + { + while [[ $botched != 0 ]] + do let botched=botched-1 + print -r -- "#define ${botch_macro[botched]} ${botch_value[botched]}" + done + cat $src + } > $arg + fi + ;; + *.o) if test 0 != $dynamic + then let dynamic_objc=dynamic_objc+1 + else let static_objc=static_objc+1 + fi + ;; + *.x) a=${arg%.x}.a + if test -f $a + then argv[argc]=$a + let argc=argc+1 + xxx=-Wl,dll + case $a in + ast.a|*/ast.a) + cc="$CC -u_ast_init" + ;; + esac + fi + ;; + esac + case $arg in + ?*) argv[argc]=$arg + let argc=argc+1 + ;; + esac + shift +done + +tmp=/tmp/cc.${USER:-$LOGNAME}.$$.err +tmpfiles="$tmp $tmpfiles" + +# if any dll .o's are in .a then a .x gets generated +# but the native cc doesn't jcl for the .x +# -Wl,dll does that, so we nuke the .x and keep the exe + +test 0 != $dll && xxx= +case $xxx in +?*) case $exe in + ?*) a=${exe##*/} + a=${a%.*} + case $exe in + */*) tmpfiles="$tmpfiles ${exe%/*}/${a}.x" ;; + *) tmpfiles="$tmpfiles ${a}.x" ;; + esac + ;; + esac + ;; +esac +if test 0 != $dll +then if test 0 != $cmp + then xxx="-D_SHARE_EXT_VARS $xxx" + else xxx="-Wl,dll $xxx" + fi +fi +set -- $xxx "${argv[@]}" + +# can't handle more than objmax .o's +# -r into intermediates doesn't work, but the cat trick does +# also, the runtime dll file must be executable but cc -Wl,dll forgets + +if test 0 != $dll -a \( $dynamic_objc -ge $objmax -o 0 != $static_objc \) +then unset argv + argc=0 libc=0 dynamic=1 dynamic_objc=0 static_objc=0 endc=0 + while : + do case $# in + 0) break ;; + esac + case $1 in + -Bdynamic) + let dynamic=1 + ;; + -Bstatic) + let dynamic=0 + ;; + *.o) if test 0 != $dynamic + then dynamic_objv[dynamic_objc]=$1 + let dynamic_objc=dynamic_objc+1 + else static_objv[static_objc]=$1 + let static_objc=static_objc+1 + fi + ;; + -l*) libv[libc]=$1 + let libc=libc+1 + ;; + -o) argv[argc]=$1 + let argc=argc+1 + shift + argv[argc]=$1 + let argc=argc+1 + exe=$1 + ;; + *) argv[argc]=$1 + let argc=argc+1 + ;; + esac + shift + done + if test 0 != $static_objc + then case $exe in + ?*) $exec $ar cr ${exe%.*}.a "${static_objv[@]}" ;; + esac + fi + if test 0 != $dynamic_objc + then cat=0.0.o + tmpfiles="$tmpfiles $cat" + cat "${dynamic_objv[@]}" > $cat || exit + else cat= + fi + set -- "${argv[@]}" $cat "${libv[@]}" +fi + +# grep through the warning/error messages to get the true exit code +# some annoying messages are dropped while we're at it + +trap 'rm -f $tmpfiles' 0 1 2 15 +$exec $cc $ccflags "$@" 2> $tmp +code=$? +for i in $unbotch +do test -f __$i && mv __$i $i +done +typeset -l lc +while : +do if read line + then lc=$line + case $lc in + *'#include file'*'not found'*) + code=1 + ;; + *'#pragma ignored'*) + continue + ;; + *'definition side file is not defined'*) + continue + ;; + *'step ended with return code 4'*) + code=0 + continue + ;; + *'step ended with return code'*) + code=1 + continue + ;; + *'try again'*) + code=1 + continue + ;; + *'unknown preprocessing directive'*) + code=1 + case $lc in + 'warning '*) + set -- $line + shift + line=$* + ;; + esac + ;; + *'unresolved writable static references are detected'*) + test 0 != $dll && continue + ;; + esac + else case $code:$exe in + 0:?*) $exec chmod +x $exe ;; + esac + exit $code + fi + echo "$line" >&2 +done < $tmp diff --git a/src/cmd/INIT/cc.next.i386 b/src/cmd/INIT/cc.next.i386 new file mode 100755 index 000000000..e8ad8dccc --- /dev/null +++ b/src/cmd/INIT/cc.next.i386 @@ -0,0 +1,158 @@ +: next.i386 cc wrapper for Unix message and exit code semantics : 1995-05-09 : + +HOSTTYPE=next.i386 + +case " $* " in +*" -dumpmachine "*) echo $HOSTTYPE; exit ;; +esac + +# 1995-05-09 -lposix termios.o waitpid.o setpgid.o *do* work +# 1994-11-04 -posix has old redirection hole bug +# -D_POSIX_SOURCE requires manual fixes +# libexpr/exeval.c bombs -O, no -O ok + +command=cc +cc="/bin/cc -D_POSIX_SOURCE" +nooptimize="exeval" + +# first check $INSTALLROOT/botch + +case $INSTALLROOT in +"") echo "$command: INSTALLROOT: must be defined and exported" >&2; exit 1 ;; +esac +if test ! -d $INSTALLROOT/botch -a -dryrun != "$1" +then if mkdir $INSTALLROOT/botch + then : ok to initialize + else echo "$command: $INSTALLROOT/botch must be initialized by the owner of $INSTALLROOT" 2>&1 + exit 1 + fi + ( + cd $INSTALLROOT/botch + dir=. + for i in lib . include sys + do case $i in + .) dir=. + ;; + *) case $i in + /*) dir=$i ;; + *) dir=$dir/$i ;; + esac + test -d $dir || mkdir $dir + ;; + esac + done + if test ! -f include/sys/dirent.h + then echo "#include " > tmp.c + header=`$cc -E tmp.c | sed -e '/^#[ ]*1[ ].*\/sys\/dirent\.h"/!d' -e 's/.*"\(.*\)".*/\1/'` + sed -e 's/[ ]off_t[ ][ ]*d_off[ ]*;//' $header > include/sys/dirent.h + fi + if test ! -f lib/libbotch.a + then lipo /usr/lib/libposix.a -thin i386 -output tmp.a + ar x tmp.a termios.o waitpid.o setpgid.o + ar cr lib/libbotch.a *.o + ranlib lib/libbotch.a + fi + rm -f *.[aco] + ) +fi + +# now slip in our args + +case $nooptimize in +"") nooptimize=. + ;; +*) optimize= + for arg in $nooptimize + do case $optimize in + ?*) optimize="$optimize|" ;; + esac + optimize="$optimize$arg.[ci]|*/$arg.[ci]" + done + nooptimize=$optimize + ;; +esac +set . "$@" . +noexec= +library= +local= +optimize= +verbose= +while : +do shift + arg=$1 + shift + case $arg in + .) break + ;; + -[cES]) library=1 + ;; + -O) optimize=1 + ;; + -v) verbose=1 + ;; + -dryrun)noexec=1 + verbose=1 + ;; + -I-) case $local in + "") local=1 + set . "$@" -I$INSTALLROOT/botch/include -I- -I$INSTALLROOT/botch/include + ;; + *) set . "$@" -I- -I$INSTALLROOT/botch/include + ;; + esac + continue + ;; + -I*|*.[cChHiI]|*.[cChHiI][pPxX][pPxX]) + case $optimize in + 1) eval " + case \$arg in + $nooptimize) + optimize=0 + ;; + esac + " + ;; + esac + case $local in + "") local=1 + set . "$@" -I$INSTALLROOT/botch/include "$arg" + continue + ;; + esac + ;; + -last|*/libast.a) + case $library in + "") library=1 + set . "$@" $INSTALLROOT/botch/lib/libbotch.a "$arg" $INSTALLROOT/botch/lib/libbotch.a + continue + ;; + esac + ;; + esac + set . "$@" "$arg" +done +case $library in +"") set . "$@" $INSTALLROOT/botch/lib/libbotch.a + shift + ;; +esac +case $optimize in +0) set . "$@" . + while : + do shift + arg=$1 + shift + case $arg in + .) break ;; + -O) set . "$@" ;; + *) set . "$@" "$arg" ;; + esac + done + ;; +esac +case $verbose in +?*) echo $cc "$@" ;; +esac +case $noexec in +"") $cc "$@" ;; +esac diff --git a/src/cmd/INIT/cc.next.m68k b/src/cmd/INIT/cc.next.m68k new file mode 100755 index 000000000..1e8dda7ce --- /dev/null +++ b/src/cmd/INIT/cc.next.m68k @@ -0,0 +1,9 @@ +: next.m68k cc wrapper that enables POSIX : 2000-12-15 : + +HOSTTYPE=next.m68k + +case " $* " in +*" -dumpmachine "*) echo $HOSTTYPE; exit ;; +esac + +/bin/cc -posix -Xlinker -m "$@" diff --git a/src/cmd/INIT/cc.osf.alpha b/src/cmd/INIT/cc.osf.alpha new file mode 100755 index 000000000..fe19bb4fc --- /dev/null +++ b/src/cmd/INIT/cc.osf.alpha @@ -0,0 +1,9 @@ +: osf.alpha cc wrapper with reasonable namespace defaults : 1998-02-04 : + +HOSTTYPE=osf.alpha + +case " $* " in +*" -dumpmachine "*) echo $HOSTTYPE; exit ;; +esac + +/usr/bin/cc -std -Dnoshare=_noshare_ -Dreadonly=_readonly_ "$@" diff --git a/src/cmd/INIT/cc.pentium4 b/src/cmd/INIT/cc.pentium4 new file mode 100755 index 000000000..8794cda1c --- /dev/null +++ b/src/cmd/INIT/cc.pentium4 @@ -0,0 +1,26 @@ +: linux.pentium4 gcc wrapper : 2005-10-24 : + +HOSTTYPE=linux.pentium4 + +case " $* " in +*" -dumpmachine "*) echo $HOSTTYPE; exit ;; +esac + +case " $* " in +*" -O "*) + set -A argv -- "$@" + set -A nargv + integer i j + for ((i = j = 0; i < ${#argv[@]}; i++)) + do if [[ ${argv[i]} == -O ]] + then nargv[j++]=-O3 + nargv[j++]=-march=pentium4 + else nargv[j++]=${argv[i]} + fi + done + gcc "${nargv[@]}" + exit + ;; +esac + +gcc "$@" diff --git a/src/cmd/INIT/cc.sco.i386 b/src/cmd/INIT/cc.sco.i386 new file mode 100755 index 000000000..d0cba572d --- /dev/null +++ b/src/cmd/INIT/cc.sco.i386 @@ -0,0 +1,9 @@ +: sco.i386 cc wrapper with reasonable binary and namespace : 1998-02-04 : + +HOSTTYPE=sco.i386 + +case " $* " in +*" -dumpmachine "*) echo $HOSTTYPE; exit ;; +esac + +/bin/cc -b elf -D_SVID3 "$@" diff --git a/src/cmd/INIT/cc.sgi.mips2 b/src/cmd/INIT/cc.sgi.mips2 new file mode 100755 index 000000000..e6e8f92e2 --- /dev/null +++ b/src/cmd/INIT/cc.sgi.mips2 @@ -0,0 +1,68 @@ +: sgi.mips2 cc wrapper that generates MIPS II binaries : 2006-02-14 : + +HOSTTYPE=sgi.mips2 + +case " $* " in +*" -dumpmachine "*) echo $HOSTTYPE; exit ;; +esac + +cc=/usr/bin/cc +debug= +dynamic=-G0 +flags=-OPT:Olimit=0 +ignore=1685,733,1048,1155,1171,1184,1209,1343,3169,3170,3433 +ldignore=15,84,85,13 +optimize= + +case $_AST_cc_OPTIONS in +?*) eval $_AST_cc_OPTIONS ;; +esac +case $ignore in +?*) ignore="-woff $ignore" ;; +esac +case $ldignore in +?*) ifs=$IFS + IFS=, + v=$ldignore + ldignore= + for i in $v + do ldignore="$ldignore -Wl,-woff,$i" + done + IFS=$ifs + ;; +esac +case $debug in +?*) integer n=0 + for i + do case $i in + -g*) case $debug in + -) continue ;; + esac + i=$debug + ;; + esac + a[n++]=$i + done + set -- ${a[@]} + ;; +esac +case $optimize in +?*) integer n=0 + for i + do case $i in + -O*) case $optimize in + -) continue ;; + esac + i=$optimize + ;; + esac + a[n++]=$i + done + set -- ${a[@]} + ;; +esac + +if test -d /usr/lib32 +then LD_LIBRARYN32_PATH=/lib32 $cc -32 -mips2 $flags $dynamic $ldignore $ignore "$@" +else $cc -mips2 $flags $ignore "$@" +fi diff --git a/src/cmd/INIT/cc.sgi.mips3 b/src/cmd/INIT/cc.sgi.mips3 new file mode 100755 index 000000000..85ce521a0 --- /dev/null +++ b/src/cmd/INIT/cc.sgi.mips3 @@ -0,0 +1,110 @@ +: sgi.mips3 cc wrapper that generates MIPS III binaries : 2007-04-27 : + +HOSTTYPE=sgi.mips3 + +case " $* " in +*" -dumpmachine "*) echo $HOSTTYPE; exit ;; +esac + +# ld: +# 15 +# 84 +# 85 +# 134 +# cc: +# 1685 (first!!) Invalid error number: X. +# 1035 cpp #error -- 0 exit status by default - botch botch botch +# 1048 +# 1155 +# 1171 The indicated expression has no effect. +# 1184 "=" is used where where "==" may have been intended. +# 1209 The controlling expression is constant. +# 1343 +# 3169 X not marked as intrinsic because it is not yet declared +# 3170 X not marked as intrinsic because it is not yet declared +# 3421 expecting function name #pragma intrinsic (X) +# 3433 X not marked as intrinsic because it is not yet declared +# 3434 X not marked as intrinsic because it is not yet declared + +cc=/usr/bin/cc +debug= +dynamic=-G0 +flags=-OPT:Olimit=0 +fatal=1035 +ignore=1685,733,1048,1155,1171,1184,1209,1343,3169,3170,3421,3433,3434 +ldignore=15,84,85,13 +optimize= + +case $_AST_cc_OPTIONS in +?*) eval $_AST_cc_OPTIONS ;; +esac +case $fatal in +?*) fatal="-diag_error $fatal" ;; +esac +case $ignore in +?*) ignore="-woff $ignore" ;; +esac +case $ldignore in +?*) ifs=$IFS + IFS=, + v=$ldignore + ldignore= + for i in $v + do ldignore="$ldignore -Wl,-woff,$i" + done + IFS=$ifs + ;; +esac +case $debug in +?*) integer n=0 + for i + do case $i in + -g*) case $debug in + -) continue ;; + esac + i=$debug + ;; + esac + a[n++]=$i + done + set -- ${a[@]} + ;; +esac +case $optimize in +?*) integer n=0 + for i + do case $i in + -O*) case $optimize in + -) continue ;; + esac + i=$optimize + ;; + esac + a[n++]=$i + done + set -- ${a[@]} + ;; +esac + +case $1 in +-mips2) if test -d /usr/lib32 + then LD_LIBRARYN32_PATH=/lib32 $cc -32 -mips2 $flags $dynamic $ldignore $ignore "$@" + else $cc -mips2 $flags $ignore "$@" + fi + ;; +-mips4) case " $* " in + *" -ldl "*) + integer n=0 + for i + do case $i in + -ldl) ;; + *) a[n++]=$i ;; + esac + done + set -- ${a[@]} + esac + $cc -64 -mips4 $flags $dynamic $fatal $ldignore $ignore "$@" + ;; +*) $cc -n32 -mips3 $flags $dynamic $fatal $ldignore $ignore "$@" + ;; +esac diff --git a/src/cmd/INIT/cc.sgi.mips3-o32 b/src/cmd/INIT/cc.sgi.mips3-o32 new file mode 100755 index 000000000..334145ce0 --- /dev/null +++ b/src/cmd/INIT/cc.sgi.mips3-o32 @@ -0,0 +1,65 @@ +: sgi.mips3-o32 cc wrapper that generates MIPS III O32 binaries : 2006-02-14 : + +HOSTTYPE=sgi.mips3-o32 + +case " $* " in +*" -dumpmachine "*) echo $HOSTTYPE; exit ;; +esac + +cc=/usr/bin/cc +debug= +dynamic=-G0 +flags= +ignore=1685,733,1048,1155,1171,1184,1209,1343,3169,3170,3433 +ldignore=15,84,85,13 +optimize= + +case $_AST_cc_OPTIONS in +?*) eval $_AST_cc_OPTIONS ;; +esac +case $ignore in +?*) ignore="-woff $ignore" ;; +esac +case $ldignore in +?*) ifs=$IFS + IFS=, + v=$ldignore + ldignore= + for i in $v + do ldignore="$ldignore -Wl,-woff,$i" + done + IFS=$ifs + ;; +esac +case $debug in +?*) integer n=0 + for i + do case $i in + -g*) case $debug in + -) continue ;; + esac + i=$debug + ;; + esac + a[n++]=$i + done + set -- ${a[@]} + ;; +esac +case $optimize in +?*) integer n=0 + for i + do case $i in + -O*) case $optimize in + -) continue ;; + esac + i=$optimize + ;; + esac + a[n++]=$i + done + set -- ${a[@]} + ;; +esac + +$cc -o32 -mips3 $flags $dynamic $ldignore $ignore "$@" diff --git a/src/cmd/INIT/cc.sgi.mips4 b/src/cmd/INIT/cc.sgi.mips4 new file mode 100755 index 000000000..915080341 --- /dev/null +++ b/src/cmd/INIT/cc.sgi.mips4 @@ -0,0 +1,90 @@ +: sgi.mips4 cc wrapper that generates MIPS IV binaries : 2007-04-27 : + +HOSTTYPE=sgi.mips4 + +case " $* " in +*" -dumpmachine "*) echo $HOSTTYPE; exit ;; +esac + +cc=/usr/bin/cc +debug= +dynamic=-G0 +flags=-OPT:Olimit=0 +fatal=1035 +ignore=1685,733,1048,1155,1171,1184,1209,1343,3169,3170,3433 +ldignore=15,84,85,13 +optimize= + +case $_AST_cc_OPTIONS in +?*) eval $_AST_cc_OPTIONS ;; +esac +case $fatal in +?*) fatal="-diag_error $fatal" ;; +esac +case $ignore in +?*) ignore="-woff $ignore" ;; +esac +case $ldignore in +?*) ifs=$IFS + IFS=, + v=$ldignore + ldignore= + for i in $v + do ldignore="$ldignore -Wl,-woff,$i" + done + IFS=$ifs + ;; +esac +case $debug in +?*) integer n=0 + for i + do case $i in + -g*) case $debug in + -) continue ;; + esac + i=$debug + ;; + esac + a[n++]=$i + done + set -- ${a[@]} + ;; +esac +case $optimize in +?*) integer n=0 + for i + do case $i in + -O*) case $optimize in + -) continue ;; + esac + i=$optimize + ;; + esac + a[n++]=$i + done + set -- ${a[@]} + ;; +esac + +case $1 in +-mips2) if test -d /usr/lib32 + then LD_LIBRARYN32_PATH=/lib32 $cc -32 -mips2 $flags $dynamic $ldignore $ignore "$@" + else $cc -mips2 $flags $ignore "$@" + fi + ;; +-mips3) $cc -n32 -mips3 $flags $dynamic $fatal $ldignore $ignore "$@" + ;; +*) case " $* " in + *" -ldl "*) + integer n=0 + for i + do case $i in + -ldl) ;; + *) a[n++]=$i ;; + esac + done + set -- ${a[@]} + esac + $cc -64 -mips4 $flags $dynamic $fatal $ldignore $ignore "$@" + ;; +esac diff --git a/src/cmd/INIT/cc.sgi.mips4-n32 b/src/cmd/INIT/cc.sgi.mips4-n32 new file mode 100755 index 000000000..c54027faa --- /dev/null +++ b/src/cmd/INIT/cc.sgi.mips4-n32 @@ -0,0 +1,65 @@ +: sgi.mips4-n32 cc wrapper that generates MIPS IV N32 binaries : 2006-02-14 : + +HOSTTYPE=sgi.mips4-n32 + +case " $* " in +*" -dumpmachine "*) echo $HOSTTYPE; exit ;; +esac + +cc=/usr/bin/cc +debug= +dynamic=-G0 +flags= +ignore=1685,733,1048,1155,1171,1184,1209,1343,3169,3170,3433 +ldignore=15,84,85,13 +optimize= + +case $_AST_cc_OPTIONS in +?*) eval $_AST_cc_OPTIONS ;; +esac +case $ignore in +?*) ignore="-woff $ignore" ;; +esac +case $ldignore in +?*) ifs=$IFS + IFS=, + v=$ldignore + ldignore= + for i in $v + do ldignore="$ldignore -Wl,-woff,$i" + done + IFS=$ifs + ;; +esac +case $debug in +?*) integer n=0 + for i + do case $i in + -g*) case $debug in + -) continue ;; + esac + i=$debug + ;; + esac + a[n++]=$i + done + set -- ${a[@]} + ;; +esac +case $optimize in +?*) integer n=0 + for i + do case $i in + -O*) case $optimize in + -) continue ;; + esac + i=$optimize + ;; + esac + a[n++]=$i + done + set -- ${a[@]} + ;; +esac + +$cc -n32 -mips4 $flags $dynamic $ldignore $ignore "$@" diff --git a/src/cmd/INIT/cc.specialize b/src/cmd/INIT/cc.specialize new file mode 100755 index 000000000..87077b5a9 --- /dev/null +++ b/src/cmd/INIT/cc.specialize @@ -0,0 +1,35 @@ +: -O* specialization cc wrapper : 2011-11-11 : + +case " $* " in +*" -dumpmachine "*) echo $HOSTTYPE; exit ;; +esac + +cc=cc + +CCREPLACE='' # these (possibly empty) options replace -O* +CCALWAYS='' # these (possibly empty) options always set + +case $CCREPLACE in +'') ;; +*) case " $* " in + *" -O"*) + set '' "$@" '' + shift + while : + do a=$1 + shift + case $a in + '') break + ;; + -O*) set '' "$@" $CCREPLACE + ;; + *) set '' "$@" "$a" + ;; + esac + shift + done + ;; + esac + ;; +esac +$cc $CCALWAYS "$@" diff --git a/src/cmd/INIT/cc.unix.mc68k b/src/cmd/INIT/cc.unix.mc68k new file mode 100755 index 000000000..ebdfa0d1c --- /dev/null +++ b/src/cmd/INIT/cc.unix.mc68k @@ -0,0 +1,76 @@ +: 3B1/PC7300 unix.mc68k cc wrapper for ANSI C : 2002-09-01 : + +HOSTTYPE=unix.mc68k + +case " $* " in +*" -dumpmachine "*) echo $HOSTTYPE; exit ;; +esac + +# /bin/cc predates ANSI C; use gcc +# some headers depend on SYSTEM5 or mc68k being defined +# headers for Ethernet software are under /usr/ethernet/include +# both /usr/lib/libnet.a and /usr/lib/libcurses.a define select() +# -lcurses uses a version of select for napms(), but that +# implementation always returns an error if given file +# descriptors to watch +# the one in -lnet must be used if fds (instead of or in addition to +# a timeout) are of interest therefore, -lnet should be +# specified before -lcurses +# rename(old, new) in /usr/lib/libnet.a fails if new exists +# (permitted by ANSI/ISO C-1990 7.9.4.2) +# gcc -fpic doesn't work as there's no _GLOBAL_OFFSET_TABLE symbol + +cc="gcc" + +exec= +show=: +inc=0 +lib=0 +set '' -DSYSTEM5 -Dmc68k "$@" '' +shift +while : +do a=$1 + shift + case $a in + '') break + ;; + -lcurses|libcurses.a|*/libcurses.a) + lib=1 + set '' "$@" -lnet + shift + ;; + -lnet|libnet.a|*/libnet.a) + lib=1 + ;; + -o) a=$1 + shift + set '' "$@" -o + shift + ;; + -fpic) continue + ;; + -n) exec=: + continue + ;; + -v) show=echo + continue + ;; + -*) ;; + *) case $inc in + 0) inc=1 + set '' "$@" -I/usr/ethernet/include + shift + ;; + esac + ;; + esac + set '' "$@" "$a" + shift +done +case $lib in +0) set '' "$@" -lnet + shift + ;; +esac +$show $cc "$@" +$exec $cc "$@" diff --git a/src/cmd/INIT/cc.unixware.i386 b/src/cmd/INIT/cc.unixware.i386 new file mode 100755 index 000000000..b1b1a2cb7 --- /dev/null +++ b/src/cmd/INIT/cc.unixware.i386 @@ -0,0 +1,9 @@ +: unixware.i386 cc wrapper + +HOSTTYPE=unixware.i386 + +case " $* " in +*" -dumpmachine "*) echo $HOSTTYPE; exit ;; +esac + +/bin/cc -D_XOPEN_UNIX -D_XOPEN_SOURCE_EXTENDED "$@" diff --git a/src/cmd/INIT/crossexec.sh b/src/cmd/INIT/crossexec.sh new file mode 100644 index 000000000..ee6d9272f --- /dev/null +++ b/src/cmd/INIT/crossexec.sh @@ -0,0 +1,140 @@ +######################################################################## +# # +# This software is part of the ast package # +# Copyright (c) 1994-2011 AT&T Intellectual Property # +# Copyright (c) 2020-2022 Contributors to ksh 93u+m # +# and is licensed under the # +# Eclipse Public License, Version 2.0 # +# # +# A copy of the License is available at # +# https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html # +# (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) # +# # +# Glenn Fowler # +# Martijn Dekker # +# # +######################################################################## +: cross compiler a.out execution + +(command set -o posix) 2>/dev/null && set -o posix + +command=crossexec + +tmp=/tmp/cross$$ + +case `(getopts '[-][123:xyz]' opt --xyz; echo 0$opt) 2>/dev/null` in +0123) ARGV0="-a $command" + USAGE=$' +[-? +@(#)$Id: crossexec (AT&T Labs Research) 2004-01-04 $ +] +[-author?Glenn Fowler ] +[-copyright?Copyright (c) 1994-2012 AT&T Intellectual Property] +[-license?https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html] +[+NAME?crossexec - cross compiler a.out execution] +[+DESCRIPTION?\bcrossexec\b runs a cross-compiled \acommand\a in an environment + that supports a cross-compilation architecture different from the + current host. The cross environment is determined by \acrosstype\a, + usually a host type name produced by \bpackage\b(1). \acrosstype\a + is used to find an entry in \b$HOME/.crossexec\b that specifies + the cross compiler host and access details.] +[+?The exit status of \bcrossexec\b is the exit status of \acommand\a.] +[+CROSS ENVIRONMENT FILE?\b$HOME/.crossexec\b contains one line for each + supported \acrosstype\a. Each line contains 5 tab separated fields. + Field default values are specified as \b-\b. The fields are:]{ + [+crosstype?The host type produced by \bpackage\b(1).] + [+host?The host name.] + [+user?The user name on \ahost\a. The default is the current user.] + [+dir?The directory to copy \acommand\a and execute it. The default + is the \auser\a \b$HOME\b on \ahost\a.] + [+shell?The command used to get shell access to \ahost\a. Currently + only \brsh\b and \bssh\b are supported.] + [+copy?The command used to copy \acommand\a to \ahost\a. Currently + only \brcp\b and \bscp\b are supported.] +} +[n:show?Show the underlying commands but do not execute.] + +crosstype command [ option ... ] [ file ... ] + +[+SEE ALSO?\brcp\b(1), \brsh\b(1), \bscp\b(1), \bssh\b(1)] +' + ;; +*) ARGV0="" + USAGE="crosstype command [ option ... ] [ file ... ]" + ;; +esac + +usage() +{ + OPTIND=0 + getopts $ARGV0 "$USAGE" OPT '-?' + exit 2 +} + +exec= + +# get the options and operands + +while getopts $ARGV0 "$USAGE" OPT +do case $OPT in + n) exec=echo ;; + *) usage ;; + esac +done +shift $OPTIND-1 +case $# in +[01]) usage ;; +esac + +type=$1 +shift +cmd=$1 +shift + +# get the host info + +info=$HOME/.$command +if test ! -r $info +then echo "$command: $info: not found" >&2 + exit 1 +fi +ifs=${IFS-' + '} +while : +do IFS=' ' + read hosttype hostname usr dir sh cp + code=$? + IFS=$ifs + case $code in + 0) ;; + *) echo "$command: $type: unknown cross compiler host type" >&2 + exit 1 + ;; + esac + case $hosttype in + $type) break ;; + esac +done < $info + +# fill in the defaults + +case $usr in +-) cpu= shu= ;; +*) cpu=${usr}@ shu="-l $usr" ;; +esac +case $dir in +-) dir= ;; +esac +case $sh in +''|-) sh=ssh ;; +esac +case $cp in +''|-) cp=scp ;; +scp) cp="$cp -q" ;; +esac + +trap "rm -f $tmp" 0 1 2 3 15 +$exec $cp $cmd $cpu$hostname:$dir /dev/null; code=\$?; rm -f $cmd; echo $command: exit \$code >&2" $tmp +exit `sed -e '/^'$command': exit [0-9][0-9]*$/!d' -e 's/.* //' $tmp` diff --git a/src/cmd/INIT/db.c b/src/cmd/INIT/db.c new file mode 100644 index 000000000..f08efb369 --- /dev/null +++ b/src/cmd/INIT/db.c @@ -0,0 +1,34 @@ +/*********************************************************************** +* * +* This software is part of the ast package * +* Copyright (c) 1994-2011 AT&T Intellectual Property * +* Copyright (c) 2020-2022 Contributors to ksh 93u+m * +* and is licensed under the * +* Eclipse Public License, Version 2.0 * +* * +* A copy of the License is available at * +* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html * +* (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) * +* * +* Glenn Fowler * +* Martijn Dekker * +* * +***********************************************************************/ +/* + * small test for sleepycat dbm compatibility + */ + +#define DB_DBM_HSEARCH 1 + +#if DB_DBM_HSEARCH +#include +#endif + +int +main() +{ + DBM* dbm = 0; + + dbm_close(dbm); + return 0; +} diff --git a/src/cmd/INIT/dl.c b/src/cmd/INIT/dl.c new file mode 100644 index 000000000..074c4e25c --- /dev/null +++ b/src/cmd/INIT/dl.c @@ -0,0 +1,30 @@ +/*********************************************************************** +* * +* This software is part of the ast package * +* Copyright (c) 1994-2011 AT&T Intellectual Property * +* Copyright (c) 2020-2022 Contributors to ksh 93u+m * +* and is licensed under the * +* Eclipse Public License, Version 2.0 * +* * +* A copy of the License is available at * +* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html * +* (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) * +* * +* Glenn Fowler * +* Martijn Dekker * +* * +***********************************************************************/ +/* + * small test for -ldl + */ + +#ifndef dlopen +#include +#endif + +int +main() +{ + dlopen("libdl.so",0); + return 0; +} diff --git a/src/cmd/INIT/execrate.sh b/src/cmd/INIT/execrate.sh new file mode 100644 index 000000000..ecfbffae1 --- /dev/null +++ b/src/cmd/INIT/execrate.sh @@ -0,0 +1,186 @@ +######################################################################## +# # +# This software is part of the ast package # +# Copyright (c) 1994-2011 AT&T Intellectual Property # +# Copyright (c) 2020-2022 Contributors to ksh 93u+m # +# and is licensed under the # +# Eclipse Public License, Version 2.0 # +# # +# A copy of the License is available at # +# https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html # +# (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) # +# # +# Glenn Fowler # +# Martijn Dekker # +# # +######################################################################## +: wrapper for .exe challenged Win32 systems/commands + +(command set -o posix) 2>/dev/null && set -o posix + +command=execrate + +bins=` + ( + userPATH=$PATH + PATH=/run/current-system/sw/bin:/usr/xpg7/bin:/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin:$PATH + getconf PATH 2>/dev/null && echo "$userPATH" || echo /bin:/usr/bin:/sbin:/usr/sbin:"$userPATH" + ) | sed 's/:/ /g' +` || exit + +case `(getopts '[-][123:xyz]' opt --xyz; echo 0$opt) 2>/dev/null` in +0123) ARGV0="-a $command" + USAGE=$' +[-? +@(#)$Id: execrate (AT&T Labs Research) 2002-02-02 $ +] +[-author?Glenn Fowler ] +[-copyright?Copyright (c) 2002-2012 AT&T Intellectual Property] +[-license?https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html] +[+NAME?execrate - wrapper for .exe challenged commands] +[+DESCRIPTION?\bexecrate\b runs \acommand\a after checking the \afile\a + operands for standard semantics with respect to \bWin32\b \b.exe\b + suffix conventions. This command is only needed on \bWin32\b + systems that inconsistently handle \b.exe\b across library and + command interfaces. \acommand\a may be one of \bcat\b(1), \bchmod\b(1), + \bcmp\b(1), \bcp\b(1), \bln\b(1), \bmv\b(1), or \brm\b(1). + Only the 2 argument forms of \bcp\b, \bln\b and \bmv\b are handled. + Unsupported commands and commands requiring no change are + silently executed.] +[+?With no arguments \bexecrate\b exits with status 0 if the current system + is \b.exe\b challenged, 1 if the current system is normal.] +[n:show?Show the underlying commands but do not execute.] + +command [ option ... ] file ... + +[+SEE ALSO?\bwebster\b(1)] +' + usage() + { + OPTIND=0 + getopts $ARGV0 "$USAGE" OPT '-?' + exit 2 + } + exec=1 + while getopts $ARGV0 "$USAGE" OPT + do case $OPT in + n) exec=0 ;; + *) usage ;; + esac + done + shift `expr $OPTIND - 1` + ;; +*) usage() + { + echo "Usage: execrate [ -n ] [ command [ option ... ] file ... ]" >&2 + exit 2 + } + exec=1 + while : + do case $1 in + -n) exec=0 ;; + -*) usage ;; + *) break ;; + esac + shift + done + ;; +esac +case $# in +0) if test ! -x /bin/cat.exe + then exit 1 # normal + fi + if /bin/cat /bin/cat >/dev/null 2>&1 + then exit 1 # normal + fi + exit 0 # challenged + ;; +1) usage + ;; +esac +case $1 in +*cat|*rm) + NUM=0 + ;; +*chgrp|*chmod) + NUM=1 + ;; +*cmp|*cp|*ln|*mv) + NUM=2 + ;; +*) case $exec in + 0) echo "$@" ;; + *) "$@" ;; + esac + exit + ;; +esac +CMD=$1 +shift +case $CMD in +*/*) ;; +*) for d in $bins + do if test -x $d/$1 -o -x $d/$1.exe + then CMD=$d/$1 + break + fi + done + ;; +esac +while : +do case $1 in + -*) CMD="$CMD $1" ;; + *) break ;; + esac + shift +done +case $exec in +0) CMD="echo $CMD" ;; +esac +case $NUM:$# in +*:0) ;; +1:*) CMD="$CMD $1" + NUM=0 + shift + ;; +esac +case $NUM:$# in +0:*) status=0 + for f + do if test "$f" -ef "$f".exe + then f=$f.exe + fi + $CMD "$f" + case $? in + 0) ;; + *) status=$? ;; + esac + done + exit $status + ;; +2:2) f=$1 + case $f in + *.exe) ;; + *) if test "$f" -ef "$f".exe + then f=$f.exe + fi + ;; + esac + case $f in + *.exe) if test -d "$2" + then t=$2/$f + else t=$2 + fi + case $t in + */*) b=`basename "$t"` ;; + *) b=$t ;; + esac + case $b in + *.*) $CMD "$f" "$t"; exit ;; + *) $CMD "$f" "$t".exe; exit ;; + esac + ;; + esac + ;; +esac +$CMD "$@" diff --git a/src/cmd/INIT/filter.sh b/src/cmd/INIT/filter.sh new file mode 100644 index 000000000..9668c1e81 --- /dev/null +++ b/src/cmd/INIT/filter.sh @@ -0,0 +1,101 @@ +######################################################################## +# # +# This software is part of the ast package # +# Copyright (c) 1994-2011 AT&T Intellectual Property # +# Copyright (c) 2020-2022 Contributors to ksh 93u+m # +# and is licensed under the # +# Eclipse Public License, Version 2.0 # +# # +# A copy of the License is available at # +# https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html # +# (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) # +# # +# Glenn Fowler # +# Martijn Dekker # +# # +######################################################################## +: convert command that operates on file args to pipeline filter + +(command set -o posix) 2>/dev/null && set -o posix + +command=filter + +TMPDIR=${TMPDIR:-/tmp} +export TMPDIR +tmp=$TMPDIR/$command$$ +suf= + +case `(getopts '[-][123:xyz]' opt --xyz; echo 0$opt) 2>/dev/null` in +0123) ARGV0="-a $command" + USAGE=$' +[-? +@(#)$Id: filter (AT&T Labs Research) 2001-05-31 $ +] +[-author?Glenn Fowler ] +[-copyright?Copyright (c) 1994-2012 AT&T Intellectual Property] +[-license?https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html] +[+NAME?filter - run a command in stdin/stdout mode] +[+DESCRIPTION?\bfilter\b runs \acommand\a in a mode that takes input from + the \afile\a operands, or from the standard input if no \afile\a + operands are specified, and writes the results to the standard output. + It can be used to run commands like \bsplit\b(1), that normally modify + \afile\a operands in-place, in pipelines. The \afile\a operands are + not modified; \acommand\a is run on copies in \b/tmp\b.] + +command [ option ... ] [ file ... ] + +[+SEE ALSO?\bstrip\b(1)] +' + ;; +*) ARGV0="" + USAGE="command [ option ... ] [ file ... ]" + ;; +esac + +usage() +{ + OPTIND=0 + getopts $ARGV0 "$USAGE" OPT '-?' + exit 2 +} + +while getopts $ARGV0 "$USAGE" OPT +do case $OPT in + *) usage ;; + esac +done +shift `expr $OPTIND - 1` +case $# in +0) usage ;; +esac + +cmd=$1 +while : +do shift + case $# in + 0) break ;; + esac + case $1 in + -*) cmd="$cmd $1" ;; + *) break ;; + esac +done +trap 'rm -f $tmp$suf' 0 1 2 3 15 +case $# in +0) cat > $tmp + $cmd $tmp + ;; +*) for file + do suf=${file##*/} + case $suf in + *.*) suf=.${suf#*.} ;; + *) suf= ;; + esac + cp $file $tmp$suf || exit 1 + chmod u+rwx $tmp$suf || exit 1 + $cmd $tmp$suf || exit 1 + cat $tmp$suf + rm -f $tmp$suf + done + ;; +esac diff --git a/src/cmd/INIT/gdbm.c b/src/cmd/INIT/gdbm.c new file mode 100644 index 000000000..6c1cae554 --- /dev/null +++ b/src/cmd/INIT/gdbm.c @@ -0,0 +1,34 @@ +/*********************************************************************** +* * +* This software is part of the ast package * +* Copyright (c) 1994-2011 AT&T Intellectual Property * +* Copyright (c) 2020-2022 Contributors to ksh 93u+m * +* and is licensed under the * +* Eclipse Public License, Version 2.0 * +* * +* A copy of the License is available at * +* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html * +* (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) * +* * +* Glenn Fowler * +* Martijn Dekker * +* * +***********************************************************************/ +/* + * small test for -lgdbm + */ + +#define _hdr_gdbm_ndbm 1 + +#if _hdr_gdbm_ndbm +#include +#endif + +int +main() +{ + DBM* dbm = 0; + + dbm_close(dbm); + return 0; +} diff --git a/src/cmd/INIT/gdbm1.c b/src/cmd/INIT/gdbm1.c new file mode 100644 index 000000000..65bb64597 --- /dev/null +++ b/src/cmd/INIT/gdbm1.c @@ -0,0 +1,34 @@ +/*********************************************************************** +* * +* This software is part of the ast package * +* Copyright (c) 1994-2011 AT&T Intellectual Property * +* Copyright (c) 2020-2022 Contributors to ksh 93u+m * +* and is licensed under the * +* Eclipse Public License, Version 2.0 * +* * +* A copy of the License is available at * +* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html * +* (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) * +* * +* Glenn Fowler * +* Martijn Dekker * +* * +***********************************************************************/ +/* + * small test for -lgdbm + */ + +#define _hdr_gdbm_ndbm 1 + +#if _hdr_gdbm_ndbm +#include +#endif + +int +main() +{ + DBM* dbm = 0; + + dbm_close(dbm); + return 0; +} diff --git a/src/cmd/INIT/gdbm2.c b/src/cmd/INIT/gdbm2.c new file mode 100644 index 000000000..507296ffc --- /dev/null +++ b/src/cmd/INIT/gdbm2.c @@ -0,0 +1,34 @@ +/*********************************************************************** +* * +* This software is part of the ast package * +* Copyright (c) 1994-2011 AT&T Intellectual Property * +* Copyright (c) 2020-2022 Contributors to ksh 93u+m * +* and is licensed under the * +* Eclipse Public License, Version 2.0 * +* * +* A copy of the License is available at * +* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html * +* (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) * +* * +* Glenn Fowler * +* Martijn Dekker * +* * +***********************************************************************/ +/* + * small test for -lgdbm + */ + +#define _hdr_ndbm 1 + +#if _hdr_ndbm +#include +#endif + +int +main() +{ + DBM* dbm = 0; + + dbm_close(dbm); + return 0; +} diff --git a/src/cmd/INIT/hello.c b/src/cmd/INIT/hello.c new file mode 100644 index 000000000..79be4fc9b --- /dev/null +++ b/src/cmd/INIT/hello.c @@ -0,0 +1,20 @@ +/*********************************************************************** +* * +* This software is part of the ast package * +* Copyright (c) 1994-2011 AT&T Intellectual Property * +* Copyright (c) 2020-2022 Contributors to ksh 93u+m * +* and is licensed under the * +* Eclipse Public License, Version 2.0 * +* * +* A copy of the License is available at * +* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html * +* (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) * +* * +* Glenn Fowler * +* Martijn Dekker * +* * +***********************************************************************/ +#ifndef printf +#include +#endif +int main() { int new = 0; printf("hello world\n"); return new;} diff --git a/src/cmd/INIT/hosttype.tst b/src/cmd/INIT/hosttype.tst new file mode 100644 index 000000000..7a6458848 --- /dev/null +++ b/src/cmd/INIT/hosttype.tst @@ -0,0 +1,6 @@ +hp.pa hostname 9000/730 hp9000s700 HP-UX hostname A.09.01 A +linux-aout.i386 hostname i586 i386 linux hostname 1.1.59 #1 +sgi.mips2 hostname.domain IP22 mips IRIX hostname 5.2 02282016 +osf.alpha hostname.domain alpha alpha OSF1 hostname.domain V3.2 62 +sun4 hostname.domain sun4 sparc SunOS hostname.domain 4.1.1 1 sun4c +sol.sun4 hostname.domain sun4 sparc SunOS hostname.domain 5.4 Generic_101945-13 diff --git a/src/cmd/INIT/iconv.c b/src/cmd/INIT/iconv.c new file mode 100644 index 000000000..48008292f --- /dev/null +++ b/src/cmd/INIT/iconv.c @@ -0,0 +1,26 @@ +/*********************************************************************** +* * +* This software is part of the ast package * +* Copyright (c) 1994-2011 AT&T Intellectual Property * +* Copyright (c) 2020-2022 Contributors to ksh 93u+m * +* and is licensed under the * +* Eclipse Public License, Version 2.0 * +* * +* A copy of the License is available at * +* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html * +* (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) * +* * +* Glenn Fowler * +* Martijn Dekker * +* * +***********************************************************************/ +#ifndef iconv +#include +#endif + +int +main() +{ + iconv(0, 0, 0, 0, 0); + return 0; +} diff --git a/src/cmd/INIT/iffe.sh b/src/cmd/INIT/iffe.sh new file mode 100644 index 000000000..d50cc7372 --- /dev/null +++ b/src/cmd/INIT/iffe.sh @@ -0,0 +1,4401 @@ +######################################################################## +# # +# This software is part of the ast package # +# Copyright (c) 1994-2012 AT&T Intellectual Property # +# Copyright (c) 2020-2022 Contributors to ksh 93u+m # +# and is licensed under the # +# Eclipse Public License, Version 2.0 # +# # +# A copy of the License is available at # +# https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html # +# (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) # +# # +# Glenn Fowler # +# Martijn Dekker # +# Johnothan King # +# # +######################################################################## +# Glenn Fowler & Phong Vo +# AT&T Research +# +# test if feature exists +# this script is written to make it through POSIX sh variants +# +# NOTE: .exe a.out suffix and [\\/] in path patterns for DOS/NT + +case ${ZSH_VERSION+z} in +z) emulate ksh ;; +*) (command set -o posix) 2>/dev/null && set -o posix ;; +esac +case $HOSTTYPE in +ibm.*) unset LIBPATH ;; # AIX: avoid failure to link to libiconv +esac +set -o noglob + +command=iffe +version=2022-01-09 + +compile() # $cc ... +{ + "$@" 2>$tmp.err + _compile_status=$? + if test -s $tmp.err + then cat $tmp.err >&2 + fi + if test "$_compile_status" -gt 128 + then echo "$command: $@" >&$stderr + cat $tmp.err >&$stderr + sig=$(kill -l "$_compile_status") + case $sig in + [!0-9]?*) + echo "$command: $1: terminated by SIG$sig" ;; + *) echo "$command: $1: fatal interruption ($_compile_status)" ;; + esac >&$stderr + exit $_compile_status + fi + return $_compile_status +} + +is_hdr() # [ - ] [ file.c ] hdr +{ + case $1 in + -) _is_hdr_flag=-; shift ;; + *) _is_hdr_flag= ;; + esac + case $1 in + *.c) _is_hdr_file=$1; shift ;; + *) _is_hdr_file=$tmp.c ;; + esac + is hdr $1 + compile $cc -c $_is_hdr_file <&$nullin >&$nullout 2>$tmp.e + _is_hdr_status=$? + case $_is_hdr_status in + 0) if test -s $tmp.e + then case $(grep '#.*error' $tmp.e) in + ?*) _is_hdr_status=1 ;; + esac + fi + ;; + esac + case $_is_hdr_status in + 0) success $_is_hdr_flag + ;; + *) case $debug in + 3) cat $tmp.e >&$stderr ;; + esac + failure $_is_hdr_flag + ;; + esac + return $_is_hdr_status +} + +pkg() # package +{ + case $1 in + '') # Determine default system path, store in $pth. + pth=$( + PATH=/run/current-system/sw/bin:/usr/xpg7/bin:/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin:$PATH + exec getconf PATH 2>/dev/null + ) + case $pth in + '' | [!/]* | *:[!/]* | *: ) + pth="/bin /usr/bin /sbin /usr/sbin" ;; + *:*) pth=$(echo "$pth" | sed 's/:/ /g') ;; + esac + # Fix for NixOS. Not all POSIX standard utilities come with the default system, + # e.g. 'bc', 'file', 'vi'. The command that NixOS recommends to get missing + # utilities, e.g. 'nix-env -iA nixos.bc', installs them in a default profile + # directory that is not in $(getconf PATH). So add this path to the standard path. + # See: https://github.com/NixOS/nixpkgs/issues/65512 + if test -e /etc/NIXOS && + nix_profile_dir=/nix/var/nix/profiles/default/bin && + test -d "$nix_profile_dir" + then case " $pth " in + *" $nix_profile_dir "* ) + # nothing to do + ;; + * ) # insert the default profile directory as the second entry + pth=$( + set $pth + one=$1 + shift + echo "$one $nix_profile_dir${1+ }$@" + ) ;; + esac + fi + # Fix for AIX. At least as of version 7.1, the system default 'find', 'diff -u' and 'patch' utilities + # are broken and/or non-compliant in ways that make them incompatible with POSIX 2018. However, GNU + # utilities are commonly installed in /opt/freeware/bin, and under standard names (no g- prefix). + if test -d /opt/freeware/bin + then case $(uname) in + AIX ) pth="/opt/freeware/bin $pth" ;; + esac + fi + return + ;; + '<') shift + ;; + *) return + ;; + esac + case $1 in + X|X11*) i="openwin" + case $1 in + X) set X11 ;; + esac + case $1 in + X11) case $# in + 1) set $1 6 5 4 ;; + esac + ;; + esac + ;; + *) i= + ;; + esac + pth="{ usr . - . contrib local $i - . share - . lib - $1" + i=$1 + while : + do shift + case $# in + 0) break ;; + esac + case $1 in + '>') shift; break ;; + esac + pth="$pth ${i}R$1 ${i}.$1" + done + pth="$pth . } $*" +} + +show_test() +{ + case $shell in + ksh) print -n - "$command: test: $* ..." ;; + *) printf '%s: test: %s ...' "$command" "$*" ;; + esac + case $debug in + 0) ;; + *) echo ;; # when debugging, add newline before compiler error messages + esac +} >&$stderr + +is() # op name +{ + case $verbose in + 1) case $complete in + 1) failure ;; + esac + oo=$1 + shift + case $1 in + ?*) yy=is + ii=$1 + complete=1 + case $oo in + cmd) mm="a command" ;; + dat) mm="a library data symbol" ;; + dfn) mm="a macro with extractable value" ;; + exp) mm="true" ;; + hdr) mm="a header" ;; + id) mm="an identifier" ;; + lcl) mm="a native header" ;; + key) mm="a reserved keyword" ;; + lib) mm="a library function" ;; + LIB) case $2 in + "") mm="a library" ;; + *) ii=$*; mm="a library group" ;; + esac + ;; + mac) mm="a macro" ;; + mem) mm="a member of $2" ;; + mth) mm="a math library symbol" ;; + nos) mm="a non-opaque struct" ;; + npt) mm="a symbol that needs a prototype" ;; + num) mm="a numeric constant or enum" ;; + nxt) mm="an include path for the native header" ;; + opt) mm="set in \$PACKAGE_OPTIONS" ;; + pth) mm="a file" ;; + run) yy="capture output of" mm= ;; + siz) mm="a type with known size" ;; + sym) mm="a typed variable" ;; + sys) mm="a system header" ;; + typ) mm="a type or typedef" ;; + val) yy="determine" mm="value" ;; + *) yy= mm= ;; + esac + case $ii in + [abcdefghijklmnopqrstuvwxyz]*[abcdefghijklmnopqrstuvwxyz]'{') ii="$ii ... }end" ;; + esac + show_test $yy $ii $mm + complete=1 + ;; + esac + ;; + esac +} + +success() +{ + case $1 in + -) shift + ;; + *) case $result in + UNKNOWN) result=SUCCESS ;; + esac + case $1 in + +) return ;; + esac + ;; + esac + case $complete:$verbose in + 1:1) case $suspended in + 1) suspended=0 + show_test $yy $ii $mm + ;; + esac + complete=0 + case $# in + 0) mm="yes" ;; + *) mm="'$*'" ;; + esac + case $debug in + 0) echo " $mm" >&$stderr ;; + *) echo "$command: ... $mm" >&$stderr ;; + esac + ;; + esac +} + +failure() +{ + case $1 in + -) shift ;; + *) result=FAILURE + case $1 in + +) return ;; + esac + ;; + esac + case $complete:$verbose in + 1:1) case $suspended in + 1) suspended=0 + show_test $yy $ii $mm + ;; + esac + complete=0 + case $group in + '') case $# in + 0) mm="no" ;; + *) mm=$* ;; + esac + ;; + *) mm= + ;; + esac + case $debug in + 0) echo " $mm" >&$stderr ;; + *) echo "$command: ... $mm" >&$stderr ;; + esac + ;; + esac +} + +# report +# +# - ignore global status +# -0 normal sense +# -1 inverted sense if ! def +# status test status 0:success *:failure +# success success comment +# failure failure comment +# default default setting comment +# +# globals +# +# $not invert test sense +# $M test variable +# $m test macro +# $v default macro + +report() # [-] [-0] [-1] status value success failure default +{ + case $1 in + -) _report_ignore=$1 + shift + ;; + *) _report_ignore= + ;; + esac + _report_not=$not + case $1 in + -0) shift + ;; + -1) shift + case $def in + ''|-) case $_report_not in + 1) _report_not= ;; + *) _report_not=1 ;; + esac + ;; + esac + ;; + esac + _report_status=$1 + case $_report_ignore:$_report_status in + -:*) ;; + *:0) success $_report_ignore + ;; + *) failure $_report_ignore + case $group in + ?*) return ;; + esac + ;; + esac + _report_value=$2 + case $_report_not in + 1) case $_report_status in + 0) _report_status=1 ;; + *) _report_status=0 ;; + esac + _report_success=$4 + _report_failure=$3 + ;; + *) _report_success=$3 + _report_failure=$4 + ;; + esac + _report_default=$5 + case $_report_status in + 0) case $M in + *-*) ;; + *) usr="$usr$nl#define $m $_report_value" + case $_report_success in + ''|-) ;; + *) case $define in + 1) echo "#define $m $_report_value /* $_report_success */" ;; + n) echo "$m=$_report_value" + esac + ;; + esac + eval $m=\'$_report_value\' + ;; + esac + ;; + *) case $M in + *-*) ;; + *) case $_report_failure in + ''|-) ;; + *) case $define$all$config$undef in + 1?1?|1??1)echo "#undef $m /* $_report_failure */" ;; + 11??) echo "#define $m 0 /* $_report_failure */" ;; + n1?1) echo "$m=" ;; + n1??) echo "$m=0" ;; + esac + ;; + esac + case $_report_default in + ''|-) ;; + *) case $define$set in + 1?*) echo "#define $v $set /* $_report_default */" ;; + n?*) echo "$v=$set" ;; + esac + ;; + esac + eval $m=0 + ;; + esac + ;; + esac +} + +noisy() +{ + case $complete:$verbose in + 1:1) suspended=1 + echo >&$stderr + ;; + esac +} + +copy() # "output-file" "data-that-must-not-be-processed-by-echo" +{ + # Some ksh88 clones (pdksh, mksh) lack 'printf' as a built-in utility, so if a + # ksh-type shell was detected, use the 'print' built-in for better performance. + case $1 in + -) case $shell in + ksh) print -r - "$2" + ;; + *) printf '%s\n' "$2" + ;; + esac + ;; + *) case $shell in + ksh) print -r - "$2" + ;; + *) printf '%s\n' "$2" + ;; + esac > "$1" + ;; + esac +} + +# verify that cc is a C compiler + +checkcc() +{ + # check for local package root directories + + case $PACKAGE_PATH in + ?*) for i in $(echo $PACKAGE_PATH | sed 's,:, ,g') + do if test -d $i/include + then cc="$cc -I$i/include" + occ="$occ -I$i/include" + fi + if test -d $i/lib + then cc="$cc -L$i/lib" + occ="$occ -L$i/lib" + for y in $libpaths + do eval $y=\"\$$y:\$i/lib\$${y}_default\" + eval export $y + done + fi + done + ;; + esac + echo "int i = 1;" > $tmp.c + if compile $cc -c $tmp.c <&$nullin >&$nullout + then echo "(;" > $tmp.c + if compile $cc -c $tmp.c <&$nullin >&$nullout + then cctest="should not compile '(;'" + fi + else cctest="should compile 'int i = 1;'" + fi + case $cctest in + "") cctest=0 + ;; + *) echo "$command: $cc: not a C compiler: $cctest" >&$stderr + exit 1 + ;; + esac +} + +execute() +{ + case $verbose in + 0) noteout=$nullout ;; + *) noteout=$stderr ;; + esac + if test "" != "$cross" + then crossexec $cross "$@" 9>&$noteout + _execute_=$? + elif test -d /NextDeveloper + then "$@" <&$nullin >&$nullout 9>&$noteout + _execute_=$? + "$@" <&$nullin | cat + else "$@" 9>&$noteout + _execute_=$? + fi + return $_execute_ +} + +exclude() +{ + case $excludes in + '') return 0 ;; + esac + for _exclude_var + do eval _exclude_old=\$$_exclude_var + case $_exclude_old in + *" -I"*);; + *) continue ;; + esac + _exclude_new= + _exclude_sep= + for _exclude_arg in $_exclude_old + do _exclude_skip= + for _exclude_dir in $excludes + do case $_exclude_arg in + -I$_exclude_dir|-I*/$_exclude_dir) + _exclude_skip=1 + break; + ;; + esac + done + case $_exclude_skip in + '') _exclude_new="$_exclude_new$_exclude_sep$_exclude_arg" + _exclude_sep=" " + ;; + esac + done + eval $_exclude_var=\$_exclude_new + case $debug in + 0) ;; + *) echo $command: exclude $_exclude_var: "$_exclude_old => $_exclude_new" >&$stderr + ;; + esac + done +} + +all=0 +apis= +binding="-dy -dn -Bdynamic -Bstatic -Wl,-ashared -Wl,-aarchive -call_shared -non_shared '' -static" +complete=0 +config=0 +defhdr= +define=1 +explicit=0 +iff= +usr= +cross= +debug=0 +deflib= +dir=FEATURE +excludes= +executable="test -x" +exists="test -e" +gothdr= +gotlib= +idno= +idyes= +ifs=${IFS-' + '} +in= +includes= +intrinsic= +libpaths="DYLD_LIBRARY_PATH LD_LIBRARY_PATH LD_LIBRARYN32_PATH LD_LIBRARY64_PATH LIBPATH SHLIB_PATH" + DYLD_LIBRARY_PATH_default=:/lib:/usr/lib + LD_LIBRARY_PATH_default=:/lib:/usr/lib + LD_LIBRARYN32_PATH_default=:/lib32:/usr/lib32 + LD_LIBRARY64_PATH_default=:/lib64:/usr/lib64 + LIBPATH_default=:/lib:/usr/lib + SHLIB_PATH_default=:/shlib:/usr/shlib:/lib:/usr/lib +nl=" +" +optimize=1 +occ=cc +one= +out= +puthdr= +putlib= +pragma= + +shell=posix +case $(eval 'PATH=/dev/null && let i=93-5 && typeset -u v=ksh$i && print -r - "$v"' 2>/dev/null) in +KSH88) shell=ksh ;; # also pdksh, mksh, zsh +esac + +reallystatic= +reallystatictest= +regress= +static=. +statictest= +case $COTEMP in +"") case $HOSTNAME in + ""|?|??|???|????|????) + tmp=${HOSTNAME} + ;; + *) tmp=${HOSTNAME%${HOSTNAME#????}} + ;; + esac + tmp=${tmp}$$ + ;; +*) tmp=x${COTEMP} + ;; +esac +COTEMP=${tmp} +export COTEMP +case $tmp in +./*) ;; +??????????*) + tmp=${tmp%${tmp#?????????}} + ;; +?????????) + ;; +????????) + tmp=F$tmp + ;; +esac +case $tmp in +./*) ;; +*) tmp=./$tmp ;; +esac +undef=0 +verbose=0 +vers= + +# options -- `-' for output to stdout otherwise usage + +case $1 in +-) out=-; shift ;; +esac +set= + +case $( (getopts '[-][123:xyz]' opt --xyz; echo 0$opt) 2>/dev/null ) in +0123) USAGE=$' +[-? +@(#)$Id: iffe (ksh 93u+m) '${version}$' $ +] +[-author?Glenn Fowler ] +[-author?Phong Vo ] +[-copyright?(c) 1994-2012 AT&T Intellectual Property] +[-copyright?(c) 2020-2021 Contributors to https://github.com/ksh93/ksh] +[-license?https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html] +[+NAME?iffe - C compilation environment feature probe] +[+DESCRIPTION?\biffe\b is a command interpreter that probes the C + compilation environment for features. A feature is any file, option + or symbol that controls or is controlled by the C compiler. \biffe\b + tests features by generating and compiling C programs and observing + the behavior of the C compiler and generated programs.] +[+?\biffe\b statements are line oriented. Statements may appear in the + operand list with the \b:\b operand or \bnewline\b as the line + delimiter. The standard input is read if there are no command + line statements or if \afile\a\b.iffe\b is omitted.] +[+?Though similar in concept to \bautoconf\b(1) and \bconfig\b(1), there + are fundamental differences. The latter tend to generate global + headers accessed by all components in a package, whereas \biffe\b is + aimed at localized, self contained feature testing.] +[+?Output is generated in \bFEATURE/\b\atest\a by default, where \atest\a is + the base name of \afile\a\b.iffe\b or the \biffe\b \brun\b + file operand. Output is first generated in a temporary file; the + output file is updated if it does not exist or if the temporary file + is different. If the first operand is \b-\b then the output is written + to the standard output and no update checks are done.] +[+?Files with suffixes \b.iffe\b and \b.iff\b are assumed to contain + \biffe\b statements.] +[a:all?Define failed test macros \b0\b. By default only successful test macros + are defined \b1\b.] +[c:cc?Sets the C compiler name and flags to be used in the feature + tests.]:[C-compiler-name [C-compiler-flags ...]]] +[C:config?Generate \bconfig\b(1) style \aHAVE_\a* macro names. This implies + \b--undef\b. Since \bconfig\b(1) has inconsistent naming conventions, + the \bexp\b op may be needed to translate from the (consistent) + \biffe\b names. Unless otherwise noted a \bconfig\b macro name + is the \biffe\b macro name prefixed with \bHAVE\b and converted to + upper case. \b--config\b is set by default if the command arguments + contain a \brun\b op on an input file with the base name \bconfig\b.] +[d:debug?Sets the debug level. Level 0 inhibits most + error messages, level 1 shows compiler messages, and + level 2 traces internal \biffe\b \bsh\b(1) actions and does + not remove core dumps on exit.]#[level] +[D:define?Successful test macro definitions are emitted. This is the default.] +[E:explicit?Disable implicit test output.] +[F:features?Sets the feature test header to \ahdr\a. This header typically + defines *_SOURCE feature test macros.]:[hdr:=NONE] +[i:input?Sets the input file name to \afile\a, which + must contain \biffe\b statements.]:[file] +[I:include?Adds \b-I\b\adir\a to the C compiler flags.]:[dir] +[L:library?Adds \b-L\b\adir\a to the C compiler flags.]:[dir] +[n:name-value?Output \aname\a=\avalue\a assignments only.] +[N!:optimize?\b--nooptimize\b disables compiler optimization options.] +[o:output?Sets the output file name to \afile\a.]:[file] +[O:stdio?Sets the standard io header to \ahdr\a.]:[hdr:=stdio.h] +[e:package?Obsolete; ignored.] +[p:prototyped?Obsolete; ignored.] +[P:pragma?Emits \b#pragma\b \atext\a at the top of the output file.]:[text] +[r:regress?Massage output for regression testing.] +[s:shell?Sets the internal shell name to \aname\a. Used for debugging + Bourne shell compatibility (otherwise \biffe\b uses \aksh\a constructs + if available). The supported names are \bksh\b, \bbsh\b, \bbash\b, and + \bosh\b. \bosh\b forces the \bread -r\b compatibility read command to + be compiled and used instead of \bread -r\b. The default is determined + by probing the shell at startup.]:[name] +[S:static?Sets the C compiler flags that force static linking. If not set + then \biffe\b probes the compiler to determine the flags. \biffe\b + must use static linking (no dlls) because on some systems missing + library symbols are only detected when referenced at runtime from + dynamically linked executables.]:[flags] +[u:undef?\b#undef\b failed test macros. By default only successful test macros + are defined \b1\b.] +[v:verbose?Produce a message line on the standard error for each test as + it is performed.] +[x:cross?Some tests compile an executable (\ba.out\b) and then run it. + If the C compiler is a cross compiler and the executable format is + incompatible with the execution environment then the generated + executables must be run in a different environment, possibly on + another host. \acrosstype\a is the HOSTTYPE for generated executables + (the \bpackage\b(1) command generates a consistent HOSTTYPE namespace). + Generated executables are run via \bcrossexec\b(1) with \acrosstype\a + as the first argument. \bcrossexec\b supports remote execution for + cross-compiled executables. See \bcrossexec\b(1) for + details.]:[crosstype] +[X:exclude?Removes \b-I\b\adir\a and \b-I\b*/\adir\a C compiler flags.]:[dir] + +[ - ] [ file.iffe | statement [ : statement ... ] ] + +[+SYNTAX?\biffe\b input consists of a sequence of statement lines. Statements + that span more than one line contain \abegin\a\b{\b as the last + operand (where \abegin\a is command specific) and zero + or more data lines terminated by a line containing + \b}end\b as the first operand. The statement syntax is: + [\aname\a \b=\b]] [\b!\b]] \atest\a[,\atest\a...]] [\b-\b]] + [\aarg\a[,\aarg\a...]]]] [\aprereq\a ...]] + [\abegin\a{ ... |\bend\b ...]] [= [\adefault\a]]]]. + \atest\as and \aarg\as may be combined, separated by commas, to perform + a set of tests on a set of arguments. \aname\a \b=\b before \atest\a + overrides the default test variable and macro name, and \b-\b after + \atest\a performs the test but does not define the test variable and + macro values. \b!\b before \atest\a inverts the test sense for \bif\b, + \belif\b, and \byes{\b and \bno{\b blocks.] +[+?\aprereq\as are used when applying the features tests and may be + combinations of:]{ + [+compiler options?\b-D\b*, \b-L\b*, etc.] + [+library references?\b-l\b*, *\b.a\b, etc. \b_LIB_\b\aname\a + is defined to be 1 if \b-l\b\aname\a is a library.] + [+header references?*\b.h\b. \a_dir_name\a is defined to be 1 + if \adir/name\a\b.h\b is a header, or if \adir\a is + omitted, \b_hdr_\b\aname\a is defined to be 1 if + \aname\a\b.h\b is a header.] + [+-?Prereq grouping mark; prereqs before the first \b-\b are + passed to all feature tests. Subsequent groups + are attempted in left-to-right order until the first + successful group is found.] + } +[+?\abegin\a\b{\b ... \b}end\b delimit multiline code blocks that override + or augment the default code provided by \biffe\b. User supplied code + blocks should be compatible with the C89/C90 C language + standard for maximal portability. Test code may call the function + \bNOTE("...")\b to emit short text in \b--verbose\b output; only one + \bNOTE()\b should be called per test for readability. In addition to + all macro definitions generated by previous tests, all generated + code contains the following at the top:]{ + [+ ?/* AST backwards compatibility macros */] + [+ ?#define _NIL_(x) ((x)0)] + [+ ?#define _STD_ 1] + [+ ?#define _ARG_(x) x] + [+ ?#define _VOID_ void] + [+ ?#define _BEGIN_EXTERNS_] + [+ ?#define _END_EXTERNS_] + [+ ?/* if/when available, "$INSTALLROOT/src/lib/libast/FEATURE/standards" is included here */] + [+ ?/* then is included, unless this was disabled using the "stdio" option */] + } +[+?= \adefault\a may be specified for the \bkey\b, \blib\b, \bmac\b, \bmth\b + and \btyp\b tests. If the test fails for \aarg\a then + \b#define\b \aarg\a \adefault\a is emitted. \bkey\b accepts multiple + \b= \b\adefault\a values; the first valid one is used.] +[+?Each test statement generates a portion of a C language header that contains + macro definitions, comments, and other text corresponding to the feature + tests. \b#ifndef _def_\b\aname\a\b_\b\adirectory\a ... + \b#endif\b guards the generated header from multiple \b#include\bs, + where \aname\a is determined by either the \brun\b statement input file + name if any, or the first \atest\a in the first statement, and \adirectory\a + is the basename component of either the \brun\b statement file, if any, + or the current working directory. The output file name is determined + in this order:]{ + [+-?If the first command line operand is \b-\b then the output + is written to the standard output.] + [+--output=\afile\a?Output is \afile\a.] + [+set out \afile\a?Output is \afile\a.] + [+[run]] [\adirectory\a/]]\abase\a[\a.suffix\a]]?Output is + \bFEATURE/\b\abase\a.] + } +[+?Generated \biffe\b headers are often referenced in C source as: + \b#include "FEATURE/\b\afile\a". The \bnmake\b(1) base rules contain + metarules for generating \bFEATURE/\b\afile\a from + \bfeatures/\b\afile\a[\asuffix\a]], where \asuffix\a may be omitted, + \b.c\b, or \b.sh\b (see the \brun\b test below). Because + \b#include\b prerequisites are automatically detected, \bnmake\b(1) + ensures that all prerequisite \biffe\b headers are generated before + compilation. Note that the directories are deliberately named + \bFEATURE\b and \bfeatures\b to keep case-ignorant file systems + happy.] +[+?The feature tests are:]{ + [+# \acomment\a?Comment line - ignored.] + [+api \aname\a \aYYYYMMDD\a \asymbol ...\a?Emit API compatibility tests + for \aname\a and \b#define\b \asymbol\a \asymbol\a_\aYYYYMMDD\a + when \aNAME\a_API is >= \aYYYYMMDD\a (\aNAME\a is \aname\a + converted to upper case). If \aNAME\a_API is not defined + then \asymbol\a maps to the newest \aYYYYMMDD\a for \aname\a.] + [+define \aname\a [ (\aarg,...\a) ]] [ \avalue\a ]]?Emit a macro + \b#define\b for \aname\a if it is not already defined. The + definition is passed to subsequent tests.] + [+extern \aname\a \atype\a [ (\aarg,...\a) | [\adimension\a]] ]]?Emit + an \bextern\b prototype for \aname\a if one is not already + defined. The prototype is passed to subsequent tests.] + [+header \aheader\a?Emit \b#include <\b\aheader\a\b>\b if \aheader\a + exists. The \b#include\b is passed to subsequent tests.] + [+print \atext\a?Copy \atext\a to the output file. \atext\a is passed + to subsequent tests.] + [+reference \aheader\a?If \aheader\a exists then add \b#include\b + \aheader\a to subsequent tests.] + [+ver \aname\a \aYYYYMMDD\a?\b#define\b \aNAME\a_VERSION \aYYYYMMDD\a + (\aNAME\a is \aname\a converted to upper case).] + [+cmd \aname\a?Defines \b_cmd_\b\aname\a if \aname\a is an executable + in one of the standard system directories + (as output by \bgetconf PATH\b). + \b_\b\adirectory\a\b_\b\aname\a is defined for \adirectory\a + in which \aname\a is found (with \b/\b translated to \b_\b).] + [+dat \aname\a?Defines \b_dat_\b\aname\a if \aname\a is a data symbol + in the default libraries.] + [+def \aname\a?Equivalent to \bcmd,dat,hdr,key,lib,mth,sys,typ\b + \aname\a.] + [+dfn \aname\a?If \aname\a is a macro in the candidate headers then + a \b#define\b \aname\a \avalue\a statement is output for the + \avalue\a defined in the headers. The definition is \b#ifndef\b + guarded.] + [+exp \aname\a \aexpression\a?If \aexpression\a is a \"...\" string + then \aname\a is defined to be the string, else if the + \bexpr\b(1) evaluation of \aexpression\a is not 0 then \aname\a + is defined to be 1, otherwise \aname\a is defined to be 0. + Identifiers in \aexpression\a may be previously defined names + from other \biffe\b tests; undefined names evaluate to 0. + If \aname\a was defined in a previous successful test then + the current and subsequent \bexp\b test on \aname\a are + skipped. If \aname\a is \b-\b then the \aexpression\a is + simply evaluated.] + [+hdr \aname\a?Defines \b_hdr_\b\aname\a if the header + \b<\b\aname\a\b.h>\b exists. The \b--config\b macro name is + \bHAVE_\b\aNAME\a\b_H\b.] + [+if \astatement\a ... | \belif\b \astatement\a ... | \belse\b | \bendif\b? + Nested if-else test control.] + [+iff \aname\a?The generated header \b#ifndef-#endif\b macro guard is + \b_\b\aname\a\b_H\b.] + [+inc \afile\a [ re ]]?Read #define macro names from \afile\a + and arrange for those names to evaluate to 1 in \bexp\b + expressions. If \are\a is specified then macros not matching + \are\a are ignored.] + [+key \aname\a?Defines \b_key_\b\aname\a if \aname\a is a reserved + word (keyword).] + [+lcl \aname\a?Generates a \b#include\b statement for the native version + of the header \b<\b\aname\a\b.h>\b if it exists. Defines + \b_lcl_\b\aname\a on success. The \b--config\b macro name is + \bHAVE_\b\aNAME\a\b_H\b. The default \are\a is \b^HAVE_\b + for \b--config\b and \b^_\b otherwise.] + [+lib \aname\a?Defines \b_lib_\b\aname\a if \aname\a is an external + symbol in the default libraries.] + [+mac \aname\a?Defines \b_mac_\b\aname\a if \aname\a is a macro.] + [+mem \astruct.member\a?Defines \b_mem_\b\amember\a\b_\b\astruct\a + if \amember\a is a member of the structure \astruct\a.] + [+mth \aname\a?Defines \b_mth_\b\aname\a if \aname\a is an external + symbol in the math library.] + [+nop \aname\a?If this is the first test then \aname\a may be used + to name the output file and/or the output header guard macro. + Otherwise this test is ignored.] + [+npt \aname\a?Defines \b_npt_\b\aname\a if the \aname\a symbol + requires a prototype. The \b--config\b macro name is + \bHAVE_\aNAME\a\b_DECL\b with the opposite sense.] + [+num \aname\a?Defines \b_num_\b\aname\a if \aname\a is a numeric + constant \aenum\a or \amacro\a.] + [+nxt \aname\a?Defines a string macro \b_nxt_\b\aname\a suitable for + a \b#include\b statement to include the next (on the include + path) or native version of the header \b<\b\aname\a\b.h>\b + if it exists. Also defines the \"...\" form + \b_nxt_\b\aname\a\b_str\b. The \b--config\b macro name is + \bHAVE_\b\aNAME\a\b_NEXT\b.] + [+one \aheader\a ...?Generates a \b#include\b statement for the first + header found in the \aheader\a list.] + [+opt \aname\a?Defines \b_opt_\b\aname\a if \aname\a is a space-separated + token in the global environment variable \bPACKAGE_OPTIONS\b.] + [+pth \afile\a [ \adir\a ... | { \ag1\a - ... - \agn\a } | < \apkg\a [\aver\a ...]] > ]]?Defines + \b_pth_\b\afile\a, with embedded \b/\b chars translated to + \b_\b, to the path of the first instance of \afile\a in the + \adir\a directories. \b{\b ... \b}\b forms a directory list + from the cross-product of \b-\b separated directory groups + \ag1\a ... \agn\a. < ... > forms a directory list for the + package \apkg\a with optional versions. If no operands are + specified then the default PATH directories are used. The + \b--config\b macro name is \aNAME\a\b_PATH\b.] + [+run \afile\a?Runs the tests in \afile\a based on the \afile\a + suffix:]{ + [+.c?\afile\a is compiled and executed and the output is copied + to the \biffe\b output file. Macros and headers supplied + to \bbegin{\b ... \b}end\b are also supplied to + \afile\a.] + [+.sh?\afile\a is executed as a shell script and the output is + copied to the \biffe\b output file.] + [+.iffe \bor no suffix?\afile\a contains \biffe\b + statements.] + } + [+set \aoption value\a?Sets option values. The options are described + above.] + [+siz \aname\a?Defines \b_siz_\b\aname\a to be \bsizeof\b(\aname\a) if + \aname\a is a type in any of \b, , + , \b. Any \b.\b characters in \aname\a are + translated to space before testing and are translated to \b_\b + in the output macro name.] + [+sym \aname\a?Defines \b_ary_\b\aname\a if \aname\a is an array, + \b_fun_\b\aname\a if \aname\a is a function pointer, + \b_ptr_\b\aname\a if \aname\a is a pointer, or + \b_reg_\b\aname\a if \aname\a is a scalar. In most cases + \aname\a is part of a macro expansion.] + [+sys \aname\a?Defines \b_sys_\b\aname\a if the header + \b\b exists. The \b--config\b macro name is + \bHAVE_SYS_\b\aNAME\a\b_H\b.] + [+tst \aname\a?A user defined test on name. A source block must be + supplied. Defines \b_\b\aname\a on success. \btst - ...\b is + treated as \btst - - ...\b.] + [+typ \aname\a?Defines \b_typ_\b\aname\a if \aname\a is a type in any + of \b, , , \b. Any + \b.\b characters in \aname\a are translated to space before + testing and are translated to \b_\b in the output macro name.] + [+val \aname\a?The output of \becho\b \aname\a is written to the + output file.] + [+var \aname\a?A user defined test on name. A source block must be + supplied. Sets the \bexp\b variable \b_\b\aname\a on success + but does not define a macro.] + [+(\aexpression\a)?Equivalent to \bexp -\b \aexpression\a.] +} +[+?Code block names may be prefixed by \bno\b to invert the test sense. The + block names are:]{ + [+cat?The block is copied to the output file.] + [+compile?The block is compiled (\bcc -c\b).] + [+cross?The block is executed as a shell script using \bcrossexec\b(1) + if \b--cross\b is on, or on the local host otherwise, and the + output is copied to the output file. Test macros are not + exported to the script.] + [+execute?The block is compiled, linked, and executed. \b0\b exit + status means success.] + [+fail?If the test fails then the block text is evaluated by + \bsh\b(1) in \biffe\b'\'$'s current shell environment. + Changes in the shell state, such as variables, will survive the block. + Standard input is redirected to \b/dev/null\b. + Standard output is copied to the output file. + Standard error may be used to log informative or error messages. + The block may use \bexit\b to abort the \biffe\b run.] + [+link?The block is compiled and linked (\bcc -o\b).] + [+macro?The block is preprocessed (\bcc -E\b) and lines containing + text bracketed by \b<<"\b ... \b">>\b (\aless-than\a \aless-than\a + \adouble-quote\a ... \adouble-quote\a \agreater-than\a \agreater-than\a) + are copied to the output file with the brackets omitted.] + [+no?If the test fails then the block text is copied to the + output file. Deprecated: use { \bif\b \belif\b \belse\b + \bendif\b } with unnamed \b{\b ... \b}\b blocks.] + [+note?If the test succeeds then the block is copied to the output + as a \b/*\b ... \b*/\b comment.] + [+output?The block is compiled, linked, and executed, and the output + is copied to the output file.] + [+pass?If the test succeeds then the block text is evaluated by + \bsh\b(1) in the same manner as \bfail\b above.] + [+preprocess?The block is preprocessed (\bcc -E\b).] + [+run?The block is executed as a shell script and the output is + copied to the output file. Successful test macros are also + defined as shell variables with value \b1\b and are available + within the block. Likewise, failed test macros are defined + as shell variables with value \b0\b.] + [+status?The block is compiled, linked, and executed, and the exit + status is the test outcome, 0 for \afailure\a, the value + otherwise.] + [+yes?If the test succeeds then the block text is copied to the output + file. \byes{\b ... \b}end\b is equivalent to the unnamed block + \b{\b ... \b}\b. Deprecated: use { \bif\b \belif\b \belse\b + \bendif\b } with unnamed \b{\b ... \b}\b blocks.] +} +[+SEE ALSO?\bautoconf\b(1), \bconfig\b(1), \bgetconf\b(1), \bcrossexec\b(1), + \bnmake\b(1), \bpackage\b(1), \bsh\b(1)] +' + while getopts -a "$command" "$USAGE" OPT + do case $OPT in + a) set="$set set all :" ;; + c) set="$set set cc $OPTARG :" ;; + C) set="$set set config :" ;; + d) set="$set set debug $OPTARG :" ;; + D) set="$set set define :" ;; + E) set="$set set explicit :" ;; + F) set="$set set features $OPTARG :" ;; + i) set="$set set input $OPTARG :" ;; + I) set="$set set include $OPTARG :" ;; + L) set="$set set library $OPTARG :" ;; + n) set="$set set namval $OPTARG :" ;; + N) set="$set set nooptimize $OPTARG :" ;; + o) set="$set set output $OPTARG :" ;; + e) ;; # obsolete + p) ;; # obsolete + P) set="$set set pragma $OPTARG :" ;; + r) set="$set set regress :" ;; + s) set="$set set shell $OPTARG :" ;; + S) set="$set set static $OPTARG :" ;; + O) set="$set set stdio $OPTARG :" ;; + u) set="$set set undef :" ;; + v) set="$set set verbose :" ;; + x) set="$set set cross $OPTARG :" ;; + X) set="$set set exclude $OPTARG :" ;; + esac + done + shift $((OPTIND - 1)) + ;; +*) while : + do case $# in + 0) break ;; + esac + case $1 in + -) break + ;; + --) shift + break + ;; + --a|--al|--all) + REM=a + ;; + --cc=*) REM=c$(echo X$1 | sed 's,[^=]*=,,') + ;; + --co|--con|--conf|--confi|--config) + REM=C + ;; + --cr=*|--cro=*|--cros=*|--cross=*) + REM=x$(echo X$1 | sed -e 's,[^=]*=,,') + ;; + --d=*|--de=*|--deb=*|--debu=*|--debug=*) + REM=d$(echo X$1 | sed 's,[^=]*=,,') + ;; + --def|--defi|--defin|--define) + REM=D + ;; + --e=*|--ex=*|--exc=*|--excl=*|--exclu=*|--exclud=*|--exclude=*) + REM=X$(echo X$1 | sed 's,[^=]*=,,') + ;; + --e|--ex|--exp|--expl|--expli|--explic|--explici|--explicit) + REM=E + ;; + --f=*|--fe=*|--fea=*|--feat=*|--featu=*|--featur=*|--feature=*|--features=*) + REM=F$(echo X$1 | sed 's,[^=]*=,,') + ;; + --inp=*|--inpu=*|--input=*) + REM=i$(echo X$1 | sed 's,[^=]*=,,') + ;; + --inc=*|--incl=*|--inclu=*|--includ=*|--include=*) + REM=I$(echo X$1 | sed 's,[^=]*=,,') + ;; + --l=*|--li=*|--lib=*|--libr=*|--libra=*|--librar=*|--library=*) + REM=L$(echo X$1 | sed 's,[^=]*=,,') + ;; + --n|--na|--nam|--name|--name-v|--name-va|--name-val|--name-valu|--name-value) + REM=n + ;; + --o=*|--ou=*|--out=*|--outp=*|--outpu=*|--output=*) + REM=o$(echo X$1 | sed 's,[^=]*=,,') + ;; + --pa=*|--pac=*|--pack=*|--packa=*|--packag=*|--package=*) + # obsolete + ;; + --pro|--prot|--proto|--protot|--prototy|--prototyp|--prototype|--prototyped) + # obsolete + ;; + --pra=*|--prag=*|--pragma=*) + REM=P$(echo X$1 | sed 's,[^=]*=,,') + ;; + --r|--re|--reg|--regre|--regres|--regress) + REM=r + ;; + --sh=*|--she=*|--shel=*|--shell=*) + REM=s$(echo X$1 | sed 's,[^=]*=,,') + ;; + --sta=*|--stat=*|--stati=*|--static=*) + REM=S$(echo X$1 | sed 's,[^=]*=,,') + ;; + --std=*|--stdi=*|--stdio=*) + REM=O$(echo X$1 | sed 's,[^=]*=,,') + ;; + --u|--un|--und|--unde|--undef) + REM=u + ;; + --v|--ve|--ver|--verb|--verbo|--verbos|--verbose) + REM=v + ;; + --*) echo $command: $1: unknown option >&2 + exit 2 + ;; + -*) REM=$(echo X$1 | sed 's,X-,,') + ;; + *) break + ;; + esac + shift + while : + do case $REM in + '') break ;; + esac + eval $(echo $REM | sed "s,\(.\)\(.*\),OPT='\1' REM='\2',") + case $OPT in + [cdFiILoOePsSxX]) + case $REM in + '') case $# in + 0) echo $command: -$OPT: option argument expected >&2 + exit 1 + ;; + esac + OPTARG=$1 + shift + ;; + *) OPTARG=$REM + REM='' + ;; + esac + esac + case $OPT in + a) set="$set set all :" ;; + c) set="$set set cc $OPTARG :" ;; + C) set="$set set config :" ;; + d) set="$set set debug $OPTARG :" ;; + D) set="$set set define :" ;; + E) set="$set set explicit :" ;; + F) set="$set set features $OPTARG :" ;; + i) set="$set set input $OPTARG :" ;; + I) set="$set set include $OPTARG :" ;; + L) set="$set set library $OPTARG :" ;; + n) set="$set set namval $OPTARG :" ;; + N) set="$set set nooptimize $OPTARG :" ;; + o) set="$set set output $OPTARG :" ;; + e) ;; # obsolete + p) ;; # obsolete + P) set="$set set pragma $OPTARG :" ;; + r) set="$set set regress :" ;; + s) set="$set set shell $OPTARG :" ;; + S) set="$set set static $OPTARG :" ;; + O) set="$set set stdio $OPTARG :" ;; + u) set="$set set undef :" ;; + v) set="$set set verbose :" ;; + x) set="$set set cross $OPTARG :" ;; + X) set="$set set exclude $OPTARG :" ;; + *) echo "Usage: $command [-aCDEnpruv] [-c C-compiler-name [C-compiler-flags ...]] [-d level] + [-F features-header] [-i file] [-o file] [-O stdio-header] [-e name] [-P text] + [-s shell-path] [-S[flags]] [-x cross-exec-prefix] [-I dir] [-L dir] [-X dir] [ - ] + [ file.iffe | statement [ : statement ... ] ]" >&2 + exit 2 + ;; + esac + done + done + ;; +esac +case $1 in +-) out=-; shift ;; +esac +case $# in +0) in=- ;; +esac +set -- $set "$@" +case " $* " in +*' set config '*|*' run config.'*|*' run '*' config.'*|*' run '*'/config.'*) + config=1 + ;; +esac + +# standard error to /dev/null unless debugging +# standard output to the current output file +# +# stdout original standard output +# stderr original standard error +# nullin /dev/null input +# nullout /dev/null output + +stdout=5 stderr=6 nullin=7 nullout=8 +eval "exec $nullin/dev/null $stdout>&1 $stderr>&2" +case " $* " in +*" set debug "[3456789]*) + ;; +*) eval "exec 2>&$nullout" + ;; +esac + +# tmp files cleaned up on exit +# status: 0:success 1:failure 2:interrupt + +status=1 +case $debug in +2) core= + ;; +*) if (ulimit -c 0) >/dev/null 2>&1 + then ulimit -c 0 + core= + else core="core core.??*" + fi + ;; +esac +trap "(set +o noglob; exec rm -f $core $tmp*)" 0 +if (:>$tmp.c) 2>/dev/null +then rm -f $tmp.c +else echo "$command: cannot create tmp files in current dir" >&2 + exit 1 +fi +status=2 + +# standard header for c source + +std='/* AST backwards compatibility macros */ +#define _NIL_(x) ((x)0) +#define _STD_ 1 +#define _ARG_(x) x +#define _VOID_ void +#define _BEGIN_EXTERNS_ +#define _END_EXTERNS_' +# To ensure the environment tested is the same as that used, add standards +# compliance macros as probed by libast as soon as they are available. +if test -f "${INSTALLROOT}/src/lib/libast/FEATURE/standards" +then std=${std}${nl}$(cat "${INSTALLROOT}/src/lib/libast/FEATURE/standards") +fi +tst= +ext="#include " + +# loop on op [ arg [ ... ] ] [ : op [ arg [ ... ] ] ] + +argx=0 +cur=. +can= +cansep= +cctest= +file= +hdrtest= +ifelse=NONE +ifstack= +ini= +init=1 +line=0 +nan= +while : +do case $in in + "") case $argx:$* in + 1:$argv);; + 1:*) argx=0 + set x $argv + shift + ;; + esac + ;; + *) case $ini in + '') if read lin + then line=$((line+1)) + set x $lin + case $# in + 1) continue ;; + esac + else set x + fi + ;; + *) set x $ini + ini= + ;; + esac + shift + case $init in + 1) case $1 in + iff) init=0 + ;; + print|ref|set) + ;; + *) init=0 + ini=$* + set ini + ;; + esac + esac + ;; + esac + case $# in + 0) case $ifstack in + ?*) echo "$command: $file$line: missing endif" >&$stderr + exit 1 + ;; + esac + set set out + + ;; + esac + + # if nesting + + while : + do case $1 in + "if") ifstack="$ifelse:$ifstack" + case $ifelse in + KEEP|NONE) + ifelse=TEST + ;; + TEST) ;; + *) ifelse=DONE + ;; + esac + shift + case $explicit in + 1) set '' - "$@"; shift ;; + esac + ;; + "elif") case $ifelse in + SKIP) ifelse=TEST + ;; + TEST) ;; + *) ifelse=DONE + ;; + NONE) echo "$command: $file$line: $1: no matching if" >&$stderr + exit 1 + ;; + esac + shift + case $explicit in + 1) set '' - "$@"; shift ;; + esac + ;; + "else") case $ifelse in + KEEP) ifelse=DONE + ;; + SKIP|TEST) + ifelse=KEEP + ;; + NONE) echo "$command: $file$line: $1: no matching if" >&$stderr + exit 1 + ;; + esac + shift + ;; + "endif")case $ifelse in + NONE) echo "$command: $file$line: $1: no matching if" >&$stderr + exit 1 + ;; + esac + ifelse=${ifstack%%:*} + ifstack=${ifstack#*:} + shift + ;; + *) break + ;; + esac + done + + # check if "run xxx" is equivalent to "set in xxx" + + case $1 in + "("*) set exp - "$@" ;; + *.iffe|*.iff) set run "$@" ;; + esac + case $1 in + :) shift + continue + ;; + run) case ${2##*[\\/]} in + *.iffe|*.iff) + set set in $2 ;; + *.*) ;; + *) set set in $2 ;; + esac + ;; + esac + + # { inc set } drop out early + + case $1 in + ""|"#"*)continue + ;; + inc) case $ifelse in + DONE|SKIP) set ''; shift; continue ;; + esac + shift + case $# in + 0) echo "$command: $file$line: path expected" >&$stderr + exit 1 + ;; + esac + p=$1 + shift + if test ! -f $p + then echo "$command: $file$line: $p: file not found" >&$stderr + exit 1 + fi + case $# in + 0) case $config in + 1) e="^HAVE_" ;; + *) e="^_" ;; + esac + ;; + 1) e=$1 + ;; + *) shift + echo "$command: $file$line: warning: $*: operands ignored" >&$stderr + ;; + esac + eval $(sed -e '/^#define[ ]/!d' -e 's/#define[ ]//' -e 's/[ (].*//' ${e:+"-e/$e/!d"} -e 's/.*/&=1/' $p | LC_ALL=C sort -u) + continue + ;; + set) case $ifelse in + DONE|SKIP) set ''; shift; continue ;; + esac + shift + case $1 in + ""|"#"*)op= + ;; + *) arg= + op=$1 + case $op in + --*) op=${op#--} + ;; + -*) case $op in + -??*) arg=${op#-?} + op=${op%$arg} + ;; + esac + case $op in + a) op=all ;; + c) op=cc ;; + C) op=config ;; + d) op=debug ;; + D) op=define ;; + E) op=explicit ;; + F) op=features ;; + i) op=input ;; + I) op=include ;; + L) op=library ;; + n) op=namval ;; + N) op=nooptimize ;; + o) op=output ;; + e) ;; # obsolete + p) ;; # obsolete + P) op=pragma ;; + r) op=regress ;; + s) op=shell ;; + S) op=static ;; + O) op=stdio ;; + u) op=undef ;; + v) op=verbose ;; + x) op=cross ;; + X) op=exclude ;; + esac + ;; + esac + shift + while : + do case $# in + 0) break ;; + esac + case $1 in + *" "*) shift + continue + ;; + ""|"#"*)break + ;; + :) shift + break + ;; + esac + case $arg in + "") arg=$1 ;; + *) arg="$arg $1" ;; + esac + shift + done + ;; + esac + case $op in + all) all=1 + continue + ;; + cc) occ= + for x in $arg + do case $occ in + "") case $x in + *=*) export "$x" + ;; + -O*) case $optimize in + 1) occ=$x ;; + esac + ;; + *) occ=$x + ;; + esac + ;; + *) occ="$occ $x" + ;; + esac + done + exclude occ + continue + ;; + config) config=1 + continue + ;; + cross) case $arg in + ""|-) cross= ;; + *) cross="$arg" libpaths= ;; + esac + continue + ;; + debug) debug=$arg + case $arg in + 0) exec 2>&$nullout + set +v +x + ;; + ""|1) exec 2>&$stderr + set +v +x + ;; + 2|3) exec 2>&$stderr + # Useful shell-dependent PS4 trace prompts from modernish. + # The ${foo#{foo%/*/*}/} substitutions below are to trace just the last two + # elements of path names, instead of the full paths which can be very long. + case ${ZSH_VERSION:+Zsh}${NETBSD_SHELL:+Netsh}${KSH_VERSION:+Ksh}${BASH_VERSION:+Bash} in + Zsh) typeset -F SECONDS + PS4='+ [${SECONDS:+${SECONDS%????}s|}${ZSH_SUBSHELL:+S$ZSH_SUBSHELL,}${funcfiletrace:+${funcfiletrace#${funcfiletrace%/*/*}/},}${funcstack:+${funcstack#${funcstack%/*/*}/},}${LINENO:+L$LINENO,}e$?] ' ;; + Netsh) PS4='+ [${ToD:+$ToD|}${LINENO:+L$LINENO,}e$?] ' ;; + Ksh) case $KSH_VERSION in + 'Version '*) + typeset -F SECONDS + PS4='+ [${SECONDS:+${SECONDS%????}s|}${.sh.pid:+P${.sh.pid},}${.sh.subshell:+S${.sh.subshell},}${.sh.file:+${.sh.file#${.sh.file%/*/*}/},}${.sh.fun:+${.sh.fun},}${LINENO:+L$LINENO,}e$?] ' ;; + @\(*) PS4='+ [${EPOCHREALTIME:+${EPOCHREALTIME#???????}s|}${BASHPID:+P$BASHPID,}${LINENO:+L$LINENO,}e$?] ' ;; + esac ;; + Bash) case ${EPOCHREALTIME:+s} in + s) PS4='+ [${EPOCHREALTIME:+${EPOCHREALTIME#???????}s|}' ;; + '') PS4='+ [${SECONDS:+${SECONDS}s|}' ;; + esac + PS4=$PS4'${BASHPID:+P$BASHPID,}${BASH_SOURCE:+${BASH_SOURCE#${BASH_SOURCE%/*/*}/},}${FUNCNAME:+$FUNCNAME,}${LINENO:+L$LINENO,}e$?] ' ;; + '') case ${SECONDS:+s} in + s) PS4='+ [${SECONDS:+${SECONDS}s|}${LINENO:+L$LINENO,}e$?] ' ;; + '') PS4='+ [${LINENO:+L$LINENO,}e$?] ' ;; + esac ;; + esac + set -x + ;; + *) echo "$command: $arg: debug levels are 0, 1, 2, 3" >&$stderr + ;; + esac + continue + ;; + define) define=1 + continue + ;; + exclude)case $arg in + ""|-) excludes= ;; + *) excludes="$excludes $arg" ;; + esac + exclude includes occ + continue + ;; + explicit) + explicit=1 + continue + ;; + features)case $arg in + '') tst= ;; + *) tst="#include \"$arg\"" ;; + esac + continue + ;; + "in"|input) + case $arg in + "") in=- + ;; + *) in=$arg + if test ! -r $in + then echo "$command: $in: not found" >&$stderr + exit 1 + fi + exec < $in + file=$in: + case $out in + "") case $in in + *[.\\/]*) + out=${in##*[\\/]} + out=${out%.*} + ;; + *) out=$in + ;; + esac + ;; + esac + ;; + esac + continue + ;; + include)case $arg in + ""|-) includes= ;; + *) includes="$includes -I$arg" ;; + esac + exclude includes + continue + ;; + library)for y in $libpaths + do eval $y=\"\$$y:\$arg\$${y}_default\" + eval export $y + done + continue + ;; + namval) define=n + continue + ;; + nodebug)exec 2>&$nullout + set +v +x + continue + ;; + nodefine) + define=0 + continue + ;; + nooptimize) + optimize=0 + case $occ in + *" -O"*)occ=$(echo $occ | sed 's/ -O[^ ]*//g') + cc=$occ + ;; + esac + ;; + optimize) + optimize=1 + ;; + out|output) + out=$arg + defhdr= + usr= + deflib= + one= + puthdr= + putlib= + case $op in + output) continue ;; + esac + def= + test= + ;; + package)# obsolete + continue + ;; + prototyped|noprototyped) + # obsolete + continue + ;; + pragma) pragma="$pragma $arg" + continue + ;; + regress)regress=1 + version=1995-03-19 + continue + ;; + shell) shell=$arg + continue + ;; + static) static=$arg + continue + ;; + stdio) case $arg in + '') ext= + ;; + *) ext= + sep= + for i in $arg + do case $i in + -) case $ext in + '') continue ;; + *) break ;; + esac + ;; + esac + echo "#include \"$i\"" > t.c + if $cc -E t.c > /dev/null 2>&1 + then ext="$ext$sep#include \"$arg\"" + sep=$nl + fi + done + ;; + esac + continue + ;; + undef) undef=1 + continue + ;; + verbose)verbose=1 + continue + ;; + *) echo "$command: $op: unknown option" >&$stderr + exit 1 + ;; + esac + ;; + api|define|extern|header|include|print|reference|ver) + op=$1 + shift + arg= + ;; + *) case $2 in + '=') def=$1 + shift + shift + ;; + *) case $1 in + '-'|'?')def=- + shift + ;; + *) def= + ;; + esac + ;; + esac + case $1 in + '!') not=1 + shift + ;; + *) not= + ;; + esac + case $1 in + *'{') op=- + ;; + '('*|'"'*'"'|'<'*'>') + op=exp + case $def in + '') def=- ;; + esac + ;; + *) op=$1 + shift + ;; + esac + arg= + cc="$occ $includes" + group= + groups= + fail= + hdr= + lib= + mac= + no= + note= + opt= + pass= + pth= + run= + set= + src= + test= + yes= + case $# in + 0) ;; + *) case $1 in + "#"*) set x + shift + ;; + *) case $op in + ref) ;; + *) case $1 in + '-') case $op:$2 in + tst:*) arg=$1 + case $2 in + -) shift ;; + esac + ;; + *:-*) arg=$1 + shift + ;; + *) def=- + shift + case $1 in + '('*|*'{'|'"'*'"'|'<'*'>') + arg=- + ;; + *) arg=$1 + case $# in + 0) ;; + *) shift ;; + esac + ;; + esac + ;; + esac + ;; + -*|+*|'('*|*'{'|'"'*'"'|'<'*'>') + arg=- + ;; + *) arg=$1 + shift + ;; + esac + ;; + esac + ;; + esac + case $1 in + '('*|'"'*'"'|'<'*'>') + while : + do case $# in + 0) break ;; + esac + case $1 in + *[.{}]*)break ;; + esac + case $test in + '') test=$1 ;; + *) test="$test $1" ;; + esac + shift + done + case $arg in + '') arg=- ;; + esac + case $op in + exp) case $def in + ''|'-') ;; + *) arg=$def ;; + esac + ;; + esac + ;; + esac + sline=$line + while : + do case $# in + 0) break ;; + esac + case $1 in + "") ;; + "#"*) set x + ;; + "=") shift + set=$* + case $set in + "") set=" " ;; + esac + while : + do case $# in + 0) break ;; + esac + shift + done + break + ;; + [abcdefghijklmnopqrstuvwxyz]*'{'|'{') + v=$1 + shift + x= + case $v in + "note{") + sep=" " ;; + *) sep=$nl ;; + esac + case $v in + '{') e='}' ;; + *) e='}end' ;; + esac + n=1 + SEP= + while : + do case $# in + 0) case $in in + "") echo "$command: $file$line: missing }end" >&$stderr + exit 1 + ;; + esac + while : + do IFS= read -r lin + eof=$? + while : + do lin="${lin#[' ']}" + case $lin in + [' ']*'#'*);; + *) break ;; + esac + done + case $eof in + 0) line=$((line+1)) + set x $lin + case $2 in + $v) n=$((n+1)) + ;; + $e|$e';') + case $n in + 1) shift + break 2 + ;; + esac + n=$((n-1)) + ;; + esac + x="$x$SEP$lin" + SEP=$sep + ;; + *) echo "$command: $file$line: missing $e" >&$stderr + exit 1 + ;; + esac + done + ;; + esac + case $1 in + $v) n=$((n+1)) + ;; + $e|$e';') + case $n in + 1) break ;; + esac + n=$((n-1)) + ;; + esac + x="$x$SEP$1" + SEP=$sep + shift + done + case $v in + 'note{');; + *) x="$x$nl" # \r\n bash needs this barf # ;; + esac + case $v in + 'fail{') fail=$x ;; + 'nofail{') pass=$x v='pass{' ;; + 'nopass{') fail=$x v='fail{' ;; + 'no{') no=$x ;; + 'note{') note=$x ;; + 'pass{') pass=$x ;; + 'test{') test=$x ;; + 'yes{'|'{') yes=$x ;; + *) src=$x run=$v ;; + esac + ;; + :) shift + break + ;; + *[\"\'\(\)\{\}\ \ ]*) + case $op in + pth) pth="$pth $1" + ;; + *) case $test in + '') test=$1 ;; + *) test="$test $1" ;; + esac + ;; + esac + ;; + -) group=$group$1 + case $group in + -) com_hdr=$hdr + com_lib=$lib + com_mac=$mac + com_opt=$opt + com_pth=$pth + com_test=$test + ;; + *) groups="$groups $1" + ;; + esac + ;; + -l*) case $group in + --*) groups="$groups $1" ;; + *) lib="$lib $1" ;; + esac + ;; + +l*) x=-${1#+} + case $group in + --*) groups="$groups $x" ;; + *) lib="$lib $x" ;; + esac + ;; + -*|+*) case $op in + ref) cc="$cc $1" + occ="$occ $1" + case $1 in + -L*) x=${1#-L} + for y in $libpaths + do eval $y=\"\$$y:\$x\$${y}_default\" + eval export $y + done + ;; + esac + ;; + *) case $group in + --*) groups="$groups $1" + ;; + *) case $op in + run) opt="$opt $1" + ;; + *) case $1 in + -D*) mac="$mac $1" ;; + *) cc="$cc $1" ;; + esac + ;; + esac + ;; + esac + ;; + esac + ;; + *.[aAxX]|*.[dD][lL][lL]|*.[lL][iI][bB]) + case $group in + --*) groups="$groups $1" ;; + *) lib="$lib $1" ;; + esac + ;; + *[.\\/]*) + case $group in + --*) groups="$groups $1" + ;; + *) case $op in + pth) pth="$pth $1" ;; + *) hdr="$hdr $1" ;; + esac + ;; + esac + ;; + *) case $group in + --*) groups="$groups $1" + ;; + *) case $op in + pth) pth="$pth $1" + ;; + *) case $test in + '') test=$1 ;; + *) test="$test $1" ;; + esac + ;; + esac + ;; + esac + ;; + esac + shift + done + case $group in + -) group= ;; + esac + ;; + esac + ;; + esac + case $ifelse in + DONE|SKIP) continue ;; + esac + + # make sure $cc compiles C + + case $cc in + "") cc="$occ $includes" ;; + esac + case $cctest in + "") checkcc ;; + esac + + # some ops allow no args + + case $arg in + '') case $op in + api) arg=- + case $1:$2 in + [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]*:[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]) + a=$1 + shift + case " $apis " in + *" $a "*) + ;; + *) apis="$apis $a" + eval api_sym_${a}= api_ver_${a}= + ;; + esac + rel= + while : + do case $# in + 0) break ;; + esac + case $1 in + [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]) + rel="$rel $1" + ;; + *) break + ;; + esac + shift + done + while : + do case $# in + 0) break ;; + esac + case $1 in + :) break ;; + esac + eval syms='$'api_sym_${a} + case $syms in + '') sep='' ;; + *) sep=$nl ;; + esac + for r in $rel + do syms=$syms$sep${1}:${r} + sep=$nl + done + eval api_sym_${a}='$'syms + shift + done + ;; + *) echo "$command: $op: expected: name YYYYMMDD symbol ..." >&$stderr + ;; + esac + while : + do case $# in + 0) break ;; + esac + case $1 in + :) break ;; + esac + shift + done + ;; + iff|ini)arg=- + ;; + comment)copy - "/* $* */" + continue + ;; + define) x=$1 + shift + case $1 in + '('*')') + arg=$1 + shift + ;; + esac + case $in in + "") v= + while : + do case $# in + 0) break ;; + esac + t=$1 + shift + case $t in + ":") break ;; + esac + v="$v $t" + done + ;; + *) v=$* + ;; + esac + is mac $x + copy $tmp.c "$std +$usr +#ifndef $x +( +#endif +int x; +" + if compile $cc -c $tmp.c <&$nullin >&$nullout + then success - + else failure - + copy - "#define $x$arg $v" + usr="$usr${nl}#define $x$arg $v" + fi + continue + ;; + extern) x=$1 + shift + t=$1 + shift + is npt $x + copy $tmp.c " +$std +#include +$usr +struct _iffe_struct { int _iffe_member; }; +extern struct _iffe_struct* $x (struct _iffe_struct*); +" + # some compilers with -O only warn for invalid intrinsic prototypes + case " $cc " in + *" -O "*) xx=$(echo $cc | sed 's/ -O / /g') ;; + *) xx=$cc ;; + esac + if compile $xx -c $tmp.c <&$nullin >&$nullout + then success - + while : + do case $1 in + ''|'('*|'['*) + break + ;; + esac + t="$t $1" + shift + done + case $in in + "") v= + while : + do case $# in + 0) break ;; + esac + t=$1 + shift + case $t in + ":") break ;; + esac + v="$v $t" + done + ;; + *) v=$* + ;; + esac + copy - "extern $t $x$v;" + usr="$usr${nl}extern $t $x$v;" + else failure - + case $in in + "") while : + do case $# in + 0) break ;; + esac + case $1 in + ":") break ;; + esac + done + ;; + esac + fi + continue + ;; + header|include|reference) + while : + do case $# in + 0) break ;; + esac + x=$1 + shift + case $x in + ":") break ;; + esac + case " $gothdr " in + *" - $x "*) + ;; + *" + $x "*) + case $usr in + *"# include <"$x">"*) + ;; + *) case $op in + reference) + ;; + *) copy - "#include <$x>" + ;; + esac + usr="$usr${nl}#include <$x>" + ;; + esac + ;; + *) copy $tmp.c "$std +$usr +#include <$x> +int x; +" + if is_hdr - $x + then gothdr="$gothdr + $x" + case $op in + reference) + ;; + *) copy - "#include <$x>" + ;; + esac + usr="$usr${nl}#include <$x>" + else gothdr="$gothdr - $x" + fi + ;; + esac + done + continue + ;; + print) case $in in + "") v= + while : + do case $# in + 0) break ;; + esac + t=$1 + shift + case $t in + ":") break ;; + esac + v="$v $t" + done + ;; + *) v=$* + ;; + esac + copy - "$*" + usr="$usr${nl}$v" + continue + ;; + ver) arg=- + case $1:$2 in + [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]*:[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]) + vers="$vers$nl$1" + eval ver_$1=$2 + ;; + *) echo "$command: $op: expected: name YYYYMMDD" >&$stderr + ;; + esac + while : + do case $# in + 0) break ;; + esac + case $1 in + :) break ;; + esac + shift + done + ;; + esac + ;; + esac + + # NOTE() support + + case $ext in + *""*) + case $ext in + *"#define NOTE("*) + ;; + *) ext="$ext +#define NOTE(s) do{write(9,\" \",1);write(9,s,strlen(s));write(9,\" ...\",4);}while(0)" + ;; + esac + ;; + esac + + # save $* for ancient shells + + argx=1 + argv=$* + + # loop on all candidate groups + + while : + do + # check the candidate macros + + cc="$cc $mac" + + # check for global default headers (some cc -E insist on compiling) + + case $hdrtest in + '') hdrtest=1 + allinc= + for x in types + do case $config in + 0) c=_sys_${x} + ;; + 1) case $shell in + ksh) typeset -u u=$x ;; + *) u=$(echo $x | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ) ;; + esac + c=HAVE_SYS_${u}_H + ;; + esac + x=sys/$x.h + echo "${allinc}#include <$x>" > $tmp.c + if is_hdr $x + then gothdr="$gothdr + $x" + case $explicit in + 0) can="$can$cansep#define $c 1 /* #include <$x> ok */" + nan="$nan$cansep$c=1" + cansep=$nl + ;; + esac + eval $c=1 + allinc="${allinc}#include <$x>$nl" + else gothdr="$gothdr - $x" + case $explicit$all$config$undef in + 0?1?|0??1) + can="$can$cansep#undef $c /* #include <$x> not ok */" + nan="$nan$cansep$c=" + cansep=$nl + ;; + 01??) can="$can$cansep#define $c 0 /* #include <$x> not ok */" + nan="$nan$cansep$c=0" + cansep=$nl + ;; + esac + fi + done + ;; + esac + + # add implicit headers/libraries before the checks + + case $op in + npt) hdr="sys/types.h stdlib.h unistd.h $hdr" + ;; + siz|typ)hdr="sys/types.h time.h sys/time.h sys/times.h stddef.h stdlib.h $hdr" + ;; + esac + + # check the candidate headers + + case $hdr in + ?*) z=$hdr + hdr= + dis=0 + for x in $z + do case $x in + *.h) case " $gothdr " in + *" - $x "*) + continue + ;; + *" + $x "*) + ;; + *) c=${x##*[\\/]} + c=${c%%.*} + case $x in + */*) c=${x%%[\\/]*}_${c} ;; + esac + case $explicit in + 0) dis=0 + ;; + *) case $x in + */*) dis=$c ;; + *) dis=hdr ;; + esac + case ${dis}_ in + ${op}_*)dis=0 ;; + *) dis=1 ;; + esac + ;; + esac + case $config in + 0) case $x in + */*) c=_${c} ;; + *) c=_hdr_${c} ;; + esac + ;; + 1) case $shell in + ksh) typeset -u u=$c ;; + *) u=$(echo $c | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ) ;; + esac + c=HAVE_${u}_H + ;; + esac + echo "${allinc}#include <$x>" > $tmp.c + if is_hdr $x + then gothdr="$gothdr + $x" + case $dis in + 0) can="$can$cansep#define $c 1 /* #include <$x> ok */" + nan="$nan$cansep$c=1" + cansep=$nl + ;; + esac + eval $c=1 + else gothdr="$gothdr - $x" + case $dis$all$config$undef in + 0?1?|0??1) + can="$can$cansep#undef $c /* #include <$x> not ok */" + nan="$nan$cansep$c=" + cansep=$nl + ;; + 01??) can="$can$cansep#define $c 0 /* #include <$x> not ok */" + nan="$nan$cansep$c=0" + cansep=$nl + ;; + esac + continue + fi + ;; + esac + ;; + *) test -r $x || continue + ;; + esac + hdr="$hdr $x" + done + ;; + esac + + # check the candidate libraries + + case $lib in + ?*) z= + for p in $lib + do z="$p $z" + done + lib= + p= + hit=0 + echo "int main(){return(0);}" > $tmp.c + for x in $z + do p=$x + case " $gotlib " in + *"- $p "*) + failure + + p= + ;; + *"+ $p "*) + success + + lib="$p $lib" + ;; + *) rm -f $tmp.exe + is LIB $p + if compile $cc -o $tmp.exe $tmp.c $p $lib <&$nullin >&$nullout + then success + gotlib="$gotlib + $p" + lib="$p $lib" + e=0 + else a= + e=1 + for l in $z + do case $l in + -) a= + continue + ;; + $p) a=$p + continue + ;; + *) case $gotlib in + *" $l "*) continue ;; + esac + ;; + esac + case $a in + $p) a="$a $l" + if compile $cc -o $tmp.exe $tmp.c $a <&$nullin >&$nullout + then success + gotlib="$gotlib + $p" + lib="$p $lib" + e=0 + break + fi + ;; + esac + done + case $e in + 1) failure + gotlib="$gotlib - $p" + ;; + esac + fi + y= + for x in $p + do c=${x#-l} + case $c in + *[!abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*) + c=$(echo '' $c | sed -e 's,.*[\\/],,' -e 's,\.[^.]*$,,' -e 's,[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_],_,g' -e '/^lib./s,^lib,,') + ;; + esac + case $config in + 0) case $e$p in + 0*' '*) case " $gotlib " in + *[-+]" $x "*) + ;; + *) can="$can$cansep#define _LIB_$c 1 /* $x is a library */" + nan="$nan${cansep}_LIB_$c=1" + cansep=$nl + eval _LIB_$c=1 + ;; + esac + ;; + esac + ;; + 1) case $shell in + ksh) typeset -u u=$c ;; + *) u=$(echo $c | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ) ;; + esac + c=$u + case $e in + 0*' '*) case " $gotlib " in + *[-+]" $x "*) + ;; + *) can="$can$cansep#define HAVE_${c}_LIB 1 /* $x is a library */" + nan="$nan${cansep}HAVE_${c}_LIB=1" + cansep=$nl + eval HAVE_${c}_LIB=1 + ;; + esac + ;; + esac + ;; + esac + y=${y}_$c + done + case $config in + 0) c=_LIB${y} ;; + 1) c=HAVE${y}_LIB ;; + esac + case $p in + *' '*) q="a library group" ;; + *) q="a library" ;; + esac + case $e in + 0) can="$can$cansep#define $c 1 /* $p is $q */" + nan="$nan$cansep$c=1" + cansep=$nl + eval $c=1 + case $hit in + 1) break ;; + esac + ;; + 1) case $all$config$undef in + ?1?|??1)can="$can$cansep#undef $c /* $p is not $q */" + nan="$nan$cansep$c=" + cansep=$nl + ;; + 1??) can="$can$cansep#define $c 0 /* $p is not $q */" + nan="$nan$cansep$c=0" + cansep=$nl + ;; + esac + eval $c=0 + ;; + esac + p= + ;; + esac + done + ;; + esac + + # last op precheck + + case $op in + ref) deflib="$deflib $lib" + defhdr="$defhdr $hdr" + break + ;; + esac + IFS=" ," + eval op=\"$op\" + eval arg=\"$arg\" + IFS=$ifs + + # check for op aliases + + x= + for o in $op + do case $o in + def|default) x="$x cmd dat hdr key lib mth sys typ" ;; + *) x="$x $o" ;; + esac + done + + # loop on the ops o and args a + + result=UNKNOWN + for o in $x + do for a in $arg + do c= + case $a in + *[.\\/]*) + case $o in + hdr|lcl|nxt|pth|sys) + x=$a + case $x in + *.lcl|*.nxt) + case $o in + sys) x=sys/$x ;; + esac + o=${x##*.} + x=${x%.${o}} + v=$x + ;; + esac + case $x in + *[\\/]*) + p=${x%/*} + v=${x##*/} + ;; + *.*) p=${x%.*} + v=${x##*.} + ;; + *) p= + ;; + esac + case $o in + lcl|nxt) c=$v.$o ;; + *) c=$v ;; + esac + ;; + *) p=${a%.*} + p=${p##*[\\/]} + v=${a##*.} + v=${v##*[\\/]} + ;; + esac + case $p in + '') f=${v} ;; + *) f=${p}/${v} ;; + esac + case $o in + run) v=$p + p= + m=_${v} + ;; + mem) case $p in + *.*) m=${p#*.} + p=${p%%.*} + v=${m}.${v} + esac + case $config in + 0) m=_${v}_${p} ;; + 1) m=_${v}_in_${p} ;; + esac + ;; + *) case $p in + '') m=_${v} ;; + *) m=_${p}_${v} ;; + esac + ;; + esac + ;; + *) p= + v=$a + f=$a + m=_${v} + ;; + esac + case $c in + '') c=$v ;; + esac + M=$m + case $o in + out) case $a in + -) a=- + ;; + ?*) test="$a $test" + a= + ;; + esac + ;; + *) case " $idyes " in + *" $m "*) + i=1 + ;; + *) case " $idno " in + *" $m "*) + i=0 + ;; + *) case $m in + *'*') m=$(echo "$m" | sed 's,\*,_ptr,g') ;; + esac + case $m in + *[-+/\\]*) + i=0 + ;; + *[!abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*) + is id $m + copy $tmp.c "int $m = 0;" + if compile $cc -c $tmp.c + then success - + idyes="$idyes $m" + i=1 + else failure - + idno="$idno $m" + i=0 + fi + ;; + *) i=1 + ;; + esac + ;; + esac + case $i in + 0) case $o in + dat|dfn|key|lib|mac|mth|nos|npt|siz|sym|typ|val) + continue + ;; + esac + ;; + esac + ;; + esac + ;; + esac + case $m in + *[!abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*) + m=$(echo "X$m" | sed -e 's,^.,,' -e 's,[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_],_,g') + ;; + esac + + # check output redirection + + case $out in + $cur) ;; + *) case $cur in + $a|$c) ;; + *) case $cur in + .) ;; + *) case $vers in + ?*) echo + for api in $vers + do API=$(echo $api | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ) + eval ver='${'ver_${api}'}' + echo "#define ${API}_VERSION ${ver}" + done + esac + case $apis in + ?*) for api in $apis + do API=$(echo $api | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ) + echo "#define ${API}API(rel) ( _BLD_${api} || !_API_${api} || _API_${api} >= rel )" + map= + sep= + eval syms='"${'api_sym_${api}'}"' + # old Solaris requires -k # + set x x $(echo "$syms" | sort -t: -u -k 1,1 -k 2,2nr 2>/dev/null | sed 's/:/ /') + case $# in + 2) # ancient sort doesn't have -k # + set x x $(echo "$syms" | sort -t: -u +0 -1 +1 -2nr 2>/dev/null | sed 's/:/ /') + ;; + esac + sym= + while : + do shift 2 + case $# in + [01]) break ;; + esac + prv=$sym + sym=$1 + rel=$2 + case $prv in + $sym) echo "#elif _API_${api} >= $rel" + ;; + *) case $prv in + '') echo + echo "#if !defined(_API_${api}) && defined(_API_DEFAULT)" + echo "#define _API_${api} _API_DEFAULT" + echo "#endif" + ;; + *) echo "#endif" + ;; + esac + echo + echo "#if ${API}API($rel)" + ;; + esac + echo "#undef ${sym}" + echo "#define ${sym} ${sym}_${rel}" + map=$map$sep${sym}_${rel} + sep=' ' + done + echo "#endif" + echo + echo "#define _API_${api}_MAP \"$map\"" + done + echo + ;; + esac + case $iff in + ?*) echo "#endif" ;; + esac + case $cur in + -) ;; + *) exec >/dev/null + case $cur in + *[\\/]*|*.h) x=$cur ;; + *) x=$dir/$cur ;; + esac + case $define in + n) sed '/^#/d' $tmp.h > $tmp.c + sed '/^#/d' $x > $tmp.t + ;; + *) sed 's,/\*[^/]*\*/, ,g' $tmp.h > $tmp.c + sed 's,/\*[^/]*\*/, ,g' $x > $tmp.t + ;; + esac + if cmp -s $tmp.c $tmp.t + then rm -f $tmp.h + case $verbose in + 1) echo "$command: $x: unchanged" >&$stderr ;; + esac + touch "$x" # avoid rerunning test on subsequent runs + else case $x in + ${dir}[\\/]$cur) test -d $dir || mkdir $dir || exit 1 ;; + esac + mv $tmp.h $x + fi + ;; + esac + ;; + esac + case $out in + +) case $status in + 1) ;; + *) status=0 ;; + esac + exit $status + ;; + -) eval "exec >&$stdout" + ;; + *) exec >$tmp.h + ;; + esac + case $out in + "") case $a in + *[\\/]*|???????????????*) cur=$c ;; + *) cur=$a ;; + esac + ;; + *) cur=$out + ;; + esac + case $in in + ""|-|+) case $o in + run) x=" from $a" ;; + *) x= ;; + esac + ;; + *) x=" from $in" + ;; + esac + + # output header comments + + case $define in + n) ;; + ?) echo "/* : : generated$x by $command version $version : : */" + for x in $pragma + do echo "#pragma $x" + done + case $out in + ""|-|+) x=$m + ;; + *.*) i=$out + x=_ + while : + do case $i in + *.*) x=$x${i%%.*}_ + i=${i#*.} + ;; + *) x=$x$i + break + ;; + esac + done + ;; + *) x=_$out + ;; + esac + case $o in + iff) case $M in + ""|*-*) ;; + *) iff=${m}_H ;; + esac + ;; + *) case $regress in + '') case $x in + *-*) ;; + *) x=$(pwd | sed -e 's,.*[\\/],,' -e 's,\..*,,' -e 's,^lib,,' -e 's,^,'${x}_',' -e 's,[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_],_,g') + # ksh n+ bug workaround + case $x in + *[!_]*) ;; + *) x=_$$ ;; + esac + iff=_def${x} + ;; + esac + ;; + *) case $x in + *-*) ;; + *) iff=_REGRESS + ;; + esac + ;; + esac + ;; + esac + case $iff in + ?*) echo "#ifndef $iff" + echo "#define $iff 1" + ;; + esac + ;; + esac + ;; + esac + ;; + esac + case $can in + ?*) case $define in + 1) echo "$can" ;; + n) echo "$nan" ;; + esac + can= + nan= + cansep= + ;; + esac + + # set up the candidate include list + + pre= + inc= + for x in $defhdr - $hdr + do case $x in + -) case $pre in + ?*) continue ;; + esac + case $v in + *.*) for x in $(echo $v | sed 's,\., ,g') + do pre="$pre$nl#undef $x" + done + ;; + *) case $o in + siz|typ)case $v in + char|short|int|long) + ;; + *) pre="#undef $v" + ;; + esac + ;; + *) pre="#undef $v" + ;; + esac + ;; + esac + ;; + *.h) c=${x##*[\\/]} + c=${c%%.*} + case $x in + */*) c=${x%%[\\/]*}_${c} ;; + esac + case $config in + 0) case $x in + */*) c=_${c} ;; + *) c=_hdr_${c} ;; + esac + ;; + 1) case $shell in + ksh) typeset -u u=$c ;; + *) u=$(echo "$c" | LC_ALL=C tr a-z A-Z) ;; + esac + c=HAVE_${u}_H + ;; + esac + case " $puthdr " in + *" $c "*) + ;; + *) puthdr="$puthdr $c" + usr="$usr$nl#define $c 1" + ;; + esac + inc="$inc$nl#include <$x>" + ;; + esac + done + + # set up the candidate lib list + + for x in $lib $deflib + do c=${x#-l} + case $c in + *[!abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*) + c=$(echo '' $c | sed -e 's,.*[\\/],,' -e 's,\.[^.]*$,,' -e 's,[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_],_,g' -e '/^lib./s,^lib,,') + ;; + esac + case $config in + 0) c=_LIB_${c} + ;; + 1) case $shell in + ksh) typeset -u u=$c ;; + *) u=$(echo $c | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ) ;; + esac + c=HAVE_${u}_LIB + ;; + esac + case " $putlib " in + *" $c "*) + ;; + *) putlib="$putlib $c" + usr="$usr$nl#define $c 1" + ;; + esac + done + + # src overrides builtin test + + case $config:$def in + 0:) case $o in + tst|var);; + *) m=_${o}${m} ;; + esac + ;; + 1:) case $o in + tst|var)m=${v} ;; + esac + case $shell in + ksh) typeset -u u=$m ;; + *) u=$(echo $m | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ) ;; + esac + case $o in + tst|var)case $m in + $u) ;; + *) case $m in + hdr_*|lib_*|sys_*) + u=${u#????} + ;; + esac + m=HAVE_${u} + ;; + esac + ;; + dat) m=HAVE${u}_DATA ;; + hdr|lcl)m=HAVE${u}_H ;; + key) m=HAVE${u}_RESERVED ;; + mth) m=HAVE${u}_MATH ;; + npt) m=HAVE${u}_DECL ;; + pth) m=${u}_PATH + m=${m#_} + ;; + nxt) m=HAVE${u}_NEXT ;; + siz) m=SIZEOF${u} ;; + sys) m=HAVE_SYS${u}_H ;; + *) m=HAVE${u} ;; + esac + ;; + *) m=$def + M=$m + ;; + esac + case $src in + ?*) case $src in + *[\<\"][Ss][Tt][Dd][Ii][Oo].[Hh][\"\>]* | *\* | *\* | */[*]\[*]/*) + EXT= + ;; + *) EXT="$tst +$ext" + ;; + esac + copy $tmp.c "$std +$EXT +$usr +$inc +$src +" + V=1 + e=0 + is tst "${note:-$run}" + case $run in + cat*|nocat*) + copy - "$src" + ;; + cross*|nocross*) + copy $tmp.sh "$src" + chmod +x $tmp.sh + execute $tmp.sh <&$nullin || e=1 + ;; + run*|norun*) + (eval "$src") <&$nullin || e=1 + ;; + mac*|nomac*) + if compile $cc -E -P $tmp.c <&$nullin >$tmp.i + then sed -e '/<<[ ]*".*"[ ]*>>/!d' -e 's/<<[ ]*"//g' -e 's/"[ ]*>>//g' $tmp.i + else e=1 + fi + ;; + p*|nop*)compile $cc -DTEST=$p -DID=$v -E $tmp.c <&$nullin >&$nullout || e=1 + ;; + c*|noc*)compile $cc -DTEST=$p -DID=$v -c $tmp.c <&$nullin >&$nullout || e=1 + ;; + *) case $run in + status*)ccflags= + ;; + s*|nos*)case $reallystatictest in + '') #UNDENT... + + reallystatictest=. + echo "$tst$nl$ext${nl}int main(){printf("hello");return(0);}" > ${tmp}s.c + rm -f ${tmp}s.exe + if compile $cc -c ${tmp}s.c <&$nullin >&$nullout && + compile $cc -o ${tmp}s.exe ${tmp}s.o <&$nullin >&$nullout 2>${tmp}s.e && + $executable ${tmp}s.exe + then e=$(wc -l ${tmp}s.e) + eval set x x $binding + while : + do shift + shift + case $# in + 0) break ;; + esac + rm -f ${tmp}s.exe + compile $cc -o ${tmp}s.exe $1 ${tmp}s.o <&$nullin >&$nullout 2>${tmp}s.e && $executable ${tmp}s.exe || continue + case $(wc -l ${tmp}s.e) in + $e) ;; + *) continue ;; + esac + d=$(ls -s ${tmp}s.exe) + rm -f ${tmp}s.exe + compile $cc -o ${tmp}s.exe $2 ${tmp}s.o <&$nullin >&$nullout 2>${tmp}s.e && $executable ${tmp}s.exe || continue + case $(wc -l ${tmp}s.e) in + $e) ;; + *) continue ;; + esac + case $(ls -s ${tmp}s.exe) in + $d) ;; + *) reallystatic=$2 + set x + shift + break + ;; + esac + done + fi + (set +o noglob; exec rm -f ${tmp}s.*) + #...INDENT + ;; + esac + ccflags=$reallystatic + ;; + *) ccflags= + ;; + esac + set x $mac + e=1 + while : + do o= + shift + while : + do case $# in + 0) break ;; + esac + case $1 in + -) break ;; + esac + o="$o $1" + shift + done + rm -f $tmp.exe + if compile $cc $ccflags $o -DTEST=$p -DID=$v -o $tmp.exe $tmp.c $lib $deflib <&$nullin >&$nullout && $executable $tmp.exe + then case $run in + + status*)execute $tmp.exe <&$nullin >&$nullout + V=$? + case $V in + 0) e=1 ;; + *) e=0 ;; + esac + break + ;; + no[ls]*);; + [ls]*) e=0 && break ;; + noo*) execute $tmp.exe <&$nullin >$tmp.out || break ;; + o*) execute $tmp.exe <&$nullin >$tmp.out && e=0 && break ;; + no*) execute $tmp.exe <&$nullin >&$nullout || break ;; + *) execute $tmp.exe <&$nullin >&$nullout && e=0 && break ;; + + esac + else case $run in + no[els]*)e=1 && break ;; + esac + fi + case $# in + 0) case $run in + no*) e=0 ;; + esac + break + ;; + esac + done + ;; + esac + o=1 + case $run in + no*) case $e in + 0) e=1 ;; + *) e=0 ;; + esac + ;; + esac + case $run in + o*|noo*)case $e in + 0) cat $tmp.out ;; + esac + rm -f $tmp.out + ;; + esac + report $e $V "${note:-$run\ passed}" "${note:-$run} failed" + continue + ;; + esac + + # initialize common builtin state + + case $o in + dat|lib|mth|run) + case $statictest in + "") statictest=FoobaR + copy $tmp.c " +$tst +$ext +$std +$usr +extern int $statictest; +int main(){char* i = (char*)&$statictest; return ((unsigned int)i)^0xaaaa;} +" + rm -f $tmp.exe + if compile $cc -o $tmp.exe $tmp.c <&$nullin >&$nullout && $executable $tmp.exe + then case $static in + .) static= + copy $tmp.c " +$tst +$ext +int main(){printf("hello");return(0);} +" + rm -f $tmp.exe + if compile $cc -c $tmp.c <&$nullin >&$nullout && + compile $cc -o $tmp.exe $tmp.o <&$nullin >&$nullout && + $executable $tmp.exe + then e=$(wc -l $tmp.e) + eval set x x $binding + while : + do shift + shift + case $# in + 0) break ;; + esac + rm -f $tmp.exe + compile $cc -o $tmp.exe $1 $tmp.o <&$nullin >&$nullout && $executable $tmp.exe || continue + case $(wc -l $tmp.e) in + $e) ;; + *) continue ;; + esac + d=$(ls -s $tmp.exe) + rm -f $tmp.exe + compile $cc -o $tmp.exe $2 $tmp.o <&$nullin >&$nullout && $executable $tmp.exe || continue + case $(wc -l $tmp.e) in + $e) ;; + *) continue ;; + esac + case $(ls -s $tmp.exe) in + $d) ;; + *) static=$2 + set x + shift + break + ;; + esac + done + fi + ;; + esac + else static= + fi + ;; + esac + ;; + esac + + # builtin tests + + case $o in + api) ;; + cmd) case $p in + ?*) continue ;; + esac + is $o $a + k=1 + pkg $pth # set system default path + for d in $pth + do if test -f "$d/$a" + then s=$(echo "$d" | LC_ALL=C sed 's,[^0-9A-Za-z],_,g') + case $k in + 1) k=0 + case $M in + *-*) ;; + *) usr="$usr$nl#define $m 1" + case $define in + 1) echo "#define $m 1 /* $a in $pth */" ;; + n) echo "$m=1" ;; + esac + ;; + esac + ;; + esac + c=${s}_${v} + usr="$usr$nl#define $c 1" + case $define in + 1) echo "#define $c 1 /* $d/$a found */" ;; + n) echo "$c=1" ;; + esac + fi + done + case $k in + 0) success ;; + 1) failure ;; + esac + ;; + dat) case $p in + ?*) continue ;; + esac + { + copy - " +$tst +$ext +$std +$usr +$pre +" + case $inc in + ?*) echo "$inc" + ;; + *) echo "extern int $v;" + ;; + esac + echo " +#ifdef _DLL +#define _REF_ +#else +#define _REF_ & +#endif +int main(){char* i = (char*) _REF_ $v; return ((unsigned int)i)^0xaaaa;}" + } > $tmp.c + is $o $v + rm -f $tmp.exe + compile $cc -c $tmp.c <&$nullin >&$nullout && + compile $cc $static -o $tmp.exe $tmp.o $lib $deflib <&$nullin >&$nullout && + $executable $tmp.exe + report $? 1 "$v in default lib(s)" "$v not in default lib(s)" + ;; + dfn) case $p in + ?*) continue ;; + esac + is dfn $v + echo "$pre +$tst +$ext +$inc +#ifdef $v +<<\"#ifndef $v\">> +<<\"#define $v\">> $v <<\"/* native $v */\">> +<<\"#endif\">> +#endif" > $tmp.c + if compile $cc -E -P $tmp.c <&$nullin >$tmp.i + then sed -e '/<<[ ]*".*"[ ]*>>/!d' -e 's/<<[ ]*"//g' -e 's/"[ ]*>>//g' $tmp.i > $tmp.t + if test -s $tmp.t + then success + cat $tmp.t + else failure + fi + else failure + fi + ;; + exp) case $test in + '') echo "$command: $file$sline: test expression expected for $o" >&$stderr + exit 1 + ;; + esac + case $a in + -|'') ;; + *) eval x='$'$a + case $x in + 1) result=FAILURE + continue + ;; + esac + ;; + esac + case $test in + [01]|'"'*'"'|'<'*'>') + case $a in + -|'') ;; + *) case $define$note in + 1) echo "#define $a $test" ;; + 1*) echo "#define $a $test /* $note */" ;; + n) echo "$a=$test" ;; + esac + eval $a='$test' + ;; + esac + ;; + *) case $note in + '') note=$test ;; + esac + case $test in + '') c=1 + ;; + *) is exp "$note" + x= + for i in $(echo '' $test | sed 's,[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_], & ,g') + do case $i in + [\ \ ]) + ;; + [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_]*) + eval i='${'$i'}' + case $i in + '') i=0 + ;; + '"'*'"');; + *[!-+0123456789]*) + case $i in + *'"'*) i=1 ;; + *) i='"'$i'"' ;; + esac + ;; + esac + x="$x $i" + ;; + '!') x="$x 0 =" + ;; + '&'|'|')case $x in + *"$i") ;; + *) x="$x \\$i" ;; + esac + ;; + *) x="$x \\$i" + ;; + esac + done + c=$(eval expr $x 2>&$stderr) + ;; + esac + case $c in + 0) c=1 ;; + *) c=0 ;; + esac + M=$a + m=$a + report $c 1 "$note is true" "$note is false" + ;; + esac + ;; + hdr|lcl|nxt|sys) + case $o in + lcl|nxt)case $M in + *-*) continue ;; + esac + eval x='$'_$m + case $x in + ?*) continue ;; + esac + eval _$m=1 + is $o $f + echo "$pre +$tst +$ext +$inc +#include <$f.h>" > $tmp.c + case $f in + sys/*) e= ;; + *) e='-e /[\\\\\/]sys[\\\\\/]'$f'\\.h"/d' ;; + esac + if compile $cc -E $tmp.c <&$nullin >$tmp.i + then i=$(sed -e '/^#[line ]*[0123456789][0123456789]*[ ][ ]*"[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:]*[\\\/].*[\\\/]'$f'\.h"/!d' $e -e 's/.*"\(.*\)".*/\1/' -e 's,\\,/,g' -e 's,///*,/,g' $tmp.i | sed 1q) + case $i in + [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]:[\\/]*) + ;; + */*/*) k=$(echo "$i" | sed 's,.*/\([^/]*/[^/]*\)$,../\1,') + echo "$pre +$tst +$ext +$inc +#include <$k>" > $tmp.c + if compile $cc -E $tmp.c <&$nullin >$tmp.i + then j=$(sed -e '/^#[line ]*[0123456789][0123456789]*[ ][ ]*"[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:]*[\\\/].*[\\\/]'$f'\.h"/!d' $e -e 's/.*"\(.*\)".*/\1/' -e 's,\\,/,g' -e 's,///*,/,g' $tmp.i | sed 1q) + wi=$(wc < "$i") + wj=$(wc < "$j") + case $wi in + $wj) i=$k ;; + esac + fi + ;; + *) echo "$pre +$tst +$ext +$inc +#include <../include/$f.h>" > $tmp.c + if compile $cc -E $tmp.c <&$nullin >&$nullout + then i=../include/$f.h + fi + ;; + esac + else i= + fi + case $i in + [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]:[\\/]*|[\\/]*) + success + case $o in + lcl) echo "#include <$i> /* the native <$f.h> */" + echo "#undef $m" + usr="$usr$nl#define $m 1" + echo "#define $m 1" + ;; + nxt) echo "#define $m <$i> /* include path for the native <$f.h> */" + echo "#define ${m}_str \"$i\" /* include string for the native <$f.h> */" + usr="$usr$nl#define $m <$i>$nl#define ${m}_str \"$i\"" + eval $m=\\\<$i\\\> + ;; + esac + break + ;; + ../*/*) success + case $o in + lcl) echo "#include <$i> /* the native <$f.h> */" + echo "#undef $m" + usr="$usr$nl#define $m 1" + echo "#define $m 1" + eval $m=1 + ;; + nxt) echo "#define $m <$i> /* include path for the native <$f.h> */" + echo "#define ${m}_str \"$i\" /* include string for the native <$f.h> */" + usr="$usr$nl#define $m <$i>$nl#define ${m}_str \"$i\"" + eval $m=\\\<$i\\\> + ;; + esac + break + ;; + *) failure + case $o in + lcl) case $all$config$undef in + ?1?|??1)echo "#undef $m /* no native <$f.h> */" ;; + 1??) echo "#define $m 0 /* no native <$f.h> */" ;; + esac + eval $m=0 + ;; + nxt) case $all$config$undef in + ?1?|??1)echo "#undef $m /* no include path for the native <$f.h> */" ;; + esac + ;; + esac + ;; + esac + ;; + *) case $o in + hdr) x=$f.h ;; + sys) x=sys/$f.h ;; + esac + case " $gothdr " in + *" - $x "*) + failure + + ;; + *" + $x "*) + success + + ;; + *) echo " +$tst +$ext +$allinc +$inc +#include <$x>" > $tmp.c + if is_hdr $x + then gothdr="$gothdr + $x" + case $M in + *-*) ;; + *) case " $puthdr " in + *" $m "*) + ;; + *) puthdr="$puthdr $m" + usr="$usr$nl#define $m 1" + ;; + esac + case $define in + 1) echo "#define $m 1 /* #include <$x> ok */" ;; + n) echo "$m=1" ;; + esac + eval $m=1 + ;; + esac + else gothdr="$gothdr - $x" + case $M in + *-*) ;; + *) case $define$all$config$undef in + 1?1?|1??1)echo "#undef $m /* #include <$x> not ok */" ;; + 11??) echo "#define $m 0 /* #include <$x> not ok */" ;; + n1?1) echo "$m=" ;; + n1??) echo "$m=0" ;; + esac + eval $m=0 + ;; + esac + fi + ;; + esac + continue + ;; + esac + ;; + iff) ;; + ini) ;; + key) case $p in + ?*) continue ;; + esac + w=$v + while : + do is $o $w + echo "$pre +$tst +$ext +int f(){int $w = 1;return($w);}" > $tmp.c + if compile $cc -c $tmp.c <&$nullin >&$nullout + then failure + case $set in + *" ="|*" = "*) + set x $set + shift + w= + while : + do case $# in + 0) break ;; + esac + case $1 in + =) break ;; + esac + case $w in + '') w=$1 ;; + *) w="$w $1" ;; + esac + shift + done + case $1 in + =) shift + case $# in + 0) set=" " ;; + *) set=$* ;; + esac + ;; + *) set= + ;; + esac + case $shell in + ksh) typeset -u u=$w ;; + *) u=$(echo $w | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ) ;; + esac + u=_$u + M=$w + case $M in + *[!abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*) + M=$(echo "X$m" | sed -e 's,^.,,' -e 's,[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_],_,g') + ;; + esac + case $config in + 1) m=HAVE${u}_RESERVED ;; + *) m=_key_${w} ;; + esac + continue + ;; + esac + report - 1 - - "$w is not a reserved keyword" "default for reserved keyword $v" + else report 0 1 "$w is a reserved keyword" - + case $M in + *-*) ;; + *) case $define$w in + 1$v) ;; + 1*) echo "#define $v $w /* alternate for reserved keyword $v */" ;; + n*) echo "$v=$w" ;; + esac + ;; + esac + fi + break + done + ;; + lib|mth)case $p in + ?*) continue ;; + esac + case $v in + -) continue ;; + esac + is $o $v + copy $tmp.c " +$tst +$ext +$std +$usr +$pre +$inc +#ifdef _IFFE_type +$v i; +#else +typedef int (*_IFFE_fun)(); +#ifdef _IFFE_extern +extern int $v(); +#endif +static _IFFE_fun i=(_IFFE_fun)$v;int main(){return ((unsigned int)i)^0xaaaa;} +#endif +" + d=-D_IFFE_extern + if compile $cc -c $tmp.c <&$nullin >&$nullout + then d= + elif compile $cc $d -c $tmp.c <&$nullin >&$nullout + then : + else d=error + fi + if test error != "$d" + then rm -f $tmp.exe + if compile $cc $d $static -o $tmp.exe $tmp.o $lib $deflib <&$nullin >&$nullout && + $executable $tmp.exe + then case $o in + lib) c=0 ;; + *) c=1 ;; + esac + report $c 1 "$v() in default lib(s)" "$v() not in default lib(s)" "default for function $v()" + else case $o in + mth) rm -f $tmp.exe + compile $cc $d $static -o $tmp.exe $tmp.o -lm <&$nullin >&$nullout && + $executable $tmp.exe + report $? 1 "$v() in math lib" "$v() not in math lib" "default for function $v()" + ;; + *) report 1 1 - "$v() not in default lib(s)" "default for function $v()" + ;; + esac + fi + else if compile $cc -D_IFFE_type -c $tmp.c <&$nullin >&$nullout + then c=1 + else case $intrinsic in + '') copy $tmp.c " +$tst +$ext +$std +$usr +$pre +$inc +extern int foo(); +static int ((*i)())=foo;int main(){return(i==0);} +" + compile $cc -c $tmp.c <&$nullin >&$nullout + intrinsic=$? + ;; + esac + c=$intrinsic + fi + case $o in + mth) report $c 1 "$v() in math lib" "$v() not in math lib" "default for function $v()" ;; + *) report $c 1 "$v() in default lib(s)" "$v() not in default lib(s)" "default for function $v()" ;; + esac + fi + ;; + mac) case $p in + ?*) continue ;; + esac + is mac $v + echo " +$tst +$ext +$pre +$inc +#ifdef $v +'$m:$v' +#endif" > $tmp.c + compile $cc -E $tmp.c <&$nullin | grep -c "'$m:$v'" >&$nullout + report $? 1 "$v is a macro" "$v is not a macro" "default for macro $v" + ;; + mem) case $p in + ?*) eval i='$'_iffe_typedef_$p + case $i in + 0|1) ;; + *) echo "$pre +$tst +$ext +$inc +static $p i; +int n = sizeof(i);" > $tmp.c + is typ $p + if compile $cc -c $tmp.c <&$nullin >&$nullout + then success - + eval _iffe_typedef_$p=1 + i=1 + else failure - + eval _iffe_typedef_$p=0 + i=0 + fi + ;; + esac + case $i in + 0) i="$v is not a member of $p" p="struct $p" ;; + *) i=- ;; + esac + is mem $v "$p" + echo "$pre +$tst +$ext +$inc +static $p i; +int n = sizeof(i.$v);" > $tmp.c + compile $cc -c $tmp.c <&$nullin >&$nullout + report $? 1 "$v is a member of $p" "$i" + ;; + *) p=$v + eval i='$'_iffe_typedef_$p + case $i in + 0|1) ;; + *) echo "$pre +$tst +$ext +$inc +static $p i; +int n = sizeof(i);" > $tmp.c + is typ $p + if compile $cc -c $tmp.c <&$nullin >&$nullout + then success - + eval _iffe_typedef_$p=1 + i=1 + else failure - + eval _iffe_typedef_$p=0 + i=0 + fi + ;; + esac + case $i in + 0) i="$p is not a non-opaque struct" p="struct $p" ;; + *) i=- ;; + esac + is nos "$p" + echo "$pre +$tst +$ext +$inc +static $p i; +int n = sizeof(i);" > $tmp.c + if compile $cc -c $tmp.c <&$nullin >&$nullout + then echo "$pre +$tst +$ext +$inc +static $p i; +unsigned long f() { return (unsigned long)i; }" > $tmp.c + if compile $cc -c $tmp.c <&$nullin >&$nullout + then c=1 + else c=0 + fi + else c=1 + fi + report $c 1 "$p is a non-opaque struct" "$i" + esac + ;; + nop) ;; + npt) is npt $v + copy $tmp.c " +$tst +$ext +$std +$usr +$pre +$inc +struct _iffe_struct { int _iffe_member; }; +extern struct _iffe_struct* $v(struct _iffe_struct*); +" + # some compilers with -O only warn for invalid intrinsic prototypes + case " $cc " in + *" -O "*) xx=$(echo $cc | sed 's/ -O / /g') ;; + *) xx=$cc ;; + esac + compile $xx -c $tmp.c <&$nullin >&$nullout + report -$config $? 1 "$v() needs a prototype" "$v() does not need a prototype" + ;; + num) is num $v + copy $tmp.c " +$tst +$ext +$std +$usr +$pre +$inc +int _iffe_int = $v / 2; +" + compile $cc -c $tmp.c <&$nullin >&$nullout + report $? 1 "$v is a numeric constant" "$v is not a numeric constant" + ;; + one) for i in $a $hdr + do x="#include <$i>" + case " $gothdr " in + *" - $i "*) + continue + ;; + *" + $i "*) + ;; + *) echo "$x" > $tmp.c + if is_hdr $x + then gothdr="$gothdr + $x" + else gothdr="$gothdr - $x" + continue + fi + ;; + esac + case $one in + "") one=$x + ;; + *"$x"*) break + ;; + *) echo "$one" > $tmp.c + if compile $cc -E $tmp.c <&$nullin >$tmp.i + then c=$i + case $c in + *[\\/]*) c=$(echo $c | sed 's,[\\/],[\\/],g') ;; + esac + case $(sed -e '/^#[line ]*1[ ][ ]*"[\\\/].*[\\\/]'$c'"/!d' $tmp.i) in + ?*) break ;; + esac + fi + one="$one$nl$x" + ;; + esac + echo "$x" + break + done + ;; + opt) M=$m + is opt $a + case " $PACKAGE_OPTIONS " in + *" $a "*) c=0 ;; + *) c=1 ;; + esac + report $c 1 "$a is set in \$PACKAGE_OPTIONS" "$a is not set in \$PACKAGE_OPTIONS" + ;; + out|output) + ;; + pth) is pth $a + pkg $pth + tab=" " + e= + f= + for i in $pth + do case $i in + '{') e="${nl}}" + l= + x=i + v="\$${x}" + t=${nl}${tab} + b="fnd()${nl}{${t}for ${x} in" + ;; + '}') b="${b}${t}do${tab}if $exists ${v}/\${1}${t}${tab}${tab}then${tab}f=${v}/\${1}${t}${tab}${tab}${tab}return${t}${tab}${tab}fi" + e="${t}done${e}" + eval "${b}${e}" + fnd $a + case $f in + ?*) break ;; + esac + ;; + -) b="${b}${t}do${tab}test \"${v}\" = '' -o -d \"${v}\" &&${t}${tab}${tab}" + x=${x}i + v="${v}\$${x}" + b="${b}for ${x} in" + e="${t}done${e}" + t="${t}${tab}${tab}" + ;; + *) case $e in + '') if $exists ${i}/${a} + then f=${i}/${a} + break + fi + ;; + *) case $i in + /|.) b="${b} ''" ;; + *) b="${b} /${i}" ;; + esac + ;; + esac + ;; + esac + done + case $f in + '') case $set in + ' ') f=$a ;; + ?*) f=$set ;; + esac + ;; + esac + case $f in + '') c=1 + ;; + *) c=0 + f="\"$f\"" + ;; + esac + report $c "$f" "${note:-$a path}" "$a path not found" + ;; + run) is run $a + if test ! -r $a + then failure not found + case $verbose in + 0) echo "$command: $file$line: $a: not found" >&$stderr ;; + esac + exit 1 + fi + noisy + case $a in + *.c) rm -f $tmp.exe + { + echo "$tst +$ext +$std +$usr +$inc" + cat $a + } > $tmp.c + compile $cc -o $tmp.exe $tmp.c $lib $deflib <&$nullin >&$stderr 2>&$stderr && + $executable $tmp.exe && + execute $tmp.exe $opt <&$nullin + ;; + *.sh) { + copy - ": +set \"cc='$cc' executable='$executable' id='$m' static='$static' tmp='$tmp'\" $opt $hdr $test" + cat $a + } > $tmp.sh + chmod +x $tmp.sh + ( . $tmp.sh ) <&$nullin + ;; + *) false + ;; + esac + case $? in + 0) success + ;; + *) failure cannot run + case $verbose in + 0) echo "$command: $file$line: $a: cannot run" >&$stderr ;; + esac + exit 1 + ;; + esac + ;; + siz) case $p in + "") x= ;; + *) x="$p " ;; + esac + is siz "$x$v" + { + case $p:$v in + long:*|*:*[_0123456789]int[_0123456789]*) + echo "$pre +$tst +$ext +$inc +static $x$v i; +$x$v f() { +$x$v v; i = 1; v = i;" + echo "i = v * i; i = i / v; v = v + i; i = i - v;" + case $v in + float|double) ;; + *) echo "v <<= 4; i = v >> 2; i = 10; i = v % i; i |= v; v ^= i; i = 123; v &= i;" ;; + esac + echo "return v; }" + ;; + *) echo "$pre +$inc +struct xxx { $x$v mem; }; +static struct xxx v; +struct xxx* f() { return &v; }" + ;; + esac + case $x in + ""|"struct "|"union ") + echo "int g() { return 0; }" + ;; + *) echo "int g() { return sizeof($x$v)<=sizeof($v); }" ;; + esac + copy - " +int main() { + f(); + g(); + printf(\"%u\\n\", sizeof($x$v)); + return 0; +}" + } > $tmp.c + rm -f $tmp.exe $tmp.dat + if compile $cc -o $tmp.exe $tmp.c $lib $deflib <&$nullin >&$nullout && + $executable $tmp.exe && + execute $tmp.exe > $tmp.dat + then z=$(cat $tmp.dat) + c=0 + else z=0 + c=1 + fi + report $c "$z" "sizeof($x$v)" "$x$v not a type with known size" + ;; + sym) case $test in + "") x=$v ;; + *) x=$test ;; + esac + echo "$pre +$tst +$ext +$inc +'=' $x '='" > $tmp.c + compile $cc -E $tmp.c <&$nullin \ + | sed \ + -e "/'='/!d" \ + -e "s/'='//g" \ + -e 's/[ ]//g' \ + -e 's/((([^()]*)))->/->/g' \ + -e 's/(([^()]*))->/->/g' \ + -e 's/([^()]*)->/->/g' \ + -e 's/\([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789]*\)\[/\ +ary \1[/g' \ + -e 's/\([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789]*\)(/\ +fun \1[/g' \ + -e 's/\*->\([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_]\)/->\ +ptr \1/g' \ + -e 's/->\([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_]\)/->\ +reg \1/g' \ + -e "/^$v\$/d" \ + -e 's/^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789]*$/\ +nam &/g' \ + | sed \ + -e '/^... /!d' \ + | LC_ALL=C sort \ + -u \ + | sed \ + -e 's/\(...\) \([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789]*\).*/#ifndef _\1_'$v'\ +#define _\1_'$v' \2\ +#define _\1_'$v'_str "\2"\ +#endif/' + ;; + typ) case $p in + "") x= ;; + *) x="$p " ;; + esac + is typ "$x$v" + { + case $p:$v in + long:*|*:*[_0123456789]int[_0123456789]*) + echo "$pre +$tst +$ext +$inc +static $x$v i; +$x$v f() { +$x$v v; i = 1; v = i;" + echo "i = v * i; i = i / v; v = v + i; i = i - v;" + case $v in + float|double) ;; + *) echo "v <<= 4; i = v >> 2; i = 10; i = v % i; i |= v; v ^= i; i = 123; v &= i;" ;; + esac + echo "return v; }" + ;; + *) echo "$pre +$tst +$ext +$inc +struct xxx { $x$v mem; }; +static struct xxx v; +struct xxx* f() { return &v; }" + ;; + esac + case $x in + ""|"struct "|"union ") + echo "int main() { f(); return 0; }" ;; + *) echo "int main() { f(); return sizeof($x$v)<=sizeof($v); }" ;; + esac + } > $tmp.c + rm -f $tmp.exe + compile $cc -o $tmp.exe $tmp.c $lib $deflib <&$nullin >&$nullout && + $executable $tmp.exe && + execute $tmp.exe + report $? 1 "$x$v is a type" "$x$v is not a type" "default for type $x$v" + ;; + val) case $arg in + '"'*'"')echo $arg=\'$val\' ;; + *) echo $arg=\"$val\" ;; + esac + ;; + ver) ;; + 0) result=FAILURE + ;; + 1) result=SUCCESS + ;; + :) ;; + -) ;; + *) echo "$command: $file$line: $o: unknown feature test" >&$stderr + status=1 + ;; + esac + done + done + case $not in + 1) case $result in + FAILURE) result=SUCCESS ;; + *) result=FAILURE ;; + esac + ;; + esac + case $result in + FAILURE) user_pf=$fail user_yn=$no ;; + *) user_pf=$pass user_yn=$yes ;; + esac + case $user_pf in + ?*) # Run a pass{ or fail{ block in iffe's current environment + eval "$user_pf" <&$nullin 2>&$stderr ;; + esac + case $user_yn in + ?*) case $def in + -) ;; + *) case $note in + ?*) case $user_yn in + *$nl*) user_yn="/* $note */$nl$user_yn" ;; + *) user_yn="$user_yn /* $note */" ;; + esac + ;; + esac + ;; + esac + copy - "$user_yn" + ;; + esac + case $ifelse:$result in + TEST:SUCCESS) ifelse=KEEP ;; + TEST:*) ifelse=SKIP ;; + esac + case $group:$result in + :*|*:SUCCESS) break ;; + esac + set '' $groups '' "$@" + shift + case $1 in + '') shift; break ;; + esac + shift + + # set up and try the next group + + hdr=$com_hdr + lib=$com_lib + mac=$com_mac + opt=$com_opt + pth=$com_pth + test=$com_test + cc="$occ $includes" + group= + groups= + while : + do case $1 in + '') shift; break ;; + esac + case $1 in + *[\"\'\(\)\{\}\ \ ]*) + case $op in + pth) pth="$pth $1" + ;; + *) case $test in + '') test=$1 ;; + *) test="$test $1" ;; + esac + ;; + esac + ;; + -) group=$group$1 + groups="$groups $1" + ;; + -l*) case $group in + -*) groups="$groups $1" ;; + *) lib="$lib $1" ;; + esac + ;; + +l*) x=-${1#+} + case $group in + -*) groups="$groups $x" ;; + *) lib="$lib $x" ;; + esac + ;; + -*|+*) case $group in + -*) groups="$groups $1" + ;; + *) case $op in + run) opt="$opt $1" + ;; + *) case $1 in + -D*) mac="$mac $1" ;; + *) cc="$cc $1" ;; + esac + ;; + esac + ;; + esac + ;; + *.[aAxX]|*.[dD][lL][lL]|*.[lL][iI][bB]) + case $group in + -*) groups="$groups $1" ;; + *) lib="$lib $1" ;; + esac + ;; + *[.\\/]*) + case $group in + -*) groups="$groups $1" + ;; + *) case $op in + pth) pth="$pth $1" ;; + *) hdr="$hdr $1" ;; + esac + ;; + esac + ;; + *) case $group in + -*) groups="$groups $1" + ;; + *) case $op in + pth) pth="$pth $1" + ;; + *) case $test in + '') test=$1 ;; + *) test="$test $1" ;; + esac + ;; + esac + ;; + esac + ;; + esac + shift + done + done +done diff --git a/src/cmd/INIT/iffe.tst b/src/cmd/INIT/iffe.tst new file mode 100644 index 000000000..dc6a40ff3 --- /dev/null +++ b/src/cmd/INIT/iffe.tst @@ -0,0 +1,1881 @@ +# regression tests for the iffe command + +TEST 01 'command line basics' + + EXEC -r -v - hdr stdio + OUTPUT - $'/* : : generated by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define _sys_types 1 /* #include ok */ +#define _hdr_stdio 1 /* #include ok */ +#endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: test: is stdio.h a header ... yes' + + EXEC -r -v -s posix - hdr stdio + + EXEC -r -v - hdr stdio,limits + OUTPUT - $'/* : : generated by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define _sys_types 1 /* #include ok */ +#define _hdr_stdio 1 /* #include ok */ +#define _hdr_limits 1 /* #include ok */ +#endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: test: is stdio.h a header ... yes +iffe: test: is limits.h a header ... yes' + + EXEC -r -v -s posix - hdr stdio,limits + + EXEC -r -v - hdr,lib no_foo_bar,no_bar_foo stdio.h + OUTPUT - $'/* : : generated by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define _sys_types 1 /* #include ok */ +#define _hdr_stdio 1 /* #include ok */ +#endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: test: is stdio.h a header ... yes +iffe: test: is no_foo_bar.h a header ... no +iffe: test: is no_bar_foo.h a header ... no +iffe: test: is no_foo_bar a library function ... no +iffe: test: is no_bar_foo a library function ... no' + + EXEC -r -v -s posix - hdr,lib no_foo_bar,no_bar_foo stdio.h + + EXEC -r -v - hdr no_foo_bar,no_bar_foo stdio.h : lib no_foo_bar,no_bar_foo stdio.h + + EXEC -r -v -s posix - hdr no_foo_bar,no_bar_foo stdio.h : lib no_foo_bar,no_bar_foo stdio.h + +TEST 02 'file input basics' + + EXEC -r -v - t1.iffe + INPUT t1.iffe $'hdr stdio' + OUTPUT - $'/* : : generated from t1.iffe by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define _sys_types 1 /* #include ok */ +#define _hdr_stdio 1 /* #include ok */ +#endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: test: is stdio.h a header ... yes' + + EXEC -r -v -s posix - t1.iffe + + EXEC -r -v - t2.iffe + INPUT t2.iffe $'hdr stdio,limits' + OUTPUT - $'/* : : generated from t2.iffe by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define _sys_types 1 /* #include ok */ +#define _hdr_stdio 1 /* #include ok */ +#define _hdr_limits 1 /* #include ok */ +#endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: test: is stdio.h a header ... yes +iffe: test: is limits.h a header ... yes' + + EXEC -r -v -s posix - t2.iffe + + EXEC -r -v - t3.iffe + INPUT t3.iffe $'hdr,lib no_foo_bar,no_bar_foo stdio.h' + OUTPUT - $'/* : : generated from t3.iffe by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define _sys_types 1 /* #include ok */ +#define _hdr_stdio 1 /* #include ok */ +#endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: test: is stdio.h a header ... yes +iffe: test: is no_foo_bar.h a header ... no +iffe: test: is no_bar_foo.h a header ... no +iffe: test: is no_foo_bar a library function ... no +iffe: test: is no_bar_foo a library function ... no' + + EXEC -r -v -s posix - t3.iffe + + EXEC -r -v - t3.iffe + INPUT t3.iffe $'hdr no_foo_bar,no_bar_foo stdio.h +lib no_foo_bar,no_bar_foo stdio.h' + + EXEC -r -v -s posix - t3.iffe + +TEST 03 'nested if' + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff ifelse +if hdr stdio + if lib open { + HIT 1 + } + elif lib close { + HIT 2 + } + else { + HIT 3 + } + endif +elif hdr limits { + HIT 4 +} +else { + HIT 5 +} +endif' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _ifelse_H +#define _ifelse_H 1 +#define _sys_types 1 /* #include ok */ +#define _hdr_stdio 1 /* #include ok */ +#define _lib_open 1 /* open() in default lib(s) */ + HIT 1 + +#endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: test: is stdio.h a header ... yes +iffe: test: is open a library function ... yes' + + EXEC -r -v -s posix - t.iffe + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff ifelse +if hdr _XXX_stdio + if lib open { + HIT 1 + } + elif lib close { + HIT 2 + } + else { + HIT 3 + } + endif +elif hdr limits { + HIT 4 +} +else { + HIT 5 +} +endif' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _ifelse_H +#define _ifelse_H 1 +#define _sys_types 1 /* #include ok */ +#define _hdr_limits 1 /* #include ok */ +HIT 4 + +#endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: test: is _XXX_stdio.h a header ... no +iffe: test: is limits.h a header ... yes' + + EXEC -r -v -s posix - t.iffe + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff ifelse +if hdr _XXX_stdio + if lib open { + HIT 1 + } + elif lib close { + HIT 2 + } + else { + HIT 3 + } + endif +elif hdr _XXX_limits { + HIT 4 +} +else { + HIT 5 +} +endif' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _ifelse_H +#define _ifelse_H 1 +#define _sys_types 1 /* #include ok */ +HIT 5 + +#endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: test: is _XXX_stdio.h a header ... no +iffe: test: is _XXX_limits.h a header ... no' + + EXEC -r -v -s posix - t.iffe + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff ifelse +if hdr stdio + if lib _XXX_open { + HIT 1 + } + elif lib close { + HIT 2 + } + else { + HIT 3 + } + endif +elif hdr limits { + HIT 4 +} +else { + HIT 5 +} +endif' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _ifelse_H +#define _ifelse_H 1 +#define _sys_types 1 /* #include ok */ +#define _hdr_stdio 1 /* #include ok */ +#define _lib_close 1 /* close() in default lib(s) */ + HIT 2 + +#endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: test: is stdio.h a header ... yes +iffe: test: is _XXX_open a library function ... no +iffe: test: is close a library function ... yes' + + EXEC -r -v -s posix - t.iffe + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff ifelse +if hdr stdio + if lib _XXX_open { + HIT 1 + } + elif lib _XXX_close { + HIT 2 + } + else { + HIT 3 + } + endif +elif hdr limits { + HIT 4 +} +else { + HIT 5 +} +endif' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _ifelse_H +#define _ifelse_H 1 +#define _sys_types 1 /* #include ok */ +#define _hdr_stdio 1 /* #include ok */ + HIT 3 + +#endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: test: is stdio.h a header ... yes +iffe: test: is _XXX_open a library function ... no +iffe: test: is _XXX_close a library function ... no' + + EXEC -r -v -s posix - t.iffe + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff ifelse +if mem stat.st_atime sys/types.h sys/stat.h { + #define ATIME 1 +} +elif mem stat.st_ctime sys/types.h sys/stat.h { + #define CTIME 1 +} +elif mem stat.st_mtime sys/types.h sys/stat.h { + #define MTIME 1 +} +else pass{ no_stat_time=1 }end { + #define NOTIME 1 +} +endif +if ( !no_stat_time ) { + #define YESTIME 1 +} +endif' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _ifelse_H +#define _ifelse_H 1 +#define _sys_types 1 /* #include ok */ +#define _sys_stat 1 /* #include ok */ +#define _mem_st_atime_stat 1 /* st_atime is a member of struct stat */ +#define ATIME 1 + +#define YESTIME 1 + +#endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: test: is sys/stat.h a header ... yes +iffe: test: is stat a type or typedef ... no +iffe: test: is st_atime a member of struct stat ... yes +iffe: test: is ( !no_stat_time ) true ... yes' + + EXEC -r -v -s posix - t.iffe + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff ifelse +if mem foo_stat.st_atime sys/types.h sys/stat.h { + #define ATIME 1 +} +elif mem stat.st_ctime sys/types.h sys/stat.h { + #define CTIME 1 +} +elif mem stat.st_mtime sys/types.h sys/stat.h { + #define MTIME 1 +} +else pass{ no_stat_time=1 }end { + #define NOTIME 1 +} +endif +if ( !no_stat_time ) { + #define YESTIME 1 +} +endif' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _ifelse_H +#define _ifelse_H 1 +#define _sys_types 1 /* #include ok */ +#define _sys_stat 1 /* #include ok */ +#define _mem_st_ctime_stat 1 /* st_ctime is a member of struct stat */ +#define CTIME 1 + +#define YESTIME 1 + +#endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: test: is sys/stat.h a header ... yes +iffe: test: is foo_stat a type or typedef ... no +iffe: test: is st_atime a member of struct foo_stat ... no +iffe: test: is stat a type or typedef ... no +iffe: test: is st_ctime a member of struct stat ... yes +iffe: test: is ( !no_stat_time ) true ... yes' + + EXEC -r -v -s posix - t.iffe + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff ifelse +if mem foo_stat.st_atime sys/types.h sys/stat.h { + #define ATIME 1 +} +elif mem foo_stat.st_ctime sys/types.h sys/stat.h { + #define CTIME 1 +} +elif mem stat.st_mtime sys/types.h sys/stat.h { + #define MTIME 1 +} +else pass{ no_stat_time=1 }end { + #define NOTIME 1 +} +endif +if ( !no_stat_time ) { + #define YESTIME 1 +} +endif' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _ifelse_H +#define _ifelse_H 1 +#define _sys_types 1 /* #include ok */ +#define _sys_stat 1 /* #include ok */ +#define _mem_st_mtime_stat 1 /* st_mtime is a member of struct stat */ +#define MTIME 1 + +#define YESTIME 1 + +#endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: test: is sys/stat.h a header ... yes +iffe: test: is foo_stat a type or typedef ... no +iffe: test: is st_atime a member of struct foo_stat ... no +iffe: test: is st_ctime a member of struct foo_stat ... no +iffe: test: is stat a type or typedef ... no +iffe: test: is st_mtime a member of struct stat ... yes +iffe: test: is ( !no_stat_time ) true ... yes' + + EXEC -r -v -s posix - t.iffe + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff ifelse +if mem foo_stat.st_atime sys/types.h sys/stat.h { + #define ATIME 1 +} +elif mem foo_stat.st_ctime sys/types.h sys/stat.h { + #define CTIME 1 +} +elif mem foo_stat.st_mtime sys/types.h sys/stat.h { + #define MTIME 1 +} +else pass{ no_stat_time=1 }end { + #define NOTIME 1 +} +endif +if ( !no_stat_time ) { + #define YESTIME 1 +} +endif' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _ifelse_H +#define _ifelse_H 1 +#define _sys_types 1 /* #include ok */ +#define _sys_stat 1 /* #include ok */ +#define NOTIME 1 + +#endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: test: is sys/stat.h a header ... yes +iffe: test: is foo_stat a type or typedef ... no +iffe: test: is st_atime a member of struct foo_stat ... no +iffe: test: is st_ctime a member of struct foo_stat ... no +iffe: test: is st_mtime a member of struct foo_stat ... no +iffe: test: is ( !no_stat_time ) true ... no' + + EXEC -r -v -s posix - t.iffe + + EXEC -r -v - t.iffe + INPUT t.iffe $'set explicit +iff previous +hdr stdio +if hdr stdio { + OK +} +else { + OK +} +endif' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _previous_H +#define _previous_H 1 +#define _hdr_stdio 1 /* #include ok */ +OK + +#endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: test: is stdio.h a header ... yes' + + EXEC -r -v -s posix - t.iffe + +TEST 04 'test variable/macro override' + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff macro +HAVE_STDIO = hdr stdio' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _macro_H +#define _macro_H 1 +#define _sys_types 1 /* #include ok */ +#define HAVE_STDIO 1 /* #include ok */ +#endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: test: is stdio.h a header ... yes' + + EXEC -r -v -s posix - t.iffe + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff macro +if hdr - stdio { + #define HIT 1 +} +endif' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _macro_H +#define _macro_H 1 +#define _sys_types 1 /* #include ok */ +#define HIT 1 + +#endif' + + EXEC -r -v -s posix - t.iffe + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff macro +if - hdr stdio { + #define HIT 1 +} +endif' + + EXEC -r -v -s posix - t.iffe + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff macro +if ? hdr stdio { + #define HIT 1 +} +endif' + + EXEC -r -v -s posix - t.iffe + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff macro +if hdr - stdio { + #define HIT 1 +} +endif' + + EXEC -r -v -s posix - t.iffe + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff macro +if HAVE_STDIO = hdr stdio { + #define HIT 1 +} +endif +if ( HAVE_STDIO ) { + #define TOO ALSO +} +endif' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _macro_H +#define _macro_H 1 +#define _sys_types 1 /* #include ok */ +#define HAVE_STDIO 1 /* #include ok */ +#define HIT 1 + +#define TOO ALSO + +#endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: test: is stdio.h a header ... yes +iffe: test: is ( HAVE_STDIO ) true ... yes' + + EXEC -r -v -s posix - t.iffe + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff macro +if HAVE_STDIO = hdr stdio { + #define HIT 1 +} +endif +exp ALSO HAVE_STDIO' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _macro_H +#define _macro_H 1 +#define _sys_types 1 /* #include ok */ +#define HAVE_STDIO 1 /* #include ok */ +#define HIT 1 + +#define ALSO 1 /* HAVE_STDIO is true */ +#endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: test: is stdio.h a header ... yes +iffe: test: is HAVE_STDIO true ... yes' + + EXEC -r -v -s posix - t.iffe + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff macro +if HAVE_STDIO = hdr stdio { + #define HIT 1 +} +endif +ALSO = ( HAVE_STDIO )' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _macro_H +#define _macro_H 1 +#define _sys_types 1 /* #include ok */ +#define HAVE_STDIO 1 /* #include ok */ +#define HIT 1 + +#define ALSO 1 /* ( HAVE_STDIO ) is true */ +#endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: test: is stdio.h a header ... yes +iffe: test: is ( HAVE_STDIO ) true ... yes' + + EXEC -r -v -s posix - t.iffe + +TEST 05 'test code option sequence' + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff macro +tst seq - -DA=1 - -DB=1 note{ long int type }end compile{ + #if A == 1 && B == 0 + #define t long + #else + #define t error + #endif + t n = 0; +}end' + OUTPUT - '/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _macro_H +#define _macro_H 1 +#define _sys_types 1 /* #include ok */ +#define _seq 1 /* long int type */ +#endif' + ERROR - 'iffe: test: is sys/types.h a header ... yes +iffe: test: long int type ... yes' + + EXEC -r -v -s posix - t.iffe + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff macro +tst seq -DG=1 - -DN=1 - -DN=2 note{ long int type }end compile{ + #if G == 1 && N == 1 + #define t long + #else + #define t error + #endif + t n = 0; +}end' + + EXEC -r -v -s posix - t.iffe + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff macro +tst seq - -DA=1 - -DB=1 note{ long int type }end compile{ + #if A == 0 && B == 1 + #define t long + #else + #define t error + #endif + t n = 0; +}end' + ERROR - 'iffe: test: is sys/types.h a header ... yes +iffe: test: long int type ... +iffe: test: long int type ... yes' + + EXEC -r -v -s posix - t.iffe + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff macro +tst seq -DG=1 - -DN=1 - -DN=2 note{ long int type }end compile{ + #if G == 1 && N == 2 + #define t long + #else + #define t error + #endif + t n = 0; +}end' + + EXEC -r -v -s posix - t.iffe + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff macro +tst seq - -DA=1 - -DB=1 note{ long int type }end compile{ + #if A == 0 && B == 0 + #define t long + #else + #define t error + #endif + t n = 0; +}end' + OUTPUT - '/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _macro_H +#define _macro_H 1 +#define _sys_types 1 /* #include ok */ +#endif' + ERROR - 'iffe: test: is sys/types.h a header ... yes +iffe: test: long int type ... +iffe: test: long int type ... no' + + EXEC -r -v -s posix - t.iffe + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff macro +tst seq -DG=1 - -DN=1 - -DN=2 note{ long int type }end compile{ + #if G == 1 && N == 0 + #define t long + #else + #define t error + #endif + t n = 0; +}end' + + EXEC -r -v -s posix - t.iffe + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff macro +if tst - -DA=1 - -DB=1 note{ long int type }end compile{ + #if A == 1 && B == 0 + #define t long + #else + #define t error + #endif + t n = 0; +}end { + #define seq 1 +} +endif' + OUTPUT - '/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _macro_H +#define _macro_H 1 +#define _sys_types 1 /* #include ok */ +/* long int type */ +#define seq 1 + +#endif' + ERROR - 'iffe: test: is sys/types.h a header ... yes +iffe: test: long int type ... yes' + + EXEC -r -v -s posix - t.iffe + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff macro +if tst -DG=1 - -DN=1 - -DN=2 note{ long int type }end compile{ + #if G == 1 && N == 1 + #define t long + #else + #define t error + #endif + t n = 0; +}end { + #define seq 1 +} +endif' + + EXEC -r -v -s posix - t.iffe + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff macro +if tst - -DA=1 - -DB=1 note{ long int type }end compile{ + #if A == 0 && B == 1 + #define t long + #else + #define t error + #endif + t n = 0; +}end { + #define seq 1 +} +endif' + ERROR - 'iffe: test: is sys/types.h a header ... yes +iffe: test: long int type ... +iffe: test: long int type ... yes' + + EXEC -r -v -s posix - t.iffe + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff macro +if tst -DG=1 - -DN=1 - -DN=2 note{ long int type }end compile{ + #if G == 1 && N == 2 + #define t long + #else + #define t error + #endif + t n = 0; +}end { + #define seq 1 +} +endif' + + EXEC -r -v -s posix - t.iffe + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff macro +if tst - -DA=1 - -DB=1 note{ long int type }end compile{ + #if A == 0 && B == 0 + #define t long + #else + #define t error + #endif + t n = 0; +}end { + #define seq 1 +} +endif' + OUTPUT - '/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _macro_H +#define _macro_H 1 +#define _sys_types 1 /* #include ok */ +#endif' + ERROR - 'iffe: test: is sys/types.h a header ... yes +iffe: test: long int type ... +iffe: test: long int type ... no' + + EXEC -r -v -s posix - t.iffe + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff macro +if tst -DG=1 - -DN=1 - -DN=2 note{ long int type }end compile{ + #if G == 1 && N == 0 + #define t long + #else + #define t error + #endif + t n = 0; +}end { + #define seq 1 +} +endif' + + EXEC -r -v -s posix - t.iffe + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff macro +if tst - -DN=1 - -DN=2 - -DN=3 note{ long int type }end compile{ + #if N == 1 + #define t long + #else + #define t error + #endif + t n = 0; +}end { + #define seq 1 +} +endif' + OUTPUT - '/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _macro_H +#define _macro_H 1 +#define _sys_types 1 /* #include ok */ +/* long int type */ +#define seq 1 + +#endif' + ERROR - 'iffe: test: is sys/types.h a header ... yes +iffe: test: long int type ... yes' + + EXEC -r -v -s posix - t.iffe + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff macro +if tst - -DN=1 - -DN=2 - -DN=3 note{ long int type }end compile{ + #if N == 2 + #define t long + #else + #define t error + #endif + t n = 0; +}end { + #define seq 1 +} +endif' + ERROR - 'iffe: test: is sys/types.h a header ... yes +iffe: test: long int type ... +iffe: test: long int type ... yes' + + EXEC -r -v -s posix - t.iffe + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff macro +if tst - -DN=1 - -DN=2 - -DN=3 note{ long int type }end compile{ + #if N == 3 + #define t long + #else + #define t error + #endif + t n = 0; +}end { + #define seq 1 +} +endif' + ERROR - 'iffe: test: is sys/types.h a header ... yes +iffe: test: long int type ... +iffe: test: long int type ... +iffe: test: long int type ... yes' + + EXEC -r -v -s posix - t.iffe + + EXEC -r -v - t.iffe + INPUT t.iffe $'iff macro +if tst - -DN=1 - -DN=2 - -DN=3 note{ long int type }end compile{ + #if N == 0 + #define t long + #else + #define t error + #endif + t n = 0; +}end { + #define seq 1 +} +endif' + OUTPUT - '/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _macro_H +#define _macro_H 1 +#define _sys_types 1 /* #include ok */ +#endif' + ERROR - 'iffe: test: is sys/types.h a header ... yes +iffe: test: long int type ... +iffe: test: long int type ... +iffe: test: long int type ... no' + + EXEC -r -v -s posix - t.iffe + +TEST 06 'block side effects' + + EXEC -r - t.iffe + INPUT t.iffe $'iff - +tst output{ + int + main() + { + printf("HIT\\n"); + return 0; + } +}end' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#define _sys_types 1 /* #include ok */ +HIT' + + EXEC -r -s posix - t.iffe + + EXEC -r - t.iffe + INPUT t.iffe $'iff +tst - output{ + int + main() + { + printf("HIT\\n"); + return 0; + } +}end' + + EXEC -r -s posix - t.iffe + + EXEC -r - t.iffe + INPUT t.iffe $'iff +tst - output{ + int + main() + { + printf("HIT\\n"); + return 1; + } +}end' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#define _sys_types 1 /* #include ok */' + + EXEC -r -s posix - t.iffe + + EXEC -r - t.iffe + INPUT t.iffe $'iff +tst - nooutput{ + int + main() + { + printf("HIT\\n"); + return 1; + } +}end' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#define _sys_types 1 /* #include ok */ +HIT' + + EXEC -r -s posix - t.iffe + +TEST 07 'diagnostics' + + EXEC -r - t.iffe + INPUT t.iffe $'tst foo' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define _sys_types 1 /* #include ok */ +#endif' + ERROR - $'iffe: t.iffe:1: tst: unknown feature test' + EXIT 1 + + EXEC -r -s posix - t.iffe + + EXEC -r - t.iffe + INPUT t.iffe $'if (1)' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define _sys_types 1 /* #include ok */' + ERROR - $'iffe: t.iffe:1: missing endif' + EXIT 1 + + EXEC -r -s posix - t.iffe + + EXEC -r - t.iffe + INPUT t.iffe $'if' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define _sys_types 1 /* #include ok */' + ERROR - $'iffe: t.iffe:1: missing endif' + + EXEC -r -s posix - t.iffe + + EXEC -r - t.iffe + INPUT t.iffe $'endif' + ERROR - $'iffe: t.iffe:1: endif: no matching if' + + EXEC -r -s posix - t.iffe + + EXEC -r - t.iffe + INPUT t.iffe $'if { +}end' + ERROR - $'iffe: t.iffe:2: missing }' + + EXEC -r -s posix - t.iffe + +TEST 08 'negation consternation' + + EXEC -r - t.iffe + INPUT t.iffe $'npt fopen,fooon stdio.h' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define _sys_types 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include ok */ +#define _hdr_unistd 1 /* #include ok */ +#define _hdr_stdio 1 /* #include ok */ +#define _npt_fooon 1 /* fooon() needs a prototype */ +#endif' + + EXEC -r -u - t.iffe + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define _sys_types 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include ok */ +#define _hdr_unistd 1 /* #include ok */ +#define _hdr_stdio 1 /* #include ok */ +#undef _npt_fopen /* fopen() does not need a prototype */ +#define _npt_fooon 1 /* fooon() needs a prototype */ +#endif' + + EXEC -r -a - t.iffe + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define _sys_types 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include ok */ +#define _hdr_unistd 1 /* #include ok */ +#define _hdr_stdio 1 /* #include ok */ +#define _npt_fopen 0 /* fopen() does not need a prototype */ +#define _npt_fooon 1 /* fooon() needs a prototype */ +#endif' + + EXEC -r -C - t.iffe + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define HAVE_SYS_TYPES_H 1 /* #include ok */ +#define HAVE_STDLIB_H 1 /* #include ok */ +#define HAVE_UNISTD_H 1 /* #include ok */ +#define HAVE_STDIO_H 1 /* #include ok */ +#define HAVE_FOPEN_DECL 1 /* fopen() does not need a prototype */ +#undef HAVE_FOOON_DECL /* fooon() needs a prototype */ +#endif' + + EXEC -r - t.iffe + INPUT t.iffe $'NEED_FOPEN = npt fopen stdio.h +HAVE_FOPEN = ! npt fopen stdio.h +NEED_FOOON = npt fooon stdio.h +HAVE_FOOON = ! npt fooon stdio.h' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define _sys_types 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include ok */ +#define _hdr_unistd 1 /* #include ok */ +#define _hdr_stdio 1 /* #include ok */ +#define HAVE_FOPEN 1 /* fopen() does not need a prototype */ +#define NEED_FOOON 1 /* fooon() needs a prototype */ +#endif' + + EXEC -r -u - t.iffe + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define _sys_types 1 /* #include ok */ +#define _hdr_stdlib 1 /* #include ok */ +#define _hdr_unistd 1 /* #include ok */ +#define _hdr_stdio 1 /* #include ok */ +#undef NEED_FOPEN /* fopen() does not need a prototype */ +#define HAVE_FOPEN 1 /* fopen() does not need a prototype */ +#define NEED_FOOON 1 /* fooon() needs a prototype */ +#undef HAVE_FOOON /* fooon() needs a prototype */ +#endif' + + EXEC -r -C - t.iffe + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define HAVE_SYS_TYPES_H 1 /* #include ok */ +#define HAVE_STDLIB_H 1 /* #include ok */ +#define HAVE_UNISTD_H 1 /* #include ok */ +#define HAVE_STDIO_H 1 /* #include ok */ +#undef NEED_FOPEN /* fopen() does not need a prototype */ +#define HAVE_FOPEN 1 /* fopen() does not need a prototype */ +#define NEED_FOOON 1 /* fooon() needs a prototype */ +#undef HAVE_FOOON /* fooon() needs a prototype */ +#endif' + +TEST 09 'exp vs. if' + + EXEC -r - t.iffe + INPUT t.iffe $'_tst_false = ( 0 ) +_tst_true = ( 1 ) +exp _tst_hit !_tst_false { + ONE +} +exp _tst_hit !_tst_hit&_tst_true pass{ +cat < ok */ +#define _tst_true 1 /* ( 1 ) is true */ +#define _tst_hit 1 /* !_tst_false is true */ +/* !_tst_false */ +ONE + +#endif' + + EXEC -r -s posix - t.iffe + + EXEC -r - t.iffe + INPUT t.iffe $'_tst_false = ( 0 ) +_tst_true = ( 1 ) +exp _tst_hit !_tst_true { + ONE +} +exp _tst_hit !_tst_hit&_tst_true pass{ +cat < ok */ +#define _tst_true 1 /* ( 1 ) is true */ +#define _tst_hit 1 /* !_tst_hit&_tst_true is true */ +TWO 0 1 +#endif' + + EXEC -r -s posix - t.iffe + + EXEC -r - t.iffe + INPUT t.iffe $'_tst_false = ( 0 ) +_tst_true = ( 1 ) +exp _tst_hit !_tst_true { + ONE +} +exp _tst_hit !_tst_hit&_tst_false pass{ +cat < ok */ +#define _tst_true 1 /* ( 1 ) is true */ +#define _tst_hit 1 /* !_tst_hit&_tst_true is true */ +/* !_tst_hit&_tst_true */ +THREE + +#endif' + + EXEC -r -s posix - t.iffe + + EXEC -r - t.iffe + INPUT t.iffe $'_tst_false = ( 0 ) +_tst_true = ( 1 ) +exp _tst_hit !_tst_true { + ONE +} +exp _tst_hit !_tst_hit&_tst_false pass{ +cat < ok */ +#define _tst_true 1 /* ( 1 ) is true */ +#endif' + + EXEC -r -s posix - t.iffe + + EXEC -r - t.iffe + INPUT t.iffe $'_tst_false = ( 0 ) +_tst_true = ( 1 ) +exp _tst_hit !_tst_false { + ONE +} +exp _tst_hit !_tst_hit&&_tst_true pass{ +cat < ok */ +#define _tst_true 1 /* ( 1 ) is true */ +#define _tst_hit 1 /* !_tst_false is true */ +/* !_tst_false */ +ONE + +#endif' + + EXEC -r -s posix - t.iffe + + EXEC -r - t.iffe + INPUT t.iffe $'_tst_false = ( 0 ) +_tst_true = ( 1 ) +exp _tst_hit !_tst_true { + ONE +} +exp _tst_hit !_tst_hit&&_tst_true pass{ +cat < ok */ +#define _tst_true 1 /* ( 1 ) is true */ +#define _tst_hit 1 /* !_tst_hit&&_tst_true is true */ +TWO 0 1 +#endif' + + EXEC -r -s posix - t.iffe + + EXEC -r - t.iffe + INPUT t.iffe $'_tst_false = ( 0 ) +_tst_true = ( 1 ) +exp _tst_hit !_tst_true { + ONE +} +exp _tst_hit !_tst_hit&&_tst_false pass{ +cat < ok */ +#define _tst_true 1 /* ( 1 ) is true */ +#define _tst_hit 1 /* !_tst_hit&&_tst_true is true */ +/* !_tst_hit&&_tst_true */ +THREE + +#endif' + + EXEC -r -s posix - t.iffe + + EXEC -r - t.iffe + INPUT t.iffe $'_tst_false = ( 0 ) +_tst_true = ( 1 ) +exp _tst_hit !_tst_true { + ONE +} +exp _tst_hit !_tst_hit&&_tst_false pass{ +cat < ok */ +#define _tst_true 1 /* ( 1 ) is true */ +#endif' + + EXEC -r -s posix - t.iffe + + EXEC -r - t.iffe + INPUT t.iffe $'_tst_false = ( 0 ) +_tst_true = ( 1 ) +if ( ! _tst_false ) { + ONE +} +elif ( _tst_true ) pass{ +cat < ok */ +#define _tst_true 1 /* ( 1 ) is true */ +ONE + +#endif' + + EXEC -r -s posix - t.iffe + + EXEC -r - t.iffe + INPUT t.iffe $'_tst_false = ( 0 ) +_tst_true = ( 1 ) +if ( ! _tst_true ) { + ONE +} +elif ( _tst_true ) pass{ +cat < ok */ +#define _tst_true 1 /* ( 1 ) is true */ +TWO +#endif' + + EXEC -r -s posix - t.iffe + + EXEC -r - t.iffe + INPUT t.iffe $'_tst_false = ( 0 ) +_tst_true = ( 1 ) +if ( ! _tst_true ) { + ONE +} +elif ( _tst_false ) pass{ +cat < ok */ +#define _tst_true 1 /* ( 1 ) is true */ +THREE + +#endif' + + EXEC -r -s posix - t.iffe + + EXEC -r - t.iffe + INPUT t.iffe $'_tst_false = ( 0 ) +_tst_true = ( 1 ) +if ( ! _tst_true ) yes{ + typedef struct + { + int dd_fd; /* file descriptor */ + } DIR; +}end +endif' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define _sys_types 1 /* #include ok */ +#define _tst_true 1 /* ( 1 ) is true */ +#endif' + + EXEC -r -s posix - t.iffe + + EXEC -r - t.iffe + INPUT t.iffe $'_tst_false = ( 0 ) +_tst_true = ( 1 ) +if ( ! _tst_true ) { + typedef struct + { + int dd_fd; /* file descriptor */ + } DIR; +} +else { + OK +} +endif' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define _sys_types 1 /* #include ok */ +#define _tst_true 1 /* ( 1 ) is true */ +OK + +#endif' + + EXEC -r -s posix - t.iffe + + EXEC -r - t.iffe + INPUT t.iffe $'_tst_false = ( 0 ) +_tst_true = ( 1 ) +if ( ! _tst_true ) { + typedef struct + { + int dd_fd; /* file descriptor */ + }; +} +else { + OK +} +endif' + + EXEC -r -s posix - t.iffe + +TEST 10 'exp details' + + EXEC -r -v - t.iffe + INPUT t.iffe $'_str = "string" +_hdr =
+_aaa = ( 0 ) +_zzz = ( 1 ) +( _str ) +( ! _str ) +( _hdr ) +( ! _hdr ) +( _aaa ) +( ! _aaa ) +( _zzz ) +( ! _zzz )' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define _sys_types 1 /* #include ok */ +#define _str "string" +#define _hdr
+#define _zzz 1 /* ( 1 ) is true */ +#endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: test: is ( 0 ) true ... no +iffe: test: is ( 1 ) true ... yes +iffe: test: is ( _str ) true ... yes +iffe: test: is ( ! _str ) true ... no +iffe: test: is ( _hdr ) true ... yes +iffe: test: is ( ! _hdr ) true ... no +iffe: test: is ( _aaa ) true ... no +iffe: test: is ( ! _aaa ) true ... yes +iffe: test: is ( _zzz ) true ... yes +iffe: test: is ( ! _zzz ) true ... no' + + EXEC -r -v -s posix - t.iffe + +TEST 11 'set [no]define' + + EXEC -r -v - t.iffe + INPUT t.iffe $'set nodefine +mem stat.st_mtime sys/types.h sys/stat.h +set define +mem stat.st_mode sys/types.h sys/stat.h +if ( _mem_st_mtime_stat ) { + 1 +} +endif +if ( _mem_st_mode_stat ) { + 2 +} +endif' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define _mem_st_mode_stat 1 /* st_mode is a member of struct stat */ +1 + +2 + +#endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: test: is sys/stat.h a header ... yes +iffe: test: is stat a type or typedef ... no +iffe: test: is st_mtime a member of struct stat ... yes +iffe: test: is st_mode a member of struct stat ... yes +iffe: test: is ( _mem_st_mtime_stat ) true ... yes +iffe: test: is ( _mem_st_mode_stat ) true ... yes' + + EXEC -r -v -s posix - t.iffe + +TEST 12 'non-opaque mem' + + EXEC -r -v - mem OPAQUE -I. t.h + INPUT t.h $'typedef struct opaque OPAQUE;' + OUTPUT - $'/* : : generated by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define _sys_types 1 /* #include ok */ +#define _hdr_t 1 /* #include ok */ +#endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: test: is t.h a header ... yes +iffe: test: is OPAQUE a type or typedef ... no +iffe: test: is struct OPAQUE a non-opaque struct ... no' + + EXEC -r -v - mem NONOPAQUE -I. t.h + INPUT t.h $'struct nonopaque { int pad; }; +typedef struct nonopaque NONOPAQUE;' + OUTPUT - $'/* : : generated by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define _sys_types 1 /* #include ok */ +#define _hdr_t 1 /* #include ok */ +#define _mem_NONOPAQUE 1 /* NONOPAQUE is a non-opaque struct */ +#endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: test: is t.h a header ... yes +iffe: test: is NONOPAQUE a type or typedef ... yes +iffe: test: is NONOPAQUE a non-opaque struct ... yes' + +TEST 13 'key states' + + EXEC -r -v - t.iffe + INPUT t.iffe $'key int +key const = +key foo +key bar = +key aha = huh = int +key chr = char = int' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define _sys_types 1 /* #include ok */ +#define _key_int 1 /* int is a reserved keyword */ +#define _key_const 1 /* const is a reserved keyword */ +#define bar /* default for reserved keyword bar */ +#define aha int /* default for reserved keyword aha */ +#define _key_char 1 /* char is a reserved keyword */ +#define chr char /* alternate for reserved keyword chr */ +#endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: test: is int a reserved keyword ... yes +iffe: test: is const a reserved keyword ... yes +iffe: test: is foo a reserved keyword ... no +iffe: test: is bar a reserved keyword ... no +iffe: test: is aha a reserved keyword ... no +iffe: test: is huh a reserved keyword ... no +iffe: test: is chr a reserved keyword ... no +iffe: test: is char a reserved keyword ... yes' + + EXEC -r -v -s posix - t.iffe + + EXEC -u -r -v - t.iffe + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define _sys_types 1 /* #include ok */ +#define _key_int 1 /* int is a reserved keyword */ +#define _key_const 1 /* const is a reserved keyword */ +#undef _key_foo /* foo is not a reserved keyword */ +#undef _key_bar /* bar is not a reserved keyword */ +#define bar /* default for reserved keyword bar */ +#undef _key_huh /* huh is not a reserved keyword */ +#define aha int /* default for reserved keyword aha */ +#define _key_char 1 /* char is a reserved keyword */ +#define chr char /* alternate for reserved keyword chr */ +#endif' + + EXEC -u -r -v -s posix - t.iffe + + EXEC -a -r -v - t.iffe + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define _sys_types 1 /* #include ok */ +#define _key_int 1 /* int is a reserved keyword */ +#define _key_const 1 /* const is a reserved keyword */ +#define _key_foo 0 /* foo is not a reserved keyword */ +#define _key_bar 0 /* bar is not a reserved keyword */ +#define bar /* default for reserved keyword bar */ +#define _key_huh 0 /* huh is not a reserved keyword */ +#define aha int /* default for reserved keyword aha */ +#define _key_char 1 /* char is a reserved keyword */ +#define chr char /* alternate for reserved keyword chr */ +#endif' + + EXEC -a -r -v -s posix - t.iffe + + EXEC -C -r -v - t.iffe + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define HAVE_SYS_TYPES_H 1 /* #include ok */ +#define HAVE_INT_RESERVED 1 /* int is a reserved keyword */ +#define HAVE_CONST_RESERVED 1 /* const is a reserved keyword */ +#undef HAVE_FOO_RESERVED /* foo is not a reserved keyword */ +#undef HAVE_BAR_RESERVED /* bar is not a reserved keyword */ +#define bar /* default for reserved keyword bar */ +#undef HAVE_HUH_RESERVED /* huh is not a reserved keyword */ +#define aha int /* default for reserved keyword aha */ +#define HAVE_CHAR_RESERVED 1 /* char is a reserved keyword */ +#define chr char /* alternate for reserved keyword chr */ +#endif' + + EXEC -C -r -v -s posix - t.iffe + +TEST 14 'inc file' + + EXEC -r -v - t.iffe + INPUT t.iffe $'inc t_lib.h +if ( bar_foo ) { + #define all 1 +} +elif ( _foo_bar ) { + #define some 1 +} +endif' + INPUT t_lib.h '#define bar_foo ALL +#define _foo_bar SOME' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define _sys_types 1 /* #include ok */ +#define some 1 + +#endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: test: is ( bar_foo ) true ... no +iffe: test: is ( _foo_bar ) true ... yes' + + EXEC -r -v - t.iffe + INPUT t.iffe $'inc t_lib.h . +if ( bar_foo ) { + #define all 1 +} +elif ( _foo_bar ) { + #define ok 1 +} +endif' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define _sys_types 1 /* #include ok */ +#define all 1 + +#endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: test: is ( bar_foo ) true ... yes' + + EXEC -r -v - t.iffe + INPUT t.iffe $'inc t_lib.h . ? +if ( bar_foo ) { + #define all 1 +} +elif ( _foo_bar ) { + #define ok 1 +} +endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: t.iffe:1: warning: ?: operands ignored +iffe: test: is ( bar_foo ) true ... yes' + + EXEC -r -v - t.iffe + INPUT t.iffe $'inc foo_lib.h' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define _sys_types 1 /* #include ok */' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: t.iffe:1: foo_lib.h: file not found' + EXIT 1 + + EXEC -r -v - t.iffe + INPUT t.iffe $'inc' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: t.iffe:1: path expected' + +TEST 15 'KnR compatibility' + + EXEC -r -v - t.iffe + INPUT t.iffe $' +if ( 1 ) { + #define all 1 +} +endif +if ( 2 ) { + #define some 1 +} +endif +cat{ +#define a 1 + #define b 2 + #define c 3 + #define d 4 +}end' +#define _foo_bar SOME' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define _sys_types 1 /* #include ok */ +#define some 1 + +#endif' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define _sys_types 1 /* #include ok */ +#define all 1 + +#define some 1 + +#define a 1 +#define b 2 +#define c 3 +#define d 4 + +#endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: test: is ( 1 ) true ... yes +iffe: test: is ( 2 ) true ... yes +iffe: test: cat{ ... }end ... yes' + + EXEC -r -v -s posix - t.iffe + +TEST 16 '{ define extern include print }' + + EXEC -r -v - t.iffe + INPUT t.iffe $' +print /* test header */ +header stdio.h +define EOF -1 +define FoobaR (a,b) ((a)+(b)) +define FoomaC -1 +extern fopen FILE* (char*, char*) +extern BarfoO struct barfoo* (int) +extern Tab_lE struct barfoo* [10]' + OUTPUT - $'/* test header */ +/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define _sys_types 1 /* #include ok */ +#include +#define FoobaR(a,b) ((a)+(b)) +#define FoomaC -1 +extern struct barfoo* BarfoO(int); +extern struct barfoo* Tab_lE[10]; +#endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: test: is stdio.h a header ... yes +iffe: test: is EOF a macro ... yes +iffe: test: is FoobaR a macro ... no +iffe: test: is FoomaC a macro ... no +iffe: test: is fopen a symbol that needs a prototype ... no +iffe: test: is BarfoO a symbol that needs a prototype ... yes +iffe: test: is Tab_lE a symbol that needs a prototype ... yes' + +TEST 17 'features/* => FEATURE/*' + + EXEC -r -v run features/stdio + INPUT features/stdio $'header stdio.h' + OUTPUT FEATURE/stdio $'/* : : generated from features/stdio by iffe version 1995-03-19 : : */ +#ifndef _REGRESS +#define _REGRESS 1 +#define _sys_types 1 /* #include ok */ +#include +#endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes +iffe: test: is stdio.h a header ... yes' + +TEST 18 'api + ver' + EXEC -r -v - t.iffe + INPUT t.iffe $'iff api +ver foo 20100606 +ver bar 19840919 + +api foo 19991231 dis dat tother +api foo 20100601 dat +api foo 20100606 dis +api bar 19991231 moe larry shemp +api bar 20020202 curly +api bar 20030303 shemp +api bar 20040404 joe_b +api bar 20050505 joe_d +' + OUTPUT - $'/* : : generated from t.iffe by iffe version 1995-03-19 : : */ +#ifndef _api_H +#define _api_H 1 +#define _sys_types 1 /* #include ok */ + +#define FOO_VERSION 20100606 +#define BAR_VERSION 19840919 +#define FOOAPI(rel) ( _BLD_foo || !_API_foo || _API_foo >= rel ) + +#if !defined(_API_foo) && defined(_API_DEFAULT) +#define _API_foo _API_DEFAULT +#endif + +#if FOOAPI(20100601) +#undef dat +#define dat dat_20100601 +#elif _API_foo >= 19991231 +#undef dat +#define dat dat_19991231 +#endif + +#if FOOAPI(20100606) +#undef dis +#define dis dis_20100606 +#elif _API_foo >= 19991231 +#undef dis +#define dis dis_19991231 +#endif + +#if FOOAPI(19991231) +#undef tother +#define tother tother_19991231 +#endif + +#define _API_foo_MAP "dat_20100601 dat_19991231 dis_20100606 dis_19991231 tother_19991231" +#define BARAPI(rel) ( _BLD_bar || !_API_bar || _API_bar >= rel ) + +#if !defined(_API_bar) && defined(_API_DEFAULT) +#define _API_bar _API_DEFAULT +#endif + +#if BARAPI(20020202) +#undef curly +#define curly curly_20020202 +#endif + +#if BARAPI(20040404) +#undef joe_b +#define joe_b joe_b_20040404 +#endif + +#if BARAPI(20050505) +#undef joe_d +#define joe_d joe_d_20050505 +#endif + +#if BARAPI(19991231) +#undef larry +#define larry larry_19991231 +#endif + +#if BARAPI(19991231) +#undef moe +#define moe moe_19991231 +#endif + +#if BARAPI(20030303) +#undef shemp +#define shemp shemp_20030303 +#elif _API_bar >= 19991231 +#undef shemp +#define shemp shemp_19991231 +#endif + +#define _API_bar_MAP "curly_20020202 joe_b_20040404 joe_d_20050505 larry_19991231 moe_19991231 shemp_20030303 shemp_19991231" + +#endif' + ERROR - $'iffe: test: is sys/types.h a header ... yes' diff --git a/src/cmd/INIT/ignore.sh b/src/cmd/INIT/ignore.sh new file mode 100644 index 000000000..0a57d55df --- /dev/null +++ b/src/cmd/INIT/ignore.sh @@ -0,0 +1,33 @@ +######################################################################## +# # +# This software is part of the ast package # +# Copyright (c) 1994-2011 AT&T Intellectual Property # +# Copyright (c) 2020-2022 Contributors to ksh 93u+m # +# and is licensed under the # +# Eclipse Public License, Version 2.0 # +# # +# A copy of the License is available at # +# https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html # +# (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) # +# # +# Glenn Fowler # +# Martijn Dekker # +# # +######################################################################## +# non-ksh script for the nmake ignore prefix +# @(#)ignore (ksh 93u+m) 2021-12-31 + +while : +do case $# in + 0) exit 0 ;; + esac + case $1 in + *=*) export "$1" + shift + ;; + *) break + ;; + esac +done +"$@" +exit 0 diff --git a/src/cmd/INIT/intl.c b/src/cmd/INIT/intl.c new file mode 100644 index 000000000..9aed85d40 --- /dev/null +++ b/src/cmd/INIT/intl.c @@ -0,0 +1,26 @@ +/*********************************************************************** +* * +* This software is part of the ast package * +* Copyright (c) 1994-2011 AT&T Intellectual Property * +* Copyright (c) 2020-2022 Contributors to ksh 93u+m * +* and is licensed under the * +* Eclipse Public License, Version 2.0 * +* * +* A copy of the License is available at * +* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html * +* (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) * +* * +* Glenn Fowler * +* Martijn Dekker * +* * +***********************************************************************/ +#ifndef gettext +#include +#endif + +int +main() +{ + gettext(0); + return 0; +} diff --git a/src/cmd/INIT/ld.hp.pa b/src/cmd/INIT/ld.hp.pa new file mode 100755 index 000000000..99d39f0dc --- /dev/null +++ b/src/cmd/INIT/ld.hp.pa @@ -0,0 +1,5 @@ +: hp.pa ld wrapper for reasonable warning defaults + +# @(#)ld.hp.pa (AT&T Labs Research) 1998-01-23 + +/bin/ld +s +vnocompatwarnings "$@" diff --git a/src/cmd/INIT/ldd.cygwin.i386 b/src/cmd/INIT/ldd.cygwin.i386 new file mode 100755 index 000000000..b9df84f19 --- /dev/null +++ b/src/cmd/INIT/ldd.cygwin.i386 @@ -0,0 +1,22 @@ +#!/bin/env sh +: cygwin.i386 ldd -- how many ways does this confirm the Windows bias? +for f +do case $f in + *.exe) ;; + *) f=$f.exe ;; + esac + p=$(type $f) + case $p in + *" not found"*) + ;; + *) p=${p##* } + case $p in + ?*) f=$p ;; + esac + ;; + esac + cygcheck $(cygpath -aw $f) | + for w in $(sed -e 's/^[[:space:]]*//' -e '/^$/d' -e '/^Use /d') + do cygpath -u "$w" + done +done diff --git a/src/cmd/INIT/ldd.darwin b/src/cmd/INIT/ldd.darwin new file mode 100755 index 000000000..6f06d9830 --- /dev/null +++ b/src/cmd/INIT/ldd.darwin @@ -0,0 +1,2 @@ +: Mac OS X ldd +otool -L "$@" diff --git a/src/cmd/INIT/ldd.hp.pa b/src/cmd/INIT/ldd.hp.pa new file mode 100755 index 000000000..34874b413 --- /dev/null +++ b/src/cmd/INIT/ldd.hp.pa @@ -0,0 +1,21 @@ +: hp.pa ldd +while : +do case $# in + 0) break ;; + esac + case $1 in + -*|+*) ;; + *) break ;; + esac + shift +done +trap ':' 15 +for cmd +do case $# in + 1) ;; + *) echo $cmd: ;; + esac + _HP_DLDOPTS=-ldd "$cmd" < /dev/null 2> /dev/null | sort -u + # chatr "$cmd" | + # sed -e '/^[ ]*dynamic[ ][ ]*/!d' -e 's// /' +done diff --git a/src/cmd/INIT/ldd.ibm.risc b/src/cmd/INIT/ldd.ibm.risc new file mode 100755 index 000000000..984ef6da7 --- /dev/null +++ b/src/cmd/INIT/ldd.ibm.risc @@ -0,0 +1,16 @@ +: ibm.risc ldd +case $# in +1) header=0 ;; +*) header=1 ;; +esac +for file +do case $header in + 1) echo "$file:" + header=2 + ;; + 2) echo + echo "$file:" + ;; + esac + dump -H "$file" | sed '1,/\*\*\*Import/d' +done diff --git a/src/cmd/INIT/ldd.lynxos b/src/cmd/INIT/ldd.lynxos new file mode 100755 index 000000000..43904a831 --- /dev/null +++ b/src/cmd/INIT/ldd.lynxos @@ -0,0 +1 @@ +elflook -L "$@" | sed -e '/^NEEDED:/!d' -e 's/.*: *//' diff --git a/src/cmd/INIT/ldd.mvs.390 b/src/cmd/INIT/ldd.mvs.390 new file mode 100755 index 000000000..341c4cc65 --- /dev/null +++ b/src/cmd/INIT/ldd.mvs.390 @@ -0,0 +1,18 @@ +: mvs.390 ldd +case $# in +1) header=0 ;; +*) header=1 ;; +esac +for file +do case $header in + 1) echo "$file:" + header=2 + ;; + 2) echo + echo "$file:" + ;; + esac + strings $file | + sed -e '/\<[[:lower:]][[:alnum:]]*\.dll\>/!d' -e 's/^/ /' | + sort -u +done diff --git a/src/cmd/INIT/ldd.sgi b/src/cmd/INIT/ldd.sgi new file mode 100755 index 000000000..d3c534734 --- /dev/null +++ b/src/cmd/INIT/ldd.sgi @@ -0,0 +1,2 @@ +: sgi.mips ldd +odump -Dl "$@" diff --git a/src/cmd/INIT/m.c b/src/cmd/INIT/m.c new file mode 100644 index 000000000..7ddb5eba7 --- /dev/null +++ b/src/cmd/INIT/m.c @@ -0,0 +1,31 @@ +/*********************************************************************** +* * +* This software is part of the ast package * +* Copyright (c) 1994-2011 AT&T Intellectual Property * +* Copyright (c) 2020-2022 Contributors to ksh 93u+m * +* and is licensed under the * +* Eclipse Public License, Version 2.0 * +* * +* A copy of the License is available at * +* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html * +* (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) * +* * +* Glenn Fowler * +* Martijn Dekker * +* * +***********************************************************************/ +/* + * -lm test #1 + */ + +#ifndef sin +#include +#endif + +int +main() +{ + sin(0.0); + fmod(100.234, 11.0); + return 0; +} diff --git a/src/cmd/INIT/m2.c b/src/cmd/INIT/m2.c new file mode 100644 index 000000000..7575984f7 --- /dev/null +++ b/src/cmd/INIT/m2.c @@ -0,0 +1,33 @@ +/*********************************************************************** +* * +* This software is part of the ast package * +* Copyright (c) 1994-2011 AT&T Intellectual Property * +* Copyright (c) 2020-2022 Contributors to ksh 93u+m * +* and is licensed under the * +* Eclipse Public License, Version 2.0 * +* * +* A copy of the License is available at * +* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html * +* (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) * +* * +* Glenn Fowler * +* Martijn Dekker * +* * +***********************************************************************/ +/* + * -lm test #2 + */ + +#include + +int +main() +{ + double value = 0; + int exp = 0; + int r = 0; + + r |= ldexp(value, exp) != 0; + r |= frexp(value, &exp) != 0; + return r; +} diff --git a/src/cmd/INIT/m3.c b/src/cmd/INIT/m3.c new file mode 100644 index 000000000..1644663bb --- /dev/null +++ b/src/cmd/INIT/m3.c @@ -0,0 +1,33 @@ +/*********************************************************************** +* * +* This software is part of the ast package * +* Copyright (c) 1994-2011 AT&T Intellectual Property * +* Copyright (c) 2020-2022 Contributors to ksh 93u+m * +* and is licensed under the * +* Eclipse Public License, Version 2.0 * +* * +* A copy of the License is available at * +* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html * +* (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) * +* * +* Glenn Fowler * +* Martijn Dekker * +* * +***********************************************************************/ +/* + * -lm test #3 + */ + +#include + +int +main() +{ + long double value = 0; + int exp = 0; + int r = 0; + + r |= ldexpl(value, exp) != 0; + r |= frexpl(value, &exp) != 0; + return r; +} diff --git a/src/cmd/INIT/m4.c b/src/cmd/INIT/m4.c new file mode 100644 index 000000000..edfe36405 --- /dev/null +++ b/src/cmd/INIT/m4.c @@ -0,0 +1,29 @@ +/*********************************************************************** +* * +* This software is part of the ast package * +* Copyright (c) 1994-2011 AT&T Intellectual Property * +* Copyright (c) 2020-2022 Contributors to ksh 93u+m * +* and is licensed under the * +* Eclipse Public License, Version 2.0 * +* * +* A copy of the License is available at * +* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html * +* (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) * +* * +* Glenn Fowler * +* Martijn Dekker * +* * +***********************************************************************/ +/* + * -lm test #4 + */ + +#include + +int +main() +{ + double value = 0; + + return isnan(value); +} diff --git a/src/cmd/INIT/m5.c b/src/cmd/INIT/m5.c new file mode 100644 index 000000000..825efe753 --- /dev/null +++ b/src/cmd/INIT/m5.c @@ -0,0 +1,29 @@ +/*********************************************************************** +* * +* This software is part of the ast package * +* Copyright (c) 1994-2011 AT&T Intellectual Property * +* Copyright (c) 2020-2022 Contributors to ksh 93u+m * +* and is licensed under the * +* Eclipse Public License, Version 2.0 * +* * +* A copy of the License is available at * +* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html * +* (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) * +* * +* Glenn Fowler * +* Martijn Dekker * +* * +***********************************************************************/ +/* + * -lm test #5 + */ + +#include + +int +main() +{ + long double value = 0; + + return isnanl(value); +} diff --git a/src/cmd/INIT/m6.c b/src/cmd/INIT/m6.c new file mode 100644 index 000000000..7cee7d82a --- /dev/null +++ b/src/cmd/INIT/m6.c @@ -0,0 +1,31 @@ +/*********************************************************************** +* * +* This software is part of the ast package * +* Copyright (c) 1994-2011 AT&T Intellectual Property * +* Copyright (c) 2020-2022 Contributors to ksh 93u+m * +* and is licensed under the * +* Eclipse Public License, Version 2.0 * +* * +* A copy of the License is available at * +* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html * +* (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) * +* * +* Glenn Fowler * +* Martijn Dekker * +* * +***********************************************************************/ +/* + * -lm test #6 + */ + +#define _ISOC99_SOURCE 1 + +#include + +int +main() +{ + double value = -0.0; + + return !signbit(value); +} diff --git a/src/cmd/INIT/make.probe b/src/cmd/INIT/make.probe new file mode 100644 index 000000000..d02a18afd --- /dev/null +++ b/src/cmd/INIT/make.probe @@ -0,0 +1,2145 @@ +: +### this script contains archaic constructs that work with all sh variants ### +# Glenn Fowler +# AT&T Research +# +# @(#)make.probe (AT&T Research) 2011-06-01 +# +# C probe for make +# +# NOTE: C.probe must be included or .'d here +# + +cc_dll_def=-D_BLD_DLL + +probe_ar_arflags="-Xany" +probe_arflags="-xar" +probe_ccs="strip size nm ld ar" # longest to shortest +probe_debug="-g" +probe_dll="'-G 0' -Wc,dll,exportall,longname,rent -Wc,exportall -dynamic $cc_dll_def" +probe_export_dynamic="-rdynamic -export-dynamic -Wl,-export-dynamic -Wl,-E -bexpall -force_flat_namespace" +probe_gcc_optimize="-Os" +probe_gcc_version="*[Gg][Cc][Cc]*" +probe_include_local="'-ignore-source-dir -iquote' -iquote -I-" +probe_ldlazy='-zlazyload -znolazyload -Wl,-zlazyload -Wl,-znolazyload' +probe_ldlib="LD_LIBRARY_PATH LIBPATH LPATH" +probe_ldmap="'-Wl,-M' '-Qoption ld -M' '-Wl,-m' '-m'" +probe_ldorigin="-Wl,-z,origin" +probe_ldrecord='-zrecord -zignore -Wl,-zrecord -Wl,-zignore' +probe_ldrunpath="-Wl,-R, -R -Wl,-rpath, -L" +probe_ldstrip="'-s -mr' -Wl,-s" +probe_lib="a lib" +probe_lib_append="/usr/lib/pa1.1" +probe_lib_all_undef="-all -notall -all -none -Bwhole-archive -Bno-whole-archive -whole-archive -no-whole-archive -Wl,-whole-archive -Wl,-no-whole-archive -all_load '' -Wl,-zallextract -Wl,-zdefaultextract +forceload +noforceload" +probe_lib_multiple="-Wl,-zmuldefs" +probe_libdir="shlib lib" +probe_nmflags="'' -p -B" +probe_optimize="-Os -O" +probe_pic="-Kpic -KPIC -fpic -fPIC -pic -PIC +z +Z" +probe_no_protect="'-fno-stack-protector -fno-stack-protector-all' -GS-" +probe_readonly="-R -Krodata -xMerge -Wa,-r" +probe_shared="'' -G -b -c -shared -Wl,dll" +probe_shared_name="-Wl,-soname= -h" +probe_shared_nostart="-nostartfiles" +case `gcc -v 2>&1 | egrep gcc.version` in +*version' '[0123456].*) ;; +*) probe_shared_nostart= ;; # gcc 7+ +esac +probe_shared_registry='"-update_registry $probe_shared_registry_file"' +probe_shared_registry_file='registry.ld' +probe_shared_registry_path="\$(LIBDIR)/$probe_shared_registry_file" +probe_strict="'-ansi -pedantic' '-ansi -strict' -strict -ansi" +probe_stripflags="'-f -s' -f -s" +probe_unresolved="'-expect_unresolved \"*\"'" +probe_warn="-Wall -fullwarn -w3 '-A -A' +w1" + +echo '#pragma pp:version' > libpp.$src +echo '#define dDflag on' > dDflag.$src +echo 'int main(){return 0;}' > doti.$src +echo 'int code(){return 0;} int main(){return code();}' > export.$src +echo '#include ' > imstd.$src +echo '#include "_i_.h"' > imusr.$src +echo 'int x;' > _i_.h +mkdir im +echo '(' > im/stdio.h +echo '#include "implc_x.h" +int main(){f(1);return 0;}' > implc.$src +echo 'template void f(T){}' > implc_x.$src +echo 'template void f(T);' > implc_x.h +echo 'extern int NotalL(){return(0);}' > notall.$src +echo '#include +extern int i; +int i = 1; +extern int f(){return(!i);} +int main(){FILE* fp=stdin;return(f());}' > pic.$src +echo 'int prefix(){return 0;}' > prefix.$src +echo 'template int gt(T a, T b); +template int gt(T a, T b) { return a > b; } +int main () { return gt(2,1); }' > ptr.$src +echo 'int main(){return 0;}' > require.$src +echo '#if mips && !sgi || __CYGWIN__ +( /* some systems choke on this probe */ +#else +#if test_const +#define CONST const +#else +#define CONST +#endif +CONST char x[]={1,2,3,4,5,6,7,8,9,0}; +int main(){*(char*)x=0; return x[0];} +#endif' > readonly.$src +# NOTE: sfclose() defined on UWIN, not defined on all other systems +echo 'extern int sfclose(); extern int ShareD(){return(sfclose());}' > shared.$src +echo '#define g(a,b) a ## b +volatile int a; +const int g(x,y)=1; +extern int c(int);' > stdc.$src +echo 'extern int f(); int main() { return f(); }' > sovmain.$src +echo 'int f() { return 0; }' > sovlib.$src +echo '#include +int i; +int main(){int j;j = i * 10;return j;}' > strip.$src +echo 'template void f(T){} +int main(){f(1);return 0;}' > toucho.$src +echo 'extern type call(int); +int main() {call(0);return(0);}' > tstlib.$src +echo 'int main(){return 0;}' > warn.$src +echo 'int f(){return 0;}' > warn1.$src +echo 'int f(){}' > warn2.$src +echo 'int f(){int i; return 0;}' > warn3.$src +echo 'int f(){int i; return i;}' > warn4.$src +echo 'int f(){return g();}' > warn5.$src +warn_enum="1 2 3 4 5" + +chmod -w *.$src + +ar_arflags= +arflags= +cc_dll= +cc_pic= +cc_PIC= +dDflag= +debug= +dialect= +dll_dir='$(LIBDIR)' +dll_libraries= +dll_variants= +doti= +exectype= +export_dynamic= +gnu= +implicitc= +include_local= +lddynamic= +ldlazy= +ldnolazy= +ldnorecord= +ldorigin= +ldrecord= +ldrunpath= +ldscript= +ldstatic= +ldstrip= +Lflag= +lib_dll= +lib_all= +lib_undef= +libpath= +libpp= +makeoptions= +nmedit= +nmflags= +no_protect= +optimize= +prefix_archive=lib +prefix_dynamic= +prefix_shared=lib +ptrcopy= +ptrimplicit= +ptrmkdir= +readonly= +repository= +require= +runpath= +shared= +shared_name= +shared_registry= +shellmagic= +soversion= +stdc= +strict= +stripflags= +symprefix= +toucho= +warn= + +set $probe_lib +lib=$1 + +d= +for f in $stdinclude $usrinclude +do case $f in + -I*) ;; + *) d="$d $f" ;; + esac +done +stdinclude=$d + +set x $cc +cc_dir=`echo $2 | sed -e 's,/*[^/]*$,,'` +for c in $probe_ccs +do if $executable $cc_dir/$c + then x=$cc_dir/$c + else x=$c + fi + eval $c='$x' +done +ld_dir= +rm -f doti.$obj +if $cc -c doti.$src +then eval set x $probe_verbose + shift + for o + do $cc $o doti.$obj + $cc $o doti.$obj -lF0oB@r + done 2>&1 | sed -e 's/^[+ ]*//' -e 's/[ ].*//' -e '/^\//!d' -e 's/:$//' -e '/ld[a-zA-Z0-9.]*$/!d' -e 's,///*,/,g' > t + for i in `cat t` + do rm -f t.$obj + if test -x $i && $i -r -o t.$obj doti.$obj && test -f t.$obj + then case $ld in + ld) ld=$i ;; + esac + ld_dir=`echo $i | sed 's,/[^/]*$,,'` + break + fi + done +fi +IFS=: +set x $PATH +IFS=$ifs +path=$* +m= +for c in $probe_ccs +do eval o='$'$c + case $o in + $c) ;; + *) continue ;; + esac + C='${c}' + for x in $cc_dir $ld_dir + do cd $x + for p in "${C}" "${C}[!a-zA-Z]*" "*[!a-zA-Z]${C}" "*[!a-zA-Z]${C}[!a-zA-Z]*" + do eval set x $p + case $# in + 2) if $executable $2 + then case $2 in + *$c*$c*);; + *) m=$p + break 3 + ;; + esac + fi + ;; + esac + done + done +done +cd $tmpdir +for c in $probe_ccs +do eval o='$'$c + case $o in + $c) ;; + *) continue ;; + esac + for x in $cc_dir $ld_dir + do if $executable $x/$c + then eval $c='$x/$c' + continue 2 + fi + case $m in + ?*) eval set x $x/$m + case $# in + 2) if $executable $2 + then eval $c='$2' + continue 2 + fi + ;; + esac + ;; + esac + done + for x in $path + do if $executable $x/$c + then eval $c='$x/$c' + break + fi + done +done +dld=$cc + +rm -f dynamic.$exe +if $cc -o dynamic.$exe dynamic.$obj && $executable dynamic.$exe +then mkdir mylib + echo > mylib/libc.$lib + eval set x $probe_ldlib + while : + do shift + case $# in + 0) break ;; + esac + rm -f dynamic.$exe + if eval $1=./mylib '$'cc -o dynamic.$exe dynamic.$obj + then : + else libpath=$1 + break + fi + done +fi +test `$cc -E libpp.$src | grep -c '^#pragma pp:version "libpp '` -eq 1 && libpp=1 +$cc -E doti.$src > doti.i && $cc -c doti.i && test -s doti.$obj && doti=1 +if $cc -c imusr.$src +then eval set x $probe_include_local + while : + do shift + case $# in + 0) break ;; + esac + if $cc -c $1 imusr.$src + then : "$1 should skip \"_i_.h\" in ." + elif $cc -c imstd.$src + then if $cc -c -Iim imstd.$src + then : '-Idir should find in dir' + elif $cc -c $1 -Iim imstd.$src + then : "$1 -Idir should find in dir" + elif $cc -c -Iim $1 imstd.$src + then include_local=$1 + break + else : "-Idir $1 should skip in dir" + fi + else : should find stdio.h + fi + done +else : 'should find "_i_.h" in .' +fi + +if $cc -c pic.$src 2>e +then e=`wc -l e` + s=`$size pic.$obj; wc pic.$obj` + eval set x $probe_pic + shift + while : + do case $# in + 0|1) break ;; + esac + pic=$1 + shift + PIC=$1 + shift + rm -f pic.$obj + $cc $pic -c pic.$src 2>e && test -f pic.$obj || continue + $cc $pic -o pic.$exe pic.$obj && test -f pic.$exe || { + rm -f pic.$exe + $cc -o pic.$exe pic.$obj && test -f pic.$exe && continue + } + case `wc -l e` in + $e) ;; + *) continue ;; + esac + case $pic in + ???*) m=`echo " $pic" | sed -e 's/^ [-+]//g' -e 's/./-& /g' -e 's/[-+] //g'` + rm -f pic.$obj pic1.$exe + if $cc $m -c pic.$src 2>e && test -f pic.$obj && + $cc -o pic1.$exe pic.$obj && test -f pic1.$exe + then case `wc -l e` in + $e) cc_pic=$m + break + ;; + esac + fi + cc_pic=$pic + break + ;; + *) case `$size pic.$obj; wc pic.$obj` in + $s) ;; + *) cc_pic=$pic + break + ;; + esac + ;; + esac + done + # this works around gcc 2.95 sun4 -fpic a.out core dump after exit + case $hosted:$cc_pic in + 1:?*) if ./pic.$exe + then # this catches lynxos.ppc gcc that dumps -fpic and not -mshared + echo 'static int* f() { static int v; return &v; } +int main() { f(); return 0; }' > picok.$src + $cc $cc_pic -o picok.$exe picok.$src && ./picok.$exe || cc_pic= + else cc_pic= + fi + ;; + esac + case $cc_pic in + ?*) rm -f pic.$obj + if $cc $PIC -c pic.$src 2>e && test -f pic.$obj + then cc_PIC=$PIC + else cc_PIC=$cc_pic + fi + ;; + *) eval set x $probe_dll + while : + do shift + case $# in + 0) break ;; + esac + rm -f pic.$obj pic.$exe + $cc $1 -c pic.$src 2>e && test -f pic.$obj || continue + $cc $1 -o pic.$exe pic.$obj && test -f pic.$exe || { + rm -f pic.$exe + $cc -o pic.$exe pic.$obj && test -f pic.$exe && continue + } + case $1 in + -Wc,*exportall*) + # get specific since SGI gets this far too + rm -f pic.$exe pic.x + $cc -Wl,dll -o pic.$exe pic.$obj || continue + test -f pic.$exe || continue + test -f pic.x || continue + cc_dll="-D_SHARE_EXT_VARS $1" + so=.x + sd=.dll + dld=$cc + shared=-Wl,dll + prefix_shared= + probe_sd= + probe_shared= + #unused# lddynamic=-Bdynamic + #unused# ldstatic=-Bstatic + lib_dll=SYMBOL + break + ;; + esac + case `wc -l e` in + $e) cc_dll=$1 + break + ;; + esac + done + ;; + esac +fi + +$cc -E -dD dDflag.$src > t +case `grep '#define[ ][ ]*dDflag[ ][ ]*on' t` in +?*) dDflag=1 ;; +esac +case `grep '#define.*_GNUC_' t` in +?*) gnu=1 ;; +esac +$cc -c stdc.$src && stdc=1 + +if $cc -c pic.$src +then eval set x $probe_nmflags + while : + do shift + case $# in + 0) break ;; + esac + case `$nm $1 pic.$obj | grep -c '[0123456789][ ][ ]*T[ ][ ]*[_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]'` in + 0) ;; + *) nmflags=$1 + break + ;; + esac + done + case $# in + 0) case `$nm -gh pic.$obj | grep -c '|\.*[TtDdBbC][EeAaSsOo][XxTtSsMm]'` in + 0) ;; + *) nmflags=-gh + nmedit="-e '/\.*[TtDdBbC][EeAaSsOo][XxTtSsMm]/!d' -e 's/[| ].*//'" + ;; + esac + ;; + *) nmedit="-e '/[ ]T[ ][ ]*[_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]/!d' -e 's/.*[ ]T[ ][ ]*//'" + ;; + esac +fi + +if $cc -c doti.$src +then eval set x $probe_stripflags + while : + do shift + case $# in + 0) break ;; + esac + if $strip $1 doti.$obj + then stripflags=$1 + break + fi + done +fi + +rm -f export.$obj export.exe +if $cc -c export.$src +then lm= + if $cc -o export.exe export.$obj -lm 2>e && lm=-lm || + $cc -o export.exe export.$obj 2>e + then z=`wc -c < export.exe; $size export.exe 2>/dev/null` + eval set x $probe_export_dynamic + while : + do shift + case $# in + 0) break ;; + esac + rm -f export.exe + if $cc -o export.exe $1 export.$obj $lm 2>f && $executable export.exe + then y=`wc -c < export.exe; $size export.exe 2>/dev/null` + case $y in + $z) ;; + *) if cmp -s e f + then export_dynamic=$1 + break + fi + ;; + esac + fi + done + fi +fi +rm -f export.$obj export.exe + +rm -f strip.exe +if $cc -o strip.exe strip.$src +then z=`wc -c < strip.exe` + eval set x $probe_ldstrip + while : + do shift + case $# in + 0) break ;; + esac + rm -f strip.exe + if $cc -o strip.exe $1 strip.$src + then case `wc -c < strip.exe` in + $z) ;; + *) ldstrip=$1 + break + ;; + esac + fi + done +fi + +rm -f strip.exe strip.$obj +if $cc -c strip.$src && $cc -o strip.exe strip.$obj 2>e +then eval set x x $probe_ldlazy + while : + do shift + shift + case $# in + 0) break ;; + esac + rm -f strip.$exe + $cc -o strip.$exe $1 strip.$obj $2 2>f && test -f strip.$exe || continue + cmp -s e f || continue + ldlazy=$1 + ldnolazy=$2 + break + done + eval set x x $probe_ldrecord + while : + do shift + shift + case $# in + 0) break ;; + esac + rm -f strip.$exe + $cc -o strip.$exe $1 strip.$obj $2 2>f && test -f strip.$exe || continue + cmp -s e f || continue + ldrecord=$1 + ldnorecord=$2 + break + done +fi + +case $cc_dll:$cc_pic:$so:$dynamic:$static in +::::|$cc_dll_def::::) + : last chance dynamic checks + while : + do + echo '__declspec(dllexport) int fun() { return 0; }' > exp.$src + if $cc -c $cc_dll_def exp.$src + then rm -f xxx.dll xxx.lib + if $cc -shared -Wl,--enable-auto-image-base -Wl,--out-implib=xxx.lib -o xxx.dll exp.$obj && + test -f xxx.lib -a -f xxx.dll + then + : Cygwin + cc_dll=$cc_dll_def + dll_dir='$(BINDIR)' + sd=.dll + so=.dll.a + ldscript=".def .exp .ign .res" + lib_dll=option + lib_all=-Wl,-whole-archive + lib_undef=-Wl,-no-whole-archive + dld=$cc + shared='-shared -Wl,--enable-auto-image-base -Wl,--out-implib=$(<:N=*'$so')' + prefix_dynamic=cyg + prefix_shared=lib + break + fi + fi + break + done + ;; +*) if $cc -c $cc_dll $cc_pic shared.$src && $cc -c $cc_dll $cc_pic notall.$src + then for xx in "$cc" "$ld" + do eval set x $probe_shared + while : + do shift + case $# in + 0) break ;; + esac + rm -f xxx$dll + # UNDENT ... + + if $xx $1 -o xxx$dll shared.$obj 2>e && test -r xxx$dll + then if test -s e && egrep -i 'unknown|invalid|option' e > /dev/null + then continue + fi + case `PATH=/bin:/usr/bin:$PATH file xxx$dll` in + *lib*|*obj*|*shared*) + ;; + "") $executable xxx$dll || continue + ;; + *ELF*|*elf*) + $executable xxx$dll || continue + case `strings xxx$dll | sed -e 's,.*[ |],,' | sort -u | egrep -i '^([._](dynamic|dynstr|dynsym))$'` in + [012]) continue ;; + esac + ;; + *archive*not*stripped*|*data*dynamic*not*stripped*) + $executable xxx$dll || continue + ;; + *) continue + ;; + esac + dld=$xx + shared=$1 + # does -nostartfiles make sense? + z=`wc -c < xxx$dll` + eval set x $probe_shared_nostart + while : + do shift + case $# in + 0) break ;; + esac + rm -f xxx$dll + if $dld $shared $1 -o xxx$dll shared.$obj 2>e && test -r xxx$dll + then case `wc -c < xxx$dll` in + $z) ;; + *) if test -s e + then case `cat e` in + *[Ee][Rr][Rr][Oo][Rr]*|*[Ww][Aa][Rr][Nn][Ii][Nn][Gg]*|*[Oo][Pp][Tt][Ii][Oo][Nn]*) + continue + ;; + esac + fi + case $shared in + '') shared=$1 ;; + *) shared="$shared $1" ;; + esac + break + ;; + esac + fi + done + case $cc_dll in + "") cc_dll=$cc_dll_def ;; + esac + eval set x x $probe_sd + while : + do shift + shift + case $# in + [01]) break ;; + esac + rm -f xxx xxx$1 xxx$2 + if $dld $shared -o xxx shared.$obj 2>e + then if test -f xxx$1 -a \( -f xxx$2 -o "$cc_dll" = "$cc_dll_def" \) + then sd=$1 + so=$2 + lddynamic=-Bdynamic + ldstatic=-Bstatic + break 2 + elif test -f xxx -a -f xxx$2 + then sd=$1 + so=$2 + break 2 + else case $so in + '') so=$1 ;; + esac + break + fi + fi + done + rm -f libxxx.$lib + $ar cr libxxx.$lib shared.$obj + ranlib libxxx.$lib + eval set x x $probe_lib_all_undef + rm -f xxx$dll + if $dld $shared -o xxx$dll libxxx.$lib && test -r xxx$dll + then if $nm $nmflags xxx$dll | grep ShareD + then lib_dll=OPTION + set x x + fi + fi + while : + do shift + shift + case $# in + 0|1) break ;; + esac + rm -f xxx$dll + if $dld $shared -o xxx$dll $1 libxxx.$lib $2 && test -r xxx$dll + then if $nm $nmflags xxx$dll | grep ShareD + then lib_dll=option + lib_all=$1 + lib_undef=$2 + break + fi + fi + case $2 in + ?*) if $dld $shared -o xxx$dll $1 libxxx.$lib && test -r xxx$dll + then if $nm $nmflags xxx$dll | grep ShareD + then lib_dll=option + lib_all=$1 + break + fi + fi + ;; + esac + done + case $lib_dll in + OPTION) lib_dll=option + ;; + option) case $lib_undef in + "") rm -f libyyy.$lib + $ar cr libyyy.$lib notall.$obj + ranlib libyyy.$lib + $cc -c prefix.$src + eval set x x $probe_lib_all_undef + while : + do shift + shift + case $# in + 0|1) break ;; + esac + rm -f xxx$dll + if $dld $shared -o xxx$dll prefix.$obj $lib_all libxxx.$lib $2 libyyy.$lib && test -r xxx$dll + then rm -f t + $nm $nmflags xxx$dll > t + case `grep -c ShareD t`:`grep -c NotalL t` in + 0:*) ;; + *:0) lib_undef=$2 + break + ;; + esac + fi + done + ;; + esac + case $lib_undef in + "") eval set x $probe_lib_multiple + rm -f libyyy.$lib + cp libxxx.$lib libyyy.$lib + rm -f xxx$dll + if $dld $shared -o xxx$dll prefix.$obj $lib_all libxxx.$lib libyyy.$lib && test -r xxx$dll + then : + else while : + do shift + case $# in + 0) break ;; + esac + rm -f xxx$dll + if $dld $shared -o xxx$dll prefix.$obj $lib_all $1 libxxx.$lib libyyy.$lib && test -r xxx$dll + then rm -f t + $nm $nmflags xxx$dll > t + case `grep -c ShareD t` in + 0) ;; + *) lib_all="$lib_all $1" + break + ;; + esac + fi + done + fi + lib_dll=symbol + ;; + esac + ;; + *) lib_dll=symbol + ;; + esac + case `cat e` in + ?*) eval set x $probe_unresolved + while : + do shift + case $# in + 0) break ;; + esac + rm -f xxx$dll + if eval '$dld $shared' $1 '-o xxx$dll shared.$obj 2>e && test -r xxx$dll' + then case `cat e` in + "") shared="$shared $1"; break ;; + esac + fi + done + ;; + esac + r= + eval set x $probe_shared_registry + while : + do shift + r=x$r + case $# in + 0) break ;; + esac + rm -f xxx$dll + if eval \$dld \$shared -o xxx\$dll $1 shared.\$obj && + test -r xxx$dll -a -r $probe_shared_registry_file + then probe_shared_registry_file='$(CC.SHARED.REGISTRY.PATH)' + eval set x $probe_shared_registry + i= + while : + do shift + i=x$i + case $i in + $r) break ;; + esac + done + shared_registry=$1 + fi + done + break 2 + fi + + # ... INDENT + done + done + fi + case $so in + ?*) rm -f xxx* + if $dld $shared -g -o xxx shared.$obj 2>e + then set x $probe_sdb + while : + do shift + case $1 in + 0) break ;; + esac + if test -f xxx$1 + then sdb=$1 + break + fi + done + fi + if $cc -c require.$src + then p=' +/usr/proberun/lib:/local/runprobe/lib +' + eval set x $probe_ldrunpath + while : + do shift + case $# in + 0) break ;; + esac + rm -f require.exe + if $cc -o require.exe $1"$p" require.$obj && + grep -c /proberun/ require.exe >/dev/null && + grep -c /runprobe/ require.exe > /dev/null + then ldrunpath=$1 + eval set x $probe_ldorigin + while : + do shift + case $# in + 0) break ;; + esac + rm -f origin.exe + if $cc -o origin.exe $1 $ldrunpath'$ORIGIN' require.$obj + then if ./origin.exe > /dev/null 2>&1 + then ldorigin="$1 $ldrunpath"'\$ORIGIN/$(BINDIR:P=R=$(DLLDIR))' + fi + break + fi + done + break + fi + done + fi + rm -f libxxx$so + if $cc -c sovmain.$src && + $cc -c $cc_dll $cc_pic sovlib.c && + $dld $shared -o libxxx$so sovlib.$obj && + $cc -o sovmain.$exe -L. sovmain.$obj -lxxx + then rm -f sovmain.$exe + mv libxxx$so libxxx$so.5.6 + if $cc -o sovmain.$exe -L. sovmain.$obj -lxxx + then soversion=1 + fi + fi + rm -f doti.$obj + std64=/lib64 + lcl64=/usr/local/lib64 + if test -d $std64 -a -d $lcl64 && $cc -c doti.$src + then for i in `cd $lcl64; ls *$so 2>/dev/null | sed 's/lib\([^.]*\).*/\1/'` + do if $cc -o runpath.$exe doti.$obj -l$i >/dev/null 2>&1 + then LD_LIBRARY_PATH= ./runpath.$exe >/dev/null 2>&1 && continue + if LD_LIBRARY_PATH=$lcl64 ./runpath.$exe >/dev/null 2>&1 + then runpath=$lcl64 + break + elif LD_LIBRARY_PATH=$std64 ./runpath.$exe >/dev/null 2>&1 + then runpath=$std64 + break + elif LD_LIBRARY_PATH=$lcl64:$std64 ./runpath.$exe >/dev/null 2>&1 + then runpath=$lcl64:$std64 + break + fi + fi + done + fi + ;; + esac + ;; +esac + +rm -f shared.$obj +if $cc -c shared.$src +then eval set x $probe_ar_arflags + while : + do shift + case $# in + 0) break ;; + esac + rm -f libxxx.$lib + if $ar $1 r libxxx.$lib shared.$obj && $ar $1 t libxxx.$lib 2>&1 | grep shared.$obj >/dev/null + then ar_arflags=$1 + break + fi + done + eval set x $probe_arflags + while : + do shift + case $# in + 0) break ;; + esac + rm -f libxxx.$lib + if $cc $1 -o libxxx.$lib shared.$obj && $ar t libxxx.$lib 2>&1 | grep shared.$obj >/dev/null + then arflags=$1 + break + fi + done +fi + +case $shared in +-G) case $cc_dll in + "") cc_dll=$cc_dll_def ;; + esac + ;; +*) case $lib_dll in + symbol) echo 'extern int f(); + int main() { f(); return 0; }' > main.$src + echo '#include + int f() { printf("hello world"); return 0; }' > member.$src + if $cc -c main.$src && $cc -c member.$src + then echo f > lib.exp + rm -f lib.$obj main.exe + if $ld -o lib.$obj -L: -bexport:lib.exp -berok -bmodtype:SRE -T512 -H512 -lm -lc member.$obj && $cc -o main.exe main.$obj lib.$obj + then dld=$ld + shared='-T512 -H512 -L$(LIBDIR): -berok -bmodtype:SRE' + lib_dll=export + dll_libraries='-lm -lc' + ldscript=.exp + case $cc_dll in + "") cc_dll=$cc_dll_def ;; + esac + case $so in + "") so=.$obj ;; + esac + fi + fi + ;; + esac + ;; +esac +case $shared in +?*) if $cc -c $cc_dll $cc_pic shared.$src + then eval set x $probe_shared_name + while : + do shift + case $# in + 0) break ;; + esac + rm -f xxx$dll + if $dld $shared ${1}libfoo.1.2 -o xxx$dll shared.$obj 2>e && test -r xxx$dll + then shared_name=$1 + break + fi + done + fi + ;; +esac +case " $cc_dll " in +*" $cc_dll_def "*) + ;; +" ") ;; +*) cc_dll="$cc_dll_def $cc_dll" + ;; +esac + +case $hosttype in +win32.*|cygwin.*|os2.*) + Lflag=1 + ;; +*) if $cc -c doti.$src + then if $cc -L. doti.$obj -lc >/dev/null + then case $cc_dll in + '') ;; + *) Lflag=1 ;; + esac + fi + fi + ;; +esac + +case $lib_dll in +option) case $hosttype in + linux.*) dll_libraries=-lc ;; + esac + ;; +SYMBOL) lib_dll=symbol + ;; +symbol) echo "#include +extern int fun() +{ + puts(\"fun\"); + return 0; +}" > dllib.$src + echo "extern int fun(); +int +main() +{ + return fun(); +}" > dlmain.$src + pwd=`pwd` + while : + do + if $cc -c $cc_dll $cc_pic dlmain.$src && + $cc -c $cc_dll $cc_pic dllib.$src + then rm -f libxxx$so + if $dld $shared -o libxxx$so dllib.$obj && + chmod 555 libxxx$so + then rm -f dlmain.$exe + if $cc -o dlmain.$exe dlmain.$obj $pwd/libxxx$so && + (./dlmain.$exe) >/dev/null 2>&1 + then break + fi + fi + rm -f libxxx$so dlmain.$exe + if $dld $shared -o libxxx$so dllib.$obj -lm -lc && + chmod 555 libxxx$so && + $cc -o dlmain.$exe dlmain.$obj $pwd/libxxx$so && + (./dlmain.$exe) >/dev/null 2>&1 + then dll_libraries='-lm -lc' + fi + fi + break + done + # the dll_libraries probe is still lame + case $dll_libraries in + '') case $hosttype in + sco.*|sol*.*|sun*) ;; + *) dll_libraries='-lm -lc' ;; + esac + ;; + esac + ;; +esac + +stdlib= +a=`$cc -print-multi-directory 2>/dev/null` +case $a in +.) ;; +*) for d in `$cc -print-search-dirs 2>/dev/null | sed -e '/^libraries:/!d' -e 's/.*=//' | tr : '\n' | grep /lib/` + do if [ -d ${d}${a} ] + then stdlib="$stdlib ${d}${a}" + else case $d in + */lib/) d=`echo '' $d | sed -e 's,/$,,'` + if [ -d ${d}${a} ] + then stdlib="$stdlib ${d}${a}" + fi + ;; + esac + fi + done + ;; +esac +case $stdlib in +'') stdlib=`$cc -v doti.$src 2>&1 | + sed 's/ */\n/g' | + sed -e '/^-L/!d' -e 's/^-L//' | + while read dir + do if test -d "$dir" + then (cd "$dir"; pwd) + fi + done` + ;; +*) eval set x $probe_verbose + shift + for o in "$@" + do stdlib="$stdlib "`$cc $o doti.$src 2>&1 | + sed 's/ */\n/g' | + sed -e '/^-L/!d' -e '/\/lib64$/!d' -e 's/^-L//'` + done + ;; +esac +case $stdlib in +?*) keepstdlib=1 + o=$stdlib + stdlib= + for dir in $o + do case " $stdlib " in + *" $o "*) continue ;; + esac + case $dir in + /usr/lib64) + i=/usr/local/lib64 + a=/lib64 + ;; + /lib64) i=/usr/local/lib64 + a=/usr/lib64 + ;; + /usr/lib) + i=/usr/local/lib + a=/lib + ;; + lib) i=/usr/local/lib + a=/usr/lib + ;; + *) i= + a= + ;; + esac + if test "" != "$i" -a -d "$i" + then case " $o " in + *" $i "*) + ;; + *) stdlib="$stdlib $i" + ;; + esac + fi + stdlib="$stdlib $dir" + if test "" != "$a" -a -d "$a" + then case " $o " in + *" $a "*) + ;; + *) stdlib="$stdlib $a" + ;; + esac + fi + done + case $hosted in + 1) case " $stdlib " in + *" /usr/lib "*) + ;; + *) case " $stdlib " in + *" /usr/local/lib "*) + ;; + *) stdlib="$stdlib /usr/local/lib" + ;; + esac + stdlib="$stdlib /usr/lib" + ;; + esac + case " $stdlib " in + *" /lib "*) + ;; + *) stdlib="$stdlib /lib" + ;; + esac + esac + ;; +*) keepstdlib=0 + case $dir in + */arch/$hosttype/lib/*) + notlib=`echo $dir | sed "s,/arch/$hosttype/lib/.*,/arch/$hosttype/lib,"` + ;; + *) notlib=//// + ;; + esac + tstlib= + implib= + if $cc -c hosted.$src + then for f in `( + eval set x $probe_verbose + while : + do shift + case $# in + 0) break ;; + esac + $cc $1 hosted.$obj + done + ) 2>&1 | sed -e 's/[ :]/\\ + /g' -e 's/-L//g' -e 's/^P,//' -e "s/[\"']//g" -e 's,^[\\\\/]*[\\\\/],/,' | sed -e '/^\$/d' -e '/^[-+]/d' -e '/^[^\\\\\\/]/d' -e '/[\\\\\\/]tmp[\\\\\\/]/d' -e 's/:\$//' -e 's,//*$,,'` + do case " $tstlib $implib " in + *" $f "*) continue ;; + esac + case $f in + $notlib) continue ;; + esac + if test -d $f + then tstlib="$tstlib $f" + elif test -f $f + then d=`echo $f | sed -e 's,[\\\\/]*[^\\\\/]*\$,,'` + case " $tstlib $implib " in + *" $d "*) continue ;; + esac + case $d in + *[\\/]usr[\\/]lib) + x=$d + d="`echo $d | sed -e 's,[\\\\/][\\\\/]*usr[\\\\/]lib\$,/lib,'`" + case " $tstlib $implib " in + *" $d "*) ;; + *) implib="$implib $d" ;; + esac + implib="$implib $x" + ;; + *[\\/]lib) + implib="$implib $d" + d="`echo $d | sed -e 's,[\\\\/][\\\\/]*lib\$,/usr/lib,'`" + case " $tstlib $implib " in + *" $d "*) ;; + *) implib="$implib $d" ;; + esac + ;; + *) implib="$implib $d" + ;; + esac + fi + done + fi + tstlib="$tstlib $implib" + if $cc -Dtype=void -Dcall=exit -c tstlib.$src && mv tstlib.$obj tst.$obj + then probe_lxx= + l= + for sym in $probe_l $probe_lxx + do case $l in + "") l=$sym; continue ;; + esac + rm -f tstlib.$exe + if $cc -o tstlib.$exe tst.$obj -l$l + then eval set x $probe_ldmap + while : + do shift + case $# in + 0) break ;; + esac + d=`$cc -Dtype=int -Dcall=$sym $static $1 tstlib.$src -l$l 2>&1 | sed -e '/[\\\\\\/].*[\\\\\\/]lib[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+]*\.[^\\\\\\/]*\$/!d' -e 's,^[^\\\\\/]*,,' -e 's,[\\\\\\/]lib[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+]*\.[^\\\\\\/]*\$,,' -e '/^[\\\\\\/]/!d' | sort -u` + case $d in + ?*) tstlib="$tstlib $d" ;; + esac + done + fi + l= + done + fi + libstd= + libset= + stdlibroot="/ /usr/" + for d in $tstlib + do case $d in + [\\/]lib|[\\/]usr[\\/]lib) + ;; + *) case " $stdlib " in + *\ $d\ *) + ;; + *) if ls $d ${PREROOT+$PREROOT/../$d} > tmp.tmp && test -s tmp.tmp + then for i in $probe_lib $obj + do if grep -i "\\.$i\$" tmp.tmp >/dev/null + then case " $probe_lib_append " in + *\ $d\ *) + libstd="$libstd $d" + ;; + *) stdlib="$stdlib $d" + case $d in + /usr/lib|/usr/lib/*) + ;; + /usr/lib?*) + e=`echo $d | sed -e 's,/usr,,'` + g=`echo $d/libc.* $e/libc.*` + case "$e $g " in + *".* "*);; + *) stdlib="$stdlib $e" + stdlibroot= + ;; + esac + ;; + esac + ;; + esac + case $libset in + "") case $i in + $obj) ;; + *) libset=1 + lib=$i + ;; + esac + ;; + esac + break + fi + done + fi + ;; + esac + ;; + esac + done + for d in `$ld --verbose 2>&1 | sed -e '/SEARCH_DIR/!d' -e 's/[ ][ ][ ]*/ /g' -e 's/SEARCH_DIR(\([^ ]*\));/\1/g' -e 's, //[^ ]*,,' -e 's,",,g'` + do if test -d $d + then case " $stdlib $libstd " in + *\ ${d}\ *) + ;; + *) libstd="$libstd $d" + ;; + esac + fi + done + case $hosted in + "") tstlib= ;; + *) tstlib="$stdlibroot /usr/ccs/ /usr/local/" ;; + esac + case $stdlibroot in + ?*) d= + for f in $stdinclude + do f=`echo $f | sed -e 's,[^\\\\/]*\$,,'` + d="$d $f" + done + tstlib="$d $tstlib" + ;; + esac + $cc -c doti.$src > all.tmp + for f in $probe_libdir + do for d in $stdlib $libstd $tstlib + do if test -d ${d}${f} + then ls ${d}${f} ${PREROOT:+$PREROOT/../${d}${f}} | + while read i + do for j in ${d}${f}/${i} ${PREROOT:+$PREROOT/../${d}${f}/${i}} + do if test -f $j -a -r $j -a -s $j + then echo $i + break + fi + done + done > tmp.tmp + if test -s tmp.tmp + then if egrep -i "^${prefix_archive}[abcdefghijklmnopqrstuvwxyz0123456789_][abcdefghijklmnopqrstuvwxyz0123456789_]*\\.$lib\$" tmp.tmp >lib.tmp || + egrep -i "\\.$obj\$" tmp.tmp >/dev/null || + egrep -i "^${prefix_shared}[abcdefghijklmnopqrstuvwxyz0123456789_][abcdefghijklmnopqrstuvwxyz0123456789_]*\\$so(.[0-9]+)*\$" tmp.tmp >>lib.tmp + then if test -s lib.tmp + then sed -e "s,.*/,," -e 's,^'${prefix_archive}'\(.*\)\.'$lib'$,\1,g' -e 's,^'${prefix_shared}'\(.*\)\'$so'[.0-9]*,\1,g' lib.tmp | sort -u > tmp.tmp + xs=`sort all.tmp all.tmp tmp.tmp | uniq -u` + case $xs in + '') continue ;; + esac + ok=0 + for x in $xs + do case $x in + *_p) continue ;; # Linux gcc known to hang for -lc_p + esac + if $cc -o doti.$exe doti.$obj -l$x 2>e + then ok=1 + else if test -s e && egrep -i ":.*[ ](find|found|locate|search|-l$x)[ ]" e > /dev/null + then if egrep -i ":.*[ ](access|permission)[ ]" e + then : maybe + else ok=0 + break + fi + fi + case $Lflag in + 1) if $cc -L${d}${f} -o doti.$exe doti.$obj -l$x + then ok=0 + break + fi + ;; + esac + fi + done + case $ok in + 0) continue ;; + esac + sort -u all.tmp tmp.tmp > lib.tmp + mv lib.tmp all.tmp + fi + case " $stdlib $libstd " in + *" ${d}${f} "*) + ;; + *) if test -d ${d}${f}/fsoft + then stdlib="$stdlib ${d}${f}/"'$(FLOAT_OPTION)' + fi + stdlib="$stdlib ${d}${f}" + ;; + esac + fi + fi + fi + done + done + stdlib="$stdlib $libstd" + case $stdlib in + */shlib*) + dy= + st= + for i in $stdlib $libstd + do case $i in + */shlib) dy="$dy $i" ;; + *) st="$st $i" ;; + esac + done + for i in /var + do if test -d $i/shlib + then dy="$dy $i/shlib" + fi + done + stdlib="$dy $st" + ;; + esac + ;; +esac + +if $cc -c prefix.$src +then eval set x $probe_symprefix + while : + do shift + case $# in + 0) break ;; + esac + if $nm $nmflags prefix.$obj | grep -c ${1}prefix >/dev/null + then symprefix=$1 + break + fi + done +fi + +if $cc -c warn.$src 2>e && test -f warn.$obj +then e=`wc -c < e` + + eval set x $probe_debug + while : + do shift + case $# in + 0) break ;; + esac + rm -f warn.$obj + $cc $1 -c warn.$src 2>e && test -f warn.$obj || continue + case `wc -c < e` in + $e) debug=$1; break ;; + esac + done + + eval set x $probe_no_protect + while : + do shift + case $# in + 0) break ;; + esac + rm -f warn.$obj + $cc $1 -c warn.$src 2>e && test -f warn.$obj || continue + case `wc -c < e` in + $e) no_protect=$1; break ;; + esac + done + + case $version_string in + $probe_gcc_version) probe_optimize="$probe_gcc_optimize $probe_optimize" ;; + esac + for i in $probe_optimize + do rm -f warn.$obj + $cc $i -c warn.$src 2>e && test -f warn.$obj || continue + case `wc -c < e` in + $e) optimize=$i; break ;; + esac + done + + eval set x $probe_strict + while : + do shift + case $# in + 0) break ;; + esac + rm -f warn.$obj + $cc $1 -c warn.$src 2>e && test -f warn.$obj || continue + n=`wc -c < e` + if test $n -ge $e + then strict=$1 + break + fi + done + + $cc -c warn1.$src 2>e + o=`wc -c < e` + eval set x $probe_warn + while : + do shift + case $# in + 0) break ;; + esac + rm -f warn.$obj warn.$exe + $cc -o warn.$exe $1 warn.$src 2>e && test -f warn.$exe || continue + n=`wc -c < e` + for i in $warn_enum + do rm -f warn$i.$obj + $cc -c $1 warn$i.$src 2>e && test -f warn$i.$obj || continue + n=`wc -c < e` + if test $n -gt $o + then warn=$1 + break 2 + fi + done + done + +fi + +while : +do case $hosted in + 1) rm -f readonly.$exe + eval set x '""' $probe_readonly + while : + do shift + case $# in + 0) break ;; + esac + for co in '' -Dtest_const + do rm -f readonly.$exe + if $cc -o readonly.$exe $co $1 readonly.$src && $executable readonly.$exe + then if ./readonly.$exe >/dev/null 2>&1 + then : + else readonly=$1 + break 3 + fi + fi + done + done + rm -f readonly.$exe readonly.s + if $cc -S readonly.$src && test -f readonly.s + then if sed -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)data/\1text/' \ + -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)zero[ ][ ]*/\1set .,.+/' \ + -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)space[ ][ ]*1/\1byte 0/' \ + -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)space[ ][ ]*2/\1byte 0,0/' \ + -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)space[ ][ ]*3/\1byte 0,0,0/' \ + -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)space[ ][ ]*4/\1byte 0,0,0,0/' \ + readonly.s > ro.s && $cc -o readonly.$exe ro.s && $executable readonly.$exe + then if ./readonly.$exe >/dev/null 2>&1 + then : + else readonly='-S.data' + break + fi + fi + rm -f readonly.$exe + if sed -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)idat/\1code/' \ + -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)zero[ ][ ]*/\1set .,.+/' \ + -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)space[ ][ ]*1/\1byte 0/' \ + -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)space[ ][ ]*2/\1byte 0,0/' \ + -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)space[ ][ ]*3/\1byte 0,0,0/' \ + -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)space[ ][ ]*4/\1byte 0,0,0,0/' \ + readonly.s > ro.s && $cc -o readonly.$exe ro.s && $executable readonly.$exe + then if ./readonly.$exe >/dev/null 2>&1 + then : + else readonly='-S.idat' + break + fi + fi + if sed -e 's/^\([ ]*[.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$:]*[ ]*\.*\)data/\1rdata/' \ + readonly.s > ro.s && $cc -o readonly.$exe ro.s && $executable readonly.$exe + then if ./readonly.$exe >/dev/null 2>&1 + then : + else readonly='-S.rdata' + break + fi + fi + fi + ;; + esac + break +done + +case $stdc in +?*) dialect="$dialect ANSI" ;; +esac +case $hosted in +"") dialect="$dialect CROSS" ;; +esac +case $doti in +?*) dialect="$dialect DOTI" ;; +esac +case $gnu in +?*) dialect="$dialect GNU" ;; +esac +case $so:$dynamic:$static in +::) ;; +*) dialect="$dialect DYNAMIC" + case $soversion in + ?*) dialect="$dialect VERSION" ;; + esac + ;; +esac +case $implicitc in +?*) dialect="$dialect IMPLICITC" ;; +esac +case $ptrcopy in +?*) dialect="$dialect PTRCOPY" ;; +esac +case $ptrimplicit in +?*) dialect="$dialect PTRIMPLICIT" ;; +esac +case $ptrmkdir in +?*) dialect="$dialect PTRMKDIR" ;; +esac +case $libpp in +?*) dialect="$dialect LIBPP" ;; +esac +case $toucho in +?*) dialect="$dialect TOUCHO" ;; +esac +case $dDflag in +?*) dialect="$dialect -dD" ;; +esac +# 2005-05-25 use $(CC.INCLUDE.LOCAL) instead +case $include_local in +?*) dialect="$dialect -I-" ;; +esac +case $Lflag in +?*) dialect="$dialect -L" ;; +esac + +ppcmd='$(CPP)' +ppdir='$(CPP:D)' +eval ppopt='"'$ppopt'"' +eval ppenv='"'$ppenv'"' + +set x "" .$exe +shift +exe= +for i +do rm -f require$i +done +if $cc -o require require.$src +then for i + do if $executable require$i + then exe=$i + break + fi + done +fi +case $sa:$sd:$so in +::?*) eval set x $probe_sa + while : + do shift + case $# in + 0) break ;; + esac + for i in $stdlib + do eval j="'" $i/lib*$1 "'" + case $j in + " $i/lib*$1 ") + eval j="'" $i/lib*$1.[0123456789]* "'" + case $j in + " $i/lib*$1.[0123456789]* ") + continue + ;; + esac + ;; + esac + sa=$1 + lddynamic=-Bdynamic + ldstatic=-Bstatic + break 2 + done + done + ;; +esac +case $ldscript in +"") case $so in + .lib) ldscript=".def .exp" ;; + *) ldscript=".ld" ;; + esac + ;; +esac +case $hosttype in +'') hosttype=unknown ;; +sgi.mips3) dll_variants='sgi.mips2:o32:-mips2 sgi.mips4:64:-mips4' ;; +sgi.mips4) dll_variants='sgi.mips2:o32:-mips2 sgi.mips3:n32:-mips3' ;; +esac + +case $hosted in +"") ccnative=`echo $cc | sed -e 's,.*/,,'` + ccs=$ccnative + for c in cc gcc + do case " $ccs " in + *" $c "*) ;; + *) ccs="$ccs $c" ;; + esac + done + for p in $path + do for c in $ccs + do if $executable $p/$c + then rm -f native.$exe + if $p/$c -o native.$exe doti.$src && ./native.$exe + then ccnative=$p/$c + exectype=`package CC="$ccnative" || $SHELL -c "package CC='$ccnative'"` + case $exectype in + *[Uu][Ss][Aa][Gg][Ee]:*) + exectype=`PATH=$_probe_PATH; export PATH; package CC="$ccnative" || $SHELL -c "package CC='$ccnative'"` + ;; + esac + break 2 + fi + fi + done + done + ;; +*) ccnative=$cc + exectype=$hosttype + ;; +esac + +# runtime shared lib exported symbol resolution + +case $cc_dll:$shared in +:|:*|*:);; +*) cat > cmd.c <<'!' +#include +#include +typedef int (*Lib_f)(int**, int**, int**); +int gbl_def = 1; +int gbl_ref = 1; +int gbl_ext; +int main(int argc, char** argv) +{ + void* dll; + Lib_f lib; + int* def; + int* ref; + int* ext; + + if (!(dll = dlopen(*++argv, RTLD_LAZY))) + fprintf(stderr, "library not found\n"); + else if (!((lib = (Lib_f)dlsym(dll, "lib"))) && !(lib = (Lib_f)dlsym(dll, "_lib"))) + fprintf(stderr, "symbol not found\n"); + else if ((*lib)(&def, &ref, &ext)) + fprintf(stderr, "function failed\n"); + else if (def == &gbl_def && ref == &gbl_ref && ext == &gbl_ext) + printf("ALL\n"); + else if (ref == &gbl_ref && ext == &gbl_ext) + printf("REF\n"); + else if (ext == &gbl_ext) + printf("EXT\n"); + return 0; +} +! + cat > lib.c <<'!' +int gbl_def = 1; +int gbl_ref; +int gbl_ext; +int lib(int** def, int** ref, int** ext) +{ + *def = &gbl_def; + *ref = &gbl_ref; + *ext = &gbl_ext; + return 0; +} +! + if $cc -c $cc_dll $cc_pic cmd.c && + $cc -c $cc_dll $cc_pic lib.c && { + $cc $cc_dll $export_dynamic -o cmd.exe cmd.o || + $cc $cc_dll $export_dynamic -o cmd.exe cmd.o -ldl + } && + $dld $shared -o libgbl.dll lib.o + then x=`./cmd.exe ./libgbl.dll` + case $x in + ?*) dialect="$dialect EXPORT=$x" ;; + esac + else case $sd:$hosttype in + .dll:*win*) dialect="$dialect EXPORT=DLL" ;; + esac + fi + ;; +esac + +# shellmagic defined if installed shell scripts need magic + +echo ': got magic : +echo ok' > ok +chmod +x ok +case `(eval ./ok | /bin/sh) 2>/dev/null` in +ok) ;; +*) echo '#!/bin/env sh +: got magic : +echo ok' > ok + chmod +x ok + case `(eval ./ok | /bin/sh) 2>/dev/null` in + ok) shellmagic='$("#")!/bin/env sh' + ;; + *) for i in /emx/bin/bash.exe /emx/bin/sh.exe + do if test -x $i + then shellmagic='$("#")!'$i + break + fi + done + ;; + esac + ;; +esac + +# +# path cleanup +# + +for i in ar ccnative dld ld nm size stdinclude stdlib strip +do eval o='$'$i + v=$o + case $v in + *//*) v=`echo $v | sed 's,///*,/,g'` ;; + esac + if (test . -ef "`pwd`") + then k= + for x in $v + do case $x in + */../*|*/..) + case $x in + /*) a=/ ;; + *) a= ;; + esac + IFS=/ + set '' $x + IFS=$ifs + r= + for d + do r="$d $r" + done + p= + g= + for d in $r + do case $d in + ..) g="$g $d" ;; + *) case $g in + '') case $p in + '') p=$d ;; + *) p=$d/$p ;; + esac + ;; + *) set $g + shift + g=$* + ;; + esac + ;; + esac + done + case $a in + '') for d in $g + do p=$d/$p + done + ;; + *) p=$a$p + ;; + esac + case $p in + /) continue ;; + esac + test $x -ef $p && x=$p + ;; + esac + k="$k $x" + done + set '' $k + shift + v=$1 + case $# in + 0) ;; + *) shift + while : + do case $# in + 0) break ;; + esac + k= + for d + do for j in $v + do test $d -ef $j && continue 2 + done + k="$k $d" + done + set '' $k + case $# in + 1) break ;; + esac + shift + v="$v $1" + shift + done + ;; + esac + fi + case $v in + $o) ;; + *) eval $i='$'v ;; + esac +done + +case $keepstdlib in +1) ;; +*) # + # favor lib64 over lib + # + case $hosttype in + *64|*[!0-9]64[!a-zA-Z0-9]*) + o=$stdlib + stdlib= + for i in $o + do case " $stdlib " in + *" $i "*) + continue + ;; + esac + case $i in + *64) stdlib="$stdlib $i" + continue + ;; + esac + case " $o " in + *" ${i}64 "*) + case " $stdlib " in + *" ${i}64 "*) + ;; + *) stdlib="$stdlib ${i}64" + ;; + esac + ;; + esac + stdlib="$stdlib $i" + done + ;; + esac + ;; +esac + +# +# set up for local override +# + +CC_VERSION_STAMP=$version_stamp +CC_VERSION_STRING=$version_string +CC_CC=$cc +CC_NATIVE=$ccnative +CC_EXECTYPE=$exectype +CC_HOSTTYPE=$hosttype +CC_ALTPP_FLAGS=$ppopt +CC_ALTPP_ENV=$ppenv +CC_AR=$ar +CC_AR_ARFLAGS=$ar_arflags +CC_ARFLAGS=$arflags +CC_DEBUG=$debug +CC_DIALECT=$dialect +CC_PICBIG=$cc_PIC +CC_PICSMALL=$cc_pic +CC_PIC=$CC_PICBIG +CC_DLL_ONLY=$cc_dll +case $CC_DLL_ONLY in +'') CC_DLLBIG= + CC_DLLSMALL= + CC_DLL= + ;; +*) CC_DLLBIG="$CC_DLL_ONLY $CC_PICBIG" + CC_DLLSMALL="$CC_DLL_ONLY $CC_PICSMALL" + CC_DLL="$CC_DLL_ONLY $CC_PICBIG" + ;; +esac +CC_DLL_DIR=$dll_dir +CC_DLL_LIBRARIES=$dll_libraries +CC_DLL_VARIANTS=$dll_variants +CC_DYNAMIC=$dynamic +CC_EXPORT_DYNAMIC=$export_dynamic +CC_INCLUDE_LOCAL=$include_local +CC_LD=$ld +CC_LD_DYNAMIC=$lddynamic +CC_LD_LAZY=$ldlazy +CC_LD_NOLAZY=$ldnolazy +CC_LD_ORIGIN=$ldorigin +CC_LD_RECORD=$ldrecord +CC_LD_NORECORD=$ldnorecord +CC_LD_RUNPATH=$ldrunpath +CC_LD_STATIC=$ldstatic +CC_LD_STRIP=$ldstrip +CC_LIB_DLL=$lib_dll +CC_LIB_ALL=$lib_all +CC_LIB_UNDEF=$lib_undef +CC_MAKE_OPTIONS=$makeoptions +CC_NM=$nm +CC_NMEDIT=$nmedit +CC_NMFLAGS=$nmflags +CC_NOPROTECT=$no_protect +CC_OPTIMIZE=$optimize +CC_READONLY=$readonly +CC_REPOSITORY=$repository +CC_REQUIRE=$require +CC_RUNPATH=$runpath +CC_SHARED=$shared +CC_SHARED_LD=$dld +CC_SHARED_NAME=$shared_name +CC_SHARED_REGISTRY=$shared_registry +CC_SHARED_REGISTRY_PATH=$probe_shared_registry_path +CC_SHELLMAGIC=$shellmagic +CC_SIZE=$size +CC_STATIC=$static +CC_STDINCLUDE=$stdinclude +CC_STDLIB=$stdlib +CC_STRICT=$strict +CC_STRIP=$strip +CC_STRIP_FLAGS=$stripflags +CC_PREFIX_ARCHIVE=$prefix_archive +CC_PREFIX_DYNAMIC=$prefix_dynamic +CC_PREFIX_SHARED=$prefix_shared +CC_PREFIX_SYMBOL=$symprefix +CC_SUFFIX_ARCHIVE=.$lib +CC_SUFFIX_COMMAND=$suffix_command +CC_SUFFIX_DEBUG=$sdb +CC_SUFFIX_DYNAMIC=$sd +CC_SUFFIX_LD=$ldscript +CC_SUFFIX_OBJECT=.$obj +CC_SUFFIX_SHARED=$so +CC_SUFFIX_SOURCE=.$src +CC_SUFFIX_STATIC=$sa +CC_VERSION=$version_flags +CC_WARN=$warn +CC_ATTRIBUTES=$ATTRIBUTES + +exec >&3 + +# +# check for local override +# all CC_* but { CC_CC CC_VERSION_STAMP CC_VERSION_STRING } may be modified +# additional CC.* may be printed on stdout +# + +if test -f "$dir/probe.lcl" +then . "$dir/probe.lcl" +fi + +# +# the payoff +# + +case $version_stamp in +?*) echo "# $version_stamp" ;; +esac +echo CC.CC = $cc +echo CC.NATIVE = $CC_NATIVE +echo CC.EXECTYPE = $CC_EXECTYPE +echo CC.HOSTTYPE = $CC_HOSTTYPE +echo CC.ALTPP.FLAGS = $CC_ALTPP_FLAGS +echo CC.ALTPP.ENV = $CC_ALTPP_ENV +echo CC.AR = $CC_AR +echo CC.AR.ARFLAGS = $CC_AR_ARFLAGS +echo CC.ARFLAGS = $CC_ARFLAGS +echo CC.DEBUG = $CC_DEBUG +echo CC.DIALECT = $CC_DIALECT +echo CC.DLLBIG = $CC_DLLBIG +echo CC.DLLSMALL = $CC_DLLSMALL +echo CC.DLL = $CC_DLL +echo CC.DLL.DEF = $cc_dll_def +echo CC.DLL.DIR = $CC_DLL_DIR +echo CC.DLL.LIBRARIES = $CC_DLL_LIBRARIES +echo CC.DLL.VARIANTS = $CC_DLL_VARIANTS +echo CC.DYNAMIC = $CC_DYNAMIC +echo CC.EXPORT.DYNAMIC = $CC_EXPORT_DYNAMIC +echo CC.INCLUDE.LOCAL = $CC_INCLUDE_LOCAL +# +# 2004-02-14 release workaround +# +case $CC_SHARED_LD in +$CC_CC) echo if LDSHARED + echo CC.LD = $CC_LD + echo else + echo CC.LD = $CC_CC + echo end + ;; +*) echo CC.LD = $CC_LD + ;; +esac +echo CC.LD.DYNAMIC = $CC_LD_DYNAMIC +echo CC.LD.LAZY = $CC_LD_LAZY +echo CC.LD.NOLAZY = $CC_LD_NOLAZY +echo CC.LD.ORIGIN = $CC_LD_ORIGIN +echo CC.LD.RECORD = $CC_LD_RECORD +echo CC.LD.NORECORD = $CC_LD_NORECORD +echo CC.LD.RUNPATH = $CC_LD_RUNPATH +echo CC.LD.STATIC = $CC_LD_STATIC +echo CC.LD.STRIP = $CC_LD_STRIP +echo CC.LIB.DLL = $CC_LIB_DLL +echo CC.LIB.ALL = $CC_LIB_ALL +echo CC.LIB.UNDEF = $CC_LIB_UNDEF +echo CC.MAKE.OPTIONS = $CC_MAKE_OPTIONS +echo CC.NM = $CC_NM +case $CC_NMEDIT in +?*) CC_NMEDIT=" $CC_NMEDIT" ;; +esac +echo CC.NMEDIT ="$CC_NMEDIT" +echo CC.NMFLAGS = $CC_NMFLAGS +echo CC.NOPROTECT = $CC_NOPROTECT +echo CC.OPTIMIZE = $CC_OPTIMIZE +echo CC.PICBIG = $CC_PICBIG +echo CC.PICSMALL = $CC_PICSMALL +echo CC.PIC = $CC_PIC +echo CC.READONLY = $CC_READONLY +echo CC.REPOSITORY = $CC_REPOSITORY +for f in $CC_REQUIRE +do echo CC.REQUIRE.$f =`cat req.$f` +done +echo CC.RUNPATH = $CC_RUNPATH +echo CC.SHARED = $CC_SHARED +echo CC.SHARED.LD = $CC_SHARED_LD +echo CC.SHARED.NAME = $CC_SHARED_NAME +echo CC.SHARED.REGISTRY = $CC_SHARED_REGISTRY +echo CC.SHARED.REGISTRY.PATH = $CC_SHARED_REGISTRY_PATH +echo CC.SHELLMAGIC = $CC_SHELLMAGIC +echo CC.SIZE = $CC_SIZE +echo CC.STATIC = $CC_STATIC +echo CC.STDINCLUDE = $CC_STDINCLUDE +echo CC.STDLIB = $CC_STDLIB +echo CC.STRICT = $CC_STRICT +echo CC.STRIP = $CC_STRIP +echo CC.STRIP.FLAGS = $CC_STRIP_FLAGS +echo CC.PREFIX.ARCHIVE = $CC_PREFIX_ARCHIVE +echo CC.PREFIX.DYNAMIC = $CC_PREFIX_DYNAMIC +echo CC.PREFIX.SHARED = $CC_PREFIX_SHARED +echo CC.PREFIX.SYMBOL = $CC_PREFIX_SYMBOL +echo CC.SUFFIX.ARCHIVE = $CC_SUFFIX_ARCHIVE +echo CC.SUFFIX.COMMAND = $CC_SUFFIX_COMMAND +echo CC.SUFFIX.DEBUG = $CC_SUFFIX_DEBUG +echo CC.SUFFIX.DYNAMIC = $CC_SUFFIX_DYNAMIC +echo CC.SUFFIX.LD = $CC_SUFFIX_LD +echo CC.SUFFIX.OBJECT = $CC_SUFFIX_OBJECT +echo CC.SUFFIX.SHARED = $CC_SUFFIX_SHARED +echo CC.SUFFIX.SOURCE = $CC_SUFFIX_SOURCE +echo CC.SUFFIX.STATIC = $CC_SUFFIX_STATIC +echo CC.VERSION = $CC_VERSION +case $CC_VERSION_STRING in +*\"*) i=`echo " $CC_VERSION_STRING" | sed -e 's,",\\\\",g' -e 's,^ ,,' -e 's,.*,"&",'` ;; +*\'*) i=\"$CC_VERSION_STRING\" ;; +*) i=$CC_VERSION_STRING ;; +esac +cat < * +* Martijn Dekker * +* * +***********************************************************************/ +#pragma clang diagnostic ignored "-Wdeprecated-register" +#pragma clang diagnostic ignored "-Wparentheses" + +/* + * mamake -- MAM make + * + * coded for portability + */ + +#define RELEASE_DATE "2022-07-15" +static char id[] = "\n@(#)$Id: mamake (ksh 93u+m) " RELEASE_DATE " $\0\n"; + +#if _PACKAGE_ast + +#include +#include + +static const char usage[] = +"[-?\n@(#)$Id: mamake (ksh 93u+m) " RELEASE_DATE " $\n]" +"[-author?Glenn Fowler ]" +"[-author?Contributors to https://github.com/ksh93/ksh]" +"[-copyright?(c) 1994-2012 AT&T Intellectual Property]" +"[-copyright?(c) 2020-2022 Contributors to ksh 93u+m]" +"[-license?https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html]" +"[+NAME?mamake - make abstract machine make]" +"[+DESCRIPTION?\bmamake\b reads \amake abstract machine\a target and" +" prerequisite file descriptions from a mamfile (see \b-f\b) and executes" +" actions to update targets that are older than their prerequisites." +" Mamfiles are portable to environments that only have" +" \bsh\b(1) and \bcc\b(1).]" +"[+?Mamfiles are used rather than" +" old-\bmake\b makefiles because some features are not reliably supported" +" across all \bmake\b variants:]{" +" [+action execution?Multi-line actions are executed as a" +" unit by \b$SHELL\b. There are some shell constructs" +" that cannot be expressed in an old-\bmake\b makefile.]" +" [+viewpathing?\bVPATH\b is properly interpreted. This allows" +" source to be separate from generated files.]" +" [+recursion?Ordered subdirectory recursion over unrelated" +" makefiles.]" +" }" +"[+?\bmamprobe\b(1) is called to probe and generate system specific variable" +" definitions. The probe information is regenerated when it is older" +" than the \bmamprobe\b command.]" +"[+?For compatibility with \bnmake\b(1) the \b-K\b option and the" +" \brecurse\b and \bcc-*\b command line targets are ignored.]" +"[e:?Explain reason for triggering action. Ignored if -F is on.]" +"[f:?Read \afile\a instead of the default.]:[file:=Mamfile]" +"[i:?Ignore action errors.]" +"[k:?Continue after error with sibling prerequisites.]" +"[n:?Print actions but do not execute. Recursion actions (see \b-r\b) are still" +" executed. Use \b-N\b to disable recursion actions too.]" +"[r:?Recursively make leaf directories matching \apattern\a. Only leaf" +" directories containing a file named \bMamfile\b" +" are considered.]:[pattern]" +"[C:?Do all work in \adirectory\a. All messages will mention" +" \adirectory\a.]:[directory]" +"[D:?Set the debug trace level to \alevel\a. Higher levels produce more" +" output.]#[level]" +"[F:?Force all targets to be out of date.]" +"[K:?Ignored.]" +"[N:?Like \b-n\b but recursion actions (see \b-r\b) are also disabled.]" +"[V:?Print the program version and exit.]" +"[G:debug-symbols?Compile and link with debugging symbol options enabled.]" +"[S:strip-symbols?Strip link-time static symbols from executables.]" + +"\n" +"\n[ target ... ] [ name=value ... ]\n" +"\n" + +"[+SEE ALSO?\bgmake\b(1), \bmake\b(1), \bmamprobe\b(1)," +" \bnmake\b(1), \bsh\b(1)]" +; + +#else + +#define elementsof(x) (sizeof(x)/sizeof(x[0])) +#define newof(p,t,n,x) ((p)?(t*)realloc((char*)(p),sizeof(t)*(n)+(x)):(t*)calloc(1,sizeof(t)*(n)+(x))) + +#define NiL 0 + +#endif + +#include +#include +#include +#include +#include +#include + +#if !_PACKAGE_ast +#include +#include +#endif + +#define delimiter(c) ((c)==' '||(c)=='\t'||(c)=='\n'||(c)==';'||(c)=='('||(c)==')'||(c)=='`'||(c)=='|'||(c)=='&'||(c)=='=') + +#define add(b,c) (((b)->nxt >= (b)->end) ? append(b, "") : NiL, *(b)->nxt++ = (c)) +#define get(b) ((b)->nxt-(b)->buf) +#define set(b,o) ((b)->nxt=(b)->buf+(o)) +#define use(b) (*(b)->nxt=0,(b)->nxt=(b)->buf) + +#define CHUNK 4096 +#define KEY(a,b,c,d) ((((unsigned long)(a))<<15)|(((unsigned long)(b))<<10)|(((unsigned long)(c))<<5)|(((unsigned long)(d)))) +#define NOW ((unsigned long)time((time_t*)0)) +#define ROTATE(p,l,r,t) ((t)=(p)->l,(p)->l=(t)->r,(t)->r=(p),(p)=(t)) + +#define RULE_active 0x0001 /* active target */ +#define RULE_dontcare 0x0002 /* ok if not found */ +#define RULE_error 0x0004 /* not found or not generated */ +#define RULE_exists 0x0008 /* target file exists */ +#define RULE_generated 0x0010 /* generated target */ +#define RULE_ignore 0x0020 /* ignore time */ +#define RULE_implicit 0x0040 /* implicit prerequisite */ +#define RULE_made 0x0080 /* already made */ +#define RULE_virtual 0x0100 /* not a file */ + +#define STREAM_KEEP 0x0001 /* don't fclose() on pop() */ +#define STREAM_MUST 0x0002 /* push() file must exist */ +#define STREAM_PIPE 0x0004 /* pclose() on pop() */ + +#ifndef S_IXUSR +#define S_IXUSR 0100 /* owner execute permission */ +#endif +#ifndef S_IXGRP +#define S_IXGRP 0010 /* group execute permission */ +#endif +#ifndef S_IXOTH +#define S_IXOTH 0001 /* other execute permission */ +#endif + +struct Rule_s; + +typedef struct stat Stat_t; +typedef FILE Stdio_t; + +typedef struct Buf_s /* buffer stream */ +{ + struct Buf_s* old; /* next dropped buffer */ + char* end; /* 1 past end of buffer */ + char* nxt; /* next char to add */ + char* buf; /* buffer space */ +} Buf_t; + +typedef struct Dict_item_s /* dictionary item */ +{ + struct Dict_item_s* left; /* left child */ + struct Dict_item_s* right; /* right child */ + void* value; /* user defined value */ + char name[1];/* 0 terminated name */ +} Dict_item_t; + +typedef struct Dict_s /* dictionary handle */ +{ + Dict_item_t* root; /* root item */ +} Dict_t; + +typedef struct List_s /* Rule_t list */ +{ + struct List_s* next; /* next in list */ + struct Rule_s* rule; /* list item */ +} List_t; + +typedef struct Rule_s /* rule item */ +{ + char* name; /* unbound name */ + char* path; /* bound path */ + List_t* prereqs; /* prerequisites */ + struct Rule_s* leaf; /* recursion leaf alias */ + int flags; /* RULE_* flags */ + int making; /* currently make()ing */ + unsigned long time; /* modification time */ +} Rule_t; + +typedef struct Stream_s /* input file stream stack */ +{ + Stdio_t* fp; /* read stream */ + char* file; /* stream path */ + unsigned long line; /* stream line */ + int flags; /* stream flags */ +} Stream_t; + +typedef struct View_s /* viewpath level */ +{ + struct View_s* next; /* next level in viewpath */ + int node; /* viewpath node path length */ + char dir[1]; /* viewpath level dir prefix */ +} View_t; + +static struct /* program state */ +{ + Buf_t* buf; /* work buffer */ + Buf_t* old; /* dropped buffers */ + Buf_t* opt; /* option buffer */ + + Dict_t* leaf; /* recursion leaf dictionary */ + Dict_t* libs; /* library dictionary */ + Dict_t* rules; /* rule dictionary */ + Dict_t* vars; /* variable dictionary */ + + View_t* view; /* viewpath levels */ + + char* directory; /* work in this directory */ + char* id; /* command name */ + char* file; /* first input file */ + char* pwd; /* current directory */ + char* recurse; /* recursion pattern */ + char* shell; /* ${SHELL} */ + + int active; /* targets currently active */ + int debug; /* negative of debug level */ + int errors; /* some error(s) occurred */ + int exec; /* execute actions */ + int explain; /* explain actions */ + int force; /* all targets out of date */ + int ignore; /* ignore command errors */ + int indent; /* debug indent */ + int keepgoing; /* do siblings on error */ + int never; /* never execute */ + int peek; /* next line already in input */ + int probed; /* probe already done */ + int verified; /* don't bother with verify() */ + + Stream_t streams[4]; /* input file stream stack */ + Stream_t* sp; /* input stream stack pointer */ + + char input[8*CHUNK]; /* input buffer */ +} state; + +static unsigned long make(Rule_t*); + +static char mamfile[] = "Mamfile"; +static char sh[] = "/bin/sh"; + +extern char** environ; + +#if !_PACKAGE_ast + +#if defined(NeXT) || defined(__NeXT) +#define getcwd(a,b) getwd(a) +#endif + +/* + * emit usage message and exit + */ + +static void +usage() +{ + fprintf(stderr, "Usage: %s" + " [-iknFKNV]" + " [-f Mamfile]" + " [-r pattern]" + " [-C directory]" + " [-D level]" + " [target ...]" + " [name=value ...]" + "\n", state.id); + exit(2); +} + +#endif + +/* + * output error message identification + */ + +static void +identify(Stdio_t* sp) +{ + if (state.directory) + fprintf(sp, "%s [%s]: ", state.id, state.directory); + else + fprintf(sp, "%s: ", state.id); +} + +/* + * emit error message + * level: + * <0 debug + * 0 info + * 1 warning + * 2 error + * >2 exit(level-2) + */ + +static void +report(int level, char* text, char* item, unsigned long stamp) +{ + int i; + + if (level >= state.debug) + { + if (level) + identify(stderr); + if (level < 0) + { + fprintf(stderr, "debug%d: ", level); + for (i = 1; i < state.indent; i++) + fprintf(stderr, " "); + } + else + { + if (state.sp && state.sp->line) + { + if (state.sp->file) + fprintf(stderr, "%s: ", state.sp->file); + fprintf(stderr, "%ld: ", state.sp->line); + } + if (level == 1) + fprintf(stderr, "warning: "); + else if (level > 1) + state.errors = 1; + } + if (item) + fprintf(stderr, "%s: ", item); + fprintf(stderr, "%s", text); + if (stamp && state.debug <= -2) + fprintf(stderr, " %10lu", stamp); + fprintf(stderr, "\n"); + if (level > 2) + exit(level - 2); + } +} + +/* + * don't know how to make or exit code making + */ + +static void +dont(Rule_t* r, int code, int keepgoing) +{ + identify(stderr); + if (!code) + fprintf(stderr, "don't know how to make %s\n", r->name); + else + { + fprintf(stderr, "*** exit code %d making %s%s\n", code, r->name, state.ignore ? " ignored" : ""); + unlink(r->name); + if (state.ignore) + return; + } + if (!keepgoing) + exit(1); + state.errors++; + r->flags |= RULE_error; +} + +/* + * local strrchr() + */ + +static char* +last(register char* s, register int c) +{ + register char* r = 0; + + for (r = 0; *s; s++) + if (*s == c) + r = s; + return r; +} + +/* + * open a buffer stream + */ + +static Buf_t* +buffer(void) +{ + register Buf_t* buf; + + if (buf = state.old) + state.old = state.old->old; + else if (!(buf = newof(0, Buf_t, 1, 0)) || !(buf->buf = newof(0, char, CHUNK, 0))) + report(3, "out of memory [buffer]", NiL, (unsigned long)0); + buf->end = buf->buf + CHUNK; + buf->nxt = buf->buf; + return buf; +} + +/* + * close a buffer stream + */ + +static void +drop(Buf_t* buf) +{ + buf->old = state.old; + state.old = buf; +} + +/* + * append str length n to buffer and return the buffer base + */ + +static char* +appendn(Buf_t* buf, char* str, int n) +{ + int m; + int i; + + if ((n + 1) >= (buf->end - buf->nxt)) + { + i = buf->nxt - buf->buf; + m = (((buf->end - buf->buf) + n + CHUNK + 1) / CHUNK) * CHUNK; + if (!(buf->buf = newof(buf->buf, char, m, 0))) + report(3, "out of memory [buffer resize]", NiL, (unsigned long)0); + buf->end = buf->buf + m; + buf->nxt = buf->buf + i; + } + memcpy(buf->nxt, str, n + 1); + buf->nxt += n; + return buf->buf; +} + +/* + * append str to buffer and return the buffer base + * if str==0 then next pointer reset to base + */ + +static char* +append(Buf_t* buf, char* str) +{ + if (str) + return appendn(buf, str, strlen(str)); + buf->nxt = buf->buf; + return buf->buf; +} + +/* + * allocate space for s and return the copy + */ + +static char* +duplicate(char* s) +{ + char* t; + int n; + + n = strlen(s); + if (!(t = newof(0, char, n, 1))) + report(3, "out of memory [duplicate]", s, (unsigned long)0); + strcpy(t, s); + return t; +} + +/* + * open a new dictionary + */ + +static Dict_t* +dictionary(void) +{ + Dict_t* dict; + + if (!(dict = newof(0, Dict_t, 1, 0))) + report(3, "out of memory [dictionary]", NiL, (unsigned long)0); + return dict; +} + +/* + * return the value for item name in dictionary dict + * if value!=0 then name entry value is created if necessary and set + * uses top-down splaying (ala Tarjan and Sleator) + */ + +static void* +search(register Dict_t* dict, char* name, void* value) +{ + register int cmp; + register Dict_item_t* root; + register Dict_item_t* t; + register Dict_item_t* left; + register Dict_item_t* right; + register Dict_item_t* lroot; + register Dict_item_t* rroot; + + root = dict->root; + left = right = lroot = rroot = 0; + while (root) + { + if (!(cmp = strcmp(name, root->name))) + break; + else if (cmp < 0) + { + if (root->left && (cmp = strcmp(name, root->left->name)) <= 0) + { + ROTATE(root, left, right, t); + if (!cmp) + break; + } + if (right) + right->left = root; + else + rroot = root; + right = root; + root = root->left; + right->left = 0; + } + else + { + if (root->right && (cmp = strcmp(name, root->right->name)) >= 0) + { + ROTATE(root, right, left, t); + if (!cmp) + break; + } + if (left) + left->right = root; + else + lroot = root; + left = root; + root = root->right; + left->right = 0; + } + } + if (root) + { + if (right) + right->left = root->right; + else + rroot = root->right; + if (left) + left->right = root->left; + else + lroot = root->left; + } + else if (value) + { + if (!(root = newof(0, Dict_item_t, 1, strlen(name)))) + report(3, "out of memory [dictionary]", name, (unsigned long)0); + strcpy(root->name, name); + } + if (root) + { + if (value) + root->value = value; + root->left = lroot; + root->right = rroot; + dict->root = root; + return value ? (void*)root->name : root->value; + } + if (left) + { + left->right = rroot; + dict->root = lroot; + } + else if (right) + { + right->left = lroot; + dict->root = rroot; + } + return 0; +} + +/* + * low level for walk() + */ + +static int +apply(Dict_t* dict, Dict_item_t* item, int (*func)(Dict_item_t*, void*), void* handle) +{ + register Dict_item_t* right; + + do + { + right = item->right; + if (item->left && apply(dict, item->left, func, handle)) + return -1; + if ((*func)(item, handle)) + return -1; + } while (item = right); + return 0; +} + +/* + * apply func to each dictionary item + */ + +static int +walk(Dict_t* dict, int (*func)(Dict_item_t*, void*), void* handle) +{ + return dict->root ? apply(dict, dict->root, func, handle) : 0; +} + +/* + * return a rule pointer for name + */ + +static Rule_t* +rule(char* name) +{ + Rule_t* r; + + if (!(r = (Rule_t*)search(state.rules, name, NiL))) + { + if (!(r = newof(0, Rule_t, 1, 0))) + report(3, "out of memory [rule]", name, (unsigned long)0); + r->name = (char*)search(state.rules, name, (void*)r); + } + return r; +} + +/* + * prepend p onto rule r prereqs + */ + +static void +cons(Rule_t* r, Rule_t* p) +{ + register List_t* x; + + for (x = r->prereqs; x && x->rule != p; x = x->next); + if (!x) + { + if (!(x = newof(0, List_t, 1, 0))) + report(3, "out of memory [list]", r->name, (unsigned long)0); + x->rule = p; + x->next = r->prereqs; + r->prereqs = x; + } +} + +/* + * initialize the viewpath + */ + +static void +view(void) +{ + register char* s; + register char* t; + register char* p; + register View_t* vp; + + View_t* zp; + int c; + int n; + + Stat_t st; + Stat_t ts; + + char buf[CHUNK]; + + if (stat(".", &st)) + report(3, "cannot stat", ".", (unsigned long)0); + if ((s = (char*)search(state.vars, "PWD", NiL)) && !stat(s, &ts) && + ts.st_dev == st.st_dev && ts.st_ino == st.st_ino) + state.pwd = s; + if (!state.pwd) + { + if (!getcwd(buf, sizeof(buf) - 1)) + report(3, "cannot determine PWD", NiL, (unsigned long)0); + state.pwd = duplicate(buf); + search(state.vars, "PWD", state.pwd); + } + if ((s = (char*)search(state.vars, "VPATH", NiL)) && *s) + { + zp = 0; + for (;;) + { + for (t = s; *t && *t != ':'; t++); + if (c = *t) + *t = 0; + if (!state.view) + { + /* + * determine the viewpath offset + */ + + if (stat(s, &st)) + report(3, "cannot stat top view", s, (unsigned long)0); + if (stat(state.pwd, &ts)) + report(3, "cannot stat", state.pwd, (unsigned long)0); + if (ts.st_dev == st.st_dev && ts.st_ino == st.st_ino) + p = "."; + else + { + p = state.pwd + strlen(state.pwd); + while (p > state.pwd) + { + if (*--p == '/') + { + if (p == state.pwd) + report(3, ". not under VPATH", s, (unsigned long)0); + *p = 0; + if (stat(state.pwd, &ts)) + report(3, "cannot stat", state.pwd, (unsigned long)0); + *p = '/'; + if (ts.st_dev == st.st_dev && ts.st_ino == st.st_ino) + { + p++; + break; + } + } + } + if (p <= state.pwd) + report(3, "cannot determine viewpath offset", s, (unsigned long)0); + } + } + n = strlen(s); + if (!(vp = newof(0, View_t, 1, strlen(p) + n + 1))) + report(3, "out of memory [view]", s, (unsigned long)0); + vp->node = n + 1; + strcpy(vp->dir, s); + *(vp->dir + n) = '/'; + strcpy(vp->dir + n + 1, p); + report(-4, vp->dir, "view", (unsigned long)0); + if (!state.view) + state.view = zp = vp; + else + zp = zp->next = vp; + if (!c) + break; + *t++ = c; + s = t; + } + } +} + +/* + * return next '?' or '}' in nested '}' + */ + +static char* +cond(register char* s) +{ + register int n; + + if (*s == '?') + s++; + n = 0; + for (;;) + { + switch (*s++) + { + case 0: + break; + case '{': + n++; + continue; + case '}': + if (!n--) + break; + continue; + case '?': + if (!n) + break; + continue; + default: + continue; + } + break; + } + return s - 1; +} + +/* + * expand var refs from s into buf + */ + +static void +substitute(Buf_t* buf, register char* s) +{ + register char* t; + register char* v; + register char* q; + register char* b; + register int c; + register int n; + int a = 0; + int i; + + while (c = *s++) + { + if (c == '$' && *s == '{') + { + b = s - 1; + i = 1; + for (n = *(t = ++s) == '-' ? 0 : '-'; (c = *s) && c != '?' && c != '+' && c != n && c != ':' && c != '=' && c != '[' && c != '}'; s++) + if (!isalnum(c) && c != '_') + i = 0; + *s = 0; + if (c == '[') + { + append(buf, b); + *s = c; + continue; + } + v = (char*)search(state.vars, t, NiL); + if ((c == ':' || c == '=') && (!v || c == ':' && !*v)) + { + append(buf, b); + *s = c; + continue; + } + if (t[0] == 'A' && t[1] == 'R' && t[2] == 0) + a = 1; + *s = c; + if (c && c != '}') + { + n = 1; + for (t = ++s; *s; s++) + if (*s == '{') + n++; + else if (*s == '}' && !--n) + break; + } + switch (c) + { + case '?': + q = cond(t - 1); + if (v) + { + if (((q - t) != 1 || *t != '*') && strncmp(v, t, q - t)) + v = 0; + } + else if (q == t) + v = s; + t = cond(q); + if (v) + { + if (t > q) + { + c = *t; + *t = 0; + substitute(buf, q + 1); + *t = c; + } + } + else + { + q = cond(t); + if (q > t) + { + c = *q; + *q = 0; + substitute(buf, t + 1); + *q = c; + } + } + break; + case '+': + case '-': + if ((v == 0 || *v == 0) == (c == '-')) + { + c = *s; + *s = 0; + substitute(buf, t); + *s = c; + break; + } + if (c != '-') + break; + /* FALLTHROUGH */ + case 0: + case '=': + case '}': + if (v) + { + if (a && t[0] == 'm' && t[1] == 'a' && t[2] == 'm' && t[3] == '_' && t[4] == 'l' && t[5] == 'i' && t[6] == 'b') + { + for (t = v; isspace(*t); t++); + for (; *t && !isspace(*t); t++); + if (*t) + *t = 0; + else + t = 0; + substitute(buf, v); + if (t) + *t = ' '; + } + else + substitute(buf, v); + } + else if (i) + { + c = *s; + *s = 0; + append(buf, b); + *s = c; + continue; + } + break; + } + if (*s) + s++; + } + else + add(buf, c); + } +} + +/* + * expand var refs from s into buf and return buf base + */ + +static char* +expand(Buf_t* buf, char* s) +{ + substitute(buf, s); + return use(buf); +} + +/* + * stat() with .exe check + */ + +static char* +status(Buf_t* buf, int off, char* path, struct stat* st) +{ + int r; + char* s; + Buf_t* tmp; + + if (!stat(path, st)) + return path; + if (!(tmp = buf)) + { + tmp = buffer(); + off = 0; + } + if (off) + set(tmp, off); + else + append(tmp, path); + append(tmp, ".exe"); + s = use(tmp); + r = stat(s, st); + if (!buf) + { + drop(tmp); + s = path; + } + if (r) + { + if (off) + s[off] = 0; + s = 0; + } + return s; +} + +/* + * return path to file + */ + +static char* +find(Buf_t* buf, char* file, struct stat* st) +{ + char* s; + View_t* vp; + int node; + int c; + int o; + + if (s = status(buf, 0, file, st)) + { + report(-3, s, "find", (unsigned long)0); + return s; + } + if (vp = state.view) + { + node = 0; + if (*file == '/') + { + do + { + if (!strncmp(file, vp->dir, vp->node)) + { + file += vp->node; + node = 2; + break; + } + } while (vp = vp->next); + } + else + vp = vp->next; + if (vp) + { + do + { + if (node) + { + c = vp->dir[vp->node]; + vp->dir[vp->node] = 0; + append(buf, vp->dir); + vp->dir[vp->node] = c; + } + else + { + append(buf, vp->dir); + append(buf, "/"); + } + append(buf, file); + o = get(buf); + s = use(buf); + if (s = status(buf, o, s, st)) + { + report(-3, s, "find", (unsigned long)0); + return s; + } + } while (vp = vp->next); + } + } + return 0; +} + +/* + * bind r to a file and return the modify time + */ + +static unsigned long +bindfile(Rule_t* r) +{ + char* s; + Buf_t* buf; + struct stat st; + + buf = buffer(); + if (s = find(buf, r->name, &st)) + { + if (s != r->name) + r->path = duplicate(s); + r->time = st.st_mtime; + r->flags |= RULE_exists; + } + drop(buf); + return r->time; +} + +/* + * pop the current input file + */ + +static int +pop(void) +{ + int r; + + if (!state.sp) + report(3, "input stack underflow", NiL, (unsigned long)0); + if (!state.sp->fp || (state.sp->flags & STREAM_KEEP)) + r = 0; + else if (state.sp->flags & STREAM_PIPE) + r = pclose(state.sp->fp); + else + r = fclose(state.sp->fp); + if (state.sp == state.streams) + state.sp = 0; + else + state.sp--; + return r; +} + +/* + * push file onto the input stack + */ + +static int +push(char* file, Stdio_t* fp, int flags) +{ + char* path; + Buf_t* buf; + struct stat st; + + if (!state.sp) + state.sp = state.streams; + else if (++state.sp >= &state.streams[elementsof(state.streams)]) + report(3, "input stream stack overflow", NiL, (unsigned long)0); + if (state.sp->fp = fp) + { + if(state.sp->file) + free(state.sp->file); + state.sp->file = strdup("pipeline"); + if(!state.sp->file) + report(3, "out of memory [push]", NiL, (unsigned long)0); + } + else if (flags & STREAM_PIPE) + report(3, "pipe error", file, (unsigned long)0); + else if (!file || !strcmp(file, "-") || !strcmp(file, "/dev/stdin")) + { + flags |= STREAM_KEEP; + if(state.sp->file) + free(state.sp->file); + state.sp->file = strdup("/dev/stdin"); + if(!state.sp->file) + report(3, "out of memory [push]", NiL, (unsigned long)0); + state.sp->fp = stdin; + } + else + { + buf = buffer(); + if (path = find(buf, file, &st)) + { + if (!(state.sp->fp = fopen(path, "r"))) + report(3, "cannot read", path, (unsigned long)0); + if(state.sp->file) + free(state.sp->file); + state.sp->file = duplicate(path); + drop(buf); + } + else + { + drop(buf); + pop(); + if (flags & STREAM_MUST) + report(3, "not found", file, (unsigned long)0); + return 0; + } + } + state.sp->flags = flags; + state.sp->line = 0; + return 1; +} + +/* + * return the next input line + */ + +static char* +input(void) +{ + char* e; + + if (!state.sp) + report(3, "no input file stream", NiL, (unsigned long)0); + if (state.peek) + state.peek = 0; + else if (!fgets(state.input, sizeof(state.input), state.sp->fp)) + return 0; + else if (*state.input && *(e = state.input + strlen(state.input) - 1) == '\n') + *e = 0; + state.sp->line++; + return state.input; +} + +/* + * pass shell action s to ${SHELL:-/bin/sh} + * the -c wrapper ensures that scripts are run in the selected shell + * even on systems that otherwise demand #! magic (can you say Cygwin) + */ + +static int +execute(register char* s) +{ + register int c; + Buf_t* buf; + + if (!state.shell && (!(state.shell = (char*)search(state.vars, "SHELL", NiL)) || !strcmp(state.shell, sh))) + state.shell = sh; + buf = buffer(); + append(buf, state.shell); + append(buf, " -c '"); + while (c = *s++) + { + if (c == '\'') + { + add(buf, c); + for (s--; *s == c; s++) + { + add(buf, '\\'); + add(buf, c); + } + } + add(buf, c); + } + add(buf, '\''); + s = use(buf); + report(-5, s, "exec", (unsigned long)0); + if ((c = system(s)) > 255) + c >>= 8; + drop(buf); + return c; +} + +/* + * run action s to update r + */ + +static unsigned long +run(Rule_t* r, register char* s) +{ + register Rule_t* q; + register char* t; + register int c; + register View_t* v; + int i; + int j; + int x; + Stat_t st; + Buf_t* buf; + + if (r->flags & RULE_error) + return r->time; + buf = buffer(); + if (!strncmp(s, "mamake -r ", 10)) + { + state.verified = 1; + x = !state.never; + } + else + x = state.exec; + if (x) + append(buf, "trap - 1 2 3 15\nPATH=.:$PATH\nset -x\n"); + if (state.view) + { + do + { + for (; delimiter(*s); s++) + add(buf, *s); + for (t = s; *s && !delimiter(*s); s++); + c = *s; + *s = 0; + if (c == '=') + { + append(buf, t); + continue; + } + if ((q = (Rule_t*)search(state.rules, t, NiL)) && q->path && !(q->flags & RULE_generated)) + append(buf, q->path); + else + { + append(buf, t); + if (*t == '-' && *(t + 1) == 'I' && (*(t + 2) || c)) + { + if (*(t + 2)) + i = 2; + else + { + for (i = 3; isspace(*(t + i)); i++); + *s = c; + for (s = t + i; *s && !isspace(*s); s++); + c = *s; + *s = 0; + append(buf, t + 2); + } + if (*(t + i) && *(t + i) != '/') + { + v = state.view; + while (v = v->next) + { + add(buf, ' '); + for (j = 0; j < i; j++) + add(buf, *(t + j)); + append(buf, v->dir); + if (*(t + i) != '.' || *(t + i + 1)) + { + add(buf, '/'); + append(buf, t + i); + } + } + } + } + } + } while (*s = c); + s = use(buf); + } + else if (x) + { + append(buf, s); + s = use(buf); + } + if (x) + { + if (c = execute(s)) + dont(r, c, state.keepgoing); + if (status((Buf_t*)0, 0, r->name, &st)) + { + r->time = st.st_mtime; + r->flags |= RULE_exists; + } + else + r->time = NOW; + } + else + { + fprintf(stdout, "%s\n", s); + if (state.debug) + fflush(stdout); + r->time = NOW; + r->flags |= RULE_exists; + } + drop(buf); + return r->time; +} + +/* + * return the full path for s using buf workspace + */ + +static char* +path(Buf_t* buf, char* s, int must) +{ + register char* p; + register char* d; + register char* x; + char* e; + register int c; + int t; + int o; + Stat_t st; + + for (e = s; *e && !isspace(*e); e++); + t = *e; + if ((x = status(buf, 0, s, &st)) && (st.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH))) + return x; + if (!(p = (char*)search(state.vars, "PATH", NiL))) + report(3, "variable not defined", "PATH", (unsigned long)0); + do + { + for (d = p; *p && *p != ':'; p++); + c = *p; + *p = 0; + if (*d && (*d != '.' || *(d + 1))) + { + append(buf, d); + add(buf, '/'); + } + *p = c; + if (t) + *e = 0; + append(buf, s); + if (t) + *e = t; + o = get(buf); + x = use(buf); + if ((x = status(buf, o, x, &st)) && (st.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH))) + return x; + } while (*p++); + if (must) + report(3, "command not found", s, (unsigned long)0); + return 0; +} + +/* + * generate (if necessary) and read the MAM probe information + * done on the first `setv CC ...' + */ + +static void +probe(void) +{ + register char* cc; + register char* s; + unsigned long h; + unsigned long q; + Buf_t* buf; + Buf_t* pro; + Buf_t* tmp; + struct stat st; + + static char let[] = "ABCDEFGHIJKLMNOP"; + static char cmd[] = "mamprobe"; + + if (!(cc = (char*)search(state.vars, "CC", NiL))) + cc = "cc"; + buf = buffer(); + s = path(buf, cmd, 1); + q = stat(s, &st) ? (unsigned long)0 : (unsigned long)st.st_mtime; + pro = buffer(); + s = cc = path(pro, cc, 1); + for (h = 0; *s; s++) + h = h * 0x63c63cd9L + *s + 0x9c39c33dL; + if (!(s = (char*)search(state.vars, "INSTALLROOT", NiL))) + report(3, "variable must be defined", "INSTALLROOT", (unsigned long)0); + append(buf, s); + append(buf, "/lib/probe/C/mam/"); + for (h &= 0xffffffffL; h; h >>= 4) + add(buf, let[h & 0xf]); + s = use(buf); + h = stat(s, &st) ? (unsigned long)0 : (unsigned long)st.st_mtime; + if (h < q || !push(s, (Stdio_t*)0, 0)) + { + tmp = buffer(); + append(tmp, cmd); + add(tmp, ' '); + append(tmp, s); + add(tmp, ' '); + append(tmp, cc); + if (execute(use(tmp))) + report(3, "cannot generate probe info", s, (unsigned long)0); + drop(tmp); + if (!push(s, (Stdio_t*)0, 0)) + report(3, "cannot read probe info", s, (unsigned long)0); + } + drop(pro); + drop(buf); + make(rule("")); + pop(); +} + +/* + * add attributes in s to r + */ + +static void +attributes(register Rule_t* r, register char* s) +{ + register char* t; + register int n; + + for (;;) + { + int flag = 0; + for (; isspace(*s); s++); + for (t = s; *s && !isspace(*s); s++); + if (!(n = s - t)) + break; + switch (*t) + { + case 'd': + if (n == 8 && !strncmp(t, "dontcare", n)) + flag = RULE_dontcare; + break; + case 'g': + if (n == 9 && !strncmp(t, "generated", n)) + flag = RULE_generated; + break; + case 'i': + if (n == 6 && !strncmp(t, "ignore", n)) + flag = RULE_ignore; + else if (n == 8 && !strncmp(t, "implicit", n)) + flag = RULE_implicit; + break; + case 'v': + if (n == 7 && !strncmp(t, "virtual", n)) + flag = RULE_virtual; + break; + case 'a': + if (n == 7 && !strncmp(t, "archive", n)) + flag = -1; /* ignore (not implemented) */ + break; + case 'j': + if (n == 5 && !strncmp(t, "joint", n)) + flag = -1; /* ignore (not implemented) */ + break; + } + if(flag > 0) + r->flags |= flag; + else if(flag == 0) + { + t[n] = '\0'; + report(3, "unknown attribute", t, (unsigned long)0); + } + } +} + +/* + * define ${mam_libX} for library reference lib + */ + +static char* +require(char* lib, int dontcare) +{ + register int c; + char* s; + char* r; + FILE* f; + Buf_t* buf; + Buf_t* tmp; + struct stat st; + + int tofree = 0; + static int dynamic = -1; + + if (dynamic < 0) + dynamic = (s = search(state.vars, "mam_cc_L", NiL)) ? atoi(s) : 0; + if (!(r = search(state.vars, lib, NiL))) + { + buf = buffer(); + tmp = buffer(); + s = 0; + for (;;) + { + if (s) + append(buf, s); + if (r = search(state.vars, "mam_cc_PREFIX_ARCHIVE", NiL)) + append(buf, r); + append(buf, lib + 2); + if (r = search(state.vars, "mam_cc_SUFFIX_ARCHIVE", NiL)) + append(buf, r); + r = expand(tmp, use(buf)); + if (!stat(r, &st)) + break; + if (s) + { + r = lib; + break; + } + s = "${INSTALLROOT}/lib/"; + if (dynamic) + { + append(buf, s); + if (r = search(state.vars, "mam_cc_PREFIX_SHARED", NiL)) + append(buf, r); + append(buf, lib + 2); + if (r = search(state.vars, "mam_cc_SUFFIX_SHARED", NiL)) + append(buf, r); + r = expand(tmp, use(buf)); + if (!stat(r, &st)) + { + r = lib; + break; + } + } + } + if (r != lib) + { + tofree = 1; + r = duplicate(r); + } + search(state.vars, lib, r); + append(tmp, lib + 2); + append(tmp, ".req"); + if (!(f = fopen(use(tmp), "r"))) + { + append(tmp, "${INSTALLROOT}/lib/lib/"); + append(tmp, lib + 2); + f = fopen(expand(buf, use(tmp)), "r"); + } + if (f) + { + for (;;) + { + while (isspace(c = fgetc(f))); + if (c == EOF) + break; + do + { + add(tmp, c); + } while ((c = fgetc(f)) != EOF && !isspace(c)); + s = use(tmp); + if (s[0] && (s[0] != '-' || s[1])) + { + add(buf, ' '); + append(buf, require(s, 0)); + } + } + fclose(f); + if(tofree) + free(r); + r = use(buf); + } + else if (dontcare) + { + append(tmp, "set -\n"); + append(tmp, "cd \"${TMPDIR:-/tmp}\"\n"); + append(tmp, "echo 'int main(){return 0;}' > x.${!-$$}.c\n"); + append(tmp, "${CC} ${CCFLAGS} -o x.${!-$$}.x x.${!-$$}.c "); + append(tmp, r); + append(tmp, " >/dev/null 2>&1\n"); + append(tmp, "c=$?\n"); + append(tmp, "rm -f x.${!-$$}.[cox]\n"); + append(tmp, "exit $c\n"); + if (execute(expand(buf, use(tmp)))) + { + if(tofree) + free(r); + r = ""; + } + } + r = duplicate(r); + search(state.vars, lib, r); + append(tmp, "mam_lib"); + append(tmp, lib + 2); + search(state.vars, use(tmp), r); + drop(tmp); + drop(buf); + } + return r; +} + +/* + * input() until `done r' + */ + +static unsigned long +make(Rule_t* r) +{ + register char* s; + register char* t; + register char* u; + register char* v; + register Rule_t* q; + unsigned long z; + unsigned long x; + Buf_t* buf; + Buf_t* cmd; + + r->making++; + if (r->flags & RULE_active) + state.active++; + if (*r->name) + { + z = bindfile(r); + state.indent++; + report(-1, r->name, "make", r->time); + } + else + z = 0; + buf = buffer(); + cmd = 0; + /* + * Parse lines + */ + while (s = input()) + { + /* skip initial whitespace and empty line */ + for (; isspace(*s); s++); + if (!*s) + continue; + /* isolate command name (u), argument word (t), and the operand string (v) */ + for (u = s; *s && !isspace(*s); s++); + if (*s) + { + for (*s++ = 0; isspace(*s); s++); + for (t = s; *s && !isspace(*s); s++); + if (*s) + for (*s++ = 0; isspace(*s); s++); + v = s; + } + else + t = v = s; + /* enforce 4-letter lowercase command name */ + if(u[0]<'a' || u[0]>'z' || u[1]<'a' || u[1]>'z' || u[2]<'a' || u[2]>'z' || u[3]<'a' || u[3]>'z' || u[4] && !isspace(u[4])) + report(3, "not a command name", u, (unsigned long)0); + switch (KEY(u[0], u[1], u[2], u[3])) + { + case KEY('b','i','n','d'): + if ((t[0] == '-' || t[0] == '+') && t[1] == 'l' && (s = require(t, !strcmp(v, "dontcare"))) && strncmp(r->name, "FEATURE/", 8) && strcmp(r->name, "configure.h")) + { + for (;;) + { + for (t = s; *s && !isspace(*s); s++); + if (*s) + *s = 0; + else + s = 0; + if (*t) + { + q = rule(expand(buf, t)); + attributes(q, v); + x = bindfile(q); + if (z < x) + z = x; + if (q->flags & RULE_error) + r->flags |= RULE_error; + } + if (!s) + break; + for (*s++ = ' '; isspace(*s); s++); + } + } + continue; + case KEY('d','o','n','e'): + q = rule(expand(buf, t)); + if (q != r && t[0] != '$') + report(2, "improper done statement", t, (unsigned long)0); + attributes(r, v); + if (cmd && state.active && (state.force || r->time < z || !r->time && !z)) + { + if (state.explain && !state.force) + { + if (!r->time) + fprintf(stderr, "%s [not found]\n", r->name); + else + fprintf(stderr, "%s [%lu] older than prerequisites [%lu]\n", r->name, r->time, z); + } + substitute(buf, use(cmd)); + x = run(r, use(buf)); + if (z < x) + z = x; + } + r->flags |= RULE_made; + if (!(r->flags & (RULE_dontcare|RULE_error|RULE_exists|RULE_generated|RULE_implicit|RULE_virtual))) + dont(r, 0, state.keepgoing); + break; + case KEY('e','x','e','c'): + r->flags |= RULE_generated; + if (r->path) + { + free(r->path); + r->path = 0; + r->time = 0; + } + if (state.active) + { + if (cmd) + add(cmd, '\n'); + else + cmd = buffer(); + append(cmd, v); + } + continue; + case KEY('m','a','k','e'): + q = rule(expand(buf, t)); + if (!q->making) + { + attributes(q, v); + x = make(q); + if (!(q->flags & RULE_ignore) && z < x) + z = x; + if (q->flags & RULE_error) + r->flags |= RULE_error; + } + continue; + case KEY('p','r','e','v'): + q = rule(expand(buf, t)); + if (!q->making) + { + if (!(q->flags & RULE_ignore) && z < q->time) + z = q->time; + if (q->flags & RULE_error) + r->flags |= RULE_error; + state.indent++; + report(-2, q->name, "prev", q->time); + state.indent--; + } + continue; + case KEY('s','e','t','v'): + if (!search(state.vars, t, NiL)) + { + if (*v == '"') + { + s = v + strlen(v) - 1; + if (*s == '"') + { + *s = 0; + v++; + } + } + search(state.vars, t, duplicate(expand(buf, v))); + } + if (!state.probed && t[0] == 'C' && t[1] == 'C' && !t[2]) + { + state.probed = 1; + probe(); + } + continue; + case KEY('i','n','f','o'): + case KEY('n','o','t','e'): + case KEY('m','e','t','a'): + /* comment command */ + continue; + default: + report(3, "unknown command", u, (unsigned long)0); + } + break; + } + drop(buf); + if (cmd) + drop(cmd); + if (*r->name) + { + report(-1, r->name, "done", z); + state.indent--; + } + if (r->flags & RULE_active) + state.active--; + r->making--; + return r->time = z; +} + +/* + * verify that active targets were made + */ + +static int +verify(Dict_item_t* item, void* handle) +{ + Rule_t* r = (Rule_t*)item->value; + + if ((r->flags & (RULE_active|RULE_error|RULE_made)) == RULE_active) + dont(r, 0, 1); + return 0; +} + +/* + * return 1 if name is an initializer + */ + +static int +initializer(char* name) +{ + register char* s; + + if (s = last(name, '/')) + s++; + else + s = name; + return s[0] == 'I' && s[1] == 'N' && s[2] == 'I' && s[3] == 'T'; +} + +/* + * update recursion leaf r and its prerequisites + */ + +static int +update(register Rule_t* r) +{ + register List_t* x; + Buf_t* buf; + + static char cmd[] = "${MAMAKE} -C "; + static char arg[] = " ${MAMAKEARGS}"; + + r->flags |= RULE_made; + if (r->leaf) + r->leaf->flags |= RULE_made; + for (x = r->prereqs; x; x = x->next) + if (x->rule->leaf && !(x->rule->flags & RULE_made)) + update(x->rule); + buf = buffer(); + substitute(buf, cmd); + append(buf, r->name); + substitute(buf, arg); + run(r, use(buf)); + drop(buf); + return 0; +} + +/* + * scan Mamfile prereqs + */ + +static int +scan(Dict_item_t* item, void* handle) +{ + register Rule_t* r = (Rule_t*)item->value; + register char* s; + register char* t; + register char* u; + register char* w; + Rule_t* q; + int i; + int j; + int k; + int p; + Buf_t* buf; + + static char* files[] = + { + "Mamfile" + /* ksh 93u+m no longer uses these: + * "Nmakefile", + * "nmakefile", + * "Makefile", + * "makefile" + */ + }; + + /* + * drop non-leaf rules + */ + + if (!r->leaf) + return 0; + + /* + * always make initializers + */ + + if (initializer(r->name)) + { + if (!(r->flags & RULE_made)) + update(r); + return 0; + } + buf = buffer(); + for (i = 0; i < elementsof(files); i++) + { + append(buf, r->name); + add(buf, '/'); + append(buf, files[i]); + if (push(use(buf), (Stdio_t*)0, 0)) + { + while (s = input()) + { + j = p = 0; + while (*s) + { + for (k = 1; isspace(i = *s) || i == '"' || i == '\''; s++); + for (t = s; (i = *s) && !isspace(i) && i != '"' && i != '\'' && i != '\\' && i != ':'; s++) + if (i == '/') + t = s + 1; + else if (i == '.' && *(s + 1) != 'c' && *(s + 1) != 'C' && *(s + 1) != 'h' && *(s + 1) != 'H' && t[0] == 'l' && t[1] == 'i' && t[2] == 'b') + *s = 0; + if (*s) + *s++ = 0; + if (!t[0]) + k = 0; + else if ((t[0] == '-' || t[0] == '+') && t[1] == 'l' && t[2]) + { + append(buf, "lib"); + append(buf, t + 2); + t = use(buf); + } + else if (p) + { + if (t[0] == '+' && !t[1]) + p = 2; + else if (p == 1) + { + if (i != ':' || strncmp(s, "command", 7)) + { + append(buf, "lib"); + append(buf, t); + t = use(buf); + } + if (i == ':') + while (*s && isspace(*s)) + s++; + } + } + else if (i == ':') + { + if (j != ':' || !isupper(*t)) + k = 0; + else if (!strcmp(t, "PACKAGE")) + { + p = 1; + k = 0; + } + else + { + for (u = t; *u; u++) + { + if (isupper(*u)) + *u = tolower(*u); + else if (!isalnum(*u)) + { + k = 0; + break; + } + } + } + } + else if (t[0] != 'l' || t[1] != 'i' || t[2] != 'b') + k = 0; + else + { + for (u = t + 3; *u; u++) + { + if (!isalnum(*u)) + { + k = 0; + break; + } + } + } + if (k && ((q = (Rule_t*)search(state.leaf, t, NiL)) && q != r || *t++ == 'l' && *t++ == 'i' && *t++ == 'b' && *t && (q = (Rule_t*)search(state.leaf, t, NiL)) && q != r)) + { + for (t = w = r->name; *w; w++) + if (*w == '/') + t = w + 1; + if (t[0] == 'l' && t[1] == 'i' && t[2] == 'b') + t += 3; + for (u = w = q->name; *w; w++) + if (*w == '/') + u = w + 1; + if (strcmp(t, u)) + cons(r, q); + } + j = i; + } + } + pop(); + for (s = 0, w = r->name; *w; w++) + if (*w == '/') + s = w; + if (s) + { + if ((s - r->name) > 3 && *(s - 1) == 'b' && *(s - 2) == 'i' && *(s - 3) == 'l' && *(s - 4) != '/') + { + /* + * foolib : foo : libfoo + */ + + *(s - 3) = 0; + q = (Rule_t*)search(state.leaf, r->name, NiL); + if (q && q != r) + cons(r, q); + for (t = w = r->name; *w; w++) + if (*w == '/') + t = w + 1; + append(buf, "lib"); + append(buf, t); + q = (Rule_t*)search(state.leaf, use(buf), NiL); + if (q && q != r) + cons(r, q); + *(s - 3) = 'l'; + } + else if (((s - r->name) != 3 || *(s - 1) != 'b' || *(s - 2) != 'i' || *(s - 3) != 'l') && (*(s + 1) != 'l' || *(s + 2) != 'i' || *(s + 3) != 'b')) + { + /* + * huh/foobar : lib/libfoo + */ + + s++; + t = s + strlen(s); + while (--t > s) + { + append(buf, "lib/lib"); + appendn(buf, s, t - s); + q = (Rule_t*)search(state.leaf, use(buf), NiL); + if (q && q != r) + cons(r, q); + } + } + } + break; + } + } + drop(buf); + return 0; +} + +/* + * descend into op and its prereqs + */ + +static int +descend(Dict_item_t* item, void* handle) +{ + Rule_t* r = (Rule_t*)item->value; + + if (!state.active && (!(r->flags & RULE_active) || !(r = (Rule_t*)search(state.leaf, r->name, NiL)))) + return 0; + return r->leaf && !(r->flags & RULE_made) ? update(r) : 0; +} + +/* + * append the non-leaf active targets to state.opt + */ + +static int +active(Dict_item_t* item, void* handle) +{ + Rule_t* r = (Rule_t*)item->value; + + if (r->flags & RULE_active) + { + if (r->leaf || search(state.leaf, r->name, NiL)) + state.active = 0; + else + { + add(state.opt, ' '); + append(state.opt, r->name); + } + } + return 0; +} + +/* + * recurse on mamfiles in subdirs matching pattern + */ + +static int +recurse(char* pattern) +{ + register char* s; + register char* t; + Rule_t* r; + Buf_t* buf; + Buf_t* tmp; + struct stat st; + + /* + * first determine the MAM subdirs + */ + + tmp = buffer(); + buf = buffer(); + state.exec = !state.never; + state.leaf = dictionary(); + append(buf, "ls -d "); + append(buf, pattern); + s = use(buf); + push("recurse", popen(s, "r"), STREAM_PIPE); + while (s = input()) + { + append(buf, s); + add(buf, '/'); + append(buf, mamfile); + if (find(tmp, use(buf), &st)) + { + r = rule(s); + if (t = last(r->name, '/')) + t++; + else + t = r->name; + r->leaf = rule(t); + search(state.leaf, t, r); + } + } + pop(); + drop(buf); + drop(tmp); + + /* + * grab the non-leaf active targets + */ + + if (!state.active) + { + state.active = 1; + walk(state.rules, active, NiL); + } + search(state.vars, "MAMAKEARGS", duplicate(use(state.opt) + 1)); + + /* + * scan the Mamfile and descend + */ + + walk(state.rules, scan, NiL); + while (state.view) + { + View_t *prev = state.view; + state.view = state.view->next; + free(prev); + } + walk(state.rules, descend, NiL); + return 0; +} + +int +main(int argc, char** argv) +{ + register char** e; + register char* s; + register char* t; + register char* v; + Buf_t* tmp; + int c; + + /* + * initialize the state + */ + + state.id = "mamake"; + state.active = 1; + state.exec = 1; + state.file = mamfile; + state.opt = buffer(); + state.rules = dictionary(); + state.vars = dictionary(); + search(state.vars, "MAMAKE", *argv); + + /* + * parse the options + */ + +#if _PACKAGE_ast + error_info.id = state.id; + for (;;) + { + switch (optget(argv, usage)) + { + case 'e': + append(state.opt, " -e"); + state.explain = 1; + continue; + case 'i': + append(state.opt, " -i"); + state.ignore = 1; + continue; + case 'k': + append(state.opt, " -k"); + state.keepgoing = 1; + continue; + case 'N': + state.never = 1; + /* FALLTHROUGH */ + case 'n': + append(state.opt, " -n"); + state.exec = 0; + continue; + case 'F': + append(state.opt, " -F"); + state.force = 1; + continue; + case 'K': + continue; + case 'V': + fprintf(stdout, "%s\n", id + 10); + exit(0); + case 'f': + append(state.opt, " -f "); + append(state.opt, opt_info.arg); + state.file = opt_info.arg; + continue; + case 'r': + state.recurse = opt_info.arg; + continue; + case 'C': + state.directory = opt_info.arg; + continue; + case 'D': + append(state.opt, " -D"); + append(state.opt, opt_info.arg); + state.debug = -opt_info.num; + continue; + case 'G': + append(state.opt, " -G"); + search(state.vars, "-debug-symbols", "1"); + continue; + case 'S': + append(state.opt, " -S"); + search(state.vars, "-strip-symbols", "1"); + continue; + case '?': + error(ERROR_usage(2), "%s", opt_info.arg); + UNREACHABLE(); + case ':': + error(2, "%s", opt_info.arg); + continue; + } + break; + } + if (error_info.errors) + { + error(ERROR_usage(2), "%s", optusage(NiL)); + UNREACHABLE(); + } + argv += opt_info.index; +#else + while ((s = *++argv) && *s == '-') + { + if (*(s + 1) == '-') + { + if (!*(s + 2)) + { + append(state.opt, " --"); + argv++; + break; + } + for (t = s += 2; *t && *t != '='; t++); + if (!strncmp(s, "debug-symbols", t - s) && append(state.opt, " -G") || !strncmp(s, "strip-symbols", t - s) && append(state.opt, " -S")) + { + if (*t) + { + v = t + 1; + if (t > s && *(t - 1) == '+') + t--; + c = *t; + *t = 0; + } + else + { + c = 0; + v = "1"; + } + search(state.vars, s - 1, v); + if (c) + *t = c; + continue; + } + usage(); + break; + } + for (;;) + { + switch (*++s) + { + case 0: + break; + case 'e': + append(state.opt, " -e"); + state.explain = 1; + continue; + case 'i': + append(state.opt, " -i"); + state.ignore = 1; + continue; + case 'k': + append(state.opt, " -k"); + state.keepgoing = 1; + continue; + case 'N': + state.never = 1; + /* FALLTHROUGH */ + case 'n': + append(state.opt, " -n"); + state.exec = 0; + continue; + case 'F': + append(state.opt, " -F"); + state.force = 1; + continue; + case 'G': + append(state.opt, " -G"); + search(state.vars, "-debug-symbols", "1"); + continue; + case 'K': + continue; + case 'S': + append(state.opt, " -S"); + search(state.vars, "-strip-symbols", "1"); + continue; + case 'V': + fprintf(stdout, "%s\n", id + 10); + exit(0); + case 'f': + case 'r': + case 'C': + case 'D': + t = s; + if (!*++s && !(s = *++argv)) + { + report(2, "option value expected", t, (unsigned long)0); + usage(); + } + else + switch (*t) + { + case 'f': + append(state.opt, " -f "); + append(state.opt, s); + state.file = s; + break; + case 'r': + state.recurse = s; + break; + case 'C': + state.directory = s; + break; + case 'D': + append(state.opt, " -D"); + append(state.opt, s); + state.debug = -atoi(s); + break; + } + break; + default: + report(2, "unknown option", s, (unsigned long)0); + /* FALLTHROUGH */ + case '?': + usage(); + break; + } + break; + } + } +#endif + + /* + * load the environment + */ + + for (e = environ; s = *e; e++) + { + for (t = s; *t; t++) + { + if (*t == '=') + { + *t = 0; + search(state.vars, s, t + 1); + *t = '='; + break; + } + } + } + + /* + * grab the command line targets and variable definitions + */ + + while (s = *argv++) + { + for (t = s; *t; t++) + { + if (*t == '=') + { + v = t + 1; + if (t > s && *(t - 1) == '+') + t--; + c = *t; + *t = 0; + search(state.vars, s, v); + tmp = buffer(); + append(tmp, s); + append(tmp, ".FORCE"); + search(state.vars, use(tmp), v); + drop(tmp); + *t = c; + break; + } + } + if (!*t) + { + /* + * handle a few targets for nmake compatibility + */ + + if (*s == 'e' && !strncmp(s, "error 0 $(MAKEVERSION:", 22)) + exit(1); + if (*s == 'r' && !strcmp(s, "recurse") || *s == 'c' && !strncmp(s, "cc-", 3)) + continue; + rule(s)->flags |= RULE_active; + state.active = 0; + if (state.recurse) + continue; + } + add(state.opt, ' '); + add(state.opt, '\''); + append(state.opt, s); + add(state.opt, '\''); + } + + /* + * initialize the views + */ + + if (state.directory && chdir(state.directory)) + report(3, "cannot change working directory", NiL, (unsigned long)0); + view(); + + /* + * recursion drops out here + */ + + if (state.recurse) + return recurse(state.recurse); + + /* + * read the mamfile(s) and bring the targets up to date + */ + + search(state.vars, "MAMAKEARGS", duplicate(use(state.opt) + 1)); + push(state.file, (Stdio_t*)0, STREAM_MUST); + make(rule("")); + pop(); + + /* + * verify that active targets were made + */ + + if (!state.active && !state.verified) + walk(state.rules, verify, NiL); + + /* + * done + */ + + return state.errors != 0; +} diff --git a/src/cmd/INIT/mamake.rt b/src/cmd/INIT/mamake.rt new file mode 100644 index 000000000..5f7603d54 --- /dev/null +++ b/src/cmd/INIT/mamake.rt @@ -0,0 +1,40 @@ +NOTE regression tests for the mamake command + +UNIT mamake + +TEST macros + +DATA Mamfile <<'!' +info mam static 00000 1994-07-17 make (AT&T Research) 5.3 2009-05-05 +setv DEFINED defined +setv EMPTY +make all + +exec - echo DEFINED ${DEFINED} +exec - echo DEFINED:VALUE ${DEFINED:VALUE} +exec - echo DEFINED:-VALUE ${DEFINED:-VALUE} +exec - echo DEFINED=VALUE ${DEFINED=VALUE} +exec - echo DEFINED[VALUE] ${DEFINED[VALUE]} +exec - echo DEFINED.COMPONENT ${DEFINED.COMPONENT} +exec - echo DEFINED.COMPONENT[VALUE] ${DEFINED.COMPONENT[VALUE]} + +exec - echo EMPTY ${EMPTY} +exec - echo EMPTY:VALUE ${EMPTY:VALUE} +exec - echo EMPTY:-VALUE ${EMPTY:-VALUE} +exec - echo EMPTY=VALUE ${EMPTY=VALUE} +exec - echo EMPTY[VALUE] ${EMPTY[VALUE]} +exec - echo EMPTY.COMPONENT ${EMPTY.COMPONENT} +exec - echo EMPTY.COMPONENT[VALUE] ${EMPTY.COMPONENT[VALUE]} + +exec - echo __NoT_DeFiNeD__ ${__NoT_DeFiNeD__} +exec - echo __NoT_DeFiNeD__:VALUE ${__NoT_DeFiNeD__:VALUE} +exec - echo __NoT_DeFiNeD__:-VALUE ${__NoT_DeFiNeD__:-VALUE} +exec - echo __NoT_DeFiNeD__=VALUE ${__NoT_DeFiNeD__=VALUE} +exec - echo __NoT_DeFiNeD__[VALUE] ${__NoT_DeFiNeD__[VALUE]} +exec - echo __NoT_DeFiNeD__.COMPONENT ${__NoT_DeFiNeD__.COMPONENT} +exec - echo __NoT_DeFiNeD__.COMPONENT[VALUE] ${__NoT_DeFiNeD__.COMPONENT[VALUE]} + +done all generated virtual +! + +EXEC -n diff --git a/src/cmd/INIT/mamake.tst b/src/cmd/INIT/mamake.tst new file mode 100644 index 000000000..3c7f94d64 --- /dev/null +++ b/src/cmd/INIT/mamake.tst @@ -0,0 +1,63 @@ +# : : generated from mamake.rt by mktest : : # + +# regression tests for the mamake command + +UNIT mamake + +TEST 01 macros + + EXEC -n + INPUT -n - + INPUT Mamfile $'info mam static 00000 1994-07-17 make (AT&T Research) 5.3 2009-05-05 +setv DEFINED defined +setv EMPTY +make all + +exec - echo DEFINED ${DEFINED} +exec - echo DEFINED:VALUE ${DEFINED:VALUE} +exec - echo DEFINED:-VALUE ${DEFINED:-VALUE} +exec - echo DEFINED=VALUE ${DEFINED=VALUE} +exec - echo DEFINED[VALUE] ${DEFINED[VALUE]} +exec - echo DEFINED.COMPONENT ${DEFINED.COMPONENT} +exec - echo DEFINED.COMPONENT[VALUE] ${DEFINED.COMPONENT[VALUE]} + +exec - echo EMPTY ${EMPTY} +exec - echo EMPTY:VALUE ${EMPTY:VALUE} +exec - echo EMPTY:-VALUE ${EMPTY:-VALUE} +exec - echo EMPTY=VALUE ${EMPTY=VALUE} +exec - echo EMPTY[VALUE] ${EMPTY[VALUE]} +exec - echo EMPTY.COMPONENT ${EMPTY.COMPONENT} +exec - echo EMPTY.COMPONENT[VALUE] ${EMPTY.COMPONENT[VALUE]} + +exec - echo __NoT_DeFiNeD__ ${__NoT_DeFiNeD__} +exec - echo __NoT_DeFiNeD__:VALUE ${__NoT_DeFiNeD__:VALUE} +exec - echo __NoT_DeFiNeD__:-VALUE ${__NoT_DeFiNeD__:-VALUE} +exec - echo __NoT_DeFiNeD__=VALUE ${__NoT_DeFiNeD__=VALUE} +exec - echo __NoT_DeFiNeD__[VALUE] ${__NoT_DeFiNeD__[VALUE]} +exec - echo __NoT_DeFiNeD__.COMPONENT ${__NoT_DeFiNeD__.COMPONENT} +exec - echo __NoT_DeFiNeD__.COMPONENT[VALUE] ${__NoT_DeFiNeD__.COMPONENT[VAL'\ +$'UE]} + +done all generated virtual' + OUTPUT - $'echo DEFINED defined +echo DEFINED:VALUE +echo DEFINED:-VALUE +echo DEFINED=VALUE defined +echo DEFINED[VALUE] ${DEFINED[VALUE]} +echo DEFINED.COMPONENT +echo DEFINED.COMPONENT[VALUE] ${DEFINED.COMPONENT[VALUE]} +echo EMPTY +echo EMPTY:VALUE ${EMPTY:VALUE} +echo EMPTY:-VALUE ${EMPTY:-VALUE} +echo EMPTY=VALUE +echo EMPTY[VALUE] ${EMPTY[VALUE]} +echo EMPTY.COMPONENT +echo EMPTY.COMPONENT[VALUE] ${EMPTY.COMPONENT[VALUE]} +echo __NoT_DeFiNeD__ ${__NoT_DeFiNeD__} +echo __NoT_DeFiNeD__:VALUE ${__NoT_DeFiNeD__:VALUE} +echo __NoT_DeFiNeD__:-VALUE ${__NoT_DeFiNeD__:-VALUE} +echo __NoT_DeFiNeD__=VALUE ${__NoT_DeFiNeD__=VALUE} +echo __NoT_DeFiNeD__[VALUE] ${__NoT_DeFiNeD__[VALUE]} +echo __NoT_DeFiNeD__.COMPONENT +echo __NoT_DeFiNeD__.COMPONENT[VALUE] ${__NoT_DeFiNeD__.COMPONENT[VALUE]}' + ERROR -n - diff --git a/src/cmd/INIT/mamprobe.sh b/src/cmd/INIT/mamprobe.sh new file mode 100644 index 000000000..8d3d831c4 --- /dev/null +++ b/src/cmd/INIT/mamprobe.sh @@ -0,0 +1,270 @@ +######################################################################## +# # +# This software is part of the ast package # +# Copyright (c) 1994-2011 AT&T Intellectual Property # +# Copyright (c) 2020-2022 Contributors to ksh 93u+m # +# and is licensed under the # +# Eclipse Public License, Version 2.0 # +# # +# A copy of the License is available at # +# https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html # +# (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) # +# # +# Glenn Fowler # +# Martijn Dekker # +# # +######################################################################## +### this script contains archaic constructs that work with all sh variants ### +# mamprobe - generate MAM cc probe info +# Glenn Fowler + +(command set -o posix) 2>/dev/null && set -o posix + +command=mamprobe + +bins=` + ( + userPATH=$PATH + PATH=/run/current-system/sw/bin:/usr/xpg7/bin:/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin:$PATH + getconf PATH 2>/dev/null && echo "$userPATH" || echo /bin:/usr/bin:/sbin:/usr/sbin:"$userPATH" + ) | sed 's/:/ /g' +` || exit + +# check the options + +opt= + +case `(getopts '[-][123:xyz]' opt --xyz; echo 0$opt) 2>/dev/null` in +0123) USAGE=$' +[-? +@(#)$Id: mamprobe (AT&T Labs Research) 2011-02-11 $ +] +[+NAME?mamprobe - generate MAM cc probe info] +[+DESCRIPTION?\bmamprobe\b generates MAM (make abstract machine) \bcc\b(1) + probe information for use by \bmamake\b(1). \acc-path\a is the + absolute path of the probed compiler and \ainfo-file\a is where + the information is placed. \ainfo-file\a is usually + \b$INSTALLROOT/lib/probe/C/mam/\b\ahash\a, where \ahash\a is a hash + of \acc-path\a. Any \ainfo-file\a directories are created if needed. + If \ainfo-file\a is \b-\b then the probe information is written to + the standard output.] +[+?\bmamprobe\b and \bmamake\b are used in the bootstrap phase of + \bpackage\b(1) installation before \bnmake\b(1) is built. The + probed variable names are the \bnmake\b(1) names with a \bmam_\b + prefix, \bCC\b converted to \bcc\b, and \b.\b converted to \b_\b. + Additional variables are:]{ + [+_hosttype_?the \bpackage\b(1) host type] + [+mam_cc_L?\b-L\b\adir\a supported] + [+STDCAT?command to execute for \bcat\b(1); prefixed by + \bexecrate\b(1) on \b.exe\b challenged systems] + [+STDCHMOD?command to execute for \bchmod\b(1); prefixed by + \bexecrate\b(1) on \b.exe\b challenged systems] + [+STDCMP?command to execute for \bcmp\b(1); prefixed by + \bexecrate\b(1) on \b.exe\b challenged systems] + [+STDCP?command to execute for \bcp\b(1); prefixed by + \bexecrate\b(1) on \b.exe\b challenged systems] + [+STDED?command to execute for \bed\b(1) or \bex\b(1)] + [+STDEDFLAGS?flags for \bSTDED\b] + [+STDLN?command to execute for \bln\b(1); prefixed by + \bexecrate\b(1) on \b.exe\b challenged systems] + [+STDMV?command to execute for \bmv\b(1); prefixed by + \bexecrate\b(1) on \b.exe\b challenged systems] + [+STDRM?command to execute for \brm\b(1); prefixed by + \bexecrate\b(1) on \b.exe\b challenged systems] +} +[d:debug?Enable probe script debug trace.] + +info-file cc-path + +[+SEE ALSO?\bexecrate\b(1), \bpackage\b(1), \bmamake\b(1), \bnmake\b(1), + \bprobe\b(1)] +' + while getopts -a "$command" "$USAGE" OPT + do case $OPT in + d) opt=-d ;; + esac + done + shift `expr $OPTIND - 1` + ;; +*) while : + do case $# in + 0) break ;; + esac + case $1 in + --) shift + break + ;; + -) break + ;; + -d) opt=-d + ;; + -*) echo $command: $1: unknown option >&2 + ;; + *) break + ;; + esac + set '' + break + done + ;; +esac + +# check the args + +case $1 in +-) ;; +/*) ;; +*) set '' ;; +esac +case $2 in +/*) ;; +*) set '' ;; +esac +case $# in +0|1) echo "Usage: $command info-file cc-path" >&2; exit 2 ;; +esac +info=$1 +shift +cc=$* + +# find the make probe script + +ifs=${IFS-' + '} +IFS=: +set $PATH +IFS=$ifs +script=lib/probe/C/make/probe +while : +do case $# in + 0) echo "$0: ../$script: probe script not found on PATH" >&2 + exit 1 + ;; + esac + case $1 in + '') continue ;; + esac + makeprobe=`echo $1 | sed 's,[^/]*$,'$script,` + if test -x $makeprobe + then break + fi + shift +done + +# create the info dir if necessary + +case $info in +/*) i=X$info + ifs=${IFS-' + '} + IFS=/ + set $i + IFS=$ifs + while : + do i=$1 + shift + case $i in + X) break ;; + esac + done + case $info in + //*) path=/ ;; + *) path= ;; + esac + while : + do case $# in + 0|1) break ;; + esac + comp=$1 + shift + case $comp in + '') continue ;; + esac + path=$path/$comp + if test ! -d $path + then mkdir $path || exit + fi + done + ;; +esac + +# generate info in a tmp file and rename when finished + +case $info in +-) ;; +*) tmp=${TMPDIR:-/tmp}/mam$$ + trap "exec >/dev/null; rm -f $tmp" 0 1 2 3 15 + exec > $tmp + echo "probing C language processor $cc for mam information" >&2 + ;; +esac + +echo "note generated by $0 for $cc" + +( + set '' $opt $cc + shift + . $makeprobe "$@" + + case " $CC_DIALECT " in + *" -L "*) echo "CC.L = 1" ;; + esac + +) | sed \ + -e '/^CC\./!d' \ + -e 's/^CC./setv mam_cc_/' \ + -e 's/^\([^=.]*\)\./\1_/' \ + -e 's/^\([^=.]*\)\./\1_/' \ + -e 's/ =//' \ + -e 's/\$("\([^"]*\)")/\1/g' \ + -e 's/\$(\([^)]*\))/${\1}/g' \ + -e 's/\${CC\./${mam_cc_}/g' + +echo 'setv _hosttype_ ${mam_cc_HOSTTYPE}' + +# STD* are standard commands/flags with possible execrate(1) + +if ( +ed < /dev/null 2>&1 +then STDED=ed +else STDED=ex +fi +STDEDFLAGS=- +set STDCAT cat STDCHMOD chmod STDCMP cmp STDCP cp STDLN ln STDMV mv STDRM rm +while : +do case $# in + 0|1) break ;; + esac + p=$2 + for d in $bins + do if test -x $d/$p + then p=$d/$p + break + fi + done + eval $1=\$p + shift + shift +done +if execrate +then for n in STDCAT STDCHMOD STDCMP STDCP STDLN STDMV STDRM + do eval $n=\"execrate \$$n\" + done +fi +for n in STDCAT STDCHMOD STDCMP STDCP STDED STDEDFLAGS STDLN STDMV STDRM +do eval echo setv \$n \$$n +done + +# all done + +case $info in +-) ;; +*) exec >/dev/null + test -f "$info" && rm -f "$info" + cp "$tmp" "$info" + chmod -w "$info" + ;; +esac diff --git a/src/cmd/INIT/mkdir.sh b/src/cmd/INIT/mkdir.sh new file mode 100644 index 000000000..0c7b30e49 --- /dev/null +++ b/src/cmd/INIT/mkdir.sh @@ -0,0 +1,78 @@ +#!/bin/sh +######################################################################## +# # +# This software is part of the ast package # +# Copyright (c) 1994-2011 AT&T Intellectual Property # +# and is licensed under the # +# Eclipse Public License, Version 2.0 # +# # +# A copy of the License is available at # +# https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html # +# (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) # +# # +# Glenn Fowler # +# # +######################################################################## +: mkdir for systems that do not support -p : 2002-09-01 : + +(command set -o posix) 2>/dev/null && set -o posix + +MKDIR=mkdir +CHMOD=chmod +mode= +parents= +while : +do case $1 in + -m) case $# in + 1) echo "mkdir: -m: mode argument expected" >&2 + exit 1 + ;; + esac + shift + mode=$1 + ;; + -m*) mode=`echo X$1 | sed 's/X-m//'` + ;; + -p) parents=1 + ;; + *) break + ;; + esac + shift +done +if test "" != "$parents" +then for d + do if test ! -d $d + then ifs=${IFS-' + '} + IFS=/ + set '' $d + IFS=$ifs + shift + dir=$1 + shift + if test -n "$dir" -a ! -d "$dir" + then $MKDIR "$dir" || exit 1 + if test "" != "$mode" + then $CHMOD "$mode" "$dir" || exit 1 + fi + fi + for d + do dir=$dir/$d + if test ! -d "$dir" + then $MKDIR "$dir" || exit 1 + if test "" != "$mode" + then $CHMOD "$mode" "$dir" || exit 1 + fi + fi + done + fi + done +else $MKDIR "$@" || exit 1 + if test "" != "$mode" + then for d + do $CHMOD "$mode" "$d" || exit 1 + done + fi +fi +exit 0 diff --git a/src/cmd/INIT/mktest.sh b/src/cmd/INIT/mktest.sh new file mode 100755 index 000000000..1822e8b8f --- /dev/null +++ b/src/cmd/INIT/mktest.sh @@ -0,0 +1,641 @@ +######################################################################## +# # +# This software is part of the ast package # +# Copyright (c) 1994-2011 AT&T Intellectual Property # +# Copyright (c) 2020-2022 Contributors to ksh 93u+m # +# and is licensed under the # +# Eclipse Public License, Version 2.0 # +# # +# A copy of the License is available at # +# https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html # +# (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) # +# # +# Glenn Fowler # +# Martijn Dekker # +# Johnothan King # +# # +######################################################################## +: mktest - generate regress or shell regression test scripts + +command=mktest +stdin=8 +stdout=9 +PREFIX=test +STYLE=regress +WIDTH=80 + +eval "exec $stdout>&1" + +case $(getopts '[-][123:xyz]' opt --xyz 2>/dev/null; echo 0$opt) in +0123) ARGV0="-a $command" + USAGE=$' +[-? +@(#)$Id: mktest (AT&T Labs Research) 2010-08-11 $ +] +[-author?Glenn Fowler ] +[-copyright?Copyright (c) 2005-2012 AT&T Intellectual Property] +[-license?https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html] +[+NAME?mktest - generate a regression test scripts] +[+DESCRIPTION?\bmktest\b generates regression test scripts from test + template commands in the \aunit\a.\brt\b file. The generated test + script writes temporary output to '$PREFIX$'\aunit\a.tmp and compares + it to the expected output in '$PREFIX$'\aunit\a.out. Run the test + script with the \b--accept\b option to (re)generate + '$PREFIX$'\aunit\a.out.] +[s:style?The script style:]:[style:='$STYLE$'] + { + [+regress?\bregress\b(1) command input.] + [+shell?Standalone test shell script.] + } +[w:width?Set the output format width to approximately + \awidth\a.]:[width:='$WIDTH$'] + +unit.rt [ unit [ arg ... ] ] + +[+INPUT FILES?The regression test command file \aunit\a\b.rt\b is a + \bksh\b(1) script that makes calls to the following functions:] + { + [+DATA \afile\a [ - | [ options ]] data]]?Create input data + \afile\a that is empty (-) or contains \adata\a subject to + \bprint\b(1) \aoptions\a or that is a copy of the DATA command + standard input. Set \afile\a to \b-\b to name the standard + input.] + [+DIAGNOSTICS?Diagnostic messages of unspecified format are + expected.] + [+DO \acommand\a [ \aarg\a ... ]]?Execute \acommand\a if the + current test is active.] + [+EXEC [ \aarg\a ... ]]?Run the command under test with + optional arguments. If the standard input is not specified then + the standard input of the previous EXEC is used. The standard + input of the first EXEC in a TEST group is an empty regular + file.] + [+EXPORT \aname\a=\avalue\a ...?Export list for subsequent + commands in the TEST group or for all TEST groups if before + the first TEST group.] + [+IGNORESPACE [ 0 | 1 ] + ?Ignore space differences when comparing expected output.] + [+KEEP \apattern\a ...?File match patterns of files to retain + between TEST groups.] + [+NOTE \acomment\a?\acomment\a is added to the current test + script.] + [+PROG \acommand\a [ \aarg\a ... ]]?Run \acommand\a with + optional arguments.] + [+TEST [ \anumber\a ]] [ \adescription\a ... ]]?Define a new + test group with optional \anumber\a and \adescription\a.] + [+TWD [ \adir\a ... ]]?Set the temporary test dir to \adir\a. + The default is \aunit\a\b.tmp\b, where \aunit\a is the test + input file sans directory and suffix. If \adir\a matches \b/*\b + then it is the directory name; if \adir\a is non-null then the + prefix \b${TMPDIR:-/tmp}\b is added; otherwise if \adir\a is + omitted then + \b${TMPDIR:-/tmp}/tst-\b\aunit\a-$$-$RANDOM.\b\aunit\a is + used.] + [+UMASK [ \amask\a ]]?Run subsequent tests with \bumask\b(1) + \amask\a. If \amask\a is omitted then the original \bumask\b is + used.] + [+UNIT \acommand\a [ \aarg\a ... ]]?Define the command and + optional default arguments to be tested. \bUNIT\b explicitly + overrides the default command name derived from the test script + file name.] + [+WIDTH \awidth\a?Set the output format width to approximately + \awidth\a.] + } +[+SEE ALSO?\bregress\b(1), \bksh\b(1)] +' + ;; +*) ARGV0="" + USAGE='s: unit.rt [ arg ... ]' + ;; +esac + +typeset ARG SCRIPT UNIT TEMP=${TMPDIR:-/tmp}/$command.$$.tmp WORK +typeset IO INPUT INPUT_N OUTPUT OUTPUT_N ERROR ERROR_N KEEP +typeset -C STATE +typeset -A DATA STATE.RESET REMOVE FORMAT +integer KEEP_UNIT=0 SCRIPT_UNIT=0 TEST=0 CODE=0 EXIT=0 ACCEPT=0 DIAGNOSTICS=0 code + +while getopts $ARGV0 "$USAGE" OPT +do case $OPT in + s) case $OPTARG in + regress|shell) + STYLE=$OPTARG + ;; + *) print -u2 -r -- $command: --style=$OPTARG: regress or shell expected + exit 1 + ;; + esac + ;; + w) WIDTH=$OPTARG + ;; + *) OPTIND=0 + getopts $ARGV0 "$USAGE" OPT '-?' + exit 2 + ;; + esac +done +shift $OPTIND-1 + +typeset SINGLE= quote='%${SINGLE}..${WIDTH}q' + +if [[ $1 == - ]] +then shift +fi +if (( ! $# )) +then + print -u2 -r -- $command: test command script path expected + exit 1 +fi +SCRIPT=$1 +shift +if [[ ! -r $SCRIPT ]] +then print -u2 -r -- $command: $SCRIPT: cannot read + exit 1 +fi +(ulimit -c 0) >/dev/null 2>&1 && ulimit -c 0 +if (( $# )) +then set -A UNIT -- "$@" + KEEP_UNIT=1 +else ARG=${SCRIPT##*/} + set -A UNIT -- "${ARG%.*}" +fi +WORK=${UNIT[0]}.tmp +rm -rf $WORK +mkdir $WORK || exit +export PATH=$PWD:$PATH + +function LINE +{ + if [[ $STYLE == regress ]] + then print -u$stdout + fi +} + +function NOTE +{ + case $STYLE in + regress)LINE + print -u$stdout -r -- '#' "$@" + ;; + shell) print -u$stdout -r -f ": $QUOTE"$'\n' -- "$*" + ;; + esac +} + +function UNIT +{ + (( KEEP_UNIT )) || set -A UNIT -- "$@" + case $STYLE in + regress)LINE + print -u$stdout -r -f $'UNIT' + for ARG in "$@" + do print -u$stdout -r -f " $QUOTE" -- "$ARG" + done + print -u$stdout + ;; + shell) print -u$stdout -r -f $'set x' + for ARG in "$@" + do print -u$stdout -r -f " $QUOTE" -- "$ARG" + done + print -u$stdout + print -u$stdout shift + ;; + esac +} + +function TEST +{ + typeset i + typeset -A REM + if (( ${#STATE.RESET[@]} )) + then unset ${!STATE.RESET[@]} + case $STYLE in + shell) print -u$stdout -r -- unset ${!STATE.RESET[@]} ;; + esac + unset STATE.RESET + typeset -A STATE.RESET + fi + if (( ${#REMOVE[@]} )) + then rm -f -- "${!REMOVE[@]}" + case $STYLE in + shell) print -u$stdout -r -f $'rm -f' + for i in ${!REMOVE[@]} + do print -u$stdout -r -f " $QUOTE" "$i" + done + print -u$stdout + ;; + esac + for i in ${!REMOVE[@]} + do unset REMOVE[$i] + done + fi + rm -rf $WORK/* + if [[ $1 == +([0-9]) ]] + then TEST=${1##0} + shift + else ((TEST++)) + fi + LINE + case $STYLE in + regress)print -u$stdout -r -f "TEST %02d $QUOTE"$'\n' -- $TEST "$*" + ;; + shell) print -u$stdout -r -f ": TEST %02d $QUOTE"$'\n' -- $TEST "$*" + ;; + esac + : > $TEMP.INPUT > $TEMP.in + INPUT= + INPUT_N= + OUTPUT= + OUTPUT_N= + ERROR= + ERROR_N= + UMASK=$UMASK_ORIG + UMASK_DONE=$UMASK + CODE=0 +} + +function TWD +{ + case $STYLE in + regress)LINE + print -u$stdout -r -f $'TWD' + for ARG in "$@" + do print -u$stdout -r -f " $QUOTE" -- "$ARG" + done + print -u$stdout + ;; + esac +} + +function RUN +{ + typeset i n p op unit sep output=1 error=1 exitcode=1 + op=$1 + shift + while : + do case $1 in + ++NOOUTPUT) output= ;; + ++NOERROR) error= ;; + ++NOEXIT) exitcode= ;; + ++*) print -u2 -r -- $command: $0: $1: unknown option; exit 1 ;; + *) break ;; + esac + shift + done + if [[ $op == PROG ]] + then unit=$1 + shift + elif (( ! ${#UNIT[@]} )) + then print -u2 -r -- $command: $SCRIPT: UNIT statement or operand expected + exit 1 + fi + LINE + case $STYLE in + regress)if [[ $op == PROG ]] + then print -u$stdout -r -f $'\t'"$op"$'\t'"$unit" + sep=$' ' + else print -u$stdout -r -f $'\t'"$op" + sep=$'\t' + fi + for ARG in "$@" + do LC_CTYPE=C print -u$stdout -r -f "$sep$QUOTE" -- "$ARG" + sep=$' ' + done + print -u$stdout + [[ ${DATA[-]} || /dev/fd/0 -ef /dev/fd/$stdin ]] || cat > $TEMP.in + IO=$(cat $TEMP.in; print :) + if [[ $IO == ?*$'\n:' ]] + then IO=${IO%??} + n= + else IO=${IO%?} + n=-n + fi + { + [[ $UMASK != $UMASK_ORIG ]] && umask $UMASK + cd $WORK + if [[ $op == PROG ]] + then "$unit" "$@" + code=$? + else "${UNIT[@]}" "$@" + code=$? + fi + cd .. + [[ $UMASK != $UMASK_ORIG ]] && umask $UMASK_ORIG + } < $TEMP.in > $TEMP.out 2> $TEMP.err + if [[ $IO != "$INPUT" || $n != "$INPUT_N" ]] + then INPUT=$IO + INPUT_N=$n + if [[ ${FORMAT[-]} ]] + then print -u$stdout -n -r -- $'\t\tINPUT' + print -u$stdout -r -f " $QUOTE" -- "${FORMAT[-]}" + print -u$stdout -r -f " $QUOTE" -- - + unset FORMAT[-] + else print -u$stdout -n -r -- $'\t\tINPUT' $n - + [[ $IO ]] && LC_CTYPE=C print -u$stdout -r -f " $QUOTE" -- "$IO" + fi + print -u$stdout + unset DATA[-] + fi + for i in ${!DATA[@]} + do if [[ ${FORMAT[$i]} ]] + then print -u$stdout -n -r -- $'\t\tINPUT' + print -u$stdout -r -f " $QUOTE" -- "${FORMAT[$i]}" + print -u$stdout -r -f " $QUOTE" -- "$i" + unset FORMAT[$i] + else case $i in + -) p=$TEMP.in ;; + *) p=$WORK/$i ;; + esac + IO=$(cat $p; print :) + if [[ $IO == ?*$'\n:' ]] + then IO=${IO%??} + n= + else IO=${IO%?} + n=-n + fi + print -u$stdout -n -r -- $'\t\tINPUT' $n + print -u$stdout -r -f " $QUOTE" -- "$i" + [[ $IO ]] && LC_CTYPE=C print -u$stdout -r -f " $QUOTE" -- "$IO" + fi + print -u$stdout + unset DATA[$i] + done + IO=$(cat $TEMP.out; print :) + if [[ $IO == ?*$'\n:' ]] + then IO=${IO%??} + n= + else IO=${IO%?} + n=-n + fi + if [[ $IO != "$OUTPUT" || $n != "$OUTPUT_N" ]] + then OUTPUT=$IO + OUTPUT_N=$n + if [[ $output ]] + then if [[ ! -s $TEMP.out ]] + then print -u$stdout -n -r -- $'\t\tOUTPUT' - + elif cmp -s $TEMP.in $TEMP.out + then OUTPUT=not-$OUTPUT + print -u$stdout -n -r -- $'\t\tSAME OUTPUT INPUT' + else print -u$stdout -n -r -- $'\t\tOUTPUT' $n - + [[ $IO ]] && LC_CTYPE=C print -u$stdout -r -f " $QUOTE" -- "$IO" + fi + print -u$stdout + fi + fi + IO=$(cat $TEMP.err; print :) + IO=${IO//$command\[*([0-9])\]:\ .\[*([0-9])\]:\ @(EXEC|PROG)\[*([0-9])\]:\ /} + if [[ $IO == ?*$'\n:' ]] + then IO=${IO%??} + n= + else IO=${IO%?} + n=-n + fi + if [[ $IO != "$ERROR" || $n != "$ERROR_N" ]] + then ERROR=$IO + ERROR_N=$n + if [[ $error ]] + then print -u$stdout -n -r -- $'\t\tERROR' $n - + [[ $IO ]] && LC_CTYPE=C print -u$stdout -r -f " $QUOTE" -- "$IO" + print -u$stdout + fi + fi + case $output:$error in + :) OUTPUT= + OUTPUT_N= + ERROR= + ERROR_N= + print -u$stdout -r -- $'\t\tIGNORE OUTPUT ERROR' + ;; + :1) OUTPUT= + OUTPUT_N= + print -u$stdout -r -- $'\t\tIGNORE OUTPUT' + ;; + 1:) ERROR= + ERROR_N= + print -u$stdout -r -- $'\t\tIGNORE ERROR' + ;; + esac + if [[ $UMASK_DONE != $UMASK ]] + then UMASK_DONE=$UMASK + print -u$stdout -r -f $'\t\tUMASK %s\n' $UMASK + fi + if (( code != CODE )) + then (( CODE=code )) + if [[ $exitcode ]] + then print -u$stdout -r -f $'\t\tEXIT %d\n' $CODE + fi + fi + ;; + shell) [[ $UMASK != $UMASK_ORIG ]] && print -u$stdout -r -f "{ umask $UMASK; " + if [[ $op == PROG ]] + then print -u$stdout -r -f $'"'"$unit"$'"' + else print -u$stdout -r -f $'"$@"' + fi + for ARG in "$@" + do print -u$stdout -r -f " $QUOTE" -- "$ARG" + done + [[ $UMASK != $UMASK_ORIG ]] && print -u$stdout -r -f "umask $UMASK_ORIG; } " + if [[ ! $output ]] + then print -u$stdout -r -f " >/dev/null" + fi + if [[ ! $error ]] + then if [[ ! $output ]] + then print -u$stdout -r -f " 2>&1" + else print -u$stdout -r -f " 2>/dev/null" + fi + fi + IO=$(cat) + if [[ $IO ]] + then print -u$stdout -r -- "<<'!TEST-INPUT!'" + print -u$stdout -r -- "$IO" + print -u$stdout -r -- !TEST-INPUT! + else print -u$stdout + fi + if [[ $exitcode ]] + then print -u$stdout -r -- $'CODE=$?\ncase $CODE in\n0) ;;\n*) echo exit status $CODE ;;\nesac' + fi + ;; + esac +} + +function DO +{ + LINE + print -r $'\t'DO "$@" +} + +function EXEC +{ + RUN EXEC "$@" +} + +function DATA +{ + typeset f p o + f=$1 + shift + case $f in + -) p=$TEMP.in ;; + *) p=$WORK/$f ;; + esac + case $1 in + '') cat ;; + -) ;; + *) print -r "$@" ;; + esac > $p + DATA[$f]=1 + if (( $# == 1 )) && [[ $1 == -?* ]] + then FORMAT[$f]=$1 + else FORMAT[$f]= + fi + if [[ $f != $KEEP ]] + then REMOVE[$f]=1 + fi + if [[ $STYLE == shell ]] + then { + print -r -f "cat > $QUOTE <<'!TEST-INPUT!'"$'\n' -- "$f" + cat "$p" + print -r -- !TEST-INPUT! + } >&$stdout + fi +} + +function KEEP +{ + typeset p + for p + do if [[ $KEEP ]] + then KEEP=$KEEP'|' + fi + KEEP=$KEEP$p + done +} + +function DIAGNOSTICS +{ + LINE + case $STYLE in + regress) print -u$stdout -r $'DIAGNOSTICS' ;; + shell) DIAGNOSTICS=1 ;; + esac +} + +function EXPORT +{ + typeset x n v + LINE + case $STYLE in + regress) print -u$stdout -r -f $'EXPORT' ;; + shell) print -u$stdout -r -f $'export' ;; + esac + for x + do n=${x%%=*} + v=${x#*=} + export "$x" + print -u$stdout -r -f " %s=$QUOTE" "$n" "$v" + (( TEST )) && STATE.RESET["$n"]=1 + done + print -u$stdout +} + +function PROG +{ + RUN PROG "$@" +} + +function WIDTH +{ + WIDTH=${1:-80} + eval QUOTE='"'$quote'"' +} + +function IGNORESPACE +{ + IGNORESPACE=-b + LINE + print -u$stdout -r IGNORESPACE +} + +function UMASK # [ mask ] +{ + [[ $UMASK_ORIG ]] || UMASK_ORIG=$(umask) + UMASK=$1 + [[ $UMASK ]] || UMASK=$UMASK_ORIG +} + +trap 'CODE=$?; rm -rf $TEMP.* $WORK; exit $CODE' 0 1 2 3 15 + +typeset IGNORESPACE UMASK UMASK_ORIG UMASK_DONE +UMASK_ORIG=$(umask) +IFS=$IFS$'\n' + +print -u$stdout -r "# : : generated from $SCRIPT by $command : : #" +case $STYLE in +shell) cat <&2 <&2 + exit 1 + ;; + *) break + ;; + esac + shift +done +export COLUMNS=80 +{ +! + ;; +esac + +export COLUMNS=80 + +case $STYLE in +shell) SINGLE='#' + eval QUOTE='"'$quote'"' + . $SCRIPT < /dev/null | sed -e $'s,\\\\n,\n,g' -e $'s,\\\\t,\t,g' -e $'s,\\$\',\',g' + ;; +*) eval QUOTE='"'$quote'"' + : > $TEMP.INPUT > $TEMP.in + eval "exec $stdin<$TEMP.INPUT" + . $SCRIPT <&$stdin + ;; +esac + +case $STYLE in +shell) cat < $PREFIX${UNIT[0]}.tmp 2>&1 < /dev/null +case \$ACCEPT in +0) if grep ' $' $PREFIX${UNIT[0]}.tmp >/dev/null + then mv $PREFIX${UNIT[0]}.tmp $PREFIX${UNIT[0]}.junk + sed 's/ $//' < $PREFIX${UNIT[0]}.junk > $PREFIX${UNIT[0]}.tmp + rm -f $PREFIX${UNIT[0]}.junk + fi + if cmp -s $PREFIX${UNIT[0]}.tmp $PREFIX${UNIT[0]}.out + then echo ${UNIT[0]} tests PASSED + rm -f $PREFIX${UNIT[0]}.tmp + else echo ${UNIT[0]} tests FAILED + diff $IGNORESPACE $PREFIX${UNIT[0]}.tmp $PREFIX${UNIT[0]}.out + fi + ;; + +*) mv $PREFIX${UNIT[0]}.tmp $PREFIX${UNIT[0]}.out + ;; +esac +! + ;; +esac diff --git a/src/cmd/INIT/mprobe.sh b/src/cmd/INIT/mprobe.sh new file mode 100644 index 000000000..926cf94df --- /dev/null +++ b/src/cmd/INIT/mprobe.sh @@ -0,0 +1,27 @@ +######################################################################## +# # +# This software is part of the ast package # +# Copyright (c) 1994-2011 AT&T Intellectual Property # +# Copyright (c) 2020-2022 Contributors to ksh 93u+m # +# and is licensed under the # +# Eclipse Public License, Version 2.0 # +# # +# A copy of the License is available at # +# https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html # +# (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) # +# # +# Glenn Fowler # +# Martijn Dekker # +# # +######################################################################## +: mam probe script +opt= +while : +do case $1 in + -d) opt=-d ;; + -*) ;; + *) break ;; + esac + shift +done +mamprobe $opt - "$1" diff --git a/src/cmd/INIT/nsl.c b/src/cmd/INIT/nsl.c new file mode 100644 index 000000000..2ce018329 --- /dev/null +++ b/src/cmd/INIT/nsl.c @@ -0,0 +1,28 @@ +/*********************************************************************** +* * +* This software is part of the ast package * +* Copyright (c) 1994-2011 AT&T Intellectual Property * +* Copyright (c) 2020-2022 Contributors to ksh 93u+m * +* and is licensed under the * +* Eclipse Public License, Version 2.0 * +* * +* A copy of the License is available at * +* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html * +* (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) * +* * +* Glenn Fowler * +* Martijn Dekker * +* * +***********************************************************************/ +/* + * small test for -lnsl + */ + + +extern void* gethostbyname(); + +int +main() +{ + return gethostbyname(0) == 0; +} diff --git a/src/cmd/INIT/p.c b/src/cmd/INIT/p.c new file mode 100644 index 000000000..809ceb5db --- /dev/null +++ b/src/cmd/INIT/p.c @@ -0,0 +1,21 @@ +/*********************************************************************** +* * +* This software is part of the ast package * +* Copyright (c) 1994-2011 AT&T Intellectual Property * +* Copyright (c) 2020-2022 Contributors to ksh 93u+m * +* and is licensed under the * +* Eclipse Public License, Version 2.0 * +* * +* A copy of the License is available at * +* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html * +* (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) * +* * +* Glenn Fowler * +* Martijn Dekker * +* * +***********************************************************************/ +/* + * small test for prototyping cc + */ + +int main(int argc, char** argv) { return argc || argv; } diff --git a/src/cmd/INIT/package.sh b/src/cmd/INIT/package.sh new file mode 100644 index 000000000..cf4cfab6a --- /dev/null +++ b/src/cmd/INIT/package.sh @@ -0,0 +1,3511 @@ +######################################################################## +# # +# This software is part of the ast package # +# Copyright (c) 1994-2012 AT&T Intellectual Property # +# Copyright (c) 2020-2022 Contributors to ksh 93u+m # +# and is licensed under the # +# Eclipse Public License, Version 2.0 # +# # +# A copy of the License is available at # +# https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html # +# (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) # +# # +# Glenn Fowler # +# Martijn Dekker # +# Trey Valenta # +# # +######################################################################## +### this sh script is POSIX compliant and compatible with shell bugs ### +# KornShell 93u+m build system, main control script # +# based on AST 'package' by Glenn Fowler # +# simplified and rewritten by Martijn Dekker # +######################################################################## + +# Escape from a non-POSIX shell +# ('test X -ef Y' is technically non-POSIX, but practically universal) +min_posix='test / -ef / && path=Bad && case $PATH in (Bad) exit 1;; esac && '\ +'PWD=Bad && cd -P -- / && case $PWD in (/) ;; (*) exit 1;; esac && '\ +'! { ! case x in ( x ) : ${0##*/} || : $( : ) ;; esac; } && '\ +'trap "exit 0" 0 && exit 1' +if (eval "$min_posix") 2>/dev/null +then : good shell +else "$SHELL" -c "$min_posix" 2>/dev/null && exec "$SHELL" -- "$0" ${1+"$@"} + sh -c "$min_posix" 2>/dev/null && exec sh -- "$0" ${1+"$@"} + DEFPATH=`getconf PATH` 2>/dev/null || DEFPATH=/usr/xpg4/bin:/bin:/usr/bin:/sbin:/usr/sbin + PATH=$DEFPATH:$PATH + export PATH + sh -c "$min_posix" 2>/dev/null && exec sh -- "$0" ${1+"$@"} + echo "$0: Can't escape from obsolete or broken shell. Run me with a POSIX shell." >&2 + exit 128 +fi +readonly min_posix # use for checksh() + +# Set standards compliance mode +(command set -o posix) 2>/dev/null && set -o posix + +# Sanitize 'cd' +unset CDPATH + +# Make the package root the current working directory +# This makes it possible to run '/my/path/package make' without cd'ing first +# (for all its featuritis, the AT&T version never could manage this) +case $0 in +[0123456789+-]*) + echo "dodgy \$0: $0" >&2 + exit 128 ;; +*/*) + me=$0 ;; +*) + me=$(command -v "$0") || exit 128 ;; +esac +me=$(dirname "$me") +cd "$me" || exit +unset -v me +case $PWD in +*/arch/*/*/bin) + cd .. ;; +*/arch/*/bin) + cd ../../.. ;; +*/bin) + cd .. ;; +*) + echo "this script must live in bin/" >&2 + exit 1 ;; +esac || exit + +# shell checks +checksh() +{ + "$1" -c "$min_posix" 2>/dev/null || return 1 +} + +LC_ALL=C +export LC_ALL + +TMPDIR=${TMPDIR:-/tmp} +export TMPDIR + +src="cmd contrib etc lib" +use="/usr/common /exp /usr/local /usr/add-on /usr/addon /usr/tools /usr /opt" +usr="/home" +lib="" # need /usr/local/lib /usr/local/shlib +ccs="/usr/kvm /usr/ccs/bin" +org="gnu GNU" +makefiles="Mamfile" # ksh 93u+m no longer uses these: Nmakefile nmakefile Makefile makefile +env="HOSTTYPE PACKAGEROOT INSTALLROOT PATH" + +package_use='=$HOSTTYPE=$PACKAGEROOT=$INSTALLROOT=$EXECROOT=$CC=' + +CROSS=0 + +MAKESKIP=${MAKESKIP:-"*[-.]*"} + +all_types='*.*|sun4' # all but sun4 match *.* + +command=${0##*/} +case $(getopts '[-][123:xyz]' opt --xyz 2>/dev/null; echo 0$opt) in +0123) USAGE=$' +[-? +@(#)$Id: '$command$' (ksh 93u+m) 2022-08-20 $ +] +[-author?Glenn Fowler ] +[-author?Contributors to https://github.com/ksh93/ksh] +[-copyright?(c) 1994-2012 AT&T Intellectual Property] +[-copyright?(c) 2020-2022 Contributors to https://github.com/ksh93/ksh] +[-license?https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html] +[+NAME?'$command$' - build, test and install ksh 93u+m] +[+DESCRIPTION?The \b'$command$'\b command is the main control script + for building and installing KornShell 93u+m. + It is a POSIX \bsh\b(1) script coded for maximal portability. + A POSIX shell and C compiler installation are the only requirements. + All package files are in the \b$PACKAGEROOT\b directory tree. + Binary package files are in the \b$INSTALLROOT\b + (\b$PACKAGEROOT/arch/\b\ahosttype\a) tree, where + \ahosttype\a=$(\bbin/package host type\b). + See \bDETAILS\b for more information.] +[+?Note that no environment variables need be set by the user; + \b'$command$'\b determines the environment based on the current working + directory. The \buse\b action starts a \bsh\b(1) with the environment + initialized. \bCC\b, \bCCFLAGS\b, \bHOSTTYPE\b and \bSHELL\b may be set + by explicit command argument assignments to override the defaults.] +[+?The command arguments are composed of a sequence of words: zero or + more \aqualifiers\a, one \aaction\a, and zero or more action-specific + \aarguments\a, and zero or more \aname=value\a definitions. + \boptget\b(3) documentation options such as \b--man\b, \b--html\b + and \b--nroff\b are also supported. + The default with no arguments is \bhost type\b.] +[+?The qualifiers are:] + { + [+debug|environment?Show environment and actions but do not + execute.] + [+flat?With the \bmake\b action, create a flat view by linking all + files from \b$INSTALLROOT\b, minus \b*.old\b files, + onto their corresponding path under \b$PACKAGEROOT\b. + Subsequent \bmake\b actions will update an existing flat view + whether or not \bflat\b is specified. + Only one architecture can have a flat view. + If \bflat\b is specified with the \bclean\b action, then + only clean up this flat view and do not delete \b$INSTALLROOT\b.] + [+force?Force the action to override saved state.] + [+never?Run make -N and show other actions.] + [+only?Only operate on the specified packages.] + [+quiet?Do not list captured action output.] + [+show?Run make -n and show other actions.] + [+verbose?Provide detailed action output.] + [+DEBUG?Trace the package script actions in detail.] + } +[+?The actions are:] + { + [+clean | clobber?Clean up the flat view, if any. + Then, unless \bflat\b was given, + delete the \barch/\b\aHOSTTYPE\a hierarchy; this + deletes all generated files and directories for \aHOSTTYPE\a. + The hierarchy can be rebuilt by \b'$command$' make\b.] + [+export\b [ \avariable\a ...]]?List \aname\a=\avalue\a for + \avariable\a, one per line. If the \bonly\b attribute is + specified then only the variable values are listed. If no + variables are specified then \b'$env$'\b are assumed.] + [+help\b [ \aaction\a ]]?Display help text on the standard + error (standard output for \aaction\a).] + [+host\b [ \aattribute\a ... ]]?List + architecture/implementation dependent host information on the + standard output. \btype\b is listed if no attributes are + specified. Information is listed on a single line in + \aattribute\a order. The attributes are:] + { + [+canon \aname\a?An external host type name to be + converted to \b'$command$'\b syntax.] + [+cpu?The number of CPUs; 1 if the host is not a + multiprocessor.] + [+name?The host name.] + [+rating?The CPU rating in pseudo mips; the value is + useful useful only in comparisons with rating values of + other hosts. Other than a vax rating (mercifully) fixed + at 1, ratings can vary wildly but consistently from + vendor mips ratings. \bcc\b(1) may be required to + determine the rating.] + [+type?The host type, usually in the form + \avendor\a.\aarchitecture\a, with an optional trailing + -\aversion\a. The main theme is that type names within + a family of architectures are named in a similar, + predictable style. OS point release information is + avoided as much as possible, but vendor resistance to + release incompatibilities has for the most part been + futile.] + } + [+install\b [ \adest_dir\a ]] [ \acommand\a ... ]]?Install commands + from the \b$INSTALLROOT\b tree + into appropriate subdirectories of \adest_dir\a. + If \adest_dir\a does not exist, + then it and any necessary subdirectories are created. + \adest_dir\a can be a directory like \a/usr/local\a + to install the \acommand\as directly, + or a temporary directory like \a/tmp/pkgtree/usr\a + to prepare for packaging with operating system-specific tools. + If no \acommand\a is specified, + then \aksh\a and \ashcomp\a are assumed.] + [+make\b [ \apackage\a ]] [ \aoption\a ... ]] [ \atarget\a ... ]]?Build + and install. The default \atarget\a is \binstall\b, which makes + and installs \apackage\a. If the standard output is a terminal + then the output is also captured in + \b$INSTALLROOT/lib/package/gen/make.out\b. The build is done in + the \b$INSTALLROOT\b directory tree viewpathed on top of the + \b$PACKAGEROOT\b directory tree. Leaf directory names matching the + \b|\b-separated shell pattern \b$MAKESKIP\b are ignored. The + \bview\b action is done before making. \aoption\a operands are + passed to the underlying make command.] + [+results\b [ \bfailed\b ]] [ \bpath\b ]] [ \bold\b ]] [\bmake\b | \btest\b | \bwrite\b ]]?List + results and interesting messages captured by the most recent + \bmake\b (default), \btest\b or \bwrite\b action. \bold\b + specifies the previous results, if any (current and previous + results are retained). \b$HOME/.pkgresults\b, if it exists, + must contain an \begrep\b(1) expression of result lines to be + ignored. \bfailed\b lists failures only and \bpath\b lists the + results file path name only.] + [+test\b [ \b\adir\a\b ]]\b?Run all available default regression tests. + If the optional \adir\a argument (such as \bsrc/cmd/ksh93\b) is given, + only the tests in that directory are run. + If the standard output is a terminal then the + output is also captured in \b$INSTALLROOT/lib/package/gen/test.out\b. + Programs must be made before they can be tested. + For \bksh\b, a separate \bshtests\b command is available that allows + passing arguments to select and tune the regression tests. + See \bbin/shtests --man\b for more information.] + [+use\b [ \auid\a | \apackage\a | . | - [ command ... ]] ]]?Run + \acommand\a, or an interactive shell if \acommand\a is omitted, + with the environment initialized for using the package. If + \auid\a or \apackage\a or \a.\a is specified then it is used + to determine a \b$PACKAGEROOT\b, possibly different from + the current directory. For example, to try out bozo'\'$'s package: + \bpackage use bozo\b. The \buse\b action may be run from any + directory. If the file \b$INSTALLROOT/lib/package/profile\b is + readable then it is sourced to initialize the environment.] + [+view\b?Initialize the architecture specific viewpath + hierarchy. The \bmake\b action implicitly calls this action.] + } +[+DETAILS?The package directory hierarchy is rooted at + \b$PACKAGEROOT\b. All source and binaries reside under this tree. A two + level viewpath is used to separate source and binaries. The top view is + architecture specific, the bottom view is shared source. All building + is done in the architecture specific view; no source view files are + intentionally changed. This means that many different binary + architectures can be made from a single copy of the source.] +[+?Independent \b$PACKAGEROOT\b hierarchies can be combined by + appending \b$INSTALLROOT:$PACKAGEROOT\b pairs to \bVPATH\b. The + \bVPATH\b viewing order is from left to right.] +[+?\b$HOSTTYPE\b names the current binary architecture and is determined + by the output of \b'$command$'\b (no arguments). The \b$HOSTTYPE\b naming + scheme is used to separate incompatible executable and object formats. + All architecture specific binaries are placed under \b$INSTALLROOT\b + (\b$PACKAGEROOT/arch/$HOSTTYPE\b). There are a few places that match + against \b$HOSTTYPE\b when making binaries; these are limited to + makefile compiler workarounds, e.g., if \b$HOSTTYPE\b matches \bhp.*\b + then turn off the optimizer for these objects. All other architecture + dependent logic is handled either by the \bAST\b \biffe\b(1) command or + by component specific configure scripts. Explicit \b$HOSTTYPE\b + values matching *,*cc*[,-*,...]] optionally set the default \bCC\b and + \bCCFLAGS\b. This is handy for build farms that support different + compilers on the same architecture.] +[+?Each component contains a \bMAM\b (make abstract machine) + file (\bMamfile\b). A Mamfile contains a portable makefile description + written in a simple dependency tree language using indented + \bmake\b...\bdone\b blocks.] +[+?All scripts and commands under \b$PACKAGEROOT\b use \b$PATH\b + relative pathnames (via the \bAST\b \bpathpath\b(3) function); there + are no embedded absolute pathnames. This means that binaries generated + under \b$PACKAGEROOT\b may be copied to a different root; users need + only change their \b$PATH\b variable to reference the new installation + root \bbin\b directory. \b'$command$' install\b installs binary packages in + a new \b$INSTALLROOT\b.] + +[ qualifier ... ] [ action ] [ arg ... ] [ n=v ... ] + +[+SEE ALSO?\bautoconfig\b(1), \bcksum\b(1), \bexecrate\b(1), \bexpmake\b(1), + \bgzip\b(1), \bmake\b(1), \bmamake\b(1), \bpax\b(1), + \bpkgadd\b(1), \bpkgmk\b(1), \brpm\b(1), + \bsh\b(1), \btar\b(1), \boptget\b(3)] +' + case $* in + help) set -- --man ;; + esac + while getopts -a "$command" "$USAGE" OPT + do : + done + shift $((OPTIND-1)) + ;; +esac + +# check the args + +case $AR in +'') AR=ar ;; +esac +case $CC in +'') CC=cc ;; +esac +case $LD in +'') LD=ld ;; +esac +case $NM in +'') NM=nm ;; +esac + +action= +bit= +exec= +flat=0 +force=0 +global= +hi= +ifs=${IFS-' + '} +lo= +make= +makeflags='-K' +nl=" +" +noexec= +only=0 +output= +quiet=0 +show=: +tab=" " +verbose=0 +AUTHORIZE= +DEBUG= +SHELLMAGIC=- + +unset FIGNORE BINDIR DLLDIR ETCDIR FUNDIR INCLUDEDIR LIBDIR LOCALEDIR MANDIR SHAREDIR 2>/dev/null || true + +while : +do case $# in + 0) set host type ;; + esac + case $1 in + clean|clobber|export|host|install|make|remove|results|test|use|view) + action=$1 + shift + break + ;; + debug|environment) + exec=echo make=echo show=echo + ;; + flat) flat=1 + ;; + force) force=1 + ;; + never) exec=echo noexec=-N + ;; + only) only=1 + ;; + quiet) quiet=1 + ;; + show) exec=echo noexec=-n + ;; + verbose)verbose=1 + ;; + DEBUG) DEBUG=1 + PS4='+$LINENO:$SECONDS+ ' + set -x + ;; + help|HELP|html|man|--[?m]*) + case $1 in + help) code=0 + case $2 in + '') exec 1>&2 ;; + esac + ;; + html) code=0 html=1 + echo "$command help

$command help

"
+			;;
+		*)	code=2
+			exec 1>&2
+			;;
+		esac
+		# Plain-text fallback. Regenerate with:
+		# ksh -c 'COLUMNS=80 bin/package --man' 2>&1 | sed "s/'/'\\\\''/g; 1s/^/echo '/; \$s/\$/'/"
+		echo 'NAME
+  package - build, test and install ksh 93u+m
+
+SYNOPSIS
+  package [ options ] [ qualifier ... ] [ action ] [ arg ... ] [ n=v ... ]
+
+DESCRIPTION
+  The package command is the main control script for building and installing
+  KornShell 93u+m. It is a POSIX sh(1) script coded for maximal portability. A
+  POSIX shell and C compiler installation are the only requirements. All
+  package files are in the $PACKAGEROOT directory tree. Binary package files
+  are in the $INSTALLROOT ($PACKAGEROOT/arch/hosttype) tree, where
+  hosttype=$(bin/package host type). See DETAILS for more information.
+
+  Note that no environment variables need be set by the user; package
+  determines the environment based on the current working directory. The use
+  action starts a sh(1) with the environment initialized. CC, CCFLAGS, HOSTTYPE
+  and SHELL may be set by explicit command argument assignments to override the
+  defaults.
+
+  The command arguments are composed of a sequence of words: zero or more
+  qualifiers, one action, and zero or more action-specific arguments, and zero
+  or more name=value definitions. optget(3) documentation options such as
+  --man, --html and --nroff are also supported. The default with no arguments
+  is host type.
+
+  The qualifiers are:
+    debug|environment
+          Show environment and actions but do not execute.
+    flat  With the make action, create a flat view by linking all files from
+          $INSTALLROOT, minus *.old files, onto their corresponding path under
+          $PACKAGEROOT. Subsequent make actions will update an existing flat
+          view whether or not flat is specified. Only one architecture can have
+          a flat view. If flat is specified with the clean action, then only
+          clean up this flat view and do not delete $INSTALLROOT.
+    force Force the action to override saved state.
+    never Run make -N and show other actions.
+    only  Only operate on the specified packages.
+    quiet Do not list captured action output.
+    show  Run make -n and show other actions.
+    verbose
+          Provide detailed action output.
+    DEBUG Trace the package script actions in detail.
+
+  The actions are:
+    clean | clobber
+          Clean up the flat view, if any. Then, unless flat was given, delete
+          the arch/HOSTTYPE hierarchy; this deletes all generated files and
+          directories for HOSTTYPE. The hierarchy can be rebuilt by package
+          make.
+    export [ variable ...]
+          List name=value for variable, one per line. If the only attribute is
+          specified then only the variable values are listed. If no variables
+          are specified then HOSTTYPE PACKAGEROOT INSTALLROOT PATH are assumed.
+    help [ action ]
+          Display help text on the standard error (standard output for action).
+    host [ attribute ... ]
+          List architecture/implementation dependent host information on the
+          standard output. type is listed if no attributes are specified.
+          Information is listed on a single line in attribute order. The
+          attributes are:
+            canon name
+                  An external host type name to be converted to package syntax.
+            cpu   The number of CPUs; 1 if the host is not a multiprocessor.
+            name  The host name.
+            rating
+                  The CPU rating in pseudo mips; the value is useful useful
+                  only in comparisons with rating values of other hosts. Other
+                  than a vax rating (mercifully) fixed at 1, ratings can vary
+                  wildly but consistently from vendor mips ratings. cc(1) may
+                  be required to determine the rating.
+            type  The host type, usually in the form vendor.architecture, with
+                  an optional trailing -version. The main theme is that type
+                  names within a family of architectures are named in a
+                  similar, predictable style. OS point release information is
+                  avoided as much as possible, but vendor resistance to release
+                  incompatibilities has for the most part been futile.
+    install [ dest_dir ] [ command ... ]
+          Install commands from the $INSTALLROOT tree into appropriate
+          subdirectories of dest_dir. If dest_dir does not exist, then it and
+          any necessary subdirectories are created. dest_dir can be a directory
+          like /usr/local to install the commands directly, or a temporary
+          directory like /tmp/pkgtree/usr to prepare for packaging with
+          operating system-specific tools. If no command is specified, then ksh
+          and shcomp are assumed.
+    make [ package ] [ option ... ] [ target ... ]
+          Build and install. The default target is install, which makes and
+          installs package. If the standard output is a terminal then the
+          output is also captured in $INSTALLROOT/lib/package/gen/make.out. The
+          build is done in the $INSTALLROOT directory tree viewpathed on top of
+          the $PACKAGEROOT directory tree. Leaf directory names matching the
+          |-separated shell pattern $MAKESKIP are ignored. The view action is
+          done before making. option operands are passed to the underlying make
+          command.
+    results [ failed ] [ path ] [ old ] [make | test | write ]
+          List results and interesting messages captured by the most recent
+          make (default), test or write action. old specifies the previous
+          results, if any (current and previous results are retained).
+          $HOME/.pkgresults, if it exists, must contain an egrep(1) expression
+          of result lines to be ignored. failed lists failures only and path
+          lists the results file path name only.
+    test [ dir ]
+          Run all available default regression tests. If the optional dir
+          argument (such as src/cmd/ksh93) is given, only the tests in that
+          directory are run. If the standard output is a terminal then the
+          output is also captured in $INSTALLROOT/lib/package/gen/test.out.
+          Programs must be made before they can be tested. For ksh, a separate
+          shtests command is available that allows passing arguments to select
+          and tune the regression tests. See bin/shtests --man for more
+          information.
+    use [ uid | package | . | - [ command ... ] ]
+          Run command, or an interactive shell if command is omitted, with the
+          environment initialized for using the package. If uid or package or .
+          is specified then it is used to determine a $PACKAGEROOT, possibly
+          different from the current directory. For example, to try out bozo'\''s
+          package: package use bozo. The use action may be run from any
+          directory. If the file $INSTALLROOT/lib/package/profile is readable
+          then it is sourced to initialize the environment.
+    view  Initialize the architecture specific viewpath hierarchy. The make
+          action implicitly calls this action.
+
+DETAILS
+  The package directory hierarchy is rooted at $PACKAGEROOT. All source and
+  binaries reside under this tree. A two level viewpath is used to separate
+  source and binaries. The top view is architecture specific, the bottom view
+  is shared source. All building is done in the architecture specific view; no
+  source view files are intentionally changed. This means that many different
+  binary architectures can be made from a single copy of the source.
+
+  Independent $PACKAGEROOT hierarchies can be combined by appending
+  $INSTALLROOT:$PACKAGEROOT pairs to VPATH. The VPATH viewing order is from
+  left to right.
+
+  $HOSTTYPE names the current binary architecture and is determined by the
+  output of package (no arguments). The $HOSTTYPE naming scheme is used to
+  separate incompatible executable and object formats. All architecture
+  specific binaries are placed under $INSTALLROOT
+  ($PACKAGEROOT/arch/$HOSTTYPE). There are a few places that match against
+  $HOSTTYPE when making binaries; these are limited to makefile compiler
+  workarounds, e.g., if $HOSTTYPE matches hp.* then turn off the optimizer for
+  these objects. All other architecture dependent logic is handled either by
+  the AST iffe(1) command or by component specific configure scripts. Explicit
+  $HOSTTYPE values matching *,*cc*[,-*,...] optionally set the default CC and
+  CCFLAGS. This is handy for build farms that support different compilers on
+  the same architecture.
+
+  Each component contains a MAM (make abstract machine) file (Mamfile). A
+  Mamfile contains a portable makefile description written in a simple
+  dependency tree language using indented make...done blocks.
+
+  All scripts and commands under $PACKAGEROOT use $PATH relative pathnames (via
+  the AST pathpath(3) function); there are no embedded absolute pathnames. This
+  means that binaries generated under $PACKAGEROOT may be copied to a different
+  root; users need only change their $PATH variable to reference the new
+  installation root bin directory. package install installs binary packages in
+  a new $INSTALLROOT.
+
+SEE ALSO
+  autoconfig(1), cksum(1), execrate(1), expmake(1), gzip(1), make(1),
+  mamake(1), pax(1), pkgadd(1), pkgmk(1), rpm(1), sh(1), tar(1), optget(3)
+
+IMPLEMENTATION
+  version         package (ksh 93u+m) 2022-08-20
+  author          Glenn Fowler 
+  author          Contributors to https://github.com/ksh93/ksh
+  copyright       (c) 1994-2012 AT&T Intellectual Property
+  copyright       (c) 2020-2022 Contributors to https://github.com/ksh93/ksh
+  license         https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html'
+		case $1 in
+		html)	echo "
" ;; + esac + exit $code + ;; + *=*) set DEFAULT host type "$@" + ;; + *) # simulate AST getopt(3) usage output + echo "Usage: $command [ options ] [ qualifier ... ] [ action ] [ arg ... ] [ n=v ... ]" >&2 + echo " Help: $command [ --help | --man ] 2>&1" >&2 + exit 2 + ;; + esac + global="$global $1" + shift +done + +# gather HOSTTYPE *,* options +# ,*cc*,-*,... set CC and CCFLAGS + +hostopts() +{ + _ifs_=$IFS + IFS=, + set '' $HOSTTYPE + IFS=$_ifs_ + shift + while : + do case $# in + 0|1) break ;; + esac + shift + case $1 in + *cc*) CC=$1 + while : + do case $# in + 0|1) break ;; + esac + case $2 in + -*) case $assign_CCFLAGS in + ?*) assign_CCFLAGS="$assign_CCFLAGS " ;; + esac + assign_CCFLAGS="$assign_CCFLAGS$2" + shift + ;; + *) break + ;; + esac + done + ;; + esac + done +} + +# collect command line targets and definitions + +case $_PACKAGE_HOSTTYPE_ in +?*) HOSTTYPE=$_PACKAGE_HOSTTYPE_ + KEEP_HOSTTYPE=1 + ;; +*) KEEP_HOSTTYPE=0 + ;; +esac +KEEP_PACKAGEROOT=0 +KEEP_SHELL=0 # set to 1 if SHELL is a known-good system shell, 2 if SHELL supplied by user +USER_VPATH= +args= +assign= +assign_CCFLAGS= +for i +do case $i in + *:*=*) args="$args $i" + continue + ;; + *=*) n=${i%%=*} v=${i#*=} + ;; + esac + case $i in + AR=*|LD=*|NM=*) + assign="$assign $n='$v'" + eval $n='$'v + ;; + CC=*) eval $n='$'v + ;; + CCFLAGS=*) + eval $n='$'v + assign_CCFLAGS="CCFLAGS=\"\$CCFLAGS\"" + ;; + HOSTTYPE=*) + eval $n='$'v + case $HOSTTYPE in + ?*) KEEP_HOSTTYPE=1 ;; + esac + ;; + PACKAGEROOT=*) + eval $n='$'v + case $PACKAGEROOT in + ?*) KEEP_PACKAGEROOT=1 ;; + esac + ;; + SHELL=*)eval $n='$'v + case $SHELL in + ?*) KEEP_SHELL=2 ;; + esac + ;; + VPATH=*)eval USER_$n='$'v + ;; + 'debug=1') + makeflags="$makeflags --debug-symbols" + ;; + 'strip=1') + makeflags="$makeflags --strip-symbols" + ;; + *=*) assign="$assign $n='$v'" + ;; + *) args="$args $i" + ;; + esac +done +case $HOSTTYPE in +*,*) hostopts $HOSTTYPE ;; +esac +case $assign_CCFLAGS in +?*) assign="$assign $assign_CCFLAGS" +esac +case $CC in +''|cc) ;; +*) export CC ;; +esac + +# grab action specific args + +case $action in +use) case $1 in + .) shift + PACKAGEROOT=$PWD + $show export PACKAGEROOT + esac + ;; +esac + +# true if arg is a valid PACKAGEROOT + +packageroot() # dir +{ + test -d "$1/lib/$command" || test -x "$1/bin/$command" +} + +# true if arg is executable + +executable() # [!] command +{ + case $1 in + '!') test ! -x "$2" && test ! -x "$2.exe" ;; + *) test -x "$1" || test -x "$1.exe" ;; + esac +} + +# initialize SHELLMAGIC +# tangible proof of Cygwin's disdain for Unix (well, this and execrate) + +shellmagic() +{ + case $SHELLMAGIC in + '') ;; + -) if test -f /emx/bin/sh.exe + then SHELLMAGIC='#!/emx/bin/sh.exe'$nl + elif test -f /bin/env.exe + then SHELLMAGIC='#!/bin/env sh'$nl + else SHELLMAGIC= + fi + ;; + esac +} + +# true if arg is executable command on $PATH + +onpath() # command +{ + _onpath_b=$1 + case $_onpath_b in + /*) if executable $_onpath_b + then _onpath_=$_onpath_b + return 0 + fi + return 1 + ;; + esac + IFS=':' + set '' $PATH + IFS=$ifs + shift + for _onpath_d + do case $_onpath_d in + '') _onpath_d=. ;; + esac + if executable "$_onpath_d/$_onpath_b" + then _onpath_=$_onpath_d/$_onpath_b + return 0 + fi + done + return 1 +} + +# determine local host attributes + +hostinfo() # attribute ... +{ + case $DEBUG in + 1) set -x ;; + esac + map= + something= + path=$PATH + for i in $ccs + do PATH=$PATH:$i + done + for i in $use + do for j in $org + do PATH=$PATH:$i/$j/bin + done + PATH=$PATH:$i/bin + done + case $PACKAGE_PATH in + ?*) for i in $(echo "$PACKAGE_PATH" | sed 's,:, ,g') + do PATH=$PATH:$i/bin + done + ;; + esac + + # validate the args + + canon= + cc=$CC + for info + do case $canon in + -) canon=$info + ;; + *) case $info in + */*|*[cC][cC]) + cc=$info + ;; + canon) canon=- + something=1 + ;; + cpu|name|rating|type) + something=1 + ;; + *) err_out "$action: $info: unknown attribute" + ;; + esac + ;; + esac + done + case $canon in + -) err_out "$action: canon: host type name expected" + ;; + esac + case $something in + "") set "$@" type ;; + esac + case $DEBUG in + '') exec 9>&2 + exec 2>/dev/null + ;; + esac + + # compute the info + + _hostinfo_= + for info + do + case $info in + cpu) cpu=$(sysctl -n hw.ncpu) + case $cpu in + [123456789]*) + _hostinfo_="$_hostinfo_ $cpu" + continue + ;; + esac + cpu=$(grep -ic '^processor[ ][ ]*:[ ]*[0123456789]' /proc/cpuinfo) + case $cpu in + [123456789]*) + _hostinfo_="$_hostinfo_ $cpu" + continue + ;; + esac + cpu=1 + # exact match + set \ + hinv '^Processor [0123456789]' \ + psrinfo 'on-line' \ + 'cat /reg/LOCAL_MACHINE/Hardware/Description/System/CentralProcessor' '.' \ + 'cat /proc/registry/HKEY_LOCAL_MACHINE/Hardware/Description/System/CentralProcessor' '.' \ + + while : + do case $# in + 0) break ;; + esac + i=$($1 2>/dev/null | grep -c "$2") + case $i in + [123456789]*) + cpu=$i + break + ;; + esac + shift;shift + done + case $cpu in + 0|1) set \ + /bin/mpstat + + while : + do case $# in + 0) break ;; + esac + if executable $1 + then case $($1 | grep -ic '^cpu ') in + 1) cpu=$($1 | grep -ic '^ *[0123456789][0123456789]* ') + break + ;; + esac + fi + shift + done + ;; + esac + case $cpu in + 0|1) # token match + set \ + /usr/kvm/mpstat 'cpu[0123456789]' \ + /usr/etc/cpustatus 'enable' \ + /usr/alliant/showsched 'CE' \ + 'ls /config/hw/system/cpu' 'cpu' \ + prtconf 'cpu-unit' \ + + while : + do case $# in + 0) break ;; + esac + i=$($1 2>/dev/null | tr ' ' ' + +' | grep -c "^$2") + case $i in + [123456789]*) + cpu=$i + break + ;; + esac + shift;shift + done + ;; + esac + case $cpu in + 0|1) # special match + set \ + \ + hinv \ + '/^[0123456789][0123456789]* .* Processors*$/' \ + '/[ ].*//' \ + \ + /usr/bin/hostinfo \ + '/^[0123456789][0123456789]* .* physically available\.*$/' \ + '/[ ].*//' \ + + while : + do case $# in + 0) break ;; + esac + i=$($1 2>/dev/null | sed -e "${2}!d" -e "s${3}") + case $i in + [123456789]*) + cpu=$i + break + ;; + esac + shift;shift;shift + done + ;; + esac + case $cpu in + 0|1) cpu=$( + cd "$TMPDIR" + tmp=hi$$ + trap 'rm -f $tmp.*' 0 1 2 + cat > $tmp.c < +#include +int main() +{ + printf("%d\n", pthread_num_processors_np()); + return 0; +} +! + for o in -lpthread '' + do if $CC $o -O -o $tmp.exe $tmp.c $o >/dev/null 2>&1 || + gcc $o -O -o $tmp.exe $tmp.c $o >/dev/null 2>&1 + then ./$tmp.exe + break + fi + done + ) + case $cpu in + [0123456789]*) ;; + *) cpu=1 ;; + esac + ;; + esac + _hostinfo_="$_hostinfo_ $cpu" + ;; + name) _name_=$(hostname || uname -n || cat /etc/whoami || echo local) + _hostinfo_="$_hostinfo_ $_name_" + ;; + rating) for rating in $(grep -i ^bogomips /proc/cpuinfo 2>/dev/null | sed -e 's,.*:[ ]*,,' -e 's,\(...*\)\..*,\1,' -e 's,\(\..\).*,\1,') + do case $rating in + [0123456789]*) break ;; + esac + done + case $rating in + [0123456789]*) ;; + *) cd "$TMPDIR" + tmp=hi$$ + trap 'rm -f $tmp.*' 0 1 2 + cat > $tmp.c < +#include +#if TD || TZ +#include +#else +extern time_t time(); +#endif +int main() +{ + register unsigned long i; + register unsigned long j; + register unsigned long k; + unsigned long l; + unsigned long m; + unsigned long t; + int x; +#if TD || TZ + struct timeval b; + struct timeval e; +#if TZ + struct timezone z; +#endif +#endif + l = 500; + m = 890; + x = 0; + for (;;) + { +#if TD || TZ +#if TZ + gettimeofday(&b, &z); +#else + gettimeofday(&b); +#endif +#else + t = (unsigned long)time((time_t*)0); +#endif + k = 0; + for (i = 0; i < l; i++) + for (j = 0; j < 50000; j++) + k += j; +#if TD || TZ +#if TZ + gettimeofday(&e, &z); +#else + gettimeofday(&e); +#endif + t = (e.tv_sec - b.tv_sec) * 1000 + (e.tv_usec - b.tv_usec) / 1000; + if (!x++ && t < 1000) + { + t = 10000 / t; + l = (l * t) / 10; + continue; + } +#else + t = ((unsigned long)time((time_t*)0) - t) * 1000; + if (!x++ && t < 20000) + { + t = 200000l / t; + l = (l * t) / 10; + continue; + } +#endif +#if PR + printf("[ k=%lu l=%lu m=%lu t=%lu ] ", k, l, m, t); +#endif + if (t == 0) + t = 1; + break; + } + printf("%lu\n", ((l * m) / 10) / t); + return k == 0; +} +! + rating= + for o in -DTZ -DTD '' + do if $CC $o -O -o $tmp.exe $tmp.c >/dev/null 2>&1 || + gcc $o -O -o $tmp.exe $tmp.c >/dev/null 2>&1 + then rating=$(./$tmp.exe) + break + fi + done + case $rating in + [0123456789]*) ;; + *) rating=1 ;; + esac + ;; + esac + _hostinfo_="$_hostinfo_ $rating" + ;; + type|canon) + case $CROSS:$canon in + 0:) case $cc in + cc) case $KEEP_HOSTTYPE:$HOSTTYPE in + 0:?*) if test -d ${PACKAGEROOT:-.}/arch/$HOSTTYPE + then KEEP_HOSTTYPE=1 + fi + ;; + esac + ;; + esac + case $KEEP_HOSTTYPE in + 1) _hostinfo_="$_hostinfo_ $HOSTTYPE" + continue + ;; + esac + ;; + esac + case $cc in + /*) a=$($cc -dumpmachine $CCFLAGS 2>/dev/null) + case $a in + '') case $CCFLAGS in + ?*) a=$($cc -dumpmachine 2>/dev/null) ;; + esac + ;; + esac + case $a in + ''|*' '*|*/*:*) + ;; + *.*-*) _hostinfo_="$_hostinfo_ $a" + continue + ;; + *-*-*) case $canon in + '') canon=$a ;; + esac + ;; + *) _hostinfo_="$_hostinfo_ $a" + continue + ;; + esac + ;; + esac + IFS=: + set /$IFS$PATH + IFS=$ifs + shift + f=../lib/hostinfo/typemap + for i + do case $i in + "") i=. ;; + esac + case $canon in + '') case $cc in + /*|cc) ;; + *) if executable $i/$cc + then a=$($i/$cc -dumpmachine $CCFLAGS 2>/dev/null) + case $a in + '') case $CCFLAGS in + ?*) a=$($cc -dumpmachine 2>/dev/null) ;; + esac + ;; + esac + case $a in + ''|*' '*|*/*:*) + ;; + *-*) canon=$a + ;; + *) _hostinfo_="$_hostinfo_ $a" + continue 2 + ;; + esac + fi + ;; + esac + ;; + esac + if test -f "$i/$f" + then map="$(grep -v '^#' $i/$f) $map" + fi + done + + # inconsistent -dumpmachine filtered here + + case -${canon}- in + --|*-powerpc-*) + h=$(hostname || uname -n || cat /etc/whoami) + case $h in + '') h=local ;; + esac + a=$(arch || uname -m || att uname -m || uname -s || att uname -s) + case $a in + *[\ \ ]*) a=$(echo $a | sed "s/[ ]/-/g") ;; + esac + case $a in + '') a=unknown ;; + esac + m=$(mach || machine || uname -p || att uname -p) + case $m in + *[\ \ ]*) m=$(echo $m | sed "s/[ ]/-/g") ;; + esac + case $m in + '') m=unknown ;; + esac + x=$(uname -a || att uname -a) + case $x in + '') x="unknown $host unknown unknown unknown unknown unknown" ;; + esac + set "" $h $a $m $x + expected=$1 host=$2 arch=$3 mach=$4 os=$5 sys=$6 rel=$7 ver=$8 + ;; + *) case $canon in + *-*) IFS=- + set "" $canon + shift + IFS=$ifs + case $# in + 2) host= mach= arch=$1 os=$2 sys= rel= ;; + *) host= mach=$2 arch=$1 os=$3 sys= rel= ;; + esac + case $os in + [abcdefghijklmnopqrstuvwxyz]*[0123456789]) + eval $(echo $os | sed -e 's/^\([^0123456789.]*\)\.*\(.*\)/os=\1 rel=\2/') + ;; + esac + ;; + *) arch=$canon mach= os= sys= rel= + ;; + esac + ;; + esac + type=unknown + case $host in + *.*) host=$(echo $host | sed -e 's/\..*//') ;; + esac + case $mach in + unknown) + mach= + ;; + [Rr][0123][0123456789][0123456789][0123456789]) + mach=mips1 + ;; + [Rr][4][0123456789][0123456789][0123456789]) + mach=mips2 + ;; + [Rr][56789][0123456789][0123456789][0123456789]|[Rr][123456789][0123456789][0123456789][0123456789][0123456789]) + mach=mips4 + ;; + pc) arch=i386 + mach= + ;; + [Pp][Oo][Ww][Ee][Rr][Pp][Cc]) + arch=ppc + mach= + ;; + *) case $arch in + 34[0123456789][0123456789]) + os=ncr + arch=i386 + ;; + esac + ;; + esac + case $canon in + '') set \ + \ + /NextDeveloper -d next - \ + /config/hw/system/cpu -d tandem mach \ + + while : + do case $# in + 0) break ;; + esac + if test $2 $1 + then os=$3 + case $4 in + arch) mach=$arch ;; + mach) arch=$mach ;; + esac + break + fi + shift;shift;shift;shift + done + ;; + esac + case $os in + AIX*|aix*) + type=ibm.risc + ;; + HP-UX) case $arch in + 9000/[78]*) + type=hp.pa + ;; + */*) type=hp.$(echo $arch | sed 's,/,_,g') + ;; + *) type=hp.$arch + ;; + esac + ;; + [Ii][Rr][Ii][Xx]*) + set xx $(hinv | sed -e '/^CPU:/!d' -e 's/CPU:[ ]*\([^ ]*\)[ ]*\([^ ]*\).*/\1 \2/' -e q | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz) + shift + type=$1 + n= + case $2 in + r[0123][0123456789][0123456789][0123456789]) + n=1 + ;; + r[4][0123][0123456789][0123456789]) + n=2 + ;; + r[4][456789][0123456789][0123456789]|r[5][0123456789][0123456789][0123456789]) + n=3 + ;; + r[6789][0123456789][0123456789][0123456789]|r[123456789][0123456789][0123456789][0123456789][0123456789]) + n=4 + ;; + esac + case $rel in + [01234].*|5.[012]|5.[012].*) + case $n in + 1) ;; + *) n=2 ;; + esac + ;; + 5.*) case $n in + 2) n=3 ;; + esac + ;; + esac + if executable $cc + then a=$cc + else IFS=: + set /$IFS$PATH + IFS=$ifs + shift + for i + do a=$i/$cc + if executable $a + then break + fi + done + fi + split=' +' + a=$(strings $a < /dev/null | sed -e 's/[^abcdefghijklmnopqrstuvwxyz0123456789]/ /g' -e 's/[ ][ ]*/\'"$split"'/g' | sed -e "/^${type}[0123456789]$/!d" -e "s/^${type}//" -e q) + case $a in + [0123456789]) n=$a ;; + esac + case $n in + 4) a=$($cc -${type}3 2>&1) + case $a in + *unknown*|*install*|*conflict*) + ;; + *) n=3 + ;; + esac + ;; + esac + a=$($cc -show F0oB@r.c 2>&1) + case $n:$a in + [!2]:*mips2*) n=2 ;; + [!23]:*mips3*) n=3 ;; + [!234]:*mips4*) n=4 ;; + esac + case $n:$a in + [!2]:*[Oo]32*) abi=-o32 ;; + [!3]:*[Nn]32*) abi=-n32 ;; + esac + mach=${type}$n + type=sgi.$mach + ;; + OSx*|SMP*|pyramid) + type=pyr + ;; + OS/390) type=mvs.390 + ;; + [Ss][Cc][Oo]*) + type=sco + ;; + [Ss]ol*) + v=$(echo $rel | sed -e 's/^[25]\.//' -e 's/\.[^.]*$//') + case $v in + [6789]|[1-9][0-9]) + ;; + *) v= + ;; + esac + case $arch in + '') case $mach in + '') arch=sun4 ;; + *) arch=$mach ;; + esac + ;; + esac + case $arch in + sparc) arch=sun4 ;; + esac + type=sol$v.$arch + ;; + [Ss]un*)type=$(echo $arch | sed -e 's/\(sun.\).*/\1/') + case $type in + sparc) type=sun4 ;; + esac + case $rel in + [01234]*) + ;; + '') case $os in + *[Oo][Ss]) + ;; + *) type=sol.$type + ;; + esac + ;; + *) case $type in + '') case $mach in + sparc*) type=sun4 ;; + *) type=$mach ;; + esac + ;; + esac + v=$(echo $rel | sed -e 's/^[25]\.//' -e 's/\.[^.]*$//') + case $v in + [6789]|[1-9][0-9]) + ;; + *) v= + ;; + esac + type=sol$v.$type + ;; + esac + case $type in + sun*|*.*) + ;; + *) type=sun.$type + ;; + esac + ;; + [Uu][Nn][Ii][Xx]_[Ss][Vv]) + type=unixware + ;; + UTS*|uts*) + if test -x /bin/u370 || test -x /bin/u390 + then type=uts.390 + else case $arch in + '') arch=$mach ;; + esac + type=uts.$arch + fi + ;; + $host) type=$arch + case $type in + *.*|*[0123456789]*86|*68*) + ;; + *) case $mach in + *[0123456789]*86|*68*|mips) + type=$type.$mach + ;; + esac + ;; + esac + ;; + unknown) + case $arch in + ?*) case $arch in + sun*) mach= ;; + esac + type=$arch + case $mach in + ?*) type=$type.$mach ;; + esac + ;; + esac + ;; + *) case $ver in + FTX*|ftx*) + case $mach in + *[0123456789][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]*) + mach=$(echo $mach | sed -e 's/[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]*$//') + ;; + esac + type=stratus.$mach + ;; + *) case $arch in + [Oo][Ss][-/.]2) + type=os2 + arch=$rel + ;; + *) type=$(echo $os | sed -e 's/[0123456789].*//' -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_0123456789.].*//') + ;; + esac + case $type in + [Cc][Yy][Gg][Ww][Ii][Nn]_*) + type=cygwin + ;; + [Uu][Ww][Ii][Nn]*|[Ww]indows_[0123456789][0123456789]|[Ww]indows_[Nn][Tt]) + type=win32 + arch=$(echo $arch | sed -e 's/_[^_]*$//') + ;; + esac + case $arch in + '') case $mach in + ?*) type=$type.$mach ;; + esac + ;; + *) type=$type.$arch ;; + esac + ;; + esac + esac + case $type in + [0123456789]*) + case $mach in + ?*) type=$mach ;; + esac + case $type in + */MC) type=ncr.$type ;; + esac + ;; + *.*) ;; + *[0123456789]*86|*68*) + case $rel in + [34].[0123456789]*) + type=att.$type + ;; + esac + ;; + [abcdefghijklmnopqrstuvwxyz]*[0123456789]) + ;; + [abcdefghijklmnopqrstuvwxyz]*) case $mach in + $type) case $ver in + Fault*|fault*|FAULT*) + type=ft.$type + ;; + esac + ;; + ?*) case $arch in + '') type=$type.$mach ;; + *) type=$type.$arch ;; + esac + ;; + esac + ;; + esac + case $type in + *[-_]32|*[-_]64|*[-_]128) + bits=$(echo $type | sed 's,.*[-_],,') + type=$(echo $type | sed 's,[-_][0-9]*$,,') + ;; + *) bits= + ;; + esac + type=$(echo $type | sed -e 's%[-+/].*%%' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz) + case $type in + *.*) lhs=$(echo $type | sed -e 's/\..*//') + rhs=$(echo $type | sed -e 's/.*\.//') + case $rhs in + [x0123456789]*86) rhs=i$rhs ;; + 68*) rhs=m$rhs ;; + esac + case $rhs in + i[x23456789]86|i?[x23456789]86|*86pc) + rhs=i386 ;; + powerpc) rhs=ppc ;; + s[0123456789]*[0123456789]x) + rhs=$(echo $rhs | sed -e 's/x$/-64/') ;; + esac + case $rhs in + arm[abcdefghijklmnopqrstuvwxyz_][0123456789]*) + rhs=arm ;; + hppa) rhs=pa ;; + esac + case $lhs in + ?*coff|?*dwarf|?*elf) + case $lhs in + ?*coff) x=coff ;; + ?*dwarf)x=coff ;; + ?*elf) x=elf ;; + esac + lhs=$(echo ${lhs}XXX | sed -e "s/${x}XXX//") + ;; + esac + case $lhs in + bsdi) lhs=bsd ;; + darwin) case $(/usr/bin/cc --version) in + *'(GCC)'*) case $rel in + [0-9].*|10.*) lhs=darwin07 ;; + *) lhs=darwin11 ;; + esac ;; + esac + ;; + freebsd) case $rel in + [01234].*) lhs=${lhs}4 ;; + [123456789]*.*) lhs=${lhs}$(echo $rel | sed -e 's/\..*//') ;; + esac + ;; + hpux) lhs=hp ;; + mvs) rhs=390 ;; + esac + case $lhs in + '') type=$rhs ;; + $rhs) type=$lhs ;; + *) type=$lhs.$rhs ;; + esac + ;; + esac + case $type in + sgi.mips*) + case $mach in + mips2) type=sgi.$mach + abi=-o32 + ;; + mips3) type=sgi.$mach + abi=-n32 + ;; + mips[456789]) + type=sgi.$mach + case $abi in + *-n32) ;; + *) abi=-64 ;; + esac + ;; + *) pwd=$PWD + cd "$TMPDIR" + tmp=hi$$ + trap 'rm -f $tmp.*' 0 1 2 + cat > $tmp.a.c < $tmp.b.c </dev/null 2>&1 + rm -f $tmp.* + trap - 0 1 2 + cd $pwd + ;; + esac + case $type$abi in + sgi.mips2-o32) + ;; + sgi.mips3) + type=$type-o32 + ;; + sgi.mips3-n32) + ;; + sgi.mips4) + type=$type-o32 + ;; + sgi.mips[456789]-64) + ;; + *) type=$type$abi + ;; + esac + ;; + *) case $bits in + '') bits=$( set -e + cd "$TMPDIR" + tmp=hi$$ + trap 'rm -rf "$tmp".*' 0 1 2 + echo 'int main() { return 0; }' > $tmp.a.c + checkcc + $cc $CCFLAGS -o $tmp.a.exe $tmp.a.c /dev/null 2>&1 + file $tmp.a.exe 2>/dev/null | sed "s/$tmp\.a\.exe//g" ) + case $bits in + *\ 64-bit* | *\ 64\ bit* | *\ 64bit*) + bits=64 ;; + *) bits= ;; + esac + ;; + esac + ;; + esac + case $bits in + 32) case $type in + *.i386) bits= ;; + esac + ;; + esac + case $bits in + ?*) type=$type-$bits ;; + esac + + # last chance mapping + + set "" "" $map + while : + do case $# in + [012]) break ;; + esac + shift;shift + eval " case \$type in + $1) type=\$2; break ;; + esac" + done + _hostinfo_="$_hostinfo_ $type" + ;; + esac + done + set '' $_hostinfo_ + shift + _hostinfo_=$* + + # restore the global state + + PATH=$path + case $DEBUG in + '') exec 2>&9 + exec 9>&- + ;; + esac +} + +# info message + +note() # message ... +{ + printf "$command: %s\\n" "$@" >&2 +} + +err_out() +{ + note "$@" + exit 1 +} + +trace() +( + PS4="${action}: executing: " + exec 2>&1 # trace to standard output + set -o xtrace + "$@" +) + +# cc checks +# +# CC: compiler base name name +# cc: full path, empty if not found + +checkcc() +{ + cc= + if onpath $CC + then cc=$_onpath_ + else case $CC in + cc) if onpath clang + then CC=clang + cc=$_onpath_ + elif onpath gcc + then CC=gcc + cc=$_onpath_ + fi + ;; + esac + fi + case $cc in + '') case $action in + make|test) err_out "$CC: not found" ;; + *) note "warning: $CC: not found" ;; + esac + ;; + esac +} + +# some actions have their own PACKAGEROOT or kick out early + +case $action in +host) eval u=$package_use + case $u in + $PACKAGE_USE) + ;; + *) if onpath $0 + then case $_onpath_ in + */arch/$HOSTTYPE/bin/package) + KEEP_HOSTTYPE=1 + ;; + *) KEEP_HOSTTYPE=0 + ;; + esac + else KEEP_HOSTTYPE=0 + fi + ;; + esac + hostinfo $args + echo $_hostinfo_ + exit 0 + ;; +export|setup|use) + x= + ;; +*) x= + eval u=$package_use + case $u in + $PACKAGE_USE) + case :$PATH: in + *:$INSTALLROOT/bin:*) + case $LIBPATH: in + $INSTALLROOT/bin:$INSTALLROOT/lib:*) + case $SHLIB_PATH: in + $INSTALLROOT/lib:*) + x=1 + ;; + esac + ;; + esac + ;; + esac + ;; + esac + ;; +esac +run=- +case $x in +1) : accept the current package use environment + INITROOT=$PACKAGEROOT/src/cmd/INIT + checkcc + ;; +*) hosttype= + case $KEEP_PACKAGEROOT in + 0) case $action in + use) PACKAGEROOT= + case $show in + echo) exec=echo make=echo show=echo ;; + esac + set '' $args + shift + case $# in + 0) ;; + *) case $1 in + -|.) ;; + /*) PACKAGEROOT=$1 + ;; + *) i=$(echo ~$1) + if packageroot $i + then PACKAGEROOT=$i + else for i in $(echo $HOME | sed -e 's,/[^/]*$,,') $usr $use + do if packageroot $i/$1 + then PACKAGEROOT=$i/$1 + break + fi + done + case $PACKAGEROOT in + '') hosttype=$1 ;; + esac + fi + ;; + esac + shift + ;; + esac + run="$@" + ;; + esac + case $PACKAGEROOT in + '') PACKAGEROOT=$PWD ;; + esac + + # . must be within the PACKAGEROOT tree + + i=X$PACKAGEROOT + IFS=/ + set $i + IFS=$ifs + while : + do i=$1 + shift + case $i in + X) break ;; + esac + done + case $PACKAGEROOT in + //*) d=/ ;; + *) d= ;; + esac + case $1 in + home) k=1 ;; + *) k=0 ;; + esac + for i + do case $i in + '') continue ;; + esac + d=$d/$i + case $k in + 2) k=1 + ;; + 1) k=0 + ;; + 0) case $i in + arch) k=2 + ;; + *) if packageroot $d + then PACKAGEROOT=$d + fi + ;; + esac + ;; + esac + done + ;; + esac + INITROOT=$PACKAGEROOT/src/cmd/INIT + $show PACKAGEROOT=$PACKAGEROOT + $show export PACKAGEROOT + export PACKAGEROOT + + # initialize the architecture environment + + case $KEEP_HOSTTYPE in + 0) hostinfo type + HOSTTYPE=$_hostinfo_ + ;; + 1) _PACKAGE_HOSTTYPE_=$HOSTTYPE + export _PACKAGE_HOSTTYPE_ + ;; + esac + $show HOSTTYPE=$HOSTTYPE + $show export HOSTTYPE + export HOSTTYPE + INSTALLROOT=$PACKAGEROOT/arch/$HOSTTYPE + case $action in + install|make|remove|test|view) + ;; + *) if test ! -d $INSTALLROOT + then INSTALLROOT=$PACKAGEROOT + fi + ;; + esac + $show INSTALLROOT=$INSTALLROOT + $show export INSTALLROOT + export INSTALLROOT + + # check the basic package hierarchy + + case $action in + export|use) + packageroot $PACKAGEROOT || err_out "$PACKAGEROOT: invalid package root directory" + case $KEEP_HOSTTYPE:$hosttype in + 0:?*) if test -d ${PACKAGEROOT:-.}/arch/$hosttype + then KEEP_HOSTTYPE=1 + HOSTTYPE=$hosttype + else err_out "$hosttype: package root not found" + fi + ;; + esac + ;; + *) packageroot $PACKAGEROOT || { + case $KEEP_PACKAGEROOT in + 1) ;; + *) err_out "$PACKAGEROOT: must be in the package root directory tree" + ;; + esac + } + + for i in arch arch/$HOSTTYPE + do test -d $PACKAGEROOT/$i || $exec mkdir $PACKAGEROOT/$i || exit + done + for i in lib + do test -d $INSTALLROOT/$i || $exec mkdir $INSTALLROOT/$i || exit + done + + # no $INITROOT means INIT already installed elsewhere + + if test -d $INITROOT + then + # update the basic package commands + + for i in execrate ignore mamprobe silent + do test -h $PACKAGEROOT/bin/$i 2>/dev/null || + case $(ls -t $INITROOT/$i.sh $PACKAGEROOT/bin/$i 2>/dev/null) in + "$INITROOT/$i.sh"*) + note "update $PACKAGEROOT/bin/$i" + shellmagic + case $SHELLMAGIC in + '') $exec cp $INITROOT/$i.sh $PACKAGEROOT/bin/$i || exit + ;; + *) case $exec in + '') { + echo "$SHELLMAGIC" + cat $INITROOT/$i.sh + } > $PACKAGEROOT/bin/$i || exit + ;; + *) echo "{ +echo \"$SHELLMAGIC\" +cat $INITROOT/$i.sh +} > $PACKAGEROOT/bin/$i" + ;; + esac + ;; + esac + $exec chmod +x $PACKAGEROOT/bin/$i || exit + ;; + esac + done + fi + ;; + esac + path=$PATH + PATH=$INSTALLROOT/bin:$PACKAGEROOT/bin:$PATH + checkcc + PATH=$path + case $cc in + ?*) if test -f $INITROOT/hello.c + then + # check if $CC (full path $cc) is a cross compiler + + ( + cd "$TMPDIR" || exit 3 + cp $INITROOT/hello.c pkg$$.c || exit 3 + $cc -o pkg$$.exe pkg$$.c > pkg$$.e 2>&1 || { + if $cc -Dnew=old -o pkg$$.exe pkg$$.c > /dev/null 2>&1 + then err_out "${warn}$CC: must be a C compiler (not C++)" + else cat pkg$$.e + err_out "${warn}$CC: failed to compile and link $INITROOT/hello.c -- is it a C compiler?" + fi + } + if ./pkg$$.exe >/dev/null 2>&1 + then code=0 + else code=1 + fi + rm -f pkg$$.* + exit $code + ) + code=$? + case $code in + 1) CROSS=1 ;; + esac + fi + ;; + esac + EXECTYPE=$HOSTTYPE + EXECROOT=$INSTALLROOT + case $CROSS in + 0) # dll hackery -- why is this so complicated? + + abi= + case $HOSTTYPE in + sgi.mips[0123456789]*) + x=rld + if executable /lib32/$x || executable /lib64/$x + then case $INSTALLROOT in + */sgi.mips[0123456789]*) + u=$(echo $INSTALLROOT | sed -e 's,-[^-/]*$,,' -e 's,.$,,') + ;; + *) u= + ;; + esac + for a in "n=2 v= l=" "n=3 v=N32 l=lib32" "n=4-n32 v=N32 l=lib32" "n=4 v=64 l=lib64" + do eval $a + case $v in + N32) case $n:$HOSTTYPE in + *-n32:*-n32) ;; + *-n32:*) continue ;; + *:*-n32) continue ;; + esac + ;; + esac + case $l in + ?*) if executable ! /$l/$x + then continue + fi + ;; + esac + case $u in + '') case $HOSTTYPE in + sgi.mips$n|sgi.mips$n-*) + abi="$abi 'd=$INSTALLROOT v=$v'" + ;; + *) continue + ;; + esac + ;; + *) if test -d $u$n + then abi="$abi 'd=$u$n v=$v'" + fi + ;; + esac + done + fi + ;; + esac + case $abi in + '') abi="'d=$INSTALLROOT v='" ;; + esac + p=0 + eval " + for a in $abi + do eval \$a + eval \" + case \\\$LD_LIBRARY\${v}_PATH: in + \\\$d/lib:*) + ;; + *) x=\\\$LD_LIBRARY\${v}_PATH + case \\\$x in + ''|:*) ;; + *) x=:\\\$x ;; + esac + LD_LIBRARY\${v}_PATH=\$d/lib\\\$x + export LD_LIBRARY\${v}_PATH + p=1 + ;; + esac + \" + done + " + case $LD_LIBRARY_PATH in + '') ;; + *) for d in $lib + do case $HOSTTYPE in + *64) if test -d ${d}64 + then d=${d}64 + fi + ;; + esac + case :$LD_LIBRARY_PATH: in + *:$d:*) ;; + *) if test -d $d + then LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$d + p=1 + fi + ;; + esac + done + ;; + esac + case $p in + 1) $show LD_LIBRARY_PATH=$LD_LIBRARY_PATH + $show export LD_LIBRARY_PATH + export LD_LIBRARY_PATH + ;; + esac + case $LIBPATH: in + $INSTALLROOT/bin:$INSTALLROOT/lib:*) + ;; + *) case $LIBPATH in + '') LIBPATH=/usr/lib:/lib ;; + esac + LIBPATH=$INSTALLROOT/bin:$INSTALLROOT/lib:$LIBPATH + $show LIBPATH=$LIBPATH + $show export LIBPATH + export LIBPATH + ;; + esac + case $SHLIB_PATH: in + $INSTALLROOT/lib:*) + ;; + *) SHLIB_PATH=$INSTALLROOT/lib${SHLIB_PATH:+:$SHLIB_PATH} + $show SHLIB_PATH=$SHLIB_PATH + $show export SHLIB_PATH + export SHLIB_PATH + ;; + esac + case $DYLD_LIBRARY_PATH: in + $INSTALLROOT/lib:*) + ;; + *) DYLD_LIBRARY_PATH=$INSTALLROOT/lib${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH} + $show DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH + $show export DYLD_LIBRARY_PATH + export DYLD_LIBRARY_PATH + ;; + esac + case $_RLD_ROOT in + $INSTALLROOT/arch*) ;; + ':') _RLD_ROOT=$INSTALLROOT/arch:/ ;; + /|*:/) _RLD_ROOT=$INSTALLROOT/arch:$_RLD_ROOT ;; + *) _RLD_ROOT=$INSTALLROOT/arch:$_RLD_ROOT:/ ;; + esac + $show _RLD_ROOT=$_RLD_ROOT + $show export _RLD_ROOT + export _RLD_ROOT + + # now set up PATH + # + # NOTE: PACKAGEROOT==INSTALLROOT is possible for binary installations + + case $PATH: in + $PACKAGEROOT/bin:*) + ;; + *) PATH=$PACKAGEROOT/bin:$PATH + ;; + esac + case $PATH: in + $INSTALLROOT/bin:*) + ;; + *) PATH=$INSTALLROOT/bin:$PATH + ;; + esac + $show PATH=$PATH + $show export PATH + export PATH + ;; + *) for i in package + do if onpath $i + then EXECROOT=$(echo $_onpath_ | sed -e 's,//*[^/]*//*[^/]*$,,') + EXECTYPE=$(echo $EXECROOT | sed -e 's,.*/,,') + break + fi + done + case $HOSTTYPE in + $EXECTYPE) + OCC=$CC + CC=cc + hostinfo type + EXECTYPE=$_hostinfo_ + case $HOSTTYPE in + $EXECTYPE) + err_out "$CC seems to be a cross-compiler." \ + "Set HOSTTYPE to something other than the native $EXECTYPE." \ + "If not, your $TMPDIR directory may be mounted without execute permission." \ + "Try exporting TMPDIR as a directory where you can execute binary files." + ;; + esac + ;; + esac + $show EXECTYPE=$EXECTYPE + $show export EXECTYPE + export EXECTYPE + ;; + esac + $show EXECROOT=$EXECROOT + $show export EXECROOT + export EXECROOT + + # grab a decent default shell + + case $KEEP_SHELL in + 0) save_PATH=$PATH + if PATH=$(getconf PATH 2>/dev/null) + then PATH=$PATH:$path + else PATH=/bin:/usr/bin:/sbin:/usr/sbin:$path + fi + for i in ksh ksh93 mksh yash bash sh + do if onpath "$i" && checksh "$_onpath_" + then SHELL=$_onpath_ + KEEP_SHELL=1 + break + fi + done + PATH=$save_PATH + unset save_PATH + case $KEEP_SHELL in + 0) err_out "Cannot find a good default shell; please supply SHELL=/path/to/shell" + ;; + esac + ;; + esac + export SHELL + $show SHELL=$SHELL + $show export SHELL + + # tame the environment + + case $action in + use) ;; + *) ENV= + ERROR_OPTIONS= + export ENV ERROR_OPTIONS + ;; + esac + + # finalize the views + + case $USER_VPATH in + '') case $VPATH in + ?*) IFS=':' + set '' $VPATH + shift + IFS=$ifs + USER_VPATH= + for i + do case $i in + */arch/$HOSTTYPE) ;; + */arch/*/*) ;; + */arch/*) continue ;; + esac + if packageroot $i + then case $USER_VPATH in + '') USER_VPATH=$i ;; + ?*) USER_VPATH=$USER_VPATH:$i ;; + esac + fi + done + esac + ;; + esac + case $USER_VPATH in + ?*) IFS=':' + set '' $USER_VPATH + shift + IFS=$ifs + USER_VPATH= + USER_VPATH_CHAIN= + p=$PACKAGEROOT + for i + do case $i in + ''|$PACKAGEROOT|$INSTALLROOT) + ;; + ?*) USER_VPATH=$USER_VPATH:$i + USER_VPATH_CHAIN="$USER_VPATH_CHAIN $p $i" + p=$i + ;; + esac + done + ;; + esac + ;; +esac + +PACKAGEBIN=$INSTALLROOT/lib/package +case $action:$run in +use:-) set '' $args + shift + case $# in + 0) ;; + *) shift ;; + esac + run="$@" + ;; +esac + +# HOSTTYPE specific package profile + +if test -r $INSTALLROOT/lib/package/profile +then . $INSTALLROOT/lib/package/profile +fi + +# more Cygwin hassles + +case $HOSTTYPE in +cygwin.*) + lose= + case $CYGWIN in + *nontsec*) + lose=ntsec + ;; + *ntsec*);; + *) exe=$TMPDIR/pkg$$.exe + rm -f "$exe" + : > "$exe" + if test -x "$exe" + then lose=ntsec + fi + ;; + esac + case $CYGWIN in + *nobinmode*) + case $lose in + '') lose=binmode ;; + *) lose="$lose binmode" ;; + esac + ;; + esac + case $lose in + ?*) err_out "$HOSTTYPE: export '$lose' in CYGWIN or languish in Windows" + ;; + esac + ;; +esac + +# set up the view state + +VIEW_bin=$INSTALLROOT VIEW_src=$PACKAGEROOT VIEW_all="$INSTALLROOT $PACKAGEROOT" +VPATH=$INSTALLROOT:$PACKAGEROOT$USER_VPATH +$show VPATH=$VPATH +$show export VPATH +export VPATH +IFS=':' +set '' $VPATH +shift +IFS=$ifs +for i +do case $i in + */arch/*/*) + VIEW_src="$VIEW_src $i" + ;; + */arch/*) + VIEW_bin="$VIEW_bin $i" + ;; + *) + VIEW_src="$VIEW_src $i" + ;; + esac + VIEW_all="$VIEW_all $i" +done + +# return 0 if arg in src|bin|all view + +view() # [test] [-|type] [src|bin|all] file +{ + case $1 in + -[dfsx])_view_T_=$1; shift ;; + *) _view_T_=-f ;; + esac + case $1 in + -) _view_t_= ;; + *) _view_t_=$1 ;; + esac + shift + case $1 in + all) shift; _view_v_=$VIEW_all ;; + bin) shift; _view_v_=$VIEW_bin ;; + src) shift; _view_v_=$VIEW_src ;; + *) _view_v_=$VIEW_all ;; + esac + case $1 in + /*) if test $_view_T_ $1 + then _view_=$1 + return 0 + fi + ;; + *) for _view_d_ in $_view_v_ + do if test $_view_T_ $_view_d_/$1 + then _view_=$_view_d_/$1 + return 0 + fi + done + ;; + esac + _view_= + case $_view_t_ in + ?*) note "$1: $_view_t_ not found" ;; + esac + return 1 +} + +# determine the package and targets + +case $action in +*) package= + target= + set '' $args + while : + do shift + case $# in + 0) break ;; + esac + case $1 in + ''|-) target="$target $package" + package= + ;; + *) if view - src "lib/package/$1.pkg" + then package="$package $1" + else target="$target $package $1" + package= + fi + ;; + esac + done + ;; +esac + +# check that cmd args are up to date a.out's + +checkaout() # cmd ... +{ + case $cc in + '') _PACKAGE_cc=0 + ;; + *) _PACKAGE_cc=1 + test -f "$INITROOT/hello.c" && test -f "$INITROOT/p.c" || { + note "$INITROOT: INIT package source not found" + return 1 + } + + for i in arch arch/$HOSTTYPE arch/$HOSTTYPE/bin + do test -d $PACKAGEROOT/$i || $exec mkdir $PACKAGEROOT/$i || return + done + ;; + esac + case $_PACKAGE_cc in + '') case $cc in + '') _PACKAGE_cc=0 ;; + *) _PACKAGE_cc=1 ;; + esac + ;; + esac + for i + do eval j=\$_PACKAGE_AOUT_$i + case $j in + '') eval _PACKAGE_AOUT_$i=1 ;; + *) continue ;; + esac + k=$_PACKAGE_cc + if test -f $INITROOT/$i.c + then k=${k}1 + else k=${k}0 + fi + if executable $EXECROOT/bin/$i + then k=${k}1 + else k=${k}0 + fi + : $k : compiler : source : binary : + case $k in + *00) view - bin/$i && continue ;; + esac + case $k in + 000) note "$i: not found: download the INIT package $HOSTTYPE binary to continue" + return 1 + ;; + 010) note "$i: not found: set CC=C-compiler or download the INIT package $HOSTTYPE binary to continue" + return 1 + ;; + 100) note "$i: not found: download the INIT package source or $HOSTTYPE binary to continue" + return 1 + ;; + 110) case $CROSS in + 1) note "$i: not found: make the local $EXECTYPE binary package before $HOSTTYPE" + return 1 + ;; + esac + ;; + ?01) : accept binary + continue + ;; + 011) : accept binary + continue + ;; + ??1) case $CROSS in + 1) continue ;; + esac + ;; + esac + case $(ls -t $INITROOT/$i.c $INSTALLROOT/bin/$i 2>/dev/null) in + "$INITROOT/$i.c"*) + note "update $INSTALLROOT/bin/$i" + if test ! -d $INSTALLROOT/bin + then for j in arch arch/$HOSTTYPE arch/$HOSTTYPE/bin + do test -d $PACKAGEROOT/$j || $exec mkdir $PACKAGEROOT/$j || return + done + fi + $exec $CC $CCFLAGS -o $INSTALLROOT/bin/$i $INITROOT/$i.c || return + test -f $i.o && $exec rm -f $i.o + i=$PATH + PATH=/bin + PATH=$i + ;; + esac + done + return 0 +} + +# list main environment values + +showenv() +{ + case $1 in + ''|make)for __i__ in CC SHELL $env + do eval echo $__i__='$'$__i__ + done + ;; + esac +} + +# capture command output + +capture() # file command ... +{ + tee_pid= + case $make:$noexec in + :) case $action in + install|make|view) + o=$action + ;; + *) case $package in + ''|*' '*) + o=$action + ;; + *) o=$package + ;; + esac + ;; + esac + d=$PACKAGEBIN/gen + test -d $d || $exec mkdir $d + o=$d/$o + case $o in + $output)o=$o.out + s= + ;; + *) output=$o + if test -f $o.old + then mv $o.old $o.out.1 + if test -f $o.out + then mv $o.out $o.out.2 + fi + elif test -f $o.out + then for i in $(ls -t $o.out.? 2>/dev/null) + do break + done + case $i in + *.1) i=2 ;; + *.2) i=3 ;; + *.3) i=4 ;; + *.4) i=5 ;; + *.5) i=6 ;; + *.6) i=7 ;; + *.7) i=8 ;; + *.8) i=9 ;; + *) i=1 ;; + esac + mv $o.out $o.out.$i + fi + o=$o.out + : > $o + note "$action output captured in $o" + s="$command: $action start at $(date) in $INSTALLROOT" + cmd='case $error_status in 0) r=done;; *) r=failed;; esac;' + cmd=$cmd' echo "$command: $action $r at $(date) in $INSTALLROOT"' + case $quiet in + 0) cmd="$cmd 2>&1 | tee -a $o" ;; + *) cmd="$cmd >> $o" ;; + esac + trap "$cmd" 0 + trap "error_status=1; $cmd; trap 1 0; kill -1 $$" 1 + trap "error_status=1; $cmd; trap 2 0; kill -2 $$" 2 + ;; + esac + case $quiet in + 0) # Connect 'tee' to a FIFO instead of a pipe, so that we can obtain + # the build's exit status and use it for $error_status + rm -f $o.fifo + mkfifo -m 600 $o.fifo || exit + ( + sleep 1 + # unlink early + exec rm $o.fifo + ) & + tee -a $o < $o.fifo & + tee_pid=$! + o=$o.fifo + ;; + esac + { + case $s in + ?*) echo "$s" ;; + esac + showenv $action + "$@" + } < /dev/null > $o 2>&1 + ;; + *) $make "$@" + ;; + esac + exit_status=$? + if test "$exit_status" -gt "$error_status" + then error_status=$exit_status + fi + case $tee_pid in + ?*) # allow 'tee' to catch up before returning to prompt + wait "$tee_pid" + ;; + esac +} + +make_recurse() # dir +{ + for _make_recurse_j in $makefiles + do if view - $1/$_make_recurse_j + then return + fi + done +} + +do_install() # dir [ command ... ] +{ + cd "$INSTALLROOT" + printf 'install: installing from %s\n' "$PWD" + set -o errexit + dd=$1 + shift + case $dd in + '' | [!/]*) + err_out "ERROR: destination directory '$dd' must begin with a /" ;; + esac + # commands to install by default + test "$#" -eq 0 && set -- ksh shcomp # pty suid_exec + for f + do test -f "bin/$f" || err_out "Not found: $f" "Build first? Run $0 make" + done + # set install directories + bindir=$dd/bin + mandir=$dd/share/man + man1dir=$mandir/man1 + # and off we go + trace mkdir -p "$bindir" "$man1dir" + for f + do # install executable + trace cp "bin/$f" "$bindir/" + # install manual + case $f in + ksh) trace cp "$PACKAGEROOT/src/cmd/ksh93/sh.1" "$man1dir/ksh.1" + ;; + *) # AT&T --man, etc. is a glorified error message: writes to stderr and exits with status 2 :-/ + manfile=$man1dir/${f##*/}.1 + bin/ksh -c '"$@" 2>&1; exit 0' _ "bin/$f" --nroff >$manfile + # ...so we cannot check for success; instead, check the result. + if grep -q '^.TH .* 1' "$manfile" + then printf "install: wrote '%s --nroff' output into %s\n" "bin/$f" "$manfile" + else rm "$manfile" + fi + ;; + esac + done +} + +# check for native ASCII 0:yes 1:no + +__isascii__= + +isascii() +{ + case $__isascii__ in + '') case $(echo A | od -o | sed -e 's/[ ]*$//' -e '/[ ]/!d' -e 's/.*[ ]//') in + 005101|040412) __isascii__=0 ;; + *) __isascii__=1 ;; + esac + esac + return $__isascii__ +} + +error_status=0 + +case $action in + +clean|clobber) + cd "$PACKAGEROOT" || exit + note "cleaning up flat view" + # clean up all links with arch dir except bin/package + $exec find "arch/$HOSTTYPE" -path "arch/$HOSTTYPE/bin/package" -o -type f -exec "$SHELL" -c ' + first=y + for h # loop through the PPs + do case $first in + y) set -- # clear PPs ("for" uses a copy) + first=n ;; + esac + p=${h#"arch/$HOSTTYPE/"} # get flat view path + if test "$p" -ef "$h" # is it part of the flat view? + then set -- "$@" "$p" # add to new PPs + fi + done + exec rm -f -- "$@" # rm all at once: fast + ' "$0" {} + + case $flat in + 0) note "deleting arch/$HOSTTYPE" + $exec rm -rf arch/$HOSTTYPE + ;; + esac + note "removing empty directories" + $exec find . -depth -type d -exec rmdir {} + 2>/dev/null + ;; + +export) case $INSTALLROOT in + $PACKAGEROOT) + INSTALLROOT=$INSTALLROOT/arch/$HOSTTYPE + ;; + esac + case $only in + 0) v='$i=' ;; + *) v= ;; + esac + set '' $target $package + case $# in + 1) set '' $env ;; + esac + while : + do case $# in + 1) break ;; + esac + shift + i=$1 + eval echo ${v}'$'${i} + done + ;; + +install)cd $PACKAGEROOT + # TODO: breaks on directories with spaces or glob characters; make arguments handling robust + test -n "$args" || err_out "Usage: $0 install ROOTDIR [ COMMANDNAME ... ]" + capture do_install $args + ;; + +make|view) + cd $PACKAGEROOT + + # check for some required commands + + must="$AR" + warn="$NM" + test="$must $warn" + have= + IFS=: + set /$IFS$PATH + IFS=$ifs + shift + for t in $test + do if executable $t + then have="$have $t" + fi + done + for d + do for t in $test + do case " $have " in + *" $t "*) + ;; + *) if executable $d/$t + then have="$have $t" + fi + ;; + esac + done + done + for t in $test + do case " $have " in + *" $t "*) + ;; + *) case " $must " in + *" $t "*) + err_out "$t: not found -- must be on PATH to $action" + ;; + *) note "warning: $t: not found -- some $action actions may fail" + ;; + esac + ;; + esac + done + + # verify the top view + + if test ! -d $PACKAGEROOT/src + then note "no source packages to make" + exit 0 + elif test ! -d $INSTALLROOT/src + then note "initialize the $INSTALLROOT view" + fi + for i in arch arch/$HOSTTYPE + do test -d $PACKAGEROOT/$i || $exec mkdir $PACKAGEROOT/$i || exit + done + for i in bin bin/ok bin/ok/lib fun include lib lib/package lib/package/gen src man man/man1 man/man3 man/man8 + do test -d $INSTALLROOT/$i || $exec mkdir $INSTALLROOT/$i || exit + done + make_recurse src + o= k= + for i in $makefiles + do case $o in + ?*) o="$o -o" k="$k|" ;; + esac + o="$o -name $i" + k="$k$i" + done + o="( $o ) -print" + for d in $src + do i=src/$d + if test -d $i + then test -d $INSTALLROOT/$i || $exec mkdir $INSTALLROOT/$i || exit + make_recurse $i + for j in $(cd $i; find . $o 2>/dev/null | sed -e 's,^\./,,' -e '/\//!d' -e 's,/[^/]*$,,' | sort -u) + do case $j in + $k|$MAKESKIP) continue ;; + esac + test -d $INSTALLROOT/$i/$j || + $exec mkdir -p $INSTALLROOT/$i/$j || exit + done + fi + done + + # check $CC and { ar cc ld ldd } intercepts + + h="${HOSTTYPE} ${HOSTTYPE}.*" + case $HOSTTYPE in + *.*) t=$(echo $HOSTTYPE | sed 's/[.][^.]*//') + h="$h $t" + ;; + *) t=$HOSTTYPE + ;; + esac + case $t in + *[0123456789]) + t=$(echo $t | sed 's/[0123456789]*$//') + h="$h $t" + ;; + esac + case $CC in + cc) c=cc + b=$INSTALLROOT/bin/$c + t=$INSTALLROOT/lib/package/gen/$c.tim + intercept=0 + for k in $h + do for s in $INITROOT/$c.$k + do test -x "$s" || continue + if cmp -s "$s" "$b" >/dev/null 2>&1 + then intercept=1 + break 2 + fi + case $(ls -t "$t" "$b" "$s" 2>/dev/null) in + $t*) ;; + $b*) cc=$b + ;; + $s*) $exec cd $INSTALLROOT/lib/package/gen + tmp=pkg$$ + $exec eval "echo 'int main(){return 0;}' > $tmp.c" + if $exec $s -o $tmp.exe $tmp.c >/dev/null 2>&1 && + test -x $tmp.exe + then case $HOSTTYPE in + *.mips*)$s -version >/dev/null 2>&1 || s= ;; + esac + case $s in + ?*) $exec sed "s/^HOSTTYPE=.*/HOSTTYPE=$HOSTTYPE/" < "$s" > "$b" || exit + $exec chmod +x "$b" || exit + cc=$b + intercept=1 + note "update $b" + ;; + esac + fi + $exec rm -f $tmp.* + $exec touch "$t" + cd $PACKAGEROOT + ;; + esac + break 2 + done + done + case $intercept in + 1) c=ld + b=$INSTALLROOT/bin/$c + for k in $h + do for s in $INITROOT/$c.$k + do test -x "$s" || continue + case $(ls -t "$b" "$s" 2>/dev/null) in + $b*) ;; + $s*) $exec cp "$s" "$b" + note "update $b" + ;; + esac + done + done + ;; + esac + ;; + esac + c=ldd + b=$INSTALLROOT/bin/$c + for t in $h + do s=$INITROOT/$c.$t + test -x "$s" || continue + onpath $c || + case $(ls -t "$b" "$s" 2>/dev/null) in + $b*) ;; + $s*) $exec cp "$s" "$b" + note "update $b" + ;; + esac + done + c=ar + b=$INSTALLROOT/bin/$c + for t in $h + do s=$INITROOT/$c.$t + test -x "$s" || continue + case $(ls -t "$b" "$s" 2>/dev/null) in + $b*) ;; + $s*) $exec cp "$s" "$b" + note "update $b" + ;; + esac + done + case $cc in + /*) ;; + *) err_out "$CC: not found -- set CC=C-compiler" + ;; + esac + case $exec in + '') cd $INSTALLROOT/lib/package/gen + tmp=pkg$$ + echo 'int main(){return 0;}' > $tmp.c + if $CC -o $tmp.exe $tmp.c > /dev/null 2> $tmp.err && + test -x $tmp.exe + then : ok + else note "$CC: failed to compile this program:" + cat $tmp.c >&2 + if test -s $tmp.err + then cat $tmp.err >&2 + else note "$CC: not a C compiler" + fi + rm -f $tmp.* + exit 1 + fi + rm -f $tmp.* + cd $PACKAGEROOT + ;; + esac + + # remember the default $CC + + case $CC in + cc) ;; + *) if test -x $INSTALLROOT/bin/cc + then case $(sed 1q $INSTALLROOT/bin/cc) in + ": $CC :") + CC=cc + export CC + ;; + *) assign="$assign CC=\"\$CC\"" + ;; + esac + else case $CROSS in + 1) assign="$assign CC=\"\$CC\"" + ;; + *) case $exec in + '') { + echo ": $CC :" + echo "$CC \"\$@\"" + } > $INSTALLROOT/bin/cc + chmod +x $INSTALLROOT/bin/cc + ;; + *) note "generate a $INSTALLROOT/bin/cc wrapper for $CC" + ;; + esac + CC=cc + export CC + ;; + esac + fi + ;; + esac + + # no $INITROOT means INIT already installed elsewhere + + if test -d $INITROOT + then + # update probe scripts + + for i in lib/probe lib/probe/C lib/probe/C/make + do test -d $INSTALLROOT/$i || $exec mkdir $INSTALLROOT/$i || exit + done + i=$INSTALLROOT/lib/probe/C/make/probe + j=$INITROOT/C+probe + k=$INITROOT/make.probe + case $(ls -t $i $j $k 2>/dev/null) in + $i*) ;; + *) if test -f "$j" && test -f "$k" + then note "update $i" + shellmagic + case $exec in + '') { + case $SHELLMAGIC in + ?*) echo "$SHELLMAGIC" ;; + esac + cat $j $k + } > $i || exit + ;; + *) echo "{ +echo $SHELLMAGIC +cat $j $k +} > $i" + ;; + esac + $exec chmod +x $i || exit + fi + ;; + esac + fi + + # initialize mamake + + checkaout mamake || exit + + # execrate if necessary + + if (execrate) >/dev/null 2>&1 + then execrate=execrate + $make cd $INSTALLROOT/bin + for i in chmod chgrp cmp cp ln mv rm + do if test ! -x "ok/$i" && test -x "/bin/$i.exe" + then shellmagic + case $exec in + '') echo "$SHELLMAGIC"'execrate /bin/'$i' "$@"' > ok/$i + chmod +x ok/$i + ;; + *) $exec echo \'"$SHELLMAGIC"'execrate /bin/'$i' "$@"'\'' >' ok/$i + $exec chmod +x ok/$i + ;; + esac + fi + done + PATH=$INSTALLROOT/bin/ok:$PATH + export PATH + else execrate= + fi + case $action in + view) exit 0 ;; + esac + + # check against previous compiler and flags + + err= + for var in CC CCFLAGS CCLDFLAGS LDFLAGS + do store=$INSTALLROOT/lib/package/gen/$var + eval "new=\$$var" + if test -f $store + then old=$(cat $store) + case $old in + "$new") ;; + *) case $old in + '') old="(none)" ;; + *) old="'$old'" ;; + esac + case $new in + '') new="(none)" ;; + *) new="'$new'" ;; + esac + note "$var changed from $old to $new" + err=y ;; + esac + else test -d $INSTALLROOT/lib/package/gen && case $new in + '') ;; + *) echo "$new" ;; + esac > $store + fi + done + case $err,${FORCE_FLAGS+f} in + y,) err_out "This would likely break the build. Restore the flag(s)," \ + "or delete the build directory and rebuild from scratch." + ;; + esac + unset err var store old new + + # all work under $INSTALLROOT/src + + $make cd $INSTALLROOT/src + + # record the build host name + + case $exec in + '') hostinfo name + echo "$_hostinfo_" | sed 's,\..*,,' > $PACKAGEBIN/gen/host + ;; + esac + + # separate flags from target list + + case $target in + *-*) a= + for t in $target + do case $t in + -*) makeflags="$makeflags $t" + ;; + *) a="$a $t" + ;; + esac + done + target=$a + ;; + esac + + # mamprobe data should have been generated by this point + + case $exec in + '') if test ! -f "$INSTALLROOT/bin/.paths" || test -w "$INSTALLROOT/bin/.paths" + then N=' +' + b= f= h= n= p= u= B= L= + if test -f $INSTALLROOT/bin/.paths + then exec < $INSTALLROOT/bin/.paths + while read x + do case $x in + '#'?*) case $h in + '') h=$x ;; + esac + ;; + *BUILTIN_LIB=*) b=$x + ;; + *FPATH=*) f=$x + ;; + *PLUGIN_LIB=*) p=$x + ;; + *) case $u in + ?*) u=$u$N ;; + esac + u=$u$x + ;; + esac + done + fi + ifs=$IFS + m= + case $p in + ?*) b= + ;; + esac + case $b in + ?*) IFS='=' + set $b + IFS=$ifs + shift + p="PLUGIN_LIB=$*" + case $b in + [Nn][Oo]*) p=no$p ;; + esac + m=1 + ;; + esac + case $f in + '') f="FPATH=../fun" + m=1 + ;; + esac + case $h in + '') h='# use { no NO } prefix to permanently disable #' ;; + esac + case $p in + '') p="PLUGIN_LIB=cmd" + if grep '^setv mam_cc_DIALECT .* EXPORT=[AD]LL' $INSTALLROOT/lib/probe/C/mam/* >/dev/null 2>&1 + then p=no$p + fi + m=1 + ;; + esac + case $m in + 1) case $u in + ?*) u=$N$u ;; + esac + echo "$h$N$p$N$f$N$u" > $INSTALLROOT/bin/.paths + ;; + esac + fi + ;; + esac + + # run from separate copies since ksh may be rebuilt + + case $EXECROOT in + $INSTALLROOT) + $make cd $INSTALLROOT/bin + if executable /bin/cp + then cp=/bin/cp + else cp=cp + fi + if executable /bin/mv + then mv=/bin/mv + else mv=mv + fi + if executable /bin/rm + then rm=/bin/rm + else rm=rm + fi + for i in \ + ksh tee cp ln mv rm \ + *ast*.dll *cmd*.dll *dll*.dll *shell*.dll + do executable $i && { + cmp -s $i ok/$i 2>/dev/null || { + test -f ok/$i && + $exec $execrate $rm ok/$i /dev/null || ln -sf "$INSTALLROOT/$p" "$p" || exit + done + ' "$0" {} + + ;; + esac + ;; + +results)set '' $target + shift + def=make + dir=$PACKAGEBIN/gen + case $verbose in + 0) filter=yes ;; + *) filter=cat ;; + esac + path=0 + suf=out + on= + while : + do case $# in + 0) break ;; + esac + case $1 in + --) shift + break + ;; + error*|fail*) + filter=errors + ;; + make|test|view) + def=$1 + ;; + old) suf=old + ;; + on) case $# in + 1) err_out "$action: $1: host pattern argument expected" + ;; + esac + shift + case $on in + ?*) on="$on|" ;; + esac + on="$on$1" + ;; + path) path=1 + ;; + test) def=test + ;; + *) break + ;; + esac + shift + done + case $dir in + */admin)case $on in + '') on="*" ;; + *) on="@($on)" ;; + esac + def=$def.log/$on + ;; + esac + case $# in + 0) set "$def" ;; + esac + m= + t= + for i + do k=0 + eval set '""' $i - $i.$suf - $dir/$i - $dir/$i.$suf - + shift + for j + do case $j in + -) case $k in + 1) continue 2 ;; + esac + ;; + *) if test -f $j + then k=1 + case /$j in + */test.*) t="$t $j" ;; + *) m="$m $j" ;; + esac + fi + ;; + esac + done + err_out "$i action output not found" + done + sep= + case $t in + ?*) case $path in + 0) for j in $t + do echo "$sep==> $j <==" + sep=$nl + case $filter in + cat) $exec cat $j + ;; + errors) $exec egrep -i '\*\*\*|FAIL[ES]|^TEST.* [123456789][0123456789]* error|core.*dump' $j | sed -e '/^TEST.\//s,/[^ ]*/,,' + ;; + *) $exec egrep -i '^TEST|FAIL' $j + ;; + esac + done + ;; + 1) echo $t + ;; + esac + ;; + esac + case $m in + ?*) case $path in + 0) case $filter in + cat) cat $m + ;; + *) if test -f $HOME/.pkgresults + then i=$(cat $HOME/.pkgresults) + case $i in + '|'*) ;; + *) i="|$i" ;; + esac + else i= + fi + for j in $m + do echo "$sep==> $j <==" + sep=$nl + case $filter in + errors) $exeg egrep '^pax:|\*\*\*' $j + ;; + *) $exec egrep -iv '^($||[\+\[]|cc[^-:]|kill |make.*(file system time|has been replaced)|so|[0123456789]+ error|uncrate |[0123456789]+ block|ar: creat|iffe: test: |conf: (check|generate|test)|[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789]*=|gsf@research|ar:.*warning|cpio:|ld:.*(duplicate symbol|to obtain more information)|[0123456789]*$|(checking|creating|touch) [/abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789])| obsolete predefined symbol | is (almost always misused|dangerous|deprecated|not implemented)| trigraph| assigned to | cast .* different size| integer overflow .*<<| optimization may be attained | passed as |::__builtin|^creating.*\.a$|warning.*not optimized|exceeds size thresh|ld:.*preempts|is unchanged|with value >=|(-l|lib)\*|/(ast|sys)/(dir|limits|param|stropts)\.h.*redefined|usage|base registers|`\.\.\.` obsolete'"$i" $j | + $exec grep : + ;; + esac + done + ;; + esac + ;; + 1) echo $m + ;; + esac + esac + ;; + +test) # run all available default regression tests, using our newly compiled shell unless overridden + + cd "$INSTALLROOT" || err_out "run '$0 make' first" + if test "$KEEP_SHELL" -lt 2 + then executable bin/ksh || err_out "build ksh first, or supply a SHELL=/path/to/ksh argument" + SHELL=$INSTALLROOT/bin/ksh + fi + export SHELL + set -f + set -- ${args:-src} + cd "$1" || exit + capture mamake test + ;; + +use) # finalize the environment + + if test "$KEEP_SHELL" -lt 2 && executable "$INSTALLROOT/bin/ksh" + then SHELL=$INSTALLROOT/bin/ksh + fi + x=:.. + for d in $( cd $PACKAGEROOT; ls src/*/Mamfile 2>/dev/null | sed 's,/[^/]*$,,' | sort -u ) + do x=$x:$INSTALLROOT/$d + done + x=$x:$INSTALLROOT + case $CDPATH: in + $x:*) ;; + *) CDPATH=$x:$CDPATH + $show CDPATH=$CDPATH + $show export CDPATH + export CDPATH + ;; + esac + eval PACKAGE_USE=$package_use + export PACKAGE_USE + unset LC_ALL # respect the user's locale again; avoids multibyte corruption + + # run the command + + case $run in + '') note "You are now entering a new environment set up to use the package in:" \ + " $INSTALLROOT" \ + "You're using the shell:" \ + " $SHELL" \ + "Type 'exit' to leave and go back to normal." + case $show in + ':') $exec exec $SHELL ;; + esac + ;; + *) $exec exec $SHELL -c "$run" + ;; + esac + ;; + +*) err_out "$action: internal error" + ;; + +esac + +exit "$error_status" diff --git a/src/cmd/INIT/probe.win32 b/src/cmd/INIT/probe.win32 new file mode 100644 index 000000000..4c449ec2b --- /dev/null +++ b/src/cmd/INIT/probe.win32 @@ -0,0 +1,262 @@ +: +# @(#)probe.win32 (AT&T Research) 2010-01-01 +# +# Win32 specific make C probe initialization +# wrapped cc's are easy on UWIN +# +# 2> easy.err to avoid mysterious hang with bcc + +# begin preamble shared with the pp probe.ini + +IFS=$'\n' + +chmod 777 . # cl.exe setuid workaround + +typeset -A header version + +# we are probing on behalf of libpp and nmake +# so the native preprocessor must be forced in +# order to bootstrap libpp and nmake + +nativepp=-1 +export nativepp + +probe_header=" +stddef.h +" +for inc in syslimits.h winerror.h ostream bits/ctype_base.h stream.h +do echo "#include <$inc>" > easy.c + if $cc -E easy.c > /dev/null 2> easy.err + then probe_header="$probe_header +$inc +" + fi +done + +{ +for i in $probe_header +do echo "#include <$i>" +done +echo '#ifdef __BORLANDC__' +echo "int _Pr0b3_version_BORLAND=__BORLANDC__;" +echo '#endif' +echo '#ifdef __DMC__' +echo "int _Pr0b3_version_DM=__DMC__;" +echo '#endif' +echo '#ifdef _MSC_VER' +echo "int _Pr0b3_version_MS=_MSC_VER;" +echo '#endif' +echo '#ifdef __ICL' +echo "int _Pr0b3_version_ICL=__ICL;" +echo '#endif' +echo '#ifdef __LCC__' +echo "int _Pr0b3_version_LCC=0+__LCC__;" +echo '#endif' +echo '#ifdef __MINGW32__' +echo "int _Pr0b3_version_MINGW=__MINGW32__;" +echo '#endif' +echo '#ifdef __INTERIX' +echo "int _Pr0b3_version_INTERIX=__INTERIX;" +echo '#endif' +echo '#ifdef __WATCOMC__' +echo "int _Pr0b3_version_WATCOM=__WATCOMC__;" +echo '#endif' +} > easy.c + +include= + +$cc -E easy.c 2>&1 | +egrep -i '^(#(line)? 1 .*\.[hH]| *int +_Pr0b3_[a-zA-Z_]* *= *[0-9])' | +sed -e 's,_Pr0b3_,,' \ + -e 's/.*"\(.*\)".*/\1/' \ + -e 's,^ *,,' \ + -e 's, *$,,' \ + -e 's, *= *,=,' \ + -e 's,^\(.\):[\\/]*,/\1/,' \ + -e 's,[\\/][\\/]*,/,g' \ + -e 's,^\(/.*\)/\(.*\)$,header[\2]="\1",' \ + -e 's, *int *\(.*\);.*,\1,' \ + -e 's,^version_\(.*\)=,version[\1]=,' \ + > easy.sh +. ./easy.sh + +include= +for i in $probe_header +do d=${header[$i]} + if [[ $d ]] + then include="$include +$d" + elif [[ $i == */* ]] + then d=${header[${i##*/}]} + if [[ $d == */${i%/*} ]] + then include="$include +${d%/${i%/*}}" + fi + fi +done + +i=$($cc -V 2> easy.err) +if test "" != "$i" -a -d "$i/include" +then include="$i/include +$include" +fi + +stdinclude= +for inc in $include +do if [[ ${inc%/*} -ef /msdev/platformsdk ]] + then inc=/msdev/platformsdk/${inc##*/} + elif [[ ${inc%/*} -ef /platformsdk ]] + then inc=/platformsdk/${inc##*/} + fi + for dup in $stdinclude + do [[ $inc -ef $dup ]] && continue 2 + done + stdinclude="$stdinclude +$inc" +done + +# end preamble shared with the pp probe.ini + +if [[ ${version[@]} == [0-9]* && $stdinclude ]] +then : the payoff + set -- $cc + cmd=$1 + shift + set -- $(whence $cmd) "$@" + typ=$(package) + dialect="ANSI CLOSURE DYNAMIC EXPORT=DLL LIBPP -I-" + ld=${cc%cc}ld + if [[ ! -x $ld ]] + then ld=${cc%/*}/ld + if [[ ! -x $ld ]] + then case $cc in + */ncc) ld=/usr/bin/nld ;; + *) ld=/usr/bin/ld ;; + esac + fi + fi + { + if $cc -v >/dev/null 2>&1 + then v=$($cc -v 2>/dev/null) + if [[ $v ]] + then print "# ;VERSION;-v;$v;PATH;$cc" + fi + else v= + fi + cat <&3 + exit 0 +fi diff --git a/src/cmd/INIT/proto.sh b/src/cmd/INIT/proto.sh new file mode 100644 index 000000000..935c1e4d4 --- /dev/null +++ b/src/cmd/INIT/proto.sh @@ -0,0 +1,35 @@ +######################################################################## +# # +# This file is part of the ksh 93u+m package # +# Copyright (c) 2021 Contributors to ksh 93u+m # +# # +# and is licensed under the # +# Eclipse Public License, Version 2.0 # +# # +# A copy of the License is available at # +# https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html # +# (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) # +# # +# Martijn Dekker # +# # +######################################################################## + +# proto(1) has been removed. This is a backwards compatibility stub that allows +# compiling older AST code (with Mamfiles containing proto commands) using the +# current INIT system. This stub ignores all options, then invokes 'cat'. + +while getopts ':dfhinprstvzPSC:e:l:o:L:' opt +do case $opt in + \?) case $OPTARG in + +) ;; + *) echo "proto: $OPTARG: unknown option" + echo 'Usage: proto [-dfhinprstvzP+S] [-C directory] [-e package] [-l file]' + echo ' [-o "name='\''value'\'' ..."] [-L file] file ...' + exit 2 + ;; + esac >&2 + ;; + esac +done +shift $((OPTIND - 1)) +exec cat -- "$@" diff --git a/src/cmd/INIT/regress.sh b/src/cmd/INIT/regress.sh new file mode 100644 index 000000000..38c64af6b --- /dev/null +++ b/src/cmd/INIT/regress.sh @@ -0,0 +1,1463 @@ +######################################################################## +# # +# This software is part of the ast package # +# Copyright (c) 1994-2012 AT&T Intellectual Property # +# Copyright (c) 2020-2022 Contributors to ksh 93u+m # +# and is licensed under the # +# Eclipse Public License, Version 2.0 # +# # +# A copy of the License is available at # +# https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html # +# (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) # +# # +# Glenn Fowler # +# Martijn Dekker # +# Johnothan King # +# # +######################################################################## +: regress - run regression tests in command.tst + +command=regress +case $(getopts '[-][123:xyz]' opt --xyz 2>/dev/null; echo 0$opt) in +0123) USAGE=$' +[-? +@(#)$Id: regress (AT&T Research) 2012-02-02 $ +] +[-author?Glenn Fowler ] +[-copyright?Copyright (c) 1995-2012 AT&T Intellectual Property] +[-license?https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html] +[+NAME?regress - run regression tests] +[+DESCRIPTION?\bregress\b runs the tests in \aunit\a, or + \aunit\a\b.tst\b if \aunit\a does not exist. If \acommand\a is omitted + then it is assumed to be the base name of \aunit\a. All testing is done + in the temporary directory \aunit\a\b.tmp\b.] +[+?Default test output lists the \anumber\a and \adescription\a for + each active \bTEST\b group and the \anumber\a:\aline\a for each + individual \bEXEC\b test. Each test that fails results in a diagnostic + that contains the word \bFAILED\b; no other diagnostics contain this + word.] +[b:ignore-space?Ignore space differences when comparing expected + output.] +[i:pipe-input?Repeat each test with the standard input redirected through a + pipe.] +[k:keep?Enable \bcore\b dumps, exit after the first test that fails, + and do not remove the temporary directory \aunit\a\b.tmp\b.] +[l:local-fs?Force \aunit\a\b.tmp\b to be in a local filesystem.] +[o:pipe-output?Repeat each test with the standard output redirected through + a pipe.] +[p:pipe-io?Repeat each test with the standard input and standard output + redirected through pipes.] +[q:quiet?Output information on \bFAILED\b tests only.] +[r!:regular?Run each test with the standard input and standard output + redirected through regular files.] +[t:test?Run only tests matching \apattern\a. Tests are numbered and + consist of at least two digits (0 filled if necessary). Tests matching + \b+(0)\b are always run.]:[pattern] +[x:trace?Enable debug tracing.] +[v:verbose?List differences between actual (<) and expected (>) output, + errors and exit codes. Also disable long output line truncation.] + +unit [ command [ arg ... ] ] + +[+INPUT FILES?The regression test file \aunit\a\b.tst\b is a \bksh\b(1) + script that is executed in an environment with the following functions + defined:] + { + [+BODY \b{ ... }?Defines the test body; used for complex tests.] + [+CD \b\adirectory\a?Create and change to working directory for + one test.] + [+CLEANUP \b\astatus\a?Called at exit time to remove the + temporary directory \aunit\a\b.tmp\b, list the tests totals via + \bTALLY\b, and exit with status \astatus\a.] + [+COMMAND \b\aarg\a ...?Runs the current command under test with + \aarg\a ... appended to the default args.] + [+CONTINUE?The background job must be running.] + [+COPY \b\afrom to\a?Copy file \afrom\a to \ato\a. \afrom\a may + be a regular file or \bINPUT\b, \bOUTPUT\b or \bERROR\b. Post + test comparisons are still done for \afrom\a.] + [+DIAGNOSTICS \b[ \b1\b | \b0\b | \apattern\a ]]?No argument or an + argument of \b1\b declares that diagnostics are to expected for + the remainder of the current \bTEST\b; \b0\b reverts to the default + state that diagnostics are not expected; otherwise the argument + is a \bksh\b(1) pattern that must match the non-empty contents + of the standard error.] + [+DO \b\astatement\a?Defines additional statements to be executed + for the current test. \astatement\a may be a { ... } group.] + [+EMPTY \bINPUT|OUTPUT|ERROR|SAME?The corresponding file is + expected to be empty.] + [+ERROR \b[ \b-e\b \afilter\a ]] [ \b-n\b ]] \afile\a | - \adata\a ...?The + standard error is expected to match either the contents + of \afile\a or the line \adata\a. \bERROR -n\b does not + append a newline to \adata\a. \afilter\a is a shell command + or pipeline that reads standard input and writes standard + output that is applied to ERROR before comparison with the + expected contents.] + [+EXEC \b[ \aarg\a ... ]]?Runs the command under test with + optional arguments. \bINPUT\b, \bOUTPUT\b, \bERROR\b, \bEXIT\b + and \bSAME\b calls following this \bEXEC\b up until the next + \bEXEC\b or the end of the script provide details for the + expected results. If no arguments are specified then the + arguments from the previous \bEXEC\b in the current \bTEST\b + group are used, or no arguments if this is the first \bEXEC\b + in the group.] + [+EXIT \b\astatus\a?The command exit status is expected to match + the pattern \astatus\a.] + [+EXITED?The background job must have exited.] + [+EXPORT \b[-]] \aname\a=\avalue\a ...?Export environment + variables for one test.] + [+FATAL \b\amessage\a ...?\amessage\a is printed on the standard + error and \bregress\b exits with status \b1\b.] + [+FIFO \bINPUT|OUTPUT|ERROR\b [ \b-n\b ]] \afile\a | - \adata\a ...?The + \bIO\B file is a fifo.] + [+IF \b\acommand\a [\anote\a]]?If the \bsh\b(1) \acommand\a exits + 0 then tests until the next \bELIF\b, \bELSE\b or \bFI\b are + enabled. Otherwise those tests are skipped. \bIF\b ... \bFI\b + may be nested, but must not cross \bTEST\b boundaries. \anote\a + is listed on the standard error if the corresponding test block + is enabled; \bIF\b, \bELIF\b, \bELSE\b may nave a \anote\a + operand.] + [+IGNORE \b\afile\a ...?\afile\a is ignored for subsequent result + comparisons. \afile\a may be \bOUTPUT\b or \bERROR\b.] + [+IGNORESPACE?Ignore space differences when comparing expected + output.] + [+INCLUDE \b\afile\a ...?One or more \afile\a operands are read + via the \bksh\b(1) \b.\b(1) command. \bVIEW\b is used to locate + the files.] + [+INFO \b\adescription\a?\adescription\a is printed on the + standard error.] + [+INITIALIZE?Called by \bregress\b to initialize each + \bTEST\b group.] + [+INPUT \b[ \b-e\b \afilter\a ]] [ \b-n\b ]] \afile\a | - \adata\a ...?The + standard input is set to either the contents of \afile\a + or the line \adata\a. \bINPUT -n\b does not append a newline + to \adata\a. \afilter\a is a shell command or pipeline that + reads standard input and writes standard output that is + applied to OUTPUT before comparison with the expected contents.] + [+INTRO?Called by \bregress\b to introduce all \bTEST\b + groups.] + [+IO \b[ \bFIFO\b | \bPIPE\b ]] \bINPUT|OUTPUT|ERROR\b [ \b-e\b \afilter\a ]] [ \b-n\b ]] \afile\a | - \adata\a ...?Internal + support for the \bINPUT\b, \bOUTPUT\b and \bERROR\b functions.] + [+JOB \b\aop\a [ ... ]]?Like \bEXEC\b except the command is run + as a background job for the duration of the group or until it + is killed via \bKILL\b.] + [+KEEP \b\apattern\a ...?The temporary directory is cleared for + each test. Files matching \apattern\a are retained between + tests.] + [+KILL \b[ \asignal\a ]]?Kill the background job with \asignal\a + [ \bSIGKILL\b ]].] + [+MOVE \b\afrom to\a?Rename file \afrom\a to \ato\a. \afrom\a may + be a regular file or \bINPUT\b, \bOUTPUT\b or \bERROR\b. Post + test comparisons are ignored for \afrom\a.] + [+NOTE \b\acomment\a?\acomment\a is added to the current test + trace output.] + [+OUTPUT \b[ \b-e\b \afilter\a ]] [ \b-n\b ]] \afile\a | - \adata\a ...?The + standard output is expected to match either the contents + of \afile\a or the line \adata\a. \bOUTPUT -n\b does not + append a newline to \adata\a. \afilter\a is a shell command + or pipeline that reads standard input and writes standard + output that is applied to ERROR before comparison with the + expected contents.] + [+PIPE \bINPUT|OUTPUT|ERROR\b [ \b-n\b ]] \afile\a | - \adata\a ...?The + \bIO\B file is a pipe.] + [+PROG \b\acommand\a [ \aarg\a ... ]]?\acommand\a is run with + optional arguments.] + [+REMOVE \b\afile\a ...?\afile\a ... are removed after the + current test is done.] + [+RUN?Called by \bregress\b to run the current test.] + [+SAME \b\anew old\a?\anew\a is expected to be the same as + \aold\a after the current test completes.] + [+SET \b[\bno\b]]\aname\a[=\avalue\a]]?Set the command line + option --\aname\a. The setting is in effect for all tests until + the next explicit \bSET\b.] + [+TALLY?Called by \bregress\b display the \bTEST\b results.] + [+TEST \b\anumber\a [ \adescription\a ... ]]?Define a new test + group labelled \anumber\a with optional \adescription\a.] + [+TITLE \b[+]] \atext\a?Set the \bTEST\b output title to + \atext\a. If \b+\b is specified then \atext\a is appended to + the default title. The default title is the test file base + name, and, if different from the test file base name, the test + unit base name.] + [+TWD \b[ \adir\a ... ]]?Set the temporary test dir to \adir\a. + The default is \aunit\a\b.tmp\b, where \aunit\a is the test + input file sans directory and suffix. If \adir\a matches \b/*\b + then it is the directory name; if \adir\a is non-null then the + prefix \b${TMPDIR:-/tmp}\b is added; otherwise if \adir\a is + omitted then + \b${TMPDIR:-/tmp}/tst-\b\aunit\a-$$-$RANDOM.\b\aunit\a is + used.] + [+UMASK \b[ \amask\a ]]?Run subsequent tests with \bumask\b(1) + \amask\a. If \amask\a is omitted then the original \bumask\b is + used.] + [+UNIT \b\acommand\a [ \aarg\a ... ]]?Define the command and + optional default arguments to be tested. \bUNIT\b explicitly + overrides the default command name derived from the test script + file name. A \acommand\a operand with optional arguments + overrides the \bUNIT\b \acommand\a and arguments, with the + exception that if the \bUNIT\b \acommand\a is \b-\b or \b+\b + the \bUNIT\b arguments are appended to the operand or default + unit command and arguments.] + [+VIEW \b\avar\a [ \afile\a ]]?\avar\a is set to the full + pathname of \avar\a [ \afile\a ]] in the current \b$VPATH\b + view if defined.] + } +[+SEE ALSO?\bnmake\b(1), \bksh\b(1)] +' + ;; +*) USAGE='ko:[[no]name[=value]]t:[test]v unit [path [arg ...]]' + ;; +esac + +function FATAL # message +{ + print -r -u2 "$command: $*" + GROUP=FINI + exit 1 +} + +function EMPTY +{ + typeset i + typeset -n ARRAY=$1 + for i in ${!ARRAY[@]} + do unset ARRAY[$i] + done +} + +function INITIALIZE # void +{ + typeset i j + cd "$TWD" + case $KEEP in + "") RM * + ;; + *) for i in * + do case $i in + !($KEEP)) j="$j $i" ;; + esac + done + case $j in + ?*) RM $j ;; + esac + ;; + esac + : >INPUT >OUTPUT.ex >ERROR.ex + BODY="" + COPY="" + DIAGNOSTICS="" + DONE="" + ERROR="" + EXIT=0 + IGNORE="" + INIT="" + INPUT="" + MOVE="" + OUTPUT="" + EMPTY FILE + EMPTY FILTER + EMPTY SAME + EMPTY TYPE +} + +function INTRO +{ + typeset base command + + if [[ ! $TEST_quiet ]] + then base=${REGRESS##*/} + base=${base%.tst} + command=${COMMAND##*/} + command=${command%' '*} + set -- $TITLE + TITLE= + case $1 in + ''|+) if [[ $command == $base ]] + then TITLE=$COMMAND + else TITLE="$COMMAND, $base" + fi + if (( $# )) + then shift + fi + ;; + esac + while (( $# )) + do if [[ $TITLE ]] + then TITLE="$TITLE, $1" + else TITLE="$1" + fi + shift + done + print -u2 "TEST $TITLE" + fi +} + +function TALLY # extra message text +{ + typeset msg + case $GROUP in + INIT) ;; + *) msg="TEST $TITLE, $TESTS test" + case $TESTS in + 1) ;; + *) msg=${msg}s ;; + esac + msg="$msg, $ERRORS error" + case $ERRORS in + 1) ;; + *) msg=${msg}s ;; + esac + if (( $# )) + then msg="$msg, $*" + fi + print -u2 "$msg" + GROUP=INIT + TESTS=0 + ERRORS=0 + ;; + esac +} + +function TITLE # text +{ + TITLE=$@ +} + +function UNWIND +{ + while (( COND > 1 )) + do print -r -u2 "$command: line $LINE: no matching FI for IF on line ${COND_LINE[COND]}" + (( COND-- )) + done + if (( COND > 0 )) + then (( COND = 0 )) + FATAL "line $LINE: no matching FI for IF on line ${COND_LINE[COND+1]}" + fi + if [[ $JOBPID ]] + then if [[ $JOBPID != 0 ]] + then kill -KILL $JOBPID 2>/dev/null + wait + fi + JOBPID= + fi + JOBSTATUS= + JOBOP= + wait +} + +function CLEANUP # status +{ + typeset note + + if [[ $GROUP != INIT ]] + then if [[ ! $TEST_keep ]] + then cd $SOURCE + if [[ $TEST_local ]] + then RM ${TEST_local} + fi + RM "$TWD" + fi + if (( $1 )) && [[ $GROUP != FINI ]] + then note=terminated + fi + fi + TALLY $note + [[ $TEST_keep ]] || UNWIND + exit $1 +} + +function RUN # [ op ] +{ + typeset i r=1 + [[ $UMASK != $UMASK_ORIG ]] && umask $UMASK_ORIG +#print -u2 AHA#$LINENO $0 GROUP=$GROUP ITEM=$ITEM FLUSHED=$FLUSHED JOBOP=$JOBOP + case $GROUP in + INIT) RM "$TWD" + if [[ $TEST_local ]] + then TEST_local=${TMPDIR:-/tmp}/rt-$$/${TWD##*/} + mkdir -p "$TEST_local" && ln -s "$TEST_local" "$TWD" || FATAL "$TWD": cannot create directory + TEST_local=${TEST_local%/*} + else mkdir "$TWD" || FATAL "$TWD": cannot create directory + fi + cd "$TWD" + TWD=$PWD + : > rmu + if rm -u rmu >/dev/null 2>&1 + then TEST_rmu=-u + else rm rmu + fi + if [[ $UNIT ]] + then set -- "${ARGV[@]}" + case $1 in + ""|[-+]*) + UNIT $UNIT "${ARGV[@]}" + ;; + *) UNIT "${ARGV[@]}" + ;; + esac + fi + INTRO + ;; + FINI) ;; + $TEST_select) + if [[ $ITEM == $FLUSHED ]] + then return 0 + fi + FLUSHED=$ITEM + if (( COND_SKIP[COND] )) + then return 1 + fi + ((COUNT++)) + if (( $ITEM <= $LASTITEM )) + then LABEL=$TEST#$COUNT + else LASTITEM=$ITEM + LABEL=$TEST:$ITEM + fi + TEST_file="" + exec >/dev/null + for i in $INPUT + do case " $OUTPUT " in + *" $i "*) + if [[ -f $i.sav ]] + then cp $i.sav $i + COMPARE="$COMPARE $i" + elif [[ -f $i ]] + then cp $i $i.sav + COMPARE="$COMPARE $i" + fi + ;; + esac + done + for i in $OUTPUT + do case " $COMPARE " in + *" $i "*) + ;; + *) COMPARE="$COMPARE $i" + ;; + esac + done + for i in $INIT + do $i $TEST INIT + done +#print -u2 AHA#$LINENO $0 GROUP=$GROUP ITEM=$ITEM JOBOP=$JOBOP JOBPID=$JOBPID JOBSTATUS=$JOBSTATUS + if [[ $JOBPID != 0 && ( $JOBPID || $JOBSTATUS ) ]] + then if [[ ! $TEST_quiet ]] + then print -nu2 "$LABEL" + fi + RESULTS + elif [[ $BODY ]] + then SHOW=$NOTE + if [[ ! $TEST_quiet ]] + then print -r -u2 " $SHOW" + fi + for i in $BODY + do $i $TEST BODY + done + else SHOW= + if [[ ${TYPE[INPUT]} == PIPE ]] + then if [[ ${TYPE[OUTPUT]} == PIPE ]] + then if [[ ! $TEST_quiet ]] + then print -nu2 "$LABEL" + fi + cat <$TWD/INPUT | COMMAND "${ARGS[@]}" | cat >$TWD/OUTPUT + RESULTS 'pipe input' + else if [[ ! $TEST_quiet ]] + then print -nu2 "$LABEL" + fi + cat <$TWD/INPUT | COMMAND "${ARGS[@]}" >$TWD/OUTPUT + RESULTS 'pipe io' + fi + elif [[ ${TYPE[OUTPUT]} == PIPE ]] + then if [[ ! $TEST_quiet ]] + then print -nu2 "$LABEL" + fi + COMMAND "${ARGS[@]}" <$TWD/INPUT | cat >$TWD/OUTPUT + RESULTS 'pipe output' + else if [[ $TEST_regular ]] + then if [[ ! $TEST_quiet ]] + then print -nu2 "$LABEL" + fi + if [[ ${TYPE[INPUT]} == FIFO ]] + then COMMAND "${ARGS[@]}" >$TWD/OUTPUT + else COMMAND "${ARGS[@]}" <$TWD/INPUT >$TWD/OUTPUT + fi + RESULTS + fi + if [[ $TEST_pipe_input ]] + then if [[ ! $TEST_quiet ]] + then print -nu2 "$LABEL" + fi + (trap '' PIPE; cat <$TWD/INPUT 2>/dev/null; exit 0) | COMMAND "${ARGS[@]}" >$TWD/OUTPUT + STATUS=$? + RESULTS 'pipe input' + fi + if [[ $TEST_pipe_output ]] + then if [[ ! $TEST_quiet ]] + then print -nu2 "$LABEL" + fi + COMMAND "${ARGS[@]}" <$TWD/INPUT | cat >$TWD/OUTPUT + STATUS=$? + RESULTS 'pipe output' + fi + if [[ $TEST_pipe_io ]] + then if [[ ! $TEST_quiet ]] + then print -nu2 "$LABEL" + fi + (trap '' PIPE; cat <$TWD/INPUT 2>/dev/null; exit 0) | COMMAND "${ARGS[@]}" | cat >$TWD/OUTPUT + STATUS=$? + RESULTS 'pipe io' + fi + fi + set -- $COPY + COPY="" + while : + do case $# in + 0|1) break ;; + *) cp $1 $2 ;; + esac + shift 2 + done + set -- $MOVE + MOVE="" + while (( $# > 1 )) + do mv $1 $2 + shift 2 + done + fi + for i in $DONE + do $i $TEST DONE $STATUS + done + COMPARE="" + r=0 + ;; + esac + if [[ $COMMAND_ORIG ]] + then COMMAND=$COMMAND_ORIG + COMMAND_ORIG= + ARGS=(${ARGS_ORIG[@]}) + fi + return $r +} + +function DO # cmd ... +{ + [[ $GROUP == $TEST_select ]] || return 1 + (( COND_SKIP[COND] )) && return 1 + [[ $UMASK != $UMASK_ORIG ]] && umask $UMASK + return 0 +} + +function UNIT # cmd arg ... +{ + typeset cmd=$1 + case $cmd in + [-+]) shift + if (( UNIT_READONLY )) + then COMMAND="$COMMAND $*" + else #BUG# ARGV=("${ARGV[@]}" "$@") + set -- "${ARGV[@]}" "$@" + ARGV=("$@") + fi + return + ;; + esac + (( UNIT_READONLY )) && return + if [[ $UNIT ]] && (( $# <= 1 )) + then set -- "${ARGV[@]}" + case $1 in + "") set -- "$cmd" ;; + [-+]*) set -- "$cmd" "${ARGV[@]}" ;; + *) cmd=$1 ;; + esac + fi + UNIT= + COMMAND=$cmd + shift + typeset cmd=$(whence $COMMAND) + if [[ ! $cmd ]] + then FATAL $COMMAND: not found + elif [[ ! $cmd ]] + then FATAL $cmd: not found + fi + case $# in + 0) ;; + *) COMMAND="$COMMAND $*" ;; + esac +} + +function TWD # [ dir ] +{ + case $1 in + '') TWD=${TWD##*/}; TWD=${TMPDIR:-/tmp}/tst-${TWD%.*}-$$-$RANDOM ;; + /*) TWD=$1 ;; + *) TWD=${TMPDIR:-/tmp}/$1 ;; + esac +} + +function TEST # number description arg ... +{ + RUN + LINE=$TESTLINE + UNWIND + COUNT=0 + LASTITEM=0 + case $1 in + -) ((LAST++)); TEST=$LAST ;; + +([0123456789])) LAST=$1 TEST=$1 ;; + *) LAST=0${1/[!0123456789]/} TEST=$1 ;; + esac + NOTE= + if [[ ! $TEST_quiet && $TEST == $TEST_select ]] && (( ! COND_SKIP[COND] )) + then print -r -u2 "$TEST $2" + fi + unset ARGS + unset EXPORT + EXPORTS=0 + TEST_file="" + if [[ $TEST != ${GROUP}* ]] + then GROUP=${TEST%%+([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ])} + if [[ $GROUP == $TEST_select ]] && (( ! COND_SKIP[COND] )) + then INITIALIZE + fi + fi + ((SUBTESTS=0)) + [[ $TEST == $TEST_select ]] && (( ! COND_SKIP[COND] )) +} + +function EXEC # arg ... +{ + if [[ $GROUP != $TEST_select ]] || (( COND_SKIP[COND] )) + then return + fi + if ((SUBTESTS++)) + then RUN + fi + case $# in + 0) set -- "${ARGS[@]}" ;; + esac + ITEM=$LINE + NOTE="$(print -r -f '%q ' -- $COMMAND_ORIG "$@")${JOBPID:+&}" + ARGS=("$@") +} + +function JOB # arg ... +{ + JOBPID=0 + EXEC "$@" +} + +function CONTINUE +{ + RUN || return + JOBOP=CONTINUE + ITEM=$LINE + NOTE="$(print -r -f '%q ' -- $JOBOP)" +#print -u2 AHA#$LINENO JOBOP=$JOBOP ITEM=$ITEM NOTE=$NOTE +} + +function EXITED +{ + RUN || return + JOBOP=EXITED + ITEM=$LINE + NOTE="$(print -r -f '%q ' -- $JOBOP)" +#print -u2 AHA#$LINENO JOBOP=$JOBOP ITEM=$ITEM NOTE=$NOTE +} + +function KILL # [ signal ] +{ + RUN || return + JOBOP=$2 + [[ $JOBOP ]] || JOBOP=KILL + ITEM=$LINE + NOTE="$(print -r -f '%q ' -- $JOBOP)" +} + +function CD +{ + RUN + if [[ $GROUP == $TEST_select ]] && (( ! COND_SKIP[COND] )) + then mkdir -p "$@" && cd "$@" || FATAL cannot initialize working directory "$@" + fi +} + +function EXPORT +{ + typeset x n v + if [[ $GROUP == INIT ]] + then for x + do n=${x%%=*} + v=${x#*=} + ENVIRON[ENVIRONS++]=$n="'$v'" + done + else RUN + if [[ $GROUP != $TEST_select ]] || (( COND_SKIP[COND] )) + then return + fi + for x + do n=${x%%=*} + v=${x#*=} + EXPORT[EXPORTS++]=$n="'$v'" + done + fi +} + +function FLUSH +{ + if [[ $GROUP != $TEST_select ]] || (( COND_SKIP[COND] )) + then return + fi + if ((SUBTESTS++)) + then RUN + fi +} + +function PROG # cmd arg ... +{ + typeset command args + if [[ $GROUP != $TEST_select ]] || (( COND_SKIP[COND] )) + then return + fi + ITEM=$LINE + NOTE="$(print -r -f '%q ' -- "$@")" + COMMAND_ORIG=$COMMAND + COMMAND=$1 + shift + ARGS_ORIG=(${ARGS[@]}) + ARGS=("$@") +} + +function NOTE # description +{ + NOTE=$* +} + +function IO # [ PIPE ] INPUT|OUTPUT|ERROR [-f*|-n] file|- data ... +{ + typeset op i v f file type x + if [[ $GROUP != $TEST_select ]] || (( COND_SKIP[COND] )) + then return + fi + [[ $UMASK != $UMASK_ORIG ]] && umask $UMASK_ORIG + while : + do case $1 in + FIFO|PIPE) type=$1; shift ;; + *) break ;; + esac + done + op=$1 + shift + [[ $type ]] && TYPE[$op]=$type + FILTER[$op]= + file=$TWD/$op + while : + do case $1 in + -x) x=1 + shift + ;; + -e) (( $# > 1 )) && shift + FILTER[$op]=$1 + shift + ;; + -e*) FILTER[$op]=${1#-e} + shift + ;; + -f*|-n) f=$1 + shift + ;; + *) break + ;; + esac + done + case $# in + 0) ;; + *) case $1 in + -) ;; + *) file=$1 + eval i='$'$op + case " $i " in + *" $file "*) + ;; + *) eval $op='"$'$op' $file"' + ;; + esac + ;; + esac + shift + ;; + esac + case " $IGNORE " in + *" $file "*) + for i in $IGNORE + do case $i in + $file) ;; + *) v="$v $i" ;; + esac + done + IGNORE=$v + ;; + esac + FILE[$op]=$file + case $op in + OUTPUT|ERROR) + file=$file.ex + if [[ $file != /* ]] + then file=$TWD/$file + fi + ;; + esac + #unset SAME[$op] + SAME[$op]= + if [[ $file == /* ]] + then RM $file.sav + else RM $TWD/$file.sav + fi + if [[ $file == */* ]] + then mkdir -p ${file%/*} + fi + if [[ $file != */ ]] + then if [[ $type == FIFO ]] + then rm -f $file + mkfifo $file + fi + if [[ ${TYPE[$op]} != FIFO ]] + then if [[ $JOBOP ]] + then case $#:$f in + 0:) ;; + *:-f) printf -- "$@" ;; + *:-f*) printf -- "${f#-f}""$@" ;; + *) print $f -r -- "$@" ;; + esac >> $file + else case $#:$f in + 0:) ;; + *:-f) printf -- "$@" ;; + *:-f*) printf -- "${f#-f}""$@" ;; + *) print $f -r -- "$@" ;; + esac > $file + fi + elif [[ $#:$f != 0: ]] + then case $#:$f in + *:-f) printf -- "$@" ;; + *:-f*) printf -- "${f#-f}""$@" ;; + *) print $f -r -- "$@" ;; + esac >> $file & + fi + if [[ $x ]] + then chmod +x $file + fi + fi +} + +function INPUT # file|- data ... +{ + IO $0 "$@" +} + +function COPY # from to +{ + if [[ $GROUP != $TEST_select ]] || (( COND_SKIP[COND] )) + then return + fi + COPY="$COPY $@" +} + +function MOVE # from to +{ + typeset f + if [[ $GROUP != $TEST_select ]] || (( COND_SKIP[COND] )) + then return + fi + for f + do case $f in + INPUT|OUTPUT|ERROR) + f=$TWD/$f + ;; + /*) ;; + *) f=$PWD/$f + ;; + esac + MOVE="$MOVE $f" + done +} + +function SAME # new old +{ + typeset i file v + if [[ $GROUP != $TEST_select ]] || (( COND_SKIP[COND] )) + then return + fi + case $# in + 2) case $1 in + INPUT) cat $2 > $1; return ;; + esac + SAME[$1]=$2 + file=$1 + COMPARE="$COMPARE $1" + ;; + 3) SAME[$2]=$3 + file=$2 + eval i='$'$1 + case " $i " in + *" $2 "*) + ;; + *) eval $1='"$'$1' $2"' + ;; + esac + COMPARE="$COMPARE $2" + ;; + esac + case " $IGNORE " in + *" $file "*) + for i in $IGNORE + do case $i in + $file) ;; + *) v="$v $i" ;; + esac + done + IGNORE=$v + ;; + esac +} + +function OUTPUT # file|- data ... +{ + IO $0 "$@" +} + +function ERROR # file|- data ... +{ + IO $0 "$@" +} + +function RM # rm(1) args +{ + if [[ ! $TEST_rmu ]] + then chmod -R u+rwx "$@" >/dev/null 2>&1 + fi + rm $TEST_rmu $TEST_rmflags "$@" +} + +function REMOVE # file ... +{ + typeset i + for i + do RM $i $i.sav + done +} + +function IGNORE # file ... +{ + typeset i + for i + do case $i in + INPUT|OUTPUT|ERROR) + i=$TWD/$i + ;; + esac + case " $IGNORE " in + *" $i "*) + ;; + *) IGNORE="$IGNORE $i" + ;; + esac + done +} + +function KEEP # pattern ... +{ + typeset i + for i + do case $KEEP in + "") KEEP="$i" ;; + *) KEEP="$KEEP|$i" ;; + esac + done +} + +function DIAGNOSTICS # [ 1 | 0 ] +{ + case $#:$1 in + 0:|1:1) DIAGNOSTICS=1 + EXIT='*' + ;; + 1:|1:0) DIAGNOSTICS="" + EXIT=0 + ;; + *) DIAGNOSTICS=$1 + EXIT='*' + ;; + esac +} + +function IGNORESPACE +{ + : ${IGNORESPACE=-b} +} + +function EXIT # status +{ + EXIT=$1 +} + +function INFO # info description +{ + typeset -R15 info=$1 + if [[ ! $1 ]] + then info=no + fi + shift + if [[ ! $TEST_quiet ]] + then print -r -u2 "$info " "$@" + fi +} + +function COMMAND # arg ... +{ + typeset input + ((TESTS++)) + case " ${ENVIRON[*]} ${EXPORT[*]}" in + *' 'LC_ALL=*) + ;; + *' 'LC_+([A-Z])=*) + EXPORT[EXPORTS++]="LC_ALL=" + ;; + esac + if [[ $TEST_keep ]] + then ( + PS4='' + set -x + print -r -- "${ENVIRON[@]}" "${EXPORT[@]}" "PATH=$PATH" $COMMAND "$@" + ) 2>&1 >/dev/null | + sed -e 's,^print -r -- ,,' -e 's,$, "$@",' >$TWD/COMMAND + chmod +x $TWD/COMMAND + fi + if [[ $UMASK != $UMASK_ORIG ]] + then : >$TWD/ERROR + umask $UMASK + fi + if [[ ${TYPE[INPUT]} == FIFO && ${FILE[INPUT]} == */INPUT ]] + then input="< ${FILE[INPUT]}" + fi + if [[ $TEST_trace ]] + then set +x + eval print -u2 "$PS4" "${ENVIRON[@]}" "${EXPORT[@]}" PATH='$PATH' '$'COMMAND '"$@"' '$input' '"2>$TWD/ERROR"' '"${JOBPID:+&}"' + fi + eval "${ENVIRON[@]}" "${EXPORT[@]}" PATH='$PATH' '$'COMMAND '"$@"' $input "2>$TWD/ERROR" "${JOBPID:+&}" + STATUS=$? + [[ $TEST_trace ]] && set -x + if [[ $JOBPID ]] + then JOBPID=$! + fi + [[ $UMASK != $UMASK_ORIG ]] && umask $UMASK_ORIG + return $STATUS +} + +function RESULTS # pipe* +{ + typeset i j k s failed ignore io op + if [[ $1 ]] + then io="$1 " + fi + [[ $JOBOP || $JOBPID || $JOBSTATUS ]] && sleep 1 + for i in $COMPARE $TWD/OUTPUT $TWD/ERROR + do case " $IGNORE $ignore $MOVE " in + *" $i "*) continue ;; + esac + ignore="$ignore $i" + op=${i##*/} + if [[ ${FILTER[$op]} ]] + then eval "{ ${FILTER[$op]} ;} < $i > $i.fi" + mv $i.fi $i + fi + j=${SAME[$op]} + if [[ ! $j ]] + then if [[ $i == /* ]] + then k=$i + else k=$TWD/$i + fi + for s in ex sav err + do [[ -f $k.$s ]] && break + done + j=$k.$s + fi + if [[ "$DIAGNOSTICS" && $i == */ERROR ]] + then if [[ $STATUS == 0 && ! -s $TWD/ERROR || $DIAGNOSTICS != 1 && $(<$i) != $DIAGNOSTICS ]] + then failed=$failed${failed:+,}DIAGNOSTICS + if [[ $TEST_verbose && $DIAGNOSTICS != 1 ]] + then print -u2 " ===" "diagnostic pattern '$DIAGNOSTICS' did not match" ${i#$TWD/} "===" + cat $i >&2 + fi + fi + continue + fi + diff $IGNORESPACE $i $j >$i.diff 2>&1 + if [[ -s $i.diff ]] + then failed=$failed${failed:+,}${i#$TWD/} + if [[ $TEST_verbose ]] + then print -u2 " ===" diff $IGNORESPACE ${i#$TWD/} "expected ===" + cat $i.diff >&2 + fi + fi + done + if [[ $JOBOP ]] + then if [[ $JOBPID ]] && ! kill -0 $JOBPID 2>/dev/null + then wait $JOBPID + JOBSTATUS=$? + JOBPID= + fi +#print -u2 AHA#$LINENO JOBOP=$JOBOP JOBPID=$JOBPID JOBSTATUS=$JOBSTATUS + case $JOBOP in + CONTINUE) + if [[ ! $JOBPID ]] + then failed=$failed${failed:+,}EXITED + fi + ;; + EXITED) if [[ $JOBPID ]] + then failed=$failed${failed:+,}RUNNING + fi + ;; + *) if [[ ! $JOBPID ]] + then failed=$failed${failed:+,}EXITED + fi + if ! kill -$JOBOP $JOBPID 2>/dev/null + then failed=$failed${failed:+,}KILL-$JOBOP + fi + ;; + esac + JOBOP= + fi + if [[ ! $failed && $STATUS != $EXIT ]] + then failed="exit code $EXIT expected -- got $STATUS" + fi + if [[ $failed ]] + then ((ERRORS++)) + if [[ ! $TEST_quiet ]] + then SHOW="FAILED ${io}[ $failed ] $NOTE" + print -r -u2 " $SHOW" + fi + if [[ $TEST_keep ]] + then GROUP=FINI + exit + fi + elif [[ ! $TEST_quiet ]] + then SHOW=$NOTE + print -r -u2 " $SHOW" + fi +} + +function SET # [no]name[=value] +{ + typeset i r + if [[ $TEST ]] + then RUN + fi + for i + do if [[ $i == - ]] + then r=1 + elif [[ $i == + ]] + then r= + else if [[ $i == no?* ]] + then i=${i#no} + v= + elif [[ $i == *=* ]] + then v=${i#*=} + if [[ $v == 0 ]] + then v= + fi + i=${i%%=*} + else v=1 + fi + i=${i//-/_} + if [[ $r ]] + then READONLY[$i]=1 + elif [[ ${READONLY[$i]} ]] + then continue + fi + eval TEST_$i=$v + fi + done +} + +function VIEW # var [ file ] +{ + nameref var=$1 + typeset i bwd file pwd view root offset + if [[ $var ]] + then return 0 + fi + case $# in + 1) file=$1 ;; + *) file=$2 ;; + esac + pwd=${TWD%/*} + bwd=${PMP%/*} + if [[ -r $file ]] + then if [[ ! -d $file ]] + then var=$PWD/$file + return 0 + fi + for i in $file/* + do if [[ -r $i ]] + then var=$PWD/$file + return 0 + fi + break + done + fi + for view in ${VIEWS[@]} + do case $view in + /*) ;; + *) view=$pwd/$view ;; + esac + case $offset in + '') case $pwd in + $view/*) offset=${pwd#$view} ;; + *) offset=${bwd#$view} ;; + esac + ;; + esac + if [[ -r $view$offset/$file ]] + then if [[ ! -d $view$offset/$file ]] + then var=$view$offset/$file + return 0 + fi + for i in $view$offset/$file/* + do if [[ -f $i ]] + then var=$view$offset/$file + return 0 + fi + break + done + fi + done + var= + return 1 +} + +function INCLUDE # file ... +{ + typeset f v x + for f + do if VIEW v $f || [[ $PREFIX && $f != /* ]] && VIEW v $PREFIX$f + then x=$x$'\n'". $v" + else FATAL $f: not found + fi + done + [[ $x ]] && trap "$x" 0 +} + +function UMASK # [ mask ] +{ + if (( $# )) + then UMASK=$1 + else UMASK=$UMASK_ORIG + fi +} + +function PIPE # INPUT|OUTPUT|ERROR file|- data ... +{ + IO $0 "$@" +} + +function FIFO # INPUT|OUTPUT|ERROR file|- data ... +{ + IO $0 "$@" +} + +function IF # command(s) [note] +{ + [[ $GROUP == $TEST_select ]] || return + RUN + (( COND++ )) + COND_LINE[COND]=$LINE + if (( COND > 1 && COND_SKIP[COND-1] )) + then (( COND_KEPT[COND] = 1 )) + (( COND_SKIP[COND] = 1 )) + elif eval "{ $1 ;} >/dev/null 2>&1" + then (( COND_KEPT[COND] = 1 )) + (( COND_SKIP[COND] = 0 )) + [[ $2 && ! $TEST_quiet ]] && print -u2 "NOTE $2" + else (( COND_KEPT[COND] = 0 )) + (( COND_SKIP[COND] = 1 )) + fi +} + +function ELIF # command(s) [note] +{ + [[ $GROUP == $TEST_select ]] || return + RUN + if (( COND <= 0 )) + then FATAL line $LINE: no matching IF for ELIF + fi + if (( COND_KEPT[COND] )) + then (( COND_SKIP[COND] = 0 )) + elif eval "$* > /dev/null 2>&1" + then (( COND_KEPT[COND] = 1 )) + (( COND_SKIP[COND] = 0 )) + [[ $2 && ! $TEST_quiet ]] && print -u2 "NOTE $2" + else (( COND_SKIP[COND] = 1 )) + fi +} + +function ELSE # [note] +{ + [[ $GROUP == $TEST_select ]] || return + RUN + if (( COND <= 0 )) + then FATAL line $LINE: no matching IF for ELSE + fi + if (( COND_KEPT[COND] )) + then (( COND_SKIP[COND] = 1 )) + else (( COND_KEPT[COND] = 1 )) + (( COND_SKIP[COND] = 0 )) + [[ $1 && ! $TEST_quiet ]] && print -u2 "NOTE $1" + fi +} + +function FI +{ + [[ $GROUP == $TEST_select ]] || return + RUN + if (( COND <= 0 )) + then FATAL line $LINE: no matching IF for FI on line $LINE + fi + (( ! COND_KEPT[COND] )) && [[ $1 && ! $TEST_quiet ]] && print -u2 "NOTE $1" + (( COND-- )) +} + +# main + +integer ERRORS=0 ENVIRONS=0 EXPORTS=0 TESTS=0 SUBTESTS=0 LINE=0 TESTLINE=0 +integer ITEM=0 LASTITEM=0 COND=0 UNIT_READONLY=0 COUNT +typeset ARGS COMMAND COPY DIAGNOSTICS ERROR EXEC FLUSHED=0 GROUP=INIT +typeset IGNORE INPUT KEEP OUTPUT TEST SOURCE MOVE NOTE UMASK UMASK_ORIG +typeset ARGS_ORIG COMMAND_ORIG TITLE UNIT ARGV PREFIX OFFSET IGNORESPACE +typeset COMPARE MAIN JOBPID='' JOBSTATUS='' +typeset TEST_file TEST_keep TEST_pipe_input TEST_pipe_io TEST_pipe_output TEST_local +typeset TEST_quiet TEST_regular=1 TEST_rmflags='-rf --' TEST_rmu TEST_select + +typeset -A SAME VIEWS FILE TYPE READONLY FILTER +typeset -a COND_LINE COND_SKIP COND_KEPT ENVIRON EXPORT +typeset -Z LAST=00 + +unset FIGNORE + +while getopts -a $command "$USAGE" OPT +do case $OPT in + b) (( $OPTARG )) && IGNORESPACE=-b + ;; + i) SET - pipe-input=$OPTARG + ;; + k) SET - keep=$OPTARG + ;; + l) SET - local + ;; + o) SET - pipe-output=$OPTARG + ;; + p) SET - pipe-io=$OPTARG + ;; + q) SET - quiet=$OPTARG + ;; + r) SET - regular=$OPTARG + ;; + t) if [[ $TEST_select ]] + then TEST_select="$TEST_select|${OPTARG//,/\|}" + else TEST_select="${OPTARG//,/\|}" + fi + ;; + x) SET - trace=$OPTARG + ;; + v) SET - verbose=$OPTARG + ;; + *) GROUP=FINI + exit 2 + ;; + esac +done +shift $OPTIND-1 +case $# in +0) FATAL test unit name omitted ;; +esac +export COLUMNS=80 +SOURCE=$PWD +PATH=$SOURCE:${PATH#?(.):} +PATH=${PATH%%:?(.)}:/bin:/usr/bin +UNIT=$1 +shift +if [[ -f $UNIT && ! -x $UNIT ]] +then REGRESS=$UNIT +else REGRESS=${UNIT%.tst} + REGRESS=$REGRESS.tst + [[ -f $REGRESS ]] || FATAL $REGRESS: regression tests not found +fi +UNIT=${UNIT##*/} +UNIT=${UNIT%.tst} +MAIN=$UNIT +if [[ $VPATH ]] +then set -A VIEWS ${VPATH//:/' '} + OFFSET=${SOURCE#${VIEWS[0]}} + if [[ $OFFSET ]] + then OFFSET=${OFFSET#/}/ + fi +fi +if [[ $REGRESS == */* ]] +then PREFIX=${REGRESS%/*} + if [[ ${#VIEWS[@]} ]] + then for i in ${VIEWS[@]} + do PREFIX=${PREFIX#$i/} + done + fi + PREFIX=${PREFIX#$OFFSET} + if [[ $PREFIX ]] + then PREFIX=$PREFIX/ + fi +fi +TWD=$PWD/$UNIT.tmp +PMP=$(pwd -P)/$UNIT.tmp +UMASK_ORIG=$(umask) +UMASK=$UMASK_ORIG +ARGV=("$@") +if [[ ${ARGV[0]} && ${ARGV[0]} != [-+]* ]] +then UNIT "${ARGV[@]}" + UNIT_READONLY=1 +fi +trap 'code=$?; CLEANUP $code' EXIT +if [[ ! $TEST_select ]] +then TEST_select="[0123456789]*" +fi +TEST_select="@($TEST_select|+(0))" +if [[ $TEST_trace ]] +then export PS4=':$LINENO: ' + typeset -ft $(typeset +f) + set -x +fi +if [[ $TEST_verbose ]] +then typeset SHOW +else typeset -L70 SHOW +fi +if [[ ! $TEST_keep ]] && (ulimit -c 0) >/dev/null 2>&1 +then ulimit -c 0 +fi +set --pipefail + +# some last minute shenanigans + +alias BODY='BODY=BODY; function BODY' +alias CONTINUE='LINE=$LINENO; CONTINUE' +alias DO='(( $ITEM != $FLUSHED )) && RUN DO; DO &&' +alias DONE='DONE=DONE; function DONE' +alias EXEC='LINE=$LINENO; EXEC' +alias EXITED='LINE=$LINENO; EXITED' +alias INIT='INIT=INIT; function INIT' +alias JOB='LINE=$LINENO; JOB' +alias KILL='LINE=$LINENO; KILL' +alias PROG='LINE=$LINENO; FLUSH; PROG' +alias TEST='TESTLINE=$LINENO; TEST' +alias IF='LINE=$LINENO; FLUSH; IF' +alias ELIF='LINE=$LINENO; FLUSH; ELIF' +alias ELSE='LINE=$LINENO; FLUSH; ELSE' +alias FI='LINE=$LINENO; FLUSH; FI' + +# do the tests + +. $REGRESS +RUN +GROUP=FINI diff --git a/src/cmd/INIT/silent.sh b/src/cmd/INIT/silent.sh new file mode 100644 index 000000000..3291fa865 --- /dev/null +++ b/src/cmd/INIT/silent.sh @@ -0,0 +1,32 @@ +######################################################################## +# # +# This software is part of the ast package # +# Copyright (c) 1994-2011 AT&T Intellectual Property # +# Copyright (c) 2020-2022 Contributors to ksh 93u+m # +# and is licensed under the # +# Eclipse Public License, Version 2.0 # +# # +# A copy of the License is available at # +# https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html # +# (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) # +# # +# Glenn Fowler # +# Martijn Dekker # +# # +######################################################################## +# non-ksh stub for the nmake silent prefix +# @(#)silent (ksh 93u+m) 2021-12-31 + +while : +do case $# in + 0) exit 0 ;; + esac + case $1 in + *=*) export "$1" + shift + ;; + *) break + ;; + esac +done +"$@" diff --git a/src/cmd/INIT/socket.c b/src/cmd/INIT/socket.c new file mode 100644 index 000000000..d71d98f58 --- /dev/null +++ b/src/cmd/INIT/socket.c @@ -0,0 +1,30 @@ +/*********************************************************************** +* * +* This software is part of the ast package * +* Copyright (c) 1994-2011 AT&T Intellectual Property * +* Copyright (c) 2020-2022 Contributors to ksh 93u+m * +* and is licensed under the * +* Eclipse Public License, Version 2.0 * +* * +* A copy of the License is available at * +* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html * +* (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) * +* * +* Glenn Fowler * +* Martijn Dekker * +* * +***********************************************************************/ +/* + * small test for -lnsl + */ + +#ifndef socket +#include +#include +#endif + +int +main() +{ + return socket(0, 0, 0) < 0; +} diff --git a/src/cmd/INIT/w.c b/src/cmd/INIT/w.c new file mode 100644 index 000000000..07bbb2faa --- /dev/null +++ b/src/cmd/INIT/w.c @@ -0,0 +1,27 @@ +/*********************************************************************** +* * +* This software is part of the ast package * +* Copyright (c) 1994-2011 AT&T Intellectual Property * +* Copyright (c) 2020-2022 Contributors to ksh 93u+m * +* and is licensed under the * +* Eclipse Public License, Version 2.0 * +* * +* A copy of the License is available at * +* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html * +* (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) * +* * +* Glenn Fowler * +* Martijn Dekker * +* * +***********************************************************************/ +#ifndef DONTCARE +#include +#include +#endif + +int +main() +{ + wchar_t w = ' '; + return iswspace(w) == 0; +} diff --git a/src/cmd/INIT/w2.c b/src/cmd/INIT/w2.c new file mode 100644 index 000000000..3c82b9d2f --- /dev/null +++ b/src/cmd/INIT/w2.c @@ -0,0 +1,24 @@ +/*********************************************************************** +* * +* This software is part of the ast package * +* Copyright (c) 1994-2011 AT&T Intellectual Property * +* Copyright (c) 2020-2022 Contributors to ksh 93u+m * +* and is licensed under the * +* Eclipse Public License, Version 2.0 * +* * +* A copy of the License is available at * +* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html * +* (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) * +* * +* Glenn Fowler * +* Martijn Dekker * +* * +***********************************************************************/ +#include + +int +main() +{ + wchar_t w = ' '; + return iswspace(w) == 0; +} diff --git a/src/cmd/Mamfile b/src/cmd/Mamfile new file mode 100644 index 000000000..17a6e7357 --- /dev/null +++ b/src/cmd/Mamfile @@ -0,0 +1,15 @@ +note * +note * This build file is in the Make Abstract Machine (MAM) language. It was +note * first generated by nmake, but in the ksh 93u+m distribution we maintain +note * it manually because nmake had too many problems to keep using. The +note * Mamfiles are processed by mamake (src/cmd/INIT/mamake.c); we added +note * indentation to improve readability. The language is documented in +note * src/cmd/INIT/README-mamake.md. +note * +make test + make install + make all + exec - ${MAMAKE} -r '*' ${MAMAKEARGS} + done all virtual + done install virtual +done test virtual diff --git a/src/cmd/builtin/Mamfile b/src/cmd/builtin/Mamfile new file mode 100644 index 000000000..c8d101978 --- /dev/null +++ b/src/cmd/builtin/Mamfile @@ -0,0 +1,66 @@ +note * +note * This build file is in the Make Abstract Machine (MAM) language. It was +note * first generated by nmake, but in the ksh 93u+m distribution we maintain +note * it manually because nmake had too many problems to keep using. The +note * Mamfiles are processed by mamake (src/cmd/INIT/mamake.c); we added +note * indentation to improve readability. The language is documented in +note * src/cmd/INIT/README-mamake.md. +note * +setv INSTALLROOT ../../.. +setv PACKAGE_ast_INCLUDE ${INSTALLROOT}/include/ast +setv PACKAGE_cmd ${INSTALLROOT} +setv PACKAGEROOT ../../../../.. +setv CC cc +setv mam_cc_FLAGS +setv CCFLAGS ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${mam_cc_OPTIMIZE}?} +setv CCLDFLAGS ${-strip-symbols?1?${mam_cc_LD_STRIP}??} +setv IFFEFLAGS +setv LDFLAGS +make .INIT + make ${PACKAGE_ast_INCLUDE}/cmdlist.h + done ${PACKAGE_ast_INCLUDE}/cmdlist.h + exec - sed -e '/^CMDLIST(.*)$/!d' -e 's/CMDLIST(\(.*\))/\1/' -e '/^getconf$/d' -e '/^ln$/d' -e '/^mv$/d' -e '/^md5sum$/d' -e '/^sum$/d' ${PACKAGE_ast_INCLUDE}/cmdlist.h + bind -lcmd +done .INIT dontcare virtual +make install + make pty + make pty.o + make pty.c + make FEATURE/pty implicit + make features/pty + done features/pty + exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libast} ${mam_libcmd} : run features/pty + done FEATURE/pty generated + make ${PACKAGE_ast_INCLUDE}/ast_time.h implicit + done ${PACKAGE_ast_INCLUDE}/ast_time.h + prev ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit + prev ${PACKAGE_ast_INCLUDE}/regex.h implicit + make ${PACKAGE_ast_INCLUDE}/proc.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + done ${PACKAGE_ast_INCLUDE}/proc.h + prev ${PACKAGE_ast_INCLUDE}/error.h implicit + prev ${PACKAGE_ast_INCLUDE}/cmd.h implicit + done pty.c + prev pty.c + exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -I${PACKAGE_ast_INCLUDE} -DERROR_CATALOG=\""builtin"\" -D_PACKAGE_ast -DCMD_STANDALONE=b_pty -c pty.c + done pty.o generated + bind -lutil dontcare + exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -o pty pty.o ${mam_libutil} ${mam_libast} -lm ${mam_libcmd} + done pty generated + make ${INSTALLROOT}/bin + exec - if silent test ! -d ${INSTALLROOT}/bin + exec - then mkdir -p ${INSTALLROOT}/bin + exec - fi + done ${INSTALLROOT}/bin generated + make ${INSTALLROOT}/bin/pty + prev pty + exec - ${STDCMP} 2>/dev/null -s pty ${INSTALLROOT}/bin/pty || { ${STDMV} ${INSTALLROOT}/bin/pty ${INSTALLROOT}/bin/pty.old 2>/dev/null || true; ${STDCP} pty ${INSTALLROOT}/bin/pty ;} + done ${INSTALLROOT}/bin/pty generated + make ${INSTALLROOT}/bin + exec - if silent test ! -d ${INSTALLROOT}/bin + exec - then mkdir -p ${INSTALLROOT}/bin + exec - fi + done ${INSTALLROOT}/bin virtual +done install virtual +make test +done test dontcare virtual diff --git a/src/cmd/builtin/RELEASE b/src/cmd/builtin/RELEASE new file mode 100644 index 000000000..1db083047 --- /dev/null +++ b/src/cmd/builtin/RELEASE @@ -0,0 +1,14 @@ +This file is of historical interest only. For recent changes in both ksh 93u+m +and the accompanying libraries, see the file NEWS in the top-level directory. +____ + +12-02-28 pty.c: change --verbose[=level] to --debug=level +12-01-26 pty.c: fix --man docs +10-06-21 pty.c: add 4 sec timeout for initial handshake -- fix me!! +10-04-12 pty: fix sfpoll() result read/write bug +10-04-01 pty: add --tty='stty-settings' +10-03-19 pty: add --dialogue +10-03-15 pty: fix select() fd management +09-03-31 features/pty,Makefile: add pty.h and -lutil refs for Linux -- great, another util library +09-01-30 pty.c: add (for fd_set!! on mvs.390) +06-07-20 pty.c: add diff --git a/src/cmd/builtin/features/pty b/src/cmd/builtin/features/pty new file mode 100644 index 000000000..ac3467f0f --- /dev/null +++ b/src/cmd/builtin/features/pty @@ -0,0 +1,63 @@ +header sys/types.h +header pty.h +header libutil.h +header sys/pty.h +header sys/ptyio.h +header sys/vty.h +header sys/ioctl.h +header stropts.h + +lib openpty,_getpty,ptsname -lutil +lib grantpt,unlockpt,posix_openpt stdlib.h +lib cfmakeraw termios.h + +# try once with -lm, once without +tst - -lm - - output{ + #include + #if _lib_ptsname + #include + #endif + #include + #include + #include + #include + int main() + { + int i; + struct stat statb; + static char* pty[] = { "/dev/ptyp0000", "/dev/ptym/ptyp0", "/dev/ptyp0" }; + #if _lib_ptsname + int fd; + static char* ptc[] = { "/dev/ptmx", "/dev/ptc", "/dev/ptmx_bsd" }; + + for (i = 0; i < sizeof(ptc) / sizeof(ptc[0]); i++) + if((fd = open(ptc[i], 2))>=0) + { + if (ptsname(fd)) + { + sfprintf(sfstdout, "#define _pty_clone\t\"%s\"\n", ptc[i]); + close(fd); + break; + } + close(fd); + } + #endif + for (i = 0;; i++) + if(i >= (sizeof(pty) / sizeof(pty[0]) - 1) || stat(pty[i], &statb)>=0) + { + sfprintf(sfstdout, "#define _pty_first\t\"%s\"\n", pty[i]); + break; + } + return 0; + } +}end fail{ + case ${_features_pty_TRIEDONCE-no} in + no) _features_pty_TRIEDONCE=yes ;; + *) echo "$0: Output block failed to compile. Export IFFEFLAGS=-d1 to debug." >&2 + exit 1 ;; + esac +}end + +extern _getpty char* (int*, int, mode_t, int) +extern openpty int (int*, int*, char*, struct termios*, struct winsize*) +extern ptsname char* (int) diff --git a/src/cmd/builtin/pty.c b/src/cmd/builtin/pty.c new file mode 100644 index 000000000..efd364d26 --- /dev/null +++ b/src/cmd/builtin/pty.c @@ -0,0 +1,1146 @@ +/*********************************************************************** +* * +* This software is part of the ast package * +* Copyright (c) 1992-2013 AT&T Intellectual Property * +* Copyright (c) 2020-2022 Contributors to ksh 93u+m * +* and is licensed under the * +* Eclipse Public License, Version 2.0 * +* * +* A copy of the License is available at * +* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html * +* (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) * +* * +* Glenn Fowler * +* David Korn * +* Martijn Dekker * +* * +***********************************************************************/ + +static const char usage[] = +"[-?\n@(#)pty (AT&T Research) 2013-05-22\n]" +"[-author?Glenn Fowler ]" +"[-author?David Korn ]" +"[-copyright?Copyright (c) 2001-2013 AT&T Intellectual Property]" +"[-license?https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html]" +"[--catalog?builtin]" +"[+NAME?pty - create pseudo terminal and run command]" +"[+DESCRIPTION?\bpty\b creates a pseudo pty and then runs \bcommand\b " + "with arguments given by \aarg\a and the standard input, standard " + "output, and standard error connected to the pseudo terminal. By " + "default, the \bpty\b creates a new session.]" +"[+?If \bcommand\b does not contain a \b/\b, the \bPATH\b variable will " + "be used to locate the \bcommand\b.]" +"[+?Input to \bpty\b will be written to the standard input of this " + "command. The standard output and standard error from the command will " + "be written to the standard output of \bpty\b.]" +"[+?The \bpty\b command terminates when the command completes.]" +"[d:dialogue?Execute the dialogue on the standard input. A dialogue is a " + "sequence of commands, one command per line. All \are\a patterns are " + "extended regular expressions. The \are\a \b?1\b will print the subject " + "string on the standard error and match the string; the \are\a \b?0\b " + "will print the subject string on the standard error and not match the " + "string. The \are\a \b?.\b matches EOF. The commands are:]" + "{" + "[\b#\b \acomment\a?comment line]" + "[c \atext\a?write \atext\a to the master; C style escapes " + "in text are converted, including \\E for ESC and \\cX for " + "control-X]" + "[d \amilliseconds\a?set the delay before each master write to " + "\amilliseconds\a; the default is no delay]" + "[i \are\a?read a line from the master; if it matches \are\a " + "then execute lines until matching \be\b or \bf\b]" + "[e [re]]?else [if match re]] then execute lines until matching " + "\be\b or \bf\b]" + "[f?end of \bi\b/\be\b block]" + "[m \atext\a?write \atext\a to the standard error]" + "[p \atext\a?peek input until \atext\a is found at the beginning " + "of a line; input is not consumed]" + "[r [\are\a]]?read a line from the master [and it should match " + "re]]]" + "[s \amilliseconds\a?sleep for \amilliseconds\a]" + "[t \amilliseconds\a?set the master read timeout to " + "\amilliseconds\a; the default is \b1000\b]" + "[u \are\a?read lines from the master until one matches \are\a]" + "[v \alevel\a?set the verbose trace \alevel\a, more output for " + "higher levels, disabled for level 0]" + "[w \atext\a?write \atext\a\\r\\n to the master; C style escapes " + "in text are converted, including \\E for ESC and \\cX for " + "control-X]" + "[x [\acode\a]]" + "?exit \bpty\b with exit code \b0\b [\acode\a]]]" + "[I \are\a?ignore master lines matching \are\a]" + "[L \alabel\a?prefix all diagnostics with \alabel\a:]" + "[P \atext\a?delay each master write until the beginning of " + "an unread input line exactly matches \atext\a]" + "}" +"[D:debug?Set the debug trace \alevel\a, higher levels produce more " + "output, disabled for level 0.]#[level]" +"[l:log?Log the master stdout and stderr to \afile\a.]:[file]" +"[m:messages?Redirect diagnostic message output to \afile\a.]:[file]" +"[s!:session?Create a separate session for the process started by " + "\bpty\b.]" +"[t:timeout?Set the master read timeout to " + "\amilliseconds\a.]#[milliseconds:=1000]" +"[T:tty?Pass \astty\a to the \bstty\b(1) command to initialize the " + "pty.]:[stty]" +"[w:delay?Set the delay before each master write to " + "\amilliseconds\a.]#[milliseconds:=0]" + +"\n" +"\ncommand [arg ...]\n" +"\n" + +"[+EXIT STATUS?If the command determined by \bcommand\b is run the exit " + "status of \bpty\b is that of this command. Otherwise, the exit status " + "is one of the following:]" + "{" + "[+127?The command is found but cannot be executed.]" + "[+128?The command could not be found.]" + "}" +"[+SEE ALSO?\bcommand\b(1), \bexec\b(1)]" +; + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "FEATURE/pty" + +#define MODE_666 (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) +#define MAXNAME 64 + +#ifndef CMIN +#define CMIN 1 +#endif + +static noreturn void outofmemory(void) +{ + error(ERROR_SYSTEM|ERROR_PANIC, "out of memory"); + UNREACHABLE(); +} + +#if !_lib_openpty && !_lib__getpty && !defined(_pty_clone) +# if !_lib_grantpt || !_lib_unlock +# if !_lib_ptsname + static char *minionname(const char *name) + { + static char sname[MAXNAME]; + char *last; + strncpy(sname,name,sizeof(sname)); + last = strrchr(sname,'/'); + last[1] = 't'; + return(sname); + } +# endif + + static char *master_name(char *name) + { + static char sname[MAXNAME]; + int n; + if(!name) + { + strcpy(sname,_pty_first); + return(sname); + } + n = strlen(_pty_first); + if(name[n-1]=='9') + name[n-1]='a'; + else if(name[n-1]=='f') + { + if(_pty_first[n-2]=='0' && name[n-2]=='9') + { + name[n-2]='0'; + if(name[n-3]=='9' || name[n-3]=='z') + return(NULL); + name[n-3]++; + } + if(_pty_first[n-2]=='p' && (name[n-2]=='z' || name[n-2]=='Z')) + { + if(name[n-2]=='z') + name[n-2]=='P'; + else + return(0); + } + else + name[n-2]++; + name[n-1]='0'; + } + else + name[n-1]++; + return(name); + } +#endif + +#if !_lib_openpty + static char *ptymopen(int *master) + { + char *minion=0; +# if _lib__getpty + return(_getpty(master,O_RDWR,MODE_666,0)); +# else +# if defined(_pty_clone) + *master = open(_pty_clone,O_RDWR|O_CREAT,MODE_666); + if(*master>=0) + minion = ptsname(*master); +# else + int fdm; + char *name=0; + while(name=master_name(name)) + { + fdm = open(name,O_RDWR|O_CREAT,MODE_666); + if(fdm >= 0) + { + *master = fdm; +# if _lib_ptsname + minion = ptsname(fdm); +# else + minion = minionname(name); +# endif + break; + } + } +# endif +# endif + return(minion); + } +# endif +#endif + +static int +mkpty(int* master, int* minion) +{ + struct termios tty; + struct termios* ttyp; +#ifdef TIOCGWINSZ + struct winsize win; + struct winsize* winp; +#endif +#if !_lib_openpty + char* sname; +#endif +#ifdef SIGTTOU + sigset_t blckttou, oldset; + (void)sigemptyset(&blckttou); + (void)sigaddset(&blckttou, SIGTTOU); + sigprocmask(SIG_BLOCK, &blckttou, &oldset); +#endif + alarm(6); + if (tcgetattr(sffileno(sfstderr), &tty) < 0) + { + if (errno != ENOTTY) + error(-1, "unable to get standard error terminal attributes"); +#if _lib_cfmakeraw + cfmakeraw(&tty); +#else + tty.c_iflag |= IGNPAR; + tty.c_iflag &= ~(ISTRIP | INLCR | IGNCR | ICRNL | IXON | IXANY | IXOFF); + tty.c_oflag &= ~OPOST; + tty.c_lflag &= ~(ISIG | ICANON | ECHO | ECHOE | ECHOK | ECHONL); +#endif /* _lib_cfmakeraw */ + ttyp = 0; + } + tty.c_lflag |= ICANON | IEXTEN | ISIG | ECHO | ECHOE | ECHOK; +#ifdef ECHOKE + tty.c_lflag |= ECHOKE; +#endif + tty.c_oflag |= (ONLCR | OPOST); +#ifdef OCRNL + tty.c_oflag &= ~OCRNL; +#endif +#ifdef ONLRET + tty.c_oflag &= ~ONLRET; +#endif + tty.c_iflag |= BRKINT; + tty.c_iflag &= ~IGNBRK; + tty.c_cc[VTIME] = 0; + tty.c_cc[VMIN] = CMIN; +#ifdef B115200 + cfsetispeed(&tty, B115200); + cfsetospeed(&tty, B115200); +#elif defined(B57600) + cfsetispeed(&tty, B57600); + cfsetospeed(&tty, B57600); +#elif defined(B38400) + cfsetispeed(&tty, B38400); + cfsetospeed(&tty, B38400); +#endif + ttyp = &tty; +#ifdef TIOCGWINSZ + if (ioctl(sffileno(sfstderr), TIOCGWINSZ, &win) < 0) + { + if (errno != ENOTTY) + error(-1, "unable to get standard error window size"); + win.ws_row = 0; + win.ws_col = 0; + winp = 0; + } + if (win.ws_row < 24) + win.ws_row = 24; + if (win.ws_col < 80) + win.ws_col = 80; + winp = &win; +#endif +#ifdef __linux__ +# if !_lib_openpty +# undef _lib_openpty +# define _lib_openpty 1 +# endif +#endif +#if _lib_openpty + if (openpty(master, minion, NULL, ttyp, winp) < 0) + return -1; +#else +#if _lib_grantpt && _lib_unlockpt +#if !_lib_posix_openpt +#ifndef _pty_clone +#define _pty_clone "/dev/ptmx" +#endif +#define posix_openpt(m) open(_pty_clone,m) +#endif + if ((*master = posix_openpt(O_RDWR)) < 0) + return -1; + if (grantpt(*master) || unlockpt(*master) || !(sname = ptsname(*master)) || (*minion = open(sname, O_RDWR|O_cloexec)) < 0) + { + close(*master); + return -1; + } +#else + if (!(sname = ptymopen(master)) || (*minion = open(sname, O_RDWR|O_cloexec)) < 0) + return -1; +#endif +#ifdef I_PUSH + struct termios tst; + if (tcgetattr(*minion, &tst) < 0 && (ioctl(*minion, I_PUSH, "ptem") < 0 || ioctl(*minion, I_PUSH, "ldterm") < 0)) + { + close(*minion); + close(*master); + return -1; + } +#endif +#endif + if (ttyp && tcsetattr(*minion, TCSANOW, ttyp) < 0) + error(ERROR_warn(0), "unable to set pty terminal attributes"); +#ifdef TIOCSWINSZ + if (winp && ioctl(*minion, TIOCSWINSZ, winp) < 0) + error(ERROR_warn(0), "unable to set pty window size"); +#endif + fcntl(*master, F_SETFD, FD_CLOEXEC); +#if !O_cloexec + fcntl(*minion, F_SETFD, FD_CLOEXEC); +#endif +#ifdef SIGTTOU + sigprocmask(SIG_SETMASK, &oldset, NULL); +#endif + alarm(0); + return 0; +} + +static Proc_t* +runcmd(char** argv, int minion, int session) +{ + long ops[4]; + + if (session) + { + ops[0] = PROC_FD_CTTY(minion); + ops[1] = 0; + } + else + { + ops[0] = PROC_FD_DUP(minion, 0, PROC_FD_CHILD); + ops[1] = PROC_FD_DUP(minion, 1, PROC_FD_CHILD); + ops[2] = PROC_FD_DUP(minion, 2, PROC_FD_CHILD); + ops[3] = 0; + } + return procopen(argv[0], argv, NiL, ops, 0); +} + +/* + * default master dance + */ + +static int +process(Sfio_t* mp, Sfio_t* lp, int delay, int timeout) +{ + int i; + int n; + int t; + ssize_t r; + char* s; + Sfio_t* ip; + Sfio_t* sps[2]; + struct stat dst; + struct stat fst; + + ip = sfstdin; + if (!fstat(sffileno(ip), &dst) && !stat("/dev/null", &fst) && dst.st_dev == fst.st_dev && dst.st_ino == fst.st_ino) + ip = 0; + do + { + i = 0; + t = timeout; + if (mp) + sps[i++] = mp; + if (ip) + { + sps[i++] = ip; + t = -1; + } + if (!i) + break; + if ((n = sfpoll(sps, i, t)) <= 0) + { + if (n < 0) + error(ERROR_SYSTEM|2, "poll failed"); + break; + } + for (i = t = 0; i < n; i++) + { + if (!(sfvalue(sps[i]) & SF_READ)) + /*skip*/; + else if (sps[i] == mp) + { + t++; + if (!(s = (char*)sfreserve(mp, SF_UNBOUND, -1))) + { + sfclose(mp); + mp = 0; + } + else if ((r = sfvalue(mp)) > 0 && (sfwrite(sfstdout, s, r) != r || sfsync(sfstdout))) + { + error(ERROR_SYSTEM|2, "output write failed"); + goto done; + } + } + else + { + t++; + if (!(s = sfgetr(ip, '\n', 1))) + ip = 0; + else if (sfputr(mp, s, '\r') < 0 || sfsync(mp)) + { + error(ERROR_SYSTEM|2, "write failed"); + goto done; + } + } + } + } while (t); + done: + if (mp) + sfclose(mp); + return error_info.errors != 0; +} + +/* + * return 1 is extended re pattern matches text + */ + +static int +match(char* pattern, char* text, int must) +{ + regex_t* re; + int code; + char buf[64]; + + if (!pattern[0]) + return 1; + if (pattern[0] == '?' && pattern[1] && !pattern[2]) + { + switch (pattern[1]) + { + case '0': + case '1': + if (text) + error(2, "got \"%s\"", fmtesq(text, "\"")); + else + error(2, "got EOF"); + return pattern[1] == '1'; + case '.': + if (!text) + return 1; + if (must) + error(2, "expected EOF, got \"%s\"", fmtesq(text, "\"")); + return 0; + } + } + if (!text) + { + if (must) + error(2, "expected \"%s\", got EOF", pattern); + return 0; + } + if (!(re = regcache(pattern, REG_EXTENDED, &code))) + { + regerror(code, re, buf, sizeof(buf)); + error(2, "%s: %s", pattern, buf); + return 0; + } + if (regexec(re, text, 0, NiL, 0)) + { + if (must) + error(2, "expected \"%s\", got \"%s\"", pattern, fmtesq(text, "\"")); + return 0; + } + return 1; +} + +typedef struct Master_s +{ + Vmalloc_t* vm; /* allocation region */ + char* ignore; /* ignore master lines matching this re */ + char* peek; /* peek buffer pointer */ + char* cur; /* current line */ + char* nxt; /* next line */ + char* end; /* end of lines */ + char* max; /* end of buf */ + char* buf; /* current buffer */ + char* prompt; /* peek prompt */ + int cursor; /* cursor in buf, 0 if fresh line */ + int line; /* prompt line number */ + int restore; /* previous line save char */ +} Master_t; + +/* + * read one line from the master + */ + +#define MASTER_EOF (-1) +#define MASTER_TIMEOUT (-2) + +static char* +masterline(Sfio_t* mp, Sfio_t* lp, char* prompt, int must, int timeout, Master_t* bp) +{ + char* r; + char* s; + char* t; + ssize_t n; + ssize_t a; + size_t promptlen = 0; + ptrdiff_t d; + char promptbuf[64]; + + if (prompt) + promptlen = sfsprintf(promptbuf, sizeof(promptbuf), prompt, ++bp->line); + again: + if (prompt) + { + if (bp->cur < bp->end && bp->restore >= 0) + *bp->cur = bp->restore; + if (strneq(bp->cur, promptbuf, promptlen)) + r = bp->cur; + else + r = 0; + if (bp->cur < bp->end && bp->restore >= 0) + *bp->cur = 0; + if (r) + { + error(-1, "p \"%s\"", fmtnesq(promptbuf, "\"", promptlen)); + return r; + } + if (r = bp->nxt) + { + if (strneq(r, promptbuf, promptlen)) + { + error(-1, "p \"%s\"", fmtnesq(promptbuf, "\"", promptlen)); + return r; + } + while (r = memchr(r, '\n', bp->end - r)) + { + if (strneq(r, promptbuf, promptlen)) + { + error(-1, "p \"%s\"", fmtnesq(promptbuf, "\"", promptlen)); + return r; + } + r++; + } + } + *bp->cur = 0; + } + else if (bp->nxt) + { + if (bp->restore >= 0) + *bp->cur = bp->restore; + r = bp->cur; + bp->restore = *bp->nxt; + *bp->nxt = 0; + if (bp->nxt >= bp->end) + { + bp->cur = bp->end = bp->buf; + bp->nxt = 0; + } + else + { + bp->cur = bp->nxt; + if (bp->nxt = memchr(bp->nxt + 1, '\n', bp->end - bp->nxt - 1)) + bp->nxt++; + } + goto done; + } + if ((n = sfpoll(&mp, 1, timeout)) <= 0 || !((int)sfvalue(mp) & SF_READ)) + { + if (n < 0) + { + if (must) + error(ERROR_SYSTEM|2, "poll failed"); + else + error(-1, "r poll failed"); + } + else if (bp->cur < bp->end) + { + if (bp->restore >= 0) + { + *bp->cur = bp->restore; + bp->restore = -1; + } + r = bp->cur; + *bp->end = 0; + bp->nxt = 0; + if (prompt && strneq(r, promptbuf, promptlen)) + { + error(-1, "p \"%s\"", fmtnesq(promptbuf, "\"", promptlen)); + return r; + } + bp->cur = bp->end = bp->buf; + goto done; + } + else if (must >= 0) + error(2, "read timeout"); + else + { + errno = 0; + error(-1, "r EOF"); + } + return 0; + } + if (!(s = sfreserve(mp, SF_UNBOUND, -1))) + { + if (!prompt) + { + if (bp->cur < bp->end) + { + if (bp->restore >= 0) + { + *bp->cur = bp->restore; + bp->restore = -1; + } + r = bp->cur; + *bp->end = 0; + bp->cur = bp->end = bp->buf; + bp->nxt = 0; + goto done; + } + else + { + errno = 0; + error(-1, "r EOF"); + } + } + return 0; + } + n = sfvalue(mp); + error(-2, "b \"%s\"", fmtnesq(s, "\"", n)); + if ((bp->max - bp->end) < n) + { + a = roundof(bp->max - bp->buf + n, SF_BUFSIZE); + r = bp->buf; + if (!(bp->buf = vmnewof(bp->vm, bp->buf, char, a, 0))) + outofmemory(); + bp->max = bp->buf + a; + if (bp->buf != r) + { + d = bp->buf - r; + bp->cur += d; + bp->end += d; + } + } + memcpy(bp->end, s, n); + bp->end += n; + if ((r = bp->cur) > bp->buf && bp->restore >= 0) + *r = bp->restore; + if (bp->cur = memchr(bp->cur, '\n', bp->end - bp->cur)) + { + bp->restore = *++bp->cur; + *bp->cur = 0; + if (bp->cur >= bp->end) + { + bp->cur = bp->end = bp->buf; + bp->nxt = 0; + } + else if (bp->nxt = memchr(bp->cur + 1, '\n', bp->end - bp->cur - 1)) + bp->nxt++; + if (prompt) + goto again; + } + else + { + bp->restore = -1; + bp->cur = r; + bp->nxt = 0; + must = 0; + goto again; + } + done: + error(-3, "Q \"%s\"", fmtesq(r, "\"")); + s = r; + if (bp->cursor) + { + r -= bp->cursor; + bp->cursor = 0; + } + for (t = 0, n = 0; *s; s++) + if (*s == '\n') + { + if (t) + { + *t++ = '\n'; + *t = 0; + t = 0; + n = 0; + } + } + else if (*s == '\r' && *(s + 1) != '\n') + { + if (t = strchr(s + 1, '\r')) + n += t - s; + else + n += strlen(s); + t = r; + } + else if (*s == '\a') + { + if (!t) + t = s; + *t = ' '; + n++; + } + else if (*s == '\b') + { + if (!t) + t = s; + if (t > r) + t--; + else + n++; + } + else if (t) + *t++ = *s; + if (t) + error(-3, "R \"%s\"", fmtesq(r, "\"")); + if (n) + *(r + strlen(r) - n) = 0; + error(-1, "r \"%s\"", fmtesq(r, "\"")); + if (lp) + sfputr(lp, fmtesq(r, "\""), '\n'); + if (t) + bp->cursor = t - r; + if (bp->ignore && match(bp->ignore, r, 0)) + goto again; + return r; +} + +/* + * execute dialogue script on stdin + */ + +#define NESTING 64 + +#define ELSE 0x01 +#define IF 0x02 +#define KEPT 0x04 +#define SKIP 0x08 + +struct Cond_s; +typedef struct Cond_s Cond_t; + +struct Cond_s +{ + Cond_t* next; + Cond_t* prev; + char* text; + int flags; +}; + +static int +dialogue(Sfio_t* mp, Sfio_t* lp, int delay, int timeout) +{ + int op; + int line; + int n; + char* s; + char* m; + char* e; + char* id; + Vmalloc_t* vm; + Cond_t* cond; + Master_t* master; + + int status = 0; + + if (!(vm = vmopen(Vmdcheap, Vmbest, 0)) || + !(cond = vmnewof(vm, 0, Cond_t, 1, 0)) || + !(master = vmnewof(vm, 0, Master_t, 1, 0)) || + !(master->buf = vmnewof(vm, 0, char, 2 * SF_BUFSIZE, 0))) + outofmemory(); + master->vm = vm; + master->cur = master->end = master->buf; + master->max = master->buf + 2 * SF_BUFSIZE - 1; + master->restore = -1; + errno = 0; + id = error_info.id; + error_info.id = 0; + line = error_info.line; + error_info.line = 0; + while (s = sfgetr(sfstdin, '\n', 1)) + { + error_info.line++; + while (isspace(*s)) + s++; + if ((op = *s++) && isspace(*s)) + s++; + switch (op) + { + case 0: + case '#': + break; + case 'c': + case 'w': + if (cond->flags & SKIP) + continue; + if (master->prompt && !masterline(mp, lp, master->prompt, 0, timeout, master)) + goto done; + if (delay) + usleep((unsigned long)delay * 1000); + if (op == 'w') + error(-1, "w \"%s\\r\"", s); + else + error(-1, "w \"%s\"", s); + if ((n = stresc(s)) >= 0) + s[n] = 0; + if (sfputr(mp, s, op == 'w' ? '\n' : -1) < 0 || sfsync(mp)) + { + error(ERROR_SYSTEM|2, "write failed"); + goto done; + } + if (delay) + usleep((unsigned long)delay * 1000); + break; + case 'd': + delay = (int)strtol(s, &e, 0); + if (*e) + error(2, "%s: invalid delay -- milliseconds expected", s); + break; + case 'i': + if (!cond->next && !(cond->next = vmnewof(vm, 0, Cond_t, 1, 0))) + outofmemory(); + cond = cond->next; + cond->flags = IF; + if ((cond->prev->flags & SKIP) && !(cond->text = 0) || !(cond->text = masterline(mp, lp, 0, 0, timeout, master))) + cond->flags |= KEPT|SKIP; + else if (match(s, cond->text, 0)) + cond->flags |= KEPT; + else + cond->flags |= SKIP; + break; + case 'e': + if (!(cond->flags & IF)) + { + error(2, "no matching i for e"); + goto done; + } + if (!*s) + { + if (cond->flags & ELSE) + { + error(2, "i block already has a default e"); + goto done; + } + cond->flags |= ELSE; + if (cond->flags & KEPT) + cond->flags |= SKIP; + else + { + cond->flags |= KEPT; + cond->flags &= ~SKIP; + } + } + else if ((cond->flags & KEPT) || !match(s, cond->text, 0)) + cond->flags |= SKIP; + else + cond->flags |= KEPT; + break; + case 'f': + if (!(cond->flags & IF)) + { + error(2, "no matching i for f"); + goto done; + } + cond = cond->prev; + break; + case 'm': + if (cond->flags & SKIP) + continue; + if (sfputr(sfstderr, s, '\n') < 0 || sfsync(sfstderr)) + { + error(ERROR_SYSTEM|2, "standard error write failed"); + goto done; + } + break; + case 'p': + if (cond->flags & SKIP) + continue; + if (!(m = masterline(mp, lp, s, 1, timeout, master))) + goto done; + break; + case 'r': + if (cond->flags & SKIP) + continue; + if (!(m = masterline(mp, lp, 0, s[0] == '?' && s[1] == '.' ? -1 : 1, timeout, master))) + goto done; + match(s, m, 1); + break; + case 's': + n = (int)strtol(s, &e, 0); + if (*e) + error(2, "%s: invalid delay -- milliseconds expected", s); + if (n) + usleep((unsigned long)n * 1000); + break; + case 't': + timeout = (int)strtol(s, &e, 0); + if (*e) + error(2, "%s: invalid timeout -- milliseconds expected", s); + break; + case 'u': + if (cond->flags & SKIP) + continue; + do + { + if (!(m = masterline(mp, lp, 0, -1, timeout, master))) + { + match(s, m, 1); + goto done; + } + } while (!match(s, m, 0)); + break; + case 'v': + error_info.trace = -(int)strtol(s, &e, 0); + if (*e) + error(2, "%s: invalid verbose level -- number expected", s); + break; + case 'x': + status = (int)strtol(s, &e, 0); + if (*e) + error(2, "%s: invalid exit code", s); + break; + case 'I': + if (master->ignore) + { + vmfree(vm, master->ignore); + master->ignore = 0; + } + if (*s && !(master->ignore = vmstrdup(vm, s))) + { + error(ERROR_SYSTEM|2, "out of memory"); + goto done; + } + break; + case 'L': + if (error_info.id) + { + vmfree(vm, error_info.id); + error_info.id = 0; + } + if (*s && !(error_info.id = vmstrdup(vm, s))) + { + error(ERROR_SYSTEM|2, "out of memory"); + goto done; + } + break; + case 'P': + if (master->prompt) + { + vmfree(vm, master->prompt); + master->prompt = 0; + } + if (*s && !(master->prompt = vmstrdup(vm, s))) + { + error(ERROR_SYSTEM|2, "out of memory"); + goto done; + } + break; + default: + if (cond->flags & SKIP) + continue; + error(2, "'%c': unknown op", op); + goto done; + } + } + if (cond->prev) + error(2, "missing 1 or more f statements"); + done: + if (mp) + sfclose(mp); + error_info.id = id; + error_info.line = line; + if (vm) + vmclose(vm); + return status ? status : error_info.errors != 0; +} + +typedef struct Argv_s +{ + char** argv; + char* args; + int argc; +} Argv_t; + +int +b_pty(int argc, char** argv, Shbltin_t* context) +{ + int master; + int minion; + int fd; + int drop; + int n; + char* s; + Proc_t* proc; + Sfio_t* mp; + Sfio_t* lp; + Argv_t* ap; + char buf[64]; + + int delay = 0; + char* log = 0; + char* messages = 0; + char* stty = 0; + int session = 1; + int timeout = 1000; + int (*fun)(Sfio_t*,Sfio_t*,int,int) = process; + + cmdinit(argc, argv, context, ERROR_CATALOG, 0); + for (;;) + { + switch (optget(argv, usage)) + { + case 'd': + if (opt_info.num) + fun = dialogue; + continue; + case 'D': + error_info.trace = -(int)opt_info.num; + continue; + case 'l': + log = opt_info.arg; + /* FALLTHROUGH */ + case 'm': + messages = opt_info.arg; + continue; + case 's': + session = !!opt_info.num; + continue; + case 't': + timeout = (int)opt_info.num; + continue; + case 'T': + stty = opt_info.arg; + continue; + case 'w': + delay = (int)opt_info.num; + continue; + case ':': + break; + case '?': + error(ERROR_usage(2), "%s", opt_info.arg); + UNREACHABLE(); + } + break; + } + argv += opt_info.index; + if (!argv[0]) + { + error(ERROR_exit(1), "command must be specified"); + UNREACHABLE(); + } + if (mkpty(&master, &minion) < 0) + { + error(ERROR_system(1), "unable to create pty"); + UNREACHABLE(); + } + if (!(mp = sfnew(NiL, 0, SF_UNBOUND, master, SF_READ|SF_WRITE))) + { + error(ERROR_system(1), "cannot open master stream"); + UNREACHABLE(); + } + if (stty) + { + n = 2; + for (s = stty; *s; s++) + if (isspace(*s)) + n++; + if (!(ap = newof(0, Argv_t, 1, (n + 2) * sizeof(char*) + (s - stty + 1)))) + outofmemory(); + ap->argc = n + 1; + ap->argv = (char**)(ap + 1); + ap->args = (char*)(ap->argv + n + 2); + strcpy(ap->args, stty); + ap->argv[0] = "stty"; + sfsprintf(ap->argv[1] = buf, sizeof(buf), "--fd=%d", minion); + ap->argv[2] = s = ap->args; + for (n = 2; *s; s++) + if (isspace(*s)) + { + *s = 0; + ap->argv[++n] = s + 1; + } + ap->argv[n + 1] = 0; + b_stty(ap->argc, ap->argv, 0); + } + if (!log) + lp = 0; + else if (!(lp = sfopen(NiL, log, "w"))) + { + error(ERROR_system(1), "%s: cannot write", log); + UNREACHABLE(); + } + if (!(proc = runcmd(argv, minion, session))) + { + error(ERROR_system(1), "unable run %s", argv[0]); + UNREACHABLE(); + } + close(minion); + if (messages) + { + drop = 1; + if (strneq(messages, "/dev/fd/", 8)) + fd = atoi(messages + 8); + else if (streq(messages, "/dev/stdout")) + fd = 1; + else if ((fd = open(messages, O_CREAT|O_WRONLY, MODE_666)) >= 0) + drop = 0; + else + { + error(ERROR_system(1), "%s: cannot redirect messages", messages); + UNREACHABLE(); + } + close(2); + dup(fd); + if (drop) + close(fd); + } + minion = (*fun)(mp, lp, delay, timeout); + master = procclose(proc); + if (lp && sfclose(lp)) + { + error(ERROR_system(1), "%s: write error", log); + UNREACHABLE(); + } + return minion ? minion : master; +} diff --git a/src/cmd/ksh93/COMPATIBILITY b/src/cmd/ksh93/COMPATIBILITY new file mode 100644 index 000000000..ff7751df3 --- /dev/null +++ b/src/cmd/ksh93/COMPATIBILITY @@ -0,0 +1,320 @@ + ksh 93u+m/1.0.0 vs. ksh 93u+ + +The following is a list of changes between ksh 93u+ 2012-08-01 and the new +ksh 93u+m reboot that could cause incompatibilities in rare corner cases. +Fixes of clear bugs in ksh 93u+ are not included here, even though any bugfix +could potentially cause an incompatibility in a script that relies on the bug. +For more details, see the NEWS file and for complete details, see the git log. + +0. A new '-o posix' shell option has been added to ksh 93u+m that makes + the ksh language more compatible with other shells by following the + POSIX standard more closely. See the manual page for details. It is + enabled by default if ksh is invoked as sh. + +1. Bytecode compiled by shcomp 93u+m will not run on older ksh versions. + (However, bytecode compiled by older shcomp will run on ksh 93u+m.) + +2. Pathname expansion (a.k.a. filename generation, a.k.a. globbing) now + never matches the special navigational names '.' (current directory) + and '..' (parent directory). This change makes a pattern like .* + useful; it now matches all hidden 'dotfiles' in the current directory. + +3. The bash-style &>foo redirection operator (shorthand for >foo 2>&1) can + now always be used if -o posix is off, and not only in profile scripts. + +4. Redirections that store a file descriptor > 9 in a variable, such as + {var}>file, now continue to work if brace expansion is turned off. + +5. Most predefined aliases have been converted to regular built-in + commands that work the same way. 'unalias' no longer removes these. + To remove a built-in command, use 'builtin -d'. The 'history' and 'r' + predefined aliases remain, but are now only set on interactive shells. + There are some minor changes in behavior in some former aliases: + - 'redirect' now checks if all arguments are valid redirections + before performing them. If an error occurs, it issues an error + message instead of terminating the shell. + - 'suspend' now refuses to suspend a login shell, as there is probably + no parent shell to return to and the login session would freeze. + If you really want to suspend a login shell, use 'kill -s STOP $$'. + - 'times' now gives high precision output in a POSIX compliant format. + +6. 'command' and 'nohup' no longer expand aliases in their first argument, + as this is no longer required after the foregoing change. In the + unlikely event that you still need this behavior, you can set: + alias command='command ' + alias nohup='nohup ' + +7. The 'login' and 'newgrp' special built-in commands have been removed, + so it is no longer an error to define shell functions by these names. + These built-ins replaced your shell session with the external commands + by the same name, as in 'exec'. If an error occurred (e.g. due to a + typo), you would end up immediately logged out, except on a few + commercial Unix systems whose 'login' and 'newgrp' cope with this + by starting a new shell session upon error. If you do want the old + behavior, you can restore it by setting: + alias login='exec login' + alias newgrp='exec newgrp' + +8. 'case' no longer retries to match patterns as literal strings if they + fail to match as patterns. This undocumented behaviour broke validation + use cases that are expected to work. For example: + n='[0-9]' + case $n in + [0-9]) echo "$n is a digit" ;; + esac + would output "[0-9] is a digit". In the unlikely event that a script + does rely on this behavior, it can be fixed like this: + case $n in + [0-9] | "[0-9]") + echo "$n is a digit or the digit pattern" ;; + esac + +9. If 'set -u'/'set -o nounset' is active, then the shell now errors out + if a nonexistent positional parameter such as $1, $2, ... is accessed. + (This does *not* apply to "$@" and "$*".) + +10. If 'set -u'/'set -o nounset' is active, then the shell now errors out + if $! is accessed before the shell has launched any background process. + +11. The 'print', 'printf' and 'echo' built-in commands now return a nonzero + exit status if an input/output error occurs. + +12. Four obsolete date format specifiers for 'printf %(format)T' were + changed to make them compatible with modern date(1) commands: + - %k and %l now return a blank-padded hour (24-hour and 12-hour clock). + - %f now returns a date with the format '%Y.%m.%d-%H:%M:%S'. + - %q now returns the quarter of the current year. + +13. The 'typeset' built-in now properly detects and reports options that + cannot be used together if they are given as part of the same command. + +14. The DEBUG trap has reverted to pre-93t behavior. It is now once again + reset like other traps upon entering a subshell or ksh-style function, + as documented, and it is no longer prone to crash or get corrupted. + +15. 'command -x' now always runs an external command, bypassing built-ins. + +16. Unbalanced quotes and backticks now correctly produce a syntax error + in -c scripts, 'eval', and backtick-style command substitutions. + +17. -G/--globstar: Symbolic links to directories are now followed if they + match a normal (non-**) glob pattern. For example, if '/lnk' is a + symlink to a directory, '/lnk/**' and '/l?k/**' now work as expected. + +18. The variable name search expansions ${!prefix@} and ${!prefix*} now + also include the variable 'prefix' itself in the possible results. + +19. [[ -v var ]] is now properly equivalent to [[ -n ${var+set} ]]. + Undocumented special-casing for numeric types has been removed. + For example, the following no longer produces an unexpected error: + $ ksh -o nounset -c 'float n; [[ -v n ]] && echo $n' + +20. If the HOME variable is unset, the bare tilde ~ now expands to the + current user's system home directory instead of merely the username. + +21. On Windows/Cygwin, globbing is no longer case-insensitive by default. + Turning on the new --globcasedetect shell option restores + case-insensitive globbing for case-insensitive file systems. + +22. If $PWD or $OLDPWD are passed as invocation-local assignments to cd, + their values are no longer altered in the outer scope when cd finishes. + For example: + ksh -c 'OLDPWD=/bin; OLDPWD=/tmp cd - > /dev/null; echo $OLDPWD' + ksh -c 'cd /var; PWD=/tmp cd /usr; echo $PWD' + now prints '/bin' followed by '/var'. + +23. Path-bound built-ins (such as /opt/ast/bin/cat) can now be executed + by invoking the canonical path, so the following will now work: + $ /opt/ast/bin/cat --version + version cat (AT&T Research) 2012-05-31 + $ (PATH=/opt/ast/bin:$PATH; "$(whence -p cat)" --version) + version cat (AT&T Research) 2012-05-31 + In the event an external command by that path exists, the path-bound + built-in will now override it when invoked using the canonical path. + To invoke a possible external command at that path, you can still use + a non-canonical path, e.g.: /opt//ast/bin/cat or /opt/ast/./bin/cat + +24. The readonly attribute of ksh variables is no longer imported from + or exported to other ksh shell instances through the environment. + +25. Subshells (even if non-forked) now keep a properly separated state + of the pseudorandom generator used for $RANDOM, so that using + $RANDOM in a non-forked subshell no longer influences a reproducible + $RANDOM sequence in the parent environment. In addition, upon + invoking a subshell, $RANDOM is now reseeded (as mksh and bash do). + +26. The built-in arithmetic function int() has changed to round towards + zero instead of negative infinity. Previously, int() was an alias to + floor(), but now it behaves like trunc(). + +27. The '!' logical negation operator in the '[[' compound command now + correctly negates another '!', e.g., [[ ! ! 1 -eq 1 ]] now returns + 0/true. Note that this has always been the case for 'test'/'['. + +28. By default, arithmetic expressions in ksh no longer interpret a number + with a leading zero as octal in any context. Use 8#octalnumber instead. + Before, ksh would arbitrarily recognize the leading octal zero in some + contexts but not others. One of several examples is: + x=010; echo "$((x)), $(($x))" + would output '10, 8'. This now outputs '10, 10'. Arithmetic + expressions now also behave identically within and outside ((...)) + and $((...)). Setting the --posix compliance option turns on the + recognition of the leading octal zero for all arithmetic contexts. + +29. It is now an error for arithmetic expressions to assign an out-of-range + index value to a variable of an enumeration type created with 'enum'. + +30. For the 'return' built-in command, you can now freely specify any + return value that fits in a signed integer, typically a 32-bit value. + Note that $? is truncated to 8 bits when the current (sub)shell exits. + +31. The 'enum' and 'typeset -T' commands are no longer allowed to + override and replace special built-in commands, except for type + definition commands previously created by these commands. + +32. The .sh.level variable is now read-only except inside a DEBUG trap. + The current level/scope is now restored when the DEBUG trap run ends. + +____________________________________________________________________________ + + KSH-93 VS. KSH-88 + +(Written by David Korn for ksh 93u+ 2012-08-01) + +The following is a list of known incompatibilities between ksh-93 and ksh-88. +I have not included cases that are clearly bugs in ksh-88. I also have +omitted features that are completely upward compatible. + +1. Functions, defined with name() with ksh-93 are compatible with + the POSIX standard, not with ksh-88. No local variables are + permitted, and there is no separate scope. Functions defined + with the function name syntax have local variables as in ksh-88, + but are statically scoped as in C so that a function does not + automatically have access to local variables of the caller. + This change also affects function traces. + +2. ! is now a reserved word. As a result, any command by that + name will no longer work with ksh-93. + +3. The -x attribute of alias and typeset -f is no longer + effective and the ENV file is only read for interactive + shells. You need to use FPATH to make function definitions + visible to scripts. + +4. A built-in command named command has been added which is + always found before the PATH search. Any script which uses + this name as the name of a command (or function) will not + be compatible. + +5. The output format for some built-ins has changed. In particular + the output format for set, typeset and alias now have single + quotes around values that have special characters. The output + for trap without arguments has a format that can be used as input. + +6. With ksh-88, a dollar sign ($') followed by a single quote was + interpreted literally. Now it is an ANSI C string. You + must quote the dollar sign to get the previous behavior. + Also, a $ in front of a " indicates that the string needs + to be translated for locales other than C or POSIX. The $ + is ignored in the C and POSIX locale. + +7. With ksh-88, tilde expansion did not take place inside ${...}. + with ksh-93, ${foo-~} will cause tilde expansion if foo is + not set. You need to escape the ~ for the previous behavior. + +8. Some changes in the tokenizing rules were made that might + cause some scripts with previously ambiguous use of quoting + to produce syntax errors. + +9. Programs that rely on specific exit values for the shell, + (rather than 0 or non-zero) may not be compatible. The + exit status for many shell failures has been changed. + +10. Built-ins in ksh-88 were always executed before looking for + the command in the PATH variable. This is no longer true. + Thus, with ksh-93, if you have the current directory first + in your PATH, and you have a program named test in your + directory, it will be executed when you type test; the + built-in version will be run at the point /bin is found + in your PATH. + +11. Some undocumented combinations of argument passing to ksh + builtins no longer works since ksh-93 is getopts conforming + with respect to its built-ins. For example, typeset -8i + previously would work as a synonym for typeset -i8. + +12. Command substitution and arithmetic expansion are now performed + on PS1, PS3, and ENV when they are expanded. Thus, ` and $( + as part of the value of these variables must be preceded by a \ + to preserve their previous behavior. + +13. The ERRNO variable has been dropped. + +14. If the file name following a redirection symbol contain pattern + characters they will only be expanded for interactive shells. + +15. The arguments to a dot script will be restored when it completes. + +16. The list of tracked aliases is not displayed with alias unless + the -t option is specified. + +17. The POSIX standard requires that test "$arg" have exit status + of 0, if and only if $arg is null. However, since this breaks + programs that use test -t, ksh-93 treats an explicit test -t + as if the user had entered test -t 1. + +18. The ^T directive of emacs mode has been changed to work the + way it does in gnu-emacs. + +19. ksh-88 allowed unbalanced parentheses within ${name op val} whereas + ksh-93 does not. Thus, ${foo-(} needs to be written as ${foo-\(} + which works with both versions. + [2021 UPDATE: This is now once again allowed in ksh 93u+m. Note that + balanced parentheses ${foo-()} were also broken and are now fixed.] + +20. kill -l in ksh-93 lists only the signal names, not their numerical + values. + +21. Local variables defined by typeset are statically scoped in + ksh-93. In ksh-88 they were dynamically scoped although this + behavior was never documented. + +22. The value of the variable given to getopts is set to ? when + the end-of-options is reached to conform to the POSIX standard. + +23. Since the POSIX standard requires that octal constants be + recognized, doing arithmetic on typeset -Z variables can + yield different results that with ksh-88. Most of these + differences were eliminated in ksh-93o. Starting in ksh-93u+, the + let command no longer recognizes octal constants starting with 0 + for compatibility with ksh-88 unless the option letoctal is on. + +24. Starting after ksh-93l, If you run ksh name, where name does + not contain a /, the current directory will be searched + before doing a path search on name as required by the POSIX + shell standard. + +25. In ksh-93, cd - will output the directory that it changes + to on standard output as required by X/Open. With ksh-88, + this only happened for interactive shells. + +26. As an undocumented feature of ksh-88, a leading 0 to an + assignment of an integer variable caused that variable + to be treated as unsigned. This behavior was removed + starting in ksh-93p. + +27. The getopts builtin in ksh-93 requires that optstring contain + a leading + to allow options to begin with a +. + +28. In emacs/gmacs mode, control-v will not display the version when + the stty lnext character is set to control-v or is unset. + The sequence escape control-v will display the shell version. + +29. In ksh-88, DEBUG traps were executed after each command. In ksh-93 + DEBUG traps are executed before each command. + +30. In ksh-88, a redirection to a file name given by an empty string was + ignored. In ksh-93, this is an error. + +I am interested in expanding this list so please let me know if you +uncover any others. diff --git a/src/cmd/ksh93/DESIGN b/src/cmd/ksh93/DESIGN new file mode 100644 index 000000000..21c6b01a5 --- /dev/null +++ b/src/cmd/ksh93/DESIGN @@ -0,0 +1,168 @@ +Here is an overview of the source code organization for ksh93. + +Directory layout: + + The directory include contains header files for ksh93. + The files nval.h and shell.h are intended to be public + headers and can be used to add runtime builtin command. + The remainder are private. + + The directory data contains readonly data files for ksh93. + The man pages for built-ins are in builtins.c rather + than included as statics with the implementations in the + bltins directory because some systems don't make static const + data readonly and we want these to be shared by all running + shells. + + The directory edit contains the code for command line + editing and history. + + The fun directory contains some shell function such as + pushd, popd, and dirs. + + The directory features contains files that are used to generate + header files in the FEATURE directory. Most of these files + are in a format that is processed by iffe. + + The directory bltins contains code for most of the built-in + commands. Additional built-in commands are part of libcmd. + + The directory sh contains most of the code for ksh93. + + The directory tests contains a number of regression tests. + In most cases, when a bug gets fixed, a test is added to + one of these files. The regression tests can be run by + going to this directory and running + SHELL=shell_path shell_path shtests + where shell_path is an absolute pathname for the shell to + be tested. + + The top level directory contains the nmake Makefile, the + RELEASE file, the ksh93 man file (sh.1) and nval.3 and shell.3 + documentation files. The RELEASE file contains the list of bug + fixes and new features since the original ksh93 release. The file + COMPATIBILITY is a list of all known incompatibilities with ksh88. + +Include directory: + 1. argnod.h contains the type definitions for command + nodes, io nodes, argument nodes, and for positional + parameters. It defines the prototypes for + all the positional parameters functions. + 2. builtins.h contains prototypes for builtins as well + as symbolic constants that refer to the name-pairs + that are associated with some of the built-ins. + It also contains prototypes for many of the strings. + 3. defs.h is the catch all for all definitions that + don't fit elsewhere and it includes several other + headers. It defines a structure that contains ksh + global data, sh, and a structure that contains per + function data, sh.st. + 4. edit.h contains definitions that are common to both + vi and emacs edit modes. + 5. fault.h contains prototypes for signal related + functions and trap and fault handling. + 6. fcin.h contains macro and function definitions for + reading from a file or string. + 7. history.h contains macros and functions definitions + related to history file processing. + 8. jobs.h contains the definitions relating to job + processing and control. + 9. lexstates.h contains the states associated with + lexical processing. + 10. name.h contains the internal definitions related + to name-value pair processing. + 11. national.h contains a few I18N definitions, mostly + obsolete. + 12. nval.h is the public interface to the name-value + pair library that is documented with nval.3. + 13. path.h contains the interface for pathname processing + and pathname searching. + 14. shell.h is the public interface for shell functions + that are documented int shell.3. + 15. shlex.h contains the lexical token definitions and + interfaces for lexical analysis. + 16. shnodes.h contains the definition of the structures + for each of the parse nodes and flags for the attributes. + 17. shtable.h contains some interfaces and functions for + table lookup. + 18. streval.h contains the interface to the arithmetic + functions. + 19. terminal.h is a header file that includes the appropriate + terminal include. + 20. test.h contains the definitions for the test and [[ ... ]] + commands. + 21. timeout.h contains the define constant for the maximum + shell timeout. + 22. ulimit.h includes the appropriate resource header. + 23. variables.h contains symbolic constants for the built-in + shell variables. + 24. version.h contains the version string for this release. + +sh directory: + 1. args.c contains functions for parsing shell options + and for processing positional parameters. + 2. arith.c contains callback functions for the streval.c + library and the interface to shell arithmetic. + 3. array.c contains the code for indexed and associative + arrays. + 4. defs.c contains the data definitions for global symbols. + 5. (removed) + 6. expand.c contains code for file name expansion and + pathname expansion. + 7. fault.c contains code for signal processing, trap + handling and termination. + 8. fcin.c contains code for reading and writing a character + at a time from a file or string. + 9. init.c contains initialization code and callbacks + for get and set functions for built-in variables. + 10. io.o contains code for redirections and managing file + descriptors and file streams. + 11. jobs.c contains the code for job management. + 12. lex.c contains the code for the lexical analyzer. + 13. macro.c contains code for the $ macro expansions, including + here-documents. + 14. main.c contains the calls to initialization, profile + processing and the main evaluation loop as well as + mail processing. + 15. name.c contains the name-value pair routines that are + built on the hash library in libast. + 16. nvdisc.c contains code related to name-value pair disciplines. + 17. nvtree.c contains code for compound variables and for + walking the namespace. + 18. nvtype.c contains most of the code related to types that + are created with typeset -T. + 19. parse.c contains the code for the shell parser. + 20. path.c contains the code for pathname lookup and + some path functions. It also contains the code + that executes commands and scripts. + 21. pmain.c is just a calls sh_main() so that all of the + rest of the shell can be in a shared library. + 22. shcomp.c contains the main program to the shell + compiler. This program parses a script and creates + a file that the shell can read containing the parse tree. + 23. streval.c is an C arithmetic evaluator. + 24. string.c contains some string related functions. + 25. subshell.c contains the code to save and restore + environments so that subshells can run without creating + a new process. + 26. suid_exec.c contains the program from running execute + only and/or setuid/setgid scripts. + 27. tdump.c contains the code to dump a parse tree into + a file. + 28. timers.c contains code for multiple event timeouts. + 29. trestore contains the code for restoring the parse + tree from the file created by tdump. + 30. waitevent.c contains the sh_waitnotify function so + that builtins can handle processing events when the + shell is waiting for input or for process completion. + 31. xec.c is the main shell execution loop. + +edit directory: + 1. completion.c contains code for command and file generation and + completion. + 2. edit.c contains common editing and terminal code for vi and + emacs. + 3. emacs.c contains code for the emacs editor. + 4. hexpand.c contains code for C-shell style history expansions. + 5. history.c contains code for creating managing the history file. + 6. vi.c contains the code for the vi editor. diff --git a/src/cmd/ksh93/Mamfile b/src/cmd/ksh93/Mamfile new file mode 100644 index 000000000..8dc45e956 --- /dev/null +++ b/src/cmd/ksh93/Mamfile @@ -0,0 +1,1483 @@ +note * +note * This build file is in the Make Abstract Machine (MAM) language. It was +note * first generated by nmake, but in the ksh 93u+m distribution we maintain +note * it manually because nmake had too many problems to keep using. The +note * Mamfiles are processed by mamake (src/cmd/INIT/mamake.c); we added +note * indentation to improve readability. The language is documented in +note * src/cmd/INIT/README-mamake.md. +note * +setv INSTALLROOT ../../.. +setv PACKAGE_ast_INCLUDE ${INSTALLROOT}/include/ast +setv PACKAGEROOT ../../../../.. +setv AR ${mam_cc_AR} ${mam_cc_AR_ARFLAGS} +setv CC cc +setv mam_cc_FLAGS +setv CCFLAGS ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${mam_cc_OPTIMIZE}?} +setv CCLDFLAGS ${-strip-symbols?1?${mam_cc_LD_STRIP}??} +setv COTEMP $$ +setv IFFEFLAGS +setv LDFLAGS +setv SH_DICT \"libshell\" +make install + make ksh + make shopt.h implicit + make SHOPT.sh implicit + done SHOPT.sh generated + note * the SHOPT.sh file calls the SHOPT function once for each option + exec - SHOPT() + exec - { + exec - case $1 in + exec - 'MULTIBYTE=') + exec - echo + exec - echo '#if !defined(SHOPT_MULTIBYTE) && !AST_NOMULTIBYTE' + exec - echo '#define SHOPT_MULTIBYTE 1' + exec - echo '#endif' + exec - ;; + exec - *=?*) echo + exec - echo "#ifndef SHOPT_${1%%=*}" + exec - echo "#define SHOPT_${1%%=*} ${1#*=}" + exec - echo "#endif" + exec - ;; + exec - esac + exec - } + exec - echo "/* Generated from ksh93/SHOPT.sh by ksh93/Mamfile */" > shopt.h + exec - . "$PACKAGEROOT/src/cmd/ksh93/SHOPT.sh" >> shopt.h + done shopt.h generated + make pmain.o + make sh/pmain.c + make FEATURE/externs implicit + make features/externs + done features/externs + exec - set - + exec - echo 'int main(){return 0;}' > 1.${COTEMP}.c + exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -c 1.${COTEMP}.c && + exec - x=`${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l'*' 2>&1 | sed -e 's/[][()+@?]/#/g' || :` && + exec - { + exec - case "" in + exec - *?) echo " " ;; + exec - esac + exec - for i in shell dll cmd ast m jobs i socket nsl secdb + exec - do case $i in + exec - "shell"|shell) + exec - ;; + exec - *) if test -f ${INSTALLROOT}/lib/lib/$i + exec - then y=`cat ${INSTALLROOT}/lib/lib/$i` + exec - case $y in + exec - *-?*) echo "" $y ;; + exec - esac + exec - continue + exec - elif test ! -f ${INSTALLROOT}/lib/lib$i.a + exec - then case `{ ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -L${INSTALLROOT}/lib ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l$i 2>&1 || echo '' "$x" ;} | sed -e 's/[][()+@?]/#/g' || :` in + exec - *$x*) case `{ ${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} -o 1.${COTEMP}.x 1.${COTEMP}.o -l$i 2>&1 || echo '' "$x" ;} | sed -e 's/[][()+@?]/#/g' || :` in + exec - *$x*) continue ;; + exec - esac + exec - ;; + exec - esac + exec - fi + exec - ;; + exec - esac + exec - echo " -l$i" + exec - done + exec - } > shell.req + exec - rm -f 1.${COTEMP}.* + bind -ldll + bind -lcmd + bind -last + bind -lm dontcare + bind -lnsl dontcare + exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/externs + done FEATURE/externs generated + make include/shell.h implicit + make include/fault.h implicit + make FEATURE/sigfeatures implicit + make features/sigfeatures + done features/sigfeatures + exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/sigfeatures + done FEATURE/sigfeatures dontcare generated + make FEATURE/setjmp implicit + make features/setjmp + done features/setjmp + exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/setjmp + done FEATURE/setjmp dontcare generated + prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit + prev ${PACKAGE_ast_INCLUDE}/error.h implicit + make ${PACKAGE_ast_INCLUDE}/sig.h implicit + done ${PACKAGE_ast_INCLUDE}/sig.h dontcare + done include/fault.h dontcare + make ${PACKAGE_ast_INCLUDE}/stk.h implicit + make ${PACKAGE_ast_INCLUDE}/sfio.h implicit + make ${PACKAGE_ast_INCLUDE}/sfio_s.h implicit + done ${PACKAGE_ast_INCLUDE}/sfio_s.h dontcare + make ${PACKAGE_ast_INCLUDE}/ast_common.h implicit + make ${PACKAGE_ast_INCLUDE}/ast_map.h implicit + done ${PACKAGE_ast_INCLUDE}/ast_map.h dontcare + make ${PACKAGE_ast_INCLUDE}/endian.h implicit + make ${PACKAGE_ast_INCLUDE}/bytesex.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit + done ${PACKAGE_ast_INCLUDE}/bytesex.h dontcare + done ${PACKAGE_ast_INCLUDE}/endian.h dontcare + done ${PACKAGE_ast_INCLUDE}/ast_common.h dontcare + make ${PACKAGE_ast_INCLUDE}/ast_std.h implicit + make ${PACKAGE_ast_INCLUDE}/regex.h implicit + make ${PACKAGE_ast_INCLUDE}/ast_api.h implicit + done ${PACKAGE_ast_INCLUDE}/ast_api.h dontcare + make ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit + make ${PACKAGE_ast_INCLUDE}/wctype.h implicit + make ${PACKAGE_ast_INCLUDE}/ast_wctype.h implicit + prev ${PACKAGE_ast_INCLUDE}/endian.h implicit + make ${PACKAGE_ast_INCLUDE}/wchar.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit + done ${PACKAGE_ast_INCLUDE}/wchar.h dontcare + done ${PACKAGE_ast_INCLUDE}/ast_wctype.h dontcare + done ${PACKAGE_ast_INCLUDE}/wctype.h dontcare + make ${PACKAGE_ast_INCLUDE}/stdio.h implicit + make ${PACKAGE_ast_INCLUDE}/ast_stdio.h implicit + prev ${PACKAGE_ast_INCLUDE}/sfio_s.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit + done ${PACKAGE_ast_INCLUDE}/ast_stdio.h dontcare + done ${PACKAGE_ast_INCLUDE}/stdio.h dontcare + prev ${PACKAGE_ast_INCLUDE}/stdio.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit + done ${PACKAGE_ast_INCLUDE}/ast_wchar.h dontcare + prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit + done ${PACKAGE_ast_INCLUDE}/regex.h dontcare + make ${PACKAGE_ast_INCLUDE}/getopt.h implicit + make ${PACKAGE_ast_INCLUDE}/ast_getopt.h implicit + done ${PACKAGE_ast_INCLUDE}/ast_getopt.h dontcare + done ${PACKAGE_ast_INCLUDE}/getopt.h dontcare + prev ${PACKAGE_ast_INCLUDE}/ast_map.h implicit + make ${PACKAGE_ast_INCLUDE}/ast_botch.h implicit + done ${PACKAGE_ast_INCLUDE}/ast_botch.h dontcare + make ${PACKAGE_ast_INCLUDE}/ast_limits.h implicit + done ${PACKAGE_ast_INCLUDE}/ast_limits.h dontcare + make ${PACKAGE_ast_INCLUDE}/ast_fcntl.h implicit + make ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit + done ${PACKAGE_ast_INCLUDE}/ast_fs.h dontcare + done ${PACKAGE_ast_INCLUDE}/ast_fcntl.h dontcare + prev ${PACKAGE_ast_INCLUDE}/ast_getopt.h implicit + make ${PACKAGE_ast_INCLUDE}/ast_sys.h implicit + prev ${PACKAGE_ast_INCLUDE}/getopt.h implicit + prev ${PACKAGE_ast_INCLUDE}/endian.h implicit + prev ${PACKAGE_ast_INCLUDE}/endian.h implicit + done ${PACKAGE_ast_INCLUDE}/ast_sys.h dontcare + make ${PACKAGE_ast_INCLUDE}/ast_lib.h implicit + done ${PACKAGE_ast_INCLUDE}/ast_lib.h dontcare + prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit + done ${PACKAGE_ast_INCLUDE}/ast_std.h dontcare + done ${PACKAGE_ast_INCLUDE}/sfio.h dontcare + done ${PACKAGE_ast_INCLUDE}/stk.h dontcare + make include/history.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + done include/history.h dontcare + make ${PACKAGE_ast_INCLUDE}/cmd.h implicit + make ${PACKAGE_ast_INCLUDE}/dlldefs.h implicit + done ${PACKAGE_ast_INCLUDE}/dlldefs.h dontcare + make ${PACKAGE_ast_INCLUDE}/cmdext.h implicit + make ${PACKAGE_ast_INCLUDE}/shcmd.h implicit + done ${PACKAGE_ast_INCLUDE}/shcmd.h dontcare + done ${PACKAGE_ast_INCLUDE}/cmdext.h dontcare + prev ${PACKAGE_ast_INCLUDE}/shcmd.h implicit + make ${PACKAGE_ast_INCLUDE}/stak.h implicit + prev ${PACKAGE_ast_INCLUDE}/stk.h implicit + done ${PACKAGE_ast_INCLUDE}/stak.h dontcare + make ${PACKAGE_ast_INCLUDE}/error.h implicit + make ${PACKAGE_ast_INCLUDE}/option.h implicit + make ${PACKAGE_ast_INCLUDE}/ast.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast_api.h implicit + make ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit + done ${PACKAGE_ast_INCLUDE}/vmalloc.h dontcare + prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit + done ${PACKAGE_ast_INCLUDE}/ast.h dontcare + done ${PACKAGE_ast_INCLUDE}/option.h dontcare + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + done ${PACKAGE_ast_INCLUDE}/error.h dontcare + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + done ${PACKAGE_ast_INCLUDE}/cmd.h dontcare + prev ${PACKAGE_ast_INCLUDE}/shcmd.h implicit + make include/nval.h implicit + prev ${PACKAGE_ast_INCLUDE}/option.h implicit + make ${PACKAGE_ast_INCLUDE}/cdt.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit + done ${PACKAGE_ast_INCLUDE}/cdt.h dontcare + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + done include/nval.h dontcare + make include/name.h implicit + prev include/nval.h implicit + prev ${PACKAGE_ast_INCLUDE}/cdt.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + done include/name.h dontcare + prev ${PACKAGE_ast_INCLUDE}/cdt.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + done include/shell.h + prev shopt.h implicit + done sh/pmain.c + prev sh/pmain.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + make cd_pwd.o + make bltins/cd_pwd.c + make include/test.h implicit + prev include/shtable.h implicit + make include/defs.h implicit + make include/regress.h implicit + done include/regress.h dontcare + prev include/shtable.h implicit + prev include/shell.h implicit + prev ${PACKAGE_ast_INCLUDE}/endian.h implicit + prev include/name.h implicit + make include/argnod.h implicit + prev ${PACKAGE_ast_INCLUDE}/stak.h implicit + done include/argnod.h dontcare + prev ${PACKAGE_ast_INCLUDE}/cdt.h implicit + prev FEATURE/options implicit + prev ${PACKAGE_ast_INCLUDE}/error.h implicit + prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + done include/defs.h + prev FEATURE/options implicit + done include/test.h + make ${PACKAGE_ast_INCLUDE}/ls.h implicit + make ${PACKAGE_ast_INCLUDE}/ast_mode.h implicit + done ${PACKAGE_ast_INCLUDE}/ast_mode.h dontcare + prev ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit + done ${PACKAGE_ast_INCLUDE}/ls.h + make include/builtins.h implicit + make include/shtable.h implicit + done include/shtable.h dontcare + make FEATURE/dynamic implicit + make features/dynamic + done features/dynamic + exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/dynamic + prev ${PACKAGE_ast_INCLUDE}/dlldefs.h implicit + done FEATURE/dynamic dontcare generated + make FEATURE/options implicit + make features/options + done features/options + exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/options + done FEATURE/options dontcare generated + prev ${PACKAGE_ast_INCLUDE}/option.h implicit + done include/builtins.h + prev include/name.h implicit + make include/path.h implicit + make FEATURE/acct implicit + exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : def acct + done FEATURE/acct dontcare generated + prev include/defs.h implicit + prev include/nval.h implicit + prev FEATURE/options implicit + done include/path.h + make include/variables.h implicit + prev FEATURE/dynamic implicit + prev FEATURE/options implicit + prev ${PACKAGE_ast_INCLUDE}/option.h implicit + prev include/nval.h implicit + done include/variables.h + prev ${PACKAGE_ast_INCLUDE}/error.h implicit + prev ${PACKAGE_ast_INCLUDE}/stak.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done bltins/cd_pwd.c + prev bltins/cd_pwd.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev include/builtins.h implicit + make include/shnodes.h implicit + prev include/argnod.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + done include/shnodes.h + prev ${PACKAGE_ast_INCLUDE}/error.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done bltins/cflow.c + prev bltins/cflow.c + exec - ${CC} ${mam_cc_FLAGS} ${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 enum.o + make bltins/enum.c + prev include/defs.h implicit + prev shopt.h implicit + done bltins/enum.c + prev bltins/enum.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + done enum.o generated + make getopts.o + make bltins/getopts.c + prev include/builtins.h implicit + prev include/nval.h implicit + prev ${PACKAGE_ast_INCLUDE}/error.h implicit + prev include/variables.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done bltins/getopts.c + prev bltins/getopts.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + make include/edit.h implicit + make include/national.h implicit + done include/national.h dontcare + make include/terminal.h implicit + make FEATURE/ttys implicit + make features/ttys + done features/ttys + exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/ttys + done FEATURE/ttys dontcare generated + done include/terminal.h dontcare + prev FEATURE/setjmp implicit + prev ${PACKAGE_ast_INCLUDE}/sig.h implicit + make FEATURE/locale implicit + make features/locale + done features/locale + exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/locale + done FEATURE/locale dontcare generated + prev FEATURE/options implicit + done include/edit.h dontcare + prev include/builtins.h implicit + prev include/history.h implicit + prev include/name.h implicit + make include/io.h implicit + prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + done include/io.h + prev include/variables.h implicit + prev ${PACKAGE_ast_INCLUDE}/error.h implicit + prev ${PACKAGE_ast_INCLUDE}/ls.h implicit + prev ${PACKAGE_ast_INCLUDE}/stak.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done bltins/hist.c + prev bltins/hist.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev ${PACKAGE_ast_INCLUDE}/times.h implicit + make FEATURE/time implicit + make features/time + done features/time + exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/time + make ${PACKAGE_ast_INCLUDE}/times.h implicit + make ${PACKAGE_ast_INCLUDE}/ast_time.h implicit + done ${PACKAGE_ast_INCLUDE}/ast_time.h dontcare + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + done ${PACKAGE_ast_INCLUDE}/times.h dontcare + done FEATURE/time generated + prev FEATURE/locale implicit + make include/jobs.h implicit + prev ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit + prev include/terminal.h implicit + make ${PACKAGE_ast_INCLUDE}/aso.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit + done ${PACKAGE_ast_INCLUDE}/aso.h implicit + prev FEATURE/options implicit + prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + done include/jobs.h + prev include/builtins.h implicit + prev include/history.h implicit + prev include/name.h implicit + prev include/io.h implicit + prev include/path.h implicit + prev include/shnodes.h implicit + prev include/variables.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done bltins/misc.c + prev bltins/misc.c + exec - ${CC} ${mam_cc_FLAGS} ${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 mkservice.o + make bltins/mkservice.c + prev ${PACKAGE_ast_INCLUDE}/cmd.h implicit + prev ${PACKAGE_ast_INCLUDE}/error.h implicit + prev include/nval.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done bltins/mkservice.c + prev bltins/mkservice.c + exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSH_DICT=${SH_DICT} -D_PACKAGE_ast -D_API_ast=20100309 -DERROR_CONTEXT_T=Error_context_t -c bltins/mkservice.c + done mkservice.o generated + make print.o + make bltins/print.c + make ${PACKAGE_ast_INCLUDE}/ccode.h implicit + make ${PACKAGE_ast_INCLUDE}/ast_ccode.h implicit + done ${PACKAGE_ast_INCLUDE}/ast_ccode.h dontcare + prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit + done ${PACKAGE_ast_INCLUDE}/ccode.h + make ${PACKAGE_ast_INCLUDE}/tmx.h implicit + make ${PACKAGE_ast_INCLUDE}/tv.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + done ${PACKAGE_ast_INCLUDE}/tv.h dontcare + make ${PACKAGE_ast_INCLUDE}/tm.h implicit + prev ${PACKAGE_ast_INCLUDE}/times.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + done ${PACKAGE_ast_INCLUDE}/tm.h dontcare + done ${PACKAGE_ast_INCLUDE}/tmx.h + make include/streval.h implicit + make ${PACKAGE_ast_INCLUDE}/ast_float.h implicit + prev ${PACKAGE_ast_INCLUDE}/endian.h implicit + prev ${PACKAGE_ast_INCLUDE}/endian.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit + done ${PACKAGE_ast_INCLUDE}/ast_float.h dontcare + prev include/defs.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + done include/streval.h + prev include/builtins.h implicit + prev include/history.h implicit + prev include/name.h implicit + prev include/io.h implicit + prev ${PACKAGE_ast_INCLUDE}/stak.h implicit + prev ${PACKAGE_ast_INCLUDE}/error.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done bltins/print.c + prev bltins/print.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev include/edit.h implicit + prev include/terminal.h implicit + prev include/history.h implicit + prev include/builtins.h implicit + prev include/name.h implicit + prev include/io.h implicit + make include/lexstates.h implicit + prev ${PACKAGE_ast_INCLUDE}/wctype.h implicit + prev ${PACKAGE_ast_INCLUDE}/wchar.h implicit + prev FEATURE/locale implicit + done include/lexstates.h + prev include/variables.h implicit + prev include/defs.h implicit + prev ${PACKAGE_ast_INCLUDE}/error.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + prev shopt.h implicit + done bltins/read.c + prev bltins/read.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + make FEATURE/poll implicit + make features/poll + done features/poll + exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/poll + done FEATURE/poll generated + prev FEATURE/time implicit + prev include/builtins.h implicit + prev ${PACKAGE_ast_INCLUDE}/tmx.h implicit + prev ${PACKAGE_ast_INCLUDE}/error.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done bltins/sleep.c + prev bltins/sleep.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev include/builtins.h implicit + prev include/jobs.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done bltins/trap.c + prev bltins/trap.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev ${PACKAGE_ast_INCLUDE}/tmx.h implicit + prev FEATURE/poll implicit + prev FEATURE/externs implicit + prev include/builtins.h implicit + prev include/test.h implicit + prev include/terminal.h implicit + prev include/io.h implicit + prev ${PACKAGE_ast_INCLUDE}/regex.h implicit + prev ${PACKAGE_ast_INCLUDE}/ls.h implicit + prev ${PACKAGE_ast_INCLUDE}/error.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done bltins/test.c + prev bltins/test.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev FEATURE/dynamic implicit + prev include/variables.h implicit + prev include/builtins.h implicit + prev include/history.h implicit + prev include/name.h implicit + prev include/path.h implicit + prev ${PACKAGE_ast_INCLUDE}/error.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done bltins/typeset.c + prev bltins/typeset.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + make include/ulimit.h implicit + make FEATURE/rlimits implicit + make features/rlimits + done features/rlimits + exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/rlimits + done FEATURE/rlimits dontcare generated + prev FEATURE/time implicit + done include/ulimit.h + prev include/name.h implicit + prev include/builtins.h implicit + prev include/defs.h implicit + prev ${PACKAGE_ast_INCLUDE}/error.h implicit + prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + prev shopt.h implicit + done bltins/ulimit.c + prev bltins/ulimit.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev include/builtins.h implicit + prev include/shell.h implicit + prev ${PACKAGE_ast_INCLUDE}/ls.h implicit + prev ${PACKAGE_ast_INCLUDE}/error.h implicit + prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + prev shopt.h implicit + done bltins/umask.c + prev bltins/umask.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev include/builtins.h implicit + make include/shlex.h implicit + prev include/lexstates.h implicit + prev include/shtable.h implicit + prev include/shnodes.h implicit + prev FEATURE/options implicit + prev ${PACKAGE_ast_INCLUDE}/cdt.h implicit + done include/shlex.h + prev include/path.h implicit + prev include/name.h implicit + prev include/shtable.h implicit + prev ${PACKAGE_ast_INCLUDE}/error.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done bltins/whence.c + prev bltins/whence.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + make execargs.h implicit + done execargs.h dontcare virtual + make nc.h implicit + done nc.h dontcare virtual + prev FEATURE/externs implicit + make FEATURE/execargs implicit + exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : def execargs + done FEATURE/execargs generated + make FEATURE/pstat implicit + exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : def pstat + done FEATURE/pstat generated + make FEATURE/setproctitle implicit + exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : def setproctitle + done FEATURE/setproctitle generated + prev FEATURE/time implicit + make include/timeout.h implicit + done include/timeout.h + prev include/history.h implicit + prev include/shnodes.h implicit + prev include/shlex.h implicit + prev include/jobs.h implicit + prev include/io.h implicit + prev include/path.h implicit + prev include/variables.h implicit + prev include/defs.h implicit + make include/fcin.h implicit + prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit + done include/fcin.h + prev ${PACKAGE_ast_INCLUDE}/ls.h implicit + prev ${PACKAGE_ast_INCLUDE}/stak.h implicit + prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + prev shopt.h implicit + done sh/main.c + prev sh/main.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev include/shlex.h implicit + prev include/io.h implicit + prev include/path.h implicit + prev include/builtins.h implicit + prev include/variables.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done sh/nvdisc.c + prev sh/nvdisc.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev include/variables.h implicit + prev include/io.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done sh/nvtype.c + prev sh/nvtype.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev include/builtins.h implicit + prev include/variables.h implicit + prev include/streval.h implicit + prev include/name.h implicit + prev include/lexstates.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done sh/arith.c + prev sh/arith.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev include/io.h implicit + prev include/shlex.h implicit + prev FEATURE/poll implicit + prev include/edit.h implicit + prev include/terminal.h implicit + prev include/builtins.h implicit + prev include/jobs.h implicit + prev include/path.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done sh/args.c + prev sh/args.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev include/name.h implicit + prev ${PACKAGE_ast_INCLUDE}/stak.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done sh/array.c + prev sh/array.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev include/history.h implicit + prev include/edit.h implicit + prev include/io.h implicit + prev include/path.h implicit + prev include/lexstates.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done edit/completion.c + prev edit/completion.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev include/timeout.h implicit + prev include/edit.h implicit + prev include/shlex.h implicit + prev include/jobs.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done sh/defs.c + prev sh/defs.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev include/shlex.h implicit + prev include/edit.h implicit + prev include/history.h implicit + prev include/terminal.h implicit + prev include/io.h implicit + prev include/variables.h implicit + prev include/defs.h implicit + prev ${PACKAGE_ast_INCLUDE}/ls.h implicit + make FEATURE/cmds implicit + make features/cmds + done features/cmds + exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/cmds + done FEATURE/cmds generated + prev FEATURE/time implicit + prev FEATURE/options implicit + prev include/fault.h implicit + prev ${PACKAGE_ast_INCLUDE}/ccode.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + prev shopt.h implicit + done edit/edit.c + prev edit/edit.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev include/path.h implicit + prev include/io.h implicit + make ${PACKAGE_ast_INCLUDE}/ast_dir.h implicit + make ${PACKAGE_ast_INCLUDE}/dirent.h implicit + make ${PACKAGE_ast_INCLUDE}/ast_dirent.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit + done ${PACKAGE_ast_INCLUDE}/ast_dirent.h dontcare + done ${PACKAGE_ast_INCLUDE}/dirent.h dontcare + make dirlib.h implicit + done dirlib.h dontcare virtual + prev ${PACKAGE_ast_INCLUDE}/ast_lib.h implicit + done ${PACKAGE_ast_INCLUDE}/ast_dir.h + prev ${PACKAGE_ast_INCLUDE}/stak.h implicit + prev ${PACKAGE_ast_INCLUDE}/ls.h implicit + make ${PACKAGE_ast_INCLUDE}/glob.h implicit + done ${PACKAGE_ast_INCLUDE}/glob.h + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + prev include/test.h implicit + prev include/variables.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done sh/expand.c + prev sh/expand.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev ${PACKAGE_ast_INCLUDE}/tmx.h implicit + prev include/builtins.h implicit + prev include/io.h implicit + prev ${PACKAGE_ast_INCLUDE}/ls.h implicit + prev ${PACKAGE_ast_INCLUDE}/error.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done bltins/regress.c + prev bltins/regress.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit + prev include/ulimit.h implicit + prev include/builtins.h implicit + prev include/path.h implicit + prev include/jobs.h implicit + prev include/variables.h implicit + prev include/shlex.h implicit + prev include/history.h implicit + prev include/io.h implicit + prev include/fcin.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done sh/fault.c + prev sh/fault.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev include/fcin.h implicit + prev ${PACKAGE_ast_INCLUDE}/error.h implicit + prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + prev shopt.h implicit + done sh/fcin.c + prev sh/fcin.c + exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/fcin.c + done fcin.o generated + make history.o + make edit/history.c + prev ${PACKAGE_ast_INCLUDE}/stdio.h implicit + prev include/history.h implicit + prev include/io.h implicit + prev include/builtins.h implicit + prev include/path.h implicit + prev include/variables.h implicit + prev include/defs.h implicit + prev ${PACKAGE_ast_INCLUDE}/ls.h implicit + prev ${PACKAGE_ast_INCLUDE}/error.h implicit + prev FEATURE/time implicit + prev ${PACKAGE_ast_INCLUDE}/sfio.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + prev shopt.h implicit + done edit/history.c + prev edit/history.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev ${PACKAGE_ast_INCLUDE}/wctype.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit + make include/version.h implicit + make ${PACKAGE_ast_INCLUDE}/releaseflags.h implicit + done ${PACKAGE_ast_INCLUDE}/releaseflags.h + done include/version.h + prev include/lexstates.h implicit + prev FEATURE/externs implicit + prev FEATURE/dynamic implicit + prev FEATURE/time implicit + prev include/builtins.h implicit + prev include/shlex.h implicit + prev include/io.h implicit + prev include/jobs.h implicit + prev include/edit.h implicit + prev include/name.h implicit + prev include/fault.h implicit + prev include/path.h implicit + prev include/variables.h implicit + prev ${PACKAGE_ast_INCLUDE}/regex.h implicit + prev ${PACKAGE_ast_INCLUDE}/tmx.h implicit + prev ${PACKAGE_ast_INCLUDE}/ccode.h implicit + prev ${PACKAGE_ast_INCLUDE}/stak.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done sh/init.c + prev sh/init.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev ${PACKAGE_ast_INCLUDE}/endian.h implicit + prev FEATURE/poll implicit + prev FEATURE/dynamic implicit + prev FEATURE/externs implicit + prev include/timeout.h implicit + prev include/edit.h implicit + prev include/history.h implicit + prev include/shnodes.h implicit + prev include/shlex.h implicit + prev include/jobs.h implicit + prev include/io.h implicit + prev include/path.h implicit + prev include/variables.h implicit + prev ${PACKAGE_ast_INCLUDE}/regex.h implicit + prev ${PACKAGE_ast_INCLUDE}/ls.h implicit + prev include/fcin.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done sh/io.c + prev sh/io.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev include/history.h implicit + prev include/jobs.h implicit + prev include/io.h implicit + make ${PACKAGE_ast_INCLUDE}/wait.h implicit + make ${PACKAGE_ast_INCLUDE}/ast_wait.h implicit + done ${PACKAGE_ast_INCLUDE}/ast_wait.h dontcare + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + done ${PACKAGE_ast_INCLUDE}/wait.h + prev include/defs.h implicit + prev shopt.h implicit + done sh/jobs.c + prev sh/jobs.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev include/shlex.h implicit + prev include/io.h implicit + prev include/lexstates.h implicit + prev include/test.h implicit + prev include/argnod.h implicit + prev include/shell.h implicit + prev include/defs.h implicit + prev FEATURE/options implicit + prev include/nval.h implicit + prev include/fcin.h implicit + prev ${PACKAGE_ast_INCLUDE}/stak.h implicit + prev ${PACKAGE_ast_INCLUDE}/releaseflags.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + prev shopt.h implicit + done sh/lex.c + prev sh/lex.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev include/streval.h implicit + prev include/national.h implicit + prev include/path.h implicit + prev include/shnodes.h implicit + prev include/jobs.h implicit + prev include/io.h implicit + prev include/shlex.h implicit + prev include/variables.h implicit + prev include/name.h implicit + prev ${PACKAGE_ast_INCLUDE}/regex.h implicit + prev include/fcin.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done sh/macro.c + prev sh/macro.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev include/builtins.h implicit + prev include/shnodes.h implicit + prev include/streval.h implicit + prev FEATURE/externs implicit + prev include/timeout.h implicit + prev include/lexstates.h implicit + prev include/path.h implicit + prev include/variables.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done sh/name.c + prev sh/name.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev include/lexstates.h implicit + prev include/argnod.h implicit + prev include/name.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done sh/nvtree.c + prev sh/nvtree.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev include/path.h implicit + prev include/test.h implicit + prev include/builtins.h implicit + prev include/history.h implicit + prev include/shlex.h implicit + prev ${PACKAGE_ast_INCLUDE}/error.h implicit + prev include/fcin.h implicit + prev include/shell.h implicit + prev include/defs.h implicit + prev include/version.h implicit + prev shopt.h implicit + done sh/parse.c + prev sh/parse.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev FEATURE/time implicit + prev ${PACKAGE_ast_INCLUDE}/endian.h implicit + make ${PACKAGE_ast_INCLUDE}/ast_vfork.h implicit + done ${PACKAGE_ast_INCLUDE}/ast_vfork.h dontcare + make exec_attr.h implicit + done exec_attr.h dontcare virtual + prev FEATURE/externs implicit + prev FEATURE/dynamic implicit + prev include/test.h implicit + prev include/history.h implicit + prev include/jobs.h implicit + prev include/io.h implicit + prev include/path.h implicit + prev include/variables.h implicit + prev include/nval.h implicit + prev ${PACKAGE_ast_INCLUDE}/ls.h implicit + prev include/fcin.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done sh/path.c + prev sh/path.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev ${PACKAGE_ast_INCLUDE}/wctype.h implicit + prev include/national.h implicit + prev include/lexstates.h implicit + prev include/shtable.h implicit + prev ${PACKAGE_ast_INCLUDE}/ccode.h implicit + prev ${PACKAGE_ast_INCLUDE}/stak.h implicit + prev include/defs.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast_wchar.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + prev shopt.h implicit + done sh/string.c + prev sh/string.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev FEATURE/externs implicit + prev ${PACKAGE_ast_INCLUDE}/stak.h implicit + prev ${PACKAGE_ast_INCLUDE}/error.h implicit + prev include/streval.h implicit + prev shopt.h implicit + done sh/streval.c + prev sh/streval.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev include/path.h implicit + prev include/variables.h implicit + prev include/jobs.h implicit + prev include/shlex.h implicit + prev include/shnodes.h implicit + prev include/fault.h implicit + prev include/io.h implicit + prev ${PACKAGE_ast_INCLUDE}/ls.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done sh/subshell.c + prev sh/subshell.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev ${PACKAGE_ast_INCLUDE}/ccode.h implicit + prev include/io.h implicit + prev include/path.h implicit + prev include/shnodes.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done sh/tdump.c + prev sh/tdump.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev FEATURE/time implicit + prev FEATURE/sigfeatures implicit + prev include/defs.h implicit + prev include/fault.h implicit + prev ${PACKAGE_ast_INCLUDE}/error.h implicit + prev ${PACKAGE_ast_INCLUDE}/sig.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + prev shopt.h implicit + done sh/timers.c + prev sh/timers.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev ${PACKAGE_ast_INCLUDE}/ccode.h implicit + prev include/io.h implicit + prev include/path.h implicit + prev include/shnodes.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done sh/trestore.c + prev sh/trestore.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev include/defs.h implicit + prev shopt.h implicit + done sh/waitevent.c + prev sh/waitevent.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev ${PACKAGE_ast_INCLUDE}/ast_vfork.h implicit + prev ${PACKAGE_ast_INCLUDE}/vmalloc.h implicit + prev include/streval.h implicit + prev FEATURE/locale implicit + prev FEATURE/externs implicit + prev FEATURE/time implicit + prev include/builtins.h implicit + prev include/test.h implicit + prev include/jobs.h implicit + prev include/shnodes.h implicit + prev include/io.h implicit + prev include/name.h implicit + prev include/path.h implicit + prev include/variables.h implicit + prev include/fcin.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done sh/xec.c + prev sh/xec.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev include/ulimit.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + prev shopt.h implicit + done data/limits.c + prev data/limits.c + exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -c data/limits.c + done limits.o generated + make msg.o + make data/msg.c + prev FEATURE/cmds implicit + prev include/edit.h implicit + prev include/jobs.h implicit + prev include/builtins.h implicit + prev include/history.h implicit + prev include/timeout.h implicit + prev include/shlex.h implicit + prev include/io.h implicit + prev include/path.h implicit + prev include/defs.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + prev shopt.h implicit + done data/msg.c + prev data/msg.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + make FEATURE/math implicit + make features/math.sh + make data/math.tab implicit + done data/math.tab + done features/math.sh dontcare + exec - iffe ${IFFEFLAGS} -v -c "${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS}" ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} -lm : run features/math.sh ${PACKAGEROOT}/src/cmd/ksh93/data/math.tab + make ${PACKAGE_ast_INCLUDE}/ast_standards.h implicit + done ${PACKAGE_ast_INCLUDE}/ast_standards.h dontcare + make ${INSTALLROOT}/src/lib/libast/FEATURE/float implicit + make ${INSTALLROOT}/src/lib/libast/FEATURE/standards implicit + done ${INSTALLROOT}/src/lib/libast/FEATURE/standards dontcare + prev ${PACKAGE_ast_INCLUDE}/ast_common.h implicit + done ${INSTALLROOT}/src/lib/libast/FEATURE/float dontcare + done FEATURE/math generated + prev include/streval.h implicit + prev FEATURE/options implicit + prev ${PACKAGE_ast_INCLUDE}/ast_standards.h implicit + prev shopt.h implicit + done data/strdata.c + prev data/strdata.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev include/test.h implicit + prev include/defs.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + prev shopt.h implicit + done data/testops.c + prev data/testops.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev FEATURE/options implicit + prev include/shlex.h implicit + prev include/shell.h implicit + prev shopt.h implicit + done data/keywords.c + prev data/keywords.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev include/shtable.h implicit + prev include/name.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done data/options.c + prev data/options.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev include/jobs.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done data/signals.c + prev data/signals.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev FEATURE/dynamic implicit + prev FEATURE/options implicit + prev include/defs.h implicit + prev shopt.h implicit + done data/aliases.c + prev data/aliases.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev FEATURE/poll implicit + prev FEATURE/cmds implicit + prev include/jobs.h implicit + prev include/builtins.h implicit + prev include/version.h implicit + prev include/name.h implicit + prev include/ulimit.h implicit + prev include/shtable.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done data/builtins.c + prev data/builtins.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev include/builtins.h implicit + prev include/variables.h implicit + prev include/defs.h implicit + prev include/name.h implicit + prev include/shtable.h implicit + prev include/shell.h implicit + prev FEATURE/dynamic implicit + prev FEATURE/options implicit + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + prev shopt.h implicit + done data/variables.c + prev data/variables.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev include/lexstates.h implicit + prev FEATURE/options implicit + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + prev shopt.h implicit + done data/lexstates.c + prev data/lexstates.c + exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -D_API_ast=20100309 -D_PACKAGE_ast -c data/lexstates.c + done lexstates.o generated + make emacs.o + make edit/emacs.c + prev include/terminal.h implicit + prev include/edit.h implicit + prev include/history.h implicit + prev include/io.h implicit + prev include/defs.h implicit + prev FEATURE/cmds implicit + prev ${PACKAGE_ast_INCLUDE}/releaseflags.h implicit + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + prev shopt.h implicit + done edit/emacs.c + prev edit/emacs.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev include/lexstates.h implicit + prev FEATURE/time implicit + prev include/terminal.h implicit + prev include/edit.h implicit + prev include/history.h implicit + prev include/io.h implicit + prev FEATURE/options implicit + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done edit/vi.c + prev edit/vi.c + exec - ${CC} ${mam_cc_FLAGS} ${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 + prev include/edit.h implicit + prev include/defs.h implicit + prev shopt.h implicit + done edit/hexpand.c + prev edit/hexpand.c + exec - ${CC} ${mam_cc_FLAGS} ${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 cd_pwd.o cflow.o enum.o getopts.o hist.o misc.o mkservice.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 + exec - (ranlib libshell.a) >/dev/null 2>&1 || true + done libshell.a generated + bind -lshell + prev +ljobs + prev +li + prev ${mam_libsocket} + prev ${mam_libsecdb} + exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -o ksh pmain.o ${mam_libshell} ${mam_libnsl} ${mam_libast} -lm + done ksh generated + make shcomp + make shcomp.o + make sh/shcomp.c + prev include/terminal.h implicit + prev include/shnodes.h implicit + prev include/path.h implicit + prev include/defs.h implicit + prev include/shell.h implicit + prev include/version.h implicit + prev shopt.h implicit + done sh/shcomp.c + prev sh/shcomp.c + exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DSH_DICT=${SH_DICT} -D_API_ast=20100309 -D_PACKAGE_ast -DERROR_CONTEXT_T=Error_context_t -c sh/shcomp.c + done shcomp.o generated + prev ksh + prev +ljobs + prev +li + prev ${mam_libsocket} + prev ${mam_libsecdb} + exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -o shcomp shcomp.o ${mam_libshell} ${mam_libnsl} ${mam_libast} -lm + done shcomp generated + make suid_exec + make suid_exec.o + make sh/suid_exec.c + prev include/version.h implicit + prev ${PACKAGE_ast_INCLUDE}/error.h implicit + prev ${PACKAGE_ast_INCLUDE}/sig.h implicit + prev ${PACKAGE_ast_INCLUDE}/ls.h implicit + prev FEATURE/externs implicit + prev ${PACKAGE_ast_INCLUDE}/ast.h implicit + done sh/suid_exec.c + prev sh/suid_exec.c + exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Iinclude -I${PACKAGE_ast_INCLUDE} -DERROR_CONTEXT_T=Error_context_t -D_API_ast=20100309 -D_PACKAGE_ast -c sh/suid_exec.c + done suid_exec.o generated + prev +ljobs + prev +li + prev ${mam_libsocket} + prev ${mam_libsecdb} + exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -o suid_exec suid_exec.o ${mam_libast} ${mam_libnsl} ${mam_libast} -lm + done suid_exec generated + make shell + prev libshell.a archive + done shell virtual + prev libshell.a archive + make ${INSTALLROOT}/bin + exec - if silent test ! -d ${INSTALLROOT}/bin + exec - then mkdir -p ${INSTALLROOT}/bin + exec - fi + done ${INSTALLROOT}/bin generated + make ${INSTALLROOT}/bin/ksh + prev ${INSTALLROOT}/bin + prev ksh + exec - ${STDCMP} 2>/dev/null -s ksh ${INSTALLROOT}/bin/ksh || { ${STDMV} ${INSTALLROOT}/bin/ksh ${INSTALLROOT}/bin/ksh.old 2>/dev/null || true; ${STDCP} ksh ${INSTALLROOT}/bin/ksh ;} + done ${INSTALLROOT}/bin/ksh generated + make ${INSTALLROOT}/man/man1 + exec - if silent test ! -d ${INSTALLROOT}/man/man1 + exec - then mkdir -p ${INSTALLROOT}/man/man1 + exec - fi + done ${INSTALLROOT}/man/man1 generated + make ${INSTALLROOT}/man/man1/sh.1 + prev ${INSTALLROOT}/man/man1 + make sh.1 + done sh.1 + exec - ${STDCMP} 2>/dev/null -s sh.1 ${INSTALLROOT}/man/man1/sh.1 || { ${STDMV} ${INSTALLROOT}/man/man1/sh.1 ${INSTALLROOT}/man/man1/sh.1.old 2>/dev/null || true; ${STDCP} sh.1 ${INSTALLROOT}/man/man1/sh.1 ;} + done ${INSTALLROOT}/man/man1/sh.1 generated + make ${INSTALLROOT}/lib + exec - if silent test ! -d ${INSTALLROOT}/lib + exec - then mkdir -p ${INSTALLROOT}/lib + exec - fi + done ${INSTALLROOT}/lib generated + make ${INSTALLROOT}/lib/libshell.a archive + prev ${INSTALLROOT}/lib + prev libshell.a archive + exec - ${STDCMP} 2>/dev/null -s libshell.a ${INSTALLROOT}/lib/libshell.a || { ${STDMV} ${INSTALLROOT}/lib/libshell.a ${INSTALLROOT}/lib/libshell.a.old 2>/dev/null || true; ${STDCP} libshell.a ${INSTALLROOT}/lib/libshell.a ;} + exec - (ranlib ${INSTALLROOT}/lib/libshell.a) >/dev/null 2>&1 || true + done ${INSTALLROOT}/lib/libshell.a generated + make ${INSTALLROOT}/man/man3 + exec - if silent test ! -d ${INSTALLROOT}/man/man3 + exec - then mkdir -p ${INSTALLROOT}/man/man3 + exec - fi + done ${INSTALLROOT}/man/man3 generated + make ${INSTALLROOT}/man/man3/shell.3 + prev ${INSTALLROOT}/man/man3 + make shell.3 + done shell.3 + exec - ${STDCMP} 2>/dev/null -s shell.3 ${INSTALLROOT}/man/man3/shell.3 || { ${STDMV} ${INSTALLROOT}/man/man3/shell.3 ${INSTALLROOT}/man/man3/shell.3.old 2>/dev/null || true; ${STDCP} shell.3 ${INSTALLROOT}/man/man3/shell.3 ;} + done ${INSTALLROOT}/man/man3/shell.3 generated + make ${INSTALLROOT}/man/man3/nval.3 + make nval.3 + done nval.3 + exec - ${STDCMP} 2>/dev/null -s nval.3 ${INSTALLROOT}/man/man3/nval.3 || { ${STDMV} ${INSTALLROOT}/man/man3/nval.3 ${INSTALLROOT}/man/man3/nval.3.old 2>/dev/null || true; ${STDCP} nval.3 ${INSTALLROOT}/man/man3/nval.3 ;} + done ${INSTALLROOT}/man/man3/nval.3 generated + make ${INSTALLROOT}/lib/lib + exec - if silent test ! -d ${INSTALLROOT}/lib/lib + exec - then mkdir -p ${INSTALLROOT}/lib/lib + exec - fi + done ${INSTALLROOT}/lib/lib generated + make ${INSTALLROOT}/lib/lib/shell + prev ${INSTALLROOT}/lib/lib + prev shell.req + exec - ${STDCMP} 2>/dev/null -s shell.req ${INSTALLROOT}/lib/lib/shell || { ${STDMV} ${INSTALLROOT}/lib/lib/shell ${INSTALLROOT}/lib/lib/shell.old 2>/dev/null || true; ${STDCP} shell.req ${INSTALLROOT}/lib/lib/shell ;} + done ${INSTALLROOT}/lib/lib/shell generated + make ${PACKAGE_ast_INCLUDE} + exec - if silent test ! -d ${PACKAGE_ast_INCLUDE} + exec - then mkdir -p ${PACKAGE_ast_INCLUDE} + exec - fi + done ${PACKAGE_ast_INCLUDE} generated + make ${PACKAGE_ast_INCLUDE}/nval.h + prev ${PACKAGE_ast_INCLUDE} + prev include/nval.h + exec - if ! cmp -s include/nval.h ${PACKAGE_ast_INCLUDE}/nval.h + exec - then ${STDCP} include/nval.h ${PACKAGE_ast_INCLUDE}/nval.h + exec - fi + done ${PACKAGE_ast_INCLUDE}/nval.h generated + make ${PACKAGE_ast_INCLUDE}/shell.h + prev include/shell.h + exec - if ! cmp -s include/shell.h ${PACKAGE_ast_INCLUDE}/shell.h + exec - then ${STDCP} include/shell.h ${PACKAGE_ast_INCLUDE}/shell.h + exec - fi + done ${PACKAGE_ast_INCLUDE}/shell.h generated + make ${PACKAGE_ast_INCLUDE}/history.h + prev include/history.h + exec - if ! cmp -s include/history.h ${PACKAGE_ast_INCLUDE}/history.h + exec - then ${STDCP} include/history.h ${PACKAGE_ast_INCLUDE}/history.h + exec - fi + done ${PACKAGE_ast_INCLUDE}/history.h generated + make ${INSTALLROOT}/bin/suid_exec + prev suid_exec + exec - ${STDCMP} 2>/dev/null -s suid_exec ${INSTALLROOT}/bin/suid_exec || { ${STDMV} ${INSTALLROOT}/bin/suid_exec ${INSTALLROOT}/bin/suid_exec.old 2>/dev/null || true; ${STDCP} suid_exec ${INSTALLROOT}/bin/suid_exec ;} + done ${INSTALLROOT}/bin/suid_exec generated + make ${INSTALLROOT}/bin/shcomp + prev shcomp + exec - ${STDCMP} 2>/dev/null -s shcomp ${INSTALLROOT}/bin/shcomp || { ${STDMV} ${INSTALLROOT}/bin/shcomp ${INSTALLROOT}/bin/shcomp.old 2>/dev/null || true; ${STDCP} shcomp ${INSTALLROOT}/bin/shcomp ;} + done ${INSTALLROOT}/bin/shcomp generated + make ${INSTALLROOT}/fun + exec - if silent test ! -d ${INSTALLROOT}/fun + exec - then mkdir -p ${INSTALLROOT}/fun + exec - fi + done ${INSTALLROOT}/fun generated + make ${INSTALLROOT}/fun/autocd + prev ${INSTALLROOT}/fun + make fun/autocd + done fun/autocd + exec - ${STDCMP} 2>/dev/null -s fun/autocd ${INSTALLROOT}/fun/autocd || { ${STDMV} ${INSTALLROOT}/fun/autocd ${INSTALLROOT}/fun/autocd.old 2>/dev/null || true; ${STDCP} fun/autocd ${INSTALLROOT}/fun/autocd && chmod ugo+x ${INSTALLROOT}/fun/autocd ;} + done ${INSTALLROOT}/fun/autocd generated + make ${INSTALLROOT}/fun/dirs + prev ${INSTALLROOT}/fun + make fun/dirs + done fun/dirs + exec - ${STDCMP} 2>/dev/null -s fun/dirs ${INSTALLROOT}/fun/dirs || { ${STDMV} ${INSTALLROOT}/fun/dirs ${INSTALLROOT}/fun/dirs.old 2>/dev/null || true; ${STDCP} fun/dirs ${INSTALLROOT}/fun/dirs && chmod ugo+x ${INSTALLROOT}/fun/dirs ;} + done ${INSTALLROOT}/fun/dirs generated + make ${INSTALLROOT}/fun/man + prev ${INSTALLROOT}/fun + make fun/man + done fun/man + exec - ${STDCMP} 2>/dev/null -s fun/man ${INSTALLROOT}/fun/man || { ${STDMV} ${INSTALLROOT}/fun/man ${INSTALLROOT}/fun/man.old 2>/dev/null || true; ${STDCP} fun/man ${INSTALLROOT}/fun/man && chmod ugo+x ${INSTALLROOT}/fun/man ;} + done ${INSTALLROOT}/fun/man generated + make ${INSTALLROOT}/fun/popd + make fun/popd + done fun/popd + exec - ${STDCMP} 2>/dev/null -s fun/popd ${INSTALLROOT}/fun/popd || { ${STDMV} ${INSTALLROOT}/fun/popd ${INSTALLROOT}/fun/popd.old 2>/dev/null || true; ${STDCP} fun/popd ${INSTALLROOT}/fun/popd && chmod ugo+x ${INSTALLROOT}/fun/popd ;} + done ${INSTALLROOT}/fun/popd generated + make ${INSTALLROOT}/fun/pushd + make fun/pushd + done fun/pushd + exec - ${STDCMP} 2>/dev/null -s fun/pushd ${INSTALLROOT}/fun/pushd || { ${STDMV} ${INSTALLROOT}/fun/pushd ${INSTALLROOT}/fun/pushd.old 2>/dev/null || true; ${STDCP} fun/pushd ${INSTALLROOT}/fun/pushd && chmod ugo+x ${INSTALLROOT}/fun/pushd ;} + done ${INSTALLROOT}/fun/pushd generated +done install virtual +make test + make test.ksh + make tests/shtests + done tests/shtests + exec - cd "$PACKAGEROOT/src/cmd/ksh93/tests" + exec - exec "$SHELL" shtests + done test.ksh virtual +done test dontcare virtual diff --git a/src/cmd/ksh93/OBSOLETE b/src/cmd/ksh93/OBSOLETE new file mode 100644 index 000000000..006e5de4c --- /dev/null +++ b/src/cmd/ksh93/OBSOLETE @@ -0,0 +1,152 @@ +.sp 3 +.tl ''Ksh Features That Are Obsolete in Ksh93'' +.sp 2 +.AL 1 +.LI +Using a pair of grave accents \^\fB\(ga\fR ... \fB\(ga\fR\^ +for command substitution. Use \fB$(\fR ... \fB)\fR instead. +.LI +.B FCEDIT +is an obsolete name for +the default editor name for the +.B hist +command. +.B FCEDIT +is not used when +.B HISTEDIT +is set. Use +.B HISTEDIT +instead. +.LI +The newtest (\fB[[\fR ... \fB]]\fR) operator +\fB\-a\fP \fIfile\fP +is obsolete. Use +\fB\-e\fP instead. +.LI +The newtest (\fB[[\fR ... \fB]]\fR) operator +.BR = , +as used in +\fIstring\fP \fB=\fP \fIpattern\fP +is obsolete. Use +\fB==\fP instead. +.LI +The following obsolete arithmetic comparisons are also permitted: +.in +5 +.VL 20 +.LI "\fIexp1\fP \fB\-eq\fP \fIexp2\fP" +True, if +.I exp1 +is equal to +.IR exp2 . +.LI "\fIexp1\fP \fB\-ne\fP \fIexp2\fP" +True, if +.I exp1 +is not equal to +.IR exp2 . +.LI "\fIexp1\fP \fB\-lt\fP \fIexp2\fP" +True, if +.I exp1 +is less than +.IR exp2 . +.LI "\fIexp1\fP \fB\-gt\fP \fIexp2\fP" +True, if +.I exp1 +is greater than +.IR exp2 . +.LI "\fIexp1\fP \fB\-le\fP \fIexp2\fP" +True, if +.I exp1 +is less than or equal to +.IR exp2 . +.LI "\fIexp1\fP \fB\-ge\fP \fIexp2\fP" +True, if +.I exp1 +is greater than or equal to +.IR exp2 . +.LE \" End .VL +.in -5 +.LI +Using test -t or [ -t ] without specifying the file unit number. +.LI +The +.B \-k +option to the \fBset\fR builtin is obsolete. It causes +.I all\^ +variable assignment arguments are placed in the environment, +even if they occur after the command name. +The following +first prints +.B "a=b c" +and then +.BR c : +There is no alternative. +.LI +The obsolete +.B \-xf +option of the +.B typeset +command allows a function to be exported +to scripts that are executed without a separate +invocation of the shell. +Functions that need to be defined across separate +invocations of the shell should +be placed in a directory and the +.B FPATH +variable should contains the name of this directory. +They may also +be specified in the +.B ENV +file with the +.B \-xf +option of +.BR typeset . +.LI +The shell environment variable +.B FCEDIT +is obsolete. Use +.B HISTEDIT +instead. +.LI +In the +.B \-s +option +(to \fBfc\fR or \fBhist\fR command???) +( +and in obsolete versions, the editor name +.B \- +) +is used to skip the editing phase and +to re-execute the command. +.LI +The +.B \-t +option to \fBalias\fR builtin is obsolete. It +is used to set and list tracked aliases. +There is no replacement. +.LI +The shell command line option +.B \-t +is obsolete. This option causes the shell to exit after reading +and executing one command. The is no replacement (although ending +\&"command" with the exit builtin should have the same effect). +.LI +As an obsolete feature of the "set" builtin, +if the first +.I arg\^ +is +.B \- +then the +.B \-x +and +.B \-v +options are turned off and the next +.I arg +is treated as the first argument. +Using +.B \+ +rather than +.B \- +causes these options to be turned off. +These options can also be used upon invocation of the shell. +.LE + diff --git a/src/cmd/ksh93/PROMO.mm b/src/cmd/ksh93/PROMO.mm new file mode 100644 index 000000000..f69795510 --- /dev/null +++ b/src/cmd/ksh93/PROMO.mm @@ -0,0 +1,141 @@ +.H 1 ksh93 +KSH-93 is the most recent version of the KornShell Language +described in +"The KornShell Command and Programming Language," +by Morris Bolsky and David Korn of AT&T Bell Laboratories, ISBN 0-13-182700-6. +The KornShell is a shell programming language, +which is upward compatible with "sh" (the Bourne Shell), +and is intended to conform to the IEEE P1003.2/ISO 9945.2 Shell and +Utilities standard. +KSH-93 provides an enhanced programming environment in +addition to the major command-entry features of the BSD +shell "csh". With KSH-93, medium-sized programming tasks can be +performed at shell-level without a significant loss in performance. +In addition, "sh" scripts can be run on KSH-93 without modification. +.P +The code should conform to the IEEE POSIX 1003.1 standard and to the +proposed ANSI C standard so that it should be portable to all +such systems. Like the previous version, KSH-88, +it is designed to accept eight bit character sets +transparently, thereby making it internationally compatible. +It can support multi-byte characters sets with some characteristics +of the character set given at run time. +.P +KSH-93 provides the following features, many of which were also inherent +in KSH-88: +.BL +.LI +Enhanced Command Re-entry Capability: The KSH-93 history +function records commands entered at any shell level and stores +them, up to a user-specified limit, even after you log off. +This allows you to re-enter long commands with a few keystrokes +- even those commands you entered yesterday. +The history file allows for eight bit characters in +commands and supports essentially unlimited size histories. +.LI +In-line Editing: In "sh", the only way to fix mistyped +commands is to backspace or retype the line. KSH-93 allows you +to edit a command line using a choice of EMACS-TC or "vi" +functions. +You can use the in-line editors to complete filenames as +you type them. +You may also use this editing feature when entering +command lines from your history file. +A user can capture keystrokes and rebind keys to customize the +editing interface. +.LI +Extended I/O Capabilities: KSH-93 provides several I/O +capabilities not available in "sh", including the ability to: +.BL +.LI +specify a file descriptor for input and output +.LI +start up and run co-processes +.LI +produce a prompt at the terminal before a read +.LI +easily format and interpret responses to a menu +.LI +echo lines exactly as output without escape processing +.LI +format output using printf formats. +.LI +read and echo lines ending in "\e". +.LE +.LI +Improved performance: KSH-93 executes many scripts faster +than the System V Bourne shell. A major reason for this is +that many of the standard utilities are built-in. +To reduce the time to initiate a command, KSH-93 allows +commands to be added as built-ins at run time +on systems that support dynamic loading such as System V Release 4. +.LI +Arithmetic: KSH-93 allows you to do integer arithmetic in any +base from two to sixty-four. You can also do double +precision floating point arithmetic. +Almost the complete set of C language operators are available +with the same syntax and precedence. +Arithmetic expressions can be used to as an argument expansion +or as a separate command. +In addition there is an arithmetic for command that works +like the for statement in C. +.LI +Arrays: KSH-93 supports both indexed and associative arrays. +The subscript for an indexed array is an arithmetic expression, +whereas, the subscript for an associative array is a string. +.LI +Shell Functions and Aliases: Two mechanisms - functions and +aliases - can be used to assign a user-selected identifier to +an existing command or shell script. +Functions allow local variables and provide scoping +for exception handling. +Functions can be searched for and loaded on first reference the +way scripts are. +.LI +Substring Capabilities: KSH-93 allows you to create a +substring of any given string either by specifying the starting +offset and length, or by stripping off leading +or trailing substrings during parameter expansion. +You can also specify attributes, such as upper and lower case, +field width, and justification to shell variables. +.LI +More pattern matching capabilities: KSH-93 allows you to specify +extended regular expressions for file and string matches. +.LI +KSH-93 uses a hierarchical name space for variables. +Compound variables can be defined and variables can +be passed by reference. In addition, each variable +can have one or more disciplines associated with +it to intercept assignments and references. +.LI +Improved debugging: KSH-93 can generate line numbers on execution +traces. Also, I/O redirections are now traced. +There is a DEBUG trap that gets evaluated before each command +so that errors can be localized. +.LI +Job Control: On systems that support job control, including +System V Release 4, KSH-93 +provides a job-control mechanism almost identical to that of +the BSD "csh", version 4.1. +This feature allows you +to stop and restart programs, and to move programs between the +foreground and the background. +.LI +Added security: +KSH-93 can execute scripts which do not have read permission +and scripts which have the setuid and/or setgid set when +invoked by name, rather than as an argument to the shell. +It is possible to log or control the execution of setuid and/or +setgid scripts. +The noclobber option prevents you from accidentally erasing +a file by redirecting to an existing file. +.LI +KSH-93 can be extended by adding built-in commands at run time. +In addition, KSH-93 can be used as a library that can +be embedded into an application to allow scripting. +.LE +Documentation for KSH-93 consists of an "Introduction to KSH-93", +"Compatibility with the Bourne Shell" and a manual page and a +README file. In addition, the "New KornShell Command and Programming +Language" book is available from Prentice Hall. + diff --git a/src/cmd/ksh93/README b/src/cmd/ksh93/README new file mode 100644 index 000000000..0abd35bc3 --- /dev/null +++ b/src/cmd/ksh93/README @@ -0,0 +1,318 @@ +This directory, and its subdirectories contain the source code +for ksh-93; the language described in the second edition of +the book, "The KornShell Command and Programming Language," by +Morris Bolsky and David Korn which is published by Prentice Hall. +ksh-93 has been compiled and run on several machines with several +operating systems. The end of this file contains a partial list of +operating systems and machines that ksh-93 has been known to run on. + +Most of the source code for ksh is in the src/cmd/ksh93/sh +directory. For information on what's where, see the file DESIGN. + +#### COMPILE-TIME OPTIONS #### + +The SHOPT.sh file contains several compilation options that can be set +before compiling ksh. Options are of the form SHOPT_option and become +#define inside the code. These options are set to their recommended +value and some of these may disappear as options in future releases. +A value of 0 represents off, 1 represents on, no value means probe. For +options where no feature probe is available, probe is the same as off. + +The options have the following defaults and meanings: + + ACCT off Shell accounting. + Noted by "L" in the version string when enabled. + See README-AUDIT.md. + + ACCTFILE off Enable per user accounting info. + See README-AUDIT.md. + + AUDIT on For auditing specific users. + Noted by "A" in the version string when enabled. + See README-AUDIT.md. + + AUDITFILE "/etc/ksh_audit" + See README-AUDIT.md. + + BGX on Enables background job extensions. Noted by "J" in the + version string when enabled. (1) JOBMAX=n limits the + number of concurrent background jobs to n; the (n+1)th + background job will block until a running background job + completes. (2) SIGCHLD traps are queued so that each + completing background job gets its own trap; $! is set to + the job PID and $? is set to the job exit status at the + beginning of the trap. + + BRACEPAT on Brace expansion. Expands abc{d,e}f to abcdf abcef. + This feature was inspired by the C shell. + + CMDLIB_HDR "" + The header in which you can provide a custom list of + libcmd commands to provide as path-bound built-ins. + + CMDLIB_DIR "\"/opt/ast/bin\"" + The default virtual directory prefix for path-bound + built-ins. The value must include double quotes. + + CRNL off treated as in shell grammar. + + DEVFD Use the more secure /dev/fd mechanism instead of FIFOs for + process substitutions. On by default on OSs with /dev/fd. + + DYNAMIC off Dynamic loading of builtins. Requires dlopen() interface + and dynamic libshell, libdll and libast libraries. + + ECHOPRINT off Make echo equivalent to print. + + EDPREDICT off Enables history pattern search menu. As you begin a line + with a #, the following characters are treated as a shell + pattern and cause matching lines from the history file to + be displayed as a numbered list as you type. You can + scroll up and down this list or you can use nTAB to + make this the current line (n defaults to 1 if omitted). + Experimental. Bugs: https://github.com/ksh93/ksh/issues/233 + + ESH on Compile with emacs command line editing. The original + emacs line editor code was provided by Mike Veach at IH. + + FILESCAN on Allows fast reading of files using: + while < file; do ...; done + Each line is stored in $REPLY and fields in each + line can be accessed as positional parameters. + + FIXEDARRAY on When using typeset, a name in the format NAME[N] + creates a fixed-size array and any attempt to access a + subscript N or higher is an error. Multidimensional + fixed-size arrays NAME[N1][N2]... are also supported. + + GLOBCASEDET Adds the 'globcasedetect' shell option. When this shell + option is turned on, pathname expansion (globbing) + and file name listing and completion automatically become + case-insensitive on file systems where the difference + between upper- and lowercase is ignored for file names. + This compile-time option is enabled by default on operating + systems that can support case-insensitive file systems. + + HISTEXPAND on Enable !-style history expansion similar to csh(1). + This is turned on by the -H/--histexpand shell option and + can be modified using --histreedit and --histverify. + + KIA off Allow generation of shell cross-reference database with -R. + As of 2021-05-10, no tool that can parse this database is + known. If you know of any, please contact us. + + MULTIBYTE Multibyte character handling. This is on by default unless + the flag -DAST_NOMULTIBYTE is passed to the compiler via + CCFLAGS. The UTF-8 character set is fully supported. + + NAMESPACE on Adds a 'namespace' reserved word that allows defining name + spaces. Variables and functions defined within a block like + namespace ExampleSpace { commandlist; } + all have their names automatically prefixed with + '.ExampleSpace.' when defining or using them, creating a + separate space of names unique to the block. Outside of + the namespace block, they can be accessed using + .ExampleSpace.function or ${.ExampleSpace.variable}. + Name spaces within name spaces are also supported. + + MKSERVICE off Enables the 'mkservice' builtin which creates a TCP or UDP + server that is implemented by shell functions, and the + 'eloop' builtin which causes the shell to block waiting for + events to process. Experimental and probably insecure. + + NOECHOE off Disable the '-e' option to the 'echo' command, + unless SHOPT_ECHOPRINT is enabled. + + OLDTERMIO off Use either termios or termio at runtime. + + OPTIMIZE on Optimize loop invariants for with for and while loops. + + P_SUID 0 If set, all real UIDs greater than or equal to this value + will require the -p option to run the shell setuid/setgid. + + RAWONLY on Turn on if the vi line mode doesn't work right unless + you do a set -o viraw. + + REGRESS off Enable the __regress__ built-in command and instrumented + intercepts for testing. + + REMOTE off Set --rc (read profile scripts) even if ksh was invoked + with standard input on a socket, i.e. as a remote shell. + + SPAWN on Use posix_spawn(3) as combined fork/exec if job control + is not active. Improves speed. + + STATS on Add .sh.stats compound variable. + + SUID_EXEC on Execute /etc/suid_exec for setuid, setgid script. + + SYSRC Source /etc/ksh.kshrc on initializing an interactive + shell. This is on by default if /etc/ksh.kshrc or + /etc/bash.bashrc exists at compile time. + + TEST_L Add 'test -l' as an alias for 'test -L'. This is on by + default if the OS's external 'test' command supports it. + + TIMEOUT off Set this to the number of seconds for timing out and + exiting the shell when you don't enter a command. If + non-zero, TMOUT can not be set larger than this value. + + VSH on Compile with vi command line editing. The original vi + line editor code was provided by Pat Sullivan at CB. + +#### BUILDING KSH 93U+M #### + +To build ksh (as well as libcmd and libast libraries on which ksh depends), +cd to the top directory and run: + + bin/package make + +The compiled binaries are stored in the arch directory, in a subdirectory +that corresponds to your architecture. The command 'bin/package host type' +outputs the name of this subdirectory. + +If you have trouble or want to tune the binaries, you may pass additional +compiler and linker flags. It is usually best to export these as environment +variables before running bin/package as they could change the name of the +build subdirectory of the arch directory, so exporting them is a convenient +way to keep them consistent between build and test commands. Note that this +system uses CCFLAGS instead of the usual CFLAGS. An example that makes +Solaris Studio cc produce a 64-bit binary: + + export CCFLAGS="-m64 -O" LDFLAGS="-m64" + bin/package make + +Alternatively you can append these to the command, and they will only be +used for that command. You can also specify an alternative shell in which to +run the build scripts this way. For example: + + bin/package make SHELL=/bin/bash CCFLAGS="-O2 -I/opt/local/include" \ + LDFLAGS="-L/opt/local/lib" + +Note: Do not add compiler flags that cause the compiler to emit terminal +escape codes, such as -fdiagnostics-color=always; this will cause the build +to fail as the probing code greps compiler diagnostics. + +If you are certain that you don't need support for UTF-8 and other multibyte +character locales and really want to save some memory and CPU cycles, add +'-DAST_NOMULTIBYTE' to CCFLAGS to compile out all multibyte character +handling in ksh and supporting libraries. Not recommended for most users. + +To install, use: bin/package install DESTINATION_DIRECTORY [ COMMAND ... ] + +Any command from the arch directory can be installed. If no COMMAND is +specified, ksh and shcomp are assumed. + +The DESTINATION_DIRECTORY is created if it does not exist. Commands are +installed in its bin subdirectory and each command's manual page, if +available, is installed in share/man. + +Destination directories with whitespace or shell pattern characters in their +pathnames are not yet supported. + +For more information, run: + + bin/package help + +Many other commands in this repo self-document via the --help, --man and +--html options; those that do have no separate manual page. + +The build should also generate shcomp, a program that will precompile +a script. ksh93 is able to recognize files in this format and process +them as scripts. You can use shcomp to send out scripts when you +don't want to give away the original script source. + +To be able to run setuid/setgid shell scripts, or scripts without read +permission, the SUID_EXEC compile option must be on, and ksh must be installed +in the /bin directory, the /usr/bin directory, the /usr/lbin directory, +or the /usr/local/bin directory and the name must end in sh. The program +suid_exec must be installed in the /etc directory, must be owned by root, +and must be an SUID program. If you must install ksh in some other directory +and want to be able to run setuid/setgid and execute only scripts, then +you will have to change the source code file sh/suid_exec.c explicitly. +If you do not have ksh in one of these secure locations, /bin/sh will +be invoked with the -p options and will fail when you execute a setuid/setgid +and/or execute only script. Note that ksh does not read the .profile +or $ENV file when the real and effective user/group IDs are not equal. + +#### TESTING KSH #### + +The tests subdirectory contains a number of regression tests for ksh. +To run all these tests with the shell you just built, run the command + bin/shtests +For help and more options, type + bin/shtests --man + +#### OTHER DOCUMENTATION #### + +The file PROMO.mm is an advertisement that extolls the virtues of ksh. +The file sh.1 contains the troff (man) description of this Shell. +The file nval.3 contains the troff (man) description of the name-value +pair library that is needed for writing built-ins that need to +access shell variables. + +The file sh.memo contains a draft troff (mm) memo describing ksh. The +file builtins.mm is a draft troff (mm) memo describing how to write +built-in commands that can be loaded at run time. + +The file NEWS in the top-level directory contains bug fixes and other +changes made in the ksh 93u+m fork and supporting libraries. The file +COMPATIBILITY contains a list of potential incompatibilities. + +#### TESTED SYSTEMS #### + +ksh 93u+m 1.0.0.beta-1 has been compiled and tested on the following. +An asterisk signifies minor regression test failures (one or two minor +things amiss), two asterisks signify moderate regression test failures +(some functionality does not work), and three asterisks signify serious +failures (crashes, and/or important functionality does not work). + +* AIX 7.1 on RISC (PowerPC) +* DragonFly BSD 5.8 on x86_64 + FreeBSD 12.2 on x86_64 + FreeBSD 13.0 on x86_64 + FreeBSD 12.2 on arm64 (thanks to hyenias for donating access to a Pi) + GNU/Linux: Alpine 3.12.3 (musl C library) on x86_64 + GNU/Linux: CentOS 8.2 on x86_64 + GNU/Linux: Debian 10.7 on x86_64 + GNU/Linux: Gentoo 2.7 on i386 + GNU/Linux: NixOS 19.09 on x86_64 + GNU/Linux: Slackware 14.2 on x86_64 + GNU/Linux: Ubuntu 16.04 on x86_64 + GNU/Linux: Ubuntu 18.04 on armv7l (32-bit) + GNU/Linux: Ubuntu 20.04 on arm64 + GNU/Linux: Void Linux (musl C library) on x86_64 +*** Haiku R1/beta3 on x86_64 +*** HP-UX B.11.11 on pa-risc +* illumos: OmniOS 2020-08-19 (gcc) on x86_64 + illumos: OmniOS r151040 (gcc) on x86_64 + macOS 10.13.6 (High Sierra) on x86_64 + macOS 10.14.6 (Mojave) on x86_64 +* macOS 12.0.1 (Monterey) on arm64 +* NetBSD 8.1 on x86_64 +* NetBSD 9.2 on x86_64 +* OpenBSD 6.8 on x86_64 + OpenBSD 7.0 on x86_64 +* QNX Neutrino 6.5.0 on i386 +* Solaris 11.4 (gcc) on x86_64 + Solaris 11.4 (Solaris Studio 12.5 cc) on x86_64 +* UnixWare 7.1.4 on x86 +*** Windows 7 using Cygwin on x86 +*** Windows 10 using Cygwin on x86_64 +*** Windows 11 using Cygwin on x86_64 + Windows 11 using WSL 2 with Ubuntu 20.04 on x86_64 + +#### REPORTING BUGS #### + +Please report any problems or suggestions by opening an issue at: +https://github.com/ksh93/ksh +Alternatively, email martijn@inlv.org (timely response *not* promised). + +Good luck!! + +The ksh 93u+m contributors +https://github.com/ksh93/ksh + +Originally written by: +David Korn +dgk@research.att.com diff --git a/src/cmd/ksh93/README-AUDIT.md b/src/cmd/ksh93/README-AUDIT.md new file mode 100644 index 000000000..df6104984 --- /dev/null +++ b/src/cmd/ksh93/README-AUDIT.md @@ -0,0 +1,201 @@ +# Korn Shell 93 Auditing and Accounting # + +This documentation was adapted from a 2008 blog post by Finnbarr P. Murphy +and was added to the ksh 93u+m distribution under the same license as ksh +by permission from the author, given on 24th Jan 2021. +[Original](https://blog.fpmurphy.com/2008/12/ksh93-auditing-and-accounting.html). +The responsibility for any errors in this file lies with the current +ksh 93u+m maintainers and not with the original author. + +## Introduction ## + +Korn Shell 93 (ksh93) is the only UNIX or GNU/Linux shell that I am aware +of that, with proper setup, supports a modicum of per-user accounting and +auditing. This post attempts to explain these facilities and show you how +to access and manipulate the resulting accounting and auditing records. + +Per-user accounting has been a feature of ksh93 since the earliest days of this +shell. It is a fairly primitive facility which writes out a record for each +user command that is executed. By default, it is not compiled in to the shell. + +An auditing facility was added in July 2008. This is somewhat more +sophisticated than the accounting facility in that it is configurable and +writes out a more detailed record either locally or to a remote system for +each user command that is executed. This facility can be used to monitor, +track, record, and audit the activities of one or more users on an system, +including system administrators. As of ksh 93u+ 2012-06-12, this is compiled +in to the shell by default. + +Both facilities only work for interactive users. + +To enable or disable one or both facilities, you need to modify the compile +time options in `src/cmd/ksh93/SHOPT.sh` as follows. Use `0` to disable and +`1` to enable (except for `SHOPT_AUDITFILE`). Then recompile the sources; +see `README` for building instructions. + + SHOPT ACCT=1 # accounting + SHOPT ACCTFILE=1 # per-user accounting info + SHOPT AUDIT=1 # enable auditing per SHOPT_AUDITFILE + SHOPT AUDITFILE='\"/etc/ksh_audit\"' # auditing file + +After you have recompiled the sources, the new ksh executable is located in the +`arch/`...`/bin` subdirectory. To see what options have actually been compiled +into a particular executable, just print out the shell version string. + + $ arch/darwin.i386-64/bin/ksh -c 'echo ${.sh.version}' + Version AJLM 93u+m/1.1.0-alpha+dev 2022-01-20 + $ arch/darwin.i386-64/bin/ksh -c 'echo $KSH_VERSION' + Version AJLM 93u+m/1.1.0-alpha+dev 2022-01-20 + +The option string AJLM means that +(A) auditing is supported (`SHOPT_AUDIT`), +(J) one SIGCHLD trap per completed job is supported (`SHOPT_BGX`), +(L) accounting is supported (`SHOPT_ACCT`), and +(M) multibyte characters are supported (`SHOPT_MULTIBYTE`). + +## Accounting ## + +After recompiling the shell to enable this facility, per-user accounting is +enabled using the `SHACCT` environment variable. To turn on per-user +accounting, simply set `SHACCT` to the name of the file where you wish to +store the accounting records. + + export SHACCT="/tmp/ksh_acctfile" + +Here is part of the resulting file. Note that the time is stored as +hexadecimal seconds since the Unix epoch (00:00:00 UTC on 1 January 1970). + + $ cat /tmp/ksh_acctfile + echo ${.sh.version} fpm 495990d8 + pwd fpm 495990da + id fpm 495990dd + date fpm 495990e3 + exit fpm 495990e5 + +The following shell script can be used to access the records in this file +and output them in a more useful format. + + #!/bin/ksh93 + ACCTFILE="/tmp/ksh_acctfile" + printf "DATE TIME LOGIN COMMAMD\n\n" + # set IFS to TAB only + while IFS=$'\t' read cmdstr name hexseconds + do + printf -v longsecs "%ld" "0x${hexseconds}" + printf "%(%Y-%m-%d %H:%M:%S)T, %s, %s\n" "#${longsecs}" "$name" "$cmdstr" + done < $ACCTFILE + +Invoking this script gives the following output for the above accounting +records. + + $ ./parse_acctfile + DATE TIME LOGIN COMMAMD + + 2008-12-29 22:09:12, fpm, echo ${.sh.version} + 2008-12-29 22:09:14, fpm, pwd + 2008-12-29 22:09:17, fpm, id + 2008-12-29 22:09:23, fpm, date + 2008-12-29 22:09:25, fpm, exit + +## Auditing ## + +Next we turn our attention to the auditing facility. Assuming ksh has been +compiled with the `SHOPT_AUDIT` option (the default), you must create an audit +configuration file on each system to tell ksh93 where to store the audit +records and to specify which users are to be audited. The configuration file +must be readable by the users whose activities are audited. Its default +location is `/etc/ksh_audit` but that can be changed in the `SHOPT.sh` file. +The configuration file should contain a line that defines the file to write +the audit records to, followed by the UID of each user whose commands are to +generate audit records. Here is the configuration file used to generate the +audit records for this part of this post. + + $ cat /etc/ksh_audit + /tmp/ksh_auditfile;500 + +This configuration file specifies that audit records are to be written to +`/tmp/ksh_auditfile` for the user whose UID is 500. Note that the field +delimiter is a semicolon. + +Here are the audit records stored in `/tmp/ksh_auditfile` which match the +accounting records shown previously in this post. The field separator is a +semicolon. The first field is the UID of the user executing the command. +The second field is the time in seconds since the Epoch. The third field is +the terminal device on which the command was executed, and the final field +is the actual command executed by the user. + + 500;1230606552;/dev/pts/2; echo ${.sh.version} + 500;1230606554;/dev/pts/2; pwd + 500;1230606557;/dev/pts/2; id + 500;1230606563;/dev/pts/2; date + 500;1230606565;/dev/pts/2; exit + +As before, here is a simple ksh93 script which parses this audit file, +replaces the UID with the actual user's name and seconds since the Epoch +with the actual date and time, and outputs the enhanced records in a comma +separated value (CSV) format. + + #!/bin/ksh93 + AUDITFILE="/tmp/ksh_auditfile" + while IFS=";" read uid sec tty cmdstr + do + printf '%(%Y-%m-%d %H:%M:%S)T, %s, %d, %s, %s\n' \ + "#$sec" "$(id -un $uid)" "$uid" "$tty" "$cmdstr" + done < $AUDITFILE + +Here is the output for the above audit records. + + 2008-12-29 22:09:12, fpm, 500, /dev/pts/2, echo ${.sh.version} + 2008-12-29 22:09:14, fpm, 500, /dev/pts/2, pwd + 2008-12-29 22:09:17, fpm, 500, /dev/pts/2, id + 2008-12-29 22:09:23, fpm, 500, /dev/pts/2, date + 2008-12-29 22:09:25, fpm, 500, /dev/pts/2, exit + +The audit file must be writable by all users whose activities are audited, +presenting an obvious security problem. However, the Korn shell supports +networking using the `/dev/udp/`*host*`/`*port* or `/dev/tcp/`*host*`/`*port* +syntax, so audit records can be sent across a network to another system. +This mechanism could be used to store audit records on a secured centralized +system to which only specific personnel have access. As an example, the +following audit configuration file line designates that audit records for +the user whose UID is 500 should be sent using UDP to the syslog network +port (514) on a remote system whose IP is 192.168.0.99. + + /dev/udp/192.168.0.99/514;500 + +Here are the same audit records stored by the syslog daemon on the remote system. + + 2008-12-29 22:09:12 192,169.0.115 500;1230606552;/dev/pts/2; echo ${.sh.version} + 2008-12-29 22:09:14 192.169.0.115 500;1230606554;/dev/pts/2; pwd + 2008-12-29 22:09:17 192.169.0.115 500;1230606557;/dev/pts/2; id + 2008-12-29 22:09:23 192.169.0.115 500;1230606563;/dev/pts/2; date + 2008-12-29 22:09:25 192.169.0.115 500;1230606565;/dev/pts/2; exit + +Depending on the configuration of the syslog daemon on your particular +system, the first part of the record may contain more or less information or +be formatted differently but the final part of the record, i.e. the audit +record sent by ksh93 should be in the standard audit record format. + +## Afterword ## + +Note that while the auditing and accounting facilities within ksh93 can +provide you with much useful information regarding the actions of one or +more users on a system or systems, these facilities should not be regarded +as providing enhanced security akin to the Trusted Computing Base (TCB). +There are many ways of circumventing these facilities. For example, a +knowledgeable user could switch to a different shell such as bash where +their actions will not be recorded. There are a number of other ways but I +will not discuss them here. + +Most of the information provided in this post is not documented in a single +place anywhere that I can find by searching the Internet. The ksh93 man page +does not mention either the accounting or auditing facilities. Even the +ksh93 source code is somewhat vague. I gleaned most of this information by +studying the code in +[`src/cmd/ksh93/edit/history.c`](https://github.com/ksh93/ksh/blob/dev/src/cmd/ksh93/edit/history.c). + +*Martijn Dekker adds:* I would like to thank the author Finnbarr P. Murphy +for his permission to use his ksh93-related blog posts in the ksh 93u+m +distribution. As of 2022, this is still the only documentation available for +the facilities described. If you find any errors or omissions, please +[file an issue](https://github.com/ksh93/ksh). diff --git a/src/cmd/ksh93/RELEASE b/src/cmd/ksh93/RELEASE new file mode 100644 index 000000000..c9b8bb3f0 --- /dev/null +++ b/src/cmd/ksh93/RELEASE @@ -0,0 +1,3114 @@ +This file is of historical interest only. For recent changes in both ksh 93u+m +and the accompanying libraries, see the file NEWS in the top-level directory. +____ + +12-08-01 --- Release ksh93u+ --- +12-08-01 A bug that ignored interrupts for some builtins (e.g. cmdtst::grep) + that read from stdin has been fixed. +12-08-01 A bug that interpreted "cd .foo" as "cd foo" has been fixed. +12-07-30 Added automatic restart for EINTR for ioctl, tcgetattr, and tcsetattr. +12-07-23 A scoping error with namrefs to compound associative arrays has + been fixed. +12-07-20 A bug where builtin -d /path/foo deleted foo has been fixed. +12-07-18 A bug in which /dev/stdout did not work in command substitution on + some systems has been fixed. +12-07-17 A bug in which the restricted option set in a subshell prevented + some variables from getting restored when the subshell completed + has been fixed. +12-07-09 A bug in which the directory is not restored after a subshell changes + the name of the directory for subshells executed in the same process + has been fixed. +12-07-09 A bug in which file descriptors created with {n}< file were not being + closed has been fixed. +12-07-09 The 12-04-04 fix for cd .. was not correct causing cd /etc;cd .. to + remain in /etc. This has been fixed. +12-07-02 A bug in which builtin name did now work for builtins found in a + library added by builtin -f lib has been fixed. +12-07-02 A bug in the edit modes which after a directory did not refresh + the input line has been fixed. +12-07-02 A bug in which an exit status > 256 corresponding to a signal was + not returned by a function to indicate a signal exit has been fixed. +12-06-28 Fix ulimit -a to list (Kibytes) instead of (kbytes). +12-06-27 Fix uninitialized data reference for as first char in --vi mode. +12-06-26 The formatting of printf "%q" for multibyte locales has changed to + output using \u[xxx] format for valid wide characters. +12-06-25 The size limit for read -N and read -n has been raised to INT_MAX. +12-06-22 A bug in which an exit trap set in a subshell might not be triggered + when the last command was a simple executable has been fixed. +12-06-22 A bug which could cause the shell to hang when a coprocess exits + while a command inside a command substitution is reading from it has + been fixed. +12-06-21 +ksh new accepts for commands of the form for i; do;...;done +12-06-19 Tab completion after a / when there is only one match not completes + with that match rather than generating a menu of matches. +12-06-19 A bug in which patterns containing {...} where not processed + correctly inside ${var/pattern/string} has been fixed. +12-06-18 Code modified to eliminate fts_notify variable. +12-06-15 Change the .paths plugin/builtin library variable name from + BUILTIN_LIB to PLUGIN_LIB to prevent new plugin_version() aware + -lcmd from causing older non-plugin_version() aware ksh to dump core. +12-06-14 builtin without argument no longer lists .sh.tilde as a built-in. +12-06-12 For assignments if the form x=(foo bar), foo is only check for an + alias if it is float, integer, compound, or nameref. +12-06-12 +The shell supports 64 bit i-nodes even for 32 bit binaries. +12-06-11 A bug with >; redirection systems for which vfork() was the same a + fork() has been fixed. +12-06-11 A bug in path lookup that ignored buffer boundaries has been fixed. +12-06-08 typeset -a var and typeset -A var, first unset var when var is + a compound variable. +12-06-08 A bug in which running shcomp on a program containing namespace + could core dump has been fixed. +12-06-06 A bug in which unset of an associative array of compound variables + did not completely unset the variable has been fixed. +12-06-06 A bug in which exporting left or right justified fields could lose + the field width has been fixed. +12-06-06 A bug on Solaris 11 in which >; did not work for /dev/null was fixed. +12-06-05 A race condition which occurred when stopping a builtin command + invoked from a subshell has been fixed. +12-06-05 A bug with appending elements to an empty indexed array has been + fixed. +12-06-04 A bug in which continuing a stopped builtin could cause it to + terminate has been fixed. +12-06-04 By default, builtins added at runtime will restore the current + directory if they are killed or stopped. +12-06-04 A bug in handling \\ in read has been fixed. +12-05-31 Use getrlimit64/setrlimit64 on systems that support it. +12-05-31 Fix 64 bit big-endian arithmetic bug that mishandled NaN and Inf. +12-05-31 Handle ECONNRESET like EPIPE. +12-05-31 Change .paths parse to use only the last BUILTIN_LIB from the top + and treat BUILTIN_LIB value as a ':' separated list of lib names. +12-05-29 Fix BUILTIN_LIB binding bug that ignored subsequent lookups. +12-05-29 shtests: --nocompile omits the compile test and --compile does only + the compile test. +12-05-25 A command substitution containing a here-document that itself contains + a here-document no longer hangs. +12-05-24 When the redirection operator >; is directed to a symlink, it now + overwrites the file named by the link rather than the link. +12-05-21 +Added printf formats %(type)q where type can be html, url, pattern, + ere, or csv. +12-05-18 A bug with appending elements to an indexed array has been fixed. +12-05-18 The exit status from getopts --man interactively was 0 instead of 2 + and has been fixed. +12-05-18 Another bug with SHOPT_EDPREDICT which could cause a core dump has + been fixed. +12-05-17 A bug with fixed size arrays which could cause a core dump has been + fixed. +12-05-17 A bug in which the here-document <<< $(^V, the terminal was not + restored to insert mode after a character is entered has been fixed. +12-04-27 A bug in which old attributes were not cleared when assigning a + value using typeset has been fixed. +12-04-26 +Enabled multiline editing by default. set +o multiline can disable. +12-04-25 The 12-04-17 PATH fix created a new bug which was fixed. +12-04-25 Fixed a big memory leak problem in which unsetting compound variables + did not free all the space. +12-04-25 A bug in which test ! ! ! was treated as an error has been fixed. +12-04-24 A bug with print -v for a compound variable that contained fixed + arrays which prevented the output from being used again as input + has been fixed. +12-04-23 +kill provides the STKFLT signal on systems that support it. +12-04-23 +The -L option was added to kill. The -L option is the same as -l + except that without arguments the output format is in the form of + a select menu. +12-04-23 A bug in which the exit status for an interactive shell was always + 0 has been fixed. +12-04-20 Entering blank lines interactively no longer resets the exit status. +12-04-18 A bug in file completion in which the second tab completion on a file + would list the completion rather than inserting the completion has + been fixed. +12-04-18 A bug in which "${arr[@]:i:j}" and "${@:i:j}" generated the empty + string when i was a valid subscript and j was <=0 rather than + generating nothing has been fixed. +12-04-17 A bug in which read -d delim from a terminal did not respond to + interrupt and did not terminate when the delimiter was entered + has been fixed. +12-04-17 A bug in which a directory in PATH containing a .paths file that + contains a line with FPATH=dir, where dir does not exist could + cause the path search to fail has been fixed. +12-04-16 A bug in which $(trap -p) did not display traps such as ERR and + DEBUG that are not associated with signals has been fixed. +12-04-11 A bug in which unsetting a variable did not unset attributes when + the variable did not have a value has been fixed. +12-04-11 A bug in which read -A for an array whose index is an enumeration + type, lost the enumeration type has been fixed. +12-04-10 Shared libraries loaded from a library named by a BUILTIN_LIB= found + in a .paths file found in a directory on PATH now add builtins that + are associated with the directory in PATH containing the .paths file. +12-04-09 Increased I/O buffer sizes for better performance. +12-04-09 A bug in which the leading 0 was stripped from $x, when $x contained + a hexadecimal constant inside an arithmetic expression inside + a for or while loop. +12-04-06 Modified namespaces to hand variables FPATH, PATH, and OPTIND that + are defined in name spaces appropriately. This also fixed OPTIND + and OPTARG processing for functions. +12-04-04 A bug in which cd .. fails when the current directory has been + renamed has been fixed. +12-04-02 Made some namespace changes and added a regression test. +12-03-30 A bug with namespaces in which PATH and FPATH set in a namespace was + not restored when leaving the namespace has been fixed. +12-03-29 A bug in which appending an indexed array onto an array without elements + caused the first element to be 1 rather than 0 has been fixed. +12-03-29 A bug which could cause a core dump when copying a large indexed array + has been fixed. +12-03-28 The shell now generates an error message when the sizes with L, Z, and + R are > 32767 on 32 bit binaries instead of generating a core dump. +12-03-28 A bug in left and right justification in which the width of invalid + characters was not taken as zero has been fixed. +12-03-26 A bug in which typeset -p ref, when ref is a reference to an index + array element did not display the subscript has been fixed. +12-03-23 A bug in lowercase and uppercase fields when expanding ${name:=val} + when name is the empty string has been fixed. +12-03-22 A namespace bug in which a type t defined in namespace foo could not + be referenced outside the namespace as .foo.t has been fixed. +12-03-22 A bug in name reference scoping in which a name function called from + another function is pass a name reference to a compound variable + instance to be created and the compound variable is in the global + scope. +12-03-22 A bug in which ${ref[@}} did not behave like ${arr[i][@]} when + ref is a name reference to arr[i] has been fixed. +12-03-21 A bug in which assigning a compound variable into arr[i], where + arr[i] is an array variable did not work correctly has been fixed. +12-03-21 A bug with multidimensional indexed arrays in which ${arr[i][j]} + could generate a bogus error message when i was > 9 has been fixed. +12-03-21 A bug in which typeset v=foo, typeset -p v[0] generated a core dump + has been fixed. +12-03-20 A bug in vi edit mode in which the sequence bar0il left the + cursor on the b rather than the a has been fixed. +12-03-20 A bug which caused a core dump when defining a type with a field + as ' integer -a data=([0]=0)' has been fixed. +12-03-19 Using typeset -a array when array is an associative array not + generated an error message. +12-03-19 typeset +a, typeset +A, and typeset +C not displays the variables + with the attributes a, A, and C respectively instead of an error. +12-03-19 A bug in which typeset -pC, typeset -pa, and typeset -pA output all + variables rather than those of type C, a, or A only has been fixed. +12-03-18 A bug in which unset foo where foo is a name reference to a compound + variable defined inside a function is not unset has been fixed. +12-03-18 A bug with SHOPT_EDPREDICT which could cause a core dump when the + list of matches became empty has been fixed. +12-03-15 The assignment, typeset -C foo=(a b c) now generates a syntax + error since a is not an assignment command. +12-03-16 A bug in which an unset discipline from a variable defined in a + subshell is not invoked in the subshell has been fixed. +12-03-08 The assignment typeset -a (x=1 y=2) now creates an indexed array + of two elements rather than an array of one element which is + a compound variable. +12-03-02 +The vi and emacs edit modes now list all the entries in a directory + when entering a for completion after a /. +12-03-02 A bug in which a program that exits with value 12 when called + from a command substitution in which standard output has been + redirected caused the shell to hang has been fixed. +12-03-01 A bug in which the shell could not parse [[ ']' == ~(E)[]] ]] + has been fixed. + +12-02-29 --- Release ksh93u+ --- +12-02-29 A bug in which ~user expanded first in a subshell prevented it + from expanding later in a program has been fixed. +12-02-29 A bug which could lead to a core dump when more than four shared + libraries were added with the builtin command has been fixed. +12-02-29 Fixed a few bugs which caused SIGCHLD to be blocked preventing + background jobs from being reaped until a foreground job was run. +12-02-27 A bug in which sh -c for a simple command caused a fork() has been + fixed. +12-02-27 A timing bug on systems such as AIX that doesn't support vfork() + that could cause the exist status to get lost has been fixed. +12-02-22 A private file descriptor that was not close-on-exec for a command + substitution and has been fixed. +12-02-14 A bug in which ^Z did not stop a pipeline when the last component + was a shell built-in has been fixed. +12-02-14 getconf("PATH") used to initialize ed(1) path. +12-02-13 +In earlier version read from standard input would fail when called + from the KEYBD trap. Now read options -N, -n, and -t should work + when called from a KEYBD trap. +12-02-13 If FCEDIT is not set and fc is invoked without the -e option, + ed will be invoked if found instead of /bin/ed. +12-02-10 Another bug in the saving and restoring of IFS in a subshell + that caused a core dump has been fixed. +12-02-08 A bug in which .sh.fun disciplines could be cleared after a + function completes has been fixed. +12-02-08 A bug in job control in which the foreground process group was not + set correctly after restarting a stopped pipeline has been fixed. +12-02-07 A bug in which numbers with leading zeros could be treated as + octal constants outside of ((...)) has been fixed. +12-02-06 A bug in arithmetic with compound variables containing multiple + array elements has been fixed. +12-02-02 A bug in the ulimit option table was fixed. +12-01-26 A bug in which a set command that did not change monitor could + affect the behavior of the monitor when monitor mode is on is fixed. +12-01-21 +You can now test whether the shell implements a math function using + typeset -f .sh.math.name, where name is the name of the function. +12-01-21 A bug in which typeset -L and typeset -R did not handle multibyte + characters correctly has been fixed. +12-01-20 A bug that could cause the shell to hang waiting for an incorrect + job PID has been fixed. +12-01-19 A memory leak which occurred for a nested command substitution has been + fixed. +12-01-17 A bug in which typeset -u PS1 could enable the uppercase attribute + for some other variables, for example, HISTFILE has been fixed. +12-01-16 A bug in which .sh.match was not correct after a substring match when + the replacement string contained a substring match has been fixed. +12-01-12 +Files that are sourced from profile files are now read and executed + one command at a time so that alias definitions take effect as they + do for profile files. +12-01-12 A bug in which whence -p would find a function if one existed and + there was no command of that name on PATH. +12-01-11 Change b_* prototype (int, char**, void*) => (int, char**, Shbltin_t*). +12-01-05 A bug in which read was not terminating for a signal that had a trap + set has been fixed. +12-01-01 A timing problem with >; has been fixed. +12-01-01 A macro expansion memory leak has been fixed. +11-12-26 A bug in array assignments of the form arr=( $arr[i] ...) in which + arr was not unset before the assignment has been fixed. +11-12-20 A number of code changes were made based on the results of errors + indicated by static code analysis. +11-12-13 In vi edit mode a literal can now be entered by preceding it + with a backslash. +11-12-13 When tab is entered for completion after a ' or ", the ' and " + characters are no longer deleted. +11-12-07 A bug in which a program in the current directory with a . in the + name could fail to execute when both PATH and FPATH end with :. has + been fixed. +11-12-07 I fixed a bug in which a variable expansion in a large here-document + could be expanded to a null string. +11-12-06 An optimization to read was added in the case the read command + was redirected from a file. +11-12-06 Changes were made to make the line limit for read unlimited by + default. +11-12-05 A bug in which unsetting an array variable did not completely clear + the variable in some cases has been fixed. +11-12-02 +The printf alternative character # when applied to the %q format will + quote argument in a form suitable for a field in a .csv format file. +11-12-02 +A -S option was added to read to be able to read .csv format files. +11-11-28 A bug in which redirection of standard error in a function called from + command substitution caused standard error to be lost has been fixed. +11-11-21 [[ (-n foo) ]] no longer requires a space before (. +11-11-11 The readonly attribute for a variable now applies to compound + assignments to that variable. +11-11-07 Changes were made to reduce the stack size to allow deeper function + recursion. +11-10-10 +Added alternate flag to printf %H for encoding of URI's. +11-10-10 A bug which could lead to a core dump when the shell was invoked + with more than twenty-five open files has been fixed. +11-10-06 A bug in the scoping of name references in functions called by other + functions has been fixed. +11-10-05 A bug in which wait on a PID may return the exit status of an + earlier background job with that PID instead has been fixed. +11-09-22 A bug in which a read timed out with TMOUT did not always restore + the terminal state has been fixed. +11-09-21 An optimization that allowed the last command in a script to use + the same process ID as the script has been eliminated. +11-09-21 Added letoctal option that enables the let command to recognize + octal constants starting with 0. +11-09-20 A bug in which ${var.} could cause a core dump has been fixed. +11-09-20 A bug with SHOPT_EDPREDICT when neither vi nor emacs was enabled for + lines beginning with # when in a multibyte locale has been fixed. +11-09-20 A bug in emacs edit mode with SHOPT_EDPREDICT that would cause + history searches matching comments lines to generate predictions + has been fixed. Only user typed comment lines generate predictions. +11-09-20 A bug in emacs edit mode with a search that matches a comment line + that could cause a core dump has been fixed. +11-09-16 A bug in which a command name ending in .. could cause the shell to + abort has been fixed. +11-09-16 The characters ! + - % and @ in file names are no longer escaped with + file name completion. +11-09-13 The let command no longer treats numbers starting with 0 as octal + constants. +11-09-08 A bug in which printf "%R" could cause a core dump for invalid shell + patterns has been fixed. +11-08-09 With set -u, ${var#pattern} reported that var was unset for special + variables. +11-08-03 A bug in which the shell did not preserve the exit status for a + coprocess has been fixed. +11-08-02 A bug in the saving and restoring of IFS in command substitution that + caused a core dump has been fixed. +11-07-21 Modified the 10-08-27 bug fix so that background jobs started in for + and while loops created interactively generate completion messages. +11-07-20 I fixed a bug in here documents in which multi-byte characters that + crossed buffer boundaries were not processed correctly. +11-06-22 The shell compiler now supports process substitution. +11-06-22 +Added code to support process substitution on systems that do + not supply the /dev/fd directory. +11-06-21 Fixed extraneous jobs Done messages when builtin is at the end of a + pipeline. +11-06-20 Fixed two regression tests. +11-06-20 Fixed a bug introduced on last update. +11-06-14 A bug with pipefail in which the shell would wait for background + jobs to complete has been fixed. +11-06-09 A bug which caused the options.sh regression test to fail on OS390 + Linux has been fixed. The bug could also have affected other systems. +11-06-07 +A number of changes to support the still undocumented namespace option + have been added. +11-06-06 A bug in which command substitution of eval would hang when it had + standard error redirected to standard output has been fixed. +11-06-01 A bug in case statement fall through (;&) ignoring set -e was fixed. +11-06-01 A bug in which creating a left or right justified upper or lowercase + variable with an empty string has been fixed. +11-06-01 A bug in which the .paths directory wasn't read when a subshell was + executed before any other command has been fixed. +11-05-31 The shell now gives an error when a type variable is assigned to + an array instance when the array has been declared a compound variable + array. +11-05-31 A bug in which typeset -m of an array instance did not remove the + original instance has been fixed. +11-05-28 A bug in which typeset -m dest=src fails when src and are passed as + name references was fixed. +11-05-28 A bug in which typeset -m "c.board[1][i]=el", where el is a compound + variable core dumps has been fixed. +11-05-28 Two bugs in the display of arrays of compound variables with print -v + have been fixed. +11-05-27 A bug with command substitution in the Shift JIS locale has been + fixed. +11-05-25 A bug in which unset -f foo, called within function foo could cause + the shell to core dump has been fixed. +11-05-24 A bug in unsetting arrays of compound variables that could lead to + a core dump has been fixed. +11-05-24 A scoping bug in with typeset -m for variables passed as references + has been fixed. +11-05-09 A bug in which 'typeset +p array[$i]' in a subshell could cause an + exception has been fixed. +11-05-03 Two more scoping bugs with name references and read -C were fixed. +11-05-03 A potential race condition which occurs when here-documents are + processed in asynchronous blocks has been eliminated. +11-05-02 Another scoping bug with name references defined in a function has + been fixed. +11-05-02 A bug in which the shell discards saved exit status of a job if it is + followed by a subshell execution has been fixed. +11-04-28 The shell now checks for numerical overflows with process IDs. +11-04-28 Another scoping bug with compound variables defined by name references + inside a function has been fixed. +11-04-28 A bug which caused a core dump on 32 bit systems with the basic.sh + regression test has been fixed. +11-04-27 A scope binding error for name references has been fixed. +11-04-27 Assignment of compound variable to compound array element by name + is now working. +11-04-26 I fixed a bug with SHOPT_FIXEDARRAY compilation that could cause + an a core dump for not fixed arrays. +11-04-25 A bug in the references to two dimensional compound arrays has + been fixed. +11-04-20 A bug in which a name reference to a multidimensional indexed array + index, nameref x=foo[3][4], did not work correctly has been fixed. +11-04-18 Changes were added to allow fixed size arrays of variable sized + objects when the SHOPT_FIXEDARRAY compile option defined on 10-09-28. +11-04-18 A bug in which name references to array elements could fail has + been fixed. +11-04-15 +A compile option, SHOPT_2DMATCH, has been added which causes + .sh.match to be a two dimensional array after ${var//pat/str} + where the first dimension is the pattern number and the second is + the match instance. +11-04-11 A bug in which readonly var, where var is exported could cause var + to be unset has been fixed. +11-04-06 A tokenizer bug in which ${x/{3}(\d)/ } would cause an infinite + loop has been fixed. +11-04-05 A bug in which ${!x.} could cause a core dump has been fixed. +11-04-04 A bug in which cleaning out the history file could terminate before + keeping all the recent history events has been fixed. +11-03-29 A bug in which ${#array[@]} was 1 rather than 0 after issuing + typeset array[7] has been fixed. +11-03-29 The subscript out or range message for fixed arrays has been fixed. +11-03-29 A bug in which suspend could cause a core dump has been fixed. +11-03-24 For the showme option added 09-09-09, commands beginning with a ; + inside an arithmetic for loop, no longer produce syntax errors. +11-03-18 A bug in _WINIX ~domain/user expansion has been fixed. +11-03-16 A bug in the pipefail option which could cause a script to hang + has been fixed. +11-03-12 The shell no longer treats ${##pattern} as a syntax error. +11-03-11 A bug in typeset -u on systems that don't supply the towctrans() + function has been fixed. +11-03-11 A bug in which a compound assignment of the form var[sub]=(...) + would evaluate sub for each assignment has been fixed. +11-03-07 A bug in which reassigning a compound variable to an associative + array index could incorrectly increase the count of the number + of elements has been fixed. +11-03-04 +The tilde expansion on Windows has been modified to handle user + names of the form domain/user so that ~domain/user now expands + to the home directory of that domain user. +11-03-03 A bug in which the width of the prompt was calculated incorrectly + which cause the wrong line length for edit commands has been fixed. +11-03-02 A bug in which a global variables set from within a function inside + a subshell can leave side effects in parent shell has been fixed. +11-03-01 A bug in which whence -a could dump core when the first match + was due to : in PATH and the program was in the current directory. +11-02-28 A bug in emacs mode with SHOPT_EDPREDICT (added on 10-05-20) which + disabled prediction on a line starting with # when the cursor was not + at the end of line has been fixed. +11-02-28 The output format for compound variables with set has been fixed. +11-02-25 A bug which could lead to a core dump occurred when a shell script + without #! is invoked by name from a parent shell that has name + references defined and the script creates name references of the + same name. +11-02-21 The shell now fails with a syntax error when a here-document in a + command substitution is not completed before the closing ), for + example, $( foobar <&- doesn't work has been fixed. +11-02-07 A bug on some systems for which a command substitution could hang + has been fixed. +11-01-28 A bug in file name completion for files containing both multibyte + characters shell special characters has been fixed. +11-01-18 The .sh.match variable now shows elements that do not match as + as not set rather than an empty string. +11-01-18 A bug with typeset -m of an array into an element of an indexed + array has been fixed. +11-01-13 A bug in handling of arrays of compound variables inside ((...)) which + reported a syntax error been fixed. +11-01-10 A bug in arithmetic assignment operators of the form op= for array + variables when the same array was referenced on the left and the + right hand side with different indices has been fixed. +11-01-10 A bug in which the output of time was lost when { time...;} 2>&1 + occurred inside command substitution has been fixed. +11-01-07 [[ -v sh.match[i] ]] was returning false when sh.match[i] was set. +11-01-05 Added and modified warning messages with sh -n. +11-01-02 Fixed bugs with typeset -l/-u/-M and arrays. +10-12-28 Fixed a bug with typeset -l/-u/-M values in arithmetic expressions. +10-12-26 Fixed a time parsing bug in sleep and localeconv() initialization. +10-12-23 Prevented the shell from generating a core dump when it sends itself + a termination signal because the last command terminated with that + signal. This prevents a core dump to be overwritten by the shell. +10-12-22 A bug in the expansion of ${A[@]} ${B[@]}, introduced in 10-12-01 + when A="" B=B has been fixed. +10-12-21 +Use MS_3D in b_vpath() for setting Win32 WoW mount defaults. +10-12-17 A bug in the expansion of ${var:i:j} which caused a core dump when + i > ${#var} has been fixed. +10-12-16 +sleep now treats . as decimal point even in locales that use comma. +10-12-16 +typeset -M mapname was added to generalize on toupper and tolowwer + mapping as provided with wctrans(). +10-12-10 A bug in which typeset -l displayed namespaces as well as lower case + variables has been fixed. +10-12-06 A bug in which a pipeline could terminate prematurely for a pipeline + whose right hand side is a builtin, and whose left hand side ends in + a simple command that has standard output redirected has been fixed. +10-12-06 A bug in hexfloat assignments when the right hand side is a string + variable starting with 0x has been fixed. +10-12-01 A bug in the expansion of ${$1+"$@"} which causes the last positional + parameter to disappear when it is empty has been fixed. +10-12-01 A number of changes were made to reduce the startup time. +10-11-29 When wait is interrupted by a signal that is caught, it now exits + with a non-zero exit status. +10-11-29 When a variable is used directly in an arithmetic expression, + leading zeros no longer cause the value to be treated as an + octal constant. This was true in previous versions for justified + variables. +10-11-29 An incorrect warning message was eliminated with the -n option for + arithmetic expressions with associative arrays. +10-11-29 Some changes were made to slightly reduce startup time. +10-11-24 A bug in which a name reference is make to arr[0] when arr is not + an array has been fixed. +10-11-23 If a type definition is made without a compound variable assignment it + produces an error message and no longer shows up as a defined type. +10-11-22 The handling of \ inside [...] for shell and ~(E) patterns has + been fixed. +10-11-22 A patch was made to pfsh to handle an error case. +10-11-22 +Modified types defined in namespace so that they do not clash with + types in other namespaces. Types can be referenced using + .namespace.typename. +10-11-22 A bug which caused functions addressed as .namespace.funct to not + work has been fixed. +10-11-22 A bug in which if nr was a name reference to an unset associative + array subscript, then ${!nr} did not output the subscript correctly + has been fixed. +10-11-18 A bug in which shcomp -n was not processing double quotes correctly + has been fixed. +10-11-18 Fixed a bug in which typeset -T foo; typeset -T could cause a + core dump. +10-11-17 Fixed a bug in which the error message for set -u could come out + garbled. +10-11-17 Modified the parser so that typeset -a var=(...) no longer checks + the first index for aliases and reserved words. +10-11-17 A bug in which a subshell command consisted of only a for or until + command has been fixed. +10-11-16 Fixed a bug in which typeset -u would display namespace variables + as well as upper case variables. +10-11-16 A bug which could cause a core dump when unsetting a type variable + when there are references to type elements has been fixed. +10-11-15 A bug which could cause a core dump when unsetting a compound + array variable when there are references to array subscripts has + been fixed. +10-11-15 A bug in which using typeset -m to move an indexed array instance + to another array could cause the array to display incorrectly has + been fixed. +10-11-12 A bug in which the unset discipline function for a type is called + when the type is initialized has been fixed. +10-11-12 The sequences \< and \> are now preserved after patterns containing + ~(E) in ${var/pattern/string} expansions. +10-11-11 A bug in typeset -m when the variables were compound array instances + has been fixed. +10-11-10 A bug in output of a compound variable with types containing types + has been fixed. +10-11-10 Fixed ``name=value export [-p]'' to list environment. +10-11-09 shtests resets SIGPIPE to SIG_DFL for all tests. +10-11-09 Fixed a bug in expansion of $"..." when used in assignments. +10-11-09 Fixed a getaddrinfo() memory leak that didn't call freeaddrinfo() + after an interrupt. +10-11-08 Modified the behavior of set -u so that the shell terminates with + error message when when var is unset with ${!var} and ${#var}. +10-11-02 Fix a bug in which a signal received while in a subshell could be + ignored. +10-10-26 Fix a bug where terminal interrupt was ignored while in vi/emacs + edit search mode. +10-10-26 Fix $'a\0b'c to expand to 'ac'. +10-10-26 Provide user defined round() if not in . +10-10-26 Fix bug where $((undefined_function(1))) dumped core. +10-10-22 Provide user defined iszero() if not in . +10-10-22 Fixed a bug with BGX compile option that could cause the shell to + hang. +10-10-22 Fixed a bug with user define math function on systems for which + char is unsigned. +10-10-21 A bug in which function autoloaded in a function leaves a file open + has been fixed. +10-10-20 Modified the behavior of set -u so that the shell terminates when + when var is unset with ${var op string} when op is #, % or /. +10-10-20 Fixed a bug with the AUDIT option in which the audit file was not + not close-on-exec. +10-10-20 +Made a number of changes and fixes for the NAMESPACE compile option + which as added on 10-06-09 but some problems still remain. +10-10-15 Fixed a bug in which arithmetic functions (added on 10-03-24) did + not work when the function definition was in the same compound + command in which the function was referenced. +10-10-13 A bug in which creating an associative array of compound variables + with no members as an element of a compound variable did not work + has been fixed. +10-10-08 A bug in which killing the last command in a function defined + with function name, terminated the calling script has been fixed. +10-10-08 A bug which could cause a core dump if IFS is unset inside a function + has been fixed. +10-10-07 +To reduce unwanted side effects, invoking typeset without the export + option and without an assignment now causes the variables to be unset + if the variable is inherited from the environment. +10-10-06 The closing brace for ${ command } is now a token no matter what + character follows it. +10-10-04 The change for $'...' expansion on 10-08-09 did not expand parameters + contained in the error message and this has been fixed. +10-10-04 A bug in which a declaration of indexed array (-a) in a type + definition would be displayed as a compound indexed array (-C -a) + has been fixed. +10-09-30 The C99 math function ldexp has been added. +10-09-30 A bug with two dimensional arrays with expansion of the form + ${ref[0..5]} where ref is a nameref to array[i] has been fixed. +10-09-29 A bug in which an eval with redirections invoked from a dot script + would not restore the file has been fixed. +10-09-29 A bug in which loading a function from FPATH could leave a file + descriptor open has been fixed. +10-09-28 +A new compile option SHOPT_FIXEDARRAY has been added and is being + evaluated. It allows fixed-size indexed arrays be to defined + using "typeset array[dim1][dim2]...[dimn]". Fixed-size arrays + are used the same way indexed arrays are. Currently, only fixed + arrays of fixed objects (float, int, and justified objects) are + supported. +10-09-22 A bug which could cause an exception when a function with static + variables was redefined has been fixed. +10-09-21 A bug in the processing of (command&) which created a job in the + parent process has been fixed. +10-09-21 A for loop optimization bug with arithmetic expression evaluation + has been fixed. +10-09-21 A bug in which a recursive function containing a pipeline could + lead to an exception fixed after 8 levels of recursion has been + fixed. +10-09-18 A bug in which the count of elements in an array was wrong leading + to an exception has been fixed. +10-09-13 A bug which occurred when both xtrace and showme options where + specified in which the xtrace option disabled showme has been fixed. +10-09-13 A bug in which creating a reference to an array variable with any + elements could cause subsequent array elements to be treated as + compound variables has been fixed. +10-09-09 A bug which caused ((c.ar[x][y])) to be treated as a syntax error + has been fixed. +10-09-08 A bug in the processing of references to multidimensional arrays + in arithmetic expressions has been fixed. +10-09-08 A bug in the handling of multidimensional arrays which caused + the number of elements in each dimension to be incorrect has + been fixed. +10-09-07 The change for messages on 10-08-09 did not handle message in + assignments and this has been fixed. +10-09-07 A bug in the indentation of compound variables in arrays when + output with print -v has been fixed. +10-09-07 A rare bug with indexed arrays when assigned a null string that could + cause a core dump has been fixed. +10-09-03 A number of changes were made for jobs pools. +10-08-31 typeset -p was modified to output name references after other + variables so that the output could be used as input. +10-08-31 A bug with typeset -p in which variables with attributes but + without attributes were not displayed correctly has been fixed. +10-08-27 +When running a subshell, the current pool is unset. +10-08-27 A bug in which jobs started from within for or while lists in + interactive shells could generate completion messages has been fixed. +10-08-25 Fixed a couple of bugs related to job pools. +10-08-24 +[[ -e /dev/xxx/ ]] can be used to check whether special files of + those names are handled by the shell. +10-08-24 A bug in the running of a compiled dot script in which only the + first command was executed has been fixed. +10-08-23 A bug which sometimes caused a core dump with a configure script + has been fixed. +10-08-20 A bug in command substitution which caused a configure script to + hang has been fixed. +10-08-19 Eliminated unnecessary ; from output of compound variable with + typeset -p. +10-08-17 Fixed a bug in command substitution in which under certain + circumstances a file whose size is a power of 2 plus one, and the last + character was not a new-line, could cause memory corruption. +10-08-13 +Added static discipline functions to type similar to C++ static + class functions. +10-08-11 A bug in time when applied to a pipeline in which the shell did + not wait for all elements of the pipeline to complete has been fixed. +10-08-11 Restored sh_fmtq() quoting to not quote NAME= in NAME=VALUE. +10-08-09 +Modified the expansion of message strings, $"...", so that they + are expanded each time they are referenced rather than expanding + them when the script is compiled or read in. +10-08-06 +The process ID for jobs in job pools is now of the form poolname.n + where n is the jobid in that pool. Commands that accept job names + or numbers now understand names in this format. +10-08-05 A bug in which an assignment from within an arithmetic expression + inside a function would create a local variable has been fixed. +10-08-04 A bug in the expanding of variables whose names contain multibyte + characters has been fixed. +10-08-04 A bug which caused an exception when processing scripts compiled + with shcomp -n has been fixed. +10-08-02 Tests using very small buffer sizes uncovered a number of bug most + connected with here documents which have been fixed. +10-07-27 The format modifier , used for digit grouping with d and f formats + has been documented. +10-07-26 cd '' now produces and error rather than changing to the current + directory. +10-07-26 A bug in multi-byte locales which the last character of a + multi-byte character is a \ or pattern character which could occur + when the character was the last character of a command substitution + has been fixed. +10-07-23 Another bug in the processing of ${var:offset;len} in multi-byte + locales when len is larger than the number of characters has been + fixed. +10-07-23 Many coding changes have been made to eliminate most of the uses + of global variables in the shell code. +10-07-22 Fixed a bug in which discipline functions were not being invoked + when it was invoked as ref.discipline where ref was a name reference + to an array instance. +10-07-22 Fixed a bug in which discipline functions were not being invoked it + was invoked on a two dimensional array, i.e., arr[5][9].discipline. +10-07-19 Fixed a buffering problem which occurred when running a script with + ssh and the parent ssh process is killed. +10-07-14 Modified the parser to treat ((...)) inside [[ ... ]] as ( (...) ) so + that it is a nested (...). +10-07-09 A bug in the handling of process substitution inside command + substitution as part of a pipeline has been fixed. +10-07-07 A bug in the output for compound variables containing + multidimensional arrays has been fixed. +10-07-06 ksh now recovers from changes made by bash to the history file without + losing history commands. +10-06-25 A bug in which a large here document containing command substitutions + of a dynamically loaded function that contained a here document + could get truncated has been fixed. +10-06-24 If after executing a script found in FPATH, if a function, builtin, + or type name corresponding to that script is not defined, the shell + now outputs an error message and returns value 126. +10-06-23 Floating point functions that happened to return integer values + were being treated as if the function returned integers so that + integer division could be used instead of floating point division. +10-06-22 Fixed a bug in earlier ksh93u in which an arithmetic assignment to a + variable in the global scope would instead create a local variable if + the variable had an attribute but did not have a value. +10-06-18 Modified trap handling so that if the same signal is received when + executing the handler, it is deferred until the handler completes. +10-06-16 Fixed a bug in which ulimit -v was setting the CPU limit + on Linux. +10-06-14 +The command 'typeset -T' now generates the list of type definitions + in a format that can be used as input to the shell. +10-06-09 Put in patch from Solaris for output quoting with %q. +10-06-09 +Made changes to the NAMESPACE compile option so that it now seems + to work. With this option, namespace { command;} will + run command in the namespace .name so that all variables and + functions created by command are accessible outside the name + space via .name.var and .name.fun. Variables and functions that + are not in the namespace are not modified when running command. +10-06-07 Change most internal interfaces to take Sh_t* argument. +10-06-03 +Types can be loaded on first reference by putting definitions in + PFPATH. +10-06-03 +The shell is now able to parse commands which use type statements + before the typeset -T command to define the type executes. +10-06-03 A bug in the quoting for name reference declarations which did + not properly handle [ and ] in subscripts for associative arrays. +10-06-02 A bug in which a discipline function defined by a type instance to + override the default was not being registered has been fixed. +10-06-02 A bug in which read -C of an associative array of compound variables + was not working has been fixed. +10-06-02 A bug in which the error message for an unset parameter with set -u + did not contain the name of the variable has been fixed. +10-06-01 A bug in typeset -m for moving an indexed array instance to a variable + has been fixed. +10-06-01 A bug in which caused memory to be freed twice when unset was called + for an indexed array that had get or set disciplines has been fixed. +10-06-01 A bug in which the %b format of printf was not preserving NUL bytes + with \0 has been fixed. +10-06-01 A bug in the handling of name references to array variables in + arithmetic expressions has been fixed. +10-05-28 Fixed bugs in changing attributes for two dimensional arrays. +10-05-28 Eliminated a few unreferenced variables and a reference to + uninitialized memory. +10-05-27 Rewrote the subshell code to avoid using pipes an many cases. +10-05-24 Fixed a bug which cause an exception when both -l and -s were + specified with typeset -i. +10-05-21 Inputting of three dimensional indexed arrays with ( ( (...)...)...) + was not working and has been fixed. +10-05-21 A bug in which adding the attributes -Ai to a variable via a name + reference could cause the value to display incorrectly has been fixed. +10-05-21 A bug in which using $var inside ((...)) did not work when var was + a hex float variable. +10-05-20 +The compile option SHOPT_EDPREDICT has been added. When this option + is on, as you type a line beginning with a # the following characters + are treated as a shell pattern and cause matching lines from the + history file to be displayed as a numbered list as you type. + You can scroll up and down this list or you can use nTAB + to make this the current line (n defaults to 1 of omitted) or + n to execute. +10-05-20 A bug which caused an exception when multiple levels of composite + functions in arithmetic expressions has been fixed. +10-05-19 <<< with an empty string no longer gives an error. +10-05-19 A bug in arithmetic evaluation when a name reference to an array + instance was used has been fixed. +10-05-14 A bug in which the shell treats a valid indexed array assignment, + typeset -a x=(foo (x=3;y=4) bar) as a syntax error has been fixed. +10-05-13 A bug in creating name references to associative array variable + after a lookup of one of its elements has been fixed. +10-05-12 Two bugs in the handling of function static type variables in + subshells have been fixed. One could cause an exception and the + other would leave side effects in the parent shell. +10-05-10 A bug in which static variables in functions were not being saved and + restored properly when running subshells has been fixed. +10-05-05 A bug in which print -v did not work correctly when an operand was an + indexed array element referring to a compound variable has been fixed. +10-05-05 A change to improve performance by special casing empty string + assignments to avoid repeated malloc() and free(). +10-05-05 A bug in which creating a name reference to a non-existent associative + array element would create the array element has been fixed. +10-05-04 A bug in which name references to static variables in the static + scope were not found has been fixed. +10-04-30 Do not use socketpair() on systems that implement ioctl(I_PEEK) + on pipes. +10-04-29 +When the current job pool is set, coprocess are run in a job pool. +10-04-28 A type defined with a member foo that is an associative array without + elements followed by an expansion ${bar.foo[a]} and an assignment + bar.foo[a]=b, no longer indicates that ${#bar.foo[@]} has 0 members. +10-04-27 Another bug in which a nested command substitution could hang if it + generated too much data has been fixed. +10-04-26 A type defined with a member that is an indexed array without elements + would behave as if the 0th element of each instance was defined after + a non-zero element was specified and this has been fixed. +10-04-26 A bug in which types defined in a subshell were not undefined when + the subshell completed has been fixed. +10-04-23 For file completion in command line editing, file names starting + with # are now escaped so that they are not treated as comments. +10-04-23 A bug in which ${t.var:=value}, where t is an instance of a type + variable, could assign value to the type variable rather than to + the type instance has been fixed. +10-04-23 +Added &| which can be used in place of | to have portions of a + pipeline executed in the pool. +10-04-22 +The .sh.pool variable was added for use with job pools. +10-04-22 A bug in which a nested command substitution could hang if it + generated too much data has been fixed. +10-04-20 A bug which corrupted one byte of memory when read was called with + reads that did not use a delimiter has been fixed. +10-04-19 The display of a compound variable with an embedded array with + attributes was sometimes not working correctly and has been fixed. +10-04-16 A bug in which attributes were not be propagated to elements in + an associative array has been fixed. +10-04-15 A bug which caused scripts containing user defined math functions to + fail to compile with shcomp has been fixed. +10-04-15 +Job pools have been added with the SHOPT_COSHELL compilation option. + A job pool allows a collection of background jobs to run either locally + or remotely and to be managed as a unit. The command '& name ...' + creates or uses a named job pool for subsequent background jobs. + kill, wait, and jobs allow the pool name as operands. +10-04-14 A bug in which a coprocess connection could terminate prematurely + when running a nested subshell has been fixed. +10-04-12 +Enumeration constants can be used in arithmetic expressions with the + ==, != and = operators when the left hand side is an enum variable + and the right hand side is an enumeration constant. +10-04-07 A bug in which setting the trap on CHLD to ignore could cause + an incorrect exit status has been fixed. +10-04-06 A bug in which LINENO was not incremented for a here-document when + the here-document word was followed by a comment has been fixed. +10-04-06 The optimization that execs the last process of a script rather + than creating a new process has been removed when a trap on + interrupt has been set. +10-04-06 Unsetting the 'C', 'A' or 'a' typeset attribute now produces an + error message rather than generating an exception. +10-04-06 A bug in which .sh.name contained the subscript and .sh.subscript + was empty in some cases with discipline functions on array instances + has been fixed. +10-04-05 A bug in the edit modes where preceding the interrupt character with + the literal next character did not work has been fixed. +10-04-05 A bug in the creation of type instances of arrays which could cause + an exception has been fixed. +10-03-30 A bug in the display of a compound variable containing an indexed + array of compound variables has been fixed. +10-03-24 +Arithmetic functions can be defined using the shell function syntax, + 'function .sh.math.name x y z{...}' , where name is the function name + invoked within ((...)) and x y z are long double arguments passed + as name references. y and z are used for functions with two and + three arguments respectively. The value of the function is the value + of the long double .sh.value variable when the function returns. +10-03-24 A bug in which integer division was mistakenly used when the + numerator was a binary operator with the first operand floating + point and the second integer, e.g. (.1**3)/3, has been fixed. +10-03-24 The >; file operator was modified so that the temporary file is + created in the same physical directory as file. +10-03-23 A warning message was added to sh -n when $var was used inside + ((...)) instead of var. +10-03-19 fmin was added to the list of math function on the man page. +10-03-19 Fixed the return value for unalias when the alias did not + exist. +10-03-19 A bug in which the SHLVL variable exported the value it had on + input rather than the incremented value has been fixed. +10-03-19 A bug which causes whence -q to go into an infinite loop has been + fixed. +10-03-19 Removed space between Stopped message and (SIGTTIN) and (SIGTTOUT). +10-03-17 Modified profile shell execution so that when builtins that + correspond to executable have extended attributes, they are + executed by pfksh instead of being treated as built-ins. +10-03-16 A bug in whence -a which produced duplicate lines of output has + been fixed. +10-03-16 A bug in the handling of process groups in monitor mode for + command substitutions has been fixed. +10-03-15 Fixed a bug in which read -u[fd] could cause the shell to core + dump when fd was greater than open_max. +10-03-15 +Modified the shell I/O so that the shell will not fail if the + ulimit for open_max is increased as part of the script. +10-03-12 A bug in which a here-document containing command substitutions + that contained here-documents did not process correctly has been + fixed. +10-03-12 A bug in which the terminal is not restored to canonical mode + after read times out when in a multibyte locale with no edit mode + enabled has been fixed. + +10-03-05 --- Release ksh93t+ --- +10-03-05 A variable unset memory leak has been fixed and tests/leaks.sh + has been added to verify the fix. +10-03-04 Documentation, comment, and diagnostic spelling typos corrected. +10-02-14 Fix sh_getenv() initialization to cooperate with the 3d fs. +10-02-12 A bug in which the get discipline function was not invoked for + associative array subscripts for unset array elements has been fixed. +10-02-12 A bug which could occur if the last line of a script was an eval + that executed multiple commands has been fixed. +10-02-02 A buffer overflow in read and another in binary type base64 + encoding were fixed. +10-01-20 A bug in the evaluation of arithmetic expression in which the + subscript was evaluated twice for $((foo[x++]++)) has been fixed. +10-01-19 A workaround for a double-free of a trap in both a subshell and its + parent has been added. +10-01-18 A bug in type handling of typeset -H has been fixed. +10-01-15 The "adding empty subscript" warning now only emitted with -x set. +10-01-01 A bug in the parser in which '$((case i in i):;esac);:))' was not + parsed correctly was fixed. +10-01-01 A bug in the parser in which '$(( 2 , 3.6 ))' dumped core for locales + with radix char , and thousands separator . has been fixed. +09-12-28 A bug in the handling of SIGCLD on systems that generated SIGCLD + while blocked waiting for process to complete has been fixed. +09-12-24 AST setlocale() reworked to differentiate env var changes from user + override. +09-12-18 A bug with the SHOPT_BGX option set which disabled traps for signals + < SIGCHLD when a trap for a signal > SIGCHLD was set has been fixed. +09-12-18 A bug where [[ -v var ]] was incorrect for some variables (including + LC_* vars) has been fixed. +09-12-15 A bug that produced a syntax error when a multibyte character + straddled a buffer boundary has been fixed. +09-12-11 A bug where the subscript of an unset variable was not evaluated has + been fixed. +09-12-09 A bug where shcomp dumped core on certain syntax errors has been fixed. +09-12-07 A bug where a parent shell environment var reset in a subshell removed + the value in subsequent children of the parent shell has been fixed. +09-12-04 A bug in which in some cases a trap in a function executed in + a subshell could trigger twice has been fixed. +09-12-03 A bug in which SHLVL exported with some attributes could cause + the shell to abort at startup has been fixed. +09-12-02 A bug with pipefail in which the shell could hang waiting for the + writer to complete before the last reader command has been fixed. +09-11-30 A bug in which a trap could be inherited by the first element of + a pipeline when the command had more than 63 arguments that did + not contain any macro expansions has been fixed. +09-11-19 When read from a terminal was called from with a while or for loop, + and an edit mode was on, a backspace or erase no longer will + overwrite the prompt. +09-11-17 +Change .paths parse to handle BUILTIN_LIB=foo BUILTIN_LIB=foo-1.2. +09-11-17 Inside a function, typeset foo.bar will bind foo to global variable + foo if local variable foo does not exist, instead of creating a + local variable. +09-11-17 "read -n1" from the terminal has been fixed to read exactly one character. +09-11-11 Job control now works for subshell commands, (...). +09-11-11 If set -e is on for an interactive shell errors in special builtins + now cause the shell to exit. +09-11-11 A bug in which an interrupt handler processed during the read builtin + when IFS did not contain a new line has been fixed. +09-11-09 A bug in which a variable that has been unset in a subshell and then + exported from that subshell does not show up in the environment + has been fixed. +09-11-02 ``,2'' is now a valid numeric constant for locales with + decimal_point=','. +09-11-02 A bug where "return" in .profile did not restore the shell state + has been fixed. +09-10-31 A bug that corrupted saved exit status when PIDs wrapped around has + been fixed. +09-10-26 A bug in { LANG LC_ALL LC_category } ordering has been fixed in -last. +09-10-16 A bug where notification to libast that the environment has changed + has been fixed. +09-10-12 A bug in which a function loaded in a subshell could leave side + effects in the parent shell has been fixed. +09-10-12 A bug in converting a printf %d operand to a number when the operand + contains multiple subscripts for the same variable has been fixed. +09-10-09 A bug in the handling of the escape character \ in directory prefixes + in command completion has been fixed. +09-10-09 $PATH processing has been changed to delay dir stat() and .paths + lookup until the directory is needed in the path search. +09-09-28 Call the AST setlocale() intercept on unset too. +09-09-24 A bug in which LANG=foo; LC_ALL=foo; unset LC_ALL; did not revert + LC_CTYPE etc. to the LANG value has been fixed. +09-09-17 A bug in which unsetting SVLVL could cause a script invoked by + name without #! to core dump has been fixed. +09-09-16 A bug in which a pipeline in a here-document could hang when the + pipefail option was on has been fixed. +09-09-09 A bug in the processing of line joining in here documents which + occurred when a buffer began with has been fixed. +09-09-09 +A leading ; with commands in a brace group or parenthesis group + no longer causes an error. It now is used for the "showme" option. +09-09-09 A bug in which a subshell containing a background process could + block until the background process completed has been fixed. +09-09-04 A bug in handling ${var[sub]}, where var is a nameref has been fixed. +09-09-03 A bug which caused an indexed array to have the wrong number of elements + when it was converted from a compound variable by adding an another + element has been fixed. +09-09-03 Specifying export for a compound variable now generates an error. +09-09-02 $"..." localizations strings are no longer recognized inside `...`. +09-09-01 A bug in the for loop optimizer in the handling of type static + variables has been fixed. +09-09-01 An error message is not displayed when * and @ are used as subscripts. +09-09-01 Several bugs in the processing for types that included an associative + array of another type has been fixed. +09-09-01 A bug in the tracing of [[ a < b ]] and [[ a > b ]] has been fixed. +09-08-26 The .sh.file variable was not being set for a script that was run + by name and didn't start with #! and this has been fixed. +09-08-25 A bug in which a function called to deeply from command substitution + did not display an error message has been fixed. +09-08-24 +When processing profiles, ksh93 now violates the POSIX standard and + treats &> as a redirection operator similar to bash. +09-08-23 A bug in the handling of the trap on SIGPIPE that could lead to a + memory fault has been fixed. +09-08-21 A bug in the handling of the comma operator in arithmetic expressions + that could cause a core dump on some systems has been fixed. +09-08-20 A bug in which a compound variable containing an array of a type + that doesn't have any elements now expands correctly. +09-08-19 A bug which disabled function tracing inside a function after + a call to another function has been fixed. +09-08-19 A bug in which initializing a compound variable instance to another + compound variable by name has been fixed. +09-08-18 A bug in which compound variable instances could be lost after + an instance that invoked a type method discipline has been fixed. +09-08-18 A bug in which a discipline function for a type applied to an + array instance when invoked in a function ignored the subscript + has been fixed. +09-08-18 A scoping error with variables in arithmetic expression with + type variables when reference with a name reference has been fixed. +09-08-10 Several memory leaks were fixed primarily related to subshells. +09-08-06 A bug in which setting the trap on CHLD to ignore could cause + a script to hang has been fixed. +09-07-08 A bug in the processing of name reference assignments when it + contained pattern expansions with quoting has been fixed. +09-06-22 +The default width for typeset -X has been changed so that there + should be no loss of precision when converting to a string. +09-06-19 A bug in the printing of array elements for binary variables with + printf %B has been fixed. +09-06-19 A bug which caused a core dump with trap DEBUG set with an array + assignment with no elements has been fixed. +09-06-19 A bug with read with typeset -b -Z has been fixed. +09-06-19 Two bugs related to read -b for array variables has been fixed. +09-06-19 A bug with typeset for compound variables containing arrays of + compound variables has been fixed. +09-06-18 A bug in appending a compound variable to an indexed array of + compound variables has been fixed. +09-06-18 A bug which occurs when appending a compound variable to an indexed + array element has been fixed. +09-06-18 Setting VISUAL to a value other than one ending in vi or emacs will + no longer unset the edit mode. +09-06-17 A bug in typeset -m when moving a local compound variable to a + global compound variable via a name reference has been fixed. +09-06-17 A bug in appending to nodes of an array of compound variables when + addressing them via nameref has been fixed. +09-06-17 A bug in typeset -p var, when var is an array of compound variables + in which the output only contained on array element has been fixed. +09-06-17 The prefix expansion ${!y.@} now works when y is a name + reference to an element of an array. +09-06-16 Traps on signals that are ignored when the shell is invoked + no longer display. Previously they were ignored as required but + would be listed with trap -p. +09-06-12 A bug in vi edit mode in which hitting the up arrow key at the + end of a line longer than 40 characters which caused a core dump + has been fixed. +09-06-11 A bug in which "eval non-builtin &" would create two processes, + one for the & and another for non-builtin has been fixed. +09-06-08 When var is an identifier and is unset, ${var} no longer tries to + run command substitution on the command var. +09-06-08 +Process substitution arguments of the form <(command) can now be + used following the < redirection operator to redirect from command. +09-05-13 A bug in which redirections of the form 2>&1 1>&5 inside command + substitution could cause the command substitution to hang has been + fixed. +09-05-12 To conform with POSIX, the -u option only checks for unset variables + and subscript elements rather than checking for all parameters. +09-05-12 A bug which could cause a core dump when a variable whose name + begins with a . was referenced as part of a name reference inside + a function has been fixed. +09-05-01 A bug that caused a core dump when SIGWINCH was received and + both vi and emacs mode were off has been fixed. +09-04-22 +Default alias compound='typeset -C' added. +09-04-15 A bug that caused ${...;} to hang for large files has been fixed. +09-04-08 A change was made in the -n option which printed out an incorrect + warning with <>. +09-04-07 The emacs edit command M-_ and M_. and the vi command _ was fixed + to handle the case there there is no history file. +09-04-05 A bug in handling new-lines with read -n has been fixed. +09-04-05 The ENV variable defaults to the file named by $HOME/.kshrc rather + then to the string $HOME/.kshrc. +09-03-31 A bug in which a nested command substitution with redirections could + leave a file descriptor open has been fixed. +09-03-24 +ksh now only uses the value of the _ variable on startup if it can + verify that it was set by the invoking process rather than being + inherited by some other ancestor. +09-03-24 +When ksh is invoked without -p and RUID != EUID, and the shell is + compiled without SHOPT_P_UID or RUID < SHOPT_P_UID, the shell now + enables the -p option. The previous version instead set the + EUID to the RUID as it does for set +p. +09-03-24 +When SHOPT_P_UID is defined at compile time and the shell is started + without -p and RUID != EUID and RUID >= SHOPT_P_UID then EUID is set + to RUID. A bug that did the wrong test (RUID < SHOPT_P_UID) was fixed. +09-03-17 +The sleep(1) builtin now accept and ISO 8601 PnYnMnDTnHnMnS + duration or date(1) compatible date/time operand. +09-03-10 If a variable that was left or right justified or zero-filled was + changed with a typeset statement that was left or right justified + or zero-filled, then the original justification no longer affects + the result. +09-03-10 A bug in the handling of traps when the last command in a script + is a subshell grouping command has been fixed. +09-03-03 A bug in which an expansion of the form ${!prefix@} could generate + an exception after the return from a function has been fixed. +09-02-02 A bug in restricted mode in which the value of ENV could be + changed from within a function has been fixed. +09-02-02 A bug in which an erroneous message indicating that a process + terminated with a coredump has been fixed. +09-02-02 The exit status when exit was called without an argument from + a signal handler was incorrect and has been fixed. +09-02-02 A bug in which a function autoloaded in a subshell could cause + a core dump when the subshell completed has been fixed. +09-02-02 A bug in which 2>&1 inside a command substitution wasn't working + correctly has been fixed. +09-02-02 A bug in the call stack of arithmetic function with 2 args + returning int has been fixed. +09-01-30 A bug in which 'eval print \$0' inside a function was giving the + wrong value for $0 has been fixed. +09-01-28 A bug in which a command substitution could return an exit status + of 127 when the pipefail option is enabled has been fixed. +09-01-26 ksh93 now generates an error message if you attempt to create + a global name reference to a local variable. +09-01-26 +The [[ -v var ]] operator was modified to test for array elements. +09-01-23 +The redirection operator <>; was added. It is similar to <> + except that if the command it is applied to succeeds, the file + is truncated to the offset at the command completion. +09-01-23 The default file descriptor for <> was changed to 1. +09-01-20 A bug in which the exit status specified in an exit trap was + not used when a process terminated with a signal has been fixed. +09-01-19 A bug in which a signal whose default action is to terminate + a process could be ignored when the process is running a subshell + has been fixed. +09-01-19 A bug in which sending SIGWINCH to a process that reads from a pipe + could cause a memory fault has been fixed. +09-01-16 +The -R unary operator was added to [[ ... ]] and test to check whether + a variable is a name reference. +09-01-16 +The -v unary operator was added to [[ ... ]] and test to check whether + a variable is set. +09-01-14 The unset built-in was modified to return 0 exit status when + unsetting a variable that was unset to conform with the POSIX + standard. +09-01-14 The unset built-in was modified to continue to unset variables + after encountering a variable that it could not unset to + conform to the POSIX standard. +09-01-14 The parameter expansion ${x+value} no longer expands the value of + the variable x when determining whether x is set or not. +09-01-13 A bug in which background jobs and pipelines that were not waited + for could, in rare instances, cause the shell to go into an infinite + loop or fail has been fixed. +09-01-06 A bug in indexed arrays of compound variables in which referencing + non-existent sub-variable in an arithmetic expression could cause + the sub-variable to be created has been fixed. +09-01-05 A bug in which the \ character did not escape extended regular + expression pattern characters has been fixed. +08-12-24 A bug in which killing the last element of a pipe did not cause + a write to the pipe to generate a SIGPIPE has been fixed. +08-12-19 A bug which could cause command substitution to hang when the + last element of a pipeline in a command substitution was a built-in + and the output was more that PIPE_BUFF. +08-12-18 A bug which occurs when a here documented marker embedded in a + command substitution occurs on a buffer boundary has been fixed. +08-12-17 A bug in the output of typeset -p for variables that had attributes + but did not have a value has been fixed. +08-12-16 A bug in which a name reference to a name reference variable that + references an array element has been fixed. +08-12-16 A bug in which a variable given both the -A and -C attribute along + with an initial assignment didn't work correctly has been fixed. +08-12-10 The [[ -t fd ]] test was fixed to handle fd>9. +08-12-10 A bug where function stack misalignment could cause a bus error + has been fixed. +08-12-09 Command completion was changed to use \ to quote special characters + instead of quoting the argument in single quotes. +08-12-07 A bug in typeset -m which occurred when the target node was an + associative array element has been fixed. +08-12-07 A timing bug on some systems (for example Darwin), that could + cause the last process of a pipeline entered interactively to fail + with an "Exec format error" has been fixed. +08-12-04 +SHOPT_BGX enables background job extensions. Noted by "J" in + the version string when enabled. (1) JOBMAX=n limits the number + of concurrent & jobs to n; the n+1 & job will block until a + running background job completes. (2) SIGCHLD traps are queued + so that each completing background job gets its own trap; $! is + set to the job PID and $? is set to the job exit status at the + beginning of the trap. (3) sleep -s added to sleep until the time + expires or until a signal is delivered. +08-12-04 The sign of floating point zero is preserved across arithmetic + function calls. +08-12-04 A bug that caused print(1) to produce garbled stdout/stderr + output has been fixed. +08-12-04 A bug in which printf "%d\n" "''" did not output the + numerical value of the EURO symbol, 8354, has been fixed. +08-11-24 + /dev/fd* and /dev/std* redirections are first attempted with + open() to preserve seek semantics; failing that the corresponding + file descriptors are dup()'d. +08-11-20 A bug which could cause a core dump if a function compiled with + shcomp was found has been fixed. +08-11-20 A bug in which jobs were not cleared from the jobs table for + interactive shells when the pipefail option is on has been fixed. +08-11-11 A bug in which a field that was unset in a type definition and later + set for an instance could appear twice when displaying the variable + has been fixed. +08-11-11 A bug in which running a simple command & inside a function would + not return the correct process ID has been fixed. +08-11-10 A bug in which the exit status of a command could be lost if the PID + was that of the most recent command substitution that had completed + has been fixed. +08-11-10 The maximum depth for subshells has been increased from 256 to 65536. +08-11-06 A bug which could cause a core dump when the _ reference variable was + used as an embedded type with a compound assignment has been fixed. + +08-10-31 --- Release ksh93t --- +08-10-31 Variable scoping/initialization bugs that could dump core were fixed. +08-10-24 The lexer now accepts all RE characters for patterns prefixed + with a ksh ~(...) option expression. +08-10-24 +For ${var/pat/sub} \0 in sub expands to the text matched by pat. +08-10-18 A bug in array scoping that could dump core has been fixed. +08-10-10 read -n and -N fixed to count characters in multibyte locales. +08-10-10 A bug that mishandled _.array[] type references has been fixed. +08-10-09 +${.sh.version} now contains a concatenation of the following (after + 'Version') denoting compile time features: + A SHOPT_AUDIT + B SHOPT_BASH + L SHOPT_ACCT + M SHOPT_MULTIBYTE +08-10-09 A bug that caused subshell command substitution with redirection + to hang has been fixed. +08-10-08 Output errors, other than to stderr, now result in a diagnostic. +08-10-08 ksh93 now supports types that contain arrays of other types as + members. Earlier versions core dumped in this case. +08-10-05 A bug which caused the shell to emit a syntax error for an arithmetic + statement of the form (( var.name[sub] = value)) has been fixed. +08-10-01 A bug that caused subshell command substitution to hang has + been fixed. +08-09-29 When the -p export option of typeset is used with other options, + only those variables matching the specified options are displayed. +08-09-29 When the shell reads the environment and finds variables that are + not valid shell assignments, it now passes these on to subsequent + commands rather than deleting them. +08-09-29 A bug in the display of compound variables containing an indexed + array of compound variables has been fixed. +08-09-29 A bug in the display of compound variables containing an associative + array with a subscript containing a . in the name has been fixed. +08-09-26 A core dump in the subshell environment restore has been fixed. +08-09-24 $(...) has been fixed to properly set the exit status in $?. +08-09-23 $(<...) with IFS=$'\n\n' has been fixed to retain all but the last + of multiple trailing newlines. +08-09-23 The -p option to typeset when used with other attributes, restricts + the output to variables with the specified attributes. +08-09-22 A bug that sometimes lost the exit status of a job has been fixed. +08-09-21 A bug that retained trailing command substitution newlines in + cases where the command caused the shell to fork has been fixed. +08-09-19 type, whence -v, and command -v were fixed to comply with POSIX + by writing 'not found' diagnostics to the standard error. +08-09-18 test and [ ... ] were fixed to comply with POSIX in the case + of test '(' binop ')' where binop is a valid binary test operator. +08-09-16 +If a method discipline named create is specified when defining a + type, this function will be called when an instance is created. +08-09-15 +The variable _ is now set as a reference to the compound variable + when defining a compound variable or a type. +08-09-10 The shell now prints an error message when the type name specified + for an indexed array subscript is not an enumeration type. +08-09-10 A bug in which a subshell that spawned a background process could + lose output that was produced after the foreground completed + has been fixed. +08-09-10 A timing bug on some systems that could cause coprocesses started by a + subshell to not clean up and prevent other coprocesses has been fixed. +08-09-09 The typeset -m option is now able to rename array elements from + the same array. +08-09-09 The exit status of 2 from the DEBUG trap causes the next command + to be skipped. An exit value of 255 from a DEBUG trap called from + a function causes the function to return. +08-09-08 A bug in which a coprocess created in a subshell that did not + complete when the subshell terminated could prevent a coprocess + from being created in the parent shell has been fixed. +08-09-05 An assignment of the form name1=name2 where name1 and name2 + are both compound variables causes name1 to get a copy of name2. + name1+=name2 causes name2 sub-variables to be appended to name1. +08-09-05 A bug in which unsetting a compound variable did not unset all + the sub-variables has been fixed. +08-09-01 A bug in the subshell cleanup code that could cause SIGSEGV has + been fixed. +06-08-26 +The SHLVL variable which is an environment variable used by bash + and zsh that gets incremented when the shell starts. +08-08-25 +For an indexed array, a negative subscript now refers to offsets + from the end so that -1 refers to the last element. +08-08-24 An alignment error for shorts on 64 bit architectures has been fixed. +08-08-22 If oldvar is a compound variable, typeset -C newvar=oldvar creates + newvar as a copy of oldvar. +08-08-19 +The ALRM signal no longer cause the sleep builtin to terminate. +08-08-13 When used in an arithmetic expression, the .sh.version variable + now produces a number that will be increasing for each release. +08-08-11 A bug in which type instantiation with a compound assignment in + a dot script in which the type is defined has been fixed. +08-08-07 +The -m option has been added to typeset to move or rename a + variable. Not documented yet. +08-08-06 A bug in read when used in a loop when a prompt was specified + when reading from a terminal has been fixed. +08-08-01 A bug with the pipefail option in which a nested pipeline could + cause an asynchronous command to block has been fixed. +08-08-01 A for loop optimizer bug that treats .sh.lineno as an invariant + has been fixed. +08-07-30 A bug in which expanding compound variable that had a get discipline + from with a here document could cause a syntax error has been fixed. +08-07-18 A bug in which a nameref caused a local variable to be created + rather than binding to an existing variable in the global scope + has been fixed. +08-07-17 A bug which occurred when a nameref was created from within a + function that was part of a pipeline has been fixed. +08-07-14 +The compile option SHOPT_STATS was added. With this option the + compound variable .sh.stats keeps usage statistics that could help + with performance tuning. +08-07-10 +The output of set now always uses a single line for each variable. + For array variables, the complete set of values is now displayed. +08-07-09 +The typeset -C option can be used with arrays to indicate that + each element should default to a compound variable. +08-07-08 +The %B format now outputs compound variables and arrays. The + alternate flag # can be used to cause output into a single line. +08-07-03 When the window change signal, WINCH, is received, the current + edit line is redrawn in place. +08-07-01 A bug in the handling of shared variables when inside an embedded + type has been fixed. +08-06-29 A bug in multiline edit mode which occurred when the prompt length + was three characters or less has been fixed. +08-06-23 A bug in which the SIGCLD was not be triggered when background + jobs completed has been fixed. +08-06-23 _KSH_VERSION added as a name reference to .sh.version. +08-06-20 type now outputs 'special builtin' for special builtins. +08-06-19 A couple of bugs in multidimensional arrays have been fixed. +08-06-19 A bug in which a syntax error in a dot script could generate + a syntax error in the next subsequent command has been fixed. +08-06-17 Reduced the maximum function call depth to 2048 to avoid exceptions + on some architectures. +08-06-16 A bug in which printf "%B" could generate an exception when the + specified variable was not set has been fixed. +08-06-16 +When typeset -p is followed by variable names, it now displays + the attributes names and values for the specific names. +08-06-14 A bug that could affect the drawing of the screen from multiline + emacs or gmacs mode when walking up the history file has been fixed. +08-06-13 A bug in which a compound variable defined in a subshell could + have side effects into the parent shell has been fixed. +08-06-13 A number of bugs related to using .sh.level to set the stack from + for DEBUG traps have been fixed. +08-06-13 +The .sh.lineno variable has been added. When .sh.level is changed + inside a DEBUG trap, the .sh.lineno contains the calling line number + for the specified stack frame. +08-06-13 The .sh.level variable has been documented and now works. +08-06-11 +The -C option has been added to read for reading compound command + definitions from a file. +08-06-11 +The . command is now permitted inside a compound command definition. + The dot script can contain declaration commands and dot commands. +08-06-09 +Add -C option to typeset so that typeset -C foo, is equivalent + to foo=(). +08-06-09 Added -n warning message for typeset option orderings that are valid + with ksh88 but not valid with ksh93, for example Lx5. +08-06-09 A bug in which the return value for an assignment command containing + a command substitution with that failed was zero when the assignment + contained redirections has been fixed. +08-06-09 A bug in the quoting of $ inside an ERE pattern ~(E)(pattern) + has been fixed. +08-06-06 A bug when processing `` command substitution with the character + sequence \$' has been fixed. +08-06-02 +When defining a type, the typeset -r attribute causes this field + to be required to be specified for each instance of the type and + does not allow a default value. +08-06-02 Several bugs in which compound variables were modified by + subshells have been fixed. +08-05-22 +The ceil function has been added to the math functions. +08-05-21 A bug in which a name reference defined in a function and passed + as an argument to another function could cause an incorrect binding. +08-05-21 A bug in freeing compound variables that are local to functions + has been fixed. +08-05-19 +The array expansions ${array[sub1..sub2]} and ${!array[sub1..sub2]} + to expand to the value (or subscripts) for array between sub1 and + sub2 inclusive. For associative arrays, the range is based on + location in the POSIX locale. The .. must be explicit and cannot + result from an expansion. +08-05-15 The trap on SIGCLD is no longer triggered by the completion of + the foreground job as with ksh88. +08-05-14 A bug in the implementation of the editing feature added on + 07-09-19 in emacs mode has been fixed. +08-05-12 A bug in processing the test built-in with parenthesis has been + fixed. +08-05-12 The unset built-in now returns non-zero when deleting an array + subscript that is not set. +08-05-08 +Changing the value of HISTFILE or HISTSIZE will cause the old + history file to be close and reopened with the new name or size. +08-05-08 When FPATH is changed functions that were found via a path search + will be searched for again. +08-05-08 A parser bug in which reserved words and labels were recognized + inside compound indexed array assignment after a new-line has + been fixed. +08-05-07 A bug in getopts when handling numerical option arguments has + been fixed. +08-05-07 +The typeset -S option was added for variables outside type + definitions to provide a storage class similar to C static + inside a function defined with function name. When outside + type definitions and outside a function, the -S option cause + the specified variable so be unset before the assignment and + before the remaining attributes are supplied. +08-05-07 A bug that affected the cursor movement in multiline mode when + a character was deleted from near the beginning of the any + line other than the first. +08-05-01 In multiline edit mode, the refresh operation will now clear + the remaining portion of the last line. +08-05-01 A bug in computing prompt widths for the edit modes for prompts + with multibyte characters has been fixed. +08-05-01 A bug in the multiline edit mode which could cause the current + line to be displayed incorrectly when moving backwards from third + or higher line to the previous line has been fixed. +08-05-01 A bug in which options set in functions declared with the function + name syntax were carried across into functions invoked by these + functions has been fixed. +08-04-30 A bug which could cause a coprocess to hang when the read end + is a builtin command has been fixed. +08-04-30 +The emacs and vi editors have been modified to handle window + change commands as soon as they happen rather than waiting for + the next command. +08-04-28 A bug in which ${!x} did not expand to x when x was unset has been + fixed. +08-04-27 A bug in which the assignment x=(typeset -a foo=([0]=abc)) created + x.foo as an associative array has been fixed. +08-04-25 A bug in which $# did not report correctly when there were more + than 32K positional parameters has been fixed. +08-04-04 Choose the name _ as the sub-variable that holds type or instance + specific data used by discipline functions. +08-03-27 A bug in which the terminal group was not given back to the parent + shell when the last part of a pipeline was handled by the parent shell + and the other parts of the pipeline complete has been fixed. + The symptom was that the pipeline became uninterruptible. +08-03-25 A bug in restricted mode introduced in ksh93s that caused scripts + that did not use #! to executed in restricted mode has been fixed. +08-03-25 A bug in which the pipefail option did not work for a pipeline + within a pipeline has been fixed. +08-03-24 A bug in which OPTIND was not set correctly in subshells has + been fixed. +08-03-24 A bug which could cause a memory exception when a compound variable + containing an indexed array with only element 0 defined was expanded. +08-03-20 A bug in which ${!var[sub].*} was treated as an error has been fixed. +08-03-20 Associative array assignments of the form ([name]=value ...) + now allow ; as well as space tab and new line to separate elements. +08-03-18 A buffering problem in which standard error was sometimes + not flushed before sleep has been fixed. +08-03-17 A bug in which a signal sent to $$ while in a subshell would be + sent to the subshell rather than the parent has been fixed. +08-03-17 + A --default option added to set(1) to handle set +o POSIX semantics. + set --state added as a long name alias for set +o. +08-03-14 A bug in which using monitor mode from within a script could + cause the terminal group to change has been fixed. +08-03-10 The new ${...} command substitution will treat the trailing } + as a reserved word even if it is not at the beginning of a command, + for example, ${ date }. +08-03-10 If the name of the ENV begins with /./ or ././ then the + /etc/ksh.kshrc file will not be executed on systems that support + this interactive initialization file. +08-03-07 A bug in which ksh -i did not run the ENV file has been fixed. +08-03-07 A bug in which ulimit did not always produce the same output as + ulimit -fS has been fixed. +08-03-04 A bug in multiline mode in emacs and vi mode which could cause the + cursor to be on the wrong line when interrupt was hit has been fixed. +08-03-03 The change made in ksh93s+ on 07-06-18 in which braces became + optional for ${a[i]} inside [[ ... ]] was restored in the case + where the argument can be a pattern. +08-03-03 A bug in which creating a name reference to an associative array + instance would fail when the subscript contained characters [ or + ] has been fixed. +08-02-29 +The redirection operator >; has been added which for non-special + files, generates the output in a temporary file and writes the + specified file only of the command has completed successfully. +08-02-15 A bug in ${var/pattern/string} for patterns of the form ?(*) and +(*) + has been fixed. +08-02-07 A bug in which test \( ! -e \) produced an error has been fixed. +08-02-14 +The typeset -a option can now optionally be followed by the name + of an enumeration type which allows subscripts to be enumerations. +08-02-14 +The enum builtin which creates enumeration types has been added. +08-02-12 The backoff logic when there are no more processes has been fixed. +08-02-07 The -X option has been added to typeset. The -X option creates + a double precision number that gets displayed using the C99 %a + format. It can be used along with -l for long double. +08-01-31 The -T option to typeset has been added for creating typed + variables. Also the -h and -S options have been added to + typeset that are only applicable when defining a type. +08-01-31 The prefix expansion operator @ has been added. ${@name} + expands to the type of name or yields the attributes. +07-11-15 A bug in the macro expander for multibyte characters in which + part of the character contains a file pattern byte has been fixed. +07-10-03 A bug in which : was not allowed as part of an alias name has been + fixed. +07-09-26 A bug in which appending a compound variable to a compound variable + or to an indexed array didn't work has been fixed. +07-09-19 In both emacs and vi edit mode, the escape sequence \E[A (usually + cursor up, when the cursor is at the end of the line will fetch + the most recent line starting with the current line. +07-09-18 The value of ${!var} was correct when var was a reference to an + array instance. +07-09-18 The value of ${!var[sub]} was not expanding to var[sub] and this + was fixed. It also fixed ${name} where name is a name reference + to var[sub]. +07-09-18 +It is now legal to create a name reference without an initialization. + It will be bound to a variable on the first assignment. +07-08-30 +A discipline function can be invoked as ${x.foo} and is equivalent + to ${ x.foo;} and can be invoked as x.foo inside ((...)). +07-07-09 A bug in which typeset -a did not list indexed arrays has been + fixed. +07-07-03 +The command substitution ${ command;} has been added. It behaves + like $(command) except that command is executed in the current + shell environment. The ${ must be followed by a blank or an + operator. + +08-04-17 --- Release ksh93s+ --- +08-04-17 A bug in which umask was not being restored correctly after a + subshell has been fixed. +08-04-15 A bug in which sending a STOP signal to a job control shell started + from within a shell function caused cause the invoking shell to + terminate has been fixed. +08-04-11 A bug which caused $(exec > /dev/null) to go into an infinite loop + has been fixed. +08-03-27 A bug in which typeset -LZ was being treated as -RZ has been fixed. +08-03-06 A bug with ksh -P on systems that support the profile shell, + in which it would exit after running a non-builtin has been fixed. +08-01-31 A bug in which command substitution inside ((...)) could cause + syntax errors or lead to core dumps has been fixed. +08-01-17 A bug in which discipline functions could be deleted when invoked + from a subshell has been fixed. +08-01-17 A bug in which a command substitution consisting only of + assignments was treated as a noop has been fixed. +08-01-17 A bug in which discipline functions invoked from within a + compound assignment could fail has been fixed. +08-01-16 Incomplete arithmetic assignments, for example ((x += )), now + generate an error message. +08-01-16 A bug in which a set discipline defined for a variable before + an array assignment could cause a core dump has been fixed. +08-01-03 A bug in on some systems in which exit status 0 is incorrectly + returned by a process that catches the SIGCONT signal is stopped + and then continued. +07-12-13 A race condition in which a program that has been stopped and then + continued could lose its exit status has been fixed. +07-12-12 Code to check for file system out of space write errors for all + writes has been added. +07-12-11 A bug in the macro expander for multibyte characters in which + part of the character contains a file pattern byte has been fixed. +07-12-06 A bug in the emacs edit mode when multiline was set that output + a backspace before the newline to the screen has been fixed. +07-12-04 A bug in which using TAB after a variable name listing expansion + in the edit modes would cause the $ to disappear has been fixed. +07-11-28 A bug in which setting IFS to readonly could cause a subsequent + command substitution to fail has been fixed. +07-11-27 A work around for a gcc 4.* C99 "feature" that could cause a job + control shell to go into an infinite loop by adding the volatile + attribute to some auto vars in functions that call setjmp(). +07-11-27 A bug in which the shell could read ahead on a pipe causing the + standard input to be incorrectly positioned has been fixed. +07-11-27 A bug in which compound variable UTF-8 multibyte values were not + expanded or traced properly has been fixed. +07-11-21 A bug where an unbalanced '[' in a command argument was not treated + properly has been fixed. +07-11-15 A bug in which compatibility mode (no long option names) getopts(1) + incorrectly set the value of OPTARG for flag options has been fixed. +07-11-15 A bug in which "hash -- name" treated "--" as an invalid name operand + has been fixed. +07-11-15 typeset now handles "-t -- [-r] [--]" for s5r4 hash(1) compatibility. +07-11-15 A bug in which the umask builtin mishandled symbolic mode operands + has been fixed. +07-11-15 Bugs in which shell arithmetic and the printf builtin mishandled the + signs of { -NaN -Inf -0.0 } have been fixed. +07-11-15 +The full { SIGRTMIN SIGRTMIN+1 ... SIGRTMAX-1 SIGRTMAX } range + of signals, determined at runtime, are now supported. +07-11-15 A bug in which creating an indexed array with only subscript 0 created + only a simple variable has been fixed. +07-11-14 A bug in which appending to an indexed array using the form + name+=([sub]=value) could cause the array to become an associative + array has been fixed. +07-11-14 A bug in which typeset without arguments could coredump if a + variable is declared as an indexed array and has no elements has + been fixed. +07-11-14 A bug in which creating a local SECONDS variable with typeset in + a function could corrupt memory has been fixed. +07-11-14 A bug which could cause a core dump when a script invoked by name + from a function used compound variables has been fixed. +07-11-05 A bug in which printf %d "'AB" did not diagnose unconverted characters + has been fixed. +07-11-05 printf %g "'A" support added for all floating point formats. +07-11-01 A bug in which typeset -f fun did not display the function definition + when invoked in a subshell has been fixed. +07-10-29 The sleep builtin was fixed so that all floating point constants + are valid operands. +07-10-10 A bug in which the locale was not being restored after + LANG=value command has been fixed. +07-09-20 A bug in which a nameref to a compound variable that was local + to the calling function would not expand correctly when displaying + is value has been fixed. +07-09-19 A bug which could cause a core dump if .sh.edchar returned + 80 characters or more from a keyboard trap has been fixed. +07-09-14 A bug in which could cause a core dump when more than 8 file + descriptors were in use has been fixed. +07-09-10 A bug in which creating a name reference to an instance of + an array when the array name is itself a reference has been fixed. +07-09-10 The file completion code has been modified so that after an = in + any word, each : will be considered a path delimiter. +07-09-06 A bug in which subprocess cleanup could corrupt the malloc() heap + has been fixed. +07-08-26 A bug in which a name reference to an associative array instance + could cause the subscript to be evaluated as an arithmetic expression + has been fixed. +07-08-22 A bug in which the value of an array instance was of a compound + variable was not expanded correctly has been fixed. +07-08-14 A bug which could cause a core dump when a compound assignment was + made to a compound variable element with a typeset -a attribute + has been fixed. +07-08-08 A bug in which a trap ignored in a subshell caused it to be + ignored by the parent has been fixed. +07-08-07 A bug in which the set command would generate erroneous output + for a variable with the -RZ attribute if the variable name had been + passed to a function has been fixed. +07-08-02 A bug in which read x[1] could core dump has been fixed. +07-08-02 A second bug in which after read x[sub] into an associative array + of an element that hasn't been assigned could lead to a core dump + has been fixed. +07-07-31 A bug in which a pipeline that completed correctly could have + an exit status of 127 when pipefail was enabled has been fixed. +07-07-09 +The SHOPT_AUDIT compile option has been added for keyboard logging. +07-06-25 In vi insert mode, ksh no longer emits a backspace character + before the carriage return when the newline is entered. +07-06-25 A bug in which pipefail would cause a command to return 0 + when the pipeline was the last command and the failure happened + on a component other than the last has been fixed. +07-06-25 A bug in the expansion of ${var/pattern/rep} when pattern or rep + contained a left parenthesis in single quotes has been fixed. +07-06-18 The braces for a subscripted variable with ${var[sub]} are now + optional when inside [[ ... ]], ((...)) or as a subscript. +07-05-28 A bug in brace expansion in which single and double quotes did + not treat the comma as a literal character has been fixed. +07-05-24 The -p option of whence now disables -v. +07-05-23 Several bug fixes in compound variables and arrays of arrays + have been made. +07-05-15 A bug in which the %B format of printf was affected by the + locale has been fixed. +07-05-14 A bug in which \ was not removed in the replacement pattern with + ${var/pattern/rep} when it was not followed by \ or a digit has + been fixed. +07-05-10 A bug in which ksh -R file core dumped if no script was specified + has been fixed. it not displays an error message. +07-05-07 Added additional Solaris signals to signal table. +07-04-30 A bug in which a pipeline with command substitution inside a + function could cause a pipeline that invokes this function to + hang when the pipefail option is on has been fixed. +07-04-30 +Added -q to whence. +07-04-18 A small memory leak with each redirection of a non-builtin has + been fixed. +07-03-08 A bug in which set +o output command line options has been fixed. +07-03-08 A bug in which an error in read (for example, an invalid variable + name), could leave the terminal in raw mode has been fixed. +07-03-06 A bug in which read could core dump when specified with an array + variable with a subscript that is an arithmetic expression has + been fixed. +07-03-06 Several serious bugs with the restricted shell were reported and + fixed. +07-03-02 If a job is stopped, and subsequently restarted with a CONT + signal and exits normally, ksh93 was incorrectly exiting with + the exit status of the stop signal number. +07-02-26 +M-^L added to emacs mode to clear the screen. +07-02-26 A bug in which setting a variable readonly in a subshell would + cause an unset error when the subshell completed has been fixed. +07-02-19 +The format with printf uses the new = flag to center the output. +07-02-19 A bug in which ksh93 did not allow multibyte characters in + identifier names has been fixed. +07-02-19 A bug introduced in ksh93 that causes global compound variable + definitions inside functions to exit with "no parent" has been fixed. +07-02-19 A bug in which using compound commands in process redirection + arguments would give syntax errors <(...) and >(...) has been fixed. +07-01-29 A bug which caused the shell to core dump which can occur when a + built-in exits without closing files that it opens has been fixed. +07-01-26 A bug in which ~(E) in patterns containing \ that are not inside () + has been fixed. + +06-12-29 --- Release ksh93s --- +06-12-29 A bug in which the value of IFS could be changed after a command + substitution has been fixed. +06-12-22 +/dev/(tcp|udp|sctp)/HOST/SEVRICE now handles IPv6 addresses on + systems that provide getaddrinfo(3). +06-12-19 +A -v option was added to read. With this option the value of + the first variable name argument will become the default value + when read from a terminal device. +06-11-20 A bug in which "${foo[@]:1}}" expands a null argument (instead of + no argument), when foo[0] is not empty has been fixed. +06-11-16 The discipline functions have been modified to allow each subscript + to act independently. Currently, the discipline function will not + be called when called from a discipline function of the same variable. +06-11-14 A bug which could cause a core dump if a file descriptor for + an internal file was closed from with a subshell has been fixed. +06-10-30 +The redirections <# pattern, and <## pattern have been added. + Both seek forward to the beginning of the next line that contains + the pattern. The <## form copies the skipped portion to standard + output. +06-10-26 +On systems that support stream control transport, the virtual file + name /dev/sctp/host/port can now be used to establish connections. +06-10-26 +The printf modifier # when used with d produces units in thousands + with a single letter suffix added. The modifier # when used with + the i specification provides units of 1024 with a two letter suffix. +06-10-24 The value of $! is now set to the process ID of a job put + into the background with the bg command as required by POSIX. +06-10-23 A bug in which the value of $! was affected by a background + job started from a subshell has been fixed. +06-10-23 A bug in ${var:offset:len} in multibyte locales has been fixed. +06-10-15 +The remaining math functions from C99 were added for any system + that supports them. +06-10-13 The klockwork.com software detected a few coding errors that + have been fixed. +06-10-12 A bug when skipping over `...` with ${x:=`...`} when x is set + has been fixed. +06-10-11 A bug in process floating constants produced by the %a format + of printf has been fixed. +06-10-06 A bug in which IFS was not being restored correctly in some + cases after a subshell has been fixed. +06-10-06 A bug in which pipefail was not detecting some failures in + pipelines with 3 or more states has been fixed. +06-10-03 A bug in the processing of >(...) with builtins which could + cause the builtin to hang has been fixed. +06-10-03 A bug in the for loop optimizer which causes >(...) process + substitution to be ignored has been fixed. +06-09-17 +The -a option was added to typeset for indexed arrays. This + is only needed when using the ([subscript]=value ...) form. +06-09-06 +The showme option was added. Each simple command not beginning + with a redirection and not occurring with in the while, until, if, + select condition can be preceded by a semicolon which will + be ignored when showme is off. When showme is on, any command + preceded by a colon will be traced but not executed. +06-08-16 +As a new feature, a leading ~(N) on a pattern has no effect + except when used for file expansion. In this case if not + matches are found, the pattern is replaced by nothing rather + than itself. +06-08-11 A bug in the expansion of ${.sh.match[i]:${#.shmatch[i]}} has + been fixed. +06-08-10 +The read builtin options -n and -N have been modified to treat + the size as characters rather than bytes unless storing into a + binary (typeset -B) variable. +06-07-27 +When the here document operator << is followed directly by a # + rather than a -, the first line of the here-document determines + how much whitespace is removed for each line. +06-07-26 A bug in the C-shell history (enabled with set -H) in which the + history event !$ was not processed has been fixed. +06-07-21 A bug on some systems in which assigning PATH on a command line + would not take effect has been fixed. +06-07-20 Add ksh93 and rksh93 as allowable names for ksh binaries. +06-07-20 Removed the SHOPT_OO compilation option which was only partially + implemented. +06-07-20 The ability to use egrep, grep, and fgrep expressions within + shell patterns has been documented. +06-07-17 A bug with arithmetic command expressions for locales in which + the comma is a thousands separator has been fixed. +06-07-13 +The default HISTSIZE was increased from 128 to 512. +06-07-13 A multibyte problem with locales that use shift codes has been fixed. +06-06-23 A number of bug fixes for command, file, and variable completion + have been mode. +06-06-20 +Floating point division by zero now yields the constant Inf or -Inf + and floating functions with invalid arguments yield NaN. +06-06-20 +The floating point constants Inf and NaN can be used in arithmetic + expressions. +06-06-20 +The functions isinf(), isnan(), tanhl() have been added for + arithmetic expressions. +06-06-13 Internal change to use ordering for variables instead of hashing + to speed up prefix matching. +06-06-13 A window between fork/exec in which a signal could get lost + and cause a program to hang has been eliminated +06-06-13 A bug in edit completion with quoted strings has been fixed. +06-06-07 The restricted options can now be enabled by set as well as on + the command line. Once set, it can not be disabled. +06-06-04 Modified built-in binding so that for systems for which /bin + and /usr/bin are the same, a builtin bound to /bin will get + selected when either /bin or /usr/bin is scanned. +06-06-04 +Added literal-next character processing for emacs/gmacs mode. + This change is not compatible with earlier versions of ksh93 + and ksh88 when the stty lnext is control-v. The sequence + escape-control-v will display the shell version. +06-05-31 +Modified emacs and vi mode so that entering a TAB after a partial + TAB completion, generates a listing of possible completions. + After the second TAB, a number followed by a TAB will perform + the completion with the corresponding item. +06-05-19 +Modified arithmetic so that conversions to strings default to + the maximum number of precision digits. +06-05-16 Bug fixes for multibyte locales. +06-05-10 The =~ operator was added to [[ ... ]] and [[ string ~= ERE ]] + is equivalent to [[ string == ~(E)ERE ]]. +06-04-25 A bug in the vi edit mode which could cause the shell to core dump + when switching from emacs mode. +06-04-17 A bug in which using LANG or LC_ in assignment lists with builtins + did not restore the locale correctly has been fixed. +06-04-04 A bug in which discipline functions could not be added to variables + whose names started with .sh has been fixed. +06-03-28 +The -s option to typeset was added to modify -i to indicate short + integers. +06-03-28 A bug in which variables assignment lists before functions + defined with function name were not passed on the functions + invoked by this function has been fixed. +06-03-28 A bug in which name references defined within a function defined + with function name could not be used with compound variables has + been fixed. +06-03-27 A bug in which read <&p (print >&p) would cause the coprocess input + (output) pipe to close before reading from (after writing to) + it has been fixed. +06-02-28 A bug in which stopping a job created with the hist builtin command + would create a job that could not be restarted has been fixed. + +06-01-24 --- Release ksh93r --- +06-01-24 A bug in which running commands with standard output closed would + not work as expected has been fixed. +06-01-23 A bug in which print -u could fail when file descriptor was + open for writing has been fixed. +06-01-19 The ?: arithmetic operator fixed to work when the operation after + the colon was an assignment. +05-12-24 A bug which could lead to a core dump when elements of a compound + variable were array elements, i.e. foo=(bar=(1 2)), has been fixed. +05-12-13 An arithmetic bug in which x+=y+=z was not working has been fixed. +05-12-13 An arithmetic bug in which x||y was returning x when x was non-zero + rather than 1 has been fixed. +05-12-07 +The aliases for integer and float have been changed to use attributes + -li and -lE to handle long long and long double types. +05-12-07 +The histexpand (-H) option has been added which allows C-shell + style history expansions using the history character !. +05-12-07 +The multiline option was added which changes that way the edit + modes handle lines longer than the window width. Instead of + horizontal scrolling, multiple lines on the screen are used. +05-12-05 The whence builtin now returns an absolute pathname when the + command is found in the current directory. +05-11-29 A bug which caused ksh -c '[[ ! ((' to core dump rather than + report a syntax error has been fixed. +05-11-29 A bug when reading fixed length records into typeset -b variables + which caused a zero byte to terminate the value has been fixed. +05-11-22 +The ability to seek to an offset within a file has been added + with the new I/O redirection operators, <# and >#. Currently, + these redirection operators must be followed by ((expr)) + but in a future release, it should be able to used to seek forward + to the specified shell pattern. In addition $(n<#) expands to the + current byte offset for file descriptor n. +05-11-22 +The .sh.match array variable is now set after each [[ ... ]] + pattern match. Previously it was only set for substring matches. +05-10-17 A bug in which the library path variable could be prefixed + with a directory when a .path file was not encountered in + the directory of the executable has been fixed. +05-09-15 A for/while loop optimizer bug in which $OPTIND was not + correctly expanded has been fixed. +05-09-05 A bug in which a history command that invoked a history + command could go into an infinite loop has been fixed. +05-08-31 +In the case that IFS contains to adjacent new-lines so that + new-line is not treated as a space delimiter, only a single + new-line is deleted at the end of a command substitution. +05-08-19 +When a tilde expansion expands to the / directory and is + followed by a /, it is replaced by the empty string. +05-08-16 A bug in which n<&m did not synchronize m has been fixed. +05-08-16 A bug in which process substitution ( <() and >() ) was not + working within for and while loops has been fixed. +05-07-24 A bug in which the pattern ~(E)(foo|bar) was treated as a syntax + error has been fixed. +05-07-24 A bug in completion with =, where n was the one of the + previous selection choices has been fixed. +05-07-21 A bug with multibyte input when no edit mode was specified which + caused the input line to shift left/right has been fixed. +05-06-24 A race condition which could cause the exit status to get lost + on some fast systems has been fixed. +05-06-21 A bug in which nested patterns of the form {m,n}(pat) would cause + syntax errors has been fixed. +05-06-21 A bug in the macro expander has been fixed which could cause a + syntax error for an expansion of the form ${x-$(...)} when + x is set and the command substitution contained certain strings. +05-06-08 +On systems for which echo does not do System V style \ expansions, + the -e option was added to enable these expansion. +05-06-08 A bug in which ${var op pattern} to not work when inside an + arithmetic expression has been fixed. +05-05-23 +An extension to shell patterns that allows matching of nested + groups while skipping over quoted strings has been added. +05-05-18 A bug in which the line number for errors was not correct for + functions loaded from FPATH has been fixed. +05-04-18 A bug in which the exit status $? is not set when a trap triggered + by the [[ ... ]] command is executed has been fixed. +05-04-08 +Redirection operators can be directly preceded with {varname} + with no intervening space, where varname is a variable name which + allows the shell to select a file descriptor > 10 and store it + into varname. +05-04-08 +SHOPT_CMDLIB_BLTIN=1 now includes generated table. +05-04-07 +[[ -o ?option ]] is true if "option" is a supported option. +05-04-05 A bug in handling file completion with spaces in the names + has been fixed. +05-03-25 +The SIGWINCH signal is caught by default to keeps the LINES and + COLUMNS variables in sync with the actual window size. +05-03-25 +Building ksh with SHOPT_REMOTE=1 causes ksh to set --rc if stdin is + a socket (presumably part of a remote shell invocation.) +05-03-25 +Building ksh with SHOPT_SYSRC=1 causes interactive ksh to source + /etc/ksh.kshrc (if it exists) before sourcing the $ENV file. +05-03-25 +{first..last[..incr][%fmt]} sequences added to brace expansions + when braceexpand is enabled. +05-03-03 A bug where a SIGCHLD interrupt could cause a fifo open to fail has + been fixed. +05-02-25 A bug in which a builtin command run in the background could + keep a file descriptor open which could cause a foreground + process to hang has been fixed. +05-02-24 A bug where builtin library commands (e.g., date and TZ) failed to + detect environment variable changes has been fixed. +05-02-22 +The read builtin and word splitting are now consistent with respect + to IFS -- both treat IFS as field delimiters. +05-02-22 +The read builtin no longer strips off trailing delimiters that + are not space characters when there are fewer variables than fields. +05-02-17 A builtin bug on systems where dlsym(libcmd) returns link-time + bindings has been fixed. +05-02-12 A bug in which the lib_init() function for .paths BUILTIN_LIB + libraries was not called has been fixed. +05-02-06 A bug on some systems in which moving the write end of a co-process + to a numbered file descriptor could cause it to close has been fixed. +05-02-06 A bug in the vi-edit mode in which the character under the cursor + was not deleted in some cases with the d% directive has been fixed. +05-02-06 A bug where external builtin stdout/stderr redirection corrupted + stdout has been fixed. +05-02-04 A bug where times formatting assumed CLK_TCK==60 has been fixed. + +05-01-11 --- Release ksh93q --- +05-01-11 A bug in the integral divide by zero check has been fixed. +05-01-11 +The -l option has been added to read /etc/profile and + $HOME/.profile, if they exist, before the first command. +05-01-11 An argument parsing bug that caused `kill -s x -- n' to fail has + been fixed. +05-01-11 +The .paths file, introduced in ksh93m, which can appear in + any directory in PATH, now allows a line of the form 'BUILTIN_LIB=.' + When a command is searched for this directory, and the full path + matches the path of the built-in version of the command (listed + by the 'builtin' command) then the built-in version of the command + is used. When ksh is built with SHOPT_CMDLIB_DIR=1 then all libcmd + functions become builtins with the '/opt/ast/bin/' directory prefix. +05-01-10 A bug in which a nameref to a compound name caused a core dump has + been fixed. +05-01-09 A bug in which some SIGCHLD interrupts (from child processes exiting) + caused a fatal print/echo error diagnostic has been fixed. +04-12-24 A bug in which some SIGCHLD interrupts (from child processes exiting) + corrupted the internal process/job list, sometimes causing the shell + to hang, has been fixed. +04-12-01 A bug in which typeset -Fn truncated less than n digits for large + numbers has been fixed. +04-11-25 A bug in which standard error could be closed after a redirection + to /dev/stderr has been fixed. +04-11-17 A bug in which an expansion of the form ${array[@]:3} could expand + to ${array[0]} when ${array[3]} was not set has been fixed. +04-10-22 +The -E or -orc command line option reads ${ENV-$HOME/.kshrc} file. +04-10-22 +`-o foo' equivalent to `+o nofoo', `-o nobar' equivalent to `+o bar'. + `--foo' equivalent to `-o foo', `--nofoo' equivalent to `+o foo' +04-10-05 +The .paths file, introduced in ksh93m, which can appear in + any directory in PATH, now allows a line of the form + 'BUILTIN_LIB=libname'. When a command is searched for this directory, + the shared library named by libname will first be searched for a + built-in version of the command. +04-09-03 <<< here documents now handle quotes in the word token correctly. +04-08-08 +The maximum size for read -n and read -N was increased from + 4095 to 32M. +04-08-04 +printf %q was modified so that if an no operand was supplied, no + no output would be generated rather than a quoted empty string. +04-08-01 +The -n and -N options of the read builtin has been modified + when reading variables with the binary attribute so that the + data is stored directly rather than through assignment. +04-08-01 +The shcomp command has been modified to process alias commands + under some conditions. +04-07-31 +The .sh.match variable added in ksh93l, now works like other + indexed arrays. +04-07-08 A loop optimizer bug which occurs when typeset is used in + a for or while loop inside a function has been fixed. +04-06-24 +The number of subexpressions in a pattern was increased to 64 + from the current number of 20. +04-06-17 +The -t option to read was modified to allow seconds to be + specified as any arithmetic expression rather than just + an integral number of seconds, for example even -t 'sin(.5)' + is now valid. +04-06-16 Two small memory leak problems were fixed. +04-06-15 A bug in ${var/pattern/"string"} which occurred when string + contained pattern matching characters has been fixed. +04-05-08 printf $'%d\n' produced an erroneous error message and has + been fixed. +04-05-24 A bug in which an associative array without any elements could + cause a core dump when a script with an associative array with + the same name was declared in a script invoked by name has + been fixed. +04-05-11 A bug in which an exec statement could close the script that + is being processed in a script that is run by name causing + a failure has been fixed. +04-04-28 +If the first character of assignment to an integer variable was 0, + the variable had been treated as unsigned. This behavior was + undocumented and has been removed. +04-04-05 A bug in which the positioning of standard input could be incorrect + after reading from standard input from a subshell has been fixed. +04-03-30 A bug in the for loop optimizer which in rare cases could cause + memory corruption has been fixed. +04-03-29 +The preset alias source='command .' has been added. +04-03-29 A bug introduced in ksh93p on some systems in which invoked by + name with #! on the first line would not get the signals handling + initialized correctly has been fixed. +04-03-29 A bug introduced in ksh93p in which a HUP signal received by + a shell that is a session group leader was not passed down to + its children has been fixed. + +04-02-28 --- Release ksh93p --- +04-02-28 +The ability to apply an append discipline to any variable has + been added. +04-02-14 A bug in which the exportall option (set -a) would cause incorrect + results for arrays has been fixed. +04-02-02 A bug in which an exported array would pass more than + the first element to a script invoked by name has been fixed. +04-02-02 A bug on some systems in which name=value pairs preceding a script + invoked by name was not getting passed to the script has been fixed. +04-01-20 A bug in which an unset discipline function could cause a core + dump on some systems has been fixed. +04-01-12 A bug in which a continue or break called outside a loop from + inside a function defined with name() syntax could affect + the invoking function has been fixed. +04-01-08 If a command name begins with ~, only filename completion will be + attempted rather than pathname completion using the builtin editors. +04-01-08 A bug in the vi edit mode in which the wrong repeat count on + multiple word replacements with the . directive has been fixed. +04-01-06 Backspace characters are now handled correctly in prompt strings. +04-01-06 +The getopts builtin has been modified to accept numerical + arguments of size long long on systems that support this. +04-01-06 A bug in which unsetting all elements of an associative array + would cause it to be treated as an indexed array has been fixed. +03-12-15 A bug in which a quoted string ending with an unescaped $ would + delete the ending $ in certain cases has been fixed. +03-12-05 A bug in which the shell could hang when set -x tracing a command + when an invalid multibyte character is encountered has been fixed. +03-12-05 On some systems, if the KEYBD trap is set, then commands that use + the meta key were not processed until return was hit. This + has been fixed. +03-12-05 A problem which occurred when the login shell was not a group + leader that could cause it to fail has been fixed. +03-12-05 A problem in which a shell could core dump after receiving a signal + that should cause it to terminate while it was in the process + of acquiring more space has been fixed. +03-12-05 +If ENV is not specified, the shell will default to $HOME/.kshrc + for interactive shells. +03-11-21 A bug introduced in ksh93o in which the DEBUG trap could get + disabled after it triggered has been fixed. +03-11-04 A bug in which using arithmetic prefix operators ++ or -- on a + non-lvalue could cause a core dump has been fixed. +03-11-04 A bug in which leading zeros were stripped from variable + expansions within arithmetic computation to avoid being treated + as octal constants when they should not have, has been fixed. +03-10-08 A bug introduced in ksh93o in which a large here document inside + a function definition could get corrupted has been fixed. +03-09-22 A bug in which the .get discipline function was not being + called when a string variable was implicitly referenced from + within a numerical expression has been fixed. +03-09-22 A bug in which a script without a leading #! could get executed + by /bin/sh rather than the current shell on some systems has + been fixed. +03-09-12 +To improve conformance with ksh88, leading zeros will be ignored + when getting the numerical value of a string variable so that + they will not be treated as octal constants. +03-09-03 +The builtin kill command now processes obsolete invocations + such as kill -1 -pid. +03-09-02 The restriction on modifying FPATH in a restricted shell (sh -r) + has been documented. +03-09-02 +The restricted shell (sh -r) has been modified to disallow + executing command -p. +03-08-07 A bug in which the KEYBD trap was not being invoked when + characters with the 8th bit set has been fixed. +03-08-02 A parser bug introduced in ksh93o which caused the character + after () in a POSIX function definition to be skipped + when reading from standard input has been fixed. +03-08-01 A bug in which "${foo#pattern}(x)" treated (x) as if it were + part of the pattern has been fixed. +03-08-01 +The command -x option has been modified so that any trailing + arguments that do expand to a single word will be included + on each invocation, so that commands like command -x mv * dir + work as expected. + +03-07-20 --- Release ksh93o+ --- +03-07-20 A bug in which could cause memory corruption when a POSIX + function invoked another one has been fixed. +03-07-15 A bug in which a file descriptor>2 could be closed before + executing a script has been fixed. +03-07-15 A parsing error for <() and >() process substitutions inside + command substitution has been fixed. +03-07-15 A parsing error for patterns of the form {...}(...) when + used inside ${...} has been fixed. +03-07-15 An error in which expanding an indexed array inside a compound + variable could cause a core dump has been fixed. +03-07-15 A bug in which on rare occasions a job completion interrupt + could cause to core dump has been fixed. +03-06-26 A bug in which process substitution embedded within command + substitution would generate a syntax error has been fixed. +03-96-23 A bug in which ${@:offset:len} could core dump when there + were no arguments has been fixed. +03-96-23 A bug in which ${X[@]:offset:len} could core dump when X + was unset has been fixed. +03-06-22 +The -x option was added to the command builtin. If this + option is on, and the number of arguments would exceed ARG_MAX, + the command will be invoked multiple times with a subset of + the arguments. For example, with alias grep='command -x grep, + any number of arguments can be specified. +03-06-14 A bug in which could cause a core dump on some systems with + vi and emacs editors with the MULTIBYTE option has been fixed. +03-06-06 A bug in which the shell could core dump when a script was + run from its directory, and the script name a symlink to a file + beginning with .., has been fixed. +03-06-05 A bug in which the shell could core dump when a child process + that it is unaware of terminates while it is calling malloc() + has been fixed. +03-06-02 +An option named globstar (set -G) has been added. When enabled, + during pathname expansion, any component that consists only of ** is + matches all files and any number of directory levels. +03-05-30 A bug in which the PATH search could give incorrect results when + run from directory foo and PATH contained .:foo:xxx has been fixed. +03-05-29 +Some changes were made to the code that displays the prompt in edit + mode to better handle escape sequences in the prompt. +03-05-27 I added = to the list of characters that mark the beginning of + a word for edit completion so that filenames in assignments + can be completed. +03-05-20 A bug in which read -N could hang on some systems when reading + from a terminal or a pipe has been fixed. +03-05-19 A bug in which the output of uname from a command substitution + would go to the standard output of the invoking command when + uname was invoked with a non-standard option has been fixed. +03-05-19 A job control bug which would cause the shell to exit because + it hadn't taken back the terminal has been fixed. The bug + could occur when running a function that contained a pipeline + whose last element was a function. +03-05-19 A job control timing bug introduced in ksh93o on some systems + which could cause a pipeline to hang if the first component + completed quickly has been fixed. +03-05-13 +The read builtin has been modified so that the builtin editors + will not overwrite output from a previous incomplete line. +03-05-13 A bug in which the name of an identifier could have the string + .sh. prefixed to it after expanding a variable whose name begins + with .sh. has been fixed. +03-05-13 A bug in the expansion of $var for compound variables in which + some elements would not be output when the name was a prefix + of another name in the compound variable has been fixed. +03-05-08 The last item in the ksh93o release on 03-01-02 has been + altered slightly to preserve the leading 0's when the + preceding character is a digit. Thus, with typeset -LZ3 x=10, + $(( 1$x)) will be 1010 whereas $(( $x) will be 10. +03-04-25 A bug in which if x is a name reference, then nameref y=x.foo + did not follow x has been fixed. + +03-03-18 --- Release ksh93o --- +03-03-18 +A -N unary operator was added to test and [[ ... ]] which returns + true if the file exists and the file has been modified since it + was last read. +03-03-18 +The TIMEFORMAT variable was added to control the format for + the time compound command. The formatting description is + described in the man page. +03-03-06 +A -N n option was added to read which causes exactly n bytes + to be read unlike -n n which causes at most n bytes to be read. +03-03-03 +Three new shell variables were added. The variable .sh.file + stores the full pathname of the file that the current command + was found in. The variable .sh.fun names the current function + that is running. The variable .sh.subshell contains the depth + of the current subshell or command substitution. +03-03-03 +When the DEBUG trap is executed, the current command line after + expansions is placed in the variable .sh.command. The trap + is also now triggered before each iteration of a for, select, + and case command and before each assignment and redirection. +03-02-28 +Function definitions are no longer stored in the history file so + that set -o nolog no longer has any meaning. +03-02-28 +All function definitions can be displayed with typeset -f not + just those stored in the history file. In addition, typeset +f + displays the function name followed by a comment containing the + line number and the path name for the file that defined this function. +03-02-28 A bug in which the value of $LINENO was not correct when executing + command contained inside multi-line command substitutions has been + fixed. +03-02-19 +Since some existing ksh88 scripts use the undocumented and + unintended ability to insert a : in front of the % and # parameter + expansion operators, ksh93 was modified to accept :% as equivalent + to % and :# as equivalent to # with ${name op word}. +03-02-14 A bug which could cause a core dump when reading from standard + error when standard error was a pty has been fixed. +03-02-14 +The shell arithmetic was modified to use long double on systems + that provide this data type. +03-02-09 A bug in which a function located in the first directory in FPATH + would not be found when the last component of PATH was . and the + current directory was one of the directories in PATH has been fixed. +03-02-07 +The trap and kill builtin commands now accept a leading SIG prefix + on the signal names as documented. +03-02-05 A bug in the expansion of ${var/$pattern}, when pattern contained + \[ has been fixed. +03-02-05 A bug in which .sh.match[n], n>0, was not being set for substring + matches with % and %% has been fixed. +03-01-15 A bug in which getopts did not work for numerical arguments specified + as n#var in the getopts string has been fixed. +03-01-09 A bug in which using ${.sh.match} multiple times could lead to + a memory exception has been fixed. +03-01-06 A bug in the expansion of ${var/pattern/$string} in the case that + $string contains \digit has been fixed. +03-01-02 +A -P option was added for systems such as Solaris 8 that support + profile shell. +03-01-02 For backward compatibility with ksh88, arithmetic expansion + with ((...)) and let has been modified so that if x is a zero-filled + variable, $x will not be treated as an octal constant. + +02-12-05 --- Release ksh93n+ --- +02-11-30 A bug that can show up in evaluating arithmetic statements that + are in an autoloaded function when the function is autoload from + another function has been fixed. +02-11-30 An optimization bug in which an expansion of the form ${!name.@}, + which occurred inside a for or a while loop, when name is a name + reference, has been fixed. +02-11-18 A bug in which modifying array variables in a subshell could leave + side effects in the parent shell environment has been fixed. +02-11-18 A memory leak when unsetting an associative array has been fixed. +02-11-14 +The code to display compound objects was rewritten to make + it easier for runtime extensions to reuse this code. +02-11-14 +A change was made to allow runtime builtins to be notified when + a signal is received so that cleanup can be performed. +02-10-31 +User applications can now trap the ALRM signal. Previously, + the ALRM signal was used internally and could not be used + by applications. +02-10-31 A bug in which signals received while reading from a coprocess + for which traps were set was not handled correctly has been fixed. +02-10-31 A bug in which a file opened with exec inside a subshell could + be closed before the subshell completed has been fixed. +02-10-21 A bug in which setting PATH or FPATH inside a function might not + take effect has been fixed. +02-10-21 A bug which could cause a core dump when a local SECONDS variable + is defined in a function has been fixed. +02-10-15 A bug in which the associative array name operator ${!array[@]} + could return the same name multiple times has been fixed. +02-10-15 A bug in which the zero'th element of an associative array was + not getting set when an assignment was made without a subscript + specified has been fixed. + +02-09-30 --- Release ksh93n --- +02-09-30 +The maximum indexed array size was increased to 16Megs. +02-09-30 A bug which could cause a core dump when changing attributes + of associative array has been fixed. +02-09-30 A bug in which exporting an array variable would not export the + 0-th element has been fixed. +02-09-30 A bug in which an array assignment of the form a=($a ...) would unset + 'a' before the right hand side was evaluated has been fixed. +02-09-27 A bug in which the error message for ${var?message} when var was + null or unset did not contain the variable name var has been fixed. +02-09-27 A bug in which closing file descriptors 0 through 2 could + cause a subsequent here document to fail has been fixed. +02-09-14 A bug in whence which occurs when the specified name contained + a / has been fixed. +02-09-14 A bug in the parser for strings of the form name$((expr))=value + has been fixed. +02-09-14 A for loop optimization bug in which the number of elements in + an array was treated as an invariant has been fixed. +02-09-09 A bug in which redirection or closing of a file descriptor between + 3 and 9 could cause a subsequent here document to fail has been + fixed. +02-09-09 A bug in which a background job was not removed from the job list + when a subshell completed has been fixed, for example (prog&). +02-09-03 A bug in which an assignment of the form name=(integer x=3) + could be interpreted as an array assignment rather than a + compound variable assignment has been fixed. +02-08-19 A command completion bug which occurred on file systems that + are case insensitive has been fixed. +02-08-19 A bug which could lead to an exception on some systems (for + example FREEBSD) which occurred when setting PATH has been fixed. +02-08-11 A bug in arithmetic rounding in which a value input as a decimal + string would output as a rounded version of the string has + been fixed. +02-08-11 A bug in which the last character could be deleted from shell + traces and from whence when called from a multibyte locale + has been fixed. +02-08-01 A bug which could cause a core dump to occur when a shell script + is executed while a coprocess is running that has closed the + output pipe has been fixed. +02-08-01 A bug in which command completion in multibyte mode could + corrupt memory for long command lines has been fixed. + +02-06-17 --- Release ksh93n- --- +02-06-17 A bug in which user defined macros could cause a core dump in + with MULTIBYTE mode has been fixed. +02-06-17 A bug in which printf format specifiers of the form %2$s were causing + a core dump has been fixed. +02-06-17 A bug in which setting stty to noecho mode did not prevent the + echoing of characters by ksh when emacs or viraw mode + was enabled has been fixed. +02-06-17 A bug in which background job completion could cause the sleep + builtin to terminate prematurely has been fixed. +02-06-17 A bug in which the shell could core dump if getopts was called + when the OPTIND variable contained a negative value has been fixed. +02-06-10 +The edit mode prompt has been modified to handle escape sequences. +02-06-10 A bug which occurred for interactive shells in which the builtin + cat command was used in command substitution on a file whose + size was larger than PIPE_BUF has been fixed. +02-06-10 A bug in which the trap on ERR was not being processed when + set inside a function has been fixed. +02-06-07 A bug in which function definitions could cause the history count + to be decremented by one (and even become negative) has been fixed. +02-06-05 A bug in read in which share mode could be enabled has been fixed. +02-05-28 A bug which could occur when the last command of a script was + a case statement and the action selected ended in ;& instead of ;; + has been fixed. +02-05-23 A bug with unary + introduced in ksh93k has been fixed. +02-05-07 A bug in substitutions of the form ${var/pattern/string} in which + a backslash was inserted in the replacement string when it contained + a special pattern character has been fixed. +02-05-01 A bug in the emacs edit mode which occurred in versions compiled + for multibyte character sets which occurred when a repeated search + was requested after a long line had been returned for the previous + search has been fixed. +02-04-02 +vi and emacs edit modes were modified so that tab completion is + disabled when invoked from the read built-in. + +02-03-26 --- Release ksh93m+ --- +02-03-26 A bug in which \ was not handled correctly when used in file + expansion has been fixed. +02-02-18 A bug in which lines beginning with a # were deleted from here + documents when the here-document delimiter was followed by + a comment has been fixed. +02-12-06 An optimization bug in which ${!x[@]) was treated as invariant in + a for loop has been fixed. +02-02-06 A bug in which the ERR trap is not cleared for a script invoked + by name from within a function has been fixed. +02-01-08 A bug in which a shell script executed from within a subshell + could cause this script to have an invalid pointer leading + to a memory fault has been fixed. +02-01-07 +Added here documents of the form <<< word (as per zsh) which + is equivalent to << delim\nword\ndelim. +02-01-07 A bug in which the first word of a compound assignment, + x=(word ...), was treated as a reserved word has been fixed. +02-01-07 A bug in the handling of \ when noglob was enabled and a + substitution of the form ${word op pattern} occurred in the + same word has been fixed. +02-01-07 +A compilation option, CMDLIB_BLTIN in the file OPTION, has + been added. When this options is set, all commands implemented + in libcmd become shell builtin commands by default. +02-01-07 A bug in which builtin foo, where foo is already a builtin + would result in the builtin foo getting removed has been fixed. +02-01-07 A bug which the shell executed a command found in the current + directory when PATH have no valid directories has been fixed. +01-11-28 The value of $? was not being set when called with exit. +01-11-28 If the last command was of the form (...) and a trap on EXIT or + ERR was set, and the command inside () modified the trap, then + the original trap wasn't executed. +01-11-26 +The value for 0 is now preceded by the base number when + the base was not 10. +01-11-26 +The default compilation mode has been changed so that + viraw mode will always be on. + +01-10-31 --- Release ksh93m --- +01-10-31 A for loop optimizer bug for subshells contained within for + loops has been fixed. +01-10-16 typeset without arguments no longer outputs variable names + that do not have any attributes that are set. +01-10-16 A bug introduced in ksh93l in which assignments specified with + the exec built-in were not being expanded properly has been + fixed. +01-10-11 An optimization bug in which ${!x) was treated as invariant in + a for loop has been fixed. +01-10-11 Unsigned integer variables in bases other than 10 are printed now + expand in that base with the base prefix. +01-10-10 A number of typos in the self generating man pages for shell + built-ins have been fixed. +01-10-04 The self generated man pages for hist and fc were not working + correctly and have been fixed. +01-10-03 Yet another optimizer bug in which shell patterns were + treated as invariants has been fixed. +01-09-27 Two bugs relating to multibyte history searches and to find + have been fixed. +01-09-27 A bug introduced in ksh93k in which the PATH searching was + not restored after running a command with an assignment list + has been fixed. +01-09-26 A bug in which a zero filled field was treated as octal when + converted to integer has been fixed. +01-09-26 Yet another bug in the optimization of for loops related to + recursive functions with break or continue statements has been fixed. +01-09-25 +The exponentiation operator ** was added to the shell arithmetic + evaluation. It has higher precedence than * and is left + associative. +01-09-25 The code was modified to use the AST multibyte macros + and functions for handling multibyte locales. +01-09-25 +The expansion ${parameter:offset:length} now handles negative + offsets which cause offsets to be measured from the end. +01-09-25 Some spelling errors in the documentation were corrected. +01-09-24 +The /dev/tcp/host/port and /dev/udp/host/port now allow + the ports to be specified by service name. +01-09-24 +The change starting with ksh93g in which the appropriate + library path variable is prepended with a corresponding library + directory has been modified. With the new method, only the + library path defined in the file named .paths in the directory + where the executable is found will be modified. See the + man page for more details. +01-09-23 +The .fpath file (see ksh93h) is no longer looked for in each + directory on the path to locate function directories. The + file named .paths is used instead. +01-09-23 A bug in which IFS was not being restored after being changed in + a subshell has been fixed. +01-09-16 +With the vi and emacs edit modes, after a list of command + or functions is generated with = or M-= respectively, + any element from the list can be pasted on the command line + by preceding the = or M-= with a numeric parameter specifying + the position on the list. +01-09-16 A bug in ksh93l caused command completion not to find aliases + and functions. Command listing from the edit mode was presented + in reverse order. This has been fixed. +01-09-13 Another bug in the optimization of for loops related to subshells + when traps were set has been fixed. +01-09-07 A change in ksh93l caused brace expansion to stop working + and this has been fixed. +01-09-04 A bug introduced in ksh93k in which an arithmetic statement + within a function that used name references did not follow the + reference has been fixed. +01-09-04 A bug introduced in ksh93l in which export -p did not prefix + each export with the word export has been fixed. +01-08-29 A bug in multibyte input which occurred when a partial multibyte + character was received has been fixed. +01-08-29 A bug introduced in ksh93l which could cause a core dump + when an assignment list containing PATH is specified inside + command substitution has been fixed. +01-08-09 Another bug in the optimization of for loops in ksh93l caused + errors in recursive functions using local variables that + contained for loops has been fixed. +01-07-27 A bug in which IFS would be unset after a command substitution + inside a here document has been fixed. +01-07-26 To conform to the POSIX standard, if you invoked ksh name, + and name does not contain a /, it will first try to run + one in the current directory whether it is executable or not + before doing a path search for an executable script. Earlier + versions first checked for an executable script using the + PATH variable. +01-07-23 A bug in which unset -f invoked in a subshell could unset a + function defined in the parent has been fixed. +01-07-16 A bug in the optimization of for loops in ksh93l caused + name references to be treated as invariants has been fixed. +01-07-09 A bug in which a discipline function applied to a local variable + could cause a shell exception has been fixed. Discipline + functions can only be specified for global variables. + +01-06-18 --- Release ksh93l --- +01-06-18 A bug in assigning integers larger than can be represented as + long integers to floating point variables has been fixed. +01-06-18 A bug in the handling of unsigned integers (typeset -ui) has + been fixed. +01-06-04 The evaluation of the PS1 prompt no longer affects the value + of the $? variable. +01-06-01 A small memory leak from subshells has been fixed. +01-05-22 A bug in which attributes for variables that did not have + values would be lost after a subshell has been fixed. +01-05-22 +The %R format has been added to convert a shell pattern into + an extended regular expression. +01-05-22 +The escape sequences \e, \cX, \C[.collating-element.], and + \x{hex} have been added to ASCII-C strings and to printf format + strings. +01-05-20 +Patterns of the form {n}(pattern) and {m,n}(pattern) are now + recognized. The first form matches exactly n of pattern whereas, + the second form matches from m to n instances of pattern. +01-05-20 +The shell allows *-(pattern), +-(pattern), ?-(pattern), + {m,n}-(pattern}, and @-(pattern) to cause the minimal + match of pattern to be selected whenever possible rather + than the maximal (greedy) match. +01-05-20 +The character class [:word:] has been added to patterns. + The word class is the union of [:alnum:] and the character _. +01-05-20 +Inside (...) pattern groups, the \ character is now treated + specially even when in an enclosing character class. The + sequences, \w, \d, \s are equivalent to the character classes + word, digit, and space respectively. The sequences \W, \D, + and \S are their complement sets. +01-05-20 +The shell now recognizes pattern groups of the form + ~(options:pattern) where options or :pattern can be omitted. + Options use the letters + and - to enable and disable options + respectively. The option letters g (greedy), i (ignore case) + are used to cause maximal matching and to cause case + insensitive matching respectively. If :pattern is also + specified, these options are only in effect while this + pattern is being processed. Otherwise, these options remain + in effect until the end of the pattern group that they are contained + in or until another ~(...) is encountered. These pattern groups + are not counted with respect to group numbering. +01-05-14 When edit completion, expansion, or listing occurs in the + middle of a quoted string, the leading quote is ignored when + performing the completion, expansion, or listing. +01-05-14 A small memory leak from subshells has been fixed. +01-05-10 A bug in which open files were not restored after a subshell + that had used exec to replace a file has been fixed. +01-05-10 +Redirection to a null file name now generates an error message. +01-05-09 The shell now rejects some invalid parameter substitutions that + were previously processed in undefined ways. +01-05-09 A bug in which the output of select was not flushed before the + read when input did not come from the terminal has been fixed. +01-05-08 A bug in which job IDs would not be freed for interactive shells + when subshells ran built-ins in the background has been fixed. +01-05-08 +The FPATH variable now requires an explicit . to cause the + current directory to be treated as a function directory. +01-05-08 A bug in read -n when echo mode was disabled has been fixed. +01-05-07 A bug in which function definitions could be listed as part + of the history has been fixed. +01-04-30 +This release uses a new and often much faster pattern matcher than + earlier releases. +01-04-30 +An optimizer now eliminates invariant parameter expansions from + for while and until loops. +01-04-30 +The variable .sh.match is set after each pattern match (# % or /) + in a variable substitution. The variable .sh.match is an + indexed array with element 0 being the complete match. + The array is only valid until the next subsequent pattern + match or until the value of the variable changes which ever + comes first. +01-04-30 +A self generating man page has been added to shcomp. Also, + shcomp now stops compiling when it finds an exit or exec + command and copies the remainder so that it can be used + for standard input. +01-04-30 +The shcomp command was modified so that it can work in an + EBCDIC environment and that binary scripts are portable + across environments. +01-04-30 A bug in the handling of a trailing : in PATH has been fixed. +01-04-30 A bug in which the builtin version of a command would get invoked + even though the full pathname for the command was specified + has been fixed. +01-04-30 A bug in which read would lose the last character when + reading the last line of a file that did not contain a new-line + character has been fixed. +01-04-23 A bug on some systems in which in vi mode the end of file + character and end of line character could be swapped has + been fixed. +01-04-23 A bug on some systems in which invoking a shell script that + did not have execute permission could set the exit value to + 127 rather than 126 has been fixed. +01-04-20 A bug in which read -n from a pipe would block if fewer than + n characters was received has been fixed. +01-04-09 A bug in which invalid patterns, for example, ) by itself, + was not treated as a string has been fixed so that if i=')', + then [[ $i == $i ]] is true. +01-04-09 +The shell arithmetic now interprets C character constants. +01-04-09 A bug in which a non-zero return from a function defined + with the function reserved word did not trigger the ERR + trap or exit with set -e has been fixed. +01-04-02 A bug on some systems, in which characters above 127 were + not displayed correctly in vi or emacs edit mode has been fixed. +01-04-02 A bug on some systems, introduced in the 'k' point release, in + which the erase character in viraw mode was moving the cursor + to the left without erasing the character has been fixed. +01-04-02 On some systems the wcwith() function was returning a wrong + value for characters and caused characters to be displayed + incorrectly from the shell edit modes. A work around for + this problem has been added. +01-03-26 A bug in which valid scripts could produce syntax errors + when run with locales that considered characters such as "'" + to be space characters has been fixed. +01-03-20 A bug in which an syntax error in an arithmetic expression + entered interactively could cause the shell to go into + an infinite loop outputting the error message has been fixed. +01-03-10 +ksh93 accepts -l as a synonym for -L in test on systems for + which /bin/test -l tests for symbolic links. +01-03-10 A bug in parsing scripts in which { and } are used in place of + in and esac in case statements embedded in compound commands + has been fixed. Use of { and } for in and esac is obsolete. +01-03-06 A bug in which an argument of the form foo=bar was not + being passed correctly to a traced function whose name + was foo has been fixed. +01-03-02 Using $(trap -p name) did not print the name of the current + trap setting for trap name. +01-02-26 Exported floating point variables gave incorrect results + when passing them to ksh88. This has been fixed. +01-02-25 A race condition in which a coprocess which completed too quickly + would not allow subsequent coprocesses to start has been fixed. +01-02-25 The 'g' format specifier is now handled by printf. It had + inadvertently been omitted. +01-02-20 The + was not being displayed during an execution trace + with the += assignment operator. +01-02-19 The error message which occurs when the interpreter name + defined on the #! line does not exist is more informative. +01-02-19 A bug in which $0 would not be set correctly when a + script with #! was invoked by full pathname from the + directory of the script has been fixed. +01-02-19 A shell script did not always pick up tty mode changes + made by external commands such as stty which could + affect the behavior of read. +01-02-19 The -u, -g, and -k unary tests did not give the correct + results when used with negation and this has been fixed. + +01-02-05 --- Release ksh93k+ --- +01-02-05 The sequence \ inside $'...' was not incrementing + the line count and this has been fixed. +01-02-05 +Modified expansion of "${@-}" so that if no arguments are set + it results in null string rather than nothing. +01-02-02 memory leak problem with local variables in functions fixed. +01-01-25 +allow arithmetic expressions with float%int and treat them + as ((int)float)%int rather than as an error. +01-01-19 read -n1 was not working and has been fixed. +01-01-17 +ksh now handles the case in which a here document in command + substitution $() is terminated by the trailing ). Previously, + a new-line was needed at the end of the delimiter word. +01-01-02 A bug in which a KEYBD trap would cause a multi-line token + to be processed incorrectly has been fixed. +00-12-10 +Arithmetic integer constants can now have L and U suffices. +00-12-10 A bug in the processing of arithmetic expressions with compound + variables when the -n option is on has been fixed. +00-12-08 A bug in M-f and M-b from emacs mode has been fixed. This + bug only occurs when ksh93 is compiled without MULTIBYTE enabled. +00-11-29 A bug in which jobs -p would yield 0 for background + jobs run in a script has been fixed. +00-11-21 A bug in integer arrays in which the number of elements is + incorrect when the ++ operator is applied to a non-existing + element has been fixed. For example, integer x; ((x[3]++)). +00-11-20 A timing bug in which the shell could reset the terminal + group to the wrong value in the case that the a new process + changes the terminal group during startup has been fixed. + +00-10-27 --- Release ksh93k --- +00-10-27 Using tab for completion now works only when applied + after a non-blank character at the end of the current line. + In other case a tab is inserted. +00-10-27 A bug in the emacs edit mode for ^X^E has been fixed. + The ^X^E sequence is supposed to invoke the full editor + on the current command. +00-10-18 A bug in which expansions of the form ${var//pattern/string} + did not work correctly when pattern was '/' or "/" has + been fixed. +00-10-18 +The output format for indexed arrays in compound variables + has been modified so that it can be used as input. +00-10-18 Assignments with name references (typeset -n) will now + implicitly unreference an existing name reference. +00-10-17 A bug the += append operator when a single array element + is appended to a variable that is not an array has been fixed. +00-10-16 A bug in which the SIGCONT signal was being sent to + each process will kill -0 or kill -n 0 has been fixed. +00-10-12 +The arithmetic evaluation portion has been rewritten to + perform a number of optimizations. +00-10-10 A bug in which name prefix matching ${!name.*} was not + checking name to see if it was a name reference has been fixed. +00-09-26 A bug in the multibyte version in which the width of for + non-printing characters was not correct has been fixed. +00-09-12 +Made changes to get multibyte editing work on UWIN for Windows. +00-09-12 A bug in which multibyte characters would be displayed incorrectly + has been fixed. +00-08-08 Removed build dependency on iswprint() and iswalph(). +00-07-20 In some cases the read builtin would read more than a single + line from a pipe on standard input and therefore leave the seek + position in the wrong location. +00-07-05 +If the directory / is on the path, a / will not be inserted + between the directory and the file name during path searching + to avoid searching // for systems that treat this specially. +00-06-26 A bug in which on rare occasions wait could return before all + jobs have completed has been fixed. +00-06-21 A bug in which backspace did not work correctly during the + R replace directive in vi-mode has been fixed. +00-06-12 +Added variable name completion/expansion/listing to the set of + completions. Variable name completions begin with $ or "$ followed + by a letter. +00-05-09 --- Release ksh93j --- +00-05-09 Modified command substitution to avoid using /tmp files when + run on read-only file systems. +00-04-17 +Modified printf to handle '%..Xc' and '%..Xs' options where X + is not an alpha character. Previous versions core dumped with this. +00-04-10 +Changes to multibyte editing code were made to use standard + ISO C functions rather than methods devised before the standard. +00-04-09 Add %H options to printf to output strings with <"'&\t> properly + converted for use in HTML and XML documents. +00-04-07 +Modified getopts builtin to handle \f...\f in usage string + by invoking specified function. +00-04-04 Added self generating man pages for bg, fc, fg, disown, jobs, + hist, let, ., and ulimit. +00-03-30 +The append operator += has been added and can be used + for all assignments, strings, arrays, and compound variables. +00-03-30 +Code was modified in several places to support automatic + generation of C locale dictionaries. +00-03-28 A bug in which the set and trap commands invoked with --name + type arguments would terminate the invoking script has + been fixed. +00-03-27 A bug in which the library path variable was not updated + correctly on some systems as described in the 'g' point + release has been fixed. +00-03-07 printf now returns a non-zero exit status when one of + its arguments cannot be converted to the given type. +00-03-05 The return value and error message for a command that + was found on the path but was not executable was set + incorrectly. +00-03-05 A prototype for ioctl() was removed from the vi edit mode. + +00-01-28 --- Release ksh93i --- +00-01-28 +Most of the built-in commands and ksh itself are now + self documenting. Running command --man will produce + screen output. Running command --html produces the + man page in html format. +00-01-28 +The getopts builtin can process command description + strings to produce man pages. +00-01-28 A bug in which a script could terminate when getopts + encountered an error when invoked inside a function + has been fixed. +00-01-28 When a symbolic link was specified as the name of + the script to invoke by name, the value of $0 was + set to the real file name rather than the link name + in some cases and this has been fixed. +00-01-28 A bug in which the precision given as an argument + to printf was not working has been fixed. + +99-03-31 --- Release ksh93h --- +99-03-31 +The PATH search algorithm has been modified to look + for a file named .fpath in each bin directory and if + found, to search for functions in this directory if + it cannot find the command in that directory. +99-03-31 +When performing pathname expansion, the shell checks + to see whether each directory it reads is case sensitive + or not, and performs the matching accordingly. +99-03-31 +The %T format for printing formatted date/time. +99-03-31 +The emacs and vi modes now handle arrow keys when + they use standard ANSI escape sequences. +99-03-31 +The TAB key can be used for completion in emacs and viraw mode. +99-03-31 A bug in setting .sh.editchar during the KEYBD trap + for the MULTIBYTE option was fixed in release ksh93h. +99-03-31 A bug in shcomp for compilation of unary operators with [[ ... ]] + has been fixed. +99-03-31 A bug in which the value of $? was changed when executing + a keyboard trap has been fixed. +99-03-31 The handling of SIGCHLD has been changed so that the + trap is not triggered while executing trap commands + to avoid recursive trap calls. +99-03-31 A bug in which a local variable in a function declared readonly + would generate an error when the function went out of + scope has been fixed. +99-03-31 A bug in which \ entered from the keyboard + with the KEYBD trap enabled has been fixed. +99-03-31 The error message for a misplaced ((, for example print ((3), + was often garbled and has been fixed. +99-03-31 A bug in the KEYBD trap in which escape sequences of the form + [#~ were not being handled as a unit has been fixed. +99-03-31 A bug in which ksh would consider expressions like [[ (a) ]] + as syntax errors has been fixed. +99-03-31 A function defined as foo() without a function body + was not reported as a syntax error. +99-03-31 A bug in which ksh could run out of file descriptors when + a stream was repeatedly opened with exec and read from + has been fixed. + +98-04-30 --- Release ksh93g --- +98-04-30 +The pipefail option has been added. With pipefail + enabled, a pipeline will not complete until all + commands are complete, and the return value will + be that of the last command to fail, or zero if + all complete successfully. +98-04-30 +The name-value pair library uses the cdt library rather + than the hash library. This change should be transparent + to applications. +98-04-30 +On the U/WIN version for Window 95 and Windows NT, + when a directory beginning with a letter followed by + a colon is given to cd, it is assumed to be an absolute + directory +98-04-30 +When an executable is found on a given path, + the appropriate library path variable is prepended + with a corresponding library directory. +98-04-30 A bug in which a name reference could be created to + itself and later cause the shell to get into an infinite + loop has been fixed. +98-04-30 A bug in shcomp relating to compound variables was fixed. +98-04-30 A bug introduced in ksh93e in which leading 0's in -Z + fields caused the value to be treated as octal for arithmetic + evaluation has been fixed. +98-04-30 A bug when a name reference with a shorter name than + the variable it references was the subject of a compound + assignment has been fixed. +98-04-30 A bug which in which assignment to array variables in + a subshell could affect the parent shell has been + fixed. +98-04-30 read name?prompt was putting a 0 byte at the end of the + prompt on standard error. +98-04-30 A bug in [[ string1 > string2 ]] when ksh was run with -x + has been fixed. +98-04-30 A bug in which the escape character was not processed + correctly inside {...} when brace expansion is enabled + has been fixed, for example {\$foo}. +98-04-30 A bug in line continuation in here-documents has been + fixed. +98-04-30 The default base when not specified with typeset -i is + 10 in accordance with the documentation. Previously, + the value was determined by the first assignment. +98-04-30 A parsing bug in which a # preceded alphanumeric + characters inside a command substitution caused + a syntax error to be reported has been fixed. +98-04-30 A bug in which a decimal constant represented as 10#ddd + where ddd was more than five digits generated a syntax + error has been fixed. +98-04-30 A bug in here document expansion in which ${...} expansions + were split across buffer boundaries has been fixed. +98-04-30 +The sh_fun() function now takes third argument which + is an argument list for the invoked discipline function + or built-in. +98-04-30 +A callback function can be installed which will give + notification of file duplications and file closes. +98-04-30 When ksh is compiled on systems that do not use fork() + current option settings where not propagated to subshells. + +97-06-30 --- Release ksh93f --- +97-06-30 +Hostnames in addition to host addresses can be given in + /dev/tcp/host/port virtual file names. +97-06-30 File name completion and expansion now quotes special + characters in file names from both emacs and vi edit modes. +97-06-30 An empty for list behave like a for list with null expansions. + It produces a warning message with sh -n. +97-06-30 +The code has been modified to work with EBCDIC as well as ASCII. +97-06-30 A bug which would cause the secondary prompt to be + displayed when a user entered a literal carriage + return has been fixed. +97-06-30 A bug which caused ksh read -s name to core dump was + fixed. +97-06-30 A bug with the expansion of \} and \] inside double + quoted strings that also contained variable expansions + has been fixed +97-06-30 Changes in the ksh93e point release caused autoload + functions invoked from within command substitution + to fail. This has been fixed. +97-06-30 A bug in the processing of here-documents that could + prevent variable substitution to occur after $(...) command + substitution for long here documents has been fixed. +97-06-30 A bug caused by a race condition that could cause SIGTERM + to be ignored by a child process has been fixed. +97-06-30 A bug which prevented the startup of a coprocess immediately + after killing a running coprocess has been fixed. +97-06-30 ulimit foobar, where foobar is not an arithmetic + expression, now gives an error message as it did with ksh88 + instead of setting the file size limit to 0. +97-06-30 A bug which could cause an interactive shell to terminate when + the last process of a pipeline was a POSIX function was fixed. +97-06-30 A bug which could cause command substitution of a shell script + to core dump has been fixed. +97-06-30 A security hole was fixed in suid_exec. +97-06-30 Arithmetic functions such as pow() that take more than + one argument, did not work if arguments other than the + first contained parenthesized sub-expression. +97-06-30 The error message from a script containing an incomplete + arithmetic expression has been corrected. +97-06-30 A bug which caused a core dump on some machines when + the value of a name reference contained a positional + parameter and the name reference was not defined inside + a function has been fixed. +97-06-30 Arithmetic expressions now correctly handle hexadecimal + constants. +97-06-30 A bug in which integer variables could be expanded + with a leading 10# when declared with typeset -i + multiple times has been corrected. +97-06-30 A bug in which IFS wasn't correctly restored when + set within command substitution has been fixed. +97-06-30 The _ character is now considered as part of a word + with the M-f and M-b emacs directives as it was in ksh88. +97-06-30 A bug in brace pattern expansions that caused expressions + such as {foo\,bar,bam} to expand incorrectly have been fixed. + + +96-07-31 --- Release ksh93e --- +96-07-31 +The math functions, atan2, hypot, fmod, and pow were added. +96-07-31 +When a shared library is loaded, if the function lib_init() + is defined in the library, it is invoked the first time that + the library is loaded with builtin -f library. +96-07-31 The k-shell information abstraction database option, KIA, + has been revamped. +96-07-31 Empty command substitutions of the form $() now work. + whence -v foo now gives the correct result after calling + builtin -d foo. +96-07-31 A bug in right to left arithmetic assignment for which + the arithmetic expression (( y = x = 1.5 )) did not + yield 1 for y when x was declared typeset -i was fixed. +96-07-31 printf has been fixed to handle format containing \0 + and/or \0145 correctly. In addition, characters following + %b in the format string are no longer displayed when + the operand contains \c. +96-07-31 A bug in printf that could cause the %E format to + produce unnormalized results has been fixed. +96-07-31 A bug which causes some arithmetic expressions to be + incorrectly evaluated as integer expressions rather + than floating point has been fixed. +96-07-31 Functions defined inside a subshell no longer remain + defined when the subshell completes. +96-07-31 The error message from sh -c ';echo foo' has been + corrected. +96-07-31 The format for umask -S has been changed to agree + with the specification in the POSIX standard. +96-07-31 A bug that caused side effects in subscript evaluation + when tracing was enabled for subscripts using ++ or -- + has been fixed. +96-07-31 To conform to the POSIX standard getopts has been changed + so that the option char is set to ? when it returns with + a non-zero exit status. +96-07-31 The handling of \} inside ${name...} has been fixed so + that the \ quotes the }. +96-07-31 A bug that caused the read builtin to resume execution + after processing a trap has been fixed. +96-07-31 [[ -s file ]] has been fixed so that if file is open + by ksh, it is flushed first. +96-07-31 In some cases attributes and sizes for non exported + variables weren't being reset before running a script. +96-07-31 The value of TMOUT was affected by changes make to + it in a subshell. +96-07-31 The jobs command did not reflect changes make by + sending the CONT signal to a command. +96-07-31 The error message for ksh -o unknown was incorrect. +96-07-31 Functions invoked as name=value name, did not use + values from the calling scope when evaluating value. +96-07-31 A bug in which the shell would re-execute previously + executed code when a shell script or coprocess was + run in the background has been fixed. +96-07-31 A bug in which an empty here-document would leave + a file descriptor open has been fixed. +96-07-31 A bug in which $(set -A array ...) would leave a + side effect has been fixed. +96-07-31 A discipline function for a global variable defined + within a function defined with the function keyword, + incorrectly created a local variable of the same name + and applied the discipline to it. + +95-08-28 --- Release ksh93d --- +95-08-28 The \ character was not handled correctly in replacement + patterns with ${x/pattern/replace}. +95-08-28 A bug with read in which the line did not end with + a new-line has been fixed. +95-08-28 A bug in file name generation which sometimes + appended a . for filenames that ended in / has + been fixed. +95-08-28 +If a process is waited for after a status has + been returned by a previous wait, wait now + returns 127. +95-08-28 A bug with hist (fc) -e which prevented a command + to re-executed after it had been edited has been fixed. +95-08-28 A bug which prevented quoting from removing the meaning + of unary test operators has been fixed. +95-08-28 A bug with typeahead and KEYBOARD traps with the + MULTIBYTE option set has been fixed. +95-08-28 +Builtin functions can take a third argument which is + a void*. +95-08-28 The nv_scan() function can restrict the scope of a walk + to the top scope. + +95-04-31 --- Release ksh93c --- +95-04-31 The expansion of "$@" was incorrect when $1 was the null + string. +95-04-31 A bug which could incorrectly report a syntax error in + a backquoted expression when a $ was preceded by \\ + has been fixed. +95-04-31 A bug which prevented the shell from exiting after + reporting an error when failing to open a script + has been fixed. +95-04-31 A bug that could lead to memory corruption when a + large here document that required parameter or command + substitution was expanded has been fixed. +95-04-31 A bug that could cause a core dump on some systems + after ksh detected an error when reading a function + has been fixed. +95-04-31 A bug which could cause a coprocess to hang when + reading from a process that has terminated has been fixed. +95-04-31 A bug which caused a script to terminate when set -e + was on and the first command of and && or || list + failed has been fixed. +95-04-31 A bug with here documents inside $(...) when the delimiter + word is an identifier has been fixed. +95-04-31 A bug which caused $0 to display the wrong value when + a script was invoked as an argument to the . command + and the eval command has been fixed. +95-04-31 A bug that could cause the built-in sleep to hang + has been fixed. +95-04-31 A bug introduces in 12/28/93b which caused the backslash + to be removed when it was followed by digit inside double + quotes in some instances has been fixed. +95-04-31 A bug which could cause a core dump if ksh was invoked with + standard input closed has been fixed. +95-04-31 A bug which could cause a core dump if typeset -A was + specified for an existing variable has been fixed. +95-04-31 Variables that were unset but had attributes such as readonly + and export were not listed with readonly, export and typeset. +95-04-31 Several problems with signals have been fixed. +95-04-31 A bug which prevented ulimit -t from working has been fixed. + Also, a bug in which failed ulimits could cause a core dump + has also been fixed. +95-04-31 A bug in expansion of the form ${name/#pattern/string} and + ${name/%pattern/string} has been fixed. +95-04-31 A bug which caused read -r on a line that contained only + blanks to get a non-null value has been fixed. +95-04-31 A bug introduced in the 'a' point release in which + ${x='\\'} expanded to \ when x was unset has been fixed. +95-04-31 A bug which prevented a trap on EXIT from being executed + when the last command in a script was a function invocation + has been fixed. +95-04-31 A bug which caused an interactive shell ignore input when + standard error was redirected to a file with exec, + and then restored with exec 2>&1 has been fixed. +95-04-31 An interactive shell turns on monitor mode even when + standard error has been redirected to a file. +95-04-31 A bug which could cause standard input to be incorrectly + positioned for the last command of a script has been fixed. +95-04-31 A bug in the edit modes which allowed walking back in + the history file for more than HISTSIZE commands has + been fixed. +95-04-31 A bug which could cause a core dump if variable TMPDIR was + changed between two command substitutions has been fixed. +95-04-31. A bug which prevented a trap on EXIT from being cleared + has been fixed. +95-04-31 A bug fixed for the v directive in vi MULTIBYTE has been + fixed. +95-04-31 Code to for IFS handling of multibyte characters has + been added. +95-04-31 The displaying of multibyte strings in export, readonly, + typeset, and execution traces has been fixed. +95-04-31 Variables inside functions are now statically scoped. + The previous behavior was never documented. +95-04-31 Variables inside functions are now statically scoped. + The previous behavior was never documented. +95-04-31 A few changes have been made to the name-value library + that affect built-ins that use disciplines. The + changes allow disciplines to be shared by variables + and should make it possible to add new disciplines + without recompilation. +95-04-31 +The name-value library interface has undergone significant + change for this revision. See the new nval.3 man page. + +94-12-31 --- Release ksh93b --- +94-12-31 +Variables inside functions are now statically scoped. + The previous behavior was never documented. +94-12-31 +If IFS contains two consecutive identical characters belonging + to the [:space:] class, then this character is treated as + a non-space delimiter so that each instance will delimit + a field. For example, IFS=$'\t\t' will cause two consecutive + tabs to delimit a null field. +94-12-31 +The getopts command has a -a name option that specifies a + name that will be used for usage messages. +94-12-31 A bug which caused unset RANDOM to dump core has been + fixed. +94-12-31 A bug which prevented return for terminating a profile + or ENV file has been fixed. +94-12-31 A bug which prevented standard input from being + directed to /dev/null for background jobs when + monitor mode was turned off has been fixed. +94-12-31 Statements of the form typeset -options var[expr]=value + did not perform substitutions on expr as expected. +94-12-31 A bug which prevented the shell from sending a HUP + signal to some background jobs that were not disowned + has been fixed. +94-12-31 A bug which allowed a script to trap signals that are + ignored at the time that the shell was invoked by exec + has been fixed. +94-12-31 A bug which could cause a core dump when a discipline + function was unset within a discipline was fixed. +94-12-31 The typeset builtin now accepts a first argument of + + or - for compatibility with ksh88. +94-12-31 For compatibility with ksh88, the results of expansions + of command arguments will treat the extended character + match characters ()|& as ordinary characters. +94-12-31 A bug which caused read to fail on a file that was + open for read/write with <> when the first operation + was print or printf has been fixed. +94-12-31 When a job is suspended, it is put on the top of + the job list as required by the POSIX standard. +94-12-31 The value of OPTARG when an option that required + an argument but didn't have one was incorrect in the + case the option string began with a :. +94-12-31 A bug which caused the terminal to get into a bad + state with some KEYBD traps in vi-mode has been fixed. +94-12-31 A bug which caused an invalid trap to cause a script + to terminate, rather than just return an error, has + been fixed. +94-12-31 Backreferencing sub-expressions in patterns and replacement + strings now works. +94-12-31 A bug in chmod which caused the -R option to fail has + been fixed. +94-12-31 +More signal names have been added for Solaris + +94-06-30 --- Release ksh93a --- +94-06-30 An expansion bug which causes portions of a word after + a $((...)) expansion that contains a nested $var expansion + to be lost has been fixed. +94-06-30 A bug that caused a core dump when a script that did not + have PWD set and did a cd inside command substitution + has been fixed. +94-06-30 A bug which caused a core dump on some machines when + the LANG variable was assigned to has been fixed. +94-06-30 A bug which incorrectly handled set disciplines that + performed arithmetic evaluation when the discipline + was called from the arithmetic evaluator has been fixed. +94-06-30 A bug caused by an EXIT trap inside a function that + was executed in a subshell was fixed. +94-06-30 If foo is a function, and not a program, then command foo + now reports that foo isn't found rather than invoking foo. +94-06-30 The previous version incorrectly listed -A as an + invocation option. The -A option is only for set. +94-06-30 A bug was fixed which caused ksh to loop when execution trace + was enabled and the PS4 prompt required command substitution. +94-06-30 A bug which could cause the job control switch character + to be disabled when a script that enabled monitor mode + terminated was fixed. +94-06-30 A bug in the macro expansion global replacement operator //, + when the pattern began with a [ or +( has been fixed. +94-06-30 A bug which prevented ~ expansion from occurring when + it was terminated with a colon inside an assignment + has been fixed. +94-06-30 A bug in the dot command which prevented autoload functions + from working has been fixed. +94-06-30 A bug which caused a variable to be unset if the + its value were expanded inside a set discipline has + been fixed. +94-06-30 Whence -a now longer reports that a defined function + is undefined. +94-06-30 A bug on some systems in which $0 would be incorrect + in scripts invoked by name has been fixed. +94-06-30 Here documents with an empty body now work. +94-06-30 A bug which disabled argument passing and resetting + of options for a script invoked by name inside a + function has been fixed. +94-06-30 A bug in which an EXIT trap set the caller of a function + would be executed if a command called inside a function + was not found has been fixed. +94-06-30 A bug which allowed a script to trap signals that are + ignored at the time that the shell was invoked has + been fixed. +94-06-30 A bug which caused 2<&1- when applied to a shell built-in + to leave standard input closed has been fixed. +94-06-30 A bug which caused the shell to incorrectly parse + $() command substitutions with nested case statements + has been fixed. + diff --git a/src/cmd/ksh93/RELEASE88 b/src/cmd/ksh93/RELEASE88 new file mode 100644 index 000000000..ac6d817a0 --- /dev/null +++ b/src/cmd/ksh93/RELEASE88 @@ -0,0 +1,426 @@ +This file is of historic interest. For recent changes in both ksh 93u+m and +the accompanying libraries, see the file NEWS in the top-level directory. +____ + +This is a list of changes that have been made since the 11/16/88 version +of ksh. + +1. New features in 12/28/93 + a. Associative arrays. The new version of ksh supports both + associative arrays and the older indexed arrays with the same + array syntax. A new -A option of typeset is used to declare + an array to be associative. As with indexed arrays, $name is + equivalent to ${name[0]}. The prefix operator ! was added + to the parameter expansion syntax to expand to the list of + indices. For example, ${!name[@]} expands to the list of array + indices for variable name. + + b. Several additions have been made to shell arithmetic: + 1. The shell now performs floating point arithmetic. The + typeset options -F and -E have been added for floating + point and scientific notation respectively. + 2. The prefix and postfix ++ and -- operators. + 3. The comma and ?: operators. + 4. The math library functions. + 5. An arithmetic for statement of the form + for ((expr1; expr2; expr3)) + do ... + done + 6. Integer arithmetic extended up to base 64. + + c. Some additions to the macro expansion syntax have been made + to specify substrings and sub-arrays: + 1. ${name:expr} expands to the substring of ${name} starting at + the character position defined by arithmetic expression expr. + 2. ${name:expr1:expr2} expands to the substring of ${name} starting + at expr1 and consisting of at most expr2 characters. + 3. ${name[@]:expr} expands to the values of ${name[@]} starting at + the element defined by arithmetic expression expr. + 4. ${name[@]:expr1:expr2} expands to at most expr2 values of + ${name} starting at expr1. + 5. ${@:expr} expands the positional parameters starting at expr. + 6. ${@:expr1:expr2} expands to at most expr2 positional parameters + starting at expr1. + 7. ${!name} expands to the name of the variable named by name. + It will expand to name unless name is a reference variable. + 8. ${!name[sub]} expands to the name of the subscript of the + given variable. If sub is @ or * the list of subscripts + is generated. + 9. ${!prefix*} and ${!prefix@} expand to the list of variable + names beginning with prefix. + 10. The substring operators, # and % can be now be applied + with aggregates (@ or *) and are applied to each. + 11. ${name/pattern/string} expands to the value of name with + the first occurrence of pattern replaced by string. + With aggregates (@ or *) this operation is applied to each. + 12. ${name/#pattern/string} Same as above but the pattern + to be replaced must match at the beginning. + 13. ${name/%pattern/string} Same as above but the pattern + to be replaced must match at the end. + 14. ${name//pattern/string} expands to the value of name with + each occurrence of pattern replaced by string. + With aggregates (@ or *) this operation is applied to each. + + d. The name space for variables has been extended. The character '.' + can be used at the beginning of a name, and to separate identifiers + within a name. However, to create a name of the form, foo.bar, + the variable foo must exist. The namespace starting with .sh + is reserved for shell implementation variables. Exported + variables cannot contain a '.'. + + e. Compound assignments. The assignment syntax, varname=value, + has been extended to allow assignments of the form + varname=(assignment_list). As elsewhere in the shell + spaces or tabs are optional around the parentheses, and + no space is permitted between the varname and the =. The + assignment_list can be one of the following: + 1. A list of words. In this case each word is expanded as + in a for list and the resulting items become elements + of the indexed array varname. + 2. A list of subscript assignments in the form + [subscript]=value. In this, these elements become + elements of the associative array varname. + 3. A list of assignments; simple or compound. In this + case, each assignment is made to varname.name, where + name is the name of the enclosed assignment. + 4. Assignments in the form of readonly or typeset + statements. In this case each assignment is made as + in 3 above, and the attributes are given to the + corresponding variable. + In case 3 and 4 above, the value of "$varname" after + the above assignment is (assignment_list), where the + assignment_list produced would reproduce all of the + variables under varname.*. + + f. Function names of the form variable.action (called discipline + functions) can be defined where variable is any valid variable + name and action is get, set, or unset. The function variable.get + is invoked each time the variable is referenced. The set + discipline is invoked each time the variable is assigned to. + The unset discipline is invoked when a variable is unset. + The new variables .sh.name, .sh.subscript, and .sh.value are + defined inside the function body. Other shell extensions + may have their own set of discipline functions. + + g. The compound command !, which negates the return value of the + following pipeline, has been added. + + h. On systems that support dynamic loading with dlopen(), it is + now possible to add built-in commands at runtime with the + builtin command named 'builtin'. + + i. The following builtins have been added: + 1. command name [ ... ] + 2. sleep [decimal-seconds] + 3. builtin [-ds] [-f file] [name...] + 4. getconf name [pathname] + 5. disown [job...] + + j. An addition format for literal strings, $'....' can + be used where ever literal strings are valid. The string + inside the single quotes will be converted using the ANSI C + escape conventions. Additionally, the escape sequence \E + expands to the escape character (default \033) whenever ANSI C + escape sequences are recognized. + + k. A typeset -n option has been added which causes the value of a + variable to be treated as a reference to another variable so that + variables can be indirectly named. For example, if $1 contains + the name of a variable, then typeset -n foo=$1 causes the variable + foo to be synonymous with the variable whose name is $1. A builtin + alias, nameref='typeset -n' has been added to aid mnemonics. + Reference names cannot contain a '.'. Whenever that portion of + a variable up to the first '.' matches a reference name, the + reference value is substituted. For example, with nameref foo=.top, + then ${foo.bar} is equivalent to ${.top.bar}. When used as the + index of a for or select loop, each assignment causes a + new name reference to occur. + + l. The KEYBD trap has been added which is triggered when a key + or escape sequence is typed while reading from the keyboard + in an edit mode. This, combined with some new variables + makes it possible to program your key bindings in ksh. + + m. New variables have been added: + 1. FIGNORE defines a set of file names to be ignored in each + directory when performing pathname expansion, replacing + the rule that requires that a leading . be matched explicitly. + 2. Variable sh.edchar contains the value of the keyboard character + that has been entered when processing a KEYBD trap. If the value + is changed as part of the trap action, then the new value replaces + the key or keys that caused the trap. + 3. Variable sh.edcol is set to the character position of the cursor + within the input buffer during a KEYBD trap. + 4. Variable sh.edmode is set to the escape character when in vi + insert mode. + 5. Variable sh.edtext is set to the contents of the input buffer + during a KEYBD trap. + 6. HISTEDIT is checked before FCEDIT. FCEDIT is obsolete. + 7. HISTCMD is the number of the current command in the history + file. + 8. Variable .sh.version is set to the version string for + this shell. + 9. Variable .sh.name is set to the name of the variable + that was referenced or assigned to when executing a get + or set discipline function. + 10. Variable .sh.subscript is set to the subscript for the variable + that was referenced or assign to when executing a get or + set discipline function. + 11. Variable .sh.value is set to the new value for the variable + that was assigned to when executing the set discipline function. + + n. New invocation and set -o options have been added: + 1. set -o notify (or set -b) causes background completion messages + to be displayed as soon as the job completes. + 2. There is a compile time option named KIA which enables + creation of a relational database for commands, variables + and functions defined and referenced by a script. The + option -I , causes the database to be generated + in . The database format can be queried via + the cql command. + o. ksh93 can read and evaluate pre-compiled scripts generated by + a separate program called shcomp. + p. More work on internationalization has been added: + 1. The decimal point character is processed per locale + 2. A $ can be placed in front of each string to indicate + that the string needs translation but is otherwise ignored. + This means that if a message catalog of all $"..." strings + is generated, then a program such as print $"hello world" + could display "bonjour monde" in the French locale. + q. Backreferences have been added to pattern matching. The sequence + \d, where d is a digit from 1-9, matches the same string as + the d-th previous parenthesis group. Backreferences + can be used within patterns, and within replacement strings + with any of the ${name/...} operators. + +2. Changes made in 12/28/93 + a. The output format of many commands has changed as follows: + 1. System error messages are displayed whenever a failure + is caused by a system call. + 2. The exit status has changed in many cases: + a. USAGE messages cause an exit status of 2. + b. Commands not found cause exit - 127. + c. Command found, but not executable - 126. + d. Terminated because of signal - 256+sig + 3. The output of values from built-ins that contain special + characters are quoted in a manner that then can be re-input. + 4. The trace output puts quotes around the output so that it + can be reused as input. + 5. The output for trap is in a format that can be reinput to + the shell to restore the traps. + 6. kill -l lists the signal names without numbers as + required by the POSIX standard. + + b. The following changes have been made to shell functions: + 1. The semantics of functions declared with name() has changed + to conform with the IEEE-POSIX 1003.2 standard. In particular, + these functions are executed in a dot script environment rather + than a separated function environment so that there are no + local variables and no scoping for traps. + 2. Functions declared as function name, preserve the old ksh + semantics can be also used as the first argument to the dot (.) + command to have them executed in a dot script environment. + + c. The command search rules have changed as follows: + 1. Special built-ins (those with a dagger in front of them) are + executed first. + 2. Functions are executed next. + 3. Other built-ins that do not require an executable version + (for example cd and read) come next. + 4. If the command name contains a slash, the pathname corresponding + to the command name is executed. + 5. If name corresponds to a previously encountered pathname + on the PATH variable, the corresponding command is executed. + 6. If the command name does not contain a slash, then the PATH + variable is used to find an executable by that name. If + the directory that the command is found is also contained in + the FPATH variable, then the command treated as a function. + If the shell has a built-in version of the command corresponding + to this command, then the built-in version of this command + is executed. Otherwise, the shell remembers that pathname + corresponding to this command name and executes this pathname. + 7. If the name is not found on PATH, then the directories in + FPATH are searched. If found, then the command is executed + as a function. + + d. Built-in commands options now conform to the IEEE-POSIX 1003.2 + conventions with some additions. In particular, + name -? + will now print a Usage line for name, except for true, false, + colon, login, newgrp, echo, [, and command. + + e. Tilde expansion is now performed as part of the word expansions. + The effect of this is that if word begins with ~ in ${name op word}, + it will be expanded unless escaped. + + f. Pathname expansion is no longer performed on redirection words + unless the shell is interactive. + + g. Changes to shell and options: + 1. The -n option has been enhanced to produce more warning and + portability messages. + 2. The -C option is equivalent to -o noclobber. Files are + created with O_EXCL when -C is on. + + h. The following changes have been made to [[ ... ]]: + 1. A string by itself is equivalent to -n string. + 2. -e has been added as equivalent to -a. + 3. == has been added as equivalent =. + 4. -a and = are now considered obsolete. + 5. Arithmetic comparisons are now considered obsolete. + + i. kill has been changed as follows: + 1. Signal names can be upper case or lower case. + 2. Numerical arguments to kill -l cause the given signal names to + be displayed. + 3. String arguments to kill -l cause the given signal numbers to + be displayed. + 4. Synopsis changed for getopts conformance. + + j. print has a -f format option which is equivalent to + the IEEE POSIX printf. Both print -f format, and + printf have the following extensions from IEEE POSIX: + 1. Floating point formats are supported. + 2. Size and precision specifications can be *. + 3. The %d option can take an argument after precision to + specify the base that the number will be displayed. + 4. A %q format can be used to output a string quoted so + that it can be re-input to the shell. + 5. A %P format can be used to output the shell pattern which + corresponds to the give extended regular expression. + 6. For numerical fields, the arguments can be arithmetic + expressions which will be evaluated. + 7. The %n format works as described in ANSI C. + + k. The following changes have been made to fc: + 1. It has been renamed hist. fc is now a predefined alias. + 2. hist uses ${HISTEDIT:-$FCEDIT}. FCEDIT is obsolete. + 3. A new -s option is equivalent to the obsolete -e -. + 4. If the first argument refers to a command earlier than the + first accessible command, it now implies the first accessible + command, so that hist -l 1 lists all accessible history commands. + + l. The dot command (.) has changed as follows: + 1. The argument can be the name of a function declared as + function name. The function will execute without creating a + new scope. + 2. If there are arguments to the given script or function, + the positional parameters are restored to their original + value when . completes. + + m. The read built-in has been changed as follows: + 1. A -A option to read has been added to allow the fields to be + read into an indexed array. + 2. A -t n option has been added which causes read to + timeout after n seconds when reading from a slow device. + 3. A -d char option has been added which causes the read + to terminate at char rather than at new-line. + + n. The trap command has been changed as follows: + 1. Trap names can be either upper case or lower case. + 2. Trap -p only causes the specified trap values to be displayed. + 3. The value of trap in a subshell will be the value in the parent + shell until a call to trap which changes the trap settings has + been made. Thus, savetraps=$(trap) works as required by the + POSIX standard. + + o. The exec command has been extended as follows: + 1. The -c option clears the environment first. + 2. The -a name option sets argv[0] to name for the program. + + p. true and false are built-ins, not aliases to built-ins. + + q. test has been modified to conform to the IEEE-POSIX 1003.2 + standard when there are three or less arguments. + + r. umask -S option displays the mask in a symbolic format. + + s. wait now returns the correct exit status of any previous + background job that has not been waited for, not just + the most recent one. + + t. The whence built-in has an option -a which causes all + uses for the given command name to be reported. + + u. unalias has -a option to clear all the aliases. + + v. The times built-in command has been removed. The time + reserved word, without a command, gives time cumulative + time for the shell and its children. A built-in alias + for times should enable scripts using times to continue + to run. + + w. Command substitution and arithmetic substitution will now be + performed for PS1, ENV, and PS4 evaluation in addition to + parameter expansion. + + x. The SECONDS variable now displays elapsed time in floating + point seconds with 3 places after the decimal point by + default. + + y. The getopts built-in now handles the complete libast optget + functionality. If any errors have occurred with getopts + when it has reached the end of arguments, then the Usage + message will be generated from the option string and the + exit status from getopts will be 2 rather than 1. The + usage message will be stored in the OPTARG variable if + the option string contains a leading colon; otherwise + it will be printed on standard error automatically. + + z. THE ENV file is only processed for interactive shell + invocations. In addition, the -x attributes for + aliases and functions is ignored. + + aa. The built-in edit modes have been changed as follows: + 1. The pathname completion and pathname listing options + now perform command completion and command listing + when applied to a word in the command position. + 2. In emacs mode ^N as the first related command after + the prompt will move to the next command relative to the + last known history position. + 3. In emacs mode, successive kill and delete commands will + accumulate their data in the kill buffer, by appending or + prepending as appropriate. This mode will be reset by any + command not adding something to the kill buffer. + 4. The control-T of emacs mode has been changed to behave like + control-T in gnu-emacs. + bb. The TMOUT variable also sets a limit for select timeouts + and default timeouts for read. + + +4. The source code has undergone significant modification. + a. Much of the code has been rewritten, In many cases this has + resulted in significant performance improvement. + + b. The code is organized differently. See the README files + for more details. + + c. Most configuration parameters now get generated using + the FEATURE mechanism of nmake. Other options are set + in the OPTIONS file. + + c. There are several new compile time options. See the README + file for details. Some of the old ones have been removed. + + d. The install script is a Mamfile that is generated by + nmake and processed by a script that comes with the + distribution. + + e. There are far fewer global names. This should make it + must easier to add built-in commands without worrying + about conflicts. + + f. The code uses the sfio library which makes it possible + to mix with stdio. + + g. The code is written in ANSI C with full prototypes. + The code is based on the IEEE POSIX 1003.1 standard. + The code can be compiled with K&R C and with C++ by + using the ANSI cpp that comes with nmake or running + the code through the proto filter before pre-processing. + This happens automatically with our shipping system. + + h. There is a programming interface for capturing references + and assignment to shell variables. It is also possible + to intercept variable creation and supply the array processing + function for that variable. See nval.3 for a description. diff --git a/src/cmd/ksh93/RELEASE93 b/src/cmd/ksh93/RELEASE93 new file mode 100644 index 000000000..39f0c701a --- /dev/null +++ b/src/cmd/ksh93/RELEASE93 @@ -0,0 +1,458 @@ +This file is of historic interest. For recent changes in both ksh 93u+m and +the accompanying libraries, see the file NEWS in the top-level directory. +____ + +This is a list of changes that have been made since the 12/28/93 version +of ksh. + +1. New features in 12/28/93b + a. If IFS contains two consecutive identical characters belonging + to the [:space:] class, then this character is treated as + a non-space delimiter so that each instance will delimit + a field. For example, IFS=$'\t\t' will cause two consecutive + tabs to delimit a null field. + b. The getopts command has a -a name option that specifies a + name that will be used for usage messages. + +2. New features in 12/28/93e + a. The math functions, atan2, hypot, fmod, and pow were added. + b. When a shared library is loaded, if the function lib_init() + is defined in the library, it is invoked the first time that + the library is loaded with builtin -f library. + +3. New features in 12/28/93f + a. Hostnames in addition to host addresses can be given in + /dev/tcp/host/port virtual file names. + b. File name completion and expansion now quotes special + characters in file names from both emacs and vi edit modes. + +4. New features in 12/28/93g + a. The pipefail option has been added. With pipefail + enabled, a pipeline will not complete until all + commands are complete, and the return value will + be that of the last command to fail, or zero if + all complete successfully. + b. When an executable is found on a given path, + the appropriate library path variable is prepended + with a corresponding library directory. +5. New features in 12/28/93h + a. The PATH search algorithm has been modified to look + for a file named .fpath in each bin directory and if + found, to search for functions in this directory if + it cannot find the command in that directory. + b. When performing pathname expansion, the shell checks + to see whether each directory it reads is case sensitive + or not, and performs the matching accordingly. + c. The %T format for printing formatted date/time. +6. New features in 12/28/93i + a. Most of the built-in commands and ksh itself are now + self documenting. Running command --man will produce + screen output. Running command --html produces the + man page in html format. + b. The getopts builtin can process command description + strings to produce man pages. + +7. Bugs fixed in 12/28/93a for default OPTIONS + a. An expansion bug which causes portions of a word after + a $((...)) expansion that contains a nested $var expansion + to be lost has been fixed. + b. A bug that caused a core dump when a script that did not + have PWD set and did a cd inside command substitution + has been fixed. + c. A bug which caused a core dump on some machines when + the LANG variable was assigned to has been fixed. + d. A bug which incorrectly handled set disciplines that + performed arithmetic evaluation when the discipline + was called from the arithmetic evaluator has been fixed. + e. A bug caused by an EXIT trap inside a function that + was executed in a subshell was fixed. + f. If foo is a function, and not a program, then command foo + now reports that foo isn't found rather than invoking foo. + g. The previous version incorrectly listed -A as an + invocation option. The -A option is only for set. + h. A bug was fixed which caused ksh to loop when execution trace + was enabled and the PS4 prompt required command substitution. + i. A bug which could cause the job control switch character + to be disabled when a script that enabled monitor mode + terminated was fixed. + j. A bug in the macro expansion global replacement operator //, + when the pattern began with a [ or +( has been fixed. + k. A bug which prevented ~ expansion from occurring when + it was terminated with a colon inside an assignment + has been fixed. + l. A bug in the dot command which prevented autoload functions + from working has been fixed. + m. A bug which caused a variable to be unset if the + its value were expanded inside a set discipline has + been fixed. + n. Whence -a now longer reports that a defined function + is undefined. + o. A bug on some systems in which $0 would be incorrect + in scripts invoked by name has been fixed. + p. Here documents with an empty body now work. + 1. A bug which disabled argument passing and resetting + of options for a script invoked by name inside a + function has been fixed. + r. A bug in which an EXIT trap set the caller of a function + would be executed if a command called inside a function + was not found has been fixed. + s. A bug which allowed a script to trap signals that are + ignored at the time that the shell was invoked has + been fixed. + t. A bug which caused 2<&1- when applied to a shell built-in + to leave standard input closed has been fixed. + u. A bug which caused the shell to incorrectly parse + $() command substitutions with nested case statements + has been fixed. + +8. Bugs fixed in 12/28/93b for default OPTIONS + a. A bug which caused unset RANDOM to dump core has been + fixed. + b. A bug which prevented return for terminating a profile + or ENV file has been fixed. + c. A bug which prevented standard input from being + directed to /dev/null for background jobs when + monitor mode was turned off has been fixed. + d. Statements of the form typeset -options var[expr]=value + did not perform substitutions on expr as expected. + e. A bug which prevented the shell from sending a HUP + signal to some background jobs that were not disowned + has been fixed. + f. A bug which allowed a script to trap signals that are + ignored at the time that the shell was invoked by exec + has been fixed. + g. A bug which could cause a core dump when a discipline + function was unset within a discipline was fixed. + h. The typeset builtin now accepts a first argument of + + or - for compatibility with ksh88. + i. For compatibility with ksh88, the results of expansions + of command arguments will treat the extended character + match characters ()|& as ordinary characters. + j. A bug which caused read to fail on a file that was + open for read/write with <> when the first operation + was print or printf has been fixed. + k. When a job is suspended, it is put on the top of + the job list as required by the POSIX standard. + l. The value of OPTARG when an option that required + an argument but didn't have one was incorrect in the + case the option string began with a :. + m. A bug which caused the terminal to get into a bad + state with some KEYBD traps in vi-mode has been fixed. + n. A bug which caused an invalid trap to cause a script + to terminate, rather than just return an error, has + been fixed. + o. Backreferencing sub-expressions in patterns and replacement + strings now works. + p. A bug in chmod which caused the -R option to fail has + been fixed. + +9. Bugs fixed in 12/28/93c for default OPTIONS + a. The expansion of "$@" was incorrect when $1 was the null + string. + b. A bug which could incorrectly report a syntax error in + a backquoted expression when a $ was preceded by \\ + has been fixed. + c. A bug which prevented the shell from exiting after + reporting an error when failing to open a script + has been fixed. + d. A bug that could lead to memory corruption when a + large here document that required parameter or command + substitution was expanded has been fixed. + e. A bug that could cause a core dump on some systems + after ksh detected an error when reading a function + has been fixed. + f. A bug which could cause a coprocess to hang when + reading from a process that has terminated has been fixed. + g. A bug which caused a script to terminate when set -e + was on and the first command of and && or || list + failed has been fixed. + h. A bug with here documents inside $(...) when the delimiter + word is an identifier has been fixed. + i. A bug which caused $0 to display the wrong value when + a script was invoked as an argument to the . command + and the eval command has been fixed. + j. A bug that could cause the built-in sleep to hang + has been fixed. + k. A bug introduces in 12/28/93b which caused the backslash + to be removed when it was followed by digit inside double + quotes in some instances has been fixed. + l. A bug which could cause a core dump if ksh was invoked with + standard input closed has been fixed. + m. A bug which could cause a core dump if typeset -A was + specified for an existing variable has been fixed. + n. Variables that were unset but had attributes such as readonly + and export were not listed with readonly, export and typeset. + o. Several problems with signals have been fixed. + p. A bug which prevented ulimit -t from working has been fixed. + Also, a bug in which failed ulimits could cause a core dump + has also been fixed. + q. A bug in expansion of the form ${name/#pattern/string} and + ${name/%pattern/string} has been fixed. + r. A bug which caused read -r on a line that contained only + blanks to get a non-null value has been fixed. + s. A bug introduced in the 'a' point release in which + ${x='\\'} expanded to \ when x was unset has been fixed. + t. A bug which prevented a trap on EXIT from being executed + when the last command in a script was a function invocation + has been fixed. + u. A bug which caused an interactive shell ignore input when + standard error was redirected to a file with exec, + and then restored with exec 2>&1 has been fixed. + v. An interactive shell turns on monitor mode even when + standard error has been redirected to a file. + w. A bug which could cause standard input to be incorrectly + positioned for the last command of a script has been fixed. + y. A bug in the edit modes which allowed walking back in + the history file for more than HISTSIZE commands has + been fixed. + z. A bug which could cause a core dump if variable TMPDIR was + changed between two command substitutions has been fixed. + aa. A bug which prevented a trap on EXIT from being cleared + has been fixed. + +10. Bugs fixed in 12/28/93d for default OPTIONS + a. The \ character was not handled correctly in replacement + patterns with ${x/pattern/replace}. + b. A bug with read in which the line did not end with + a new-line has been fixed. + c. A bug in file name generation which sometimes + appended a . for filenames that ended in / has + been fixed. + d. If a process is waited for after a status has + been returned by a previous wait, wait now + returns 127. + e. A bug with hist (fc) -e which prevented a command + to re-executed after it had been edited has been fixed. + f. A bug which prevented quoting from removing the meaning + of unary test operators has been fixed. + +11. Bugs fixed in 12/28/93e for default OPTIONS + a. Empty command substitutions of the form $() now work. + b. whence -v foo now gives the correct result after calling + builtin -d foo. + c. A bug in right to left arithmetic assignment for which + the arithmetic expression (( y = x = 1.5 )) did not + yield 1 for y when x was declared typeset -i was fixed. + d. printf has been fixed to handle format containing \0 + and/or \0145 correctly. In addition, characters following + %b in the format string are no longer displayed when + the operand contains \c. + e. A bug in printf that could cause the %E format to + produce unnormalized results has been fixed. + f. A bug which causes some arithmetic expressions to be + incorrectly evaluated as integer expressions rather + that floating point has been fixed. + g. Functions defined inside a subshell no longer remain + defined when the subshell completes. + h. The error message from sh -c ';echo foo' has been + corrected. + i. The format for umask -S has been changed to agree + with the specification in the POSIX standard. + j. A bug that caused side effects in subscript evaluation + when tracing was enabled for subscripts using ++ or -- + has been fixed. + k. To conform to the POSIX standard getopts has been changed + so that the option char is set to ? when it returns with + a non-zero exit status. + l. The handling of \} inside ${name...} has been fixed so + that the \ quotes the }. + m. A bug that caused the read builtin to resume execution + after processing a trap has been fixed. + n. [[ -s file ]] has been fixed so that if file is open + by ksh, it is flushed first. + o. In some cases attributes and sizes for non exported + variables weren't being reset before running a script. + p. The value of TMOUT was affected by changes make to + it in a subshell. + q. The jobs command did not reflect changes make by + sending the CONT signal to a command. + r. The error message for ksh -o unknown was incorrect. + s. Functions invoked as name=value name, did not use + values from the calling scope when evaluating value. + t. A bug in which the shell would re-execute previously + executed code when a shell script or coprocess was + run in the background has been fixed. + u. A bug in which an empty here-document would leave + a file descriptor open has been fixed. + v. A bug in which $(set -A array ...) would leave a + side effect has been fixed. + w. A discipline function for a global variable defined + within a function defined with the function keyword, + incorrectly created a local variable of the same name + and applied the discipline to it. + +12. Bugs fixed in 12/28/93f for default OPTIONS + a. A bug which would cause the secondary prompt to be + displayed when a user entered a literal carriage + return has been fixed. + b. I bug which caused ksh read -s name to core dump was + fixed. + c. I bug with the expansion of \} and \] inside double + quoted strings that also contained variable expansions + has been fixed + d. Changes in the 'e' point release caused autoload + functions invoked from within command substitution + to fail. This has been fixed. + e. A bug in the processing of here-documents that could + prevent variable substitution to occur after $(...) command + substitution for long here documents has been fixed. + f. A bug caused by a race condition that could cause SIGTERM + to be ignored by a child process has been fixed. + g. A bug which prevented the startup of a coprocess immediately + after killing a running coprocess has been fixed. + h. ulimit foobar, where foobar is not an arithmetic + expression, now gives an error message as it did with ksh88 + instead of setting the file size limit to 0. + i. A bug which could cause an interactive shell to terminate when + the last process of a pipeline was a POSIX function was fixed. + j. A bug which could cause command substitution of a shell script + to core dump has been fixed. + k. A security hole was fixed in suid_exec. + l. Arithmetic functions such as pow() that take more than + one argument, did not work if arguments other than the + first contained parenthesized sub-expression. + m. The error message from a script containing an incomplete + arithmetic expression has been corrected. + n. A bug which caused a core dump on some machines when + the value of a name reference contained a positional + parameter and the name reference was not defined inside + a function has been fixed. + o. Arithmetic expressions now correctly handle hexadecimal + constants. + p. A bug in which integer variables could be expanded + with a leading 10# when declared with typeset -i + multiple times has been corrected. + q. A bug in which IFS wasn't correctly restored when + set within command substitution has been fixed. + r. The _ character is now considered as part of a word + with the M-f and M-b emacs directives as it was in ksh88. + +13. Bugs fixed in 12/28/93g for default OPTIONS + a. A bug in which a name reference could be created to + itself and later cause the shell to get into an infinite + loop has been fixed. + b. A bug in shcomp relating to compound variables was fixed. + c. A bug introduced in 'e' in which leading 0's in -Z + fields caused the value to be treated as octal for arithmetic + evaluation has been fixed. + d. A bug when a name reference with a shorter name than + the variable it references was the subject of a compound + assignment has been fixed. + e. A bug which in which assignment to array variables in + a subshell could affect the parent shell has been + fixed. + f. read name?prompt was putting a 0 byte at the end of the + prompt on standard error. + g. A bug in [[ string1 > string2 ]] when ksh was run with -x + has been fixed. + k. A bug in which the escape character was not processed + correctly inside {...} when brace expansion is enabled + has been fixed, for example {\$foo}. + l. A bug in line continuation in here-documents has been + fixed. + m. The default base when not specified with typeset -i is + 10 in accordance with the documentation. Previously, + the value was determined by the first assignment. + n. A parsing bug in which a # preceded alphanumeric + characters inside a command substitution caused + a syntax error to be reported has been fixed. + o. A bug in which a decimal constant represented as 10#ddd + where ddd was more than five digits generated a syntax + error has been fixed. + p. A bug in here document expansion in which ${...} expansions + were split across buffer boundaries has been fixed. + +14. Bugs fixed in 12/28/93h for default OPTIONS + a. I bug in shcomp for compilation of unary operators with [[ ... ]] + has been fixed. + b. A bug in which the value of $? was changed when executing + a keyboard trap has been fixed. + c. The handling of SIGCHLD has been changed so that the + trap is not triggered while executing trap commands + to avoid recursive trap calls. + d. I bug in which a local variable in a function declared readonly + would generated an error when the function went out of + scope has been fixed. + e. I bug in which \ entered from the keyboard + with the KEYBD trap enabled has been fixed. + f. The error message for a misplaced ((, for example print ((3), + was often garbled and has been fixed. + g. I bug in the KEYBD trap in which escape sequences of the form + [#~ were not being handled as a unit has been fixed. + h. A bug in which ksh would consider expressions like [[ (a) ]] + as syntax errors has been fixed. + i. A function defined as foo() without a function body + was not reported as a syntax error. + j. A bug in which ksh could run out of file descriptors when + a stream was repeatedly opened with exec and read from + has been fixed. + k. A bug introduced when fixing item n from the 'g' point + release has been fixed. + +15. Bugs fixed in 12/28/93i for default OPTIONS + a. A bug in which a script could terminate when getopts + encountered an error when invoked inside a function + has been fixed. + b. When a symbolic link was specified as the name of + the script to invoke by name, the value of $0 was + set to the real file name rather than the link name + in some cases and this has been fixed. + +16. Bug fixes for specific non-default option combinations. + a. More signal names have been added for Solaris + b. A bug fixed for the v directive in vi MULTIBYTE has been + fixed. + c. Code to for IFS handling of multibyte characters has + been added. + d. The displaying of multibyte strings in export, readonly, + typeset, and execution traces has been fixed. + e. A bug with type ahead and KEYBOARD traps with the + MULTIBYTE option set has been fixed. + f. The k-shell information abstraction database option, KIA, + has been revamped for the 'e' point release. + g. A bug in brace pattern expansions that caused expressions + such as {foo\,bar,bam} to expand incorrectly have been fixed. + h. On the U/WIN version for Window 95 and Windows NT, + when a directory beginning with a letter followed by + a colon is given to cd, it is assumed to be an absolute + directory. + i. There was a bug in the compile option that does not + use fork() in which the current option settings where + not propagated to sub-shells. + j. A bug in setting .sh.editchar during the KEYBD trap + for the MULTIBYTE option was fixed in release 'h'. + k. A bug in which the precision given as an argument + to printf was not working has been fixed. + +17. Other changes to 12/28/93[abcdefghi] + a. A couple of minor changes to make adding built-ins easier. + b. Variables inside functions are now statically scoped. + The previous behavior was never documented. + c. A few changes have been made to the name-value library + that affect built-ins that use disciplines. The + changes allow disciplines to be shared by variables + and should make it possible to add new disciplines + without recompilation. + d. The name-value library interface has undergone significant + change for this revision. See the new nval.3 man page. + e. Builtin functions can take a third argument which is + a void*. + f. The nv_scan() function can restrict the scope of a walk + to the top scope. Starting in 'f', nv_scan() has an + additional pointer argument that is passed to each invoked + function. + g. Starting with release 'f', an empty for list behave like + a for list with null expansions. It produces a warning + message with sh -n. + h. Starting with release 'f' the code has been modified to + work with EBCDIC as well as ASCII. + i. Starting with the release 'g', the name-value pair library + uses the cdt library rather than the hash library. + j. The sh_fun() function now takes third argument which + is an argument list for the invoked discipline function + or built-in. + k. A callback function can be installed which will give + notification of file duplications and file closes. + +18. Incompatibilities with 12/28/93 version. + None intentional. diff --git a/src/cmd/ksh93/SHOPT.sh b/src/cmd/ksh93/SHOPT.sh new file mode 100644 index 000000000..b529d1d9b --- /dev/null +++ b/src/cmd/ksh93/SHOPT.sh @@ -0,0 +1,43 @@ +# +# Compile-time SHOPT_* options for ksh93. +# 1 to enable, 0 to disable, empty value to probe. +# +# For a more complete description of the options, see src/cmd/ksh93/README. +# + +SHOPT ACCT=0 # accounting +SHOPT ACCTFILE=0 # per-user accounting info +SHOPT AUDIT=1 # enable auditing per SHOPT_AUDITFILE +SHOPT AUDITFILE='"/etc/ksh_audit"' # auditing file +SHOPT BGX=1 # one SIGCHLD trap per completed job +SHOPT BRACEPAT=1 # C-shell {...,...} expansions (, required) +SHOPT CMDLIB_HDR= # '' # custom -lcmd list for path-bound builtins +SHOPT CMDLIB_DIR= # '"/opt/ast/bin"' # virtual directory prefix for path-bound builtins +SHOPT CRNL= # accept MS Windows newlines () for +SHOPT DEVFD= # use /dev/fd instead of FIFOs for process substitutions +SHOPT DYNAMIC=0 # dynamic loading for builtins +SHOPT ECHOPRINT= # make echo equivalent to print +SHOPT EDPREDICT=0 # History pattern search menu (type #, then ESC TAB). Experimental. +SHOPT ESH=1 # emacs/gmacs edit mode +SHOPT FILESCAN=1 # fast file scan: while