Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4680 | right-hear | 1 | // -*- C++ -*- header wrapper. |
2 | |||
3 | // Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
||
4 | // |
||
5 | // This file is part of the GNU ISO C++ Library. This library is free |
||
6 | // software; you can redistribute it and/or modify it under the |
||
7 | // terms of the GNU General Public License as published by the |
||
8 | // Free Software Foundation; either version 2, or (at your option) |
||
9 | // any later version. |
||
10 | |||
11 | // This library is distributed in the hope that it will be useful, |
||
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
14 | // GNU General Public License for more details. |
||
15 | |||
16 | // You should have received a copy of the GNU General Public License along |
||
17 | // with this library; see the file COPYING. If not, write to the Free |
||
18 | // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
||
19 | // USA. |
||
20 | |||
21 | // As a special exception, you may use this file as part of a free software |
||
22 | // library without restriction. Specifically, if other files instantiate |
||
23 | // templates or use macros or inline functions from this file, or you compile |
||
24 | // this file and link it with other files to produce an executable, this |
||
25 | // file does not by itself cause the resulting executable to be covered by |
||
26 | // the GNU General Public License. This exception does not however |
||
27 | // invalidate any other reasons why the executable file might be covered by |
||
28 | // the GNU General Public License. |
||
29 | |||
30 | // |
||
31 | // ISO C++ 14882: 21 |
||
32 | |||
33 | #ifndef _CPP_CWCHAR |
||
34 | # define _CPP_CWCHAR 1 |
||
35 | # include |
||
36 | |||
37 | namespace _C_legacy { |
||
38 | extern "C" { |
||
39 | # define _IN_C_LEGACY_ |
||
40 | # pragma GCC system_header |
||
41 | # include_next |
||
42 | } |
||
43 | |||
44 | #if 0 |
||
45 | // XXX |
||
46 | inline int |
||
47 | fwprintf(FILE* __stream, const wchar_t* __format, ...); |
||
48 | |||
49 | inline int |
||
50 | fwscanf(FILE* __stream, const wchar_t* __format, ...); |
||
51 | |||
52 | inline int |
||
53 | vfwprintf(FILE* __stream, const wchar_t* __format, va_list __arg); |
||
54 | |||
55 | inline int |
||
56 | vfwscanf(FILE* __stream, const wchar_t* __format, va_list __arg); |
||
57 | |||
58 | inline wint_t |
||
59 | _CPP_fgetwc_capture(FILE* __stream) |
||
60 | { return fgetwc(__stream); } |
||
61 | |||
62 | inline wchar_t* |
||
63 | _CPP_fgetws_capture(wchar_t* __s, int __n, FILE* __stream) |
||
64 | { return fgetws(__s, __n, __stream); } |
||
65 | |||
66 | inline wint_t |
||
67 | _CPP_fputwc_capture(wchar_t __c, FILE* __stream) |
||
68 | { return fputwc(__c, __stream); } |
||
69 | |||
70 | inline int |
||
71 | _CPP_fputws_capture(const wchar_t* __s, FILE* __stream) |
||
72 | { return fputws(__s, __stream); } |
||
73 | |||
74 | inline int |
||
75 | _CPP_fwide_capture(FILE* __stream, int __mode) |
||
76 | { return fwide(__stream, __mode); } |
||
77 | |||
78 | inline wint_t |
||
79 | _CPP_fgetwc_capture(FILE* __stream) |
||
80 | { return fgetwc(__stream); } |
||
81 | |||
82 | inline wint_t |
||
83 | _CPP_putwc_capture(wchar_t __c, FILE* __stream) |
||
84 | { return putwc(__c, __stream); } |
||
85 | |||
86 | inline wint_t |
||
87 | _CPP_ungetwc_capture(wint_t __c, FILE* __stream) |
||
88 | { return ungetwc(__c, __stream); } |
||
89 | #endif |
||
90 | } // namespace _C_legacy |
||
91 | |||
92 | # undef wchar_t |
||
93 | # undef wint_t |
||
94 | # undef mbstate_t |
||
95 | |||
96 | # undef fwprintf |
||
97 | # undef fwscanf |
||
98 | # undef swprintf |
||
99 | # undef swscanf |
||
100 | # undef vfwprintf |
||
101 | # undef vfwscanf |
||
102 | # undef vswprintf |
||
103 | # undef vswscanf |
||
104 | # undef vwprintf |
||
105 | # undef vwscanf |
||
106 | # undef wprintf |
||
107 | # undef wscanf |
||
108 | # undef fgetwc |
||
109 | # undef fgetws |
||
110 | # undef fputwc |
||
111 | # undef fputws |
||
112 | # undef fwide |
||
113 | # undef getwc |
||
114 | # undef getwchar |
||
115 | # undef putwc |
||
116 | # undef putwchar |
||
117 | # undef ungetwc |
||
118 | # undef wcstod |
||
119 | # undef wcstof |
||
120 | # undef wcstold |
||
121 | # undef wcstol |
||
122 | # undef wcstoll |
||
123 | # undef wcstoul |
||
124 | # undef wcstoull |
||
125 | # undef wcscpy |
||
126 | # undef wcsncpy |
||
127 | # undef wcscat |
||
128 | # undef wcsncat |
||
129 | # undef wcsmp |
||
130 | # undef wcscoll |
||
131 | # undef wcsncmp |
||
132 | # undef wcsxfrm |
||
133 | # undef wcschr |
||
134 | # undef wcscspn |
||
135 | # undef wcslen |
||
136 | # undef wcspbrk |
||
137 | # undef wcsrchr |
||
138 | # undef wcsspn |
||
139 | # undef wcsstr |
||
140 | # undef wcstok |
||
141 | # undef wmemchr |
||
142 | # undef wmemcmp |
||
143 | # undef wmemcpy |
||
144 | # undef wmemmove |
||
145 | # undef wmemset |
||
146 | # undef wcsftime |
||
147 | # undef btowc |
||
148 | # undef wctob |
||
149 | # undef mbsinit |
||
150 | # undef mbrlen |
||
151 | # undef mbrtowc |
||
152 | # undef wcrtomb |
||
153 | # undef mbsrtowcs |
||
154 | # undef wcsrtombs |
||
155 | |||
156 | namespace std { |
||
157 | |||
158 | using _C_legacy::wint_t; |
||
159 | using _C_legacy::mbstate_t; |
||
160 | |||
161 | #if 0 |
||
162 | using _C_legacy::swprintf; |
||
163 | using _C_legacy::swscanf; |
||
164 | using _C_legacy::vswprintf; |
||
165 | using _C_legacy::vswscanf; |
||
166 | using _C_legacy::vwprintf; |
||
167 | using _C_legacy::vwscanf; |
||
168 | using _C_legacy::wprintf; |
||
169 | using _C_legacy::wscanf; |
||
170 | using _C_legacy::getwchar; |
||
171 | using _C_legacy::putwchar; |
||
172 | #endif |
||
173 | |||
174 | using _C_legacy::wcstod; |
||
175 | using _C_legacy::wcstof; |
||
176 | using _C_legacy::wcstold; |
||
177 | using _C_legacy::wcstol; |
||
178 | using _C_legacy::wcstoll; |
||
179 | using _C_legacy::wcstoul; |
||
180 | using _C_legacy::wcstoull; |
||
181 | using _C_legacy::wcscpy; |
||
182 | using _C_legacy::wcsncpy; |
||
183 | using _C_legacy::wcscat; |
||
184 | using _C_legacy::wcsncat; |
||
185 | |||
186 | #if 0 |
||
187 | using _C_legacy::wcsmp; |
||
188 | #endif |
||
189 | |||
190 | using _C_legacy::wcscoll; |
||
191 | using _C_legacy::wcsncmp; |
||
192 | using _C_legacy::wcsxfrm; |
||
193 | using _C_legacy::wcschr; |
||
194 | using _C_legacy::wcscspn; |
||
195 | using _C_legacy::wcslen; |
||
196 | using _C_legacy::wcspbrk; |
||
197 | using _C_legacy::wcsrchr; |
||
198 | using _C_legacy::wcsspn; |
||
199 | using _C_legacy::wcsstr; |
||
200 | using _C_legacy::wcstok; |
||
201 | using _C_legacy::wmemchr; |
||
202 | using _C_legacy::wmemcmp; |
||
203 | using _C_legacy::wmemcpy; |
||
204 | using _C_legacy::wmemmove; |
||
205 | using _C_legacy::wmemset; |
||
206 | |||
207 | #if 0 |
||
208 | using _C_legacy::wcsftime; |
||
209 | #endif |
||
210 | |||
211 | using _C_legacy::btowc; |
||
212 | using _C_legacy::wctob; |
||
213 | using _C_legacy::mbsinit; |
||
214 | using _C_legacy::mbrlen; |
||
215 | using _C_legacy::mbrtowc; |
||
216 | using _C_legacy::wcrtomb; |
||
217 | using _C_legacy::mbsrtowcs; |
||
218 | using _C_legacy::wcsrtombs; |
||
219 | |||
220 | #if 0 |
||
221 | // XXX |
||
222 | inline int |
||
223 | fwprintf(FILE* __stream, const wchar_t* __format, ...); |
||
224 | |||
225 | inline int |
||
226 | fwscanf(FILE* __stream, const wchar_t* __format, ...); |
||
227 | |||
228 | inline int |
||
229 | vfwprintf(FILE* __stream, const wchar_t* __format, va_list __arg); |
||
230 | |||
231 | inline int |
||
232 | vfwscanf(FILE* __stream, const wchar_t* __format, va_list __arg); |
||
233 | |||
234 | inline wint_t |
||
235 | fgetwc(FILE* __stream) |
||
236 | { return _C_legacy::_CPP_fgetwc_capture(__stream); } |
||
237 | |||
238 | inline wchar_t* |
||
239 | fgetws(wchar_t* __s, int __n, FILE* __stream) |
||
240 | { return _C_legacy::_CPP_fgetws_capture(__s, __n, __stream); } |
||
241 | |||
242 | inline wint_t |
||
243 | fputwc(wchar_t __c, FILE* __stream) |
||
244 | { return _C_legacy::_CPP_fputwc_capture(__c, __stream); } |
||
245 | |||
246 | inline int |
||
247 | fputws(const wchar_t* __s, FILE* __stream) |
||
248 | { return _C_legacy::_CPP_fputws_capture(__s, __stream); } |
||
249 | |||
250 | inline int |
||
251 | fwide(FILE* __stream, int __mode) |
||
252 | { return _C_legacy::_CPP_fwide_capture(__stream, __mode); } |
||
253 | |||
254 | inline wint_t |
||
255 | getwc(FILE* __stream) |
||
256 | { return _C_legacy::_CPP_getwc_capture(__stream); } |
||
257 | |||
258 | inline wint_t |
||
259 | putwc(wchar_t __c, FILE* __stream) |
||
260 | { return _C_legacy::_CPP_putwc_capture(__c, __stream); } |
||
261 | |||
262 | inline wint_t |
||
263 | ungetwc(wint_t __c, FILE* __stream) |
||
264 | { return _C_legacy::_CPP_ungetwc_capture(__c, __stream); } |
||
265 | #endif |
||
266 | } |
||
267 | |||
268 | # undef _IN_C_LEGACY_ |
||
269 | |||
270 | #endif |
||
271 |