summaryrefslogtreecommitdiff
path: root/lib/rpmvercmp.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-03-18 09:10:13 +0200
committerPanu Matilainen <pmatilai@redhat.com>2008-03-18 09:10:13 +0200
commitc908277be21c27a0894404821605134958521fd6 (patch)
treecf247a2a6753c527a7985aeeeb4b0dee3b4626b8 /lib/rpmvercmp.c
parent9df54a8622b6640e54288835e62c6c0d0b23c748 (diff)
downloadrpm-c908277be21c27a0894404821605134958521fd6.tar.gz
Minimal namespacing for locale-insensitive x*() string functions
Diffstat (limited to 'lib/rpmvercmp.c')
-rw-r--r--lib/rpmvercmp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/rpmvercmp.c b/lib/rpmvercmp.c
index ba5c4720d..d3190c1b1 100644
--- a/lib/rpmvercmp.c
+++ b/lib/rpmvercmp.c
@@ -35,8 +35,8 @@ int rpmvercmp(const char * a, const char * b)
/* loop through each version segment of str1 and str2 and compare them */
while (*one && *two) {
- while (*one && !xisalnum(*one)) one++;
- while (*two && !xisalnum(*two)) two++;
+ while (*one && !risalnum(*one)) one++;
+ while (*two && !risalnum(*two)) two++;
/* If we ran to the end of either, we are finished with the loop */
if (!(*one && *two)) break;
@@ -47,13 +47,13 @@ int rpmvercmp(const char * a, const char * b)
/* grab first completely alpha or completely numeric segment */
/* leave one and two pointing to the start of the alpha or numeric */
/* segment and walk str1 and str2 to end of segment */
- if (xisdigit(*str1)) {
- while (*str1 && xisdigit(*str1)) str1++;
- while (*str2 && xisdigit(*str2)) str2++;
+ if (risdigit(*str1)) {
+ while (*str1 && risdigit(*str1)) str1++;
+ while (*str2 && risdigit(*str2)) str2++;
isnum = 1;
} else {
- while (*str1 && xisalpha(*str1)) str1++;
- while (*str2 && xisalpha(*str2)) str2++;
+ while (*str1 && risalpha(*str1)) str1++;
+ while (*str2 && risalpha(*str2)) str2++;
isnum = 0;
}