xref: /original-bsd/usr.bin/pascal/libpc/blkcpy.c (revision f0fd5f8a)
1 /* Copyright (c) 1979 Regents of the University of California */
2 
3 static char sccsid[] = "@(#)blkcpy.c 1.3 11/12/82";
4 
5 blkcpy(from, to, siz)
6 	register char	*from;
7 	register char	*to;
8 	long		siz;
9 {
10 	register int	size = siz;
11 
12 	if (to < from)
13 		while(size-- > 0)
14 			*to++ = *from++;
15 	else {
16 		to += size;
17 		from += size;
18 		while(size-- > 0)
19 			*--to = *--from;
20 	}
21 }
22