Fix assert failure due to signed/unsigned char mismatch
This commit is contained in:
parent
2aa132d345
commit
a1d0fe39d4
@ -549,8 +549,8 @@ SC_FUNC int tokeninfo(cell *val,char **str);
|
|||||||
SC_FUNC int needtoken(int token);
|
SC_FUNC int needtoken(int token);
|
||||||
SC_FUNC void litadd(cell value);
|
SC_FUNC void litadd(cell value);
|
||||||
SC_FUNC void litinsert(cell value,int pos);
|
SC_FUNC void litinsert(cell value,int pos);
|
||||||
SC_FUNC int alphanum(char c);
|
SC_FUNC int alphanum(unsigned char c);
|
||||||
SC_FUNC int ishex(char c);
|
SC_FUNC int ishex(unsigned char c);
|
||||||
SC_FUNC void delete_symbol(symbol *root,symbol *sym);
|
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 void delete_symbols(symbol *root,int level,int del_labels,int delete_functions);
|
||||||
SC_FUNC int refer_symbol(symbol *entry,symbol *bywhom);
|
SC_FUNC int refer_symbol(symbol *entry,symbol *bywhom);
|
||||||
|
@ -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 void substallpatterns(unsigned char *line,int buffersize);
|
||||||
static int match(char *st,int end);
|
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 SKIPMODE 1 /* bit field in "#if" stack */
|
||||||
#define PARSEMODE 2 /* 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 ("_")
|
* Test if character "c" is alphabetic ("a".."z"), an underscore ("_")
|
||||||
* or an "at" sign ("@"). The "@" is an extension to standard C.
|
* 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);
|
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 "@")
|
* 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));
|
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").
|
* 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');
|
return (c>='0' && c<='9') || (c>='a' && c<='f') || (c>='A' && c<='F');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user