diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-08-29 21:14:05 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-08-29 21:14:05 +0000 |
commit | c7c3b0e907efac218b329ebbe3fc7432ec4415c5 (patch) | |
tree | 9d7b90e399e6ee1e87e49dec92ec47f4476352f3 /iconvdata/iso-2022-jp.c | |
parent | 4dadd40cc72ddee017ebd0d278671398485dcbb6 (diff) | |
download | glibc-c7c3b0e907efac218b329ebbe3fc7432ec4415c5.tar.gz glibc-c7c3b0e907efac218b329ebbe3fc7432ec4415c5.tar.xz glibc-c7c3b0e907efac218b329ebbe3fc7432ec4415c5.zip |
Update.
2000-08-29 Akira Higuchi <a@kondara.org> * iconv/gconv_db.c (increment_counter): Reset __init_fct, __fct, and __end_fct fields of struct __gconv_step. * iconv/Makefile (tests): Add iconv-bug2. * iconv/iconv-bug2.c: New file. * iconvdata/euc-kr.c (BODY for FROM_LOOP): Pass 'inend - inptr' instead of 'inptr - inend' to ksc5601_to_ucs4. * iconvdata/sjis.c (BODY for FROM_LOOP): Allow 0x7f character. * iconvdata/iso-2022-cn.c (BODY for FROM_LOOP): If an incomplete character or shift sequence is found at the end of the input string, return__GCONV_INCOMPLETE_INPUT instead of __GCONV_EMPTY_INPUT. * iconvdata/iso-2022-jp.c (BODY for FROM_LOOP): Likewise. * iconvdata/iso-2022-kr.c (BODY for FROM_LOOP): Likewise. * iconvdata/iso-2022-jp.c (BODY for FROM_LOOP): Return __GCONV_ILLEGAL_INPUT for 8bit characters.
Diffstat (limited to 'iconvdata/iso-2022-jp.c')
-rw-r--r-- | iconvdata/iso-2022-jp.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/iconvdata/iso-2022-jp.c b/iconvdata/iso-2022-jp.c index fc34aaba96..bd2e033746 100644 --- a/iconvdata/iso-2022-jp.c +++ b/iconvdata/iso-2022-jp.c @@ -258,7 +258,7 @@ gconv_end (struct __gconv_step *data) && __builtin_expect (inptr + 3 >= inend, 0))) \ { \ /* Not enough input available. */ \ - result = __GCONV_EMPTY_INPUT; \ + result = __GCONV_INCOMPLETE_INPUT; \ break; \ } \ \ @@ -399,6 +399,18 @@ gconv_end (struct __gconv_step *data) continue; \ } \ } \ + else if (ch >= 0x80) \ + { \ + if (! ignore_errors_p ()) \ + { \ + result = __GCONV_ILLEGAL_INPUT; \ + break; \ + } \ + \ + ++inptr; \ + ++*irreversible; \ + continue; \ + } \ else if (set == ASCII_set || (ch < 0x21 || ch == 0x7f)) \ /* Almost done, just advance the input pointer. */ \ ++inptr; \ @@ -462,7 +474,7 @@ gconv_end (struct __gconv_step *data) \ if (__builtin_expect (ch, 1) == 0) \ { \ - result = __GCONV_EMPTY_INPUT; \ + result = __GCONV_INCOMPLETE_INPUT; \ break; \ } \ else if (__builtin_expect (ch, 0) == __UNKNOWN_10646_CHAR) \ |