bsearch.3.patch   [plain text]


--- _SB/Libc/stdlib/FreeBSD/bsearch.3	2003-05-20 15:23:24.000000000 -0700
+++ _SB/Libc/stdlib/FreeBSD/bsearch.3.edit	2006-06-28 16:55:52.000000000 -0700
@@ -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