aboutsummaryrefslogtreecommitdiff
path: root/libiberty/bsearch.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2001-09-26 18:45:50 +0000
committerDJ Delorie <dj@redhat.com>2001-09-26 18:45:50 +0000
commit39423523167c47f72822dbb9eb3ab4a0dfeafe68 (patch)
treeb437d1ed0d3cb7e6a0a67e5dd30ef19abbedb95e /libiberty/bsearch.c
parent4e6667ac4f987fecbcf576513c70485a4718712e (diff)
downloadgdb-39423523167c47f72822dbb9eb3ab4a0dfeafe68.zip
gdb-39423523167c47f72822dbb9eb3ab4a0dfeafe68.tar.gz
gdb-39423523167c47f72822dbb9eb3ab4a0dfeafe68.tar.bz2
merge from gcc
Diffstat (limited to 'libiberty/bsearch.c')
-rw-r--r--libiberty/bsearch.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/libiberty/bsearch.c b/libiberty/bsearch.c
index 6a8ee33..b3283f9 100644
--- a/libiberty/bsearch.c
+++ b/libiberty/bsearch.c
@@ -28,6 +28,23 @@
* SUCH DAMAGE.
*/
+/*
+
+@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 *))
+
+Performs a search over an array of @var{nmemb} elements pointed to by
+@var{base} for a member that matches the object pointed to by @var{key}.
+The size of each member is specified by @var{size}. The array contents
+should be sorted in ascending order according to the @var{compar}
+comparison function. This routine should take two arguments pointing to
+the @var{key} and to an array member, in that order, and should return an
+integer less than, equal to, or greater than zero if the @var{key} object
+is respectively less than, matching, or greater than the array member.
+
+@end deftypefn
+
+*/
+
#include "config.h"
#include "ansidecl.h"
#include <sys/types.h> /* size_t */