manual: Correct argument order in mount examples [BZ #27207]
[glibc.git] / stdlib / testmb2.c
blob16d2846d23d4ce7610aad0eaee0b892c106135d5
1 /* Test case by Miloslav Trmač <mitr@volny.cz>. */
2 #include <locale.h>
3 #include <stdint.h>
4 #include <stdlib.h>
5 #include <stdio.h>
7 int
8 main (void)
10 wchar_t wc;
12 if (setlocale (LC_CTYPE, "de_DE.UTF-8") == NULL)
14 puts ("setlocale failed");
15 return 1;
18 if (mbtowc (&wc, "\xc3\xa1", MB_CUR_MAX) != 2 || wc != 0xE1)
20 puts ("1st mbtowc failed");
21 return 1;
24 if (mbtowc (&wc, "\xc3\xa1", SIZE_MAX) != 2 || wc != 0xE1)
26 puts ("2nd mbtowc failed");
27 return 1;
30 return 0;