]> git.saurik.com Git - apple/libc.git/blob - string/FreeBSD/strdup.3.patch
5ef2029899a80b9cc2033b71e31de5838abdf376
[apple/libc.git] / string / FreeBSD / strdup.3.patch
1 --- strdup.3.orig 2009-11-30 13:52:20.000000000 -0800
2 +++ strdup.3 2009-11-30 15:13:21.000000000 -0800
3 @@ -40,16 +40,21 @@
4 .Sh SYNOPSIS
5 .In string.h
6 .Ft char *
7 -.Fn strdup "const char *str"
8 +.Fo strdup
9 +.Fa "const char *s1"
10 +.Fc
11 .Ft char *
12 -.Fn strndup "const char *str" "size_t len"
13 +.Fo strndup
14 +.Fa "const char *s1"
15 +.Fa "size_t n"
16 +.Fc
17 .Sh DESCRIPTION
18 The
19 .Fn strdup
20 function
21 allocates sufficient memory for a copy
22 of the string
23 -.Fa str ,
24 +.Fa s1 ,
25 does the copy, and returns a pointer to it.
26 The pointer may subsequently be used as an
27 argument to the function
28 @@ -63,16 +68,15 @@ is set to
29 The
30 .Fn strndup
31 function copies at most
32 -.Fa len
33 +.Fa n
34 characters from the string
35 -.Fa str
36 +.Fa s1
37 always
38 .Dv NUL
39 terminating the copied string.
40 .Sh SEE ALSO
41 .Xr free 3 ,
42 -.Xr malloc 3 ,
43 -.Xr wcsdup 3
44 +.Xr malloc 3
45 .Sh HISTORY
46 The
47 .Fn strdup