reactos/lib/sdk/crt/search/lfind.c
Art Yerkes c501d8112c Create a branch for network fixes.
svn path=/branches/aicom-network-fixes/; revision=34994
2008-08-01 11:32:26 +00:00

22 lines
377 B
C

#include <search.h>
#include <stdlib.h>
/*
* @implemented
*/
void *_lfind(const void *key, const void *base, size_t *nelp,
size_t width, int (*compar)(const void *, const void *))
{
char* char_base = (char*)base;
unsigned int i;
for (i = 0; i < *nelp; i++) {
if (compar(key, char_base) == 0)
return char_base;
char_base += width;
}
return NULL;
}