diff options
author | donal.k.fellows@manchester.ac.uk <dkf> | 2005-07-25 09:05:59 (GMT) |
---|---|---|
committer | donal.k.fellows@manchester.ac.uk <dkf> | 2005-07-25 09:05:59 (GMT) |
commit | b7f3fe0786b1f6492a7e5d674522aae7caad7a9d (patch) | |
tree | 500381c93622d097f72623503a4192b8a2313845 /library/console.tcl | |
parent | d08d277e0ffafe8c50c913ed6c83a74070542ae7 (diff) | |
download | tk-b7f3fe0786b1f6492a7e5d674522aae7caad7a9d.zip tk-b7f3fe0786b1f6492a7e5d674522aae7caad7a9d.tar.gz tk-b7f3fe0786b1f6492a7e5d674522aae7caad7a9d.tar.bz2 |
Apply some of the changes suggested in [Patch 1237759]
Diffstat (limited to 'library/console.tcl')
-rw-r--r-- | library/console.tcl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/library/console.tcl b/library/console.tcl index 893e086..ddd52e6 100644 --- a/library/console.tcl +++ b/library/console.tcl @@ -4,7 +4,7 @@ # can be used by non-unix systems that do not have built-in support # for shells. # -# RCS: @(#) $Id: console.tcl,v 1.28 2005/05/31 04:59:38 hobbs Exp $ +# RCS: @(#) $Id: console.tcl,v 1.29 2005/07/25 09:06:01 dkf Exp $ # # Copyright (c) 1995-1997 Sun Microsystems, Inc. # Copyright (c) 1998-2000 Ajuba Solutions. @@ -83,7 +83,7 @@ proc ::tk::ConsoleInit {} { AmpMenuArgs .menubar.edit add command -label [mc P&aste] -accel "$mod+V"\ -command {event generate .console <<Paste>>} - if {[string compare $tcl_platform(platform) "windows"]} { + if {$tcl_platform(platform) ne "windows"} { AmpMenuArgs .menubar.edit add command -label [mc Cl&ear] \ -command {event generate .console <<Clear>>} } else { @@ -169,7 +169,7 @@ proc ::tk::ConsoleSource {} { -filetypes [list \ [list [mc "Tcl Scripts"] .tcl] \ [list [mc "All Files"] *]]] - if {[string compare $filename ""]} { + if {$filename ne ""} { set cmd [list source $filename] if {[catch {consoleinterp eval $cmd} result]} { ConsoleOutput stderr "$result\n" @@ -190,7 +190,7 @@ proc ::tk::ConsoleInvoke {args} { set cmd "" if {[llength $ranges]} { set pos 0 - while {[string compare [lindex $ranges $pos] ""]} { + while {[lindex $ranges $pos] ne ""} { set start [lindex $ranges $pos] set end [lindex $ranges [incr pos]] append cmd [.console get $start $end] @@ -957,7 +957,7 @@ proc ::tk::console::ExpandProcname str { # possible further matches proc ::tk::console::ExpandVariable str { - if {[regexp {([^\(]*)\((.*)} $str junk ary str]} { + if {[regexp {([^\(]*)\((.*)} $str -> ary str]} { ## Looks like they're trying to expand an array. set match [EvalAttached [list array names $ary $str*]] if {[llength $match] > 1} { |