Mercurial > hg > Gears > GearsAgda
diff src/llrb/main.c @ 73:2667c3251a00
implement llrb deletion
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 10 Nov 2015 10:21:37 +0900 |
parents | 5c4b9d116eda |
children | 618c03f25108 |
line wrap: on
line diff
--- a/src/llrb/main.c Tue Nov 10 01:59:04 2015 +0900 +++ b/src/llrb/main.c Tue Nov 10 10:21:37 2015 +0900 @@ -25,7 +25,7 @@ print_tree(node->left, n+1); for (int i=0;i<n;i++) printf(" "); - printf(/*"key=%d value=%d depth=%d */"color=%s\t%p\n", /*node->key, node->value, n, */node->color==0? "R":"B", node); + printf("key=%d value=%d color=%s\t%p\n", node->key, node->value,/* n, */node->color==0? "R":"B", node); print_tree(node->right, n+1); } } @@ -88,12 +88,11 @@ print_tree(context->data[Tree]->tree.root, 0); struct Node* node = &context->data[Node]->node; - node->key = 0; - node->value = 0; + node->key = 5; context->next = Code5; - goto meta(context, DeleteMax); + goto meta(context, Delete); } __code code5(struct Context* context) {