diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-03-23 13:52:05 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-03-23 13:52:05 (GMT) |
commit | cb689d388a07704cc34424caf91ff48bf6a3953b (patch) | |
tree | 3d5a0bd2757831e42bf7c5848f145d40471f6767 | |
parent | 911e6945bdebb097f23426a01310bbd85891167a (diff) | |
download | tk-cb689d388a07704cc34424caf91ff48bf6a3953b.zip tk-cb689d388a07704cc34424caf91ff48bf6a3953b.tar.gz tk-cb689d388a07704cc34424caf91ff48bf6a3953b.tar.bz2 |
Eliminate "register" keyword. Use more TCL_UNUSED()
-rw-r--r-- | generic/tkArgv.c | 6 | ||||
-rw-r--r-- | generic/tkButton.c | 10 | ||||
-rw-r--r-- | generic/tkCanvUtil.c | 10 | ||||
-rw-r--r-- | generic/tkColor.c | 2 | ||||
-rw-r--r-- | generic/tkConfig.c | 2 | ||||
-rw-r--r-- | generic/tkCursor.c | 4 | ||||
-rw-r--r-- | generic/tkEntry.c | 24 | ||||
-rw-r--r-- | generic/tkFileFilter.c | 2 | ||||
-rw-r--r-- | generic/tkFocus.c | 2 | ||||
-rw-r--r-- | generic/tkFrame.c | 20 | ||||
-rw-r--r-- | generic/tkGC.c | 8 | ||||
-rw-r--r-- | generic/tkImgGIF.c | 12 | ||||
-rw-r--r-- | generic/tkImgPNG.c | 4 | ||||
-rw-r--r-- | generic/tkListbox.c | 44 | ||||
-rw-r--r-- | generic/tkMacWinMenu.c | 2 | ||||
-rw-r--r-- | generic/tkMenu.c | 16 | ||||
-rw-r--r-- | generic/tkMenuDraw.c | 18 | ||||
-rw-r--r-- | generic/tkMenubutton.c | 12 | ||||
-rw-r--r-- | generic/tkMessage.c | 16 | ||||
-rw-r--r-- | generic/tkObj.c | 6 | ||||
-rw-r--r-- | generic/tkScale.c | 20 | ||||
-rw-r--r-- | generic/tkSquare.c | 2 | ||||
-rw-r--r-- | generic/tkTrig.c | 16 | ||||
-rw-r--r-- | generic/tkWindow.c | 58 | ||||
-rw-r--r-- | win/tkWinButton.c | 22 | ||||
-rw-r--r-- | win/tkWinScrlbr.c | 20 | ||||
-rw-r--r-- | win/tkWinWm.c | 113 |
27 files changed, 218 insertions, 253 deletions
diff --git a/generic/tkArgv.c b/generic/tkArgv.c index 6c2c5c5..8fe8514 100644 --- a/generic/tkArgv.c +++ b/generic/tkArgv.c @@ -67,12 +67,12 @@ Tk_ParseArgv( int flags) /* Or'ed combination of various flag bits, * such as TK_ARGV_NO_DEFAULTS. */ { - register const Tk_ArgvInfo *infoPtr; + const Tk_ArgvInfo *infoPtr; /* Pointer to the current entry in the table * of argument descriptions. */ const Tk_ArgvInfo *matchPtr;/* Descriptor that matches current argument. */ const char *curArg; /* Current argument */ - register char c; /* Second character of current arg (used for + char c; /* Second character of current arg (used for * quick check for matching; use 2nd char. * because first char. will almost always be * '-'). */ @@ -338,7 +338,7 @@ PrintUsage( * this word, then don't generate information * for default options. */ { - register const Tk_ArgvInfo *infoPtr; + const Tk_ArgvInfo *infoPtr; size_t width, i, numSpaces; Tcl_Obj *message; diff --git a/generic/tkButton.c b/generic/tkButton.c index 3c15bf6..4b04e9f 100644 --- a/generic/tkButton.c +++ b/generic/tkButton.c @@ -1036,7 +1036,7 @@ DestroyButton( static int ConfigureButton( Tcl_Interp *interp, /* Used for error reporting. */ - register TkButton *butPtr, /* Information about widget; may or may + TkButton *butPtr, /* Information about widget; may or may * not already have values for some fields. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument values. */ @@ -1612,7 +1612,7 @@ ButtonVarProc( const char *name2, /* Second part of variable name. */ int flags) /* Information about what happened. */ { - register TkButton *butPtr = clientData; + TkButton *butPtr = clientData; const char *value; Tcl_Obj *valuePtr; @@ -1817,7 +1817,7 @@ ButtonImageProc( * <= 0). */ int imgWidth, int imgHeight)/* New dimensions of image. */ { - register TkButton *butPtr = clientData; + TkButton *butPtr = clientData; if (butPtr->tkwin != NULL) { TkpComputeButtonGeometry(butPtr); @@ -1855,7 +1855,7 @@ ButtonSelectImageProc( * <= 0). */ int imgWidth, int imgHeight)/* New dimensions of image. */ { - register TkButton *butPtr = clientData; + TkButton *butPtr = clientData; #ifdef MAC_OSX_TK if (butPtr->tkwin != NULL) { @@ -1902,7 +1902,7 @@ ButtonTristateImageProc( * <= 0). */ int imgWidth, int imgHeight)/* New dimensions of image. */ { - register TkButton *butPtr = clientData; + TkButton *butPtr = clientData; #ifdef MAC_OSX_TK if (butPtr->tkwin != NULL) { diff --git a/generic/tkCanvUtil.c b/generic/tkCanvUtil.c index 1feef73..65af3da 100644 --- a/generic/tkCanvUtil.c +++ b/generic/tkCanvUtil.c @@ -332,7 +332,7 @@ Tk_CanvasSetOffset( * redisplaying the canvas. */ Tk_TSOffset *offset) /* Offset (may be NULL pointer)*/ { - register TkCanvas *canvasPtr = Canvas(canvas); + TkCanvas *canvasPtr = Canvas(canvas); int flags = 0; int x = - canvasPtr->drawableXOrigin; int y = - canvasPtr->drawableYOrigin; @@ -406,7 +406,7 @@ Tk_CanvasTagsParseProc( char *widgRec, /* Pointer to record for item. */ int offset) /* Offset into item (ignored). */ { - register Tk_Item *itemPtr = (Tk_Item *) widgRec; + Tk_Item *itemPtr = (Tk_Item *) widgRec; int argc, i; const char **argv; Tk_Uid *newPtr; @@ -474,7 +474,7 @@ Tk_CanvasTagsPrintProc( * information about how to reclaim storage * for return string. */ { - register Tk_Item *itemPtr = (Tk_Item *) widgRec; + Tk_Item *itemPtr = (Tk_Item *) widgRec; if (itemPtr->numTags == 0) { *freeProcPtr = NULL; @@ -733,7 +733,7 @@ TkSmoothParseProc( char *widgRec, /* Pointer to record for item. */ int offset) /* Offset into item. */ { - register const Tk_SmoothMethod **smoothPtr = + const Tk_SmoothMethod **smoothPtr = (const Tk_SmoothMethod **) (widgRec + offset); const Tk_SmoothMethod *smooth = NULL; int b; @@ -826,7 +826,7 @@ TkSmoothPrintProc( * information about how to reclaim storage * for return string. */ { - register const Tk_SmoothMethod *smoothPtr = + const Tk_SmoothMethod *smoothPtr = * (Tk_SmoothMethod **) (widgRec + offset); return smoothPtr ? smoothPtr->name : "0"; diff --git a/generic/tkColor.c b/generic/tkColor.c index f6650f9..48d17ac 100644 --- a/generic/tkColor.c +++ b/generic/tkColor.c @@ -363,7 +363,7 @@ const char * Tk_NameOfColor( XColor *colorPtr) /* Color whose name is desired. */ { - register TkColor *tkColPtr = (TkColor *) colorPtr; + TkColor *tkColPtr = (TkColor *) colorPtr; if (tkColPtr->magic==COLOR_MAGIC && tkColPtr->type==TK_COLOR_BY_NAME) { return tkColPtr->hashPtr->key.string; diff --git a/generic/tkConfig.c b/generic/tkConfig.c index 65e28a6..8381a0a 100644 --- a/generic/tkConfig.c +++ b/generic/tkConfig.c @@ -1400,7 +1400,7 @@ Tk_RestoreSavedOptions( = savePtr->items[i].valuePtr; } if (specPtr->internalOffset >= 0) { - register char *ptr = (char *) &savePtr->items[i].internalForm; + char *ptr = (char *) &savePtr->items[i].internalForm; CLANG_ASSERT(internalPtr); switch (specPtr->type) { diff --git a/generic/tkCursor.c b/generic/tkCursor.c index 21c713a..1e49c64 100644 --- a/generic/tkCursor.c +++ b/generic/tkCursor.c @@ -229,7 +229,7 @@ TkcGetCursor( * details on legal syntax. */ { Tcl_HashEntry *nameHashPtr; - register TkCursor *cursorPtr; + TkCursor *cursorPtr; TkCursor *existingCursorPtr = NULL; int isNew; TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr; @@ -320,7 +320,7 @@ Tk_GetCursorFromData( { DataKey dataKey; Tcl_HashEntry *dataHashPtr; - register TkCursor *cursorPtr; + TkCursor *cursorPtr; int isNew; XColor fgColor, bgColor; TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr; diff --git a/generic/tkEntry.c b/generic/tkEntry.c index 4ffb48b..a6684c7 100644 --- a/generic/tkEntry.c +++ b/generic/tkEntry.c @@ -477,7 +477,7 @@ Tk_EntryObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - register Entry *entryPtr; + Entry *entryPtr; Tk_OptionTable optionTable; Tk_Window tkwin; char *tmp; @@ -3234,11 +3234,11 @@ EntryTextVarProc( static int EntryValidate( - register Entry *entryPtr, /* Entry that needs validation. */ - register char *cmd) /* Validation command (NULL-terminated + Entry *entryPtr, /* Entry that needs validation. */ + char *cmd) /* Validation command (NULL-terminated * string). */ { - register Tcl_Interp *interp = entryPtr->interp; + Tcl_Interp *interp = entryPtr->interp; int code, isOK; code = Tcl_EvalEx(interp, cmd, -1, TCL_EVAL_GLOBAL | TCL_EVAL_DIRECT); @@ -3294,7 +3294,7 @@ EntryValidate( static int EntryValidateChange( - register Entry *entryPtr, /* Entry that needs validation. */ + Entry *entryPtr, /* Entry that needs validation. */ const char *change, /* Characters to be added/deleted * (NUL-terminated string). */ const char *newValue, /* Potential new value of entry string */ @@ -3437,8 +3437,8 @@ EntryValidateChange( static void ExpandPercents( - register Entry *entryPtr, /* Entry that needs validation. */ - register const char *before, + Entry *entryPtr, /* Entry that needs validation. */ + const char *before, /* Command containing percent expressions to * be replaced. */ const char *change, /* Characters to added/deleted (NUL-terminated @@ -3452,7 +3452,7 @@ ExpandPercents( int spaceNeeded, cvtFlags; /* Used to substitute string as proper Tcl * list element. */ int number, length; - register const char *string; + const char *string; int ch; char numStorage[2*TCL_INTEGER_SPACE]; @@ -3607,8 +3607,8 @@ Tk_SpinboxObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - register Entry *entryPtr; - register Spinbox *sbPtr; + Entry *entryPtr; + Spinbox *sbPtr; Tk_OptionTable optionTable; Tk_Window tkwin; char *tmp; @@ -4285,8 +4285,8 @@ GetSpinboxElement( static int SpinboxInvoke( - register Tcl_Interp *interp,/* Current interpreter. */ - register Spinbox *sbPtr, /* Spinbox to invoke. */ + Tcl_Interp *interp,/* Current interpreter. */ + Spinbox *sbPtr, /* Spinbox to invoke. */ int element) /* Element to invoke, either the "up" or * "down" button. */ { diff --git a/generic/tkFileFilter.c b/generic/tkFileFilter.c index 8588d70..c8dbc52 100644 --- a/generic/tkFileFilter.c +++ b/generic/tkFileFilter.c @@ -164,7 +164,7 @@ TkFreeFileFilters( FileFilterClause *clausePtr; GlobPattern *globPtr; MacFileType *mfPtr; - register void *toFree; /* A pointer that we are about to free. */ + void *toFree; /* A pointer that we are about to free. */ for (filterPtr = flistPtr->filters; filterPtr != NULL; ) { for (clausePtr = filterPtr->clauses; clausePtr != NULL; ) { diff --git a/generic/tkFocus.c b/generic/tkFocus.c index 4d46e4b..42ac6bf 100644 --- a/generic/tkFocus.c +++ b/generic/tkFocus.c @@ -807,7 +807,7 @@ TkFocusKeyEvent( void TkFocusDeadWindow( - register TkWindow *winPtr) /* Information about the window that is being + TkWindow *winPtr) /* Information about the window that is being * deleted. */ { ToplevelFocusInfo *tlFocusPtr, *prevPtr; diff --git a/generic/tkFrame.c b/generic/tkFrame.c index 54ba8e8..b5c20e8 100644 --- a/generic/tkFrame.c +++ b/generic/tkFrame.c @@ -741,7 +741,7 @@ FrameWidgetObjCmd( enum options { FRAME_CGET, FRAME_CONFIGURE }; - register Frame *framePtr = clientData; + Frame *framePtr = clientData; int result = TCL_OK, index; int c, i, length; Tcl_Obj *objPtr; @@ -859,8 +859,8 @@ static void DestroyFrame( void *memPtr) /* Info about frame widget. */ { - register Frame *framePtr = memPtr; - register Labelframe *labelframePtr = memPtr; + Frame *framePtr = memPtr; + Labelframe *labelframePtr = memPtr; if (framePtr->type == TYPE_LABELFRAME) { Tk_FreeTextLayout(labelframePtr->textLayout); @@ -896,7 +896,7 @@ static void DestroyFramePartly( Frame *framePtr) /* Info about frame widget. */ { - register Labelframe *labelframePtr = (Labelframe *) framePtr; + Labelframe *labelframePtr = (Labelframe *) framePtr; if (framePtr->type == TYPE_LABELFRAME && labelframePtr->labelWin != NULL) { Tk_DeleteEventHandler(labelframePtr->labelWin, StructureNotifyMask, @@ -936,7 +936,7 @@ DestroyFramePartly( static int ConfigureFrame( Tcl_Interp *interp, /* Used for error reporting. */ - register Frame *framePtr, /* Information about widget; may or may not + Frame *framePtr, /* Information about widget; may or may not * already have values for some fields. */ int objc, /* Number of valid entries in objv. */ Tcl_Obj *const objv[]) /* Arguments. */ @@ -1263,7 +1263,7 @@ FrameWorldChanged( static void ComputeFrameGeometry( - register Frame *framePtr) /* Information about widget. */ + Frame *framePtr) /* Information about widget. */ { int otherWidth, otherHeight, otherWidthT, otherHeightT, padding; int maxWidth, maxHeight; @@ -1412,8 +1412,8 @@ static void DisplayFrame( ClientData clientData) /* Information about widget. */ { - register Frame *framePtr = clientData; - register Tk_Window tkwin = framePtr->tkwin; + Frame *framePtr = clientData; + Tk_Window tkwin = framePtr->tkwin; int bdX1, bdY1, bdX2, bdY2, hlWidth; Pixmap pixmap; TkRegion clipRegion = NULL; @@ -1635,9 +1635,9 @@ DisplayFrame( static void FrameEventProc( ClientData clientData, /* Information about window. */ - register XEvent *eventPtr) /* Information about event. */ + XEvent *eventPtr) /* Information about event. */ { - register Frame *framePtr = clientData; + Frame *framePtr = clientData; if ((eventPtr->type == Expose) && (eventPtr->xexpose.count == 0)) { goto redraw; diff --git a/generic/tkGC.c b/generic/tkGC.c index c424e30..a03c156 100644 --- a/generic/tkGC.c +++ b/generic/tkGC.c @@ -66,17 +66,17 @@ static void GCInit(TkDisplay *dispPtr); GC Tk_GetGC( Tk_Window tkwin, /* Window in which GC will be used. */ - register unsigned long valueMask, + unsigned long valueMask, /* 1 bits correspond to values specified in * *valuesPtr; other values are set from * defaults. */ - register XGCValues *valuePtr) + XGCValues *valuePtr) /* Values are specified here for bits set in * valueMask. */ { ValueKey valueKey; Tcl_HashEntry *valueHashPtr, *idHashPtr; - register TkGC *gcPtr; + TkGC *gcPtr; int isNew; Drawable d, freeDrawable; TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr; @@ -291,7 +291,7 @@ Tk_FreeGC( GC gc) /* Graphics context to be released. */ { Tcl_HashEntry *idHashPtr; - register TkGC *gcPtr; + TkGC *gcPtr; TkDisplay *dispPtr = TkGetDisplay(display); if (!dispPtr->gcInit) { diff --git a/generic/tkImgGIF.c b/generic/tkImgGIF.c index 76e48d4..ab4bc37 100644 --- a/generic/tkImgGIF.c +++ b/generic/tkImgGIF.c @@ -1035,13 +1035,13 @@ ReadImage( { unsigned char initialCodeSize; int xpos = 0, ypos = 0, pass = 0, i, count; - register unsigned char *pixelPtr; + unsigned char *pixelPtr; static const int interlaceStep[] = { 8, 8, 4, 2 }; static const int interlaceStart[] = { 0, 4, 2, 1 }; unsigned short prefix[(1 << MAX_LWZ_BITS)]; unsigned char append[(1 << MAX_LWZ_BITS)]; unsigned char stack[(1 << MAX_LWZ_BITS)*2]; - register unsigned char *top; + unsigned char *top; int codeSize, clearCode, inCode, endCode, oldCode, maxCode; int code, firstCode, v; @@ -1425,7 +1425,7 @@ Mread( size_t numChunks, /* number of chunks */ MFile *handle) /* mmdecode "file" handle */ { - register int i, c; + int i, c; int count = chunkSize * numChunks; for (i=0; i<count && (c=Mgetc(handle)) != GIF_DONE; i++) { @@ -2157,9 +2157,9 @@ ClearHashTable( /* Reset code table. */ GIFState_t *statePtr, int hSize) { - register int *hashTablePtr = statePtr->hashTable + hSize; - register long i; - register long m1 = -1; + int *hashTablePtr = statePtr->hashTable + hSize; + long i; + long m1 = -1; i = hSize - 16; do { /* might use Sys V memset(3) here */ diff --git a/generic/tkImgPNG.c b/generic/tkImgPNG.c index 7e22f26..03bb4f8 100644 --- a/generic/tkImgPNG.c +++ b/generic/tkImgPNG.c @@ -2237,14 +2237,14 @@ ApplyAlpha( PNGImage *pngPtr) { if (pngPtr->alpha != 1.0) { - register unsigned char *p = pngPtr->block.pixelPtr; + unsigned char *p = pngPtr->block.pixelPtr; unsigned char *endPtr = p + pngPtr->blockLen; int offset = pngPtr->block.offset[3]; p += offset; if (16 == pngPtr->bitDepth) { - register unsigned int channel; + unsigned int channel; while (p < endPtr) { channel = (unsigned int) diff --git a/generic/tkListbox.c b/generic/tkListbox.c index 514b349..cba8954 100644 --- a/generic/tkListbox.c +++ b/generic/tkListbox.c @@ -478,7 +478,7 @@ Tk_ListboxObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - register Listbox *listPtr; + Listbox *listPtr; Tk_Window tkwin; ListboxOptionTables *optionTables; @@ -607,7 +607,7 @@ ListboxWidgetObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Arguments as Tcl_Obj's. */ { - register Listbox *listPtr = clientData; + Listbox *listPtr = clientData; int cmdIndex, index; int result = TCL_OK; Tcl_Obj *objPtr; @@ -1082,7 +1082,7 @@ ListboxBboxSubCmd( Listbox *listPtr, /* Information about the listbox */ int index) /* Index of the element to get bbox info on */ { - register Tk_Window tkwin = listPtr->tkwin; + Tk_Window tkwin = listPtr->tkwin; int lastVisibleIndex; /* @@ -1446,7 +1446,7 @@ static void DestroyListbox( void *memPtr) /* Info about listbox widget. */ { - register Listbox *listPtr = memPtr; + Listbox *listPtr = memPtr; Tcl_HashEntry *entry; Tcl_HashSearch search; @@ -1555,7 +1555,7 @@ DestroyListboxOptionTables( static int ConfigureListbox( Tcl_Interp *interp, /* Used for error reporting. */ - register Listbox *listPtr, /* Information about widget; may or may not + Listbox *listPtr, /* Information about widget; may or may not * already have values for some fields. */ int objc, /* Number of valid entries in argv. */ Tcl_Obj *const objv[]) /* Arguments. */ @@ -1715,7 +1715,7 @@ ConfigureListbox( static int ConfigureListboxItem( Tcl_Interp *interp, /* Used for error reporting. */ - register Listbox *listPtr, /* Information about widget; may or may not + Listbox *listPtr, /* Information about widget; may or may not * already have values for some fields. */ ItemAttr *attrs, /* Information about the item to configure */ int objc, /* Number of valid entries in argv. */ @@ -1837,8 +1837,8 @@ static void DisplayListbox( ClientData clientData) /* Information about window. */ { - register Listbox *listPtr = clientData; - register Tk_Window tkwin = listPtr->tkwin; + Listbox *listPtr = clientData; + Tk_Window tkwin = listPtr->tkwin; GC gc; int i, limit, x, y, prevSelected, freeGC, stringLen; Tk_FontMetrics fm; @@ -2317,7 +2317,7 @@ ListboxComputeGeometry( static int ListboxInsertSubCmd( - register Listbox *listPtr, /* Listbox that is to get the new elements. */ + Listbox *listPtr, /* Listbox that is to get the new elements. */ int index, /* Add the new elements before this * element. */ int objc, /* Number of new elements to add. */ @@ -2433,7 +2433,7 @@ ListboxInsertSubCmd( static int ListboxDeleteSubCmd( - register Listbox *listPtr, /* Listbox widget to modify. */ + Listbox *listPtr, /* Listbox widget to modify. */ int first, /* Index of first element to delete. */ int last) /* Index of last element to delete. */ { @@ -2828,7 +2828,7 @@ GetListboxIndex( static void ChangeListboxView( - register Listbox *listPtr, /* Information about widget. */ + Listbox *listPtr, /* Information about widget. */ int index) /* Index of element in listPtr that should now * appear at the top of the listbox. */ { @@ -2863,7 +2863,7 @@ ChangeListboxView( static void ChangeListboxOffset( - register Listbox *listPtr, /* Information about widget. */ + Listbox *listPtr, /* Information about widget. */ int offset) /* Desired new "xOffset" for listbox. */ { int maxOffset; @@ -2911,7 +2911,7 @@ ChangeListboxOffset( static void ListboxScanTo( - register Listbox *listPtr, /* Information about widget. */ + Listbox *listPtr, /* Information about widget. */ int x, /* X-coordinate to use for scan operation. */ int y) /* Y-coordinate to use for scan operation. */ { @@ -2978,7 +2978,7 @@ ListboxScanTo( static int NearestListboxElement( - register Listbox *listPtr, /* Information about widget. */ + Listbox *listPtr, /* Information about widget. */ int y) /* Y-coordinate in listPtr's window. */ { int index; @@ -3019,7 +3019,7 @@ NearestListboxElement( static int ListboxSelect( - register Listbox *listPtr, /* Information about widget. */ + Listbox *listPtr, /* Information about widget. */ int first, /* Index of first element to select or * deselect. */ int last, /* Index of last element to select or @@ -3120,7 +3120,7 @@ ListboxFetchSelection( * not including terminating NULL * character. */ { - register Listbox *listPtr = clientData; + Listbox *listPtr = clientData; Tcl_DString selection; int length, count, needNewline, stringLen, i; Tcl_Obj *curElement; @@ -3196,7 +3196,7 @@ static void ListboxLostSelection( ClientData clientData) /* Information about listbox widget. */ { - register Listbox *listPtr = clientData; + Listbox *listPtr = clientData; if ((listPtr->exportSelection) && (!Tcl_IsSafe(listPtr->interp)) && (listPtr->nElements > 0)) { @@ -3248,7 +3248,7 @@ GenerateListboxSelectEvent( static void EventuallyRedrawRange( - register Listbox *listPtr, /* Information about widget. */ + Listbox *listPtr, /* Information about widget. */ int first, /* Index of first element in list that needs * to be redrawn. */ int last) /* Index of last element in list that needs to @@ -3256,7 +3256,7 @@ EventuallyRedrawRange( * just bracket a range. */ { /* - * We don't have to register a redraw callback if one is already pending, + * We don't have to a redraw callback if one is already pending, * or if the window doesn't exist, or if the window isn't mapped. */ @@ -3291,7 +3291,7 @@ EventuallyRedrawRange( static void ListboxUpdateVScrollbar( - register Listbox *listPtr) /* Information about widget. */ + Listbox *listPtr) /* Information about widget. */ { char firstStr[TCL_DOUBLE_SPACE], lastStr[TCL_DOUBLE_SPACE]; double first, last; @@ -3361,7 +3361,7 @@ ListboxUpdateVScrollbar( static void ListboxUpdateHScrollbar( - register Listbox *listPtr) /* Information about widget. */ + Listbox *listPtr) /* Information about widget. */ { char firstStr[TCL_DOUBLE_SPACE], lastStr[TCL_DOUBLE_SPACE]; int result, windowWidth; @@ -3642,7 +3642,7 @@ MigrateHashEntries( *---------------------------------------------------------------------- */ static int GetMaxOffset( - register Listbox *listPtr) + Listbox *listPtr) { int maxOffset; diff --git a/generic/tkMacWinMenu.c b/generic/tkMacWinMenu.c index ab92fec..7749c6d 100644 --- a/generic/tkMacWinMenu.c +++ b/generic/tkMacWinMenu.c @@ -67,7 +67,7 @@ PreprocessMenu( do { finished = 1; for (index = 0; index < menuPtr->numEntries; index++) { - register TkMenuEntry *entryPtr = menuPtr->entries[index]; + TkMenuEntry *entryPtr = menuPtr->entries[index]; if ((entryPtr->type == CASCADE_ENTRY) && (entryPtr->namePtr != NULL) diff --git a/generic/tkMenu.c b/generic/tkMenu.c index 1cd7a16..18f59a8 100644 --- a/generic/tkMenu.c +++ b/generic/tkMenu.c @@ -406,7 +406,7 @@ Tk_MenuObjCmd( { Tk_Window tkwin = clientData; Tk_Window newWin; - register TkMenu *menuPtr; + TkMenu *menuPtr; TkMenuReferences *menuRefPtr; int i, index, toplevel; const char *windowName; @@ -617,8 +617,8 @@ MenuWidgetObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument strings. */ { - register TkMenu *menuPtr = clientData; - register TkMenuEntry *mePtr; + TkMenu *menuPtr = clientData; + TkMenuEntry *mePtr; int result = TCL_OK; int option; ThreadSpecificData *tsdPtr = @@ -1385,7 +1385,7 @@ static void DestroyMenuEntry( void *memPtr) /* Pointer to entry to be freed. */ { - register TkMenuEntry *mePtr = memPtr; + TkMenuEntry *mePtr = memPtr; TkMenu *menuPtr = mePtr->menuPtr; if (menuPtr->postedCascade == mePtr) { @@ -1519,7 +1519,7 @@ MenuWorldChanged( static int ConfigureMenu( Tcl_Interp *interp, /* Used for error reporting. */ - register TkMenu *menuPtr, /* Information about widget; may or may not + TkMenu *menuPtr, /* Information about widget; may or may not * already have values for some fields. */ int objc, /* Number of valid entries in argv. */ Tcl_Obj *const objv[]) /* Arguments. */ @@ -1901,7 +1901,7 @@ PostProcessEntry( static int ConfigureMenuEntry( - register TkMenuEntry *mePtr,/* Information about menu entry; may or may + TkMenuEntry *mePtr,/* Information about menu entry; may or may * not already have values for some fields. */ int objc, /* Number of valid entries in argv. */ Tcl_Obj *const objv[]) /* Arguments. */ @@ -2589,11 +2589,11 @@ MenuVarProc( int TkActivateMenuEntry( - register TkMenu *menuPtr, /* Menu in which to activate. */ + TkMenu *menuPtr, /* Menu in which to activate. */ int index) /* Index of entry to activate, or -1 to * deactivate all entries. */ { - register TkMenuEntry *mePtr; + TkMenuEntry *mePtr; int result = TCL_OK; if (menuPtr->active >= 0) { diff --git a/generic/tkMenuDraw.c b/generic/tkMenuDraw.c index 89f4a2b..3851a06 100644 --- a/generic/tkMenuDraw.c +++ b/generic/tkMenuDraw.c @@ -483,8 +483,8 @@ TkRecomputeMenu( void TkEventuallyRedrawMenu( - register TkMenu *menuPtr, /* Information about menu to redraw. */ - register TkMenuEntry *mePtr)/* Entry to redraw. NULL means redraw all the + TkMenu *menuPtr, /* Information about menu to redraw. */ + TkMenuEntry *mePtr)/* Entry to redraw. NULL means redraw all the * entries in the menu. */ { int i; @@ -586,7 +586,7 @@ TkMenuSelectImageProc( * <=0). */ int imgWidth, int imgHeight)/* New dimensions of image. */ { - register TkMenuEntry *mePtr = clientData; + TkMenuEntry *mePtr = clientData; if ((mePtr->entryFlags & ENTRY_SELECTED) && !(mePtr->menuPtr->menuFlags & REDRAW_PENDING)) { @@ -615,9 +615,9 @@ static void DisplayMenu( ClientData clientData) /* Information about widget. */ { - register TkMenu *menuPtr = clientData; - register TkMenuEntry *mePtr; - register Tk_Window tkwin = menuPtr->tkwin; + TkMenu *menuPtr = clientData; + TkMenuEntry *mePtr; + Tk_Window tkwin = menuPtr->tkwin; int index, strictMotif; Tk_Font tkfont; Tk_FontMetrics menuMetrics; @@ -824,7 +824,7 @@ TkMenuImageProc( * <=0). */ int imgWidth, int imgHeight)/* New dimensions of image. */ { - register TkMenu *menuPtr = ((TkMenuEntry *) clientData)->menuPtr; + TkMenu *menuPtr = ((TkMenuEntry *) clientData)->menuPtr; if ((menuPtr->tkwin != NULL) && !(menuPtr->menuFlags & RESIZE_PENDING)) { menuPtr->menuFlags |= RESIZE_PENDING; @@ -882,8 +882,8 @@ int TkPostSubmenu( Tcl_Interp *interp, /* Used for invoking sub-commands and * reporting errors. */ - register TkMenu *menuPtr, /* Information about menu as a whole. */ - register TkMenuEntry *mePtr)/* Info about submenu that is to be posted. + TkMenu *menuPtr, /* Information about menu as a whole. */ + TkMenuEntry *mePtr)/* Info about submenu that is to be posted. * NULL means make sure that no submenu is * posted. */ { diff --git a/generic/tkMenubutton.c b/generic/tkMenubutton.c index 2228a2e..5f4f40f 100644 --- a/generic/tkMenubutton.c +++ b/generic/tkMenubutton.c @@ -217,7 +217,7 @@ Tk_MenubuttonObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - register TkMenuButton *mbPtr; + TkMenuButton *mbPtr; Tk_OptionTable optionTable; Tk_Window tkwin; @@ -347,7 +347,7 @@ MenuButtonWidgetObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - register TkMenuButton *mbPtr = clientData; + TkMenuButton *mbPtr = clientData; int result, index; Tcl_Obj *objPtr; @@ -422,7 +422,7 @@ static void DestroyMenuButton( char *memPtr) /* Info about button widget. */ { - register TkMenuButton *mbPtr = (TkMenuButton *) memPtr; + TkMenuButton *mbPtr = (TkMenuButton *) memPtr; TkpDestroyMenuButton(mbPtr); if (mbPtr->flags & REDRAW_PENDING) { @@ -490,7 +490,7 @@ DestroyMenuButton( static int ConfigureMenuButton( Tcl_Interp *interp, /* Used for error reporting. */ - register TkMenuButton *mbPtr, + TkMenuButton *mbPtr, /* Information about widget; may or may not * already have values for some fields. */ int objc, /* Number of valid entries in objv. */ @@ -877,7 +877,7 @@ MenuButtonTextVarProc( const char *name2, /* Second part of variable name. */ int flags) /* Information about what happened. */ { - register TkMenuButton *mbPtr = clientData; + TkMenuButton *mbPtr = clientData; const char *value; unsigned len; @@ -964,7 +964,7 @@ MenuButtonImageProc( * 0). */ int imgWidth, int imgHeight)/* New dimensions of image. */ { - register TkMenuButton *mbPtr = clientData; + TkMenuButton *mbPtr = clientData; if (mbPtr->tkwin != NULL) { TkpComputeMenuButtonGeometry(mbPtr); diff --git a/generic/tkMessage.c b/generic/tkMessage.c index 1a3c6de..cc67b46 100644 --- a/generic/tkMessage.c +++ b/generic/tkMessage.c @@ -219,7 +219,7 @@ Tk_MessageObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument strings. */ { - register Message *msgPtr; + Message *msgPtr; Tk_OptionTable optionTable; Tk_Window tkwin; @@ -306,7 +306,7 @@ MessageWidgetObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument strings. */ { - register Message *msgPtr = clientData; + Message *msgPtr = clientData; static const char *const optionStrings[] = { "cget", "configure", NULL }; enum options { MESSAGE_CGET, MESSAGE_CONFIGURE }; int index; @@ -384,7 +384,7 @@ static void DestroyMessage( char *memPtr) /* Info about message widget. */ { - register Message *msgPtr = (Message *) memPtr; + Message *msgPtr = (Message *) memPtr; msgPtr->flags |= MESSAGE_DELETED; @@ -437,7 +437,7 @@ DestroyMessage( static int ConfigureMessage( Tcl_Interp *interp, /* Used for error reporting. */ - register Message *msgPtr, /* Information about widget; may or may not + Message *msgPtr, /* Information about widget; may or may not * already have values for some fields. */ int objc, /* Number of valid entries in argv. */ Tcl_Obj *const objv[], /* Arguments. */ @@ -582,7 +582,7 @@ MessageWorldChanged( static void ComputeMessageGeometry( - register Message *msgPtr) /* Information about window. */ + Message *msgPtr) /* Information about window. */ { int width, inc, height; int thisWidth, thisHeight, maxWidth; @@ -666,8 +666,8 @@ static void DisplayMessage( ClientData clientData) /* Information about window. */ { - register Message *msgPtr = clientData; - register Tk_Window tkwin = msgPtr->tkwin; + Message *msgPtr = clientData; + Tk_Window tkwin = msgPtr->tkwin; int x, y; int borderWidth = msgPtr->highlightWidth; @@ -835,7 +835,7 @@ MessageTextVarProc( const char *name2, /* Second part of variable name. */ int flags) /* Information about what happened. */ { - register Message *msgPtr = clientData; + Message *msgPtr = clientData; const char *value; /* diff --git a/generic/tkObj.c b/generic/tkObj.c index 716c7e1..db2e501 100644 --- a/generic/tkObj.c +++ b/generic/tkObj.c @@ -929,10 +929,10 @@ SetWindowFromAny( static void DupWindowInternalRep( - register Tcl_Obj *srcPtr, - register Tcl_Obj *copyPtr) + Tcl_Obj *srcPtr, + Tcl_Obj *copyPtr) { - register WindowRep *oldPtr, *newPtr; + WindowRep *oldPtr, *newPtr; oldPtr = srcPtr->internalRep.twoPtrValue.ptr1; newPtr = ckalloc(sizeof(WindowRep)); diff --git a/generic/tkScale.c b/generic/tkScale.c index 825f661..fa2a5d5 100644 --- a/generic/tkScale.c +++ b/generic/tkScale.c @@ -253,7 +253,7 @@ Tk_ScaleObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument values. */ { - register TkScale *scalePtr; + TkScale *scalePtr; Tk_OptionTable optionTable; Tk_Window tkwin; @@ -542,7 +542,7 @@ static void DestroyScale( char *memPtr) /* Info about scale widget. */ { - register TkScale *scalePtr = (TkScale *) memPtr; + TkScale *scalePtr = (TkScale *) memPtr; scalePtr->flags |= SCALE_DELETED; @@ -599,7 +599,7 @@ DestroyScale( static int ConfigureScale( Tcl_Interp *interp, /* Used for error reporting. */ - register TkScale *scalePtr, /* Information about widget; may or may not + TkScale *scalePtr, /* Information about widget; may or may not * already have values for some fields. */ int objc, /* Number of valid entries in objv. */ Tcl_Obj *const objv[]) /* Argument values. */ @@ -1017,7 +1017,7 @@ ComputeFormat( static void ComputeScaleGeometry( - register TkScale *scalePtr) /* Information about widget. */ + TkScale *scalePtr) /* Information about widget. */ { char valueString[TCL_DOUBLE_SPACE]; int tmp, valuePixels, tickPixels, x, y, extraSpace; @@ -1246,7 +1246,7 @@ ScaleCmdDeletedProc( void TkEventuallyRedrawScale( - register TkScale *scalePtr, /* Information about widget. */ + TkScale *scalePtr, /* Information about widget. */ int what) /* What to redraw: REDRAW_SLIDER or * REDRAW_ALL. */ { @@ -1344,7 +1344,7 @@ ScaleVarProc( const char *name2, /* Second part of variable name. */ int flags) /* Information about what happened. */ { - register TkScale *scalePtr = clientData; + TkScale *scalePtr = clientData; const char *resultStr; double value; Tcl_Obj *valuePtr; @@ -1439,7 +1439,7 @@ ScaleVarProc( void TkScaleSetValue( - register TkScale *scalePtr, /* Info about widget. */ + TkScale *scalePtr, /* Info about widget. */ double value, /* New value for scale. Gets adjusted if it's * off the scale. */ int setVar, /* Non-zero means reflect new value through to @@ -1497,7 +1497,7 @@ TkScaleSetValue( static void ScaleSetVariable( - register TkScale *scalePtr) /* Info about widget. */ + TkScale *scalePtr) /* Info about widget. */ { if (scalePtr->varNamePtr != NULL) { char string[TCL_DOUBLE_SPACE]; @@ -1533,7 +1533,7 @@ ScaleSetVariable( double TkScalePixelToValue( - register TkScale *scalePtr, /* Information about widget. */ + TkScale *scalePtr, /* Information about widget. */ int x, int y) /* Coordinates of point within window. */ { double value, pixelRange; @@ -1591,7 +1591,7 @@ TkScalePixelToValue( int TkScaleValueToPixel( - register TkScale *scalePtr, /* Information about widget. */ + TkScale *scalePtr, /* Information about widget. */ double value) /* Reading of the widget. */ { int y, pixelRange; diff --git a/generic/tkSquare.c b/generic/tkSquare.c index e92c03c..61f86c5 100644 --- a/generic/tkSquare.c +++ b/generic/tkSquare.c @@ -581,7 +581,7 @@ SquareDestroy( static void KeepInWindow( - register Square *squarePtr) /* Pointer to widget record. */ + Square *squarePtr) /* Pointer to widget record. */ { int i, bd, relief; int borderWidth, size; diff --git a/generic/tkTrig.c b/generic/tkTrig.c index a2bf456..101f09b 100644 --- a/generic/tkTrig.c +++ b/generic/tkTrig.c @@ -440,7 +440,7 @@ TkPolygonToPoint( * intersect a ray extending vertically * upwards from the point to infinity. */ int count; - register double *pPtr; + double *pPtr; /* * Iterate through all of the edges in the polygon, updating bestDist and @@ -588,7 +588,7 @@ TkPolygonToArea( * polygon: x0, y0, x1, y1, ... The polygon * may be self-intersecting. */ int numPoints, /* Total number of points at *polyPtr. */ - register double *rectPtr) /* Points to coords for rectangle, in the + double *rectPtr) /* Points to coords for rectangle, in the * order x1, y1, x2, y2. X1 and y1 must be * lower-left corner. */ { @@ -596,7 +596,7 @@ TkPolygonToArea( * outside, 1 means inside, won't ever be * 0). */ int count; - register double *pPtr; + double *pPtr; /* * Iterate over all of the edges of the polygon and test them against the @@ -751,11 +751,11 @@ TkOvalToPoint( int TkOvalToArea( - register double *ovalPtr, /* Points to coordinates defining the + double *ovalPtr, /* Points to coordinates defining the * bounding rectangle for the oval: x1, y1, * x2, y2. X1 must be less than x2 and y1 less * than y2. */ - register double *rectPtr) /* Points to coords for rectangle, in the + double *rectPtr) /* Points to coords for rectangle, in the * order x1, y1, x2, y2. X1 and y1 must be * lower-left corner. */ { @@ -870,7 +870,7 @@ TkOvalToArea( /* ARGSUSED */ void TkIncludePoint( - register Tk_Item *itemPtr, /* Item whose bounding box is being + Tk_Item *itemPtr, /* Item whose bounding box is being * calculated. */ double *pointPtr) /* Address of two doubles giving x and y * coordinates of point. */ @@ -919,7 +919,7 @@ TkBezierScreenPoints( double control[], /* Array of coordinates for four control * points: x0, y0, x1, y1, ... x3 y3. */ int numSteps, /* Number of curve points to generate. */ - register XPoint *xPointPtr) /* Where to put new points. */ + XPoint *xPointPtr) /* Where to put new points. */ { int i; double u, u2, u3, t, t2, t3; @@ -965,7 +965,7 @@ TkBezierPoints( double control[], /* Array of coordinates for four control * points: x0, y0, x1, y1, ... x3 y3. */ int numSteps, /* Number of curve points to generate. */ - register double *coordPtr) /* Where to put new points. */ + double *coordPtr) /* Where to put new points. */ { int i; double u, u2, u3, t, t2, t3; diff --git a/generic/tkWindow.c b/generic/tkWindow.c index c2f6eaa..d4072f1 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -317,8 +317,8 @@ CreateTopLevelWindow( * parent. */ unsigned int flags) /* Additional flags to set on the window. */ { - register TkWindow *winPtr; - register TkDisplay *dispPtr; + TkWindow *winPtr; + TkDisplay *dispPtr; int screenId; ThreadSpecificData *tsdPtr = Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); @@ -420,7 +420,7 @@ GetScreen( * DISPLAY envariable. */ int *screenPtr) /* Where to store screen number. */ { - register TkDisplay *dispPtr; + TkDisplay *dispPtr; const char *p; int screenId; size_t length; @@ -621,7 +621,7 @@ TkAllocWindow( * inherit visual information. NULL means use * screen defaults instead of inheriting. */ { - register TkWindow *winPtr = ckalloc(sizeof(TkWindow)); + TkWindow *winPtr = ckalloc(sizeof(TkWindow)); winPtr->display = dispPtr->display; winPtr->dispPtr = dispPtr; @@ -702,7 +702,7 @@ TkAllocWindow( static int NameWindow( Tcl_Interp *interp, /* Interpreter to use for error reporting. */ - register TkWindow *winPtr, /* Window that is to be named and inserted. */ + TkWindow *winPtr, /* Window that is to be named and inserted. */ TkWindow *parentPtr, /* Pointer to logical parent for winPtr (used * for naming, options, etc.). */ const char *name) /* Name for winPtr; must be unique among @@ -833,9 +833,9 @@ TkCreateMainWindow( Tk_Window tkwin; int dummy, isSafe; Tcl_HashEntry *hPtr; - register TkMainInfo *mainPtr; - register TkWindow *winPtr; - register const TkCmd *cmdPtr; + TkMainInfo *mainPtr; + TkWindow *winPtr; + const TkCmd *cmdPtr; ClientData clientData; ThreadSpecificData *tsdPtr = Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); @@ -922,7 +922,7 @@ TkCreateMainWindow( isSafe = Tcl_IsSafe(interp); for (cmdPtr = commands; cmdPtr->name != NULL; cmdPtr++) { Tcl_CmdInfo cmdInfo; - + if (cmdPtr->objProc == NULL) { Tcl_Panic("TkCreateMainWindow: builtin command with NULL string and object procs"); } @@ -1497,7 +1497,7 @@ Tk_DestroyWindow( winPtr->mainPtr->deletionEpoch++; } if (winPtr->mainPtr->refCount-- <= 1) { - register const TkCmd *cmdPtr; + const TkCmd *cmdPtr; /* * We just deleted the last window in the application. Delete the @@ -1694,7 +1694,7 @@ void Tk_MakeWindowExist( Tk_Window tkwin) /* Token for window. */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; TkWindow *winPtr2; Window parent; Tcl_HashEntry *hPtr; @@ -1803,7 +1803,7 @@ void Tk_UnmapWindow( Tk_Window tkwin) /* Token for window to unmap. */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; if (!(winPtr->flags & TK_MAPPED) || (winPtr->flags & TK_ALREADY_DEAD)) { return; @@ -1840,7 +1840,7 @@ Tk_ConfigureWindow( * are to be used. */ XWindowChanges *valuePtr) /* New values. */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; if (valueMask & CWX) { winPtr->changes.x = valuePtr->x; @@ -1876,7 +1876,7 @@ Tk_MoveWindow( Tk_Window tkwin, /* Window to move. */ int x, int y) /* New location for window (within parent). */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; winPtr->changes.x = x; winPtr->changes.y = y; @@ -1894,7 +1894,7 @@ Tk_ResizeWindow( Tk_Window tkwin, /* Window to resize. */ int width, int height) /* New dimensions for window. */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; winPtr->changes.width = (unsigned) width; winPtr->changes.height = (unsigned) height; @@ -1914,7 +1914,7 @@ Tk_MoveResizeWindow( int x, int y, /* New location for window (within parent). */ int width, int height) /* New dimensions for window. */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; winPtr->changes.x = x; winPtr->changes.y = y; @@ -1935,7 +1935,7 @@ Tk_SetWindowBorderWidth( Tk_Window tkwin, /* Window to modify. */ int width) /* New border width for window. */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; winPtr->changes.border_width = width; if (winPtr->window != None) { @@ -1953,10 +1953,10 @@ Tk_ChangeWindowAttributes( Tk_Window tkwin, /* Window to manipulate. */ unsigned long valueMask, /* OR'ed combination of bits, indicating which * fields of *attsPtr are to be used. */ - register XSetWindowAttributes *attsPtr) + XSetWindowAttributes *attsPtr) /* New values for some attributes. */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; if (valueMask & CWBackPixmap) { winPtr->atts.background_pixmap = attsPtr->background_pixmap; @@ -2019,7 +2019,7 @@ Tk_SetWindowBackground( unsigned long pixel) /* Pixel value to use for window's * background. */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; winPtr->atts.background_pixel = pixel; @@ -2036,7 +2036,7 @@ Tk_SetWindowBackgroundPixmap( Tk_Window tkwin, /* Window to manipulate. */ Pixmap pixmap) /* Pixmap to use for window's background. */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; winPtr->atts.background_pixmap = pixmap; @@ -2054,7 +2054,7 @@ Tk_SetWindowBorder( Tk_Window tkwin, /* Window to manipulate. */ unsigned long pixel) /* Pixel value to use for window's border. */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; winPtr->atts.border_pixel = pixel; @@ -2071,7 +2071,7 @@ Tk_SetWindowBorderPixmap( Tk_Window tkwin, /* Window to manipulate. */ Pixmap pixmap) /* Pixmap to use for window's border. */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; winPtr->atts.border_pixmap = pixmap; @@ -2089,7 +2089,7 @@ Tk_DefineCursor( Tk_Window tkwin, /* Window to manipulate. */ Tk_Cursor cursor) /* Cursor to use for window (may be None). */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; #if defined(MAC_OSX_TK) winPtr->atts.cursor = (XCursor) cursor; @@ -2116,7 +2116,7 @@ Tk_SetWindowColormap( Tk_Window tkwin, /* Window to manipulate. */ Colormap colormap) /* Colormap to use for window. */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; winPtr->atts.colormap = colormap; @@ -2158,7 +2158,7 @@ Tk_SetWindowVisual( int depth, /* New depth for window. */ Colormap colormap) /* An appropriate colormap for the visual. */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; if (winPtr->window != None) { /* Too late! */ @@ -2201,7 +2201,7 @@ Tk_SetWindowVisual( void TkDoConfigureNotify( - register TkWindow *winPtr) /* Window whose configuration was just + TkWindow *winPtr) /* Window whose configuration was just * changed. */ { XEvent event; @@ -2247,7 +2247,7 @@ Tk_SetClass( Tk_Window tkwin, /* Token for window to assign class. */ const char *className) /* New class for tkwin. */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; winPtr->classUid = Tk_GetUid(className); if (winPtr->flags & TK_WIN_MANAGED) { @@ -2280,7 +2280,7 @@ Tk_SetClassProcs( const Tk_ClassProcs *procs, /* Class procs structure. */ ClientData instanceData) /* Data to be passed to class functions. */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; winPtr->classProcsPtr = procs; winPtr->instanceData = instanceData; diff --git a/win/tkWinButton.c b/win/tkWinButton.c index 7332c93..4e965c2 100644 --- a/win/tkWinButton.c +++ b/win/tkWinButton.c @@ -149,7 +149,7 @@ InitBoxes(void) size = tsdPtr->boxesPtr->biSize + (sizeof(RGBQUAD) << tsdPtr->boxesPtr->biBitCount) + tsdPtr->boxesPtr->biSizeImage; - newBitmap = ckalloc(size); + newBitmap = (LPBITMAPINFOHEADER)ckalloc(size); memcpy(newBitmap, tsdPtr->boxesPtr, size); tsdPtr->boxesPtr = newBitmap; tsdPtr->boxWidth = tsdPtr->boxesPtr->biWidth / 4; @@ -182,7 +182,7 @@ InitBoxes(void) */ void -TkpButtonSetDefaults() +TkpButtonSetDefaults(void) { int width = GetSystemMetrics(SM_CXEDGE); if (width > 0) { @@ -208,11 +208,11 @@ TkpButtonSetDefaults() TkButton * TkpCreateButton( - Tk_Window tkwin) + TCL_UNUSED(Tk_Window)) { WinButton *butPtr; - butPtr = ckalloc(sizeof(WinButton)); + butPtr = (WinButton *)ckalloc(sizeof(WinButton)); butPtr->hwnd = NULL; return (TkButton *) butPtr; } @@ -316,14 +316,14 @@ TkpDisplayButton( { TkWinDCState state; HDC dc; - register TkButton *butPtr = (TkButton *) clientData; + TkButton *butPtr = (TkButton *)clientData; GC gc; Tk_3DBorder border; Pixmap pixmap; int x = 0; /* Initialization only needed to stop compiler * warning. */ int y, relief; - register Tk_Window tkwin = butPtr->tkwin; + Tk_Window tkwin = butPtr->tkwin; int width = 0, height = 0, haveImage = 0, haveText = 0, drawRing = 0; RECT rect; int defaultWidth; /* Width of default ring. */ @@ -818,7 +818,7 @@ TkpDisplayButton( void TkpComputeButtonGeometry( - register TkButton *butPtr) /* Button whose geometry may have changed. */ + TkButton *butPtr) /* Button whose geometry may have changed. */ { int txtWidth, txtHeight; /* Width and height of text */ int imgWidth, imgHeight; /* Width and height of image */ @@ -1264,7 +1264,7 @@ ButtonProc( PAINTSTRUCT ps; BeginPaint(hwnd, &ps); EndPaint(hwnd, &ps); - TkpDisplayButton((ClientData)butPtr); + TkpDisplayButton(butPtr); /* * Special note: must cancel any existing idle handler for @@ -1272,7 +1272,7 @@ ButtonProc( * cleared the REDRAW_PENDING flag. */ - Tcl_CancelIdleCall(TkpDisplayButton, (ClientData)butPtr); + Tcl_CancelIdleCall(TkpDisplayButton, butPtr); return 0; } case BN_CLICKED: { @@ -1287,14 +1287,14 @@ ButtonProc( Tcl_Interp *interp = butPtr->info.interp; if (butPtr->info.state != STATE_DISABLED) { - Tcl_Preserve((ClientData)interp); + Tcl_Preserve(interp); code = TkInvokeButton((TkButton*)butPtr); if (code != TCL_OK && code != TCL_CONTINUE && code != TCL_BREAK) { Tcl_AddErrorInfo(interp, "\n (button invoke)"); Tcl_BackgroundException(interp, code); } - Tcl_Release((ClientData)interp); + Tcl_Release(interp); } Tcl_ServiceAll(); return 0; diff --git a/win/tkWinScrlbr.c b/win/tkWinScrlbr.c index a633dc2..409a6db 100644 --- a/win/tkWinScrlbr.c +++ b/win/tkWinScrlbr.c @@ -4,7 +4,7 @@ * This file implements the Windows specific portion of the scrollbar * widget. * - * Copyright (c) 1996 by Sun Microsystems, Inc. + * Copyright (c) 1996 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -82,7 +82,7 @@ const Tk_ClassProcs tkpScrollbarProcs = { static void WinScrollbarEventProc(ClientData clientData, XEvent *eventPtr) { - WinScrollbar *scrollPtr = clientData; + WinScrollbar *scrollPtr = (WinScrollbar *)clientData; if (eventPtr->type == ButtonPress) { ModalLoop(scrollPtr, eventPtr); @@ -121,7 +121,7 @@ TkpCreateScrollbar( Tcl_MutexUnlock(&winScrlbrMutex); } - scrollPtr = ckalloc(sizeof(WinScrollbar)); + scrollPtr = (WinScrollbar *)ckalloc(sizeof(WinScrollbar)); scrollPtr->winFlags = 0; scrollPtr->hwnd = NULL; @@ -275,7 +275,7 @@ void TkpDisplayScrollbar( ClientData clientData) /* Information about window. */ { - WinScrollbar *scrollPtr = (WinScrollbar *) clientData; + WinScrollbar *scrollPtr = (WinScrollbar *)clientData; Tk_Window tkwin = scrollPtr->info.tkwin; scrollPtr->info.flags &= ~REDRAW_PENDING; @@ -295,7 +295,7 @@ TkpDisplayScrollbar( DestroyWindow(hwnd); CreateProc(tkwin, Tk_WindowId(Tk_Parent(tkwin)), - (ClientData) scrollPtr); + scrollPtr); } else { UpdateScrollbar(scrollPtr); } @@ -383,7 +383,7 @@ UpdateScrollbarMetrics(void) void TkpComputeScrollbarGeometry( - register TkScrollbar *scrollPtr) + TkScrollbar *scrollPtr) /* Scrollbar whose geometry may have * changed. */ { @@ -591,7 +591,7 @@ ScrollbarProc( void TkpConfigureScrollbar( - register TkScrollbar *scrollPtr) + TCL_UNUSED(TkScrollbar *)) /* Information about widget; may or may not * already have values for some fields. */ { @@ -617,7 +617,7 @@ ModalLoop( int oldMode; if (scrollPtr->hwnd) { - Tcl_Preserve((ClientData)scrollPtr); + Tcl_Preserve(scrollPtr); scrollPtr->winFlags |= IN_MODAL_LOOP; oldMode = Tcl_SetServiceMode(TCL_SERVICE_ALL); TkWinResendEvent(scrollPtr->oldProc, scrollPtr->hwnd, eventPtr); @@ -626,7 +626,7 @@ ModalLoop( if (scrollPtr->hwnd && scrollPtr->winFlags & ALREADY_DEAD) { DestroyWindow(scrollPtr->hwnd); } - Tcl_Release((ClientData)scrollPtr); + Tcl_Release(scrollPtr); } } @@ -650,7 +650,7 @@ ModalLoop( int TkpScrollbarPosition( - register TkScrollbar *scrollPtr, + TkScrollbar *scrollPtr, /* Scrollbar widget record. */ int x, int y) /* Coordinates within scrollPtr's window. */ { diff --git a/win/tkWinWm.c b/win/tkWinWm.c index ff83ad2..414df3e 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -358,7 +358,7 @@ typedef struct TkWmInfo { * of top-level windows. */ -static void TopLevelReqProc(ClientData dummy, Tk_Window tkwin); +static void TopLevelReqProc(void *, Tk_Window); static void RemapWindows(TkWindow *winPtr, HWND parentHWND); static const Tk_GeomMgr wmMgrType = { @@ -436,9 +436,9 @@ static BlockOfIconImagesPtr ReadIconOrCursorFromFile(Tcl_Interp *interp, Tcl_Obj* fileName, BOOL isIcon); static WinIconPtr ReadIconFromFile(Tcl_Interp *interp, Tcl_Obj *fileName); +static BOOL AdjustIconImagePointers(LPICONIMAGE lpImage); static WinIconPtr GetIconFromPixmap(Display *dsPtr, Pixmap pixmap); static int ReadICOHeader(Tcl_Channel channel); -static BOOL AdjustIconImagePointers(LPICONIMAGE lpImage); static HICON MakeIconOrCursorFromResource(LPICONIMAGE lpIcon, BOOL isIcon); static HICON GetIcon(WinIconPtr titlebaricon, int icon_size); @@ -2740,10 +2740,8 @@ TkWmDeadWindow( void TkWmSetClass( - TkWindow *winPtr) /* Newly-created top-level window. */ + TCL_UNUSED(TkWindow *)) /* Newly-created top-level window. */ { - (void)winPtr; - /* Do nothing */ return; } @@ -2946,7 +2944,7 @@ Tk_WmObjCmd( static int WmAspectCmd( - Tk_Window tkwin, /* Main window of the application. */ + TCL_UNUSED(Tk_Window), /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ @@ -2954,7 +2952,6 @@ WmAspectCmd( { WmInfo *wmPtr = winPtr->wmInfoPtr; int numer1, denom1, numer2, denom2; - (void)tkwin; if ((objc != 3) && (objc != 7)) { Tcl_WrongNumArgs(interp, 2, objv, @@ -3313,7 +3310,7 @@ WmAttributesCmd( static int WmClientCmd( - Tk_Window tkwin, /* Main window of the application. */ + TCL_UNUSED(Tk_Window), /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ @@ -3322,7 +3319,6 @@ WmClientCmd( WmInfo *wmPtr = winPtr->wmInfoPtr; const char *argv3; int length; - (void)tkwin; if ((objc != 3) && (objc != 4)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?name?"); @@ -3478,7 +3474,7 @@ WmColormapwindowsCmd( static int WmCommandCmd( - Tk_Window tkwin, /* Main window of the application. */ + TCL_UNUSED(Tk_Window), /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ @@ -3488,7 +3484,6 @@ WmCommandCmd( const char *argv3; int cmdArgc; const char **cmdArgv; - (void)tkwin; if ((objc != 3) && (objc != 4)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?value?"); @@ -3548,14 +3543,13 @@ WmCommandCmd( static int WmDeiconifyCmd( - Tk_Window tkwin, /* Main window of the application. */ + TCL_UNUSED(Tk_Window), /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { WmInfo *wmPtr = winPtr->wmInfoPtr; - (void)tkwin; if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "window"); @@ -3601,7 +3595,7 @@ WmDeiconifyCmd( static int WmFocusmodelCmd( - Tk_Window tkwin, /* Main window of the application. */ + TCL_UNUSED(Tk_Window), /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ @@ -3615,7 +3609,6 @@ WmFocusmodelCmd( OPT_ACTIVE, OPT_PASSIVE }; int index; - (void)tkwin; if ((objc != 3) && (objc != 4)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?active|passive?"); @@ -3658,17 +3651,13 @@ WmFocusmodelCmd( static int WmForgetCmd( - Tk_Window tkwin, /* Main window of the application. */ + TCL_UNUSED(Tk_Window), /* Main window of the application. */ TkWindow *winPtr, /* Toplevel or Frame to work with */ - Tcl_Interp *dummy, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument objects. */ + Tcl_Interp *interp, /* Current interpreter. */ + TCL_UNUSED(int), /* Number of arguments. */ + TCL_UNUSED(Tcl_Obj *const *)) /* Argument objects. */ { Tk_Window frameWin = (Tk_Window) winPtr; - (void)tkwin; - (void)dummy; - (void)objc; - (void)objv; if (Tk_IsTopLevel(frameWin)) { Tk_UnmapWindow(frameWin); @@ -3676,10 +3665,10 @@ WmForgetCmd( Tk_MakeWindowExist((Tk_Window)winPtr->parentPtr); RemapWindows(winPtr, Tk_GetHWND(winPtr->parentPtr->window)); - /* - * Make sure wm no longer manages this window - */ - Tk_ManageGeometry(frameWin, NULL, NULL); + /* + * Make sure wm no longer manages this window + */ + Tk_ManageGeometry(frameWin, NULL, NULL); TkWmDeadWindow(winPtr); /* flags (above) must be cleared before calling */ @@ -3710,7 +3699,7 @@ WmForgetCmd( static int WmFrameCmd( - Tk_Window tkwin, /* Main window of the application. */ + TCL_UNUSED(Tk_Window), /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ @@ -3719,7 +3708,6 @@ WmFrameCmd( WmInfo *wmPtr = winPtr->wmInfoPtr; HWND hwnd; char buf[TCL_INTEGER_SPACE]; - (void)tkwin; if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "window"); @@ -3756,7 +3744,7 @@ WmFrameCmd( static int WmGeometryCmd( - Tk_Window tkwin, /* Main window of the application. */ + TCL_UNUSED(Tk_Window), /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ @@ -3766,7 +3754,6 @@ WmGeometryCmd( char xSign, ySign; int width, height; const char *argv3; - (void)tkwin; if ((objc != 3) && (objc != 4)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?newGeometry?"); @@ -3825,7 +3812,7 @@ WmGeometryCmd( static int WmGridCmd( - Tk_Window tkwin, /* Main window of the application. */ + TCL_UNUSED(Tk_Window), /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ @@ -3833,7 +3820,6 @@ WmGridCmd( { WmInfo *wmPtr = winPtr->wmInfoPtr; int reqWidth, reqHeight, widthInc, heightInc; - (void)tkwin; if ((objc != 3) && (objc != 7)) { Tcl_WrongNumArgs(interp, 2, objv, @@ -3987,7 +3973,7 @@ WmGroupCmd( static int WmIconbitmapCmd( - Tk_Window tkwin, /* Main window of the application. */ + TCL_UNUSED(Tk_Window), /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ @@ -3996,7 +3982,6 @@ WmIconbitmapCmd( WmInfo *wmPtr = winPtr->wmInfoPtr; TkWindow *useWinPtr = winPtr; /* window to apply to (NULL if -default) */ const char *string; - (void)tkwin; if ((objc < 3) || (objc > 5)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?-default? ?image?"); @@ -4124,14 +4109,13 @@ WmIconbitmapCmd( static int WmIconifyCmd( - Tk_Window tkwin, /* Main window of the application. */ + TCL_UNUSED(Tk_Window), /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { WmInfo *wmPtr = winPtr->wmInfoPtr; - (void)tkwin; if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "window"); @@ -4249,7 +4233,7 @@ WmIconmaskCmd( static int WmIconnameCmd( - Tk_Window tkwin, /* Main window of the application. */ + TCL_UNUSED(Tk_Window), /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ @@ -4258,7 +4242,6 @@ WmIconnameCmd( WmInfo *wmPtr = winPtr->wmInfoPtr; const char *argv3; int length; - (void)tkwin; if (objc > 4) { Tcl_WrongNumArgs(interp, 2, objv, "window ?newName?"); @@ -4301,7 +4284,7 @@ WmIconnameCmd( static int WmIconphotoCmd( - Tk_Window tkwin, /* Main window of the application. */ + TCL_UNUSED(Tk_Window), /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ @@ -4319,7 +4302,6 @@ WmIconphotoCmd( unsigned size; BITMAPINFO bmInfo; ICONINFO iconInfo; - (void)tkwin; if (objc < 4) { Tcl_WrongNumArgs(interp, 2, objv, @@ -4495,7 +4477,7 @@ WmIconphotoCmd( static int WmIconpositionCmd( - Tk_Window tkwin, /* Main window of the application. */ + TCL_UNUSED(Tk_Window), /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ @@ -4503,7 +4485,6 @@ WmIconpositionCmd( { WmInfo *wmPtr = winPtr->wmInfoPtr; int x, y; - (void)tkwin; if ((objc != 3) && (objc != 5)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?x y?"); @@ -4662,17 +4643,14 @@ WmIconwindowCmd( static int WmManageCmd( - Tk_Window tkwin, /* Main window of the application. */ + TCL_UNUSED(Tk_Window), /* Main window of the application. */ TkWindow *winPtr, /* Toplevel or Frame to work with */ Tcl_Interp *interp, /* Current interpreter. */ - int objc, /* Number of arguments. */ - Tcl_Obj *const objv[]) /* Argument objects. */ + TCL_UNUSED(int), /* Number of arguments. */ + TCL_UNUSED(Tcl_Obj *const *)) /* Argument objects. */ { Tk_Window frameWin = (Tk_Window) winPtr; WmInfo *wmPtr = winPtr->wmInfoPtr; - (void)tkwin; - (void)objc; - (void)objv; if (!Tk_IsTopLevel(frameWin)) { if (!Tk_IsManageable(frameWin)) { @@ -4719,7 +4697,7 @@ WmManageCmd( static int WmMaxsizeCmd( - Tk_Window tkwin, /* Main window of the application. */ + TCL_UNUSED(Tk_Window), /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ @@ -4727,7 +4705,6 @@ WmMaxsizeCmd( { WmInfo *wmPtr = winPtr->wmInfoPtr; int width, height; - (void)tkwin; if ((objc != 3) && (objc != 5)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?width height?"); @@ -4771,7 +4748,7 @@ WmMaxsizeCmd( static int WmMinsizeCmd( - Tk_Window tkwin, /* Main window of the application. */ + TCL_UNUSED(Tk_Window), /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ @@ -4779,7 +4756,6 @@ WmMinsizeCmd( { WmInfo *wmPtr = winPtr->wmInfoPtr; int width, height; - (void)tkwin; if ((objc != 3) && (objc != 5)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?width height?"); @@ -4823,7 +4799,7 @@ WmMinsizeCmd( static int WmOverrideredirectCmd( - Tk_Window tkwin, /* Main window of the application. */ + TCL_UNUSED(Tk_Window), /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ @@ -4832,7 +4808,6 @@ WmOverrideredirectCmd( WmInfo *wmPtr = winPtr->wmInfoPtr; int boolean, curValue; XSetWindowAttributes atts; - (void)tkwin; if ((objc != 3) && (objc != 4)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?boolean?"); @@ -4896,7 +4871,7 @@ WmOverrideredirectCmd( static int WmPositionfromCmd( - Tk_Window tkwin, /* Main window of the application. */ + TCL_UNUSED(Tk_Window), /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ @@ -4910,7 +4885,6 @@ WmPositionfromCmd( OPT_PROGRAM, OPT_USER }; int index; - (void)tkwin; if ((objc != 3) && (objc != 4)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?user/program?"); @@ -4965,7 +4939,7 @@ WmPositionfromCmd( static int WmProtocolCmd( - Tk_Window tkwin, /* Main window of the application. */ + TCL_UNUSED(Tk_Window), /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ @@ -4977,7 +4951,6 @@ WmProtocolCmd( const char *cmd; int cmdLength; Tcl_Obj *resultObj; - (void)tkwin; if ((objc < 3) || (objc > 5)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?name? ?command?"); @@ -5062,7 +5035,7 @@ WmProtocolCmd( static int WmResizableCmd( - Tk_Window tkwin, /* Main window of the application. */ + TCL_UNUSED(Tk_Window), /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ @@ -5070,7 +5043,6 @@ WmResizableCmd( { WmInfo *wmPtr = winPtr->wmInfoPtr; int width, height; - (void)tkwin; if ((objc != 3) && (objc != 5)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?width height?"); @@ -5125,7 +5097,7 @@ WmResizableCmd( static int WmSizefromCmd( - Tk_Window tkwin, /* Main window of the application. */ + TCL_UNUSED(Tk_Window), /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ @@ -5139,7 +5111,6 @@ WmSizefromCmd( OPT_PROGRAM, OPT_USER }; int index; - (void)tkwin; if ((objc != 3) && (objc != 4)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?user|program?"); @@ -5323,7 +5294,7 @@ WmStackorderCmd( static int WmStateCmd( - Tk_Window tkwin, /* Main window of the application. */ + TCL_UNUSED(Tk_Window), /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ @@ -5337,7 +5308,6 @@ WmStateCmd( OPT_NORMAL, OPT_ICONIC, OPT_WITHDRAWN, OPT_ZOOMED }; int index; - (void)tkwin; if ((objc < 3) || (objc > 4)) { Tcl_WrongNumArgs(interp, 2, objv, "window ?state?"); @@ -5464,7 +5434,7 @@ WmStateCmd( static int WmTitleCmd( - Tk_Window tkwin, /* Main window of the application. */ + TCL_UNUSED(Tk_Window), /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ @@ -5474,7 +5444,6 @@ WmTitleCmd( const char *argv3; int length; HWND wrapper; - (void)tkwin; if (objc > 4) { Tcl_WrongNumArgs(interp, 2, objv, "window ?newTitle?"); @@ -5670,14 +5639,13 @@ WmTransientCmd( static int WmWithdrawCmd( - Tk_Window tkwin, /* Main window of the application. */ + TCL_UNUSED(Tk_Window), /* Main window of the application. */ TkWindow *winPtr, /* Toplevel to work with */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { WmInfo *wmPtr = winPtr->wmInfoPtr; - (void)tkwin; if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "window"); @@ -5986,12 +5954,11 @@ TopLevelEventProc( static void TopLevelReqProc( - ClientData dummy, /* Not used. */ + TCL_UNUSED(void *), Tk_Window tkwin) /* Information about window. */ { TkWindow *winPtr = (TkWindow *) tkwin; WmInfo *wmPtr; - (void)dummy; wmPtr = winPtr->wmInfoPtr; if (wmPtr) { @@ -6538,15 +6505,13 @@ Tk_CoordsToWindow( void Tk_GetVRootGeometry( - Tk_Window tkwin, /* Window whose virtual root is to be + TCL_UNUSED(Tk_Window), /* Window whose virtual root is to be * queried. */ int *xPtr, int *yPtr, /* Store x and y offsets of virtual root * here. */ int *widthPtr, int *heightPtr) /* Store dimensions of virtual root here. */ { - (void)tkwin; - *xPtr = GetSystemMetrics(SM_XVIRTUALSCREEN); *yPtr = GetSystemMetrics(SM_YVIRTUALSCREEN); *widthPtr = GetSystemMetrics(SM_CXVIRTUALSCREEN); |