summaryrefslogtreecommitdiffstats
path: root/generic/tkEntry.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)
commit7a5d64437977cc14b7b79e336b3b2a20785348e5 (patch)
tree7a98c5e25eb278af7eb4c7fa58ab73d819c2c739 /generic/tkEntry.c
parent41d3c8f67e62fe307c46c91e5a42b71e39c59334 (diff)
downloadtk-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/tkEntry.c')
-rw-r--r--generic/tkEntry.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/generic/tkEntry.c b/generic/tkEntry.c
index 5faf4ef..a66cf18 100644
--- a/generic/tkEntry.c
+++ b/generic/tkEntry.c
@@ -1926,6 +1926,7 @@ EntryComputeGeometry(
*/
if (entryPtr->showChar != NULL) {
+ Tcl_UniChar ch;
char buf[4];
int size;
@@ -1935,15 +1936,8 @@ EntryComputeGeometry(
* characters might end up looking like one valid UTF character in the
* resulting string.
*/
-#if TCL_UTF_MAX == 4
- int ch;
-
- TkUtfToUniChar32(entryPtr->showChar, &ch);
-#else
- Tcl_UniChar ch;
Tcl_UtfToUniChar(entryPtr->showChar, &ch);
-#endif
size = Tcl_UniCharToUtf(ch, buf);
entryPtr->numDisplayBytes = entryPtr->numChars * size;
@@ -3420,11 +3414,7 @@ ExpandPercents(
* list element. */
int number, length;
register const char *string;
-#if TCL_UTF_MAX == 4
- int ch;
-#else
Tcl_UniChar ch;
-#endif
char numStorage[2*TCL_INTEGER_SPACE];
while (1) {
@@ -3457,11 +3447,7 @@ ExpandPercents(
before++; /* skip over % */
if (*before != '\0') {
-#if TCL_UTF_MAX == 4
- before += TkUtfToUniChar32(before, &ch);
-#else
before += Tcl_UtfToUniChar(before, &ch);
-#endif
} else {
ch = '%';
}