void *tdelete(const void *restrict key, void **restrict rootp,
int(*compar)(const void *, const void *))
{
+ if (!rootp)
+ return 0;
struct node *n = *rootp;
struct node *ret;
/* last argument is arbitrary non-null pointer
void *tfind(const void *key, void *const *rootp,
int(*compar)(const void *, const void *))
{
+ if (!rootp)
+ return 0;
return find(*rootp, key, compar);
}
{
struct node *update;
struct node *ret;
+ if (!rootp)
+ return 0;
update = insert(*rootp, key, compar, &ret);
if (update)
*rootp = update;