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 @@
# include <config.h>
#endif
#include <sys/cdefs.h>
#include <assert.h>
#include <stdlib.h>
......@@ -26,7 +25,7 @@ void *
tdelete(vkey, vrootp, compar)
const void *vkey; /* key to be deleted */
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 *p, *q, *r;
......
......@@ -20,7 +20,6 @@
// Do not implement tdestroy if that's the only missing t* function
#ifndef HAVE_SEARCH_H
#include <sys/cdefs.h>
#include <assert.h>
#include <stdlib.h>
......
......@@ -17,7 +17,6 @@
# include <config.h>
#endif
#include <sys/cdefs.h>
#include <assert.h>
#include <stdlib.h>
......@@ -26,7 +25,7 @@ void *
tfind(vkey, vrootp, compar)
const void *vkey; /* key to be found */
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;
......
......@@ -17,7 +17,6 @@
# include <config.h>
#endif
#include <sys/cdefs.h>
#include <assert.h>
#include <stdlib.h>
......@@ -26,7 +25,7 @@ void *
tsearch(vkey, vrootp, compar)
const void *vkey; /* key to be located */
void **vrootp; /* address of tree root */
int (*compar) __P((const void *, const void *));
int (*compar) (const void *, const void *);
{
node_t *q;
node_t **rootp = (node_t **)vrootp;
......
......@@ -17,18 +17,17 @@
# include <config.h>
#endif
#include <sys/cdefs.h>
#include <assert.h>
#include <stdlib.h>
static void trecurse __P((const node_t *,
void (*action)(const void *, VISIT, int), int level));
static void trecurse (const node_t *,
void (*action)(const void *, VISIT, int), int level);
/* Walk the nodes of a tree */
static void
trecurse(root, action, level)
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;
{
assert(root != NULL);
......@@ -51,7 +50,7 @@ trecurse(root, action, level)
void
twalk(vroot, action)
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)
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