diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-03-19 16:33:52 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-03-19 16:33:52 (GMT) |
commit | 83036f8cf7212bdcb1f5e9725fb5e8dbdda8576b (patch) | |
tree | 8057432c1ae41fc059466058251c054edb4c3c6c | |
parent | 4277fc739591f50537756467fd97a02591ef7b64 (diff) | |
parent | 7ee3cf1eefe8f83ea1e5a48fd3b8c0d01803f3b9 (diff) | |
download | tk-83036f8cf7212bdcb1f5e9725fb5e8dbdda8576b.zip tk-83036f8cf7212bdcb1f5e9725fb5e8dbdda8576b.tar.gz tk-83036f8cf7212bdcb1f5e9725fb5e8dbdda8576b.tar.bz2 |
Merge 8.6
-rw-r--r-- | generic/tkMain.c | 4 | ||||
-rw-r--r-- | win/tkWinClipboard.c | 8 | ||||
-rw-r--r-- | win/tkWinKey.c | 2 | ||||
-rw-r--r-- | win/tkWinMenu.c | 4 |
4 files changed, 5 insertions, 13 deletions
diff --git a/generic/tkMain.c b/generic/tkMain.c index a52f1b3..e50b0f4 100644 --- a/generic/tkMain.c +++ b/generic/tkMain.c @@ -76,9 +76,6 @@ extern const TclIntPlatStubs *tclIntPlatStubsPtr; * encoding to UTF-8). */ -#if defined(UNICODE) && (TCL_UTF_MAX <= 4) -# define NewNativeObj Tcl_NewUnicodeObj -#else /* !UNICODE || (TCL_UTF_MAX > 4) */ static inline Tcl_Obj * NewNativeObj( TCHAR *string, @@ -99,7 +96,6 @@ NewNativeObj( Tcl_DStringFree(&ds); return obj; } -#endif /* !UNICODE || (TCL_UTF_MAX > 4) */ /* * Declarations for various library functions and variables (don't want to diff --git a/win/tkWinClipboard.c b/win/tkWinClipboard.c index 877eed4..93c5d42 100644 --- a/win/tkWinClipboard.c +++ b/win/tkWinClipboard.c @@ -79,9 +79,7 @@ TkSelGetSelection( goto error; } data = GlobalLock(handle); - Tcl_DStringInit(&ds); - Tcl_UniCharToUtfDString((Tcl_UniChar *)data, - Tcl_UniCharLen((Tcl_UniChar *)data), &ds); + Tcl_WinTCharToUtf((TCHAR *)data, -1, &ds); GlobalUnlock(handle); } else if (IsClipboardFormatAvailable(CF_TEXT)) { /* @@ -157,9 +155,7 @@ TkSelGetSelection( if (count) { Tcl_DStringAppend(&ds, "\n", 1); } - len = Tcl_UniCharLen((Tcl_UniChar *) fname); - Tcl_DStringInit(&dsTmp); - Tcl_UniCharToUtfDString((Tcl_UniChar *) fname, len, &dsTmp); + Tcl_WinTCharToUtf(fname, -1, &dsTmp); Tcl_DStringAppend(&ds, Tcl_DStringValue(&dsTmp), Tcl_DStringLength(&dsTmp)); Tcl_DStringFree(&dsTmp); diff --git a/win/tkWinKey.c b/win/tkWinKey.c index 357a804..8db34af 100644 --- a/win/tkWinKey.c +++ b/win/tkWinKey.c @@ -122,7 +122,7 @@ TkpGetString( if (((keysym != NoSymbol) && (keysym > 0) && (keysym < 256)) || (keysym == XK_Return) || (keysym == XK_Tab)) { - len = Tcl_UniCharToUtf((Tcl_UniChar) (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 779f68c..7f1e9cc 100644 --- a/win/tkWinMenu.c +++ b/win/tkWinMenu.c @@ -1250,7 +1250,7 @@ TkWinHandleMenuEvent( int i, len, underline; Tcl_Obj *labelPtr; WCHAR *wlabel; - Tcl_UniChar menuChar; + int menuChar; Tcl_DString ds; *plResult = 0; @@ -1259,7 +1259,7 @@ TkWinHandleMenuEvent( * Assume we have something directly convertable to Tcl_UniChar. * True at least for wide systems. */ - menuChar = Tcl_UniCharToUpper((Tcl_UniChar) LOWORD(*pwParam)); + menuChar = Tcl_UniCharToUpper(LOWORD(*pwParam)); Tcl_DStringInit(&ds); for (i = 0; i < menuPtr->numEntries; i++) { |