diff options
Diffstat (limited to 'src/libbio/phylo.c')
-rw-r--r-- | src/libbio/phylo.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libbio/phylo.c b/src/libbio/phylo.c index 41b0f04..1b0ae59 100644 --- a/src/libbio/phylo.c +++ b/src/libbio/phylo.c @@ -328,11 +328,11 @@ phylo·diameter(bio·Tree tree, int *len, bio·Node **path) sort·nodedists(n, fbuf, nbuf); path[0] = nbuf[n-1]; - printf("first end '%s'\n", path[0]->name); + fmt·print("first end '%s'\n", path[0]->name); n = phylo·getdistsfrom(path[0], n, fbuf, nbuf); sort·nodedists(n, fbuf, nbuf); - printf("second end '%s'\n", nbuf[n-1]->name); + fmt·print("second end '%s'\n", nbuf[n-1]->name); *len = 0; @@ -393,17 +393,17 @@ phylo·reroot(bio·Tree *tree, bio·Node *node, double d) // TODO: should check that node is part of this tree? // TODO: should we check if node->parent != nil? - if (fabs(d) < PREC) { + if(fabs(d) < PREC){ new = node; rotateparent(node->parent, node); - } else if (fabs(d-node->dist) < PREC) { + }else if(fabs(d-node->dist) < PREC){ new = node->parent; if (new->parent->parent) { rotateparent(new->parent->parent, new->parent); } - } else { + }else{ new = tree->mem.alloc(tree->heap, 1, sizeof(*new)); - memset(new, 0, sizeof(*new)); + mem·set(new, sizeof(*new), 0); phylo·addchild(new, node); node->parent = new; @@ -415,7 +415,7 @@ phylo·reroot(bio·Tree *tree, bio·Node *node, double d) node->parent->parent = new; } - printf("number of children on old root: %d\n", tree->root->nchild); + fmt·print("number of children on old root: %d\n", tree->root->nchild); tree->root = new; tree->nleaf = 0; |