summaryrefslogtreecommitdiffstats
path: root/generic/tkEntry.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-12-20 08:02:30 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-12-20 08:02:30 (GMT)
commit81b0bd7641a9d2f63154c97d41c27bbb696ef674 (patch)
treea17119411589e8c1291df53e2546243d84e78583 /generic/tkEntry.c
parent93d974c265533cf2445446954346be8192e850a0 (diff)
downloadtk-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/tkEntry.c')
-rw-r--r--generic/tkEntry.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/generic/tkEntry.c b/generic/tkEntry.c
index 9f43f90..5eaca77 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 = 0;
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 = 0;
+ entryPtr->selTextGC = 0;
+ entryPtr->highlightGC = 0;
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) {
Tk_FreeGC(entryPtr->display, entryPtr->textGC);
}
- if (entryPtr->selTextGC != None) {
+ if (entryPtr->selTextGC) {
Tk_FreeGC(entryPtr->display, entryPtr->selTextGC);
}
Tcl_DeleteTimerHandler(entryPtr->insertBlinkHandler);
@@ -1043,7 +1043,7 @@ DestroyEntry(
if (entryPtr->type == TK_SPINBOX) {
Spinbox *sbPtr = (Spinbox *) entryPtr;
- if (sbPtr->listObj != NULL) {
+ if (sbPtr->listObj) {
Tcl_DecrRefCount(sbPtr->listObj);
sbPtr->listObj = NULL;
}
@@ -1423,7 +1423,7 @@ EntryWorldChanged(
ClientData instanceData) /* Information about widget. */
{
XGCValues gcValues;
- GC gc = None;
+ GC gc = 0;
unsigned long mask;
Tk_3DBorder border;
XColor *colorPtr;
@@ -1475,18 +1475,18 @@ EntryWorldChanged(
gcValues.graphics_exposures = False;
mask = GCForeground | GCFont | GCGraphicsExposures;
gc = Tk_GetGC(entryPtr->tkwin, mask, &gcValues);
- if (entryPtr->textGC != None) {
+ if (entryPtr->textGC) {
Tk_FreeGC(entryPtr->display, entryPtr->textGC);
}
entryPtr->textGC = gc;
- if (entryPtr->selFgColorPtr != NULL) {
+ if (entryPtr->selFgColorPtr) {
gcValues.foreground = entryPtr->selFgColorPtr->pixel;
}
gcValues.font = Tk_FontId(entryPtr->tkfont);
mask = GCForeground | GCFont;
gc = Tk_GetGC(entryPtr->tkwin, mask, &gcValues);
- if (entryPtr->selTextGC != None) {
+ if (entryPtr->selTextGC) {
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 = 0;
}
- if (cursor != None) {
+ if (cursor) {
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 = 0;
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 = 0;
+ entryPtr->selTextGC = 0;
+ entryPtr->highlightGC = 0;
entryPtr->avgWidth = 1;
entryPtr->validate = VALIDATE_NONE;
sbPtr->selElement = SEL_NONE;
sbPtr->curElement = SEL_NONE;
- sbPtr->bCursor = None;
+ sbPtr->bCursor = 0;
sbPtr->repeatDelay = 400;
sbPtr->repeatInterval = 100;
sbPtr->fromValue = 0.0;