summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/regc_lex.c38
-rw-r--r--generic/regcomp.c24
-rw-r--r--generic/regerror.c2
-rw-r--r--generic/tclBasic.c8
-rw-r--r--generic/tclBinary.c2
-rw-r--r--generic/tclCmdMZ.c4
-rw-r--r--generic/tclCompExpr.c18
-rw-r--r--generic/tclCompile.c2
-rw-r--r--generic/tclDate.c12
-rw-r--r--generic/tclEncoding.c2
-rw-r--r--generic/tclExecute.c10
-rwxr-xr-xgeneric/tclFileName.c2
-rw-r--r--generic/tclGetDate.y12
-rw-r--r--generic/tclIO.c2
-rw-r--r--generic/tclIOCmd.c2
-rw-r--r--generic/tclIOGT.c1
-rw-r--r--generic/tclIOUtil.c1
-rw-r--r--generic/tclParseExpr.c2
-rw-r--r--generic/tclPkg.c10
-rw-r--r--generic/tclStringObj.c2
-rw-r--r--generic/tclStubInit.c2
-rw-r--r--generic/tclTest.c2
-rw-r--r--generic/tclTestProcBodyObj.c12
23 files changed, 87 insertions, 85 deletions
diff --git a/generic/regc_lex.c b/generic/regc_lex.c
index 588718d..99497b9 100644
--- a/generic/regc_lex.c
+++ b/generic/regc_lex.c
@@ -195,8 +195,8 @@ struct vars *v;
static VOID
lexnest(v, beginp, endp)
struct vars *v;
-chr *beginp; /* start of interpolation */
-chr *endp; /* one past end of interpolation */
+CONST chr *beginp; /* start of interpolation */
+CONST chr *endp; /* one past end of interpolation */
{
assert(v->savenow == NULL); /* only one level of nesting */
v->savenow = v->now;
@@ -208,47 +208,47 @@ chr *endp; /* one past end of interpolation */
/*
* string constants to interpolate as expansions of things like \d
*/
-static chr backd[] = { /* \d */
+static CONST chr backd[] = { /* \d */
CHR('['), CHR('['), CHR(':'),
CHR('d'), CHR('i'), CHR('g'), CHR('i'), CHR('t'),
CHR(':'), CHR(']'), CHR(']')
};
-static chr backD[] = { /* \D */
+static CONST chr backD[] = { /* \D */
CHR('['), CHR('^'), CHR('['), CHR(':'),
CHR('d'), CHR('i'), CHR('g'), CHR('i'), CHR('t'),
CHR(':'), CHR(']'), CHR(']')
};
-static chr brbackd[] = { /* \d within brackets */
+static CONST chr brbackd[] = { /* \d within brackets */
CHR('['), CHR(':'),
CHR('d'), CHR('i'), CHR('g'), CHR('i'), CHR('t'),
CHR(':'), CHR(']')
};
-static chr backs[] = { /* \s */
+static CONST chr backs[] = { /* \s */
CHR('['), CHR('['), CHR(':'),
CHR('s'), CHR('p'), CHR('a'), CHR('c'), CHR('e'),
CHR(':'), CHR(']'), CHR(']')
};
-static chr backS[] = { /* \S */
+static CONST chr backS[] = { /* \S */
CHR('['), CHR('^'), CHR('['), CHR(':'),
CHR('s'), CHR('p'), CHR('a'), CHR('c'), CHR('e'),
CHR(':'), CHR(']'), CHR(']')
};
-static chr brbacks[] = { /* \s within brackets */
+static CONST chr brbacks[] = { /* \s within brackets */
CHR('['), CHR(':'),
CHR('s'), CHR('p'), CHR('a'), CHR('c'), CHR('e'),
CHR(':'), CHR(']')
};
-static chr backw[] = { /* \w */
+static CONST chr backw[] = { /* \w */
CHR('['), CHR('['), CHR(':'),
CHR('a'), CHR('l'), CHR('n'), CHR('u'), CHR('m'),
CHR(':'), CHR(']'), CHR('_'), CHR(']')
};
-static chr backW[] = { /* \W */
+static CONST chr backW[] = { /* \W */
CHR('['), CHR('^'), CHR('['), CHR(':'),
CHR('a'), CHR('l'), CHR('n'), CHR('u'), CHR('m'),
CHR(':'), CHR(']'), CHR('_'), CHR(']')
};
-static chr brbackw[] = { /* \w within brackets */
+static CONST chr brbackw[] = { /* \w within brackets */
CHR('['), CHR(':'),
CHR('a'), CHR('l'), CHR('n'), CHR('u'), CHR('m'),
CHR(':'), CHR(']'), CHR('_')
@@ -660,13 +660,13 @@ lexescape(v)
struct vars *v;
{
chr c;
- static chr alert[] = {
+ static CONST chr alert[] = {
CHR('a'), CHR('l'), CHR('e'), CHR('r'), CHR('t')
};
- static chr esc[] = {
+ static CONST chr esc[] = {
CHR('E'), CHR('S'), CHR('C')
};
- chr *save;
+ CONST chr *save;
assert(v->cflags&REG_ADVF);
@@ -979,7 +979,7 @@ static VOID
skip(v)
struct vars *v;
{
- chr *start = v->now;
+ CONST chr *start = v->now;
assert(v->cflags&REG_EXPANDED);
@@ -1018,10 +1018,10 @@ newline()
^ #endif
*/
#ifdef REG_DEBUG
-static chr *
+static CONST chr *
ch()
{
- static chr chstr[] = { CHR('c'), CHR('h'), CHR('\0') };
+ static CONST chr chstr[] = { CHR('c'), CHR('h'), CHR('\0') };
return chstr;
}
@@ -1036,8 +1036,8 @@ ch()
static chr
chrnamed(v, startp, endp, lastresort)
struct vars *v;
-chr *startp; /* start of name */
-chr *endp; /* just past end of name */
+CONST chr *startp; /* start of name */
+CONST chr *endp; /* just past end of name */
pchr lastresort; /* what to return if name lookup fails */
{
celt c;
diff --git a/generic/regcomp.c b/generic/regcomp.c
index c239d8b..a1fe5bc 100644
--- a/generic/regcomp.c
+++ b/generic/regcomp.c
@@ -52,7 +52,7 @@ static VOID repeat _ANSI_ARGS_((struct vars *, struct state *, struct state *, i
static VOID bracket _ANSI_ARGS_((struct vars *, struct state *, struct state *));
static VOID cbracket _ANSI_ARGS_((struct vars *, struct state *, struct state *));
static VOID brackpart _ANSI_ARGS_((struct vars *, struct state *, struct state *));
-static chr *scanplain _ANSI_ARGS_((struct vars *));
+static CONST chr *scanplain _ANSI_ARGS_((struct vars *));
static VOID onechr _ANSI_ARGS_((struct vars *, pchr, struct state *, struct state *));
static VOID dovec _ANSI_ARGS_((struct vars *, struct cvec *, struct state *, struct state *));
static celt nextleader _ANSI_ARGS_((struct vars *, pchr, pchr));
@@ -76,7 +76,7 @@ static char *stid _ANSI_ARGS_((struct subre *, char *, size_t));
/* === regc_lex.c === */
static VOID lexstart _ANSI_ARGS_((struct vars *));
static VOID prefixes _ANSI_ARGS_((struct vars *));
-static VOID lexnest _ANSI_ARGS_((struct vars *, chr *, chr *));
+static VOID lexnest _ANSI_ARGS_((struct vars *, CONST chr *, CONST chr *));
static VOID lexword _ANSI_ARGS_((struct vars *));
static int next _ANSI_ARGS_((struct vars *));
static int lexescape _ANSI_ARGS_((struct vars *));
@@ -85,9 +85,9 @@ static int brenext _ANSI_ARGS_((struct vars *, pchr));
static VOID skip _ANSI_ARGS_((struct vars *));
static chr newline _ANSI_ARGS_((NOPARMS));
#ifdef REG_DEBUG
-static chr *ch _ANSI_ARGS_((NOPARMS));
+static CONST chr *ch _ANSI_ARGS_((NOPARMS));
#endif
-static chr chrnamed _ANSI_ARGS_((struct vars *, chr *, chr *, pchr));
+static chr chrnamed _ANSI_ARGS_((struct vars *, CONST chr *, CONST chr *, pchr));
/* === regc_color.c === */
static VOID initcm _ANSI_ARGS_((struct vars *, struct colormap *));
static VOID freecm _ANSI_ARGS_((struct colormap *));
@@ -190,10 +190,10 @@ static int casecmp _ANSI_ARGS_((CONST chr *, CONST chr *, size_t));
/* internal variables, bundled for easy passing around */
struct vars {
regex_t *re;
- chr *now; /* scan pointer into string */
- chr *stop; /* end of string */
- chr *savenow; /* saved now and stop for "subroutine call" */
- chr *savestop;
+ CONST chr *now; /* scan pointer into string */
+ CONST chr *stop; /* end of string */
+ CONST chr *savenow; /* saved now and stop for "subroutine call" */
+ CONST chr *savestop;
int err; /* error code (0 if none) */
int cflags; /* copy of compile flags */
int lasttype; /* type of previous token */
@@ -1357,8 +1357,8 @@ struct state *rp;
celt startc;
celt endc;
struct cvec *cv;
- chr *startp;
- chr *endp;
+ CONST chr *startp;
+ CONST chr *endp;
chr c[1];
/* parse something, get rid of special cases, take shortcuts */
@@ -1458,11 +1458,11 @@ struct state *rp;
* to look past the final bracket of the [. etc.
^ static chr *scanplain(struct vars *);
*/
-static chr * /* just after end of sequence */
+static CONST chr * /* just after end of sequence */
scanplain(v)
struct vars *v;
{
- chr *endp;
+ CONST chr *endp;
assert(SEE(COLLEL) || SEE(ECLASS) || SEE(CCLASS));
NEXT();
diff --git a/generic/regerror.c b/generic/regerror.c
index 182830d..6376e80 100644
--- a/generic/regerror.c
+++ b/generic/regerror.c
@@ -32,7 +32,7 @@
#include "regguts.h"
/* unknown-error explanation */
-static char unk[] = "*** unknown regex error code 0x%x ***";
+static CONST char unk[] = "*** unknown regex error code 0x%x ***";
/* struct to map among codes, code names, and explanations */
static struct rerr {
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index c5c914e..c738916 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -64,7 +64,7 @@ extern TclStubs tclStubs;
*/
typedef struct {
- char *name; /* Name of object-based command. */
+ CONST char *name; /* Name of object-based command. */
Tcl_CmdProc *proc; /* String-based procedure for command. */
Tcl_ObjCmdProc *objProc; /* Object-based procedure for command. */
CompileProc *compileProc; /* Procedure called to compile command. */
@@ -77,7 +77,7 @@ typedef struct {
* The built-in commands, and the procedures that implement them:
*/
-static CmdInfo builtInCmds[] = {
+static CONST CmdInfo builtInCmds[] = {
/*
* Commands in the generic core. Note that at least one of the proc or
* objProc members should be non-NULL. This avoids infinitely recursive
@@ -304,7 +304,7 @@ Tcl_CreateInterp()
BuiltinFunc *builtinFuncPtr;
MathFunc *mathFuncPtr;
Tcl_HashEntry *hPtr;
- CmdInfo *cmdInfoPtr;
+ CONST CmdInfo *cmdInfoPtr;
int i;
union {
char c[sizeof(short)];
@@ -664,7 +664,7 @@ int
TclHideUnsafeCommands(interp)
Tcl_Interp *interp; /* Hide commands in this interpreter. */
{
- register CmdInfo *cmdInfoPtr;
+ register CONST CmdInfo *cmdInfoPtr;
if (interp == (Tcl_Interp *) NULL) {
return TCL_ERROR;
diff --git a/generic/tclBinary.c b/generic/tclBinary.c
index 8d258b3..8eb3ac3 100644
--- a/generic/tclBinary.c
+++ b/generic/tclBinary.c
@@ -1160,7 +1160,7 @@ Tcl_BinaryObjCmd(dummy, interp, objc, objv)
char *dest;
unsigned char *src;
int i;
- static char hexdigit[] = "0123456789abcdef";
+ static CONST char hexdigit[] = "0123456789abcdef";
if (arg >= objc) {
DeleteScanNumberCache(numberCachePtr);
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index fb15062..4ada397 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -115,10 +115,10 @@ Tcl_TraceTypeObjCmd TclTraceExecutionObjCmd;
static CONST char *traceTypeOptions[] = {
"execution", "command", "variable", (char*) NULL
};
-static Tcl_TraceTypeObjCmd* traceSubCmds[] = {
+static Tcl_TraceTypeObjCmd *CONST traceSubCmds[] = {
TclTraceExecutionObjCmd,
TclTraceCommandObjCmd,
- TclTraceVariableObjCmd,
+ TclTraceVariableObjCmd
};
/*
diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c
index 68533c5..6bac221 100644
--- a/generic/tclCompExpr.c
+++ b/generic/tclCompExpr.c
@@ -101,19 +101,19 @@ static int opTableInitialized = 0; /* 0 means not yet initialized. */
TCL_DECLARE_MUTEX(opMutex)
typedef struct OperatorDesc {
- char *name; /* Name of the operator. */
+ CONST char *name; /* Name of the operator. */
int numOperands; /* Number of operands. 0 if the operator
* requires special handling. */
int instruction; /* Instruction opcode for the operator.
* Ignored if numOperands is 0. */
} OperatorDesc;
-static OperatorDesc operatorTable[] = {
+static CONST OperatorDesc operatorTable[] = {
{"*", 2, INST_MULT},
{"/", 2, INST_DIV},
{"%", 2, INST_MOD},
- {"+", 0},
- {"-", 0},
+ {"+", 0, 0},
+ {"-", 0, 0},
{"<<", 2, INST_LSHIFT},
{">>", 2, INST_RSHIFT},
{"<", 2, INST_LT},
@@ -125,14 +125,14 @@ static OperatorDesc operatorTable[] = {
{"&", 2, INST_BITAND},
{"^", 2, INST_BITXOR},
{"|", 2, INST_BITOR},
- {"&&", 0},
- {"||", 0},
- {"?", 0},
+ {"&&", 0, 0},
+ {"||", 0, 0},
+ {"?", 0, 0},
{"!", 1, INST_LNOT},
{"~", 1, INST_BITNOT},
{"eq", 2, INST_STR_EQ},
{"ne", 2, INST_STR_NEQ},
- {NULL}
+ {NULL, 0, 0}
};
/*
@@ -343,7 +343,7 @@ CompileSubExpr(exprTokenPtr, infoPtr, envPtr)
Tcl_Interp *interp = infoPtr->interp;
Tcl_Token *tokenPtr, *endPtr = NULL; /* silence gcc 4 warning */
Tcl_Token *afterSubexprPtr;
- OperatorDesc *opDescPtr;
+ CONST OperatorDesc *opDescPtr;
Tcl_HashEntry *hPtr;
CONST char *operator;
Tcl_DString opBuf;
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index e281a0a..1ec7c58 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -267,7 +267,7 @@ InstructionDesc tclInstructionTable[] = {
* stacked objs: stktop is old value, next is new element value, next
* come (operand-2) indices; pushes the new value.
*/
- {0}
+ {0, 0, 0, 0, {OPERAND_NONE}}
};
/*
diff --git a/generic/tclDate.c b/generic/tclDate.c
index 7354a6f..b64a792 100644
--- a/generic/tclDate.c
+++ b/generic/tclDate.c
@@ -189,7 +189,7 @@ static int TclDatemaxdepth = YYMAXDEPTH;
/*
* Month and day table.
*/
-static TABLE MonthDayTable[] = {
+static CONST TABLE MonthDayTable[] = {
{ "january", tMONTH, 1 },
{ "february", tMONTH, 2 },
{ "march", tMONTH, 3 },
@@ -220,7 +220,7 @@ static TABLE MonthDayTable[] = {
/*
* Time units table.
*/
-static TABLE UnitsTable[] = {
+static CONST TABLE UnitsTable[] = {
{ "year", tMONTH_UNIT, 12 },
{ "month", tMONTH_UNIT, 1 },
{ "fortnight", tDAY_UNIT, 14 },
@@ -237,7 +237,7 @@ static TABLE UnitsTable[] = {
/*
* Assorted relative-time words.
*/
-static TABLE OtherTable[] = {
+static CONST TABLE OtherTable[] = {
{ "tomorrow", tDAY_UNIT, 1 },
{ "yesterday", tDAY_UNIT, -1 },
{ "today", tDAY_UNIT, 0 },
@@ -269,7 +269,7 @@ static TABLE OtherTable[] = {
* The timezone table. (Note: This table was modified to not use any floating
* point constants to work around an SGI compiler bug).
*/
-static TABLE TimezoneTable[] = {
+static CONST TABLE TimezoneTable[] = {
{ "gmt", tZONE, HOUR( 0) }, /* Greenwich Mean */
{ "ut", tZONE, HOUR( 0) }, /* Universal (Coordinated) */
{ "utc", tZONE, HOUR( 0) },
@@ -353,7 +353,7 @@ static TABLE TimezoneTable[] = {
/*
* Military timezone table.
*/
-static TABLE MilitaryTable[] = {
+static CONST TABLE MilitaryTable[] = {
{ "a", tZONE, HOUR( 1) },
{ "b", tZONE, HOUR( 2) },
{ "c", tZONE, HOUR( 3) },
@@ -655,7 +655,7 @@ LookupWord(buff)
{
register char *p;
register char *q;
- register TABLE *tp;
+ register CONST TABLE *tp;
int i;
int abbrev;
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index a4a7027..73c4067 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -1462,7 +1462,7 @@ LoadTableEncoding(interp, name, type, chan)
* sequences in the encoding files.
*/
- static char staticHex[] = {
+ static CONST char staticHex[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0 ... 15 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 16 ... 31 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 32 ... 47 */
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 1c9d99d..3ca1b63 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -87,7 +87,7 @@ int tclTraceExec = 0;
* expression opcodes (e.g., INST_LOR) in tclCompile.h.
*/
-static char *operatorStrings[] = {
+static CONST char *CONST operatorStrings[] = {
"||", "&&", "|", "^", "&", "==", "!=", "<", ">", "<=", ">=", "<<", ">>",
"+", "-", "*", "/", "%", "+", "-", "~", "!",
"BUILTIN FUNCTION", "FUNCTION",
@@ -100,7 +100,7 @@ static char *operatorStrings[] = {
*/
#ifdef TCL_COMPILE_DEBUG
-static char *resultStrings[] = {
+static CONST char *CONST resultStrings[] = {
"TCL_OK", "TCL_ERROR", "TCL_RETURN", "TCL_BREAK", "TCL_CONTINUE"
};
#endif
@@ -397,7 +397,7 @@ static void InitByteCodeExecution _ANSI_ARGS_((
Tcl_Interp *interp));
#ifdef TCL_COMPILE_DEBUG
static void PrintByteCodeInfo _ANSI_ARGS_((ByteCode *codePtr));
-static char * StringForResultCode _ANSI_ARGS_((int result));
+static CONST char * StringForResultCode _ANSI_ARGS_((int result));
static void ValidatePcAndStackTop _ANSI_ARGS_((
ByteCode *codePtr, unsigned char *pc,
int stackTop, int stackLowerBound));
@@ -453,7 +453,7 @@ BuiltinFunc tclBuiltinFuncTable[] = {
{"round", 1, {TCL_EITHER}, ExprRoundFunc, 0},
{"srand", 1, {TCL_INT}, ExprSrandFunc, 0},
{"wide", 1, {TCL_EITHER}, ExprWideFunc, 0},
- {0},
+ {0, 0, {TCL_INT}, 0, 0},
};
/*
@@ -6564,7 +6564,7 @@ EvalStatsCmd(unused, interp, objc, objv)
*----------------------------------------------------------------------
*/
-static char *
+static CONST char *
StringForResultCode(result)
int result; /* The Tcl result code for which to
* generate a string. */
diff --git a/generic/tclFileName.c b/generic/tclFileName.c
index c70bed5..761c8be 100755
--- a/generic/tclFileName.c
+++ b/generic/tclFileName.c
@@ -2591,7 +2591,7 @@ TclDoGlob(interp, separators, headPtr, tail, types)
Tcl_ListObjLength(NULL, paths, &end);
while (repair < end) {
- const char *bytes;
+ CONST char *bytes;
int numBytes;
Tcl_Obj *fixme, *newObj;
Tcl_ListObjIndex(NULL, paths, repair, &fixme);
diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y
index 7db4a35..d210526 100644
--- a/generic/tclGetDate.y
+++ b/generic/tclGetDate.y
@@ -408,7 +408,7 @@ o_merid : /* NULL */ {
/*
* Month and day table.
*/
-static TABLE MonthDayTable[] = {
+static CONST TABLE MonthDayTable[] = {
{ "january", tMONTH, 1 },
{ "february", tMONTH, 2 },
{ "march", tMONTH, 3 },
@@ -439,7 +439,7 @@ static TABLE MonthDayTable[] = {
/*
* Time units table.
*/
-static TABLE UnitsTable[] = {
+static CONST TABLE UnitsTable[] = {
{ "year", tMONTH_UNIT, 12 },
{ "month", tMONTH_UNIT, 1 },
{ "fortnight", tDAY_UNIT, 14 },
@@ -456,7 +456,7 @@ static TABLE UnitsTable[] = {
/*
* Assorted relative-time words.
*/
-static TABLE OtherTable[] = {
+static CONST TABLE OtherTable[] = {
{ "tomorrow", tDAY_UNIT, 1 },
{ "yesterday", tDAY_UNIT, -1 },
{ "today", tDAY_UNIT, 0 },
@@ -488,7 +488,7 @@ static TABLE OtherTable[] = {
* The timezone table. (Note: This table was modified to not use any floating
* point constants to work around an SGI compiler bug).
*/
-static TABLE TimezoneTable[] = {
+static CONST TABLE TimezoneTable[] = {
{ "gmt", tZONE, HOUR( 0) }, /* Greenwich Mean */
{ "ut", tZONE, HOUR( 0) }, /* Universal (Coordinated) */
{ "utc", tZONE, HOUR( 0) },
@@ -572,7 +572,7 @@ static TABLE TimezoneTable[] = {
/*
* Military timezone table.
*/
-static TABLE MilitaryTable[] = {
+static CONST TABLE MilitaryTable[] = {
{ "a", tZONE, HOUR( 1) },
{ "b", tZONE, HOUR( 2) },
{ "c", tZONE, HOUR( 3) },
@@ -874,7 +874,7 @@ LookupWord(buff)
{
register char *p;
register char *q;
- register TABLE *tp;
+ register CONST TABLE *tp;
int i;
int abbrev;
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 15ac94f..a1d5447 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -7596,7 +7596,7 @@ Tcl_FileEventObjCmd(clientData, interp, objc, objv)
int modeIndex; /* Index of mode argument. */
int mask;
static CONST char *modeOptions[] = {"readable", "writable", NULL};
- static int maskArray[] = {TCL_READABLE, TCL_WRITABLE};
+ static CONST int maskArray[] = {TCL_READABLE, TCL_WRITABLE};
if ((objc != 3) && (objc != 4)) {
Tcl_WrongNumArgs(interp, 1, objv, "channelId event ?script?");
diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c
index 7d54156..2b3a5a8 100644
--- a/generic/tclIOCmd.c
+++ b/generic/tclIOCmd.c
@@ -421,7 +421,7 @@ Tcl_SeekObjCmd(clientData, interp, objc, objv)
static CONST char *originOptions[] = {
"start", "current", "end", (char *) NULL
};
- static int modeArray[] = {SEEK_SET, SEEK_CUR, SEEK_END};
+ static CONST int modeArray[] = {SEEK_SET, SEEK_CUR, SEEK_END};
if ((objc != 3) && (objc != 4)) {
Tcl_WrongNumArgs(interp, 1, objv, "channelId offset ?origin?");
diff --git a/generic/tclIOGT.c b/generic/tclIOGT.c
index 0cd9c67..8699b39 100644
--- a/generic/tclIOGT.c
+++ b/generic/tclIOGT.c
@@ -143,6 +143,7 @@ static Tcl_ChannelType transformChannelType = {
NULL, /* Flush proc. */
TransformNotifyProc, /* Handling of events bubbling up */
TransformWideSeekProc, /* Wide seek proc */
+ NULL
};
/*
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c
index 1dfd4ba..d50f2e3 100644
--- a/generic/tclIOUtil.c
+++ b/generic/tclIOUtil.c
@@ -469,6 +469,7 @@ static FilesystemRecord nativeFilesystemRecord = {
NULL,
&tclNativeFilesystem,
1,
+ NULL,
NULL
};
diff --git a/generic/tclParseExpr.c b/generic/tclParseExpr.c
index 9fdf8e5..e07b7e7 100644
--- a/generic/tclParseExpr.c
+++ b/generic/tclParseExpr.c
@@ -132,7 +132,7 @@ typedef struct ParseInfo {
* entries must match the order and number of the lexeme definitions above.
*/
-static char *lexemeStrings[] = {
+static CONST char *CONST lexemeStrings[] = {
"LITERAL", "FUNCNAME",
"[", "{", "(", ")", "$", "\"", ",", "END", "UNKNOWN", "UNKNOWN_CHAR",
"*", "/", "%", "+", "-",
diff --git a/generic/tclPkg.c b/generic/tclPkg.c
index 26a9cff..940d011 100644
--- a/generic/tclPkg.c
+++ b/generic/tclPkg.c
@@ -78,7 +78,7 @@ static void AddRequirementsToResult(Tcl_Interp* interp, int reqc,
static void AddRequirementsToDString(Tcl_DString* dstring,
int reqc, Tcl_Obj *CONST reqv[]);
static Package * FindPackage(Tcl_Interp *interp, CONST char *name);
-static const char * PkgRequireCore(Tcl_Interp *interp, CONST char *name,
+static CONST char * PkgRequireCore(Tcl_Interp *interp, CONST char *name,
int reqx, Tcl_Obj *CONST reqv[],
ClientData *clientDataPtr);
#endif
@@ -261,7 +261,7 @@ Tcl_PkgRequireEx(interp, name, version, exact, clientDataPtr)
Tcl_DString command;
#else
Tcl_Obj *ov;
- const char *result = NULL;
+ CONST char *result = NULL;
#endif
/*
@@ -373,7 +373,7 @@ Tcl_PkgRequireProc(
* available. */
ClientData *clientDataPtr)
{
- const char *result =
+ CONST char *result =
PkgRequireCore(interp, name, reqc, reqv, clientDataPtr);
if (result == NULL) {
@@ -383,7 +383,7 @@ Tcl_PkgRequireProc(
return TCL_OK;
}
-static const char *
+static CONST char *
PkgRequireCore(
Tcl_Interp *interp, /* Interpreter in which package is now
* available. */
@@ -1077,7 +1077,7 @@ Tcl_PackageObjCmd(dummy, interp, objc, objv)
break;
}
case PKG_PRESENT: {
- const char *name;
+ CONST char *name;
if (objc < 3) {
goto require;
}
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index 7005223..8dba3c1 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -1017,7 +1017,7 @@ Tcl_SetUnicodeObj(objPtr, unicode, numChars)
static int
UnicodeLength(
- const Tcl_UniChar *unicode)
+ CONST Tcl_UniChar *unicode)
{
int numChars = 0;
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index ce3b952..bd3dd05 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -189,7 +189,7 @@ Tcl_WinTCharToUtf(
# define TclWinGetPlatformId (int (*)()) TclpCreateTempFile
# define TclWinGetTclInstance (void *(*)()) TclpCreateProcess
# define TclWinNToHS (unsigned short (*) _ANSI_ARGS_((unsigned short ns))) TclpMakeFile
-# define TclWinSetSockOpt (int (*) _ANSI_ARGS_((void *, int, int, const char *, int))) TclpOpenFile
+# define TclWinSetSockOpt (int (*) _ANSI_ARGS_((void *, int, int, CONST char *, int))) TclpOpenFile
# define TclWinAddProcess 0
# define TclWinNoBackslash 0
# define TclWinSetInterfaces 0
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 194f110..b61213d 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -2777,7 +2777,7 @@ TestlocaleCmd(clientData, interp, objc, objv)
"ctype", "numeric", "time", "collate", "monetary",
"all", NULL
};
- static int lcTypes[] = {
+ static CONST int lcTypes[] = {
LC_CTYPE, LC_NUMERIC, LC_TIME, LC_COLLATE, LC_MONETARY,
LC_ALL
};
diff --git a/generic/tclTestProcBodyObj.c b/generic/tclTestProcBodyObj.c
index 5a17260..c85b303 100644
--- a/generic/tclTestProcBodyObj.c
+++ b/generic/tclTestProcBodyObj.c
@@ -17,14 +17,14 @@
* name and version of this package
*/
-static char packageName[] = "procbodytest";
-static char packageVersion[] = "1.0";
+static CONST char packageName[] = "procbodytest";
+static CONST char packageVersion[] = "1.0";
/*
* Name of the commands exported by this package
*/
-static char procCommand[] = "proc";
+static CONST char procCommand[] = "proc";
/*
* this struct describes an entry in the table of command names and command
@@ -33,7 +33,7 @@ static char procCommand[] = "proc";
typedef struct CmdTable
{
- char *cmdName; /* command name */
+ CONST char *cmdName; /* command name */
Tcl_ObjCmdProc *proc; /* command proc */
int exportIt; /* if 1, export the command */
} CmdTable;
@@ -47,7 +47,7 @@ static int ProcBodyTestProcObjCmd _ANSI_ARGS_((ClientData dummy,
static int ProcBodyTestInitInternal _ANSI_ARGS_((Tcl_Interp *interp,
int isSafe));
static int RegisterCommand _ANSI_ARGS_((Tcl_Interp* interp,
- char *namespace, CONST CmdTable *cmdTablePtr));
+ CONST char *namespace, CONST CmdTable *cmdTablePtr));
int Procbodytest_Init _ANSI_ARGS_((Tcl_Interp * interp));
int Procbodytest_SafeInit _ANSI_ARGS_((Tcl_Interp * interp));
@@ -137,7 +137,7 @@ Procbodytest_SafeInit(interp)
static int RegisterCommand(interp, namespace, cmdTablePtr)
Tcl_Interp* interp; /* the Tcl interpreter for which the
* operation is performed */
- char *namespace; /* the namespace in which the command
+ CONST char *namespace; /* the namespace in which the command
* is registered */
CONST CmdTable *cmdTablePtr; /* the command to register */
{