aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-08-02 22:33:57 +0000
committerUlrich Drepper <drepper@redhat.com>2004-08-02 22:33:57 +0000
commit5d32be9a0a5489d9274de87b3657b1e16e27ef3f (patch)
tree3548f254c276ead1792229961bfc3306fb98ac1c /iconvdata/ibm943.c
parentUpdate. (diff)
downloadglibc-5d32be9a0a5489d9274de87b3657b1e16e27ef3f.tar.gz
glibc-5d32be9a0a5489d9274de87b3657b1e16e27ef3f.tar.bz2
glibc-5d32be9a0a5489d9274de87b3657b1e16e27ef3f.zip
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.
Diffstat (limited to 'iconvdata/ibm943.c')
-rw-r--r--iconvdata/ibm943.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/iconvdata/ibm943.c b/iconvdata/ibm943.c
index bf387bbc3e..daeac1d8b2 100644
--- a/iconvdata/ibm943.c
+++ b/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.
@@ -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)) \