summaryrefslogtreecommitdiff
path: root/legacy/embryo
diff options
context:
space:
mode:
authortsauerbeck <tsauerbeck>2005-04-01 15:15:38 +0000
committertsauerbeck <tsauerbeck@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>2005-04-01 15:15:38 +0000
commit7037866a7169aa52572a45cf9b37771f7c48fd43 (patch)
tree15cc8a8dd520c34787834cb50e776b7e57e5b089 /legacy/embryo
parent7f9e3204b156faac48c1099fe9eab0c41c4d8e5e (diff)
replace ishex() by isxdigits() calls
SVN revision: 14063
Diffstat (limited to 'legacy/embryo')
-rw-r--r--legacy/embryo/src/bin/embryo_cc_sc.h1
-rw-r--r--legacy/embryo/src/bin/embryo_cc_sc2.c15
2 files changed, 2 insertions, 14 deletions
diff --git a/legacy/embryo/src/bin/embryo_cc_sc.h b/legacy/embryo/src/bin/embryo_cc_sc.h
index 5b3a9e5d70..8938aed0fb 100644
--- a/legacy/embryo/src/bin/embryo_cc_sc.h
+++ b/legacy/embryo/src/bin/embryo_cc_sc.h
@@ -465,7 +465,6 @@ int tokeninfo(cell * val, char **str);
465int needtoken(int token); 465int needtoken(int token);
466void stowlit(cell value); 466void stowlit(cell value);
467int alphanum(char c); 467int alphanum(char c);
468int ishex(char c);
469void delete_symbol(symbol * root, symbol * sym); 468void delete_symbol(symbol * root, symbol * sym);
470void delete_symbols(symbol * root, int level, int del_labels, 469void delete_symbols(symbol * root, int level, int del_labels,
471 int delete_functions); 470 int delete_functions);
diff --git a/legacy/embryo/src/bin/embryo_cc_sc2.c b/legacy/embryo/src/bin/embryo_cc_sc2.c
index 28a6aa4fc2..ffb9d29d14 100644
--- a/legacy/embryo/src/bin/embryo_cc_sc2.c
+++ b/legacy/embryo/src/bin/embryo_cc_sc2.c
@@ -477,11 +477,11 @@ htoi(cell * val, char *curptr)
477 if (*ptr == '0' && *(ptr + 1) == 'x') 477 if (*ptr == '0' && *(ptr + 1) == 'x')
478 { /* C style hexadecimal notation */ 478 { /* C style hexadecimal notation */
479 ptr += 2; 479 ptr += 2;
480 while (ishex(*ptr) || *ptr == '_') 480 while (isxdigit(*ptr) || *ptr == '_')
481 { 481 {
482 if (*ptr != '_') 482 if (*ptr != '_')
483 { 483 {
484 assert(ishex(*ptr)); 484 assert(isxdigit(*ptr));
485 *val = *val << 4; 485 *val = *val << 4;
486 if (isdigit(*ptr)) 486 if (isdigit(*ptr))
487 *val += (*ptr - '0'); 487 *val += (*ptr - '0');
@@ -2337,17 +2337,6 @@ alphanum(char c)
2337 return (alpha(c) || isdigit(c)); 2337 return (alpha(c) || isdigit(c));
2338} 2338}
2339 2339
2340/* ishex
2341 *
2342 * Test if character "c" is a hexadecimal digit ("0".."9" or "a".."f").
2343 */
2344SC_FUNC int
2345ishex(char c)
2346{
2347 return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A'
2348 && c <= 'F');
2349}
2350
2351/* The local variable table must be searched backwards, so that the deepest 2340/* The local variable table must be searched backwards, so that the deepest
2352 * nesting of local variables is searched first. The simplest way to do 2341 * nesting of local variables is searched first. The simplest way to do
2353 * this is to insert all new items at the head of the list. 2342 * this is to insert all new items at the head of the list.