X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=iconvdata%2Futf-7.c;h=df6fe0390bce47792b0afa40d43d6a1155851c47;hb=refs%2Ftags%2Ftizen_2.4_mobile_release;hp=b58b11fdcb43582b3f3f0f2e94d70c7dabd80fe7;hpb=15493dd3ecb249fcf90af154fb8c8bccb27b87b8;p=framework%2Fbase%2Ftizen-locale.git diff --git a/iconvdata/utf-7.c b/iconvdata/utf-7.c index b58b11f..df6fe03 100644 --- a/iconvdata/utf-7.c +++ b/iconvdata/utf-7.c @@ -1,5 +1,5 @@ /* Conversion module for UTF-7. - Copyright (C) 2000-2002, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 2000-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Bruno Haible , 2000. @@ -14,9 +14,8 @@ Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + License along with the GNU C Library; if not, see + . */ /* UTF-7 is a legacy encoding used for transmitting Unicode within the ASCII character set, used primarily by mail agents. New programs @@ -121,6 +120,7 @@ base64 (unsigned int i) #define MAX_NEEDED_FROM 6 #define MIN_NEEDED_TO 4 #define MAX_NEEDED_TO 4 +#define ONE_DIRECTION 0 #define PREPARE_LOOP \ mbstate_t saved_state; \ mbstate_t *statep = data->__statep; @@ -168,9 +168,9 @@ base64 (unsigned int i) put32 (outptr, ch); \ outptr += 4; \ } \ - else if (__builtin_expect (ch == '+', 1)) \ + else if (__glibc_likely (ch == '+')) \ { \ - if (__builtin_expect (inptr + 2 > inend, 0)) \ + if (__glibc_unlikely (inptr + 2 > inend)) \ { \ /* Not enough input available. */ \ result = __GCONV_INCOMPLETE_INPUT; \ @@ -341,7 +341,7 @@ base64 (unsigned int i) else \ STANDARD_TO_LOOP_ERR_HANDLER (4); \ \ - if (__builtin_expect (outptr + count > outend, 0)) \ + if (__glibc_unlikely (outptr + count > outend)) \ { \ result = __GCONV_FULL_OUTPUT; \ break; \ @@ -382,7 +382,7 @@ base64 (unsigned int i) size_t count; \ \ count = ((statep->__count & 0x18) >= 0x10) + isxbase64 (ch) + 1; \ - if (__builtin_expect (outptr + count > outend, 0)) \ + if (__glibc_unlikely (outptr + count > outend)) \ { \ result = __GCONV_FULL_OUTPUT; \ break; \ @@ -406,7 +406,7 @@ base64 (unsigned int i) else \ STANDARD_TO_LOOP_ERR_HANDLER (4); \ \ - if (__builtin_expect (outptr + count > outend, 0)) \ + if (__glibc_unlikely (outptr + count > outend)) \ { \ result = __GCONV_FULL_OUTPUT; \ break; \ @@ -510,7 +510,7 @@ base64 (unsigned int i) /* Deactivate base64 encoding. */ \ size_t count = ((state & 0x18) >= 0x10) + 1; \ \ - if (__builtin_expect (outbuf + count > outend, 0)) \ + if (__glibc_unlikely (outbuf + count > outend)) \ /* We don't have enough room in the output buffer. */ \ status = __GCONV_FULL_OUTPUT; \ else \