Lines Matching defs:dstbuf

51 	wchar_t dstbuf[128];
60 wmemset(dstbuf, 0xcccc, sizeof(dstbuf) / sizeof(*dstbuf));
63 ATF_REQUIRE(mbsnrtowcs(dstbuf, (const char **)&src, 6, sizeof(dstbuf) /
64 sizeof(*dstbuf), &s) == 5);
65 ATF_REQUIRE(wcscmp(dstbuf, L"hello") == 0);
66 ATF_REQUIRE(dstbuf[6] == 0xcccc);
72 wmemset(dstbuf, 0xcccc, sizeof(dstbuf) / sizeof(*dstbuf));
75 ATF_REQUIRE(mbsnrtowcs(dstbuf, (const char **)&src, 4, sizeof(dstbuf) /
76 sizeof(*dstbuf), &s) == 4);
77 ATF_REQUIRE(wmemcmp(dstbuf, L"hell", 4) == 0);
78 ATF_REQUIRE(dstbuf[5] == 0xcccc);
84 wmemset(dstbuf, 0xcccc, sizeof(dstbuf) / sizeof(*dstbuf));
87 ATF_REQUIRE(mbsnrtowcs(dstbuf, (const char **)&src, 6, 4, &s) == 4);
88 ATF_REQUIRE(wmemcmp(dstbuf, L"hell", 4) == 0);
89 ATF_REQUIRE(dstbuf[5] == 0xcccc);
109 wmemset(dstbuf, 0xcccc, sizeof(dstbuf) / sizeof(*dstbuf));
111 ATF_REQUIRE(mbsnrtowcs(dstbuf, (const char **)&src, 6, sizeof(dstbuf) /
112 sizeof(*dstbuf), NULL) == 5);
113 ATF_REQUIRE(wcscmp(dstbuf, L"hello") == 0);
114 ATF_REQUIRE(dstbuf[6] == 0xcccc);
128 wmemset(dstbuf, 0xcccc, sizeof(dstbuf) / sizeof(*dstbuf));
129 ATF_REQUIRE(mbsnrtowcs(dstbuf, (const char **)&src, 1, 1, &s) == 0);
130 ATF_REQUIRE(dstbuf[0] == 0);
131 ATF_REQUIRE(dstbuf[1] == 0xcccc);
139 wmemset(dstbuf, 0xcccc, sizeof(dstbuf) / sizeof(*dstbuf));
140 ATF_REQUIRE(mbsnrtowcs(dstbuf, (const char **)&src, 1, 0, &s) == 0);
141 ATF_REQUIRE(dstbuf[0] == 0xcccc);
148 wmemset(dstbuf, 0xcccc, sizeof(dstbuf) / sizeof(*dstbuf));
149 ATF_REQUIRE(mbsnrtowcs(dstbuf, (const char **)&src, 0, 1, &s) == 0);
150 ATF_REQUIRE(dstbuf[0] == 0xcccc);
164 wmemset(dstbuf, 0xcccc, sizeof(dstbuf) / sizeof(*dstbuf));
165 ATF_REQUIRE(mbsnrtowcs(dstbuf, (const char **)&src, 8, sizeof(dstbuf) /
166 sizeof(*dstbuf), &s) == 5);
167 ATF_REQUIRE(dstbuf[0] == 0xA3C1 && dstbuf[1] == 0x20 && dstbuf[2] == 0x42 &&
168 dstbuf[3] == 0x20 && dstbuf[4] == 0xA3C3 && dstbuf[5] == 0);
176 wmemset(dstbuf, 0xcccc, sizeof(dstbuf) / sizeof(*dstbuf));
177 ATF_REQUIRE(mbsnrtowcs(dstbuf, (const char **)&src, 6, sizeof(dstbuf) /
178 sizeof(*dstbuf), &s) == 4);
181 ATF_REQUIRE(mbsnrtowcs(dstbuf, (const char **)&src, 1, sizeof(dstbuf) /
182 sizeof(*dstbuf), &s) == 1);
184 ATF_REQUIRE(mbsnrtowcs(dstbuf, (const char **)&src, 1, sizeof(dstbuf) /
185 sizeof(*dstbuf), &s) == 0);