summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/findBadExternals.tcl4
-rwxr-xr-xtools/loadICU.tcl12
-rwxr-xr-xtools/makeTestCases.tcl132
-rw-r--r--tools/man2help.tcl2
-rw-r--r--tools/man2html.tcl8
-rw-r--r--tools/man2html1.tcl18
-rw-r--r--tools/mkdepend.tcl14
7 files changed, 95 insertions, 95 deletions
diff --git a/tools/findBadExternals.tcl b/tools/findBadExternals.tcl
index 7592f17..2228357 100755
--- a/tools/findBadExternals.tcl
+++ b/tools/findBadExternals.tcl
@@ -1,5 +1,5 @@
# findBadExternals.tcl --
-#
+#
# This script scans the Tcl load library for exported symbols
# that do not begin with 'Tcl' or 'tcl'. It reports them on the
# standard output. It is used to make sure that the library does
@@ -29,7 +29,7 @@ proc main {argc argv} {
macosx {
set status [catch {
exec nm --extern-only --defined-only [lindex $argv 0]
- } result]
+ } result]
}
windows {
set status [catch {
diff --git a/tools/loadICU.tcl b/tools/loadICU.tcl
index 5b09e2c..31f1e54 100755
--- a/tools/loadICU.tcl
+++ b/tools/loadICU.tcl
@@ -432,7 +432,7 @@ proc handleLocaleFile { localeName fileName msgFileName } {
if { ![info exists format($localeName,TIME_FORMAT)] } {
for { set i 3 } { $i >= 0 } { incr i -1 } {
- if { [regexp H [lindex $items(DateTimePatterns) $i]]
+ if { [regexp H [lindex $items(DateTimePatterns) $i]]
&& [regexp s [lindex $items(DateTimePatterns) $i]] } {
break
}
@@ -464,7 +464,7 @@ proc handleLocaleFile { localeName fileName msgFileName } {
if { ![info exists format($localeName,TIME_FORMAT_12)] } {
for { set i 3 } { $i >= 0 } { incr i -1 } {
- if { [regexp h [lindex $items(DateTimePatterns) $i]]
+ if { [regexp h [lindex $items(DateTimePatterns) $i]]
&& [regexp s [lindex $items(DateTimePatterns) $i]] } {
break
}
@@ -489,7 +489,7 @@ proc handleLocaleFile { localeName fileName msgFileName } {
# Date and time... Prefer 24-hour format to 12-hour format.
- if { ![info exists format($localeName,DATE_TIME_FORMAT)]
+ if { ![info exists format($localeName,DATE_TIME_FORMAT)]
&& [info exists format($localeName,DATE_FORMAT)]
&& [info exists format($localeName,TIME_FORMAT)]} {
set format($localeName,DATE_TIME_FORMAT) \
@@ -497,7 +497,7 @@ proc handleLocaleFile { localeName fileName msgFileName } {
append format($localeName,DATE_TIME_FORMAT) \
" " $format($localeName,TIME_FORMAT) " %z"
}
- if { ![info exists format($localeName,DATE_TIME_FORMAT)]
+ if { ![info exists format($localeName,DATE_TIME_FORMAT)]
&& [info exists format($localeName,DATE_FORMAT)]
&& [info exists format($localeName,TIME_FORMAT_12)]} {
set format($localeName,DATE_TIME_FORMAT) \
@@ -517,7 +517,7 @@ proc handleLocaleFile { localeName fileName msgFileName } {
# Write the string sets to the file.
- foreach key {
+ foreach key {
LOCALE_NUMERALS LOCALE_DATE_FORMAT LOCALE_TIME_FORMAT
LOCALE_DATE_TIME_FORMAT LOCALE_ERAS LOCALE_YEAR_FORMAT
} {
@@ -588,7 +588,7 @@ proc backslashify { string } {
set retval {}
foreach char [split $string {}] {
scan $char %c ccode
- if { $ccode >= 0x0020 && $ccode < 0x007f && $char ne "\""
+ if { $ccode >= 0x0020 && $ccode < 0x007f && $char ne "\""
&& $char ne "\{" && $char ne "\}" && $char ne "\["
&& $char ne "\]" && $char ne "\\" && $char ne "\$" } {
append retval $char
diff --git a/tools/makeTestCases.tcl b/tools/makeTestCases.tcl
index d96a221..6cc033b 100755
--- a/tools/makeTestCases.tcl
+++ b/tools/makeTestCases.tcl
@@ -40,7 +40,7 @@ namespace eval ::tcl::clock {
l li lii liii liv lv lvi lvii lviii lix
lx lxi lxii lxiii lxiv lxv lxvi lxvii lxviii lxix
lxx lxxi lxxii lxxiii lxxiv lxxv lxxvi lxxvii lxxviii lxxix
- lxxx lxxxi lxxxii lxxxiii lxxxiv lxxxv lxxxvi lxxxvii lxxxviii
+ lxxx lxxxi lxxxii lxxxiii lxxxiv lxxxv lxxxvi lxxxvii lxxxviii
lxxxix
xc xci xcii xciii xciv xcv xcvi xcvii xcviii xcix
c
@@ -62,7 +62,7 @@ namespace eval ::tcl::clock {
#
# Parameters:
# startOfYearArray - Name of an array in caller's scope that will
-# be initialized as
+# be initialized as
# Results:
# None
#
@@ -106,7 +106,7 @@ proc listYears { startOfYearArray } {
set s $s2
incr y
}
-
+
# List years before 1970
set y 1970
@@ -138,7 +138,7 @@ proc listYears { startOfYearArray } {
#----------------------------------------------------------------------
#
-# processFile -
+# processFile -
#
# Processes the 'clock.test' file, updating the test cases in it.
#
@@ -153,7 +153,7 @@ proc listYears { startOfYearArray } {
proc processFile {d} {
# Open two files
-
+
set f1 [open [file join $d tests/clock.test] r]
set f2 [open [file join $d tests/clock.new] w]
@@ -164,7 +164,7 @@ proc processFile {d} {
switch -exact -- $state {
{} {
puts $f2 $line
- if { [regexp "^\# BEGIN (.*)" $line -> cases]
+ if { [regexp "^\# BEGIN (.*)" $line -> cases]
&& [string compare {} [info commands $cases]] } {
set state inCaseSet
$cases $f2
@@ -213,7 +213,7 @@ proc testcases2 { f2 } {
listYears startOfYear
# Define the roman numerals
-
+
set roman {
? i ii iii iv v vi vii viii ix
x xi xii xiii xiv xv xvi xvii xviii xix
@@ -235,20 +235,20 @@ proc testcases2 { f2 } {
}
# Names of the months
-
+
set short {{} Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec}
set long {
{} January February March April May June July August September
October November December
}
-
+
# Put out a header describing the tests
-
+
puts $f2 ""
puts $f2 "\# Test formatting of Gregorian year, month, day, all formats"
puts $f2 "\# Formats tested: %b %B %c %Ec %C %EC %d %Od %e %Oe %h %j %J %m %Om %N %x %Ex %y %Oy %Y %EY"
puts $f2 ""
-
+
# Generate the test cases for the first and last day of every month
# from 1896 to 2045
@@ -262,7 +262,7 @@ proc testcases2 { f2 } {
if { $m == 2 && ( $y%4 == 0 && $y%100 != 0 || $y%400 == 0 ) } {
incr hath
}
-
+
set b [lindex $short $m]
set B [lindex $long $m]
set C [format %02d [expr { $y / 100 }]]
@@ -271,9 +271,9 @@ proc testcases2 { f2 } {
set mm [format %02d $m]
set N [format %2d $m]
set yy [format %02d [expr { $y % 100 }]]
-
+
set J [expr { ( $s / 86400 ) + 2440588 }]
-
+
set dt $y-$mm-01
set result ""
append result $b " " $B " " \
@@ -296,17 +296,17 @@ proc testcases2 { f2 } {
puts $f2 "\t-format {%b %B %c %Ec %C %EC %d %Od %e %Oe %h %j %J %m %Om %N %x %Ex %y %Oy %Y} \\"
puts $f2 "\t-gmt true -locale en_US_roman"
puts $f2 "} {$result}"
-
+
set hm1 [expr { $hath - 1 }]
incr s [expr { 86400 * ( $hath - 1 ) }]
incr yd $hm1
-
+
set dd [format %02d $hath]
set ee [format %2d $hath]
set j [format %03d $yd]
-
+
set J [expr { ( $s / 86400 ) + 2440588 }]
-
+
set dt $y-$mm-$dd
set result ""
append result $b " " $B " " \
@@ -332,7 +332,7 @@ proc testcases2 { f2 } {
puts $f2 "\t-format {%b %B %c %Ec %C %EC %d %Od %e %Oe %h %j %J %m %Om %N %x %Ex %y %Oy %Y} \\"
puts $f2 "\t-gmt true -locale en_US_roman"
puts $f2 "} {$result}"
-
+
incr s 86400
incr yd
}
@@ -451,7 +451,7 @@ proc testcases3 { f2 } {
testISO $f2 $ym1 52 1 [expr { $secs - 5*86400 }]
testISO $f2 $ym1 52 6 $secs
testISO $f2 $ym1 52 7 [expr { $secs + 86400 }]
- }
+ }
testISO $f2 $y 1 1 [expr { $secs + 2*86400 }]
testISO $f2 $y 1 6 [expr { $secs + 7*86400 }]
testISO $f2 $y 1 7 [expr { $secs + 8*86400 }]
@@ -466,10 +466,10 @@ proc testcases3 { f2 } {
proc testISO { f2 G V u secs } {
upvar 1 case case
-
+
set longdays {Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday}
set shortdays {Sun Mon Tue Wed Thu Fri Sat Sun}
-
+
puts $f2 "test clock-3.[incr case] {ISO week-based calendar [format %04d-W%02d-%d $G $V $u]} {"
puts $f2 " clock format $secs -format {%a %A %g %G %u %U %V %w %W} -gmt true; \# $G-W[format %02d $V]-$u"
puts $f2 "} {[lindex $shortdays $u] [lindex $longdays $u]\
@@ -478,7 +478,7 @@ proc testISO { f2 G V u secs } {
[clock format $secs -format %U -gmt true]\
[format %02d $V] [expr { $u % 7 }]\
[clock format $secs -format %W -gmt true]}"
-
+
}
#----------------------------------------------------------------------
@@ -504,15 +504,15 @@ proc testcases4 { f2 } {
puts $f2 "\# Test formatting of time of day"
puts $f2 "\# Format groups tested: %H %OH %I %OI %k %Ok %l %Ol %M %OM %p %P %r %R %S %OS %T %X %EX %+"
puts $f2 {}
-
+
set i 0
set fmt "%H %OH %I %OI %k %Ok %l %Ol %M %OM %p %P %r %R %S %OS %T %X %EX %+"
- foreach { h romanH I romanI am } {
- 0 ? 12 xii AM
- 1 i 1 i AM
- 11 xi 11 xi AM
- 12 xii 12 xii PM
- 13 xiii 1 i PM
+ foreach { h romanH I romanI am } {
+ 0 ? 12 xii AM
+ 1 i 1 i AM
+ 11 xi 11 xi AM
+ 12 xii 12 xii PM
+ 13 xiii 1 i PM
23 xxiii 11 xi PM
} {
set hh [format %02d $h]
@@ -547,7 +547,7 @@ proc testcases4 { f2 } {
puts "testcases4: $i test cases."
}
-
+
#----------------------------------------------------------------------
#
# testcases5 --
@@ -572,9 +572,9 @@ proc testcases5 { f2 } {
puts $f2 {}
puts $f2 "\# Test formatting of Daylight Saving Time"
puts $f2 {}
-
+
set fmt {%H:%M:%S %z %Z}
-
+
set i 0
puts $f2 "test clock-5.[incr i] {does Detroit exist} {"
puts $f2 " clock format 0 -format {} -timezone :America/Detroit"
@@ -587,7 +587,7 @@ proc testcases5 { f2 } {
puts $f2 " concat {ok}"
puts $f2 " }"
puts $f2 "} ok"
-
+
foreach row $TZData(:America/Detroit) {
foreach { t offset isdst tzname } $row break
if { $t > -4000000000000 } {
@@ -648,12 +648,12 @@ proc testcases5 { f2 } {
proc testcases8 { f2 } {
# Put out a header describing the tests
-
+
puts $f2 ""
puts $f2 "\# Test parsing of ccyymmdd"
puts $f2 ""
-
- set n 0
+
+ set n 0
foreach year {1970 1971 2000 2001} {
foreach month {01 12} {
foreach day {02 31} {
@@ -670,7 +670,7 @@ proc testcases8 { f2 } {
puts $f2 "} $scanned"
}
}
- }
+ }
foreach fmt {%x %D} {
set string [clock format $scanned \
-format $fmt \
@@ -708,11 +708,11 @@ proc testcases8 { f2 } {
proc testcases11 { f2 } {
# Put out a header describing the tests
-
+
puts $f2 ""
puts $f2 "\# Test precedence among yyyymmdd and yyyyddd"
puts $f2 ""
-
+
array set v {
Y 1970
m 01
@@ -771,12 +771,12 @@ proc testcases11 { f2 } {
proc testcases12 { f2 } {
# Put out a header describing the tests
-
+
puts $f2 ""
puts $f2 "\# Test parsing of ccyyWwwd"
puts $f2 ""
-
- set n 0
+
+ set n 0
foreach year {1970 1971 2000 2001} {
foreach month {01 12} {
foreach day {02 31} {
@@ -817,12 +817,12 @@ proc testcases12 { f2 } {
proc testcases14 { f2 } {
# Put out a header describing the tests
-
+
puts $f2 ""
puts $f2 "\# Test parsing of yymmdd"
puts $f2 ""
-
- set n 0
+
+ set n 0
foreach year {1938 1970 2000 2037} {
foreach month {01 12} {
foreach day {02 31} {
@@ -839,7 +839,7 @@ proc testcases14 { f2 } {
puts $f2 "} $scanned"
}
}
- }
+ }
}
}
}
@@ -868,12 +868,12 @@ proc testcases14 { f2 } {
proc testcases17 { f2 } {
# Put out a header describing the tests
-
+
puts $f2 ""
puts $f2 "\# Test parsing of yyWwwd"
puts $f2 ""
-
- set n 0
+
+ set n 0
foreach year {1970 1971 2000 2001} {
foreach month {01 12} {
foreach day {02 31} {
@@ -914,12 +914,12 @@ proc testcases17 { f2 } {
proc testcases19 { f2 } {
# Put out a header describing the tests
-
+
puts $f2 ""
puts $f2 "\# Test parsing of mmdd"
puts $f2 ""
-
- set n 0
+
+ set n 0
foreach year {1938 1970 2000 2037} {
set base [clock scan ${year}0101 -gmt true]
foreach month {01 12} {
@@ -935,7 +935,7 @@ proc testcases19 { f2 } {
puts $f2 " [list clock scan $string -format [list $mm $dd] -locale en_US_roman -base $base -gmt 1]"
puts $f2 "} $scanned"
}
- }
+ }
}
}
}
@@ -964,12 +964,12 @@ proc testcases19 { f2 } {
proc testcases22 { f2 } {
# Put out a header describing the tests
-
+
puts $f2 ""
puts $f2 "\# Test parsing of Wwwd"
puts $f2 ""
-
- set n 0
+
+ set n 0
foreach year {1970 1971 2000 2001} {
set base [clock scan ${year}0104 -gmt true]
foreach month {03 10} {
@@ -1011,12 +1011,12 @@ proc testcases22 { f2 } {
proc testcases24 { f2 } {
# Put out a header describing the tests
-
+
puts $f2 ""
puts $f2 "\# Test parsing of naked day-of-month"
puts $f2 ""
-
- set n 0
+
+ set n 0
foreach year {1970 2000} {
foreach month {01 12} {
set base [clock scan ${year}${month}01 -gmt true]
@@ -1030,7 +1030,7 @@ proc testcases24 { f2 } {
puts $f2 "test clock-24.[incr n] {parse naked day of month} {"
puts $f2 " [list clock scan $string -format $dd -locale en_US_roman -base $base -gmt 1]"
puts $f2 "} $scanned"
- }
+ }
}
}
}
@@ -1059,12 +1059,12 @@ proc testcases24 { f2 } {
proc testcases26 { f2 } {
# Put out a header describing the tests
-
+
puts $f2 ""
puts $f2 "\# Test parsing of naked day of week"
puts $f2 ""
-
- set n 0
+
+ set n 0
foreach year {1970 2001} {
foreach week {01 52} {
set base [clock scan ${year}W${week}4 \
@@ -1108,7 +1108,7 @@ proc testcases26 { f2 } {
proc testcases29 { f2 } {
# Put out a header describing the tests
-
+
puts $f2 ""
puts $f2 "\# Test parsing of time of day"
puts $f2 ""
@@ -1172,7 +1172,7 @@ proc testcases29 { f2 } {
}
}
}
-
+
}
puts "testcases29: $n test cases"
}
diff --git a/tools/man2help.tcl b/tools/man2help.tcl
index 018fa84..ca29226 100644
--- a/tools/man2help.tcl
+++ b/tools/man2help.tcl
@@ -36,7 +36,7 @@ proc generateContents {basename version files} {
set lastTopic {}
foreach topic [getTopics $package $section] {
if {[string compare $lastTopic $topic]} {
- set id $topics($package,$section,$topic)
+ set id $topics($package,$section,$topic)
puts $fd "2 $topic=$id"
set lastTopic $topic
}
diff --git a/tools/man2html.tcl b/tools/man2html.tcl
index fa57b03..6d4724f 100644
--- a/tools/man2html.tcl
+++ b/tools/man2html.tcl
@@ -27,8 +27,8 @@ proc sarray {file args} {
if {![array exists array]} {
puts "sarray: \"$a\" isn't an array"
break
- }
-
+ }
+
foreach name [lsort [array names array]] {
regsub -all " " $name "\\ " name1
puts $file "set ${a}($name1) \{$array($name)\}"
@@ -141,12 +141,12 @@ proc main {argv} {
foreach package $packages {
file mkdir $html_dir/$package
-
+
# build hyperlink database arrays: NAME_file and KEY_file
#
puts "\nScanning man pages in $tcl_dir/$package/doc..."
uplevel \#0 [list source $homeDir/man2html1.tcl]
-
+
doDir $tcl_dir/$package/doc
# clean up the NAME_file and KEY_file database arrays
diff --git a/tools/man2html1.tcl b/tools/man2html1.tcl
index f2b2e43..e8d29e8 100644
--- a/tools/man2html1.tcl
+++ b/tools/man2html1.tcl
@@ -10,7 +10,7 @@ package require Tcl 8.4
# Global variables used by these scripts:
#
# state - state variable that controls action of text proc.
-#
+#
# curFile - tail of current man page.
#
# file - file pointer; for both xref.tcl and contents.html
@@ -23,7 +23,7 @@ package require Tcl 8.4
#
# lib - contains package name. Used to label section in contents.html
#
-# inDT - in dictionary term.
+# inDT - in dictionary term.
# text --
@@ -32,7 +32,7 @@ package require Tcl 8.4
# and KEY_file.
#
# DT: might do this: if first word of $dt matches $name and [llength $name==1]
-# and [llength $dt > 1], then add to NAME_file.
+# and [llength $dt > 1], then add to NAME_file.
#
# Arguments:
# string - Text to index.
@@ -86,7 +86,7 @@ proc macro {name args} {
KEYWORDS {set state KEY}
default {set state OFF}
}
-
+
}
TP {
global inDT
@@ -138,7 +138,7 @@ proc newline {} {
# initGlobals, tab, font, char, macro2 --
#
-# These procedures do nothing during the first pass.
+# These procedures do nothing during the first pass.
#
# Arguments:
# None.
@@ -214,9 +214,9 @@ proc doListing {file pattern} {
proc doContents {file packageName} {
global footer
-
+
set file [open $file w]
-
+
puts $file "<HTML><HEAD><TITLE>$packageName Manual</TITLE></HEAD><BODY>"
puts $file "<H3>$packageName</H3>"
doListing $file "*.1"
@@ -237,8 +237,8 @@ proc doContents {file packageName} {
#
# This is the toplevel procedure that searches a man page
# for hypertext links. It builds a data base consisting of
-# two arrays: NAME_file and KEY file. It runs the man2tcl
-# program to turn the man page into a script, then it evals
+# two arrays: NAME_file and KEY file. It runs the man2tcl
+# program to turn the man page into a script, then it evals
# that script.
#
# Arguments:
diff --git a/tools/mkdepend.tcl b/tools/mkdepend.tcl
index de5fdba..ecb2206 100644
--- a/tools/mkdepend.tcl
+++ b/tools/mkdepend.tcl
@@ -10,20 +10,20 @@
# above copyright notice and the following two paragraphs appear in
# all copies of this software.
#
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-# SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF
-# THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE AUTHOR HAS BEEN ADVISED
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+# SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF
+# THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE AUTHOR HAS BEEN ADVISED
# OF THE POSSIBILITY OF SUCH DAMAGE.
#
-# THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-# PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS"
+# THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+# PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS"
# BASIS, AND THE AUTHOR HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
# UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#==============================================================================
#
# Modified heavily by David Gravereaux <davygrvy@pobox.com> about 9/17/2006.
-# Original can be found @
+# Original can be found @
# http://web.archive.org/web/20070616205924/http://www.doc.ic.ac.uk/~np2/software/mkdepend.html
#==============================================================================