39 |
m4_symbol **m4_symtab; |
m4_symbol **m4_symtab; |
40 |
|
|
41 |
void |
void |
42 |
m4_symtab_init () |
m4_symtab_init (void) |
43 |
{ |
{ |
44 |
int i; |
int i; |
45 |
m4_symbol **symbol; |
m4_symbol **symbol; |
77 |
xfree (SYMBOL_NAME (symbol)); |
xfree (SYMBOL_NAME (symbol)); |
78 |
if (SYMBOL_TYPE (symbol) == M4_TOKEN_TEXT) |
if (SYMBOL_TYPE (symbol) == M4_TOKEN_TEXT) |
79 |
xfree (SYMBOL_TEXT (symbol)); |
xfree (SYMBOL_TEXT (symbol)); |
80 |
xfree ((VOID *) symbol); |
xfree ((void *) symbol); |
81 |
} |
} |
82 |
|
|
83 |
/* Search in, and manipulation of the symbol table, are all done by |
/* Search in, and manipulation of the symbol table, are all done by |
189 |
/* The following function removes from the symbol table, every symbol |
/* The following function removes from the symbol table, every symbol |
190 |
that references a function in the given builtin table. */ |
that references a function in the given builtin table. */ |
191 |
void |
void |
192 |
m4_remove_table_reference_symbols (builtins, macros) |
m4_remove_table_reference_symbols (m4_builtin *builtins, m4_macro *macros) |
|
m4_builtin *builtins; |
|
|
m4_macro *macros; |
|
193 |
{ |
{ |
194 |
/* FIXME: This can be reimplemented to work much faster now that each |
/* FIXME: This can be reimplemented to work much faster now that each |
195 |
symtab entry carries a reference to its defining module. */ |
symtab entry carries a reference to its defining module. */ |
274 |
function FUNC for each symbol in the table. FUNC is called with a |
function FUNC for each symbol in the table. FUNC is called with a |
275 |
pointer to the symbol, and the DATA argument. */ |
pointer to the symbol, and the DATA argument. */ |
276 |
void |
void |
277 |
m4_hack_all_symbols (func, data) |
m4_hack_all_symbols (m4_hack_symbol *func, const char *data) |
|
m4_hack_symbol *func; |
|
|
const char *data; |
|
278 |
{ |
{ |
279 |
int h; |
int h; |
280 |
m4_symbol *symbol; |
m4_symbol *symbol; |
286 |
|
|
287 |
#ifdef DEBUG_SYM |
#ifdef DEBUG_SYM |
288 |
|
|
|
static void symtab_debug M4_PARAMS((void)); |
|
|
static void symtab_print_list M4_PARAMS((int i)); |
|
|
|
|
289 |
static void |
static void |
290 |
symtab_debug () |
symtab_debug (void) |
291 |
{ |
{ |
292 |
m4_token_data_t t; |
m4_token_data_t t; |
293 |
m4_token_data td; |
m4_token_data td; |
322 |
} |
} |
323 |
|
|
324 |
static void |
static void |
325 |
symtab_print_list (i) |
symtab_print_list (int i) |
|
int i; |
|
326 |
{ |
{ |
327 |
m4_symbol *symbol; |
m4_symbol *symbol; |
328 |
|
|