comparison src/llrb/llrbContext.c @ 27:44879c87c2dc

modify
author Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
date Fri, 01 May 2015 18:18:36 +0900
parents 7494c0b87ec4
children 44914699ee9b
comparison
equal deleted inserted replaced
26:06fcbe45e85c 27:44879c87c2dc
15 extern __code compare(struct Context*); 15 extern __code compare(struct Context*);
16 extern __code insert(struct Context*); 16 extern __code insert(struct Context*);
17 extern __code rotateLeft(struct Context*); 17 extern __code rotateLeft(struct Context*);
18 extern __code rotateRight(struct Context*); 18 extern __code rotateRight(struct Context*);
19 extern __code colorFlip(struct Context*); 19 extern __code colorFlip(struct Context*);
20 extern __code fixUp(struct Context*);
20 extern __code changeReference(struct Context*); 21 extern __code changeReference(struct Context*);
21 extern __code exit_code(struct Context*); 22 extern __code exit_code(struct Context*);
22 23
23 __code initLLRBContext(struct Context* context) { 24 __code initLLRBContext(struct Context* context) {
24 context->dataSize = sizeof(union Data)*ALLOCATE_SIZE; 25 context->dataSize = sizeof(union Data)*ALLOCATE_SIZE;
39 context->code[Compare] = compare; 40 context->code[Compare] = compare;
40 context->code[Insert] = insert; 41 context->code[Insert] = insert;
41 context->code[RotateL] = rotateLeft; 42 context->code[RotateL] = rotateLeft;
42 context->code[RotateR] = rotateRight; 43 context->code[RotateR] = rotateRight;
43 context->code[ColorFlip] = colorFlip; 44 context->code[ColorFlip] = colorFlip;
45 context->code[FixUp] = fixUp;
44 context->code[ChangeRef] = changeReference; 46 context->code[ChangeRef] = changeReference;
45 context->code[Exit] = exit_code; 47 context->code[Exit] = exit_code;
46 48
47 context->heap = context->heap_start; 49 context->heap = context->heap_start;
48 50