From bda7a6e3715b270ebb0854b3cef667976d241d96 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Sat, 21 Jun 2008 10:23:17 -0700 Subject: 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. --- nasmlib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nasmlib.c') diff --git a/nasmlib.c b/nasmlib.c index 9a49090..0937b66 100644 --- a/nasmlib.c +++ b/nasmlib.c @@ -235,7 +235,7 @@ char *nasm_strsep(char **stringp, const char *delim) #endif -#define lib_isnumchar(c) (isalnum(c) || (c) == '$' || (c) == '_') +#define lib_isnumchar(c) (nasm_isalnum(c) || (c) == '$' || (c) == '_') #define numvalue(c) ((c)>='a' ? (c)-'a'+10 : (c)>='A' ? (c)-'A'+10 : (c)-'0') static int radix_letter(char c) @@ -270,7 +270,7 @@ int64_t readnum(char *str, bool *error) *error = false; - while (isspace(*r)) + while (nasm_isspace(*r)) r++; /* find start of number */ /* -- cgit v1.2.3