Mercurial > hg > GearsTemplate
view src/llrb/llrbContext.c @ 20:324c44f2076f
implement insert
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 28 Apr 2015 04:31:19 +0900 |
parents | 9302b1a48008 |
children | 737a900518be |
line wrap: on
line source
#include "llrbContext.h" extern __code code1(struct Context*); extern __code code2(struct Context*); extern __code meta(struct Context*); extern __code allocate(struct Context*); extern __code put(struct Context*); extern __code insert(struct Context*); extern __code exit_code(struct Context*); __code initLLRBContext(struct Context* context) { context->codeSize = 3; context->code[Code1] = code1; context->code[Code2] = code2; context->code[Allocate] = allocate; context->code[Put] = put; context->code[Insert] = insert; context->code[Exit] = exit_code; context->dataSize = 0; context->data[context->dataSize] = context->heap; context->heap += sizeof(struct Allocate); context->root = 0; context->current = 0; }