/[gnats]/gnats/libiberty/bsearch.c
ViewVC logotype

Diff of /gnats/libiberty/bsearch.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by pdm, Mon Dec 10 23:03:27 2001 UTC revision 1.2 by chewie, Sat Nov 13 05:14:17 2004 UTC
# Line 28  Line 28 
28   * SUCH DAMAGE.   * SUCH DAMAGE.
29   */   */
30    
31    /*
32    
33    @deftypefn Supplemental void* bsearch (const void *@var{key}, const void *@var{base}, size_t @var{nmemb}, size_t @var{size}, int (*@var{compar})(const void *, const void *))
34    
35    Performs a search over an array of @var{nmemb} elements pointed to by
36    @var{base} for a member that matches the object pointed to by @var{key}.
37    The size of each member is specified by @var{size}.  The array contents
38    should be sorted in ascending order according to the @var{compar}
39    comparison function.  This routine should take two arguments pointing to
40    the @var{key} and to an array member, in that order, and should return an
41    integer less than, equal to, or greater than zero if the @var{key} object
42    is respectively less than, matching, or greater than the array member.
43    
44    @end deftypefn
45    
46    */
47    
48  #include "config.h"  #include "config.h"
49  #include "ansidecl.h"  #include "ansidecl.h"
50  #include <sys/types.h>          /* size_t */  #include <sys/types.h>          /* size_t */

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26