gdb: include allocated/associated properties in 'maint print type'
[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
d4d868a2
RW
6@deftypefn Supplemental void* memset (void *@var{s}, int @var{c}, @
7 size_t @var{count})
39423523
DD
8
9Sets the first @var{count} bytes of @var{s} to the constant byte
10@var{c}, returning a pointer to @var{s}.
11
12@end deftypefn
13
14*/
15
252b5132 16#include <ansidecl.h>
252b5132 17#include <stddef.h>
252b5132
RH
18
19PTR
1e45deed 20memset (PTR dest, register int val, register size_t len)
252b5132
RH
21{
22 register unsigned char *ptr = (unsigned char*)dest;
23 while (len-- > 0)
24 *ptr++ = val;
25 return dest;
26}
This page took 0.85734 seconds and 4 git commands to generate.