diff options
Diffstat (limited to 'newlib/libc/search')
-rw-r--r-- | newlib/libc/search/hcreate.c | 8 | ||||
-rw-r--r-- | newlib/libc/search/tdelete.c | 8 | ||||
-rw-r--r-- | newlib/libc/search/tdestroy.c | 4 | ||||
-rw-r--r-- | newlib/libc/search/tfind.c | 8 | ||||
-rw-r--r-- | newlib/libc/search/tsearch.c | 8 | ||||
-rw-r--r-- | newlib/libc/search/twalk.c | 6 |
6 files changed, 23 insertions, 19 deletions
diff --git a/newlib/libc/search/hcreate.c b/newlib/libc/search/hcreate.c index 78b854ea6..095e1f208 100644 --- a/newlib/libc/search/hcreate.c +++ b/newlib/libc/search/hcreate.c @@ -58,19 +58,21 @@ __RCSID("$NetBSD: hcreate.c,v 1.2 2001/02/19 21:26:04 ross Exp $"); static struct hsearch_data htab; int -hcreate(size_t nel) +_DEFUN(hcreate, (nel), size_t nel) { return hcreate_r (nel, &htab); } void -hdestroy(void) +_DEFUN_VOID (hdestroy) { hdestroy_r (&htab); } ENTRY * -hsearch(ENTRY item, ACTION action) +_DEFUN(hsearch, (item, action), + ENTRY item _AND + ACTION action) { ENTRY *retval; diff --git a/newlib/libc/search/tdelete.c b/newlib/libc/search/tdelete.c index e849ada81..e75659913 100644 --- a/newlib/libc/search/tdelete.c +++ b/newlib/libc/search/tdelete.c @@ -26,10 +26,10 @@ __RCSID("$NetBSD: tdelete.c,v 1.2 1999/09/16 11:45:37 lukem Exp $"); /* delete node with given key */ void * -tdelete(vkey, vrootp, compar) - const void *vkey; /* key to be deleted */ - void **vrootp; /* address of the root of tree */ - int (*compar)(const void *, const void *); +_DEFUN(tdelete, (vkey, vrootp, compar), + const void *vkey _AND /* key to be deleted */ + void **vrootp _AND /* address of the root of tree */ + int (*compar)(const void *, const void *)) { node_t **rootp = (node_t **)vrootp; node_t *p, *q, *r; diff --git a/newlib/libc/search/tdestroy.c b/newlib/libc/search/tdestroy.c index 2f8aae695..3e7327c4d 100644 --- a/newlib/libc/search/tdestroy.c +++ b/newlib/libc/search/tdestroy.c @@ -40,7 +40,9 @@ trecurse(root, free_action) } void -tdestroy (void *vrootp, void (*freefct)(void *)) +_DEFUN(tdestroy, (vrootp, freefct), + void *vrootp _AND + void (*freefct)(void *)) { node_t *root = (node_t *) vrootp; diff --git a/newlib/libc/search/tfind.c b/newlib/libc/search/tfind.c index 36c90a1cd..5d7c40c93 100644 --- a/newlib/libc/search/tfind.c +++ b/newlib/libc/search/tfind.c @@ -25,10 +25,10 @@ __RCSID("$NetBSD: tfind.c,v 1.2 1999/09/16 11:45:37 lukem Exp $"); /* find a node, or return 0 */ void * -tfind(vkey, vrootp, compar) - const void *vkey; /* key to be found */ - void **vrootp; /* address of the tree root */ - int (*compar)(const void *, const void *); +_DEFUN(tfind, (vkey, vrootp, compar), + const void *vkey _AND /* key to be found */ + void **vrootp _AND /* address of the tree root */ + int (*compar)(const void *, const void *)) { node_t **rootp = (node_t **)vrootp; diff --git a/newlib/libc/search/tsearch.c b/newlib/libc/search/tsearch.c index cda16992e..5f41b407d 100644 --- a/newlib/libc/search/tsearch.c +++ b/newlib/libc/search/tsearch.c @@ -25,10 +25,10 @@ __RCSID("$NetBSD: tsearch.c,v 1.3 1999/09/16 11:45:37 lukem Exp $"); /* find or insert datum into search tree */ void * -tsearch(vkey, vrootp, compar) - const void *vkey; /* key to be located */ - void **vrootp; /* address of tree root */ - int (*compar)(const void *, const void *); +_DEFUN(tsearch, (vkey, vrootp, compar), + const void *vkey _AND /* key to be located */ + void **vrootp _AND /* address of tree root */ + int (*compar)(const void *, const void *)) { node_t *q; node_t **rootp = (node_t **)vrootp; diff --git a/newlib/libc/search/twalk.c b/newlib/libc/search/twalk.c index 020e5d5ea..74ad5a615 100644 --- a/newlib/libc/search/twalk.c +++ b/newlib/libc/search/twalk.c @@ -49,9 +49,9 @@ trecurse(root, action, level) /* Walk the nodes of a tree */ void -twalk(vroot, action) - const void *vroot; /* Root of the tree to be walked */ - void (*action)(const void *, VISIT, int); +_DEFUN(twalk, (vroot, action), + const void *vroot _AND /* Root of the tree to be walked */ + void (*action)(const void *, VISIT, int)) { if (vroot != NULL && action != NULL) trecurse(vroot, action, 0); |