portability improvement

This commit is contained in:
Axel Kohlmeyer
2022-09-30 09:02:14 -04:00
parent afc35aa7b0
commit 038ad3a038

View File

@ -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)