diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-06-28 21:46:28 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-06-28 21:46:28 +0000 |
commit | f1f1b6b95a3d2dee0d69eeb0ab606d3c3c0a4b5e (patch) | |
tree | 3262ef2e7d22ef3628d78787465beadca9946a72 /localedata | |
parent | 777e222ddbdffe54b5e344ac1cb40a6ab9ef621f (diff) | |
download | glibc-f1f1b6b95a3d2dee0d69eeb0ab606d3c3c0a4b5e.tar.gz glibc-f1f1b6b95a3d2dee0d69eeb0ab606d3c3c0a4b5e.tar.xz glibc-f1f1b6b95a3d2dee0d69eeb0ab606d3c3c0a4b5e.zip |
Update.
* wcsmbs/mbrtowc.c: Set flush to 1 for conversion function calls depending on whether the input string is empty or not. * wcsmbs/mbrtowc.c: Calling function without input means clearing the given state and not avoiding this by modifying a local object. * wcsmbs/wcrtomb.c: Likewise. * iconv/skeleton.c: If no EMIT_SHIFT_TO_INIT is defined clear state object since some incomplete characters might be in there.
Diffstat (limited to 'localedata')
-rw-r--r-- | localedata/ChangeLog | 5 | ||||
-rw-r--r-- | localedata/tests-mbwc/dat_mbrlen.c | 17 | ||||
-rw-r--r-- | localedata/tests-mbwc/tst_mbrlen.c | 5 |
3 files changed, 20 insertions, 7 deletions
diff --git a/localedata/ChangeLog b/localedata/ChangeLog index 1f61a85259..483038a784 100644 --- a/localedata/ChangeLog +++ b/localedata/ChangeLog @@ -1,5 +1,10 @@ 2000-06-28 Ulrich Drepper <drepper@redhat.com> + * tests-mbwc/dat_mbrlen.c: Correct some tests. Remove old WAIVER + comments. + * tests-mbwc/tst_mbrlen.c: Enable code to respect t_ini. Also clear + internal state of mbrlen. + * Makefile (do-tst-ctype): Add do-tst-mbswcs to list of dependencies. (TEST_MBWC_ENV): Remove unnecessary slash. * tst-ctype.sh: Add de_DE.UTF-8 to list of tested locales. diff --git a/localedata/tests-mbwc/dat_mbrlen.c b/localedata/tests-mbwc/dat_mbrlen.c index f1f9e15294..8fdef8bf8a 100644 --- a/localedata/tests-mbwc/dat_mbrlen.c +++ b/localedata/tests-mbwc/dat_mbrlen.c @@ -85,9 +85,7 @@ TST_MBRLEN tst_mbrlen_loc [] = { { { { 1, 0, 1, 0, }, - /* <WAIVER_? x 2> assuming ascii */ { 1, EILSEQ, 1, -1, }, - /* <WAIVER_? x 2> assuming ascii */ { 1, EILSEQ, 1, -1, }, } } @@ -102,16 +100,20 @@ TST_MBRLEN tst_mbrlen_loc [] = { { { { 1, "\317\302", 1, 0, 0 }, +#ifdef SHOJI_IS_RIGHT { 0, "", 0, 0, 0 }, +#else + /* XXX This test depends on the internal state being empty. + XXX Therefore we must explicitly clean it. */ + { 0, "", 0, 0, 1 }, +#endif { 1, "\317\302", USE_MBCURMAX, 0, 0 }, } }, { { { 1, 0, 1, -2, }, - /* <WAIVER_?> returned -2 */ { 1, 0, 1, 0, }, - /* <WAIVER_?> returned 1 */ { 1, 0, 1, 2, }, } } @@ -127,8 +129,13 @@ TST_MBRLEN tst_mbrlen_loc [] = { { { { 1, 0, 1, -2, }, - /* <WAIVER_?> returned -2 */ +#ifdef SHOJI_IS_RIGHT { 1, 0, 1, +2, }, +#else + /* XXX ISO C explicitly says that the return value does not + XXX reflect the bytes contained in the state. */ + { 1, 0, 1, +1, }, +#endif { 1, 0, 1, 2, }, } } diff --git a/localedata/tests-mbwc/tst_mbrlen.c b/localedata/tests-mbwc/tst_mbrlen.c index a067acb266..5b31d32149 100644 --- a/localedata/tests-mbwc/tst_mbrlen.c +++ b/localedata/tests-mbwc/tst_mbrlen.c @@ -53,12 +53,13 @@ tst_mbrlen (FILE * fp, int debug_flg) } ps = (t_flg == 0) ? NULL : &s; -#if 0 + if (t_ini != 0) { memset (&s, 0, sizeof (s)); + mbrlen (NULL, 0, NULL); } -#endif + TST_CLEAR_ERRNO; ret = mbrlen (s_in, n, ps); TST_SAVE_ERRNO; |