]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/glibc/glibc-2.3.2/80_glibc232-iconvdata-fix.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / glibc / glibc-2.3.2 / 80_glibc232-iconvdata-fix.patch
1 --- iconvdata/cp932.c   14 Jul 2003 23:17:31 -0000      1.1
2 +++ iconvdata/cp932.c   14 Aug 2003 08:34:48 -0000      1.3
3 @@ -1,5 +1,5 @@
4  /* Mapping tables for CP932 handling.
5 -   Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
6 +   Copyright (C) 1997,1998,1999,2000,2001,2003 Free Software Foundation, Inc.
7     This file is part of the GNU C Library.
8     Contributed by MORIYAMA Masayuki <msyk@mtg.biglobe.ne.jp>, 2003.
9  
10 @@ -22,18 +22,6 @@
11  #include <stdint.h>
12  #include <wchar.h>
13  
14 -static const uint32_t halfkana_to_ucs4[] =
15 -{
16 -  0xff61,  0xff62,  0xff63,  0xff64,  0xff65,  0xff66,  0xff67,  0xff68,
17 -  0xff69,  0xff6a,  0xff6b,  0xff6c,  0xff6d,  0xff6e,  0xff6f,  0xff70,
18 -  0xff71,  0xff72,  0xff73,  0xff74,  0xff75,  0xff76,  0xff77,  0xff78,
19 -  0xff79,  0xff7a,  0xff7b,  0xff7c,  0xff7d,  0xff7e,  0xff7f,  0xff80,
20 -  0xff81,  0xff82,  0xff83,  0xff84,  0xff85,  0xff86,  0xff87,  0xff88,
21 -  0xff89,  0xff8a,  0xff8b,  0xff8c,  0xff8d,  0xff8e,  0xff8f,  0xff90,
22 -  0xff91,  0xff92,  0xff93,  0xff94,  0xff95,  0xff96,  0xff97,  0xff98,
23 -  0xff99,  0xff9a,  0xff9b,  0xff9c,  0xff9d,  0xff9e,  0xff9f
24 -};
25 -
26  static const uint16_t cjk_block1[703] =
27  {
28    /* start = 0x8140, end = 0x84be */
29 @@ -4559,10 +4547,10 @@
30                                                                               \
31      if (ch < 0x80)                                                           \
32        ++inptr;                                                               \
33 -    else if (ch >= 0xa1 && ch <= 0xdf)                                       \
34 -      {                                                                              \
35 -       ch = halfkana_to_ucs4[ch - 0xa1];                                     \
36 -       ++inptr;                                                              \
37 +    else if (ch >= 0xa1 && ch <= 0xdf)                                        \
38 +      {                                                                       \
39 +        ch += 0xfec0;                                                         \
40 +        ++inptr;                                                              \
41        }                                                                              \
42      else if (__builtin_expect (ch, 0) == 0xa0                                \
43              || __builtin_expect (ch <= 0x80, 0)                              \
44 @@ -4598,11 +4586,14 @@
45         ch2 = inptr[1];                                                       \
46         idx = ch * 256 + ch2;                                                 \
47         if (__builtin_expect (ch2 < 0x40, 0)                                  \
48 +           || __builtin_expect (ch2 > 0xfc, 0)                               \
49 +           || __builtin_expect (ch2 == 0x7f, 0)                              \
50             || (__builtin_expect (idx > 0x84be, 0) && idx < 0x8740)      \
51             || (__builtin_expect (idx > 0x879c, 0) && idx < 0x889f)      \
52             || (__builtin_expect (idx > 0x88fc, 0) && idx < 0x8940)      \
53             || (__builtin_expect (idx > 0x9ffc, 0) && idx < 0xe040)      \
54             || (__builtin_expect (idx > 0xeaa4, 0) && idx < 0xed40)      \
55 +           || (__builtin_expect (idx > 0xeefc, 0) && idx < 0xf040)      \
56             || __builtin_expect (idx > 0xfc4b, 0))                            \
57           {                                                                   \
58             /* This is illegal.  */                                           \
59 @@ -4693,7 +4684,7 @@
60         else if (ch >= 0xf929 && ch <= 0xfa2d)                                \
61           cp = from_ucs4_cjkcpt[ch - 0xf929];                                 \
62         else if (__builtin_expect (ch >= 0xff01, 1)                           \
63 -                && __builtin_expect (ch <= 0xffef, 1))                       \
64 +                && __builtin_expect (ch <= 0xffe5, 1))                       \
65           cp = from_ucs4_extra[ch - 0xff01];                                  \
66         else                                                                  \
67           {                                                                   \
68 @@ -4708,7 +4699,7 @@
69      if (__builtin_expect (cp[0], '\1') == '\0' && ch != 0)                   \
70        {                                                                              \
71         /* Illegal character.  */                                             \
72 -       STANDARD_ERR_HANDLER (4);                                             \
73 +       STANDARD_TO_LOOP_ERR_HANDLER (4);                                     \
74        }                                                                              \
75      else                                                                     \
76        {                                                                              \