From 2709bea0f440507ac009e6e7ded453bb792d6842 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 28 Oct 2023 16:15:49 -0700 Subject: [PATCH 08/11] test: allow non-blank white space in numbers * src/test.c (find_int): Use isspace, not isblank, for compatibility with how strtol works, which is how most other shells do this. --- src/test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test.c b/src/test.c index 2bcb9abc8..4f14e4080 100644 --- a/src/test.c +++ b/src/test.c @@ -136,7 +136,7 @@ find_int (char const *string) char const *p; char const *number_start; - for (p = string; isblank (to_uchar (*p)); p++) + for (p = string; isspace (to_uchar (*p)); p++) continue; if (*p == '+') @@ -154,7 +154,7 @@ find_int (char const *string) { while (ISDIGIT (*p)) p++; - while (isblank (to_uchar (*p))) + while (isspace (to_uchar (*p))) p++; if (!*p) return number_start; -- 2.39.2