summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-01-01 03:45:24 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-01-01 03:45:24 +0000
commit8bb8fffa0cd55f5ec6c1b52236f8c5baff79c3c6 (patch)
tree68f652b9cac1b9f0ed67059df0c90718f5949ca9 /utf8.c
parentffce6cc29631cbe46068af7601780981e4969f2a (diff)
downloadperl-8bb8fffa0cd55f5ec6c1b52236f8c5baff79c3c6.tar.gz
Rename the variables to be a bit more consistent.
p4raw-id: //depot/perl@13993
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/utf8.c b/utf8.c
index 0051796840..296cb6a475 100644
--- a/utf8.c
+++ b/utf8.c
@@ -1666,46 +1666,46 @@ http://www.unicode.org/unicode/reports/tr21/ (Case Mappings).
I32
Perl_ibcmp_utf8(pTHX_ const char *s1, bool u1, register I32 len1, const char *s2, bool u2, register I32 len2)
{
- register U8 *a = (U8*)s1;
- register U8 *b = (U8*)s2;
- register U8 *ae = a + len1;
- register U8 *be = b + len2;
- STRLEN la, lb;
- UV ca, cb;
+ register U8 *p1 = (U8*)s1;
+ register U8 *p2 = (U8*)s2;
+ register U8 *e1 = p1 + len1;
+ register U8 *e2 = p2 + len2;
+ STRLEN l1, l2;
+ UV c1, c2;
STRLEN foldlen1, foldlen2;
U8 foldbuf1[UTF8_MAXLEN_FOLD+1];
U8 foldbuf2[UTF8_MAXLEN_FOLD+1];
- while (a < ae && b < be) {
+ while (p1 < e1 && p2 < e2) {
if (u1) {
- if (a + UTF8SKIP(a) > ae)
+ if (p1 + UTF8SKIP(p1) > e1)
break;
- ca = utf8_to_uvchr((U8*)a, &la);
+ c1 = utf8_to_uvchr((U8*)p1, &l1);
} else {
- ca = NATIVE_TO_UNI(*a);
- la = 1;
+ c1 = NATIVE_TO_UNI(*p1);
+ l1 = 1;
}
if (u2) {
- if (b + UTF8SKIP(b) > be)
+ if (p2 + UTF8SKIP(p2) > e2)
break;
- cb = utf8_to_uvchr((U8*)b, &lb);
+ c2 = utf8_to_uvchr((U8*)p2, &l2);
} else {
- cb = NATIVE_TO_UNI(*b);
- lb = 1;
+ c2 = NATIVE_TO_UNI(*p2);
+ l2 = 1;
}
- if (ca != cb) {
- to_uni_fold(ca, foldbuf1, &foldlen1);
- ca = utf8_to_uvchr(foldbuf1, 0);
+ if (c1 != c2) {
+ to_uni_fold(c1, foldbuf1, &foldlen1);
+ c1 = utf8_to_uvchr(foldbuf1, 0);
- to_uni_fold(cb, foldbuf2, &foldlen2);
- cb = utf8_to_uvchr(foldbuf2, 0);
+ to_uni_fold(c2, foldbuf2, &foldlen2);
+ c2 = utf8_to_uvchr(foldbuf2, 0);
- if (ca != cb || foldlen1 != foldlen2)
+ if (c1 != c2 || foldlen1 != foldlen2)
return 1; /* mismatch */
}
- a += la;
- b += lb;
+ p1 += l1;
+ p2 += l2;
}
- return a == ae && b == be ? 0 : 1; /* 0 match, 1 mismatch */
+ return p1 == e1 && p2 == e2 ? 0 : 1; /* 0 match, 1 mismatch */
}