/* Conversion from and to CP1258.
- Copyright (C) 1998, 2001, 2002, 2004, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1998-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998,
and Bruno Haible <haible@clisp.cons.org>, 2001.
#define TO_LOOP to_cp1258
#define DEFINE_INIT 1
#define DEFINE_FINI 1
+#define ONE_DIRECTION 0
#define FROM_LOOP_MIN_NEEDED_FROM 1
#define FROM_LOOP_MAX_NEEDED_FROM 1
#define FROM_LOOP_MIN_NEEDED_TO 4
{ \
if (FROM_DIRECTION) \
{ \
- if (__builtin_expect (outbuf + 4 <= outend, 1)) \
+ if (__glibc_likely (outbuf + 4 <= outend)) \
{ \
/* Write out the last character. */ \
*((uint32_t *) outbuf) = data->__statep->__count >> 3; \
if (ch >= 0x80) \
{ \
ch = to_ucs4[ch - 0x80]; \
- if (__builtin_expect (ch == L'\0', 0)) \
+ if (__glibc_unlikely (ch == L'\0')) \
{ \
/* This is an illegal character. */ \
STANDARD_FROM_LOOP_ERR_HANDLER (1); \
res = 0; \
} \
\
- if (__builtin_expect (res != 0, 1)) \
+ if (__glibc_likely (res != 0)) \
{ \
*outptr++ = res; \
inptr += 4; \
} \
\
/* See whether we have room for two bytes. */ \
- if (__builtin_expect (outptr + 1 >= outend, 0)) \
+ if (__glibc_unlikely (outptr + 1 >= outend)) \
{ \
result = __GCONV_FULL_OUTPUT; \
break; \