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

 

sym_lookup_symbol

#include "sflsymb.h"
SYMBOL *
sym_lookup_symbol (
    const SYMTAB *table,                /*  Symbol table to search           */
    const char   *name)                 /*  Symbol name to search for        */

Synopsis

Searches for a symbol, by name, in the specified symbol table. Returns a pointer to the symbol if found, or NULL if not found. If more than one symbol with the same name exists, finds the latest entry.

Source Code - (sflsymb.c)

{
    SYMBOL
        *symbol;                        /*  Search through hash bucket list  */

    ASSERT (table);

    for (symbol = table-> hash [sym hash (name)];
         symbol;
         symbol = symbol-> h_next)
      {
        if (streq (symbol-> name, name))
            return (symbol);
      }
    return (NULL);
}

| << | < | > | >> iMatix Copyright © 1996-2000 iMatix Corporation