Loading...
--- Libc/Libc-262/stdlib/bsearch.3
+++ Libc/Libc-498/stdlib/bsearch.3
@@ -47,19 +47,19 @@
.Sh SYNOPSIS
.In stdlib.h
.Ft void *
-.Fn bsearch "const void *key" "const void *base" "size_t nmemb" "size_t size" "int (*compar) (const void *, const void *)"
+.Fn bsearch "const void *key" "const void *base" "size_t nel" "size_t width" "int (*compar) (const void *, const void *)"
.Sh DESCRIPTION
The
.Fn bsearch
function searches an array of
-.Fa nmemb
+.Fa nel
objects, the initial member of which is
pointed to by
.Fa base ,
for a member that matches the object pointed to by
.Fa key .
-The size of each member of the array is specified by
-.Fa size .
+The size (in bytes) of each member of the array is specified by
+.Fa width .
.Pp
The contents of the array should be in ascending sorted order according
to the comparison function referenced by
@@ -70,7 +70,8 @@
is expected to have
two arguments which point to the
.Fa key
-object and to an array member, in that order, and should return an integer
+object and to an array member, in that order.
+It should return an integer which is
less than, equal to, or greater than zero if the
.Fa key
object is found, respectively, to be less than, to match, or be