aboutsummaryrefslogtreecommitdiff
path: root/iconvdata/ibm939.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
committerUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
commita334319f6530564d22e775935d9c91663623a1b4 (patch)
treeb5877475619e4c938e98757d518bb1e9cbead751 /iconvdata/ibm939.c
parent0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (diff)
downloadglibc-a334319f6530564d22e775935d9c91663623a1b4.zip
glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.gz
glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.bz2
(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
Diffstat (limited to 'iconvdata/ibm939.c')
-rw-r--r--iconvdata/ibm939.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/iconvdata/ibm939.c b/iconvdata/ibm939.c
index 50b083f..aae08ba 100644
--- a/iconvdata/ibm939.c
+++ b/iconvdata/ibm939.c
@@ -1,5 +1,5 @@
/* Conversion to and from IBM939.
- Copyright (C) 2000-2002, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2000-2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Masahide Washizawa <washi@yamato.ibm.co.jp>, 2000.
@@ -200,14 +200,16 @@ enum
if (__builtin_expect (ch >= 0xffff, 0)) \
{ \
UNICODE_TAG_HANDLER (ch, 4); \
- goto ibm939_invalid_char; \
+ rp1 = NULL; \
+ rp2 = NULL; \
} \
- \
- while (ch > rp1->end) \
- ++rp1; \
+ else \
+ while (ch > rp1->end) \
+ ++rp1; \
\
/* Use the UCS4 table for single byte. */ \
- if (__builtin_expect (ch < rp1->start, 0) \
+ if (__builtin_expect (rp1 == NULL, 0) \
+ || __builtin_expect (ch < rp1->start, 0) \
|| (cp = __ucs4_to_ibm939sb[ch + rp1->idx], \
__builtin_expect (cp[0], L'\1') == L'\0' && ch != '\0')) \
{ \
@@ -215,12 +217,12 @@ enum
while (ch > rp2->end) \
++rp2; \
\
- if (__builtin_expect (ch < rp2->start, 0) \
+ if (__builtin_expect (rp2 == NULL, 0) \
+ || __builtin_expect (ch < rp2->start, 0) \
|| (cp = __ucs4_to_ibm939db[ch + rp2->idx], \
__builtin_expect (cp[0], L'\1')==L'\0' && ch != '\0')) \
{ \
/* This is an illegal character. */ \
- ibm939_invalid_char: \
STANDARD_TO_LOOP_ERR_HANDLER (4); \
} \
else \