summaryrefslogtreecommitdiffstats
path: root/generic/tkTextIndex.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-09-16 12:17:59 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-09-16 12:17:59 (GMT)
commitb4f938fde52946a11156db16484e4edb491cb25f (patch)
tree7a98c5e25eb278af7eb4c7fa58ab73d819c2c739 /generic/tkTextIndex.c
parent3c2139408891a7cf7678b88d372ac122aa79f65d (diff)
downloadtk-b4f938fde52946a11156db16484e4edb491cb25f.zip
tk-b4f938fde52946a11156db16484e4edb491cb25f.tar.gz
tk-b4f938fde52946a11156db16484e4edb491cb25f.tar.bz2
Rename TkUtfToUniChar32 to TkUtfToUniChar2, and various simplifications needing less #ifdef's
Diffstat (limited to 'generic/tkTextIndex.c')
-rw-r--r--generic/tkTextIndex.c16
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;
}