xref: /reactos/sdk/lib/crt/search/lfind.c (revision 1734f297)
1 #include <stdlib.h>
2 #include <search.h>
3 
4 /*
5  * @implemented
6  */
7 void * __cdecl _lfind(const void *key, const void *base, unsigned int *nelp,
8          unsigned int width, int (__cdecl *compar)(const void *, const void *))
9 {
10 	char* char_base = (char*)base;
11 	unsigned int i;
12 
13     for (i = 0; i < *nelp; i++) {
14 		if (compar(key, char_base) == 0)
15 			return char_base;
16 		char_base += width;
17 	}
18 	return NULL;
19 }
20 
21 
22