diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkAtom.c | 4 | ||||
-rw-r--r-- | generic/tkEntry.c | 4 | ||||
-rw-r--r-- | generic/tkFrame.c | 6 | ||||
-rw-r--r-- | generic/tkImgBmap.c | 2 | ||||
-rw-r--r-- | generic/tkImgPhoto.c | 5 | ||||
-rw-r--r-- | generic/tkListbox.c | 4 | ||||
-rw-r--r-- | generic/tkMenubutton.c | 6 | ||||
-rw-r--r-- | generic/tkPanedWindow.c | 4 | ||||
-rw-r--r-- | generic/tkPlace.c | 2 | ||||
-rw-r--r-- | generic/tkScale.c | 4 | ||||
-rw-r--r-- | generic/tkTest.c | 4 | ||||
-rw-r--r-- | generic/tkText.c | 6 | ||||
-rw-r--r-- | generic/tkTextImage.c | 2 | ||||
-rw-r--r-- | generic/tkTextTag.c | 4 | ||||
-rw-r--r-- | generic/tkTextWind.c | 2 |
15 files changed, 30 insertions, 29 deletions
diff --git a/generic/tkAtom.c b/generic/tkAtom.c index 54d3598..fe1b5b3 100644 --- a/generic/tkAtom.c +++ b/generic/tkAtom.c @@ -20,7 +20,7 @@ * those found in xatom.h */ -static char * atomNameArray[] = { +static const char *atomNameArray[] = { "PRIMARY", "SECONDARY", "ARC", "ATOM", "BITMAP", "CARDINAL", "COLORMAP", "CURSOR", "CUT_BUFFER0", @@ -190,7 +190,7 @@ AtomInit( Tcl_InitHashTable(&dispPtr->atomTable, TCL_ONE_WORD_KEYS); for (atom = 1; atom <= XA_LAST_PREDEFINED; atom++) { - char *name; + const char *name; int isNew; hPtr = Tcl_FindHashEntry(&dispPtr->atomTable, INT2PTR(atom)); diff --git a/generic/tkEntry.c b/generic/tkEntry.c index 8f181cd..8b00a6f 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 char *stateStrings[] = { +static CONST char *stateStrings[] = { "disabled", "normal", "readonly", NULL }; @@ -43,7 +43,7 @@ static char *stateStrings[] = { * Definitions for -validate option values: */ -static char *validateStrings[] = { +static CONST char *validateStrings[] = { "all", "key", "focus", "focusin", "focusout", "none", NULL }; enum validateType { diff --git a/generic/tkFrame.c b/generic/tkFrame.c index 8662dd3..e38fe87 100644 --- a/generic/tkFrame.c +++ b/generic/tkFrame.c @@ -162,7 +162,7 @@ enum labelanchor { LABELANCHOR_W, LABELANCHOR_WN, LABELANCHOR_WS }; -static char *labelAnchorStrings[] = { +static CONST char *labelAnchorStrings[] = { "e", "en", "es", "n", "ne", "nw", "s", "se", "sw", "w", "wn", "ws", NULL }; @@ -285,7 +285,7 @@ static const Tk_OptionSpec labelframeOptSpec[] = { * Class names for widgets, indexed by FrameType. */ -static char *classNames[] = {"Frame", "Toplevel", "Labelframe"}; +static CONST char *classNames[] = {"Frame", "Toplevel", "Labelframe"}; /* * The following table maps from FrameType to the option template for that @@ -295,7 +295,7 @@ static char *classNames[] = {"Frame", "Toplevel", "Labelframe"}; static const Tk_OptionSpec * const optionSpecs[] = { frameOptSpec, toplevelOptSpec, - labelframeOptSpec, + labelframeOptSpec }; /* diff --git a/generic/tkImgBmap.c b/generic/tkImgBmap.c index 8598e88..4f5c6ac 100644 --- a/generic/tkImgBmap.c +++ b/generic/tkImgBmap.c @@ -1131,7 +1131,7 @@ ImgBmapPsImagemask( * within a byte so that the bits will be in the order postscript expects. */ - static unsigned char bit_reverse[] = { + static const unsigned char bit_reverse[] = { 0, 128, 64, 192, 32, 160, 96, 224, 16, 144, 80, 208, 48, 176, 112, 240, 8, 136, 72, 200, 40, 168, 104, 232, 24, 152, 88, 216, 56, 184, 120, 248, 4, 132, 68, 196, 36, 164, 100, 228, 20, 148, 84, 212, 52, 180, 116, 244, diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index ffff4fc..b30ca30 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -274,7 +274,7 @@ struct SubcommandOptions { * of the OPT_* constants above. */ -static char *optionNames[] = { +static const char *const optionNames[] = { "-background", "-compositingrule", "-format", @@ -1630,7 +1630,8 @@ ParseSubcommandOptions( { int index, c, bit, currentBit, length; int values[4], numValues, maxValues, argIndex; - char *option, **listPtr; + char *option; + const char *const *listPtr; for (index = *optIndexPtr; index < objc; *optIndexPtr = ++index) { /* diff --git a/generic/tkListbox.c b/generic/tkListbox.c index 44421d2..aab7494 100644 --- a/generic/tkListbox.c +++ b/generic/tkListbox.c @@ -211,7 +211,7 @@ enum state { STATE_DISABLED, STATE_NORMAL }; -static char *stateStrings[] = { +static CONST char *stateStrings[] = { "disabled", "normal", NULL }; @@ -219,7 +219,7 @@ enum activeStyle { ACTIVE_STYLE_DOTBOX, ACTIVE_STYLE_NONE, ACTIVE_STYLE_UNDERLINE }; -static char *activeStyleStrings[] = { +static CONST char *activeStyleStrings[] = { "dotbox", "none", "underline", NULL }; diff --git a/generic/tkMenubutton.c b/generic/tkMenubutton.c index b19c7aa..cb1727e 100644 --- a/generic/tkMenubutton.c +++ b/generic/tkMenubutton.c @@ -20,7 +20,7 @@ * is used together with the "enum direction" declaration in tkMenubutton.h. */ -static char *directionStrings[] = { +static CONST char *directionStrings[] = { "above", "below", "flush", "left", "right", NULL }; @@ -29,7 +29,7 @@ static char *directionStrings[] = { * used together with the "enum state" declaration in tkMenubutton.h. */ -static char *stateStrings[] = { +static CONST char *stateStrings[] = { "active", "disabled", "normal", NULL }; @@ -38,7 +38,7 @@ static char *stateStrings[] = { * is used with the "enum compound" declaration in tkMenuButton.h */ -static char *compoundStrings[] = { +static CONST char *compoundStrings[] = { "bottom", "center", "left", "none", "right", "top", NULL }; diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c index 68d62d7..9029265 100644 --- a/generic/tkPanedWindow.c +++ b/generic/tkPanedWindow.c @@ -35,7 +35,7 @@ * The following table defines the legal values for the -orient option. */ -static char *orientStrings[] = { +static CONST char *orientStrings[] = { "horizontal", "vertical", NULL }; @@ -45,7 +45,7 @@ enum orient { ORIENT_HORIZONTAL, ORIENT_VERTICAL }; * The following table defines the legal values for the -stretch option. */ -static char *stretchStrings[] = { +static const char *stretchStrings[] = { "always", "first", "last", "middle", "never", NULL }; diff --git a/generic/tkPlace.c b/generic/tkPlace.c index 951cd8f..2f527ba 100644 --- a/generic/tkPlace.c +++ b/generic/tkPlace.c @@ -24,7 +24,7 @@ * actual window size. */ -static char *borderModeStrings[] = { +static CONST char *borderModeStrings[] = { "inside", "outside", "ignore", NULL }; diff --git a/generic/tkScale.c b/generic/tkScale.c index 103f39c..91e04eb 100644 --- a/generic/tkScale.c +++ b/generic/tkScale.c @@ -26,7 +26,7 @@ * used together with the "enum orient" declaration in tkScale.h. */ -static char *orientStrings[] = { +static CONST char *orientStrings[] = { "horizontal", "vertical", NULL }; @@ -35,7 +35,7 @@ static char *orientStrings[] = { * used together with the "enum state" declaration in tkScale.h. */ -static char *stateStrings[] = { +static CONST char *stateStrings[] = { "active", "disabled", "normal", NULL }; diff --git a/generic/tkTest.c b/generic/tkTest.c index 639ed8d..71368f3 100644 --- a/generic/tkTest.c +++ b/generic/tkTest.c @@ -697,7 +697,7 @@ TestobjconfigObjCmd( Tcl_Obj *customPtr; } TypesRecord; TypesRecord *recordPtr; - static char *stringTable[] = { + static const char *stringTable[] = { "one", "two", "three", "four", NULL }; static const Tk_OptionSpec typesSpecs[] = { @@ -970,7 +970,7 @@ TestobjconfigObjCmd( char *custom; } InternalRecord; InternalRecord *recordPtr; - static char *internalStringTable[] = { + static const char *internalStringTable[] = { "one", "two", "three", "four", NULL }; static const Tk_OptionSpec internalSpecs[] = { diff --git a/generic/tkText.c b/generic/tkText.c index 6652f3d..6156dd4 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -48,7 +48,7 @@ * table below. */ -static char *stateStrings[] = { +static const char *stateStrings[] = { "disabled", "normal", NULL }; @@ -58,7 +58,7 @@ static char *stateStrings[] = { * table below. */ -static char *wrapStrings[] = { +static const char *wrapStrings[] = { "char", "none", "word", NULL }; @@ -68,7 +68,7 @@ static char *wrapStrings[] = { * the string table below. */ -static char *tabStyleStrings[] = { +static const char *tabStyleStrings[] = { "tabular", "wordprocessor", NULL }; diff --git a/generic/tkTextImage.c b/generic/tkTextImage.c index 5d77c13..771347d 100644 --- a/generic/tkTextImage.c +++ b/generic/tkTextImage.c @@ -69,7 +69,7 @@ static const Tk_SegType tkTextEmbImageType = { * Definitions for alignment values: */ -static char *alignStrings[] = { +static const char *alignStrings[] = { "baseline", "bottom", "center", "top", NULL }; diff --git a/generic/tkTextTag.c b/generic/tkTextTag.c index b0d33ce..2df950a 100644 --- a/generic/tkTextTag.c +++ b/generic/tkTextTag.c @@ -23,7 +23,7 @@ * a whole is not. */ -static char *wrapStrings[] = { +static const char *wrapStrings[] = { "char", "none", "word", "", NULL }; @@ -34,7 +34,7 @@ static char *wrapStrings[] = { * widget as a whole is not. */ -static char *tabStyleStrings[] = { +static const char *tabStyleStrings[] = { "tabular", "wordprocessor", "", NULL }; diff --git a/generic/tkTextWind.c b/generic/tkTextWind.c index 1758964..ecafd4e 100644 --- a/generic/tkTextWind.c +++ b/generic/tkTextWind.c @@ -85,7 +85,7 @@ static const Tk_SegType tkTextEmbWindowType = { * Definitions for alignment values: */ -static char *alignStrings[] = { +static const char *alignStrings[] = { "baseline", "bottom", "center", "top", NULL }; |