diff options
author | das <das> | 2004-03-17 18:14:11 (GMT) |
---|---|---|
committer | das <das> | 2004-03-17 18:14:11 (GMT) |
commit | 0205867a3dad7204c57477b6c38c52b981af36e1 (patch) | |
tree | b40c5ed765d71e7cb68ba178c3f3a098638c9987 /library | |
parent | b07cf17d9c57bb355e84b17470235902854c7d40 (diff) | |
download | tcl-0205867a3dad7204c57477b6c38c52b981af36e1.zip tcl-0205867a3dad7204c57477b6c38c52b981af36e1.tar.gz tcl-0205867a3dad7204c57477b6c38c52b981af36e1.tar.bz2 |
Removed support for Mac OS Classic platform [Patch 918142]
Diffstat (limited to 'library')
-rw-r--r-- | library/auto.tcl | 5 | ||||
-rw-r--r-- | library/init.tcl | 8 | ||||
-rw-r--r-- | library/package.tcl | 94 | ||||
-rw-r--r-- | library/safe.tcl | 16 | ||||
-rw-r--r-- | library/tclIndex | 1 | ||||
-rw-r--r-- | library/tcltest/tcltest.tcl | 5 |
6 files changed, 8 insertions, 121 deletions
diff --git a/library/auto.tcl b/library/auto.tcl index 236af39..c1bf77d 100644 --- a/library/auto.tcl +++ b/library/auto.tcl @@ -3,7 +3,7 @@ # utility procs formerly in init.tcl dealing with auto execution # of commands and can be auto loaded themselves. # -# RCS: @(#) $Id: auto.tcl,v 1.14 2003/11/14 20:44:45 dgp Exp $ +# RCS: @(#) $Id: auto.tcl,v 1.15 2004/03/17 18:14:14 das Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1998 Sun Microsystems, Inc. @@ -28,8 +28,7 @@ proc auto_reset {} { if {[info exists auto_index($p)] && ![string match auto_* $p] && ([lsearch -exact {unknown pkg_mkIndex tclPkgSetup tcl_findLibrary pkg_compareExtension - tclPkgUnknown tcl::MacOSXPkgUnknown - tcl::MacPkgUnknown} $p] < 0)} { + tclPkgUnknown tcl::MacOSXPkgUnknown} $p] < 0)} { rename $p {} } } diff --git a/library/init.tcl b/library/init.tcl index ff3a245..e645ac9 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -3,7 +3,7 @@ # Default system startup file for Tcl-based applications. Defines # "unknown" procedure and auto-load facilities. # -# RCS: @(#) $Id: init.tcl,v 1.59 2004/01/29 10:28:21 vincentdarley Exp $ +# RCS: @(#) $Id: init.tcl,v 1.60 2004/03/17 18:14:14 das Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -37,7 +37,6 @@ package require -exact Tcl 8.5 # tcl_pkgPath, which is set by the platform-specific initialization routines # On UNIX it is compiled in # On Windows, it is not used -# On Macintosh it is "Tool Command Language" in the Extensions folder if {![info exists auto_path]} { if {[info exists env(TCLLIBPATH)]} { @@ -119,16 +118,13 @@ if {![interp issafe]} { [string equal $::tcl_platform(os) "Darwin"]} { package unknown [list tcl::MacOSXPkgUnknown [package unknown]] } - if {[string equal $::tcl_platform(platform) "macintosh"]} { - package unknown [list tcl::MacPkgUnknown [package unknown]] - } } # Conditionalize for presence of exec. if {[llength [info commands exec]] == 0} { - # Some machines, such as the Macintosh, do not have exec. Also, on all + # Some machines do not have exec. Also, on all # platforms, safe interpreters do not have exec. set auto_noexec 1 diff --git a/library/package.tcl b/library/package.tcl index 21fadd1..9eb155e 100644 --- a/library/package.tcl +++ b/library/package.tcl @@ -3,7 +3,7 @@ # utility procs formerly in init.tcl which can be loaded on demand # for package management. # -# RCS: @(#) $Id: package.tcl,v 1.27 2003/11/14 20:44:45 dgp Exp $ +# RCS: @(#) $Id: package.tcl,v 1.28 2004/03/17 18:14:14 das Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1998 Sun Microsystems, Inc. @@ -461,8 +461,7 @@ proc tclPkgSetup {dir pkg version files} { # It is invoked when a package that's needed can't be found. It scans # the auto_path directories and their immediate children looking for # pkgIndex.tcl files and sources any such files that are found to setup -# the package database. (On the Macintosh we also search for pkgIndex -# TEXT resources in all files.) As it searches, it will recognize changes +# the package database. As it searches, it will recognize changes # to the auto_path and scan any new directories. # # Arguments: @@ -636,95 +635,6 @@ proc tcl::MacOSXPkgUnknown {original name version {exact {}}} { } } -# tcl::MacPkgUnknown -- -# This procedure extends the "package unknown" function for Mac. -# It searches for pkgIndex TEXT resources in all files -# Only installed in interps that are not safe so we don't check -# for [interp issafe] as in tclPkgUnknown. -# -# Arguments: -# original - original [package unknown] procedure -# name - Name of desired package. Not used. -# version - Version of desired package. Not used. -# exact - Either "-exact" or omitted. Not used. - -proc tcl::MacPkgUnknown {original name version {exact {}}} { - - # First do the cross-platform default search - uplevel 1 $original [list $name $version $exact] - - # Now do Mac specific searching - global auto_path - - if {![info exists auto_path]} { - return - } - # Cache the auto_path, because it may change while we run through - # the first set of pkgIndex.tcl files - set old_path [set use_path $auto_path] - while {[llength $use_path]} { - # We look for pkgIndex TEXT resources in the resource fork of - # shared libraries - set dir [lindex $use_path end] - - # Make sure we only scan each directory one time. - if {[info exists tclSeenPath($dir)]} { - set use_path [lrange $use_path 0 end-1] - continue - } - set tclSeenPath($dir) 1 - - foreach x [concat [list $dir] [glob -directory $dir -nocomplain *] ] { - if {![info exists procdDirs($x)] && [file isdirectory $x]} { - set dir $x - foreach x [glob -directory $dir -nocomplain *.shlb] { - if {[file isfile $x]} { - set res [resource open $x] - foreach y [resource list TEXT $res] { - if {[string equal $y "pkgIndex"]} { - source -rsrc pkgIndex - } - } - catch {resource close $res} - } - } - set procdDirs($dir) 1 - } - } - set use_path [lrange $use_path 0 end-1] - - # Check whether any of the index scripts we [source]d above - # set a new value for $::auto_path. If so, then find any - # new directories on the $::auto_path, and lappend them to - # the $use_path we are working from. This gives index scripts - # the (arguably unwise) power to expand the index script search - # path while the search is in progress. - set index 0 - if {[llength $old_path] == [llength $auto_path]} { - foreach dir $auto_path old $old_path { - if {$dir ne $old} { - # This entry in $::auto_path has changed. - break - } - incr index - } - } - - # $index now points to the first element of $auto_path that - # has changed, or the beginning if $auto_path has changed length - # Scan the new elements of $auto_path for directories to add to - # $use_path. Don't add directories we've already seen, or ones - # already on the $use_path. - foreach dir [lrange $auto_path $index end] { - if {![info exists tclSeenPath($dir)] - && ([lsearch -exact $use_path $dir] == -1) } { - lappend use_path $dir - } - } - set old_path $auto_path - } -} - # ::pkg::create -- # # Given a package specification generate a "package ifneeded" statement diff --git a/library/safe.tcl b/library/safe.tcl index 9420186..1027efe 100644 --- a/library/safe.tcl +++ b/library/safe.tcl @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: safe.tcl,v 1.12 2003/11/14 20:44:45 dgp Exp $ +# RCS: @(#) $Id: safe.tcl,v 1.13 2004/03/17 18:14:14 das Exp $ # # The implementation is based on namespaces. These naming conventions @@ -462,18 +462,6 @@ proc ::safe::interpAddToAccessPath {slave path} { # Source init.tcl into the slave, to get auto_load and other # procedures defined: - # We don't try to use the -rsrc on the mac because it would get - # confusing if you would want to customize init.tcl - # for a given set of safe slaves, on all the platforms - # you just need to give a specific access_path and - # the mac should be no exception. As there is no - # obvious full "safe ressources" design nor implementation - # for the mac, safe interps there will just don't - # have that ability. (A specific app can still reenable - # that using custom aliases if they want to). - # It would also make the security analysis and the Safe Tcl security - # model platform dependant and thus more error prone. - if {[catch {::interp eval $slave\ {source [file join $tcl_library init.tcl]}} msg]} { Log $slave "can't source init.tcl ($msg)" @@ -722,8 +710,6 @@ proc ::safe::setLogCmd {args} { set argc [llength $args] # Allow only "source filename" - # (and not mac specific -rsrc for instance - see comment in ::init - # for current rationale) if {$argc != 1} { set msg "wrong # args: should be \"source fileName\"" Log $slave "$msg ($args)" diff --git a/library/tclIndex b/library/tclIndex index 16680ea..65d37a6 100644 --- a/library/tclIndex +++ b/library/tclIndex @@ -33,7 +33,6 @@ set auto_index(pkg_mkIndex) [list source [file join $dir package.tcl]] set auto_index(tclPkgSetup) [list source [file join $dir package.tcl]] set auto_index(tclPkgUnknown) [list source [file join $dir package.tcl]] set auto_index(::tcl::MacOSXPkgUnknown) [list source [file join $dir package.tcl]] -set auto_index(::tcl::MacPkgUnknown) [list source [file join $dir package.tcl]] set auto_index(::pkg::create) [list source [file join $dir package.tcl]] set auto_index(parray) [list source [file join $dir parray.tcl]] set auto_index(::safe::InterpStatics) [list source [file join $dir safe.tcl]] diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl index ec138b9..4a36a38 100644 --- a/library/tcltest/tcltest.tcl +++ b/library/tcltest/tcltest.tcl @@ -16,7 +16,7 @@ # Contributions from Don Porter, NIST, 2002. (not subject to US copyright) # All rights reserved. # -# RCS: @(#) $Id: tcltest.tcl,v 1.87 2004/02/18 01:41:42 dgp Exp $ +# RCS: @(#) $Id: tcltest.tcl,v 1.88 2004/03/17 18:14:14 das Exp $ package require Tcl 8.3 ;# uses [glob -directory] namespace eval tcltest { @@ -1263,9 +1263,6 @@ proc tcltest::DefineConstraintInitializers {} { ConstraintInitializer unixExecs { set code 1 - if {[string equal macintosh $::tcl_platform(platform)]} { - set code 0 - } if {[string equal windows $::tcl_platform(platform)]} { if {[catch { set file _tcl_test_remove_me.txt |