#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
int main (void)
{
wchar_t wca[] = L"€€€€€€€€€€";
wchar_t wcb[] = L"€€€€€€€€€€";
size_t q;
q = mbstowcs (wca, "äåâ", 3);
printf ("mbstowcs: %i: \"%ls\"\n", q
, wca
);
q = mbstowcs (wcb, "äåâ", 6);
printf ("mbstowcs: %i: \"%ls\"\n", q
, wcb
);
return 0;
}
I2luY2x1ZGUgPGxvY2FsZS5oPgojaW5jbHVkZSA8c3RkaW8uaD4KI2luY2x1ZGUgPHN0ZGxpYi5oPgoKaW50IG1haW4gKHZvaWQpCnsKICBzZXRsb2NhbGUgKExDX0FMTCwgImVuX1VTLlVURi04Iik7CiAgd2NoYXJfdCB3Y2FbXSA9IEwi4oKs4oKs4oKs4oKs4oKs4oKs4oKs4oKs4oKs4oKsIjsKICB3Y2hhcl90IHdjYltdID0gTCLigqzigqzigqzigqzigqzigqzigqzigqzigqzigqwiOwogIHNpemVfdCBxOwoKICBxID0gbWJzdG93Y3MgKHdjYSwgIsOkw6XDoiIsIDMpOwogIHByaW50ZiAoIm1ic3Rvd2NzOiAlaTogXCIlbHNcIlxuIiwgcSwgd2NhKTsKCiAgcSA9IG1ic3Rvd2NzICh3Y2IsICLDpMOlw6IiLCA2KTsKICBwcmludGYgKCJtYnN0b3djczogJWk6IFwiJWxzXCJcbiIsIHEsIHdjYik7CgogIHJldHVybiAwOwp9Cg==