|
Last change
on this file since 5c13d64 was 5c13d64, checked in by Thomas Lopatic <thomas@…>, 8 years ago |
|
Use void pointers for mem*() functions.
|
-
Property mode
set to
100644
|
|
File size:
445 bytes
|
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | =============================================================================
|
|---|
| 3 | memset.c -- fill memory with short words
|
|---|
| 4 | Version 1 -- 1987-03-18 -- D.N. Lynx Crowe
|
|---|
| 5 |
|
|---|
| 6 | Set an array of n shorts starting at vp to the short s.
|
|---|
| 7 | Return pointer to vp.
|
|---|
| 8 | =============================================================================
|
|---|
| 9 | */
|
|---|
| 10 |
|
|---|
| 11 | void *memsetw(void *vp, short s, short n)
|
|---|
| 12 | {
|
|---|
| 13 | short *sp = vp;
|
|---|
| 14 |
|
|---|
| 15 | while (--n >= 0)
|
|---|
| 16 | *sp++ = s;
|
|---|
| 17 |
|
|---|
| 18 | return(vp);
|
|---|
| 19 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.