source:
buchla-68k/libsm/memcpy.c@
6262b5c
Last change on this file since 6262b5c was 6262b5c, checked in by , 7 years ago | |
---|---|
|
|
File size: 434 bytes |
Rev | Line | |
---|---|---|
[f40a309] | 1 | /* |
2 | ============================================================================= | |
3 | memcpy.c -- copy memory | |
4 | Version 1 -- 1987-06-12 | |
5 | ||
[5c13d64] | 6 | Copy vp2 to vp1, always copy n bytes. |
7 | Return vp1. | |
[f40a309] | 8 | ============================================================================= |
9 | */ | |
10 | ||
[6262b5c] | 11 | #include "all.h" |
12 | ||
[7258c6a] | 13 | void *memcpy(void *vp1, void *vp2, int16_t n) |
[f40a309] | 14 | { |
[7258c6a] | 15 | int8_t *cp1 = vp1; |
16 | int8_t *cp2 = vp2; | |
[f40a309] | 17 | |
[5c13d64] | 18 | while (--n >= 0) |
19 | *cp1++ = *cp2++; | |
20 | ||
21 | return(vp1); | |
[f40a309] | 22 | } |
Note:
See TracBrowser
for help on using the repository browser.