summaryrefslogtreecommitdiff
path: root/nasm.h
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-06-21 10:23:17 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-06-21 10:23:17 -0700
commitbda7a6e3715b270ebb0854b3cef667976d241d96 (patch)
tree86e645d4e025b1dbf0169d0a4ce1c6ec602a15d5 /nasm.h
parent86877b294aabac1059d32611c8dce65910243454 (diff)
downloadnasm-bda7a6e3715b270ebb0854b3cef667976d241d96.tar.gz
nasm-bda7a6e3715b270ebb0854b3cef667976d241d96.tar.bz2
nasm-bda7a6e3715b270ebb0854b3cef667976d241d96.zip
ctype.h: wrapper ctype functions with a cast to (unsigned char)
ctype functions take an *int*, which the user is expected to have taken the input character from getc() and friends, or taken a character and cast it to (unsigned char). We don't care about EOF (-1), so use macros that cast to (unsigned char) for us.
Diffstat (limited to 'nasm.h')
-rw-r--r--nasm.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/nasm.h b/nasm.h
index 203750e..5a47192 100644
--- a/nasm.h
+++ b/nasm.h
@@ -356,13 +356,13 @@ extern Preproc nasmpp;
#define isidstart(c) ( isalpha(c) || (c)=='_' || (c)=='.' || (c)=='?' \
|| (c)=='@' )
-#define isidchar(c) ( isidstart(c) || isdigit(c) || (c)=='$' || (c)=='#' \
+#define isidchar(c) ( isidstart(c) || nasm_isdigit(c) || (c)=='$' || (c)=='#' \
|| (c)=='~' )
/* Ditto for numeric constants. */
-#define isnumstart(c) ( isdigit(c) || (c)=='$' )
-#define isnumchar(c) ( isalnum(c) || (c)=='_' )
+#define isnumstart(c) ( nasm_isdigit(c) || (c)=='$' )
+#define isnumchar(c) ( nasm_isalnum(c) || (c)=='_' )
/* This returns the numeric value of a given 'digit'. */