summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-04-01 13:03:07 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-04-01 13:03:07 (GMT)
commitd7354274f34de595efa76a3ce4a5f3225ef176c4 (patch)
treec7ae16d597ba5ebf9963fd9e49588de477447971 /unix
parent332a310b88f7e2df121be42967755bc600f2c1b2 (diff)
downloadtk-d7354274f34de595efa76a3ce4a5f3225ef176c4.zip
tk-d7354274f34de595efa76a3ce4a5f3225ef176c4.tar.gz
tk-d7354274f34de595efa76a3ce4a5f3225ef176c4.tar.bz2
Eliminate compile warnings, due to the usage of Tcl_ExternalToUtfDString()/Tcl_UtfTExternalDString() macro's in Tcl 9.0
Diffstat (limited to 'unix')
-rw-r--r--unix/tkUnixFont.c12
-rw-r--r--unix/tkUnixKey.c2
-rw-r--r--unix/tkUnixSelect.c4
-rwxr-xr-xunix/tkUnixSysNotify.c4
-rw-r--r--unix/tkUnixWm.c18
5 files changed, 20 insertions, 20 deletions
diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c
index 8987749..6ef43b7 100644
--- a/unix/tkUnixFont.c
+++ b/unix/tkUnixFont.c
@@ -1064,8 +1064,8 @@ Tk_MeasureChars(
thisSubFontPtr = FindSubFontForChar(fontPtr, ch, &lastSubFontPtr);
if (thisSubFontPtr != lastSubFontPtr) {
familyPtr = lastSubFontPtr->familyPtr;
- Tcl_UtfToExternalDString(familyPtr->encoding, source,
- p - source, &runString);
+ Tcl_UtfToExternalDStringEx(familyPtr->encoding, source,
+ TCL_ENCODING_NOCOMPLAIN, p - source, &runString);
if (familyPtr->isTwoByteFont) {
curX += XTextWidth16(lastSubFontPtr->fontStructPtr,
(XChar2b *) Tcl_DStringValue(&runString),
@@ -1082,8 +1082,8 @@ Tk_MeasureChars(
p = next;
}
familyPtr = lastSubFontPtr->familyPtr;
- Tcl_UtfToExternalDString(familyPtr->encoding, source, p - source,
- &runString);
+ Tcl_UtfToExternalDStringEx(familyPtr->encoding, source, p - source,
+ TCL_ENCODING_NOCOMPLAIN, &runString);
if (familyPtr->isTwoByteFont) {
curX += XTextWidth16(lastSubFontPtr->fontStructPtr,
(XChar2b *) Tcl_DStringValue(&runString),
@@ -1331,8 +1331,8 @@ Tk_DrawChars(
do_width = (needWidth || (p != end)) ? 1 : 0;
familyPtr = lastSubFontPtr->familyPtr;
- Tcl_UtfToExternalDString(familyPtr->encoding, source,
- p - source, &runString);
+ Tcl_UtfToExternalDStringEx(familyPtr->encoding, source,
+ p - source, TCL_ENCODING_NOCOMPLAIN, &runString);
if (familyPtr->isTwoByteFont) {
XDrawString16(display, drawable, gc, x, y,
(XChar2b *) Tcl_DStringValue(&runString),
diff --git a/unix/tkUnixKey.c b/unix/tkUnixKey.c
index fe0a9a9..008030a 100644
--- a/unix/tkUnixKey.c
+++ b/unix/tkUnixKey.c
@@ -175,7 +175,7 @@ TkpGetString(
len = 0;
}
Tcl_DStringSetLength(&buf, len);
- Tcl_ExternalToUtfDString(NULL, Tcl_DStringValue(&buf), len, dsPtr);
+ Tcl_ExternalToUtfDStringEx(NULL, Tcl_DStringValue(&buf), len, TCL_ENCODING_NOCOMPLAIN, dsPtr);
Tcl_DStringFree(&buf);
#endif /* X_HAVE_UTF8_STRING */
} else
diff --git a/unix/tkUnixSelect.c b/unix/tkUnixSelect.c
index 92c30c9..29a7b2e 100644
--- a/unix/tkUnixSelect.c
+++ b/unix/tkUnixSelect.c
@@ -620,7 +620,7 @@ TkSelEventProc(
} else {
encoding = Tcl_GetEncoding(NULL, "iso8859-1");
}
- Tcl_ExternalToUtfDString(encoding, propInfo, (int)numItems, &ds);
+ Tcl_ExternalToUtfDStringEx(encoding, propInfo, numItems, TCL_ENCODING_NOCOMPLAIN, &ds);
if (encoding) {
Tcl_FreeEncoding(encoding);
}
@@ -995,7 +995,7 @@ ConvertSelection(
} else {
encoding = Tcl_GetEncoding(NULL, "iso2022");
}
- Tcl_UtfToExternalDString(encoding, (char *) buffer, -1, &ds);
+ Tcl_UtfToExternalDStringEx(encoding, (char *) buffer, -1, TCL_ENCODING_NOCOMPLAIN, &ds);
XChangeProperty(reply.xsel.display, reply.xsel.requestor,
property, type, 8, PropModeReplace,
(unsigned char *) Tcl_DStringValue(&ds),
diff --git a/unix/tkUnixSysNotify.c b/unix/tkUnixSysNotify.c
index 3985f0e..cb9606c 100755
--- a/unix/tkUnixSysNotify.c
+++ b/unix/tkUnixSysNotify.c
@@ -145,8 +145,8 @@ SysNotifyCmd(
Tcl_DStringInit(&dst);
Tcl_DStringInit(&dsm);
enc = Tcl_GetEncoding(NULL, "utf-8");
- Tcl_UtfToExternalDString(enc, title, -1, &dst);
- Tcl_UtfToExternalDString(enc, message, -1, &dsm);
+ Tcl_UtfToExternalDStringEx(enc, title, -1, TCL_ENCODING_NOCOMPLAIN, &dst);
+ Tcl_UtfToExternalDStringEx(enc, message, -1, TCL_ENCODING_NOCOMPLAIN, &dsm);
notify_init(appname);
notif = notify_notification_new(Tcl_DStringValue(&dst),
Tcl_DStringValue(&dsm), icon, NULL);
diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c
index 173fd68..e57c586 100644
--- a/unix/tkUnixWm.c
+++ b/unix/tkUnixWm.c
@@ -713,7 +713,7 @@ TkWmMapWindow(
UpdateCommand(winPtr);
}
if (wmPtr->clientMachine != NULL) {
- Tcl_UtfToExternalDString(NULL, wmPtr->clientMachine, -1, &ds);
+ Tcl_UtfToExternalDStringEx(NULL, wmPtr->clientMachine, -1, TCL_ENCODING_NOCOMPLAIN, &ds);
if (XStringListToTextProperty(&(Tcl_DStringValue(&ds)), 1,
&textProp) != 0) {
unsigned long pid = (unsigned long) getpid();
@@ -985,8 +985,8 @@ TkWmSetClass(
XClassHint *classPtr;
Tcl_DString name, ds;
- Tcl_UtfToExternalDString(NULL, winPtr->nameUid, -1, &name);
- Tcl_UtfToExternalDString(NULL, winPtr->classUid, -1, &ds);
+ Tcl_UtfToExternalDStringEx(NULL, winPtr->nameUid, -1, TCL_ENCODING_NOCOMPLAIN, &name);
+ Tcl_UtfToExternalDStringEx(NULL, winPtr->classUid, -1, TCL_ENCODING_NOCOMPLAIN, &ds);
classPtr = XAllocClassHint();
classPtr->res_name = Tcl_DStringValue(&name);
classPtr->res_class = Tcl_DStringValue(&ds);
@@ -1494,7 +1494,7 @@ WmClientCmd(
XTextProperty textProp;
Tcl_DString ds;
- Tcl_UtfToExternalDString(NULL, wmPtr->clientMachine, -1, &ds);
+ Tcl_UtfToExternalDStringEx(NULL, wmPtr->clientMachine, -1, TCL_ENCODING_NOCOMPLAIN, &ds);
if (XStringListToTextProperty(&(Tcl_DStringValue(&ds)), 1,
&textProp) != 0) {
unsigned long pid = (unsigned long) getpid();
@@ -4979,7 +4979,7 @@ UpdateTitle(
*/
string = (wmPtr->title != NULL) ? wmPtr->title : winPtr->nameUid;
- Tcl_UtfToExternalDString(NULL, string, -1, &ds);
+ Tcl_UtfToExternalDStringEx(NULL, string, -1, TCL_ENCODING_NOCOMPLAIN, &ds);
XStoreName(winPtr->display, wmPtr->wrapperPtr->window,
Tcl_DStringValue(&ds));
Tcl_DStringFree(&ds);
@@ -4992,7 +4992,7 @@ UpdateTitle(
*/
if (wmPtr->iconName != NULL) {
- Tcl_UtfToExternalDString(NULL, wmPtr->iconName, -1, &ds);
+ Tcl_UtfToExternalDStringEx(NULL, wmPtr->iconName, -1, TCL_ENCODING_NOCOMPLAIN, &ds);
XSetIconName(winPtr->display, wmPtr->wrapperPtr->window,
Tcl_DStringValue(&ds));
Tcl_DStringFree(&ds);
@@ -5512,7 +5512,7 @@ SetNetWmType(
char *name = Tcl_GetStringFromObj(objv[n], &len);
Tcl_UtfToUpper(name);
- Tcl_UtfToExternalDString(NULL, name, len, &dsName);
+ Tcl_UtfToExternalDStringEx(NULL, name, len, TCL_ENCODING_NOCOMPLAIN, &dsName);
Tcl_DStringInit(&ds);
Tcl_DStringAppend(&ds, "_NET_WM_WINDOW_TYPE_", 20);
Tcl_DStringAppend(&ds, Tcl_DStringValue(&dsName),
@@ -5576,7 +5576,7 @@ GetNetWmType(
const char *name = Tk_GetAtomName(tkwin, atoms[n]);
if (strncmp("_NET_WM_WINDOW_TYPE_", name, 20) == 0) {
- Tcl_ExternalToUtfDString(NULL, name+20, -1, &ds);
+ Tcl_ExternalToUtfDStringEx(NULL, name+20, -1, TCL_ENCODING_NOCOMPLAIN, &ds);
Tcl_UtfToLower(Tcl_DStringValue(&ds));
Tcl_ListObjAppendElement(interp, typePtr,
Tcl_NewStringObj(Tcl_DStringValue(&ds),
@@ -7386,7 +7386,7 @@ UpdateCommand(
offsets = (int *)ckalloc(sizeof(int) * wmPtr->cmdArgc);
Tcl_DStringInit(&cmds);
for (i = 0; i < wmPtr->cmdArgc; i++) {
- Tcl_UtfToExternalDString(NULL, wmPtr->cmdArgv[i], -1, &ds);
+ Tcl_UtfToExternalDStringEx(NULL, wmPtr->cmdArgv[i], -1, TCL_ENCODING_NOCOMPLAIN, &ds);
offsets[i] = Tcl_DStringLength(&cmds);
Tcl_DStringAppend(&cmds, Tcl_DStringValue(&ds),
Tcl_DStringLength(&ds)+1);