From fb4c4ceba416376751196cdbbdb5f7240e08a405 Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Wed, 22 Apr 2020 18:15:17 -0700 Subject: fix: bug squashing with newick parser --- sys/libbio/test.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'sys/libbio/test.c') diff --git a/sys/libbio/test.c b/sys/libbio/test.c index 00345c4..18bb993 100644 --- a/sys/libbio/test.c +++ b/sys/libbio/test.c @@ -47,14 +47,19 @@ main() { init(); + error err; bio·Tree t; - Stream *fd; + Stream *fd[2]; + + fd[0] = io·open("/home/nolln/root/data/test/example.nwk", "r"); + fd[1] = io·open("/home/nolln/root/data/test/example.proc.nwk", "w"); - fd = io·open("/home/nolln/root/data/test/example.nwk", "r"); printf("starting\n"); - t = bio·readnewick(fd, arena); - io·close(fd); + t = bio·readnewick(fd[0], arena); + err = bio·writenewick(t, fd[1]); printf("ending\n"); + + io·close(fd[0]); io·close(fd[1]); return 0; } -- cgit v1.2.1