view 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
line wrap: on
line source

// Code Gear
__code insertCase2(struct Context* context, struct Node* current) {
    struct Node* parent;
    stack_pop(context->node_stack, &parent);
    
    if (parent->color == Black) {
        stack_pop(context->code_stack, &context->next);
        goto meta(context, context->next);
    }
    
    stack_push(context->node_stack, &parent);
    goto meta(context, InsertCase3);
}

// Meta Code Gear(stub)
__code insert2_stub(struct Context* context) {
    goto insertCase2(context, context->data[Traverse]->traverse.current);
}