65 for(i=0;i<new_size;i++)
68 for(i=0;i<old_size;i++)
117 while(table->data[n] && strcmp(table->data[n]->symbol,symbol)) {
146 return table->data[n];
170 table->data[n]=keyword;
172 if(table->used*2>table->size)
193 printf(
"*** Hash table %lx:\n",(
long)table);
194 printf(
"Size: %d\n",table->size);
195 printf(
"Used: %d\n",table->used);
197 for(i=0;i<table->size;i++)
200 s=table->data[i]->symbol;
203 printf(
"%4d %4d %s %s\n",
213 printf(
"Really used: %d\n",t);
214 printf(
"Collisions: %d = %1.3f%%\n",
int hash_find(ptr_hash_table table, char *symbol)
struct wl_hash_table * ptr_hash_table
void hash_insert(ptr_hash_table table, char *symbol, ptr_keyword keyword)
void hash_display(ptr_hash_table table)
int hash_code(ptr_hash_table table, char *symbol)
ptr_definition first_definition
ptr_keyword hash_lookup(ptr_hash_table table, char *symbol)
void hash_expand(ptr_hash_table table, int new_size)
ptr_hash_table hash_create(int size)