TclX8.0.3 auto_load patch. This patch fixes problems cause by the modified version of the Tcl auto_load facility supplied with TclX being out-of-sync with the final 8.0.3 Tcl version. This problem was mainly noticed when TclX 8.0.3 is used with ITcl 3.0. Index: tcl/runtime/autoload.tcl =================================================================== RCS file: /a/cvsroot/TclX/tcl/runtime/autoload.tcl,v retrieving revision 8.3.2.1 retrieving revision 8.3.2.2 diff -c -r8.3.2.1 -r8.3.2.2 *** autoload.tcl 1998/07/09 07:57:55 8.3.2.1 --- autoload.tcl 1998/09/19 16:47:07 8.3.2.2 *************** *** 1,12 **** # ! # Modified version of the standard Tcl auto_load proc that calls a TclX # command load TclX .tndx library indices. # init.tcl -- # # Default system startup file for Tcl-based applications. Defines # "unknown" procedure and auto-load facilities. # ! # SCCS: @(#) init.tcl 1.5 98/07/06 14:56:32 # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. --- 1,12 ---- # ! # Modified version of the standard Tcl auto_load_index proc that calls a TclX # command load TclX .tndx library indices. # init.tcl -- # # Default system startup file for Tcl-based applications. Defines # "unknown" procedure and auto-load facilities. # ! # SCCS: @(#) init.tcl 1.8 98/07/20 16:24:45 # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. *************** *** 15,52 **** # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # ! ! # auto_load -- ! # Checks a collection of library directories to see if a procedure ! # is defined in one of them. If so, it sources the appropriate ! # library file to create the procedure. Returns 1 if it successfully ! # loaded the procedure, 0 otherwise. # # Arguments: ! # cmd - Name of the command to find and load. ! # namespace (optional) The namespace where the command is being used - must be ! # a canonical namespace as returned [namespace current] ! # for instance. If not given, namespace current is used. ! proc auto_load {cmd {namespace {}}} { ! global auto_index auto_oldpath auto_path env errorInfo errorCode - if {[string length $namespace] == 0} { - set namespace [uplevel {namespace current}] - } - set nameList [auto_qualify $cmd $namespace] - # workaround non canonical auto_index entries that might be around - # from older auto_mkindex versions - lappend nameList $cmd - foreach name $nameList { - if {[info exists auto_index($name)]} { - uplevel #0 $auto_index($name) - return [expr {[info commands $name] != ""}] - } - } - if {![info exists auto_path]} { - return 0 - } if {[info exists auto_oldpath]} { if {$auto_oldpath == $auto_path} { return 0 --- 15,32 ---- # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # ! # auto_load_index -- ! # Loads the contents of tclIndex files on the auto_path directory ! # list. This is usually invoked within auto_load to load the index ! # of available commands. Returns 1 if the index is loaded, and 0 if ! # the index is already loaded and up to date. # # Arguments: ! # None. ! proc auto_load_index {} { ! global auto_index auto_oldpath auto_path errorInfo errorCode if {[info exists auto_oldpath]} { if {$auto_oldpath == $auto_path} { return 0 *************** *** 95,107 **** } } } ! foreach name $nameList { ! if {[info exists auto_index($name)]} { ! uplevel #0 $auto_index($name) ! if {[info commands $name] != ""} { ! return 1 ! } ! } ! } ! return 0 } --- 75,79 ---- } } } ! return 1 }