diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-06-25 10:01:36 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-06-25 10:01:36 (GMT) |
commit | 4ddfabceb1dd92219b221373226f24345bd86759 (patch) | |
tree | dccec125103eba842f379dfcfa174b8349ce64b9 /macosx | |
parent | 1b7e7f9d63511b6a708a4b20a4f4f66b242eca97 (diff) | |
download | tk-4ddfabceb1dd92219b221373226f24345bd86759.zip tk-4ddfabceb1dd92219b221373226f24345bd86759.tar.gz tk-4ddfabceb1dd92219b221373226f24345bd86759.tar.bz2 |
TIP #628 for Tk: Shared 8.7/9.0 build environment
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXCursor.c | 2 | ||||
-rw-r--r-- | macosx/tkMacOSXFont.c | 18 | ||||
-rw-r--r-- | macosx/tkMacOSXMenu.c | 4 |
3 files changed, 12 insertions, 12 deletions
diff --git a/macosx/tkMacOSXCursor.c b/macosx/tkMacOSXCursor.c index 38ead27..3155f36 100644 --- a/macosx/tkMacOSXCursor.c +++ b/macosx/tkMacOSXCursor.c @@ -372,7 +372,7 @@ TkGetCursorByName( { TkMacOSXCursor *macCursorPtr = NULL; const char **argv = NULL; - TkSizeT argc; + Tcl_Size argc; /* * All cursor names are valid lists of one element (for diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c index 496dc35..a25e451 100644 --- a/macosx/tkMacOSXFont.c +++ b/macosx/tkMacOSXFont.c @@ -823,7 +823,7 @@ Tk_MeasureChars( Tk_Font tkfont, /* Font in which characters will be drawn. */ const char *source, /* UTF-8 string to be displayed. Need not be * '\0' terminated. */ - int numBytes, /* Maximum number of bytes to consider from + Tcl_Size numBytes, /* Maximum number of bytes to consider from * source string. */ int maxLength, /* If >= 0, maxLength specifies the longest * permissible line length; don't consider any @@ -873,10 +873,10 @@ TkpMeasureCharsInContext( Tk_Font tkfont, /* Font in which characters will be drawn. */ const char * source, /* UTF-8 string to be displayed. Need not be * '\0' terminated. */ - int numBytes, /* Maximum number of bytes to consider from + Tcl_Size numBytes, /* Maximum number of bytes to consider from * source string in all. */ - int rangeStart, /* Index of first byte to measure. */ - int rangeLength, /* Length of range to measure in bytes. */ + Tcl_Size rangeStart, /* Index of first byte to measure. */ + Tcl_Size rangeLength, /* Length of range to measure in bytes. */ int maxLength, /* If >= 0, maxLength specifies the longest * permissible line length; don't consider any * character that would cross this x-position. @@ -1081,7 +1081,7 @@ Tk_DrawChars( * passed to this function. If they are not * stripped out, they will be displayed as * regular printing characters. */ - int numBytes, /* Number of bytes in string. */ + Tcl_Size numBytes, /* Number of bytes in string. */ int x, int y) /* Coordinates at which to place origin of the * string when drawing. */ { @@ -1172,9 +1172,9 @@ TkpDrawAngledCharsInContext( * passed to this function. If they are not * stripped out, they will be displayed as * regular printing characters. */ - int numBytes, /* Number of bytes in string. */ - int rangeStart, /* Index of first byte to draw. */ - int rangeLength, /* Length of range to draw in bytes. */ + Tcl_Size numBytes, /* Number of bytes in string. */ + Tcl_Size rangeStart, /* Index of first byte to draw. */ + Tcl_Size rangeLength, /* Length of range to draw in bytes. */ double x, double y, /* Coordinates at which to place origin of the * whole (not just the range) string when * drawing. */ @@ -1195,7 +1195,7 @@ TkpDrawAngledCharsInContext( CGAffineTransform t; CGFloat width, height, textX = (CGFloat) x, textY = (CGFloat) y; - if (rangeStart < 0 || rangeLength <= 0 || + if (rangeStart == TCL_INDEX_NONE || rangeLength + 1 <= 1 || rangeStart + rangeLength > numBytes || !TkMacOSXSetupDrawingContext(drawable, gc, &drawingContext)) { return; diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c index f42b91c..17a6a34 100644 --- a/macosx/tkMacOSXMenu.c +++ b/macosx/tkMacOSXMenu.c @@ -829,7 +829,7 @@ TkpConfigureMenuEntry( * have been added by the system. See [7185d26cf4]. */ - for (TkSizeT i = 0; i < menuRefPtr->menuPtr->numEntries; i++) { + for (Tcl_Size i = 0; i < menuRefPtr->menuPtr->numEntries; i++) { TkMenuEntry *submePtr = menuRefPtr->menuPtr->entries[i]; NSMenuItem *item = (NSMenuItem *) submePtr->platformEntryData; [item setEnabled:(submePtr->state != ENTRY_DISABLED)]; @@ -1028,7 +1028,7 @@ TkpPostTearoffMenu( * at the given coordinates. */ - if (index < 0 || (TkSizeT)index >= menuPtr->numEntries) { + if (index < 0 || (Tcl_Size)index >= menuPtr->numEntries) { index = menuPtr->numEntries - 1; } if (index >= 0) { |