Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
_cwchar.h
Go to the documentation of this file.
1// -*- C++ -*-
2
30#ifndef _RWSTD_CWCHAR_H_INCLUDED
31#define _RWSTD_CWCHAR_H_INCLUDED
32
33
34#include <rw/_mbstate.h> // for _RWSTD_MBSTATE_T
35#include <rw/_defs.h>
36
37
39
40
41#ifndef NULL
42# define NULL 0
43#endif // NULL
44
45#ifdef _RWSTD_SIZE_T
46typedef _RWSTD_SIZE_T size_t;
47#else
48typedef unsigned long size_t;
49#endif // _RWSTD_SIZE_T
50
51extern "C" {
52
53// _RWSTD_MBSTATE_T is defined in <rw/_mbstate.h>
54typedef _RWSTD_MBSTATE_T mbstate_t;
55
56struct tm;
57
58#ifndef WCHAR_MIN
59# define WCHAR_MIN _RWSTD_WCHAR_MIN
60#endif // WCHAR_MIN
61
62#ifndef WCHAR_MAX
63# define WCHAR_MAX _RWSTD_WCHAR_MAX
64#endif // WCHAR_MAX
65
66#ifndef WEOF
67# define WEOF _RWSTD_WEOF
68#endif // WEOF
69
70#ifndef _RWSTD_NO_WINT_T
71typedef _RWSTD_WINT_T wint_t;
72#else
73typedef int wint_t;
74#endif // _RWSTD_NO_WINT_T
75
76// declared, not defined (FILE need not be a complete type)
77struct FILE;
78
79int fwprintf (FILE*, const wchar_t*, ...);
80int fwscanf (FILE*, const wchar_t*, ...);
81int wprintf (const wchar_t*, ...);
82int wscanf (const wchar_t*, ...);
83int swprintf (wchar_t*, size_t, const wchar_t*, ...);
84int swscanf (const wchar_t*, const wchar_t*, ...);
85int vfwprintf (FILE*, const wchar_t *format, _RWSTD_VA_LIST);
86int vwprintf (const wchar_t*, _RWSTD_VA_LIST);
87int vswprintf (wchar_t*, size_t, const wchar_t*, _RWSTD_VA_LIST);
88wint_t fgetwc (FILE*);
89wchar_t* fgetws (wchar_t*, int, FILE*);
90wint_t fputwc (wchar_t, FILE*);
91int fputws (const wchar_t*, FILE*);
92wint_t getwc (FILE*);
93wint_t getwchar();
94wint_t putwc (wchar_t, FILE*);
95wint_t putwchar (wchar_t);
96wint_t ungetwc (wint_t, FILE*);
97int fwide (FILE*, int);
98double wcstod (const wchar_t*, wchar_t**);
99long int wcstol (const wchar_t*, wchar_t**, int);
100unsigned long int wcstoul (const wchar_t*, wchar_t**, int);
101wchar_t* wcscpy (wchar_t*, const wchar_t*);
102wchar_t* wcsncpy (wchar_t*, const wchar_t*, size_t);
103wchar_t* wcscat (wchar_t*, const wchar_t*);
104wchar_t* wcsncat (wchar_t*, const wchar_t*, size_t);
105int wcscmp (const wchar_t*, const wchar_t*);
106int wcscoll (const wchar_t*, const wchar_t*);
107int wcsncmp (const wchar_t*, const wchar_t*, size_t);
108size_t wcsxfrm (wchar_t*, const wchar_t*, size_t);
109wchar_t* wcschr (wchar_t*, wchar_t);
110size_t wcscspn (const wchar_t*, const wchar_t*);
111wchar_t* wcspbrk (wchar_t*, const wchar_t*);
112wchar_t* wcsrchr (wchar_t*, wchar_t);
113size_t wcsspn (const wchar_t*, const wchar_t*);
114wchar_t* wcsstr (wchar_t*, const wchar_t*);
115wchar_t* wcstok (wchar_t*, const wchar_t*, wchar_t**);
116size_t wcslen (const wchar_t*);
117wchar_t* wmemchr (wchar_t*, wchar_t, size_t);
118int wmemcmp (const wchar_t*, const wchar_t*, size_t);
119wchar_t* wmemcpy (wchar_t*, const wchar_t*, size_t);
120wchar_t* wmemmove (wchar_t*, const wchar_t*, size_t);
121wchar_t* wmemset (wchar_t*, wchar_t, size_t);
122
123size_t wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*);
124wint_t btowc (int);
125int wctob (wint_t);
126
127int mbsinit (const mbstate_t*);
128size_t mbrlen (const char*, size_t, mbstate_t*);
129size_t mbrtowc (wchar_t*, const char*, size_t, mbstate_t*);
130size_t wcrtomb (char*, wchar_t, mbstate_t*);
131size_t mbsrtowcs (wchar_t*, const char**, size_t, mbstate_t*);
132size_t wcsrtombs (char*, const wchar_t**, size_t, mbstate_t*);
133
134
135} // extern "C"
136
137
138// 21.4, p14 of ISO/IEC 14882:1998
139inline const wchar_t* wcschr (const wchar_t *__s, wchar_t __c)
140{
141 return wcschr (_RWSTD_CONST_CAST (wchar_t*, __s), __c);
142}
143
144
145// 21.4, p16 of ISO/IEC 14882:1998
146inline const wchar_t* wcspbrk (const wchar_t *__s1, const wchar_t *__s2)
147{
148 return wcspbrk (_RWSTD_CONST_CAST (wchar_t*, __s1), __s2);
149}
150
151
152// 21.4, p18 of ISO/IEC 14882:1998
153inline const wchar_t* wcsrchr (const wchar_t *__s, wchar_t __c)
154{
155 return wcsrchr (_RWSTD_CONST_CAST (wchar_t*, __s), __c);
156}
157
158
159// 21.4, p20 of ISO/IEC 14882:1998
160inline const wchar_t* wcsstr (const wchar_t *__s1, const wchar_t *__s2)
161{
162 return wcsstr (_RWSTD_CONST_CAST (wchar_t*, __s1), __s2);
163}
164
165
166// 21.4, p22 of ISO/IEC 14882:1998
167inline const wchar_t* wmemchr (const wchar_t *__p, wchar_t __c, size_t __n)
168{
169 return wmemchr (_RWSTD_CONST_CAST (wchar_t*, __p), __c, __n);
170}
171
172
173} // namespace std
174
175
176#endif // _RWSTD_CWCHAR_H_INCLUDED
#define FILE
#define _RWSTD_NAMESPACE(name)
Definition _defs.h:567
#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
Definition json.h:5363