diff options
author | dgp <dgp@users.sourceforge.net> | 2005-04-25 17:07:28 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2005-04-25 17:07:28 (GMT) |
commit | 05a7e4089e0fa1ba46992e35e409c3b0e15f5d18 (patch) | |
tree | dea011add0d7deb4b474619fa4babda54c0bbc2d /library | |
parent | 11714c91d63eb05f4a1afed228413e9fc8f65c1c (diff) | |
download | tcl-05a7e4089e0fa1ba46992e35e409c3b0e15f5d18.zip tcl-05a7e4089e0fa1ba46992e35e409c3b0e15f5d18.tar.gz tcl-05a7e4089e0fa1ba46992e35e409c3b0e15f5d18.tar.bz2 |
* library/init.tcl: Use "ni" and "in" operators.
Diffstat (limited to 'library')
-rw-r--r-- | library/init.tcl | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/library/init.tcl b/library/init.tcl index ecce094..82540b5 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.72 2005/04/19 18:44:18 dgp Exp $ +# RCS: @(#) $Id: init.tcl,v 1.73 2005/04/25 17:07:37 dgp Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -49,18 +49,18 @@ if {![info exists auto_path]} { namespace eval tcl { variable Dir foreach Dir [list $::tcl_library [file dirname $::tcl_library]] { - if {[lsearch -exact $::auto_path $Dir] < 0} { + if {$Dir ni $::auto_path} { lappend ::auto_path $Dir } } set Dir [file join [file dirname [file dirname \ [info nameofexecutable]]] lib] - if {[lsearch -exact $::auto_path $Dir] < 0} { + if {$Dir ni $::auto_path} { lappend ::auto_path $Dir } catch { foreach Dir $::tcl_pkgPath { - if {[lsearch -exact $::auto_path $Dir] < 0} { + if {$Dir ni $::auto_path} { lappend ::auto_path $Dir } } @@ -68,7 +68,7 @@ namespace eval tcl { variable Path [unsupported::EncodingDirs] set Dir [file join $::tcl_library encoding] - if {[lsearch -exact $Path $Dir] < 0} { + if {$Dir ni $Path} { lappend Path $Dir unsupported::EncodingDirs $Path } @@ -603,7 +603,7 @@ proc auto_execok name { set execExtensions [list {} .com .exe .bat] } - if {[lsearch -exact $shellBuiltins $name] != -1} { + if {$name in $shellBuiltins} { # When this is command.com for some reason on Win2K, Tcl won't # exec it unless the case is right, which this corrects. COMSPEC # may not point to a real file, so do the check. @@ -707,7 +707,7 @@ proc tcl::CopyDirectory {action src dest} { if {$action eq "renaming"} { # Can't rename volumes. We could give a more precise # error message here, but that would break the test suite. - if {[lsearch -exact [file volumes] $nsrc] != -1} { + if {$nsrc in [file volumes]} { return -code error "error $action \"$src\" to\ \"$dest\": trying to rename a volume or move a directory\ into itself" |