summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--library/history.tcl2
-rw-r--r--library/http/http.tcl37
-rw-r--r--library/http1.0/http.tcl4
-rw-r--r--library/init.tcl10
-rw-r--r--library/msgcat/msgcat.tcl6
-rw-r--r--library/opt/optparse.tcl2
-rw-r--r--library/package.tcl20
-rw-r--r--library/platform/shell.tcl2
-rw-r--r--library/reg/pkgIndex.tcl4
-rw-r--r--library/safe.tcl16
-rw-r--r--library/tcltest/tcltest.tcl18
-rw-r--r--library/tm.tcl2
-rw-r--r--tests/remote.tcl8
13 files changed, 65 insertions, 66 deletions
diff --git a/library/history.tcl b/library/history.tcl
index f06ffc9..79b7604 100644
--- a/library/history.tcl
+++ b/library/history.tcl
@@ -197,7 +197,7 @@ proc ::tcl::HistInfo {{count {}}} {
if {![info exists history($i)]} {
continue
}
- set cmd [string map [list \n \n\t] [string trimright $history($i) \ \n]]
+ set cmd [string map [list \n \n\t] [string trimright $history($i) \ \n]]
append result $newline[format "%6d %s" $i $cmd]
set newline \n
}
diff --git a/library/http/http.tcl b/library/http/http.tcl
index fb256a3..5dcd76c 100644
--- a/library/http/http.tcl
+++ b/library/http/http.tcl
@@ -281,9 +281,8 @@ proc http::Finish {token {errormsg ""} {skipCB 0}} {
# PASSED TO http::geturl AS -command callback.
catch {fileevent $state(sock) readable {}}
catch {fileevent $state(sock) writable {}}
- } elseif {
- ([info exists state(-keepalive)] && !$state(-keepalive))
- || ([info exists state(connection)] && ("close" in $state(connection)))
+ } elseif {([info exists state(-keepalive)] && !$state(-keepalive))
+ || ([info exists state(connection)] && ("close" in $state(connection)))
} {
set closeQueue 1
set connId $state(socketinfo)
@@ -772,7 +771,7 @@ proc http::geturl {url args} {
if {[regexp -- $pat $flag]} {
# Validate numbers
if { [info exists type($flag)]
- && (![string is $type($flag) -strict $value])
+ && (![string is $type($flag) -strict $value])
} {
unset $token
return -code error \
@@ -1697,9 +1696,9 @@ proc http::ReceiveResponse {token} {
coroutine ${token}EventCoroutine http::Event $sock $token
if {[info exists state(-handler)] || [info exists state(-progress)]} {
- fileevent $sock readable [list http::EventGateway $sock $token]
+ fileevent $sock readable [list http::EventGateway $sock $token]
} else {
- fileevent $sock readable ${token}EventCoroutine
+ fileevent $sock readable ${token}EventCoroutine
}
return
}
@@ -1725,15 +1724,15 @@ proc http::EventGateway {sock token} {
fileevent $sock readable {}
catch {${token}EventCoroutine} res opts
if {[info commands ${token}EventCoroutine] ne {}} {
- # The coroutine can be deleted by completion (a non-yield return), by
- # http::Finish (when there is a premature end to the transaction), by
- # http::reset or http::cleanup, or if the caller set option -channel
- # but not option -handler: in the last case reading from the socket is
- # now managed by commands ::http::Copy*, http::ReceiveChunked, and
- # http::make-transformation-chunked.
- #
- # Catch in case the coroutine has closed the socket.
- catch {fileevent $sock readable [list http::EventGateway $sock $token]}
+ # The coroutine can be deleted by completion (a non-yield return), by
+ # http::Finish (when there is a premature end to the transaction), by
+ # http::reset or http::cleanup, or if the caller set option -channel
+ # but not option -handler: in the last case reading from the socket is
+ # now managed by commands ::http::Copy*, http::ReceiveChunked, and
+ # http::make-transformation-chunked.
+ #
+ # Catch in case the coroutine has closed the socket.
+ catch {fileevent $sock readable [list http::EventGateway $sock $token]}
}
# If there was an error, re-throw it.
@@ -3379,10 +3378,10 @@ proc http::wait {token} {
proc http::formatQuery {args} {
if {[llength $args] % 2} {
- return \
- -code error \
- -errorcode [list HTTP BADARGCNT $args] \
- {Incorrect number of arguments, must be an even number.}
+ return \
+ -code error \
+ -errorcode [list HTTP BADARGCNT $args] \
+ {Incorrect number of arguments, must be an even number.}
}
set result ""
set sep ""
diff --git a/library/http1.0/http.tcl b/library/http1.0/http.tcl
index 8329de4..ce112d8 100644
--- a/library/http1.0/http.tcl
+++ b/library/http1.0/http.tcl
@@ -94,8 +94,8 @@ proc http_get { url args } {
meta {}
currentsize 0
totalsize 0
- type text/html
- body {}
+ type text/html
+ body {}
status ""
}
set options {-blocksize -channel -command -handler -headers \
diff --git a/library/init.tcl b/library/init.tcl
index a6745ab..e4e184f 100644
--- a/library/init.tcl
+++ b/library/init.tcl
@@ -611,12 +611,12 @@ proc auto_import {pattern} {
auto_load_index
foreach pattern $patternList {
- foreach name [array names auto_index $pattern] {
- if {([namespace which -command $name] eq "")
+ foreach name [array names auto_index $pattern] {
+ if {([namespace which -command $name] eq "")
&& ([namespace qualifiers $pattern] eq [namespace qualifiers $name])} {
- namespace inscope :: $auto_index($name)
- }
- }
+ namespace inscope :: $auto_index($name)
+ }
+ }
}
}
diff --git a/library/msgcat/msgcat.tcl b/library/msgcat/msgcat.tcl
index 851ad77..e112470 100644
--- a/library/msgcat/msgcat.tcl
+++ b/library/msgcat/msgcat.tcl
@@ -18,7 +18,7 @@ package provide msgcat 1.6.1
namespace eval msgcat {
namespace export mc mcexists mcload mclocale mcmax mcmset mcpreferences mcset\
- mcunknown mcflset mcflmset mcloadedlocales mcforgetpackage\
+ mcunknown mcflset mcflmset mcloadedlocales mcforgetpackage\
mcpackageconfig mcpackagelocale
# Records the list of locales to search
@@ -460,7 +460,7 @@ proc msgcat::mcpackagelocale {subcommand {locale ""}} {
return -code error "wrong # args: should be\
\"[lrange [info level 0] 0 1]\""
}
- set locale [string tolower $locale]
+ set locale [string tolower $locale]
}
set ns [uplevel 1 {::namespace current}]
@@ -631,7 +631,7 @@ proc msgcat::mcpackageconfig {subcommand option {value ""}} {
\"[lrange [info level 0] 0 2] value\""
}
} elseif {$subcommand eq "set"} {
- return -code error\
+ return -code error\
"wrong # args: should be \"[lrange [info level 0] 0 2]\""
}
diff --git a/library/opt/optparse.tcl b/library/opt/optparse.tcl
index 0a6cdfa..1aec83b 100644
--- a/library/opt/optparse.tcl
+++ b/library/opt/optparse.tcl
@@ -785,7 +785,7 @@ proc ::tcl::OptCheckType {arg type {typeArgs ""}} {
if {[regexp {^-(.+)$} $arg1 x type]} {
# flags/optValue as they are optional, need a "value",
# on the contrary, for a variable (non optional),
- # default value is pointless, 'cept for choices :
+ # default value is pointless, 'cept for choices :
if {$isflag || $isopt || ($type == "choice")} {
return [OptNewInst $state $varname $type $arg2 ""]
} else {
diff --git a/library/package.tcl b/library/package.tcl
index 33ee7aa..7b2b2e9 100644
--- a/library/package.tcl
+++ b/library/package.tcl
@@ -31,16 +31,16 @@ proc tcl::Pkg::CompareExtension {fileName {ext {}}} {
global tcl_platform
if {$ext eq ""} {set ext [info sharedlibextension]}
if {$tcl_platform(platform) eq "windows"} {
- return [string equal -nocase [file extension $fileName] $ext]
+ return [string equal -nocase [file extension $fileName] $ext]
} else {
- # Some unices add trailing numbers after the .so, so
- # we could have something like '.so.1.2'.
- set root $fileName
- while {1} {
- set currExt [file extension $root]
- if {$currExt eq $ext} {
- return 1
- }
+ # Some unices add trailing numbers after the .so, so
+ # we could have something like '.so.1.2'.
+ set root $fileName
+ while {1} {
+ set currExt [file extension $root]
+ if {$currExt eq $ext} {
+ return 1
+ }
# The current extension does not match; if it is not a numeric
# value, quit, as we are only looking to ignore version number
@@ -51,7 +51,7 @@ proc tcl::Pkg::CompareExtension {fileName {ext {}}} {
if {![string is integer -strict [string range $currExt 1 end]]} {
return 0
}
- set root [file rootname $root]
+ set root [file rootname $root]
}
}
}
diff --git a/library/platform/shell.tcl b/library/platform/shell.tcl
index 60d5b37..053ce53 100644
--- a/library/platform/shell.tcl
+++ b/library/platform/shell.tcl
@@ -131,7 +131,7 @@ proc ::platform::shell::RUN {shell code} {
set e [TEMP]
set code [catch {
- exec $shell $c 2> $e
+ exec $shell $c 2> $e
} res]
file delete $c
diff --git a/library/reg/pkgIndex.tcl b/library/reg/pkgIndex.tcl
index 6603e3e..3b430b1 100644
--- a/library/reg/pkgIndex.tcl
+++ b/library/reg/pkgIndex.tcl
@@ -2,8 +2,8 @@ if {![package vsatisfies [package provide Tcl] 8.5]} return
if {[info sharedlibextension] != ".dll"} return
if {[::tcl::pkgconfig get debug]} {
package ifneeded registry 1.3.5 \
- [list load [file join $dir tclreg13g.dll] Registry]
+ [list load [file join $dir tclreg13g.dll] Registry]
} else {
package ifneeded registry 1.3.5 \
- [list load [file join $dir tclreg13.dll] Registry]
+ [list load [file join $dir tclreg13.dll] Registry]
}
diff --git a/library/safe.tcl b/library/safe.tcl
index 71c1e67..e7044f8 100644
--- a/library/safe.tcl
+++ b/library/safe.tcl
@@ -376,7 +376,7 @@ proc ::safe::InterpSetConfig {child access_path staticsok nestedok deletehook} {
# Prevent the addition of dirs on the tm list to the
# result if they are already known.
if {[dict exists $remap_access_path $dir]} {
- if {$firstpass} {
+ if {$firstpass} {
# $dir is in [::tcl::tm::list] and belongs in the slave_tm_path.
# Later passes handle subdirectories, which belong in the
# access path but not in the module path.
@@ -596,9 +596,9 @@ proc ::safe::interpDelete {child} {
# Safe Base sub-interpreter, so each one is deleted cleanly and not by
# the automatic mechanism built into [interp delete].
foreach sub [interp children $child] {
- if {[info exists ::safe::[VarName [list $child $sub]]]} {
- ::safe::interpDelete [list $child $sub]
- }
+ if {[info exists ::safe::[VarName [list $child $sub]]]} {
+ ::safe::interpDelete [list $child $sub]
+ }
}
# If the child has a cleanup hook registered, call it. Check the
@@ -1192,14 +1192,14 @@ proc ::safe::AliasExeName {child} {
proc ::safe::RejectExcessColons {child} {
set stripped [regsub -all -- {:::*} $child ::]
if {[string range $stripped end-1 end] eq {::}} {
- return -code error {interpreter name must not end in "::"}
+ return -code error {interpreter name must not end in "::"}
}
if {$stripped ne $child} {
- set msg {interpreter name has excess colons in namespace separators}
- return -code error $msg
+ set msg {interpreter name has excess colons in namespace separators}
+ return -code error $msg
}
if {[string range $stripped 0 1] eq {::}} {
- return -code error {interpreter name must not begin "::"}
+ return -code error {interpreter name must not begin "::"}
}
return
}
diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl
index 2fc5838..168f521 100644
--- a/library/tcltest/tcltest.tcl
+++ b/library/tcltest/tcltest.tcl
@@ -1158,15 +1158,15 @@ proc tcltest::SafeFetch {n1 n2 op} {
proc tcltest::Asciify {s} {
set print ""
foreach c [split $s ""] {
- if {(($c < "\x7F") && [string is print $c]) || ($c eq "\n")} {
- append print $c
- } elseif {$c < "\u0100"} {
- append print \\x[format %02X [scan $c %c]]
- } elseif {$c > "\uFFFF"} {
- append print \\U[format %08X [scan $c %c]]
- } else {
- append print \\u[format %04X [scan $c %c]]
- }
+ if {(($c < "\x7F") && [string is print $c]) || ($c eq "\n")} {
+ append print $c
+ } elseif {$c < "\u0100"} {
+ append print \\x[format %02X [scan $c %c]]
+ } elseif {$c > "\uFFFF"} {
+ append print \\U[format %08X [scan $c %c]]
+ } else {
+ append print \\u[format %04X [scan $c %c]]
+ }
}
return $print
}
diff --git a/library/tm.tcl b/library/tm.tcl
index ca68ce1..796d09f 100644
--- a/library/tm.tcl
+++ b/library/tm.tcl
@@ -335,7 +335,7 @@ proc ::tcl::tm::Defaults {} {
foreach ev [::list \
TCL${major}.${n}_TM_PATH \
TCL${major}_${n}_TM_PATH \
- ] {
+ ] {
if {![info exists env($ev)]} continue
foreach p [split $env($ev) $sep] {
path add $p
diff --git a/tests/remote.tcl b/tests/remote.tcl
index 2b975c6..6a39b47 100644
--- a/tests/remote.tcl
+++ b/tests/remote.tcl
@@ -40,9 +40,9 @@ proc __readAndExecute__ {s} {
set l [gets $s]
if {[string compare $l "--Marker--Marker--Marker--"] == 0} {
- puts $s [__doCommands__ $command($s) $s]
+ puts $s [__doCommands__ $command($s) $s]
puts $s "--Marker--Marker--Marker--"
- set command($s) ""
+ set command($s) ""
return
}
if {[string compare $l ""] == 0} {
@@ -59,8 +59,8 @@ proc __readAndExecute__ {s} {
puts "Server closing $s, eof from client"
}
close $s
- unset command($s)
- return
+ unset command($s)
+ return
}
append command($s) $l "\n"
}