+2007-01-25 Bruno Haible <bruno@clisp.org>
+
+ * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
+ *resultp is 0.
+
+ * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
+ * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
+ * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
+ * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
+
+ * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
+ * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
+ * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
+ * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
+ * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
+ * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
+
2007-01-24 Bruno Haible <bruno@clisp.org>
Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
size_t length;
size_t last_length = (size_t)(-1); /* only needed if offsets != NULL */
- if (*lengthp >= sizeof (tmpbuf))
+ if (*resultp != NULL && *lengthp >= sizeof (tmpbuf))
{
initial_result = *resultp;
allocated = *lengthp;
/* Convert UTF-16 string to UTF-8 string.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software; you can redistribute it and/or modify it
s += count;
/* Store it in the output string. */
- count = u8_uctomb (result, uc, allocated - length);
+ count = u8_uctomb (result + length, uc, allocated - length);
if (count == -1)
{
if (!(result == resultbuf || result == NULL))
memcpy ((char *) memory, (char *) result,
length * sizeof (DST_UNIT));
result = memory;
- count = u8_uctomb (result, uc, allocated - length);
+ count = u8_uctomb (result + length, uc, allocated - length);
if (count < 0)
abort ();
}
/* Convert UTF-32 string to UTF-16 string.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software; you can redistribute it and/or modify it
u16_uctomb will verify uc anyway. */
/* Store it in the output string. */
- count = u16_uctomb (result, uc, allocated - length);
+ count = u16_uctomb (result + length, uc, allocated - length);
if (count == -1)
{
if (!(result == resultbuf || result == NULL))
memcpy ((char *) memory, (char *) result,
length * sizeof (DST_UNIT));
result = memory;
- count = u16_uctomb (result, uc, allocated - length);
+ count = u16_uctomb (result + length, uc, allocated - length);
if (count < 0)
abort ();
}
/* Convert UTF-32 string to UTF-8 string.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software; you can redistribute it and/or modify it
u8_uctomb will verify uc anyway. */
/* Store it in the output string. */
- count = u8_uctomb (result, uc, allocated - length);
+ count = u8_uctomb (result + length, uc, allocated - length);
if (count == -1)
{
if (!(result == resultbuf || result == NULL))
memcpy ((char *) memory, (char *) result,
length * sizeof (DST_UNIT));
result = memory;
- count = u8_uctomb (result, uc, allocated - length);
+ count = u8_uctomb (result + length, uc, allocated - length);
if (count < 0)
abort ();
}
/* Convert UTF-8 string to UTF-16 string.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software; you can redistribute it and/or modify it
s += count;
/* Store it in the output string. */
- count = u16_uctomb (result, uc, allocated - length);
+ count = u16_uctomb (result + length, uc, allocated - length);
if (count == -1)
{
if (!(result == resultbuf || result == NULL))
memcpy ((char *) memory, (char *) result,
length * sizeof (DST_UNIT));
result = memory;
- count = u16_uctomb (result, uc, allocated - length);
+ count = u16_uctomb (result + length, uc, allocated - length);
if (count < 0)
abort ();
}
Depends-on:
unistr/base
+unistr/u16-mbtouc-safe
configure.ac:
Depends-on:
unistr/base
+unistr/u16-mbtouc-safe
+unistr/u8-uctomb
configure.ac:
Depends-on:
unistr/base
+unistr/u16-uctomb
configure.ac:
Depends-on:
unistr/base
+unistr/u8-uctomb
configure.ac:
Depends-on:
unistr/base
+unistr/u8-mbtouc-safe
+unistr/u16-uctomb
configure.ac:
Depends-on:
unistr/base
+unistr/u8-mbtouc-safe
configure.ac: