mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-04-12 18:40:23 +08:00
Fix a few more <ctype.h> instances
A few isolated instances of isalpha() and isxdigit().
This commit is contained in:
parent
bda7a6e371
commit
f221b9ee08
6
nasm.h
6
nasm.h
@ -354,10 +354,10 @@ extern Preproc nasmpp;
|
||||
* start.
|
||||
*/
|
||||
|
||||
#define isidstart(c) ( isalpha(c) || (c)=='_' || (c)=='.' || (c)=='?' \
|
||||
#define isidstart(c) ( nasm_isalpha(c) || (c)=='_' || (c)=='.' || (c)=='?' \
|
||||
|| (c)=='@' )
|
||||
#define isidchar(c) ( isidstart(c) || nasm_isdigit(c) || (c)=='$' || (c)=='#' \
|
||||
|| (c)=='~' )
|
||||
#define isidchar(c) ( isidstart(c) || nasm_isdigit(c) || \
|
||||
(c)=='$' || (c)=='#' || (c)=='~' )
|
||||
|
||||
/* Ditto for numeric constants. */
|
||||
|
||||
|
@ -29,9 +29,11 @@ extern unsigned char nasm_tolower_tab[256];
|
||||
|
||||
/* Wrappers around <ctype.h> functions */
|
||||
/* These are only valid for values that cannot include EOF */
|
||||
#define nasm_isspace(x) isspace((unsigned char)(x))
|
||||
#define nasm_isalnum(x) isalnum((unsigned char)(x))
|
||||
#define nasm_isdigit(x) isdigit((unsigned char)(x))
|
||||
#define nasm_isspace(x) isspace((unsigned char)(x))
|
||||
#define nasm_isalpha(x) isalpha((unsigned char)(x))
|
||||
#define nasm_isdigit(x) isdigit((unsigned char)(x))
|
||||
#define nasm_isalnum(x) isalnum((unsigned char)(x))
|
||||
#define nasm_isxdigit(x) isxdigit((unsigned char)(x))
|
||||
|
||||
/*
|
||||
* If this is defined, the wrappers around malloc et al will
|
||||
|
@ -882,7 +882,7 @@ static Token *tokenize(char *line)
|
||||
while (*r == '_')
|
||||
r++;
|
||||
|
||||
if (nasm_isdigit(*r) || (is_hex && isxdigit(*r)) ||
|
||||
if (nasm_isdigit(*r) || (is_hex && nasm_isxdigit(*r)) ||
|
||||
(!is_hex && (*r == 'e' || *r == 'E')) ||
|
||||
(*r == 'p' || *r == 'P')) {
|
||||
p = r;
|
||||
|
Loading…
x
Reference in New Issue
Block a user