home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_10_06
/
1006071b
< prev
next >
Wrap
Text File
|
1992-04-15
|
1KB
|
46 lines
int sym_util_debug = 0 ; /* Global debug switch. */
/* Internal variables. */
typedef struct symbol_node {
...
} symbol_node ;
static symbol_node *symbol_list = NULL ;
/* Public functions. */
void sym_add (), sym_delete () ;
int sym_lookup () ;
/* Internal functions. */
static symbol_node *sym_locate () ;
void sym_add (name, value)
char *name ;
int value ;
{
... adds NAME/VALUE pair to the symbol table ...
}
void sym_delete (name)
char *name ;
{
... deletes NAME from the symbol table ...
}
int sym_lookup (name)
char *name ;
{
... returns NAME's value from the symbol table ...
}
/* Internal function called
by the other functions. */
static symbol_node *sym_locate (name)
char *name ;
{
... locates NAME's node in the symbol list ...
}
Listing 2: C Symbol Table Package