diff options
author | aaron <> | 1999-06-29 18:01:34 +0000 |
---|---|---|
committer | aaron <> | 1999-06-29 18:01:34 +0000 |
commit | 403f5844d16c63a63b8ce33a354e4871cb93df4c (patch) | |
tree | 8cb26f4259822c517bec5c7028ba41be89eb964b /src/lib/libc/string/strcpy.3 | |
parent | e5791ef4d456e0071415b711d9969fb50535b063 (diff) | |
download | openbsd-403f5844d16c63a63b8ce33a354e4871cb93df4c.tar.gz openbsd-403f5844d16c63a63b8ce33a354e4871cb93df4c.tar.bz2 openbsd-403f5844d16c63a63b8ce33a354e4871cb93df4c.zip |
repairs
Diffstat (limited to 'src/lib/libc/string/strcpy.3')
-rw-r--r-- | src/lib/libc/string/strcpy.3 | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/lib/libc/string/strcpy.3 b/src/lib/libc/string/strcpy.3 index 36434ca04b..aab10f9ba8 100644 --- a/src/lib/libc/string/strcpy.3 +++ b/src/lib/libc/string/strcpy.3 | |||
@@ -33,7 +33,7 @@ | |||
33 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 33 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
34 | .\" SUCH DAMAGE. | 34 | .\" SUCH DAMAGE. |
35 | .\" | 35 | .\" |
36 | .\" $OpenBSD: strcpy.3,v 1.8 1999/06/06 15:17:32 aaron Exp $ | 36 | .\" $OpenBSD: strcpy.3,v 1.9 1999/06/29 18:01:33 aaron Exp $ |
37 | .\" | 37 | .\" |
38 | .Dd June 29, 1991 | 38 | .Dd June 29, 1991 |
39 | .Dt STRCPY 3 | 39 | .Dt STRCPY 3 |
@@ -92,20 +92,22 @@ return | |||
92 | .Fa dst . | 92 | .Fa dst . |
93 | .Sh EXAMPLES | 93 | .Sh EXAMPLES |
94 | The following sets | 94 | The following sets |
95 | .Dq Li chararray | 95 | .Va chararray |
96 | to | 96 | to |
97 | .Dq Li abc\e0\e0\e0 : | 97 | .Dq abc\e0\e0\e0 : |
98 | .Bd -literal -offset indent | 98 | .Bd -literal -offset indent |
99 | (void)strncpy(chararray, "abc", 6); | 99 | (void)strncpy(chararray, "abc", 6); |
100 | .Ed | 100 | .Ed |
101 | .Pp | 101 | .Pp |
102 | The following sets | 102 | The following sets |
103 | .Dq Li chararray | 103 | .Va chararray |
104 | to | 104 | to |
105 | .Dq Li abcdef | 105 | .Dq abcdef |
106 | and does | 106 | and does |
107 | .Em not | 107 | .Em not |
108 | null terminate chararray because the source string is >= the length parameter. | 108 | null terminate |
109 | .Va chararray | ||
110 | because the source string is >= the length parameter. | ||
109 | .Fn strncpy | 111 | .Fn strncpy |
110 | .Em only | 112 | .Em only |
111 | null terminates the destination string when then length of the source | 113 | null terminates the destination string when then length of the source |
@@ -115,9 +117,9 @@ string is less than the length parameter. | |||
115 | .Ed | 117 | .Ed |
116 | .Pp | 118 | .Pp |
117 | The following copies as many characters from | 119 | The following copies as many characters from |
118 | .Dq Li input | 120 | .Va input |
119 | to | 121 | to |
120 | .Dq Li buf | 122 | .Va buf |
121 | as will fit and null terminates the result. Because | 123 | as will fit and null terminates the result. Because |
122 | .Fn strncpy | 124 | .Fn strncpy |
123 | does | 125 | does |
@@ -143,7 +145,7 @@ is simply: | |||
143 | .Xr memccpy 3 , | 145 | .Xr memccpy 3 , |
144 | .Xr memcpy 3 , | 146 | .Xr memcpy 3 , |
145 | .Xr memmove 3 , | 147 | .Xr memmove 3 , |
146 | .Xr strlcpy 3 | 148 | .Xr strlcpy 3 |
147 | .Sh STANDARDS | 149 | .Sh STANDARDS |
148 | The | 150 | The |
149 | .Fn strcpy | 151 | .Fn strcpy |