Lines Matching defs:buf
5 static wchar_t buf[100];
6 #define nbuf (sizeof (buf) / sizeof (buf[0]))
26 n = swprintf(buf, nbuf,L"Hello %s" , "world");
32 else if (wcscmp(buf, L"Hello world") != 0)
34 printf("incorrect string: L\"%ls\" instead of L\"Hello world\"\n", buf);
38 n = swprintf(buf, nbuf, L"Is this >%g< 3.1?", 3.1);
42 } else if (wcscmp (buf, L"Is this >3.1< 3.1?") != 0) {
44 buf);
49 ssize_t res = swprintf(buf, tests[n].n, L"%s", tests[n].str);
52 printf("swprintf (buf, %Zu, L\"%%s\", \"%s\") expected to fail\n",
56 printf("swprintf (buf, %Zu, L\"%%s\", \"%s\") expected to return %Zd, but got %Zd\n",
60 printf("swprintf (buf, %Zu, L\"%%s\", \"%s\") OK\n", tests[n].n,
65 if (swprintf(buf, nbuf, L"%.0s", "foo") != 0 || wcslen(buf) != 0) {
66 printf("swprintf (buf, %Zu, L\"%%.0s\", \"foo\") create some output\n",
71 if (swprintf(buf, nbuf, L"%.0ls", L"foo") != 0 || wcslen(buf) != 0) {
72 printf("swprintf (buf, %Zu, L\"%%.0ls\", L\"foo\") create some output\n",