lfind (SunOS) lfind (SunOS)
NAME
lfind
LIBRARY
Standard C Library (libc.a)
SUN OS SYNOPSIS
#include <search.h>
char *lsearch(
char *key,
char *base,
unsigned int *nelp,
unsigned int width,
int (*compar) ( ));
char *lfind(
char *key,
char *base,
unsigned int *nelp,
unsigned int width,
int (*compar) ( ));
DIGITAL UNIX SYNOPSIS
#include <search.h>
void *lsearch(
const void *key,
void *base,
size_t *nelp,
size_t width,
int (*compar) (const void *, const void *));
void *lfind(
const void *key,
const void *base,
size_t *nelp,
size_t width,
int (*compar) (const void *, const void *));
PARAMETERS
Points to an entry containing the key that specifies the entry to be
searched for in the table. Points to the first entry in the table to
be searched. Points to an integer that specifies the number of entries
in the table to be searched. This integer is incremented whenever an
entry is added to the table. Specifies the size of each entry, in
bytes. Points to the user-specified function to be used for comparing
two table entries (strcmp(), for example). This function must return 0
(zero) when called with arguments that point to entries whose keys com‐
pare equal, and nonzero otherwise.
DIFFERENCES
Requires sys/types.h instead of stdio.h.
Declaration changes for lfind(): return value is void*, key to void*,
base to void*, help to size_t, and width to size_t.
Declaration changes for lsearch(): return value is void*, key to const
void*, base to void*, help to size_t, and width to size_t.
RELATED INFORMATION
Digital UNIX Functions:
lfind(3) delim off
lfind (SunOS)