]> git.cameronkatri.com Git - mandoc.git/blob - test-ohash.c
improve homebrew cellar config example
[mandoc.git] / test-ohash.c
1 #include <stdint.h>
2 #include <stddef.h>
3 #include <stdlib.h>
4 #include <ohash.h>
5
6 void *xmalloc(size_t sz, void *arg) { return(calloc(1,sz)); }
7 void *xcalloc(size_t nmemb, size_t sz, void *arg) { return(calloc(nmemb,sz)); }
8 void xfree(void *p, void *arg) { free(p); }
9
10 int
11 main(void)
12 {
13 struct ohash h;
14 struct ohash_info i;
15 i.alloc = xmalloc;
16 i.calloc = xcalloc;
17 i.free = xfree;
18 ohash_init(&h, 2, &i);
19 ohash_delete(&h);
20 return 0;
21 }