diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-07-05 19:36:53 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-07-05 19:36:53 (GMT) |
commit | f8f63d6b16b29c35d6febba81b8ce7e51bd4e5c1 (patch) | |
tree | f2d89949d203cf953ba25b26c93d71c801f274e7 /generic | |
parent | bd001f42a46c6e72db96a45868fbdd1fdc1e35d7 (diff) | |
parent | 3fe4f63c26be0650aeed25a7d04ee4bf3a2ca40c (diff) | |
download | tk-f8f63d6b16b29c35d6febba81b8ce7e51bd4e5c1.zip tk-f8f63d6b16b29c35d6febba81b8ce7e51bd4e5c1.tar.gz tk-f8f63d6b16b29c35d6febba81b8ce7e51bd4e5c1.tar.bz2 |
Merge 8.7
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tk.h | 6 | ||||
-rw-r--r-- | generic/tkCanvImg.c | 10 | ||||
-rw-r--r-- | generic/tkCanvLine.c | 2 | ||||
-rw-r--r-- | generic/tkCanvText.c | 4 | ||||
-rw-r--r-- | generic/tkCanvUtil.c | 6 | ||||
-rw-r--r-- | generic/tkCanvas.c | 40 | ||||
-rw-r--r-- | generic/tkFrame.c | 2 | ||||
-rw-r--r-- | generic/tkImgBmap.c | 12 | ||||
-rw-r--r-- | generic/tkInt.h | 2 | ||||
-rw-r--r-- | generic/tkTest.c | 2 |
10 files changed, 43 insertions, 43 deletions
diff --git a/generic/tk.h b/generic/tk.h index 75bf6d7..dd82f64 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -1067,12 +1067,12 @@ typedef int (Tk_ItemIndexProc)(Tcl_Interp *interp, Tk_Canvas canvas, Tk_Item *itemPtr, char *indexString, int *indexPtr); #else typedef int (Tk_ItemCreateProc)(Tcl_Interp *interp, Tk_Canvas canvas, - Tk_Item *itemPtr, int argc, Tcl_Obj *const objv[]); + Tk_Item *itemPtr, int objc, Tcl_Obj *const objv[]); typedef int (Tk_ItemConfigureProc)(Tcl_Interp *interp, Tk_Canvas canvas, - Tk_Item *itemPtr, int argc, Tcl_Obj *const objv[], + Tk_Item *itemPtr, int objc, Tcl_Obj *const objv[], int flags); typedef int (Tk_ItemCoordProc)(Tcl_Interp *interp, Tk_Canvas canvas, - Tk_Item *itemPtr, int argc, Tcl_Obj *const argv[]); + Tk_Item *itemPtr, int objc, Tcl_Obj *const objv[]); #if TCL_MAJOR_VERSION > 8 typedef void (Tk_ItemInsertProc)(Tk_Canvas canvas, Tk_Item *itemPtr, size_t beforeThis, Tcl_Obj *string); diff --git a/generic/tkCanvImg.c b/generic/tkCanvImg.c index 16b8345..5cb26e5 100644 --- a/generic/tkCanvImg.c +++ b/generic/tkCanvImg.c @@ -74,8 +74,8 @@ static void ImageChangedProc(ClientData clientData, int x, int y, int width, int height, int imgWidth, int imgHeight); static int ImageCoords(Tcl_Interp *interp, - Tk_Canvas canvas, Tk_Item *itemPtr, int argc, - Tcl_Obj *const argv[]); + Tk_Canvas canvas, Tk_Item *itemPtr, int objc, + Tcl_Obj *const objv[]); static int ImageToArea(Tk_Canvas canvas, Tk_Item *itemPtr, double *rectPtr); static double ImageToPoint(Tk_Canvas canvas, @@ -84,11 +84,11 @@ static int ImageToPostscript(Tcl_Interp *interp, Tk_Canvas canvas, Tk_Item *itemPtr, int prepass); static void ComputeImageBbox(Tk_Canvas canvas, ImageItem *imgPtr); static int ConfigureImage(Tcl_Interp *interp, - Tk_Canvas canvas, Tk_Item *itemPtr, int argc, - Tcl_Obj *const argv[], int flags); + Tk_Canvas canvas, Tk_Item *itemPtr, int objc, + Tcl_Obj *const objv[], int flags); static int CreateImage(Tcl_Interp *interp, Tk_Canvas canvas, struct Tk_Item *itemPtr, - int argc, Tcl_Obj *const argv[]); + int objc, Tcl_Obj *const objv[]); static void DeleteImage(Tk_Canvas canvas, Tk_Item *itemPtr, Display *display); static void DisplayImage(Tk_Canvas canvas, diff --git a/generic/tkCanvLine.c b/generic/tkCanvLine.c index 69e5551..987040e 100644 --- a/generic/tkCanvLine.c +++ b/generic/tkCanvLine.c @@ -2059,7 +2059,7 @@ ParseArrowShape( { LineItem *linePtr = (LineItem *) recordPtr; double a, b, c; - int argc; + TkSizeT argc; const char **argv = NULL; if ((size_t)offset != offsetof(LineItem, arrowShapeA)) { diff --git a/generic/tkCanvText.c b/generic/tkCanvText.c index 878d267..db19aef 100644 --- a/generic/tkCanvText.c +++ b/generic/tkCanvText.c @@ -229,7 +229,7 @@ static int ConfigureText(Tcl_Interp *interp, Tcl_Obj *const objv[], int flags); static int CreateText(Tcl_Interp *interp, Tk_Canvas canvas, struct Tk_Item *itemPtr, - int argc, Tcl_Obj *const objv[]); + int objc, Tcl_Obj *const objv[]); static void DeleteText(Tk_Canvas canvas, Tk_Item *itemPtr, Display *display); static void DisplayCanvText(Tk_Canvas canvas, @@ -248,7 +248,7 @@ static void SetTextCursor(Tk_Canvas canvas, Tk_Item *itemPtr, TkSizeT index); static int TextCoords(Tcl_Interp *interp, Tk_Canvas canvas, Tk_Item *itemPtr, - int argc, Tcl_Obj *const objv[]); + int objc, Tcl_Obj *const objv[]); static void TextDeleteChars(Tk_Canvas canvas, Tk_Item *itemPtr, TkSizeT first, TkSizeT last); static void TextInsert(Tk_Canvas canvas, diff --git a/generic/tkCanvUtil.c b/generic/tkCanvUtil.c index 121bfe8..99f9072 100644 --- a/generic/tkCanvUtil.c +++ b/generic/tkCanvUtil.c @@ -411,7 +411,7 @@ TkCanvasTagsParseProc( TkSizeT offset) /* Offset into item (ignored). */ { Tk_Item *itemPtr = (Tk_Item *) widgRec; - int argc, i; + TkSizeT argc, i; const char **argv; Tk_Uid *newPtr; (void)dummy; @@ -430,9 +430,9 @@ TkCanvasTagsParseProc( * Make sure that there's enough space in the item to hold the tag names. */ - if ((int)itemPtr->tagSpace < argc) { + if (itemPtr->tagSpace < argc) { newPtr = (Tk_Uid *)ckalloc(argc * sizeof(Tk_Uid)); - for (i = (int)itemPtr->numTags - 1; i >= 0; i--) { + for (i = itemPtr->numTags - 1; i != TCL_INDEX_NONE; i--) { newPtr[i] = itemPtr->tagPtr[i]; } if (itemPtr->tagPtr != itemPtr->staticTagSpace) { diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c index 12939e6..05c77a9 100644 --- a/generic/tkCanvas.c +++ b/generic/tkCanvas.c @@ -234,12 +234,12 @@ static void CanvasSetOrigin(TkCanvas *canvasPtr, int xOrigin, int yOrigin); static void CanvasUpdateScrollbars(TkCanvas *canvasPtr); static int CanvasWidgetCmd(void *clientData, - Tcl_Interp *interp, int argc, - Tcl_Obj *const *argv); + Tcl_Interp *interp, int objc, + Tcl_Obj *const *objv); static void CanvasWorldChanged(void *instanceData); static int ConfigureCanvas(Tcl_Interp *interp, - TkCanvas *canvasPtr, int argc, - Tcl_Obj *const *argv, int flags); + TkCanvas *canvasPtr, int objc, + Tcl_Obj *const *objv, int flags); static void DefaultRotateImplementation(TkCanvas *canvasPtr, Tk_Item *itemPtr, double x, double y, double angleRadians); @@ -251,13 +251,13 @@ static void DoItem(Tcl_Obj *accumObj, static void EventuallyRedrawItem(TkCanvas *canvasPtr, Tk_Item *itemPtr); static int FindItems(Tcl_Interp *interp, TkCanvas *canvasPtr, - int argc, Tcl_Obj *const *argv, + int objc, Tcl_Obj *const *objv, Tcl_Obj *newTagObj, int first, TagSearch **searchPtrPtr); static int FindArea(Tcl_Interp *interp, TkCanvas *canvasPtr, - Tcl_Obj *const *argv, Tk_Uid uid, int enclosed); + Tcl_Obj *const *objv, Tk_Uid uid, int enclosed); static double GridAlign(double coord, double spacing); -static const char** TkGetStringsFromObjs(int argc, Tcl_Obj *const *objv); +static const char** TkGetStringsFromObjs(int objc, Tcl_Obj *const *objv); static void InitCanvas(void); static void PickCurrentItem(TkCanvas *canvasPtr, XEvent *eventPtr); static Tcl_Obj * ScrollFractions(int screen1, @@ -681,8 +681,8 @@ int Tk_CanvasObjCmd( void *clientData, /* Main window associated with interpreter. */ Tcl_Interp *interp, /* Current interpreter. */ - int argc, /* Number of arguments. */ - Tcl_Obj *const argv[]) /* Argument objects. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { Tk_Window tkwin = (Tk_Window)clientData; TkCanvas *canvasPtr; @@ -692,12 +692,12 @@ Tk_CanvasObjCmd( InitCanvas(); } - if (argc < 2) { - Tcl_WrongNumArgs(interp, 1, argv, "pathName ?-option value ...?"); + if (objc < 2) { + Tcl_WrongNumArgs(interp, 1, objv, "pathName ?-option value ...?"); return TCL_ERROR; } - newWin = Tk_CreateWindowFromPath(interp,tkwin,Tcl_GetString(argv[1]),NULL); + newWin = Tk_CreateWindowFromPath(interp,tkwin,Tcl_GetString(objv[1]),NULL); if (newWin == NULL) { return TCL_ERROR; } @@ -795,7 +795,7 @@ Tk_CanvasObjCmd( CanvasBindProc, canvasPtr); Tk_CreateSelHandler(canvasPtr->tkwin, XA_PRIMARY, XA_STRING, CanvasFetchSelection, canvasPtr, XA_STRING); - if (ConfigureCanvas(interp, canvasPtr, argc-2, argv+2, 0) != TCL_OK) { + if (ConfigureCanvas(interp, canvasPtr, objc-2, objv+2, 0) != TCL_OK) { goto error; } @@ -1442,7 +1442,7 @@ CanvasWidgetCmd( } case CANV_DTAG: { Tk_Uid tag; - int i; + TkSizeT i; if ((objc != 3) && (objc != 4)) { Tcl_WrongNumArgs(interp, 2, objv, "tagOrId ?tagToDelete?"); @@ -1455,7 +1455,7 @@ CanvasWidgetCmd( tag = Tk_GetUid(Tcl_GetString(objv[2])); } FOR_EVERY_CANVAS_ITEM_MATCHING(objv[2], &searchPtr, goto done) { - for (i = (int)itemPtr->numTags-1; i >= 0; i--) { + for (i = itemPtr->numTags-1; i != TCL_INDEX_NONE; i--) { if (itemPtr->tagPtr[i] == tag) { /* @@ -1927,7 +1927,7 @@ CanvasWidgetCmd( } else if (Tcl_GetIndexFromObj(interp, objv[2], optionStrings, "scan option", 0, &idx) != TCL_OK) { result = TCL_ERROR; - } else if ((objc != 5) && (objc != 6-idx)) { + } else if ((objc != 5) && (objc + idx != 6)) { Tcl_WrongNumArgs(interp, 3, objv, idx?"x y":"x y ?gain?"); result = TCL_ERROR; } else if ((Tcl_GetIntFromObj(interp, objv[3], &x) != TCL_OK) @@ -5314,7 +5314,7 @@ PickCurrentItem( && !(canvasPtr->flags & LEFT_GRABBED_ITEM)) { XEvent event; Tk_Item *itemPtr = canvasPtr->currentItemPtr; - int i; + TkSizeT i; event = canvasPtr->pickEvent; event.type = LeaveNotify; @@ -5336,7 +5336,7 @@ PickCurrentItem( */ if ((itemPtr == canvasPtr->currentItemPtr) && !buttonDown) { - for (i = (int)itemPtr->numTags-1; i >= 0; i--) { + for (i = itemPtr->numTags-1; i != TCL_INDEX_NONE; i--) { if (itemPtr->tagPtr[i] == searchUids->currentUid) /* then */ { memmove((void *)(itemPtr->tagPtr + i), @@ -5472,7 +5472,7 @@ CanvasDoEvent( #define NUM_STATIC 3 void *staticObjects[NUM_STATIC]; void **objectPtr; - int numObjects, i; + TkSizeT numObjects, i; Tk_Item *itemPtr; TagSearchExpr *expr; int numExprs; @@ -5524,7 +5524,7 @@ CanvasDoEvent( objectPtr = (void **)ckalloc(numObjects * sizeof(void *)); } objectPtr[0] = (char *)searchUids->allUid; - for (i = (int)itemPtr->numTags - 1; i >= 0; i--) { + for (i = itemPtr->numTags - 1; i != TCL_INDEX_NONE; i--) { objectPtr[i+1] = (char *)itemPtr->tagPtr[i]; } objectPtr[itemPtr->numTags + 1] = itemPtr; diff --git a/generic/tkFrame.c b/generic/tkFrame.c index e84b2b6..0e44db0 100644 --- a/generic/tkFrame.c +++ b/generic/tkFrame.c @@ -330,7 +330,7 @@ static void ComputeFrameGeometry(Frame *framePtr); static int ConfigureFrame(Tcl_Interp *interp, Frame *framePtr, int objc, Tcl_Obj *const objv[]); static int CreateFrame(ClientData clientData, Tcl_Interp *interp, - int objc, Tcl_Obj *const argv[], + int objc, Tcl_Obj *const objv[], enum FrameType type, const char *appName); static void DestroyFrame(void *memPtr); static void DestroyFramePartly(Frame *framePtr); diff --git a/generic/tkImgBmap.c b/generic/tkImgBmap.c index 023c14b..be0fb36 100644 --- a/generic/tkImgBmap.c +++ b/generic/tkImgBmap.c @@ -75,7 +75,7 @@ typedef struct BitmapInstance { static int GetByte(Tcl_Channel chan); static int ImgBmapCreate(Tcl_Interp *interp, - const char *name, int argc, Tcl_Obj *const objv[], + const char *name, int objc, Tcl_Obj *const objv[], const Tk_ImageType *typePtr, Tk_ImageModel model, ClientData *clientDataPtr); static ClientData ImgBmapGet(Tk_Window tkwin, ClientData clientData); @@ -146,11 +146,11 @@ typedef struct ParseInfo { */ static int ImgBmapCmd(ClientData clientData, Tcl_Interp *interp, - int argc, Tcl_Obj *const objv[]); + int objc, Tcl_Obj *const objv[]); static void ImgBmapCmdDeletedProc(ClientData clientData); static void ImgBmapConfigureInstance(BitmapInstance *instancePtr); static int ImgBmapConfigureModel(BitmapModel *modelPtr, - int argc, Tcl_Obj *const objv[], int flags); + int objc, Tcl_Obj *const objv[], int flags); static int NextBitmapWord(ParseInfo *parseInfoPtr); /* @@ -174,8 +174,8 @@ ImgBmapCreate( Tcl_Interp *interp, /* Interpreter for application containing * image. */ const char *name, /* Name to use for image. */ - int argc, /* Number of arguments. */ - Tcl_Obj *const argv[], /* Argument objects for options (doesn't + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[], /* Argument objects for options (doesn't * include image name or type). */ const Tk_ImageType *typePtr,/* Pointer to our type record (not used). */ Tk_ImageModel model, /* Token for image, to be used by us in later @@ -200,7 +200,7 @@ ImgBmapCreate( modelPtr->maskFileString = NULL; modelPtr->maskDataString = NULL; modelPtr->instancePtr = NULL; - if (ImgBmapConfigureModel(modelPtr, argc, argv, 0) != TCL_OK) { + if (ImgBmapConfigureModel(modelPtr, objc, objv, 0) != TCL_OK) { ImgBmapDelete(modelPtr); return TCL_ERROR; } diff --git a/generic/tkInt.h b/generic/tkInt.h index 5d69236..26ac342 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -1337,7 +1337,7 @@ MODULE_SCOPE void TkFreeGeometryContainer(Tk_Window tkwin, MODULE_SCOPE void TkEventInit(void); MODULE_SCOPE void TkRegisterObjTypes(void); MODULE_SCOPE int TkDeadAppObjCmd(ClientData clientData, - Tcl_Interp *interp, int objc, Tcl_Obj *const argv[]); + Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); MODULE_SCOPE int TkCanvasGetCoordObj(Tcl_Interp *interp, Tk_Canvas canvas, Tcl_Obj *obj, double *doublePtr); diff --git a/generic/tkTest.c b/generic/tkTest.c index e566777..3f32105 100644 --- a/generic/tkTest.c +++ b/generic/tkTest.c @@ -87,7 +87,7 @@ typedef struct TImageInstance { */ static int ImageCreate(Tcl_Interp *interp, - const char *name, int argc, Tcl_Obj *const objv[], + const char *name, int objc, Tcl_Obj *const objv[], const Tk_ImageType *typePtr, Tk_ImageModel model, ClientData *clientDataPtr); static ClientData ImageGet(Tk_Window tkwin, ClientData clientData); |