mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 13:15:18 -05:00
Fix for:
FS#10031 - "improper sorting of names with underscores when Interpret numbers when sorting is used" and FS#10200 - "Incorrect sorting of roman numerals when whole numbers selected" a) By using tolower instead of toupper for case-insensitive sorting b) By not ignoring spaces (which isn't really what we aimed for anyway). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22153 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
3c58b26152
commit
28fbb49c0b
1 changed files with 5 additions and 5 deletions
|
|
@ -58,18 +58,18 @@ nat_isdigit(int a)
|
||||||
return isdigit(a);
|
return isdigit(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
static inline int
|
static inline int
|
||||||
nat_isspace(int a)
|
nat_isspace(int a)
|
||||||
{
|
{
|
||||||
return isspace(a);
|
return isspace(a);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
nat_toupper(int a)
|
nat_toupper(int a)
|
||||||
{
|
{
|
||||||
return toupper(a);
|
return tolower(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -139,14 +139,14 @@ static int strnatcmp0(char const *a, char const *b, int fold_case)
|
||||||
while (1) {
|
while (1) {
|
||||||
ca = to_int(a[ai]);
|
ca = to_int(a[ai]);
|
||||||
cb = to_int(b[bi]);
|
cb = to_int(b[bi]);
|
||||||
|
#if 0
|
||||||
/* skip over leading spaces or zeros */
|
/* skip over leading spaces or zeros */
|
||||||
while (nat_isspace(ca))
|
while (nat_isspace(ca))
|
||||||
ca = to_int(a[++ai]);
|
ca = to_int(a[++ai]);
|
||||||
|
|
||||||
while (nat_isspace(cb))
|
while (nat_isspace(cb))
|
||||||
cb = to_int(b[++bi]);
|
cb = to_int(b[++bi]);
|
||||||
|
#endif
|
||||||
/* process run of digits */
|
/* process run of digits */
|
||||||
if (nat_isdigit(ca) && nat_isdigit(cb)) {
|
if (nat_isdigit(ca) && nat_isdigit(cb)) {
|
||||||
fractional = (ca == '0' || cb == '0');
|
fractional = (ca == '0' || cb == '0');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue