From 2528edd3176df331320f366ff3dad88cb6d82533 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 7 Jul 2000 06:41:18 +0000 Subject: Update. * iconvdata/euc-jp.c: Map characters in C1 area to itself. * iconvdata/euc-kr.c: Likewise. --- iconvdata/euc-jp.c | 9 ++++----- iconvdata/euc-kr.c | 6 +++--- 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'iconvdata') diff --git a/iconvdata/euc-jp.c b/iconvdata/euc-jp.c index c6a39b08ec..8d8429614d 100644 --- a/iconvdata/euc-jp.c +++ b/iconvdata/euc-jp.c @@ -45,10 +45,9 @@ { \ uint32_t ch = *inptr; \ \ - if (ch <= 0x7f) \ + if (ch < 0x8e || (ch >= 0x90 && ch <= 0x9f)) \ ++inptr; \ - else if ((__builtin_expect (ch, 0xa1) <= 0xa0 && ch != 0x8e && ch != 0x8f)\ - || __builtin_expect (ch, 0xfe) > 0xfe) \ + else if (ch == 0xff) \ { \ /* This is illegal. */ \ if (! ignore_errors_p ()) \ @@ -168,8 +167,8 @@ { \ uint32_t ch = get32 (inptr); \ \ - if (ch <= 0x7f) \ - /* It's plain ASCII. */ \ + if (ch < 0x8e || (ch >= 0x90 && ch <= 0x9f)) \ + /* It's plain ASCII or C1. */ \ *outptr++ = ch; \ else if (ch == 0xa5) \ /* YEN sign => backslash */ \ diff --git a/iconvdata/euc-kr.c b/iconvdata/euc-kr.c index abb40c8908..786695801c 100644 --- a/iconvdata/euc-kr.c +++ b/iconvdata/euc-kr.c @@ -27,7 +27,7 @@ static inline void euckr_from_ucs4 (uint32_t ch, unsigned char *cp) { - if (ch > 0x7f) + if (ch > 0x9f) { if (__builtin_expect (ucs4_to_ksc5601 (ch, cp, 2), 0) != __UNKNOWN_10646_CHAR) @@ -75,12 +75,12 @@ euckr_from_ucs4 (uint32_t ch, unsigned char *cp) ch = (uint32_t) inchar; \ */ \ \ - if (ch <= 0x7f) \ + if (ch <= 0x9f) \ /* Plain ASCII. */ \ ++inptr; \ /* 0xfe(->0x7e : row 94) and 0xc9(->0x59 : row 41) are \ user-defined areas. */ \ - else if (__builtin_expect (ch, 0xa1) <= 0xa0 \ + else if (__builtin_expect (ch, 0xa1) == 0xa0 \ || __builtin_expect (ch, 0xa1) > 0xfe \ || __builtin_expect (ch, 0xa1) == 0xc9) \ { \ -- cgit 1.4.1