summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXEmbed.c
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/tkMacOSXEmbed.c')
-rw-r--r--macosx/tkMacOSXEmbed.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c
index fd1bae6..f29d752 100644
--- a/macosx/tkMacOSXEmbed.c
+++ b/macosx/tkMacOSXEmbed.c
@@ -92,8 +92,7 @@ Tk_MacOSXSetEmbedHandler(
Tk_MacOSXEmbedGetOffsetInParentProc *getOffsetProc)
{
if (tkMacOSXEmbedHandler == NULL) {
- tkMacOSXEmbedHandler = (TkMacOSXEmbedHandler *)
- ckalloc(sizeof(TkMacOSXEmbedHandler));
+ tkMacOSXEmbedHandler = ckalloc(sizeof(TkMacOSXEmbedHandler));
}
tkMacOSXEmbedHandler->registerWinProc = registerWinProc;
tkMacOSXEmbedHandler->getPortProc = getPortProc;
@@ -137,7 +136,7 @@ TkpMakeWindow(
* Allocate sub window
*/
- macWin = (MacDrawable *) ckalloc(sizeof(MacDrawable));
+ macWin = ckalloc(sizeof(MacDrawable));
if (macWin == NULL) {
winPtr->privatePtr = NULL;
return None;
@@ -263,7 +262,7 @@ TkpUseWindow(
* Make the embedded window.
*/
- macWin = (MacDrawable *) ckalloc(sizeof(MacDrawable));
+ macWin = ckalloc(sizeof(MacDrawable));
if (macWin == NULL) {
winPtr->privatePtr = NULL;
return TCL_ERROR;
@@ -318,15 +317,15 @@ TkpUseWindow(
Tcl_AppendResult(interp, "The window ID ", string,
" does not correspond to a valid Tk Window.", NULL);
return TCL_ERROR;
- } else {
- containerPtr = (Container *) ckalloc(sizeof(Container));
-
- containerPtr->parentPtr = NULL;
- containerPtr->embedded = (Window) macWin;
- containerPtr->embeddedPtr = macWin->winPtr;
- containerPtr->nextPtr = firstContainerPtr;
- firstContainerPtr = containerPtr;
}
+
+ containerPtr = ckalloc(sizeof(Container));
+
+ containerPtr->parentPtr = NULL;
+ containerPtr->embedded = (Window) macWin;
+ containerPtr->embeddedPtr = macWin->winPtr;
+ containerPtr->nextPtr = firstContainerPtr;
+ firstContainerPtr = containerPtr;
} else {
/*
* The window is embedded in another Tk window.
@@ -392,7 +391,7 @@ TkpMakeContainer(
*/
Tk_MakeWindowExist(tkwin);
- containerPtr = (Container *) ckalloc(sizeof(Container));
+ containerPtr = ckalloc(sizeof(Container));
containerPtr->parent = Tk_WindowId(tkwin);
containerPtr->parentPtr = winPtr;
containerPtr->embedded = None;
@@ -1117,7 +1116,7 @@ EmbedWindowDeleted(
} else {
prevPtr->nextPtr = containerPtr->nextPtr;
}
- ckfree((char *) containerPtr);
+ ckfree(containerPtr);
}
}