X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Fecoli_node.c;h=abc3e7699b22d511a59a38f40079cd666e51110d;hb=9ea36377cc6557fd9d40d02f45fd02a0c7dec877;hp=f8c6c02b0bf6aa26a41dc05eb520ad231dad05c1;hpb=1ceb5917fd1b73c42d2ad535a0a65e645d6b4dbe;p=protos%2Flibecoli.git diff --git a/lib/ecoli_node.c b/lib/ecoli_node.c index f8c6c02..abc3e76 100644 --- a/lib/ecoli_node.c +++ b/lib/ecoli_node.c @@ -259,34 +259,25 @@ const char *ec_node_id(const struct ec_node *node) static void __ec_node_dump(FILE *out, const struct ec_node *node, size_t indent) { - const char *id, *typename, *desc; + const char *id, *typename; struct ec_node *child; size_t i, n; id = ec_node_id(node); typename = node->type->name; - desc = ec_node_desc(node); - - /* XXX enhance */ - for (i = 0; i < indent; i++) { - if (i % 2) - fprintf(out, " "); - else - fprintf(out, "|"); - } - fprintf(out, "node %p type=%s id=%s desc=%s ", - node, typename, id, desc); + fprintf(out, "%*s" "type=%s id=%s %p\n", + (int)indent * 4, "", typename, id, node); n = node->n_children; for (i = 0; i < n; i++) { child = node->children[i]; - __ec_node_dump(out, child, indent + 2); + __ec_node_dump(out, child, indent + 1); } } void ec_node_dump(FILE *out, const struct ec_node *node) { - fprintf(out, "------------------- node dump:\n"); //XXX + fprintf(out, "------------------- node dump:\n"); if (node == NULL) { fprintf(out, "node is NULL\n");