annotate lib/wchar.in.h @ 265:68fbca173508 2.6

Added generated files for release
author lost
date Tue, 22 Dec 2009 05:31:23 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
265
68fbca173508 Added generated files for release
lost
parents:
diff changeset
1 /* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
2
68fbca173508 Added generated files for release
lost
parents:
diff changeset
3 Copyright (C) 2007-2009 Free Software Foundation, Inc.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
4
68fbca173508 Added generated files for release
lost
parents:
diff changeset
5 This program is free software; you can redistribute it and/or modify
68fbca173508 Added generated files for release
lost
parents:
diff changeset
6 it under the terms of the GNU General Public License as published by
68fbca173508 Added generated files for release
lost
parents:
diff changeset
7 the Free Software Foundation; either version 2, or (at your option)
68fbca173508 Added generated files for release
lost
parents:
diff changeset
8 any later version.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
9
68fbca173508 Added generated files for release
lost
parents:
diff changeset
10 This program is distributed in the hope that it will be useful,
68fbca173508 Added generated files for release
lost
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
68fbca173508 Added generated files for release
lost
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
68fbca173508 Added generated files for release
lost
parents:
diff changeset
13 GNU General Public License for more details.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
14
68fbca173508 Added generated files for release
lost
parents:
diff changeset
15 You should have received a copy of the GNU General Public License
68fbca173508 Added generated files for release
lost
parents:
diff changeset
16 along with this program; if not, write to the Free Software Foundation,
68fbca173508 Added generated files for release
lost
parents:
diff changeset
17 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
18
68fbca173508 Added generated files for release
lost
parents:
diff changeset
19 /* Written by Eric Blake. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
20
68fbca173508 Added generated files for release
lost
parents:
diff changeset
21 /*
68fbca173508 Added generated files for release
lost
parents:
diff changeset
22 * ISO C 99 <wchar.h> for platforms that have issues.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
23 * <http://www.opengroup.org/susv3xbd/wchar.h.html>
68fbca173508 Added generated files for release
lost
parents:
diff changeset
24 *
68fbca173508 Added generated files for release
lost
parents:
diff changeset
25 * For now, this just ensures proper prerequisite inclusion order and
68fbca173508 Added generated files for release
lost
parents:
diff changeset
26 * the declaration of wcwidth().
68fbca173508 Added generated files for release
lost
parents:
diff changeset
27 */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
28
68fbca173508 Added generated files for release
lost
parents:
diff changeset
29 #if __GNUC__ >= 3
68fbca173508 Added generated files for release
lost
parents:
diff changeset
30 @PRAGMA_SYSTEM_HEADER@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
31 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
32
68fbca173508 Added generated files for release
lost
parents:
diff changeset
33 #if defined __need_mbstate_t || (defined __hpux && ((defined _INTTYPES_INCLUDED && !defined strtoimax) || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) || defined _GL_ALREADY_INCLUDING_WCHAR_H
68fbca173508 Added generated files for release
lost
parents:
diff changeset
34 /* Special invocation convention:
68fbca173508 Added generated files for release
lost
parents:
diff changeset
35 - Inside uClibc header files.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
36 - On HP-UX 11.00 we have a sequence of nested includes
68fbca173508 Added generated files for release
lost
parents:
diff changeset
37 <wchar.h> -> <stdlib.h> -> <stdint.h>, and the latter includes <wchar.h>,
68fbca173508 Added generated files for release
lost
parents:
diff changeset
38 once indirectly <stdint.h> -> <sys/types.h> -> <inttypes.h> -> <wchar.h>
68fbca173508 Added generated files for release
lost
parents:
diff changeset
39 and once directly. In both situations 'wint_t' is not yet defined,
68fbca173508 Added generated files for release
lost
parents:
diff changeset
40 therefore we cannot provide the function overrides; instead include only
68fbca173508 Added generated files for release
lost
parents:
diff changeset
41 the system's <wchar.h>.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
42 - On IRIX 6.5, similarly, we have an include <wchar.h> -> <wctype.h>, and
68fbca173508 Added generated files for release
lost
parents:
diff changeset
43 the latter includes <wchar.h>. But here, we have no way to detect whether
68fbca173508 Added generated files for release
lost
parents:
diff changeset
44 <wctype.h> is completely included or is still being included. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
45
68fbca173508 Added generated files for release
lost
parents:
diff changeset
46 #@INCLUDE_NEXT@ @NEXT_WCHAR_H@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
47
68fbca173508 Added generated files for release
lost
parents:
diff changeset
48 #else
68fbca173508 Added generated files for release
lost
parents:
diff changeset
49 /* Normal invocation convention. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
50
68fbca173508 Added generated files for release
lost
parents:
diff changeset
51 #ifndef _GL_WCHAR_H
68fbca173508 Added generated files for release
lost
parents:
diff changeset
52
68fbca173508 Added generated files for release
lost
parents:
diff changeset
53 #define _GL_ALREADY_INCLUDING_WCHAR_H
68fbca173508 Added generated files for release
lost
parents:
diff changeset
54
68fbca173508 Added generated files for release
lost
parents:
diff changeset
55 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
68fbca173508 Added generated files for release
lost
parents:
diff changeset
56 <wchar.h>.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
57 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
68fbca173508 Added generated files for release
lost
parents:
diff changeset
58 included before <wchar.h>. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
59 #include <stddef.h>
68fbca173508 Added generated files for release
lost
parents:
diff changeset
60 #include <stdio.h>
68fbca173508 Added generated files for release
lost
parents:
diff changeset
61 #include <time.h>
68fbca173508 Added generated files for release
lost
parents:
diff changeset
62
68fbca173508 Added generated files for release
lost
parents:
diff changeset
63 /* Include the original <wchar.h> if it exists.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
64 Some builds of uClibc lack it. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
65 /* The include_next requires a split double-inclusion guard. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
66 #if @HAVE_WCHAR_H@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
67 # @INCLUDE_NEXT@ @NEXT_WCHAR_H@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
68 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
69
68fbca173508 Added generated files for release
lost
parents:
diff changeset
70 #undef _GL_ALREADY_INCLUDING_WCHAR_H
68fbca173508 Added generated files for release
lost
parents:
diff changeset
71
68fbca173508 Added generated files for release
lost
parents:
diff changeset
72 #ifndef _GL_WCHAR_H
68fbca173508 Added generated files for release
lost
parents:
diff changeset
73 #define _GL_WCHAR_H
68fbca173508 Added generated files for release
lost
parents:
diff changeset
74
68fbca173508 Added generated files for release
lost
parents:
diff changeset
75 /* The definition of GL_LINK_WARNING is copied here. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
76
68fbca173508 Added generated files for release
lost
parents:
diff changeset
77 #ifdef __cplusplus
68fbca173508 Added generated files for release
lost
parents:
diff changeset
78 extern "C" {
68fbca173508 Added generated files for release
lost
parents:
diff changeset
79 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
80
68fbca173508 Added generated files for release
lost
parents:
diff changeset
81
68fbca173508 Added generated files for release
lost
parents:
diff changeset
82 /* Define wint_t. (Also done in wctype.in.h.) */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
83 #if !@HAVE_WINT_T@ && !defined wint_t
68fbca173508 Added generated files for release
lost
parents:
diff changeset
84 # define wint_t int
68fbca173508 Added generated files for release
lost
parents:
diff changeset
85 # ifndef WEOF
68fbca173508 Added generated files for release
lost
parents:
diff changeset
86 # define WEOF -1
68fbca173508 Added generated files for release
lost
parents:
diff changeset
87 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
88 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
89
68fbca173508 Added generated files for release
lost
parents:
diff changeset
90
68fbca173508 Added generated files for release
lost
parents:
diff changeset
91 /* Override mbstate_t if it is too small.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
92 On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for
68fbca173508 Added generated files for release
lost
parents:
diff changeset
93 implementing mbrtowc for encodings like UTF-8. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
94 #if !(@HAVE_MBSINIT@ && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
95 typedef int rpl_mbstate_t;
68fbca173508 Added generated files for release
lost
parents:
diff changeset
96 # undef mbstate_t
68fbca173508 Added generated files for release
lost
parents:
diff changeset
97 # define mbstate_t rpl_mbstate_t
68fbca173508 Added generated files for release
lost
parents:
diff changeset
98 # define GNULIB_defined_mbstate_t 1
68fbca173508 Added generated files for release
lost
parents:
diff changeset
99 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
100
68fbca173508 Added generated files for release
lost
parents:
diff changeset
101
68fbca173508 Added generated files for release
lost
parents:
diff changeset
102 /* Convert a single-byte character to a wide character. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
103 #if @GNULIB_BTOWC@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
104 # if @REPLACE_BTOWC@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
105 # undef btowc
68fbca173508 Added generated files for release
lost
parents:
diff changeset
106 # define btowc rpl_btowc
68fbca173508 Added generated files for release
lost
parents:
diff changeset
107 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
108 # if !@HAVE_BTOWC@ || @REPLACE_BTOWC@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
109 extern wint_t btowc (int c);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
110 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
111 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
112 # undef btowc
68fbca173508 Added generated files for release
lost
parents:
diff changeset
113 # define btowc(c) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
114 (GL_LINK_WARNING ("btowc is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
115 "use gnulib module btowc for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
116 btowc (c))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
117 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
118
68fbca173508 Added generated files for release
lost
parents:
diff changeset
119
68fbca173508 Added generated files for release
lost
parents:
diff changeset
120 /* Convert a wide character to a single-byte character. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
121 #if @GNULIB_WCTOB@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
122 # if @REPLACE_WCTOB@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
123 # undef wctob
68fbca173508 Added generated files for release
lost
parents:
diff changeset
124 # define wctob rpl_wctob
68fbca173508 Added generated files for release
lost
parents:
diff changeset
125 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
126 # if (!defined wctob && !@HAVE_DECL_WCTOB@) || @REPLACE_WCTOB@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
127 /* wctob is provided by gnulib, or wctob exists but is not declared. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
128 extern int wctob (wint_t wc);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
129 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
130 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
131 # undef wctob
68fbca173508 Added generated files for release
lost
parents:
diff changeset
132 # define wctob(w) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
133 (GL_LINK_WARNING ("wctob is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
134 "use gnulib module wctob for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
135 wctob (w))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
136 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
137
68fbca173508 Added generated files for release
lost
parents:
diff changeset
138
68fbca173508 Added generated files for release
lost
parents:
diff changeset
139 /* Test whether *PS is in the initial state. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
140 #if @GNULIB_MBSINIT@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
141 # if @REPLACE_MBSINIT@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
142 # undef mbsinit
68fbca173508 Added generated files for release
lost
parents:
diff changeset
143 # define mbsinit rpl_mbsinit
68fbca173508 Added generated files for release
lost
parents:
diff changeset
144 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
145 # if !@HAVE_MBSINIT@ || @REPLACE_MBSINIT@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
146 extern int mbsinit (const mbstate_t *ps);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
147 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
148 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
149 # undef mbsinit
68fbca173508 Added generated files for release
lost
parents:
diff changeset
150 # define mbsinit(p) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
151 (GL_LINK_WARNING ("mbsinit is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
152 "use gnulib module mbsinit for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
153 mbsinit (p))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
154 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
155
68fbca173508 Added generated files for release
lost
parents:
diff changeset
156
68fbca173508 Added generated files for release
lost
parents:
diff changeset
157 /* Convert a multibyte character to a wide character. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
158 #if @GNULIB_MBRTOWC@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
159 # if @REPLACE_MBRTOWC@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
160 # undef mbrtowc
68fbca173508 Added generated files for release
lost
parents:
diff changeset
161 # define mbrtowc rpl_mbrtowc
68fbca173508 Added generated files for release
lost
parents:
diff changeset
162 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
163 # if !@HAVE_MBRTOWC@ || @REPLACE_MBRTOWC@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
164 extern size_t mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
165 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
166 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
167 # undef mbrtowc
68fbca173508 Added generated files for release
lost
parents:
diff changeset
168 # define mbrtowc(w,s,n,p) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
169 (GL_LINK_WARNING ("mbrtowc is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
170 "use gnulib module mbrtowc for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
171 mbrtowc (w, s, n, p))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
172 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
173
68fbca173508 Added generated files for release
lost
parents:
diff changeset
174
68fbca173508 Added generated files for release
lost
parents:
diff changeset
175 /* Recognize a multibyte character. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
176 #if @GNULIB_MBRLEN@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
177 # if @REPLACE_MBRLEN@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
178 # undef mbrlen
68fbca173508 Added generated files for release
lost
parents:
diff changeset
179 # define mbrlen rpl_mbrlen
68fbca173508 Added generated files for release
lost
parents:
diff changeset
180 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
181 # if !@HAVE_MBRLEN@ || @REPLACE_MBRLEN@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
182 extern size_t mbrlen (const char *s, size_t n, mbstate_t *ps);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
183 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
184 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
185 # undef mbrlen
68fbca173508 Added generated files for release
lost
parents:
diff changeset
186 # define mbrlen(s,n,p) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
187 (GL_LINK_WARNING ("mbrlen is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
188 "use gnulib module mbrlen for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
189 mbrlen (s, n, p))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
190 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
191
68fbca173508 Added generated files for release
lost
parents:
diff changeset
192
68fbca173508 Added generated files for release
lost
parents:
diff changeset
193 /* Convert a string to a wide string. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
194 #if @GNULIB_MBSRTOWCS@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
195 # if @REPLACE_MBSRTOWCS@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
196 # undef mbsrtowcs
68fbca173508 Added generated files for release
lost
parents:
diff changeset
197 # define mbsrtowcs rpl_mbsrtowcs
68fbca173508 Added generated files for release
lost
parents:
diff changeset
198 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
199 # if !@HAVE_MBSRTOWCS@ || @REPLACE_MBSRTOWCS@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
200 extern size_t mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
201 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
202 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
203 # undef mbsrtowcs
68fbca173508 Added generated files for release
lost
parents:
diff changeset
204 # define mbsrtowcs(d,s,l,p) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
205 (GL_LINK_WARNING ("mbsrtowcs is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
206 "use gnulib module mbsrtowcs for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
207 mbsrtowcs (d, s, l, p))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
208 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
209
68fbca173508 Added generated files for release
lost
parents:
diff changeset
210
68fbca173508 Added generated files for release
lost
parents:
diff changeset
211 /* Convert a string to a wide string. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
212 #if @GNULIB_MBSNRTOWCS@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
213 # if @REPLACE_MBSNRTOWCS@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
214 # undef mbsnrtowcs
68fbca173508 Added generated files for release
lost
parents:
diff changeset
215 # define mbsnrtowcs rpl_mbsnrtowcs
68fbca173508 Added generated files for release
lost
parents:
diff changeset
216 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
217 # if !@HAVE_MBSNRTOWCS@ || @REPLACE_MBSNRTOWCS@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
218 extern size_t mbsnrtowcs (wchar_t *dest, const char **srcp, size_t srclen, size_t len, mbstate_t *ps);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
219 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
220 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
221 # undef mbsnrtowcs
68fbca173508 Added generated files for release
lost
parents:
diff changeset
222 # define mbsnrtowcs(d,s,n,l,p) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
223 (GL_LINK_WARNING ("mbsnrtowcs is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
224 "use gnulib module mbsnrtowcs for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
225 mbsnrtowcs (d, s, n, l, p))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
226 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
227
68fbca173508 Added generated files for release
lost
parents:
diff changeset
228
68fbca173508 Added generated files for release
lost
parents:
diff changeset
229 /* Convert a wide character to a multibyte character. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
230 #if @GNULIB_WCRTOMB@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
231 # if @REPLACE_WCRTOMB@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
232 # undef wcrtomb
68fbca173508 Added generated files for release
lost
parents:
diff changeset
233 # define wcrtomb rpl_wcrtomb
68fbca173508 Added generated files for release
lost
parents:
diff changeset
234 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
235 # if !@HAVE_WCRTOMB@ || @REPLACE_WCRTOMB@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
236 extern size_t wcrtomb (char *s, wchar_t wc, mbstate_t *ps);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
237 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
238 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
239 # undef wcrtomb
68fbca173508 Added generated files for release
lost
parents:
diff changeset
240 # define wcrtomb(s,w,p) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
241 (GL_LINK_WARNING ("wcrtomb is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
242 "use gnulib module wcrtomb for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
243 wcrtomb (s, w, p))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
244 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
245
68fbca173508 Added generated files for release
lost
parents:
diff changeset
246
68fbca173508 Added generated files for release
lost
parents:
diff changeset
247 /* Convert a wide string to a string. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
248 #if @GNULIB_WCSRTOMBS@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
249 # if @REPLACE_WCSRTOMBS@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
250 # undef wcsrtombs
68fbca173508 Added generated files for release
lost
parents:
diff changeset
251 # define wcsrtombs rpl_wcsrtombs
68fbca173508 Added generated files for release
lost
parents:
diff changeset
252 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
253 # if !@HAVE_WCSRTOMBS@ || @REPLACE_WCSRTOMBS@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
254 extern size_t wcsrtombs (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
255 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
256 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
257 # undef wcsrtombs
68fbca173508 Added generated files for release
lost
parents:
diff changeset
258 # define wcsrtombs(d,s,l,p) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
259 (GL_LINK_WARNING ("wcsrtombs is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
260 "use gnulib module wcsrtombs for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
261 wcsrtombs (d, s, l, p))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
262 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
263
68fbca173508 Added generated files for release
lost
parents:
diff changeset
264
68fbca173508 Added generated files for release
lost
parents:
diff changeset
265 /* Convert a wide string to a string. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
266 #if @GNULIB_WCSNRTOMBS@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
267 # if !@HAVE_WCSNRTOMBS@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
268 extern size_t wcsnrtombs (char *dest, const wchar_t **srcp, size_t srclen, size_t len, mbstate_t *ps);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
269 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
270 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
271 # undef wcsnrtombs
68fbca173508 Added generated files for release
lost
parents:
diff changeset
272 # define wcsnrtombs(d,s,n,l,p) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
273 (GL_LINK_WARNING ("wcsnrtombs is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
274 "use gnulib module wcsnrtombs for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
275 wcsnrtombs (d, s, n, l, p))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
276 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
277
68fbca173508 Added generated files for release
lost
parents:
diff changeset
278
68fbca173508 Added generated files for release
lost
parents:
diff changeset
279 /* Return the number of screen columns needed for WC. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
280 #if @GNULIB_WCWIDTH@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
281 # if @REPLACE_WCWIDTH@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
282 # undef wcwidth
68fbca173508 Added generated files for release
lost
parents:
diff changeset
283 # define wcwidth rpl_wcwidth
68fbca173508 Added generated files for release
lost
parents:
diff changeset
284 extern int wcwidth (wchar_t);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
285 # else
68fbca173508 Added generated files for release
lost
parents:
diff changeset
286 # if !defined wcwidth && !@HAVE_DECL_WCWIDTH@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
287 /* wcwidth exists but is not declared. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
288 extern int wcwidth (int /* actually wchar_t */);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
289 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
290 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
291 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
292 # undef wcwidth
68fbca173508 Added generated files for release
lost
parents:
diff changeset
293 # define wcwidth(w) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
294 (GL_LINK_WARNING ("wcwidth is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
295 "use gnulib module wcwidth for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
296 wcwidth (w))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
297 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
298
68fbca173508 Added generated files for release
lost
parents:
diff changeset
299
68fbca173508 Added generated files for release
lost
parents:
diff changeset
300 #ifdef __cplusplus
68fbca173508 Added generated files for release
lost
parents:
diff changeset
301 }
68fbca173508 Added generated files for release
lost
parents:
diff changeset
302 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
303
68fbca173508 Added generated files for release
lost
parents:
diff changeset
304 #endif /* _GL_WCHAR_H */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
305 #endif /* _GL_WCHAR_H */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
306 #endif