aboutsummaryrefslogtreecommitdiff
path: root/trie.h
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-02-26 15:12:56 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2019-02-26 15:12:56 +0100
commit23e4967fd42a6a2bee5c44213be4df61ff546b13 (patch)
tree6347cd19fae83dc6766c587911682b7bffc36d39 /trie.h
parentCleanup. (diff)
downloadcalp-23e4967fd42a6a2bee5c44213be4df61ff546b13.tar.gz
calp-23e4967fd42a6a2bee5c44213be4df61ff546b13.tar.xz
WIP.
Diffstat (limited to 'trie.h')
-rw-r--r--trie.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/trie.h b/trie.h
index 9de60771..9de38be3 100644
--- a/trie.h
+++ b/trie.h
@@ -11,6 +11,9 @@
#endif /* TRIE_H */
#ifdef TYPE
+#include "linked_list.h"
+#include "strbuf.h"
+
typedef struct TRIE_NODE(TYPE) {
char c;
TYPE* value;
@@ -27,7 +30,7 @@ INIT_F ( TRIE(TYPE) );
INIT_F (TRIE_NODE(TYPE), char c);
-INIT_F (TRIE_NODE(TYPE),
+INIT_F (TRIE_NODE(TYPE),
char c, TRIE_NODE(TYPE)* next, TRIE_NODE(TYPE)* child );
int PUSH(TRIE(TYPE)) ( TRIE(TYPE)* trie, char* key, TYPE* val );
@@ -46,4 +49,6 @@ FMT_F(TRIE(TYPE));
int DEEP_COPY(TRIE_NODE(TYPE)) (TRIE_NODE(TYPE)* dest, TRIE_NODE(TYPE)* src);
int DEEP_COPY(TRIE(TYPE)) (TRIE(TYPE)* dest, TRIE(TYPE)* src);
+LLIST(strbuf)* KEYS(TRIE(TYPE)) (TRIE(TYPE)*);
+
#endif /* TYPE */