diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-10-19 19:34:25 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-10-19 19:34:25 (GMT) |
commit | 38f526f519657d58703e013e4415a7e4788ec33f (patch) | |
tree | d923ce3992fffea6ab5c4c148021b576d1538c74 | |
parent | a45d0947cf937560baf1da8dad3046a10667256a (diff) | |
download | tk-38f526f519657d58703e013e4415a7e4788ec33f.zip tk-38f526f519657d58703e013e4415a7e4788ec33f.tar.gz tk-38f526f519657d58703e013e4415a7e4788ec33f.tar.bz2 |
Eliminate CONST86: Since Tk 8.7 only compiles with Tcl >= 8.6 anyway, we just can use "const" everywhere.
typo's: occured -> occurred
-rw-r--r-- | ChangeLog.2002 | 2 | ||||
-rw-r--r-- | ChangeLog.2004 | 2 | ||||
-rw-r--r-- | changes | 2 | ||||
-rw-r--r-- | generic/tk.decls | 4 | ||||
-rw-r--r-- | generic/tk.h | 31 | ||||
-rw-r--r-- | generic/tkBind.c | 2 | ||||
-rw-r--r-- | generic/tkDecls.h | 8 | ||||
-rw-r--r-- | generic/tkEntry.c | 4 | ||||
-rw-r--r-- | generic/tkInt.decls | 18 | ||||
-rw-r--r-- | generic/tkIntDecls.h | 36 | ||||
-rw-r--r-- | generic/tkIntPlatDecls.h | 2 | ||||
-rw-r--r-- | generic/tkPanedWindow.c | 11 | ||||
-rw-r--r-- | generic/ttk/ttkEntry.c | 2 | ||||
-rw-r--r-- | macosx/tkMacOSXWindowEvent.c | 2 | ||||
-rw-r--r-- | tests/safe.test | 2 | ||||
-rw-r--r-- | win/tkWinX.c | 2 | ||||
-rw-r--r-- | xlib/X11/Xlib.h | 8 |
17 files changed, 68 insertions, 70 deletions
diff --git a/ChangeLog.2002 b/ChangeLog.2002 index b523e7d..a1ba923 100644 --- a/ChangeLog.2002 +++ b/ChangeLog.2002 @@ -2238,7 +2238,7 @@ inputContext to null. * win/Makefile.in: changed gdb and shell targets to properly build - all binaries before running (otherwise an error often occured). + all binaries before running (otherwise an error often occurred). 2002-03-28 David Gravereaux <davygrvy@pobox.com> diff --git a/ChangeLog.2004 b/ChangeLog.2004 index bf86629..b900e7b 100644 --- a/ChangeLog.2004 +++ b/ChangeLog.2004 @@ -811,7 +811,7 @@ 2004-07-05 George Peter Staplin <GeorgePS@XMission.com> * generic/tkEvent.c: TK_XIM_SPOT preprocessor usage was modified - slightly to fix a bug that occured when TK_XIM_SPOT was defined as 0. + slightly to fix a bug that occurred when TK_XIM_SPOT was defined as 0. Thanks to Joe Mistachkin for reporting this bug. 2004-07-05 Donal K. Fellows <donal.k.fellows@man.ac.uk> @@ -5099,7 +5099,7 @@ correctly. (hobbs) 2001-08-28 (bug fix) removed 2 second 'raise' delay seen by some Unix window managers. (hobbs, baker) -2001-09-14 (bug fix) fixed memory leaks that occured if errors were +2001-09-14 (bug fix) fixed memory leaks that occurred if errors were thrown while initializing the channel for an image. (darley) 2001-09-20 (new feature) --enable-64bit support was added for HP 11 when diff --git a/generic/tk.decls b/generic/tk.decls index b435782..16de241 100644 --- a/generic/tk.decls +++ b/generic/tk.decls @@ -105,7 +105,7 @@ declare 18 { Tk_Window tkwin, const char *value, char *widgRec, int offset) } declare 19 { - CONST86 char *Tk_CanvasTagsPrintProc(ClientData clientData, Tk_Window tkwin, + const char *Tk_CanvasTagsPrintProc(ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr) } declare 20 { @@ -404,7 +404,7 @@ declare 97 { } declare 98 { ClientData Tk_GetImageMasterData(Tcl_Interp *interp, - const char *name, CONST86 Tk_ImageType **typePtrPtr) + const char *name, const Tk_ImageType **typePtrPtr) } declare 99 { Tk_ItemType *Tk_GetItemTypes(void) diff --git a/generic/tk.h b/generic/tk.h index adc9672..6f1c98a 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -21,9 +21,6 @@ # error Tk 8.7 must be compiled with tcl.h from Tcl 8.6 or better #endif -#ifndef CONST86 -# define CONST86 const -#endif #ifndef EXTERN # define EXTERN extern TCL_STORAGE_CLASS #endif @@ -345,7 +342,7 @@ typedef struct Tk_SavedOptions { typedef int (Tk_OptionParseProc) (ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, const char *value, char *widgRec, int offset); -typedef CONST86 char *(Tk_OptionPrintProc) (ClientData clientData, +typedef const char *(Tk_OptionPrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); typedef struct Tk_CustomOption { @@ -371,7 +368,7 @@ typedef struct Tk_ConfigSpec { int type; /* Type of option, such as TK_CONFIG_COLOR; * see definitions below. Last option in table * must have type TK_CONFIG_END. */ - CONST86 char *argvName; /* Switch used to specify option in argv. NULL + const char *argvName; /* Switch used to specify option in argv. NULL * means this spec is part of a group. */ Tk_Uid dbName; /* Name for option in option database. */ Tk_Uid dbClass; /* Class for option in database. */ @@ -387,7 +384,7 @@ typedef struct Tk_ConfigSpec { int specFlags; /* Any combination of the values defined * below; other bits are used internally by * tkConfig.c. */ - CONST86 Tk_CustomOption *customPtr; + const Tk_CustomOption *customPtr; /* If type is TK_CONFIG_CUSTOM then this is a * pointer to info about how to parse and * print the option. Otherwise it is @@ -438,14 +435,14 @@ typedef enum { */ typedef struct { - CONST86 char *key; /* The key string that flags the option in the + const char *key; /* The key string that flags the option in the * argv array. */ int type; /* Indicates option type; see below. */ char *src; /* Value to be used in setting dst; usage * depends on type. */ char *dst; /* Address of value to be modified; usage * depends on type. */ - CONST86 char *help; /* Documentation message describing this + const char *help; /* Documentation message describing this * option. */ } Tk_ArgvInfo; @@ -691,7 +688,7 @@ typedef struct { * request. */ Display *display; /* Display the event was read from. */ Window event; /* Window on which event was requested. */ - Window root; /* Root window that the event occured on. */ + Window root; /* Root window that the event occurred on. */ Window subwindow; /* Child window. */ Time time; /* Milliseconds. */ int x, y; /* Pointer x, y coordinates in event @@ -934,7 +931,7 @@ typedef enum { } Tk_State; typedef struct Tk_SmoothMethod { - CONST86 char *name; + const char *name; int (*coordProc) (Tk_Canvas canvas, double *pointPtr, int numPoints, int numSteps, XPoint xPoints[], double dblPoints[]); void (*postscriptProc) (Tcl_Interp *interp, Tk_Canvas canvas, @@ -1062,7 +1059,7 @@ typedef void (Tk_ItemDCharsProc)(Tk_Canvas canvas, Tk_Item *itemPtr, #ifndef __NO_OLD_CONFIG typedef struct Tk_ItemType { - CONST86 char *name; /* The name of this type of item, such as + const char *name; /* The name of this type of item, such as * "line". */ #if TCL_MAJOR_VERSION > 8 size_t itemSize; /* Total amount of space needed for item's @@ -1073,7 +1070,7 @@ typedef struct Tk_ItemType { Tk_ItemCreateProc *createProc; /* Procedure to create a new item of this * type. */ - CONST86 Tk_ConfigSpec *configSpecs; /* Pointer to array of configuration specs for + const Tk_ConfigSpec *configSpecs; /* Pointer to array of configuration specs for * this type. Used for returning configuration * info. */ Tk_ItemConfigureProc *configProc; @@ -1243,8 +1240,8 @@ typedef int (Tk_ImageCreateProc) (Tcl_Interp *interp, char *name, int argc, char **argv, Tk_ImageType *typePtr, Tk_ImageMaster master, ClientData *masterDataPtr); #else -typedef int (Tk_ImageCreateProc) (Tcl_Interp *interp, CONST86 char *name, int objc, - Tcl_Obj *const objv[], CONST86 Tk_ImageType *typePtr, Tk_ImageMaster master, +typedef int (Tk_ImageCreateProc) (Tcl_Interp *interp, const char *name, int objc, + Tcl_Obj *const objv[], const Tk_ImageType *typePtr, Tk_ImageMaster master, ClientData *masterDataPtr); #endif /* USE_OLD_IMAGE */ typedef ClientData (Tk_ImageGetProc) (Tk_Window tkwin, ClientData masterData); @@ -1268,7 +1265,7 @@ typedef int (Tk_ImagePostscriptProc) (ClientData clientData, */ struct Tk_ImageType { - CONST86 char *name; /* Name of image type. */ + const char *name; /* Name of image type. */ Tk_ImageCreateProc *createProc; /* Procedure to call to create a new image of * this type. */ @@ -1380,7 +1377,7 @@ typedef int (Tk_ImageStringWriteProc) (Tcl_Interp *interp, Tcl_Obj *format, */ struct Tk_PhotoImageFormat { - CONST86 char *name; /* Name of image file format */ + const char *name; /* Name of image file format */ Tk_ImageFileMatchProc *fileMatchProc; /* Procedure to call to determine whether an * image file matches this format. */ @@ -1551,7 +1548,7 @@ typedef void (Tk_EventProc) (ClientData clientData, XEvent *eventPtr); typedef int (Tk_GenericProc) (ClientData clientData, XEvent *eventPtr); typedef int (Tk_ClientMessageProc) (Tk_Window tkwin, XEvent *eventPtr); typedef int (Tk_GetSelProc) (ClientData clientData, Tcl_Interp *interp, - CONST86 char *portion); + const char *portion); typedef void (Tk_LostSelProc) (ClientData clientData); typedef Tk_RestrictAction (Tk_RestrictProc) (ClientData clientData, XEvent *eventPtr); diff --git a/generic/tkBind.c b/generic/tkBind.c index 05966d1..cc0b582 100644 --- a/generic/tkBind.c +++ b/generic/tkBind.c @@ -2505,7 +2505,7 @@ DeleteVirtualEventTable( * already defined, the new definition augments those that already exist. * * Results: - * The return value is TCL_ERROR if an error occured while creating the + * The return value is TCL_ERROR if an error occurred while creating the * virtual binding. In this case, an error message will be left in the * interp's result. If all went well then the return value is TCL_OK. * diff --git a/generic/tkDecls.h b/generic/tkDecls.h index 6666c2d..eb3af95 100644 --- a/generic/tkDecls.h +++ b/generic/tkDecls.h @@ -103,7 +103,7 @@ EXTERN int Tk_CanvasTagsParseProc(ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, const char *value, char *widgRec, int offset); /* 19 */ -EXTERN CONST86 char * Tk_CanvasTagsPrintProc(ClientData clientData, +EXTERN const char * Tk_CanvasTagsPrintProc(ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 20 */ @@ -357,7 +357,7 @@ EXTERN Tk_Image Tk_GetImage(Tcl_Interp *interp, Tk_Window tkwin, /* 98 */ EXTERN ClientData Tk_GetImageMasterData(Tcl_Interp *interp, const char *name, - CONST86 Tk_ImageType **typePtrPtr); + const Tk_ImageType **typePtrPtr); /* 99 */ EXTERN Tk_ItemType * Tk_GetItemTypes(void); /* 100 */ @@ -909,7 +909,7 @@ typedef struct TkStubs { double (*tk_CanvasPsY) (Tk_Canvas canvas, double y); /* 16 */ void (*tk_CanvasSetStippleOrigin) (Tk_Canvas canvas, GC gc); /* 17 */ int (*tk_CanvasTagsParseProc) (ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, const char *value, char *widgRec, int offset); /* 18 */ - CONST86 char * (*tk_CanvasTagsPrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 19 */ + const char * (*tk_CanvasTagsPrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 19 */ Tk_Window (*tk_CanvasTkwin) (Tk_Canvas canvas); /* 20 */ void (*tk_CanvasWindowCoords) (Tk_Canvas canvas, double x, double y, short *screenXPtr, short *screenYPtr); /* 21 */ void (*tk_ChangeWindowAttributes) (Tk_Window tkwin, unsigned long valueMask, XSetWindowAttributes *attsPtr); /* 22 */ @@ -988,7 +988,7 @@ typedef struct TkStubs { void (*tk_GetFontMetrics) (Tk_Font font, Tk_FontMetrics *fmPtr); /* 95 */ GC (*tk_GetGC) (Tk_Window tkwin, unsigned long valueMask, XGCValues *valuePtr); /* 96 */ Tk_Image (*tk_GetImage) (Tcl_Interp *interp, Tk_Window tkwin, const char *name, Tk_ImageChangedProc *changeProc, ClientData clientData); /* 97 */ - ClientData (*tk_GetImageMasterData) (Tcl_Interp *interp, const char *name, CONST86 Tk_ImageType **typePtrPtr); /* 98 */ + ClientData (*tk_GetImageMasterData) (Tcl_Interp *interp, const char *name, const Tk_ImageType **typePtrPtr); /* 98 */ Tk_ItemType * (*tk_GetItemTypes) (void); /* 99 */ int (*tk_GetJoinStyle) (Tcl_Interp *interp, const char *str, int *joinPtr); /* 100 */ int (*tk_GetJustify) (Tcl_Interp *interp, const char *str, Tk_Justify *justifyPtr); /* 101 */ diff --git a/generic/tkEntry.c b/generic/tkEntry.c index 6a969bf..8a69010 100644 --- a/generic/tkEntry.c +++ b/generic/tkEntry.c @@ -3348,7 +3348,7 @@ EntryValidate( * * Results: * TCL_OK if the validatecommand accepts the new string, TCL_ERROR if any - * problems occured with validatecommand. + * problems occurred with validatecommand. * * Side effects: * The insertion/deletion may be aborted, and the validatecommand might @@ -3405,7 +3405,7 @@ EntryValidateChange( /* * If e->validate has become VALIDATE_NONE during the validation, or we * now have VALIDATE_VAR set (from EntrySetValue) and didn't before, it - * means that a loop condition almost occured. Do not allow this + * means that a loop condition almost occurred. Do not allow this * validation result to finish. */ diff --git a/generic/tkInt.decls b/generic/tkInt.decls index a2d43d9..04eecf6 100644 --- a/generic/tkInt.decls +++ b/generic/tkInt.decls @@ -99,7 +99,7 @@ declare 21 { const TkStateMap *mapPtr, const char *strKey) } declare 22 { - CONST86 char *TkFindStateString(const TkStateMap *mapPtr, int numKey) + const char *TkFindStateString(const TkStateMap *mapPtr, int numKey) } declare 23 { void TkFocusDeadWindow(TkWindow *winPtr) @@ -182,7 +182,7 @@ declare 45 { void TkInstallFrameMenu(Tk_Window tkwin) } declare 46 { - CONST86 char *TkKeysymToString(KeySym keysym) + const char *TkKeysymToString(KeySym keysym) } declare 47 { int TkLineToArea(double end1Ptr[], double end2Ptr[], double rectPtr[]) @@ -389,7 +389,7 @@ declare 108 { Tcl_Obj *objPtr, Tk_Window *windowPtr) } declare 109 { - CONST86 char *TkpGetString(TkWindow *winPtr, XEvent *eventPtr, Tcl_DString *dsPtr) + const char *TkpGetString(TkWindow *winPtr, XEvent *eventPtr, Tcl_DString *dsPtr) } declare 110 { void TkpGetSubFonts(Tcl_Interp *interp, Tk_Font tkfont) @@ -570,7 +570,7 @@ declare 169 { Tk_Window tkwin, const char *value, char *widgRec, int offset) } declare 170 { - CONST86 char *TkStatePrintProc(ClientData clientData, Tk_Window tkwin, + const char *TkStatePrintProc(ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr) } declare 171 { @@ -578,7 +578,7 @@ declare 171 { Tk_Window tkwin, const char *value, char *widgRec, int offset) } declare 172 { - CONST86 char *TkCanvasDashPrintProc(ClientData clientData, Tk_Window tkwin, + const char *TkCanvasDashPrintProc(ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr) } declare 173 { @@ -586,7 +586,7 @@ declare 173 { Tk_Window tkwin, const char *value, char *widgRec, int offset) } declare 174 { - CONST86 char *TkOffsetPrintProc(ClientData clientData, Tk_Window tkwin, + const char *TkOffsetPrintProc(ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr) } declare 175 { @@ -594,7 +594,7 @@ declare 175 { Tk_Window tkwin, const char *value, char *widgRec, int offset) } declare 176 { - CONST86 char *TkPixelPrintProc(ClientData clientData, Tk_Window tkwin, + const char *TkPixelPrintProc(ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr) } declare 177 { @@ -602,7 +602,7 @@ declare 177 { Tk_Window tkwin, const char *value, char *widgRec, int offset) } declare 178 { - CONST86 char *TkOrientPrintProc(ClientData clientData, Tk_Window tkwin, + const char *TkOrientPrintProc(ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr) } declare 179 { @@ -610,7 +610,7 @@ declare 179 { Tk_Window tkwin, const char *value, char *widgRec, int offset) } declare 180 { - CONST86 char *TkSmoothPrintProc(ClientData clientData, Tk_Window tkwin, + const char *TkSmoothPrintProc(ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr) } diff --git a/generic/tkIntDecls.h b/generic/tkIntDecls.h index 0ffe157..a646779 100644 --- a/generic/tkIntDecls.h +++ b/generic/tkIntDecls.h @@ -104,7 +104,7 @@ EXTERN int TkFindStateNum(Tcl_Interp *interp, const char *option, const TkStateMap *mapPtr, const char *strKey); /* 22 */ -EXTERN CONST86 char * TkFindStateString(const TkStateMap *mapPtr, +EXTERN const char * TkFindStateString(const TkStateMap *mapPtr, int numKey); /* 23 */ EXTERN void TkFocusDeadWindow(TkWindow *winPtr); @@ -167,7 +167,7 @@ EXTERN void TkInOutEvents(XEvent *eventPtr, TkWindow *sourcePtr, /* 45 */ EXTERN void TkInstallFrameMenu(Tk_Window tkwin); /* 46 */ -EXTERN CONST86 char * TkKeysymToString(KeySym keysym); +EXTERN const char * TkKeysymToString(KeySym keysym); /* 47 */ EXTERN int TkLineToArea(double end1Ptr[], double end2Ptr[], double rectPtr[]); @@ -324,7 +324,7 @@ EXTERN int TkGetWindowFromObj(Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr, Tk_Window *windowPtr); /* 109 */ -EXTERN CONST86 char * TkpGetString(TkWindow *winPtr, XEvent *eventPtr, +EXTERN const char * TkpGetString(TkWindow *winPtr, XEvent *eventPtr, Tcl_DString *dsPtr); /* 110 */ EXTERN void TkpGetSubFonts(Tcl_Interp *interp, Tk_Font tkfont); @@ -488,7 +488,7 @@ EXTERN int TkStateParseProc(ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, const char *value, char *widgRec, int offset); /* 170 */ -EXTERN CONST86 char * TkStatePrintProc(ClientData clientData, +EXTERN const char * TkStatePrintProc(ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 171 */ @@ -496,7 +496,7 @@ EXTERN int TkCanvasDashParseProc(ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, const char *value, char *widgRec, int offset); /* 172 */ -EXTERN CONST86 char * TkCanvasDashPrintProc(ClientData clientData, +EXTERN const char * TkCanvasDashPrintProc(ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 173 */ @@ -504,7 +504,7 @@ EXTERN int TkOffsetParseProc(ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, const char *value, char *widgRec, int offset); /* 174 */ -EXTERN CONST86 char * TkOffsetPrintProc(ClientData clientData, +EXTERN const char * TkOffsetPrintProc(ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 175 */ @@ -512,7 +512,7 @@ EXTERN int TkPixelParseProc(ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, const char *value, char *widgRec, int offset); /* 176 */ -EXTERN CONST86 char * TkPixelPrintProc(ClientData clientData, +EXTERN const char * TkPixelPrintProc(ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 177 */ @@ -520,7 +520,7 @@ EXTERN int TkOrientParseProc(ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, const char *value, char *widgRec, int offset); /* 178 */ -EXTERN CONST86 char * TkOrientPrintProc(ClientData clientData, +EXTERN const char * TkOrientPrintProc(ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 179 */ @@ -528,7 +528,7 @@ EXTERN int TkSmoothParseProc(ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, const char *value, char *widgRec, int offset); /* 180 */ -EXTERN CONST86 char * TkSmoothPrintProc(ClientData clientData, +EXTERN const char * TkSmoothPrintProc(ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 181 */ @@ -581,7 +581,7 @@ typedef struct TkIntStubs { void (*tkEventDeadWindow) (TkWindow *winPtr); /* 19 */ void (*tkFillPolygon) (Tk_Canvas canvas, double *coordPtr, int numPoints, Display *display, Drawable drawable, GC gc, GC outlineGC); /* 20 */ int (*tkFindStateNum) (Tcl_Interp *interp, const char *option, const TkStateMap *mapPtr, const char *strKey); /* 21 */ - CONST86 char * (*tkFindStateString) (const TkStateMap *mapPtr, int numKey); /* 22 */ + const char * (*tkFindStateString) (const TkStateMap *mapPtr, int numKey); /* 22 */ void (*tkFocusDeadWindow) (TkWindow *winPtr); /* 23 */ int (*tkFocusFilterEvent) (TkWindow *winPtr, XEvent *eventPtr); /* 24 */ TkWindow * (*tkFocusKeyEvent) (TkWindow *winPtr, XEvent *eventPtr); /* 25 */ @@ -605,7 +605,7 @@ typedef struct TkIntStubs { void (*tkIncludePoint) (Tk_Item *itemPtr, double *pointPtr); /* 43 */ void (*tkInOutEvents) (XEvent *eventPtr, TkWindow *sourcePtr, TkWindow *destPtr, int leaveType, int enterType, Tcl_QueuePosition position); /* 44 */ void (*tkInstallFrameMenu) (Tk_Window tkwin); /* 45 */ - CONST86 char * (*tkKeysymToString) (KeySym keysym); /* 46 */ + const char * (*tkKeysymToString) (KeySym keysym); /* 46 */ int (*tkLineToArea) (double end1Ptr[], double end2Ptr[], double rectPtr[]); /* 47 */ double (*tkLineToPoint) (double end1Ptr[], double end2Ptr[], double pointPtr[]); /* 48 */ int (*tkMakeBezierCurve) (Tk_Canvas canvas, double *pointPtr, int numPoints, int numSteps, XPoint xPoints[], double dblPoints[]); /* 49 */ @@ -668,7 +668,7 @@ typedef struct TkIntStubs { TkDisplay * (*tkGetDisplayList) (void); /* 106 */ TkMainInfo * (*tkGetMainInfoList) (void); /* 107 */ int (*tkGetWindowFromObj) (Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr, Tk_Window *windowPtr); /* 108 */ - CONST86 char * (*tkpGetString) (TkWindow *winPtr, XEvent *eventPtr, Tcl_DString *dsPtr); /* 109 */ + const char * (*tkpGetString) (TkWindow *winPtr, XEvent *eventPtr, Tcl_DString *dsPtr); /* 109 */ void (*tkpGetSubFonts) (Tcl_Interp *interp, Tk_Font tkfont); /* 110 */ Tcl_Obj * (*tkpGetSystemDefault) (Tk_Window tkwin, const char *dbName, const char *className); /* 111 */ void (*tkpMenuThreadInit) (void); /* 112 */ @@ -756,17 +756,17 @@ typedef struct TkIntStubs { int (*tkBTreeNumLines) (TkTextBTree tree, const struct TkText *textPtr); /* 167 */ void (*tkTextInsertDisplayProc) (struct TkText *textPtr, struct TkTextDispChunk *chunkPtr, int x, int y, int height, int baseline, Display *display, Drawable dst, int screenY); /* 168 */ int (*tkStateParseProc) (ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, const char *value, char *widgRec, int offset); /* 169 */ - CONST86 char * (*tkStatePrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 170 */ + const char * (*tkStatePrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 170 */ int (*tkCanvasDashParseProc) (ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, const char *value, char *widgRec, int offset); /* 171 */ - CONST86 char * (*tkCanvasDashPrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 172 */ + const char * (*tkCanvasDashPrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 172 */ int (*tkOffsetParseProc) (ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, const char *value, char *widgRec, int offset); /* 173 */ - CONST86 char * (*tkOffsetPrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 174 */ + const char * (*tkOffsetPrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 174 */ int (*tkPixelParseProc) (ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, const char *value, char *widgRec, int offset); /* 175 */ - CONST86 char * (*tkPixelPrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 176 */ + const char * (*tkPixelPrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 176 */ int (*tkOrientParseProc) (ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, const char *value, char *widgRec, int offset); /* 177 */ - CONST86 char * (*tkOrientPrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 178 */ + const char * (*tkOrientPrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 178 */ int (*tkSmoothParseProc) (ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, const char *value, char *widgRec, int offset); /* 179 */ - CONST86 char * (*tkSmoothPrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 180 */ + const char * (*tkSmoothPrintProc) (ClientData clientData, Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); /* 180 */ void (*tkDrawAngledTextLayout) (Display *display, Drawable drawable, GC gc, Tk_TextLayout layout, int x, int y, double angle, int firstChar, int lastChar); /* 181 */ void (*tkUnderlineAngledTextLayout) (Display *display, Drawable drawable, GC gc, Tk_TextLayout layout, int x, int y, double angle, int underline); /* 182 */ int (*tkIntersectAngledTextLayout) (Tk_TextLayout layout, int x, int y, int width, int height, double angle); /* 183 */ diff --git a/generic/tkIntPlatDecls.h b/generic/tkIntPlatDecls.h index 6013b36..9bc76c0 100644 --- a/generic/tkIntPlatDecls.h +++ b/generic/tkIntPlatDecls.h @@ -383,7 +383,7 @@ typedef struct TkIntPlatStubs { void (*tkMacOSXWindowOffset) (void *wRef, int *xOffset, int *yOffset); /* 37 */ int (*tkSetMacColor) (unsigned long pixel, void *macColor); /* 38 */ void (*tkSetWMName) (TkWindow *winPtr, Tk_Uid titleUid); /* 39 */ - void (*reserved40) (void); + void (*reserved40)(void); int (*tkMacOSXZoomToplevel) (void *whichWindow, short zoomPart); /* 41 */ Tk_Window (*tk_TopCoordsToWindow) (Tk_Window tkwin, int rootX, int rootY, int *newX, int *newY); /* 42 */ MacDrawable * (*tkMacOSXContainerId) (TkWindow *winPtr); /* 43 */ diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c index 6fd60e9..c0bbf5f 100644 --- a/generic/tkPanedWindow.c +++ b/generic/tkPanedWindow.c @@ -236,7 +236,7 @@ static void AdjustForSticky(int sticky, int cavityWidth, int *slaveWidthPtr, int *slaveHeightPtr); static void MoveSash(PanedWindow *pwPtr, int sash, int diff); static int ObjectIsEmpty(Tcl_Obj *objPtr); -static char * ComputeSlotAddress(char *recordPtr, int offset); +static void * ComputeSlotAddress(void *recordPtr, int offset); static int PanedWindowIdentifyCoords(PanedWindow *pwPtr, Tcl_Interp *interp, int x, int y); @@ -2455,7 +2455,8 @@ SetSticky( int flags) /* Flags for the option, set Tk_SetOptions. */ { int sticky = 0; - char c, *internalPtr; + char c; + void *internalPtr; const char *string; internalPtr = ComputeSlotAddress(recordPtr, internalOffset); @@ -3019,13 +3020,13 @@ ObjectIsEmpty( *---------------------------------------------------------------------- */ -static char * +static void * ComputeSlotAddress( - char *recordPtr, /* Pointer to the start of a record. */ + void *recordPtr, /* Pointer to the start of a record. */ int offset) /* Offset of a slot within that record; may be < 0. */ { if (offset >= 0) { - return recordPtr + offset; + return (char *)recordPtr + offset; } else { return NULL; } diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c index 40e49b7..e5268e7 100644 --- a/generic/ttk/ttkEntry.c +++ b/generic/ttk/ttkEntry.c @@ -585,7 +585,7 @@ static int EntryNeedsValidation(VMODE vmode, VREASON reason) * Returns: * TCL_OK if the change is accepted * TCL_BREAK if the change is rejected - * TCL_ERROR if any errors occured + * TCL_ERROR if any errors occurred * * The change will be rejected if -validatecommand returns 0, * or if -validatecommand or -invalidcommand modifies the value. diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c index 36fc297..f6ec72b 100644 --- a/macosx/tkMacOSXWindowEvent.c +++ b/macosx/tkMacOSXWindowEvent.c @@ -333,7 +333,7 @@ GenerateUpdates( } /* - * Compute the bounding box of the area that the damage occured in. + * Compute the bounding box of the area that the damage occurred in. */ boundsRgn = HIShapeCreateWithRect(&bounds); diff --git a/tests/safe.test b/tests/safe.test index 475d938..16068d3 100644 --- a/tests/safe.test +++ b/tests/safe.test @@ -28,7 +28,7 @@ namespace import -force tcltest::test # This probably means that tk wasn't installed properly. ## it indicates that something went wrong sourcing tk.tcl. -## Ensure that any changes that occured to tk.tcl will work or are properly +## Ensure that any changes that occurred to tk.tcl will work or are properly ## prevented in a safe interpreter. -- hobbs # The set of hidden commands is platform dependent: diff --git a/win/tkWinX.c b/win/tkWinX.c index f666152..e3b552e 100644 --- a/win/tkWinX.c +++ b/win/tkWinX.c @@ -1256,7 +1256,7 @@ GenerateXEvent( * GetState -- * * This function constructs a state mask for the mouse buttons and - * modifier keys as they were before the event occured. + * modifier keys as they were before the event occurred. * * Results: * Returns a composite value of all the modifier and button state flags diff --git a/xlib/X11/Xlib.h b/xlib/X11/Xlib.h index 09dc518..2418672 100644 --- a/xlib/X11/Xlib.h +++ b/xlib/X11/Xlib.h @@ -538,7 +538,7 @@ typedef struct { Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window window; /* "event" window it is reported relative to */ - Window root; /* root window that the event occured on */ + Window root; /* root window that the event occurred on */ Window subwindow; /* child window */ Time time; /* milliseconds */ int x, y; /* pointer x, y coordinates in event window */ @@ -559,7 +559,7 @@ typedef struct { Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window window; /* "event" window it is reported relative to */ - Window root; /* root window that the event occured on */ + Window root; /* root window that the event occurred on */ Window subwindow; /* child window */ Time time; /* milliseconds */ int x, y; /* pointer x, y coordinates in event window */ @@ -577,7 +577,7 @@ typedef struct { Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window window; /* "event" window reported relative to */ - Window root; /* root window that the event occured on */ + Window root; /* root window that the event occurred on */ Window subwindow; /* child window */ Time time; /* milliseconds */ int x, y; /* pointer x, y coordinates in event window */ @@ -594,7 +594,7 @@ typedef struct { Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ Window window; /* "event" window reported relative to */ - Window root; /* root window that the event occured on */ + Window root; /* root window that the event occurred on */ Window subwindow; /* child window */ Time time; /* milliseconds */ int x, y; /* pointer x, y coordinates in event window */ |