summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-11-27 16:16:12 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-11-27 16:16:12 (GMT)
commit2b3b6f6334373b0e5eec61731bf83e629235d3ed (patch)
tree0b0fa52462e7ee64c7abec743613858d291882e1 /win
parentc178a6ce365f3826b96df6ad722a875b958cdcc9 (diff)
downloadtk-2b3b6f6334373b0e5eec61731bf83e629235d3ed.zip
tk-2b3b6f6334373b0e5eec61731bf83e629235d3ed.tar.gz
tk-2b3b6f6334373b0e5eec61731bf83e629235d3ed.tar.bz2
Starting work to compile Tk with TCL_UTF_MAX=4 (WIP)
Diffstat (limited to 'win')
-rw-r--r--win/Makefile.in2
-rw-r--r--win/makefile.vc2
-rw-r--r--win/tkWinFont.c10
-rw-r--r--win/tkWinKey.c4
-rw-r--r--win/tkWinMenu.c2
5 files changed, 10 insertions, 10 deletions
diff --git a/win/Makefile.in b/win/Makefile.in
index 8e2a9dc..a101ac9 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -261,7 +261,7 @@ CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \
-I"${GENERIC_DIR_NATIVE}" -I"${WIN_DIR_NATIVE}" \
-I"${XLIB_DIR_NATIVE}" -I"${BITMAP_DIR_NATIVE}" \
-I"${TCL_GENERIC_NATIVE}" -I"${TCL_PLATFORM_NATIVE}" \
-${AC_FLAGS} $(NO_DEPRECATED_FLAGS) -DTCL_UTF_MAX=3 -DUSE_TCL_STUBS
+${AC_FLAGS} $(NO_DEPRECATED_FLAGS) -DTCL_UTF_MAX=4 -DUSE_TCL_STUBS
CC_OBJNAME = @CC_OBJNAME@
CC_EXENAME = @CC_EXENAME@
diff --git a/win/makefile.vc b/win/makefile.vc
index 910a0ce..a5347b1 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -337,7 +337,7 @@ PRJ_INCLUDES = -I"$(BITMAPDIR)" -I"$(XLIBDIR)"
CONFIG_DEFS =/DHAVE_SYS_TYPES_H=1 /DHAVE_SYS_STAT_H=1 \
/DHAVE_STRING_H=1 /DHAVE_MEMORY_H=1 \
- /DHAVE_STRINGS_H=1 /DTCL_UTF_MAX=3 \
+ /DHAVE_STRINGS_H=1 /DTCL_UTF_MAX=4 \
!if $(TTK_SQUARE_WIDGET)
/DTTK_SQUARE_WIDGET=1 \
!endif
diff --git a/win/tkWinFont.c b/win/tkWinFont.c
index dc74aea..85a2249 100644
--- a/win/tkWinFont.c
+++ b/win/tkWinFont.c
@@ -846,7 +846,7 @@ Tk_MeasureChars(
start = source;
end = start + numBytes;
for (p = start; p < end; ) {
- next = p + TkUtfToUniChar(p, &ch);
+ next = p + Tcl_UtfToUniChar(p, &ch);
thisSubFontPtr = FindSubFontForChar(fontPtr, ch, &lastSubFontPtr);
if (thisSubFontPtr != lastSubFontPtr) {
familyPtr = lastSubFontPtr->familyPtr;
@@ -907,7 +907,7 @@ Tk_MeasureChars(
familyPtr = lastSubFontPtr->familyPtr;
Tcl_DStringInit(&runString);
for (p = start; p < end; ) {
- next = p + TkUtfToUniChar(p, &ch);
+ next = p + Tcl_UtfToUniChar(p, &ch);
Tcl_UtfToExternal(NULL, familyPtr->encoding, p,
(int) (next - p), TCL_ENCODING_PROFILE_TCL8, NULL, buf, sizeof(buf), NULL,
&dstWrote, NULL);
@@ -962,7 +962,7 @@ Tk_MeasureChars(
p = source;
ch = ' ';
while (p < end) {
- next = p + TkUtfToUniChar(p, &ch2);
+ next = p + Tcl_UtfToUniChar(p, &ch2);
if ((ch != ' ') && (ch2 == ' ')) {
lastWordBreak = p;
}
@@ -1479,7 +1479,7 @@ MultiFontTextOut(
end = source + numBytes;
for (p = source; p < end; ) {
- next = p + TkUtfToUniChar(p, &ch);
+ next = p + Tcl_UtfToUniChar(p, &ch);
thisSubFontPtr = FindSubFontForChar(fontPtr, ch, &lastSubFontPtr);
/*
@@ -2262,7 +2262,7 @@ FontMapLoadPage(
end = (row + 1) << FONTMAP_SHIFT;
for (i = row << FONTMAP_SHIFT; i < end; i++) {
if (Tcl_UtfToExternal(NULL, encoding, src,
- TkUniCharToUtf(i, src), TCL_ENCODING_PROFILE_STRICT, NULL,
+ Tcl_UniCharToUtf(i, src), TCL_ENCODING_PROFILE_STRICT, NULL,
buf, sizeof(buf), NULL, NULL, NULL) != TCL_OK) {
continue;
}
diff --git a/win/tkWinKey.c b/win/tkWinKey.c
index 5be9e0e..f2230c9 100644
--- a/win/tkWinKey.c
+++ b/win/tkWinKey.c
@@ -113,7 +113,7 @@ TkpGetString(
* Special case for WM_UNICHAR and win2000 multilingual IME input
*/
- len = TkUniCharToUtf(keyEv->keycode, buf);
+ len = Tcl_UniCharToUtf(keyEv->keycode, buf);
Tcl_DStringAppend(dsPtr, buf, len);
} else {
/*
@@ -125,7 +125,7 @@ TkpGetString(
if (((keysym != NoSymbol) && (keysym > 0) && (keysym < 256))
|| (keysym == XK_Return) || (keysym == XK_Tab)) {
- len = TkUniCharToUtf(keysym & 255, buf);
+ len = Tcl_UniCharToUtf(keysym & 255, buf);
Tcl_DStringAppend(dsPtr, buf, len);
}
}
diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c
index 96b3e1c..91d80e2 100644
--- a/win/tkWinMenu.c
+++ b/win/tkWinMenu.c
@@ -2111,7 +2111,7 @@ DrawMenuUnderline(
label = Tcl_GetString(mePtr->labelPtr);
start = Tcl_UtfAtIndex(label, mePtr->underline);
- end = start + TkUtfToUniChar(start, &ch);
+ end = start + Tcl_UtfToUniChar(start, &ch);
Tk_UnderlineChars(menuPtr->display, d,
gc, tkfont, label, x + mePtr->indicatorSpace,
y + (height + fmPtr->ascent - fmPtr->descent) / 2,