summaryrefslogtreecommitdiff
path: root/lib/libc/string/strcpy.3
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>1999-06-29 18:01:35 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>1999-06-29 18:01:35 +0000
commit2c9812a5e42aed1da9bee32d389811387397705c (patch)
tree78de2d4584882d5b63120e86418f290108810b2b /lib/libc/string/strcpy.3
parent74d60a9228454d1da06e9819b9fa1773fa5a3322 (diff)
repairs
Diffstat (limited to 'lib/libc/string/strcpy.3')
-rw-r--r--lib/libc/string/strcpy.320
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/libc/string/strcpy.3 b/lib/libc/string/strcpy.3
index 36434ca04b8..aab10f9ba8e 100644
--- a/lib/libc/string/strcpy.3
+++ b/lib/libc/string/strcpy.3
@@ -33,7 +33,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: strcpy.3,v 1.8 1999/06/06 15:17:32 aaron Exp $
+.\" $OpenBSD: strcpy.3,v 1.9 1999/06/29 18:01:33 aaron Exp $
.\"
.Dd June 29, 1991
.Dt STRCPY 3
@@ -92,20 +92,22 @@ return
.Fa dst .
.Sh EXAMPLES
The following sets
-.Dq Li chararray
+.Va chararray
to
-.Dq Li abc\e0\e0\e0 :
+.Dq abc\e0\e0\e0 :
.Bd -literal -offset indent
(void)strncpy(chararray, "abc", 6);
.Ed
.Pp
The following sets
-.Dq Li chararray
+.Va chararray
to
-.Dq Li abcdef
+.Dq abcdef
and does
.Em not
-null terminate chararray because the source string is >= the length parameter.
+null terminate
+.Va chararray
+because the source string is >= the length parameter.
.Fn strncpy
.Em only
null terminates the destination string when then length of the source
@@ -115,9 +117,9 @@ string is less than the length parameter.
.Ed
.Pp
The following copies as many characters from
-.Dq Li input
+.Va input
to
-.Dq Li buf
+.Va buf
as will fit and null terminates the result. Because
.Fn strncpy
does
@@ -143,7 +145,7 @@ is simply:
.Xr memccpy 3 ,
.Xr memcpy 3 ,
.Xr memmove 3 ,
-.Xr strlcpy 3
+.Xr strlcpy 3
.Sh STANDARDS
The
.Fn strcpy