diff options
-rw-r--r-- | win/tkWinClipboard.c | 17 | ||||
-rw-r--r-- | win/tkWinDialog.c | 94 | ||||
-rw-r--r-- | win/tkWinFont.c | 15 | ||||
-rw-r--r-- | win/tkWinInit.c | 3 | ||||
-rw-r--r-- | win/tkWinMenu.c | 125 | ||||
-rw-r--r-- | win/tkWinPixmap.c | 18 | ||||
-rw-r--r-- | win/tkWinSend.c | 9 |
7 files changed, 107 insertions, 174 deletions
diff --git a/win/tkWinClipboard.c b/win/tkWinClipboard.c index 840938d..1cf2219 100644 --- a/win/tkWinClipboard.c +++ b/win/tkWinClipboard.c @@ -4,7 +4,7 @@ * This file contains functions for managing the clipboard. * * Copyright (c) 1995-1997 Sun Microsystems, Inc. - * Copyright (c) 1998-2000 by Scriptics Corporation. + * Copyright (c) 1998-2000 Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -227,15 +227,13 @@ TkSelGetSelection( int XSetSelectionOwner( - Display *display, + TCL_UNUSED(Display *), Atom selection, Window owner, - Time time) + TCL_UNUSED(Time)) { HWND hwnd = owner ? TkWinGetHWND(owner) : NULL; Tk_Window tkwin; - (void)display; - (void)time; /* * This is a gross hack because the Tk_InternAtom interface is broken. It @@ -277,7 +275,7 @@ XSetSelectionOwner( void TkWinClipboardRender( TkDisplay *dispPtr, - UINT format) + TCL_UNUSED(UINT)) { TkClipboardTarget *targetPtr; TkClipboardBuffer *cbPtr; @@ -285,7 +283,6 @@ TkWinClipboardRender( char *buffer, *p, *rawText, *endPtr; int length; Tcl_DString ds; - (void)format; for (targetPtr = dispPtr->clipTargetPtr; targetPtr != NULL; targetPtr = targetPtr->nextPtr) { @@ -369,10 +366,9 @@ TkWinClipboardRender( void TkSelUpdateClipboard( TkWindow *winPtr, - TkClipboardTarget *targetPtr) + TCL_UNUSED(TkClipboardTarget *)) { HWND hwnd = TkWinGetHWND(winPtr->window); - (void)targetPtr; UpdateClipboard(hwnd); } @@ -453,9 +449,8 @@ TkSelEventProc( void TkSelPropProc( - XEvent *eventPtr) /* X PropertyChange event. */ + TCL_UNUSED(XEvent *)) /* X PropertyChange event. */ { - (void)eventPtr; } /* diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c index ef3a5fb..4aa88b1 100644 --- a/win/tkWinDialog.c +++ b/win/tkWinDialog.c @@ -800,8 +800,8 @@ Tk_ChooseColorObjCmd( optionPtr = objv[i]; valuePtr = objv[i + 1]; - if (Tcl_GetIndexFromObjStruct(interp, optionPtr, optionStrings, - sizeof(char *), "option", TCL_EXACT, &index) != TCL_OK) { + if (Tcl_GetIndexFromObj(interp, optionPtr, optionStrings, + "option", TCL_EXACT, &index) != TCL_OK) { return TCL_ERROR; } if (i + 1 == objc) { @@ -902,14 +902,13 @@ static UINT CALLBACK ColorDlgHookProc( HWND hDlg, /* Handle to the color dialog. */ UINT uMsg, /* Type of message. */ - WPARAM wParam, /* First message parameter. */ + TCL_UNUSED(WPARAM), /* First message parameter. */ LPARAM lParam) /* Second message parameter. */ { ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); const char *title; CHOOSECOLORW *ccPtr; - (void)wParam; if (WM_INITDIALOG == uMsg) { @@ -1071,7 +1070,7 @@ ParseOFNOptions( }; static const struct Options dirOptions[] = { {"-initialdir", FILE_INITDIR}, - {"-mustexist", FILE_MUSTEXIST}, + {"-mustexist", FILE_MUSTEXIST}, {"-parent", FILE_PARENT}, {"-title", FILE_TITLE}, {NULL, FILE_DEFAULT/*ignored*/ } @@ -1211,30 +1210,29 @@ static int VistaFileDialogsAvailable(void) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); if (tsdPtr->newFileDialogsState == FDLG_STATE_INIT) { - tsdPtr->newFileDialogsState = FDLG_STATE_USE_OLD; - LoadShellProcs(); - if (ShellProcs.SHCreateItemFromParsingName != NULL) { - hr = CoInitialize(0); - /* XXX - need we schedule CoUninitialize at thread shutdown ? */ - - /* Ensure all COM interfaces we use are available */ - if (SUCCEEDED(hr)) { - hr = CoCreateInstance(&ClsidFileOpenDialog, NULL, - CLSCTX_INPROC_SERVER, &IIDIFileOpenDialog, (void **) &fdlgPtr); - if (SUCCEEDED(hr)) { - fdlgPtr->lpVtbl->Release(fdlgPtr); - hr = CoCreateInstance(&ClsidFileSaveDialog, NULL, - CLSCTX_INPROC_SERVER, &IIDIFileSaveDialog, - (void **) &fdlgPtr); - if (SUCCEEDED(hr)) { - fdlgPtr->lpVtbl->Release(fdlgPtr); - - /* Looks like we have all we need */ - tsdPtr->newFileDialogsState = FDLG_STATE_USE_NEW; - } - } - } - } + tsdPtr->newFileDialogsState = FDLG_STATE_USE_OLD; + LoadShellProcs(); + if (ShellProcs.SHCreateItemFromParsingName != NULL) { + hr = CoInitialize(0); + /* XXX - need we schedule CoUninitialize at thread shutdown ? */ + + /* Ensure all COM interfaces we use are available */ + if (SUCCEEDED(hr)) { + hr = CoCreateInstance(&ClsidFileOpenDialog, NULL, + CLSCTX_INPROC_SERVER, &IIDIFileOpenDialog, (void **) &fdlgPtr); + if (SUCCEEDED(hr)) { + fdlgPtr->lpVtbl->Release(fdlgPtr); + hr = CoCreateInstance(&ClsidFileSaveDialog, NULL, + CLSCTX_INPROC_SERVER, &IIDIFileSaveDialog, (void **) &fdlgPtr); + if (SUCCEEDED(hr)) { + fdlgPtr->lpVtbl->Release(fdlgPtr); + + /* Looks like we have all we need */ + tsdPtr->newFileDialogsState = FDLG_STATE_USE_NEW; + } + } + } + } } return (tsdPtr->newFileDialogsState == FDLG_STATE_USE_NEW); @@ -1918,14 +1916,13 @@ static UINT APIENTRY OFNHookProc( HWND hdlg, /* Handle to child dialog window. */ UINT uMsg, /* Message identifier */ - WPARAM wParam, /* Message parameter */ + TCL_UNUSED(WPARAM), /* Message parameter */ LPARAM lParam) /* Message parameter */ { ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); OPENFILENAME *ofnPtr; OFNData *ofnData; - (void)wParam; if (uMsg == WM_INITDIALOG) { TkWinSetUserData(hdlg, lParam); @@ -2827,8 +2824,8 @@ Tk_MessageBoxObjCmd( optionPtr = objv[i]; valuePtr = objv[i + 1]; - if (Tcl_GetIndexFromObjStruct(interp, optionPtr, optionStrings, - sizeof(char *), "option", TCL_EXACT, &index) != TCL_OK) { + if (Tcl_GetIndexFromObj(interp, optionPtr, optionStrings, + "option", TCL_EXACT, &index) != TCL_OK) { return TCL_ERROR; } if (i + 1 == objc) { @@ -3265,7 +3262,7 @@ FontchooserCget( } break; case FontchooserVisible: - resObj = Tcl_NewBooleanObj(hdPtr->hwnd && IsWindow(hdPtr->hwnd)); + resObj = Tcl_NewBooleanObj((hdPtr->hwnd != NULL) && IsWindow(hdPtr->hwnd)); break; default: resObj = Tcl_NewStringObj("", 0); @@ -3328,8 +3325,8 @@ FontchooserConfigureCmd( for (i = 1; i < objc; i += 2) { int optionIndex; - if (Tcl_GetIndexFromObjStruct(interp, objv[i], optionStrings, - sizeof(char *), "option", 0, &optionIndex) != TCL_OK) { + if (Tcl_GetIndexFromObj(interp, objv[i], optionStrings, + "option", 0, &optionIndex) != TCL_OK) { return TCL_ERROR; } if (objc == 2) { @@ -3437,8 +3434,8 @@ static int FontchooserShowCmd( ClientData clientData, /* Main window */ Tcl_Interp *interp, - int objc, - Tcl_Obj *const objv[]) + TCL_UNUSED(int), + TCL_UNUSED(Tcl_Obj *const *)) { Tcl_DString ds; Tk_Window tkwin = (Tk_Window)clientData, parent; @@ -3447,8 +3444,6 @@ FontchooserShowCmd( HDC hdc; HookData *hdPtr; int r = TCL_OK, oldMode = 0; - (void)objc; - (void)objv; hdPtr = (HookData *)Tcl_GetAssocData(interp, "::tk::fontchooser", NULL); @@ -3551,15 +3546,12 @@ FontchooserShowCmd( static int FontchooserHideCmd( - ClientData dummy, /* Main window */ + TCL_UNUSED(void *), Tcl_Interp *interp, - int objc, - Tcl_Obj *const objv[]) + TCL_UNUSED(int), + TCL_UNUSED(Tcl_Obj *const *)) { HookData *hdPtr = (HookData *)Tcl_GetAssocData(interp, "::tk::fontchooser", NULL); - (void)dummy; - (void)objc; - (void)objv; if (hdPtr->hwnd && IsWindow(hdPtr->hwnd)) { EndDialog(hdPtr->hwnd, 0); @@ -3579,10 +3571,11 @@ FontchooserHideCmd( */ static void -DeleteHookData(ClientData clientData, Tcl_Interp *dummy) +DeleteHookData( + void *clientData, + TCL_UNUSED(Tcl_Interp *)) { HookData *hdPtr = (HookData *)clientData; - (void)dummy; if (hdPtr->parentObj) { Tcl_DecrRefCount(hdPtr->parentObj); @@ -3619,10 +3612,11 @@ const TkEnsemble tkFontchooserEnsemble[] = { }; int -TkInitFontchooser(Tcl_Interp *interp, ClientData dummy) +TkInitFontchooser( + Tcl_Interp *interp, + TCL_UNUSED(void *)) { HookData *hdPtr = (HookData *)ckalloc(sizeof(HookData)); - (void)dummy; memset(hdPtr, 0, sizeof(HookData)); Tcl_SetAssocData(interp, "::tk::fontchooser", DeleteHookData, hdPtr); diff --git a/win/tkWinFont.c b/win/tkWinFont.c index c6da8ee..375af22 100644 --- a/win/tkWinFont.c +++ b/win/tkWinFont.c @@ -6,7 +6,7 @@ * * Copyright (c) 1994 Software Research Associates, Inc. * Copyright (c) 1995-1997 Sun Microsystems, Inc. - * Copyright (c) 1998-1999 by Scriptics Corporation. + * Copyright (c) 1998-1999 Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -850,7 +850,7 @@ Tk_MeasureChars( if (thisSubFontPtr != lastSubFontPtr) { familyPtr = lastSubFontPtr->familyPtr; Tcl_UtfToExternalDString(familyPtr->encoding, start, - (int) (p - start), &runString); + p - start, &runString); size.cx = 0; familyPtr->getTextExtentPoint32Proc(hdc, (WCHAR *)Tcl_DStringValue(&runString), @@ -878,7 +878,7 @@ Tk_MeasureChars( familyPtr = lastSubFontPtr->familyPtr; Tcl_UtfToExternalDString(familyPtr->encoding, start, - (int) (p - start), &runString); + p - start, &runString); size.cx = 0; familyPtr->getTextExtentPoint32Proc(hdc, (WCHAR *) Tcl_DStringValue(&runString), Tcl_DStringLength(&runString) >> familyPtr->isWideFont, @@ -1416,7 +1416,7 @@ TkpDrawAngledCharsInContext( * passed to this function. If they are not * stripped out, they will be displayed as * regular printing characters. */ - int numBytes, /* Number of bytes in string. */ + TCL_UNUSED(int), /* Number of bytes in string. */ int rangeStart, /* Index of first byte to draw. */ int rangeLength, /* Length of range to draw in bytes. */ double x, double y, /* Coordinates at which to place origin of the @@ -1426,7 +1426,6 @@ TkpDrawAngledCharsInContext( { int widthUntilStart; double sinA = sin(angle * PI/180.0), cosA = cos(angle * PI/180.0); - (void) numBytes; /*unused*/ Tk_MeasureChars(tkfont, source, rangeStart, -1, 0, &widthUntilStart); TkDrawAngledChars(display, drawable, gc, tkfont, source + rangeStart, @@ -1494,7 +1493,7 @@ MultiFontTextOut( if (p > source) { familyPtr = lastSubFontPtr->familyPtr; Tcl_UtfToExternalDString(familyPtr->encoding, source, - (int) (p - source), &runString); + p - source, &runString); familyPtr->textOutProc(hdc, (int)(x-(double)tm.tmOverhang/2.0), y, (WCHAR *)Tcl_DStringValue(&runString), Tcl_DStringLength(&runString) >> familyPtr->isWideFont); @@ -1516,7 +1515,7 @@ MultiFontTextOut( if (p > source) { familyPtr = lastSubFontPtr->familyPtr; Tcl_UtfToExternalDString(familyPtr->encoding, source, - (int) (p - source), &runString); + p - source, &runString); familyPtr->textOutProc(hdc, (int)(x-(double)tm.tmOverhang/2.0), y, (WCHAR *)Tcl_DStringValue(&runString), Tcl_DStringLength(&runString) >> familyPtr->isWideFont); @@ -1818,7 +1817,7 @@ AllocFontFamily( &familyPtr->endCount, &familyPtr->isSymbolFont); encoding = NULL; - if (familyPtr->isSymbolFont != 0) { + if (familyPtr->isSymbolFont) { /* * Symbol fonts are handled specially. For instance, Unicode 0393 * (GREEK CAPITAL GAMMA) must be mapped to Symbol character 0047 diff --git a/win/tkWinInit.c b/win/tkWinInit.c index 854d62f..22f721f 100644 --- a/win/tkWinInit.c +++ b/win/tkWinInit.c @@ -33,9 +33,8 @@ int TkpInit( - Tcl_Interp *interp) + TCL_UNUSED(Tcl_Interp *)) { - (void)interp; /* * This is necessary for static initialization, and is ok otherwise * because TkWinXInit flips a static bit to do its work just once. diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c index 7634147..a07765a 100644 --- a/win/tkWinMenu.c +++ b/win/tkWinMenu.c @@ -4,8 +4,8 @@ * This module implements the Windows platform-specific features of * menus. * - * Copyright (c) 1996-1998 by Sun Microsystems, Inc. - * Copyright (c) 1998-1999 by Scriptics Corporation. + * Copyright (c) 1996-1998 Sun Microsystems, Inc. + * Copyright (c) 1998-1999 Scriptics Corporation. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -762,7 +762,7 @@ ReconfigureWindowsMenu( int TkpPostMenu( - Tcl_Interp *dummy, + TCL_UNUSED(Tcl_Interp *), TkMenu *menuPtr, int x, int y, int index) { @@ -774,7 +774,6 @@ TkpPostMenu( int oldServiceMode = Tcl_GetServiceMode(); ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); - (void)dummy; tsdPtr->inPostMenu++; CallPendingReconfigureImmediately(menuPtr); @@ -873,14 +872,13 @@ TkpPostMenu( int TkpPostTearoffMenu( - Tcl_Interp *dummy, /* The interpreter of the menu */ + TCL_UNUSED(Tcl_Interp *), /* The interpreter of the menu */ TkMenu *menuPtr, /* The menu we are posting */ int x, int y, int index) /* The root X,Y coordinates where we are * posting */ { int vRootX, vRootY, vRootWidth, vRootHeight; int result; - (void)dummy; TkActivateMenuEntry(menuPtr, -1); TkRecomputeMenu(menuPtr); @@ -1140,7 +1138,7 @@ TkWinEmbeddedMenuProc( int TkWinHandleMenuEvent( - HWND *phwnd, + TCL_UNUSED(HWND *), UINT *pMessage, WPARAM *pwParam, LPARAM *plParam, @@ -1152,7 +1150,6 @@ TkWinHandleMenuEvent( TkMenuEntry *mePtr; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); - (void)phwnd; switch (*pMessage) { case WM_UNINITMENUPOPUP: @@ -1258,7 +1255,8 @@ TkWinHandleMenuEvent( hashEntryPtr = Tcl_FindHashEntry(&tsdPtr->winMenuTable, *plParam); if (hashEntryPtr != NULL) { - int i, len, underline; + int i, len; + int underline; Tcl_Obj *labelPtr; WCHAR *wlabel; int menuChar; @@ -1422,7 +1420,7 @@ TkWinHandleMenuEvent( } mePtr = NULL; if (flags != 0xFFFF) { - if ((flags&MF_POPUP) && (entryIndex<menuPtr->numEntries)) { + if ((flags&MF_POPUP) && (entryIndex < menuPtr->numEntries)) { mePtr = menuPtr->entries[entryIndex]; } else { hashEntryPtr = Tcl_FindHashEntry(&tsdPtr->commandTable, @@ -1560,15 +1558,11 @@ TkpSetWindowMenuBar( void TkpSetMainMenubar( - Tcl_Interp *interp, /* The interpreter of the application */ - Tk_Window tkwin, /* The frame we are setting up */ - const char *menuName) /* The name of the menu to put in front. If + TCL_UNUSED(Tcl_Interp *), /* The interpreter of the application */ + TCL_UNUSED(Tk_Window), /* The frame we are setting up */ + TCL_UNUSED(const char *)) /* The name of the menu to put in front. If * NULL, use the default menu bar. */ { - (void)interp; - (void)tkwin; - (void)menuName; - /* * Nothing to do. */ @@ -1594,15 +1588,11 @@ void GetMenuIndicatorGeometry( TkMenu *menuPtr, /* The menu we are measuring */ TkMenuEntry *mePtr, /* The entry we are measuring */ - Tk_Font tkfont, /* Precalculated font */ - const Tk_FontMetrics *fmPtr,/* Precalculated font metrics */ + TCL_UNUSED(Tk_Font), /* Precalculated font */ + TCL_UNUSED(const Tk_FontMetrics *),/* Precalculated font metrics */ int *widthPtr, /* The resulting width */ int *heightPtr) /* The resulting height */ { - (void)menuPtr; - (void)tkfont; - (void)fmPtr; - *heightPtr = indicatorDimensions[0]; if (mePtr->hideMargin) { *widthPtr = 0; @@ -1686,15 +1676,12 @@ GetMenuAccelGeometry( void GetTearoffEntryGeometry( TkMenu *menuPtr, /* The menu we are measuring */ - TkMenuEntry *mePtr, /* The entry we are measuring */ - Tk_Font tkfont, /* The precalculated font */ + TCL_UNUSED(TkMenuEntry *), /* The entry we are measuring */ + TCL_UNUSED(Tk_Font), /* The precalculated font */ const Tk_FontMetrics *fmPtr,/* The precalculated font metrics */ int *widthPtr, /* The resulting width */ int *heightPtr) /* The resulting height */ { - (void)mePtr; - (void)tkfont; - if (menuPtr->menuType != MAIN_MENU) { *heightPtr = 0; } else { @@ -1721,17 +1708,13 @@ GetTearoffEntryGeometry( void GetMenuSeparatorGeometry( - TkMenu *menuPtr, /* The menu we are measuring */ - TkMenuEntry *mePtr, /* The entry we are measuring */ - Tk_Font tkfont, /* The precalculated font */ + TCL_UNUSED(TkMenu *), /* The menu we are measuring */ + TCL_UNUSED(TkMenuEntry *), /* The entry we are measuring */ + TCL_UNUSED(Tk_Font), /* The precalculated font */ const Tk_FontMetrics *fmPtr,/* The precalcualted font metrics */ int *widthPtr, /* The resulting width */ int *heightPtr) /* The resulting height */ { - (void)menuPtr; - (void)mePtr; - (void)tkfont; - *widthPtr = 0; *heightPtr = fmPtr->linespace - (2 * fmPtr->descent); } @@ -1838,18 +1821,13 @@ DrawMenuEntryIndicator( Drawable d, /* What we are drawing into */ GC gc, /* The gc we are drawing with */ GC indicatorGC, /* The gc for indicator objects */ - Tk_Font tkfont, /* The precalculated font */ - const Tk_FontMetrics *fmPtr,/* The precalculated font metrics */ + TCL_UNUSED(Tk_Font), /* The precalculated font */ + TCL_UNUSED(const Tk_FontMetrics *),/* The precalculated font metrics */ int x, /* Left edge */ int y, /* Top edge */ - int width, - int height) + TCL_UNUSED(int), + TCL_UNUSED(int)) { - (void)tkfont; - (void)fmPtr; - (void)width; - (void)height; - if ((mePtr->type == CHECK_BUTTON_ENTRY) || (mePtr->type == RADIO_BUTTON_ENTRY)) { if (mePtr->indicatorOn && (mePtr->entryFlags & ENTRY_SELECTED)) { @@ -1921,18 +1899,15 @@ DrawMenuEntryAccelerator( GC gc, /* The gc we are drawing with */ Tk_Font tkfont, /* The precalculated font */ const Tk_FontMetrics *fmPtr,/* The precalculated font metrics */ - Tk_3DBorder activeBorder, /* The border when an item is active */ + TCL_UNUSED(Tk_3DBorder), /* The border when an item is active */ int x, /* left edge */ int y, /* top edge */ - int width, /* Width of menu entry */ + TCL_UNUSED(int), /* Width of menu entry */ int height) /* Height of menu entry */ { int baseline; int leftEdge = x + mePtr->indicatorSpace + mePtr->labelWidth; const char *accel; - (void)activeBorder; - (void)width; - (void)height; if (menuPtr->menuType == MENUBAR) { return; @@ -1995,7 +1970,7 @@ DrawMenuEntryArrow( TkMenuEntry *mePtr, /* The entry we are drawing */ Drawable d, /* What we are drawing into */ GC gc, /* The gc we are drawing with */ - Tk_3DBorder activeBorder, /* The border when an item is active */ + TCL_UNUSED(Tk_3DBorder), /* The border when an item is active */ int x, /* left edge */ int y, /* top edge */ int width, /* Width of menu entry */ @@ -2007,8 +1982,6 @@ DrawMenuEntryArrow( COLORREF oldFgColor; COLORREF oldBgColor; RECT rect; - (void)gc; - (void)activeBorder; if (!drawArrow || (mePtr->type != CASCADE_ENTRY)) { return; @@ -2077,11 +2050,11 @@ DrawMenuEntryArrow( void DrawMenuSeparator( TkMenu *menuPtr, /* The menu we are drawing */ - TkMenuEntry *mePtr, /* The entry we are drawing */ + TCL_UNUSED(TkMenuEntry *), /* The entry we are drawing */ Drawable d, /* What we are drawing into */ - GC gc, /* The gc we are drawing with */ - Tk_Font tkfont, /* The precalculated font */ - const Tk_FontMetrics *fmPtr,/* The precalculated font metrics */ + TCL_UNUSED(GC), /* The gc we are drawing with */ + TCL_UNUSED(Tk_Font), /* The precalculated font */ + TCL_UNUSED(const Tk_FontMetrics *),/* The precalculated font metrics */ int x, /* left edge */ int y, /* top edge */ int width, /* width of item */ @@ -2089,10 +2062,6 @@ DrawMenuSeparator( { XPoint points[2]; Tk_3DBorder border; - (void)mePtr; - (void)gc; - (void)tkfont; - (void)fmPtr; points[0].x = x; points[0].y = y + height / 2; @@ -2129,12 +2098,9 @@ DrawMenuUnderline( const Tk_FontMetrics *fmPtr,/* The precalculated font metrics */ int x, /* Left Edge */ int y, /* Top Edge */ - int width, /* Width of entry */ + TCL_UNUSED(int), /* Width of entry */ int height) /* Height of entry */ { - (void)fmPtr; - (void)width; - if ((mePtr->underline >= 0) && (mePtr->labelPtr != NULL)) { int len; @@ -2175,7 +2141,7 @@ DrawMenuUnderline( static int TkWinMenuKeyObjCmd( - ClientData dummy, /* Unused. */ + TCL_UNUSED(void *), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -2187,7 +2153,6 @@ TkWinMenuKeyObjCmd( TkWindow *winPtr; KeySym keySym; int i; - (void)dummy; if (objc != 3) { Tcl_WrongNumArgs(interp, 1, objv, "window keySym"); @@ -2587,21 +2552,17 @@ TkpComputeMenubarGeometry( void DrawTearoffEntry( TkMenu *menuPtr, /* The menu we are drawing */ - TkMenuEntry *mePtr, /* The entry we are drawing */ + TCL_UNUSED(TkMenuEntry *), /* The entry we are drawing */ Drawable d, /* The drawable we are drawing into */ - GC gc, /* The gc we are drawing with */ - Tk_Font tkfont, /* The font we are drawing with */ - const Tk_FontMetrics *fmPtr,/* The metrics we are drawing with */ + TCL_UNUSED(GC), /* The gc we are drawing with */ + TCL_UNUSED(Tk_Font), /* The font we are drawing with */ + TCL_UNUSED(const Tk_FontMetrics *),/* The metrics we are drawing with */ int x, int y, int width, int height) { XPoint points[2]; int segmentWidth, maxX; Tk_3DBorder border; - (void)mePtr; - (void)gc; - (void)tkfont; - (void)fmPtr; if (menuPtr->menuType != MAIN_MENU) { return; @@ -3250,11 +3211,10 @@ TkpMenuNotifyToplevelCreate( HWND Tk_GetMenuHWND( - Tk_Window tkwin) + TCL_UNUSED(Tk_Window)) { ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); - (void)tkwin; TkMenuInit(); return tsdPtr->embeddedMenuHWND; @@ -3278,10 +3238,8 @@ Tk_GetMenuHWND( static void MenuExitHandler( - ClientData dummy) /* Not used */ + TCL_UNUSED(void *)) /* Not used */ { - (void)dummy; - UnregisterClassW(MENU_CLASS_NAME, Tk_GetHINSTANCE()); UnregisterClassW(EMBEDDED_MENU_CLASS_NAME, Tk_GetHINSTANCE()); } @@ -3305,11 +3263,10 @@ MenuExitHandler( static void MenuThreadExitHandler( - ClientData dummy) /* Not used */ + TCL_UNUSED(void *)) { ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); - (void)dummy; DestroyWindow(tsdPtr->menuHWND); DestroyWindow(tsdPtr->embeddedMenuHWND); @@ -3341,13 +3298,11 @@ MenuThreadExitHandler( Tcl_Obj * TkWinGetMenuSystemDefault( - Tk_Window tkwin, /* A window to use. */ + TCL_UNUSED(Tk_Window), /* A window to use. */ const char *dbName, /* The option database name. */ - const char *className) /* The name of the option class. */ + TCL_UNUSED(const char *)) /* The name of the option class. */ { Tcl_Obj *valuePtr = NULL; - (void)tkwin; - (void)className; if ((strcmp(dbName, "activeBorderWidth") == 0) || (strcmp(dbName, "borderWidth") == 0)) { diff --git a/win/tkWinPixmap.c b/win/tkWinPixmap.c index 51ff88c..9bd336a 100644 --- a/win/tkWinPixmap.c +++ b/win/tkWinPixmap.c @@ -197,23 +197,17 @@ TkSetPixmapColormap( int XGetGeometry( - Display *display, + TCL_UNUSED(Display *), Drawable d, - Window *root_return, - int *x_return, - int *y_return, + TCL_UNUSED(Window *), + TCL_UNUSED(int *), + TCL_UNUSED(int *), unsigned int *width_return, unsigned int *height_return, - unsigned int *border_width_return, - unsigned int *depth_return) + TCL_UNUSED(unsigned int *), + TCL_UNUSED(unsigned int *)) { TkWinDrawable *twdPtr = (TkWinDrawable *)d; - (void)display; - (void)root_return; - (void)x_return; - (void)y_return; - (void)border_width_return; - (void)depth_return; if (twdPtr->type == TWD_BITMAP) { HDC dc; diff --git a/win/tkWinSend.c b/win/tkWinSend.c index 799961f..0381fb2 100644 --- a/win/tkWinSend.c +++ b/win/tkWinSend.c @@ -4,7 +4,7 @@ * This file provides functions that implement the "send" command, * allowing commands to be passed from interpreter to interpreter. * - * Copyright (c) 1997 by Sun Microsystems, Inc. + * Copyright (c) 1997 Sun Microsystems, Inc. * Copyright (c) 2003 Pat Thoyts <patthoyts@users.sourceforge.net> * * See the file "license.terms" for information on usage and redistribution of @@ -740,8 +740,7 @@ Send( * object. */ Tcl_Interp *interp, /* The local interpreter. */ int async, /* Flag for the calling style. */ - ClientData dummy, /* The RegisteredInterp structure for this - * interp. */ + TCL_UNUSED(void *), int objc, /* Number of arguments to be sent. */ Tcl_Obj *const objv[]) /* The arguments to be sent. */ { @@ -754,7 +753,6 @@ Send( DISPID dispid; Tcl_DString ds; const char *src; - (void)dummy; cmd = Tcl_ConcatObj(objc, objv); @@ -971,10 +969,9 @@ TkWinSend_QueueCommand( static int SendEventProc( Tcl_Event *eventPtr, - int flags) + TCL_UNUSED(int)) { SendEvent *evPtr = (SendEvent *)eventPtr; - (void)flags; TRACE("SendEventProc\n"); |