summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2009-04-11 00:01:31 +0200
committerBruno Haible <bruno@clisp.org>2009-04-11 00:01:31 +0200
commit1fc753c0c0ce522aa65114df92031b7bde890cdd (patch)
tree917d13a1562d9aeda90253c01f37e535f32c4347
parentc300871bbb6b330d0a6087fb843d1f1179569da0 (diff)
downloadgnulib-1fc753c0c0ce522aa65114df92031b7bde890cdd.tar.gz
New include file "iconveh.h".
-rw-r--r--ChangeLog13
-rw-r--r--lib/iconveh.h41
-rw-r--r--lib/striconveh.h12
-rw-r--r--lib/striconveha.h5
-rw-r--r--lib/uniconv.h2
-rw-r--r--modules/striconveh1
-rw-r--r--modules/uniconv/base2
7 files changed, 63 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 6ea9f01b92..cafa78b956 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
2009-04-10 Bruno Haible <bruno@clisp.org>
+ New include file "iconveh.h".
+ * lib/iconveh.h: New file, extracted from lib/striconveh.h.
+ * lib/striconveh.h: Include it.
+ (enum iconv_ilseq_handler): Remove definition.
+ * lib/striconveha.h: Include <stddef.h> and iconveh.h instead of
+ striconveh.h.
+ * lib/uniconv.h: Include iconveh.h instead of striconveh.h.
+ * modules/striconveh (Files): Add lib/iconveh.h.
+ * modules/uniconv/base (Files): Add lib/iconveh.h. Remove
+ lib/striconveh.h.
+
+2009-04-10 Bruno Haible <bruno@clisp.org>
+
* lib/uniconv.h: Update comment.
2009-04-10 Bruno Haible <bruno@clisp.org>
diff --git a/lib/iconveh.h b/lib/iconveh.h
new file mode 100644
index 0000000000..bc125b0c17
--- /dev/null
+++ b/lib/iconveh.h
@@ -0,0 +1,41 @@
+/* Character set conversion handler type.
+ Copyright (C) 2001-2007, 2009 Free Software Foundation, Inc.
+ Written by Bruno Haible.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _ICONVEH_H
+#define _ICONVEH_H
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Handling of unconvertible characters. */
+enum iconv_ilseq_handler
+{
+ iconveh_error, /* return and set errno = EILSEQ */
+ iconveh_question_mark, /* use one '?' per unconvertible character */
+ iconveh_escape_sequence /* use escape sequence \uxxxx or \Uxxxxxxxx */
+};
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _ICONVEH_H */
diff --git a/lib/striconveh.h b/lib/striconveh.h
index 34c21fa0ec..f94b33aabd 100644
--- a/lib/striconveh.h
+++ b/lib/striconveh.h
@@ -1,5 +1,5 @@
/* Character set conversion with error handling.
- Copyright (C) 2001-2007 Free Software Foundation, Inc.
+ Copyright (C) 2001-2007, 2009 Free Software Foundation, Inc.
Written by Bruno Haible and Simon Josefsson.
This program is free software: you can redistribute it and/or modify
@@ -23,20 +23,14 @@
#include <iconv.h>
#endif
+#include "iconveh.h"
+
#ifdef __cplusplus
extern "C" {
#endif
-/* Handling of unconvertible characters. */
-enum iconv_ilseq_handler
-{
- iconveh_error, /* return and set errno = EILSEQ */
- iconveh_question_mark, /* use one '?' per unconvertible character */
- iconveh_escape_sequence /* use escape sequence \uxxxx or \Uxxxxxxxx */
-};
-
#if HAVE_ICONV
/* Convert an entire string from one encoding to another, using iconv.
diff --git a/lib/striconveha.h b/lib/striconveha.h
index b6b1df8ab8..5ead5a67b8 100644
--- a/lib/striconveha.h
+++ b/lib/striconveha.h
@@ -1,5 +1,5 @@
/* Character set conversion with error handling and autodetection.
- Copyright (C) 2002, 2005, 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005, 2007-2009 Free Software Foundation, Inc.
Written by Bruno Haible.
This program is free software: you can redistribute it and/or modify
@@ -19,8 +19,9 @@
#define _STRICONVEHA_H
#include <stdbool.h>
+#include <stddef.h>
-#include "striconveh.h"
+#include "iconveh.h"
#ifdef __cplusplus
diff --git a/lib/uniconv.h b/lib/uniconv.h
index ced1327305..4c565ad4f0 100644
--- a/lib/uniconv.h
+++ b/lib/uniconv.h
@@ -23,7 +23,7 @@
#include "unitypes.h"
/* Get enum iconv_ilseq_handler. */
-#include "striconveh.h"
+#include "iconveh.h"
/* Get uniconv_register_autodetect() declaration. */
#include "striconveha.h"
diff --git a/modules/striconveh b/modules/striconveh
index 8578a7f74f..8bdfb34033 100644
--- a/modules/striconveh
+++ b/modules/striconveh
@@ -4,6 +4,7 @@ Character set conversion of strings with error handling, uses iconv.
Files:
lib/striconveh.h
lib/striconveh.c
+lib/iconveh.h
Depends-on:
stdbool
diff --git a/modules/uniconv/base b/modules/uniconv/base
index d0031f1b6c..b5c678657b 100644
--- a/modules/uniconv/base
+++ b/modules/uniconv/base
@@ -3,7 +3,7 @@ Base layer for conversion from/to legacy encodings.
Files:
lib/uniconv.h
-lib/striconveh.h
+lib/iconveh.h
lib/striconveha.h
lib/localcharset.h