summaryrefslogtreecommitdiffstats
path: root/xlib/xgc.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlib/xgc.c')
-rw-r--r--xlib/xgc.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/xlib/xgc.c b/xlib/xgc.c
index 8c04726..e097d2e 100644
--- a/xlib/xgc.c
+++ b/xlib/xgc.c
@@ -12,7 +12,7 @@
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
-#include <tkInt.h>
+#include "tkInt.h"
#if !defined(MAC_OSX_TK)
# include <X11/Xlib.h>
@@ -51,7 +51,7 @@ static TkpClipMask *AllocClipMask(GC gc) {
TkpClipMask *clip_mask = (TkpClipMask*) gc->clip_mask;
if (clip_mask == None) {
- clip_mask = (TkpClipMask*) ckalloc(sizeof(TkpClipMask));
+ clip_mask = ckalloc(sizeof(TkpClipMask));
gc->clip_mask = (Pixmap) clip_mask;
#ifdef MAC_OSX_TK
} else if (clip_mask->type == TKP_CLIP_REGION) {
@@ -84,7 +84,7 @@ static void FreeClipMask(GC gc) {
TkpReleaseRegion(((TkpClipMask*) gc->clip_mask)->value.region);
}
#endif
- ckfree((char*) gc->clip_mask);
+ ckfree(gc->clip_mask);
gc->clip_mask = None;
}
}
@@ -123,8 +123,7 @@ XCreateGC(
#define MAX_DASH_LIST_SIZE 10
- gp = (XGCValues *) ckalloc(sizeof(XGCValues) + MAX_DASH_LIST_SIZE +
- gcCacheSize);
+ gp = ckalloc(sizeof(XGCValues) + MAX_DASH_LIST_SIZE + gcCacheSize);
if (!gp) {
return None;
}
@@ -134,9 +133,9 @@ XCreateGC(
InitField(function, GCFunction, GXcopy);
InitField(plane_mask, GCPlaneMask, (unsigned long)(~0));
- InitField(foreground, GCForeground,
+ InitField(foreground, GCForeground,
BlackPixelOfScreen(DefaultScreenOfDisplay(display)));
- InitField(background, GCBackground,
+ InitField(background, GCBackground,
WhitePixelOfScreen(DefaultScreenOfDisplay(display)));
InitField(line_width, GCLineWidth, 1);
InitField(line_style, GCLineStyle, LineSolid);
@@ -272,7 +271,7 @@ int XFreeGC(
if (gc != None) {
FreeClipMask(gc);
TkpFreeGCCache(gc);
- ckfree((char *) gc);
+ ckfree(gc);
}
return Success;
}