Commit 8b02394e authored by Rémi Duraffort's avatar Rémi Duraffort

t* remove the dependence to cdefs.h

parent b983946d
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
# include <config.h> # include <config.h>
#endif #endif
#include <sys/cdefs.h>
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>
...@@ -26,7 +25,7 @@ void * ...@@ -26,7 +25,7 @@ void *
tdelete(vkey, vrootp, compar) tdelete(vkey, vrootp, compar)
const void *vkey; /* key to be deleted */ const void *vkey; /* key to be deleted */
void **vrootp; /* address of the root of tree */ void **vrootp; /* address of the root of tree */
int (*compar) __P((const void *, const void *)); int (*compar) (const void *, const void *);
{ {
node_t **rootp = (node_t **)vrootp; node_t **rootp = (node_t **)vrootp;
node_t *p, *q, *r; node_t *p, *q, *r;
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
// Do not implement tdestroy if that's the only missing t* function // Do not implement tdestroy if that's the only missing t* function
#ifndef HAVE_SEARCH_H #ifndef HAVE_SEARCH_H
#include <sys/cdefs.h>
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
# include <config.h> # include <config.h>
#endif #endif
#include <sys/cdefs.h>
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>
...@@ -26,7 +25,7 @@ void * ...@@ -26,7 +25,7 @@ void *
tfind(vkey, vrootp, compar) tfind(vkey, vrootp, compar)
const void *vkey; /* key to be found */ const void *vkey; /* key to be found */
const void **vrootp; /* address of the tree root */ const void **vrootp; /* address of the tree root */
int (*compar) __P((const void *, const void *)); int (*compar) (const void *, const void *);
{ {
node_t * const *rootp = (node_t * const*)vrootp; node_t * const *rootp = (node_t * const*)vrootp;
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
# include <config.h> # include <config.h>
#endif #endif
#include <sys/cdefs.h>
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>
...@@ -26,7 +25,7 @@ void * ...@@ -26,7 +25,7 @@ void *
tsearch(vkey, vrootp, compar) tsearch(vkey, vrootp, compar)
const void *vkey; /* key to be located */ const void *vkey; /* key to be located */
void **vrootp; /* address of tree root */ void **vrootp; /* address of tree root */
int (*compar) __P((const void *, const void *)); int (*compar) (const void *, const void *);
{ {
node_t *q; node_t *q;
node_t **rootp = (node_t **)vrootp; node_t **rootp = (node_t **)vrootp;
......
...@@ -17,18 +17,17 @@ ...@@ -17,18 +17,17 @@
# include <config.h> # include <config.h>
#endif #endif
#include <sys/cdefs.h>
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>
static void trecurse __P((const node_t *, static void trecurse (const node_t *,
void (*action)(const void *, VISIT, int), int level)); void (*action)(const void *, VISIT, int), int level);
/* Walk the nodes of a tree */ /* Walk the nodes of a tree */
static void static void
trecurse(root, action, level) trecurse(root, action, level)
const node_t *root; /* Root of the tree to be walked */ const node_t *root; /* Root of the tree to be walked */
void (*action) __P((const void *, VISIT, int)); void (*action) (const void *, VISIT, int);
int level; int level;
{ {
assert(root != NULL); assert(root != NULL);
...@@ -51,7 +50,7 @@ trecurse(root, action, level) ...@@ -51,7 +50,7 @@ trecurse(root, action, level)
void void
twalk(vroot, action) twalk(vroot, action)
const void *vroot; /* Root of the tree to be walked */ const void *vroot; /* Root of the tree to be walked */
void (*action) __P((const void *, VISIT, int)); void (*action) (const void *, VISIT, int);
{ {
if (vroot != NULL && action != NULL) if (vroot != NULL && action != NULL)
trecurse(vroot, action, 0); trecurse(vroot, action, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment