]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - iconvdata/euc-cn.c
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / iconvdata / euc-cn.c
index 9cf3a488ab7c207a9a85ed37bdb7b3619a5a94d6..a571e03e9c500d327f2393e796de6a4f7615285b 100644 (file)
@@ -1,5 +1,5 @@
 /* Mapping tables for EUC-CN handling.
-   Copyright (C) 1998-2013 Free Software Foundation, Inc.
+   Copyright (C) 1998-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -30,6 +30,7 @@
 #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 EUC-CN to UCS4.  */
@@ -56,7 +57,7 @@
             next byte is also available.  */                                 \
          const unsigned char *endp;                                          \
                                                                              \
-         if (__builtin_expect (inptr + 1 >= inend, 0))                       \
+         if (__glibc_unlikely (inptr + 1 >= inend))                          \
            {                                                                 \
              /* The second character is not available.  Store                \
                 the intermediate result.  */                                 \
          ch = inptr[1];                                                      \
                                                                              \
          /* All second bytes of a multibyte character must be >= 0xa1. */    \
-         if (__builtin_expect (ch < 0xa1, 0))                                \
+         if (__glibc_unlikely (ch < 0xa1))                                   \
            STANDARD_FROM_LOOP_ERR_HANDLER (1);                               \
                                                                              \
          /* This is code set 1: GB 2312-80.  */                              \
          endp = inptr;                                                       \
                                                                              \
          ch = gb2312_to_ucs4 (&endp, 2, 0x80);                               \
-         if (__builtin_expect (ch == __UNKNOWN_10646_CHAR, 0))               \
+         if (__glibc_unlikely (ch == __UNKNOWN_10646_CHAR))                  \
            {                                                                 \
              /* This is an illegal character.  */                            \
              STANDARD_FROM_LOOP_ERR_HANDLER (2);                             \