File: ppc64-test-wchar.c

package info (click to toggle)
libunwind 0.99-0.2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 4,932 kB
  • ctags: 4,079
  • sloc: ansic: 23,131; sh: 18,577; asm: 1,637; makefile: 694; cpp: 70
file content (20 lines) | stat: -rw-r--r-- 423 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <wchar.h>
#include <stdio.h>
main ()
{
  wchar_t *wstring =
    L"Now is the time for all good men to come to the aid of their country";
  int i;
  int ret;

  printf("wcslen(wstring) = %d\n", wcslen(wstring));
  for (i = 0; i < wcslen (wstring); i++)
    {
      ret = printf ("%lc", wstring[i]);
      if (ret != 1) {
	printf("printf returned: %d\n", ret);
	perror("Linux says");
      }
    }
  printf("\n");
}