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 /generic/tk.h | |
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
Diffstat (limited to 'generic/tk.h')
-rw-r--r-- | generic/tk.h | 31 |
1 files changed, 14 insertions, 17 deletions
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); |