c16rtomb
size_t c16rtomb(char * __restrict, char16_t, mbstate_t * __restrict);
ps = &(XLOCALE_CTYPE(locale)->c16rtomb);
#define cXXrtomb c16rtomb
__mbstate_t c16rtomb;
memset(&l->c16rtomb, 0, sizeof(l->c16rtomb));
ATF_REQUIRE(c16rtomb(buf, 0x20ac, &s) == (size_t)-1);
ATF_REQUIRE(c16rtomb(buf, 0x20ac, &s) == 1);
ATF_REQUIRE(c16rtomb(buf, 0xd83d, &s) == 0);
ATF_REQUIRE(c16rtomb(buf, 0xdca9, &s) == 4);
ATF_REQUIRE(c16rtomb(buf, 0xd83d, &s) == 0);
ATF_REQUIRE(c16rtomb(buf, L'A', &s) == (size_t)-1);
ATF_REQUIRE(c16rtomb(buf, 0xdca9, &s) == (size_t)-1);
ATF_REQUIRE(c16rtomb(NULL, L'\0', NULL) == 1);
ATF_REQUIRE(c16rtomb(NULL, 0xdc00, NULL) == 1);
ATF_REQUIRE(c16rtomb(buf, 0, &s) == 1);
ATF_REQUIRE(c16rtomb(NULL, L'\0', NULL) == 1);
ATF_REQUIRE(c16rtomb(NULL, L'A', NULL) == 1);
ATF_REQUIRE(c16rtomb(buf, L'A', &s) == 1);
ATF_REQUIRE(c16rtomb(buf, 0xd83d, &s) == 0);
ATF_REQUIRE(c16rtomb(buf, 0xdca9, &s) == (size_t)-1);