HP-UX Reference (11i v1 05/09) - 3 Library Functions A-M (vol 6)

l
lsearch(3C) lsearch(3C)
ELSIZE, strcmp);
...
RETURN VALUE
If the searched-for datum is found, both lsearch()
and lfind() return a pointer to it. Otherwise,
lfind() returns NULL and lsearch() returns a pointer to the newly added element.
WARNINGS
Undefined results can occur if there is not enough room in the table to add a new item.
SEE ALSO
bsearch(3C), hsearch(3C), tsearch(3C), thread_safety(5).
STANDARDS CONFORMANCE
lsearch(): AES, SVID2, SVID3, XPG2, XPG3, XPG4
lfind(): AES, SVID2, SVID3, XPG2, XPG3, XPG4
Section 3540 Hewlett-Packard Company 2 HP-UX 11i Version 1: September 2005