add ANSI contribution notice
[unix-history] / usr / src / lib / libc / string / memcpy.3
CommitLineData
ae59e04c 1.\" Copyright (c) 1990, 1991 The Regents of the University of California.
7de823bd
KB
2.\" All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
043368e6
KB
5.\" Chris Torek and the American National Standards Committee X3,
6.\" on Information Processing Systems.
7.\"
7de823bd
KB
8.\" %sccs.include.redist.man%
9.\"
043368e6 10.\" @(#)memcpy.3 5.5 (Berkeley) %G%
7de823bd 11.\"
ae59e04c
CL
12.Dd
13.Dt MEMCPY 3
14.Os
15.Sh NAME
16.Nm memcpy
17.Nd copy byte string
18.Sh SYNOPSIS
19.Fd #include <string.h>
20.Ft void *
21.Fn memcpy "void *dst" "const void *src" "size_t len"
22.Sh DESCRIPTION
23The
24.Fn memcpy
25function
7de823bd 26copies
ae59e04c 27.Fa len
7de823bd 28bytes from string
ae59e04c 29.Fa src
7de823bd 30to string
ae59e04c
CL
31.Fa dst .
32.Sh RETURN VALUES
33The
34.Fn memcpy
35function
36returns the original value of
37.Fa dst .
38.Sh SEE ALSO
39.Xr bcopy 3 ,
40.Xr memccpy 3 ,
41.Xr memmove 3 ,
42.Xr strcpy 3
43.Sh STANDARDS
44The
45.Fn memcpy
46function
47conforms to
48.St -ansiC .
49.Sh BUGS
7de823bd 50In this implementation
ae59e04c 51.Fn memcpy
7de823bd 52is implemented using
ae59e04c 53.Xr bcopy 3 ,
7de823bd
KB
54and therefore the strings may overlap.
55On other systems, copying overlapping strings may produce surprises.
56A simpler solution is to not use
ae59e04c 57.Fn memcpy .