]> git.saurik.com Git - apple/libc.git/blob - string/FreeBSD/memccpy.3.patch
0ebd91d426814782800d7b60771111992c602d15
[apple/libc.git] / string / FreeBSD / memccpy.3.patch
1 --- memccpy.3.orig 2008-02-29 10:45:52.000000000 -0800
2 +++ memccpy.3 2008-02-29 12:03:32.000000000 -0800
3 @@ -43,27 +43,35 @@
4 .Sh SYNOPSIS
5 .In string.h
6 .Ft void *
7 -.Fn memccpy "void *dst" "const void *src" "int c" "size_t len"
8 +.Fo memccpy
9 +.Fa "void *restrict s1"
10 +.Fa "const void *restrict s2"
11 +.Fa "int c"
12 +.Fa "size_t n"
13 +.Fc
14 .Sh DESCRIPTION
15 The
16 .Fn memccpy
17 function
18 copies bytes from string
19 -.Fa src
20 +.Fa s2
21 to string
22 -.Fa dst .
23 +.Fa s1 .
24 If the character
25 .Fa c
26 (as converted to an unsigned char) occurs in the string
27 -.Fa src ,
28 +.Fa s2 ,
29 the copy stops and a pointer to the byte after the copy of
30 .Fa c
31 in the string
32 -.Fa dst
33 +.Fa s1
34 is returned.
35 Otherwise,
36 -.Fa len
37 +.Fa n
38 bytes are copied, and a NULL pointer is returned.
39 +.Pp
40 +The source and destination strings should not overlap, as the
41 +behavior is undefined.
42 .Sh SEE ALSO
43 .Xr bcopy 3 ,
44 .Xr memcpy 3 ,