diff options
Diffstat (limited to 'src/include/catalog.h')
-rw-r--r-- | src/include/catalog.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/include/catalog.h b/src/include/catalog.h new file mode 100644 index 0000000..ba33f84 --- /dev/null +++ b/src/include/catalog.h @@ -0,0 +1,27 @@ +/* Small library to handle catalog files + */ +#ifndef CATALOG_H +#define CATALOG_H +#define CHASHMAX 31 /*Just small hash table. Should be OK */ +#include <xio.h> +#ifdef __cplusplus +extern "C" { +#endif + struct varnames { + struct varnames *left, *right; + char *name; + char *value; + }; + typedef struct catalog { + struct varnames *root[CHASHMAX]; + } catalog_t; +/*Find text in catalog */ + extern char *find_text(catalog_t * catalog, CONST char *name); +/*Load catalog from file */ + extern catalog_t *load_catalog(xio_file f, CONST char **error); +/*Free memory used by catalog */ + extern void free_catalog(catalog_t *); +#ifdef __cplusplus +} +#endif +#endif /*VARIABLE_H */ |