From 1d9e4b35ac1edb7acb7a11bb871ab2a8d4263892 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 15 Jun 2010 11:16:02 +0000 Subject: Eliminate many unnecessary (ClientData) type casts. --- ChangeLog | 21 +++++++++++++++++++++ generic/tkCanvArc.c | 14 +++++++------- generic/tkCanvBmap.c | 6 +++--- generic/tkCanvImg.c | 6 +++--- generic/tkCanvLine.c | 18 +++++++++--------- generic/tkCanvPoly.c | 14 +++++++------- generic/tkCanvText.c | 8 ++++---- generic/tkCanvWind.c | 6 +++--- generic/tkCanvas.c | 7 +++---- generic/tkRectOval.c | 12 ++++++------ generic/tkScrollbar.c | 4 ++-- generic/tkStyle.c | 5 ++--- generic/tkTest.c | 21 ++++++++++----------- unix/tkUnixEmbed.c | 18 +++++++++--------- unix/tkUnixEvent.c | 8 ++++---- unix/tkUnixScale.c | 14 +++++++------- unix/tkUnixScrlbr.c | 4 ++-- unix/tkUnixSelect.c | 16 ++++++++-------- unix/tkUnixWm.c | 4 ++-- 19 files changed, 112 insertions(+), 94 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9380d80..1806541 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +2010-06-15 Jan Nijtmans + + * generic/tkCanvArc.c Eliminate many unnecessary + * generic/tkCanvas.c (ClientData) type casts. + * generic/tkCanvBmap.c + * generic/tkCanvImg.c + * generic/tkCanvLine.c + * generic/tkCanvPoly.c + * generic/tkCanvTest.c + * generic/tkCanvWind.c + * generic/tkRectOval.c + * generic/tkScrollbar.c + * generic/tkStyle.c + * generic/tkTest.c + * unix/tkUnixEmbed.c + * unix/tkUnixEvent.c + * unix/tkUnixScale.c + * unix/tkUnixScrlbr.c + * unix/tkUnixSelect.c + * unix/tkUnixWm.c + 2010-05-31 Joe English * generic/tkBind.c(Tk_CreateBinding): Silently ignore empty diff --git a/generic/tkCanvArc.c b/generic/tkCanvArc.c index 96bc03c..22ab653 100644 --- a/generic/tkCanvArc.c +++ b/generic/tkCanvArc.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCanvArc.c,v 1.22 2010/02/17 19:21:16 nijtmans Exp $ + * RCS: @(#) $Id: tkCanvArc.c,v 1.23 2010/06/15 11:16:03 nijtmans Exp $ */ #include "tkInt.h" @@ -86,22 +86,22 @@ static const char * StylePrintProc(ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); static const Tk_CustomOption stateOption = { - TkStateParseProc, TkStatePrintProc, (ClientData) 2 + TkStateParseProc, TkStatePrintProc, INT2PTR(2) }; static const Tk_CustomOption styleOption = { - StyleParseProc, StylePrintProc, (ClientData) NULL + StyleParseProc, StylePrintProc, NULL }; static const Tk_CustomOption tagsOption = { - Tk_CanvasTagsParseProc, Tk_CanvasTagsPrintProc, (ClientData) NULL + Tk_CanvasTagsParseProc, Tk_CanvasTagsPrintProc, NULL }; static const Tk_CustomOption dashOption = { - TkCanvasDashParseProc, TkCanvasDashPrintProc, (ClientData) NULL + TkCanvasDashParseProc, TkCanvasDashPrintProc, NULL }; static const Tk_CustomOption offsetOption = { - TkOffsetParseProc, TkOffsetPrintProc, (ClientData) (TK_OFFSET_RELATIVE) + TkOffsetParseProc, TkOffsetPrintProc, INT2PTR(TK_OFFSET_RELATIVE) }; static const Tk_CustomOption pixelOption = { - TkPixelParseProc, TkPixelPrintProc, (ClientData) NULL + TkPixelParseProc, TkPixelPrintProc, NULL }; static const Tk_ConfigSpec configSpecs[] = { diff --git a/generic/tkCanvBmap.c b/generic/tkCanvBmap.c index 256cc64..79f4110 100644 --- a/generic/tkCanvBmap.c +++ b/generic/tkCanvBmap.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCanvBmap.c,v 1.19 2010/02/17 19:21:15 nijtmans Exp $ + * RCS: @(#) $Id: tkCanvBmap.c,v 1.20 2010/06/15 11:16:03 nijtmans Exp $ */ #include "tkInt.h" @@ -43,10 +43,10 @@ typedef struct BitmapItem { */ static const Tk_CustomOption stateOption = { - TkStateParseProc, TkStatePrintProc, (ClientData) 2 + TkStateParseProc, TkStatePrintProc, INT2PTR(2) }; static const Tk_CustomOption tagsOption = { - Tk_CanvasTagsParseProc, Tk_CanvasTagsPrintProc, (ClientData) NULL + Tk_CanvasTagsParseProc, Tk_CanvasTagsPrintProc, NULL }; static const Tk_ConfigSpec configSpecs[] = { diff --git a/generic/tkCanvImg.c b/generic/tkCanvImg.c index 5141dbe..ac97926 100644 --- a/generic/tkCanvImg.c +++ b/generic/tkCanvImg.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCanvImg.c,v 1.17 2010/02/17 19:21:16 nijtmans Exp $ + * RCS: @(#) $Id: tkCanvImg.c,v 1.18 2010/06/15 11:16:03 nijtmans Exp $ */ #include "tkInt.h" @@ -46,10 +46,10 @@ typedef struct ImageItem { */ static const Tk_CustomOption stateOption = { - TkStateParseProc, TkStatePrintProc, (ClientData) 2 + TkStateParseProc, TkStatePrintProc, INT2PTR(2) }; static const Tk_CustomOption tagsOption = { - Tk_CanvasTagsParseProc, Tk_CanvasTagsPrintProc, (ClientData) NULL + Tk_CanvasTagsParseProc, Tk_CanvasTagsPrintProc, NULL }; static const Tk_ConfigSpec configSpecs[] = { diff --git a/generic/tkCanvLine.c b/generic/tkCanvLine.c index 0752354..79d2c2b 100644 --- a/generic/tkCanvLine.c +++ b/generic/tkCanvLine.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCanvLine.c,v 1.32 2010/02/17 19:21:16 nijtmans Exp $ + * RCS: @(#) $Id: tkCanvLine.c,v 1.33 2010/06/15 11:16:03 nijtmans Exp $ */ #include "tkInt.h" @@ -132,29 +132,29 @@ static void TranslateLine(Tk_Canvas canvas, */ static const Tk_CustomOption arrowShapeOption = { - ParseArrowShape, PrintArrowShape, (ClientData) NULL + ParseArrowShape, PrintArrowShape, NULL }; static const Tk_CustomOption arrowOption = { - ArrowParseProc, ArrowPrintProc, (ClientData) NULL + ArrowParseProc, ArrowPrintProc, NULL }; static const Tk_CustomOption smoothOption = { - TkSmoothParseProc, TkSmoothPrintProc, (ClientData) NULL + TkSmoothParseProc, TkSmoothPrintProc, NULL }; static const Tk_CustomOption stateOption = { - TkStateParseProc, TkStatePrintProc, (ClientData) 2 + TkStateParseProc, TkStatePrintProc, INT2PTR(2) }; static const Tk_CustomOption tagsOption = { - Tk_CanvasTagsParseProc, Tk_CanvasTagsPrintProc, (ClientData) NULL + Tk_CanvasTagsParseProc, Tk_CanvasTagsPrintProc, NULL }; static const Tk_CustomOption dashOption = { - TkCanvasDashParseProc, TkCanvasDashPrintProc, (ClientData) NULL + TkCanvasDashParseProc, TkCanvasDashPrintProc, NULL }; static const Tk_CustomOption offsetOption = { TkOffsetParseProc, TkOffsetPrintProc, - (ClientData) (TK_OFFSET_RELATIVE|TK_OFFSET_INDEX) + INT2PTR(TK_OFFSET_RELATIVE|TK_OFFSET_INDEX) }; static const Tk_CustomOption pixelOption = { - TkPixelParseProc, TkPixelPrintProc, (ClientData) NULL + TkPixelParseProc, TkPixelPrintProc, NULL }; static const Tk_ConfigSpec configSpecs[] = { diff --git a/generic/tkCanvPoly.c b/generic/tkCanvPoly.c index 9f09c3c..e777d60 100644 --- a/generic/tkCanvPoly.c +++ b/generic/tkCanvPoly.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCanvPoly.c,v 1.26 2010/02/17 19:21:16 nijtmans Exp $ + * RCS: @(#) $Id: tkCanvPoly.c,v 1.27 2010/06/15 11:16:03 nijtmans Exp $ */ #include "tkInt.h" @@ -57,23 +57,23 @@ typedef struct PolygonItem { */ static const Tk_CustomOption smoothOption = { - TkSmoothParseProc, TkSmoothPrintProc, (ClientData) NULL + TkSmoothParseProc, TkSmoothPrintProc, NULL }; static const Tk_CustomOption stateOption = { - TkStateParseProc, TkStatePrintProc, (ClientData) 2 + TkStateParseProc, TkStatePrintProc, INT2PTR(2) }; static const Tk_CustomOption tagsOption = { - Tk_CanvasTagsParseProc, Tk_CanvasTagsPrintProc, (ClientData) NULL + Tk_CanvasTagsParseProc, Tk_CanvasTagsPrintProc, NULL }; static const Tk_CustomOption dashOption = { - TkCanvasDashParseProc, TkCanvasDashPrintProc, (ClientData) NULL + TkCanvasDashParseProc, TkCanvasDashPrintProc, NULL }; static const Tk_CustomOption offsetOption = { TkOffsetParseProc, TkOffsetPrintProc, - (ClientData) (TK_OFFSET_RELATIVE|TK_OFFSET_INDEX) + INT2PTR(TK_OFFSET_RELATIVE|TK_OFFSET_INDEX) }; static const Tk_CustomOption pixelOption = { - TkPixelParseProc, TkPixelPrintProc, (ClientData) NULL + TkPixelParseProc, TkPixelPrintProc, NULL }; static const Tk_ConfigSpec configSpecs[] = { diff --git a/generic/tkCanvText.c b/generic/tkCanvText.c index d5f1ae2..db81c79 100644 --- a/generic/tkCanvText.c +++ b/generic/tkCanvText.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCanvText.c,v 1.38 2010/02/17 19:21:16 nijtmans Exp $ + * RCS: @(#) $Id: tkCanvText.c,v 1.39 2010/06/15 11:16:03 nijtmans Exp $ */ #include "tkInt.h" @@ -86,13 +86,13 @@ typedef struct TextItem { */ static const Tk_CustomOption stateOption = { - TkStateParseProc, TkStatePrintProc, (ClientData) 2 + TkStateParseProc, TkStatePrintProc, INT2PTR(2) }; static const Tk_CustomOption tagsOption = { - Tk_CanvasTagsParseProc, Tk_CanvasTagsPrintProc, (ClientData) NULL + Tk_CanvasTagsParseProc, Tk_CanvasTagsPrintProc, NULL }; static const Tk_CustomOption offsetOption = { - TkOffsetParseProc, TkOffsetPrintProc, (ClientData) (TK_OFFSET_RELATIVE) + TkOffsetParseProc, TkOffsetPrintProc, INT2PTR(TK_OFFSET_RELATIVE) }; static const Tk_ConfigSpec configSpecs[] = { diff --git a/generic/tkCanvWind.c b/generic/tkCanvWind.c index 031879f..c83860c 100644 --- a/generic/tkCanvWind.c +++ b/generic/tkCanvWind.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCanvWind.c,v 1.22 2010/02/17 19:21:16 nijtmans Exp $ + * RCS: @(#) $Id: tkCanvWind.c,v 1.23 2010/06/15 11:16:03 nijtmans Exp $ */ #include "tkInt.h" @@ -40,10 +40,10 @@ typedef struct WindowItem { */ static const Tk_CustomOption stateOption = { - TkStateParseProc, TkStatePrintProc, (ClientData) 2 + TkStateParseProc, TkStatePrintProc, INT2PTR(2) }; static const Tk_CustomOption tagsOption = { - Tk_CanvasTagsParseProc, Tk_CanvasTagsPrintProc, (ClientData) NULL + Tk_CanvasTagsParseProc, Tk_CanvasTagsPrintProc, NULL }; static const Tk_ConfigSpec configSpecs[] = { diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c index 4e39367..275b97f 100644 --- a/generic/tkCanvas.c +++ b/generic/tkCanvas.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCanvas.c,v 1.65 2010/02/17 19:21:16 nijtmans Exp $ + * RCS: @(#) $Id: tkCanvas.c,v 1.66 2010/06/15 11:16:03 nijtmans Exp $ */ /* #define USE_OLD_TAG_SEARCH 1 */ @@ -104,12 +104,11 @@ typedef struct TagSearch { static const Tk_CustomOption stateOption = { TkStateParseProc, TkStatePrintProc, - (ClientData) NULL /* Only "normal" and "disabled". */ + NULL /* Only "normal" and "disabled". */ }; static const Tk_CustomOption offsetOption = { - TkOffsetParseProc, TkOffsetPrintProc, - (ClientData) TK_OFFSET_RELATIVE + TkOffsetParseProc, TkOffsetPrintProc, INT2PTR(TK_OFFSET_RELATIVE) }; /* diff --git a/generic/tkRectOval.c b/generic/tkRectOval.c index d300259..adb36db 100644 --- a/generic/tkRectOval.c +++ b/generic/tkRectOval.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkRectOval.c,v 1.22 2010/02/17 19:21:16 nijtmans Exp $ + * RCS: @(#) $Id: tkRectOval.c,v 1.23 2010/06/15 11:16:03 nijtmans Exp $ */ #include "tkInt.h" @@ -45,19 +45,19 @@ typedef struct RectOvalItem { */ static const Tk_CustomOption stateOption = { - TkStateParseProc, TkStatePrintProc, (ClientData) 2 + TkStateParseProc, TkStatePrintProc, INT2PTR(2) }; static const Tk_CustomOption tagsOption = { - Tk_CanvasTagsParseProc, Tk_CanvasTagsPrintProc, (ClientData) NULL + Tk_CanvasTagsParseProc, Tk_CanvasTagsPrintProc, NULL }; static const Tk_CustomOption dashOption = { - TkCanvasDashParseProc, TkCanvasDashPrintProc, (ClientData) NULL + TkCanvasDashParseProc, TkCanvasDashPrintProc, NULL }; static const Tk_CustomOption offsetOption = { - TkOffsetParseProc, TkOffsetPrintProc, (ClientData) TK_OFFSET_RELATIVE + TkOffsetParseProc, TkOffsetPrintProc, INT2PTR(TK_OFFSET_RELATIVE) }; static const Tk_CustomOption pixelOption = { - TkPixelParseProc, TkPixelPrintProc, (ClientData) NULL + TkPixelParseProc, TkPixelPrintProc, NULL }; static const Tk_ConfigSpec configSpecs[] = { diff --git a/generic/tkScrollbar.c b/generic/tkScrollbar.c index fc93574..e6cd0d9 100644 --- a/generic/tkScrollbar.c +++ b/generic/tkScrollbar.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkScrollbar.c,v 1.20 2010/02/17 19:21:16 nijtmans Exp $ + * RCS: @(#) $Id: tkScrollbar.c,v 1.21 2010/06/15 11:16:03 nijtmans Exp $ */ #include "tkInt.h" @@ -23,7 +23,7 @@ */ static const Tk_CustomOption orientOption = { - TkOrientParseProc, TkOrientPrintProc, (ClientData) NULL + TkOrientParseProc, TkOrientPrintProc, NULL }; /* non-const space for "-width" default value for scrollbars */ diff --git a/generic/tkStyle.c b/generic/tkStyle.c index fb17b53..fda6f7b 100644 --- a/generic/tkStyle.c +++ b/generic/tkStyle.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkStyle.c,v 1.12 2010/01/02 22:52:38 dkf Exp $ + * RCS: @(#) $Id: tkStyle.c,v 1.13 2010/06/15 11:16:03 nijtmans Exp $ */ #include "tkInt.h" @@ -210,8 +210,7 @@ TkStylePkgInit( * Create the default system style. */ - Tk_CreateStyle(NULL, (Tk_StyleEngine) tsdPtr->defaultEnginePtr, - (ClientData) 0); + Tk_CreateStyle(NULL, (Tk_StyleEngine) tsdPtr->defaultEnginePtr, NULL); tsdPtr->nbInit++; } diff --git a/generic/tkTest.c b/generic/tkTest.c index 04cc8e8..4b693f0 100644 --- a/generic/tkTest.c +++ b/generic/tkTest.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkTest.c,v 1.47 2010/02/22 23:38:53 nijtmans Exp $ + * RCS: @(#) $Id: tkTest.c,v 1.48 2010/06/15 11:16:03 nijtmans Exp $ */ #undef STATIC_BUILD @@ -249,8 +249,7 @@ Tktest_Init( return TCL_ERROR; } - Tcl_CreateObjCommand(interp, "square", SquareObjCmd, - (ClientData) NULL, NULL); + Tcl_CreateObjCommand(interp, "square", SquareObjCmd, NULL, NULL); Tcl_CreateCommand(interp, "testcbind", TestcbindCmd, (ClientData) Tk_MainWindow(interp), NULL); Tcl_CreateObjCommand(interp, "testbitmap", TestbitmapObjCmd, @@ -639,7 +638,7 @@ TestobjconfigObjCmd( CustomOptionGet, CustomOptionRestore, CustomOptionFree, - (ClientData) 1 + INT2PTR(1) }; Tk_Window mainWin = (Tk_Window) clientData; Tk_Window tkwin; @@ -1064,9 +1063,9 @@ TestobjconfigObjCmd( if (result == TCL_OK) { recordPtr->header.widgetCmd = Tcl_CreateObjCommand(interp, Tcl_GetString(objv[2]), TrivialConfigObjCmd, - (ClientData) recordPtr, TrivialCmdDeletedProc); + recordPtr, TrivialCmdDeletedProc); Tk_CreateEventHandler(tkwin, StructureNotifyMask, - TrivialEventProc, (ClientData) recordPtr); + TrivialEventProc, recordPtr); result = Tk_SetOptions(interp, (char *) recordPtr, optionTable, objc - 3, objv + 3, tkwin, NULL, NULL); if (result != TCL_OK) { @@ -1207,9 +1206,9 @@ TestobjconfigObjCmd( if (result == TCL_OK) { recordPtr->header.widgetCmd = Tcl_CreateObjCommand(interp, Tcl_GetString(objv[2]), TrivialConfigObjCmd, - (ClientData) recordPtr, TrivialCmdDeletedProc); + recordPtr, TrivialCmdDeletedProc); Tk_CreateEventHandler(tkwin, StructureNotifyMask, - TrivialEventProc, (ClientData) recordPtr); + TrivialEventProc, recordPtr); Tcl_SetObjResult(interp, objv[2]); } else { Tk_FreeConfigOptions((char *) recordPtr, @@ -1529,8 +1528,8 @@ ImageCreate( strcpy(timPtr->imageName, name); timPtr->varName = (char *) ckalloc((unsigned) (strlen(varName) + 1)); strcpy(timPtr->varName, varName); - Tcl_CreateCommand(interp, name, ImageCmd, (ClientData) timPtr, NULL); - *clientDataPtr = (ClientData) timPtr; + Tcl_CreateCommand(interp, name, ImageCmd, timPtr, NULL); + *clientDataPtr = timPtr; Tk_ImageChanged(master, 0, 0, 30, 15, 30, 15); return TCL_OK; } @@ -1630,7 +1629,7 @@ ImageGet( instPtr->fg = Tk_GetColor(timPtr->interp, tkwin, "#ff0000"); gcValues.foreground = instPtr->fg->pixel; instPtr->gc = Tk_GetGC(tkwin, GCForeground, &gcValues); - return (ClientData) instPtr; + return instPtr; } /* diff --git a/unix/tkUnixEmbed.c b/unix/tkUnixEmbed.c index 58f4ee0..206beb2 100644 --- a/unix/tkUnixEmbed.c +++ b/unix/tkUnixEmbed.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixEmbed.c,v 1.14 2008/10/20 10:50:20 dkf Exp $ + * RCS: @(#) $Id: tkUnixEmbed.c,v 1.15 2010/06/15 11:16:02 nijtmans Exp $ */ #include "tkUnixInt.h" @@ -139,7 +139,7 @@ TkpUseWindow( anyError = 0; handler = Tk_CreateErrorHandler(winPtr->display, -1, -1, -1, - EmbedErrorProc, (ClientData) &anyError); + EmbedErrorProc, &anyError); if (!XGetWindowAttributes(winPtr->display, parent, &parentAtts)) { anyError = 1; } @@ -161,7 +161,7 @@ TkpUseWindow( */ Tk_CreateEventHandler(tkwin, StructureNotifyMask, EmbeddedEventProc, - (ClientData) winPtr); + winPtr); /* * Save information about the container and the embedded window in a @@ -303,11 +303,11 @@ TkpMakeContainer( XSelectInput(winPtr->display, winPtr->window, winPtr->atts.event_mask); Tk_CreateEventHandler(tkwin, SubstructureNotifyMask|SubstructureRedirectMask, - ContainerEventProc, (ClientData) winPtr); + ContainerEventProc, winPtr); Tk_CreateEventHandler(tkwin, StructureNotifyMask, EmbedStructureProc, - (ClientData) containerPtr); + containerPtr); Tk_CreateEventHandler(tkwin, FocusChangeMask, EmbedFocusProc, - (ClientData) containerPtr); + containerPtr); } /* @@ -408,7 +408,7 @@ ContainerEventProc( */ errHandler = Tk_CreateErrorHandler(eventPtr->xfocus.display, -1, - -1, -1, NULL, (ClientData) NULL); + -1, -1, NULL, NULL); /* * Find the Container structure associated with the parent window. @@ -511,7 +511,7 @@ EmbedStructureProc( */ errHandler = Tk_CreateErrorHandler(eventPtr->xfocus.display, -1, - -1, -1, NULL, (ClientData) NULL); + -1, -1, NULL, NULL); XMoveResizeWindow(eventPtr->xconfigure.display, containerPtr->wrapper, 0, 0, (unsigned) Tk_Width((Tk_Window) containerPtr->parentPtr), @@ -562,7 +562,7 @@ EmbedFocusProc( if (containerPtr->wrapper != None) { errHandler = Tk_CreateErrorHandler(eventPtr->xfocus.display, -1, - -1, -1, NULL, (ClientData) NULL); + -1, -1, NULL, NULL); XSetInputFocus(display, containerPtr->wrapper, RevertToParent, CurrentTime); Tk_DeleteErrorHandler(errHandler); diff --git a/unix/tkUnixEvent.c b/unix/tkUnixEvent.c index a4bdb23..d3a42dd 100644 --- a/unix/tkUnixEvent.c +++ b/unix/tkUnixEvent.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixEvent.c,v 1.35 2010/01/06 14:58:30 dkf Exp $ + * RCS: @(#) $Id: tkUnixEvent.c,v 1.36 2010/06/15 11:16:03 nijtmans Exp $ */ #include "tkUnixInt.h" @@ -130,7 +130,7 @@ TkpOpenDisplay( OpenIM(dispPtr); #endif Tcl_CreateFileHandler(ConnectionNumber(display), TCL_READABLE, - DisplayFileProc, (ClientData) dispPtr); + DisplayFileProc, dispPtr); return dispPtr; } @@ -204,7 +204,7 @@ TkClipCleanup( dispPtr->windowAtom); Tk_DestroyWindow(dispPtr->clipWindow); - Tcl_Release((ClientData) dispPtr->clipWindow); + Tcl_Release(dispPtr->clipWindow); dispPtr->clipWindow = NULL; } } @@ -553,7 +553,7 @@ TkUnixDoOneXEvent( index = fd/(NBBY*sizeof(fd_mask)); bit = ((fd_mask)1) << (fd%(NBBY*sizeof(fd_mask))); if ((readMask[index] & bit) || (QLength(dispPtr->display) > 0)) { - DisplayFileProc((ClientData)dispPtr, TCL_READABLE); + DisplayFileProc(dispPtr, TCL_READABLE); } } if (Tcl_ServiceEvent(TCL_WINDOW_EVENTS)) { diff --git a/unix/tkUnixScale.c b/unix/tkUnixScale.c index fd249ba..7e06b3f 100644 --- a/unix/tkUnixScale.c +++ b/unix/tkUnixScale.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixScale.c,v 1.14 2008/12/09 21:22:56 dgp Exp $ + * RCS: @(#) $Id: tkUnixScale.c,v 1.15 2010/06/15 11:16:03 nijtmans Exp $ */ #include "tkInt.h" @@ -73,7 +73,7 @@ void TkpDestroyScale( TkScale *scalePtr) { - Tcl_EventuallyFree((ClientData) scalePtr, TCL_DYNAMIC); + Tcl_EventuallyFree(scalePtr, TCL_DYNAMIC); } /* @@ -549,9 +549,9 @@ TkpDisplayScale( * Invoke the scale's command if needed. */ - Tcl_Preserve((ClientData) scalePtr); + Tcl_Preserve(scalePtr); if ((scalePtr->flags & INVOKE_COMMAND) && (scalePtr->command != NULL)) { - Tcl_Preserve((ClientData) interp); + Tcl_Preserve(interp); sprintf(string, scalePtr->format, scalePtr->value); result = Tcl_VarEval(interp, scalePtr->command, " ", string, (char *) NULL); @@ -559,14 +559,14 @@ TkpDisplayScale( Tcl_AddErrorInfo(interp, "\n (command executed by scale)"); Tcl_BackgroundException(interp, result); } - Tcl_Release((ClientData) interp); + Tcl_Release(interp); } scalePtr->flags &= ~INVOKE_COMMAND; if (scalePtr->flags & SCALE_DELETED) { - Tcl_Release((ClientData) scalePtr); + Tcl_Release(scalePtr); return; } - Tcl_Release((ClientData) scalePtr); + Tcl_Release(scalePtr); #ifndef TK_NO_DOUBLE_BUFFERING /* diff --git a/unix/tkUnixScrlbr.c b/unix/tkUnixScrlbr.c index a979797..2af22b8 100644 --- a/unix/tkUnixScrlbr.c +++ b/unix/tkUnixScrlbr.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixScrlbr.c,v 1.9 2010/01/13 23:08:10 nijtmans Exp $ + * RCS: @(#) $Id: tkUnixScrlbr.c,v 1.10 2010/06/15 11:16:02 nijtmans Exp $ */ #include "tkInt.h" @@ -73,7 +73,7 @@ TkpCreateScrollbar( Tk_CreateEventHandler(tkwin, ExposureMask|StructureNotifyMask|FocusChangeMask, - TkScrollbarEventProc, (ClientData) scrollPtr); + TkScrollbarEventProc, scrollPtr); return (TkScrollbar *) scrollPtr; } diff --git a/unix/tkUnixSelect.c b/unix/tkUnixSelect.c index 1594e12..6e39ee4 100644 --- a/unix/tkUnixSelect.c +++ b/unix/tkUnixSelect.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixSelect.c,v 1.26 2010/05/26 15:28:10 nijtmans Exp $ + * RCS: @(#) $Id: tkUnixSelect.c,v 1.27 2010/06/15 11:16:03 nijtmans Exp $ */ #include "tkInt.h" @@ -185,7 +185,7 @@ TkSelGetSelection( */ retr.timeout = Tcl_CreateTimerHandler(1000, SelTimeoutProc, - (ClientData) &retr); + &retr); while (retr.result == -1) { Tcl_DoOneEvent(0); } @@ -663,14 +663,14 @@ TkSelEventProc( retrPtr->idleTime = 0; Tk_CreateEventHandler(tkwin, PropertyChangeMask, SelRcvIncrProc, - (ClientData) retrPtr); + retrPtr); XDeleteProperty(Tk_Display(tkwin), Tk_WindowId(tkwin), retrPtr->property); while (retrPtr->result == -1) { Tcl_DoOneEvent(0); } Tk_DeleteEventHandler(tkwin, PropertyChangeMask, SelRcvIncrProc, - (ClientData) retrPtr); + retrPtr); } else { Tcl_DString ds; @@ -1163,7 +1163,7 @@ SelRcvIncrProc( goto done; } interp = retrPtr->interp; - Tcl_Preserve((ClientData) interp); + Tcl_Preserve(interp); if (type == retrPtr->winPtr->dispPtr->compoundTextAtom) { encoding = Tcl_GetEncoding(NULL, "iso2022"); @@ -1194,7 +1194,7 @@ SelRcvIncrProc( */ retrPtr->result = TCL_OK; - Tcl_Release((ClientData) interp); + Tcl_Release(interp); goto done; } else { src = propInfo; @@ -1237,7 +1237,7 @@ SelRcvIncrProc( result = retrPtr->proc(retrPtr->clientData, interp, Tcl_DStringValue(dstPtr)); - Tcl_Release((ClientData) interp); + Tcl_Release(interp); /* * Copy any unused data into the destination buffer so we can pick it @@ -1372,7 +1372,7 @@ IncrTimeoutProc( incrPtr->numIncrs = 0; } else { incrPtr->timeout = Tcl_CreateTimerHandler(1000, IncrTimeoutProc, - (ClientData) incrPtr); + incrPtr); } } diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c index c6f56aa..c45d5d5 100644 --- a/unix/tkUnixWm.c +++ b/unix/tkUnixWm.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixWm.c,v 1.82 2010/05/11 12:12:49 nijtmans Exp $ + * RCS: @(#) $Id: tkUnixWm.c,v 1.83 2010/06/15 11:16:02 nijtmans Exp $ */ #include "tkUnixInt.h" @@ -613,7 +613,7 @@ TkWmNewWindow( * window manager. */ - Tk_ManageGeometry((Tk_Window) winPtr, &wmMgrType, (ClientData) 0); + Tk_ManageGeometry((Tk_Window) winPtr, &wmMgrType, NULL); } /* -- cgit v0.12