ReactOS  0.4.15-dev-499-g1f31905
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 }
GLint GLint GLsizei width
Definition: gl.h:1546
GLuint base
Definition: 3dtext.c:35
void * _lfind(const void *match, const void *start, unsigned int *array_size, unsigned int elem_size, int(*cf)(const void *, const void *))
smooth NULL
Definition: ftsmooth.c:416
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
Definition: path.c:41