diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-06-19 09:55:18 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-06-19 09:55:18 (GMT) |
commit | e8469505b13e2af380977e581f42402073a2136f (patch) | |
tree | 047c7883c2e3add51b74078a8e69f0012cc4645c /generic | |
parent | c8f0062c64f9fc019a92e9bbc8918aa3e4ba1571 (diff) | |
download | tk-e8469505b13e2af380977e581f42402073a2136f.zip tk-e8469505b13e2af380977e581f42402073a2136f.tar.gz tk-e8469505b13e2af380977e581f42402073a2136f.tar.bz2 |
SetOptions.3: minor doc fix
make various other tables CONST
(All backported from Tk 8.6)
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkButton.c | 20 | ||||
-rw-r--r-- | generic/tkConsole.c | 4 | ||||
-rw-r--r-- | generic/tkEntry.c | 8 | ||||
-rw-r--r-- | generic/tkFrame.c | 12 | ||||
-rw-r--r-- | generic/tkImgGIF.c | 2 | ||||
-rw-r--r-- | generic/tkListbox.c | 8 | ||||
-rwxr-xr-x | generic/tkMenu.c | 18 | ||||
-rw-r--r-- | generic/tkMenubutton.c | 8 | ||||
-rw-r--r-- | generic/tkMessage.c | 2 | ||||
-rw-r--r-- | generic/tkOldConfig.c | 6 | ||||
-rw-r--r-- | generic/tkPanedWindow.c | 14 | ||||
-rw-r--r-- | generic/tkPlace.c | 2 | ||||
-rw-r--r-- | generic/tkScale.c | 6 | ||||
-rw-r--r-- | generic/tkSquare.c | 2 | ||||
-rw-r--r-- | generic/tkTest.c | 20 | ||||
-rw-r--r-- | generic/tkTextDisp.c | 8 |
16 files changed, 70 insertions, 70 deletions
diff --git a/generic/tkButton.c b/generic/tkButton.c index e844cec..9a261e9 100644 --- a/generic/tkButton.c +++ b/generic/tkButton.c @@ -25,14 +25,14 @@ static Tcl_ThreadDataKey dataKey; * in tkButton.h. */ -static CONST char *classNames[] = {"Label", "Button", "Checkbutton", "Radiobutton"}; +static CONST char *CONST classNames[] = {"Label", "Button", "Checkbutton", "Radiobutton"}; /* * The following table defines the legal values for the -default option. * It is used together with the "enum defaultValue" declaration in tkButton.h. */ -static CONST char *defaultStrings[] = { +static CONST char *CONST defaultStrings[] = { "active", "disabled", "normal", (char *) NULL }; @@ -41,7 +41,7 @@ static CONST char *defaultStrings[] = { * It is used together with the "enum state" declaration in tkButton.h. */ -static CONST char *stateStrings[] = { +static CONST char *CONST stateStrings[] = { "active", "disabled", "normal", (char *) NULL }; @@ -50,7 +50,7 @@ static CONST char *stateStrings[] = { * It is used with the "enum compound" declaration in tkButton.h */ -static CONST char *compoundStrings[] = { +static CONST char *CONST compoundStrings[] = { "bottom", "center", "left", "none", "right", "top", (char *) NULL }; @@ -61,7 +61,7 @@ char tkDefButtonBorderWidth[TCL_INTEGER_SPACE] = DEF_BUTTON_BORDER_WIDTH; * separate table for each of the four widget classes. */ -static Tk_OptionSpec labelOptionSpecs[] = { +static CONST Tk_OptionSpec labelOptionSpecs[] = { {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground", DEF_BUTTON_ACTIVE_BG_COLOR, -1, Tk_Offset(TkButton, activeBorder), 0, (ClientData) DEF_BUTTON_ACTIVE_BG_MONO, 0}, @@ -147,7 +147,7 @@ static Tk_OptionSpec labelOptionSpecs[] = { (char *) NULL, 0, 0, 0, 0} }; -static Tk_OptionSpec buttonOptionSpecs[] = { +static CONST Tk_OptionSpec buttonOptionSpecs[] = { {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground", DEF_BUTTON_ACTIVE_BG_COLOR, -1, Tk_Offset(TkButton, activeBorder), 0, (ClientData) DEF_BUTTON_ACTIVE_BG_MONO, 0}, @@ -249,7 +249,7 @@ static Tk_OptionSpec buttonOptionSpecs[] = { (char *) NULL, 0, -1, 0, 0, 0} }; -static Tk_OptionSpec checkbuttonOptionSpecs[] = { +static CONST Tk_OptionSpec checkbuttonOptionSpecs[] = { {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground", DEF_BUTTON_ACTIVE_BG_COLOR, -1, Tk_Offset(TkButton, activeBorder), 0, (ClientData) DEF_BUTTON_ACTIVE_BG_MONO, 0}, @@ -358,7 +358,7 @@ static Tk_OptionSpec checkbuttonOptionSpecs[] = { (char *) NULL, 0, -1, 0, 0, 0} }; -static Tk_OptionSpec radiobuttonOptionSpecs[] = { +static CONST Tk_OptionSpec radiobuttonOptionSpecs[] = { {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground", DEF_BUTTON_ACTIVE_BG_COLOR, -1, Tk_Offset(TkButton, activeBorder), 0, (ClientData) DEF_BUTTON_ACTIVE_BG_MONO, 0}, @@ -472,7 +472,7 @@ static Tk_OptionSpec radiobuttonOptionSpecs[] = { * class of widgets. */ -static Tk_OptionSpec *optionSpecs[] = { +static CONST Tk_OptionSpec *CONST optionSpecs[] = { labelOptionSpecs, buttonOptionSpecs, checkbuttonOptionSpecs, @@ -631,7 +631,7 @@ ButtonCreate(clientData, interp, objc, objv, type) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); if (!tsdPtr->defaultsInitialized) { - TkpButtonSetDefaults(optionSpecs[type]); + TkpButtonSetDefaults(NULL); tsdPtr->defaultsInitialized = 1; } diff --git a/generic/tkConsole.c b/generic/tkConsole.c index 307b9b5..af6e76a 100644 --- a/generic/tkConsole.c +++ b/generic/tkConsole.c @@ -351,9 +351,9 @@ Tk_CreateConsoleWindow(interp) int haveConsoleChannel = 1; #ifdef MAC_TCL - static const char *initCmd = "if {[catch {source $tk_library:console.tcl}]} {source -rsrc console}"; + static CONST char *initCmd = "if {[catch {source $tk_library:console.tcl}]} {source -rsrc console}"; #else - static const char *initCmd = "source $tk_library/console.tcl"; + static CONST char *initCmd = "source $tk_library/console.tcl"; #endif /* Init an interp with Tcl and Tk */ diff --git a/generic/tkEntry.c b/generic/tkEntry.c index c6eed1b..996af63 100644 --- a/generic/tkEntry.c +++ b/generic/tkEntry.c @@ -35,7 +35,7 @@ #define DOUBLES_EQ(d1, d2) (fabs((d1) - (d2)) < MIN_DBL_VAL) -static CONST char *stateStrings[] = { +static CONST char *CONST stateStrings[] = { "disabled", "normal", "readonly", (char *) NULL }; @@ -43,7 +43,7 @@ static CONST char *stateStrings[] = { * Definitions for -validate option values: */ -static CONST char *validateStrings[] = { +static CONST char *CONST validateStrings[] = { "all", "key", "focus", "focusin", "focusout", "none", (char *) NULL }; enum validateType { @@ -61,7 +61,7 @@ enum validateType { * Information used for Entry objv parsing. */ -static Tk_OptionSpec entryOptSpec[] = { +static CONST Tk_OptionSpec entryOptSpec[] = { {TK_OPTION_BORDER, "-background", "background", "Background", DEF_ENTRY_BG_COLOR, -1, Tk_Offset(Entry, normalBorder), 0, (ClientData) DEF_ENTRY_BG_MONO, 0}, @@ -189,7 +189,7 @@ static Tk_OptionSpec entryOptSpec[] = { #define DEF_SPINBOX_VALUES "" #define DEF_SPINBOX_WRAP "0" -static Tk_OptionSpec sbOptSpec[] = { +static CONST Tk_OptionSpec sbOptSpec[] = { {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Background", DEF_BUTTON_ACTIVE_BG_COLOR, -1, Tk_Offset(Spinbox, activeBorder), 0, (ClientData) DEF_BUTTON_ACTIVE_BG_MONO, 0}, diff --git a/generic/tkFrame.c b/generic/tkFrame.c index a416b22..e7a6dbe 100644 --- a/generic/tkFrame.c +++ b/generic/tkFrame.c @@ -170,7 +170,7 @@ enum labelanchor { LABELANCHOR_W, LABELANCHOR_WN, LABELANCHOR_WS }; -static CONST char *labelAnchorStrings[] = { +static CONST char *CONST labelAnchorStrings[] = { "e", "en", "es", "n", "ne", "nw", "s", "se", "sw", "w", "wn", "ws", (char *) NULL }; @@ -180,7 +180,7 @@ static CONST char *labelAnchorStrings[] = { * one common table used by all and one table for each widget class. */ -static Tk_OptionSpec commonOptSpec[] = { +static CONST Tk_OptionSpec commonOptSpec[] = { {TK_OPTION_BORDER, "-background", "background", "Background", DEF_FRAME_BG_COLOR, -1, Tk_Offset(Frame, border), TK_OPTION_NULL_OK, (ClientData) DEF_FRAME_BG_MONO, 0}, @@ -226,7 +226,7 @@ static Tk_OptionSpec commonOptSpec[] = { (char *) NULL, 0, 0, 0, 0, 0} }; -static Tk_OptionSpec frameOptSpec[] = { +static CONST Tk_OptionSpec frameOptSpec[] = { {TK_OPTION_SYNONYM, "-bd", (char *) NULL, (char *) NULL, (char *) NULL, 0, -1, 0, (ClientData) "-borderwidth", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", @@ -242,7 +242,7 @@ static Tk_OptionSpec frameOptSpec[] = { (char *) NULL, 0, 0, 0, (ClientData) commonOptSpec, 0} }; -static Tk_OptionSpec toplevelOptSpec[] = { +static CONST Tk_OptionSpec toplevelOptSpec[] = { {TK_OPTION_SYNONYM, "-bd", (char *) NULL, (char *) NULL, (char *) NULL, 0, -1, 0, (ClientData) "-borderwidth", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", @@ -267,7 +267,7 @@ static Tk_OptionSpec toplevelOptSpec[] = { (char *) NULL, 0, 0, 0, (ClientData) commonOptSpec, 0} }; -static Tk_OptionSpec labelframeOptSpec[] = { +static CONST Tk_OptionSpec labelframeOptSpec[] = { {TK_OPTION_SYNONYM, "-bd", (char *) NULL, (char *) NULL, (char *) NULL, 0, -1, 0, (ClientData) "-borderwidth", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", @@ -309,7 +309,7 @@ static CONST char *classNames[] = {"Frame", "Toplevel", "Labelframe"}; * that class of widgets. */ -static Tk_OptionSpec *optionSpecs[] = { +static CONST Tk_OptionSpec *CONST optionSpecs[] = { frameOptSpec, toplevelOptSpec, labelframeOptSpec diff --git a/generic/tkImgGIF.c b/generic/tkImgGIF.c index bbb3178..d46f9f9 100644 --- a/generic/tkImgGIF.c +++ b/generic/tkImgGIF.c @@ -2096,7 +2096,7 @@ compress(init_bits, handle, readValue) out_clear_init = (init_bits <= 3) ? 9 : (out_bump_init-1); #ifdef MIGIF_DEBUGGING_ENVARS { - const char *ocienv; + CONST char *ocienv; ocienv = getenv("MIGIF_OUT_CLEAR_INIT"); if (ocienv) { out_clear_init = atoi(ocienv); diff --git a/generic/tkListbox.c b/generic/tkListbox.c index 6f8156f..103cd9d 100644 --- a/generic/tkListbox.c +++ b/generic/tkListbox.c @@ -210,7 +210,7 @@ enum state { STATE_DISABLED, STATE_NORMAL }; -static CONST char *stateStrings[] = { +static CONST char *CONST stateStrings[] = { "disabled", "normal", (char *) NULL }; @@ -218,7 +218,7 @@ enum activeStyle { ACTIVE_STYLE_DOTBOX, ACTIVE_STYLE_NONE, ACTIVE_STYLE_UNDERLINE }; -static CONST char *activeStyleStrings[] = { +static CONST char *CONST activeStyleStrings[] = { "dotbox", "none", "underline", (char *) NULL }; @@ -226,7 +226,7 @@ static CONST char *activeStyleStrings[] = { * The optionSpecs table defines the valid configuration options for the * listbox widget */ -static Tk_OptionSpec optionSpecs[] = { +static CONST Tk_OptionSpec optionSpecs[] = { {TK_OPTION_STRING_TABLE, "-activestyle", "activeStyle", "ActiveStyle", DEF_LISTBOX_ACTIVE_STYLE, -1, Tk_Offset(Listbox, activeStyle), 0, (ClientData) activeStyleStrings, 0}, @@ -307,7 +307,7 @@ static Tk_OptionSpec optionSpecs[] = { * The itemAttrOptionSpecs table defines the valid configuration options for * listbox items */ -static Tk_OptionSpec itemAttrOptionSpecs[] = { +static CONST Tk_OptionSpec itemAttrOptionSpecs[] = { {TK_OPTION_BORDER, "-background", "background", "Background", (char *)NULL, -1, Tk_Offset(ItemAttr, border), TK_OPTION_NULL_OK|TK_OPTION_DONT_SET_DEFAULT, diff --git a/generic/tkMenu.c b/generic/tkMenu.c index 19031c5..4bcc46f 100755 --- a/generic/tkMenu.c +++ b/generic/tkMenu.c @@ -113,11 +113,11 @@ static CONST char *menuEntryTypeStrings[] = { * It is used with the "enum compound" declaration in tkMenu.h */ -static const char *compoundStrings[] = { +static CONST char *CONST compoundStrings[] = { "bottom", "center", "left", "none", "right", "top", (char *) NULL }; -static Tk_OptionSpec tkBasicMenuEntryConfigSpecs[] = { +static CONST Tk_OptionSpec tkBasicMenuEntryConfigSpecs[] = { {TK_OPTION_BORDER, "-activebackground", (char *) NULL, (char *) NULL, DEF_MENU_ENTRY_ACTIVE_BG, Tk_Offset(TkMenuEntry, activeBorderPtr), -1, TK_OPTION_NULL_OK}, @@ -166,14 +166,14 @@ static Tk_OptionSpec tkBasicMenuEntryConfigSpecs[] = { {TK_OPTION_END} }; -static Tk_OptionSpec tkSeparatorEntryConfigSpecs[] = { +static CONST Tk_OptionSpec tkSeparatorEntryConfigSpecs[] = { {TK_OPTION_BORDER, "-background", (char *) NULL, (char *) NULL, DEF_MENU_ENTRY_BG, Tk_Offset(TkMenuEntry, borderPtr), -1, TK_OPTION_NULL_OK}, {TK_OPTION_END} }; -static Tk_OptionSpec tkCheckButtonEntryConfigSpecs[] = { +static CONST Tk_OptionSpec tkCheckButtonEntryConfigSpecs[] = { {TK_OPTION_BOOLEAN, "-indicatoron", (char *) NULL, (char *) NULL, DEF_MENU_ENTRY_INDICATOR, -1, Tk_Offset(TkMenuEntry, indicatorOn)}, @@ -196,7 +196,7 @@ static Tk_OptionSpec tkCheckButtonEntryConfigSpecs[] = { (char *) NULL, 0, -1, 0, (ClientData) tkBasicMenuEntryConfigSpecs} }; -static Tk_OptionSpec tkRadioButtonEntryConfigSpecs[] = { +static CONST Tk_OptionSpec tkRadioButtonEntryConfigSpecs[] = { {TK_OPTION_BOOLEAN, "-indicatoron", (char *) NULL, (char *) NULL, DEF_MENU_ENTRY_INDICATOR, -1, Tk_Offset(TkMenuEntry, indicatorOn)}, @@ -216,7 +216,7 @@ static Tk_OptionSpec tkRadioButtonEntryConfigSpecs[] = { (char *) NULL, 0, -1, 0, (ClientData) tkBasicMenuEntryConfigSpecs} }; -static Tk_OptionSpec tkCascadeEntryConfigSpecs[] = { +static CONST Tk_OptionSpec tkCascadeEntryConfigSpecs[] = { {TK_OPTION_STRING, "-menu", (char *) NULL, (char *) NULL, DEF_MENU_ENTRY_MENU, Tk_Offset(TkMenuEntry, namePtr), -1, TK_OPTION_NULL_OK}, @@ -224,7 +224,7 @@ static Tk_OptionSpec tkCascadeEntryConfigSpecs[] = { (char *) NULL, 0, -1, 0, (ClientData) tkBasicMenuEntryConfigSpecs} }; -static Tk_OptionSpec tkTearoffEntryConfigSpecs[] = { +static CONST Tk_OptionSpec tkTearoffEntryConfigSpecs[] = { {TK_OPTION_BORDER, "-background", (char *) NULL, (char *) NULL, DEF_MENU_ENTRY_BG, Tk_Offset(TkMenuEntry, borderPtr), -1, TK_OPTION_NULL_OK}, @@ -234,7 +234,7 @@ static Tk_OptionSpec tkTearoffEntryConfigSpecs[] = { {TK_OPTION_END} }; -static Tk_OptionSpec *specsArray[] = { +static CONST Tk_OptionSpec *CONST specsArray[] = { tkCascadeEntryConfigSpecs, tkCheckButtonEntryConfigSpecs, tkBasicMenuEntryConfigSpecs, tkRadioButtonEntryConfigSpecs, tkSeparatorEntryConfigSpecs, tkTearoffEntryConfigSpecs}; @@ -246,7 +246,7 @@ static Tk_OptionSpec *specsArray[] = { static CONST char *menuTypeStrings[] = {"normal", "tearoff", "menubar", (char *) NULL}; -static Tk_OptionSpec tkMenuConfigSpecs[] = { +static CONST Tk_OptionSpec tkMenuConfigSpecs[] = { {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground", DEF_MENU_ACTIVE_BG_COLOR, Tk_Offset(TkMenu, activeBorderPtr), -1, 0, diff --git a/generic/tkMenubutton.c b/generic/tkMenubutton.c index 7e9a11a..0e85308 100644 --- a/generic/tkMenubutton.c +++ b/generic/tkMenubutton.c @@ -21,7 +21,7 @@ * in tkMenubutton.h. */ -static CONST char *directionStrings[] = { +static CONST char *CONST directionStrings[] = { "above", "below", "flush", "left", "right", (char *) NULL }; @@ -30,7 +30,7 @@ static CONST char *directionStrings[] = { * It is used together with the "enum state" declaration in tkMenubutton.h. */ -static CONST char *stateStrings[] = { +static CONST char *CONST stateStrings[] = { "active", "disabled", "normal", (char *) NULL }; @@ -39,7 +39,7 @@ static CONST char *stateStrings[] = { * It is used with the "enum compound" declaration in tkMenuButton.h */ -static CONST char *compoundStrings[] = { +static CONST char *CONST compoundStrings[] = { "bottom", "center", "left", "none", "right", "top", (char *) NULL }; @@ -47,7 +47,7 @@ static CONST char *compoundStrings[] = { * Information used for parsing configuration specs: */ -static Tk_OptionSpec optionSpecs[] = { +static CONST Tk_OptionSpec optionSpecs[] = { {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground", DEF_MENUBUTTON_ACTIVE_BG_COLOR, -1, Tk_Offset(TkMenuButton, activeBorder), 0, diff --git a/generic/tkMessage.c b/generic/tkMessage.c index 8fb5c36..0b3f36d 100644 --- a/generic/tkMessage.c +++ b/generic/tkMessage.c @@ -108,7 +108,7 @@ typedef struct { * Information used for argv parsing. */ -static Tk_OptionSpec optionSpecs[] = { +static CONST Tk_OptionSpec optionSpecs[] = { {TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor", DEF_MESSAGE_ANCHOR, -1, Tk_Offset(Message, anchor), 0, 0, 0}, {TK_OPTION_INT, "-aspect", "aspect", "Aspect", DEF_MESSAGE_ASPECT, diff --git a/generic/tkOldConfig.c b/generic/tkOldConfig.c index bbb673f..6c6303d 100644 --- a/generic/tkOldConfig.c +++ b/generic/tkOldConfig.c @@ -44,7 +44,7 @@ static CONST char * FormatConfigValue _ANSI_ARGS_((Tcl_Interp *interp, char *widgRec, char *buffer, Tcl_FreeProc **freeProcPtr)); static Tk_ConfigSpec * GetCachedSpecs _ANSI_ARGS_((Tcl_Interp *interp, - const Tk_ConfigSpec *staticSpecs)); + CONST Tk_ConfigSpec *staticSpecs)); static void DeleteSpecCacheTable _ANSI_ARGS_(( ClientData clientData, Tcl_Interp *interp)); @@ -1074,7 +1074,7 @@ Tk_FreeOptions(specs, widgRec, display, needFlags) static Tk_ConfigSpec * GetCachedSpecs(interp, staticSpecs) Tcl_Interp *interp; /* Interpreter in which to store the cache. */ - const Tk_ConfigSpec *staticSpecs; + CONST Tk_ConfigSpec *staticSpecs; /* Value to cache a copy of; it is also used * as a key into the cache. */ { @@ -1107,7 +1107,7 @@ GetCachedSpecs(interp, staticSpecs) &isNew); if (isNew) { unsigned int entrySpace = sizeof(Tk_ConfigSpec); - const Tk_ConfigSpec *staticSpecPtr; + CONST Tk_ConfigSpec *staticSpecPtr; Tk_ConfigSpec *specPtr; /* diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c index 09106dd..a876ae8 100644 --- a/generic/tkPanedWindow.c +++ b/generic/tkPanedWindow.c @@ -34,7 +34,7 @@ * The following table defines the legal values for the -orient option. */ -static CONST char *orientStrings[] = { +static CONST char *CONST orientStrings[] = { "horizontal", "vertical", (char *) NULL }; @@ -234,7 +234,7 @@ static Tk_ObjCustomOption stickyOption = { 0 }; -static Tk_OptionSpec optionSpecs[] = { +static CONST Tk_OptionSpec optionSpecs[] = { {TK_OPTION_BORDER, "-background", "background", "Background", DEF_PANEDWINDOW_BG_COLOR, -1, Tk_Offset(PanedWindow, background), 0, (ClientData) DEF_PANEDWINDOW_BG_MONO}, @@ -286,7 +286,7 @@ static Tk_OptionSpec optionSpecs[] = { {TK_OPTION_END} }; -static Tk_OptionSpec slaveOptionSpecs[] = { +static CONST Tk_OptionSpec slaveOptionSpecs[] = { {TK_OPTION_WINDOW, "-after", (char *) NULL, (char *) NULL, DEF_PANEDWINDOW_PANE_AFTER, -1, Tk_Offset(Slave, after), TK_OPTION_NULL_OK, 0, 0}, @@ -1368,7 +1368,7 @@ DisplayPanedWindow(clientData) Pixmap pixmap; Tk_Window tkwin = pwPtr->tkwin; int i, sashWidth, sashHeight; - const int horizontal = (pwPtr->orient == ORIENT_HORIZONTAL); + CONST int horizontal = (pwPtr->orient == ORIENT_HORIZONTAL); pwPtr->flags &= ~REDRAW_PENDING; if ((pwPtr->tkwin == NULL) || !Tk_IsMapped(tkwin)) { @@ -1639,7 +1639,7 @@ ArrangePanes(clientData) int internalBW; int paneDynSize, paneDynMinSize, pwHeight, pwWidth, pwSize; int stretchReserve, stretchAmount; - const int horizontal = (pwPtr->orient == ORIENT_HORIZONTAL); + CONST int horizontal = (pwPtr->orient == ORIENT_HORIZONTAL); pwPtr->flags &= ~(REQUESTED_RELAYOUT|RESIZE_PENDING); @@ -2039,7 +2039,7 @@ ComputeGeometry(pwPtr) int sashWidth, sashOffset, handleOffset; int reqWidth, reqHeight, dim; Slave *slavePtr; - const int horizontal = (pwPtr->orient == ORIENT_HORIZONTAL); + CONST int horizontal = (pwPtr->orient == ORIENT_HORIZONTAL); pwPtr->flags |= REQUESTED_RELAYOUT; @@ -2447,7 +2447,7 @@ MoveSash(pwPtr, sash, diff) Slave *slavePtr; int stretchReserve = 0; int nextSash = sash + 1; - const int horizontal = (pwPtr->orient == ORIENT_HORIZONTAL); + CONST int horizontal = (pwPtr->orient == ORIENT_HORIZONTAL); if (diff == 0) return; diff --git a/generic/tkPlace.c b/generic/tkPlace.c index 6178d26..4c7f0f4 100644 --- a/generic/tkPlace.c +++ b/generic/tkPlace.c @@ -79,7 +79,7 @@ typedef struct Slave { */ #define IN_MASK 1 -static Tk_OptionSpec optionSpecs[] = { +static CONST Tk_OptionSpec optionSpecs[] = { {TK_OPTION_ANCHOR, "-anchor", NULL, NULL, "nw", -1, Tk_Offset(Slave, anchor), 0, 0, 0}, {TK_OPTION_STRING_TABLE, "-bordermode", NULL, NULL, "inside", -1, diff --git a/generic/tkScale.c b/generic/tkScale.c index 9b582fe..1c5c6f3 100644 --- a/generic/tkScale.c +++ b/generic/tkScale.c @@ -30,7 +30,7 @@ * It is used together with the "enum orient" declaration in tkScale.h. */ -static CONST char *orientStrings[] = { +static CONST char *CONST orientStrings[] = { "horizontal", "vertical", (char *) NULL }; @@ -39,11 +39,11 @@ static CONST char *orientStrings[] = { * It is used together with the "enum state" declaration in tkScale.h. */ -static CONST char *stateStrings[] = { +static CONST char *CONST stateStrings[] = { "active", "disabled", "normal", (char *) NULL }; -static Tk_OptionSpec optionSpecs[] = { +static CONST Tk_OptionSpec optionSpecs[] = { {TK_OPTION_BORDER, "-activebackground", "activeBackground", "Foreground", DEF_SCALE_ACTIVE_BG_COLOR, -1, Tk_Offset(TkScale, activeBorder), 0, (ClientData) DEF_SCALE_ACTIVE_BG_MONO, 0}, diff --git a/generic/tkSquare.c b/generic/tkSquare.c index 435b841..9f07b27 100644 --- a/generic/tkSquare.c +++ b/generic/tkSquare.c @@ -58,7 +58,7 @@ typedef struct { * Information used for argv parsing. */ -static Tk_OptionSpec optionSpecs[] = { +static CONST Tk_OptionSpec optionSpecs[] = { {TK_OPTION_BORDER, "-background", "background", "Background", "#d9d9d9", Tk_Offset(Square, bgBorderPtr), -1, 0, (ClientData) "white"}, diff --git a/generic/tkTest.c b/generic/tkTest.c index fdd70b7..6cb776c 100644 --- a/generic/tkTest.c +++ b/generic/tkTest.c @@ -649,7 +649,7 @@ TestobjconfigObjCmd(clientData, interp, objc, objv) * created by commands below; indexed * with same values as "options" * array. */ - static Tk_ObjCustomOption CustomOption = { + static CONST Tk_ObjCustomOption CustomOption = { "custom option", CustomOptionSet, CustomOptionGet, @@ -674,7 +674,7 @@ TestobjconfigObjCmd(clientData, interp, objc, objv) Tcl_Obj *extension4ObjPtr; Tcl_Obj *extension5ObjPtr; } ExtensionWidgetRecord; - static Tk_OptionSpec baseSpecs[] = { + static CONST Tk_OptionSpec baseSpecs[] = { {TK_OPTION_STRING, "-one", "one", "One", "one", Tk_Offset(ExtensionWidgetRecord, base1ObjPtr), -1}, @@ -717,9 +717,9 @@ TestobjconfigObjCmd(clientData, interp, objc, objv) Tcl_Obj *customPtr; } TypesRecord; TypesRecord *recordPtr; - static CONST char *stringTable[] = {"one", "two", "three", "four", + static CONST char *CONST stringTable[] = {"one", "two", "three", "four", (char *) NULL}; - static Tk_OptionSpec typesSpecs[] = { + static CONST Tk_OptionSpec typesSpecs[] = { {TK_OPTION_BOOLEAN, "-boolean", "boolean", "Boolean", "1", Tk_Offset(TypesRecord, booleanPtr), -1, 0, 0, 0x1}, @@ -893,7 +893,7 @@ TestobjconfigObjCmd(clientData, interp, objc, objv) case CHAIN2: { ExtensionWidgetRecord *recordPtr; - static Tk_OptionSpec extensionSpecs[] = { + static CONST Tk_OptionSpec extensionSpecs[] = { {TK_OPTION_STRING, "-three", "three", "Three", "three", Tk_Offset(ExtensionWidgetRecord, extension3ObjPtr), @@ -961,7 +961,7 @@ TestobjconfigObjCmd(clientData, interp, objc, objv) Tcl_Obj *intPtr; } ErrorWidgetRecord; ErrorWidgetRecord widgetRecord; - static Tk_OptionSpec errorSpecs[] = { + static CONST Tk_OptionSpec errorSpecs[] = { {TK_OPTION_INT, "-int", "integer", "Integer", "bogus", Tk_Offset(ErrorWidgetRecord, intPtr)}, @@ -1035,7 +1035,7 @@ TestobjconfigObjCmd(clientData, interp, objc, objv) static CONST char *internalStringTable[] = { "one", "two", "three", "four", (char *) NULL }; - static Tk_OptionSpec internalSpecs[] = { + static CONST Tk_OptionSpec internalSpecs[] = { {TK_OPTION_BOOLEAN, "-boolean", "boolean", "Boolean", "1", -1, Tk_Offset(InternalRecord, boolean), 0, 0, 0x1}, @@ -1173,7 +1173,7 @@ TestobjconfigObjCmd(clientData, interp, objc, objv) Tcl_Obj *five; } FiveRecord; FiveRecord *recordPtr; - static Tk_OptionSpec smallSpecs[] = { + static CONST Tk_OptionSpec smallSpecs[] = { {TK_OPTION_INT, "-one", "one", "One", "1", @@ -1239,7 +1239,7 @@ TestobjconfigObjCmd(clientData, interp, objc, objv) Tcl_Obj *fooObjPtr; } NotEnoughRecord; NotEnoughRecord record; - static Tk_OptionSpec errorSpecs[] = { + static CONST Tk_OptionSpec errorSpecs[] = { {TK_OPTION_INT, "-foo", "foo", "Foo", "0", Tk_Offset(NotEnoughRecord, fooObjPtr)}, @@ -1274,7 +1274,7 @@ TestobjconfigObjCmd(clientData, interp, objc, objv) Tcl_Obj *windowPtr; } SlaveRecord; SlaveRecord *recordPtr; - static Tk_OptionSpec slaveSpecs[] = { + static CONST Tk_OptionSpec slaveSpecs[] = { {TK_OPTION_WINDOW, "-window", "window", "Window", ".bar", Tk_Offset(SlaveRecord, windowPtr), -1, diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index cd5d90f..4637b5c 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -1693,9 +1693,9 @@ DisplayDLine(textPtr, dlPtr, prevPtr, pixmap) Display *display; int height, x; #ifndef TK_NO_DOUBLE_BUFFERING - const int y = 0; + CONST int y = 0; #else - const int y = dlPtr->y; + CONST int y = dlPtr->y; #endif /* TK_NO_DOUBLE_BUFFERING */ if (dlPtr->chunkPtr == NULL) return; @@ -1875,9 +1875,9 @@ DisplayLineBackground(textPtr, dlPtr, prevPtr, pixmap) StyleValues *sValuePtr; Display *display; #ifndef TK_NO_DOUBLE_BUFFERING - const int y = 0; + CONST int y = 0; #else - const int y = dlPtr->y; + CONST int y = dlPtr->y; #endif /* TK_NO_DOUBLE_BUFFERING */ /* |