README.md | 1 - nnn.c | 6 +++++- diff --git a/README.md b/README.md index cd5afbe6cb27d9b91b534661a81be14f16528d44..b3209a071869766fe2591745a61b2277db162086 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,6 @@ - Basic and detail view - Detailed file information - Media information (needs mediainfo or exiftool, if specified) - Ordering - - Numeric order (1, 2, ... 10, 11, ...) for numeric names - Sort by modification time, size - Convenience - Create, rename files and directories diff --git a/nnn.c b/nnn.c index 157fc97465c507740a815e436c75f78881c297ff..99630d09a8a19a630229924b4660b5527dc9fc89 100644 --- a/nnn.c +++ b/nnn.c @@ -632,6 +632,7 @@ closedir(dirp); return TRUE; } +#if 0 /* * We assume none of the strings are NULL. * @@ -639,6 +640,8 @@ * Let's have the logic to sort numeric names in numeric order. * E.g., the order '1, 10, 2' doesn't make sense to human eyes. * * If the absolute numeric values are same, we fallback to alphasort. + * + * NOTE: This API is replaced by strcoll(). */ static int xstricmp(char *s1, char *s2) @@ -731,6 +734,7 @@ } return (int) (TOUPPER(*s1) - TOUPPER(*s2)); } +#endif /* Return the integer value of a char representing HEX */ static char @@ -842,7 +846,7 @@ else if (pb->blocks < pa->blocks) return -1; } - return xstricmp(pa->name, pb->name); + return strcoll(pa->name, pb->name); } /*