X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=opt%2Fbasecodecs%2F_PDCLIB_utf8.c;h=b0d3413e696d7489f3d6b5b2f7f6968a3f8da240;hb=310c24160b52d6f09e5a9a6d935a2f60b5826e2a;hp=8183aef254ecd69e2126b06ea9d1d7686f2b3863;hpb=4fe88a1c445105a96d08b808831d6fc7480a211d;p=pdclib.old diff --git a/opt/basecodecs/_PDCLIB_utf8.c b/opt/basecodecs/_PDCLIB_utf8.c index 8183aef..b0d3413 100644 --- a/opt/basecodecs/_PDCLIB_utf8.c +++ b/opt/basecodecs/_PDCLIB_utf8.c @@ -9,6 +9,7 @@ #include #include #include +#include <_PDCLIB_encoding.h> /* Use of the mbstate: * @@ -55,11 +56,11 @@ end_conversion: \ do { if((c & 0xC0) != 0x80) return false; } while(0) static bool utf8toc32( - char32_t **restrict p_outbuf, - size_t *restrict p_outsz, - const char **restrict p_inbuf, - size_t *restrict p_insz, - mbstate_t *restrict p_s + char32_t *restrict *restrict p_outbuf, + size_t *restrict p_outsz, + const char *restrict *restrict p_inbuf, + size_t *restrict p_insz, + mbstate_t *restrict p_s ) { START_CONVERSION @@ -164,11 +165,11 @@ enum { }; static bool c32toutf8( - char **restrict p_outbuf, - size_t *restrict p_outsz, - const char32_t **restrict p_inbuf, - size_t *restrict p_insz, - mbstate_t *restrict p_s + char *restrict *restrict p_outbuf, + size_t *restrict p_outsz, + const char32_t *restrict *restrict p_inbuf, + size_t *restrict p_insz, + mbstate_t *restrict p_s ) { START_CONVERSION @@ -227,7 +228,7 @@ static bool c32toutf8( END_CONVERSION; } -_PDCLIB_charcodec _PDCLIB_utf8_codec = { +_PDCLIB_charcodec_t _PDCLIB_utf8_codec = { .__mbstoc32s = utf8toc32, .__c32stombs = c32toutf8, };