summaryrefslogtreecommitdiffstats
path: root/generic/tkTextDisp.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-01-08 08:31:34 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-01-08 08:31:34 (GMT)
commit1cf82956754b0b42ef212635195b5c29fc93a0fc (patch)
treeb6bf6eaff55be5c6fd20363aea6473c6bfbd76ad /generic/tkTextDisp.c
parent726546cf2742672ce6de89b0500b3e750c6fe3b7 (diff)
parentd2747a371058fa4128dbd7896fe040f0b3ee6be7 (diff)
downloadtk-1cf82956754b0b42ef212635195b5c29fc93a0fc.zip
tk-1cf82956754b0b42ef212635195b5c29fc93a0fc.tar.gz
tk-1cf82956754b0b42ef212635195b5c29fc93a0fc.tar.bz2
Fix [9e31fd944934e269121fa78ff56b7b86f33e6db6|9e31fd9449]: X11/X.h and Windows.h have conflicting symbols.
*** POTENTIAL INCOMPATIBILITY *** on Windows only: gcc/clang/MSVC will generate new warnings in extensions when the "None" symbol is used incorrectly. Those warnings are all fixed in the core, that's what most of this commit is doing.
Diffstat (limited to 'generic/tkTextDisp.c')
-rw-r--r--generic/tkTextDisp.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 1f39112..c3874f1 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -632,7 +632,7 @@ TkTextCreateDInfo(
dInfoPtr = (TextDInfo *) ckalloc(sizeof(TextDInfo));
Tcl_InitHashTable(&dInfoPtr->styleTable, sizeof(StyleValues)/sizeof(int));
dInfoPtr->dLinePtr = NULL;
- dInfoPtr->copyGC = None;
+ dInfoPtr->copyGC = NULL;
gcValues.graphics_exposures = True;
dInfoPtr->scrollGC = Tk_GetGC(textPtr->tkwin, GCGraphicsExposures,
&gcValues);
@@ -696,7 +696,7 @@ TkTextFreeDInfo(
FreeDLines(textPtr, dInfoPtr->dLinePtr, NULL, DLINE_UNLINK);
Tcl_DeleteHashTable(&dInfoPtr->styleTable);
- if (dInfoPtr->copyGC != None) {
+ if (dInfoPtr->copyGC != NULL) {
Tk_FreeGC(textPtr->display, dInfoPtr->copyGC);
}
Tk_FreeGC(textPtr->display, dInfoPtr->scrollGC);
@@ -832,11 +832,11 @@ GetStyle(
styleValues.bgStipple = tagPtr->bgStipple;
bgStipplePrio = tagPtr->priority;
}
- if ((tagPtr->fgColor != None) && (tagPtr->priority > fgPrio)) {
+ if ((tagPtr->fgColor != NULL) && (tagPtr->priority > fgPrio)) {
styleValues.fgColor = tagPtr->fgColor;
fgPrio = tagPtr->priority;
}
- if ((tagPtr->tkfont != None) && (tagPtr->priority > fontPrio)) {
+ if ((tagPtr->tkfont != NULL) && (tagPtr->priority > fontPrio)) {
styleValues.tkfont = tagPtr->tkfont;
fontPrio = tagPtr->priority;
}
@@ -948,7 +948,7 @@ GetStyle(
}
stylePtr->bgGC = Tk_GetGC(textPtr->tkwin, mask, &gcValues);
} else {
- stylePtr->bgGC = None;
+ stylePtr->bgGC = NULL;
}
mask = GCFont;
gcValues.font = Tk_FontId(styleValues.tkfont);
@@ -994,10 +994,10 @@ FreeStyle(
{
stylePtr->refCount--;
if (stylePtr->refCount == 0) {
- if (stylePtr->bgGC != None) {
+ if (stylePtr->bgGC != NULL) {
Tk_FreeGC(textPtr->display, stylePtr->bgGC);
}
- if (stylePtr->fgGC != None) {
+ if (stylePtr->fgGC != NULL) {
Tk_FreeGC(textPtr->display, stylePtr->fgGC);
}
Tcl_DeleteHashEntry(stylePtr->hPtr);
@@ -2578,7 +2578,7 @@ DisplayLineBackground(
if ((chunkPtr->nextPtr == NULL) && (rightX < maxX)) {
rightX = maxX;
}
- if (chunkPtr->stylePtr->bgGC != None) {
+ if (chunkPtr->stylePtr->bgGC != NULL) {
/*
* Not visible - bail out now.
*/
@@ -4335,7 +4335,7 @@ DisplayText(
dlPtr->spaceAbove,
dlPtr->height-dlPtr->spaceAbove-dlPtr->spaceBelow,
dlPtr->baseline - dlPtr->spaceAbove, NULL,
- (Drawable) None, dlPtr->y + dlPtr->spaceAbove);
+ None, dlPtr->y + dlPtr->spaceAbove);
}
}
@@ -4970,7 +4970,7 @@ TkTextRelayoutWindow(
gcValues.graphics_exposures = False;
newGC = Tk_GetGC(textPtr->tkwin, GCGraphicsExposures, &gcValues);
- if (dInfoPtr->copyGC != None) {
+ if (dInfoPtr->copyGC != NULL) {
Tk_FreeGC(textPtr->display, dInfoPtr->copyGC);
}
dInfoPtr->copyGC = newGC;
@@ -7708,7 +7708,7 @@ CharDisplayProc(
*/
if (!sValuePtr->elide && (numBytes > offsetBytes)
- && (stylePtr->fgGC != None)) {
+ && (stylePtr->fgGC != NULL)) {
#if TK_DRAW_IN_CONTEXT
int start = ciPtr->baseOffset + offsetBytes;
int len = ciPtr->numBytes - offsetBytes;