diff options
Diffstat (limited to 'libc/misc/search/_tsearch.c')
| -rw-r--r-- | libc/misc/search/_tsearch.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/libc/misc/search/_tsearch.c b/libc/misc/search/_tsearch.c index 3d43aa543..fe9eedfa9 100644 --- a/libc/misc/search/_tsearch.c +++ b/libc/misc/search/_tsearch.c @@ -13,8 +13,7 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +not, see <http://www.gnu.org/licenses/>. */ /* * Tree search generalized from Knuth (6.2.2) Algorithm T just like @@ -50,8 +49,7 @@ register node **rootp; address of tree root int (*compar)(); ordering function */ -libc_hidden_proto(tsearch) -void *tsearch(__const void *key, void **vrootp, __compar_fn_t compar) +void *tsearch(const void *key, void **vrootp, __compar_fn_t compar) { register node *q; register node **rootp = (node **) vrootp; @@ -81,8 +79,7 @@ libc_hidden_def(tsearch) #endif #ifdef L_tfind -libc_hidden_proto(tfind) -void *tfind(__const void *key, void * __const *vrootp, __compar_fn_t compar) +void *tfind(const void *key, void * const *vrootp, __compar_fn_t compar) { register node **rootp = (node **) vrootp; @@ -109,7 +106,7 @@ char *key; key to be deleted register node **rootp; address of the root of tree int (*compar)(); comparison function */ -void *tdelete(__const void *key, void ** vrootp, __compar_fn_t compar) +void *tdelete(const void *key, void ** vrootp, __compar_fn_t compar) { node *p; register node *q; @@ -159,7 +156,7 @@ register node *root; Root of the tree to be walked register void (*action)(); Function to be called at each node register int level; */ -static void trecurse(__const void *vroot, __action_fn_t action, int level) +static void trecurse(const void *vroot, __action_fn_t action, int level) { register node *root = (node *) vroot; @@ -182,9 +179,9 @@ node *root; Root of the tree to be walked void (*action)(); Function to be called at each node PTR */ -void twalk(__const void *vroot, __action_fn_t action) +void twalk(const void *vroot, __action_fn_t action) { - register __const node *root = (node *) vroot; + register const node *root = (node *) vroot; if (root != (node *)0 && action != (__action_fn_t) 0) trecurse(root, action, 0); @@ -208,7 +205,6 @@ tdestroy_recurse (node *root, __free_fn_t freefct) free (root); } -libc_hidden_proto(tdestroy) void tdestroy (void *vroot, __free_fn_t freefct) { node *root = (node *) vroot; |
