diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-04-25 20:34:34 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-04-25 20:34:34 +0000 |
commit | 918b9d72a9980efd4622bd25506da9531a952dbe (patch) | |
tree | f45368136155cd1ef156aaf277047a5488b9c3ac /iconvdata/euckr.c | |
parent | 05c9fa3c0511214e808ec048f1062540dc243eb9 (diff) | |
download | glibc-918b9d72a9980efd4622bd25506da9531a952dbe.zip glibc-918b9d72a9980efd4622bd25506da9531a952dbe.tar.gz glibc-918b9d72a9980efd4622bd25506da9531a952dbe.tar.bz2 |
Update.
1998-04-25 18:39 Ulrich Drepper <drepper@cygnus.com>
* iconvdata/Makefile: Use gap method for iso8859-5, iso8859-7,
iso8859-8 and iso8859-10.
* iconvdata/iso8859-5.c: Change to use gap method.
* iconvdata/iso8859-7.c: Likewise.
* iconvdata/iso8859-8.c: Likewise.
* iconvdata/iso8859-10.c: Likewise.
* iconvdata/Makefile: Add rules for ISO-2022-JP module.
* iconv/skeleton.c: Allow END_LOOP do be defined and use it at the
end of the loop.
* iconvdata/iso-2022-jp.c: New file.
* iconvdata/ksc5601.c: Don't use uint16_t to represent byte sequence.
* iconvdata/ksc5601.h: Unify function interfaces.
* iconvdata/euckr.c: Adapt for changed ksc5601.h interface.
* iconvdata/uhc.c: Likewise.
* iconvdata/gb2312.h: Use correct types.
* iconvdata/iso646.c (gconv_open): Correctly initialize the character
size elements of data.
Diffstat (limited to 'iconvdata/euckr.c')
-rw-r--r-- | iconvdata/euckr.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/iconvdata/euckr.c b/iconvdata/euckr.c index 5184884..1a2ff89 100644 --- a/iconvdata/euckr.c +++ b/iconvdata/euckr.c @@ -88,27 +88,20 @@ euckr_from_ucs4 (uint32_t ch, unsigned char *cp) { \ /* Two-byte character. First test whether the next character \ is also available. */ \ - int ch2; \ - \ - if (NEED_LENGTH_TEST && inptr + 1 >= inend) \ + ch = ksc5601_to_ucs4 (&inptr, \ + NEED_LENGTH_TEST ? inptr - inbufend : 2, x080); \ + if (NEED_LENGTH_TEST && ch == 0) \ { \ /* The second character is not available. */ \ result = GCONV_INCOMPLETE_INPUT; \ break; \ } \ - \ - ch2 = inptr[1]; \ - \ - if (ch2 < 0xa1 || ch2 >= 0xfe \ - || ((ch = ksc5601_to_ucs4 ((uint16_t) (ch * 256 + ch2) & 0x7f7f)) \ - == UNKNOWN_10646_CHAR)) \ + if (ch == UNKNOWN_10646_CHAR)) \ { \ /* This is an illegal character. */ \ result = GCONV_ILLEGAL_INPUT; \ break; \ } \ - \ - inptr += 2; \ } \ \ *((uint32_t *) outptr)++ = ch; \ |