2
0
mirror of git://gcc.gnu.org/git/gcc.git synced 2024-12-23 02:09:08 +08:00
gcc/texinfo/lib/memcpy.c
Jeff Law 1eb3e8442f Initial revision
From-SVN: r18770
1998-03-22 21:41:58 -07:00

21 lines
385 B
C

/* Copy LEN bytes starting at SRCADDR to DESTADDR. Result undefined
if the source overlaps with the destination.
Return DESTADDR. */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
char *
memcpy (destaddr, srcaddr, len)
char *destaddr;
const char *srcaddr;
int len;
{
char *dest = destaddr;
while (len-- > 0)
*destaddr++ = *srcaddr++;
return dest;
}