| iMatix home page | << | < | > | >> |
SFL Version 2.11 |
#include "sflsymb.h" void sym_delete_table ( SYMTAB *table) /* Symbol table to delete */
Deletes the given symbol table. First frees any memory space used by the table and attached symbols, including the user data block if that is not null. If the table argument is NULL, does nothing.
{ SYMBOL *symbol, /* Pointer to symbol */ *next = NULL; /* and to next symbol in list */ if (!table) return; /* Do nothing if argument is null */ for (symbol = table-> symbols; symbol; symbol = next) { next = symbol-> next; /* Keep track of next in list */ mem_free (symbol-> value); /* Free value if used */ mem_free (symbol); /* Finally free symbol and name */ } mem_free (table); /* Now free the table */ }
| << | < | > | >> | Copyright © 1996-2000 iMatix Corporation |