summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorandreas_kupries <akupries@shaw.ca>2006-09-22 18:13:25 (GMT)
committerandreas_kupries <akupries@shaw.ca>2006-09-22 18:13:25 (GMT)
commit4d806ec7125d35e4f837f3a2274aedc0f7593954 (patch)
treef67d58798c4d5ba6ee60a07d1f99fe77001dee13 /library
parent881fdb141e92e3ea0b7b72197ad32d992f78195c (diff)
downloadtcl-4d806ec7125d35e4f837f3a2274aedc0f7593954.zip
tcl-4d806ec7125d35e4f837f3a2274aedc0f7593954.tar.gz
tcl-4d806ec7125d35e4f837f3a2274aedc0f7593954.tar.bz2
TIP#268 IMPLEMENTATION
* generic/tclDecls.h: Regenerated from tcl.decls. * generic/tclStubInit.c: * doc/PkgRequire.3: Documentation of extended API, * doc/package.n: extended testsuite. * tests/pkg.test: * generic/tcl.decls: Implementation. * generic/tclBasic.c: * generic/tclConfig.c: * generic/tclInt.h: * generic/tclPkg.c: * generic/tclTest.c: * generic/tclTomMathInterface.c: * library/init.tcl: * library/package.tcl: * library/tm.tcl:
Diffstat (limited to 'library')
-rw-r--r--library/init.tcl4
-rw-r--r--library/package.tcl8
-rw-r--r--library/tm.tcl10
3 files changed, 10 insertions, 12 deletions
diff --git a/library/init.tcl b/library/init.tcl
index c67a6e9..e5a86be 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.85 2006/02/08 21:41:28 dgp Exp $
+# RCS: @(#) $Id: init.tcl,v 1.86 2006/09/22 18:13:29 andreas_kupries Exp $
#
# Copyright (c) 1991-1993 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
@@ -17,7 +17,7 @@
if {[info commands package] == ""} {
error "version mismatch: library\nscripts expect Tcl version 7.5b1 or later but the loaded version is\nonly [info patchlevel]"
}
-package require -exact Tcl 8.5
+package require -exact Tcl 8.5a5
# Compute the auto path to use in this interpreter.
# The values on the path come from several locations:
diff --git a/library/package.tcl b/library/package.tcl
index 9d9e0a9..bd3ecf6 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.33 2005/07/23 04:12:49 dgp Exp $
+# RCS: @(#) $Id: package.tcl,v 1.34 2006/09/22 18:13:29 andreas_kupries Exp $
#
# Copyright (c) 1991-1993 The Regents of the University of California.
# Copyright (c) 1994-1998 Sun Microsystems, Inc.
@@ -459,7 +459,7 @@ proc tclPkgSetup {dir pkg version files} {
# version - Version of desired package. Not used.
# exact - Either "-exact" or omitted. Not used.
-proc tclPkgUnknown {name version {exact {}}} {
+proc tclPkgUnknown {name args} {
global auto_path env
if {![info exists auto_path]} {
@@ -555,10 +555,10 @@ proc tclPkgUnknown {name version {exact {}}} {
# version - Version of desired package. Not used.
# exact - Either "-exact" or omitted. Not used.
-proc tcl::MacOSXPkgUnknown {original name version {exact {}}} {
+proc tcl::MacOSXPkgUnknown {original name args} {
# First do the cross-platform default search
- uplevel 1 $original [list $name $version $exact]
+ uplevel 1 $original [linsert $args 0 $name]
# Now do MacOSX specific searching
global auto_path
diff --git a/library/tm.tcl b/library/tm.tcl
index db1f361..b877cbb 100644
--- a/library/tm.tcl
+++ b/library/tm.tcl
@@ -189,7 +189,7 @@ proc ::tcl::tm::list {} {
# May populate the package ifneeded database with additional
# provide scripts.
-proc ::tcl::tm::UnknownHandler {original name version {exact {}}} {
+proc ::tcl::tm::UnknownHandler {original name args} {
# Import the list of paths to search for packages in module form.
# Import the pattern used to check package names in detail.
@@ -263,10 +263,8 @@ proc ::tcl::tm::UnknownHandler {original name version {exact {}}} {
# processing.
if {
- $pkgname eq $name && (
- ($exact eq "-exact" && ![package vcompare $pkgversion $version]) ||
- ($version ne "" && [package vsatisfies $pkgversion $version]) ||
- ($version eq ""))
+ ($pkgname eq $name) &&
+ [package vsatisfies $pkgversion {expand}$args]
} then {
set satisfied 1
# We do not abort the loop, and keep adding
@@ -287,7 +285,7 @@ proc ::tcl::tm::UnknownHandler {original name version {exact {}}} {
# about ::list...
if {[llength $original]} {
- uplevel 1 $original [::list $name $version $exact]
+ uplevel 1 $original [::linsert $args 0 $name]
}
}