2022-06-11 04:49:07 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2022-06-22 12:36:26 +00:00
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
typedef uint_least16_t char16_t;
|
|
|
|
typedef uint_least32_t char32_t;
|
2022-06-11 04:49:07 +00:00
|
|
|
|
2022-06-28 11:49:30 +00:00
|
|
|
typedef struct mbstate_t mbstate_t;
|
2022-06-21 13:32:46 +00:00
|
|
|
struct mbstate_t {
|
2022-06-22 12:36:26 +00:00
|
|
|
char16_t leftover;
|
2022-06-21 13:32:46 +00:00
|
|
|
};
|
|
|
|
|
2022-06-22 12:36:26 +00:00
|
|
|
size_t mbrtoc16(
|
|
|
|
char16_t *restrict pc16,
|
|
|
|
char const *restrict s,
|
|
|
|
size_t n,
|
|
|
|
mbstate_t *restrict ps
|
|
|
|
);
|
|
|
|
|
|
|
|
size_t c16rtomb(
|
|
|
|
char *restrict s,
|
|
|
|
char16_t c16,
|
|
|
|
mbstate_t *restrict ps
|
|
|
|
);
|
|
|
|
|
|
|
|
size_t mbrtoc32(
|
|
|
|
char32_t *restrict pc32,
|
|
|
|
char const *restrict s,
|
|
|
|
size_t n,
|
|
|
|
mbstate_t *restrict ps
|
|
|
|
);
|
|
|
|
|
|
|
|
size_t c32rtomb(
|
|
|
|
char *restrict s,
|
|
|
|
char32_t c32,
|
|
|
|
mbstate_t *restrict ps
|
|
|
|
);
|