summaryrefslogtreecommitdiffstats
path: root/generic/tclParse.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclParse.c')
-rw-r--r--generic/tclParse.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/generic/tclParse.c b/generic/tclParse.c
index e88de0b..9c17e0c 100644
--- a/generic/tclParse.c
+++ b/generic/tclParse.c
@@ -205,8 +205,7 @@ Tcl_ParseCommand(
* close bracket should be considered a
* command terminator. If zero, then close
* bracket has no special meaning. */
- Tcl_Parse *parsePtr)
- /* Structure to fill in with information about
+ Tcl_Parse *parsePtr) /* Structure to fill in with information about
* the parsed command; any previous
* information in the structure is ignored. */
{
@@ -531,7 +530,7 @@ Tcl_ParseCommand(
/* Parse the whitespace between words. */
- scanned = ParseWhiteSpace(src,numBytes, &parsePtr->incomplete, &type);
+ scanned = ParseWhiteSpace(src, numBytes, &parsePtr->incomplete, &type);
src += scanned;
numBytes -= scanned;
}
@@ -1039,7 +1038,7 @@ ParseComment(
static int
ParseTokens(
- const char *src, /* First character to parse. */
+ const char *src, /* First character to parse. */
Tcl_Size numBytes, /* Max number of bytes to scan. */
int mask, /* Specifies when to stop parsing. The parse
* stops at the first unquoted character whose
@@ -1390,15 +1389,20 @@ Tcl_ParseVarName(
tokenPtr->numComponents = 0;
ch = *src;
- while (numBytes && (braceCount>0 || ch != '}')) {
+ while (numBytes && (braceCount > 0 || ch != '}')) {
switch (ch) {
- case '{': braceCount++; break;
- case '}': braceCount--; break;
+ case '{':
+ braceCount++;
+ break;
+ case '}':
+ braceCount--;
+ break;
case '\\':
/* if 2 or more left, consume 2, else consume
* just the \ and let it run into the end */
if (numBytes > 1) {
- src++; numBytes--;
+ src++;
+ numBytes--;
}
}
numBytes--;
@@ -1411,7 +1415,7 @@ Tcl_ParseVarName(
"missing close-brace for variable name", -1));
}
parsePtr->errorType = TCL_PARSE_MISSING_VAR_BRACE;
- parsePtr->term = tokenPtr->start-1;
+ parsePtr->term = tokenPtr->start - 1;
parsePtr->incomplete = 1;
goto error;
}
@@ -1531,7 +1535,7 @@ Tcl_ParseVarName(
const char *
Tcl_ParseVar(
Tcl_Interp *interp, /* Context for looking up variable. */
- const char *start, /* Start of variable substitution. First
+ const char *start, /* Start of variable substitution. First
* character must be "$". */
const char **termPtr) /* If non-NULL, points to word to fill in with
* character just after last one in the
@@ -1619,8 +1623,7 @@ Tcl_ParseBraces(
Tcl_Size numBytes, /* Total number of bytes in string. If -1,
* the string consists of all bytes up to the
* first null character. */
- Tcl_Parse *parsePtr,
- /* Structure to fill in with information about
+ Tcl_Parse *parsePtr, /* Structure to fill in with information about
* the string. */
int append, /* Non-zero means append tokens to existing
* information in parsePtr; zero means ignore
@@ -1820,8 +1823,7 @@ Tcl_ParseQuotedString(
Tcl_Size numBytes, /* Total number of bytes in string. If -1,
* the string consists of all bytes up to the
* first null character. */
- Tcl_Parse *parsePtr,
- /* Structure to fill in with information about
+ Tcl_Parse *parsePtr, /* Structure to fill in with information about
* the string. */
int append, /* Non-zero means append tokens to existing
* information in parsePtr; zero means ignore