Added binary and unicode file i/o support to msvcrt.
[reactos.git] / reactos / lib / msvcrt / search / lfind.c
1 #include <msvcrt/search.h>
2 #include <msvcrt/stdlib.h>
3
4
5 void *_lfind(const void *key, const void *base, size_t *nelp,
6 size_t width, int (*compar)(const void *, const void *))
7 {
8 char *char_base = (char *)base;
9 int i;
10
11 for (i = 0; i < *nelp; i++) {
12 if (compar(key,char_base) == 0)
13 return char_base;
14 char_base += width;
15 }
16 return NULL;
17 }
18