summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-01-03 20:53:24 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-01-03 20:53:24 (GMT)
commitd2747a371058fa4128dbd7896fe040f0b3ee6be7 (patch)
tree636e7fd05c44d1f45b621dad17cfeed7d672199b /generic
parentf2b5a87d6dc6d3468828d48929583d950690a40b (diff)
downloadtk-d2747a371058fa4128dbd7896fe040f0b3ee6be7.zip
tk-d2747a371058fa4128dbd7896fe040f0b3ee6be7.tar.gz
tk-d2747a371058fa4128dbd7896fe040f0b3ee6be7.tar.bz2
Bring back more original "None" usages, and fix other warnings which gradually slipped in.
Wherever possible, pragma's are used in MSVC to silence useless compiler warnings.
Diffstat (limited to 'generic')
-rw-r--r--generic/tk3d.c8
-rw-r--r--generic/tk3d.h4
-rw-r--r--generic/tkBind.c2
-rw-r--r--generic/tkButton.h2
-rw-r--r--generic/tkCanvArc.c4
-rw-r--r--generic/tkCanvBmap.c2
-rw-r--r--generic/tkCanvLine.c6
-rw-r--r--generic/tkCanvPoly.c6
-rw-r--r--generic/tkCanvText.c8
-rw-r--r--generic/tkCanvas.h2
-rw-r--r--generic/tkColor.c6
-rw-r--r--generic/tkColor.h2
-rw-r--r--generic/tkConfig.c6
-rw-r--r--generic/tkCursor.c6
-rw-r--r--generic/tkEntry.c2
-rw-r--r--generic/tkEntry.h6
-rw-r--r--generic/tkEvent.c2
-rw-r--r--generic/tkImgBmap.c12
-rw-r--r--generic/tkMenu.h8
-rw-r--r--generic/tkMenubutton.h2
-rw-r--r--generic/tkOldConfig.c2
-rw-r--r--generic/tkPlace.c2
-rw-r--r--generic/tkRectOval.c8
-rw-r--r--generic/tkScale.h4
-rw-r--r--generic/tkScrollbar.h2
-rw-r--r--generic/tkText.h2
-rw-r--r--generic/tkTextDisp.c2
-rw-r--r--generic/ttk/ttkEntry.c4
-rw-r--r--generic/ttk/ttkLayout.c2
-rw-r--r--generic/ttk/ttkTreeview.c2
-rw-r--r--generic/ttk/ttkWidget.c2
31 files changed, 65 insertions, 63 deletions
diff --git a/generic/tk3d.c b/generic/tk3d.c
index eebe122..ddb48b3 100644
--- a/generic/tk3d.c
+++ b/generic/tk3d.c
@@ -237,9 +237,9 @@ Tk_Get3DBorder(
borderPtr->darkColorPtr = NULL;
borderPtr->lightColorPtr = NULL;
borderPtr->shadow = None;
- borderPtr->bgGC = 0;
- borderPtr->darkGC = 0;
- borderPtr->lightGC = 0;
+ borderPtr->bgGC = NULL;
+ borderPtr->darkGC = NULL;
+ borderPtr->lightGC = NULL;
borderPtr->hashPtr = hashPtr;
borderPtr->nextPtr = existingBorderPtr;
Tcl_SetHashValue(hashPtr, borderPtr);
@@ -392,7 +392,7 @@ Tk_3DBorderGC(
* compilers happy.
*/
- return (GC) None;
+ return NULL;
}
/*
diff --git a/generic/tk3d.h b/generic/tk3d.h
index 5e0a0cf..30a35c5 100644
--- a/generic/tk3d.h
+++ b/generic/tk3d.h
@@ -60,10 +60,10 @@ typedef struct TkBorder {
GC bgGC; /* Used (if necessary) to draw areas in the
* background color. */
GC darkGC; /* Used to draw darker parts of the border.
- * None means the shadow colors haven't been
+ * NULL means the shadow colors haven't been
* allocated yet.*/
GC lightGC; /* Used to draw lighter parts of the border.
- * None means the shadow colors haven't been
+ * NULL means the shadow colors haven't been
* allocated yet. */
Tcl_HashEntry *hashPtr; /* Entry in borderTable (needed in order to
* delete structure). */
diff --git a/generic/tkBind.c b/generic/tkBind.c
index c4f8226..98c491a 100644
--- a/generic/tkBind.c
+++ b/generic/tkBind.c
@@ -3870,7 +3870,7 @@ DoWarp(
{
TkDisplay *dispPtr = (TkDisplay *) clientData;
- XWarpPointer(dispPtr->display, (Window) None, (Window) dispPtr->warpWindow,
+ XWarpPointer(dispPtr->display, None, (Window) dispPtr->warpWindow,
0, 0, 0, 0, (int) dispPtr->warpX, (int) dispPtr->warpY);
XForceScreenSaver(dispPtr->display, ScreenSaverReset);
dispPtr->flags &= ~TK_DISPLAY_IN_WARP;
diff --git a/generic/tkButton.h b/generic/tkButton.h
index 09aaee2..d669b02 100644
--- a/generic/tkButton.h
+++ b/generic/tkButton.h
@@ -235,7 +235,7 @@ typedef struct {
* Miscellaneous information:
*/
- Tk_Cursor cursor; /* Value of -cursor option: if not None,
+ Tk_Cursor cursor; /* Value of -cursor option: if not NULL,
* specifies current cursor for window. */
Tcl_Obj *takeFocusPtr; /* Value of -takefocus option; not used in the
* C code, but used by keyboard traversal
diff --git a/generic/tkCanvArc.c b/generic/tkCanvArc.c
index 33367de..ae62147 100644
--- a/generic/tkCanvArc.c
+++ b/generic/tkCanvArc.c
@@ -526,7 +526,9 @@ ConfigureArc(
}
}
- if ((arcPtr->style == ARC_STYLE) || (!color)) {
+ if (arcPtr->style == ARC_STYLE) {
+ newGC = NULL;
+ } else if (color == NULL) {
newGC = NULL;
} else {
gcValues.foreground = color->pixel;
diff --git a/generic/tkCanvBmap.c b/generic/tkCanvBmap.c
index 5f97ef2..59e2494 100644
--- a/generic/tkCanvBmap.c
+++ b/generic/tkCanvBmap.c
@@ -376,7 +376,7 @@ ConfigureBitmap(
}
}
- if (!bitmap) {
+ if (bitmap == None) {
newGC = NULL;
} else {
gcValues.foreground = fgColor->pixel;
diff --git a/generic/tkCanvLine.c b/generic/tkCanvLine.c
index fea2103..5f67175 100644
--- a/generic/tkCanvLine.c
+++ b/generic/tkCanvLine.c
@@ -533,10 +533,10 @@ ConfigureLine(
} else {
newGC = arrowGC = NULL;
}
- if (linePtr->outline.gc) {
+ if (linePtr->outline.gc != None) {
Tk_FreeGC(Tk_Display(tkwin), linePtr->outline.gc);
}
- if (linePtr->arrowGC) {
+ if (linePtr->arrowGC != None) {
Tk_FreeGC(Tk_Display(tkwin), linePtr->arrowGC);
}
linePtr->outline.gc = newGC;
@@ -2251,7 +2251,7 @@ LineToPostscript(
* being created. */
{
LineItem *linePtr = (LineItem *) itemPtr;
- char buffer[64 + TCL_INTEGER_SPACE];
+ char buffer[64 + 4*TCL_INTEGER_SPACE];
char *style;
double width;
diff --git a/generic/tkCanvPoly.c b/generic/tkCanvPoly.c
index 0810ab6..4ab4339 100644
--- a/generic/tkCanvPoly.c
+++ b/generic/tkCanvPoly.c
@@ -486,7 +486,7 @@ ConfigurePolygon(
} else {
newGC = NULL;
}
- if (polyPtr->outline.gc) {
+ if (polyPtr->outline.gc != None) {
Tk_FreeGC(Tk_Display(tkwin), polyPtr->outline.gc);
}
polyPtr->outline.gc = newGC;
@@ -509,12 +509,12 @@ ConfigurePolygon(
}
}
- if (!color) {
+ if (color == NULL) {
newGC = NULL;
} else {
gcValues.foreground = color->pixel;
mask = GCForeground;
- if (stipple) {
+ if (stipple != None) {
gcValues.stipple = stipple;
gcValues.fill_style = FillStippled;
mask |= GCStipple|GCFillStyle;
diff --git a/generic/tkCanvText.c b/generic/tkCanvText.c
index 187ec40..6dd1c9f 100644
--- a/generic/tkCanvText.c
+++ b/generic/tkCanvText.c
@@ -446,7 +446,7 @@ ConfigureText(
if (textPtr->tkfont != NULL) {
gcValues.font = Tk_FontId(textPtr->tkfont);
mask = GCFont;
- if (color) {
+ if (color != NULL) {
gcValues.foreground = color->pixel;
mask |= GCForeground;
if (stipple != None) {
@@ -457,7 +457,7 @@ ConfigureText(
newGC = Tk_GetGC(tkwin, mask, &gcValues);
}
mask &= ~(GCTile|GCFillStyle|GCStipple);
- if (stipple) {
+ if (stipple != None) {
gcValues.stipple = stipple;
gcValues.fill_style = FillStippled;
mask |= GCStipple|GCFillStyle;
@@ -467,7 +467,7 @@ ConfigureText(
}
newSelGC = Tk_GetGC(tkwin, mask|GCForeground, &gcValues);
}
- if (textPtr->gc) {
+ if (textPtr->gc != None) {
Tk_FreeGC(Tk_Display(tkwin), textPtr->gc);
}
textPtr->gc = newGC;
@@ -488,7 +488,7 @@ ConfigureText(
} else {
newGC = NULL;
}
- if (textPtr->cursorOffGC) {
+ if (textPtr->cursorOffGC != None) {
Tk_FreeGC(Tk_Display(tkwin), textPtr->cursorOffGC);
}
textPtr->cursorOffGC = newGC;
diff --git a/generic/tkCanvas.h b/generic/tkCanvas.h
index d009cfa..5e784e3 100644
--- a/generic/tkCanvas.h
+++ b/generic/tkCanvas.h
@@ -206,7 +206,7 @@ typedef struct TkCanvas {
* Miscellaneous information:
*/
- Tk_Cursor cursor; /* Current cursor for window, or None. */
+ Tk_Cursor cursor; /* Current cursor for window, or NULL. */
char *takeFocus; /* Value of -takefocus option; not used in the
* C code, but used by keyboard traversal
* scripts. Malloc'ed, but may be NULL. */
diff --git a/generic/tkColor.c b/generic/tkColor.c
index bde08cf..c2b7732 100644
--- a/generic/tkColor.c
+++ b/generic/tkColor.c
@@ -242,7 +242,7 @@ Tk_GetColor(
*/
tkColPtr->magic = COLOR_MAGIC;
- tkColPtr->gc = 0;
+ tkColPtr->gc = NULL;
tkColPtr->screen = Tk_Screen(tkwin);
tkColPtr->colormap = Tk_Colormap(tkwin);
tkColPtr->visual = Tk_Visual(tkwin);
@@ -323,7 +323,7 @@ Tk_GetColorByValue(
tkColPtr = TkpGetColorByValue(tkwin, colorPtr);
tkColPtr->magic = COLOR_MAGIC;
- tkColPtr->gc = 0;
+ tkColPtr->gc = NULL;
tkColPtr->screen = Tk_Screen(tkwin);
tkColPtr->colormap = valueKey.colormap;
tkColPtr->visual = Tk_Visual(tkwin);
@@ -471,7 +471,7 @@ Tk_FreeColor(
if (tkColPtr->gc != None) {
XFreeGC(DisplayOfScreen(screen), tkColPtr->gc);
- tkColPtr->gc = 0;
+ tkColPtr->gc = NULL;
}
TkpFreeColor(tkColPtr);
diff --git a/generic/tkColor.h b/generic/tkColor.h
index d4679cf..12c6662 100644
--- a/generic/tkColor.h
+++ b/generic/tkColor.h
@@ -37,7 +37,7 @@ typedef struct TkColor {
* COLOR_MAGIC. */
GC gc; /* Simple gc with this color as foreground
* color and all other fields defaulted. May
- * be None. */
+ * be NULL. */
Screen *screen; /* Screen where this color is valid. Used to
* delete it, and to find its display. */
Colormap colormap; /* Colormap from which this entry was
diff --git a/generic/tkConfig.c b/generic/tkConfig.c
index ace7135..1a49026 100644
--- a/generic/tkConfig.c
+++ b/generic/tkConfig.c
@@ -854,7 +854,7 @@ DoObjConfig(
Tk_Cursor newCursor;
if (nullOK && ObjectIsEmpty(valuePtr)) {
- newCursor = 0;
+ newCursor = NULL;
valuePtr = NULL;
} else {
newCursor = Tk_AllocCursorFromObj(interp, tkwin, valuePtr);
@@ -916,7 +916,7 @@ DoObjConfig(
if (nullOK && ObjectIsEmpty(valuePtr)) {
valuePtr = NULL;
- newWin = 0;
+ newWin = NULL;
} else {
if (TkGetWindowFromObj(interp, tkwin, valuePtr,
&newWin) != TCL_OK) {
@@ -1702,7 +1702,7 @@ FreeResources(
if (internalFormExists) {
if (*((Tk_Cursor *) internalPtr) != None) {
Tk_FreeCursor(Tk_Display(tkwin), *((Tk_Cursor *) internalPtr));
- *((Tk_Cursor *) internalPtr) = 0;
+ *((Tk_Cursor *) internalPtr) = NULL;
}
} else if (objPtr != NULL) {
Tk_FreeCursorFromObj(tkwin, objPtr);
diff --git a/generic/tkCursor.c b/generic/tkCursor.c
index a1c2723..e5b5df5 100644
--- a/generic/tkCursor.c
+++ b/generic/tkCursor.c
@@ -149,7 +149,7 @@ Tk_AllocCursorFromObj(
cursorPtr = TkcGetCursor(interp, tkwin, Tcl_GetString(objPtr));
objPtr->internalRep.twoPtrValue.ptr1 = (void *) cursorPtr;
if (cursorPtr == NULL) {
- return 0;
+ return NULL;
}
cursorPtr->objRefCount++;
return cursorPtr->cursor;
@@ -188,7 +188,7 @@ Tk_GetCursor(
{
TkCursor *cursorPtr = TkcGetCursor(interp, tkwin, string);
if (cursorPtr == NULL) {
- return 0;
+ return NULL;
}
return cursorPtr->cursor;
}
@@ -382,7 +382,7 @@ Tk_GetCursorFromData(
error:
Tcl_DeleteHashEntry(dataHashPtr);
- return 0;
+ return NULL;
}
/*
diff --git a/generic/tkEntry.c b/generic/tkEntry.c
index f5b4339..7b95fc9 100644
--- a/generic/tkEntry.c
+++ b/generic/tkEntry.c
@@ -2453,7 +2453,7 @@ EntryEventProc(
} else {
cursor = NULL;
}
- if (cursor) {
+ if (cursor != None) {
Tk_DefineCursor(entryPtr->tkwin, cursor);
} else {
Tk_UndefineCursor(entryPtr->tkwin);
diff --git a/generic/tkEntry.h b/generic/tkEntry.h
index 7f8aa1f..da06408 100644
--- a/generic/tkEntry.h
+++ b/generic/tkEntry.h
@@ -87,7 +87,7 @@ typedef struct {
* in readonly state, plus used for
* background. */
int borderWidth; /* Width of 3-D border around window. */
- Tk_Cursor cursor; /* Current cursor for window, or None. */
+ Tk_Cursor cursor; /* Current cursor for window, or NULL. */
int exportSelection; /* Non-zero means tie internal entry selection
* to X selection. */
Tk_Font tkfont; /* Information about text font, or NULL. */
@@ -197,7 +197,7 @@ typedef struct {
Tk_3DBorder activeBorder; /* Used for drawing border around active
* buttons. */
Tk_3DBorder buttonBorder; /* Used for drawing border around buttons. */
- Tk_Cursor bCursor; /* cursor for buttons, or None. */
+ Tk_Cursor bCursor; /* cursor for buttons, or NULL. */
int bdRelief; /* 3-D effect: TK_RELIEF_RAISED, etc. */
int buRelief; /* 3-D effect: TK_RELIEF_RAISED, etc. */
char *command; /* Command to invoke for spin buttons. NULL
@@ -226,7 +226,7 @@ typedef struct {
* value that the users requests. Malloc'ed */
char *valueFormat; /* Sprintf conversion specifier used for the
* value. */
- char digitFormat[10]; /* Sprintf conversion specifier computed from
+ char digitFormat[16]; /* Sprintf conversion specifier computed from
* digits and other information; used for the
* value. */
diff --git a/generic/tkEvent.c b/generic/tkEvent.c
index 9b001e1..9758dbe 100644
--- a/generic/tkEvent.c
+++ b/generic/tkEvent.c
@@ -1436,7 +1436,7 @@ TkEventDeadWindow(
ipPtr->nextHandler = NULL;
}
if (ipPtr->winPtr == winPtr) {
- ipPtr->winPtr = 0;
+ ipPtr->winPtr = NULL;
}
}
ckfree((char *) handlerPtr);
diff --git a/generic/tkImgBmap.c b/generic/tkImgBmap.c
index fab6afb..b37e7d5 100644
--- a/generic/tkImgBmap.c
+++ b/generic/tkImgBmap.c
@@ -400,18 +400,18 @@ ImgBmapConfigureInstance(
(unsigned) masterPtr->height);
}
- if (oldMask) {
+ if (oldMask != None) {
Tk_FreePixmap(Tk_Display(instancePtr->tkwin), oldMask);
}
- if (oldBitmap) {
+ if (oldBitmap != None) {
Tk_FreePixmap(Tk_Display(instancePtr->tkwin), oldBitmap);
}
- if (masterPtr->data) {
+ if (masterPtr->data != NULL) {
gcValues.foreground = instancePtr->fg->pixel;
gcValues.graphics_exposures = False;
mask = GCForeground|GCGraphicsExposures;
- if (instancePtr->bg) {
+ if (instancePtr->bg != NULL) {
gcValues.background = instancePtr->bg->pixel;
mask |= GCBackground;
if (instancePtr->mask != None) {
@@ -426,7 +426,7 @@ ImgBmapConfigureInstance(
} else {
gc = NULL;
}
- if (instancePtr->gc) {
+ if (instancePtr->gc != None) {
Tk_FreeGC(Tk_Display(instancePtr->tkwin), instancePtr->gc);
}
instancePtr->gc = gc;
@@ -438,7 +438,7 @@ ImgBmapConfigureInstance(
* it clear that this instance cannot be displayed. Then report the error.
*/
- if (instancePtr->gc) {
+ if (instancePtr->gc != None) {
Tk_FreeGC(Tk_Display(instancePtr->tkwin), instancePtr->gc);
}
instancePtr->gc = NULL;
diff --git a/generic/tkMenu.h b/generic/tkMenu.h
index e8470ca..b1536df 100644
--- a/generic/tkMenu.h
+++ b/generic/tkMenu.h
@@ -80,8 +80,8 @@ typedef struct TkMenuEntry {
* of character to underline (<0 means don't
* underline anything). */
Tcl_Obj *underlinePtr; /* Index of character to underline. */
- Tcl_Obj *bitmapPtr; /* Bitmap to display in menu entry, or None.
- * If not None then label is ignored. */
+ Tcl_Obj *bitmapPtr; /* Bitmap to display in menu entry, or NULL.
+ * If not NULL then label is ignored. */
Tcl_Obj *imagePtr; /* Name of image to display, or NULL. If not
* NULL, bitmap, text, and textVarName are
* ignored. */
@@ -180,7 +180,7 @@ typedef struct TkMenuEntry {
* NULL means use overall disabledGC from menu
* structure. See comments for disabledFg in
* menu structure for more information. */
- GC indicatorGC; /* For drawing indicators. None means use GC
+ GC indicatorGC; /* For drawing indicators. NULL means use GC
* from menu. */
/*
@@ -347,7 +347,7 @@ typedef struct TkMenu {
Tcl_Obj *takeFocusPtr; /* Value of -takefocus option; not used in the
* C code, but used by keyboard traversal
* scripts. Malloc'ed, but may be NULL. */
- Tcl_Obj *cursorPtr; /* Current cursor for window, or None. */
+ Tcl_Obj *cursorPtr; /* Current cursor for window, or NULL. */
Tcl_Obj *postCommandPtr; /* Used to detect cycles in cascade hierarchy
* trees when preprocessing postcommands on
* some platforms. See PostMenu for more
diff --git a/generic/tkMenubutton.h b/generic/tkMenubutton.h
index 41af675..f190c81 100644
--- a/generic/tkMenubutton.h
+++ b/generic/tkMenubutton.h
@@ -175,7 +175,7 @@ typedef struct {
* "left" and "right" will pop the menu left
* or right, and the active item will be next
* to the button. */
- Tk_Cursor cursor; /* Current cursor for window, or None. */
+ Tk_Cursor cursor; /* Current cursor for window, or NULL. */
char *takeFocus; /* Value of -takefocus option; not used in the
* C code, but used by keyboard traversal
* scripts. Malloc'ed, but may be NULL. */
diff --git a/generic/tkOldConfig.c b/generic/tkOldConfig.c
index cf5612b..8f4c234 100644
--- a/generic/tkOldConfig.c
+++ b/generic/tkOldConfig.c
@@ -476,7 +476,7 @@ DoConfig(
Tk_Cursor newCursor, oldCursor;
if (nullValue) {
- newCursor = 0;
+ newCursor = NULL;
} else {
uid = valueIsUid ? (Tk_Uid) value : Tk_GetUid(value);
newCursor = Tk_GetCursor(interp, tkwin, uid);
diff --git a/generic/tkPlace.c b/generic/tkPlace.c
index c435b12..19af02c 100644
--- a/generic/tkPlace.c
+++ b/generic/tkPlace.c
@@ -397,7 +397,7 @@ CreateSlave(
slavePtr = (Slave *) ckalloc(sizeof(Slave));
memset(slavePtr, 0, sizeof(Slave));
slavePtr->tkwin = tkwin;
- slavePtr->inTkwin = 0;
+ slavePtr->inTkwin = NULL;
slavePtr->anchor = TK_ANCHOR_NW;
slavePtr->borderMode = BM_INSIDE;
slavePtr->optionTable = table;
diff --git a/generic/tkRectOval.c b/generic/tkRectOval.c
index 53ebe61..0e73dd3 100644
--- a/generic/tkRectOval.c
+++ b/generic/tkRectOval.c
@@ -475,7 +475,7 @@ ConfigureRectOval(
} else {
newGC = NULL;
}
- if (rectOvalPtr->outline.gc) {
+ if (rectOvalPtr->outline.gc != None) {
Tk_FreeGC(Tk_Display(tkwin), rectOvalPtr->outline.gc);
}
rectOvalPtr->outline.gc = newGC;
@@ -506,7 +506,7 @@ ConfigureRectOval(
}
}
- if (!color) {
+ if (color == NULL) {
newGC = NULL;
} else {
gcValues.foreground = color->pixel;
@@ -522,13 +522,13 @@ ConfigureRectOval(
* Mac OS X CG drawing needs access to the outline linewidth
* even for fills (as linewidth controls antialiasing).
*/
- gcValues.line_width = rectOvalPtr->outline.gc ?
+ gcValues.line_width = rectOvalPtr->outline.gc != None ?
rectOvalPtr->outline.gc->line_width : 0;
mask |= GCLineWidth;
#endif
newGC = Tk_GetGC(tkwin, mask, &gcValues);
}
- if (rectOvalPtr->fillGC) {
+ if (rectOvalPtr->fillGC != None) {
Tk_FreeGC(Tk_Display(tkwin), rectOvalPtr->fillGC);
}
rectOvalPtr->fillGC = newGC;
diff --git a/generic/tkScale.h b/generic/tkScale.h
index a2c5f2b..079e02c 100644
--- a/generic/tkScale.h
+++ b/generic/tkScale.h
@@ -78,7 +78,7 @@ typedef struct TkScale {
* values. 0 means we get to choose the number
* based on resolution and/or the range of the
* scale. */
- char format[10]; /* Sprintf conversion specifier computed from
+ char format[16]; /* Sprintf conversion specifier computed from
* digits and other information. */
double bigIncrement; /* Amount to use for large increments to scale
* value. (0 means we pick a value). */
@@ -156,7 +156,7 @@ typedef struct TkScale {
*/
int fontHeight; /* Height of scale font. */
- Tk_Cursor cursor; /* Current cursor for window, or None. */
+ Tk_Cursor cursor; /* Current cursor for window, or NULL. */
Tcl_Obj *takeFocusPtr; /* Value of -takefocus option; not used in the
* C code, but used by keyboard traversal
* scripts. May be NULL. */
diff --git a/generic/tkScrollbar.h b/generic/tkScrollbar.h
index 126d590..fa0426f 100644
--- a/generic/tkScrollbar.h
+++ b/generic/tkScrollbar.h
@@ -119,7 +119,7 @@ typedef struct TkScrollbar {
* Miscellaneous information:
*/
- Tk_Cursor cursor; /* Current cursor for window, or None. */
+ Tk_Cursor cursor; /* Current cursor for window, or NULL. */
char *takeFocus; /* Value of -takefocus option; not used in the
* C code, but used by keyboard traversal
* scripts. Malloc'ed, but may be NULL. */
diff --git a/generic/tkText.h b/generic/tkText.h
index 6f5f153..464bed5 100644
--- a/generic/tkText.h
+++ b/generic/tkText.h
@@ -654,7 +654,7 @@ typedef struct TkText {
/* Color for drawing traversal highlight area
* when highlight is off. */
XColor *highlightColorPtr; /* Color for drawing traversal highlight. */
- Tk_Cursor cursor; /* Current cursor for window, or None. */
+ Tk_Cursor cursor; /* Current cursor for window, or NULL. */
XColor *fgColor; /* Default foreground color for text. */
Tk_Font tkfont; /* Default font for displaying text. */
int charWidth; /* Width of average character in default
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 904fa1a..73abffb 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -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);
}
}
diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c
index ae43ae6..61bf31b 100644
--- a/generic/ttk/ttkEntry.c
+++ b/generic/ttk/ttkEntry.c
@@ -332,7 +332,7 @@ EntryFetchSelection(
ClientData clientData, int offset, char *buffer, int maxBytes)
{
Entry *entryPtr = (Entry *) clientData;
- size_t byteCount;
+ int byteCount;
const char *string;
const char *selStart, *selEnd;
@@ -345,7 +345,7 @@ EntryFetchSelection(
selEnd = Tcl_UtfAtIndex(selStart,
entryPtr->entry.selectLast - entryPtr->entry.selectFirst);
byteCount = selEnd - selStart - offset;
- if (byteCount > (size_t)maxBytes) {
+ if (byteCount > maxBytes) {
/* @@@POSSIBLE BUG: Can transfer partial UTF-8 sequences. Is this OK? */
byteCount = maxBytes;
}
diff --git a/generic/ttk/ttkLayout.c b/generic/ttk/ttkLayout.c
index 58c99eb..04dd86f 100644
--- a/generic/ttk/ttkLayout.c
+++ b/generic/ttk/ttkLayout.c
@@ -7,7 +7,7 @@
*/
#include <string.h>
-#include <tk.h>
+#include "tkInt.h"
#include "ttkThemeInt.h"
#define MAX(a,b) (a > b ? a : b)
diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c
index f0a3003..473d1e6 100644
--- a/generic/ttk/ttkTreeview.c
+++ b/generic/ttk/ttkTreeview.c
@@ -6,7 +6,7 @@
#include <string.h>
#include <stdio.h>
-#include <tk.h>
+#include "tkInt.h"
#include "ttkTheme.h"
#include "ttkWidget.h"
diff --git a/generic/ttk/ttkWidget.c b/generic/ttk/ttkWidget.c
index d5e0484..557ca8f 100644
--- a/generic/ttk/ttkWidget.c
+++ b/generic/ttk/ttkWidget.c
@@ -5,7 +5,7 @@
*/
#include <string.h>
-#include <tk.h>
+#include "tkInt.h"
#include "ttkTheme.h"
#include "ttkWidget.h"