/* Conversion to and from TCVN5712-1.
- Copyright (C) 2001, 2002, 2004, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2022 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
+ <https://www.gnu.org/licenses/>. */
#include <dlfcn.h>
#include <stdint.h>
#define TO_LOOP to_tcvn5712_1
#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; \
last_ch = *statep >> 3; \
\
/* We have to buffer ch if it is a possible match in comp_table_data. */ \
- must_buffer_ch = (ch >= 0x0041 && ch <= 0x01b0); \
+ must_buffer_ch = (ch >= 0x0041 && ch <= 0x01b0); \
\
if (last_ch) \
{ \
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; \