diff options
Diffstat (limited to 'str_array.c')
-rw-r--r-- | str_array.c | 35 |
1 files changed, 2 insertions, 33 deletions
diff --git a/str_array.c b/str_array.c index 7ce617ed..1b3a33f1 100644 --- a/str_array.c +++ b/str_array.c @@ -55,11 +55,6 @@ static NODE **str_list(NODE *symbol, NODE *subs); static NODE **str_copy(NODE *symbol, NODE *newsymb); static NODE **str_dump(NODE *symbol, NODE *ndump); -#ifdef ARRAYDEBUG -static NODE **str_option(NODE *opt, NODE *val); -#endif - - array_ptr str_array_func[] = { str_array_init, (array_ptr) 0, @@ -70,9 +65,6 @@ array_ptr str_array_func[] = { str_list, str_copy, str_dump, -#ifdef ARRAYDEBUG - str_option -#endif }; static inline NODE **str_find(NODE *symbol, NODE *s1, size_t code1, unsigned long hash1); @@ -158,7 +150,7 @@ str_lookup(NODE *symbol, NODE *subs) * never be used. */ - if (subs->flags & NUMCUR) { + if ((subs->flags & (MPFN|MPZN|NUMCUR)) == NUMCUR) { tmp->numbr = subs->numbr; tmp->flags |= NUMCUR; } @@ -187,7 +179,6 @@ str_lookup(NODE *symbol, NODE *subs) static NODE ** str_exists(NODE *symbol, NODE *subs) { - NODE **lhs; unsigned long hash1; size_t code1; @@ -196,8 +187,7 @@ str_exists(NODE *symbol, NODE *subs) subs = force_string(subs); hash1 = hash(subs->stptr, subs->stlen, (unsigned long) symbol->array_size, & code1); - lhs = str_find(symbol, subs, code1, hash1); - return lhs; + return str_find(symbol, subs, code1, hash1); } /* str_clear --- flush all the values in symbol[] */ @@ -673,27 +663,6 @@ grow_table(NODE *symbol) } -#ifdef ARRAYDEBUG - -static NODE ** -str_option(NODE *opt, NODE *val) -{ - int newval; - NODE *tmp; - NODE **ret = (NODE **) ! NULL; - - tmp = force_string(opt); - (void) force_number(val); - if (strcmp(tmp->stptr, "STR_CHAIN_MAX") == 0) { - newval = (int) val->numbr; - if (newval > 0) - STR_CHAIN_MAX = newval; - } else - ret = NULL; - return ret; -} -#endif - /* From bonzini@gnu.org Mon Oct 28 16:05:26 2002 |