diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-12-20 08:02:30 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-12-20 08:02:30 (GMT) |
commit | 81b0bd7641a9d2f63154c97d41c27bbb696ef674 (patch) | |
tree | a17119411589e8c1291df53e2546243d84e78583 /generic/tk3d.c | |
parent | 93d974c265533cf2445446954346be8192e850a0 (diff) | |
download | tk-81b0bd7641a9d2f63154c97d41c27bbb696ef674.zip tk-81b0bd7641a9d2f63154c97d41c27bbb696ef674.tar.gz tk-81b0bd7641a9d2f63154c97d41c27bbb696ef674.tar.bz2 |
Fix [9e31fd944934e269121fa78ff56b7b86f33e6db6|9e31fd9449]: X11/X.h and Windows.h have conflicting symbols.
Also fix a few newer (harmless) gcc warnings.
Diffstat (limited to 'generic/tk3d.c')
-rw-r--r-- | generic/tk3d.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/generic/tk3d.c b/generic/tk3d.c index caa40dd..a97bed3 100644 --- a/generic/tk3d.c +++ b/generic/tk3d.c @@ -236,10 +236,10 @@ Tk_Get3DBorder( borderPtr->bgColorPtr = bgColorPtr; borderPtr->darkColorPtr = NULL; borderPtr->lightColorPtr = NULL; - borderPtr->shadow = None; - borderPtr->bgGC = None; - borderPtr->darkGC = None; - borderPtr->lightGC = None; + borderPtr->shadow = 0; + borderPtr->bgGC = 0; + borderPtr->darkGC = 0; + borderPtr->lightGC = 0; borderPtr->hashPtr = hashPtr; borderPtr->nextPtr = existingBorderPtr; Tcl_SetHashValue(hashPtr, borderPtr); @@ -375,7 +375,7 @@ Tk_3DBorderGC( { TkBorder * borderPtr = (TkBorder *) border; - if ((borderPtr->lightGC == None) && (which != TK_3D_FLAT_GC)) { + if (!borderPtr->lightGC && (which != TK_3D_FLAT_GC)) { TkpGetShadows(borderPtr, tkwin); } if (which == TK_3D_FLAT_GC) { @@ -392,7 +392,7 @@ Tk_3DBorderGC( * compilers happy. */ - return (GC) None; + return 0; } /* @@ -428,29 +428,29 @@ Tk_Free3DBorder( prevPtr = (TkBorder *) Tcl_GetHashValue(borderPtr->hashPtr); TkpFreeBorder(borderPtr); - if (borderPtr->bgColorPtr != NULL) { + if (borderPtr->bgColorPtr) { Tk_FreeColor(borderPtr->bgColorPtr); } - if (borderPtr->darkColorPtr != NULL) { + if (borderPtr->darkColorPtr) { Tk_FreeColor(borderPtr->darkColorPtr); } - if (borderPtr->lightColorPtr != NULL) { + if (borderPtr->lightColorPtr) { Tk_FreeColor(borderPtr->lightColorPtr); } - if (borderPtr->shadow != None) { + if (borderPtr->shadow) { Tk_FreeBitmap(display, borderPtr->shadow); } - if (borderPtr->bgGC != None) { + if (borderPtr->bgGC) { Tk_FreeGC(display, borderPtr->bgGC); } - if (borderPtr->darkGC != None) { + if (borderPtr->darkGC) { Tk_FreeGC(display, borderPtr->darkGC); } - if (borderPtr->lightGC != None) { + if (borderPtr->lightGC) { Tk_FreeGC(display, borderPtr->lightGC); } if (prevPtr == borderPtr) { - if (borderPtr->nextPtr == NULL) { + if (!borderPtr->nextPtr) { Tcl_DeleteHashEntry(borderPtr->hashPtr); } else { Tcl_SetHashValue(borderPtr->hashPtr, borderPtr->nextPtr); @@ -759,7 +759,7 @@ Tk_Draw3DPolygon( int i, lightOnLeft, dx, dy, parallel, pointsSeen; Display *display = Tk_Display(tkwin); - if (borderPtr->lightGC == None) { + if (!borderPtr->lightGC) { TkpGetShadows(borderPtr, tkwin); } |