summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-03-05 14:39:23 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-03-05 14:39:23 (GMT)
commit9cc797aba7f6ef3f4caf90cb11ba7ce76f103f88 (patch)
tree76440436dd43495a018c69afbea3090c37ab3ff9 /tools
parent38aabeeca86a4a08cdf5def1c47588c02aafcf9c (diff)
parent36d1b8447caf0aba9a4adf65b13029f35f89c0d9 (diff)
downloadtcl-9cc797aba7f6ef3f4caf90cb11ba7ce76f103f88.zip
tcl-9cc797aba7f6ef3f4caf90cb11ba7ce76f103f88.tar.gz
tcl-9cc797aba7f6ef3f4caf90cb11ba7ce76f103f88.tar.bz2
Update to Unicode-13
Diffstat (limited to 'tools')
-rw-r--r--tools/uniClass.tcl20
-rw-r--r--tools/uniParse.tcl14
2 files changed, 17 insertions, 17 deletions
diff --git a/tools/uniClass.tcl b/tools/uniClass.tcl
index 86ec931..39fa28d 100644
--- a/tools/uniClass.tcl
+++ b/tools/uniClass.tcl
@@ -16,33 +16,33 @@ proc emitRange {first last} {
global ranges numranges chars numchars extchars extranges
if {$first < ($last-1)} {
- if {!$extranges && ($first) > 0xffff} {
+ if {!$extranges && ($first) > 0xFFFF} {
set extranges 1
set numranges 0
set ranges [string trimright $ranges " \n\r\t,"]
append ranges "\n#if CHRBITS > 16\n ,"
}
- append ranges [format "{0x%x, 0x%x}, " \
+ append ranges [format "{0x%X, 0x%X}, " \
$first $last]
if {[incr numranges] % 4 == 0} {
set ranges [string trimright $ranges]
append ranges "\n "
}
} else {
- if {!$extchars && ($first) > 0xffff} {
+ if {!$extchars && ($first) > 0xFFFF} {
set extchars 1
set numchars 0
set chars [string trimright $chars " \n\r\t,"]
append chars "\n#if CHRBITS > 16\n ,"
}
- append chars [format "0x%x, " $first]
+ append chars [format "0x%X, " $first]
incr numchars
if {$numchars % 9 == 0} {
set chars [string trimright $chars]
append chars "\n "
}
if {$first != $last} {
- append chars [format "0x%x, " $last]
+ append chars [format "0x%X, " $last]
incr numchars
if {$numchars % 9 == 0} {
append chars "\n "
@@ -63,11 +63,11 @@ proc genTable {type} {
set extchars 0
set extranges 0
- for {set i 0} {$i <= 0x10ffff} {incr i} {
- if {$i == 0xd800} {
- # Skip surrogates
- set i 0xe000
- }
+ for {set i 0} {$i <= 0x10FFFF} {incr i} {
+ if {$i == 0xD800} {
+ # Skip surrogates
+ set i 0xE000
+ }
if {[string is $type [format %c $i]]} {
if {$i == ($last + 1)} {
set last $i
diff --git a/tools/uniParse.tcl b/tools/uniParse.tcl
index 561c28e..24be687 100644
--- a/tools/uniParse.tcl
+++ b/tools/uniParse.tcl
@@ -114,7 +114,7 @@ proc uni::buildTables {data} {
set items [split $line \;]
scan [lindex $items 0] %x index
- if {$index > 0x2ffff} then {
+ if {$index > 0x2FFFF} then {
# Ignore non-BMP characters, as long as Tcl doesn't support them
continue
}
@@ -343,9 +343,9 @@ static const int groups\[\] = {"
puts -nonewline $f "};
#if TCL_UTF_MAX > 3 || TCL_MAJOR_VERSION > 8 || TCL_MINOR_VERSION > 6
-# define UNICODE_OUT_OF_RANGE(ch) (((ch) & 0x1fffff) >= [format 0x%x $next])
+# define UNICODE_OUT_OF_RANGE(ch) (((ch) & 0x1FFFFF) >= [format 0x%X $next])
#else
-# define UNICODE_OUT_OF_RANGE(ch) (((ch) & 0x1f0000) != 0)
+# define UNICODE_OUT_OF_RANGE(ch) (((ch) & 0x1F0000) != 0)
#endif
/*
@@ -392,8 +392,8 @@ enum {
* to do sign extension on right shifts.
*/
-#define GetCaseType(info) (((info) & 0xe0) >> 5)
-#define GetCategory(ch) (GetUniCharInfo(ch) & 0x1f)
+#define GetCaseType(info) (((info) & 0xE0) >> 5)
+#define GetCategory(ch) (GetUniCharInfo(ch) & 0x1F)
#define GetDelta(info) ((info) >> 8)
/*
@@ -402,9 +402,9 @@ enum {
*/
#if TCL_UTF_MAX > 3 || TCL_MAJOR_VERSION > 8 || TCL_MINOR_VERSION > 6
-# define GetUniCharInfo(ch) (groups\[groupMap\[pageMap\[((ch) & 0x1fffff) >> OFFSET_BITS\] | ((ch) & ((1 << OFFSET_BITS)-1))\]\])
+# define GetUniCharInfo(ch) (groups\[groupMap\[pageMap\[((ch) & 0x1FFFFF) >> OFFSET_BITS\] | ((ch) & ((1 << OFFSET_BITS)-1))\]\])
#else
-# define GetUniCharInfo(ch) (groups\[groupMap\[pageMap\[((ch) & 0xffff) >> OFFSET_BITS\] | ((ch) & ((1 << OFFSET_BITS)-1))\]\])
+# define GetUniCharInfo(ch) (groups\[groupMap\[pageMap\[((ch) & 0xFFFF) >> OFFSET_BITS\] | ((ch) & ((1 << OFFSET_BITS)-1))\]\])
#endif
"