view src/llrb/compare.c @ 69:368306e1bfed

llrb deletion(not work).
author Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
date Tue, 20 Oct 2015 16:22:42 +0900
parents
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;
    }
}