From 93a568aaba1d3da3497102dfe1eeb81070a24c1c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 20 Apr 2002 07:58:48 +0000 Subject: Update. * iconvdata/JISX0213.TXT: New file. * iconvdata/jisx0213.h: New file. * iconvdata/jisx0213.c: New file. * iconvdata/euc-jisx0213.c: New file. * iconvdata/shift_jisx0213.c: New file. * iconvdata/gconv-modules (EUC-JISX0213, SHIFT_JISX0213): New modules. * iconvdata/EUC-JISX0213.precomposed: New file. * iconvdata/SHIFT_JISX0213.precomposed: New file. * iconvdata/SHIFT_JISX0213.irreversible: New file. * iconvdata/tst-table-to.c (main): Make it work for encodings for which the "to" direction is stateful. * iconvdata/tst-tables.sh: Add EUC-JISX0213, SHIFT_JISX0213. * iconvdata/Makefile (modules): Add libJISX0213, EUC-JISX0213, SHIFT_JISX0213. (libJISX0213-routines): New variable. (LDFLAGS-EUC-JISX0213.so, LDFLAGS-SHIFT_JISX0213.so): New variables. (EUC-JISX0213.so, SHIFT_JISX0213.so): Depend on libJISX0213.so. (LDFLAGS-libJISX0213.so): New variable. (distribute): Add JISX0213.TXT, EUC-JISX0213.precomposed, SHIFT_JISX0213.precomposed, SHIFT_JISX0213.irreversible, jisx0213.c, jisx0213.h, euc-jisx0213.c, shift_jisx0213.c. 2002-04-15 Bruno Haible * iconvdata/big5hkscs.c (big5hkscs_to_ucs): Change element type to uint32_t. Update to Unicode 3.2. (from_ucs4, from_ucs4_idx): Update to Unicode 3.2. (BODY for TO_LOOP): Handle the ASCII range specially. * iconvdata/BIG5HKSCS.irreversible: Add one more entry. * iconvdata/testdata/BIG5HKSCS: Remove a character. * iconvdata/testdata/BIG5HKSCS..UTF-8: Regenerated. 2002-04-15 Bruno Haible * iconvdata/gb18030.c (__twobyte_to_ucs, __fourbyte_to_ucs, __ucs_to_gb18030_tab1, __ucs_to_gb18030_tab2): Update to Unicode 3.2. 2002-04-15 Bruno Haible * iconvdata/cns11643.h (__cns11643_from_ucs4p2c_tab): New declaration. (ucs4_to_cns11643): Update. * iconvdata/cns11643.c: Update to Unicode 3.2. (__cns11643l2*_to_ucs4_tab, __cns11643_from_ucs4p0_tab, __cns11643_from_ucs4p2_tab): Regenerated. (__cns11643_from_ucs4p2c_tab): New array. * iconvdata/EUC-TW.irreversible: Remove two entries. 2002-04-15 Bruno Haible * locale/C-translit.h.in: Update to Unicode 3.2. Add , .., .., .., , .., .., ... 2002-04-15 Bruno Haible --- iconvdata/tst-table-to.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'iconvdata/tst-table-to.c') diff --git a/iconvdata/tst-table-to.c b/iconvdata/tst-table-to.c index e0179f1303..521ebadaea 100644 --- a/iconvdata/tst-table-to.c +++ b/iconvdata/tst-table-to.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2001 Free Software Foundation, Inc. +/* Copyright (C) 2000-2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Bruno Haible , 2000. @@ -76,9 +76,15 @@ main (int argc, char *argv[]) size_t inbytesleft = incount; char *outbuf = (char *) buf; size_t outbytesleft = sizeof (buf); - size_t result = iconv (cd, - (char **) &inbuf, &inbytesleft, - &outbuf, &outbytesleft); + size_t result; + + iconv (cd, NULL, NULL, NULL, NULL); + result = iconv (cd, + (char **) &inbuf, &inbytesleft, + &outbuf, &outbytesleft); + if (result != (size_t)(-1)) + result = iconv (cd, NULL, NULL, &outbuf, &outbytesleft); + if (result == (size_t)(-1)) { if (errno != EILSEQ) -- cgit v1.2.3