From 39edfdadb499a707b2291abfe45f205623f596e4 Mon Sep 17 00:00:00 2001 From: hobbs Date: Sat, 2 Feb 2002 00:20:54 +0000 Subject: * generic/tclCmdMZ.c (Tcl_RegexpObjCmd): handle quirky about case earlier to avoid shimmering problem. --- ChangeLog | 5 +++++ generic/tclCmdMZ.c | 20 ++++++++++++-------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 13ac271..c333457 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-02-01 Jeff Hobbs + + * generic/tclCmdMZ.c (Tcl_RegexpObjCmd): handle quirky about case + earlier to avoid shimmering problem. + 2002-02-01 Andreas Kupries * tests/io.test: io-39.22 split into two tests, one platform 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), -- cgit v0.12