aboutsummaryrefslogtreecommitdiff
path: root/trie.h
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-02-03 13:27:20 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2019-02-03 13:27:20 +0100
commit1fd1232450a215a37915e3657964f2dad7ce72d6 (patch)
tree907cb87e027c12ffd550081513340db5aef3589a /trie.h
parentMade .x files secoundary in makefile. (diff)
downloadcalp-1fd1232450a215a37915e3657964f2dad7ce72d6.tar.gz
calp-1fd1232450a215a37915e3657964f2dad7ce72d6.tar.xz
Add graphviz output for TRIE's.
Add simple output in dot format for trie structures. Along with a slightly updated main which handles a few more command line arguments. Also updated makefile to generate pdf's from dot files and dot-files from parse.
Diffstat (limited to 'trie.h')
-rw-r--r--trie.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/trie.h b/trie.h
index 52e1072d..20b08ec9 100644
--- a/trie.h
+++ b/trie.h
@@ -1,6 +1,8 @@
#ifndef TRIE_H
#define TRIE_H
+#include <stdio.h>
+
#include "macro.h"
#define TRIE(T) TP(trie__, T)
@@ -15,6 +17,9 @@
#define TRIE_PUT(T) TP(trie_put__, T)
#define TRIE_GET(T) TP(trie_get__, T)
+#define TRIE_DOT(T) TP(trie_to_dot__, T)
+#define TRIE_DOT_HELP(T) TP(trie_to_dot_helper__, T)
+
#endif /* TRIE_H */
#ifdef TYPE
@@ -45,4 +50,7 @@ int TRIE_NODE_FREE(TYPE) ( TRIE_NODE(TYPE)* node );
int TRIE_FREE(TYPE) ( TRIE(TYPE)* trie );
+int TRIE_DOT(TYPE) ( TRIE(TYPE)*, FILE* );
+int TRIE_DOT_HELP(TYPE) ( TRIE_NODE(TYPE)*, FILE* );
+
#endif /* TYPE */