From 7182d6b23eed1d327a7126ed21f382602d1ecf78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 26 Feb 2019 16:34:55 +0100 Subject: Minor graphs.c cleanup. --- graphs.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'graphs.c') diff --git a/graphs.c b/graphs.c index 4d1496cc..9d87c70a 100644 --- a/graphs.c +++ b/graphs.c @@ -112,31 +112,29 @@ int trie_to_dot_helper ( TRIE_NODE(T)* root, FILE* f ) { FMT(strbuf)(&v->key, buf); fprintf(f, "\"%p\" [label=\"%s\" shape=rectangle color=darkgreen];\n", v, buf); + /* Edge between TRIE char node and data node */ fprintf(f, "\"%p\" -> \"%p\";\n", root, v); /* Parameters */ - // TODO reenable this, but currently v->val is a TRIE, - // which I currently can't itterate over LLIST(strbuf)* keys = KEYS(TRIE(param_set))(&v->val); - // FOR(TRIE, param_set, p, &v->val) { FOR(LLIST, strbuf, key, keys) { param_set* p = GET(TRIE(param_set))(&v->val, key->mem); - // strbuf* param_key = &p->key; fprintf(f, "\"%p\" [label=\"%s\" color=blue];\n", key, key->mem); + /* Edge between data node and param key node */ fprintf(f, "\"%p\" -> \"%p\";", v, key); FOR(LLIST, strbuf, str, p) { fprintf(f, "\"%p\" [label=\"%s\" color=orange];", str, str->mem); + /* Edge between param key node and param value node */ fprintf(f, "\"%p\" -> \"%p\";", key, str); } } } } #endif - // ---------------------------------------- while (child != NULL) { -- cgit v1.2.3