summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-01-30 21:40:22 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-01-30 21:40:22 (GMT)
commit2737c8d978b921ea23950eed707254dc87251465 (patch)
treed54eb55c8614ab2aa5c827e939d58e39066b5523
parent793bcdb63ca66145e9be007a1e74aab7ba87abae (diff)
parent2ece7fc679e05923e7cff58751cf69302a8cc82d (diff)
downloadtk-2737c8d978b921ea23950eed707254dc87251465.zip
tk-2737c8d978b921ea23950eed707254dc87251465.tar.gz
tk-2737c8d978b921ea23950eed707254dc87251465.tar.bz2
Merge 8.7
-rw-r--r--generic/tkButton.c4
-rw-r--r--generic/tkInt.decls2
-rw-r--r--generic/tkIntDecls.h5
-rw-r--r--generic/tkTextImage.c4
-rw-r--r--generic/tkTextIndex.c4
-rw-r--r--generic/tkTextTag.c8
-rw-r--r--generic/tkTextWind.c10
-rw-r--r--generic/ttk/ttkEntry.c2
8 files changed, 20 insertions, 19 deletions
diff --git a/generic/tkButton.c b/generic/tkButton.c
index 5a6902d..c5360fa 100644
--- a/generic/tkButton.c
+++ b/generic/tkButton.c
@@ -303,9 +303,9 @@ static const Tk_OptionSpec checkbuttonOptionSpecs[] = {
DEF_BUTTON_IMAGE, offsetof(TkButton, imagePtr), TCL_INDEX_NONE,
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_BOOLEAN, "-indicatoron", "indicatorOn", "IndicatorOn",
- DEF_BUTTON_INDICATOR, TCL_INDEX_NONE, offsetof(TkButton, indicatorOn), TK_OPTION_ENUM_VAR, 0, 0},
+ DEF_BUTTON_INDICATOR, TCL_INDEX_NONE, offsetof(TkButton, indicatorOn), 0, 0, 0},
{TK_OPTION_JUSTIFY, "-justify", "justify", "Justify",
- DEF_BUTTON_JUSTIFY, TCL_INDEX_NONE, offsetof(TkButton, justify), 0, 0, 0},
+ DEF_BUTTON_JUSTIFY, TCL_INDEX_NONE, offsetof(TkButton, justify), TK_OPTION_ENUM_VAR, 0, 0},
{TK_OPTION_RELIEF, "-offrelief", "offRelief", "OffRelief",
DEF_BUTTON_RELIEF, TCL_INDEX_NONE, offsetof(TkButton, offRelief), 0, 0, 0},
{TK_OPTION_STRING, "-offvalue", "offValue", "Value",
diff --git a/generic/tkInt.decls b/generic/tkInt.decls
index 8b1aab3..262ab43 100644
--- a/generic/tkInt.decls
+++ b/generic/tkInt.decls
@@ -535,7 +535,7 @@ declare 161 {
declare 162 {
struct TkTextIndex *TkTextMakeByteIndex(TkTextBTree tree,
const struct TkText *textPtr, int lineIndex,
- int byteIndex, struct TkTextIndex *indexPtr)
+ Tcl_Size byteIndex, struct TkTextIndex *indexPtr)
}
declare 163 {
Tcl_Size TkTextPrintIndex(const struct TkText *textPtr,
diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h
index b4eea9e..a07eb36 100644
--- a/generic/tkIntDecls.h
+++ b/generic/tkIntDecls.h
@@ -465,7 +465,8 @@ EXTERN int TkTextIndexForwBytes(const struct TkText *textPtr,
/* 162 */
EXTERN struct TkTextIndex * TkTextMakeByteIndex(TkTextBTree tree,
const struct TkText *textPtr, int lineIndex,
- int byteIndex, struct TkTextIndex *indexPtr);
+ Tcl_Size byteIndex,
+ struct TkTextIndex *indexPtr);
/* 163 */
EXTERN Tcl_Size TkTextPrintIndex(const struct TkText *textPtr,
const struct TkTextIndex *indexPtr,
@@ -767,7 +768,7 @@ typedef struct TkIntStubs {
int (*tkTextGetIndex) (Tcl_Interp *interp, struct TkText *textPtr, const char *string, struct TkTextIndex *indexPtr); /* 159 */
int (*tkTextIndexBackBytes) (const struct TkText *textPtr, const struct TkTextIndex *srcPtr, int count, struct TkTextIndex *dstPtr); /* 160 */
int (*tkTextIndexForwBytes) (const struct TkText *textPtr, const struct TkTextIndex *srcPtr, int count, struct TkTextIndex *dstPtr); /* 161 */
- struct TkTextIndex * (*tkTextMakeByteIndex) (TkTextBTree tree, const struct TkText *textPtr, int lineIndex, int byteIndex, struct TkTextIndex *indexPtr); /* 162 */
+ struct TkTextIndex * (*tkTextMakeByteIndex) (TkTextBTree tree, const struct TkText *textPtr, int lineIndex, Tcl_Size byteIndex, struct TkTextIndex *indexPtr); /* 162 */
Tcl_Size (*tkTextPrintIndex) (const struct TkText *textPtr, const struct TkTextIndex *indexPtr, char *string); /* 163 */
struct TkTextSegment * (*tkTextSetMark) (struct TkText *textPtr, const char *name, struct TkTextIndex *indexPtr); /* 164 */
int (*tkTextXviewCmd) (struct TkText *textPtr, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[]); /* 165 */
diff --git a/generic/tkTextImage.c b/generic/tkTextImage.c
index 2d2498b..f7c6f4d 100644
--- a/generic/tkTextImage.c
+++ b/generic/tkTextImage.c
@@ -37,7 +37,7 @@ static void EmbImageBboxProc(TkText *textPtr,
int lineHeight, int baseline, int *xPtr, int *yPtr,
int *widthPtr, int *heightPtr);
static int EmbImageConfigure(TkText *textPtr,
- TkTextSegment *eiPtr, int objc,
+ TkTextSegment *eiPtr, Tcl_Size objc,
Tcl_Obj *const objv[]);
static int EmbImageDeleteProc(TkTextSegment *segPtr,
TkTextLine *linePtr, int treeGone);
@@ -327,7 +327,7 @@ EmbImageConfigure(
TkText *textPtr, /* Information about text widget that contains
* embedded image. */
TkTextSegment *eiPtr, /* Embedded image to be configured. */
- int objc, /* Number of strings in objv. */
+ Tcl_Size objc, /* Number of strings in objv. */
Tcl_Obj *const objv[]) /* Array of strings describing configuration
* options. */
{
diff --git a/generic/tkTextIndex.c b/generic/tkTextIndex.c
index c6d83d1..1a3cebd 100644
--- a/generic/tkTextIndex.c
+++ b/generic/tkTextIndex.c
@@ -395,7 +395,7 @@ TkTextMakeByteIndex(
const TkText *textPtr,
int lineIndex, /* Index of desired line (0 means first line
* of text). */
- int byteIndex, /* Byte index of desired character. */
+ Tcl_Size byteIndex, /* Byte index of desired character. */
TkTextIndex *indexPtr) /* Structure to fill in. */
{
TkTextSegment *segPtr;
@@ -2465,7 +2465,7 @@ StartEnd(
indexPtr->byteIndex -= chSize;
}
offset -= chSize;
- if ((int)offset < 0) {
+ if (offset < 0) {
if (indexPtr->byteIndex == 0) {
goto done;
}
diff --git a/generic/tkTextTag.c b/generic/tkTextTag.c
index e00f7c4..4af8c99 100644
--- a/generic/tkTextTag.c
+++ b/generic/tkTextTag.c
@@ -69,7 +69,7 @@ SetPixels(
if ((flags & OPTION_NONNEG) && pixel.value < 0) {
pixel.value = 0;
}
- pixel.string = ckalloc((*value)->length + 1);
+ pixel.string = (char *)ckalloc((*value)->length + 1);
strcpy(pixel.string, (*value)->bytes);
}
@@ -101,7 +101,7 @@ SetBoolean(
}
return TCL_ERROR;
}
- booleanVal.string = ckalloc((*value)->length + 1);
+ booleanVal.string = (char *)ckalloc((*value)->length + 1);
strcpy(booleanVal.string, (*value)->bytes);
}
@@ -133,7 +133,7 @@ SetRelief(
}
return TCL_ERROR;
}
- relief.string = ckalloc((*value)->length + 1);
+ relief.string = (char *)ckalloc((*value)->length + 1);
strcpy(relief.string, (*value)->bytes);
}
@@ -165,7 +165,7 @@ SetJustify(
}
return TCL_ERROR;
}
- justify.string = ckalloc((*value)->length + 1);
+ justify.string = (char *)ckalloc((*value)->length + 1);
strcpy(justify.string, (*value)->bytes);
}
diff --git a/generic/tkTextWind.c b/generic/tkTextWind.c
index f8ec9f5..38ebc80 100644
--- a/generic/tkTextWind.c
+++ b/generic/tkTextWind.c
@@ -51,7 +51,7 @@ static void EmbWinBboxProc(TkText *textPtr,
int lineHeight, int baseline, int *xPtr,int *yPtr,
int *widthPtr, int *heightPtr);
static int EmbWinConfigure(TkText *textPtr, TkTextSegment *ewPtr,
- int objc, Tcl_Obj *const objv[]);
+ Tcl_Size objc, Tcl_Obj *const objv[]);
static void EmbWinDelayedUnmap(void *clientData);
static int EmbWinDeleteProc(TkTextSegment *segPtr,
TkTextLine *linePtr, int treeGone);
@@ -378,7 +378,7 @@ EmbWinConfigure(
TkText *textPtr, /* Information about text widget that contains
* embedded window. */
TkTextSegment *ewPtr, /* Embedded window to be configured. */
- int objc, /* Number of strings in objv. */
+ Tcl_Size objc, /* Number of strings in objv. */
Tcl_Obj *const objv[]) /* Array of objects describing configuration
* options. */
{
@@ -868,7 +868,7 @@ EmbWinLayoutProc(
dsPtr = &buf;
}
if (string != before) {
- Tcl_DStringAppend(dsPtr, before, (int) (string-before));
+ Tcl_DStringAppend(dsPtr, before, string-before);
before = string;
}
if (string[1] == '%') {
@@ -903,7 +903,7 @@ EmbWinLayoutProc(
*/
if (dsPtr != NULL) {
- Tcl_DStringAppend(dsPtr, before, (int) (string-before));
+ Tcl_DStringAppend(dsPtr, before, string-before);
code = Tcl_EvalEx(textPtr->interp, Tcl_DStringValue(dsPtr), TCL_INDEX_NONE, TCL_EVAL_GLOBAL);
Tcl_DStringFree(dsPtr);
} else {
@@ -1051,7 +1051,7 @@ EmbWinCheckProc(
Tcl_Panic("EmbWinCheckProc: embedded window is last segment in line");
}
if (ewPtr->size != 1) {
- Tcl_Panic("EmbWinCheckProc: embedded window has size %d", (int)ewPtr->size);
+ Tcl_Panic("EmbWinCheckProc: embedded window has size %" TCL_SIZE_MODIFIER "d", ewPtr->size);
}
}
diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c
index 8f26432..756e41c 100644
--- a/generic/ttk/ttkEntry.c
+++ b/generic/ttk/ttkEntry.c
@@ -170,7 +170,7 @@ static const Tk_OptionSpec EntryOptionSpecs[] = {
TK_OPTION_NULL_OK, 0, 0},
{TK_OPTION_JUSTIFY, "-justify", "justify", "Justify",
"left", TCL_INDEX_NONE, offsetof(Entry, entry.justify),
- 0, 0, GEOMETRY_CHANGED},
+ TK_OPTION_ENUM_VAR, 0, GEOMETRY_CHANGED},
{TK_OPTION_STRING, "-placeholder", "placeHolder", "PlaceHolder",
NULL, offsetof(Entry, entry.placeholderObj), TCL_INDEX_NONE,
TK_OPTION_NULL_OK, 0, 0},