summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tkEntry.c4
-rw-r--r--unix/tkUnixSysTray.c58
-rw-r--r--win/tkWinDialog.c4
-rw-r--r--win/tkWinGDI.c24
-rw-r--r--win/tkWinX.c2
-rw-r--r--win/ttkWinXPTheme.c8
6 files changed, 50 insertions, 50 deletions
diff --git a/generic/tkEntry.c b/generic/tkEntry.c
index 79e1d5f..3d7d056 100644
--- a/generic/tkEntry.c
+++ b/generic/tkEntry.c
@@ -1051,7 +1051,7 @@ DestroyEntry(
* Tk_FreeOptions handle all the standard option-related stuff.
*/
- ckfree(entryPtr->string);
+ ckfree((char *)entryPtr->string);
if (entryPtr->textVarName != NULL) {
Tcl_UntraceVar2(entryPtr->interp, entryPtr->textVarName,
NULL, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
@@ -3273,7 +3273,7 @@ EntryTextVarProc(
entryPtr->textVarName,
TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
EntryTextVarProc, probe);
- if (probe == (void *)entryPtr) {
+ if (probe == entryPtr) {
break;
}
} while (probe);
diff --git a/unix/tkUnixSysTray.c b/unix/tkUnixSysTray.c
index 8372b6e..1a6989f 100644
--- a/unix/tkUnixSysTray.c
+++ b/unix/tkUnixSysTray.c
@@ -198,9 +198,9 @@ typedef struct {
* Forward declarations for procedures defined in this file.
*/
-static int TrayIconCreateCmd(ClientData cd, Tcl_Interp *interp,
+static int TrayIconCreateCmd(void *cd, Tcl_Interp *interp,
int objc, Tcl_Obj *const objv[]);
-static int TrayIconObjectCmd(ClientData cd, Tcl_Interp *interp,
+static int TrayIconObjectCmd(void *cd, Tcl_Interp *interp,
int objc, Tcl_Obj *const objv[]);
static int TrayIconConfigureMethod(DockIcon *icon, Tcl_Interp* interp,
int objc, Tcl_Obj *const objv[],
@@ -210,7 +210,7 @@ static int PostBalloon(DockIcon* icon, const char * utf8msg,
static void CancelBalloon(DockIcon* icon, int msgid);
static int QueryTrayOrientation(DockIcon* icon);
-static void TrayIconDeleteProc(ClientData cd );
+static void TrayIconDeleteProc(void *cd );
static Atom DockSelectionAtomFor(Tk_Window tkwin);
static void DockToManager(DockIcon *icon);
static void CreateTrayIconWindow(DockIcon *icon);
@@ -220,14 +220,14 @@ static void TrayIconForceImageChange(DockIcon* icon);
static void TrayIconUpdate(DockIcon* icon, int mask);
static void EventuallyRedrawIcon(DockIcon* icon);
-static void DisplayIcon(ClientData cd);
+static void DisplayIcon(void *cd);
static void RetargetEvent(DockIcon *icon, XEvent *ev);
-static void TrayIconEvent(ClientData cd, XEvent* ev);
-static void UserIconEvent(ClientData cd, XEvent* ev);
-static void TrayIconWrapperEvent(ClientData cd, XEvent* ev);
-static int IconGenericHandler(ClientData cd, XEvent *ev);
+static void TrayIconEvent(void *cd, XEvent* ev);
+static void UserIconEvent(void *cd, XEvent* ev);
+static void TrayIconWrapperEvent(void *cd, XEvent* ev);
+static int IconGenericHandler(void *cd, XEvent *ev);
int Tktray_Init (Tcl_Interp* interp );
@@ -249,7 +249,7 @@ int Tktray_Init (Tcl_Interp* interp );
static int
TrayIconObjectCmd(
- ClientData cd,
+ void *cd,
Tcl_Interp *interp,
int objc,
Tcl_Obj *const objv[])
@@ -611,7 +611,7 @@ CreateTrayIconWindow(
Tk_CreateEventHandler(icon->drawingWin,ExposureMask|StructureNotifyMask|
ButtonPressMask|ButtonReleaseMask|
EnterWindowMask|LeaveWindowMask|PointerMotionMask,
- TrayIconEvent,(ClientData)icon);
+ TrayIconEvent, icon);
if(icon->bestVisual) {
Tk_SetWindowVisual(icon->drawingWin,icon->bestVisual,
32,icon->bestColormap);
@@ -627,7 +627,7 @@ CreateTrayIconWindow(
attr.override_redirect = True;
Tk_ChangeWindowAttributes(wrapper,CWOverrideRedirect,&attr);
- Tk_CreateEventHandler(wrapper,StructureNotifyMask,TrayIconWrapperEvent,(ClientData)icon);
+ Tk_CreateEventHandler(wrapper,StructureNotifyMask,TrayIconWrapperEvent, icon);
if (!icon->bestVisual) {
Tk_SetWindowBackgroundPixmap(wrapper, ParentRelative);
} else {
@@ -744,7 +744,7 @@ TrayIconRequestSize(
static void
TrayIconImageChanged(
- ClientData cd,
+ void *cd,
int x,
int y,
int w,
@@ -829,7 +829,7 @@ TrayIconForceImageChange(
if (icon->image) {
int w,h;
Tk_SizeOfImage(icon->image,&w,&h);
- TrayIconImageChanged((ClientData)icon,0,0,w,h,w,h);
+ TrayIconImageChanged(icon, 0, 0, w, h, w, h);
}
}
@@ -856,7 +856,7 @@ EventuallyRedrawIcon(
if (icon->drawingWin && icon->myManager) { /* don't redraw invisible icon */
if (!(icon->flags & ICON_FLAG_REDRAW_PENDING)) { /* don't schedule multiple redraw ops */
icon->flags |= ICON_FLAG_REDRAW_PENDING;
- Tcl_DoWhenIdle(DisplayIcon,(ClientData)icon);
+ Tcl_DoWhenIdle(DisplayIcon, icon);
}
}
}
@@ -879,7 +879,7 @@ EventuallyRedrawIcon(
static void
DisplayIcon(
- ClientData cd)
+ void *cd)
{
DockIcon *icon = (DockIcon*)cd;
int w = icon->imageWidth, h = icon->imageHeight;
@@ -910,7 +910,7 @@ DisplayIcon(
Tcl_InterpState saved
= Tcl_SaveInterpState(icon->interp, TCL_OK);
icon->imageVisualInstance = Tk_GetImage(icon->interp,icon->drawingWin,
- icon->imageString, IgnoreImageChange,(ClientData)NULL);
+ icon->imageString, IgnoreImageChange, NULL);
Tcl_RestoreInterpState(icon->interp,saved);
}
if (icon->photo && !icon->offscreenImage) {
@@ -1072,7 +1072,7 @@ RetargetEvent(
static void
TrayIconWrapperEvent(
- ClientData cd,
+ void *cd,
XEvent* ev)
{
/* Some embedders, like Docker, add icon windows to save set
@@ -1125,7 +1125,7 @@ TrayIconWrapperEvent(
static void
TrayIconEvent(
- ClientData cd,
+ void *cd,
XEvent* ev)
{
DockIcon *icon = (DockIcon*)cd;
@@ -1147,7 +1147,7 @@ TrayIconEvent(
if (icon->myManager) {
Tk_SendVirtualEvent(icon->tkwin,Tk_GetUid("IconDestroy"), NULL);
}
- Tcl_CancelIdleCall(DisplayIcon,(ClientData)icon);
+ Tcl_CancelIdleCall(DisplayIcon, icon);
icon->flags &= ~ICON_FLAG_REDRAW_PENDING;
icon->drawingWin = NULL;
icon->requestedWidth = 0; /* trigger re-request on recreation */
@@ -1196,7 +1196,7 @@ TrayIconEvent(
static void
UserIconEvent(
- ClientData cd,
+ void *cd,
XEvent* ev)
{
DockIcon *icon = (DockIcon*)cd;
@@ -1204,10 +1204,10 @@ UserIconEvent(
switch (ev->type) {
case DestroyNotify:
- Tk_DeleteGenericHandler(IconGenericHandler, (ClientData)icon);
+ Tk_DeleteGenericHandler(IconGenericHandler, icon);
if(icon->drawingWin) {
icon->visible = 0;
- Tcl_CancelIdleCall(DisplayIcon,(ClientData)icon);
+ Tcl_CancelIdleCall(DisplayIcon, icon);
icon->flags &= ~ICON_FLAG_REDRAW_PENDING;
Tk_DestroyWindow(icon->drawingWin);
}
@@ -1365,7 +1365,7 @@ CancelBalloon(
static int
IconGenericHandler(
- ClientData cd,
+ void *cd,
XEvent *ev)
{
DockIcon *icon = (DockIcon*)cd;
@@ -1522,7 +1522,7 @@ TrayIconConfigureMethod(
if (mask & ICON_CONF_IMAGE) {
if (icon->imageString) {
newImage = Tk_GetImage(interp, icon->tkwin, icon->imageString,
- TrayIconImageChanged, (ClientData)icon);
+ TrayIconImageChanged, icon);
if (!newImage) {
Tk_RestoreSavedOptions(&saved);
return TCL_ERROR; /* msg by Tk_GetImage */
@@ -1563,7 +1563,7 @@ TrayIconConfigureMethod(
static void
TrayIconDeleteProc(
- ClientData cd )
+ void *cd )
{
DockIcon *icon = (DockIcon *)cd;
Tk_DestroyWindow(icon->tkwin);
@@ -1587,7 +1587,7 @@ TrayIconDeleteProc(
static int
TrayIconCreateCmd(
- ClientData cd,
+ void *cd,
Tcl_Interp *interp,
int objc,
Tcl_Obj *const objv[])
@@ -1627,7 +1627,7 @@ TrayIconCreateCmd(
/* Early tracking of DestroyNotify is essential */
Tk_CreateEventHandler(icon->tkwin,StructureNotifyMask,
- UserIconEvent,(ClientData)icon);
+ UserIconEvent, icon);
/* Now try setting options */
icon->options = Tk_CreateOptionTable(interp,IconOptionSpec);
@@ -1652,7 +1652,7 @@ TrayIconCreateCmd(
XSelectInput(Tk_Display(icon->tkwin),icon->trayManager, StructureNotifyMask);
}
- Tk_CreateGenericHandler(IconGenericHandler, (ClientData)icon);
+ Tk_CreateGenericHandler(IconGenericHandler, icon);
if (objc>3) {
if (TrayIconConfigureMethod(icon, interp, objc-2, objv+2,
@@ -1662,7 +1662,7 @@ TrayIconCreateCmd(
}
icon->widgetCmd = Tcl_CreateObjCommand(interp, Tcl_GetString(objv[1]),
- TrayIconObjectCmd, (ClientData)icon, TrayIconDeleteProc);
+ TrayIconObjectCmd, icon, TrayIconDeleteProc);
/* Sometimes a command just can't be created... */
if (!icon->widgetCmd) {
diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c
index 4aef6ce..1502720 100644
--- a/win/tkWinDialog.c
+++ b/win/tkWinDialog.c
@@ -2166,9 +2166,9 @@ static void FreeFilterVista(DWORD count, TCLCOMDLG_FILTERSPEC *dlgFilterPtr)
DWORD dw;
for (dw = 0; dw < count; ++dw) {
if (dlgFilterPtr[dw].pszName != NULL)
- ckfree(dlgFilterPtr[dw].pszName);
+ ckfree((char *)dlgFilterPtr[dw].pszName);
if (dlgFilterPtr[dw].pszSpec != NULL)
- ckfree(dlgFilterPtr[dw].pszSpec);
+ ckfree((char *)dlgFilterPtr[dw].pszSpec);
}
ckfree(dlgFilterPtr);
}
diff --git a/win/tkWinGDI.c b/win/tkWinGDI.c
index 33cfc5a..b47b1de 100644
--- a/win/tkWinGDI.c
+++ b/win/tkWinGDI.c
@@ -597,26 +597,26 @@ static int Bezierize(
outPointList = (double *)attemptckalloc(2 * sizeof(double) * nbpoints);
if (outPointList == 0) {
/* TODO: unreachable */
- ckfree((void *) inPointList);
+ ckfree((char *)inPointList);
return 0;
}
nbpoints = TkMakeBezierCurve(NULL, inPointList, npoly, nStep,
NULL, outPointList);
- ckfree((void *) inPointList);
+ ckfree((char *)inPointList);
bpoints = (POINT *)attemptckalloc(sizeof(POINT)*nbpoints);
if (bpoints == 0) {
/* TODO: unreachable */
- ckfree((void *) outPointList);
+ ckfree((char *)outPointList);
return 0;
}
for (n=0; n<nbpoints; n++) {
- bpoints[n].x = (long) outPointList[2*n];
- bpoints[n].y = (long) outPointList[2*n + 1];
+ bpoints[n].x = (long)outPointList[2*n];
+ bpoints[n].y = (long)outPointList[2*n + 1];
}
- ckfree((void *) outPointList);
+ ckfree((char *)outPointList);
*bpointptr = *bpoints;
return nbpoints;
}
@@ -712,7 +712,7 @@ static int GdiLine(
objv += 2;
} else {
/* Only one number... Assume a usage error. */
- ckfree((void *)polypoints);
+ ckfree((char *)polypoints);
Tcl_AppendResult(interp, usage_message, NULL);
return TCL_ERROR;
}
@@ -826,7 +826,7 @@ static int GdiLine(
Polyline(hDC, polypoints, npoly); /* Out of memory? Just draw a regular line. */
}
if (bpoints != 0) {
- ckfree((void *)bpoints);
+ ckfree((char *)bpoints);
}
} else {
Polyline(hDC, polypoints, npoly);
@@ -918,7 +918,7 @@ static int GdiLine(
GdiFreeBrush(interp, hDC, hBrush);
}
- ckfree((void *)polypoints);
+ ckfree((char *)polypoints);
return TCL_OK;
}
@@ -1122,7 +1122,7 @@ static int GdiPolygon(
objv += 2;
} else {
/* Only one number... Assume a usage error. */
- ckfree((void *) polypoints);
+ ckfree((char *)polypoints);
Tcl_AppendResult(interp, usage_message, NULL);
return TCL_ERROR;
}
@@ -1198,7 +1198,7 @@ static int GdiPolygon(
Polygon(hDC, polypoints, npoly);
}
if (bpoints != 0) {
- ckfree((void *)bpoints);
+ ckfree((char *)bpoints);
}
} else {
Polygon(hDC, polypoints, npoly);
@@ -1213,7 +1213,7 @@ static int GdiPolygon(
SelectObject(hDC, oldobj);
}
- ckfree((void *)polypoints);
+ ckfree((char *)polypoints);
return TCL_OK;
}
diff --git a/win/tkWinX.c b/win/tkWinX.c
index 80407df..34e93ed 100644
--- a/win/tkWinX.c
+++ b/win/tkWinX.c
@@ -661,7 +661,7 @@ TkpCloseDisplay(
ckfree(DefaultVisualOfScreen(ScreenOfDisplay(display, 0)));
}
if (RootWindowOfScreen(ScreenOfDisplay(display, 0)) != None) {
- ckfree((void *)RootWindowOfScreen(ScreenOfDisplay(display, 0)));
+ ckfree((char *)RootWindowOfScreen(ScreenOfDisplay(display, 0)));
}
if (DefaultColormapOfScreen(ScreenOfDisplay(display, 0)) != None) {
XFreeColormap(display, DefaultColormapOfScreen(ScreenOfDisplay(display, 0)));
diff --git a/win/ttkWinXPTheme.c b/win/ttkWinXPTheme.c
index 8f65e26..484dfa1 100644
--- a/win/ttkWinXPTheme.c
+++ b/win/ttkWinXPTheme.c
@@ -426,10 +426,10 @@ static void DestroyElementData(void *clientData)
{
ElementData *elementData = (ElementData *)clientData;
if (elementData->info->flags & HEAP_ELEMENT) {
- ckfree(elementData->info->statemap);
- ckfree(elementData->info->className);
- ckfree(elementData->info->elementName);
- ckfree(elementData->info);
+ ckfree((char *)elementData->info->statemap);
+ ckfree((char *)elementData->info->className);
+ ckfree((char *)elementData->info->elementName);
+ ckfree((char *)elementData->info);
}
ckfree(clientData);
}