summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/checkLibraryDoc.tcl32
-rw-r--r--tools/eolFix.tcl18
-rwxr-xr-xtools/fix_tommath_h.tcl4
-rw-r--r--tools/genStubs.tcl54
-rw-r--r--tools/index.tcl16
-rw-r--r--tools/man2help2.tcl34
-rw-r--r--tools/regexpTestLib.tcl32
-rw-r--r--tools/tsdPerf.tcl2
-rw-r--r--tools/uniClass.tcl4
-rw-r--r--tools/uniParse.tcl14
10 files changed, 101 insertions, 109 deletions
diff --git a/tools/checkLibraryDoc.tcl b/tools/checkLibraryDoc.tcl
index 8a7008c..23d3ec3 100755
--- a/tools/checkLibraryDoc.tcl
+++ b/tools/checkLibraryDoc.tcl
@@ -1,7 +1,7 @@
# checkLibraryDoc.tcl --
#
-# This script attempts to determine what APIs exist in the source base that
-# have not been documented. By grepping through all of the doc/*.3 man
+# This script attempts to determine what APIs exist in the source base that
+# have not been documented. By grepping through all of the doc/*.3 man
# pages, looking for "Pkg_*" (e.g., Tcl_ or Tk_), and comparing this list
# against the list of Pkg_ APIs found in the source (e.g., tcl8.2/*/*.[ch])
# we create six lists:
@@ -11,15 +11,15 @@
# 4) Misc APIs and structs that we are not documenting.
# 5) Command APIs (e.g., Tcl_ArrayObjCmd.)
# 6) Proc pointers (e.g., Tcl_CloseProc.)
-#
+#
# Note: Each list is "a best guess" approximation. If developers write
# non-standard code, this script will produce erroneous results. Each
-# list should be carefully checked for accuracy.
+# list should be carefully checked for accuracy.
#
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: checkLibraryDoc.tcl,v 1.7 2002/01/15 17:55:30 dgp Exp $
+#
+# RCS: @(#) $Id: checkLibraryDoc.tcl,v 1.8 2010/07/01 21:28:15 nijtmans Exp $
lappend auto_path "c:/program\ files/tclpro1.2/win32-ix86/bin"
@@ -88,7 +88,7 @@ set StructList {
Tk_Window \
}
-# Misc junk that appears in the comments of the source. This just
+# Misc junk that appears in the comments of the source. This just
# allows us to filter comments that "fool" the script.
set CommentList {
@@ -101,8 +101,8 @@ set CommentList {
# Main entry point to this script.
proc main {} {
- global argv0
- global argv
+ global argv0
+ global argv
set len [llength $argv]
if {($len != 2) && ($len != 3)} {
@@ -123,12 +123,12 @@ proc main {} {
foreach {c d} [compare [grepCode $dir $pkg] [grepDocs $dir $pkg]] {}
filter $c $d $dir $pkg $file
- if {$file != "stdout"} {
+ if {$file ne "stdout"} {
close $file
}
return
}
-
+
# Intersect the two list and write out the sets of APIs in one
# list that is not in the other.
@@ -147,7 +147,7 @@ proc filter {code docs dir pkg {outFile stdout}} {
# This list should just be verified for accuracy.
set cmds {}
-
+
# A list of proc pointer structs. These are not documented.
# This list should just be verified for accuracy.
@@ -164,7 +164,7 @@ proc filter {code docs dir pkg {outFile stdout}} {
set misc [grepMisc $dir $pkg]
set pat1 ".*(${pkg}_\[A-z0-9]+).*$"
-
+
# A list of APIs in the source, not in the docs.
# This list should just be verified for accuracy.
@@ -198,7 +198,7 @@ proc filter {code docs dir pkg {outFile stdout}} {
# Print the list of APIs if the list is not null.
proc dump {list title file} {
- if {$list != {}} {
+ if {$list ne ""} {
puts $file ""
puts $file $title
puts $file "---------------------------------------------------------"
@@ -242,7 +242,7 @@ proc grepDocs {dir pkg} {
# (e.g., Tcl_Export). Return a list of APIs.
proc grepDecl {dir pkg} {
- set file [file join $dir generic "[string tolower $pkg]IntDecls.h"]
+ set file [file join $dir generic "[string tolower $pkg]IntDecls.h"]
set apis [myGrep "^EXTERN.*\[ \t\]${pkg}_.*" $file]
set pat1 ".*(${pkg}_\[A-z0-9]+).*$"
@@ -260,7 +260,7 @@ proc grepDecl {dir pkg} {
proc grepMisc {dir pkg} {
global CommentList
global StructList
-
+
set apis [myGrep "^EXTERN.*\[ \t\]${pkg}_Db.*" "${dir}/\*/\*\.\[ch\]"]
set pat1 ".*(${pkg}_\[A-z0-9]+).*$"
diff --git a/tools/eolFix.tcl b/tools/eolFix.tcl
index ed3ec7c..3f35ed4 100644
--- a/tools/eolFix.tcl
+++ b/tools/eolFix.tcl
@@ -13,16 +13,18 @@ namespace eval ::EOL {
variable outMode crlf
}
-proc EOL::fix {filename {newfilename ""}} {
+proc EOL::fix {filename {newfilename {}}} {
variable outMode
- if {![file exists $filename]} { return }
+ if {![file exists $filename]} {
+ return
+ }
puts "EOL Fixing: $filename"
file rename ${filename} ${filename}.o
set fhnd [open ${filename}.o r]
- if {$newfilename != ""} {
+ if {$newfilename ne ""} {
set newfhnd [open ${newfilename} w]
} else {
set newfhnd [open ${filename} w]
@@ -63,12 +65,12 @@ proc EOL::fixall {args} {
}
if {$tcl_interactive == 0 && $argc > 0} {
- if {[string index [lindex $argv 0] 0] == "-"} {
+ if {[string index [lindex $argv 0] 0] eq "-"} {
switch -- [lindex $argv 0] {
- -cr { set ::EOL::outMode cr }
- -crlf { set ::EOL::outMode crlf }
- -lf { set ::EOL::outMode lf }
- default { puts stderr "improper mode switch" ; exit 1 }
+ -cr {set ::EOL::outMode cr}
+ -crlf {set ::EOL::outMode crlf}
+ -lf {set ::EOL::outMode lf}
+ default {puts stderr "improper mode switch"; exit 1}
}
set argv [lrange $argv 1 end]
}
diff --git a/tools/fix_tommath_h.tcl b/tools/fix_tommath_h.tcl
index 47d6447..d621192 100755
--- a/tools/fix_tommath_h.tcl
+++ b/tools/fix_tommath_h.tcl
@@ -8,7 +8,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: fix_tommath_h.tcl,v 1.7 2010/05/03 11:40:06 nijtmans Exp $
+# RCS: @(#) $Id: fix_tommath_h.tcl,v 1.8 2010/07/01 21:28:15 nijtmans Exp $
#
#----------------------------------------------------------------------
@@ -20,7 +20,7 @@ set eat_endif 0
set eat_semi 0
set def_count 0
foreach line [split $data \n] {
- if { !$eat_semi && !$eat_endif } {
+ if {!$eat_semi && !$eat_endif} {
switch -regexp -- $line {
{#define BN_H_} {
puts $line
diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl
index 7a77314..88b24ab 100644
--- a/tools/genStubs.tcl
+++ b/tools/genStubs.tcl
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: genStubs.tcl,v 1.39 2010/02/15 22:56:20 nijtmans Exp $
+# RCS: @(#) $Id: genStubs.tcl,v 1.40 2010/07/01 21:28:15 nijtmans Exp $
package require Tcl 8.4
@@ -18,7 +18,7 @@ namespace eval genStubs {
# libraryName --
#
# The name of the entire library. This value is used to compute
- # the USE_*_STUB_PROCS macro and the name of the init file.
+ # the USE_*_STUBS macro and the name of the init file.
variable libraryName "UNKNOWN"
@@ -152,7 +152,7 @@ proc genStubs::declare {args} {
set decl [parseDecl $decl]
foreach platform $platformList {
- if {$decl != ""} {
+ if {$decl ne ""} {
set stubs($curName,$platform,$index) $decl
if {![info exists stubs($curName,$platform,lastNum)] \
|| ($index > $stubs($curName,$platform,lastNum))} {
@@ -176,14 +176,9 @@ proc genStubs::declare {args} {
# None.
proc genStubs::export {args} {
- variable stubs
- variable curName
-
if {[llength $args] != 1} {
puts stderr "wrong # args: export $args"
}
- lassign $args decl
-
return
}
@@ -303,7 +298,6 @@ proc genStubs::addPlatformGuard {plat iftxt {eltxt {}}} {
# None.
proc genStubs::emitSlots {name textVar} {
- variable stubs
upvar $textVar text
forAllStubs $name makeSlot 1 text {" void *reserved$i;\n"}
@@ -334,7 +328,7 @@ proc genStubs::parseDecl {decl} {
return
}
set rtype [string trim $rtype]
- if {$args == ""} {
+ if {$args eq ""} {
return [list $rtype $fname {}]
}
foreach arg [split $args ,] {
@@ -382,14 +376,14 @@ proc genStubs::parseDecl {decl} {
proc genStubs::parseArg {arg} {
if {![regexp {^(.+[ ][*]*)([^][ *]+)(\[\])?$} $arg all type name array]} {
- if {$arg == "void"} {
+ if {$arg eq "void"} {
return $arg
} else {
return
}
}
set result [list [string trim $type] $name]
- if {$array != ""} {
+ if {$array ne ""} {
lappend result $array
}
return $result
@@ -419,7 +413,7 @@ proc genStubs::makeDecl {name decl index} {
append line " "
set pad 0
}
- if {$args == ""} {
+ if {$args eq ""} {
append line $fname
append text $line
append text ";\n"
@@ -499,7 +493,7 @@ proc genStubs::makeMacro {name decl index} {
append lfname [string range $fname 1 end]
set text "#ifndef $fname\n#define $fname"
- if {$args == ""} {
+ if {$args eq ""} {
append text " \\\n\t(*${name}StubsPtr->$lfname)"
append text " /* $index */\n#endif\n"
return $text
@@ -528,11 +522,11 @@ proc genStubs::makeSlot {name decl index} {
append lfname [string range $fname 1 end]
set text " "
- if {$args == ""} {
+ if {$args eq ""} {
append text $rtype " *" $lfname "; /* $index */\n"
return $text
}
- if {[string range $rtype end-7 end] == "CALLBACK"} {
+ if {[string range $rtype end-7 end] eq "CALLBACK"} {
append text [string trim [string range $rtype 0 end-8]] " (CALLBACK *" $lfname ") "
} else {
append text $rtype " (*" $lfname ") "
@@ -585,7 +579,7 @@ proc genStubs::makeSlot {name decl index} {
# Returns the formatted declaration string.
proc genStubs::makeInit {name decl index} {
- if {[lindex $decl 2] == ""} {
+ if {[lindex $decl 2] eq ""} {
append text " &" [lindex $decl 1] ", /* " $index " */\n"
} else {
append text " " [lindex $decl 1] ", /* " $index " */\n"
@@ -614,7 +608,7 @@ proc genStubs::makeInit {name decl index} {
# Results:
# None.
-proc genStubs::forAllStubs {name slotProc onAll textVar \
+proc genStubs::forAllStubs {name slotProc onAll textVar
{skipString {"/* Slot $i is reserved */\n"}}} {
variable stubs
upvar $textVar text
@@ -873,7 +867,6 @@ proc genStubs::forAllStubs {name slotProc onAll textVar \
# None.
proc genStubs::emitDeclarations {name textVar} {
- variable stubs
upvar $textVar text
append text "\n/*\n * Exported function declarations:\n */\n\n"
@@ -893,7 +886,6 @@ proc genStubs::emitDeclarations {name textVar} {
# None.
proc genStubs::emitMacros {name textVar} {
- variable stubs
variable libraryName
upvar $textVar text
@@ -945,12 +937,12 @@ proc genStubs::emitHeader {name} {
emitSlots $name text
- append text "} ${capName}Stubs;\n"
+ append text "} ${capName}Stubs;\n\n"
set upName [string toupper $libraryName]
- append text "\n#if defined(USE_${upName}_STUBS) && !defined(USE_${upName}_STUB_PROCS)\n"
- append text "extern const ${capName}Stubs *${name}StubsPtr;"
- append text "\n#endif /* defined(USE_${upName}_STUBS) && !defined(USE_${upName}_STUB_PROCS) */\n"
+ append text "#if defined(USE_${upName}_STUBS) && !defined(USE_${upName}_STUB_PROCS)\n"
+ append text "extern const ${capName}Stubs *${name}StubsPtr;\n"
+ append text "#endif /* defined(USE_${upName}_STUBS) && !defined(USE_${upName}_STUB_PROCS) */\n"
emitMacros $name text
@@ -970,7 +962,6 @@ proc genStubs::emitHeader {name} {
# Returns the formatted output.
proc genStubs::emitInit {name textVar} {
- variable stubs
variable hooks
variable interfaces
upvar $textVar text
@@ -990,19 +981,18 @@ proc genStubs::emitInit {name textVar} {
}
foreach intf [array names interfaces] {
if {[info exists hooks($intf)]} {
- if {0<=[lsearch -exact $hooks($intf) $name]} {
+ if {[lsearch -exact $hooks($intf) $name] >= 0} {
set root 0
- break;
+ break
}
}
}
- if {$root} {
- append text "\nconst ${capName}Stubs ${name}Stubs = \{\n"
- } else {
- append text "\nstatic const ${capName}Stubs ${name}Stubs = \{\n"
+ append text "\n"
+ if {!$root} {
+ append text "static "
}
- append text " TCL_STUB_MAGIC,\n"
+ append text "const ${capName}Stubs ${name}Stubs = \{\n TCL_STUB_MAGIC,\n"
if {[info exists hooks($name)]} {
append text " &${name}StubHooks,\n"
} else {
diff --git a/tools/index.tcl b/tools/index.tcl
index b39f7ca..2e52d60 100644
--- a/tools/index.tcl
+++ b/tools/index.tcl
@@ -8,14 +8,14 @@
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: index.tcl,v 1.5 2004/05/18 12:28:40 dkf Exp $
-#
+#
+# RCS: @(#) $Id: index.tcl,v 1.6 2010/07/01 21:28:15 nijtmans Exp $
+#
# Global variables used by these scripts:
#
# state - state variable that controls action of text proc.
-#
+#
# topics - array indexed by (package,section,topic) with value
# of topic ID.
#
@@ -138,7 +138,7 @@ proc macro {name args} {
switch $args {
NAME {
- if {$state == "INIT" } {
+ if {$state eq "INIT" } {
set state NAME
}
}
@@ -147,7 +147,7 @@ proc macro {name args} {
KEYWORDS {set state KEY}
default {set state OFF}
}
-
+
}
TH {
global state curID curPkg curSect topics keywords
@@ -179,7 +179,7 @@ proc macro {name args} {
proc dash {} {
global state
- if {$state == "NAME"} {
+ if {$state eq "NAME"} {
set state DASH
}
}
@@ -188,7 +188,7 @@ proc dash {} {
# initGlobals, tab, font, char, macro2 --
#
-# These procedures do nothing during the first pass.
+# These procedures do nothing during the first pass.
#
# Arguments:
# None.
diff --git a/tools/man2help2.tcl b/tools/man2help2.tcl
index 5442a6f..34d6416 100644
--- a/tools/man2help2.tcl
+++ b/tools/man2help2.tcl
@@ -8,14 +8,14 @@
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: man2help2.tcl,v 1.20 2008/12/22 13:04:32 mistachkin Exp $
-#
+#
+# RCS: @(#) $Id: man2help2.tcl,v 1.21 2010/07/01 21:28:15 nijtmans Exp $
+#
# Global variables used by these scripts:
#
# state - state variable that controls action of text proc.
-#
+#
# topics - array indexed by (package,section,topic) with value
# of topic ID.
#
@@ -179,12 +179,12 @@ proc text {string} {
}
switch $state(textState) {
- REF {
+ REF {
if {$state(inTP) == 0} {
set string [insertRef $string]
}
}
- SEE {
+ SEE {
global topics curPkg curSect
foreach i [split $string] {
if {![regexp -nocase {^[a-z_0-9]+} [string trim $i] i ]} {
@@ -234,7 +234,7 @@ proc insertRef {string} {
}
}
- if {($ref != {}) && ($ref != $curID)} {
+ if {($ref != "") && ($ref != $curID)} {
set string [link $string $ref]
}
return $string
@@ -276,7 +276,7 @@ proc macro {name args} {
# next page and previous page
}
br {
- lineBreak
+ lineBreak
}
BS {}
BE {}
@@ -391,12 +391,12 @@ proc macro {name args} {
set state(noFill) 1
}
so {
- if {$args != "man.macros"} {
+ if {$args ne "man.macros"} {
puts stderr "Unknown macro: .$name [join $args " "]"
}
}
sp { ;# needs work
- if {$args == ""} {
+ if {$args eq ""} {
set count 1
} else {
set count [lindex $args 0]
@@ -475,14 +475,14 @@ proc font {type} {
P -
R {
endFont
- if {$state(textState) == "REF"} {
+ if {$state(textState) eq "REF"} {
set state(textState) INSERT
}
}
C -
B {
beginFont Code
- if {$state(textState) == "INSERT"} {
+ if {$state(textState) eq "INSERT"} {
set state(textState) REF
}
}
@@ -510,7 +510,7 @@ proc font {type} {
proc formattedText {text} {
global chars
- while {$text != ""} {
+ while {$text ne ""} {
set index [string first \\ $text]
if {$index < 0} {
text $text
@@ -767,7 +767,7 @@ proc SHmacro {argList {style section}} {
}
# control what the text proc does with text
-
+
switch $args {
NAME {set state(textState) NAME}
DESCRIPTION {set state(textState) INSERT}
@@ -892,7 +892,7 @@ proc THmacro {argList} {
set curVer [lindex $argList 2] ;# 7.4
set curPkg [lindex $argList 3] ;# Tcl
set curSect [lindex $argList 4] ;# {Tcl Library Procedures}
-
+
regsub -all {\\ } $curSect { } curSect ;# Clean up for [incr\ Tcl]
puts $file "#{\\footnote $curID}" ;# Context string
@@ -957,7 +957,7 @@ proc newPara {leftIndent {firstIndent 0i}} {
if $state(paragraph) {
puts -nonewline $file "\\line\n"
}
- if {$leftIndent != ""} {
+ if {$leftIndent ne ""} {
set state(leftIndent) [expr {$state(leftMargin) \
+ ($state(offset) * $state(nestingLevel)) \
+ [getTwips $leftIndent]}]
@@ -1027,7 +1027,7 @@ proc incrNestingLevel {} {
proc decrNestingLevel {} {
global state
-
+
if {$state(nestingLevel) == 0} {
puts stderr "Nesting level decremented below 0"
} else {
diff --git a/tools/regexpTestLib.tcl b/tools/regexpTestLib.tcl
index d43cd4e..b57a71e 100644
--- a/tools/regexpTestLib.tcl
+++ b/tools/regexpTestLib.tcl
@@ -7,7 +7,7 @@
# Copyright (c) 1996 by Sun Microsystems, Inc.
#
# SCCS: @(#) regexpTestLib.tcl 1.4 98/01/22 14:48:34
-#
+#
proc readInputFile {} {
global inFileName
@@ -46,7 +46,7 @@ proc readInputFile {} {
#
# strings with embedded @'s are truncated
# unpreceeded @'s are replaced by {}
-#
+#
proc removeAts {ls} {
set len [llength $ls]
set newLs {}
@@ -97,7 +97,7 @@ proc writeOutputFile {numLines fcn} {
global outFileName
global lineArray
- # open output file and write file header info to it.
+ # open output file and write file header info to it.
set fileId [open $outFileName w]
@@ -136,7 +136,7 @@ proc writeOutputFile {numLines fcn} {
puts $fileId $currentLine
incr srcLineNum $lineArray(c$lineNum)
incr lineNum
- continue
+ continue
}
set len [llength $currentLine]
@@ -147,7 +147,7 @@ proc writeOutputFile {numLines fcn} {
puts $fileId "\n"
incr srcLineNum $lineArray(c$lineNum)
incr lineNum
- continue
+ continue
}
if {($len < 3)} {
puts "warning: test is too short --\n\t$currentLine"
@@ -212,21 +212,21 @@ proc convertTestLine {currentLine len lineNum srcLineNum} {
set vals {}
set result 0
set v 0
-
+
if {[regsub {\*} "$flags" "" newFlags] == 1} {
# an error is expected
-
+
if {[string compare $str "EMPTY"] == 0} {
# empty regexp is not an error
# skip this test
-
+
return "\# skipping the empty-re test from line $srcLineNum\n"
}
set flags $newFlags
set result "\{1 \{[convertErrCode $str]\}\}"
} elseif {$numVars > 0} {
# at least 1 match is made
-
+
if {[regexp {s} $flags] == 1} {
set result "\{0 1\}"
} else {
@@ -243,7 +243,7 @@ proc convertTestLine {currentLine len lineNum srcLineNum} {
}
} else {
# no match is made
-
+
set result "\{0 0\}"
}
@@ -251,16 +251,16 @@ proc convertTestLine {currentLine len lineNum srcLineNum} {
set cmd [prepareCmd $flags $re $str $vars $noBraces]
if {$cmd == -1} {
- return "\# skipping test with metasyntax from line $srcLineNum\n"
+ return "\# skipping test with metasyntax from line $srcLineNum\n"
}
set test "test regexp-1.$srcLineNum \{converted from line $srcLineNum\} \{\n"
append test "\tcatch {unset var}\n"
- append test "\tlist \[catch \{ \n"
- append test "\t\tset match \[$cmd\] \n"
- append test "\t\tlist \$match $vals \n"
- append test "\t\} msg\] \$msg \n"
- append test "\} $result \n"
+ append test "\tlist \[catch \{\n"
+ append test "\t\tset match \[$cmd\]\n"
+ append test "\t\tlist \$match $vals\n"
+ append test "\t\} msg\] \$msg\n"
+ append test "\} $result\n"
return $test
}
diff --git a/tools/tsdPerf.tcl b/tools/tsdPerf.tcl
index f2cc6d6..360ca9c 100644
--- a/tools/tsdPerf.tcl
+++ b/tools/tsdPerf.tcl
@@ -6,7 +6,7 @@ for {set i 0} {$i < 4} {incr i} {
lappend ::tids [thread::create [string map [list IVALUE $i] {
set curdir [file dirname [info script]]
load [file join $curdir tsdPerf[info sharedlibextension]]
-
+
while 1 {
tsdPerfSet IVALUE
}
diff --git a/tools/uniClass.tcl b/tools/uniClass.tcl
index 442fc2a..1840851 100644
--- a/tools/uniClass.tcl
+++ b/tools/uniClass.tcl
@@ -64,13 +64,13 @@ proc genTable {type} {
set ranges [string trimright $ranges "\t\n ,"]
set chars [string trimright $chars "\t\n ,"]
- if {$ranges != ""} {
+ if {$ranges ne ""} {
puts "static crange ${type}RangeTable\[\] = {\n$ranges\n};\n"
puts "#define NUM_[string toupper $type]_RANGE (sizeof(${type}RangeTable)/sizeof(crange))\n"
} else {
puts "/* no contiguous ranges of $type characters */\n"
}
- if {$chars != ""} {
+ if {$chars ne ""} {
puts "static chr ${type}CharTable\[\] = {\n$chars\n};\n"
puts "#define NUM_[string toupper $type]_CHAR (sizeof(${type}CharTable)/sizeof(chr))\n"
} else {
diff --git a/tools/uniParse.tcl b/tools/uniParse.tcl
index 823a975..7560e6b 100644
--- a/tools/uniParse.tcl
+++ b/tools/uniParse.tcl
@@ -9,7 +9,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: uniParse.tcl,v 1.5 2010/05/27 08:38:06 nijtmans Exp $
+# RCS: @(#) $Id: uniParse.tcl,v 1.6 2010/07/01 21:28:15 nijtmans Exp $
namespace eval uni {
@@ -66,7 +66,7 @@ proc uni::getValue {items index} {
if {$categoryIndex < 0} {
puts "Unexpected character category: $index($category)"
set categoryIndex 0
- } elseif {$category == "Lt"} {
+ } elseif {$category eq "Lt"} {
incr titleCount
}
@@ -110,7 +110,7 @@ proc uni::buildTables {data} {
set next 0
foreach line [split $data \n] {
- if {$line == ""} {
+ if {$line eq ""} {
set line "FFFF;;Cn;0;ON;;;;;N;;;;;\n"
}
@@ -278,12 +278,12 @@ static int groups\[\] = {"
# Compute the case conversion type and delta
- if {$totitle != ""} {
+ if {$totitle ne ""} {
if {$totitle == $toupper} {
# subtract delta for title or upper
set case 4
set delta $toupper
- } elseif {$toupper != ""} {
+ } elseif {$toupper ne ""} {
# subtract delta for upper, subtract 1 for title
set case 5
set delta $toupper
@@ -292,11 +292,11 @@ static int groups\[\] = {"
set case 3
set delta $tolower
}
- } elseif {$toupper != ""} {
+ } elseif {$toupper ne ""} {
# subtract delta for upper, add delta for lower
set case 6
set delta $toupper
- } elseif {$tolower != ""} {
+ } elseif {$tolower ne ""} {
# add delta for lower
set case 2
set delta $tolower