1 /*- 2 * Copyright (c) 1979 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 */ 7 8 #ifndef lint 9 static char sccsid[] = "@(#)blkcpy.c 1.4 (Berkeley) 04/09/90"; 10 #endif /* not lint */ 11 12 blkcpy(from, to, siz) 13 register char *from; 14 register char *to; 15 long siz; 16 { 17 register int size = siz; 18 19 if (to < from) 20 while(size-- > 0) 21 *to++ = *from++; 22 else { 23 to += size; 24 from += size; 25 while(size-- > 0) 26 *--to = *--from; 27 } 28 } 29