]> git.saurik.com Git - apple/libc.git/blob - string/FreeBSD/memchr.3.patch
Libc-763.13.tar.gz
[apple/libc.git] / string / FreeBSD / memchr.3.patch
1 --- memchr.3.bsdnew 2009-11-30 13:52:21.000000000 -0800
2 +++ memchr.3 2009-11-30 14:18:10.000000000 -0800
3 @@ -43,9 +43,11 @@
4 .Sh SYNOPSIS
5 .In string.h
6 .Ft void *
7 -.Fn memchr "const void *b" "int c" "size_t len"
8 -.Ft void *
9 -.Fn memrchr "const void *b" "int c" "size_t len"
10 +.Fo memchr
11 +.Fa "const void *s"
12 +.Fa "int c"
13 +.Fa "size_t n"
14 +.Fc
15 .Sh DESCRIPTION
16 The
17 .Fn memchr
18 @@ -54,28 +56,16 @@ locates the first occurrence of
19 .Fa c
20 (converted to an unsigned char)
21 in string
22 -.Fa b .
23 -.Pp
24 -The
25 -.Fn memrchr
26 -function behaves like
27 -.Fn memchr ,
28 -except that it locates the last occurrence of
29 -.Fa c
30 -in string
31 -.Fa b .
32 +.Fa s .
33 .Sh RETURN VALUES
34 The
35 .Fn memchr
36 -and
37 -.Fn memrchr
38 -functions
39 -return a pointer to the byte located,
40 +function
41 +returns a pointer to the byte located,
42 or NULL if no such byte exists within
43 -.Fa len
44 +.Fa n
45 bytes.
46 .Sh SEE ALSO
47 -.Xr memmem 3 ,
48 .Xr strchr 3 ,
49 .Xr strcspn 3 ,
50 .Xr strpbrk 3 ,
51 @@ -91,15 +81,3 @@ The
52 function
53 conforms to
54 .St -isoC .
55 -.Pp
56 -The
57 -.Fn memrchr
58 -function is a GNU extension and conforms to no standard.
59 -.Sh HISTORY
60 -The
61 -.Fn memrchr
62 -function first appeared in GNU libc 2.1.91, this implementation
63 -first appeared in
64 -.Fx 6.4 ,
65 -coming from
66 -.Ox 4.3 .