diff options
author | hobbs <hobbs@noemail.net> | 2002-02-07 00:48:03 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 2002-02-07 00:48:03 (GMT) |
commit | 642072ad787766e9c7b0b20f3cb34fdc5539344e (patch) | |
tree | e937865a53e7506b39552bf7962bf9e4ecf90787 /generic/regc_locale.c | |
parent | 9b09801223655353205ea46c960e022a8e5bd433 (diff) | |
download | tcl-642072ad787766e9c7b0b20f3cb34fdc5539344e.zip tcl-642072ad787766e9c7b0b20f3cb34fdc5539344e.tar.gz tcl-642072ad787766e9c7b0b20f3cb34fdc5539344e.tar.bz2 |
generic/regc_locale.c (casecmp): slight performance improvement
FossilOrigin-Name: 4fa5ad1498f12f7c95b27dd9d726243ed92c0beb
Diffstat (limited to 'generic/regc_locale.c')
-rw-r--r-- | generic/regc_locale.c | 14 |
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; } |