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 804e381788fc574db17ec8c2018f234f2295a017..9e738cd490ca600d4f21fde85a66c2ae9972ad14 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,60 @@
+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
diff --git a/NEWS b/NEWS
index 5a0f654cb8a9c81b7881207659aab0fb7bebd7d9..ef6734d2ed6944f2c5787a0dc806b50f1135cc7e 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 56c0c04782accb0d2edeb448375d27f07e685c50..8bee60ae8b81c6d6ec40979b24135fe588625f09 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 5643ea72b42b26d7ac02916e074dae8ba62b8663..5bab492e19fcc7cd5fd3accecf602d02dcadbb56 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 a2e483e1b6246b564929b32c3581956ef5bf878f..6a6c112af22695cdb6b245143dab216c0c3cd1a5 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 6ca1458b632651a76c985d2fce1b118d2aeee692..66ce48629727b869807eb066d5feab6bfe295b10 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 a581bfc2417e2fc346b78adb8c39a6f3196d480c..b952f075c0f270e719677a021d66c17459478df9 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 9601ed7a14de265ebbb49d138e5ed902703f2737..422b70f9e1b5df9cc566faa03bbd49060f535a6e 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 4b152ecabebecc3124fc0bee76c7ce4f6b8f1eb5..5a9936571a0a19e811c565a620b787083ffc724b 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 55fb31d08c7f865e55b80a26550821e70edb1333..dc6d6c7771f63c361e33b76bb5f6df02af6b7178 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 cf8174dfcfc60ab27a838397a9c4d27e08304b05..7fda3b59051b586a63167d78f8fb283689e70c9a 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 bf3f4ce881258f233f54a2b7fcd3c0c7fc257749..da46d92d1289e9f44c4e648acf5858dc8fa196d2 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 c178c994bbca69c5677aaeafae49c6ab51220c00..e5688439e05b6367b064fb6463bb0c4067fd63f8 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 c94ce66669d8e49a7d465b52ca4bd52ae69e2f84..81234cc411839e3e43b9cd8071aca7a8f4df73c6 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 12ecd833c52c560dba48b500e230f7b6a307410b..4d42b493b82cf0e661c2d31572a69813080bd0bc 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 b3b56ddcb4e9e1df6ba6d910719c7c99dafc18b1..2d8ae45930a541c84d3e309a50ec7e9f7ebbecd2 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 cce594cb4441aca2842c1aa39764836277e7c9ad..57db8d4bd4f99b5d86195fcd32317d4ab0a1a3c7 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 5084c24850695cdbd24551bd68ba6d012ab15154..00fd66a476dd2f45490f13867f8bb14774f5f666 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 6cf3f469bd963518e044092998a59dcf77c26ba2..ebdb7044cd28407381575a95e88da3098cfbfc3f 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 95f7d9f0f3a583280a782c8dda65ea909d7a4d1d..dedad5a111a0db4b2521b4dc302beb1c0424dce1 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 c79c3f5acfca2894921a3dc4b91f45eda0cedcfc..7ea56a18baa156b34dedac2750c49f2862f2ce36 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 82034382c00c3e792ac79d3f93ed2b606d5b24c3..f9fcee05a0db5641a2311cc3d11f01605efc5de5 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 2014323661b8dd696a0291f31da5e81091c1d787..bc41205bb2a55eb0e96ab5e1e583c78d202c80c5 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 4fa363394e6c7c5777a19251a02cf1b983074f00..8cef329993653cf6bcf0f216f9d2e28c80c6ab96 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 c40da0ef4d46b1dd588b2851a32c5e394ae466ad..00ba199b3f7686d8e40ffe1ee49781dd8a4c9fba 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 707953b93a3614b57bc27b02ae1d5af881b84e38..15343db2c09b9ce40f92a7288c9e18b202df890b 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 54ca0ea67f5e178c1e97570463813acb56082d31..05daefb00afc2e00606dabca9bd20143b7261bb0 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 7048494a6109dae14fff658672d82fdb7572194c..5dd97d88a20758caa3d5dbd441513efb4507a5ec 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 442183f94790a6cb00d0b5c0bcda8fcd29cabd65..998047946318609821d0cffc19a2ad8676c306da 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 dd6f1f3126389ea64192bb099b41d8b94a3d9261..e438f383da72d80e728b3bcff79edbf6be561769 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 6a218282697f76cd2ddc9164831a706e7b56f685..eb1a100a00c9051798356dedf1da3e0387544022 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 65bf23918bd0407976e87019e85c8a7dd94d58a0..b0417f51054db8bceaf43fd4a30e4d88699a0b36 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