#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
int main (void)
{
char mba[] = "**********";
char mbb[] = "**********";
size_t n;
n = wcstombs (mba, L"äåâ", 6);
printf ("wcstombs: %i: \"%s\"\n", n
, mba
);
n = wcstombs (mbb, L"äåâ", 9);
printf ("wcstombs: %i: \"%s\"\n", n
, mbb
);
return 0;
}
I2luY2x1ZGUgPGxvY2FsZS5oPgojaW5jbHVkZSA8c3RkaW8uaD4KI2luY2x1ZGUgPHN0ZGxpYi5oPgoKaW50IG1haW4gKHZvaWQpCnsKICBzZXRsb2NhbGUgKExDX0FMTCwgImVuX1VTLlVURi04Iik7CiAgY2hhciBtYmFbXSA9ICIqKioqKioqKioqIjsKICBjaGFyIG1iYltdID0gIioqKioqKioqKioiOwogIHNpemVfdCBuOwoKICBuID0gd2NzdG9tYnMgKG1iYSwgTCLDpMOlw6IiLCA2KTsKICBwcmludGYgKCJ3Y3N0b21iczogJWk6IFwiJXNcIlxuIiwgbiwgbWJhKTsKCiAgbiA9IHdjc3RvbWJzIChtYmIsIEwiw6TDpcOiIiwgOSk7CiAgcHJpbnRmICgid2NzdG9tYnM6ICVpOiBcIiVzXCJcbiIsIG4sIG1iYik7CgogIHJldHVybiAwOwp9Cg==