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.tar.gz
rockbox-22b925495a130325538812807f7b75d40f9ee5f5.zip
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 2ec920b0a1..d7b7d1d398 100644
--- a/firmware/common/strnatcmp.c
+++ b/firmware/common/strnatcmp.c
@@ -45,23 +45,23 @@
45/* These are defined as macros to make it easier to adapt this code to 45/* These are defined as macros to make it easier to adapt this code to
46 * different characters types or comparison functions. */ 46 * different characters types or comparison functions. */
47static inline int 47static inline int
48nat_isdigit(char a) 48nat_isdigit(int a)
49{ 49{
50 return isdigit((unsigned char) a); 50 return isdigit(a);
51} 51}
52 52
53 53
54static inline int 54static inline int
55nat_isspace(char a) 55nat_isspace(int a)
56{ 56{
57 return a == '0' || isspace((unsigned char) a); 57 return a == '0' || isspace(a);
58} 58}
59 59
60 60
61static inline char 61static inline int
62nat_toupper(char a) 62nat_toupper(int a)
63{ 63{
64 return toupper((unsigned char) a); 64 return toupper(a);
65} 65}
66 66
67 67
@@ -98,7 +98,7 @@ compare_right(char const *a, char const *b)
98static int strnatcmp0(char const *a, char const *b, int fold_case) 98static int strnatcmp0(char const *a, char const *b, int fold_case)
99{ 99{
100 int ai, bi; 100 int ai, bi;
101 char ca, cb; 101 int ca, cb;
102 int result; 102 int result;
103 103
104 assert(a && b); 104 assert(a && b);