Drop the include files utf8-ucs4.h, utf8-ucs4-unsafe.h, utf16-ucs4.h,
authorBruno Haible <bruno@clisp.org>
Sat, 24 Mar 2007 14:11:25 +0000 (14:11 +0000)
committerBruno Haible <bruno@clisp.org>
Sat, 24 Mar 2007 14:11:25 +0000 (14:11 +0000)
utf16-ucs4-unsafe.h, ucs4-utf8.h, ucs4-utf16.h. Use unistr.h instead.

40 files changed:
ChangeLog
NEWS
lib/striconveh.c
lib/ucs4-utf16.h [deleted file]
lib/ucs4-utf8.h [deleted file]
lib/unistr.h
lib/unistr/u16-check.c
lib/unistr/u16-chr.c
lib/unistr/u16-mblen.c
lib/unistr/u16-prev.c
lib/unistr/u16-strchr.c
lib/unistr/u16-strmblen.c
lib/unistr/u16-strmbtouc.c
lib/unistr/u16-strrchr.c
lib/unistr/u8-check.c
lib/unistr/u8-chr.c
lib/unistr/u8-mblen.c
lib/unistr/u8-prev.c
lib/unistr/u8-strchr.c
lib/unistr/u8-strmblen.c
lib/unistr/u8-strmbtouc.c
lib/unistr/u8-strrchr.c
lib/unistr/ucs4-utf16.c
lib/unistr/ucs4-utf8.c
lib/unistr/utf16-ucs4-unsafe.c
lib/unistr/utf16-ucs4.c
lib/unistr/utf8-ucs4-unsafe.c
lib/unistr/utf8-ucs4.c
lib/utf16-ucs4-unsafe.h [deleted file]
lib/utf16-ucs4.h [deleted file]
lib/utf8-ucs4-unsafe.h [deleted file]
lib/utf8-ucs4.h [deleted file]
m4/ucs4-utf.m4 [deleted file]
m4/utf-ucs4.m4 [deleted file]
modules/ucs4-utf16
modules/ucs4-utf8
modules/utf16-ucs4
modules/utf16-ucs4-unsafe
modules/utf8-ucs4
modules/utf8-ucs4-unsafe

index 804e381..9e738cd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,62 @@
 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
        arguments of isspace, isalpha, isalnum, isdigit to 'unsigned char'.
 
diff --git a/NEWS b/NEWS
index 5a0f654..ef6734d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,19 @@ User visible incompatible changes
 
 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
index 56c0c04..8bee60a 100644 (file)
@@ -28,8 +28,6 @@
 
 #if HAVE_ICONV
 # include <iconv.h>
-# include "utf8-ucs4.h"
-# include "ucs4-utf8.h"
 # include "unistr.h"
 #endif
 
diff --git a/lib/ucs4-utf16.h b/lib/ucs4-utf16.h
deleted file mode 100644 (file)
index 8450a99..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/* 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 */
diff --git a/lib/ucs4-utf8.h b/lib/ucs4-utf8.h
deleted file mode 100644 (file)
index e8c3e7f..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/* 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 */
index 5643ea7..5bab492 100644 (file)
@@ -1,5 +1,5 @@
 /* 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
@@ -126,9 +126,10 @@ extern int
 
 /* 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.  */
 
@@ -137,7 +138,21 @@ extern int
 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
 
@@ -146,7 +161,21 @@ extern int
 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
 
@@ -179,7 +208,21 @@ u32_mbtouc_unsafe (ucs4_t *puc, const uint32_t *s, size_t n)
 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
 
@@ -188,7 +231,21 @@ extern int
 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
 
@@ -223,7 +280,19 @@ u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n)
 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
 
@@ -232,7 +301,19 @@ extern int
 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
 
index a2e483e..6a6c112 100644 (file)
@@ -1,5 +1,5 @@
 /* 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
@@ -29,7 +29,7 @@ u16_check (const uint16_t *s, size_t n)
 
   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)
index 6ca1458..66ce486 100644 (file)
@@ -1,5 +1,5 @@
 /* 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
@@ -22,8 +22,6 @@
 /* Specification.  */
 #include "unistr.h"
 
-#include "ucs4-utf16.h"
-
 uint16_t *
 u16_chr (const uint16_t *s, size_t n, ucs4_t uc)
 {
index a581bfc..b952f07 100644 (file)
@@ -27,7 +27,7 @@ u16_mblen (const uint16_t *s, size_t n)
 {
   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)
index 9601ed7..422b70f 100644 (file)
@@ -25,7 +25,7 @@
 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];
index 4b152ec..5a99365 100644 (file)
@@ -1,5 +1,5 @@
 /* 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
@@ -22,8 +22,6 @@
 /* Specification.  */
 #include "unistr.h"
 
-#include "ucs4-utf16.h"
-
 uint16_t *
 u16_strchr (const uint16_t *s, ucs4_t uc)
 {
index 55fb31d..dc6d6c7 100644 (file)
@@ -25,7 +25,7 @@
 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)
