frontend/variable.c, used `isalnum()' instead of homegrown `isalphanum()'

This commit is contained in:
rlar 2016-03-08 21:07:59 +01:00
parent 7a51ead0a5
commit 07aba2e2ae
2 changed files with 2 additions and 3 deletions

View File

@ -678,7 +678,7 @@ span_var_expr(char *t)
int parenthesis = 0;
int brackets = 0;
while (*t && (isalphanum(*t) || strchr(VALIDCHARS, *t)))
while (*t && (isalnum(*t) || strchr(VALIDCHARS, *t)))
switch (*t++)
{
case '[':
@ -879,7 +879,7 @@ vareval(char *string)
char *t = ++range;
if (*t == '&')
t++;
while (isalphanum(*t))
while (isalnum(*t))
t++;
*t = '\0';
r = vareval(range);

View File

@ -24,7 +24,6 @@
#define eq(a,b) (!strcmp((a), (b)))
#define eqc(a,b) (cieq((a), (b)))
#define isalphanum(c) (isalpha(c) || isdigit(c))
#define hexnum(c) ((((c) >= '0') && ((c) <= '9')) ? ((c) - '0') : ((((c) >= \
'a') && ((c) <= 'f')) ? ((c) - 'a' + 10) : ((((c) >= 'A') && \
((c) <= 'F')) ? ((c) - 'A' + 10) : 0)))