home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 4: GNU Archives
/
Linux Cubed Series 4 - GNU Archives.iso
/
gnu
/
binutils.7
/
binutils
/
binutils-2.7
/
libiberty
/
memset.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1996-07-04
|
372 b
|
20 lines
/* memset
This implementation is in the public domain. */
#include <ansidecl.h>
#ifdef __STDC__
#include <stddef.h>
#else
#define size_t unsigned long
#endif
PTR
DEFUN(memset, (dest, val, len),
PTR dest AND register int val AND register size_t len)
{
register unsigned char *ptr = (unsigned char*)dest;
while (len-- > 0)
*ptr++ = val;
return dest;
}