=================================================================== RCS file: /cvs/mandoc/test-ohash.c,v retrieving revision 1.2 retrieving revision 1.4 diff -u -p -r1.2 -r1.4 --- mandoc/test-ohash.c 2012/06/09 11:02:55 1.2 +++ mandoc/test-ohash.c 2015/10/06 18:32:20 1.4 @@ -3,16 +3,18 @@ #include #include -void *xalloc(size_t sz, void *arg) { return(calloc(sz,1)); } -void xfree(void *p, size_t sz, void *arg) { free(p); } +void *xmalloc(size_t sz, void *arg) { return calloc(1,sz); } +void *xcalloc(size_t nmemb, size_t sz, void *arg) { return calloc(nmemb,sz); } +void xfree(void *p, void *arg) { free(p); } int main(void) { struct ohash h; struct ohash_info i; - i.halloc = i.alloc = xalloc; - i.hfree = xfree; + i.alloc = xmalloc; + i.calloc = xcalloc; + i.free = xfree; ohash_init(&h, 2, &i); ohash_delete(&h); return 0;