Last change
on this file since cbe2c15 was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 7 years ago |
Imported original source code.
|
-
Property mode
set to
100755
|
File size:
490 bytes
|
Rev | Line | |
---|
[3ae31e9] | 1 | /*
|
---|
| 2 | =============================================================================
|
---|
| 3 | memset.c -- fill memory
|
---|
| 4 | Version 1 -- 1987-06-12
|
---|
| 5 |
|
---|
| 6 | Set an array of n chars starting at sp to the character c.
|
---|
| 7 | Return sp.
|
---|
| 8 | =============================================================================
|
---|
| 9 | */
|
---|
| 10 |
|
---|
| 11 | char *
|
---|
| 12 | memset(sp, c, n)
|
---|
| 13 | register char *sp, c;
|
---|
| 14 | register int n;
|
---|
| 15 | {
|
---|
| 16 | register char *sp0 = sp;
|
---|
| 17 |
|
---|
| 18 | while (--n >= 0)
|
---|
| 19 | *sp++ = c;
|
---|
| 20 |
|
---|
| 21 | return(sp0);
|
---|
| 22 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.