From e2806aaf5d84e7eb63cc11633e9e833d8d1421b5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 20 Apr 2002 02:05:39 +0000 Subject: Update. 2002-04-15 Bruno Haible * iconvdata/sjis.c (halfkana_to_ucs4): Remove array. (BODY for FROM_LOOP): Optimize the JISX0201:GR to Unicode conversion. 2002-04-15 Bruno Haible * iconvdata/euc-jp.c (BODY for FROM_LOOP): When encountering an invalid input (e.g. a byte > 0x80 followed by a byte < 0x80), skip always one byte, not 0 bytes in some cases and 2 bytes in others. * iconvdata/tst-table-from.c (main): Correct the usage message. 2002-04-19 Isamu Hasegawa * posix/regcomp.c (parse_expression): Fix incorrect error code. (parse_dup_op): Fix error handling like "a{}". (parse_bracket_exp): Add error handling. (fetch_number): Add error handling for "a{}". 2002-04-19 Isamu Hasegawa * posix/regcomp.c (parse_bracket_symbol): Add error handling in case that the symbol name is too long. (build_charclass): Handle [:lower:]/[:uppper:] correctly in case of REG_ICASE. --- iconvdata/euc-jp.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'iconvdata/euc-jp.c') diff --git a/iconvdata/euc-jp.c b/iconvdata/euc-jp.c index 1a638994a3..3c55e440b2 100644 --- a/iconvdata/euc-jp.c +++ b/iconvdata/euc-jp.c @@ -63,12 +63,12 @@ else \ { \ /* Two or more byte character. First test whether the next \ - character is also available. */ \ + byte is also available. */ \ int ch2; \ \ if (__builtin_expect (inptr + 1 >= inend, 0)) \ { \ - /* The second character is not available. Store the \ + /* The second byte is not available. Store the \ intermediate result. */ \ result = __GCONV_INCOMPLETE_INPUT; \ break; \ @@ -104,6 +104,10 @@ result = __GCONV_ILLEGAL_INPUT; \ break; \ } \ + \ + ++inptr; \ + ++*irreversible; \ + continue; \ } \ \ inptr += 2; \ @@ -143,7 +147,7 @@ break; \ } \ \ - inptr += 2; \ + ++inptr; \ ++*irreversible; \ continue; \ } \ -- cgit v1.2.1