5 * Copyright (c) 2001 Chris Lightfoot. All rights reserved.
7 * $Id: stringmap.h,v 1.1 2003/10/19 06:44:33 pdw Exp $
11 #ifndef __STRINGMAP_H_ /* include guard */
12 #define __STRINGMAP_H_
16 typedef struct _stringmap {
19 struct _stringmap *l, *g;
22 stringmap stringmap_new(void);
23 void stringmap_delete(stringmap);
24 void stringmap_delete_free(stringmap);
26 /* Try to insert an item into a stringmap, returning 1 if the map already
27 * contained an item with that key.
29 item *stringmap_insert(stringmap, const char*, const item);
30 /* Find an item in a stringmap */
31 stringmap stringmap_find(const stringmap, const char*);
33 #endif /* __STRINGMAP_H_ */