]> git.saurik.com Git - apple/libc.git/blame - stdlib/FreeBSD/bsearch.3.patch
Libc-498.tar.gz
[apple/libc.git] / stdlib / FreeBSD / bsearch.3.patch
CommitLineData
224c7076
A
1--- _SB/Libc/stdlib/FreeBSD/bsearch.3 2003-05-20 15:23:24.000000000 -0700
2+++ _SB/Libc/stdlib/FreeBSD/bsearch.3.edit 2006-06-28 16:55:52.000000000 -0700
3@@ -47,19 +47,19 @@
4 .Sh SYNOPSIS
5 .In stdlib.h
6 .Ft void *
7-.Fn bsearch "const void *key" "const void *base" "size_t nmemb" "size_t size" "int (*compar) (const void *, const void *)"
8+.Fn bsearch "const void *key" "const void *base" "size_t nel" "size_t width" "int (*compar) (const void *, const void *)"
9 .Sh DESCRIPTION
10 The
11 .Fn bsearch
12 function searches an array of
13-.Fa nmemb
14+.Fa nel
15 objects, the initial member of which is
16 pointed to by
17 .Fa base ,
18 for a member that matches the object pointed to by
19 .Fa key .
20-The size of each member of the array is specified by
21-.Fa size .
22+The size (in bytes) of each member of the array is specified by
23+.Fa width .
24 .Pp
25 The contents of the array should be in ascending sorted order according
26 to the comparison function referenced by
27@@ -70,7 +70,8 @@
28 is expected to have
29 two arguments which point to the
30 .Fa key
31-object and to an array member, in that order, and should return an integer
32+object and to an array member, in that order.
33+It should return an integer which is
34 less than, equal to, or greater than zero if the
35 .Fa key
36 object is found, respectively, to be less than, to match, or be