diff options
Diffstat (limited to 'xlib/xgc.c')
-rw-r--r-- | xlib/xgc.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -50,7 +50,7 @@ static TkpClipMask *AllocClipMask(GC gc) { TkpClipMask *clip_mask = (TkpClipMask*) gc->clip_mask; - if (clip_mask == None) { + if (!clip_mask) { clip_mask = ckalloc(sizeof(TkpClipMask)); gc->clip_mask = (Pixmap) clip_mask; #ifdef MAC_OSX_TK @@ -78,14 +78,14 @@ static TkpClipMask *AllocClipMask(GC gc) { */ static void FreeClipMask(GC gc) { - if (gc->clip_mask != None) { + if (gc->clip_mask) { #ifdef MAC_OSX_TK if (((TkpClipMask*) gc->clip_mask)->type == TKP_CLIP_REGION) { TkpReleaseRegion(((TkpClipMask*) gc->clip_mask)->value.region); } #endif ckfree(gc->clip_mask); - gc->clip_mask = None; + gc->clip_mask = 0; } } @@ -125,7 +125,7 @@ XCreateGC( gp = ckalloc(sizeof(XGCValues) + MAX_DASH_LIST_SIZE + gcCacheSize); if (!gp) { - return None; + return 0; } #define InitField(name,maskbit,default) \ @@ -144,11 +144,11 @@ XCreateGC( InitField(fill_style, GCFillStyle, FillSolid); InitField(fill_rule, GCFillRule, WindingRule); InitField(arc_mode, GCArcMode, ArcPieSlice); - InitField(tile, GCTile, None); - InitField(stipple, GCStipple, None); + InitField(tile, GCTile, 0); + InitField(stipple, GCStipple, 0); InitField(ts_x_origin, GCTileStipXOrigin, 0); InitField(ts_y_origin, GCTileStipYOrigin, 0); - InitField(font, GCFont, None); + InitField(font, GCFont, 0); InitField(subwindow_mode, GCSubwindowMode, ClipByChildren); InitField(graphics_exposures, GCGraphicsExposures, True); InitField(clip_x_origin, GCClipXOrigin, 0); @@ -157,7 +157,7 @@ XCreateGC( InitField(dashes, GCDashList, 4); (&(gp->dashes))[1] = 0; - gp->clip_mask = None; + gp->clip_mask = 0; if (mask & GCClipMask) { TkpClipMask *clip_mask = AllocClipMask(gp); @@ -268,7 +268,7 @@ int XFreeGC( Display *d, GC gc) { - if (gc != None) { + if (gc) { FreeClipMask(gc); TkpFreeGCCache(gc); ckfree(gc); @@ -464,7 +464,7 @@ TkSetRegion( GC gc, TkRegion r) { - if (r == None) { + if (!r) { Tcl_Panic("must not pass None to TkSetRegion for compatibility with X11; use XSetClipMask instead"); } else { TkpClipMask *clip_mask = AllocClipMask(gc); @@ -483,7 +483,7 @@ XSetClipMask( GC gc, Pixmap pixmap) { - if (pixmap == None) { + if (!pixmap) { FreeClipMask(gc); } else { TkpClipMask *clip_mask = AllocClipMask(gc); |