home *** CD-ROM | disk | FTP | other *** search
- /* stb.h - declarations for symbol-table package stb.c. */
-
- /* By Eamonn McManus <em@dce.ie>. This file is not copyrighted.
- * $Id: stb.h,v 1.2 90/09/11 23:38:07 em Exp $
- */
-
- #ifndef MAXCHAR
- # define MAXCHAR 256
- #endif
-
- typedef struct stb_node {
- struct stb_node *link[2], *parent;
- char *name;
- datum datum; /* datum must be typedef'd first. */
- } stb_node;
-
- typedef stb_node *stb[MAXCHAR];
-
- #ifndef ARGS
- # ifndef __STDC__
- # define ARGS(x) ()
- # else
- # define ARGS(x) x
- # endif
- #endif
-
- stb *stb_new_table ARGS((void));
- int stb_free_table ARGS((stb *table, int (*datumfree)()));
- stb_node *stb_lookup ARGS((stb *table, char *name));
- stb_node *stb_insert ARGS((stb *table, char *name, datum *newdatum));
- stb_node *stb_first ARGS((stb *table));
- stb_node *stb_next ARGS((stb *table, stb_node *node));
- int stb_delete ARGS((stb *table, stb_node *node, int (*datumfree)()));
-