index cf8174d..7fda3b5 100644 (file)
@@ -25,7 +25,7 @@
 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)
index bf3f4ce..da46d92 100644 (file)
@@ -1,5 +1,5 @@
 /* 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
@@ -22,8 +22,6 @@
 /* Specification.  */
 #include "unistr.h"
 
-#include "ucs4-utf16.h"
-
 uint16_t *
 u16_strrchr (const uint16_t *s, ucs4_t uc)
 {
index c178c99..e568843 100644 (file)
@@ -1,5 +1,5 @@
 /* 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
@@ -29,7 +29,7 @@ u8_check (const uint8_t *s, size_t n)
 
   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)
index c94ce66..81234cc 100644 (file)
@@ -1,5 +1,5 @@
 /* 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
@@ -22,8 +22,6 @@
 /* Specification.  */
 #include "unistr.h"
 
-#include "ucs4-utf8.h"
-
 uint8_t *
 u8_chr (const uint8_t *s, size_t n, ucs4_t uc)
 {
index 12ecd83..4d42b49 100644 (file)
@@ -27,7 +27,7 @@ u8_mblen (const uint8_t *s, size_t n)
 {
   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)
index b3b56dd..2d8ae45 100644 (file)
@@ -25,7 +25,7 @@
 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];
index cce594c..57db8d4 100644 (file)
@@ -1,5 +1,5 @@
 /* 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
@@ -22,8 +22,6 @@
 /* Specification.  */
 #include "unistr.h"
 
-#include "ucs4-utf8.h"
-
 uint8_t *
 u8_strchr (const uint8_t *s, ucs4_t uc)
 {
index 5084c24..00fd66a 100644 (file)
@@ -25,7 +25,7 @@
 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)
index 6cf3f46..ebdb704 100644 (file)
@@ -25,7 +25,7 @@
 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)
index 95f7d9f..dedad5a 100644 (file)
@@ -1,5 +1,5 @@
 /* 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
@@ -22,8 +22,6 @@
 /* Specification.  */
 #include "unistr.h"
 
-#include "ucs4-utf8.h"
-
 uint8_t *
 u8_strrchr (const uint8_t *s, ucs4_t uc)
 {
index c79c3f5..7ea56a1 100644 (file)
@@ -1,5 +1,5 @@
 /* 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
@@ -20,7 +20,7 @@
 #include <config.h>
 
 /* Specification.  */
-#include "ucs4-utf16.h"
+#include "unistr.h"
 
 int
 u16_uctomb_aux (uint16_t *s, ucs4_t uc, int n)
index 8203438..f9fcee0 100644 (file)
@@ -1,5 +1,5 @@
 /* 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
@@ -20,7 +20,7 @@
 #include <config.h>
 
 /* Specification.  */
-#include "ucs4-utf8.h"
+#include "unistr.h"
 
 int
 u8_uctomb_aux (uint8_t *s, ucs4_t uc, int n)
index 2014323..bc41205 100644 (file)
@@ -20,7 +20,7 @@
 #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)
index 4fa3633..8cef329 100644 (file)
@@ -20,7 +20,7 @@
 #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)
index c40da0e..00ba199 100644 (file)
@@ -20,7 +20,7 @@
 #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)
index 707953b..15343db 100644 (file)
@@ -20,7 +20,7 @@
 #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)
diff --git a/lib/utf16-ucs4-unsafe.h b/lib/utf16-ucs4-unsafe.h
deleted file mode 100644 (file)
index ca46703..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/* 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 */
diff --git a/lib/utf16-ucs4.h b/lib/utf16-ucs4.h
deleted file mode 100644 (file)
index 37e289d..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/* 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 */
diff --git a/lib/utf8-ucs4-unsafe.h b/lib/utf8-ucs4-unsafe.h
deleted file mode 100644 (file)
index d956f0b..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/* 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 */
diff --git a/lib/utf8-ucs4.h b/lib/utf8-ucs4.h
deleted file mode 100644 (file)
index feaf836..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/* 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 */
diff --git a/m4/ucs4-utf.m4 b/m4/ucs4-utf.m4
deleted file mode 100644 (file)
index 73a6618..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-# 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])
-])
diff --git a/m4/utf-ucs4.m4 b/m4/utf-ucs4.m4
deleted file mode 100644 (file)
index f648577..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-# 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])
-])
index 54ca0ea..05daefb 100644 (file)
@@ -2,20 +2,19 @@ Description:
 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
index 7048494..5dd97d8 100644 (file)
@@ -2,20 +2,19 @@ Description:
 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
index 442183f..9980479 100644 (file)
@@ -2,21 +2,19 @@ Description:
 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
index dd6f1f3..e438f38 100644 (file)
@@ -2,21 +2,19 @@ Description:
 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
index 6a21828..eb1a100 100644 (file)
@@ -2,21 +2,19 @@ Description:
 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
index 65bf239..b0417f5 100644 (file)
@@ -2,21 +2,19 @@ Description:
 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