summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-02-07 00:48:03 (GMT)
committerhobbs <hobbs>2002-02-07 00:48:03 (GMT)
commitccfaabaed7a36ea3bbe3ade59270e4319a969c41 (patch)
treee937865a53e7506b39552bf7962bf9e4ecf90787 /generic
parent98d48e2c815040cf44ab25dfb051af32abd92894 (diff)
downloadtcl-ccfaabaed7a36ea3bbe3ade59270e4319a969c41.zip
tcl-ccfaabaed7a36ea3bbe3ade59270e4319a969c41.tar.gz
tcl-ccfaabaed7a36ea3bbe3ade59270e4319a969c41.tar.bz2
generic/regc_locale.c (casecmp): slight performance improvement
Diffstat (limited to 'generic')
-rw-r--r--generic/regc_locale.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/generic/regc_locale.c b/generic/regc_locale.c
index 06f553f..bc5ef3d 100644
--- a/generic/regc_locale.c
+++ b/generic/regc_locale.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: regc_locale.c,v 1.7 2002/01/17 03:03:10 dgp Exp $
+ * RCS: @(#) $Id: regc_locale.c,v 1.8 2002/02/07 00:48:03 hobbs Exp $
*/
/* ASCII character-name table */
@@ -965,12 +965,8 @@ CONST chr *x;
CONST chr *y;
size_t len; /* exact length of comparison */
{
- size_t i;
- CONST chr *xp;
- CONST chr *yp;
-
- for (xp = x, yp = y, i = len; i > 0; i--)
- if (Tcl_UniCharToLower(*xp++) != Tcl_UniCharToLower(*yp++))
- return 1;
- return 0;
+ for ( ; len > 0; len--, x++, y++)
+ if ((*x != *y) && (Tcl_UniCharToLower(*x) != Tcl_UniCharToLower(*y)))
+ return 1;
+ return 0;
}