nonbinary-tree(TM) now works in a very minimal instance
This commit is contained in:
parent
330755591b
commit
b16590fd5a
15 changed files with 132 additions and 216 deletions
26
cli/main.c
26
cli/main.c
|
|
@ -7,40 +7,18 @@
|
|||
#include "cursetree.h"
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
struct crs_tree *tree;
|
||||
struct ct_tree *tree;
|
||||
ct_init(&tree);
|
||||
|
||||
init_pair(1, COLOR_CYAN, COLOR_CYAN);
|
||||
init_pair(2, COLOR_RED, COLOR_RED);
|
||||
|
||||
bifurcate_window_node(&tree->root, AXIS_X, FALSE, 0.5);
|
||||
// wbkgd(tree->root->child[0]->win, COLOR_PAIR(1));
|
||||
// wbkgd(tree->root->child[1]->win, COLOR_PAIR(2));
|
||||
// wrefresh(tree->root->child[0]->win);
|
||||
// wrefresh(tree->root->child[1]->win);
|
||||
|
||||
// wbkgd(tree->root->win, COLOR_PAIR(1));
|
||||
// wrefresh(tree->root->win);
|
||||
|
||||
int i = 1;
|
||||
while (1) {
|
||||
/* TODO: UNCOMMENT START */
|
||||
// wclear(tree->root->child[0]->win);
|
||||
// wclear(tree->root->child[1]->win);
|
||||
// wbkgd(tree->root->child[0]->win, COLOR_PAIR(i));
|
||||
// wbkgd(tree->root->child[1]->win, COLOR_PAIR(3 - i));
|
||||
|
||||
// wnoutrefresh(tree->root->child[0]->win);
|
||||
// wnoutrefresh(tree->root->child[1]->win);
|
||||
// doupdate();
|
||||
|
||||
// wrefresh(tree->root->child[0]->win);
|
||||
// wrefresh(tree->root->child[1]->win);
|
||||
i = 3 - i;
|
||||
/* TODO: UNCOMMENT END */
|
||||
|
||||
while (1) {
|
||||
ct_update(tree);
|
||||
// usleep(100000);
|
||||
}
|
||||
|
||||
destroy_tree(tree);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue