Loading...
--- Libc/Libc-1669.0.4/string/FreeBSD/memcpy.3
+++ Libc/Libc-763.12/string/FreeBSD/memcpy.3
@@ -37,39 +37,23 @@
.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 dst"
-.Fa "const void *restrict src"
-.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 len
+bytes from string
.Fa src
-to memory area
+to string
.Fa dst .
-If
-.Fa dst
-and
-.Fa src
-overlap, behavior is undefined.
-Applications in which
-.Fa dst
-and
-.Fa src
-might overlap should use
-.Xr memmove 3
-instead.
.Sh RETURN VALUES
The
.Fn memcpy
@@ -88,3 +72,17 @@
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.
+Programs intended to be portable should use
+.Xr memmove 3
+when
+.Fa src
+and
+.Fa dst
+may overlap.