Deleted Added
full compact
tsearch.c (226031) tsearch.c (226128)
1/*
2 * Tree search generalized from Knuth (6.2.2) Algorithm T just like
3 * the AT&T man page says.
4 *
5 * The node_t structure is for internal use only, lint doesn't grok it.
6 *
7 * Written by reading the System V Interface Definition, not the code.
8 *

--- 99 unchanged lines hidden (view full) ---

108/*
109 * delete node with given key
110 *
111 * vkey: key to be deleted
112 * vrootp: address of the root of the tree
113 * compar: function to carry out node comparisons
114 */
115ROKEN_LIB_FUNCTION void *
1/*
2 * Tree search generalized from Knuth (6.2.2) Algorithm T just like
3 * the AT&T man page says.
4 *
5 * The node_t structure is for internal use only, lint doesn't grok it.
6 *
7 * Written by reading the System V Interface Definition, not the code.
8 *

--- 99 unchanged lines hidden (view full) ---

108/*
109 * delete node with given key
110 *
111 * vkey: key to be deleted
112 * vrootp: address of the root of the tree
113 * compar: function to carry out node comparisons
114 */
115ROKEN_LIB_FUNCTION void *
116rk_tdelete(const void * __restrict vkey, void ** __restrict vrootp,
116rk_tdelete(const void * vkey, void ** vrootp,
117 int (*compar)(const void *, const void *))
118{
119 node_t **rootp = (node_t **)vrootp;
120 node_t *p, *q, *r;
121 int cmp;
122
123 if (rootp == NULL || (p = *rootp) == NULL)
124 return NULL;

--- 56 unchanged lines hidden ---
117 int (*compar)(const void *, const void *))
118{
119 node_t **rootp = (node_t **)vrootp;
120 node_t *p, *q, *r;
121 int cmp;
122
123 if (rootp == NULL || (p = *rootp) == NULL)
124 return NULL;

--- 56 unchanged lines hidden ---