0052-wmemset.c - scc - simple c99 compiler
(HTM) git clone git://git.simple-cc.org/scc
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Submodules
(DIR) README
(DIR) LICENSE
---
0052-wmemset.c (327B)
---
1 #include <assert.h>
2 #include <stdio.h>
3 #include <wchar.h>
4
5 /*
6 output:
7 testing
8 done
9 end:
10 */
11
12 int
13 main()
14 {
15 wchar_t *p, buf[40];
16
17 puts("testing");
18
19 wmemset(buf, 2, 40);
20 for (p = buf; p < &buf[40]; ++p)
21 assert(*p == 2);
22
23 wmemset(buf, 0, 0);
24 for (p = buf; p < &buf[40]; ++p)
25 assert(*p == 2);
26
27 puts("done");
28
29 return 0;
30 }