64 int addsym(
char *sym,
char *str_def,
int int_def,
struct hash_entry **table,
int table_size)
66 int hash_val =
hashfunct( sym, table_size );
67 struct hash_entry *sym_entry = table[hash_val];
73 if ( ! strcmp( sym, sym_entry->
name ) )
78 sym_entry = sym_entry->
next;
84 if ( new_entry ==
NULL )
85 flexfatal(
"symbol table memory allocation failed" );
87 if ( (successor = table[hash_val]) )
89 new_entry->
next = successor;
90 successor->
prev = new_entry;
96 new_entry->
name = sym;
100 table[hash_val] = new_entry;
160 if ( ! strcmp( sym, sym_entry->
name ) )
161 return ( sym_entry );
162 sym_entry = sym_entry->
next;
165 return ( &empty_entry );
185 while ( str[locstr] )
186 hashval = ((hashval << 1) + str[locstr++]) % hash_size;
207 synerr(
"name defined twice" );
249 if ( strcmp( str,
"0" ) )
int addsym(char *sym, char *str_def, int int_def, struct hash_entry **table, int table_size)
Char * ndlookup(char *nd)
int ccllookup(Char *ccltxt)
void scinstal(char *str, int xcluflg)
#define NAME_TABLE_HASH_SIZE
void format_pinpoint_message(char[], char[])
#define START_COND_HASH_SIZE
#define MAX_SCS_INCREMENT
void ndinstal(char *nd, Char *def)
struct hash_entry * ccltab[CCL_HASH_SIZE]
int hashfunct(char[], int)
char * copy_string(char *str)
struct hash_entry * sctbl[START_COND_HASH_SIZE]
#define reallocate_integer_array(array, size)
void cclinstal(Char *ccltxt, int cclnum)
struct hash_entry * ndtbl[NAME_TABLE_HASH_SIZE]
Char * copy_unsigned_string(Char *str)
#define reallocate_char_ptr_array(array, size)
struct hash_entry * findsym(char *sym, struct hash_entry **table, int table_size)