From 7037866a7169aa52572a45cf9b37771f7c48fd43 Mon Sep 17 00:00:00 2001 From: tsauerbeck Date: Fri, 1 Apr 2005 15:15:38 +0000 Subject: [PATCH] replace ishex() by isxdigits() calls SVN revision: 14063 --- legacy/embryo/src/bin/embryo_cc_sc.h | 1 - legacy/embryo/src/bin/embryo_cc_sc2.c | 15 ++------------- 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); 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); 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) 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.