bsearch man page on Cygwin

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

BSEARCH(3)			    NEWLIB			    BSEARCH(3)

NAME
       2.10 `bsearch'--binary search

SYNOPSIS
	    #include <stdlib.h>
	    void *bsearch(const void *KEY, const void *BASE,
		size_t NMEMB, size_t SIZE,
		int (*COMPAR)(const void *, const void *));

DESCRIPTION
       `bsearch'  searches  an	array  beginning  at BASE for any element that
       matches KEY, using binary search.  NMEMB is the element	count  of  the
       array; SIZE is the size of each element.

	  The array must be sorted in ascending order with respect to the com‐
       parison function COMPAR (which you  supply  as  the  last  argument  of
       `bsearch').

	  You  must  define  the  comparison  function `(*COMPAR)' to have two
       arguments; its result must be negative if the first  argument  is  less
       than  the  second, zero if the two arguments match, and positive if the
       first argument is greater  than	the  second  (where  "less  than"  and
       "greater than" refer to whatever arbitrary ordering is appropriate).

RETURNS
       Returns	a  pointer  to	an element of ARRAY that matches KEY.  If more
       than one matching element is available, the result may point to any  of
       them.

PORTABILITY
       `bsearch' is ANSI.

	  No supporting OS subroutines are required.

SEE ALSO
       bsearch	is  part  of the library.  The full documentation for is main‐
       tained as a Texinfo manual.  If info and are properly installed at your
       site, the command

	      info

       will give you access to the complete manual.

NEWLIB				  April 2010			    BSEARCH(3)
[top]

List of man pages available for Cygwin

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