home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 3 / CDPDIII.bin / pd / programming / c / indent / memcpy.c < prev    next >
C/C++ Source or Header  |  1993-02-08  |  348b  |  19 lines

  1. /* Copy LEN bytes starting at SRCADDR to DESTADDR.  Result undefined
  2.    if the source overlaps with the destination.
  3.    Return DESTADDR. */
  4.  
  5. #ifdef USG
  6. char *
  7. memcpy (destaddr, srcaddr, len)
  8.      char *destaddr;
  9.      char *srcaddr;
  10.      int len;
  11. {
  12.   char *dest = destaddr;
  13.  
  14.   while (len-- > 0)
  15.     *destaddr++ = *srcaddr++;
  16.   return dest;
  17. }
  18. #endif
  19.