2 char32_t *restrict pc32,
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
36 // With UTF-32, this shouldn't be possible?
38 } else if(pc32[-1] == 0) {
42 // Count of processed characters
46 assert(nr == 0 && "Must have processed whole input");
57 char32_t *restrict pc32,
58 const char *restrict s,
60 mbstate_t *restrict ps
63 return mbrtoc32_l(pc32, s, n, ps, _PDCLIB_threadlocale());
69 #include <_PDCLIB_test.h>
73 TESTCASE( NO_TESTDRIVER );