|
Last change
on this file since 108 was 10, checked in by bird, 23 years ago |
|
Initial revision
|
-
Property cvs2svn:cvs-rev
set to
1.1
-
Property svn:eol-style
set to
native
-
Property svn:executable
set to
*
|
|
File size:
372 bytes
|
| Line | |
|---|
| 1 | /* memset
|
|---|
| 2 | This implementation is in the public domain. */
|
|---|
| 3 |
|
|---|
| 4 | #include <ansidecl.h>
|
|---|
| 5 | #ifdef __STDC__
|
|---|
| 6 | #include <stddef.h>
|
|---|
| 7 | #else
|
|---|
| 8 | #define size_t unsigned long
|
|---|
| 9 | #endif
|
|---|
| 10 |
|
|---|
| 11 | PTR
|
|---|
| 12 | DEFUN(memset, (dest, val, len),
|
|---|
| 13 | PTR dest AND register int val AND register size_t len)
|
|---|
| 14 | {
|
|---|
| 15 | register unsigned char *ptr = (unsigned char*)dest;
|
|---|
| 16 | while (len-- > 0)
|
|---|
| 17 | *ptr++ = val;
|
|---|
| 18 | return dest;
|
|---|
| 19 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.