Beispiel #1
0
void *addpos234(tree234 *t, void *e, int index) {
    if (index < 0 ||		       
	t->cmp)			       
	return NULL;		       

    return add234_internal(t, e, index);  
}
Beispiel #2
0
void *add234(tree234 * t, void *e)
{
    if (!t->cmp)		       /* tree is unsorted */
	return NULL;

    return add234_internal(t, e, -1);
}
Beispiel #3
0
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 */
}
Beispiel #4
0
void *add234(tree234 *t, void *e) {
    if (!t->cmp)		       
	return NULL;

    return add234_internal(t, e, -1);
}