diff options
Diffstat (limited to 'src/lib/libc/string/strcpy.3')
-rw-r--r-- | src/lib/libc/string/strcpy.3 | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libc/string/strcpy.3 b/src/lib/libc/string/strcpy.3 index 8304508df6..504f42f2ba 100644 --- a/src/lib/libc/string/strcpy.3 +++ b/src/lib/libc/string/strcpy.3 | |||
@@ -29,7 +29,7 @@ | |||
29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
30 | .\" SUCH DAMAGE. | 30 | .\" SUCH DAMAGE. |
31 | .\" | 31 | .\" |
32 | .\" $OpenBSD: strcpy.3,v 1.12 2003/06/02 20:18:38 millert Exp $ | 32 | .\" $OpenBSD: strcpy.3,v 1.13 2005/02/25 03:12:44 cloder Exp $ |
33 | .\" | 33 | .\" |
34 | .Dd June 29, 1991 | 34 | .Dd June 29, 1991 |
35 | .Dt STRCPY 3 | 35 | .Dt STRCPY 3 |
@@ -98,12 +98,12 @@ to | |||
98 | .Dq abcdef | 98 | .Dq abcdef |
99 | and does | 99 | and does |
100 | .Em not | 100 | .Em not |
101 | null terminate | 101 | NUL terminate |
102 | .Va chararray | 102 | .Va chararray |
103 | because the source string is >= the length parameter. | 103 | because the source string is >= the length parameter. |
104 | .Fn strncpy | 104 | .Fn strncpy |
105 | .Em only | 105 | .Em only |
106 | null terminates the destination string when the length of the source | 106 | NUL terminates the destination string when the length of the source |
107 | string is less than the length parameter. | 107 | string is less than the length parameter. |
108 | .Bd -literal -offset indent | 108 | .Bd -literal -offset indent |
109 | (void)strncpy(chararray, "abcdefgh", 6); | 109 | (void)strncpy(chararray, "abcdefgh", 6); |
@@ -113,12 +113,12 @@ The following copies as many characters from | |||
113 | .Va input | 113 | .Va input |
114 | to | 114 | to |
115 | .Va buf | 115 | .Va buf |
116 | as will fit and null terminates the result. | 116 | as will fit and NUL terminates the result. |
117 | Because | 117 | Because |
118 | .Fn strncpy | 118 | .Fn strncpy |
119 | does | 119 | does |
120 | .Em not | 120 | .Em not |
121 | guarantee to null terminate the string itself, we must do this by hand. | 121 | guarantee to NUL terminate the string itself, we must do this by hand. |
122 | .Bd -literal -offset indent | 122 | .Bd -literal -offset indent |
123 | char buf[BUFSIZ]; | 123 | char buf[BUFSIZ]; |
124 | 124 | ||