diff options
Diffstat (limited to 'unix/tkUnixColor.c')
-rw-r--r-- | unix/tkUnixColor.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/unix/tkUnixColor.c b/unix/tkUnixColor.c index e9fdf11..afa9d24 100644 --- a/unix/tkUnixColor.c +++ b/unix/tkUnixColor.c @@ -10,7 +10,7 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ -#include "tkInt.h" +#include "tkUnixInt.h" #include "tkColor.h" /* @@ -176,7 +176,7 @@ TkpGetColor( } } - tkColPtr = (TkColor *) ckalloc(sizeof(TkColor)); + tkColPtr = ckalloc(sizeof(TkColor)); tkColPtr->color = color; return tkColPtr; @@ -211,7 +211,7 @@ TkpGetColorByValue( { Display *display = Tk_Display(tkwin); Colormap colormap = Tk_Colormap(tkwin); - TkColor *tkColPtr = (TkColor *) ckalloc(sizeof(TkColor)); + TkColor *tkColPtr = ckalloc(sizeof(TkColor)); tkColPtr->color.red = colorPtr->red; tkColPtr->color.green = colorPtr->green; @@ -269,7 +269,7 @@ FindClosestColor( for (stressPtr = dispPtr->stressPtr; ; stressPtr = stressPtr->nextPtr) { if (stressPtr == NULL) { - stressPtr = (TkStressedCmap *) ckalloc(sizeof(TkStressedCmap)); + stressPtr = ckalloc(sizeof(TkStressedCmap)); stressPtr->colormap = colormap; template.visualid = XVisualIDFromVisual(Tk_Visual(tkwin)); @@ -281,8 +281,8 @@ FindClosestColor( stressPtr->numColors = visInfoPtr->colormap_size; XFree((char *) visInfoPtr); - stressPtr->colorPtr = (XColor *) ckalloc((unsigned) - (stressPtr->numColors * sizeof(XColor))); + stressPtr->colorPtr = + ckalloc(stressPtr->numColors * sizeof(XColor)); for (i = 0; i < stressPtr->numColors; i++) { stressPtr->colorPtr[i].pixel = (unsigned long) i; } @@ -390,8 +390,8 @@ DeleteStressedCmap( } else { prevPtr->nextPtr = stressPtr->nextPtr; } - ckfree((char *) stressPtr->colorPtr); - ckfree((char *) stressPtr); + ckfree(stressPtr->colorPtr); + ckfree(stressPtr); return; } } |