13 wchar_t outbuf
[BUFSIZE
];
19 size_t inbytes_left
, outbytes_left
;
23 for (i
=0; i
< BUFSIZE
; i
++)
26 cd
= iconv_open ("UCS-4LE", "UTF-8");
28 inbytes_left
= BUFSIZE
;
29 outbytes_left
= BUFSIZE
* 4;
31 outptr
= (char *) outbuf
;
33 count
= iconv (cd
, &inptr
, &inbytes_left
, &outptr
, &outbytes_left
);
38 printf ("Received E2BIG\n");
40 printf ("Received something else\n");
42 printf ("inptr change: %td\n", inptr
- inbuf
);
43 printf ("inlen change: %zd\n", BUFSIZE
- inbytes_left
);
44 printf ("outptr change: %td\n", outptr
- (char *) outbuf
);
45 printf ("outlen change: %zd\n", BUFSIZE
* 4 - outbytes_left
);
49 printf ("Succeeded\n");
56 #define TEST_FUNCTION do_test ()
57 #include "../test-skeleton.c"