diff options
author | hobbs <hobbs> | 2002-02-02 00:20:54 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2002-02-02 00:20:54 (GMT) |
commit | 39edfdadb499a707b2291abfe45f205623f596e4 (patch) | |
tree | 80a0054cf92d3d10974f4a1ea5676eacf1bf2bbe /generic | |
parent | 35ad5765def300afc351964960076deea6ecabbd (diff) | |
download | tcl-39edfdadb499a707b2291abfe45f205623f596e4.zip tcl-39edfdadb499a707b2291abfe45f205623f596e4.tar.gz tcl-39edfdadb499a707b2291abfe45f205623f596e4.tar.bz2 |
* generic/tclCmdMZ.c (Tcl_RegexpObjCmd): handle quirky about case
earlier to avoid shimmering problem.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclCmdMZ.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index e0cacab..425ef3a 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.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: tclCmdMZ.c,v 1.56 2002/01/21 16:15:03 dgp Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.57 2002/02/02 00:20:54 hobbs Exp $ */ #include "tclInt.h" @@ -250,6 +250,17 @@ Tcl_RegexpObjCmd(dummy, interp, objc, objv) } /* + * Handle the odd about case separately. + */ + if (about) { + regExpr = Tcl_GetRegExpFromObj(interp, objv[0], cflags); + if ((regExpr == NULL) || (TclRegAbout(interp, regExpr) < 0)) { + return TCL_ERROR; + } + return TCL_OK; + } + + /* * Get the length of the string that we are matching against so * we can do the termination test for -all matches. Do this before * getting the regexp to avoid shimmering problems. @@ -262,13 +273,6 @@ Tcl_RegexpObjCmd(dummy, interp, objc, objv) return TCL_ERROR; } - if (about) { - if (TclRegAbout(interp, regExpr) < 0) { - return TCL_ERROR; - } - return TCL_OK; - } - if (offset > 0) { /* * Add flag if using offset (string is part of a larger string), |