SYNOPSIS
#include <search.h>
void *lfind(const void *key, void *base, size_t *nelp, size_t width, int (*compar)(const void *, const void *));
DESCRIPTION
The
All comparisons are done with a user-supplied routine, compar. This routine is called with two arguments, the pointers to the elements being compared. It returns an integer less than, equal to, or greater than 0, according to whether the first argument is to be considered less than, equal to, or greater than the second argument. The comparison function need not compare every byte, so arbitrary data may be contained in the elements in addition to the values being compared.
PARAMETERS
- key
-
Points to an entry containing the key that specifies the entry to find in the table.
- base
-
Points to the first entry in the table to be searched.
- nelp
-
Points to an integer that specifies the current number of entries in the table to be searched. This integer is incremented whenever an entry is added to the table.
- width
-
Specifies the size of each entry, in bytes.
- compar
-
Is the comparator function.
RETURN VALUES
If an entry in the table
matches the key,
CONFORMANCE
UNIX 98
MULTITHREAD SAFETY LEVEL
MT-Safe.
PORTING ISSUES
None.
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
PTC MKS Toolkit 10.4 Documentation Build 39.