diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-02-25 13:53:20 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-02-25 13:53:20 (GMT) |
commit | fa31023365ece2d5c33d226c77b1aaa061cc10fa (patch) | |
tree | 146be4229d49816cbca05fb8b07b11e158b3ea10 | |
parent | 25b3e364d0e21bb057ddb735dc65fcbcaf6f070e (diff) | |
parent | a2eecbce351c9dc1436c1a7a1582e1df477e7d8d (diff) | |
download | tk-fa31023365ece2d5c33d226c77b1aaa061cc10fa.zip tk-fa31023365ece2d5c33d226c77b1aaa061cc10fa.tar.gz tk-fa31023365ece2d5c33d226c77b1aaa061cc10fa.tar.bz2 |
Merge 8.7
-rw-r--r-- | generic/tkClipboard.c | 8 | ||||
-rw-r--r-- | generic/tkCmds.c | 6 | ||||
-rw-r--r-- | macosx/tkMacOSXClipboard.c | 8 | ||||
-rwxr-xr-x | unix/configure | 10 | ||||
-rw-r--r-- | unix/configure.ac | 10 | ||||
-rwxr-xr-x | win/configure | 6 | ||||
-rw-r--r-- | win/configure.ac | 6 |
7 files changed, 36 insertions, 18 deletions
diff --git a/generic/tkClipboard.c b/generic/tkClipboard.c index a972230..1f4298d 100644 --- a/generic/tkClipboard.c +++ b/generic/tkClipboard.c @@ -709,7 +709,13 @@ ClipboardGetProc( * used). */ const char *portion) /* New information to be appended. */ { - Tcl_DStringAppend((Tcl_DString *)clientData, portion, -1); + Tcl_Encoding utf8 = Tcl_GetEncoding(NULL, "utf-8"); + Tcl_DString ds; + + Tcl_ExternalToUtfDString(utf8, portion, -1, &ds); + Tcl_DStringAppend((Tcl_DString *) clientData, Tcl_DStringValue(&ds), Tcl_DStringLength(&ds)); + Tcl_DStringFree(&ds); + Tcl_FreeEncoding(utf8); return TCL_OK; } diff --git a/generic/tkCmds.c b/generic/tkCmds.c index e57f21e..36981af 100644 --- a/generic/tkCmds.c +++ b/generic/tkCmds.c @@ -1113,14 +1113,16 @@ Tk_TkwaitObjCmd( static char * WaitVariableProc( ClientData clientData, /* Pointer to integer to set to 1. */ - TCL_UNUSED(Tcl_Interp *), /* Interpreter containing variable. */ - TCL_UNUSED(const char *), /* Name of variable. */ + Tcl_Interp *interp, /* Interpreter containing variable. */ + const char *name1, /* Name of variable. */ TCL_UNUSED(const char *), /* Second part of variable name. */ TCL_UNUSED(int)) /* Information about what happened. */ { int *donePtr = (int *)clientData; *donePtr = 1; + Tcl_UntraceVar(interp, name1, TCL_TRACE_WRITES|TCL_TRACE_UNSETS, + WaitVariableProc, clientData); return NULL; } diff --git a/macosx/tkMacOSXClipboard.c b/macosx/tkMacOSXClipboard.c index 8e2b4a4..41887f4 100644 --- a/macosx/tkMacOSXClipboard.c +++ b/macosx/tkMacOSXClipboard.c @@ -137,13 +137,7 @@ TkSelGetSelection( string = [pb stringForType:type]; } if (string) { - if (target == dispPtr->utf8Atom) { - result = proc(clientData, interp, string.UTF8String); - } else if (target == XA_STRING) { - const char *latin1 = [string - cStringUsingEncoding:NSISOLatin1StringEncoding]; - result = proc(clientData, interp, latin1); - } + result = proc(clientData, interp, string.UTF8String); } } else { Tcl_SetObjResult(interp, Tcl_ObjPrintf( diff --git a/unix/configure b/unix/configure index 51cc17e..208483b 100755 --- a/unix/configure +++ b/unix/configure @@ -8696,14 +8696,18 @@ else fi # libdir must be a fully qualified path and not ${exec_prefix}/lib eval libdir="$libdir" + TK_LIB_FLAG="-l" + if test "${TCL_MAJOR_VERSION}" -gt 8 ; then + TK_LIB_FLAG="${TK_LIB_FLAG}tcl9" + fi if test "${ac_cv_cygwin}" = "yes" -a "$SHARED_BUILD" = "1"; then - TK_LIB_FLAG="-ltk`echo ${TK_VERSION} | tr -d .`" + TK_LIB_FLAG="${TK_LIB_FLAG}tk`echo ${TK_VERSION} | tr -d .`" TK_BUILD_LIB_SPEC="-L\$(TOP_DIR)/win ${TK_LIB_FLAG}" else if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then - TK_LIB_FLAG="-ltk${TK_VERSION}" + TK_LIB_FLAG="${TK_LIB_FLAG}tk${TK_VERSION}" else - TK_LIB_FLAG="-ltk`echo ${TK_VERSION} | tr -d .`" + TK_LIB_FLAG="${TK_LIB_FLAG}tk`echo ${TK_VERSION} | tr -d .`" fi TK_BUILD_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TK_LIB_FLAG}" fi diff --git a/unix/configure.ac b/unix/configure.ac index 4f74644..b728ce1 100644 --- a/unix/configure.ac +++ b/unix/configure.ac @@ -652,14 +652,18 @@ else fi # libdir must be a fully qualified path and not ${exec_prefix}/lib eval libdir="$libdir" + TK_LIB_FLAG="-l" + if test "${TCL_MAJOR_VERSION}" -gt 8 ; then + TK_LIB_FLAG="${TK_LIB_FLAG}tcl9" + fi if test "${ac_cv_cygwin}" = "yes" -a "$SHARED_BUILD" = "1"; then - TK_LIB_FLAG="-ltk`echo ${TK_VERSION} | tr -d .`" + TK_LIB_FLAG="${TK_LIB_FLAG}tk`echo ${TK_VERSION} | tr -d .`" TK_BUILD_LIB_SPEC="-L\$(TOP_DIR)/win ${TK_LIB_FLAG}" else if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then - TK_LIB_FLAG="-ltk${TK_VERSION}" + TK_LIB_FLAG="${TK_LIB_FLAG}tk${TK_VERSION}" else - TK_LIB_FLAG="-ltk`echo ${TK_VERSION} | tr -d .`" + TK_LIB_FLAG="${TK_LIB_FLAG}tk`echo ${TK_VERSION} | tr -d .`" fi TK_BUILD_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TK_LIB_FLAG}" fi diff --git a/win/configure b/win/configure index 1309818..872005d 100755 --- a/win/configure +++ b/win/configure @@ -5825,7 +5825,11 @@ eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${VER}${LIBSUFFIX}" # FIXME: All of this var junk needs to be done in tcl.m4 !!!! # I left out the other vars that also need to get defined here. # we also need to double check about spaces in path names -eval "TK_LIB_FLAG=\"-ltk${VER}${LIBFLAGSUFFIX}\"" +TK_LIB_FLAG="-l" +if test "${TCL_MAJOR_VERSION}" -gt 8 ; then + TK_LIB_FLAG="${TK_LIB_FLAG}tcl9" +fi +eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}${VER}${LIBFLAGSUFFIX}\"" TK_LIB_SPEC="-L${libdir} ${TK_LIB_FLAG}" TK_BUILD_LIB_SPEC="-L`pwd` ${TK_LIB_FLAG}" diff --git a/win/configure.ac b/win/configure.ac index a6b45b8..5fd3b8e 100644 --- a/win/configure.ac +++ b/win/configure.ac @@ -260,7 +260,11 @@ eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${VER}${LIBSUFFIX}" # FIXME: All of this var junk needs to be done in tcl.m4 !!!! # I left out the other vars that also need to get defined here. # we also need to double check about spaces in path names -eval "TK_LIB_FLAG=\"-ltk${VER}${LIBFLAGSUFFIX}\"" +TK_LIB_FLAG="-l" +if test "${TCL_MAJOR_VERSION}" -gt 8 ; then + TK_LIB_FLAG="${TK_LIB_FLAG}tcl9" +fi +eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}${VER}${LIBFLAGSUFFIX}\"" TK_LIB_SPEC="-L${libdir} ${TK_LIB_FLAG}" TK_BUILD_LIB_SPEC="-L`pwd` ${TK_LIB_FLAG}" |