]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - iconvdata/ansi_x3.110.c
Prefer https to http for gnu.org and fsf.org URLs
[thirdparty/glibc.git] / iconvdata / ansi_x3.110.c
index e08aeba7cb33883d683103dc0e751d50be2c8ad3..f748bb4085d3cb722889139ff6848d2b2758c7f3 100644 (file)
@@ -1,5 +1,5 @@
 /* Generic conversion to and from ANSI_X3.110-1983.
-   Copyright (C) 1998, 1999, 2000-2002 Free Software Foundation, Inc.
+   Copyright (C) 1998-2019 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -15,7 +15,7 @@
 
    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 <gconv.h>
@@ -390,6 +390,7 @@ static const char from_ucs4[][2] =
 #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 ANSI_X3.110 to UCS4.  */
 #define MIN_NEEDED_INPUT       MIN_NEEDED_FROM
@@ -567,7 +568,7 @@ static const char from_ucs4[][2] =
     /* Now test for a possible second byte and write this if possible.  */    \
     if (cp[1] != '\0')                                                       \
       {                                                                              \
-       if (__builtin_expect (outptr >= outend, 0))                           \
+       if (__glibc_unlikely (outptr >= outend))                              \
          {                                                                   \
            /* The result does not fit into the buffer.  */                   \
            --outptr;                                                         \