Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update.
2004-08-02  Jakub Jelinek  <jakub@redhat.com>

	* iconvdata/ibm932.c (BODY): Avoid binary search for ch >= 0xffff.
	Always treat high as highest number in range + 1.
	* iconvdata/ibm943.c (BODY): Likewise.

2004-07-31  Bruno Haible  <bruno@clisp.org>

	* iconvdata/JISX0213.TXT: Updated to JISX0213 plane 1 version 2004.
	* iconvdata/jisx0213.c (__jisx0213_to_ucs_main,
	__jisx0213_to_ucs_pagestart, __jisx0213_from_ucs_level1,
	__jisx0213_from_ucs_level2): Regenerated.
	* iconvdata/jisx0213.h (jisx0213_added_in_2004_p): New function.
	* iconvdata/iso-2022-jp-3.c (JISX0213_1_2000_set): Renamed from
	JISX0213_1_set.
	(JISX0213_1_2004_set): New enum value.
	(BODY for FROM_LOOP): Treat ESC $ ( Q like ESC $ ( O.
	(BODY for TO_LOOP): For JISX 0213 plane 1 characters, emit ESC $ ( O
	when possible, ESC $ ( Q when needed.
	* iconvdata/testdata/EUC-JISX0213: Add the 10 new characters.
	* iconvdata/testdata/EUC-JISX0213..UTF8: Update.
	* iconvdata/testdata/SHIFT_JISX0213: Add the 10 new characters.
	* iconvdata/testdata/SHIFT_JISX0213..UTF8: Update.
	* iconvdata/testdata/ISO-2022-JP-3: Add the 10 new JISX0213 characters.
	* iconvdata/testdata/ISO-2022-JP-3..UTF8: Update.

2004-07-22  Bruno Haible  <bruno@clisp.org>

	* iconvdata/gconv-modules (ISO-8859-7): Add alias ISO_8859-7:2003.
  • Loading branch information
Ulrich Drepper committed Aug 2, 2004
1 parent f95bb51 commit 5d32be9
Show file tree
Hide file tree
Showing 19 changed files with 626 additions and 455 deletions.
30 changes: 30 additions & 0 deletions ChangeLog
@@ -1,3 +1,33 @@
2004-08-02 Jakub Jelinek <jakub@redhat.com>

* iconvdata/ibm932.c (BODY): Avoid binary search for ch >= 0xffff.
Always treat high as highest number in range + 1.
* iconvdata/ibm943.c (BODY): Likewise.

2004-07-31 Bruno Haible <bruno@clisp.org>

* iconvdata/JISX0213.TXT: Updated to JISX0213 plane 1 version 2004.
* iconvdata/jisx0213.c (__jisx0213_to_ucs_main,
__jisx0213_to_ucs_pagestart, __jisx0213_from_ucs_level1,
__jisx0213_from_ucs_level2): Regenerated.
* iconvdata/jisx0213.h (jisx0213_added_in_2004_p): New function.
* iconvdata/iso-2022-jp-3.c (JISX0213_1_2000_set): Renamed from
JISX0213_1_set.
(JISX0213_1_2004_set): New enum value.
(BODY for FROM_LOOP): Treat ESC $ ( Q like ESC $ ( O.
(BODY for TO_LOOP): For JISX 0213 plane 1 characters, emit ESC $ ( O
when possible, ESC $ ( Q when needed.
* iconvdata/testdata/EUC-JISX0213: Add the 10 new characters.
* iconvdata/testdata/EUC-JISX0213..UTF8: Update.
* iconvdata/testdata/SHIFT_JISX0213: Add the 10 new characters.
* iconvdata/testdata/SHIFT_JISX0213..UTF8: Update.
* iconvdata/testdata/ISO-2022-JP-3: Add the 10 new JISX0213 characters.
* iconvdata/testdata/ISO-2022-JP-3..UTF8: Update.

2004-07-22 Bruno Haible <bruno@clisp.org>

* iconvdata/gconv-modules (ISO-8859-7): Add alias ISO_8859-7:2003.

2004-07-29 David S. Miller <davem@redhat.com>

* sysdeps/sparc/sparc64/sparcv9b/memcpy.S (memcpy): Optimize
Expand Down
14 changes: 12 additions & 2 deletions iconvdata/JISX0213.TXT
Expand Up @@ -26,7 +26,7 @@
0x1213A 0x3006
0x1213B 0x3007
0x1213C 0x30FC
0x1213D 0x2015
0x1213D 0x2014
0x1213E 0x2010
0x1213F 0xFF0F
0x12140 0xFF3C
Expand Down Expand Up @@ -211,7 +211,7 @@
0x12337 0xFF17
0x12338 0xFF18
0x12339 0xFF19
0x1233A 0x2299
0x1233A 0x29BF
0x1233B 0x25C9
0x1233C 0x303D
0x1233D 0xFE46
Expand Down Expand Up @@ -1181,6 +1181,7 @@
0x12D79 0x22BF
0x12D7D 0x2756
0x12D7E 0x261E
0x12E21 0x4FF1
0x12E22 0x2000B
0x12E23 0x3402
0x12E24 0x4E28
Expand Down Expand Up @@ -1367,6 +1368,7 @@
0x12F7B 0x218BD
0x12F7C 0x5B19
0x12F7D 0x5B25
0x12F7E 0x525D
0x13021 0x4E9C
0x13022 0x5516
0x13023 0x5A03
Expand Down Expand Up @@ -4332,6 +4334,7 @@
0x14F51 0x6E7E
0x14F52 0x7897
0x14F53 0x8155
0x14F54 0x20B9F
0x14F55 0x5B41
0x14F56 0x5B56
0x14F57 0x5B7D
Expand Down Expand Up @@ -4373,6 +4376,7 @@
0x14F7B 0x5DA7
0x14F7C 0x5DB8
0x14F7D 0x5DCB
0x14F7E 0x541E
0x15021 0x5F0C
0x15022 0x4E10
0x15023 0x4E15
Expand Down Expand Up @@ -7763,6 +7767,7 @@
0x17424 0x7464
0x17425 0x51DC
0x17426 0x7199
0x17427 0x5653
0x17428 0x5DE2
0x17429 0x5E14
0x1742A 0x5E18
Expand Down Expand Up @@ -8785,6 +8790,11 @@
0x17E77 0x9F94
0x17E78 0x9F97
0x17E79 0x9FA2
0x17E7A 0x59F8
0x17E7B 0x5C5B
0x17E7C 0x5E77
0x17E7D 0x7626
0x17E7E 0x7E6B
0x22121 0x20089
0x22122 0x4E02
0x22123 0x4E0F
Expand Down
1 change: 1 addition & 0 deletions iconvdata/gconv-modules
Expand Up @@ -299,6 +299,7 @@ module INTERNAL ISO-8859-6// ISO8859-6 1

# from to module cost
alias ISO-IR-126// ISO-8859-7//
alias ISO_8859-7:2003// ISO-8859-7//
alias ISO_8859-7:1987// ISO-8859-7//
alias ISO_8859-7// ISO-8859-7//
alias ISO8859-7// ISO-8859-7//
Expand Down
31 changes: 16 additions & 15 deletions iconvdata/ibm932.c
@@ -1,5 +1,5 @@
/* Conversion from and to IBM932.
Copyright (C) 2000-2002 Free Software Foundation, Inc.
Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Masahide Washizawa <washi@jp.ibm.com>, 2000.
Expand Down Expand Up @@ -169,20 +169,21 @@
high = (sizeof (__ucs4_to_ibm932db) >> 1) \
/ sizeof (__ucs4_to_ibm932db[0][FROM]); \
pccode = ch; \
while (low <= high) \
{ \
i = (low + high) >> 1; \
if (pccode < __ucs4_to_ibm932db[i][FROM]) \
high = i - 1; \
else if (pccode > __ucs4_to_ibm932db[i][FROM]) \
low = i + 1; \
else \
{ \
pccode = __ucs4_to_ibm932db[i][TO]; \
found = true; \
break; \
} \
} \
if (__builtin_expect (rp != NULL, 1)) \
while (low < high) \
{ \
i = (low + high) >> 1; \
if (pccode < __ucs4_to_ibm932db[i][FROM]) \
high = i; \
else if (pccode > __ucs4_to_ibm932db[i][FROM]) \
low = i + 1; \
else \
{ \
pccode = __ucs4_to_ibm932db[i][TO]; \
found = true; \
break; \
} \
} \
if (found) \
{ \
if (__builtin_expect (outptr + 2 > outend, 0)) \
Expand Down
31 changes: 16 additions & 15 deletions iconvdata/ibm943.c
@@ -1,5 +1,5 @@
/* Conversion from and to IBM943.
Copyright (C) 2000-2002 Free Software Foundation, Inc.
Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Masahide Washizawa <washi@jp.ibm.com>, 2000.
Expand Down Expand Up @@ -170,20 +170,21 @@
high = (sizeof (__ucs4_to_ibm943db) >> 1) \
/ sizeof (__ucs4_to_ibm943db[0][FROM]); \
pccode = ch; \
while (low <= high) \
{ \
i = (low + high) >> 1; \
if (pccode < __ucs4_to_ibm943db[i][FROM]) \
high = i - 1; \
else if (pccode > __ucs4_to_ibm943db[i][FROM]) \
low = i + 1; \
else \
{ \
pccode = __ucs4_to_ibm943db[i][TO]; \
found = true; \
break; \
} \
} \
if (__builtin_expect (rp != NULL, 1)) \
while (low < high) \
{ \
i = (low + high) >> 1; \
if (pccode < __ucs4_to_ibm943db[i][FROM]) \
high = i; \
else if (pccode > __ucs4_to_ibm943db[i][FROM]) \
low = i + 1; \
else \
{ \
pccode = __ucs4_to_ibm943db[i][TO]; \
found = true; \
break; \
} \
} \
if (found) \
{ \
if (__builtin_expect (outptr + 2 > outend, 0)) \
Expand Down
43 changes: 30 additions & 13 deletions iconvdata/iso-2022-jp-3.c
@@ -1,5 +1,5 @@
/* Conversion module for ISO-2022-JP-3.
Copyright (C) 1998-1999, 2000-2002 Free Software Foundation, Inc.
Copyright (C) 1998-1999, 2000-2002, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998,
and Bruno Haible <bruno@clisp.org>, 2002.
Expand Down Expand Up @@ -61,8 +61,9 @@ enum
JISX0208_1983_set = 2 << 3, /* Esc $ B */
JISX0201_Roman_set = 3 << 3, /* Esc ( J */
JISX0201_Kana_set = 4 << 3, /* Esc ( I */
JISX0213_1_set = 5 << 3, /* Esc $ ( O */
JISX0213_1_2000_set = 5 << 3, /* Esc $ ( O */
JISX0213_2_set = 6 << 3, /* Esc $ ( P */
JISX0213_1_2004_set = 7 << 3, /* Esc $ ( Q */
CURRENT_SEL_MASK = 7 << 3
};

Expand Down Expand Up @@ -211,10 +212,12 @@ enum
} \
else if (inptr[2] == '(') \
{ \
if (inptr[3] == 'O') \
if (inptr[3] == 'O' || inptr[3] == 'Q') \
{ \
/* JIS X 0213 plane 1 selected. */ \
set = JISX0213_1_set; \
/* In this direction we don't need to distinguish the \
versions from 2000 and 2004. */ \
set = JISX0213_1_2004_set; \
inptr += 4; \
continue; \
} \
Expand Down Expand Up @@ -274,16 +277,17 @@ enum
STANDARD_FROM_LOOP_ERR_HANDLER (1); \
} \
} \
else /* (set == JISX0213_1_set || set == JISX0213_2_set) */ \
else /* (set == JISX0213_1_2004_set || set == JISX0213_2_set) */ \
{ \
if (__builtin_expect (inptr + 1 >= inend, 0)) \
{ \
result = __GCONV_INCOMPLETE_INPUT; \
break; \
} \
\
ch = jisx0213_to_ucs4 (((set - JISX0213_1_set + (1 << 3)) << 5) + ch, \
inptr[1]); \
ch = jisx0213_to_ucs4 ( \
((JISX0213_1_2004_set - set + (1 << 3)) << 5) + ch, \
inptr[1]); \
if (ch == 0) \
STANDARD_FROM_LOOP_ERR_HANDLER (1); \
\
Expand Down Expand Up @@ -408,7 +412,10 @@ static const struct
/* We know the combined character is in JISX0213 plane 1, \
but the buffered character may have been in JISX0208 or in \
JISX0213 plane 1. */ \
size_t need = (lasttwo >> 16 || set != JISX0213_1_set ? 4 : 0); \
size_t need = \
(lasttwo >> 16 \
|| (set != JISX0213_1_2000_set && set != JISX0213_1_2004_set) \
? 4 : 0); \
\
if (__builtin_expect (outptr + need + 2 > outend, 0)) \
{ \
Expand All @@ -422,7 +429,7 @@ static const struct
*outptr++ = '$'; \
*outptr++ = '('; \
*outptr++ = 'O'; \
set = JISX0213_1_set; \
set = JISX0213_1_2000_set; \
} \
lasttwo = comp_table_data[idx].composed; \
*outptr++ = (lasttwo >> 8) & 0xff; \
Expand Down Expand Up @@ -529,11 +536,16 @@ static const struct
} \
else \
{ \
/* (set == JISX0213_1_set || set == JISX0213_2_set) */ \
/* (set == JISX0213_1_2000_set || set == JISX0213_1_2004_set \
|| set == JISX0213_2_set) */ \
uint32_t jch = ucs4_to_jisx0213 (ch); \
\
if (jch != 0 \
&& (set == (jch & 0x8000 ? JISX0213_2_set : JISX0213_1_set))) \
&& (jch & 0x8000 \
? set == JISX0213_2_set \
: (set == JISX0213_1_2004_set \
|| (set == JISX0213_1_2000_set \
&& !jisx0213_added_in_2004_p (jch))))) \
{ \
if (jch & 0x0080) \
{ \
Expand Down Expand Up @@ -658,7 +670,11 @@ static const struct
if (jch != 0) \
{ \
int new_set = \
(jch & 0x8000 ? JISX0213_2_set : JISX0213_1_set); \
(jch & 0x8000 \
? JISX0213_2_set \
: jisx0213_added_in_2004_p (jch) \
? JISX0213_1_2004_set \
: JISX0213_1_2000_set); \
\
if (set != new_set) \
{ \
Expand All @@ -670,7 +686,8 @@ static const struct
*outptr++ = ESC; \
*outptr++ = '$'; \
*outptr++ = '('; \
*outptr++ = ((new_set - JISX0213_1_set) >> 3) + 'O'; \
*outptr++ = \
((new_set - JISX0213_1_2000_set) >> 3) + 'O'; \
set = new_set; \
} \
\
Expand Down

0 comments on commit 5d32be9

Please sign in to comment.