diff options
-rw-r--r-- | nasm.h | 6 | ||||
-rw-r--r-- | nasmlib.h | 8 | ||||
-rw-r--r-- | preproc.c | 2 |
3 files changed, 9 insertions, 7 deletions
@@ -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; |