Revert "wcsfilecmp: Don't use iswdigit"

This reverts commit 1ab81ab90d1a408702e11f081fdaaafa30636c31.
This commit is contained in:
Mahmoud Al-Qudsi 2021-10-04 18:08:18 -05:00
parent f674c4b010
commit 72e50d1ab2

View File

@ -55,7 +55,7 @@ int wcsfilecmp(const wchar_t *a, const wchar_t *b) {
int retval = 0; // assume the strings will be equal
while (*a && *b) {
if (*a >= L'0' && *a <= L'9' && *b >= L'0' && *b <= L'9') {
if (iswdigit(*a) && iswdigit(*b)) {
retval = wcsfilecmp_leading_digits(&a, &b);
// If we know the strings aren't logically equal or we've reached the end of one or both
// strings we can stop iterating over the chars in each string.
@ -115,7 +115,7 @@ int wcsfilecmp_glob(const wchar_t *a, const wchar_t *b) {
int retval = 0; // assume the strings will be equal
while (*a && *b) {
if (*a >= L'0' && *a <= L'9' && *b >= L'0' && *b <= L'9') {
if (iswdigit(*a) && iswdigit(*b)) {
retval = wcsfilecmp_leading_digits(&a, &b);
// If we know the strings aren't logically equal or we've reached the end of one or both
// strings we can stop iterating over the chars in each string.