diff options
author | Alexander Levin <al.le@rockbox.org> | 2009-08-12 13:44:50 +0000 |
---|---|---|
committer | Alexander Levin <al.le@rockbox.org> | 2009-08-12 13:44:50 +0000 |
commit | d353a7fd4e1956d367121148a95f8bab6d8fc766 (patch) | |
tree | 3295dd204513abb3a2438d49dd8052a6aee9294e /firmware | |
parent | 3bfc0e7a7e834ea3bf0a0e42d371b7f890e7a827 (diff) | |
download | rockbox-d353a7fd4e1956d367121148a95f8bab6d8fc766.tar.gz rockbox-d353a7fd4e1956d367121148a95f8bab6d8fc766.zip |
Change the function name in strnatsort so that the code doesn't contradict itself
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22267 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/common/strnatcmp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/firmware/common/strnatcmp.c b/firmware/common/strnatcmp.c index 3c98200f7e..09c331f914 100644 --- a/firmware/common/strnatcmp.c +++ b/firmware/common/strnatcmp.c | |||
@@ -67,8 +67,10 @@ nat_isspace(int a) | |||
67 | #endif | 67 | #endif |
68 | 68 | ||
69 | static inline int | 69 | static inline int |
70 | nat_toupper(int a) | 70 | nat_unify_case(int a) |
71 | { | 71 | { |
72 | /* We use 'tolower' and not 'toupper' so that '_' gets sorted | ||
73 | before the letters */ | ||
72 | return tolower(a); | 74 | return tolower(a); |
73 | } | 75 | } |
74 | 76 | ||
@@ -170,8 +172,8 @@ static int strnatcmp0(char const *a, char const *b, int fold_case) | |||
170 | } | 172 | } |
171 | 173 | ||
172 | if (fold_case) { | 174 | if (fold_case) { |
173 | ca = nat_toupper(ca); | 175 | ca = nat_unify_case(ca); |
174 | cb = nat_toupper(cb); | 176 | cb = nat_unify_case(cb); |
175 | } | 177 | } |
176 | 178 | ||
177 | if (ca < cb) | 179 | if (ca < cb) |