aboutsummaryrefslogtreecommitdiff
path: root/graphs.c
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 /graphs.c
parentCleanup. (diff)
downloadcalp-23e4967fd42a6a2bee5c44213be4df61ff546b13.tar.gz
calp-23e4967fd42a6a2bee5c44213be4df61ff546b13.tar.xz
WIP.
Diffstat (limited to 'graphs.c')
-rw-r--r--graphs.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/graphs.c b/graphs.c
index 8051b226..10d9cf98 100644
--- a/graphs.c
+++ b/graphs.c
@@ -117,21 +117,22 @@ int trie_to_dot_helper ( TRIE_NODE(T)* root, FILE* f ) {
/* Parameters */
// TODO reenable this, but currently v->val is a TRIE,
// which I currently can't itterate over
-#if 0
- FOR(LLIST, param_set, p, &v->val) {
- strbuf* param_key = &p->key;
+ 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",
- param_key, param_key->mem);
- fprintf(f, "\"%p\" -> \"%p\";", p, param_key);
+ key, key->mem);
+ fprintf(f, "\"%p\" -> \"%p\";", p, key);
- FOR(LLIST, strbuf, str, &p->val) {
+ FOR(LLIST, strbuf, str, p) {
fprintf(f, "\"%p\" [label=\"%s\" color=orange];",
str, str->mem);
- fprintf(f, "\"%p\" -> \"%p\";", param_key, str);
+ fprintf(f, "\"%p\" -> \"%p\";", key, str);
}
}
-#endif
}
}
#endif