summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXBitmap.c6
-rw-r--r--macosx/tkMacOSXButton.c2
-rw-r--r--macosx/tkMacOSXColor.c4
-rw-r--r--macosx/tkMacOSXCursor.c2
-rw-r--r--macosx/tkMacOSXDialog.c14
-rw-r--r--macosx/tkMacOSXDraw.c2
-rw-r--r--macosx/tkMacOSXEmbed.c8
-rw-r--r--macosx/tkMacOSXFont.c6
-rw-r--r--macosx/tkMacOSXHLEvents.c14
-rw-r--r--macosx/tkMacOSXImage.c6
-rw-r--r--macosx/tkMacOSXKeyboard.c2
-rw-r--r--macosx/tkMacOSXMenubutton.c2
-rw-r--r--macosx/tkMacOSXScale.c2
-rw-r--r--macosx/tkMacOSXScrlbr.c2
-rw-r--r--macosx/tkMacOSXSend.c4
-rw-r--r--macosx/tkMacOSXServices.c2
-rw-r--r--macosx/tkMacOSXSubwindows.c2
-rw-r--r--macosx/tkMacOSXWm.c20
-rw-r--r--macosx/tkMacOSXXStubs.c8
19 files changed, 54 insertions, 54 deletions
diff --git a/macosx/tkMacOSXBitmap.c b/macosx/tkMacOSXBitmap.c
index d75a164..b693b10 100644
--- a/macosx/tkMacOSXBitmap.c
+++ b/macosx/tkMacOSXBitmap.c
@@ -100,7 +100,7 @@ TkpDefineNativeBitmaps(void)
name = Tk_GetUid(builtInPtr->name);
predefHashPtr = Tcl_CreateHashEntry(tablePtr, name, &isNew);
if (isNew) {
- TkPredefBitmap *predefPtr = ckalloc(sizeof(TkPredefBitmap));
+ TkPredefBitmap *predefPtr = (TkPredefBitmap *)ckalloc(sizeof(TkPredefBitmap));
predefPtr->source = UINT2PTR(builtInPtr->iconType);
predefPtr->width = builtInIconSize;
@@ -400,7 +400,7 @@ TkMacOSXIconBitmapObjCmd(
}
}
#endif
- ib.value = ckalloc(len + 1);
+ ib.value = (char *)ckalloc(len + 1);
strcpy(ib.value, value);
if (!iconBitmapTable.buckets) {
Tcl_InitHashTable(&iconBitmapTable, TCL_STRING_KEYS);
@@ -410,7 +410,7 @@ TkMacOSXIconBitmapObjCmd(
iconBitmap = Tcl_GetHashValue(hPtr);
ckfree(iconBitmap->value);
} else {
- iconBitmap = ckalloc(sizeof(IconBitmap));
+ iconBitmap = (IconBitmap *)ckalloc(sizeof(IconBitmap));
Tcl_SetHashValue(hPtr, iconBitmap);
}
*iconBitmap = ib;
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c
index 865234f..2b69a4a 100644
--- a/macosx/tkMacOSXButton.c
+++ b/macosx/tkMacOSXButton.c
@@ -145,7 +145,7 @@ TkButton *
TkpCreateButton(
Tk_Window tkwin)
{
- MacButton *macButtonPtr = ckalloc(sizeof(MacButton));
+ MacButton *macButtonPtr = (MacButton *)ckalloc(sizeof(MacButton));
Tk_CreateEventHandler(tkwin, ActivateMask,
ButtonEventProc, macButtonPtr);
diff --git a/macosx/tkMacOSXColor.c b/macosx/tkMacOSXColor.c
index 3c40cfb..a9af244 100644
--- a/macosx/tkMacOSXColor.c
+++ b/macosx/tkMacOSXColor.c
@@ -792,7 +792,7 @@ TkpGetColor(
}
validXColor:
- tkColPtr = ckalloc(sizeof(TkColor));
+ tkColPtr = (TkColor *)ckalloc(sizeof(TkColor));
tkColPtr->color = color;
return tkColPtr;
@@ -826,7 +826,7 @@ TkpGetColorByValue(
XColor *colorPtr) /* Red, green, and blue fields indicate
* desired color. */
{
- TkColor *tkColPtr = ckalloc(sizeof(TkColor));
+ TkColor *tkColPtr = (TkColor *)ckalloc(sizeof(TkColor));
(void)tkwin;
tkColPtr->color.red = colorPtr->red;
diff --git a/macosx/tkMacOSXCursor.c b/macosx/tkMacOSXCursor.c
index 58232a5..812f54e 100644
--- a/macosx/tkMacOSXCursor.c
+++ b/macosx/tkMacOSXCursor.c
@@ -391,7 +391,7 @@ TkGetCursorByName(
if (Tcl_SplitList(interp, string, &argc, &argv) == TCL_OK) {
if (argc) {
- macCursorPtr = ckalloc(sizeof(TkMacOSXCursor));
+ macCursorPtr = (TkMacOSXCursor *)ckalloc(sizeof(TkMacOSXCursor));
macCursorPtr->info.cursor = (Tk_Cursor) macCursorPtr;
macCursorPtr->macCursor = nil;
macCursorPtr->type = 0;
diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c
index c41f8fb..1eea9a7 100644
--- a/macosx/tkMacOSXDialog.c
+++ b/macosx/tkMacOSXDialog.c
@@ -236,7 +236,7 @@ getFileURL(
callbackInfo->cmdObj, &objc, &objv);
if (result == TCL_OK && objc) {
- tmpv = ckalloc(sizeof(Tcl_Obj *) * (objc + 2));
+ tmpv = (Tcl_Obj **)ckalloc(sizeof(Tcl_Obj *) * (objc + 2));
memcpy(tmpv, objv, sizeof(Tcl_Obj *) * objc);
tmpv[objc] = resultObj;
TkBackgroundEvalObjv(callbackInfo->interp, objc + 1, tmpv,
@@ -274,7 +274,7 @@ getFileURL(
callbackInfo->cmdObj, &objc, &objv);
if (result == TCL_OK && objc) {
- tmpv = ckalloc(sizeof(Tcl_Obj *) * (objc + 2));
+ tmpv = (Tcl_Obj **)ckalloc(sizeof(Tcl_Obj *) * (objc + 2));
memcpy(tmpv, objv, sizeof(Tcl_Obj *) * objc);
tmpv[objc] = resultObj;
TkBackgroundEvalObjv(callbackInfo->interp, objc + 1, tmpv,
@@ -808,7 +808,7 @@ Tk_GetOpenFileObjCmd(
}
Tcl_IncrRefCount(cmdObj);
}
- callbackInfo = ckalloc(sizeof(FilePanelCallbackInfo));
+ callbackInfo = (FilePanelCallbackInfo *)ckalloc(sizeof(FilePanelCallbackInfo));
callbackInfo->cmdObj = cmdObj;
callbackInfo->interp = interp;
callbackInfo->multiple = multiple;
@@ -1086,7 +1086,7 @@ Tk_GetSaveFileObjCmd(
}
Tcl_IncrRefCount(cmdObj);
}
- callbackInfo = ckalloc(sizeof(FilePanelCallbackInfo));
+ callbackInfo = (FilePanelCallbackInfo *)ckalloc(sizeof(FilePanelCallbackInfo));
callbackInfo->cmdObj = cmdObj;
callbackInfo->interp = interp;
callbackInfo->multiple = 0;
@@ -1237,7 +1237,7 @@ Tk_ChooseDirectoryObjCmd(
}
Tcl_IncrRefCount(cmdObj);
}
- callbackInfo = ckalloc(sizeof(FilePanelCallbackInfo));
+ callbackInfo = (FilePanelCallbackInfo *)ckalloc(sizeof(FilePanelCallbackInfo));
callbackInfo->cmdObj = cmdObj;
callbackInfo->interp = interp;
callbackInfo->multiple = 0;
@@ -1535,7 +1535,7 @@ Tk_MessageBoxObjCmd(
}
Tcl_IncrRefCount(cmdObj);
}
- callbackInfo = ckalloc(sizeof(AlertCallbackInfo));
+ callbackInfo = (AlertCallbackInfo *)ckalloc(sizeof(AlertCallbackInfo));
callbackInfo->cmdObj = cmdObj;
callbackInfo->interp = interp;
callbackInfo->typeIndex = typeIndex;
@@ -1727,7 +1727,7 @@ FontchooserEvent(
result = Tcl_ListObjGetElements(fontchooserInterp,
fcdPtr->cmdObj, &objc, &objv);
if (result == TCL_OK) {
- tmpv = ckalloc(sizeof(Tcl_Obj *) * (objc + 2));
+ tmpv = (Tcl_Obj **)ckalloc(sizeof(Tcl_Obj *) * (objc + 2));
memcpy(tmpv, objv, sizeof(Tcl_Obj *) * objc);
tmpv[objc] = fontObj;
TkBackgroundEvalObjv(fontchooserInterp, objc + 1, tmpv,
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c
index e6ccf20..520246c 100644
--- a/macosx/tkMacOSXDraw.c
+++ b/macosx/tkMacOSXDraw.c
@@ -601,7 +601,7 @@ TkMacOSXGetCGContextForDrawable(
bytesPerRow = ((size_t)
macDraw->size.width * bitsPerPixel + 127) >> 3 & ~15;
len = macDraw->size.height * bytesPerRow;
- data = ckalloc(len);
+ data = (char *)ckalloc(len);
bzero(data, len);
macDraw->context = CGBitmapContextCreate(data, macDraw->size.width,
macDraw->size.height, bitsPerComponent, bytesPerRow,
diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c
index b69fb48..5afb408 100644
--- a/macosx/tkMacOSXEmbed.c
+++ b/macosx/tkMacOSXEmbed.c
@@ -90,7 +90,7 @@ Tk_MacOSXSetEmbedHandler(
Tk_MacOSXEmbedGetOffsetInParentProc *getOffsetProc)
{
if (tkMacOSXEmbedHandler == NULL) {
- tkMacOSXEmbedHandler = ckalloc(sizeof(TkMacOSXEmbedHandler));
+ tkMacOSXEmbedHandler = (TkMacOSXEmbedHandler *)ckalloc(sizeof(TkMacOSXEmbedHandler));
}
tkMacOSXEmbedHandler->registerWinProc = registerWinProc;
tkMacOSXEmbedHandler->getPortProc = getPortProc;
@@ -135,7 +135,7 @@ TkpMakeWindow(
* Allocate sub window
*/
- macWin = ckalloc(sizeof(MacDrawable));
+ macWin = (MacDrawable *)ckalloc(sizeof(MacDrawable));
if (macWin == NULL) {
winPtr->privatePtr = NULL;
return None;
@@ -307,7 +307,7 @@ TkpUseWindow(
* Make the embedded window.
*/
- macWin = ckalloc(sizeof(MacDrawable));
+ macWin = (MacDrawable *)ckalloc(sizeof(MacDrawable));
if (macWin == NULL) {
winPtr->privatePtr = NULL;
return TCL_ERROR;
@@ -393,7 +393,7 @@ TkpMakeContainer(
*/
Tk_MakeWindowExist(tkwin);
- containerPtr = ckalloc(sizeof(Container));
+ containerPtr = (Container *)ckalloc(sizeof(Container));
containerPtr->parent = Tk_WindowId(tkwin);
containerPtr->parentPtr = winPtr;
containerPtr->embedded = None;
diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c
index 295f4de..7a5215f 100644
--- a/macosx/tkMacOSXFont.c
+++ b/macosx/tkMacOSXFont.c
@@ -218,7 +218,7 @@ TkNSStringToUtf(
{
unsigned int code;
size_t i;
- char *ptr, *bytes = ckalloc(6*[string length] + 1);
+ char *ptr, *bytes = (char *)ckalloc(6*[string length] + 1);
ptr = bytes;
if (ptr) {
@@ -626,7 +626,7 @@ TkpGetNativeFont(
ctFont = CTFontCreateUIFontForLanguage(
HIThemeGetUIFontType(themeFontId), 0, NULL);
if (ctFont) {
- fontPtr = ckalloc(sizeof(MacFont));
+ fontPtr = (MacFont *)ckalloc(sizeof(MacFont));
InitFont((NSFont*) ctFont, NULL, fontPtr);
}
@@ -694,7 +694,7 @@ TkpGetFontFromAttributes(
Tcl_Panic("Could not determine NSFont from TkFontAttributes");
}
if (tkFontPtr == NULL) {
- fontPtr = ckalloc(sizeof(MacFont));
+ fontPtr = (MacFont *)ckalloc(sizeof(MacFont));
} else {
fontPtr = (MacFont *) tkFontPtr;
TkpDeleteFont(tkFontPtr);
diff --git a/macosx/tkMacOSXHLEvents.c b/macosx/tkMacOSXHLEvents.c
index 49516cf..e2ff0f1 100644
--- a/macosx/tkMacOSXHLEvents.c
+++ b/macosx/tkMacOSXHLEvents.c
@@ -90,7 +90,7 @@ static const char* scriptTextProc = "::tk::mac::DoScriptText";
* quickly as possible.
*/
- eventPtr = ckalloc(sizeof(KillEvent));
+ eventPtr = (KillEvent *)ckalloc(sizeof(KillEvent));
eventPtr->header.proc = ReallyKillMe;
eventPtr->interp = _eventInterp;
@@ -200,7 +200,7 @@ static const char* scriptTextProc = "::tk::mac::DoScriptText";
* procedure, passing the paths contained in the AppleEvent as arguments.
*/
- AppleEventInfo *AEInfo = ckalloc(sizeof(AppleEventInfo));
+ AppleEventInfo *AEInfo = (AppleEventInfo *)ckalloc(sizeof(AppleEventInfo));
Tcl_DString *openCommand = &AEInfo->command;
Tcl_DStringInit(openCommand);
Tcl_DStringAppend(openCommand, openDocumentProc, -1);
@@ -238,7 +238,7 @@ static const char* scriptTextProc = "::tk::mac::DoScriptText";
NSString* file = [[event paramDescriptorForKeyword:keyDirectObject]
stringValue];
const char *printFile = [file UTF8String];
- AppleEventInfo *AEInfo = ckalloc(sizeof(AppleEventInfo));
+ AppleEventInfo *AEInfo = (AppleEventInfo *)ckalloc(sizeof(AppleEventInfo));
Tcl_DString *printCommand = &AEInfo->command;
(void)replyEvent;
@@ -301,7 +301,7 @@ static const char* scriptTextProc = "::tk::mac::DoScriptText";
URLBuffer[actual] = '\0';
NSString *urlString = [NSString stringWithUTF8String:(char*)URLBuffer];
NSURL *fileURL = [NSURL URLWithString:urlString];
- AppleEventInfo *AEInfo = ckalloc(sizeof(AppleEventInfo));
+ AppleEventInfo *AEInfo = (AppleEventInfo *)ckalloc(sizeof(AppleEventInfo));
Tcl_DString *scriptFileCommand = &AEInfo->command;
Tcl_DStringInit(scriptFileCommand);
Tcl_DStringAppend(scriptFileCommand, scriptFileProc, -1);
@@ -321,11 +321,11 @@ static const char* scriptTextProc = "::tk::mac::DoScriptText";
*/
if (actual > 0) {
- char *data = ckalloc(actual + 1);
+ char *data = (char *)ckalloc(actual + 1);
if (noErr == AEGetParamPtr(theDesc, keyDirectObject,
typeUTF8Text, &type,
data, actual, NULL)) {
- AppleEventInfo *AEInfo = ckalloc(sizeof(AppleEventInfo));
+ AppleEventInfo *AEInfo = (AppleEventInfo *)ckalloc(sizeof(AppleEventInfo));
Tcl_DString *scriptTextCommand = &AEInfo->command;
Tcl_DStringInit(scriptTextCommand);
Tcl_DStringAppend(scriptTextCommand, scriptTextProc, -1);
@@ -350,7 +350,7 @@ static const char* scriptTextProc = "::tk::mac::DoScriptText";
NSString* url = [[event paramDescriptorForKeyword:keyDirectObject]
stringValue];
const char *cURL=[url UTF8String];
- AppleEventInfo *AEInfo = ckalloc(sizeof(AppleEventInfo));
+ AppleEventInfo *AEInfo = (AppleEventInfo *)ckalloc(sizeof(AppleEventInfo));
Tcl_DString *launchCommand = &AEInfo->command;
(void)replyEvent;
diff --git a/macosx/tkMacOSXImage.c b/macosx/tkMacOSXImage.c
index a8c7922..07a20ac 100644
--- a/macosx/tkMacOSXImage.c
+++ b/macosx/tkMacOSXImage.c
@@ -77,7 +77,7 @@ TkMacOSXCreateCGImageWithXImage(
if (image->bitmap_bit_order != MSBFirst) {
char *srcPtr = image->data + image->xoffset;
char *endPtr = srcPtr + len;
- char *destPtr = (data = ckalloc(len));
+ char *destPtr = (data = (char *)ckalloc(len));
while (srcPtr < endPtr) {
*destPtr++ = xBitReverseTable[(unsigned char)(*(srcPtr++))];
@@ -218,7 +218,7 @@ XGetImage(
bitmap_fmt = [bitmap_rep bitmapFormat];
size = [bitmap_rep bytesPerPlane];
bytes_per_row = [bitmap_rep bytesPerRow];
- bitmap = ckalloc(size);
+ bitmap = (char *)ckalloc(size);
if (!bitmap
|| (bitmap_fmt != 0 && bitmap_fmt != 1)
|| [bitmap_rep samplesPerPixel] != 4
@@ -460,7 +460,7 @@ XCreateImage(
(void)visual;
display->request++;
- ximage = ckalloc(sizeof(XImage));
+ ximage = (XImage *)ckalloc(sizeof(XImage));
ximage->height = height;
ximage->width = width;
diff --git a/macosx/tkMacOSXKeyboard.c b/macosx/tkMacOSXKeyboard.c
index c7e5842..1db3fb5 100644
--- a/macosx/tkMacOSXKeyboard.c
+++ b/macosx/tkMacOSXKeyboard.c
@@ -487,7 +487,7 @@ XGetModifierMapping(
* MacOSX doesn't use the key codes for the modifiers for anything, and we
* don't generate them either. So there is no modifier map.
*/
- modmap = ckalloc(sizeof(XModifierKeymap));
+ modmap = (XModifierKeymap *)ckalloc(sizeof(XModifierKeymap));
modmap->max_keypermod = 0;
modmap->modifiermap = NULL;
return modmap;
diff --git a/macosx/tkMacOSXMenubutton.c b/macosx/tkMacOSXMenubutton.c
index 1f62ca7..c079005 100644
--- a/macosx/tkMacOSXMenubutton.c
+++ b/macosx/tkMacOSXMenubutton.c
@@ -135,7 +135,7 @@ TkMenuButton *
TkpCreateMenuButton(
Tk_Window tkwin)
{
- MacMenuButton *mbPtr = (MacMenuButton *) ckalloc(sizeof(MacMenuButton));
+ MacMenuButton *mbPtr = (MacMenuButton *)ckalloc(sizeof(MacMenuButton));
Tk_CreateEventHandler(tkwin, ActivateMask, MenuButtonEventProc, mbPtr);
mbPtr->flags = FIRST_DRAW;
diff --git a/macosx/tkMacOSXScale.c b/macosx/tkMacOSXScale.c
index 0195ffb..2e33622 100644
--- a/macosx/tkMacOSXScale.c
+++ b/macosx/tkMacOSXScale.c
@@ -76,7 +76,7 @@ TkScale *
TkpCreateScale(
Tk_Window tkwin)
{
- MacScale *macScalePtr = ckalloc(sizeof(MacScale));
+ MacScale *macScalePtr = (MacScale *)ckalloc(sizeof(MacScale));
macScalePtr->scaleHandle = NULL;
if (scaleActionProc == NULL) {
diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c
index bf09a3f..a49ec55 100644
--- a/macosx/tkMacOSXScrlbr.c
+++ b/macosx/tkMacOSXScrlbr.c
@@ -121,7 +121,7 @@ TkScrollbar *
TkpCreateScrollbar(
Tk_Window tkwin)
{
- MacScrollbar *scrollPtr = ckalloc(sizeof(MacScrollbar));
+ MacScrollbar *scrollPtr = (MacScrollbar *)ckalloc(sizeof(MacScrollbar));
scrollPtr->troughGC = NULL;
scrollPtr->copyGC = NULL;
diff --git a/macosx/tkMacOSXSend.c b/macosx/tkMacOSXSend.c
index e96570e..71a86df 100644
--- a/macosx/tkMacOSXSend.c
+++ b/macosx/tkMacOSXSend.c
@@ -281,9 +281,9 @@ Tk_SetAppName(
* We have found a unique name. Now add it to the registry.
*/
- riPtr = ckalloc(sizeof(RegisteredInterp));
+ riPtr = (RegisteredInterp *)ckalloc(sizeof(RegisteredInterp));
riPtr->interp = interp;
- riPtr->name = ckalloc(strlen(actualName) + 1);
+ riPtr->name = (char *)ckalloc(strlen(actualName) + 1);
riPtr->nextPtr = interpListPtr;
interpListPtr = riPtr;
strcpy(riPtr->name, actualName);
diff --git a/macosx/tkMacOSXServices.c b/macosx/tkMacOSXServices.c
index ac56279..974fec1 100644
--- a/macosx/tkMacOSXServices.c
+++ b/macosx/tkMacOSXServices.c
@@ -128,7 +128,7 @@ ServicesEventProc(
[generalpasteboard declareTypes:[NSArray arrayWithObjects:pboardType, nil]
owner:nil];
[generalpasteboard setString:pboardString forType:pboardType];
- event = ckalloc(sizeof(Tcl_Event));
+ event = (Tcl_Event *)ckalloc(sizeof(Tcl_Event));
event->proc = ServicesEventProc;
Tcl_QueueEvent((Tcl_Event *)event, TCL_QUEUE_TAIL);
}
diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c
index b814fbc..611afd7 100644
--- a/macosx/tkMacOSXSubwindows.c
+++ b/macosx/tkMacOSXSubwindows.c
@@ -1432,7 +1432,7 @@ Tk_GetPixmap(
if (display != NULL) {
display->request++;
}
- macPix = ckalloc(sizeof(MacDrawable));
+ macPix = (MacDrawable *)ckalloc(sizeof(MacDrawable));
macPix->winPtr = NULL;
macPix->xOff = 0;
macPix->yOff = 0;
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 1402f10..5dd39fd 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -659,7 +659,7 @@ void
TkWmNewWindow(
TkWindow *winPtr) /* Newly-created top-level window. */
{
- WmInfo *wmPtr = ckalloc(sizeof(WmInfo));
+ WmInfo *wmPtr = (WmInfo *)ckalloc(sizeof(WmInfo));
wmPtr->winPtr = winPtr;
wmPtr->reparent = None;
@@ -1607,7 +1607,7 @@ WmClientCmd(
if (wmPtr->clientMachine != NULL) {
ckfree(wmPtr->clientMachine);
}
- wmPtr->clientMachine = ckalloc(length + 1);
+ wmPtr->clientMachine = (char *)ckalloc(length + 1);
strcpy(wmPtr->clientMachine, argv3);
return TCL_OK;
}
@@ -1664,7 +1664,7 @@ WmColormapwindowsCmd(
!= TCL_OK) {
return TCL_ERROR;
}
- cmapList = ckalloc((windowObjc+1) * sizeof(TkWindow*));
+ cmapList = (TkWindow **)ckalloc((windowObjc+1) * sizeof(TkWindow*));
for (i = 0; i < windowObjc; i++) {
if (TkGetWindowFromObj(interp, tkwin, windowObjv[i],
(Tk_Window *) &winPtr2) != TCL_OK) {
@@ -2222,7 +2222,7 @@ WmGroupCmd(
}
wmPtr->hints.window_group = Tk_WindowId(tkwin2);
wmPtr->hints.flags |= WindowGroupHint;
- wmPtr->leaderName = ckalloc(length + 1);
+ wmPtr->leaderName = (char *)ckalloc(length + 1);
strcpy(wmPtr->leaderName, argv3);
}
return TCL_OK;
@@ -2482,7 +2482,7 @@ WmIconnameCmd(
ckfree(wmPtr->iconName);
}
argv3 = Tcl_GetStringFromObj(objv[3], &length);
- wmPtr->iconName = ckalloc(length + 1);
+ wmPtr->iconName = (char *)ckalloc(length + 1);
strcpy(wmPtr->iconName, argv3);
if (!(wmPtr->flags & WM_NEVER_MAPPED)) {
XSetIconName(winPtr->display, winPtr->window, wmPtr->iconName);
@@ -3118,12 +3118,12 @@ WmProtocolCmd(
}
cmd = Tcl_GetStringFromObj(objv[4], &cmdLength);
if (cmdLength > 0) {
- protPtr = ckalloc(sizeof(ProtocolHandler));
+ protPtr = (ProtocolHandler *)ckalloc(sizeof(ProtocolHandler));
protPtr->protocol = protocol;
protPtr->nextPtr = wmPtr->protPtr;
wmPtr->protPtr = protPtr;
protPtr->interp = interp;
- protPtr->command = ckalloc(cmdLength+1);
+ protPtr->command = (char *)ckalloc(cmdLength+1);
strcpy(protPtr->command, cmd);
}
return TCL_OK;
@@ -3667,7 +3667,7 @@ WmTransientCmd(
transient != NULL && transient->winPtr != winPtr;
transient = transient->nextPtr) {}
if (transient == NULL) {
- transient = ckalloc(sizeof(Transient));
+ transient = (Transient *)ckalloc(sizeof(Transient));
transient->winPtr = winPtr;
transient->flags = 0;
transient->nextPtr = wmPtr2->transientPtr;
@@ -5085,7 +5085,7 @@ TkWmAddToColormapWindows(
* add the toplevel itself as the last element of the list.
*/
- newPtr = ckalloc((count+2) * sizeof(TkWindow *));
+ newPtr = (TkWindow **)ckalloc((count+2) * sizeof(TkWindow *));
if (count > 0) {
memcpy(newPtr, oldPtr, count * sizeof(TkWindow *));
}
@@ -6669,7 +6669,7 @@ TkWmStackorderToplevel(
NSArray* backToFront = [[macWindows reverseObjectEnumerator] allObjects];
NSInteger windowCount = [macWindows count];
- windows = windowPtr = ckalloc((windowCount + 1) * sizeof(TkWindow *));
+ windows = windowPtr = (TkWindow **)ckalloc((windowCount + 1) * sizeof(TkWindow *));
if (windows != NULL) {
Tcl_InitHashTable(&table, TCL_ONE_WORD_KEYS);
WmStackorderToplevelWrapperMap(parentPtr, parentPtr->display, &table);
diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c
index abbfb38..a02e71b 100644
--- a/macosx/tkMacOSXXStubs.c
+++ b/macosx/tkMacOSXXStubs.c
@@ -204,7 +204,7 @@ TkpOpenDisplay(
TkMacOSXDisplayChanged(display);
- gMacDisplay = ckalloc(sizeof(TkDisplay));
+ gMacDisplay = (TkDisplay *)ckalloc(sizeof(TkDisplay));
/*
* This is the quickest way to make sure that all the *Init flags get
@@ -232,8 +232,8 @@ XkbOpenDisplay(
int *minor_rtrn,
int *reason)
{
- Display *display = ckalloc(sizeof(Display));
- Screen *screen = ckalloc(sizeof(Screen));
+ Display *display = (Display *)ckalloc(sizeof(Display));
+ Screen *screen = (Screen *)ckalloc(sizeof(Screen));
int fd = 0;
NSArray *cgVers;
static char vendor[25] = "";
@@ -260,7 +260,7 @@ XkbOpenDisplay(
screen->white_pixel = 0x00FFFFFF | PIXEL_MAGIC << 24;
screen->ext_data = (XExtData *) &maxBounds;
- screen->root_visual = ckalloc(sizeof(Visual));
+ screen->root_visual = (Visual *)ckalloc(sizeof(Visual));
screen->root_visual->visualid = 0;
screen->root_visual->c_class = TrueColor;
screen->root_visual->red_mask = 0x00FF0000;