comparison paper/src/insert.c @ 16:958634b9fa32

make paper directory
author Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
date Wed, 17 Feb 2016 16:59:46 +0900
parents src/insert.c@2d6755608f67
children
comparison
equal deleted inserted replaced
15:94c9c506bba9 16:958634b9fa32
1 // Code Gear
2 __code insertCase2(struct Context* context, struct Node* current) {
3 struct Node* parent;
4 stack_pop(context->node_stack, &parent);
5
6 if (parent->color == Black) {
7 stack_pop(context->code_stack, &context->next);
8 goto meta(context, context->next);
9 }
10
11 stack_push(context->node_stack, &parent);
12 goto meta(context, InsertCase3);
13 }
14
15 // Meta Code Gear(stub)
16 __code insert2_stub(struct Context* context) {
17 goto insertCase2(context, context->data[Traverse]->traverse.current);
18 }