annotate lib/iconv.in.h @ 14379:2330aac2ae54

maint: adjust cpp indentation to reflect nesting depth I.e., in a block of code that begins with an unnested "#if", put one space between the "#" in column 1 and following token. For example, -#include <sys/vfs.h> +# include <sys/vfs.h> Do this only in .c files that are part of a module I maintain. * lib/linkat.c: Filter through cppi. * lib/nanosleep.c: Likewise. * lib/openat.c: Likewise. * lib/openat-die.c: Likewise. * lib/dup3.c: Likewise. * lib/fchownat.c: Likewise. * lib/flock.c: Likewise. * lib/fsync.c: Likewise. * lib/fts.c: Likewise. * lib/getpass.c: Likewise. * lib/gettimeofday.c: Likewise. * lib/userspec.c: Likewise. * Makefile (sc_cpp_indent_check): New rule, to check this.
author Jim Meyering <meyering@redhat.com>
date Sun, 20 Feb 2011 23:02:43 +0100
parents 97fc9a21a8fb
children 5f709022a256
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9252
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 /* A GNU-like <iconv.h>.
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
2
14079
97fc9a21a8fb maint: update almost all copyright ranges to include 2011
Jim Meyering <meyering@redhat.com>
parents: 13898
diff changeset
3 Copyright (C) 2007-2011 Free Software Foundation, Inc.
9252
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 This program is free software; you can redistribute it and/or modify
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 it under the terms of the GNU General Public License as published by
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 the Free Software Foundation; either version 2, or (at your option)
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8 any later version.
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 This program is distributed in the hope that it will be useful,
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 GNU General Public License for more details.
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15 You should have received a copy of the GNU General Public License
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16 along with this program; if not, write to the Free Software Foundation,
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18
13094
2ed0fc659db8 Emit #pragma system_header after the inclusion guard, not before.
Bruno Haible <bruno@clisp.org>
parents: 13055
diff changeset
19 #ifndef _GL_ICONV_H
2ed0fc659db8 Emit #pragma system_header after the inclusion guard, not before.
Bruno Haible <bruno@clisp.org>
parents: 13055
diff changeset
20
10655
8668b19a7032 Avoid gcc warnings because of #pragma GCC system_header on older gcc.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
21 #if __GNUC__ >= 3
10375
f96e845fc36d Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents: 9341
diff changeset
22 @PRAGMA_SYSTEM_HEADER@
10655
8668b19a7032 Avoid gcc warnings because of #pragma GCC system_header on older gcc.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
23 #endif
13761
a19ace3ba849 Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents: 13094
diff changeset
24 @PRAGMA_COLUMNS@
10375
f96e845fc36d Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents: 9341
diff changeset
25
9252
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
26 /* The include_next requires a split double-inclusion guard. */
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
27 #@INCLUDE_NEXT@ @NEXT_ICONV_H@
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
28
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
29 #ifndef _GL_ICONV_H
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
30 #define _GL_ICONV_H
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
31
12933
c6724931d704 iconv-h: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
32 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
c6724931d704 iconv-h: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
33
12422
f7842310a565 New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents: 12421
diff changeset
34 /* The definition of _GL_ARG_NONNULL is copied here. */
f7842310a565 New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents: 12421
diff changeset
35
12933
c6724931d704 iconv-h: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
36 /* The definition of _GL_WARN_ON_USE is copied here. */
9252
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
37
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
38
13898
9e1ca99d049e iconv-h: Fix test-iconv-h-c++ failure on Solaris 11 2010-11.
Bruno Haible <bruno@clisp.org>
parents: 13761
diff changeset
39 #if @GNULIB_ICONV@
9e1ca99d049e iconv-h: Fix test-iconv-h-c++ failure on Solaris 11 2010-11.
Bruno Haible <bruno@clisp.org>
parents: 13761
diff changeset
40 # if @REPLACE_ICONV_OPEN@
9252
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
41 /* An iconv_open wrapper that supports the IANA standardized encoding names
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
42 ("ISO-8859-1" etc.) as far as possible. */
13898
9e1ca99d049e iconv-h: Fix test-iconv-h-c++ failure on Solaris 11 2010-11.
Bruno Haible <bruno@clisp.org>
parents: 13761
diff changeset
43 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
9e1ca99d049e iconv-h: Fix test-iconv-h-c++ failure on Solaris 11 2010-11.
Bruno Haible <bruno@clisp.org>
parents: 13761
diff changeset
44 # define iconv_open rpl_iconv_open
9e1ca99d049e iconv-h: Fix test-iconv-h-c++ failure on Solaris 11 2010-11.
Bruno Haible <bruno@clisp.org>
parents: 13761
diff changeset
45 # endif
12933
c6724931d704 iconv-h: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
46 _GL_FUNCDECL_RPL (iconv_open, iconv_t,
c6724931d704 iconv-h: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
47 (const char *tocode, const char *fromcode)
c6724931d704 iconv-h: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
48 _GL_ARG_NONNULL ((1, 2)));
c6724931d704 iconv-h: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
49 _GL_CXXALIAS_RPL (iconv_open, iconv_t,
c6724931d704 iconv-h: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
50 (const char *tocode, const char *fromcode));
13898
9e1ca99d049e iconv-h: Fix test-iconv-h-c++ failure on Solaris 11 2010-11.
Bruno Haible <bruno@clisp.org>
parents: 13761
diff changeset
51 # else
12933
c6724931d704 iconv-h: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
52 _GL_CXXALIAS_SYS (iconv_open, iconv_t,
c6724931d704 iconv-h: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
53 (const char *tocode, const char *fromcode));
13898
9e1ca99d049e iconv-h: Fix test-iconv-h-c++ failure on Solaris 11 2010-11.
Bruno Haible <bruno@clisp.org>
parents: 13761
diff changeset
54 # endif
9e1ca99d049e iconv-h: Fix test-iconv-h-c++ failure on Solaris 11 2010-11.
Bruno Haible <bruno@clisp.org>
parents: 13761
diff changeset
55 _GL_CXXALIASWARN (iconv_open);
9252
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
56 #endif
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
57
9341
212d6f041290 New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents: 9252
diff changeset
58 #if @REPLACE_ICONV_UTF@
212d6f041290 New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents: 9252
diff changeset
59 /* Special constants for supporting UTF-{16,32}{BE,LE} encodings.
212d6f041290 New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents: 9252
diff changeset
60 Not public. */
212d6f041290 New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents: 9252
diff changeset
61 # define _ICONV_UTF8_UTF16BE (iconv_t)(-161)
212d6f041290 New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents: 9252
diff changeset
62 # define _ICONV_UTF8_UTF16LE (iconv_t)(-162)
212d6f041290 New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents: 9252
diff changeset
63 # define _ICONV_UTF8_UTF32BE (iconv_t)(-163)
212d6f041290 New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents: 9252
diff changeset
64 # define _ICONV_UTF8_UTF32LE (iconv_t)(-164)
212d6f041290 New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents: 9252
diff changeset
65 # define _ICONV_UTF16BE_UTF8 (iconv_t)(-165)
212d6f041290 New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents: 9252
diff changeset
66 # define _ICONV_UTF16LE_UTF8 (iconv_t)(-166)
212d6f041290 New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents: 9252
diff changeset
67 # define _ICONV_UTF32BE_UTF8 (iconv_t)(-167)
212d6f041290 New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents: 9252
diff changeset
68 # define _ICONV_UTF32LE_UTF8 (iconv_t)(-168)
212d6f041290 New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents: 9252
diff changeset
69 #endif
212d6f041290 New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents: 9252
diff changeset
70
13898
9e1ca99d049e iconv-h: Fix test-iconv-h-c++ failure on Solaris 11 2010-11.
Bruno Haible <bruno@clisp.org>
parents: 13761
diff changeset
71 #if @GNULIB_ICONV@
9e1ca99d049e iconv-h: Fix test-iconv-h-c++ failure on Solaris 11 2010-11.
Bruno Haible <bruno@clisp.org>
parents: 13761
diff changeset
72 # if @REPLACE_ICONV@
9e1ca99d049e iconv-h: Fix test-iconv-h-c++ failure on Solaris 11 2010-11.
Bruno Haible <bruno@clisp.org>
parents: 13761
diff changeset
73 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
9e1ca99d049e iconv-h: Fix test-iconv-h-c++ failure on Solaris 11 2010-11.
Bruno Haible <bruno@clisp.org>
parents: 13761
diff changeset
74 # define iconv rpl_iconv
9e1ca99d049e iconv-h: Fix test-iconv-h-c++ failure on Solaris 11 2010-11.
Bruno Haible <bruno@clisp.org>
parents: 13761
diff changeset
75 # endif
12933
c6724931d704 iconv-h: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
76 _GL_FUNCDECL_RPL (iconv, size_t,
c6724931d704 iconv-h: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
77 (iconv_t cd,
c6724931d704 iconv-h: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
78 @ICONV_CONST@ char **inbuf, size_t *inbytesleft,
c6724931d704 iconv-h: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
79 char **outbuf, size_t *outbytesleft));
c6724931d704 iconv-h: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
80 _GL_CXXALIAS_RPL (iconv, size_t,
c6724931d704 iconv-h: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
81 (iconv_t cd,
c6724931d704 iconv-h: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
82 @ICONV_CONST@ char **inbuf, size_t *inbytesleft,
c6724931d704 iconv-h: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
83 char **outbuf, size_t *outbytesleft));
13898
9e1ca99d049e iconv-h: Fix test-iconv-h-c++ failure on Solaris 11 2010-11.
Bruno Haible <bruno@clisp.org>
parents: 13761
diff changeset
84 # else
12933
c6724931d704 iconv-h: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
85 _GL_CXXALIAS_SYS (iconv, size_t,
c6724931d704 iconv-h: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
86 (iconv_t cd,
c6724931d704 iconv-h: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
87 @ICONV_CONST@ char **inbuf, size_t *inbytesleft,
c6724931d704 iconv-h: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
88 char **outbuf, size_t *outbytesleft));
13898
9e1ca99d049e iconv-h: Fix test-iconv-h-c++ failure on Solaris 11 2010-11.
Bruno Haible <bruno@clisp.org>
parents: 13761
diff changeset
89 # endif
9e1ca99d049e iconv-h: Fix test-iconv-h-c++ failure on Solaris 11 2010-11.
Bruno Haible <bruno@clisp.org>
parents: 13761
diff changeset
90 _GL_CXXALIASWARN (iconv);
9e1ca99d049e iconv-h: Fix test-iconv-h-c++ failure on Solaris 11 2010-11.
Bruno Haible <bruno@clisp.org>
parents: 13761
diff changeset
91 # ifndef ICONV_CONST
9e1ca99d049e iconv-h: Fix test-iconv-h-c++ failure on Solaris 11 2010-11.
Bruno Haible <bruno@clisp.org>
parents: 13761
diff changeset
92 # define ICONV_CONST @ICONV_CONST@
9e1ca99d049e iconv-h: Fix test-iconv-h-c++ failure on Solaris 11 2010-11.
Bruno Haible <bruno@clisp.org>
parents: 13761
diff changeset
93 # endif
9341
212d6f041290 New module 'iconv_open-utf': Enhance iconv_open to support UTF-{16,32}{BE,LE}.
Bruno Haible <bruno@clisp.org>
parents: 9252
diff changeset
94 #endif
9252
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
95
13898
9e1ca99d049e iconv-h: Fix test-iconv-h-c++ failure on Solaris 11 2010-11.
Bruno Haible <bruno@clisp.org>
parents: 13761
diff changeset
96 #if @GNULIB_ICONV@
9e1ca99d049e iconv-h: Fix test-iconv-h-c++ failure on Solaris 11 2010-11.
Bruno Haible <bruno@clisp.org>
parents: 13761
diff changeset
97 # if @REPLACE_ICONV@
9e1ca99d049e iconv-h: Fix test-iconv-h-c++ failure on Solaris 11 2010-11.
Bruno Haible <bruno@clisp.org>
parents: 13761
diff changeset
98 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
9e1ca99d049e iconv-h: Fix test-iconv-h-c++ failure on Solaris 11 2010-11.
Bruno Haible <bruno@clisp.org>
parents: 13761
diff changeset
99 # define iconv_close rpl_iconv_close
9e1ca99d049e iconv-h: Fix test-iconv-h-c++ failure on Solaris 11 2010-11.
Bruno Haible <bruno@clisp.org>
parents: 13761
diff changeset
100 # endif
12933
c6724931d704 iconv-h: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
101 _GL_FUNCDECL_RPL (iconv_close, int, (iconv_t cd));
c6724931d704 iconv-h: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
102 _GL_CXXALIAS_RPL (iconv_close, int, (iconv_t cd));
13898
9e1ca99d049e iconv-h: Fix test-iconv-h-c++ failure on Solaris 11 2010-11.
Bruno Haible <bruno@clisp.org>
parents: 13761
diff changeset
103 # else
12933
c6724931d704 iconv-h: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
104 _GL_CXXALIAS_SYS (iconv_close, int, (iconv_t cd));
13898
9e1ca99d049e iconv-h: Fix test-iconv-h-c++ failure on Solaris 11 2010-11.
Bruno Haible <bruno@clisp.org>
parents: 13761
diff changeset
105 # endif
9e1ca99d049e iconv-h: Fix test-iconv-h-c++ failure on Solaris 11 2010-11.
Bruno Haible <bruno@clisp.org>
parents: 13761
diff changeset
106 _GL_CXXALIASWARN (iconv_close);
9252
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
107 #endif
12933
c6724931d704 iconv-h: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents: 12559
diff changeset
108
9252
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
109
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
110 #endif /* _GL_ICONV_H */
d649a05a81e8 Rename iconv_.h to iconv.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
111 #endif /* _GL_ICONV_H */