summaryrefslogtreecommitdiffstats
path: root/generic/tk3d.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-12-31 15:36:56 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-12-31 15:36:56 (GMT)
commitf2b5a87d6dc6d3468828d48929583d950690a40b (patch)
tree22ec58572e255d6081163199ca2f2d60365c7b6c /generic/tk3d.c
parentb68e469c6fcec04a86935ae2e8853197213f40db (diff)
downloadtk-f2b5a87d6dc6d3468828d48929583d950690a40b.zip
tk-f2b5a87d6dc6d3468828d48929583d950690a40b.tar.gz
tk-f2b5a87d6dc6d3468828d48929583d950690a40b.tar.bz2
As requested by Christian Werner/François Vogel and others: Undo many None -> 0 changes, in order to reduce the probability of merge conflicts with other branches.
Remark: Many usages of "None" in Tk are wrong, "NULL" should be used in many places where pointers are referenced in stead of XID's. Those places are corrected.
Diffstat (limited to 'generic/tk3d.c')
-rw-r--r--generic/tk3d.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/generic/tk3d.c b/generic/tk3d.c
index a97bed3..eebe122 100644
--- a/generic/tk3d.c
+++ b/generic/tk3d.c
@@ -236,7 +236,7 @@ Tk_Get3DBorder(
borderPtr->bgColorPtr = bgColorPtr;
borderPtr->darkColorPtr = NULL;
borderPtr->lightColorPtr = NULL;
- borderPtr->shadow = 0;
+ borderPtr->shadow = None;
borderPtr->bgGC = 0;
borderPtr->darkGC = 0;
borderPtr->lightGC = 0;
@@ -375,7 +375,7 @@ Tk_3DBorderGC(
{
TkBorder * borderPtr = (TkBorder *) border;
- if (!borderPtr->lightGC && (which != TK_3D_FLAT_GC)) {
+ if ((borderPtr->lightGC == None) && (which != TK_3D_FLAT_GC)) {
TkpGetShadows(borderPtr, tkwin);
}
if (which == TK_3D_FLAT_GC) {
@@ -392,7 +392,7 @@ Tk_3DBorderGC(
* compilers happy.
*/
- return 0;
+ return (GC) None;
}
/*
@@ -428,29 +428,29 @@ Tk_Free3DBorder(
prevPtr = (TkBorder *) Tcl_GetHashValue(borderPtr->hashPtr);
TkpFreeBorder(borderPtr);
- if (borderPtr->bgColorPtr) {
+ if (borderPtr->bgColorPtr != NULL) {
Tk_FreeColor(borderPtr->bgColorPtr);
}
- if (borderPtr->darkColorPtr) {
+ if (borderPtr->darkColorPtr != NULL) {
Tk_FreeColor(borderPtr->darkColorPtr);
}
- if (borderPtr->lightColorPtr) {
+ if (borderPtr->lightColorPtr != NULL) {
Tk_FreeColor(borderPtr->lightColorPtr);
}
- if (borderPtr->shadow) {
+ if (borderPtr->shadow != None) {
Tk_FreeBitmap(display, borderPtr->shadow);
}
- if (borderPtr->bgGC) {
+ if (borderPtr->bgGC != None) {
Tk_FreeGC(display, borderPtr->bgGC);
}
- if (borderPtr->darkGC) {
+ if (borderPtr->darkGC != None) {
Tk_FreeGC(display, borderPtr->darkGC);
}
- if (borderPtr->lightGC) {
+ if (borderPtr->lightGC != None) {
Tk_FreeGC(display, borderPtr->lightGC);
}
if (prevPtr == borderPtr) {
- if (!borderPtr->nextPtr) {
+ if (borderPtr->nextPtr == NULL) {
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) {
+ if (borderPtr->lightGC == None) {
TkpGetShadows(borderPtr, tkwin);
}