#include #include #include // ----------------------------------------------------------------------- // Arena allocator static mem·Arena* ARENA; static void* bio·alloc(ulong size) { return mem·arenaalloc(ARENA, size); } static void* bio·realloc(void *ptr, ulong size) { void* new = mem·arenaalloc(ARENA, size); memcpy(new, ptr, size); return new; } static void bio·free(void *ptr) { /* stub */ } static mem·Allocator arena = {.alloc = &bio·alloc, .realloc = &bio·realloc, .free = &bio·free }; // ----------------------------------------------------------------------- // Point of entry for testing void init() { ARENA = mem·newarena(mem·sys); } int main() { init(); bio·Tree t; Stream *fd; fd = io·open("/home/nolln/root/data/test/example.nwk", "r"); printf("starting\n"); t = bio·readnewick(fd, arena); io·close(fd); printf("ending\n"); return 0; }