summaryrefslogtreecommitdiffstats
path: root/generic/ttk
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/ttk
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/ttk')
-rw-r--r--generic/ttk/ttkEntry.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c
index 63ebc5f..d80e1fd 100644
--- a/generic/ttk/ttkEntry.c
+++ b/generic/ttk/ttkEntry.c
@@ -282,16 +282,10 @@ static char *EntryDisplayString(const char *showChar, int numChars)
{
char *displayString, *p;
int size;
- char buf[4];
-#if TCL_UTF_MAX == 4
- int ch;
-
- TkUtfToUniChar32(showChar, &ch);
-#else
Tcl_UniChar ch;
+ char buf[4];
Tcl_UtfToUniChar(showChar, &ch);
-#endif
size = Tcl_UniCharToUtf(ch, buf);
p = displayString = ckalloc(numChars * size + 1);
@@ -412,11 +406,7 @@ ExpandPercents(
int number, length;
const char *string;
int stringLength;
-#if TCL_UTF_MAX == 4
- int ch;
-#else
Tcl_UniChar ch;
-#endif
char numStorage[2*TCL_INTEGER_SPACE];
while (*template) {
@@ -440,11 +430,7 @@ ExpandPercents(
*/
++template; /* skip over % */
if (*template != '\0') {
-#if TCL_UTF_MAX == 4
- template += TkUtfToUniChar32(template, &ch);
-#else
template += Tcl_UtfToUniChar(template, &ch);
-#endif
} else {
ch = '%';
}