summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-05-27 08:38:06 (GMT)
committernijtmans <nijtmans>2010-05-27 08:38:06 (GMT)
commit84010405f28bb6a57e0d7c089ade8a2eeca31c8a (patch)
tree5be569ff33ff5ffedd4d848ed8e7a33c17e4c5ca /tools
parent11fff51d24f1d24c5fe3950c5a0dfffc10b03d62 (diff)
downloadtcl-84010405f28bb6a57e0d7c089ade8a2eeca31c8a.zip
tcl-84010405f28bb6a57e0d7c089ade8a2eeca31c8a.tar.gz
tcl-84010405f28bb6a57e0d7c089ade8a2eeca31c8a.tar.bz2
uniParse.tcl: Don't generate spaces at the end of a line.
Diffstat (limited to 'tools')
-rw-r--r--tools/uniParse.tcl22
1 files changed, 11 insertions, 11 deletions
diff --git a/tools/uniParse.tcl b/tools/uniParse.tcl
index 3fe38d2..823a975 100644
--- a/tools/uniParse.tcl
+++ b/tools/uniParse.tcl
@@ -8,8 +8,8 @@
#
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: uniParse.tcl,v 1.4 2001/05/28 04:37:57 hobbs Exp $
+#
+# RCS: @(#) $Id: uniParse.tcl,v 1.5 2010/05/27 08:38:06 nijtmans Exp $
namespace eval uni {
@@ -87,7 +87,7 @@ proc uni::getGroup {value} {
proc uni::addPage {info} {
variable pMap
variable pages
-
+
set pIndex [lsearch -exact $pages $info]
if {$pIndex == -1} {
set pIndex [llength $pages]
@@ -96,7 +96,7 @@ proc uni::addPage {info} {
lappend pMap $pIndex
return
}
-
+
proc uni::buildTables {data} {
variable shift
@@ -104,7 +104,7 @@ proc uni::buildTables {data} {
variable pages {}
variable groups {{0,,,}}
set info {} ;# temporary page info
-
+
set mask [expr {(1 << $shift) - 1}]
set next 0
@@ -118,7 +118,7 @@ proc uni::buildTables {data} {
scan [lindex $items 0] %4x index
set index [format 0x%0.4x $index]
-
+
set gIndex [getGroup [getValue $items $index]]
# Since the input table omits unassigned characters, these will
@@ -218,7 +218,7 @@ static unsigned char pageMap\[\] = {"
append line ", "
}
if {[string length $line] > 70} {
- puts $f $line
+ puts $f [string trimright $line]
set line " "
}
}
@@ -243,7 +243,7 @@ static unsigned char groupMap\[\] = {"
append line ", "
}
if {[string length $line] > 70} {
- puts $f $line
+ puts $f [string trimright $line]
set line " "
}
}
@@ -260,7 +260,7 @@ static unsigned char groupMap\[\] = {"
* Bits 5-7 Case delta type: 000 = identity
* 010 = add delta for lower
* 011 = add delta for lower, add 1 for title
- * 100 = sutract delta for title/upper
+ * 100 = subtract delta for title/upper
* 101 = sub delta for upper, sub 1 for title
* 110 = sub delta for upper, add delta for lower
*
@@ -275,7 +275,7 @@ static int groups\[\] = {"
set last [expr {[llength $groups] - 1}]
for {set i 0} {$i <= $last} {incr i} {
foreach {type toupper tolower totitle} [split [lindex $groups $i] ,] {}
-
+
# Compute the case conversion type and delta
if {$totitle != ""} {
@@ -313,7 +313,7 @@ static int groups\[\] = {"
append line ", "
}
if {[string length $line] > 65} {
- puts $f $line
+ puts $f [string trimright $line]
set line " "
}
}