From d164d828d7bae0982908004c9c7623b58b77320b Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sun, 17 Mar 2019 22:13:34 +0000 Subject: For Tcl >= 8.7, always compile-in the extended Unicode tables, no matter the value of TCL_UTF_MAX. Do this in all Tcl versions, in order to prevent merge conflicts in future Unicode table updates. --- generic/tclUniData.c | 8 ++++---- tools/uniParse.tcl | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/generic/tclUniData.c b/generic/tclUniData.c index 942e2f0..1cc84fd 100644 --- a/generic/tclUniData.c +++ b/generic/tclUniData.c @@ -195,7 +195,7 @@ static const unsigned short pageMap[] = { 1344, 1344, 1344, 1344, 10176, 10208, 1344, 10240, 1344, 10272, 10304, 10336, 10368, 10400, 10432, 1344, 1344, 1344, 10464, 10496, 64, 10528, 10560, 10592, 4736, 10624, 10656 -#if TCL_UTF_MAX > 3 +#if TCL_UTF_MAX > 3 || TCL_MAJOR_VERSION > 8 || TCL_MINOR_VERSION > 6 ,10688, 10720, 10752, 1824, 1344, 1344, 1344, 8288, 10784, 10816, 10848, 10880, 10912, 10944, 10976, 11008, 1824, 1824, 1824, 1824, 9280, 1344, 11040, 11072, 1344, 11104, 11136, 11168, 11200, 1344, 11232, 1824, @@ -1153,7 +1153,7 @@ static const unsigned char groupMap[] = { 0, 0, 15, 15, 15, 15, 15, 15, 0, 0, 15, 15, 15, 15, 15, 15, 0, 0, 15, 15, 15, 0, 0, 0, 4, 4, 7, 11, 14, 4, 4, 0, 14, 7, 7, 7, 7, 14, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 17, 14, 14, 0, 0 -#if TCL_UTF_MAX > 3 +#if TCL_UTF_MAX > 3 || TCL_MAJOR_VERSION > 8 || TCL_MINOR_VERSION > 6 ,15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, @@ -1613,7 +1613,7 @@ static const int groups[] = { 18, 17, 10305, 10370, 8769, 8834 }; -#if TCL_UTF_MAX > 3 +#if TCL_UTF_MAX > 3 || TCL_MAJOR_VERSION > 8 || TCL_MINOR_VERSION > 6 # define UNICODE_OUT_OF_RANGE(ch) (((ch) & 0x1fffff) >= 0x2fa20) #else # define UNICODE_OUT_OF_RANGE(ch) (((ch) & 0x1f0000) != 0) @@ -1672,7 +1672,7 @@ enum { * Unicode character tables. */ -#if TCL_UTF_MAX > 3 +#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))]]) #else # define GetUniCharInfo(ch) (groups[groupMap[pageMap[((ch) & 0xffff) >> OFFSET_BITS] | ((ch) & ((1 << OFFSET_BITS)-1))]]) diff --git a/tools/uniParse.tcl b/tools/uniParse.tcl index c712e62..561c28e 100644 --- a/tools/uniParse.tcl +++ b/tools/uniParse.tcl @@ -212,7 +212,7 @@ static const unsigned short pageMap\[\] = {" puts $f $line set lastpage [expr {[lindex $line end] >> $shift}] puts stdout "lastpage: $lastpage" - puts $f "#if TCL_UTF_MAX > 3" + puts $f "#if TCL_UTF_MAX > 3 || TCL_MAJOR_VERSION > 8 || TCL_MINOR_VERSION > 6" set line " ," } append line [lindex $pMap $i] @@ -242,7 +242,7 @@ static const unsigned char groupMap\[\] = {" set lastj [expr {[llength $page] - 1}] if {$i == ($lastpage + 1)} { puts $f [string trimright $line " \t,"] - puts $f "#if TCL_UTF_MAX > 3" + puts $f "#if TCL_UTF_MAX > 3 || TCL_MAJOR_VERSION > 8 || TCL_MINOR_VERSION > 6" set line " ," } for {set j 0} {$j <= $lastj} {incr j} { @@ -342,7 +342,7 @@ static const int groups\[\] = {" puts $f $line puts -nonewline $f "}; -#if TCL_UTF_MAX > 3 +#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]) #else # define UNICODE_OUT_OF_RANGE(ch) (((ch) & 0x1f0000) != 0) @@ -401,7 +401,7 @@ enum { * Unicode character tables. */ -#if TCL_UTF_MAX > 3 +#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))\]\]) #else # define GetUniCharInfo(ch) (groups\[groupMap\[pageMap\[((ch) & 0xffff) >> OFFSET_BITS\] | ((ch) & ((1 << OFFSET_BITS)-1))\]\]) -- cgit v0.12