File: tst_wcswidth.c

package info (click to toggle)
glibc 2.19-18
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports, jessie-kfreebsd
  • size: 203,628 kB
  • sloc: ansic: 969,800; asm: 241,205; sh: 10,063; makefile: 8,471; cpp: 3,595; perl: 2,077; pascal: 1,839; awk: 1,704; yacc: 317; sed: 73
file content (39 lines) | stat: -rw-r--r-- 655 bytes parent folder | download | duplicates (47)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
  WCSWIDTH: int wcswidth (const wchar_t *ws, size_t n);
*/

#define TST_FUNCTION wcswidth

#include "tsp_common.c"
#include "dat_wcswidth.c"

int
tst_wcswidth (FILE *fp, int debug_flg)
{
  TST_DECL_VARS (int);
  wchar_t *ws;
  int n;

  TST_DO_TEST (wcswidth)
  {
    TST_HEAD_LOCALE (wcswidth, S_WCSWIDTH);
    TST_DO_REC (wcswidth)
    {
      TST_GET_ERRET (wcswidth);
      ws = TST_INPUT (wcswidth).ws;
      n = TST_INPUT (wcswidth).n;
      ret = wcswidth (ws, n);

      if (debug_flg)
	{
	  fprintf (stderr, "wcswidth: [ %d ] : ret = %d\n", rec + 1, ret);
	}

      TST_IF_RETURN (S_WCSWIDTH)
      {
      };
    }
  }

  return err_count;
}