summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Levin <al.le@rockbox.org>2009-03-02 21:35:05 +0000
committerAlexander Levin <al.le@rockbox.org>2009-03-02 21:35:05 +0000
commit22b925495a130325538812807f7b75d40f9ee5f5 (patch)
tree51e062af8658269a1b2c0ce45b16f9090e58b665
parent831e39065799b4ca6aae60d3fbee4cb946c4b8bf (diff)
downloadrockbox-22b925495a130325538812807f7b75d40f9ee5f5.zip
rockbox-22b925495a130325538812807f7b75d40f9ee5f5.tar.gz
rockbox-22b925495a130325538812807f7b75d40f9ee5f5.tar.bz2
rockbox-22b925495a130325538812807f7b75d40f9ee5f5.tar.xz
Make natural sorting work properly with cyrillic chars: they should be placed after the latin ones (FS#9975).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20180 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/common/strnatcmp.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/firmware/common/strnatcmp.c b/firmware/common/strnatcmp.c
index 2ec920b..d7b7d1d 100644
--- a/firmware/common/strnatcmp.c
+++ b/firmware/common/strnatcmp.c
@@ -45,23 +45,23 @@
/* These are defined as macros to make it easier to adapt this code to
* different characters types or comparison functions. */
static inline int
-nat_isdigit(char a)
+nat_isdigit(int a)
{
- return isdigit((unsigned char) a);
+ return isdigit(a);
}
static inline int
-nat_isspace(char a)
+nat_isspace(int a)
{
- return a == '0' || isspace((unsigned char) a);
+ return a == '0' || isspace(a);
}
-static inline char
-nat_toupper(char a)
+static inline int
+nat_toupper(int a)
{
- return toupper((unsigned char) a);
+ return toupper(a);
}
@@ -98,7 +98,7 @@ compare_right(char const *a, char const *b)
static int strnatcmp0(char const *a, char const *b, int fold_case)
{
int ai, bi;
- char ca, cb;
+ int ca, cb;
int result;
assert(a && b);