summaryrefslogtreecommitdiff
path: root/src/libdatastruct/avltreen_init.c
blob: 5e141b1c062e6dab2e6fe17ecbd74d91db5f2cc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* ISC license. */

#include <skalibs/functypes.h>
#include <skalibs/genset.h>
#include <skalibs/avlnode.h>
#include <skalibs/avltreen.h>

void avltreen_init (avltreen_ref t, avlnode_ref storage, unsigned int *freelist, unsigned int size, dtokfunc_t_ref dtok, cmpfunc_t_ref f, void *p)
{
  GENSET_init(&t->x, avlnode, storage, freelist, size) ;
  t->root = size ;
  t->dtok = dtok ;
  t->kcmp = f ;
  t->external = p ;
}