diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-03-07 16:14:49 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-03-07 16:14:49 (GMT) |
commit | 4c672977fceafa18192e28a6df28b09bbcfc1677 (patch) | |
tree | 13693c3966f001dd7eef3beb3491f40e5d0d078f /generic | |
parent | 6ac942e39dc79361128d9493515537740d1d2011 (diff) | |
parent | 390585bc36d575c11753e5b95e1ab4fe8ea04b3b (diff) | |
download | tk-4c672977fceafa18192e28a6df28b09bbcfc1677.zip tk-4c672977fceafa18192e28a6df28b09bbcfc1677.tar.gz tk-4c672977fceafa18192e28a6df28b09bbcfc1677.tar.bz2 |
Merge 8.7
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkBind.c | 8 | ||||
-rw-r--r-- | generic/tkBusy.c | 8 | ||||
-rw-r--r-- | generic/tkButton.c | 12 | ||||
-rw-r--r-- | generic/tkConsole.c | 6 | ||||
-rw-r--r-- | generic/tkEntry.c | 14 | ||||
-rw-r--r-- | generic/tkFrame.c | 12 | ||||
-rw-r--r-- | generic/tkGrid.c | 57 | ||||
-rw-r--r-- | generic/tkImgListFormat.c | 14 | ||||
-rw-r--r-- | generic/tkListbox.c | 51 | ||||
-rw-r--r-- | generic/tkMenu.c | 4 | ||||
-rw-r--r-- | generic/tkMenubutton.c | 4 | ||||
-rw-r--r-- | generic/tkMessage.c | 4 | ||||
-rw-r--r-- | generic/tkPanedWindow.c | 3 | ||||
-rw-r--r-- | generic/tkScale.c | 4 | ||||
-rw-r--r-- | generic/tkScrollbar.c | 7 | ||||
-rw-r--r-- | generic/tkSquare.c | 3 | ||||
-rw-r--r-- | generic/tkTest.c | 64 | ||||
-rw-r--r-- | generic/ttk/ttkWidget.h | 3 |
18 files changed, 111 insertions, 167 deletions
diff --git a/generic/tkBind.c b/generic/tkBind.c index 2b1caff..a3baa51 100644 --- a/generic/tkBind.c +++ b/generic/tkBind.c @@ -734,7 +734,7 @@ static int GetVirtualEvent(Tcl_Interp *interp, VirtualEventTable *vetPtr, Tcl_Obj *virtName); static Tk_Uid GetVirtualEventUid(Tcl_Interp *interp, char *virtString); static int HandleEventGenerate(Tcl_Interp *interp, Tk_Window main, - int objc, Tcl_Obj *const objv[]); + Tcl_Size objc, Tcl_Obj *const objv[]); static void InitVirtualEventTable(VirtualEventTable *vetPtr); static PatSeq * MatchPatterns(TkDisplay *dispPtr, Tk_BindingTable bindPtr, PSList *psList, PSList *psSuccList, unsigned patIndex, const Event *eventPtr, @@ -3896,7 +3896,7 @@ static int HandleEventGenerate( Tcl_Interp *interp, /* Interp for errors return and name lookup. */ Tk_Window mainWin, /* Main window associated with interp. */ - int objc, /* Number of arguments. */ + Tcl_Size objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { union { XEvent general; XVirtualEvent virt; } event; @@ -3916,7 +3916,7 @@ HandleEventGenerate( unsigned count; unsigned flags; int number; - unsigned i; + Tcl_Size i; static const char *const fieldStrings[] = { "-when", "-above", "-borderwidth", "-button", @@ -4026,7 +4026,7 @@ HandleEventGenerate( warp = 0; pos = TCL_QUEUE_TAIL; - for (i = 2; i < (unsigned) objc; i += 2) { + for (i = 2; i < objc; i += 2) { Tcl_Obj *optionPtr, *valuePtr; #if defined(_MSC_VER) /* Work around MSVC compiler optimization bug, see [d93c8175fd]. */ diff --git a/generic/tkBusy.c b/generic/tkBusy.c index 5825b16..9cac37c 100644 --- a/generic/tkBusy.c +++ b/generic/tkBusy.c @@ -43,7 +43,7 @@ static void BusyGeometryProc(void *clientData, static void BusyCustodyProc(void *clientData, Tk_Window tkwin); static int ConfigureBusy(Tcl_Interp *interp, Busy *busyPtr, - int objc, Tcl_Obj *const objv[]); + Tcl_Size objc, Tcl_Obj *const objv[]); static Busy * CreateBusy(Tcl_Interp *interp, Tk_Window tkRef); static Tcl_FreeProc DestroyBusy; static void DoConfigureNotify(Tk_FakeWin *winPtr); @@ -53,7 +53,7 @@ static Busy * GetBusy(Tcl_Interp *interp, Tcl_Obj *const windowObj); static int HoldBusy(Tcl_HashTable *busyTablePtr, Tcl_Interp *interp, Tcl_Obj *const windowObj, - int configObjc, Tcl_Obj *const configObjv[]); + Tcl_Size configObjc, Tcl_Obj *const configObjv[]); static void MakeTransparentWindowExist(Tk_Window tkwin, Window parent); static inline Tk_Window NextChild(Tk_Window tkwin); @@ -640,7 +640,7 @@ static int ConfigureBusy( Tcl_Interp *interp, Busy *busyPtr, - int objc, + Tcl_Size objc, Tcl_Obj *const objv[]) { Tk_Cursor oldCursor = busyPtr->cursor; @@ -731,7 +731,7 @@ HoldBusy( Tcl_HashTable *busyTablePtr,/* Busy hash table. */ Tcl_Interp *interp, /* Interpreter to report errors to. */ Tcl_Obj *const windowObj, /* Window name. */ - int configObjc, /* Option pairs. */ + Tcl_Size configObjc, /* Option pairs. */ Tcl_Obj *const configObjv[]) { Tk_Window tkwin; diff --git a/generic/tkButton.c b/generic/tkButton.c index 1dec2fe..fce0f0a 100644 --- a/generic/tkButton.c +++ b/generic/tkButton.c @@ -514,7 +514,7 @@ static const enum command map[][8] = { static void ButtonCmdDeletedProc(void *clientData); static int ButtonCreate(void *clientData, - Tcl_Interp *interp, int objc, + Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[], int type); static void ButtonEventProc(void *clientData, XEvent *eventPtr); @@ -533,11 +533,9 @@ static char * ButtonTextVarProc(void *clientData, static char * ButtonVarProc(void *clientData, Tcl_Interp *interp, const char *name1, const char *name2, int flags); -static int ButtonWidgetObjCmd(void *clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); +static Tcl_ObjCmdProc ButtonWidgetObjCmd; static int ConfigureButton(Tcl_Interp *interp, TkButton *butPtr, - int objc, Tcl_Obj *const objv[]); + Tcl_Size objc, Tcl_Obj *const objv[]); static void DestroyButton(TkButton *butPtr); /* @@ -621,7 +619,7 @@ static int ButtonCreate( TCL_UNUSED(void *), /* NULL. */ Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ + Tcl_Size objc, /* Number of arguments. */ Tcl_Obj *const objv[], /* Argument values. */ int type) /* Type of button to create: TYPE_LABEL, * TYPE_BUTTON, TYPE_CHECK_BUTTON, or @@ -1029,7 +1027,7 @@ ConfigureButton( Tcl_Interp *interp, /* Used for error reporting. */ TkButton *butPtr, /* Information about widget; may or may * not already have values for some fields. */ - int objc, /* Number of arguments. */ + Tcl_Size objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument values. */ { Tk_SavedOptions savedOptions; diff --git a/generic/tkConsole.c b/generic/tkConsole.c index ff73d5c..9b8ddf6 100644 --- a/generic/tkConsole.c +++ b/generic/tkConsole.c @@ -51,15 +51,13 @@ static int ConsoleHandle(void *instanceData, int direction, void **handlePtr); static int ConsoleInput(void *instanceData, char *buf, int toRead, int *errorCode); -static int ConsoleObjCmd(void *clientData, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[]); +static Tcl_ObjCmdProc ConsoleObjCmd; static int ConsoleOutput(void *instanceData, const char *buf, int toWrite, int *errorCode); static void ConsoleWatch(void *instanceData, int mask); static void DeleteConsoleInterp(void *clientData); static void InterpDeleteProc(void *clientData, Tcl_Interp *interp); -static int InterpreterObjCmd(void *clientData, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[]); +static Tcl_ObjCmdProc InterpreterObjCmd; /* * This structure describes the channel type structure for file based IO: diff --git a/generic/tkEntry.c b/generic/tkEntry.c index 5bfab16..a07a533 100644 --- a/generic/tkEntry.c +++ b/generic/tkEntry.c @@ -406,7 +406,7 @@ static const char *const selElementNames[] = { */ static int ConfigureEntry(Tcl_Interp *interp, Entry *entryPtr, - int objc, Tcl_Obj *const objv[]); + Tcl_Size objc, Tcl_Obj *const objv[]); static int DeleteChars(Entry *entryPtr, Tcl_Size index, Tcl_Size count); static Tcl_FreeProc DestroyEntry; static void DisplayEntry(void *clientData); @@ -437,9 +437,7 @@ static int EntryValueChanged(Entry *entryPtr, const char *newValue); static void EntryVisibleRange(Entry *entryPtr, double *firstPtr, double *lastPtr); -static int EntryWidgetObjCmd(void *clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); +static Tcl_ObjCmdProc EntryWidgetObjCmd; static void EntryWorldChanged(void *instanceData); static int GetEntryIndex(Tcl_Interp *interp, Entry *entryPtr, Tcl_Obj *indexObj, Tcl_Size *indexPtr); @@ -449,9 +447,7 @@ static int InsertChars(Entry *entryPtr, Tcl_Size index, const char *string); * These forward declarations are the spinbox specific ones: */ -static int SpinboxWidgetObjCmd(void *clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); +static Tcl_ObjCmdProc SpinboxWidgetObjCmd; static int GetSpinboxElement(Spinbox *sbPtr, int x, int y); static int SpinboxInvoke(Tcl_Interp *interp, Spinbox *sbPtr, int element); @@ -1113,7 +1109,7 @@ ConfigureEntry( Tcl_Interp *interp, /* Used for error reporting. */ Entry *entryPtr, /* Information about widget; may or may not * already have values for some fields. */ - int objc, /* Number of valid entries in argv. */ + Tcl_Size objc, /* Number of valid entries in argv. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Tk_SavedOptions savedOptions; @@ -1400,7 +1396,7 @@ ConfigureEntry( } snprintf(sbPtr->formatBuf, formatSpace, sbPtr->valueFormat, dvalue); - /* + /* * No check for error return here as well, because any possible * error will be trapped below when attempting tracing. */ diff --git a/generic/tkFrame.c b/generic/tkFrame.c index 850111e..32f89f2 100644 --- a/generic/tkFrame.c +++ b/generic/tkFrame.c @@ -328,7 +328,7 @@ static const Tk_OptionSpec *const optionSpecs[] = { static void ComputeFrameGeometry(Frame *framePtr); static int ConfigureFrame(Tcl_Interp *interp, Frame *framePtr, - int objc, Tcl_Obj *const objv[]); + Tcl_Size objc, Tcl_Obj *const objv[]); static Tcl_FreeProc DestroyFrame; static void DestroyFramePartly(Frame *framePtr); static void DisplayFrame(void *clientData); @@ -347,9 +347,7 @@ static void FrameRequestProc(void *clientData, Tk_Window tkwin); static void FrameStructureProc(void *clientData, XEvent *eventPtr); -static int FrameWidgetObjCmd(void *clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); +static Tcl_ObjCmdProc FrameWidgetObjCmd; static void FrameWorldChanged(void *instanceData); static void MapFrame(void *clientData); @@ -717,8 +715,8 @@ FrameWidgetObjCmd( }; Frame *framePtr = (Frame *)clientData; int result = TCL_OK, index; - int c, i; - Tcl_Size length; + int c; + Tcl_Size i, length; Tcl_Obj *objPtr; if (objc < 2) { @@ -925,7 +923,7 @@ ConfigureFrame( Tcl_Interp *interp, /* Used for error reporting. */ Frame *framePtr, /* Information about widget; may or may not * already have values for some fields. */ - int objc, /* Number of valid entries in objv. */ + Tcl_Size objc, /* Number of valid entries in objv. */ Tcl_Obj *const objv[]) /* Arguments. */ { Tk_SavedOptions savedOptions; diff --git a/generic/tkGrid.c b/generic/tkGrid.c index bc8f19a..50068b5 100644 --- a/generic/tkGrid.c +++ b/generic/tkGrid.c @@ -255,37 +255,37 @@ typedef struct UniformGroup { static void AdjustForSticky(Gridder *contentPtr, int *xPtr, int *yPtr, int *widthPtr, int *heightPtr); -static int AdjustOffsets(int width, int elements, +static int AdjustOffsets(int width, Tcl_Size elements, SlotInfo *slotPtr); static void ArrangeGrid(void *clientData); -static int CheckSlotData(Gridder *containerPtr, int slot, +static int CheckSlotData(Gridder *containerPtr, Tcl_Size slot, int slotType, int checkOnly); static int ConfigureContent(Tcl_Interp *interp, Tk_Window tkwin, - int objc, Tcl_Obj *const objv[]); + Tcl_Size objc, Tcl_Obj *const objv[]); static Tcl_FreeProc DestroyGrid; static Gridder * GetGrid(Tk_Window tkwin); static int GridAnchorCommand(Tk_Window tkwin, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[]); + Tcl_Size objc, Tcl_Obj *const objv[]); static int GridBboxCommand(Tk_Window tkwin, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[]); + Tcl_Size objc, Tcl_Obj *const objv[]); static int GridForgetRemoveCommand(Tk_Window tkwin, - Tcl_Interp *interp, int objc, + Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[]); static int GridInfoCommand(Tk_Window tkwin, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[]); + Tcl_Size objc, Tcl_Obj *const objv[]); static int GridLocationCommand(Tk_Window tkwin, - Tcl_Interp *interp, int objc, + Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[]); static int GridPropagateCommand(Tk_Window tkwin, - Tcl_Interp *interp, int objc, + Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[]); static int GridRowColumnConfigureCommand(Tk_Window tkwin, - Tcl_Interp *interp, int objc, + Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[]); static int GridSizeCommand(Tk_Window tkwin, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[]); + Tcl_Size objc, Tcl_Obj *const objv[]); static int GridContentCommand(Tk_Window tkwin, Tcl_Interp *interp, - int objc, Tcl_Obj *const objv[]); + Tcl_Size objc, Tcl_Obj *const objv[]); static void GridStructureProc(void *clientData, XEvent *eventPtr); static void GridLostContentProc(void *clientData, @@ -442,7 +442,7 @@ static int GridAnchorCommand( Tk_Window tkwin, /* Main window of the application. */ Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ + Tcl_Size objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Tk_Window container; @@ -511,7 +511,7 @@ static int GridBboxCommand( Tk_Window tkwin, /* Main window of the application. */ Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ + Tcl_Size objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Tk_Window container; @@ -641,12 +641,12 @@ static int GridForgetRemoveCommand( Tk_Window tkwin, /* Main window of the application. */ Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ + Tcl_Size objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Tk_Window content; Gridder *contentPtr; - int i; + Tcl_Size i; const char *string = Tcl_GetString(objv[1]); char c = string[0]; @@ -731,7 +731,7 @@ static int GridInfoCommand( Tk_Window tkwin, /* Main window of the application. */ Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ + Tcl_Size objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Gridder *contentPtr; @@ -793,7 +793,7 @@ static int GridLocationCommand( Tk_Window tkwin, /* Main window of the application. */ Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ + Tcl_Size objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Tk_Window container; @@ -886,7 +886,7 @@ static int GridPropagateCommand( Tk_Window tkwin, /* Main window of the application. */ Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ + Tcl_Size objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Tk_Window container; @@ -974,7 +974,7 @@ static int GridRowColumnConfigureCommand( Tk_Window tkwin, /* Main window of the application. */ Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ + Tcl_Size objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Tk_Window container, content; @@ -986,8 +986,7 @@ GridRowColumnConfigureCommand( Tcl_Size lObjc; /* Number of items in index list */ Tcl_Obj **lObjv; /* array of indices */ int ok; /* temporary TCL result code */ - int i, first, last; - Tcl_Size j; + Tcl_Size i, j, first, last; const char *string; static const char *const optionStrings[] = { "-minsize", "-pad", "-uniform", "-weight", NULL @@ -1308,7 +1307,7 @@ static int GridSizeCommand( Tk_Window tkwin, /* Main window of the application. */ Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ + Tcl_Size objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Tk_Window container; @@ -1359,7 +1358,7 @@ static int GridContentCommand( Tk_Window tkwin, /* Main window of the application. */ Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ + Tcl_Size objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Tk_Window container; @@ -1510,10 +1509,10 @@ GridLostContentProc( static int AdjustOffsets( int size, /* The total layout size (in pixels). */ - int slots, /* Number of slots. */ + Tcl_Size slots, /* Number of slots. */ SlotInfo *slotPtr) /* Pointer to slot array. */ { - int slot; /* Current slot. */ + Tcl_Size slot; /* Current slot. */ int diff; /* Extra pixels needed to add to the layout. */ int totalWeight; /* Sum of the weights for all the slots. */ int weight; /* Sum of the weights so far. */ @@ -2628,11 +2627,11 @@ SetContentRow( static int CheckSlotData( Gridder *containerPtr, /* The geometry container for this grid. */ - int slot, /* Which slot to look at. */ + Tcl_Size slot, /* Which slot to look at. */ int slotType, /* ROW or COLUMN. */ int checkOnly) /* Don't allocate new space if true. */ { - int numSlot; /* Number of slots already allocated (Space) */ + Tcl_Size numSlot; /* Number of slots already allocated (Space) */ int end; /* Last used constraint. */ /* @@ -2954,7 +2953,7 @@ ConfigureContent( Tcl_Interp *interp, /* Interpreter for error reporting. */ Tk_Window tkwin, /* Any window in application containing * content. Used to look up content names. */ - int objc, /* Number of elements in argv. */ + Tcl_Size objc, /* Number of elements in argv. */ Tcl_Obj *const objv[]) /* Argument objects: contains one or more * window names followed by any number of * "option value" pairs. Caller must make sure diff --git a/generic/tkImgListFormat.c b/generic/tkImgListFormat.c index 0fc9641..2c3405e 100644 --- a/generic/tkImgListFormat.c +++ b/generic/tkImgListFormat.c @@ -121,7 +121,7 @@ static const char *const formatOptionNames[] = { */ static int ParseFormatOptions(Tcl_Interp *interp, int allowedOptions, - int objc, Tcl_Obj *const objv[], int *indexPtr, + Tcl_Size objc, Tcl_Obj *const objv[], Tcl_Size *indexPtr, struct FormatOptions *optPtr); static Tcl_Obj *GetBadOptMsg(const char *badValue, int allowedOpts); static int StringMatchDef(Tcl_Obj *data, Tcl_Obj *formatString, @@ -190,16 +190,17 @@ ParseFormatOptions( Tcl_Interp *interp, /* For error messages */ int allowedOptions, /* Bitfield specifying which options are * to be considered allowed */ - int objc, /* Number of elements in argv[] */ + Tcl_Size objc, /* Number of elements in argv[] */ Tcl_Obj *const objv[], /* The arguments to parse */ - int *indexPtr, /* Index giving the first element to + Tcl_Size *indexPtr, /* Index giving the first element to * parse. The value is updated to the * index where parsing ended */ struct FormatOptions *optPtr) /* Parsed option values are written to * this struct */ { - int index, optIndex, first, typeIndex; + Tcl_Size optIndex, index; + int first, typeIndex; const char *option; first = 1; @@ -477,7 +478,7 @@ StringReadDef( Display *display; Colormap colormap; struct FormatOptions opts; - int optIndex; + Tcl_Size optIndex; /* * Parse format suboptions @@ -627,8 +628,7 @@ StringWriteDef( { int greenOffset, blueOffset, alphaOffset, hasAlpha; Tcl_Obj *result, **objv = NULL; - Tcl_Size objc; - int allowedOpts, optIndex; + Tcl_Size objc, allowedOpts, optIndex; struct FormatOptions opts; /* diff --git a/generic/tkListbox.c b/generic/tkListbox.c index d1dbd1c..4a2ea5f 100644 --- a/generic/tkListbox.c +++ b/generic/tkListbox.c @@ -386,7 +386,7 @@ static int ConfigureListbox(Tcl_Interp *interp, Listbox *listPtr, Tcl_Size objc, Tcl_Obj *const objv[]); static int ConfigureListboxItem(Tcl_Interp *interp, Listbox *listPtr, ItemAttr *attrs, Tcl_Size objc, - Tcl_Obj *const objv[], int index); + Tcl_Obj *const objv[], Tcl_Size index); static int ListboxDeleteSubCmd(Listbox *listPtr, int first, int last); static Tcl_FreeProc DestroyListbox; @@ -394,9 +394,9 @@ static void DestroyListboxOptionTables(void *clientData, Tcl_Interp *interp); static void DisplayListbox(void *clientData); static int GetListboxIndex(Tcl_Interp *interp, Listbox *listPtr, - Tcl_Obj *index, int endIsSize, int *indexPtr); + Tcl_Obj *index, int endIsSize, Tcl_Size *indexPtr); static int ListboxInsertSubCmd(Listbox *listPtr, - int index, Tcl_Size objc, Tcl_Obj *const objv[]); + Tcl_Size index, Tcl_Size objc, Tcl_Obj *const objv[]); static void ListboxCmdDeletedProc(void *clientData); static void ListboxComputeGeometry(Listbox *listPtr, int fontChanged, int maxIsStale, int updateGrid); @@ -413,9 +413,7 @@ static int ListboxSelect(Listbox *listPtr, int first, int last, int select); static void ListboxUpdateHScrollbar(Listbox *listPtr); static void ListboxUpdateVScrollbar(Listbox *listPtr); -static int ListboxWidgetObjCmd(void *clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); +static Tcl_ObjCmdProc ListboxWidgetObjCmd; static int ListboxBboxSubCmd(Tcl_Interp *interp, Listbox *listPtr, int index); static int ListboxSelectionSubCmd(Tcl_Interp *interp, @@ -432,7 +430,7 @@ static char * ListboxListVarProc(void *clientData, Tcl_Interp *interp, const char *name1, const char *name2, int flags); static void MigrateHashEntries(Tcl_HashTable *table, - int first, int last, int offset); + Tcl_Size first, Tcl_Size last, Tcl_Size offset); static int GetMaxOffset(Listbox *listPtr); /* @@ -601,7 +599,8 @@ ListboxWidgetObjCmd( Tcl_Obj *const objv[]) /* Arguments as Tcl_Obj's. */ { Listbox *listPtr = (Listbox *)clientData; - int cmdIndex, index; + int cmdIndex; + Tcl_Size index; int result = TCL_OK; Tcl_Obj *objPtr; @@ -643,7 +642,7 @@ ListboxWidgetObjCmd( break; } - if (index >= (int)listPtr->nElements) { + if (index >= listPtr->nElements) { index = listPtr->nElements-1; } if (index < 0) { @@ -730,7 +729,7 @@ ListboxWidgetObjCmd( } case COMMAND_DELETE: { - int first, last; + Tcl_Size first, last; if ((objc < 3) || (objc > 4)) { Tcl_WrongNumArgs(interp, 2, objv, "firstIndex ?lastIndex?"); @@ -772,8 +771,7 @@ ListboxWidgetObjCmd( } case COMMAND_GET: { - int first, last; - Tcl_Size listLen; + Tcl_Size listLen, first, last; Tcl_Obj **elemPtrs; if (objc != 3 && objc != 4) { @@ -1157,7 +1155,8 @@ ListboxSelectionSubCmd( Tcl_Size objc, /* Number of arguments in the objv array */ Tcl_Obj *const objv[]) /* Array of arguments to the procedure */ { - int selCmdIndex, first, last; + int selCmdIndex; + Tcl_Size first, last; int result = TCL_OK; if (objc != 4 && objc != 5) { @@ -1325,7 +1324,8 @@ ListboxYviewSubCmd( Tcl_Size objc, /* Number of arguments in the objv array */ Tcl_Obj *const objv[]) /* Array of arguments to the procedure */ { - int index, count; + Tcl_Size index; + int count; double fraction; if (objc == 2) { @@ -1354,7 +1354,7 @@ ListboxYviewSubCmd( } else { switch (Tk_GetScrollInfoObj(interp, objc, objv, &fraction, &count)) { case TK_SCROLL_MOVETO: - index = (int) (listPtr->nElements*fraction + 0.5); + index = (Tcl_Size)(listPtr->nElements*fraction + 0.5); break; case TK_SCROLL_PAGES: if (listPtr->fullLines > 2) { @@ -1718,7 +1718,7 @@ ConfigureListboxItem( ItemAttr *attrs, /* Information about the item to configure */ Tcl_Size objc, /* Number of valid entries in argv. */ Tcl_Obj *const objv[], /* Arguments. */ - int index) /* Index of the listbox item being configure */ + Tcl_Size index) /* Index of the listbox item being configure */ { Tk_SavedOptions savedOptions; @@ -2318,7 +2318,7 @@ ListboxComputeGeometry( static int ListboxInsertSubCmd( Listbox *listPtr, /* Listbox that is to get the new elements. */ - int index, /* Add the new elements before this + Tcl_Size index, /* Add the new elements before this * element. */ Tcl_Size objc, /* Number of new elements to add. */ Tcl_Obj *const objv[]) /* New elements (one per entry). */ @@ -2728,10 +2728,10 @@ GetListboxIndex( int lastOK, /* If 1, "end" refers to the number of entries * in the listbox. If 0, "end" refers to 1 * less than the number of entries. */ - int *indexPtr) /* Where to store converted index. */ + Tcl_Size *indexPtr) /* Where to store converted index. */ { - int result, index; - Tcl_Size idx; + int result; + Tcl_Size idx, index; char *stringRep; result = TkGetIntForIndex(indexObj, listPtr->nElements - 1, lastOK, &idx); @@ -2739,7 +2739,7 @@ GetListboxIndex( if ((idx != TCL_INDEX_NONE) && (idx > listPtr->nElements)) { idx = listPtr->nElements; } - *indexPtr = (int)idx; + *indexPtr = idx; return TCL_OK; } @@ -3585,11 +3585,12 @@ ListboxListVarProc( static void MigrateHashEntries( Tcl_HashTable *table, - int first, - int last, - int offset) + Tcl_Size first, + Tcl_Size last, + Tcl_Size offset) { - int i, isNew; + Tcl_Size i; + int isNew; Tcl_HashEntry *entry; void *clientData; diff --git a/generic/tkMenu.c b/generic/tkMenu.c index 6c9b89b..a0cee25 100644 --- a/generic/tkMenu.c +++ b/generic/tkMenu.c @@ -349,9 +349,7 @@ static TkMenuEntry * MenuNewEntry(TkMenu *menuPtr, Tcl_Size index, int type); static char * MenuVarProc(void *clientData, Tcl_Interp *interp, const char *name1, const char *name2, int flags); -static int MenuWidgetObjCmd(void *clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); +static Tcl_ObjCmdProc MenuWidgetObjCmd; static void MenuWorldChanged(void *instanceData); static int PostProcessEntry(TkMenuEntry *mePtr); static void RecursivelyDeleteMenu(TkMenu *menuPtr); diff --git a/generic/tkMenubutton.c b/generic/tkMenubutton.c index 4b12724..3f1f4e7 100644 --- a/generic/tkMenubutton.c +++ b/generic/tkMenubutton.c @@ -164,9 +164,7 @@ static void MenuButtonImageProc(void *clientData, static char * MenuButtonTextVarProc(void *clientData, Tcl_Interp *interp, const char *name1, const char *name2, int flags); -static int MenuButtonWidgetObjCmd(void *clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); +static Tcl_ObjCmdProc MenuButtonWidgetObjCmd; static int ConfigureMenuButton(Tcl_Interp *interp, TkMenuButton *mbPtr, int objc, Tcl_Obj *const objv[]); diff --git a/generic/tkMessage.c b/generic/tkMessage.c index 00170bc..2d2f73e 100644 --- a/generic/tkMessage.c +++ b/generic/tkMessage.c @@ -178,9 +178,7 @@ static void MessageEventProc(void *clientData, static char * MessageTextVarProc(void *clientData, Tcl_Interp *interp, const char *name1, const char *name2, int flags); -static int MessageWidgetObjCmd(void *clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); +static Tcl_ObjCmdProc MessageWidgetObjCmd; static void MessageWorldChanged(void *instanceData); static void ComputeMessageGeometry(Message *msgPtr); static int ConfigureMessage(Tcl_Interp *interp, Message *msgPtr, diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c index c83d100..d7f2d45 100644 --- a/generic/tkPanedWindow.c +++ b/generic/tkPanedWindow.c @@ -183,9 +183,6 @@ typedef struct PanedWindow { * Forward declarations for functions defined later in this file: */ -int Tk_PanedWindowObjCmd(void *clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); static void PanedWindowCmdDeletedProc(void *clientData); static int ConfigurePanedWindow(Tcl_Interp *interp, PanedWindow *pwPtr, int objc, diff --git a/generic/tkScale.c b/generic/tkScale.c index 9748b2a..eeda9cd 100644 --- a/generic/tkScale.c +++ b/generic/tkScale.c @@ -161,9 +161,7 @@ static void ScaleEventProc(void *clientData, static char * ScaleVarProc(void *clientData, Tcl_Interp *interp, const char *name1, const char *name2, int flags); -static int ScaleWidgetObjCmd(void *clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); +static Tcl_ObjCmdProc ScaleWidgetObjCmd; static void ScaleWorldChanged(void *instanceData); static void ScaleSetVariable(TkScale *scalePtr); diff --git a/generic/tkScrollbar.c b/generic/tkScrollbar.c index f21af6e..f0abe18 100644 --- a/generic/tkScrollbar.c +++ b/generic/tkScrollbar.c @@ -97,11 +97,10 @@ static const Tk_ConfigSpec configSpecs[] = { */ static int ConfigureScrollbar(Tcl_Interp *interp, - TkScrollbar *scrollPtr, int objc, + TkScrollbar *scrollPtr, Tcl_Size objc, Tcl_Obj *const objv[], int flags); static void ScrollbarCmdDeletedProc(void *clientData); -static int ScrollbarWidgetObjCmd(void *clientData, - Tcl_Interp *, int objc, Tcl_Obj *const objv[]); +static Tcl_ObjCmdProc ScrollbarWidgetObjCmd; /* *-------------------------------------------------------------- @@ -469,7 +468,7 @@ ConfigureScrollbar( TkScrollbar *scrollPtr, /* Information about widget; may or may not * already have values for some fields. */ - int objc, /* Number of valid entries in argv. */ + Tcl_Size objc, /* Number of valid entries in argv. */ Tcl_Obj *const objv[], /* Arguments. */ int flags) /* Flags to pass to Tk_ConfigureWidget. */ { diff --git a/generic/tkSquare.c b/generic/tkSquare.c index 7cec51b..3ba32b5 100644 --- a/generic/tkSquare.c +++ b/generic/tkSquare.c @@ -103,8 +103,7 @@ static void SquareDisplay(void *clientData); static void KeepInWindow(Square *squarePtr); static void SquareObjEventProc(void *clientData, XEvent *eventPtr); -static int SquareWidgetObjCmd(void *clientData, - Tcl_Interp *, int objc, Tcl_Obj * const objv[]); +static Tcl_ObjCmdProc SquareWidgetObjCmd; /* *-------------------------------------------------------------- diff --git a/generic/tkTest.c b/generic/tkTest.c index 85e0495..6b4536e 100644 --- a/generic/tkTest.c +++ b/generic/tkTest.c @@ -155,67 +155,35 @@ typedef struct TrivialCommandHeader { * Forward declarations for functions defined later in this file: */ -static int ImageObjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj * const objv[]); -static int TestbitmapObjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj * const objv[]); -static int TestborderObjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj * const objv[]); -static int TestcolorObjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj * const objv[]); -static int TestcursorObjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj * const objv[]); -static int TestdeleteappsObjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj * const objv[]); -static int TestfontObjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); -static int TestmakeexistObjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); +static Tcl_ObjCmdProc ImageObjCmd; +static Tcl_ObjCmdProc TestbitmapObjCmd; +static Tcl_ObjCmdProc TestborderObjCmd; +static Tcl_ObjCmdProc TestcolorObjCmd; +static Tcl_ObjCmdProc TestcursorObjCmd; +static Tcl_ObjCmdProc TestdeleteappsObjCmd; +static Tcl_ObjCmdProc TestfontObjCmd; +static Tcl_ObjCmdProc TestmakeexistObjCmd; #if !(defined(_WIN32) || defined(MAC_OSX_TK) || defined(__CYGWIN__)) -static int TestmenubarObjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); +static Tcl_ObjCmdProc TestmenubarObjCmd; #endif #if defined(_WIN32) -static int TestmetricsObjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj * const objv[]); +static Tcl_ObjCmdProc TestmetricsObjCmd; #endif -static int TestobjconfigObjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj * const objv[]); +static Tcl_ObjCmdProc TestobjconfigObjCmd; static Tk_CustomOptionSetProc CustomOptionSet; static Tk_CustomOptionGetProc CustomOptionGet; static Tk_CustomOptionRestoreProc CustomOptionRestore; static Tk_CustomOptionFreeProc CustomOptionFree; -static int TestpropObjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj * const objv[]); -static int TestprintfObjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj * const objv[]); +static Tcl_ObjCmdProc TestpropObjCmd; +static Tcl_ObjCmdProc TestprintfObjCmd; #if !(defined(_WIN32) || defined(MAC_OSX_TK) || defined(__CYGWIN__)) -static int TestwrapperObjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj * const objv[]); +static Tcl_ObjCmdProc TestwrapperObjCmd; #endif static void TrivialCmdDeletedProc(void *clientData); -static int TrivialConfigObjCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj * const objv[]); +static Tcl_ObjCmdProc TrivialConfigObjCmd; static void TrivialEventProc(void *clientData, XEvent *eventPtr); -static int TestPhotoStringMatchCmd(void *dummy, - Tcl_Interp *interp, int objc, - Tcl_Obj * const objv[]); +static Tcl_ObjCmdProc TestPhotoStringMatchCmd; /* *---------------------------------------------------------------------- diff --git a/generic/ttk/ttkWidget.h b/generic/ttk/ttkWidget.h index 6f8d5b0..3f20426 100644 --- a/generic/ttk/ttkWidget.h +++ b/generic/ttk/ttkWidget.h @@ -104,8 +104,7 @@ MODULE_SCOPE int TtkWidgetStyleCommand( /* Widget constructor: */ -MODULE_SCOPE int TtkWidgetConstructorObjCmd( - void *, Tcl_Interp*, Tcl_Size, Tcl_Obj*const[]); +MODULE_SCOPE Tcl_ObjCmdProc2 TtkWidgetConstructorObjCmd; #if TCL_MAJOR_VERSION > 8 #define RegisterWidget(interp, name, specPtr) \ |