(svn r21344) -Feature [FS#4214]: Natural sorting of strings using ICU.

This commit is contained in:
terkhen
2010-11-27 22:52:12 +00:00
parent 4b944cb13e
commit 75f86a7a21
10 changed files with 12 additions and 12 deletions

View File

@@ -134,7 +134,7 @@ static int CDECL CargoSpecNameSorter(const CargoSpec * const *a, const CargoSpec
GetString(a_name, (*a)->name, lastof(a_name));
GetString(b_name, (*b)->name, lastof(b_name));
int res = strcmp(a_name, b_name);
int res = strnatcmp(a_name, b_name); // Sort by name (natural sorting).
/* If the names are equal, sort by cargo bitnum. */
return (res != 0) ? res : ((*a)->bitnum - (*b)->bitnum);