diff options
Diffstat (limited to 'iconvdata/ibm939.c')
-rw-r--r-- | iconvdata/ibm939.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/iconvdata/ibm939.c b/iconvdata/ibm939.c index 8fcac1232a..aae08ba3d1 100644 --- a/iconvdata/ibm939.c +++ b/iconvdata/ibm939.c @@ -131,15 +131,10 @@ enum { \ /* Use the IBM939 table for single byte. */ \ res = __ibm939sb_to_ucs4[ch]; \ - if (__builtin_expect (res, L'\1') == L'\0' && ch != '\0') \ + if (__builtin_expect (res == L'\0', 0) && ch != '\0') \ { \ /* This is an illegal character. */ \ - if (! ignore_errors_p ()) \ - { \ - result = __GCONV_ILLEGAL_INPUT; \ - break; \ - } \ - ++*irreversible; \ + STANDARD_FROM_LOOP_ERR_HANDLER (1); \ } \ else \ { \ @@ -173,12 +168,7 @@ enum __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \ { \ /* This is an illegal character. */ \ - if (! ignore_errors_p ()) \ - { \ - result = __GCONV_ILLEGAL_INPUT; \ - break; \ - } \ - ++*irreversible; \ + STANDARD_FROM_LOOP_ERR_HANDLER (2); \ } \ else \ { \ @@ -233,12 +223,7 @@ enum __builtin_expect (cp[0], L'\1')==L'\0' && ch != '\0')) \ { \ /* This is an illegal character. */ \ - if (! ignore_errors_p ()) \ - { \ - result = __GCONV_ILLEGAL_INPUT; \ - break; \ - } \ - ++*irreversible; \ + STANDARD_TO_LOOP_ERR_HANDLER (4); \ } \ else \ { \ |