#include "_PDCLIB_int.h"
#ifndef __cplusplus
-typedef _PDCLIB_int_least16_t _PDCLIB_char16_t;
-typedef _PDCLIB_int_least32_t _PDCLIB_char32_t;
+typedef _PDCLIB_int16_t _PDCLIB_char16_t;
+typedef _PDCLIB_int32_t _PDCLIB_char32_t;
#else
typedef char16_t _PDCLIB_char16_t;
typedef char32_t _PDCLIB_char32_t;
static inline int _PDCLIB_wcrtoc32(
_PDCLIB_char32_t *_PDCLIB_restrict out,
const _PDCLIB_wchar_t *_PDCLIB_restrict in,
- _PDCLIB__PDCLIB_size_t bufsize,
+ _PDCLIB_size_t bufsize,
_PDCLIB_mbstate_t *_PDCLIB_restrict ps
)
{
static inline _PDCLIB_size_t _PDCLIB_c32rtowc(
_PDCLIB_wchar_t *_PDCLIB_restrict out,
const _PDCLIB_char32_t *_PDCLIB_restrict in,
- _PDCLIB__PDCLIB_size_t bufsize,
+ _PDCLIB_size_t bufsize,
_PDCLIB_mbstate_t *_PDCLIB_restrict ps
)
{
static inline _PDCLIB_size_t _PDCLIB_wcrtoc32(
_PDCLIB_char32_t *_PDCLIB_restrict out,
const _PDCLIB_wchar_t *_PDCLIB_restrict in,
- _PDCLIB__PDCLIB_size_t bufsize,
+ _PDCLIB_size_t bufsize,
_PDCLIB_mbstate_t *_PDCLIB_restrict ps
)
{
static inline _PDCLIB_size_t _PDCLIB_c32rtowc(
_PDCLIB_wchar_t *_PDCLIB_restrict out,
const _PDCLIB_char32_t *_PDCLIB_restrict in,
- _PDCLIB__PDCLIB_size_t bufsize,
+ _PDCLIB_size_t bufsize,
_PDCLIB_mbstate_t *_PDCLIB_restrict ps
)
{
#endif
typedef struct {
- _PDCLIB_bool_t (*__mbtoc32)(
+ /* Reads at most *_P_insz bytes from *_P_inbuf and writes the result into
+ * *_P_outbuf, writing at most *_P_outsz characters. Updates *_P_outbuf,
+ * *_P_outsz, *_P_inbuf, *_P_outsz with the resulting state
+ *
+ * Returns true if the conversion completed successfully (i.e. one of
+ * _P_outsize or _P_insize reached zero and no coding errors were
+ * encountered), else return false.
+ */
+ _PDCLIB_bool (*__mbtoc32)(
_PDCLIB_char32_t **_PDCLIB_restrict _P_outbuf,
_PDCLIB_size_t *_PDCLIB_restrict _P_outsz,
const char **_PDCLIB_restrict _P_inbuf,
_PDCLIB_mbstate_t *_PDCLIB_restrict _P_ps
);
- _PDCLIB_bool_t (*__c32tomb)(
+ _PDCLIB_bool (*__c32tomb)(
char **_PDCLIB_restrict _P_outbuf,
_PDCLIB_size_t *_PDCLIB_restrict _P_outsz,
const _PDCLIB_char32_t **_PDCLIB_restrict _P_inbuf,