lsearch man page on Minix

Man page or keyword search:  
man Server   6208 pages
apropos Keyword Search (all sections)
Output format
Minix logo
[printable version]

LSEARCH(3)		 BSD Library Functions Manual		    LSEARCH(3)

NAME
     lsearch, lfind — linear searching routines

LIBRARY
     Standard C Library (libc, -lc)

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 *));

DESCRIPTION
     The functions lsearch(), and lfind() provide basic linear searching func‐
     tionality.

     base is the pointer to the beginning of an array.	The argument nelp is
     the current number of elements in the array, where each element is width
     bytes long.  The compar argument points to a function which compares its
     two arguments and returns zero if they are matching, and non-zero other‐
     wise.

     The lsearch() and lfind() functions return a pointer into the array ref‐
     erenced by base where key is located.  If key does not exist, lfind()
     will return a null pointer and lsearch() will add it to the array.	 When
     an element is added to the array by lsearch() the location referenced by
     the argument nelp is incremented by one.

SEE ALSO
     bsearch(3), db(3)

STANDARDS
     The lsearch() and lfind() functions conform to IEEE Std 1003.1-2001
     (“POSIX.1”).

BSD				 July 6, 2005				   BSD
[top]

List of man pages available for Minix

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net