diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-12-20 09:44:05 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-12-20 09:44:05 (GMT) |
commit | e26cd8eb2b04a4bd764e382cbcbfe4b1030796c6 (patch) | |
tree | 6bca925436edc8dce431cfd10502d50117b62d46 /generic/tkCanvLine.c | |
parent | 0c4227b6cc6e9716ddd086a75e45c4e9373fa51b (diff) | |
parent | 81b0bd7641a9d2f63154c97d41c27bbb696ef674 (diff) | |
download | tk-e26cd8eb2b04a4bd764e382cbcbfe4b1030796c6.zip tk-e26cd8eb2b04a4bd764e382cbcbfe4b1030796c6.tar.gz tk-e26cd8eb2b04a4bd764e382cbcbfe4b1030796c6.tar.bz2 |
Fix [9e31fd9449]: X11/X.h and Windows.h have conflicting symbols
*** POTENTIAL INCOMPATIBILITY *** for Win32 only: On X11 and Mac, "None" can still be used as before
Diffstat (limited to 'generic/tkCanvLine.c')
-rw-r--r-- | generic/tkCanvLine.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/generic/tkCanvLine.c b/generic/tkCanvLine.c index 087aa56..7179c85 100644 --- a/generic/tkCanvLine.c +++ b/generic/tkCanvLine.c @@ -296,7 +296,7 @@ CreateLine( linePtr->coordPtr = NULL; linePtr->capStyle = CapButt; linePtr->joinStyle = JoinRound; - linePtr->arrowGC = None; + linePtr->arrowGC = 0; linePtr->arrow = ARROWS_NONE; linePtr->arrowShapeA = (float)8.0; linePtr->arrowShapeB = (float)10.0; @@ -493,9 +493,9 @@ ConfigureLine( } if (linePtr->outline.activeWidth > linePtr->outline.width || - linePtr->outline.activeDash.number != 0 || - linePtr->outline.activeColor != NULL || - linePtr->outline.activeStipple != None) { + linePtr->outline.activeDash.number || + linePtr->outline.activeColor || + linePtr->outline.activeStipple) { itemPtr->redraw_flags |= TK_ITEM_STATE_DEPENDANT; } else { itemPtr->redraw_flags &= ~TK_ITEM_STATE_DEPENDANT; @@ -521,12 +521,12 @@ ConfigureLine( #endif arrowGC = Tk_GetGC(tkwin, mask, &gcValues); } else { - newGC = arrowGC = None; + newGC = arrowGC = 0; } - if (linePtr->outline.gc != None) { + if (linePtr->outline.gc) { Tk_FreeGC(Tk_Display(tkwin), linePtr->outline.gc); } - if (linePtr->arrowGC != None) { + if (linePtr->arrowGC) { Tk_FreeGC(Tk_Display(tkwin), linePtr->arrowGC); } linePtr->outline.gc = newGC; @@ -552,7 +552,7 @@ ConfigureLine( * line's endpoints (they were shortened when the arrowheads were added). */ - if ((linePtr->firstArrowPtr != NULL) && (linePtr->arrow != ARROWS_FIRST) + if (linePtr->firstArrowPtr && (linePtr->arrow != ARROWS_FIRST) && (linePtr->arrow != ARROWS_BOTH)) { linePtr->coordPtr[0] = linePtr->firstArrowPtr[0]; linePtr->coordPtr[1] = linePtr->firstArrowPtr[1]; @@ -608,16 +608,16 @@ DeleteLine( LineItem *linePtr = (LineItem *) itemPtr; Tk_DeleteOutline(display, &linePtr->outline); - if (linePtr->coordPtr != NULL) { + if (linePtr->coordPtr) { ckfree(linePtr->coordPtr); } - if (linePtr->arrowGC != None) { + if (linePtr->arrowGC) { Tk_FreeGC(display, linePtr->arrowGC); } - if (linePtr->firstArrowPtr != NULL) { + if (linePtr->firstArrowPtr) { ckfree(linePtr->firstArrowPtr); } - if (linePtr->lastArrowPtr != NULL) { + if (linePtr->lastArrowPtr) { ckfree(linePtr->lastArrowPtr); } } @@ -840,7 +840,7 @@ DisplayLine( int numPoints; Tk_State state = itemPtr->state; - if ((!linePtr->numPoints) || (linePtr->outline.gc == None)) { + if ((!linePtr->numPoints) || !linePtr->outline.gc) { return; } @@ -2280,7 +2280,7 @@ LineToPostscript( if (linePtr->outline.activeColor != NULL) { color = linePtr->outline.activeColor; } - if (linePtr->outline.activeStipple != None) { + if (linePtr->outline.activeStipple) { stipple = linePtr->outline.activeStipple; } } else if (state == TK_STATE_DISABLED) { @@ -2290,7 +2290,7 @@ LineToPostscript( if (linePtr->outline.disabledColor != NULL) { color = linePtr->outline.disabledColor; } - if (linePtr->outline.disabledStipple != None) { + if (linePtr->outline.disabledStipple) { stipple = linePtr->outline.disabledStipple; } } @@ -2324,7 +2324,7 @@ LineToPostscript( } Tcl_AppendObjToObj(psObj, Tcl_GetObjResult(interp)); - if (stipple != None) { + if (stipple) { Tcl_AppendToObj(psObj, "clip ", -1); Tcl_ResetResult(interp); if (Tk_CanvasPsStipple(interp, canvas, stipple) != TCL_OK) { @@ -2345,7 +2345,7 @@ LineToPostscript( Tcl_ResetResult(interp); if ((!linePtr->smooth) || (linePtr->numPoints < 3)) { Tk_CanvasPsPath(interp, canvas, linePtr->coordPtr, linePtr->numPoints); - } else if ((stipple == None) && linePtr->smooth->postscriptProc) { + } else if (!stipple && linePtr->smooth->postscriptProc) { linePtr->smooth->postscriptProc(interp, canvas, linePtr->coordPtr, linePtr->numPoints, linePtr->splineSteps); } else { @@ -2407,8 +2407,8 @@ LineToPostscript( * Output polygons for the arrowheads, if there are any. */ - if (linePtr->firstArrowPtr != NULL) { - if (stipple != None) { + if (linePtr->firstArrowPtr) { + if (stipple) { Tcl_AppendToObj(psObj, "grestore gsave\n", -1); } if (ArrowheadPostscript(interp, canvas, linePtr, @@ -2417,7 +2417,7 @@ LineToPostscript( } } if (linePtr->lastArrowPtr != NULL) { - if (stipple != None) { + if (stipple) { Tcl_AppendToObj(psObj, "grestore gsave\n", -1); } if (ArrowheadPostscript(interp, canvas, linePtr, @@ -2482,11 +2482,11 @@ ArrowheadPostscript( stipple = linePtr->outline.stipple; if (Canvas(canvas)->currentItemPtr == (Tk_Item *) linePtr) { - if (linePtr->outline.activeStipple!=None) { + if (linePtr->outline.activeStipple) { stipple = linePtr->outline.activeStipple; } } else if (state == TK_STATE_DISABLED) { - if (linePtr->outline.activeStipple!=None) { + if (linePtr->outline.activeStipple) { stipple = linePtr->outline.disabledStipple; } } @@ -2495,7 +2495,7 @@ ArrowheadPostscript( Tk_CanvasPsPath(interp, canvas, arrowPtr, PTS_IN_ARROW); Tcl_AppendObjToObj(psObj, Tcl_GetObjResult(interp)); - if (stipple != None) { + if (stipple) { Tcl_AppendToObj(psObj, "clip ", -1); Tcl_ResetResult(interp); |