summaryrefslogtreecommitdiffstats
path: root/generic/tclCompCmds.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2002-01-25 20:40:54 (GMT)
committerdgp <dgp@users.sourceforge.net>2002-01-25 20:40:54 (GMT)
commit7bb89f954aeb2e32b07d01513217ab6930f80ccf (patch)
tree90cd60706107518bc582921a1eb262224b8dac22 /generic/tclCompCmds.c
parente987f887ebf5997e0c4461c254ec85e39a7b0b46 (diff)
downloadtcl-7bb89f954aeb2e32b07d01513217ab6930f80ccf.zip
tcl-7bb89f954aeb2e32b07d01513217ab6930f80ccf.tar.gz
tcl-7bb89f954aeb2e32b07d01513217ab6930f80ccf.tar.bz2
* Updated interfaces of generic/tclEncoding, generic/tclFilename.c,
generic/tclIOUtil.c, generic/tclPipe.c, generic/tclResult.c, generic/tclUtil.c, generic/tclVar.c and mac/tclMacResource.c according to TIP 27. Tcl_TranslateFileName rewritten as wrapper around VFS-aware version. Updated callers. ***POTENTIAL INCOMPATIBILITY*** Includes source incompatibilities: argv arguments of Tcl_Concat, Tcl_JoinPath, Tcl_OpenCommandChannel, Tcl_Merge; argvPtr arguments of Tcl_SplitList and Tcl_SplitPath.
Diffstat (limited to 'generic/tclCompCmds.c')
-rw-r--r--generic/tclCompCmds.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 58bd4e0..536ad2d 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCompCmds.c,v 1.20 2002/01/17 04:37:33 dgp Exp $
+ * RCS: @(#) $Id: tclCompCmds.c,v 1.21 2002/01/25 20:40:55 dgp Exp $
*/
#include "tclInt.h"
@@ -754,9 +754,9 @@ TclCompileForeachCmd(interp, parsePtr, envPtr)
#define STATIC_VAR_LIST_SIZE 5
int varcListStaticSpace[STATIC_VAR_LIST_SIZE];
- char **varvListStaticSpace[STATIC_VAR_LIST_SIZE];
+ CONST char **varvListStaticSpace[STATIC_VAR_LIST_SIZE];
int *varcList = varcListStaticSpace;
- char ***varvList = varvListStaticSpace;
+ CONST char ***varvList = varvListStaticSpace;
/*
* If the foreach command isn't in a procedure, don't compile it inline:
@@ -795,11 +795,11 @@ TclCompileForeachCmd(interp, parsePtr, envPtr)
numLists = (numWords - 2)/2;
if (numLists > STATIC_VAR_LIST_SIZE) {
varcList = (int *) ckalloc(numLists * sizeof(int));
- varvList = (char ***) ckalloc(numLists * sizeof(char **));
+ varvList = (CONST char ***) ckalloc(numLists * sizeof(char **));
}
for (loopIndex = 0; loopIndex < numLists; loopIndex++) {
varcList[loopIndex] = 0;
- varvList[loopIndex] = (char **) NULL;
+ varvList[loopIndex] = NULL;
}
/*
@@ -845,7 +845,7 @@ TclCompileForeachCmd(interp, parsePtr, envPtr)
numVars = varcList[loopIndex];
for (j = 0; j < numVars; j++) {
- char *varName = varvList[loopIndex][j];
+ CONST char *varName = varvList[loopIndex][j];
if (!TclIsLocalScalar(varName, (int) strlen(varName))) {
code = TCL_OUT_LINE_COMPILE;
goto done;
@@ -893,7 +893,7 @@ TclCompileForeachCmd(interp, parsePtr, envPtr)
sizeof(ForeachVarList) + (numVars * sizeof(int)));
varListPtr->numVars = numVars;
for (j = 0; j < numVars; j++) {
- char *varName = varvList[loopIndex][j];
+ CONST char *varName = varvList[loopIndex][j];
int nameChars = strlen(varName);
varListPtr->varIndexes[j] = TclFindCompiledLocal(varName,
nameChars, /*create*/ 1, /*flags*/ VAR_SCALAR, procPtr);
@@ -1029,7 +1029,7 @@ TclCompileForeachCmd(interp, parsePtr, envPtr)
done:
for (loopIndex = 0; loopIndex < numLists; loopIndex++) {
- if (varvList[loopIndex] != (char **) NULL) {
+ if (varvList[loopIndex] != NULL) {
ckfree((char *) varvList[loopIndex]);
}
}