0049-wmemchr.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
       ---
       0049-wmemchr.c (346B)
       ---
            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[] = {0, 1, 2, 3, 4, 160};
           16 
           17         puts("testing");
           18         assert(wmemchr(buf, 2, 6) == buf+2);
           19         assert(wmemchr(buf, 2, 0) == NULL);
           20         assert(wmemchr(buf, 150, 6) == NULL);
           21         assert(wmemchr(buf, 160, 6) == buf+5);
           22         puts("done");
           23 
           24         return 0;
           25 }