]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - iconvdata/tcvn5712-1.c
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / iconvdata / tcvn5712-1.c
index 3cfdf468d9d5995dec056fcb3f06f4d07b07b78a..5651973539d9d3c3db4783c5ab47371d633af4e7 100644 (file)
@@ -1,5 +1,5 @@
 /* Conversion to and from TCVN5712-1.
-   Copyright (C) 2001, 2002, 2004, 2011 Free Software Foundation, Inc.
+   Copyright (C) 2001-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
 
@@ -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
+   <http://www.gnu.org/licenses/>.  */
 
 #include <dlfcn.h>
 #include <stdint.h>
@@ -30,6 +29,7 @@
 #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
@@ -65,7 +65,7 @@
     {                                                                        \
       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;          \
@@ -380,7 +380,7 @@ static const struct
     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)                                                             \
       {                                                                              \
@@ -653,7 +653,7 @@ static const struct
            res = 0;                                                          \
          }                                                                   \
                                                                              \
-       if (__builtin_expect (res != 0, 1))                                   \
+       if (__glibc_likely (res != 0))                                        \
          {                                                                   \
            *outptr++ = res;                                                  \
            inptr += 4;                                                       \
@@ -697,7 +697,7 @@ static const struct
                  }                                                           \
                                                                              \
                /* 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;                                                    \