source:
buchla-68k/libsm/memset.c@
6ee14ba
Last change on this file since 6ee14ba was b28a12e, checked in by , 7 years ago | |
---|---|
|
|
File size: 424 bytes |
Rev | Line | |
---|---|---|
[f40a309] | 1 | /* |
2 | ============================================================================= | |
3 | memset.c -- fill memory | |
4 | Version 1 -- 1987-06-12 | |
5 | ||
[5c13d64] | 6 | Set an array of n chars starting at vp to the character c. |
7 | Return vp. | |
[f40a309] | 8 | ============================================================================= |
9 | */ | |
10 | ||
[b28a12e] | 11 | #include "ram.h" |
[6262b5c] | 12 | |
[7258c6a] | 13 | void *memset(void *vp, int8_t c, int16_t n) |
[f40a309] | 14 | { |
[7258c6a] | 15 | int8_t *cp = vp; |
[f40a309] | 16 | |
[5c13d64] | 17 | while (--n >= 0) |
18 | *cp++ = c; | |
[f40a309] | 19 | |
[5c13d64] | 20 | return(vp); |
[f40a309] | 21 | } |
Note:
See TracBrowser
for help on using the repository browser.