diff options
Diffstat (limited to 'src/lib/libc/string/strcat.3')
-rw-r--r-- | src/lib/libc/string/strcat.3 | 57 |
1 files changed, 22 insertions, 35 deletions
diff --git a/src/lib/libc/string/strcat.3 b/src/lib/libc/string/strcat.3 index 5357d65754..fba992edd9 100644 --- a/src/lib/libc/string/strcat.3 +++ b/src/lib/libc/string/strcat.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: strcat.3,v 1.16 2013/12/19 20:52:37 millert Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -13,11 +15,7 @@ | |||
13 | .\" 2. Redistributions in binary form must reproduce the above copyright | 15 | .\" 2. Redistributions in binary form must reproduce the above copyright |
14 | .\" notice, this list of conditions and the following disclaimer in the | 16 | .\" notice, this list of conditions and the following disclaimer in the |
15 | .\" documentation and/or other materials provided with the distribution. | 17 | .\" documentation and/or other materials provided with the distribution. |
16 | .\" 3. All advertising materials mentioning features or use of this software | 18 | .\" 3. Neither the name of the University nor the names of its contributors |
17 | .\" must display the following acknowledgement: | ||
18 | .\" This product includes software developed by the University of | ||
19 | .\" California, Berkeley and its contributors. | ||
20 | .\" 4. Neither the name of the University nor the names of its contributors | ||
21 | .\" may be used to endorse or promote products derived from this software | 19 | .\" may be used to endorse or promote products derived from this software |
22 | .\" without specific prior written permission. | 20 | .\" without specific prior written permission. |
23 | .\" | 21 | .\" |
@@ -33,62 +31,51 @@ | |||
33 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 31 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
34 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
35 | .\" | 33 | .\" |
36 | .\" from: @(#)strcat.3 5.6 (Berkeley) 6/29/91 | 34 | .Dd $Mdocdate: December 19 2013 $ |
37 | .\" $Id: strcat.3,v 1.1.1.1 1995/10/18 08:42:22 deraadt Exp $ | ||
38 | .\" | ||
39 | .Dd June 29, 1991 | ||
40 | .Dt STRCAT 3 | 35 | .Dt STRCAT 3 |
41 | .Os | 36 | .Os |
42 | .Sh NAME | 37 | .Sh NAME |
43 | .Nm strcat | 38 | .Nm strcat |
44 | .Nd concatenate strings | 39 | .Nd concatenate two strings |
45 | .Sh SYNOPSIS | 40 | .Sh SYNOPSIS |
46 | .Fd #include <string.h> | 41 | .In string.h |
47 | .Ft char * | 42 | .Ft char * |
48 | .Fn strcat "char *s" "const char *append" | 43 | .Fn strcat "char *s" "const char *append" |
49 | .Ft char * | ||
50 | .Fn strncat "char *s" "const char *append" "size_t count" | ||
51 | .Sh DESCRIPTION | 44 | .Sh DESCRIPTION |
52 | The | 45 | The |
53 | .Fn strcat | 46 | .Fn strcat |
54 | and | 47 | function appends a copy of the NUL-terminated string |
55 | .Fn strncat | ||
56 | functions | ||
57 | append a copy of the null-terminated string | ||
58 | .Fa append | 48 | .Fa append |
59 | to the end of the null-terminated string | 49 | to the end of the NUL-terminated string |
60 | .Fa s , | 50 | .Fa s , |
61 | then add a terminating | 51 | then adds a terminating |
62 | .Ql \e0 . | 52 | .Ql \e0 . |
63 | The string | 53 | The string |
64 | .Fa s | 54 | .Fa s |
65 | must have sufficient space to hold the result. | 55 | must have sufficient space to hold the result. |
66 | .Pp | ||
67 | The | ||
68 | .Fn strncat | ||
69 | function | ||
70 | appends not more than | ||
71 | .Fa count | ||
72 | characters. | ||
73 | .Sh RETURN VALUES | 56 | .Sh RETURN VALUES |
74 | The | 57 | The |
75 | .Fn strcat | 58 | .Fn strcat |
76 | and | 59 | function return the pointer |
77 | .Fn strncat | ||
78 | functions | ||
79 | return the pointer | ||
80 | .Fa s . | 60 | .Fa s . |
81 | .Sh SEE ALSO | 61 | .Sh SEE ALSO |
82 | .Xr bcopy 3 , | 62 | .Xr bcopy 3 , |
83 | .Xr memccpy 3 , | 63 | .Xr memccpy 3 , |
84 | .Xr memcpy 3 , | 64 | .Xr memcpy 3 , |
85 | .Xr memmove 3 , | 65 | .Xr memmove 3 , |
86 | .Xr strcpy 3 | 66 | .Xr strcpy 3 , |
67 | .Xr strlcpy 3 , | ||
68 | .Xr strncat 3 , | ||
69 | .Xr wcscat 3 , | ||
70 | .Xr wcslcpy 3 | ||
87 | .Sh STANDARDS | 71 | .Sh STANDARDS |
88 | The | 72 | The |
89 | .Fn strcat | 73 | .Fn strcat |
90 | and | 74 | function conforms to |
91 | .Fn strncat | ||
92 | functions | ||
93 | conform to | ||
94 | .St -ansiC . | 75 | .St -ansiC . |
76 | .Sh HISTORY | ||
77 | The | ||
78 | .Fn strcat | ||
79 | function first appeared in the Programmer's Workbench (PWB/UNIX) | ||
80 | and was ported to | ||
81 | .At v7 . | ||