diff options
author | Jakub Jelinek <jakub@redhat.com> | 2009-04-24 19:14:55 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2009-04-24 19:14:55 +0000 |
commit | 8feaf01b210752a478e2e59a274ef244c8af2c0b (patch) | |
tree | 1ed5e46ca5e574d6de90c4b099f9866d22fc424e /iconvdata | |
parent | 7dec33c08e4755e72d1280e48e61f0141dfc1da5 (diff) | |
download | glibc-8feaf01b210752a478e2e59a274ef244c8af2c0b.tar.gz glibc-8feaf01b210752a478e2e59a274ef244c8af2c0b.tar.xz glibc-8feaf01b210752a478e2e59a274ef244c8af2c0b.zip |
Updated to fedora-glibc-20090424T1908 cvs/fedora-glibc-2_9_90-21
Diffstat (limited to 'iconvdata')
-rw-r--r-- | iconvdata/sjis.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/iconvdata/sjis.c b/iconvdata/sjis.c index 4561779d44..f907615a21 100644 --- a/iconvdata/sjis.c +++ b/iconvdata/sjis.c @@ -1,5 +1,5 @@ /* Mapping tables for SJIS handling. - Copyright (C) 1997-2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1997-2001, 2002, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -4372,15 +4372,19 @@ static const char from_ucs4_extra[0x100][2] = \ ch2 = inptr[1]; \ idx = ch * 256 + ch2; \ - if (__builtin_expect (ch2 < 0x40, 0) \ - || (__builtin_expect (idx > 0x84be, 0) && idx < 0x889f) \ - || (__builtin_expect (idx > 0x88fc, 0) && idx < 0x8940) \ - || (__builtin_expect (idx > 0x9ffc, 0) && idx < 0xe040) \ - || __builtin_expect (idx > 0xeaa4, 0)) \ + if (__builtin_expect (ch2 < 0x40, 0)) \ { \ /* This is illegal. */ \ STANDARD_FROM_LOOP_ERR_HANDLER (1); \ } \ + else if ((__builtin_expect (idx > 0x84be && idx < 0x889f, 0)) \ + || (__builtin_expect (idx > 0x88fc && idx < 0x8940, 0)) \ + || (__builtin_expect (idx > 0x9ffc && idx < 0xe040, 0)) \ + || __builtin_expect (idx > 0xeaa4, 0)) \ + { \ + /* This is illegal. */ \ + STANDARD_FROM_LOOP_ERR_HANDLER (2); \ + } \ else \ { \ /* We could pack the data a bit more dense. The second \ @@ -4395,13 +4399,13 @@ static const char from_ucs4_extra[0x100][2] = else \ ch = cjk_block4[(ch - 0xe0) * 192 + ch2 - 0x40]; \ \ - inptr += 2; \ - } \ + if (__builtin_expect (ch == 0, 0)) \ + { \ + /* This is an illegal character. */ \ + STANDARD_FROM_LOOP_ERR_HANDLER (2); \ + } \ \ - if (__builtin_expect (ch == 0, 0)) \ - { \ - /* This is an illegal character. */ \ - STANDARD_FROM_LOOP_ERR_HANDLER (2); \ + inptr += 2; \ } \ } \ \ |