ReactOS 0.4.16-dev-320-g3bd9ddc
lsearch.c File Reference
#include <stdlib.h>
#include <string.h>
#include <search.h>
Include dependency graph for lsearch.c:

Go to the source code of this file.

Functions

void *__cdecl _lsearch (const void *key, void *base, unsigned int *nelp, unsigned int width, int(__cdecl *compar)(const void *, const void *))
 

Function Documentation

◆ _lsearch()

void *__cdecl _lsearch ( const void key,
void base,
unsigned int nelp,
unsigned int  width,
int(__cdecl *compar)(const void *, const void *)   
)

Definition at line 8 of file lsearch.c.

10{
11 void *ret_find = _lfind(key,base,nelp,width,compar);
12
13 if (ret_find != NULL)
14 return ret_find;
15
16 memcpy((void*)((int*)base + (*nelp*width)), key, width);
17
18 (*nelp)++;
19 return base;
20}
#define NULL
Definition: types.h:112
GLint GLint GLsizei width
Definition: gl.h:1546
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
void * _lfind(const void *match, const void *start, unsigned int *array_size, unsigned int elem_size, int(*cf)(const void *, const void *))
Definition: copy.c:22