summaryrefslogtreecommitdiffstats
path: root/library/init.tcl
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-11-23 01:41:35 (GMT)
committerhobbs <hobbs>2002-11-23 01:41:35 (GMT)
commit55839b9b99968c33bd68a097248240de88dfd51b (patch)
treebc34776564b54866ca3e0b4c292037c4b4504402 /library/init.tcl
parentb56bfc9dd2b0556ccc280a089ad5f815b86cae2d (diff)
downloadtcl-55839b9b99968c33bd68a097248240de88dfd51b.zip
tcl-55839b9b99968c33bd68a097248240de88dfd51b.tar.gz
tcl-55839b9b99968c33bd68a097248240de88dfd51b.tar.bz2
* library/init.tcl: code cleanup to reduce use of
* library/opt/optparse.tcl: string compare
Diffstat (limited to 'library/init.tcl')
-rw-r--r--library/init.tcl10
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} {