lfind man page on Xenix

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

LSEARCH(3)							    LSEARCH(3)

NAME
       lsearch, lfind, - linear searching routines

SYNOPSIS
       char *
       lsearch(const void *key, const void *base,
       size_t *nelp, size_t width,
       int (*compar) (void *, void *));

       char *
       lfind(const void *key, const void *base,
       size_t *nelp, size_t width,
       int (*compar) (void *, void *));

DESCRIPTION
       This  interface	was  obsolete  before it was written.  It is available
       from the compatibility library, libcompat.

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

       Base  is the pointer to the beginning of an array.  Nelp is the current
       number of elements in the array, where  each  element  is  width	 bytes
       long.  Compar is a comparison routine which is used to compare two ele‐
       ments.  It is called with two arguments that point to  the  key	object
       and  to an array member, in that order, and must return an integer less
       than, equal to, or greater than zero if the key object  is  considered,
       respectively, to be less than, equal to, or greater than the array mem‐
       ber.

       Lsearch and lfind return a pointer into the array  referenced  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), hsearch(3), tsearch(3)

4.4 Berkeley Distribution	 June 23, 1990			    LSEARCH(3)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Xenix

List of man pages available for Xenix

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