summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-10-04 13:56:37 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-10-04 13:56:37 (GMT)
commitf740197ce220d1842b0a408a30031c150b54db0c (patch)
tree85adf71928ce31288bb2fed800ac1caa4010064b /generic
parentb33be65e4a3a29aae1ef59d24db32aff7dcb84ab (diff)
downloadtcl-f740197ce220d1842b0a408a30031c150b54db0c.zip
tcl-f740197ce220d1842b0a408a30031c150b54db0c.tar.gz
tcl-f740197ce220d1842b0a408a30031c150b54db0c.tar.bz2
Stop words starting with 'eq' or 'ne' from being subdivided by the expression
parser. [Bug 884830]
Diffstat (limited to 'generic')
-rw-r--r--generic/tclParseExpr.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/generic/tclParseExpr.c b/generic/tclParseExpr.c
index 2a8abec..266466c 100644
--- a/generic/tclParseExpr.c
+++ b/generic/tclParseExpr.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclParseExpr.c,v 1.21 2004/04/06 22:25:54 dgp Exp $
+ * RCS: @(#) $Id: tclParseExpr.c,v 1.22 2004/10/04 13:56:37 dkf Exp $
*/
#include "tclInt.h"
@@ -1856,7 +1856,8 @@ GetLexeme(infoPtr)
return TCL_OK;
case 'e':
- if ((src[1] == 'q') && ((infoPtr->lastChar - src) > 1)) {
+ if ((src[1] == 'q') && ((infoPtr->lastChar - src) > 1) &&
+ (infoPtr->lastChar-src==2 || !isalpha(UCHAR(src[2])))) {
infoPtr->lexeme = STREQ;
infoPtr->size = 2;
infoPtr->next = src+2;
@@ -1867,7 +1868,8 @@ GetLexeme(infoPtr)
}
case 'n':
- if ((src[1] == 'e') && ((infoPtr->lastChar - src) > 1)) {
+ if ((src[1] == 'e') && ((infoPtr->lastChar - src) > 1) &&
+ (infoPtr->lastChar-src==2 || !isalpha(UCHAR(src[2])))) {
infoPtr->lexeme = STRNEQ;
infoPtr->size = 2;
infoPtr->next = src+2;