From 22b925495a130325538812807f7b75d40f9ee5f5 Mon Sep 17 00:00:00 2001 From: Alexander Levin Date: Mon, 2 Mar 2009 21:35:05 +0000 Subject: [PATCH] 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 --- firmware/common/strnatcmp.c | 16 ++++++++-------- 1 file 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 @@ /* 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);