Mercurial > hg > Gears > GearsAgda
view src/llrb/compare.c @ 76:7ad6d1502a03
refactoring
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 17 Nov 2015 16:59:48 +0900 |
parents | 368306e1bfed |
children | dc6f665bb753 |
line wrap: on
line source
#include "llrbContext.h" void compare(struct Context* context, struct Tree* tree, int key1, int key2) { if (key1 == key2) { tree->result = 0; } else if (key1 < key2) { tree->result = 1; } else { tree->result = -1; } }