diff --git a/source/compiler/sc.h b/source/compiler/sc.h index 249c6f3..4ae1231 100644 --- a/source/compiler/sc.h +++ b/source/compiler/sc.h @@ -549,8 +549,8 @@ SC_FUNC int tokeninfo(cell *val,char **str); SC_FUNC int needtoken(int token); SC_FUNC void litadd(cell value); SC_FUNC void litinsert(cell value,int pos); -SC_FUNC int alphanum(char c); -SC_FUNC int ishex(char c); +SC_FUNC int alphanum(unsigned char c); +SC_FUNC int ishex(unsigned char c); SC_FUNC void delete_symbol(symbol *root,symbol *sym); SC_FUNC void delete_symbols(symbol *root,int level,int del_labels,int delete_functions); SC_FUNC int refer_symbol(symbol *entry,symbol *bywhom); diff --git a/source/compiler/sc2.c b/source/compiler/sc2.c index 14d62de..157f17a 100644 --- a/source/compiler/sc2.c +++ b/source/compiler/sc2.c @@ -45,7 +45,7 @@ static symbol *find_symbol(const symbol *root,const char *name,int fnumber,int a static void substallpatterns(unsigned char *line,int buffersize); static int match(char *st,int end); -static int alpha(char c); +static int alpha(unsigned char c); #define SKIPMODE 1 /* bit field in "#if" stack */ #define PARSEMODE 2 /* bit field in "#if" stack */ @@ -2502,7 +2502,7 @@ static cell litchar(const unsigned char **lptr,int flags) * Test if character "c" is alphabetic ("a".."z"), an underscore ("_") * or an "at" sign ("@"). The "@" is an extension to standard C. */ -static int alpha(char c) +static int alpha(unsigned char c) { return (isalpha(c) || c=='_' || c==PUBLIC_CHAR); } @@ -2511,7 +2511,7 @@ static int alpha(char c) * * Test if character "c" is alphanumeric ("a".."z", "0".."9", "_" or "@") */ -SC_FUNC int alphanum(char c) +SC_FUNC int alphanum(unsigned char c) { return (alpha(c) || isdigit(c)); } @@ -2520,7 +2520,7 @@ SC_FUNC int alphanum(char c) * * Test if character "c" is a hexadecimal digit ("0".."9" or "a".."f"). */ -SC_FUNC int ishex(char c) +SC_FUNC int ishex(unsigned char c) { return (c>='0' && c<='9') || (c>='a' && c<='f') || (c>='A' && c<='F'); }