summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
Diffstat (limited to 'library')
-rw-r--r--library/auto.tcl10
-rw-r--r--library/package.tcl8
-rw-r--r--library/safe.tcl18
3 files changed, 18 insertions, 18 deletions
diff --git a/library/auto.tcl b/library/auto.tcl
index 217d1c4..236af39 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.13 2003/03/19 21:57:40 dgp Exp $
+# RCS: @(#) $Id: auto.tcl,v 1.14 2003/11/14 20:44:45 dgp Exp $
#
# Copyright (c) 1991-1993 The Regents of the University of California.
# Copyright (c) 1994-1998 Sun Microsystems, Inc.
@@ -178,12 +178,12 @@ proc auto_mkindex {dir args} {
append index "# sets an element in the auto_index array, where the\n"
append index "# element name is the name of a command and the value is\n"
append index "# a script that loads the command.\n\n"
- if {$args == ""} {
+ if {[llength $args] == 0} {
set args *.tcl
}
auto_mkindex_parser::init
- foreach file [eval glob $args] {
+ foreach file [glob {expand}$args] {
if {[catch {auto_mkindex_parser::mkindex $file} msg] == 0} {
append index $msg
} else {
@@ -216,10 +216,10 @@ proc auto_mkindex_old {dir args} {
append index "# sets an element in the auto_index array, where the\n"
append index "# element name is the name of a command and the value is\n"
append index "# a script that loads the command.\n\n"
- if {[string equal $args ""]} {
+ if {[llength $args] == 0} {
set args *.tcl
}
- foreach file [eval glob $args] {
+ foreach file [glob {expand}$args] {
set f ""
set error [catch {
set f [open $file]
diff --git a/library/package.tcl b/library/package.tcl
index 77812f3..21fadd1 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.26 2003/09/24 18:07:45 vincentdarley Exp $
+# RCS: @(#) $Id: package.tcl,v 1.27 2003/11/14 20:44:45 dgp Exp $
#
# Copyright (c) 1991-1993 The Regents of the University of California.
# Copyright (c) 1994-1998 Sun Microsystems, Inc.
@@ -140,7 +140,7 @@ proc pkg_mkIndex {args} {
set oldDir [pwd]
cd $dir
- if {[catch {eval glob $patternList} fileList]} {
+ if {[catch {glob {expand}$patternList} fileList]} {
global errorCode errorInfo
cd $oldDir
return -code error -errorcode $errorCode -errorinfo $errorInfo $fileList
@@ -206,7 +206,7 @@ proc pkg_mkIndex {args} {
proc package {what args} {
switch -- $what {
require { return ; # ignore transitive requires }
- default { eval __package_orig {$what} $args }
+ default { __package_orig $what {expand}$args }
}
}
proc tclPkgUnknown args {}
@@ -261,7 +261,7 @@ proc pkg_mkIndex {args} {
proc ::tcl::GetAllNamespaces {{root ::}} {
set list $root
foreach ns [namespace children $root] {
- eval lappend list [::tcl::GetAllNamespaces $ns]
+ lappend list {expand}[::tcl::GetAllNamespaces $ns]
}
return $list
}
diff --git a/library/safe.tcl b/library/safe.tcl
index 541bdec..9420186 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.11 2003/07/16 22:49:12 hobbs Exp $
+# RCS: @(#) $Id: safe.tcl,v 1.12 2003/11/14 20:44:45 dgp Exp $
#
# The implementation is based on namespaces. These naming conventions
@@ -525,7 +525,7 @@ proc ::safe::interpDelete {slave} {
# remove the hook now, otherwise if the hook
# calls us somehow, we'll loop
Unset $hookname
- if {[catch {eval $hook [list $slave]} err]} {
+ if {[catch {{expand}$hook $slave} err]} {
Log $slave "Delete hook error ($err)"
}
}
@@ -636,15 +636,15 @@ proc ::safe::setLogCmd {args} {
}
# set/get values
proc Set {args} {
- eval [list Toplevel set] $args
+ Toplevel set {expand}$args
}
# lappend on toplevel vars
proc Lappend {args} {
- eval [list Toplevel lappend] $args
+ Toplevel lappend {expand}$args
}
# unset a var/token (currently just an global level eval)
proc Unset {args} {
- eval [list Toplevel unset] $args
+ Toplevel unset {expand}$args
}
# test existance
proc Exists {varname} {
@@ -691,7 +691,7 @@ proc ::safe::setLogCmd {args} {
proc Log {slave msg {type ERROR}} {
variable Log
if {[info exists Log] && [llength $Log]} {
- eval $Log [list "$type for slave $slave : $msg"]
+ {expand}$Log "$type for slave $slave : $msg"
}
}
@@ -856,7 +856,7 @@ proc ::safe::setLogCmd {args} {
proc Subset {slave command okpat args} {
set subcommand [lindex $args 0]
if {[regexp $okpat $subcommand]} {
- return [eval [list $command $subcommand] [lrange $args 1 end]]
+ return [$command $subcommand {expand}[lrange $args 1 end]]
}
set msg "not allowed to invoke subcommand $subcommand of $command"
Log $slave $msg
@@ -891,8 +891,8 @@ proc ::safe::setLogCmd {args} {
set subcommand [lindex $args 0]
if {[regexp $okpat $subcommand]} {
- return [eval ::interp invokehidden $slave encoding $subcommand \
- [lrange $args 1 end]]
+ return [::interp invokehidden $slave encoding $subcommand \
+ {expand}[lrange $args 1 end]]
}
if {[string match $subcommand system]} {