diff options
-rw-r--r-- | generic/tcl.decls | 3 | ||||
-rw-r--r-- | generic/tclIOCmd.c | 14 | ||||
-rw-r--r-- | generic/tclMain.c | 18 | ||||
-rw-r--r-- | library/tm.tcl | 23 |
4 files changed, 24 insertions, 34 deletions
diff --git a/generic/tcl.decls b/generic/tcl.decls index ad725f5..198228b 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -2374,9 +2374,6 @@ declare 1 macosx { # Public functions that are not accessible via the stubs table. export { - void Tcl_Main(int argc, char **argv, Tcl_AppInitProc *appInitProc) -} -export { const char *Tcl_InitStubs(Tcl_Interp *interp, const char *version, int exact) } diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index 2b3e805..f738b1a 100644 --- a/generic/tclIOCmd.c +++ b/generic/tclIOCmd.c @@ -416,25 +416,11 @@ Tcl_ReadObjCmd( if (i < objc) { if ((TclGetIntFromObj(interp, objv[i], &toRead) != TCL_OK) || (toRead < 0)) { -#if TCL_MAJOR_VERSION < 9 - /* - * The code below provides backwards compatibility with an old - * form of the command that is no longer recommended or - * documented. See also [Bug #3151675]. Will be removed in Tcl 9, - * maybe even earlier. - */ - - if (strcmp(TclGetString(objv[i]), "nonewline") != 0) { -#endif Tcl_SetObjResult(interp, Tcl_ObjPrintf( "expected non-negative integer but got \"%s\"", TclGetString(objv[i]))); Tcl_SetErrorCode(interp, "TCL", "VALUE", "NUMBER", NULL); return TCL_ERROR; -#if TCL_MAJOR_VERSION < 9 - } - newline = 1; -#endif } } diff --git a/generic/tclMain.c b/generic/tclMain.c index 73989ef..6c71fbb 100644 --- a/generic/tclMain.c +++ b/generic/tclMain.c @@ -284,7 +284,7 @@ Tcl_SourceRCFile( /*---------------------------------------------------------------------- * - * Tcl_Main, Tcl_MainEx -- + * Tcl_MainEx -- * * Main program for tclsh and most other Tcl-based applications. * @@ -632,22 +632,6 @@ Tcl_MainEx( Tcl_Exit(exitCode); } - -#if (TCL_MAJOR_VERSION == 8) && !defined(UNICODE) -#undef Tcl_Main -extern DLLEXPORT void -Tcl_Main( - int argc, /* Number of arguments. */ - char **argv, /* Array of argument strings. */ - Tcl_AppInitProc *appInitProc) - /* Application-specific initialization - * function to call after most initialization - * but before starting to execute commands. */ -{ - Tcl_FindExecutable(argv[0]); - Tcl_MainEx(argc, argv, appInitProc, Tcl_CreateInterp()); -} -#endif /* TCL_MAJOR_VERSION == 8 && !UNICODE */ #ifndef TCL_ASCII_MAIN diff --git a/library/tm.tcl b/library/tm.tcl index ce8a013..4288658 100644 --- a/library/tm.tcl +++ b/library/tm.tcl @@ -330,6 +330,19 @@ proc ::tcl::tm::Defaults {} { } } } + if {$major == 8} return + for {set n 7} {$n >= 0} {incr n -1} { + foreach ev [::list \ + TCL8.${n}_TM_PATH \ + TCL8_${n}_TM_PATH \ + ] { + if {![info exists env($ev)]} continue + foreach p [split $env($ev) $sep] { + path add $p + } + } + } + } return } @@ -358,6 +371,16 @@ proc ::tcl::tm::roots {paths} { set px [file join $p site-tcl] if {![interp issafe]} {set px [file normalize $px]} path add $px + if {$major == 8} continue + set p [file join $pa tcl8] + for {set n 7} {$n >= 0} {incr n -1} { + set px [file join $p 8.${n}] + if {![interp issafe]} {set px [file normalize $px]} + path add $px + } + set px [file join $p site-tcl] + if {![interp issafe]} {set px [file normalize $px]} + path add $px } return } |