1*88f86411Sriastradh.\" $NetBSD: memcpy.9,v 1.10 2017/03/18 19:01:01 riastradh Exp $ 2d6829e5bSwiz.\" 3e7eca1a1Sperry.\" Copyright (c) 1990, 1991, 1993 4e7eca1a1Sperry.\" The Regents of the University of California. All rights reserved. 5e7eca1a1Sperry.\" 6e7eca1a1Sperry.\" This code is derived from software contributed to Berkeley by 7e7eca1a1Sperry.\" Chris Torek and the American National Standards Committee X3, 8e7eca1a1Sperry.\" on Information Processing Systems. 9e7eca1a1Sperry.\" 10e7eca1a1Sperry.\" Redistribution and use in source and binary forms, with or without 11e7eca1a1Sperry.\" modification, are permitted provided that the following conditions 12e7eca1a1Sperry.\" are met: 13e7eca1a1Sperry.\" 1. Redistributions of source code must retain the above copyright 14e7eca1a1Sperry.\" notice, this list of conditions and the following disclaimer. 15e7eca1a1Sperry.\" 2. Redistributions in binary form must reproduce the above copyright 16e7eca1a1Sperry.\" notice, this list of conditions and the following disclaimer in the 17e7eca1a1Sperry.\" documentation and/or other materials provided with the distribution. 18075022b3Sagc.\" 3. Neither the name of the University nor the names of its contributors 19e7eca1a1Sperry.\" may be used to endorse or promote products derived from this software 20e7eca1a1Sperry.\" without specific prior written permission. 21e7eca1a1Sperry.\" 22e7eca1a1Sperry.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23e7eca1a1Sperry.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24e7eca1a1Sperry.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25e7eca1a1Sperry.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26e7eca1a1Sperry.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27e7eca1a1Sperry.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28e7eca1a1Sperry.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29e7eca1a1Sperry.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30e7eca1a1Sperry.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31e7eca1a1Sperry.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32e7eca1a1Sperry.\" SUCH DAMAGE. 33e7eca1a1Sperry.\" 34e7eca1a1Sperry.\" from: @(#)memcpy.3 8.1 (Berkeley) 6/4/93 35e7eca1a1Sperry.\" 36d6829e5bSwiz.Dd January 2, 2012 37e7eca1a1Sperry.Dt MEMCPY 9 38e7eca1a1Sperry.Os 39e7eca1a1Sperry.Sh NAME 40e7eca1a1Sperry.Nm memcpy 41e7eca1a1Sperry.Nd copy byte string 42e7eca1a1Sperry.Sh SYNOPSIS 435ec5041cSrkujawa.In sys/systm.h 44e7eca1a1Sperry.Ft void * 45e7eca1a1Sperry.Fn memcpy "void * restrict dst" "const void * restrict src" "size_t len" 46e7eca1a1Sperry.Sh DESCRIPTION 47e7eca1a1SperryThe 48e7eca1a1Sperry.Fn memcpy 49e7eca1a1Sperryfunction 50e7eca1a1Sperrycopies 51e7eca1a1Sperry.Fa len 52e7eca1a1Sperrybytes from string 53e7eca1a1Sperry.Fa src 54e7eca1a1Sperryto string 55e7eca1a1Sperry.Fa dst . 56*88f86411SriastradhThe arguments must not overlap \(em behavior if the arguments overlap 57*88f86411Sriastradhis undefined. 58770eef21SwizTo copy byte strings that overlap, use 59e7eca1a1Sperry.Xr memmove 9 . 60e7eca1a1Sperry.Sh RETURN VALUES 61e7eca1a1SperryThe 62e7eca1a1Sperry.Fn memcpy 63e7eca1a1Sperryfunction 64e7eca1a1Sperryreturns the original value of 65e7eca1a1Sperry.Fa dst . 66e7eca1a1Sperry.Sh SEE ALSO 67a0a66802Swiz.Xr memmove 9 68e7eca1a1Sperry.Sh STANDARDS 69e7eca1a1SperryThe 70e7eca1a1Sperry.Fn memcpy 71e7eca1a1Sperryfunction 72e7eca1a1Sperryconforms to 73dca9ccd3Swiz.St -isoC-99 . 74