2 char16_t *restrict pc16,
3 const char *restrict s,
5 mbstate_t *restrict ps);
7 This file is part of the Public Domain C Library (PDCLib).
8 Permission is granted to use, modify, and / or redistribute at will.
16 #include <_PDCLIB_encoding.h>
17 #include <_PDCLIB_locale.h>
20 char32_t *restrict pc32,
21 const char *restrict s,
23 mbstate_t *restrict ps,
30 if(l->_Codec->__mbstoc32s(&pc32, &dstlen, &s, &nr, ps)) {
31 // Successful conversion
33 // A character was output
35 // The output character resulted entirely from stored state
37 } else if(pc32[-1] == 0) {
41 // Count of processed characters
45 assert(nr == 0 && "Must have processed whole input");
56 char32_t *restrict pc32,
57 const char *restrict s,
59 mbstate_t *restrict ps
62 return mbrtoc32_l(pc32, s, n, ps, _PDCLIB_threadlocale());
68 #include <_PDCLIB_test.h>
72 TESTCASE( NO_TESTDRIVER );