view src/btree_mem_test.c @ 17:36561a63330a

initial btree in memory
author Eris Caffee<discordia@eldalin.com>
date Tue, 16 Oct 2012 19:57:23 -0500
parents
children ef2c6a831fb9
line source
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <string.h>
5 #include "btree_mem.h"
7 int
8 cmp(void * a, void * b)
9 {
10 return strcmp(a, b);
11 }
13 int
14 main(int argc, char ** argv)
15 {
16 struct btree_mem * bt = btree_mem_new(2, cmp);
17 if (NULL == bt)
18 {
19 fprintf(stderr, "Unable to create new btree_mem\n");
20 exit(EXIT_FAILURE);
21 }
22 exit(EXIT_SUCCESS);
23 }