Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
wchar.h
Go to the documentation of this file.
1
29#include <rw/_defs.h>
30
31#ifndef _RWSTD_NO_DEPRECATED_C_HEADERS
32# ifndef _RWSTD_WCHAR_H_INCLUDED
33# define _RWSTD_WCHAR_H_INCLUDED
34
35# include <cwchar>
36
37# ifndef _RWSTD_NO_NAMESPACE
38
39#ifndef _RWSTD_NO_MBSTATE_T
40using std::mbstate_t;
41#endif
42#ifndef _RWSTD_NO_WINT_T
43using std::wint_t;
44#endif
45using std::size_t;
46#ifndef _RWSTD_NO_BTOWC
47using std::btowc;
48#endif
49#ifndef _RWSTD_NO_FGETWC
50using std::fgetwc;
51#endif
52#ifndef _RWSTD_NO_FGETWS
53using std::fgetws;
54#endif
55#ifndef _RWSTD_NO_FPUTWC
56using std::fputwc;
57#endif
58#ifndef _RWSTD_NO_FPUTWS
59using std::fputws;
60#endif
61#ifndef _RWSTD_NO_FWPRINTF
62using std::fwprintf;
63#endif
64#ifndef _RWSTD_NO_FWSCANF
65using std::fwscanf;
66#endif
67#ifndef _RWSTD_NO_GETWC
68using std::getwc;
69#endif
70#ifndef _RWSTD_NO_GETWCHAR
71using std::getwchar;
72#endif
73#ifndef _RWSTD_NO_MBRLEN
74using std::mbrlen;
75#endif
76#ifndef _RWSTD_NO_MBRTOWC
77using std::mbrtowc;
78#endif
79#ifndef _RWSTD_NO_MBSINIT
80using std::mbsinit;
81#endif
82#ifndef _RWSTD_NO_MBSRTOWCS
83using std::mbsrtowcs;
84#endif
85#ifndef _RWSTD_NO_PUTWC
86using std::putwc;
87#endif
88#ifndef _RWSTD_NO_PUTWCHAR
89using std::putwchar;
90#endif
91#ifndef _RWSTD_NO_SWPRINTF
92using std::swprintf;
93#endif
94#ifndef _RWSTD_NO_SWSCANF
95using std::swscanf;
96#endif
97#ifndef _RWSTD_NO_UNGETWC
98using std::ungetwc;
99#endif
100#ifndef _RWSTD_NO_VFWPRINTF
101using std::vfwprintf;
102#endif
103#ifndef _RWSTD_NO_VWPRINTF
104using std::vwprintf;
105#endif
106#ifndef _RWSTD_NO_WCRTOMB
107using std::wcrtomb;
108#endif
109#ifndef _RWSTD_NO_WCSCAT
110using std::wcscat;
111#endif
112#ifndef _RWSTD_NO_WCSCHR
113using std::wcschr;
114#endif
115#ifndef _RWSTD_NO_WCSCMP
116using std::wcscmp;
117#endif
118#ifndef _RWSTD_NO_WCSCOLL
119using std::wcscoll;
120#endif
121#ifndef _RWSTD_NO_WCSCPY
122using std::wcscpy;
123#endif
124#ifndef _RWSTD_NO_WCSCSPN
125using std::wcscspn;
126#endif
127#ifndef _RWSTD_NO_WCSLEN
128using std::wcslen;
129#endif
130#ifndef _RWSTD_NO_WCSNCAT
131using std::wcsncat;
132#endif
133#ifndef _RWSTD_NO_WCSNCMP
134using std::wcsncmp;
135#endif
136#ifndef _RWSTD_NO_WCSNCPY
137using std::wcsncpy;
138#endif
139#ifndef _RWSTD_NO_WCSPBRK
140using std::wcspbrk;
141#endif
142#ifndef _RWSTD_NO_WCSRCHR
143using std::wcsrchr;
144#endif
145#ifndef _RWSTD_NO_WCSRTOMBS
146using std::wcsrtombs;
147#endif
148#ifndef _RWSTD_NO_WCSSPN
149using std::wcsspn;
150#endif
151#ifndef _RWSTD_NO_WCSSTR
152using std::wcsstr;
153#endif
154#ifndef _RWSTD_NO_WCSTOD
155using std::wcstod;
156#endif
157#ifndef _RWSTD_NO_WCSTOK
158using std::wcstok;
159#endif
160#ifndef _RWSTD_NO_WCSTOL
161using std::wcstol;
162#endif
163#ifndef _RWSTD_NO_WCSTOUL
164using std::wcstoul;
165#endif
166#ifndef _RWSTD_NO_WCSXFRM
167using std::wcsxfrm;
168#endif
169#ifndef _RWSTD_NO_WCTOB
170using std::wctob;
171#endif
172#ifndef _RWSTD_NO_WMEMCHR
173using std::wmemchr;
174#endif
175#ifndef _RWSTD_NO_WMEMCMP
176using std::wmemcmp;
177#endif
178#ifndef _RWSTD_NO_WMEMCPY
179using std::wmemcpy;
180#endif
181#ifndef _RWSTD_NO_WMEMMOVE
182using std::wmemmove;
183#endif
184#ifndef _RWSTD_NO_WMEMSET
185using std::wmemset;
186#endif
187#ifndef _RWSTD_NO_WPRINTF
188using std::wprintf;
189#endif
190#ifndef _RWSTD_NO_WSCANF
191using std::wscanf;
192#endif
193
194# endif // _RWSTD_NO_NAMESPACE
195# endif // _RWSTD_WCHAR_H_INCLUDED
196
197#else // if defined (_RWSTD_NO_DEPRECATED_C_HEADERS)
198
199# include _RWSTD_ANSI_C_WCHAR_H
200
201# include <rw/_mbstate.h>
202
203# ifndef WCHAR_MAX
204# define WCHAR_MAX _RWSTD_WCHAR_MAX
205# endif
206
207# ifndef WCHAR_MIN
208# define WCHAR_MIN _RWSTD_WCHAR_MIN
209# endif
210
211extern "C" {
212
213// add missing declarations for functions known to be defined
214// in the system libc
215
216# if defined (_RWSTD_NO_MBSTATE_T) && defined (_RWSTD_MBSTATE_T)
217typedef _RWSTD_MBSTATE_T mbstate_t;
218# endif // _RWSTD_NO_MBSTATE_T && _RWSTD_MBSTATE_T
219
220# if defined (_RWSTD_NO_FWPRINTF) && !defined (_RWSTD_NO_FWPRINTF_IN_LIBC)
221int fwprintf (FILE*, const wchar_t*, ...);
222# undef _RWSTD_NO_FWPRINTF
223# endif // _RWSTD_NO_FWPRINTF && !_RWSTD_NO_FWPRINTF_IN_LIBC
224
225# if defined (_RWSTD_NO_FWSCANF) && !defined (_RWSTD_NO_FWSCANF_IN_LIBC)
226int fwscanf (FILE*, const wchar_t*, ...);
227# undef _RWSTD_NO_FWSCANF
228# endif // _RWSTD_NO_FWSCANF && !_RWSTD_NO_FWSCANF_IN_LIBC
229
230# if defined (_RWSTD_NO_SWPRINTF) && !defined (_RWSTD_NO_SWPRINTF_IN_LIBC)
231# if !defined (_MSC_VER)
232
233// disabled for MSVC to avoid running into its awful declaration hackery
234int swprintf (wchar_t*, _RWSTD_SIZE_T, const wchar_t*, ...);
235
236# endif // !MSVC
237# undef _RWSTD_NO_SWPRINTF
238# endif // _RWSTD_NO_SWPRINTF && !_RWSTD_NO_SWPRINTF_IN_LIBC
239
240# if defined (_RWSTD_NO_SWSCANF) && !defined (_RWSTD_NO_SWSCANF_IN_LIBC)
241int swscanf (const wchar_t*, const wchar_t*, ...);
242# undef _RWSTD_NO_SWSCANF
243# endif // _RWSTD_NO_SWSCANF && !_RWSTD_NO_SWSCANF_IN_LIBC
244
245# ifdef _RWSTD_VA_LIST
246# if defined (_RWSTD_NO_VFWPRINTF) && !defined (_RWSTD_NO_VFWPRINTF_IN_LIBC)
247int vfwprintf (FILE*, const wchar_t*, _RWSTD_VA_LIST);
248# undef _RWSTD_NO_VFWPRINTF
249# endif // _RWSTD_NO_VFWPRINTF && !_RWSTD_NO_VFWPRINTF_IN_LIBC
250
251# if defined (_RWSTD_NO_VFWSCANF) && !defined (_RWSTD_NO_VFWSCANF_IN_LIBC)
252int vfwscanf (FILE*, const wchar_t*, _RWSTD_VA_LIST);
253# undef _RWSTD_NO_VFWSCANF
254# endif // _RWSTD_NO_VFWSCANF && !_RWSTD_NO_VFWSCANF_IN_LIBC
255
256# if defined (_RWSTD_NO_VWPRINTF) && !defined (_RWSTD_NO_VWPRINTF_IN_LIBC)
257int vwprintf (const wchar_t*, _RWSTD_VA_LIST);
258# undef _RWSTD_NO_VWPRINTF
259# endif // _RWSTD_NO_VWPRINTF && !_RWSTD_NO_VWPRINTF_IN_LIBC
260
261# if defined (_RWSTD_NO_VWSCANF) && !defined (_RWSTD_NO_VWSCANF_IN_LIBC)
262int vwscanf (const wchar_t*, _RWSTD_VA_LIST);
263# undef _RWSTD_NO_VWSCANF
264# endif // _RWSTD_NO_VWSCANF && !_RWSTD_NO_VWSCANF_IN_LIBC
265# endif // _RWSTD_VA_LIST
266
267# if defined (_RWSTD_NO_MBRLEN) && !defined (_RWSTD_NO_MBRLEN_IN_LIBC)
268_RWSTD_SIZE_T mbrlen (const char*, _RWSTD_SIZE_T, _RWSTD_MBSTATE_T*);
269# undef _RWSTD_NO_MBRLEN
270# endif // _RWSTD_NO_MBRLEN && !_RWSTD_NO_MBRLEN_IN_LIBC
271
272# if defined (_RWSTD_NO_MBRTOWC) && !defined (_RWSTD_NO_MBRTOWC_IN_LIBC)
273_RWSTD_SIZE_T mbrtowc (wchar_t*, const char*, _RWSTD_SIZE_T, _RWSTD_MBSTATE_T*);
274# undef _RWSTD_NO_MBRTOWC
275# endif // _RWSTD_NO_MBRTOWC && !_RWSTD_NO_MBRTOWC_IN_LIBC
276
277# if defined (_RWSTD_NO_MBSINIT) && !defined (_RWSTD_NO_MBSINIT_IN_LIBC)
278int mbsinit (const _RWSTD_MBSTATE_T*);
279# undef _RWSTD_NO_MBSINIT
280# endif // _RWSTD_NO_MBSINIT && !_RWSTD_NO_MBSINIT_IN_LIBC
281
282# if defined (_RWSTD_NO_MBSRTOWCS) && !defined (_RWSTD_NO_MBSRTOWCS_IN_LIBC)
283_RWSTD_SIZE_T mbsrtowcs (const wchar_t*, const char**, _RWSTD_SIZE_T,
285# undef _RWSTD_NO_MBSRTOWCS
286# endif // _RWSTD_NO_MBSRTOWCS && !_RWSTD_NO_MBSRTOWCS_IN_LIBC
287
288# if defined (_RWSTD_NO_WCRTOMB) && !defined (_RWSTD_NO_WCRTOMB_IN_LIBC)
289_RWSTD_SIZE_T wcrtomb (char*, wchar_t, _RWSTD_MBSTATE_T*);
290# undef _RWSTD_NO_WCRTOMB
291# endif // _RWSTD_NO_WCRTOMB && !_RWSTD_NO_WCRTOMB_IN_LIBC
292
293# if defined (_RWSTD_NO_WCSRTOMBS) && !defined (_RWSTD_NO_WCSRTOMBS_IN_LIBC)
294_RWSTD_SIZE_T wcsrtombs (char*, const char**, _RWSTD_SIZE_T,
296# undef _RWSTD_NO_WCSRTOMBS
297# endif // _RWSTD_NO_WCSRTOMBS && !_RWSTD_NO_WCSRTOMBS_IN_LIBC
298
299
300# if defined (_RWSTD_NO_WCSCHR) && !defined (_RWSTD_NO_WCSCHR_IN_LIBC)
301
302wchar_t* wcschr (wchar_t*, wchar_t);
303
304} // extern "C"
305
306inline const wchar_t*
307wcschr (const wchar_t *__s, wchar_t __c)
308{
309 return wcschr (_RWSTD_CONST_CAST (wchar_t*, __s), __c);
310}
311
312extern "C" {
313
314# undef _RWSTD_NO_WCSCHR
315# endif // _RWSTD_NO_WCSCHR && !_RWSTD_NO_WCSCHR_IN_LIBC
316
317
318# if defined (_RWSTD_NO_WCSRCHR) && !defined (_RWSTD_NO_WCSRCHR_IN_LIBC)
319
320wchar_t* wcsrchr (wchar_t*, wchar_t);
321
322} // extern "C"
323
324inline const wchar_t*
325wcsrchr (const wchar_t *__s, wchar_t __c)
326{
327 return wcsrchr (_RWSTD_CONST_CAST (wchar_t*, __s), __c);
328}
329
330extern "C" {
331
332# undef _RWSTD_NO_WCSCHR
333# endif // _RWSTD_NO_WCSCHR && !_RWSTD_NO_WCSCHR_IN_LIBC
334
335
336# if defined (_RWSTD_NO_WCSSTR) && !defined (_RWSTD_NO_WCSSTR_IN_LIBC)
337
338wchar_t* wcsstr (wchar_t*, const wchar_t*);
339
340} // extern "C"
341
342inline const wchar_t*
343wcsstr (const wchar_t *__s1, const wchar_t *__s2)
344{
345 return wcsstr (_RWSTD_CONST_CAST (wchar_t*, __s1), __s2);
346}
347
348extern "C" {
349
350# undef _RWSTD_NO_WCSSTR
351# endif // _RWSTD_NO_WCSSTR && !_RWSTD_NO_WCSSTR_IN_LIBC
352
353
354# if defined (_RWSTD_NO_WMEMCHR) && !defined (_RWSTD_NO_WMEMCHR_IN_LIBC)
355
356wchar_t* wmemchr (wchar_t*, wchar_t, _RWSTD_SIZE_T);
357
358} // extern "C"
359
360inline const wchar_t*
361wmemchr (const wchar_t *__s, wchar_t __c, _RWSTD_SIZE_T __n)
362{
363 return wmemchr (_RWSTD_CONST_CAST (wchar_t*, __s), __c, __n);
364}
365
366extern "C" {
367
368# undef _RWSTD_NO_WMEMCHR
369# endif // _RWSTD_NO_WMEMCHR && !_RWSTD_NO_WMEMCHR_IN_LIBC
370
371
372# if defined (_RWSTD_NO_WMEMCMP) && !defined (_RWSTD_NO_WMEMCMP_IN_LIBC)
373int wmemcmp (const wchar_t*, const wchar_t*, _RWSTD_SIZE_T);
374# undef _RWSTD_NO_WMEMCMP
375# endif // _RWSTD_NO_WMEMCMP && !_RWSTD_NO_WMEMCMP_IN_LIBC
376
377# if defined (_RWSTD_NO_WMEMCPY) && !defined (_RWSTD_NO_WMEMCPY_IN_LIBC)
378wchar_t* wmemcpy (wchar_t*, const wchar_t*, _RWSTD_SIZE_T);
379# undef _RWSTD_NO_WMEMCPY
380# endif // _RWSTD_NO_WMEMCPY && !_RWSTD_NO_WMEMCPY_IN_LIBC
381
382# if defined (_RWSTD_NO_WMEMMOVE) && !defined (_RWSTD_NO_WMEMMOVE_IN_LIBC)
383wchar_t* wmemmove (wchar_t*, const wchar_t*, _RWSTD_SIZE_T);
384# undef _RWSTD_NO_WMEMMOVE
385# endif // _RWSTD_NO_WMEMMOVE && !_RWSTD_NO_WMEMMOVE_IN_LIBC
386
387# if defined (_RWSTD_NO_WMEMSET) && !defined (_RWSTD_NO_WMEMSET_IN_LIBC)
388wchar_t* wmemset (wchar_t*, wchar_t, _RWSTD_SIZE_T);
389# undef _RWSTD_NO_WMEMSET
390# endif // _RWSTD_NO_WMEMSET && !_RWSTD_NO_WMEMSET_IN_LIBC
391
392
393# if defined (_RWSTD_NO_WPRINTF) && !defined (_RWSTD_NO_WPRINTF_IN_LIBC)
394int wprintf (const wchar_t*, ...);
395# undef _RWSTD_NO_WPRINTF
396# endif // _RWSTD_NO_WPRINTF && !_RWSTD_NO_WPRINTF_IN_LIBC
397
398# if defined (_RWSTD_NO_WSCANF) && !defined (_RWSTD_NO_WSCANF_IN_LIBC)
399int wscanf (const wchar_t*, ...);
400# undef _RWSTD_NO_WSCANF
401# endif // _RWSTD_NO_WSCANF && !_RWSTD_NO_WSCANF_IN_LIBC
402
403# if defined (_RWSTD_NO_WCTOB) && !defined (_RWSTD_NO_WCTOB_IN_LIBC)
404int wctob (_RWSTD_WINT_T);
405# undef _RWSTD_NO_WCTOB
406# endif // _RWSTD_NO_WCTOB && !_RWSTD_NO_WCTOB_IN_LIBC
407
408} // extern "C"
409
410#endif // _RWSTD_NO_DEPRECATED_C_HEADERS
#define FILE
#define _RWSTD_CONST_CAST(T, x)
Definition _defs.h:536
#define _RWSTD_WINT_T
Definition _defs.h:1266
#define _RWSTD_MBSTATE_T
Definition _mbstate.h:199