diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-08-20 19:50:45 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-08-20 19:50:45 +0200 |
commit | 4dd9e35bfd35d3138bc44169baba098005bad51e (patch) | |
tree | a4939c43a9c3fe00eb27f023e14acc5e1fe8808c /iconvdata/uhc.c | |
parent | bd42a4599d1b6f77bcfe1e4f67b7cbd9e1cb2dfd (diff) | |
parent | f76453c31593957fec1a99b986bfa5506618b79c (diff) |
Merge commit 'refs/top-bases/t/bigmem' into t/bigmem
Diffstat (limited to 'iconvdata/uhc.c')
-rw-r--r-- | iconvdata/uhc.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/iconvdata/uhc.c b/iconvdata/uhc.c index 4f5e71486d..d075900ad8 100644 --- a/iconvdata/uhc.c +++ b/iconvdata/uhc.c @@ -1,5 +1,5 @@ /* Mapping tables for UHC handling. - Copyright (C) 1998-2014 Free Software Foundation, Inc. + Copyright (C) 1998-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jungshik Shin <jshin@pantheon.yale.edu>, 1998. @@ -3044,6 +3044,7 @@ static const char uhc_hangul_from_ucs[11172][2] = #define MIN_NEEDED_FROM 1 #define MAX_NEEDED_FROM 2 #define MIN_NEEDED_TO 4 +#define ONE_DIRECTION 0 /* First define the conversion function from UHC to UCS4. */ #define MIN_NEEDED_INPUT MIN_NEEDED_FROM @@ -3076,7 +3077,7 @@ static const char uhc_hangul_from_ucs[11172][2] = is also available. */ \ uint32_t ch2; \ \ - if (__builtin_expect (inptr + 1 >= inend, 0)) \ + if (__glibc_unlikely (inptr + 1 >= inend)) \ { \ /* The second character is not available. Store \ the intermediate result. */ \ @@ -3123,7 +3124,7 @@ static const char uhc_hangul_from_ucs[11172][2] = ? (ch - 0x81) * 178 \ : 5696 + (ch - 0xa1) * 84)]; \ \ - if (__builtin_expect (ch == 0, 0)) \ + if (__glibc_unlikely (ch == 0)) \ { \ /* This is an illegal character. */ \ STANDARD_FROM_LOOP_ERR_HANDLER (2); \ @@ -3173,7 +3174,7 @@ static const char uhc_hangul_from_ucs[11172][2] = { \ const char *s = uhc_hangul_from_ucs[ch - 0xac00]; \ \ - if (__builtin_expect (outptr + 2 > outend, 0)) \ + if (__glibc_unlikely (outptr + 2 > outend)) \ { \ result = __GCONV_FULL_OUTPUT; \ break; \ @@ -3186,12 +3187,12 @@ static const char uhc_hangul_from_ucs[11172][2] = { \ size_t written = ucs4_to_ksc5601_hanja (ch, outptr, outend - outptr); \ \ - if (__builtin_expect (written == 0, 0)) \ + if (__glibc_unlikely (written == 0)) \ { \ result = __GCONV_FULL_OUTPUT; \ break; \ } \ - if (__builtin_expect (written == __UNKNOWN_10646_CHAR, 0)) \ + if (__glibc_unlikely (written == __UNKNOWN_10646_CHAR)) \ { \ STANDARD_TO_LOOP_ERR_HANDLER (4); \ } \ @@ -3213,7 +3214,7 @@ static const char uhc_hangul_from_ucs[11172][2] = UNICODE_TAG_HANDLER (ch, 4); \ STANDARD_TO_LOOP_ERR_HANDLER (4); \ } \ - if (__builtin_expect (written == 0, 0)) \ + if (__glibc_unlikely (written == 0)) \ { \ result = __GCONV_FULL_OUTPUT; \ break; \ |