aboutsummaryrefslogtreecommitdiff
path: root/graphs.c
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-02-26 16:34:55 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2019-02-26 16:34:55 +0100
commit7182d6b23eed1d327a7126ed21f382602d1ecf78 (patch)
tree7bef303d877ef893e5b409118d43716a84bc1809 /graphs.c
parentFix graph output. (diff)
downloadcalp-7182d6b23eed1d327a7126ed21f382602d1ecf78.tar.gz
calp-7182d6b23eed1d327a7126ed21f382602d1ecf78.tar.xz
Minor graphs.c cleanup.
Diffstat (limited to 'graphs.c')
-rw-r--r--graphs.c8
1 files changed, 3 insertions, 5 deletions
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) {