| iMatix home page
| << | < | > | >>
SFL Logo SFL
Version 1.91

 

sym_create_table

#include "sflsymb.h"
SYMTAB *
sym_create_table (void)

Synopsis

Creates a new symbol table. Returns a SYMTAB pointer which you must use in all future references to the symbol table. The symbol table is maintained in memory until the program ends or you use sym delete table() to delete it. Returns null if there was not enough memory to create the symbol table.

Source Code - (sflsymb.c)

{
    SYMTAB
        *table;                         /*  Pointer to created table         */
    int
        hash_index;                     /*  Index into hash bucket           */

    table = mem_alloc (sizeof (SYMTAB));
    if (table)
      {
        table-> symbols = NULL;         /*  No symbols attached yet          */
        table-> size    = 0;
        for (hash_index = 0; hash_index < SYM_HASH_SIZE; hash_index++)
            table-> hash [hash_index] = NULL;
      }
    return (table);
}

| << | < | > | >> iMatix Copyright © 1996-98 iMatix