]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Update after gnulib changed.
authorBruno Haible <bruno@clisp.org>
Sun, 26 Apr 2009 16:15:52 +0000 (16:15 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:16:04 +0000 (12:16 +0200)
gettext-runtime/intl/ChangeLog
gettext-runtime/intl/vasnprintf.c
gettext-runtime/libasprintf/ChangeLog
gettext-runtime/libasprintf/vasnprintf.c

index 070a5b7c42aac953f9df3ccfacaf139d224e4cc1..826460715c934dbb0e6b29314ec12cd99b6b907a 100644 (file)
@@ -1,3 +1,8 @@
+2009-04-26  Bruno Haible  <bruno@clisp.org>
+
+       * vasnprintf.c (VASNPRINTF): Update after the calling convention of
+       u*_conv_from_encoding and u*_conv_to_encoding changed.
+
 2009-03-25  Bruno Haible  <bruno@clisp.org>
 
        * Makefile.in (RC): New variable.
index 81015384bfb467553e83714eec873013e0022ab8..8f85368036bea469a37d85556250e254c7fb7ec0 100644 (file)
@@ -1800,18 +1800,18 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                        size_t converted_len = allocated - length;
 #  if DCHAR_IS_TCHAR
                        /* Convert from UTF-8 to locale encoding.  */
-                       if (u8_conv_to_encoding (locale_charset (),
-                                                iconveh_question_mark,
-                                                arg, arg_end - arg, NULL,
-                                                &converted, &converted_len)
-                           < 0)
+                       converted =
+                         u8_conv_to_encoding (locale_charset (),
+                                              iconveh_question_mark,
+                                              arg, arg_end - arg, NULL,
+                                              converted, &converted_len);
 #  else
                        /* Convert from UTF-8 to UTF-16/UTF-32.  */
                        converted =
                          U8_TO_DCHAR (arg, arg_end - arg,
                                       converted, &converted_len);
-                       if (converted == NULL)
 #  endif
+                       if (converted == NULL)
                          {
                            int saved_errno = errno;
                            if (!(result == resultbuf || result == NULL))
@@ -1928,18 +1928,18 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                        size_t converted_len = allocated - length;
 #  if DCHAR_IS_TCHAR
                        /* Convert from UTF-16 to locale encoding.  */
-                       if (u16_conv_to_encoding (locale_charset (),
-                                                 iconveh_question_mark,
-                                                 arg, arg_end - arg, NULL,
-                                                 &converted, &converted_len)
-                           < 0)
+                       converted =
+                         u16_conv_to_encoding (locale_charset (),
+                                               iconveh_question_mark,
+                                               arg, arg_end - arg, NULL,
+                                               converted, &converted_len);
 #  else
                        /* Convert from UTF-16 to UTF-8/UTF-32.  */
                        converted =
                          U16_TO_DCHAR (arg, arg_end - arg,
                                        converted, &converted_len);
-                       if (converted == NULL)
 #  endif
+                       if (converted == NULL)
                          {
                            int saved_errno = errno;
                            if (!(result == resultbuf || result == NULL))
@@ -2056,18 +2056,18 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                        size_t converted_len = allocated - length;
 #  if DCHAR_IS_TCHAR
                        /* Convert from UTF-32 to locale encoding.  */
-                       if (u32_conv_to_encoding (locale_charset (),
-                                                 iconveh_question_mark,
-                                                 arg, arg_end - arg, NULL,
-                                                 &converted, &converted_len)
-                           < 0)
+                       converted =
+                         u32_conv_to_encoding (locale_charset (),
+                                               iconveh_question_mark,
+                                               arg, arg_end - arg, NULL,
+                                               converted, &converted_len);
 #  else
                        /* Convert from UTF-32 to UTF-8/UTF-16.  */
                        converted =
                          U32_TO_DCHAR (arg, arg_end - arg,
                                        converted, &converted_len);
-                       if (converted == NULL)
 #  endif
+                       if (converted == NULL)
                          {
                            int saved_errno = errno;
                            if (!(result == resultbuf || result == NULL))
@@ -2494,14 +2494,13 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                  }
 
                  /* Convert from TCHAR_T[] to DCHAR_T[].  */
-                 tmpdst = NULL;
-                 tmpdst_len = 0;
-                 if (DCHAR_CONV_FROM_ENCODING (locale_charset (),
-                                               iconveh_question_mark,
-                                               tmpsrc, characters,
-                                               NULL,
-                                               &tmpdst, &tmpdst_len)
-                     < 0)
+                 tmpdst =
+                   DCHAR_CONV_FROM_ENCODING (locale_charset (),
+                                             iconveh_question_mark,
+                                             tmpsrc, characters,
+                                             NULL,
+                                             NULL, &tmpdst_len);
+                 if (tmpdst == NULL)
                    {
                      int saved_errno = errno;
                      free (tmpsrc);
@@ -5217,14 +5216,13 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
 # else
                        tmpsrc = tmp;
 # endif
-                       tmpdst = NULL;
-                       tmpdst_len = 0;
-                       if (DCHAR_CONV_FROM_ENCODING (locale_charset (),
-                                                     iconveh_question_mark,
-                                                     tmpsrc, count,
-                                                     NULL,
-                                                     &tmpdst, &tmpdst_len)
-                           < 0)
+                       tmpdst =
+                         DCHAR_CONV_FROM_ENCODING (locale_charset (),
+                                                   iconveh_question_mark,
+                                                   tmpsrc, count,
+                                                   NULL,
+                                                   NULL, &tmpdst_len);
+                       if (tmpdst == NULL)
                          {
                            int saved_errno = errno;
                            if (!(result == resultbuf || result == NULL))
index 0ecdc240e4b377e02ff50c1385104e59f9ecfbc4..3b0d06ae7626c16b3bf865fa42db80abdd46278b 100644 (file)
@@ -1,3 +1,8 @@
+2009-04-26  Bruno Haible  <bruno@clisp.org>
+
+       * vasnprintf.c (VASNPRINTF): Update after the calling convention of
+       u*_conv_from_encoding and u*_conv_to_encoding changed.
+
 2009-04-08  Bruno Haible  <bruno@clisp.org>
 
        * Makefile.am (SUFFIXES, CLEANFILES): Remove variables. Not needed any
index 81015384bfb467553e83714eec873013e0022ab8..8f85368036bea469a37d85556250e254c7fb7ec0 100644 (file)
@@ -1800,18 +1800,18 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                        size_t converted_len = allocated - length;
 #  if DCHAR_IS_TCHAR
                        /* Convert from UTF-8 to locale encoding.  */
-                       if (u8_conv_to_encoding (locale_charset (),
-                                                iconveh_question_mark,
-                                                arg, arg_end - arg, NULL,
-                                                &converted, &converted_len)
-                           < 0)
+                       converted =
+                         u8_conv_to_encoding (locale_charset (),
+                                              iconveh_question_mark,
+                                              arg, arg_end - arg, NULL,
+                                              converted, &converted_len);
 #  else
                        /* Convert from UTF-8 to UTF-16/UTF-32.  */
                        converted =
                          U8_TO_DCHAR (arg, arg_end - arg,
                                       converted, &converted_len);
-                       if (converted == NULL)
 #  endif
+                       if (converted == NULL)
                          {
                            int saved_errno = errno;
                            if (!(result == resultbuf || result == NULL))
@@ -1928,18 +1928,18 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                        size_t converted_len = allocated - length;
 #  if DCHAR_IS_TCHAR
                        /* Convert from UTF-16 to locale encoding.  */
-                       if (u16_conv_to_encoding (locale_charset (),
-                                                 iconveh_question_mark,
-                                                 arg, arg_end - arg, NULL,
-                                                 &converted, &converted_len)
-                           < 0)
+                       converted =
+                         u16_conv_to_encoding (locale_charset (),
+                                               iconveh_question_mark,
+                                               arg, arg_end - arg, NULL,
+                                               converted, &converted_len);
 #  else
                        /* Convert from UTF-16 to UTF-8/UTF-32.  */
                        converted =
                          U16_TO_DCHAR (arg, arg_end - arg,
                                        converted, &converted_len);
-                       if (converted == NULL)
 #  endif
+                       if (converted == NULL)
                          {
                            int saved_errno = errno;
                            if (!(result == resultbuf || result == NULL))
@@ -2056,18 +2056,18 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                        size_t converted_len = allocated - length;
 #  if DCHAR_IS_TCHAR
                        /* Convert from UTF-32 to locale encoding.  */
-                       if (u32_conv_to_encoding (locale_charset (),
-                                                 iconveh_question_mark,
-                                                 arg, arg_end - arg, NULL,
-                                                 &converted, &converted_len)
-                           < 0)
+                       converted =
+                         u32_conv_to_encoding (locale_charset (),
+                                               iconveh_question_mark,
+                                               arg, arg_end - arg, NULL,
+                                               converted, &converted_len);
 #  else
                        /* Convert from UTF-32 to UTF-8/UTF-16.  */
                        converted =
                          U32_TO_DCHAR (arg, arg_end - arg,
                                        converted, &converted_len);
-                       if (converted == NULL)
 #  endif
+                       if (converted == NULL)
                          {
                            int saved_errno = errno;
                            if (!(result == resultbuf || result == NULL))
@@ -2494,14 +2494,13 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                  }
 
                  /* Convert from TCHAR_T[] to DCHAR_T[].  */
-                 tmpdst = NULL;
-                 tmpdst_len = 0;
-                 if (DCHAR_CONV_FROM_ENCODING (locale_charset (),
-                                               iconveh_question_mark,
-                                               tmpsrc, characters,
-                                               NULL,
-                                               &tmpdst, &tmpdst_len)
-                     < 0)
+                 tmpdst =
+                   DCHAR_CONV_FROM_ENCODING (locale_charset (),
+                                             iconveh_question_mark,
+                                             tmpsrc, characters,
+                                             NULL,
+                                             NULL, &tmpdst_len);
+                 if (tmpdst == NULL)
                    {
                      int saved_errno = errno;
                      free (tmpsrc);
@@ -5217,14 +5216,13 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
 # else
                        tmpsrc = tmp;
 # endif
-                       tmpdst = NULL;
-                       tmpdst_len = 0;
-                       if (DCHAR_CONV_FROM_ENCODING (locale_charset (),
-                                                     iconveh_question_mark,
-                                                     tmpsrc, count,
-                                                     NULL,
-                                                     &tmpdst, &tmpdst_len)
-                           < 0)
+                       tmpdst =
+                         DCHAR_CONV_FROM_ENCODING (locale_charset (),
+                                                   iconveh_question_mark,
+                                                   tmpsrc, count,
+                                                   NULL,
+                                                   NULL, &tmpdst_len);
+                       if (tmpdst == NULL)
                          {
                            int saved_errno = errno;
                            if (!(result == resultbuf || result == NULL))