summaryrefslogtreecommitdiffstats
path: root/generic/tkEntry.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/tkEntry.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/tkEntry.c')
-rw-r--r--generic/tkEntry.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/generic/tkEntry.c b/generic/tkEntry.c
index 9f43f90..f35d2b7 100644
--- a/generic/tkEntry.c
+++ b/generic/tkEntry.c
@@ -523,16 +523,16 @@ Tk_EntryObjCmd(
entryPtr->selectFirst = -1;
entryPtr->selectLast = -1;
- entryPtr->cursor = None;
+ entryPtr->cursor = NULL;
entryPtr->exportSelection = 1;
entryPtr->justify = TK_JUSTIFY_LEFT;
entryPtr->relief = TK_RELIEF_FLAT;
entryPtr->state = STATE_NORMAL;
entryPtr->displayString = entryPtr->string;
entryPtr->inset = XPAD;
- entryPtr->textGC = None;
- entryPtr->selTextGC = None;
- entryPtr->highlightGC = None;
+ entryPtr->textGC = NULL;
+ entryPtr->selTextGC = NULL;
+ entryPtr->highlightGC = NULL;
entryPtr->avgWidth = 1;
entryPtr->validate = VALIDATE_NONE;
@@ -1030,10 +1030,10 @@ DestroyEntry(
EntryTextVarProc, (ClientData) entryPtr);
entryPtr->flags &= ~ENTRY_VAR_TRACED;
}
- if (entryPtr->textGC != None) {
+ if (entryPtr->textGC != NULL) {
Tk_FreeGC(entryPtr->display, entryPtr->textGC);
}
- if (entryPtr->selTextGC != None) {
+ if (entryPtr->selTextGC != NULL) {
Tk_FreeGC(entryPtr->display, entryPtr->selTextGC);
}
Tcl_DeleteTimerHandler(entryPtr->insertBlinkHandler);
@@ -1423,7 +1423,7 @@ EntryWorldChanged(
ClientData instanceData) /* Information about widget. */
{
XGCValues gcValues;
- GC gc = None;
+ GC gc = NULL;
unsigned long mask;
Tk_3DBorder border;
XColor *colorPtr;
@@ -1475,7 +1475,7 @@ EntryWorldChanged(
gcValues.graphics_exposures = False;
mask = GCForeground | GCFont | GCGraphicsExposures;
gc = Tk_GetGC(entryPtr->tkwin, mask, &gcValues);
- if (entryPtr->textGC != None) {
+ if (entryPtr->textGC != NULL) {
Tk_FreeGC(entryPtr->display, entryPtr->textGC);
}
entryPtr->textGC = gc;
@@ -1486,7 +1486,7 @@ EntryWorldChanged(
gcValues.font = Tk_FontId(entryPtr->tkfont);
mask = GCForeground | GCFont;
gc = Tk_GetGC(entryPtr->tkwin, mask, &gcValues);
- if (entryPtr->selTextGC != None) {
+ if (entryPtr->selTextGC != NULL) {
Tk_FreeGC(entryPtr->display, entryPtr->selTextGC);
}
entryPtr->selTextGC = gc;
@@ -2451,9 +2451,9 @@ EntryEventProc(
} else if ((elem == SEL_BUTTONDOWN) || (elem == SEL_BUTTONUP)) {
cursor = sbPtr->bCursor;
} else {
- cursor = None;
+ cursor = NULL;
}
- if (cursor != None) {
+ if (cursor != NULL) {
Tk_DefineCursor(entryPtr->tkwin, cursor);
} else {
Tk_UndefineCursor(entryPtr->tkwin);
@@ -3591,22 +3591,22 @@ Tk_SpinboxObjCmd(
entryPtr->selectFirst = -1;
entryPtr->selectLast = -1;
- entryPtr->cursor = None;
+ entryPtr->cursor = NULL;
entryPtr->exportSelection = 1;
entryPtr->justify = TK_JUSTIFY_LEFT;
entryPtr->relief = TK_RELIEF_FLAT;
entryPtr->state = STATE_NORMAL;
entryPtr->displayString = entryPtr->string;
entryPtr->inset = XPAD;
- entryPtr->textGC = None;
- entryPtr->selTextGC = None;
- entryPtr->highlightGC = None;
+ entryPtr->textGC = NULL;
+ entryPtr->selTextGC = NULL;
+ entryPtr->highlightGC = NULL;
entryPtr->avgWidth = 1;
entryPtr->validate = VALIDATE_NONE;
sbPtr->selElement = SEL_NONE;
sbPtr->curElement = SEL_NONE;
- sbPtr->bCursor = None;
+ sbPtr->bCursor = NULL;
sbPtr->repeatDelay = 400;
sbPtr->repeatInterval = 100;
sbPtr->fromValue = 0.0;