summaryrefslogtreecommitdiffstats
path: root/library/tearoff.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'library/tearoff.tcl')
-rw-r--r--library/tearoff.tcl18
1 files changed, 9 insertions, 9 deletions
diff --git a/library/tearoff.tcl b/library/tearoff.tcl
index c2d2d6b..f69a988 100644
--- a/library/tearoff.tcl
+++ b/library/tearoff.tcl
@@ -2,8 +2,8 @@
#
# This file contains procedures that implement tear-off menus.
#
-# Copyright (c) 1994 The Regents of the University of California.
-# Copyright (c) 1994-1997 Sun Microsystems, Inc.
+# Copyright © 1994 The Regents of the University of California.
+# Copyright © 1994-1997 Sun Microsystems, Inc.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -39,7 +39,7 @@ proc ::tk::TearOffMenu {w {x 0} {y 0}} {
# Shift by height of tearoff entry minus height of window titlebar
catch {incr y [expr {[$w yposition 1] - 16}]}
# Avoid the native menu bar which sits on top of everything.
- if {$y < 22} { set y 22 }
+ if {$y < 22} {set y 22}
}
}
@@ -153,11 +153,11 @@ proc ::tk::MenuDup {src dst type} {
# Copy tags to x, replacing each substring of src with dst.
- while {[set index [string first $src $tags]] != -1} {
+ while {[set index [string first $src $tags]] >= 0} {
if {$index > 0} {
- append x [string range $tags 0 [expr {$index - 1}]]$dst
+ append x [string range $tags 0 $index-1]$dst
}
- set tags [string range $tags [expr {$index + $srcLen}] end]
+ set tags [string range $tags $index+$srcLen end]
}
append x $tags
@@ -170,12 +170,12 @@ proc ::tk::MenuDup {src dst type} {
# Copy script to x, replacing each substring of event with dst.
- while {[set index [string first $event $script]] != -1} {
+ while {[set index [string first $event $script]] >= 0} {
if {$index > 0} {
- append x [string range $script 0 [expr {$index - 1}]]
+ append x [string range $script 0 $index-1]
}
append x $dst
- set script [string range $script [expr {$index + $eventLen}] end]
+ set script [string range $script $index+$eventLen end]
}
append x $script