From 77a242e5abd03ab238d92c84e7093a78b87e25c8 Mon Sep 17 00:00:00 2001 From: hobbs Date: Fri, 30 Jul 1999 22:19:10 +0000 Subject: * tclParse.c: fixed bug in info complete regarding nested square brackets [Bug: 2382, 2466] --- ChangeLog | 5 +++++ generic/tclParse.c | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9c20f15..3920764 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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) { -- cgit v0.12