File: memcpy.c

package info (click to toggle)
id-utils 3.2d-11
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,792 kB
  • ctags: 1,677
  • sloc: ansic: 14,287; sh: 3,405; makefile: 271; sed: 93; lisp: 26
file content (16 lines) | stat: -rw-r--r-- 336 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* Copy LEN bytes starting at SRCADDR to DESTADDR.  Result undefined
   if the source overlaps with the destination.
   Return DESTADDR. */

char *
memcpy (destaddr, srcaddr, len)
     char *destaddr;
     const char *srcaddr;
     int len;
{
  char *dest = destaddr;

  while (len-- > 0)
    *destaddr++ = *srcaddr++;
  return dest;
}