* symtab.h (enum address_class): Remove LOC_BASEREG and
[deliverable/binutils-gdb.git] / libiberty / memset.c
CommitLineData
252b5132
RH
1/* memset
2 This implementation is in the public domain. */
3
39423523
DD
4/*
5
6@deftypefn Supplemental void* memset (void *@var{s}, int @var{c}, size_t @var{count})
7
8Sets the first @var{count} bytes of @var{s} to the constant byte
9@var{c}, returning a pointer to @var{s}.
10
11@end deftypefn
12
13*/
14
252b5132 15#include <ansidecl.h>
252b5132 16#include <stddef.h>
252b5132
RH
17
18PTR
1e45deed 19memset (PTR dest, register int val, register size_t len)
252b5132
RH
20{
21 register unsigned char *ptr = (unsigned char*)dest;
22 while (len-- > 0)
23 *ptr++ = val;
24 return dest;
25}
This page took 0.374577 seconds and 4 git commands to generate.