From 038ad3a0382c11257e7ebc522b5503c1df8eb187 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 30 Sep 2022 09:02:14 -0400 Subject: [PATCH] portability improvement --- src/utils.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils.cpp b/src/utils.cpp index 6483997dc9..e293b6c67b 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -1815,7 +1815,7 @@ re_t re_compile(re_ctx_t context, const char *pattern) /* Private functions: */ static int matchdigit(char c) { - return ((c >= '0') && (c <= '9')); + return isdigit(c); } static int matchint(char c) @@ -1830,12 +1830,12 @@ static int matchfloat(char c) static int matchalpha(char c) { - return ((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')); + return isalpha(c); } static int matchwhitespace(char c) { - return ((c == ' ') || (c == '\t') || (c == '\n') || (c == '\r') || (c == '\f') || (c == '\v')); + return isspace(c); } static int matchalphanum(char c)