replace ishex() by isxdigits() calls

SVN revision: 14063
This commit is contained in:
tsauerbeck 2005-04-01 15:15:38 +00:00 committed by tsauerbeck
parent 7f9e3204b1
commit 7037866a71
2 changed files with 2 additions and 14 deletions

View File

@ -465,7 +465,6 @@ int tokeninfo(cell * val, char **str);
int needtoken(int token);
void stowlit(cell value);
int alphanum(char c);
int ishex(char c);
void delete_symbol(symbol * root, symbol * sym);
void delete_symbols(symbol * root, int level, int del_labels,
int delete_functions);

View File

@ -477,11 +477,11 @@ htoi(cell * val, char *curptr)
if (*ptr == '0' && *(ptr + 1) == 'x')
{ /* C style hexadecimal notation */
ptr += 2;
while (ishex(*ptr) || *ptr == '_')
while (isxdigit(*ptr) || *ptr == '_')
{
if (*ptr != '_')
{
assert(ishex(*ptr));
assert(isxdigit(*ptr));
*val = *val << 4;
if (isdigit(*ptr))
*val += (*ptr - '0');
@ -2337,17 +2337,6 @@ alphanum(char c)
return (alpha(c) || isdigit(c));
}
/* ishex
*
* Test if character "c" is a hexadecimal digit ("0".."9" or "a".."f").
*/
SC_FUNC int
ishex(char c)
{
return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A'
&& c <= 'F');
}
/* The local variable table must be searched backwards, so that the deepest
* nesting of local variables is searched first. The simplest way to do
* this is to insert all new items at the head of the list.