Mercurial > hg > Gears > GearsAgda
view src/llrb/llrbContext.h @ 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
/* Context definition for llrb example */ enum Code { Code1, Code2, Allocate, Put, Insert, Exit, }; enum Color { Red, Black, }; struct Context { int codeSize; __code (**code) (struct Context *); void* heap; union Data* root; union Data* current; int dataSize; union Data **data; }; union Data { struct Node { int key; int value; enum Color color; union Data* left; union Data* right; } node; struct Allocate { long size; enum Code next; enum Code after_put; int key; int value; } allocate; };