Back to index

glibc  2.9
tst_wcwidth.c
Go to the documentation of this file.
00001 /*
00002   WCWIDTH: int wcwidth (wchar_t wc);
00003 */
00004 
00005 #define TST_FUNCTION wcwidth
00006 
00007 #include "tsp_common.c"
00008 #include "dat_wcwidth.c"
00009 
00010 int
00011 tst_wcwidth (FILE * fp, int debug_flg)
00012 {
00013   TST_DECL_VARS (int);
00014   wchar_t wc;
00015 
00016   TST_DO_TEST (wcwidth)
00017   {
00018     TST_HEAD_LOCALE (wcwidth, S_WCWIDTH);
00019     TST_DO_REC (wcwidth)
00020     {
00021       TST_GET_ERRET (wcwidth);
00022       wc = TST_INPUT (wcwidth).wc;
00023       ret = wcwidth (wc);
00024 
00025       if (debug_flg)
00026        {
00027          fprintf (stdout, "wcwidth() [ %s : %d ] ret  = %d\n", locale,
00028                  rec + 1, ret);
00029        }
00030 
00031       TST_IF_RETURN (S_WCWIDTH)
00032       {
00033       }
00034     }
00035   }
00036 
00037   return err_count;
00038 }