diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclDate.c | 12 | ||||
-rw-r--r-- | generic/tclExecute.c | 4 | ||||
-rw-r--r-- | generic/tclGetDate.y | 12 | ||||
-rw-r--r-- | generic/tclIO.c | 2 | ||||
-rw-r--r-- | generic/tclIOCmd.c | 2 | ||||
-rw-r--r-- | generic/tclIOGT.c | 2 | ||||
-rw-r--r-- | generic/tclPort.h | 1 | ||||
-rw-r--r-- | generic/tclTest.c | 2 | ||||
-rw-r--r-- | generic/tclTestProcBodyObj.c | 14 | ||||
-rw-r--r-- | generic/tclTrace.c | 4 |
10 files changed, 27 insertions, 28 deletions
diff --git a/generic/tclDate.c b/generic/tclDate.c index b77c7fd..59da2ea 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -2299,7 +2299,7 @@ MODULE_SCOPE int yynerrs; * Month and day table. */ -static TABLE MonthDayTable[] = { +static const TABLE MonthDayTable[] = { { "january", tMONTH, 1 }, { "february", tMONTH, 2 }, { "march", tMONTH, 3 }, @@ -2331,7 +2331,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 }, @@ -2349,7 +2349,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 }, @@ -2382,7 +2382,7 @@ static TABLE OtherTable[] = { * 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) }, @@ -2467,7 +2467,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) }, @@ -2560,7 +2560,7 @@ LookupWord( { register char *p; register char *q; - register TABLE *tp; + register const TABLE *tp; int i, abbrev; /* diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 8d97392..f2efa0f 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -116,7 +116,7 @@ long tclObjsShared[TCL_MAX_SHARED_OBJ_STATS] = { 0, 0, 0, 0, 0 }; */ typedef struct { - char *name; /* Name of function. */ + const char *name; /* Name of function. */ int numArgs; /* Number of arguments for function. */ } BuiltinFunc; @@ -126,7 +126,7 @@ typedef struct { * operand byte. */ -static BuiltinFunc tclBuiltinFuncTable[] = { +static const BuiltinFunc tclBuiltinFuncTable[] = { {"acos", 1}, {"asin", 1}, {"atan", 1}, diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y index e22e40c..551b1ed 100644 --- a/generic/tclGetDate.y +++ b/generic/tclGetDate.y @@ -510,7 +510,7 @@ MODULE_SCOPE int yynerrs; * Month and day table. */ -static TABLE MonthDayTable[] = { +static const TABLE MonthDayTable[] = { { "january", tMONTH, 1 }, { "february", tMONTH, 2 }, { "march", tMONTH, 3 }, @@ -542,7 +542,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 }, @@ -560,7 +560,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 }, @@ -593,7 +593,7 @@ static TABLE OtherTable[] = { * 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) }, @@ -678,7 +678,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) }, @@ -771,7 +771,7 @@ LookupWord( { register char *p; register char *q; - register TABLE *tp; + register const TABLE *tp; int i, abbrev; /* diff --git a/generic/tclIO.c b/generic/tclIO.c index 0f01baa..b9fa18d 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -8401,7 +8401,7 @@ Tcl_FileEventObjCmd( 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 0c05cbf..21dcd71 100644 --- a/generic/tclIOCmd.c +++ b/generic/tclIOCmd.c @@ -518,7 +518,7 @@ Tcl_SeekObjCmd( static const char *originOptions[] = { "start", "current", "end", 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 5dae459..eed21fb 100644 --- a/generic/tclIOGT.c +++ b/generic/tclIOGT.c @@ -133,7 +133,7 @@ static Tcl_ChannelType transformChannelType = { TransformNotifyProc, /* Handling of events bubbling up. */ TransformWideSeekProc, /* Wide seek proc. */ NULL, /* Thread action. */ - NULL, /* Truncate. */ + NULL /* Truncate. */ }; /* diff --git a/generic/tclPort.h b/generic/tclPort.h index 79bea88..7c9bf3c 100644 --- a/generic/tclPort.h +++ b/generic/tclPort.h @@ -35,7 +35,6 @@ DLLIMPORT extern int cygwin_conv_to_win32_path(const char *, char *); DLLIMPORT extern int cygwin_posix_to_win32_path_list_buf_size(char *value); DLLIMPORT extern void cygwin_posix_to_win32_path_list(char *buf, char *value); - DLLIMPORT extern void __stdcall SetEnvironmentVariableA(const char*, const char *); #endif #if !defined(LLONG_MIN) diff --git a/generic/tclTest.c b/generic/tclTest.c index c08f281..57c17e3 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -3259,7 +3259,7 @@ TestlocaleCmd( "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 88bd1c3..644179b 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; @@ -46,7 +46,7 @@ static int ProcBodyTestProcObjCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]); static int ProcBodyTestInitInternal(Tcl_Interp *interp, int isSafe); static int RegisterCommand(Tcl_Interp* interp, - char *namespace, CONST CmdTable *cmdTablePtr); + const char *namespace, const CmdTable *cmdTablePtr); int Procbodytest_Init(Tcl_Interp * interp); int Procbodytest_SafeInit(Tcl_Interp * interp); @@ -132,9 +132,9 @@ Procbodytest_SafeInit( 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 is + const char *namespace; /* the namespace in which the command is * registered */ - CONST CmdTable *cmdTablePtr;/* the command to register */ + const CmdTable *cmdTablePtr;/* the command to register */ { char buf[128]; diff --git a/generic/tclTrace.c b/generic/tclTrace.c index 3ea182f..fa29160 100644 --- a/generic/tclTrace.c +++ b/generic/tclTrace.c @@ -110,10 +110,10 @@ static Tcl_TraceTypeObjCmd TraceExecutionObjCmd; static const char *traceTypeOptions[] = { "execution", "command", "variable", NULL }; -static Tcl_TraceTypeObjCmd *traceSubCmds[] = { +static Tcl_TraceTypeObjCmd *const traceSubCmds[] = { TraceExecutionObjCmd, TraceCommandObjCmd, - TraceVariableObjCmd, + TraceVariableObjCmd }; /* |