[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
new file iconveh.h
From: |
Bruno Haible |
Subject: |
new file iconveh.h |
Date: |
Sat, 11 Apr 2009 00:04:11 +0200 |
User-agent: |
KMail/1.9.9 |
For the libunistring library, it's beneficial to have the definition of the
type 'enum iconv_ilseq_handler' in an include file of its own. I'm applying
this:
2009-04-10 Bruno Haible <address@hidden>
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.
================================ lib/iconveh.h ================================
/* 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 */
===============================================================================
--- lib/striconveh.h.orig 2009-04-11 00:00:39.000000000 +0200
+++ lib/striconveh.h 2009-04-10 23:33:01.000000000 +0200
@@ -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.
--- lib/striconveha.h.orig 2009-04-11 00:00:39.000000000 +0200
+++ lib/striconveha.h 2009-04-10 23:47:49.000000000 +0200
@@ -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
--- lib/uniconv.h.orig 2009-04-11 00:00:39.000000000 +0200
+++ lib/uniconv.h 2009-04-10 23:40:31.000000000 +0200
@@ -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"
--- modules/striconveh.orig 2009-04-11 00:00:39.000000000 +0200
+++ modules/striconveh 2009-04-10 23:33:10.000000000 +0200
@@ -4,6 +4,7 @@
Files:
lib/striconveh.h
lib/striconveh.c
+lib/iconveh.h
Depends-on:
stdbool
--- modules/uniconv/base.orig 2009-04-11 00:00:39.000000000 +0200
+++ modules/uniconv/base 2009-04-10 23:59:21.000000000 +0200
@@ -3,7 +3,7 @@
Files:
lib/uniconv.h
-lib/striconveh.h
+lib/iconveh.h
lib/striconveha.h
lib/localcharset.h
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- new file iconveh.h,
Bruno Haible <=