Performs a linear search for a specified value in an unsorted array, appending the value to the array if not found.
#include <search.h>
char *lsearch (
    const void *key, 
    const void *base,  
    unsigned int *num, 
    unsigned int width, 
    int (*compare) (
        const void *elem1, const void *elem2
    )
);
key 
base 
num 
width 
compare 
elem1 and elem2, and returns a value specifying their relationship. 
elem1 
elem2 
lsearch calls the compare routine one or more times during the search, passing pointers to two array elements on each call. This routine must compare the elements, then return a non-0 value if the elements are different, or 0 if the elements are identical.
key. 
| Versions | Defined in | Include | Link to | 
|---|---|---|---|
| INtime 3.0 | intime/rt/include/search.h | search.h | clib.lib |