scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

0050-wmemcpy.c (298B)


      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 buf[40];
     16 	wchar_t abc[] = {'a', 'b', 'c', '\0'};
     17 
     18 	puts("testing");
     19 	assert(!wmemcmp(wmemcpy(buf, abc, 3), abc, 3));
     20 	assert(wmemcpy(buf, abc, 0) == buf);
     21 	puts("done");
     22 
     23 	return 0;
     24 }