diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-03-16 09:37:12 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-03-16 09:37:12 (GMT) |
commit | 2b27bfdd758f6c35adfaf96148424d06f51c9292 (patch) | |
tree | 7465ca15ecd709c305220786dadca2fa2b2acc90 | |
parent | d7f29e1ccf269fa5f4cb2cd8d02f35193ebc67be (diff) | |
download | tk-2b27bfdd758f6c35adfaf96148424d06f51c9292.zip tk-2b27bfdd758f6c35adfaf96148424d06f51c9292.tar.gz tk-2b27bfdd758f6c35adfaf96148424d06f51c9292.tar.bz2 |
Make Tk compile warning-free against TIP-389-enabled Tcl 8.7. No change of functionality, since font-names generally don't contain out-of-BMP Unicode characters (if they do in the future, that still can be fixed then).
-rw-r--r-- | generic/tkFont.c | 6 | ||||
-rw-r--r-- | generic/tkInt.h | 2 | ||||
-rw-r--r-- | macosx/tkMacOSXFont.c | 4 | ||||
-rw-r--r-- | unix/tkUnixFont.c | 2 | ||||
-rw-r--r-- | unix/tkUnixRFont.c | 2 | ||||
-rw-r--r-- | win/tkWinFont.c | 2 |
6 files changed, 9 insertions, 9 deletions
diff --git a/generic/tkFont.c b/generic/tkFont.c index 102fc6e..1ffac16 100644 --- a/generic/tkFont.c +++ b/generic/tkFont.c @@ -497,7 +497,7 @@ Tk_FontObjCmd( const char *s; Tk_Font tkfont; Tcl_Obj *optPtr, *charPtr, *resultPtr; - Tcl_UniChar uniChar = 0; + int uniChar = 0; const TkFontAttributes *faPtr; TkFontAttributes fa; @@ -1714,10 +1714,10 @@ Tk_PostscriptFontName( } src += Tcl_UtfToUniChar(src, &ch); if (upper) { - ch = Tcl_UniCharToUpper(ch); + ch = (Tcl_UniChar) Tcl_UniCharToUpper(ch); upper = 0; } else { - ch = Tcl_UniCharToLower(ch); + ch = (Tcl_UniChar) Tcl_UniCharToLower(ch); } dest += Tcl_UniCharToUtf(ch, dest); } diff --git a/generic/tkInt.h b/generic/tkInt.h index b644c5b..600a2a3 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -1196,7 +1196,7 @@ MODULE_SCOPE void TkUnderlineCharsInContext(Display *display, const char *string, int numBytes, int x, int y, int firstByte, int lastByte); MODULE_SCOPE void TkpGetFontAttrsForChar(Tk_Window tkwin, Tk_Font tkfont, - Tcl_UniChar c, struct TkFontAttributes *faPtr); + int c, struct TkFontAttributes *faPtr); MODULE_SCOPE Tcl_Obj * TkNewWindowObj(Tk_Window tkwin); MODULE_SCOPE void TkpShowBusyWindow(TkBusy busy); MODULE_SCOPE void TkpHideBusyWindow(TkBusy busy); diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c index c48e56e..d3e0e41 100644 --- a/macosx/tkMacOSXFont.c +++ b/macosx/tkMacOSXFont.c @@ -672,14 +672,14 @@ void TkpGetFontAttrsForChar( Tk_Window tkwin, /* Window on the font's display */ Tk_Font tkfont, /* Font to query */ - Tcl_UniChar c, /* Character of interest */ + int c, /* Character of interest */ TkFontAttributes* faPtr) /* Output: Font attributes */ { MacFont *fontPtr = (MacFont *) tkfont; NSFont *nsFont = fontPtr->nsFont; *faPtr = fontPtr->font.fa; if (nsFont && ![[nsFont coveredCharacterSet] characterIsMember:c]) { - UTF16Char ch = c; + UTF16Char ch = (UTF16Char) c; nsFont = [nsFont bestMatchingFontForCharacters:&ch length:1 attributes:nil actualCoveredLength:NULL]; diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c index a4998aa..1f4a1d4 100644 --- a/unix/tkUnixFont.c +++ b/unix/tkUnixFont.c @@ -946,7 +946,7 @@ void TkpGetFontAttrsForChar( Tk_Window tkwin, /* Window on the font's display */ Tk_Font tkfont, /* Font to query */ - Tcl_UniChar c, /* Character of interest */ + int c, /* Character of interest */ TkFontAttributes *faPtr) /* Output: Font attributes */ { FontAttributes atts; diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c index ab2ed4a..cc743a6 100644 --- a/unix/tkUnixRFont.c +++ b/unix/tkUnixRFont.c @@ -609,7 +609,7 @@ void TkpGetFontAttrsForChar( Tk_Window tkwin, /* Window on the font's display */ Tk_Font tkfont, /* Font to query */ - Tcl_UniChar c, /* Character of interest */ + int c, /* Character of interest */ TkFontAttributes *faPtr) /* Output: Font attributes */ { UnixFtFont *fontPtr = (UnixFtFont *) tkfont; diff --git a/win/tkWinFont.c b/win/tkWinFont.c index 9172b00..7b5e4c9 100644 --- a/win/tkWinFont.c +++ b/win/tkWinFont.c @@ -743,7 +743,7 @@ void TkpGetFontAttrsForChar( Tk_Window tkwin, /* Window on the font's display */ Tk_Font tkfont, /* Font to query */ - Tcl_UniChar c, /* Character of interest */ + int c, /* Character of interest */ TkFontAttributes *faPtr) /* Output: Font attributes */ { WinFont *fontPtr = (WinFont *) tkfont; |