| File ChangeLog changed (mode: 100644) (index 5c682cddd..f9ee0fd9a) |
| 82 |
82 |
Fixed treating a failure to create a trash directory on a read-only |
Fixed treating a failure to create a trash directory on a read-only |
| 83 |
83 |
file-system in a Unix environment as a success. Thanks to feekApp. |
file-system in a Unix environment as a success. Thanks to feekApp. |
| 84 |
84 |
|
|
|
85 |
|
Fixed odd sorting with musl caused by its buggy strverscmp(). The |
|
86 |
|
ordering shouldn't depend on libc in use. |
|
87 |
|
|
| 85 |
88 |
0.14-beta to 0.14 (2025-02-08) |
0.14-beta to 0.14 (2025-02-08) |
| 86 |
89 |
|
|
| 87 |
90 |
Improved documentation on zh/zl menu keys a bit. |
Improved documentation on zh/zl menu keys a bit. |
| File src/sort.c changed (mode: 100644) (index f45616526..7398c098d) |
| ... |
... |
TSTATIC int |
| 495 |
495 |
strnumcmp(const char s[], const char t[]) |
strnumcmp(const char s[], const char t[]) |
| 496 |
496 |
{ |
{ |
| 497 |
497 |
#if HAVE_STRVERSCMP_FUNC |
#if HAVE_STRVERSCMP_FUNC |
| 498 |
|
const char *new_s = skip_leading_zeros(s); |
|
| 499 |
|
const char *new_t = skip_leading_zeros(t); |
|
| 500 |
|
return strverscmp(new_s, new_t); |
|
| 501 |
|
#else |
|
|
498 |
|
static int buggy_musl = -1; |
|
499 |
|
if(buggy_musl < 0) |
|
500 |
|
{ |
|
501 |
|
/* "A" has an empty sequence of digits, so byte sorting should be used. */ |
|
502 |
|
buggy_musl = (strverscmp("A", "10") < 0); |
|
503 |
|
} |
|
504 |
|
|
|
505 |
|
if(!buggy_musl) |
|
506 |
|
{ |
|
507 |
|
const char *new_s = skip_leading_zeros(s); |
|
508 |
|
const char *new_t = skip_leading_zeros(t); |
|
509 |
|
return strverscmp(new_s, new_t); |
|
510 |
|
} |
|
511 |
|
|
|
512 |
|
/* Fall through to the custom implementation which is aligned with the correct |
|
513 |
|
* version. */ |
|
514 |
|
#endif |
|
515 |
|
|
| 502 |
516 |
while(*s != '\0' && *t != '\0') |
while(*s != '\0' && *t != '\0') |
| 503 |
517 |
{ |
{ |
| 504 |
518 |
if(isdigit(*s) && isdigit(*t)) |
if(isdigit(*s) && isdigit(*t)) |
| |
| ... |
... |
strnumcmp(const char s[], const char t[]) |
| 528 |
542 |
} |
} |
| 529 |
543 |
|
|
| 530 |
544 |
return SORT_CMP((unsigned char)*s, (unsigned char)*t); |
return SORT_CMP((unsigned char)*s, (unsigned char)*t); |
| 531 |
|
#endif |
|
| 532 |
545 |
} |
} |
| 533 |
546 |
|
|
| 534 |
547 |
#if HAVE_STRVERSCMP_FUNC |
#if HAVE_STRVERSCMP_FUNC |