update for HEAD-2003091401
[reactos.git] / lib / msvcrt / search / lfind.c
1 #include <msvcrt/search.h>
2 #include <msvcrt/stdlib.h>
3
4
5 /*
6  * @implemented
7  */
8 void *_lfind(const void *key, const void *base, size_t *nelp,
9          size_t width, int (*compar)(const void *, const void *))
10 {
11         char* char_base = (char*)base;
12         int i;
13
14     for (i = 0; i < *nelp; i++) {
15                 if (compar(key, char_base) == 0)
16                         return char_base;
17                 char_base += width;
18         }
19         return NULL;
20 }
21