Back to index

glibc  2.9
tst-sscanf.c
Go to the documentation of this file.
00001 #include <stdio.h>
00002 #include <wchar.h>
00003 
00004 #define WCS_LENGTH 256
00005 
00006 int
00007 main (void)
00008 {
00009   const char cnv[] ="%l[abc]";
00010   const char str[] = "abbcXab";
00011   wchar_t wcs[WCS_LENGTH];
00012   int result = 0;
00013 
00014   sscanf (str, cnv, wcs);
00015   printf ("wcs = \"%ls\"\n", wcs);
00016   fflush (stdout);
00017   result = wcscmp (wcs, L"abbc") != 0;
00018 
00019   return result;
00020 }