summaryrefslogtreecommitdiffstats
path: root/generic/tkFont.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-06-25 10:01:36 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-06-25 10:01:36 (GMT)
commit4ddfabceb1dd92219b221373226f24345bd86759 (patch)
treedccec125103eba842f379dfcfa174b8349ce64b9 /generic/tkFont.c
parent1b7e7f9d63511b6a708a4b20a4f4f66b242eca97 (diff)
downloadtk-4ddfabceb1dd92219b221373226f24345bd86759.zip
tk-4ddfabceb1dd92219b221373226f24345bd86759.tar.gz
tk-4ddfabceb1dd92219b221373226f24345bd86759.tar.bz2
TIP #628 for Tk: Shared 8.7/9.0 build environment
Diffstat (limited to 'generic/tkFont.c')
-rw-r--r--generic/tkFont.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/generic/tkFont.c b/generic/tkFont.c
index 0010d12..945c962 100644
--- a/generic/tkFont.c
+++ b/generic/tkFont.c
@@ -715,7 +715,7 @@ Tk_FontObjCmd(
case FONT_MEASURE: {
const char *string;
Tk_Font tkfont;
- TkSizeT length = 0;
+ Tcl_Size length = 0;
int skip = 0;
if (objc > 4) {
@@ -1841,12 +1841,12 @@ int
Tk_TextWidth(
Tk_Font tkfont, /* Font in which text will be measured. */
const char *string, /* String whose width will be computed. */
- int numBytes) /* Number of bytes to consider from string, or
- * < 0 for strlen(). */
+ Tcl_Size numBytes) /* Number of bytes to consider from string, or
+ * TCL_INDEX_NONE for strlen(). */
{
int width;
- if (numBytes < 0) {
+ if (numBytes == TCL_INDEX_NONE) {
numBytes = strlen(string);
}
Tk_MeasureChars(tkfont, string, numBytes, -1, 0, &width);
@@ -1888,8 +1888,8 @@ Tk_UnderlineChars(
* underlined or overstruck. */
int x, int y, /* Coordinates at which first character of
* string is drawn. */
- int firstByte, /* Index of first byte of first character. */
- int lastByte) /* Index of first byte after the last
+ Tcl_Size firstByte, /* Index of first byte of first character. */
+ Tcl_Size lastByte) /* Index of first byte after the last
* character. */
{
TkUnderlineCharsInContext(display, drawable, gc, tkfont, string,
@@ -1907,11 +1907,11 @@ TkUnderlineCharsInContext(
* dimensions, etc. */
const char *string, /* String containing characters to be
* underlined or overstruck. */
- int numBytes, /* Number of bytes in string. */
+ Tcl_Size numBytes, /* Number of bytes in string. */
int x, int y, /* Coordinates at which the first character of
* the whole string would be drawn. */
- int firstByte, /* Index of first byte of first character. */
- int lastByte) /* Index of first byte after the last
+ Tcl_Size firstByte, /* Index of first byte of first character. */
+ Tcl_Size lastByte) /* Index of first byte after the last
* character. */
{
TkFont *fontPtr = (TkFont *) tkfont;
@@ -1961,8 +1961,8 @@ Tk_ComputeTextLayout(
Tk_Font tkfont, /* Font that will be used to display text. */
const char *string, /* String whose dimensions are to be
* computed. */
- int numChars, /* Number of characters to consider from
- * string, or < 0 for strlen(). */
+ Tcl_Size numChars, /* Number of characters to consider from
+ * string, or TCL_INDEX_NONE for strlen(). */
int wrapLength, /* Longest permissible line length, in pixels.
* <= 0 means no automatic wrapping: just let
* lines get as long as needed. */
@@ -2000,7 +2000,7 @@ Tk_ComputeTextLayout(
height = fmPtr->ascent + fmPtr->descent;
- if (numChars < 0) {
+ if (numChars == TCL_INDEX_NONE) {
numChars = Tcl_NumUtfChars(string, -1);
}
if (wrapLength == 0) {
@@ -3299,7 +3299,7 @@ Tk_TextLayoutToPostscript(
int baseline = chunkPtr->y;
Tcl_Obj *psObj = Tcl_NewObj();
int i, j;
- TkSizeT len;
+ Tcl_Size len;
const char *p, *glyphname;
char uindex[5], c, *ps;
int ch;
@@ -3672,7 +3672,7 @@ ParseFontNameObj(
{
const char *dash;
int result, n;
- TkSizeT objc, i;
+ Tcl_Size objc, i;
Tcl_Obj **objv;
const char *string;