summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorAlexander Levin <al.le@rockbox.org>2009-08-12 13:44:50 +0000
committerAlexander Levin <al.le@rockbox.org>2009-08-12 13:44:50 +0000
commitd353a7fd4e1956d367121148a95f8bab6d8fc766 (patch)
tree3295dd204513abb3a2438d49dd8052a6aee9294e /firmware
parent3bfc0e7a7e834ea3bf0a0e42d371b7f890e7a827 (diff)
downloadrockbox-d353a7fd4e1956d367121148a95f8bab6d8fc766.tar.gz
rockbox-d353a7fd4e1956d367121148a95f8bab6d8fc766.tar.bz2
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.c8
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)
#endif
static inline int
-nat_toupper(int a)
+nat_unify_case(int a)
{
+ /* We use 'tolower' and not 'toupper' so that '_' gets sorted
+ before the letters */
return tolower(a);
}
@@ -170,8 +172,8 @@ static int strnatcmp0(char const *a, char const *b, int fold_case)
}
if (fold_case) {
- ca = nat_toupper(ca);
- cb = nat_toupper(cb);
+ ca = nat_unify_case(ca);
+ cb = nat_unify_case(cb);
}
if (ca < cb)