Mercurial > hg > Papers > 2018 > nozomi-master
annotate paper/src/insertCase2.c @ 71:b0cfef1cd89f
Add sample source
author | atton <atton@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 06 Feb 2017 10:15:16 +0900 |
parents | 5510bb043a74 |
children |
rev | line source |
---|---|
26 | 1 __code insertCase2(struct Context* context, struct Node* current) { |
2 struct Node* parent; | |
3 stack_pop(context->node_stack, &parent); | |
4 | |
5 if (parent->color == Black) { | |
6 stack_pop(context->code_stack, &context->next); | |
7 goto meta(context, context->next); | |
8 } | |
9 | |
10 stack_push(context->node_stack, &parent); | |
11 goto meta(context, InsertCase3); | |
12 } | |
13 | |
14 __code insert2_stub(struct Context* context) { | |
15 goto insertCase2(context, context->data[Tree]->tree.current); | |
16 } | |
17 |