diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-06-09 20:25:18 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-06-09 20:25:18 (GMT) |
| commit | 3c3ebea4105cc63a1cc3bf80c6796f0f662f0ec3 (patch) | |
| tree | f461e773e0aa5f52b5b51a36b165225cd7e65ad4 /generic/tclParse.c | |
| parent | d307130311321b2d327d13669905d9873b5863d3 (diff) | |
| parent | 8c311313a11ad2b7caa8a3626b03fb16da985df6 (diff) | |
| download | tcl-3c3ebea4105cc63a1cc3bf80c6796f0f662f0ec3.zip tcl-3c3ebea4105cc63a1cc3bf80c6796f0f662f0ec3.tar.gz tcl-3c3ebea4105cc63a1cc3bf80c6796f0f662f0ec3.tar.bz2 | |
Merge 9.0
Diffstat (limited to 'generic/tclParse.c')
| -rw-r--r-- | generic/tclParse.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/generic/tclParse.c b/generic/tclParse.c index fdd1478..3eeea9b 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -344,7 +344,7 @@ Tcl_ParseCommand( expPtr = &parsePtr->tokenPtr[expIdx]; if ((0 == expandWord) /* Haven't seen prefix already */ - && (1 == parsePtr->numTokens - expIdx) + && (expIdx + 1 == (int)parsePtr->numTokens) /* Only one token */ && (((1 == expPtr->size) /* Same length as prefix */ @@ -379,7 +379,7 @@ Tcl_ParseCommand( tokenPtr = &parsePtr->tokenPtr[wordIndex]; tokenPtr->size = src - tokenPtr->start; - tokenPtr->numComponents = parsePtr->numTokens - (wordIndex + 1); + tokenPtr->numComponents = (int)parsePtr->numTokens - (wordIndex + 1); if (expandWord) { size_t i; int isLiteral = 1; @@ -471,7 +471,7 @@ Tcl_ParseCommand( const char *listStart; int growthNeeded = wordIndex + 2*elemCount - - parsePtr->numTokens; + - (int)parsePtr->numTokens; parsePtr->numWords += elemCount - 1; if (growthNeeded > 0) { @@ -1231,7 +1231,7 @@ ParseTokens( */ if (mask & TYPE_SPACE) { - if (parsePtr->numTokens == originalTokens) { + if ((int)parsePtr->numTokens == originalTokens) { goto finishToken; } break; @@ -1252,7 +1252,7 @@ ParseTokens( Tcl_Panic("ParseTokens encountered unknown character"); } } - if (parsePtr->numTokens == originalTokens) { + if ((int)parsePtr->numTokens == originalTokens) { /* * There was nothing in this range of text. Add an empty token for the * empty range, so that there is always at least one token added. @@ -1680,7 +1680,7 @@ Tcl_ParseBraces( */ if ((src != tokenPtr->start) - || (parsePtr->numTokens == startIndex)) { + || ((int)parsePtr->numTokens == startIndex)) { tokenPtr->size = (src - tokenPtr->start); parsePtr->numTokens++; } @@ -2093,12 +2093,12 @@ TclSubstTokens( * errors. */ Tcl_Token *tokenPtr, /* Pointer to first in an array of tokens to * evaluate and concatenate. */ - int count, /* Number of tokens to consider at tokenPtr. + size_t count, /* Number of tokens to consider at tokenPtr. * Must be at least 1. */ int *tokensLeftPtr, /* If not NULL, points to memory where an * integer representing the number of tokens * left to be substituted will be written */ - int line, /* The line the script starts on. */ + size_t line, /* The line the script starts on. */ int *clNextOuter, /* Information about an outer context for */ const char *outerScript) /* continuation line data. This is set by * EvalEx() to properly handle [...]-nested @@ -2120,7 +2120,8 @@ TclSubstTokens( Tcl_Obj *result; int code = TCL_OK; #define NUM_STATIC_POS 20 - int isLiteral, maxNumCL, numCL, i, adjust; + int isLiteral; + size_t i, maxNumCL, numCL, adjust; int *clPosition = NULL; Interp *iPtr = (Interp *) interp; int inFile = iPtr->evalFlags & TCL_EVAL_FILE; @@ -2225,7 +2226,7 @@ TclSubstTokens( * Test cases: info-30.{6,8,9} */ - int theline; + size_t theline; TclAdvanceContinuations(&line, &clNextOuter, tokenPtr->start - outerScript); @@ -2450,7 +2451,7 @@ int Tcl_CommandComplete( const char *script) /* Script to check. */ { - return CommandComplete(script, (int) strlen(script)); + return CommandComplete(script, strlen(script)); } /* |
