summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tkCanvLine.c6
-rw-r--r--generic/tkCanvWind.c6
-rw-r--r--generic/tkCanvas.c2
-rw-r--r--generic/tkCmds.c2
-rw-r--r--generic/tkConsole.c2
-rw-r--r--generic/tkListbox.c2
-rw-r--r--generic/tkTextDisp.c4
-rw-r--r--generic/tkTextIndex.c2
-rw-r--r--generic/ttk/ttkPanedwindow.c10
9 files changed, 18 insertions, 18 deletions
diff --git a/generic/tkCanvLine.c b/generic/tkCanvLine.c
index b26785e..6200c87 100644
--- a/generic/tkCanvLine.c
+++ b/generic/tkCanvLine.c
@@ -371,7 +371,7 @@ LineCoords(
double *coordPtr;
if (objc == 0) {
- int numCoords;
+ Tcl_Size numCoords;
Tcl_Obj *subobj, *obj = Tcl_NewObj();
numCoords = 2*linePtr->numPoints;
@@ -380,11 +380,11 @@ LineCoords(
} else {
coordPtr = linePtr->coordPtr;
}
- for (i = 0; i < (Tcl_Size)numCoords; i++, coordPtr++) {
+ for (i = 0; i < numCoords; i++, coordPtr++) {
if (i == 2) {
coordPtr = linePtr->coordPtr+2;
}
- if ((linePtr->lastArrowPtr != NULL) && (i == ((Tcl_Size)numCoords-2))) {
+ if ((linePtr->lastArrowPtr != NULL) && (i == (numCoords-2))) {
coordPtr = linePtr->lastArrowPtr;
}
subobj = Tcl_NewDoubleObj(*coordPtr);
diff --git a/generic/tkCanvWind.c b/generic/tkCanvWind.c
index d633222..e54032f 100644
--- a/generic/tkCanvWind.c
+++ b/generic/tkCanvWind.c
@@ -176,7 +176,7 @@ CreateWinItem(
Tcl_Obj *const objv[]) /* Arguments describing window. */
{
WindowItem *winItemPtr = (WindowItem *) itemPtr;
- int i;
+ Tcl_Size i;
if (objc == 0) {
Tcl_Panic("canvas did not pass any coords");
@@ -207,10 +207,10 @@ CreateWinItem(
i = 1;
}
}
- if (WinItemCoords(interp, canvas, itemPtr, (Tcl_Size)i, objv) != TCL_OK) {
+ if (WinItemCoords(interp, canvas, itemPtr, i, objv) != TCL_OK) {
goto error;
}
- if (ConfigureWinItem(interp, canvas, itemPtr, objc-(Tcl_Size)i, objv+i, 0)
+ if (ConfigureWinItem(interp, canvas, itemPtr, objc - i, objv + i, 0)
== TCL_OK) {
return TCL_OK;
}
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c
index 2ff9ff3..c93baa7 100644
--- a/generic/tkCanvas.c
+++ b/generic/tkCanvas.c
@@ -574,7 +574,7 @@ ItemSelection(
return TCL_INDEX_NONE;
}
- return (Tcl_Size)itemPtr->typePtr->selectionProc((Tk_Canvas) canvasPtr, itemPtr,
+ return itemPtr->typePtr->selectionProc((Tk_Canvas) canvasPtr, itemPtr,
offset, buffer, (int)maxBytes);
}
diff --git a/generic/tkCmds.c b/generic/tkCmds.c
index e953255..1bf7b03 100644
--- a/generic/tkCmds.c
+++ b/generic/tkCmds.c
@@ -401,7 +401,7 @@ Tk_BindtagsObjCmd(
winPtr->numTags = length;
winPtr->tagPtr = (void **)ckalloc(length * sizeof(void *));
- for (i = 0; i < (Tcl_Size)length; i++) {
+ for (i = 0; i < length; i++) {
p = Tcl_GetString(tags[i]);
if (p[0] == '.') {
char *copy;
diff --git a/generic/tkConsole.c b/generic/tkConsole.c
index 88aacd4..734a5ee 100644
--- a/generic/tkConsole.c
+++ b/generic/tkConsole.c
@@ -517,7 +517,7 @@ ConsoleOutput(
* Assumption is utf-8 Tcl_Encoding is reliably present.
*/
- const char *bytes = Tcl_ExternalToUtfDString(utf8, buf, (Tcl_Size)toWrite, &ds);
+ const char *bytes = Tcl_ExternalToUtfDString(utf8, buf, toWrite, &ds);
Tcl_Size numBytes = Tcl_DStringLength(&ds);
Tcl_Obj *cmd = Tcl_NewStringObj("tk::ConsoleOutput", TCL_INDEX_NONE);
diff --git a/generic/tkListbox.c b/generic/tkListbox.c
index 7289228..351bd0c 100644
--- a/generic/tkListbox.c
+++ b/generic/tkListbox.c
@@ -2736,7 +2736,7 @@ GetListboxIndex(
result = TkGetIntForIndex(indexObj, listPtr->nElements - 1, lastOK, &idx);
if (result == TCL_OK) {
- if ((idx != TCL_INDEX_NONE) && (idx > (Tcl_Size)listPtr->nElements)) {
+ if ((idx != TCL_INDEX_NONE) && (idx > listPtr->nElements)) {
idx = listPtr->nElements;
}
*indexPtr = (int)idx;
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index bda1453..99f897b 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -8249,7 +8249,7 @@ CharBboxProc(
CharChunkMeasureChars(chunkPtr, NULL, 0, 0, byteIndex,
chunkPtr->x, -1, 0, xPtr);
- if (byteIndex == (Tcl_Size)ciPtr->numBytes) {
+ if (byteIndex == ciPtr->numBytes) {
/*
* This situation only happens if the last character in a line is a
* space character, in which case it absorbs all of the extra space in
@@ -8258,7 +8258,7 @@ CharBboxProc(
*widthPtr = maxX - *xPtr;
} else if ((ciPtr->chars[byteIndex] == '\t')
- && (byteIndex == (Tcl_Size)ciPtr->numBytes - 1)) {
+ && (byteIndex == ciPtr->numBytes - 1)) {
/*
* The desired character is a tab character that terminates a chunk;
* give it all the space left in the chunk.
diff --git a/generic/tkTextIndex.c b/generic/tkTextIndex.c
index c08c12c..c6d83d1 100644
--- a/generic/tkTextIndex.c
+++ b/generic/tkTextIndex.c
@@ -1125,7 +1125,7 @@ TkTextPrintIndex(
linePtr = TkBTreeNextLine(NULL, linePtr);
segPtr = linePtr->segPtr;
}
- if (numBytes <= (int)segPtr->size) {
+ if (numBytes <= segPtr->size) {
break;
}
if (segPtr->typePtr == &tkTextCharType) {
diff --git a/generic/ttk/ttkPanedwindow.c b/generic/ttk/ttkPanedwindow.c
index 55236b2..4e268d9 100644
--- a/generic/ttk/ttkPanedwindow.c
+++ b/generic/ttk/ttkPanedwindow.c
@@ -838,19 +838,19 @@ static int PanedSashposCommand(
void *recordPtr, Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[])
{
Paned *pw = (Paned *)recordPtr;
- int sashIndex, position = -1;
+ Tcl_WideInt sashIndex, position = -1;
Pane *pane;
if (objc < 3 || objc > 4) {
Tcl_WrongNumArgs(interp, 2,objv, "index ?newpos?");
return TCL_ERROR;
}
- if (Tcl_GetIntFromObj(interp, objv[2], &sashIndex) != TCL_OK) {
+ if (Tcl_GetWideIntFromObj(interp, objv[2], &sashIndex) != TCL_OK) {
return TCL_ERROR;
}
- if (sashIndex < 0 || (Tcl_Size)sashIndex + 1 >= Ttk_NumberContent(pw->paned.mgr)) {
+ if (sashIndex < 0 || sashIndex >= Ttk_NumberContent(pw->paned.mgr) - 1) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "sash index %d out of range", sashIndex));
+ "sash index %" TCL_SIZE_MODIFIER "d out of range", sashIndex));
Tcl_SetErrorCode(interp, "TTK", "PANE", "SASH_INDEX", NULL);
return TCL_ERROR;
}
@@ -863,7 +863,7 @@ static int PanedSashposCommand(
}
/* else -- set new sash position */
- if (Tcl_GetIntFromObj(interp, objv[3], &position) != TCL_OK) {
+ if (Tcl_GetWideIntFromObj(interp, objv[3], &position) != TCL_OK) {
return TCL_ERROR;
}