upload android base code part8
This commit is contained in:
parent
841ae54672
commit
5425409085
57075 changed files with 9846578 additions and 0 deletions
26
android/toolchain/binutils/binutils-2.25/libiberty/memset.c
Normal file
26
android/toolchain/binutils/binutils-2.25/libiberty/memset.c
Normal file
|
@ -0,0 +1,26 @@
|
|||
/* memset
|
||||
This implementation is in the public domain. */
|
||||
|
||||
/*
|
||||
|
||||
@deftypefn Supplemental void* memset (void *@var{s}, int @var{c}, @
|
||||
size_t @var{count})
|
||||
|
||||
Sets the first @var{count} bytes of @var{s} to the constant byte
|
||||
@var{c}, returning a pointer to @var{s}.
|
||||
|
||||
@end deftypefn
|
||||
|
||||
*/
|
||||
|
||||
#include <ansidecl.h>
|
||||
#include <stddef.h>
|
||||
|
||||
PTR
|
||||
memset (PTR dest, register int val, register size_t len)
|
||||
{
|
||||
register unsigned char *ptr = (unsigned char*)dest;
|
||||
while (len-- > 0)
|
||||
*ptr++ = val;
|
||||
return dest;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue