1169695Skan/* Implement the mempcpy function. 2169695Skan Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. 3169695Skan Written by Kaveh R. Ghazi <ghazi@caip.rutgers.edu>. 4169695Skan 5169695SkanThis file is part of the libiberty library. 6169695SkanLibiberty is free software; you can redistribute it and/or 7169695Skanmodify it under the terms of the GNU Library General Public 8169695SkanLicense as published by the Free Software Foundation; either 9169695Skanversion 2 of the License, or (at your option) any later version. 10169695Skan 11169695SkanLibiberty is distributed in the hope that it will be useful, 12169695Skanbut WITHOUT ANY WARRANTY; without even the implied warranty of 13169695SkanMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14169695SkanLibrary General Public License for more details. 15169695Skan 16169695SkanYou should have received a copy of the GNU Library General Public 17169695SkanLicense along with libiberty; see the file COPYING.LIB. If 18169695Skannot, write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, 19169695SkanBoston, MA 02110-1301, USA. */ 20169695Skan 21169695Skan/* 22169695Skan 23169695Skan@deftypefn Supplemental void* mempcpy (void *@var{out}, const void *@var{in}, size_t @var{length}) 24169695Skan 25169695SkanCopies @var{length} bytes from memory region @var{in} to region 26169695Skan@var{out}. Returns a pointer to @var{out} + @var{length}. 27169695Skan 28169695Skan@end deftypefn 29169695Skan 30169695Skan*/ 31169695Skan 32169695Skan#include <ansidecl.h> 33169695Skan#include <stddef.h> 34169695Skan 35169695Skanextern PTR memcpy (PTR, const PTR, size_t); 36169695Skan 37169695SkanPTR 38169695Skanmempcpy (PTR dst, const PTR src, size_t len) 39169695Skan{ 40169695Skan return (char *) memcpy (dst, src, len) + len; 41169695Skan} 42