utf16-ucs4-unsafe.h, ucs4-utf8.h, ucs4-utf16.h. Use unistr.h instead.
+2007-03-24 Bruno Haible <bruno@clisp.org>
+
+ * lib/utf8-ucs4.h: Remove file.
+ * lib/utf8-ucs4-unsafe.h: Remove file.
+ * lib/utf16-ucs4.h: Remove file.
+ * lib/utf16-ucs4-unsafe.h: Remove file.
+ * lib/ucs4-utf8.h: Remove file.
+ * lib/ucs4-utf16.h: Remove file.
+ * lib/unistr.h: Include their previous contents.
+ * m4/utf-ucs4.m4: Remove file.
+ * m4/ucs4-utf.m4: Remove file.
+ * modules/utf8-ucs4 (Files): Remove lib/utf8-ucs4.h.
+ (Depends-on): Add unistr/base.
+ (configure.ac): Remove gl_UTF_UCS4.
+ (Makefile.am): Update.
+ (Include): Change to unistr.h.
+ * modules/utf8-ucs4-unsafe (Files): Remove lib/utf8-ucs4-unsafe.h.
+ (Depends-on): Add unistr/base.
+ (configure.ac): Remove gl_UTF_UCS4.
+ (Makefile.am): Update.
+ (Include): Change to unistr.h.
+ * modules/utf16-ucs4 (Files): Remove lib/utf16-ucs4.h.
+ (Depends-on): Add unistr/base.
+ (configure.ac): Remove gl_UTF_UCS4.
+ (Makefile.am): Update.
+ (Include): Change to unistr.h.
+ * modules/utf16-ucs4-unsafe (Files): Remove lib/utf16-ucs4-unsafe.h.
+ (Depends-on): Add unistr/base.
+ (configure.ac): Remove gl_UTF_UCS4.
+ (Makefile.am): Update.
+ (Include): Change to unistr.h.
+ * modules/ucs4-utf8 (Files): Remove lib/ucs4-utf8.h.
+ (Depends-on): Add unistr/base.
+ (configure.ac): Remove gl_UCS4_UTF.
+ (Makefile.am): Update.
+ (Include): Change to unistr.h.
+ * modules/ucs4-utf16 (Files): Remove lib/ucs4-utf16.h.
+ (Depends-on): Add unistr/base.
+ (configure.ac): Remove gl_UCS4_UTF.
+ (Makefile.am): Update.
+ (Include): Change to unistr.h.
+ * lib/unistr/utf8-ucs4.c: Include unistr.h instead of utf8-ucs4.h.
+ * lib/unistr/utf8-ucs4-unsafe.c: Include unistr.h instead of
+ utf8-ucs4-unsafe.h.
+ * lib/unistr/utf16-ucs4.c: Include unistr.h instead of utf16-ucs4.h.
+ * lib/unistr/utf16-ucs4-unsafe.c: Include unistr.h instead of
+ utf16-ucs4-unsafe.h.
+ * lib/unistr/ucs4-utf8.c: Include unistr.h instead of ucs4-utf8.h.
+ * lib/unistr/ucs4-utf16.c: Include unistr.h instead of ucs4-utf16.h.
+ * lib/unistr/u8-chr.c: Don't include ucs4-utf8.h.
+ * lib/unistr/u8-strchr.c: Likewise.
+ * lib/unistr/u8-strrchr.c: Likewise.
+ * lib/unistr/u16-chr.c: Don't include ucs4-utf16.h.
+ * lib/unistr/u16-strchr.c: Likewise.
+ * lib/unistr/u16-strrchr.c: Likewise.
+ * lib/striconveh.c: Update.
+
2007-03-24 Bruno Haible <bruno@clisp.org>
* lib/argp-help.c (fill_in_uparams, canon_doc_option): Cast the
Date Modules Changes
+2007-03-24 utf8-ucs4 The include file is changed from "utf8-ucs4.h"
+ to "unistr.h".
+ utf8-ucs4-unsafe The include file is changed from
+ "utf8-ucs4-unsafe.h" to "unistr.h".
+ utf16-ucs4 The include file is changed from "utf16-ucs4.h"
+ to "unistr.h".
+ utf16-ucs4-unsafe The include file is changed from "utf16-ucs4.h"
+ to "unistr.h".
+ ucs4-utf8 The include file is changed from "ucs4-utf8.h"
+ to "unistr.h".
+ ucs4-utf16 The include file is changed from "ucs4-utf16.h"
+ to "unistr.h".
+
2007-03-19 iconvme The module is removed. Use module striconv instead:
iconv_string -> str_iconv
iconv_alloc -> str_cd_iconv (with reversed
#if HAVE_ICONV
# include <iconv.h>
-# include "utf8-ucs4.h"
-# include "ucs4-utf8.h"
# include "unistr.h"
#endif
+++ /dev/null
-/* Conversion UCS-4 to UTF-16.
- Copyright (C) 2002, 2005-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
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- USA. */
-
-#ifndef _UCS4_UTF16_H
-#define _UCS4_UTF16_H
-
-#include <stddef.h>
-#include "unitypes.h"
-
-extern int u16_uctomb_aux (uint16_t *s, ucs4_t uc, int n);
-
-/* Return the length (number of units) of the UTF-16 representation of uc,
- after storing it at S. Return -1 upon failure, -2 if the number of
- available units, N, is too small. */
-static inline int
-u16_uctomb (uint16_t *s, ucs4_t uc, int n)
-{
- if (uc < 0xd800 && n > 0)
- {
- s[0] = uc;
- return 1;
- }
- else
- return u16_uctomb_aux (s, uc, n);
-}
-
-#endif /* _UCS4_UTF16_H */
+++ /dev/null
-/* Conversion UCS-4 to UTF-8.
- Copyright (C) 2002, 2005-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
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- USA. */
-
-#ifndef _UCS4_UTF8_H
-#define _UCS4_UTF8_H
-
-#include <stddef.h>
-#include "unitypes.h"
-
-extern int u8_uctomb_aux (uint8_t *s, ucs4_t uc, int n);
-
-/* Return the length (number of units) of the UTF-8 representation of uc,
- after storing it at S. Return -1 upon failure, -2 if the number of
- available units, N, is too small. */
-static inline int
-u8_uctomb (uint8_t *s, ucs4_t uc, int n)
-{
- if (uc < 0x80 && n > 0)
- {
- s[0] = uc;
- return 1;
- }
- else
- return u8_uctomb_aux (s, uc, n);
-}
-
-#endif /* _UCS4_UTF8_H */
/* Elementary Unicode string functions.
- Copyright (C) 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2005-2007 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published
/* Return the length (number of units) of the first character in S, putting
its 'ucs4_t' representation in *PUC. Upon failure, *PUC is set to 0xfffd,
- and an appropriate number of units is returned. */
-/* Similar to mbtowc(), except that puc and s must not be NULL, and the NUL
- character is not treated specially. */
+ and an appropriate number of units is returned.
+ The number of available units, N, must be > 0. */
+/* Similar to mbtowc(), except that puc and s must not be NULL, n must be > 0,
+ and the NUL character is not treated specially. */
/* The variants with _safe suffix are safe, even if the library is compiled
without --enable-safety. */
extern int
u8_mbtouc_unsafe (ucs4_t *puc, const uint8_t *s, size_t n);
# else
-# include "utf8-ucs4-unsafe.h"
+extern int
+ u8_mbtouc_unsafe_aux (ucs4_t *puc, const uint8_t *s, size_t n);
+static inline int
+u8_mbtouc_unsafe (ucs4_t *puc, const uint8_t *s, size_t n)
+{
+ uint8_t c = *s;
+
+ if (c < 0x80)
+ {
+ *puc = c;
+ return 1;
+ }
+ else
+ return u8_mbtouc_unsafe_aux (puc, s, n);
+}
# endif
#endif
extern int
u16_mbtouc_unsafe (ucs4_t *puc, const uint16_t *s, size_t n);
# else
-# include "utf16-ucs4-unsafe.h"
+extern int
+ u16_mbtouc_unsafe_aux (ucs4_t *puc, const uint16_t *s, size_t n);
+static inline int
+u16_mbtouc_unsafe (ucs4_t *puc, const uint16_t *s, size_t n)
+{
+ uint16_t c = *s;
+
+ if (c < 0xd800 || c >= 0xe000)
+ {
+ *puc = c;
+ return 1;
+ }
+ else
+ return u16_mbtouc_unsafe_aux (puc, s, n);
+}
# endif
#endif
extern int
u8_mbtouc (ucs4_t *puc, const uint8_t *s, size_t n);
# else
-# include "utf8-ucs4.h"
+extern int
+ u8_mbtouc_aux (ucs4_t *puc, const uint8_t *s, size_t n);
+static inline int
+u8_mbtouc (ucs4_t *puc, const uint8_t *s, size_t n)
+{
+ uint8_t c = *s;
+
+ if (c < 0x80)
+ {
+ *puc = c;
+ return 1;
+ }
+ else
+ return u8_mbtouc_aux (puc, s, n);
+}
# endif
#endif
extern int
u16_mbtouc (ucs4_t *puc, const uint16_t *s, size_t n);
# else
-# include "utf16-ucs4.h"
+extern int
+ u16_mbtouc_aux (ucs4_t *puc, const uint16_t *s, size_t n);
+static inline int
+u16_mbtouc (ucs4_t *puc, const uint16_t *s, size_t n)
+{
+ uint16_t c = *s;
+
+ if (c < 0xd800 || c >= 0xe000)
+ {
+ *puc = c;
+ return 1;
+ }
+ else
+ return u16_mbtouc_aux (puc, s, n);
+}
# endif
#endif
extern int
u8_uctomb (uint8_t *s, ucs4_t uc, int n);
# else
-# include "ucs4-utf8.h"
+extern int
+ u8_uctomb_aux (uint8_t *s, ucs4_t uc, int n);
+static inline int
+u8_uctomb (uint8_t *s, ucs4_t uc, int n)
+{
+ if (uc < 0x80 && n > 0)
+ {
+ s[0] = uc;
+ return 1;
+ }
+ else
+ return u8_uctomb_aux (s, uc, n);
+}
# endif
#endif
extern int
u16_uctomb (uint16_t *s, ucs4_t uc, int n);
# else
-# include "ucs4-utf16.h"
+extern int
+ u16_uctomb_aux (uint16_t *s, ucs4_t uc, int n);
+static inline int
+u16_uctomb (uint16_t *s, ucs4_t uc, int n)
+{
+ if (uc < 0xd800 && n > 0)
+ {
+ s[0] = uc;
+ return 1;
+ }
+ else
+ return u16_uctomb_aux (s, uc, n);
+}
# endif
#endif
/* Check 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
while (s < s_end)
{
- /* Keep in sync with utf16-ucs4.h and utf16-ucs4.c. */
+ /* Keep in sync with unistr.h and utf16-ucs4.c. */
uint16_t c = *s;
if (c < 0xd800 || c >= 0xe000)
/* Search character in piece of UTF-16 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 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
/* Specification. */
#include "unistr.h"
-#include "ucs4-utf16.h"
-
uint16_t *
u16_chr (const uint16_t *s, size_t n, ucs4_t uc)
{
{
if (n > 0)
{
- /* Keep in sync with utf16-ucs4.h and utf16-ucs4.c. */
+ /* Keep in sync with unistr.h and utf16-ucs4.c. */
uint16_t c = *s;
if (c < 0xd800 || c >= 0xe000)
const uint16_t *
u16_prev (ucs4_t *puc, const uint16_t *s, const uint16_t *start)
{
- /* Keep in sync with utf16-ucs4.h and utf16-ucs4.c. */
+ /* Keep in sync with unistr.h and utf16-ucs4.c. */
if (s != start)
{
uint16_t c_1 = s[-1];
/* Search character in UTF-16 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 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
/* Specification. */
#include "unistr.h"
-#include "ucs4-utf16.h"
-
uint16_t *
u16_strchr (const uint16_t *s, ucs4_t uc)
{
int
u16_strmblen (const uint16_t *s)
{
- /* Keep in sync with utf16-ucs4.h and utf16-ucs4.c. */
+ /* Keep in sync with unistr.h and utf16-ucs4.c. */
uint16_t c = *s;
if (c < 0xd800 || c >= 0xe000)
int
u16_strmbtouc (ucs4_t *puc, const uint16_t *s)
{
- /* Keep in sync with utf16-ucs4.h and utf16-ucs4.c. */
+ /* Keep in sync with unistr.h and utf16-ucs4.c. */
uint16_t c = *s;
if (c < 0xd800 || c >= 0xe000)
/* Search character in UTF-16 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 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
/* Specification. */
#include "unistr.h"
-#include "ucs4-utf16.h"
-
uint16_t *
u16_strrchr (const uint16_t *s, ucs4_t uc)
{
/* Check 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
while (s < s_end)
{
- /* Keep in sync with utf8-ucs4.h and utf8-ucs4.c. */
+ /* Keep in sync with unistr.h and utf8-ucs4.c. */
uint8_t c = *s;
if (c < 0x80)
/* Search character in piece of UTF-8 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 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
/* Specification. */
#include "unistr.h"
-#include "ucs4-utf8.h"
-
uint8_t *
u8_chr (const uint8_t *s, size_t n, ucs4_t uc)
{
{
if (n > 0)
{
- /* Keep in sync with utf8-ucs4.h and utf8-ucs4.c. */
+ /* Keep in sync with unistr.h and utf8-ucs4.c. */
uint8_t c = *s;
if (c < 0x80)
const uint8_t *
u8_prev (ucs4_t *puc, const uint8_t *s, const uint8_t *start)
{
- /* Keep in sync with utf8-ucs4.h and utf8-ucs4.c. */
+ /* Keep in sync with unistr.h and utf8-ucs4.c. */
if (s != start)
{
uint8_t c_1 = s[-1];
/* Search character in UTF-8 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 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
/* Specification. */
#include "unistr.h"
-#include "ucs4-utf8.h"
-
uint8_t *
u8_strchr (const uint8_t *s, ucs4_t uc)
{
int
u8_strmblen (const uint8_t *s)
{
- /* Keep in sync with utf8-ucs4.h and utf8-ucs4.c. */
+ /* Keep in sync with unistr.h and utf8-ucs4.c. */
uint8_t c = *s;
if (c < 0x80)
int
u8_strmbtouc (ucs4_t *puc, const uint8_t *s)
{
- /* Keep in sync with utf8-ucs4.h and utf8-ucs4.c. */
+ /* Keep in sync with unistr.h and utf8-ucs4.c. */
uint8_t c = *s;
if (c < 0x80)
/* Search character in UTF-8 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 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
/* Specification. */
#include "unistr.h"
-#include "ucs4-utf8.h"
-
uint8_t *
u8_strrchr (const uint8_t *s, ucs4_t uc)
{
/* Conversion UCS-4 to UTF-16.
- 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
#include <config.h>
/* Specification. */
-#include "ucs4-utf16.h"
+#include "unistr.h"
int
u16_uctomb_aux (uint16_t *s, ucs4_t uc, int n)
/* Conversion UCS-4 to UTF-8.
- 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
#include <config.h>
/* Specification. */
-#include "ucs4-utf8.h"
+#include "unistr.h"
int
u8_uctomb_aux (uint8_t *s, ucs4_t uc, int n)
#include <config.h>
/* Specification. */
-#include "utf16-ucs4-unsafe.h"
+#include "unistr.h"
int
u16_mbtouc_unsafe_aux (ucs4_t *puc, const uint16_t *s, size_t n)
#include <config.h>
/* Specification. */
-#include "utf16-ucs4.h"
+#include "unistr.h"
int
u16_mbtouc_aux (ucs4_t *puc, const uint16_t *s, size_t n)
#include <config.h>
/* Specification. */
-#include "utf8-ucs4-unsafe.h"
+#include "unistr.h"
int
u8_mbtouc_unsafe_aux (ucs4_t *puc, const uint8_t *s, size_t n)
#include <config.h>
/* Specification. */
-#include "utf8-ucs4.h"
+#include "unistr.h"
int
u8_mbtouc_aux (ucs4_t *puc, const uint8_t *s, size_t n)
+++ /dev/null
-/* Conversion UTF-16 to UCS-4.
- Copyright (C) 2001-2002, 2005-2007 Free Software Foundation, Inc.
- Written by Bruno Haible <bruno@clisp.org>, 2001.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- USA. */
-
-#ifndef _UTF16_UCS4_UNSAFE_H
-#define _UTF16_UCS4_UNSAFE_H
-
-#include <stddef.h>
-#include "unitypes.h"
-
-extern int u16_mbtouc_unsafe_aux (ucs4_t *puc, const uint16_t *s, size_t n);
-
-/* Return the length (number of units) of the first character in S, putting
- its 'ucs4_t' representation in *PUC.
- The number of available units, N, must be > 0. */
-static inline int
-u16_mbtouc_unsafe (ucs4_t *puc, const uint16_t *s, size_t n)
-{
- uint16_t c = *s;
-
- if (c < 0xd800 || c >= 0xe000)
- {
- *puc = c;
- return 1;
- }
- else
- return u16_mbtouc_unsafe_aux (puc, s, n);
-}
-
-#endif /* _UTF16_UCS4_UNSAFE_H */
+++ /dev/null
-/* Conversion UTF-16 to UCS-4.
- Copyright (C) 2001-2002, 2005-2007 Free Software Foundation, Inc.
- Written by Bruno Haible <bruno@clisp.org>, 2001.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- USA. */
-
-#ifndef _UTF16_UCS4_H
-#define _UTF16_UCS4_H
-
-#include <stddef.h>
-#include "unitypes.h"
-
-extern int u16_mbtouc_aux (ucs4_t *puc, const uint16_t *s, size_t n);
-
-/* Return the length (number of units) of the first character in S, putting
- its 'ucs4_t' representation in *PUC.
- The number of available units, N, must be > 0. */
-static inline int
-u16_mbtouc (ucs4_t *puc, const uint16_t *s, size_t n)
-{
- uint16_t c = *s;
-
- if (c < 0xd800 || c >= 0xe000)
- {
- *puc = c;
- return 1;
- }
- else
- return u16_mbtouc_aux (puc, s, n);
-}
-
-#endif /* _UTF16_UCS4_H */
+++ /dev/null
-/* Conversion UTF-8 to UCS-4.
- Copyright (C) 2001-2002, 2005-2007 Free Software Foundation, Inc.
- Written by Bruno Haible <bruno@clisp.org>, 2001.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- USA. */
-
-#ifndef _UTF8_UCS4_UNSAFE_H
-#define _UTF8_UCS4_UNSAFE_H
-
-#include <stddef.h>
-#include "unitypes.h"
-
-extern int u8_mbtouc_unsafe_aux (ucs4_t *puc, const uint8_t *s, size_t n);
-
-/* Return the length (number of units) of the first character in S, putting
- its 'ucs4_t' representation in *PUC.
- The number of available units, N, must be > 0. */
-static inline int
-u8_mbtouc_unsafe (ucs4_t *puc, const uint8_t *s, size_t n)
-{
- uint8_t c = *s;
-
- if (c < 0x80)
- {
- *puc = c;
- return 1;
- }
- else
- return u8_mbtouc_unsafe_aux (puc, s, n);
-}
-
-#endif /* _UTF8_UCS4_UNSAFE_H */
+++ /dev/null
-/* Conversion UTF-8 to UCS-4.
- Copyright (C) 2001-2002, 2005-2007 Free Software Foundation, Inc.
- Written by Bruno Haible <bruno@clisp.org>, 2001.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- USA. */
-
-#ifndef _UTF8_UCS4_H
-#define _UTF8_UCS4_H
-
-#include <stddef.h>
-#include "unitypes.h"
-
-extern int u8_mbtouc_aux (ucs4_t *puc, const uint8_t *s, size_t n);
-
-/* Return the length (number of units) of the first character in S, putting
- its 'ucs4_t' representation in *PUC.
- The number of available units, N, must be > 0. */
-static inline int
-u8_mbtouc (ucs4_t *puc, const uint8_t *s, size_t n)
-{
- uint8_t c = *s;
-
- if (c < 0x80)
- {
- *puc = c;
- return 1;
- }
- else
- return u8_mbtouc_aux (puc, s, n);
-}
-
-#endif /* _UTF8_UCS4_H */
+++ /dev/null
-# ucs4-utf.m4 serial 1
-dnl Copyright (C) 2003 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_UCS4_UTF],
-[
- dnl Prerequisites of lib/ucs4-utf8.h, lib/ucs4-utf16.h.
- AC_REQUIRE([AC_C_INLINE])
-])
+++ /dev/null
-# utf-ucs4.m4 serial 1
-dnl Copyright (C) 2003 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_UTF_UCS4],
-[
- dnl Prerequisites of lib/utf8-ucs4.h, lib/utf16-ucs4.h.
- AC_REQUIRE([AC_C_INLINE])
-])
Conversion UCS-4 to UTF-16.
Files:
-lib/ucs4-utf16.h
lib/unistr/ucs4-utf16.c
-m4/ucs4-utf.m4
Depends-on:
unitypes
+unistr/base
configure.ac:
-gl_UCS4_UTF
Makefile.am:
-lib_SOURCES += ucs4-utf16.h unistr/ucs4-utf16.c
+lib_SOURCES += unistr/ucs4-utf16.c
Include:
+"unistr.h"
License:
LGPL
Conversion UCS-4 to UTF-8.
Files:
-lib/ucs4-utf8.h
lib/unistr/ucs4-utf8.c
-m4/ucs4-utf.m4
Depends-on:
unitypes
+unistr/base
configure.ac:
-gl_UCS4_UTF
Makefile.am:
-lib_SOURCES += ucs4-utf8.h unistr/ucs4-utf8.c
+lib_SOURCES += unistr/ucs4-utf8.c
Include:
+"unistr.h"
License:
LGPL
Conversion UTF-16 to UCS-4.
Files:
-lib/utf16-ucs4.h
lib/unistr/utf16-ucs4.c
-m4/utf-ucs4.m4
Depends-on:
unitypes
+unistr/base
configure.ac:
-gl_UTF_UCS4
Makefile.am:
-lib_SOURCES += utf16-ucs4.h unistr/utf16-ucs4.c
+lib_SOURCES += unistr/utf16-ucs4.c
Include:
-"utf16-ucs4.h"
+"unistr.h"
License:
LGPL
Conversion UTF-16 to UCS-4.
Files:
-lib/utf16-ucs4-unsafe.h
lib/unistr/utf16-ucs4-unsafe.c
-m4/utf-ucs4.m4
Depends-on:
unitypes
+unistr/base
configure.ac:
-gl_UTF_UCS4
Makefile.am:
-lib_SOURCES += utf16-ucs4-unsafe.h unistr/utf16-ucs4-unsafe.c
+lib_SOURCES += unistr/utf16-ucs4-unsafe.c
Include:
-"utf16-ucs4-unsafe.h"
+"unistr.h"
License:
LGPL
Conversion UTF-8 to UCS-4.
Files:
-lib/utf8-ucs4.h
lib/unistr/utf8-ucs4.c
-m4/utf-ucs4.m4
Depends-on:
unitypes
+unistr/base
configure.ac:
-gl_UTF_UCS4
Makefile.am:
-lib_SOURCES += utf8-ucs4.h unistr/utf8-ucs4.c
+lib_SOURCES += unistr/utf8-ucs4.c
Include:
-"utf8-ucs4.h"
+"unistr.h"
License:
LGPL
Conversion UTF-8 to UCS-4.
Files:
-lib/utf8-ucs4-unsafe.h
lib/unistr/utf8-ucs4-unsafe.c
-m4/utf-ucs4.m4
Depends-on:
unitypes
+unistr/base
configure.ac:
-gl_UTF_UCS4
Makefile.am:
-lib_SOURCES += utf8-ucs4-unsafe.h unistr/utf8-ucs4-unsafe.c
+lib_SOURCES += unistr/utf8-ucs4-unsafe.c
Include:
-"utf8-ucs4-unsafe.h"
+"unistr.h"
License:
LGPL