summaryrefslogtreecommitdiff
path: root/libc/misc/search/lsearch.c
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2006-01-14 00:58:03 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2006-01-14 00:58:03 +0000
commitaf0172162f7c653cad6a11ed1c1a5459bc154465 (patch)
tree70031dad1e7286d58762da7b9e3d3f93d043c278 /libc/misc/search/lsearch.c
parentc8609543a9a8bf6559c2931dbbef6b3c41b3fbf2 (diff)
hidden_def/hidden_proto: convert all users (I hope) termios split, add some missing headers, other jump relocs removed
Diffstat (limited to 'libc/misc/search/lsearch.c')
-rw-r--r--libc/misc/search/lsearch.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/libc/misc/search/lsearch.c b/libc/misc/search/lsearch.c
index 4071cf1ab..eefef2121 100644
--- a/libc/misc/search/lsearch.c
+++ b/libc/misc/search/lsearch.c
@@ -12,9 +12,11 @@
#include <stdio.h>
#include <search.h>
+libc_hidden_proto(lfind)
+
#ifdef L_lfind
-void attribute_hidden *__lfind(const void *key, const void *base, size_t *nmemb,
+void *lfind(const void *key, const void *base, size_t *nmemb,
size_t size, int (*compar)(const void *, const void *))
{
register int n = *nmemb;
@@ -26,22 +28,21 @@ void attribute_hidden *__lfind(const void *key, const void *base, size_t *nmemb,
}
return (NULL);
}
-strong_alias(__lfind,lfind)
+libc_hidden_def(lfind)
#endif
#ifdef L_lsearch
-extern void *__lfind (__const void *__key, __const void *__base,
- size_t *__nmemb, size_t __size, __compar_fn_t __compar) attribute_hidden;
+libc_hidden_proto(memcpy)
void *lsearch(const void *key, void *base, size_t *nmemb,
size_t size, int (*compar)(const void *, const void *))
{
register char *p;
- if ((p = __lfind(key, base, nmemb, size, compar)) == NULL) {
- p = __memcpy((base + (size * (*nmemb))), key, size);
+ if ((p = lfind(key, base, nmemb, size, compar)) == NULL) {
+ p = memcpy((base + (size * (*nmemb))), key, size);
++(*nmemb);
}
return (p);