diff options
author | hobbs <hobbs@noemail.net> | 2002-11-23 01:41:35 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 2002-11-23 01:41:35 (GMT) |
commit | 69b6c40e1b5e010826a5bbaab04944939e65fcf7 (patch) | |
tree | bc34776564b54866ca3e0b4c292037c4b4504402 /library/init.tcl | |
parent | 0b25c138e5573cff22bcdaa1ee2aa4ee1f185d65 (diff) | |
download | tcl-69b6c40e1b5e010826a5bbaab04944939e65fcf7.zip tcl-69b6c40e1b5e010826a5bbaab04944939e65fcf7.tar.gz tcl-69b6c40e1b5e010826a5bbaab04944939e65fcf7.tar.bz2 |
* library/init.tcl: code cleanup to reduce use of
* library/opt/optparse.tcl: string compare
FossilOrigin-Name: 4e3709186c3363f9d5d8ad6fd132f1a9bcab8649
Diffstat (limited to 'library/init.tcl')
-rw-r--r-- | library/init.tcl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/library/init.tcl b/library/init.tcl index 10d0f3c..e5a5d0f 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.54 2002/10/28 16:34:25 dgp Exp $ +# RCS: @(#) $Id: init.tcl,v 1.55 2002/11/23 01:41:35 hobbs Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -48,7 +48,7 @@ if {![info exists auto_path]} { } namespace eval tcl { variable Dir - if {[string compare [info library] {}]} { + if {[info library] != ""} { foreach Dir [list [info library] [file dirname [info library]]] { if {[lsearch -exact $::auto_path $Dir] < 0} { lappend ::auto_path $Dir @@ -82,7 +82,7 @@ if {(![interp issafe]) && [string equal $tcl_platform(platform) "windows"]} { global env tcl_platform foreach p [array names env] { set u [string toupper $p] - if {[string compare $u $p]} { + if {![string equal $u $p]} { switch -- $u { COMSPEC - PATH { @@ -267,7 +267,7 @@ proc unknown args { && [info exists tcl_interactive] && $tcl_interactive} { if {![info exists auto_noexec]} { set new [auto_execok $name] - if {[string compare {} $new]} { + if {$new != ""} { set errorCode $savedErrorCode set errorInfo $savedErrorInfo set redir "" @@ -418,7 +418,7 @@ proc auto_load_index {} { error "[file join $dir tclIndex] isn't a proper Tcl index file" } } msg] - if {[string compare $f ""]} { + if {$f != ""} { close $f } if {$error} { |