diff --git a/cli/tree.c b/cli/tree.c index 0c0b975..2db7063 100644 --- a/cli/tree.c +++ b/cli/tree.c @@ -207,28 +207,19 @@ static void collapse_abstract_node(struct crs_node **node, /* */ static struct crs_node *init_root_node(void) { - struct crs_nodedims rootdims; WINDOW *rootwin; - // rootdims = term_dims(); - // rootwin = new_window(rootdims.x, rootdims.y, - // rootdims.height, rootdims.height); - // rootwin = new_window(0, 0, 0, 0); rootwin = root_window(); return init_window_node(rootwin); } -int init_tree(struct crs_tree **const tree) { +int init_cursetree(struct crs_tree **const tree) { *tree = (struct crs_tree *)malloc(sizeof(struct crs_tree)); - /* Initialise NCurses Library & Standard Screen */ + /* Initialise NCurses Library & Root Node */ init_ncurses(); - (*tree)->root = init_root_node(); - // (*tree)->root = __alloc_node(NODE_WINDOW); - // crs_init(&(*tree)->root->win); - return EXIT_SUCCESS; } diff --git a/cli/tree.h b/cli/tree.h index c2263f1..b1a63d6 100644 --- a/cli/tree.h +++ b/cli/tree.h @@ -51,7 +51,7 @@ struct crs_tree { }; /* === External Interface === */ -int init_tree(struct crs_tree **const tree); +int init_cursetree(struct crs_tree **const tree); void destroy_tree(struct crs_tree *const tree); void resize_tree(struct crs_tree *const tree, struct crs_nodedims *const dims);