summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-05-31 23:14:11 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-05-31 23:14:11 (GMT)
commit10e31bc252115c3c1a4f1892c14c875e37af6e7a (patch)
treefe1bf9aec86879a70ae5e5f6941606d5abb727d4 /tools
parenta8f9285bd0caab44eabbdac73de5bfb58cb35cb3 (diff)
parentd23bb9578a50e42f1052a160d4abcc57ce29dd85 (diff)
downloadtcl-10e31bc252115c3c1a4f1892c14c875e37af6e7a.zip
tcl-10e31bc252115c3c1a4f1892c14c875e37af6e7a.tar.gz
tcl-10e31bc252115c3c1a4f1892c14c875e37af6e7a.tar.bz2
Merge 8.6
Diffstat (limited to 'tools')
-rw-r--r--tools/genStubs.tcl4
-rw-r--r--tools/man2help2.tcl2
-rw-r--r--tools/man2html2.tcl22
-rw-r--r--tools/regexpTestLib.tcl6
-rw-r--r--tools/str2c2
5 files changed, 18 insertions, 18 deletions
diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl
index f2f410f..83ee6c7 100644
--- a/tools/genStubs.tcl
+++ b/tools/genStubs.tcl
@@ -523,7 +523,7 @@ proc genStubs::makeDecl {name decl index} {
}
append line ", ...)"
if {[lindex $args end] eq "{const char *} format"} {
- append line " TCL_FORMAT_PRINTF(" [expr [llength $args] - 1] ", " [llength $args] ")"
+ append line " TCL_FORMAT_PRINTF(" [expr {[llength $args] - 1}] ", " [llength $args] ")"
}
}
default {
@@ -631,7 +631,7 @@ proc genStubs::makeSlot {name decl index} {
}
append text ", ...)"
if {[lindex $args end] eq "{const char *} format"} {
- append text " TCL_FORMAT_PRINTF(" [expr [llength $args] - 1] ", " [llength $args] ")"
+ append text " TCL_FORMAT_PRINTF(" [expr {[llength $args] - 1}] ", " [llength $args] ")"
}
}
default {
diff --git a/tools/man2help2.tcl b/tools/man2help2.tcl
index 9c8f503..4f3b7e5 100644
--- a/tools/man2help2.tcl
+++ b/tools/man2help2.tcl
@@ -827,7 +827,7 @@ proc IPmacro {argList} {
set text "\u00b7"
}
- set tab [expr $indent * 0.1]i
+ set tab [expr {$indent * 0.1}]i
newPara $tab -$tab
set state(sb) 80
setTabs $tab
diff --git a/tools/man2html2.tcl b/tools/man2html2.tcl
index e4ccedf..8483204 100644
--- a/tools/man2html2.tcl
+++ b/tools/man2html2.tcl
@@ -114,9 +114,9 @@ proc text string {
set pos [string first "\t" $string]
if {$pos >= 0} {
- text [string range $string 0 [expr $pos-1]]
+ text [string range $string 0 [expr {$pos-1}]]
tab
- text [string range $string [expr $pos+1] end]
+ text [string range $string [expr {$pos+1}] end]
return
}
if {$inTable} {
@@ -471,27 +471,27 @@ proc formattedText text {
text $text
return
}
- text [string range $text 0 [expr $index-1]]
- set c [string index $text [expr $index+1]]
+ text [string range $text 0 [expr {$index-1}]]
+ set c [string index $text [expr {$index+1}]]
switch -- $c {
f {
- font [string index $text [expr $index+2]]
- set text [string range $text [expr $index+3] end]
+ font [string index $text [expr {$index+2}]]
+ set text [string range $text [expr {$index+3}] end]
}
e {
text \\
- set text [string range $text [expr $index+2] end]
+ set text [string range $text [expr {$index+2}] end]
}
- {
dash
- set text [string range $text [expr $index+2] end]
+ set text [string range $text [expr {$index+2}] end]
}
| {
- set text [string range $text [expr $index+2] end]
+ set text [string range $text [expr {$index+2}] end]
}
default {
puts stderr "Unknown sequence: \\$c"
- set text [string range $text [expr $index+2] end]
+ set text [string range $text [expr {$index+2}] end]
}
}
}
@@ -527,7 +527,7 @@ proc tab {} {
global inPRE charCnt tabString file
# ? charCnt
if {$inPRE == 1} {
- set pos [expr $charCnt % [string length $tabString] ]
+ set pos [expr {$charCnt % [string length $tabString]}]
set spaces [string first "1" [string range $tabString $pos end] ]
text [format "%*s" [incr spaces] " "]
} else {
diff --git a/tools/regexpTestLib.tcl b/tools/regexpTestLib.tcl
index d84a012..8379159 100644
--- a/tools/regexpTestLib.tcl
+++ b/tools/regexpTestLib.tcl
@@ -17,13 +17,13 @@ proc readInputFile {} {
set len [string length $line]
- if {($len > 0) && ([string index $line [expr $len - 1]] == "\\")} {
+ if {($len > 0) && ([string index $line [expr {$len - 1}]] == "\\")} {
if {[info exists lineArray(c$i)] == 0} {
set lineArray(c$i) 1
} else {
incr lineArray(c$i)
}
- set line [string range $line 0 [expr $len - 2]]
+ set line [string range $line 0 [expr {$len - 2}]]
append lineArray($i) $line
continue
}
@@ -204,7 +204,7 @@ proc convertTestLine {currentLine len lineNum srcLineNum} {
# find the test result
- set numVars [expr $len - 3]
+ set numVars [expr {$len - 3}]
set vars {}
set vals {}
set result 0
diff --git a/tools/str2c b/tools/str2c
index cff7ba2..588abdf 100644
--- a/tools/str2c
+++ b/tools/str2c
@@ -39,7 +39,7 @@ static char data\[\]=\"[translate $r]\";"
static const char * const data\[\]= {"
set n 1
for {set i 0} {$i<$lg} {incr i $MAX} {
- set part [string range $r $i [expr $i+$MAX-1]]
+ set part [string range $r $i [expr {$i+$MAX-1}]]
set len [string length $part];
puts "\t/* Start of part $n ($len characters) */"
puts "\t\"[translate $part]\","