summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-03-03 14:41:48 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-03-03 14:41:48 (GMT)
commit536509d82589414ae95910bf6e1ce2295605b24d (patch)
treefd42490c72adaa9e328a94e0cb9353cd6cdb2fa2 /tools
parent43f826e35392c82afc974194c4b6c9a4e960f905 (diff)
downloadtcl-536509d82589414ae95910bf6e1ce2295605b24d.zip
tcl-536509d82589414ae95910bf6e1ce2295605b24d.tar.gz
tcl-536509d82589414ae95910bf6e1ce2295605b24d.tar.bz2
Remove private characters from regexp control table, but add them back in [:cntrl:] class (so no change in regexp handling). Eliminated (size_t) type-casts. Backported from 8.7
Diffstat (limited to 'tools')
-rw-r--r--tools/uniClass.tcl10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/uniClass.tcl b/tools/uniClass.tcl
index 39fa28d..a4a58c2 100644
--- a/tools/uniClass.tcl
+++ b/tools/uniClass.tcl
@@ -63,11 +63,15 @@ proc genTable {type} {
set extchars 0
set extranges 0
- for {set i 0} {$i <= 0x10FFFF} {incr i} {
+ for {set i 0} {$i <= 0xEFFFF} {incr i} {
if {$i == 0xD800} {
# Skip surrogates
set i 0xE000
}
+ if {$i == 0xE000} {
+ # Skip private
+ set i 0xF900
+ }
if {[string is $type [format %c $i]]} {
if {$i == ($last + 1)} {
set last $i
@@ -92,13 +96,13 @@ proc genTable {type} {
}
if {$ranges ne ""} {
puts "static const crange ${type}RangeTable\[\] = {\n$ranges\n};\n"
- puts "#define NUM_[string toupper $type]_RANGE (sizeof(${type}RangeTable)/sizeof(crange))\n"
+ puts "#define NUM_[string toupper $type]_RANGE ((int)(sizeof(${type}RangeTable)/sizeof(crange)))\n"
} else {
puts "/* no contiguous ranges of $type characters */\n"
}
if {$chars ne ""} {
puts "static const chr ${type}CharTable\[\] = {\n$chars\n};\n"
- puts "#define NUM_[string toupper $type]_CHAR (sizeof(${type}CharTable)/sizeof(chr))\n"
+ puts "#define NUM_[string toupper $type]_CHAR ((int)(sizeof(${type}CharTable)/sizeof(chr)))\n"
} else {
puts "/*\n * no singletons of $type characters.\n */\n"
}