Loading...
string/memcpy.3 Libc-498 Libc-262
--- Libc/Libc-498/string/memcpy.3
+++ Libc/Libc-262/string/memcpy.3
@@ -34,52 +34,36 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)memcpy.3	8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/string/memcpy.3,v 1.7 2002/01/07 06:03:37 dd Exp $
+.\" $FreeBSD: src/lib/libc/string/memcpy.3,v 1.6 2001/10/01 16:09:00 ru Exp $
 .\"
 .Dd June 4, 1993
 .Dt MEMCPY 3
 .Os
 .Sh NAME
 .Nm memcpy
-.Nd copy memory area
+.Nd copy byte string
 .Sh LIBRARY
 .Lb libc
 .Sh SYNOPSIS
 .In string.h
 .Ft void *
-.Fo memcpy
-.Fa "void *restrict s1"
-.Fa "const void *restrict s2"
-.Fa "size_t n"
-.Fc
+.Fn memcpy "void *dst" "const void *src" "size_t len"
 .Sh DESCRIPTION
 The
 .Fn memcpy
 function
 copies
-.Fa n
-bytes from memory area
-.Fa s2
-to memory area
-.Fa s1 .
-If 
-.Fa s1
-and 
-.Fa s2
-overlap, behavior is undefined.
-Applications in which
-.Fa s1
-and 
-.Fa s2 
-might overlap should use
-.Xr memmove 3
-instead.
+.Fa len
+bytes from string
+.Fa src
+to string
+.Fa dst .
 .Sh RETURN VALUES
 The
 .Fn memcpy
 function
 returns the original value of
-.Fa s1 .
+.Fa dst .
 .Sh SEE ALSO
 .Xr bcopy 3 ,
 .Xr memccpy 3 ,
@@ -91,3 +75,12 @@
 function
 conforms to
 .St -isoC .
+.Sh BUGS
+In this implementation
+.Fn memcpy
+is implemented using
+.Xr bcopy 3 ,
+and therefore the strings may overlap.
+On other systems, copying overlapping strings may produce surprises.
+A simpler solution is to not use
+.Fn memcpy .