diff options
author | hobbs <hobbs@noemail.net> | 2001-04-03 22:54:36 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 2001-04-03 22:54:36 (GMT) |
commit | 1de9841f1bc65b7783ea7b98ef4f0599e3d1955e (patch) | |
tree | fea9fa3b3e3b2f751ae7af5de5f61cdbaa2336bd /library/opt | |
parent | 3f08d1c6f1bda731b8bcd09fa4f9a7a00ae2033e (diff) | |
download | tcl-1de9841f1bc65b7783ea7b98ef4f0599e3d1955e.zip tcl-1de9841f1bc65b7783ea7b98ef4f0599e3d1955e.tar.gz tcl-1de9841f1bc65b7783ea7b98ef4f0599e3d1955e.tar.bz2 |
see backport log in ChangeLog for specific file backports from 8.4aCVS
FossilOrigin-Name: 6defc375da7f53c897947de6051d97cbc0a30fc8
Diffstat (limited to 'library/opt')
-rw-r--r-- | library/opt/optparse.tcl | 16 | ||||
-rw-r--r-- | library/opt/pkgIndex.tcl | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/library/opt/optparse.tcl b/library/opt/optparse.tcl index 1038efb..d552297 100644 --- a/library/opt/optparse.tcl +++ b/library/opt/optparse.tcl @@ -8,9 +8,9 @@ # on it. If your code does rely on this package you # may directly incorporate this code into your application. # -# RCS: @(#) $Id: optparse.tcl,v 1.2.12.1 2000/08/07 21:32:11 hobbs Exp $ +# RCS: @(#) $Id: optparse.tcl,v 1.2.12.2 2001/04/03 22:54:38 hobbs Exp $ -package provide opt 0.4.1 +package provide opt 0.4.2 namespace eval ::tcl { @@ -239,7 +239,7 @@ proc ::tcl::OptKeyDelete {key} { # Assign a temporary key, call OptKeyParse and then free the storage proc ::tcl::OptParse {desc arglist} { set tempkey [OptKeyRegister $desc]; - set ret [catch {uplevel [list ::tcl::OptKeyParse $tempkey $arglist]} res]; + set ret [catch {uplevel 1 [list ::tcl::OptKeyParse $tempkey $arglist]} res]; OptKeyDelete $tempkey; return -code $ret $res; } @@ -252,7 +252,7 @@ proc ::tcl::OptParse {desc arglist} { # (the other will be sets to their default value) # into local variable named "Args". proc ::tcl::OptProc {name desc body} { - set namespace [uplevel namespace current]; + set namespace [uplevel 1 [list ::namespace current]]; if { ([string match "::*" $name]) || ([string compare $namespace "::"]==0)} { # absolute name or global namespace, name is the key @@ -262,7 +262,7 @@ proc ::tcl::OptProc {name desc body} { set key "${namespace}::${name}"; } OptKeyRegister $desc $key; - uplevel [list proc $name args "set Args \[::tcl::OptKeyParse $key \$args\]\n$body"]; + uplevel 1 [list ::proc $name args "set Args \[::tcl::OptKeyParse $key \$args\]\n$body"]; return $key; } # Check that a argument has been given @@ -307,7 +307,7 @@ proc ::tcl::OptProcArgGiven {argname} { # Advance to next description proc OptNextDesc {descName} { - uplevel [list Lvarincr $descName {0 1}]; + uplevel 1 [list Lvarincr $descName {0 1}]; } # Get the current description, eventually descend @@ -365,7 +365,7 @@ proc ::tcl::OptProcArgGiven {argname} { } # Advance to next argument proc OptNextArg {argsName} { - uplevel [list Lvarpop1 $argsName]; + uplevel 1 [list Lvarpop1 $argsName]; } ####### @@ -1055,7 +1055,7 @@ proc ::tcl::Lassign {list args} { set lg [llength $list]; foreach vname $args { if {$i>=$lg} break - uplevel [list set $vname [lindex $list $i]]; + uplevel 1 [list ::set $vname [lindex $list $i]]; incr i; } return $lg; diff --git a/library/opt/pkgIndex.tcl b/library/opt/pkgIndex.tcl index 260e572..2de9531 100644 --- a/library/opt/pkgIndex.tcl +++ b/library/opt/pkgIndex.tcl @@ -8,4 +8,4 @@ # script is sourced, the variable $dir must contain the # full path name of this file's directory. -package ifneeded opt 0.4.1 [list source [file join $dir optparse.tcl]] +package ifneeded opt 0.4.2 [list source [file join $dir optparse.tcl]] |