diff options
author | hobbs <hobbs> | 1999-07-30 22:19:10 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 1999-07-30 22:19:10 (GMT) |
commit | 77a242e5abd03ab238d92c84e7093a78b87e25c8 (patch) | |
tree | ef5d0dba9c60829a6b26adf180ec8505877e79db | |
parent | 901e9cf34bd3ae9044d9934d2d433263a6795eff (diff) | |
download | tcl-77a242e5abd03ab238d92c84e7093a78b87e25c8.zip tcl-77a242e5abd03ab238d92c84e7093a78b87e25c8.tar.gz tcl-77a242e5abd03ab238d92c84e7093a78b87e25c8.tar.bz2 |
* tclParse.c: fixed bug in info complete regarding nested square
brackets [Bug: 2382, 2466]
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | generic/tclParse.c | 7 |
2 files changed, 10 insertions, 2 deletions
@@ -1865,3 +1865,8 @@ * tclWin32Dll.c: removed TclpFinalize, cleanup of merges + * tclIO.c: added fix for Kupries' trf patch [Bug: 2386] + + * tclParse.c: fixed bug in info complete regarding nested square + brackets [Bug: 2382, 2466] + diff --git a/generic/tclParse.c b/generic/tclParse.c index df5412f..cef7d66 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclParse.c,v 1.10 1999/07/23 23:40:29 redman Exp $ + * RCS: @(#) $Id: tclParse.c,v 1.11 1999/07/30 22:19:20 hobbs Exp $ */ #include "tclInt.h" @@ -260,6 +260,7 @@ Tcl_ParseCommand(interp, string, numBytes, nested, parsePtr) parsePtr->tokensAvailable = NUM_STATIC_TOKENS; parsePtr->string = string; parsePtr->end = string + numBytes; + parsePtr->term = parsePtr->end; parsePtr->interp = interp; parsePtr->incomplete = 0; parsePtr->errorType = TCL_PARSE_SUCCESS; @@ -372,6 +373,7 @@ Tcl_ParseCommand(interp, string, numBytes, nested, parsePtr) break; } if ((type & terminators) != 0) { + parsePtr->term = src; src++; break; } @@ -455,6 +457,7 @@ Tcl_ParseCommand(interp, string, numBytes, nested, parsePtr) } if ((type & terminators) != 0) { + parsePtr->term = src; src++; break; } @@ -607,7 +610,7 @@ ParseTokens(src, mask, parsePtr) if (nested.tokenPtr != nested.staticTokens) { ckfree((char *) nested.tokenPtr); } - if ((src[-1] == ']') && !nested.incomplete) { + if ((*nested.term == ']') && !nested.incomplete) { break; } if (src == parsePtr->end) { |