From 79199606320eb3a92fb82195d522a04b59623e76 Mon Sep 17 00:00:00 2001 From: treectrl Date: Thu, 19 May 2005 00:40:25 +0000 Subject: Cast argument to AllocHax_Free() and AllocHax_CFree(). --- generic/tkTreeItem.c | 14 ++++++++------ generic/tkTreeStyle.c | 22 +++++++++++----------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/generic/tkTreeItem.c b/generic/tkTreeItem.c index e93dc95..7744231 100644 --- a/generic/tkTreeItem.c +++ b/generic/tkTreeItem.c @@ -5,7 +5,7 @@ * * Copyright (c) 2002-2005 Tim Baker * - * RCS: @(#) $Id: tkTreeItem.c,v 1.33 2005/05/17 01:24:09 treectrl Exp $ + * RCS: @(#) $Id: tkTreeItem.c,v 1.34 2005/05/19 00:40:25 treectrl Exp $ */ #include "tkTreeCtrl.h" @@ -134,7 +134,7 @@ Column *Column_FreeResources(TreeCtrl *tree, Column *self) if (self->style != NULL) TreeStyle_FreeResources(tree, self->style); #ifdef ALLOC_HAX - AllocHax_Free(tree->allocData, self, sizeof(Column)); + AllocHax_Free(tree->allocData, (char *) self, sizeof(Column)); #else WFREE(self, Column); #endif @@ -1395,7 +1395,7 @@ void TreeItem_FreeResources(TreeCtrl *tree, TreeItem item_) if (self->rInfo != NULL) Tree_FreeItemRInfo(tree, item_); #ifdef ALLOC_HAX - AllocHax_Free(tree->allocData, self, sizeof(Item)); + AllocHax_Free(tree->allocData, (char *) self, sizeof(Item)); #else WFREE(self, Item); #endif @@ -1585,9 +1585,10 @@ static void ItemDrawBackground(TreeCtrl *tree, TreeColumn treeColumn, if (gc == None) gc = Tk_3DBorderGC(tree->tkwin, tree->border, TK_3D_FLAT_GC); XFillRectangle(tree->display, drawable, gc, x, y, width, height); - if (tree->backgroundImage != NULL) - Tree_DrawTiledImage(tree, drawable, tree->backgroundImage, x, y, - x + width, y + height); + if (tree->backgroundImage != NULL) { + Tree_DrawTiledImage(tree, drawable, tree->backgroundImage, x, y, + x + width, y + height); + } } void TreeItem_Draw(TreeCtrl *tree, TreeItem item_, int x, int y, @@ -1833,6 +1834,7 @@ void TreeItem_DrawButton(TreeCtrl *tree, TreeItem item_, int x, int y, int width XCopyPlane(tree->display, bitmap, drawable, gc, 0, 0, (unsigned int) bmpW, (unsigned int) bmpH, bx, by, 1); + XSetClipOrigin(tree->display, gc, 0, 0); Tk_FreeGC(tree->display, gc); return; } diff --git a/generic/tkTreeStyle.c b/generic/tkTreeStyle.c index a6b45f0..1953985 100644 --- a/generic/tkTreeStyle.c +++ b/generic/tkTreeStyle.c @@ -5,7 +5,7 @@ * * Copyright (c) 2002-2005 Tim Baker * - * RCS: @(#) $Id: tkTreeStyle.c,v 1.24 2005/05/17 01:22:21 treectrl Exp $ + * RCS: @(#) $Id: tkTreeStyle.c,v 1.25 2005/05/19 00:40:26 treectrl Exp $ */ #include "tkTreeCtrl.h" @@ -1941,7 +1941,7 @@ static void Element_FreeResources(TreeCtrl *tree, Element *elem) elem->typePtr->optionTable, tree->tkwin); #ifdef ALLOC_HAX - AllocHax_Free(tree->allocData, elem, elem->typePtr->size); + AllocHax_Free(tree->allocData, (char *) elem, elem->typePtr->size); #else WFREE(elem, Element); #endif @@ -1981,14 +1981,14 @@ void TreeStyle_FreeResources(TreeCtrl *tree, TreeStyle style_) for (i = 0; i < style->numElements; i++) ElementLink_FreeResources(tree, &style->elements[i]); #ifdef ALLOC_HAX - AllocHax_CFree(tree->allocData, style->elements, sizeof(ElementLink), style->numElements, 5); + AllocHax_CFree(tree->allocData, (char *) style->elements, sizeof(ElementLink), style->numElements, 5); #else wipefree((char *) style->elements, sizeof(ElementLink) * style->numElements); #endif } #ifdef ALLOC_HAX - AllocHax_Free(tree->allocData, style, sizeof(Style)); + AllocHax_Free(tree->allocData, (char *) style, sizeof(Style)); #else WFREE(style, Style); #endif @@ -2051,7 +2051,7 @@ static Element *Element_CreateAndConfig(TreeCtrl *tree, TreeItem item, if ((*type->createProc)(&args) != TCL_OK) { #ifdef ALLOC_HAX - AllocHax_Free(tree->allocData, elem, type->size); + AllocHax_Free(tree->allocData, (char *) elem, type->size); #else WFREE(elem, Element); #endif @@ -2062,7 +2062,7 @@ static Element *Element_CreateAndConfig(TreeCtrl *tree, TreeItem item, type->optionTable, tree->tkwin) != TCL_OK) { #ifdef ALLOC_HAX - AllocHax_Free(tree->allocData, elem, type->size); + AllocHax_Free(tree->allocData, (char *) elem, type->size); #else WFREE(elem, Element); #endif @@ -2078,7 +2078,7 @@ static Element *Element_CreateAndConfig(TreeCtrl *tree, TreeItem item, elem->typePtr->optionTable, tree->tkwin); #ifdef ALLOC_HAX - AllocHax_Free(tree->allocData, elem, type->size); + AllocHax_Free(tree->allocData, (char *) elem, type->size); #else WFREE(elem, Element); #endif @@ -2316,7 +2316,7 @@ static void Style_ChangeElementsAux(TreeCtrl *tree, Style *style, int count, Ele ElementLink_FreeResources(tree, &style->elements[i]); } #ifdef ALLOC_HAX - AllocHax_CFree(tree->allocData, style->elements, sizeof(ElementLink), style->numElements, 5); + AllocHax_CFree(tree->allocData, (char *) style->elements, sizeof(ElementLink), style->numElements, 5); #else wipefree((char *) style->elements, sizeof(ElementLink) * style->numElements); @@ -3251,7 +3251,7 @@ static Style *Style_CreateAndConfig(TreeCtrl *tree, char *name, int objc, Tcl_Ob style->optionTable, tree->tkwin) != TCL_OK) { #ifdef ALLOC_HAX - AllocHax_Free(tree->allocData, style, sizeof(Style)); + AllocHax_Free(tree->allocData, (char *) style, sizeof(Style)); #else WFREE(style, Style); #endif @@ -3264,7 +3264,7 @@ static Style *Style_CreateAndConfig(TreeCtrl *tree, char *name, int objc, Tcl_Ob { Tk_FreeConfigOptions((char *) style, style->optionTable, tree->tkwin); #ifdef ALLOC_HAX - AllocHax_Free(tree->allocData, style, sizeof(Style)); + AllocHax_Free(tree->allocData, (char *) style, sizeof(Style)); #else WFREE(style, Style); #endif @@ -4215,7 +4215,7 @@ int TreeStyle_Remap(TreeCtrl *tree, TreeStyle styleFrom_, TreeStyle styleTo_, in { #ifdef ALLOC_HAX if (styleFrom->numElements > 0) - AllocHax_CFree(tree->allocData, styleFrom->elements, sizeof(ElementLink), styleFrom->numElements, 5); + AllocHax_CFree(tree->allocData, (char *) styleFrom->elements, sizeof(ElementLink), styleFrom->numElements, 5); styleFrom->elements = (ElementLink *) AllocHax_CAlloc(tree->allocData, sizeof(ElementLink), styleTo->numElements, 5); #else if (styleFrom->numElements > 0) -- cgit v0.12