summaryrefslogtreecommitdiff
path: root/iconvdata/t.61.c
diff options
context:
space:
mode:
Diffstat (limited to 'iconvdata/t.61.c')
-rw-r--r--iconvdata/t.61.c30
1 files changed, 7 insertions, 23 deletions
diff --git a/iconvdata/t.61.c b/iconvdata/t.61.c
index 5ccd72bdad..5227802b22 100644
--- a/iconvdata/t.61.c
+++ b/iconvdata/t.61.c
@@ -1,5 +1,5 @@
/* Generic conversion to and from T.61.
- Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1997-1999, 2000-2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -404,16 +404,7 @@ static const char from_ucs4[][2] =
|| __builtin_expect (ch2 >= 0x80, 0)) \
{ \
/* This is illegal. */ \
- if (! ignore_errors_p ()) \
- { \
- /* This is an illegal character. */ \
- result = __GCONV_ILLEGAL_INPUT; \
- break; \
- } \
- \
- ++inptr; \
- ++*irreversible; \
- continue; \
+ STANDARD_FROM_LOOP_ERR_HANDLER (1); \
} \
\
ch = to_ucs4_comb[ch - 0xc1][ch2 - 0x20]; \
@@ -423,17 +414,10 @@ static const char from_ucs4[][2] =
else \
ch = to_ucs4[ch]; \
\
- if (__builtin_expect (ch, 1) == 0 && *inptr != '\0') \
+ if (__builtin_expect (ch == 0, 0) && *inptr != '\0') \
{ \
/* This is an illegal character. */ \
- if (! ignore_errors_p ()) \
- { \
- /* This is an illegal character. */ \
- result = __GCONV_ILLEGAL_INPUT; \
- break; \
- } \
- \
- ++*irreversible; \
+ STANDARD_FROM_LOOP_ERR_HANDLER (increment); \
} \
else \
{ \
@@ -471,7 +455,7 @@ static const char from_ucs4[][2] =
UNICODE_TAG_HANDLER (ch, 4); \
\
/* Illegal characters. */ \
- STANDARD_ERR_HANDLER (4); \
+ STANDARD_TO_LOOP_ERR_HANDLER (4); \
} \
else \
{ \
@@ -486,10 +470,10 @@ static const char from_ucs4[][2] =
{ \
cp = from_ucs4[ch]; \
\
- if (__builtin_expect (cp[0], '\1') == '\0' && ch != 0) \
+ if (__builtin_expect (cp[0] == '\0', 0) && ch != 0) \
{ \
/* Illegal. */ \
- STANDARD_ERR_HANDLER (4); \
+ STANDARD_TO_LOOP_ERR_HANDLER (4); \
} \
} \
\