diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-09-16 12:17:59 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-09-16 12:17:59 (GMT) |
commit | 7a5d64437977cc14b7b79e336b3b2a20785348e5 (patch) | |
tree | 7a98c5e25eb278af7eb4c7fa58ab73d819c2c739 /generic/tkTextIndex.c | |
parent | 41d3c8f67e62fe307c46c91e5a42b71e39c59334 (diff) | |
download | tk-7a5d64437977cc14b7b79e336b3b2a20785348e5.zip tk-7a5d64437977cc14b7b79e336b3b2a20785348e5.tar.gz tk-7a5d64437977cc14b7b79e336b3b2a20785348e5.tar.bz2 |
Rename TkUtfToUniChar32 to TkUtfToUniChar2, and various simplifications needing less #ifdef's
Diffstat (limited to 'generic/tkTextIndex.c')
-rw-r--r-- | generic/tkTextIndex.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/generic/tkTextIndex.c b/generic/tkTextIndex.c index f64a6d2..b794cdb 100644 --- a/generic/tkTextIndex.c +++ b/generic/tkTextIndex.c @@ -2298,13 +2298,9 @@ StartEnd( int chSize = 1; if (segPtr->typePtr == &tkTextCharType) { -#if TCL_UTF_MAX == 4 int ch; - chSize = TkUtfToUniChar32(segPtr->body.chars + offset, &ch); -#else - Tcl_UniChar ch; - chSize = Tcl_UtfToUniChar(segPtr->body.chars + offset, &ch); -#endif + + chSize = TkUtfToUniChar2(segPtr->body.chars + offset, &ch); if (!Tcl_UniCharIsWordChar(ch)) { break; } @@ -2347,13 +2343,9 @@ StartEnd( int chSize = 1; if (segPtr->typePtr == &tkTextCharType) { -#if TCL_UTF_MAX == 4 + int ch; - TkUtfToUniChar32(segPtr->body.chars + offset, &ch); -#else - Tcl_UniChar ch; - Tcl_UtfToUniChar(segPtr->body.chars + offset, &ch); -#endif + TkUtfToUniChar2(segPtr->body.chars + offset, &ch); if (!Tcl_UniCharIsWordChar(ch)) { break; } |