2 * This file lifted in toto from 'Dlibs' on the atari ST (RdeBath)
5 * Dale Schumacher 399 Beacon Ave.
6 * (alias: Dalnefre') St. Paul, MN 55104
7 * dal@syntel.UUCP United States of America
8 * "It's not reality that's important, but how you perceive things."
18 void *lfind(const void *key
, const void *base
, size_t *nmemb
,
19 size_t size
, int (*compar
)(const void *, const void *))
21 register int n
= *nmemb
;
24 if ((*compar
) (key
, base
) == 0)
30 libc_hidden_def(lfind
)
37 void *lsearch(const void *key
, void *base
, size_t *nmemb
,
38 size_t size
, int (*compar
)(const void *, const void *))
42 if ((p
= lfind(key
, base
, nmemb
, size
, compar
)) == NULL
) {
43 p
= memcpy((base
+ (size
* (*nmemb
))), key
, size
);