#include /* * btree compare algorithm * * @a: entry * @b: entry * * return -1,0,<+diff> if a is lower, equal or greater than b */ __attribute__((pure)) int compare(const DBT * restrict a, const DBT * restrict b) { size_t *v1 = a->data; size_t *v2 = b->data; if (*v1 > *v2) return -1; if (*v1 == *v2) return 0; return 1; }