1 /* 2 WCSWIDTH: int wcswidth (const wchar_t *ws, size_t n); 3 */ 4 5 #define TST_FUNCTION wcswidth 6 7 #include "tsp_common.c" 8 #include "dat_wcswidth.c" 9 10 int tst_wcswidth(FILE * fp,int debug_flg)11tst_wcswidth (FILE *fp, int debug_flg) 12 { 13 TST_DECL_VARS (int); 14 wchar_t *ws; 15 int n; 16 17 TST_DO_TEST (wcswidth) 18 { 19 TST_HEAD_LOCALE (wcswidth, S_WCSWIDTH); 20 TST_DO_REC (wcswidth) 21 { 22 TST_GET_ERRET (wcswidth); 23 ws = TST_INPUT (wcswidth).ws; 24 n = TST_INPUT (wcswidth).n; 25 ret = wcswidth (ws, n); 26 27 if (debug_flg) 28 { 29 fprintf (stderr, "wcswidth: [ %d ] : ret = %d\n", rec + 1, ret); 30 } 31 32 TST_IF_RETURN (S_WCSWIDTH) 33 { 34 }; 35 } 36 } 37 38 return err_count; 39 } 40