void *addpos234(tree234 *t, void *e, int index) { if (index < 0 || t->cmp) return NULL; return add234_internal(t, e, index); }
void *add234(tree234 * t, void *e) { if (!t->cmp) /* tree is unsorted */ return NULL; return add234_internal(t, e, -1); }
void *addpos234(tree234 *t, void *e, int index) { if (index < 0 || /* index out of range */ t->cmp) /* tree is sorted */ return NULL; /* return failure */ return add234_internal(t, e, index); /* this checks the upper bound */ }
void *add234(tree234 *t, void *e) { if (!t->cmp) return NULL; return add234_internal(t, e, -1); }