diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2014-09-09 19:49:08 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2014-09-09 19:49:08 (GMT) |
commit | e19c2ce585d7fe309059bb96044b08dbfa850a6b (patch) | |
tree | 0e1dfc6cdd11a98cd4dcc4114975380736e527fd /generic/tclUtil.c | |
parent | 04d10eb983cb26686f38383404b6b6ef9876f9e1 (diff) | |
download | tcl-e19c2ce585d7fe309059bb96044b08dbfa850a6b.zip tcl-e19c2ce585d7fe309059bb96044b08dbfa850a6b.tar.gz tcl-e19c2ce585d7fe309059bb96044b08dbfa850a6b.tar.bz2 |
[84af1192f5]: [regsub] compiler no longer confused by quantification handling.
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r-- | generic/tclUtil.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c index ae3adae..64589a2 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -4249,7 +4249,8 @@ TclReToGlob( const char *reStr, int reStrLen, Tcl_DString *dsPtr, - int *exactPtr) + int *exactPtr, + int *quantifiersFoundPtr) { int anchorLeft, anchorRight, lastIsStar, numStars; char *dsStr, *dsStrStart; @@ -4257,6 +4258,9 @@ TclReToGlob( strEnd = reStr + reStrLen; Tcl_DStringInit(dsPtr); + if (quantifiersFoundPtr != NULL) { + *quantifiersFoundPtr = 0; + } /* * "***=xxx" == "*xxx*", watch for glob-sensitive chars. @@ -4369,6 +4373,9 @@ TclReToGlob( } break; case '.': + if (quantifiersFoundPtr != NULL) { + *quantifiersFoundPtr = 1; + } anchorLeft = 0; /* prevent exact match */ if (p+1 < strEnd) { if (p[1] == '*') { |