summaryrefslogtreecommitdiff
path: root/libiberty/bsearch.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@delorie.com>2001-09-26 18:45:50 +0000
committerDJ Delorie <dj@delorie.com>2001-09-26 18:45:50 +0000
commitbd7ce1bbb2ea47e045e6dd755cf16f05a2555309 (patch)
tree9fcc8e3e643152ed109636c5420b217c9d116002 /libiberty/bsearch.c
parent3d6b05970e5c5b951cf734883641e64090a3c370 (diff)
downloadgdb-bd7ce1bbb2ea47e045e6dd755cf16f05a2555309.tar.gz
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 6a8ee33341d..b3283f9285f 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 */