blob: 774e44189ce2d7270a8b08542b15dd118a828907 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#if 0
#include <string.h>
#include "_assert.h"
/** fill memory **/
void * memset(void *s, int c, size_t n)
{
unsigned char *p = (unsigned char *)s;
size_t i = 0;
ASSERT_NONNULL(s);
for (i = 0; i < n; i++) {
p[i] = (unsigned char)c;
}
/*
RETURN_ALWAYS(ARGUMENT(s));
*/
return s;
}
/***
fills the first ARGUMENT(n) bytes of memory at ARGUMENT(s) with
the value ARGUMENT(c) (converted to an TYPE(unsigned char)).
***/
/*
STDC(1)
*/
#endif
|