Mercurial > gnulib
annotate lib/uniconv/u8-strconv-from-enc.c @ 40057:b06060465f09
maint: Run 'make update-copyright'
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Tue, 01 Jan 2019 00:25:11 +0100 |
parents | 10eb9086bea0 |
children |
rev | line source |
---|---|
7954
95418453deed
New module 'uniconv/u8-strconv-from-enc'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
1 /* Conversion to UTF-8 from legacy encodings. |
40057
b06060465f09
maint: Run 'make update-copyright'
Paul Eggert <eggert@cs.ucla.edu>
parents:
19484
diff
changeset
|
2 Copyright (C) 2002, 2006-2007, 2009-2019 Free Software Foundation, Inc. |
7954
95418453deed
New module 'uniconv/u8-strconv-from-enc'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
3 |
9307
ad8a75a45dc9
Change copyright notice from LGPLv2.0+ to LGPLv3+.
Bruno Haible <bruno@clisp.org>
parents:
7954
diff
changeset
|
4 This program is free software: you can redistribute it and/or modify it |
ad8a75a45dc9
Change copyright notice from LGPLv2.0+ to LGPLv3+.
Bruno Haible <bruno@clisp.org>
parents:
7954
diff
changeset
|
5 under the terms of the GNU Lesser General Public License as published |
ad8a75a45dc9
Change copyright notice from LGPLv2.0+ to LGPLv3+.
Bruno Haible <bruno@clisp.org>
parents:
7954
diff
changeset
|
6 by the Free Software Foundation; either version 3 of the License, or |
ad8a75a45dc9
Change copyright notice from LGPLv2.0+ to LGPLv3+.
Bruno Haible <bruno@clisp.org>
parents:
7954
diff
changeset
|
7 (at your option) any later version. |
7954
95418453deed
New module 'uniconv/u8-strconv-from-enc'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
8 |
95418453deed
New module 'uniconv/u8-strconv-from-enc'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
9 This program is distributed in the hope that it will be useful, |
95418453deed
New module 'uniconv/u8-strconv-from-enc'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
10 but WITHOUT ANY WARRANTY; without even the implied warranty of |
95418453deed
New module 'uniconv/u8-strconv-from-enc'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
9307
ad8a75a45dc9
Change copyright notice from LGPLv2.0+ to LGPLv3+.
Bruno Haible <bruno@clisp.org>
parents:
7954
diff
changeset
|
12 Lesser General Public License for more details. |
7954
95418453deed
New module 'uniconv/u8-strconv-from-enc'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
13 |
9307
ad8a75a45dc9
Change copyright notice from LGPLv2.0+ to LGPLv3+.
Bruno Haible <bruno@clisp.org>
parents:
7954
diff
changeset
|
14 You should have received a copy of the GNU Lesser General Public License |
19190 | 15 along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
7954
95418453deed
New module 'uniconv/u8-strconv-from-enc'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
16 |
95418453deed
New module 'uniconv/u8-strconv-from-enc'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
17 /* Written by Bruno Haible <bruno@clisp.org>. */ |
95418453deed
New module 'uniconv/u8-strconv-from-enc'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
18 |
95418453deed
New module 'uniconv/u8-strconv-from-enc'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
19 #include <config.h> |
95418453deed
New module 'uniconv/u8-strconv-from-enc'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
20 |
95418453deed
New module 'uniconv/u8-strconv-from-enc'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
21 /* Specification. */ |
95418453deed
New module 'uniconv/u8-strconv-from-enc'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
22 #include "uniconv.h" |
95418453deed
New module 'uniconv/u8-strconv-from-enc'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
23 |
95418453deed
New module 'uniconv/u8-strconv-from-enc'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
24 #include <errno.h> |
95418453deed
New module 'uniconv/u8-strconv-from-enc'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
25 #include <stdlib.h> |
95418453deed
New module 'uniconv/u8-strconv-from-enc'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
26 #include <string.h> |
95418453deed
New module 'uniconv/u8-strconv-from-enc'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
27 |
95418453deed
New module 'uniconv/u8-strconv-from-enc'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
28 #include "unistr.h" |
95418453deed
New module 'uniconv/u8-strconv-from-enc'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
29 |
95418453deed
New module 'uniconv/u8-strconv-from-enc'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
30 #define FUNC u8_strconv_from_encoding |
95418453deed
New module 'uniconv/u8-strconv-from-enc'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
31 #define UNIT uint8_t |
95418453deed
New module 'uniconv/u8-strconv-from-enc'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
32 #define U_CONV_FROM_ENCODING u8_conv_from_encoding |
95418453deed
New module 'uniconv/u8-strconv-from-enc'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
33 #define U_STRLEN u8_strlen |
95418453deed
New module 'uniconv/u8-strconv-from-enc'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
34 #include "u-strconv-from-enc.h" |