summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2015-09-01 15:15:46 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2015-09-01 15:15:46 (GMT)
commit67acc8945524908e6b8e9e1f8b1f949d3a146e11 (patch)
treece07568e15418586794d34eedbaa04e6f1db2dc9 /library
parent573f9fd80810dede88587f8ec61fb5cbb4a100b8 (diff)
downloadtcl-67acc8945524908e6b8e9e1f8b1f949d3a146e11.zip
tcl-67acc8945524908e6b8e9e1f8b1f949d3a146e11.tar.gz
tcl-67acc8945524908e6b8e9e1f8b1f949d3a146e11.tar.bz2
Whitespace reduction in Tcl scripts. No functional change.
Diffstat (limited to 'library')
-rw-r--r--library/init.tcl4
-rw-r--r--library/msgcat/msgcat.tcl14
-rw-r--r--library/opt/optparse.tcl4
-rw-r--r--library/package.tcl2
-rw-r--r--library/platform/platform.tcl2
-rw-r--r--library/safe.tcl4
-rw-r--r--library/tcltest/tcltest.tcl40
7 files changed, 35 insertions, 35 deletions
diff --git a/library/init.tcl b/library/init.tcl
index 05ac4a3..9bb28e9 100644
--- a/library/init.tcl
+++ b/library/init.tcl
@@ -12,7 +12,7 @@
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# This test intentionally written in pre-7.5 Tcl
+# This test intentionally written in pre-7.5 Tcl
if {[info commands package] == ""} {
error "version mismatch: library\nscripts expect Tcl version 7.5b1 or later but the loaded version is\nonly [info patchlevel]"
}
@@ -332,7 +332,7 @@ proc unknown args {
}
}
- if {([info level] == 1) && ([info script] eq "")
+ if {([info level] == 1) && ([info script] eq "")
&& [info exists tcl_interactive] && $tcl_interactive} {
if {![info exists auto_noexec]} {
set new [auto_execok $name]
diff --git a/library/msgcat/msgcat.tcl b/library/msgcat/msgcat.tcl
index 5ed9f3a..a43f13e 100644
--- a/library/msgcat/msgcat.tcl
+++ b/library/msgcat/msgcat.tcl
@@ -262,7 +262,7 @@ proc msgcat::mcexists {args} {
}
}
set src [lindex $args 0]
-
+
while {$ns ne ""} {
foreach loc $loclist {
if {[dict exists $Msgs $ns $loc $src]} {
@@ -305,7 +305,7 @@ proc msgcat::mclocale {args} {
}
if {[lindex $Loclist 0] ne $newLocale} {
set Loclist [GetPreferences $newLocale]
-
+
# locale not loaded jet
LoadAll $Loclist
# Invoke callback
@@ -463,7 +463,7 @@ proc msgcat::mcpackagelocale {subcommand {locale ""}} {
set locale [string tolower $locale]
}
set ns [uplevel 1 {::namespace current}]
-
+
switch -exact -- $subcommand {
get { return [lindex [PackagePreferences $ns] 0] }
preferences { return [PackagePreferences $ns] }
@@ -646,7 +646,7 @@ proc msgcat::mcpackageconfig {subcommand option {value ""}} {
isset { return [dict exists $PackageConfig $option $ns] }
unset { dict unset PackageConfig $option $ns }
set { # Set option
-
+
if {$option eq "mcfolder"} {
set value [file normalize $value]
}
@@ -779,7 +779,7 @@ proc msgcat::LoadAll {locales} {
set locales [ListComplement $LoadedLocales $locales]
if {0 == [llength $locales]} { return {} }
lappend LoadedLocales {*}$locales
-
+
set packages [lsort -unique [concat\
[dict keys [dict get $PackageConfig loadcmd]]\
[dict keys [dict get $PackageConfig mcfolder]]]]
@@ -812,14 +812,14 @@ proc msgcat::Load {ns locales {callbackonly 0}} {
# Invoke callback
Invoke loadcmd $locales $ns
-
+
if {$callbackonly || ![dict exists $PackageConfig mcfolder $ns]} {
return 0
}
# Invoke file load
set langdir [dict get $PackageConfig mcfolder $ns]
-
+
# Save the file locale if we are recursively called
if {[info exists FileLocale]} {
set nestedFileLocale $FileLocale
diff --git a/library/opt/optparse.tcl b/library/opt/optparse.tcl
index fc77fa1..869a2b6 100644
--- a/library/opt/optparse.tcl
+++ b/library/opt/optparse.tcl
@@ -435,7 +435,7 @@ proc ::tcl::OptProcArgGiven {argname} {
} elseif {$state == "optValue"} {
set state next; # not used, for debug only
# go to next state
- return
+ return
} else {
return -code error [OptMissingValue $descriptions]
}
@@ -538,7 +538,7 @@ proc ::tcl::OptKeyParse {descKey arglist} {
# Analyse the result
# Walk through the tree:
- OptTreeVars $desc "#[expr {[info level]-1}]"
+ OptTreeVars $desc "#[expr {[info level]-1}]"
}
# determine string length for nice tabulated output
diff --git a/library/package.tcl b/library/package.tcl
index 52daa0e..44e3b28 100644
--- a/library/package.tcl
+++ b/library/package.tcl
@@ -726,7 +726,7 @@ proc ::tcl::Pkg::Create {args} {
foreach key {load source} {
foreach filespec $opts(-$key) {
lassign $filespec filename proclist
-
+
if { [llength $proclist] == 0 } {
set cmd "\[list $key \[file join \$dir [list $filename]\]\]"
lappend cmdList $cmd
diff --git a/library/platform/platform.tcl b/library/platform/platform.tcl
index 1bce7b5..e0bcce6 100644
--- a/library/platform/platform.tcl
+++ b/library/platform/platform.tcl
@@ -323,7 +323,7 @@ proc ::platform::patterns {id} {
lappend res macosx-universal macosx-i386-x86_64
}
macosx*-* {
- # 10.5+
+ # 10.5+
if {[regexp {macosx([^-]*)-(.*)} $id -> v cpu]} {
switch -exact -- $cpu {
diff --git a/library/safe.tcl b/library/safe.tcl
index 394aa97..ea6391d 100644
--- a/library/safe.tcl
+++ b/library/safe.tcl
@@ -853,7 +853,7 @@ proc ::safe::AliasSource {slave args} {
return -code error $msg
}
set file [lindex $args $at]
-
+
# get the real path from the virtual one.
if {[catch {
set realfile [TranslatePath $slave $file]
@@ -861,7 +861,7 @@ proc ::safe::AliasSource {slave args} {
Log $slave $msg
return -code error "permission denied"
}
-
+
# check that the path is in the access path of that slave
if {[catch {
FileInAccessPath $slave $realfile
diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl
index 8e43859..29ef778 100644
--- a/library/tcltest/tcltest.tcl
+++ b/library/tcltest/tcltest.tcl
@@ -347,7 +347,7 @@ namespace eval tcltest {
# This is very subtle and tricky, so let me try to explain.
# (Hopefully this longer comment will be clear when I come
# back in a few months, unlike its predecessor :) )
- #
+ #
# The [outputChannel] command (and underlying variable) have to
# be kept in sync with the [configure -outfile] configuration
# option ( and underlying variable Option(-outfile) ). This is
@@ -362,12 +362,12 @@ namespace eval tcltest {
# configuration options to parse the command line option the first
# time they are read. These traces are cancelled whenever the
# program itself calls [configure].
- #
+ #
# OK, then so to support tcltest 1 compatibility, it seems we want
# to get the return from [outputFile] to trigger the read traces,
# just in case.
#
- # BUT! A little known feature of Tcl variable traces is that
+ # BUT! A little known feature of Tcl variable traces is that
# traces are disabled during the handling of other traces. So,
# if we trigger read traces on Option(-outfile) and that triggers
# command line parsing which turns around and sets an initial
@@ -608,7 +608,7 @@ namespace eval tcltest {
set code [catch {Configure {*}$args} msg]
return -code $code $msg
}
-
+
proc AcceptVerbose { level } {
set level [AcceptList $level]
if {[llength $level] == 1} {
@@ -639,7 +639,7 @@ namespace eval tcltest {
skipped tests if 's' is specified, the bodies of failed tests if
'b' is specified, and when tests start if 't' is specified.
ErrorInfo is displayed if 'e' is specified. Source file line
- information of failed tests is displayed if 'l' is specified.
+ information of failed tests is displayed if 'l' is specified.
} AcceptVerbose verbose
# Match and skip patterns default to the empty list, except for
@@ -687,7 +687,7 @@ namespace eval tcltest {
# some additional output regarding operations of the test harness.
# The tcltest package currently implements only up to debug level 3.
Option -debug 0 {
- Internal debug level
+ Internal debug level
} AcceptInteger debug
proc SetSelectedConstraints args {
@@ -715,7 +715,7 @@ namespace eval tcltest {
}
Option -limitconstraints 0 {
whether to run only tests with the constraints
- } AcceptBoolean limitConstraints
+ } AcceptBoolean limitConstraints
trace add variable Option(-limitconstraints) write \
[namespace code {ClearUnselectedConstraints ;#}]
@@ -728,7 +728,7 @@ namespace eval tcltest {
# Default is to run each test file in a separate process
Option -singleproc 0 {
whether to run all tests in one process
- } AcceptBoolean singleProcess
+ } AcceptBoolean singleProcess
proc AcceptTemporaryDirectory { directory } {
set directory [AcceptAbsolutePath $directory]
@@ -1257,7 +1257,7 @@ proc tcltest::DefineConstraintInitializers {} {
# setting files into nonblocking mode.
ConstraintInitializer nonBlockFiles {
- set code [expr {[catch {set f [open defs r]}]
+ set code [expr {[catch {set f [open defs r]}]
|| [catch {chan configure $f -blocking off}]}]
catch {close $f}
set code
@@ -1271,7 +1271,7 @@ proc tcltest::DefineConstraintInitializers {} {
# (Mark Diekhans).
ConstraintInitializer asyncPipeClose {expr {
- !([string equal unix $::tcl_platform(platform)]
+ !([string equal unix $::tcl_platform(platform)]
&& ([catch {exec uname -X | fgrep {Release = 3.2v}}] == 0))}}
# Test to see if we have a broken version of sprintf with respect
@@ -1954,7 +1954,7 @@ proc tcltest::test {name description args} {
return
}
- # Save information about the core file.
+ # Save information about the core file.
if {[preserveCore]} {
if {[file exists [file join [workingDirectory] core]]} {
set coreModTime [file mtime [file join [workingDirectory] core]]
@@ -2060,7 +2060,7 @@ proc tcltest::test {name description args} {
} else {
set coreFailure 1
}
-
+
if {([preserveCore] > 1) && ($coreFailure)} {
append coreMsg "\nMoving file to:\
[file join [temporaryDirectory] core-$name]"
@@ -2100,7 +2100,7 @@ proc tcltest::test {name description args} {
variable currentFailure true
if {![IsVerbose body]} {
set body ""
- }
+ }
puts [outputChannel] "\n"
if {[IsVerbose line]} {
if {![catch {set testFrame [info frame -1]}] &&
@@ -2121,7 +2121,7 @@ proc tcltest::test {name description args} {
puts [outputChannel] "$testFile:$testLine: error: test failed:\
$name [string trim $description]"
}
- }
+ }
puts [outputChannel] "==== $name\
[string trim $description] FAILED"
if {[string length $body]} {
@@ -2277,7 +2277,7 @@ proc tcltest::Skipped {name constraints} {
}
}
}
-
+
if {!$doTest} {
if {[IsVerbose skip]} {
puts [outputChannel] "++++ $name SKIPPED: $constraints"
@@ -2834,9 +2834,9 @@ proc tcltest::runAllTests { {shell ""} } {
set dir [file tail $directory]
puts [outputChannel] [string repeat ~ 44]
puts [outputChannel] "$dir test began at [eval $timeCmd]\n"
-
+
uplevel 1 [list ::source [file join $directory all.tcl]]
-
+
set endTime [eval $timeCmd]
puts [outputChannel] "\n$dir test ended at $endTime"
puts [outputChannel] ""
@@ -3019,7 +3019,7 @@ proc tcltest::removeFile {name {directory ""}} {
DebugDo 1 {
Warn "removeFile removing \"$fullName\":\n not created by makeFile"
}
- }
+ }
if {![file isfile $fullName]} {
DebugDo 1 {
Warn "removeFile removing \"$fullName\":\n not a file"
@@ -3090,7 +3090,7 @@ proc tcltest::removeDirectory {name {directory ""}} {
Warn "removeDirectory removing \"$fullName\":\n not created\
by makeDirectory"
}
- }
+ }
if {![file isdirectory $fullName]} {
DebugDo 1 {
Warn "removeDirectory removing \"$fullName\":\n not a directory"
@@ -3285,7 +3285,7 @@ proc tcltest::threadReap {} {
testthread errorproc ThreadError
return [llength [testthread names]]
} elseif {[info commands thread::id] ne {}} {
-
+
# Thread extension
thread::errorproc ThreadNullError