Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!caip!think!nike!ucbcad!ucbvax!ucdavis!ucrmath!hope!jantypas From: jantypas@hope.UUCP (John Antypas) Newsgroups: net.sources Subject: MEP and memcpy Message-ID: <781@hope.UUCP> Date: Tue, 14-Oct-86 00:28:37 EDT Article-I.D.: hope.781 Posted: Tue Oct 14 00:28:37 1986 Date-Received: Fri, 17-Oct-86 07:42:39 EDT Distribution: net Organization: University of California, Riverside Lines: 36 Some sites out there do not have BSD 4.3 or Sys V. Those of you who do will find the compiler will complain about a routine called memcpy. This is basically a blockmove call. If you have that, use it. If not, here is memcpy from a string package posted few months back. /* * memcpy - copy bytes */ char *memcpy(dst, src, size) char *dst; char *src; int size; { register char *d; register char *s; register int n; if (size <= 0) return(dst); s = src; d = dst; if (s <= d && s + (size-1) >= d) { /* Overlap, must copy right-to-left. */ s += size-1; d += size-1; for (n = size; n > 0; n--) *d-- = *s--; } else for (n = size; n > 0; n--) *d++ = *s++; return(dst); }