4.3BSD-Reno/share/man/cat3/bsearch.0

Compare this file to the similar file:
Show the results in this format:




BSEARCH(3)		      1990		       BSEARCH(3)



NNAAMMEE
     bsearch - binary search of a sorted table

SSYYNNOOPPSSIISS
     ##iinncclluuddee <<ssttddlliibb..hh>>

     cchhaarr **
     bbsseeaarrcchh((ccoonnsstt vvooiidd **kkeeyy,, ccoonnsstt vvooiidd **bbaassee,,
     ssiizzee__tt nnmmeemmbb,, ssiizzee__tt ssiizzee,,
     iinntt ((**ccoommppaarr)) ((ccoonnsstt vvooiidd **,, ccoonnsstt vvooiidd **))));;

DDEESSCCRRIIPPTTIIOONN
     The _b_s_e_a_r_c_h function searches an array of _n_m_e_m_b objects, the
     inital member of which is pointed to by _b_a_s_e, for a member
     that matches the object pointed to by _k_e_y.  The size of each
     member of the array is specified by _s_i_z_e .

     The contents of the array should be in ascending sorted
     order according to the comparison function referenced by
     _c_o_m_p_a_r.  _C_o_m_p_a_r is called with two arguments that point to
     the _k_e_y object and to an array member, in that order, and
     must return an integer less than, equal to, or greater than
     zero if the _k_e_y object is considered, respectively, to be
     less than, equal to, or to greater than the array member.

     The _b_s_e_a_r_c_h function returns a pointer to a matching member
     of the array, or a null pointer if no match is found.  If
     two members compare as equal, which member is matched is
     unspecified.

SSEEEE AALLSSOO
     hsearch(3), lsearch(3), qsort(3), tsearch(3)

SSTTAANNDDAARRDDSS
     BBsseeaarrcchh conforms to ANSI X3.159-1989 (``ANSI C'').




















Printed 7/27/90                May				1