From b7b6294d87eb3b43c24e4ab71e47fbf7f2138961 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 15 Jul 2012 21:09:13 +0900 Subject: [PATCH] Fix some dag printing goofs. Typo and no node recursion. --- tools/qfcc/source/dot_dag.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tools/qfcc/source/dot_dag.c b/tools/qfcc/source/dot_dag.c index 2f4355fa0..7b0a7cd92 100644 --- a/tools/qfcc/source/dot_dag.c +++ b/tools/qfcc/source/dot_dag.c @@ -55,22 +55,28 @@ print_node (dstring_t *dstr, dagnode_t *node) dasprintf (dstr, " \"dag_%p\" [label=\"bad node\"];\n", node); return; } - if (node->a) + if (node->a) { dasprintf (dstr, " \"dag_%p\" -> \"dag_%p\" [label=a];\n", node, node->a); - if (node->b) + print_node (dstr, node->a); + } + if (node->b) { dasprintf (dstr, " \"dag_%p\" -> \"dag_%p\" [label=b];\n", node, node->b); - if (node->c) + print_node (dstr, node->b); + } + if (node->c) { dasprintf (dstr, " \"dag_%p\" -> \"dag_%p\" [label=c];\n", node, node->c); + print_node (dstr, node->c); + } dasprintf (dstr, " \"dag_%p\" [%slabel=\"%s\"];\n", node, node->a ? "" : "shape=none,", daglabel_string (node->label)); if (node->identifiers) { daglabel_t *id; dasprintf (dstr, " \"dag_%p\" -> \"dagid_%p\";\n", node, node); - dasprintf (dstr, " \"dagid_%p\" [shap=none,label=<\n", node); + dasprintf (dstr, " \"dagid_%p\" [shape=none,label=<\n", node); dasprintf (dstr, " \n"); dasprintf (dstr, " \n");