From: Szabolcs Nagy Date: Fri, 10 Apr 2015 18:55:40 +0000 (+0000) Subject: use fgetwc on wide oriented streams X-Git-Url: http://nsz.repo.hu/git/?p=libc-test;a=commitdiff_plain;h=84bd22c52df08e1740a40450201fba4f87aa7091 use fgetwc on wide oriented streams --- diff --git a/src/functional/fwscanf.c b/src/functional/fwscanf.c index 69a7bbf..18b68e8 100644 --- a/src/functional/fwscanf.c +++ b/src/functional/fwscanf.c @@ -60,7 +60,7 @@ int main(void) TEST(i, y, 12, "%d != %d"); TEST(i, ftell(f), 12, "%d != %d"); TEST(i, feof(f), 0, "%d != %d"); - TEST(i, fgetc(f), 'x', "%d != %d"); + TEST(i, fgetwc(f), 'x', "%d != %d"); fclose(f); } @@ -74,10 +74,10 @@ int main(void) TEST(i, y, -1, "%d != %d"); TEST(i, ftell(f), 4, "%d != %d"); TEST(i, feof(f), 0, "%d != %d"); - TEST(i, fgetc(f), ' ', "%d != %d"); + TEST(i, fgetwc(f), ' ', "%d != %d"); rewind(f); - TEST(i, fgetc(f), '0', "%d != %d"); - TEST(i, fgetc(f), 'x', "%d != %d"); + TEST(i, fgetwc(f), '0', "%d != %d"); + TEST(i, fgetwc(f), 'x', "%d != %d"); TEST(i, fwscanf(f, L"%lf%n%c %d", &u, &x, a, &y), 3, "%d != %d"); TEST(u, u, 1.0, "%g != %g"); TEST(i, x, 1, "%d != %d");