mshtml: Print wine_gecko version in load_wine_gecko.
[wine] / include / msvcrt / wchar.h
1 /*
2  * Unicode definitions
3  *
4  * Derived from the mingw header written by Colin Peters.
5  * Modified for Wine use by Jon Griffiths and Francois Gouget.
6  * This file is in the public domain.
7  */
8 #ifndef __WINE_WCHAR_H
9 #define __WINE_WCHAR_H
10 #ifndef __WINE_USE_MSVCRT
11 #define __WINE_USE_MSVCRT
12 #endif
13
14 #include <stdarg.h>
15
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19
20 #ifndef _WCHAR_T_DEFINED
21 #define _WCHAR_T_DEFINED
22 #ifndef __cplusplus
23 typedef unsigned short wchar_t;
24 #endif
25 #endif
26
27 #ifndef NULL
28 #ifdef __cplusplus
29 #define NULL  0
30 #else
31 #define NULL  ((void *)0)
32 #endif
33 #endif
34
35 #define WCHAR_MIN 0
36 #define WCHAR_MAX ((wchar_t)-1)
37
38 #if !defined(_MSC_VER) && !defined(__int64)
39 #define __int64 long long
40 #endif
41
42 #if defined(__x86_64__) && !defined(_WIN64)
43 #define _WIN64
44 #endif
45
46 typedef int mbstate_t;
47
48 #ifndef _SIZE_T_DEFINED
49 #ifdef _WIN64
50 typedef unsigned __int64 size_t;
51 #else
52 typedef unsigned int size_t;
53 #endif
54 #define _SIZE_T_DEFINED
55 #endif
56
57 #ifndef _WCTYPE_T_DEFINED
58 typedef unsigned short  wint_t;
59 typedef unsigned short  wctype_t;
60 #define _WCTYPE_T_DEFINED
61 #endif
62
63 #ifndef WEOF
64 #define WEOF        (wint_t)(0xFFFF)
65 #endif
66
67 #ifndef _FSIZE_T_DEFINED
68 typedef unsigned long _fsize_t;
69 #define _FSIZE_T_DEFINED
70 #endif
71
72 #ifndef _DEV_T_DEFINED
73 typedef unsigned int   _dev_t;
74 #define _DEV_T_DEFINED
75 #endif
76
77 #ifndef _INO_T_DEFINED
78 typedef unsigned short _ino_t;
79 #define _INO_T_DEFINED
80 #endif
81
82 #ifndef _OFF_T_DEFINED
83 typedef int _off_t;
84 #define _OFF_T_DEFINED
85 #endif
86
87 #ifndef _TIME_T_DEFINED
88 typedef long time_t;
89 #define _TIME_T_DEFINED
90 #endif
91
92 #ifndef _TM_DEFINED
93 #define _TM_DEFINED
94 struct tm {
95     int tm_sec;
96     int tm_min;
97     int tm_hour;
98     int tm_mday;
99     int tm_mon;
100     int tm_year;
101     int tm_wday;
102     int tm_yday;
103     int tm_isdst;
104 };
105 #endif /* _TM_DEFINED */
106
107 #ifndef _FILE_DEFINED
108 #define _FILE_DEFINED
109 typedef struct _iobuf
110 {
111   char* _ptr;
112   int   _cnt;
113   char* _base;
114   int   _flag;
115   int   _file;
116   int   _charbuf;
117   int   _bufsiz;
118   char* _tmpfname;
119 } FILE;
120 #endif  /* _FILE_DEFINED */
121
122 #ifndef _WFINDDATA_T_DEFINED
123 #define _WFINDDATA_T_DEFINED
124
125 struct _wfinddata_t {
126   unsigned attrib;
127   time_t time_create;
128   time_t time_access;
129   time_t time_write;
130   _fsize_t size;
131   wchar_t name[260];
132 };
133
134 struct _wfinddatai64_t {
135   unsigned attrib;
136   time_t time_create;
137   time_t time_access;
138   time_t time_write;
139   __int64        size;
140   wchar_t name[260];
141 };
142
143 #endif /* _WFINDDATA_T_DEFINED */
144
145 #ifndef _STAT_DEFINED
146 #define _STAT_DEFINED
147
148 struct _stat {
149   _dev_t st_dev;
150   _ino_t st_ino;
151   unsigned short st_mode;
152   short          st_nlink;
153   short          st_uid;
154   short          st_gid;
155   _dev_t st_rdev;
156   _off_t st_size;
157   time_t st_atime;
158   time_t st_mtime;
159   time_t st_ctime;
160 };
161
162 struct stat {
163   _dev_t st_dev;
164   _ino_t st_ino;
165   unsigned short st_mode;
166   short          st_nlink;
167   short          st_uid;
168   short          st_gid;
169   _dev_t st_rdev;
170   _off_t st_size;
171   time_t st_atime;
172   time_t st_mtime;
173   time_t st_ctime;
174 };
175
176 struct _stati64 {
177   _dev_t st_dev;
178   _ino_t st_ino;
179   unsigned short st_mode;
180   short          st_nlink;
181   short          st_uid;
182   short          st_gid;
183   _dev_t st_rdev;
184   __int64        st_size;
185   time_t st_atime;
186   time_t st_mtime;
187   time_t st_ctime;
188 };
189 #endif /* _STAT_DEFINED */
190
191 /* ASCII char classification table - binary compatible */
192 #define _UPPER        0x0001  /* C1_UPPER */
193 #define _LOWER        0x0002  /* C1_LOWER */
194 #define _DIGIT        0x0004  /* C1_DIGIT */
195 #define _SPACE        0x0008  /* C1_SPACE */
196 #define _PUNCT        0x0010  /* C1_PUNCT */
197 #define _CONTROL      0x0020  /* C1_CNTRL */
198 #define _BLANK        0x0040  /* C1_BLANK */
199 #define _HEX          0x0080  /* C1_XDIGIT */
200 #define _LEADBYTE     0x8000
201 #define _ALPHA       (0x0100|_UPPER|_LOWER)  /* (C1_ALPHA|_UPPER|_LOWER) */
202
203 #ifndef _WCTYPE_DEFINED
204 #define _WCTYPE_DEFINED
205 int is_wctype(wint_t,wctype_t);
206 int isleadbyte(int);
207 int iswalnum(wint_t);
208 int iswalpha(wint_t);
209 int iswascii(wint_t);
210 int iswcntrl(wint_t);
211 int iswctype(wint_t,wctype_t);
212 int iswdigit(wint_t);
213 int iswgraph(wint_t);
214 int iswlower(wint_t);
215 int iswprint(wint_t);
216 int iswpunct(wint_t);
217 int iswspace(wint_t);
218 int iswupper(wint_t);
219 int iswxdigit(wint_t);
220 wchar_t towlower(wchar_t);
221 wchar_t towupper(wchar_t);
222 #endif /* _WCTYPE_DEFINED */
223
224 #ifndef _WDIRECT_DEFINED
225 #define _WDIRECT_DEFINED
226 int              _wchdir(const wchar_t*);
227 wchar_t* _wgetcwd(wchar_t*,int);
228 wchar_t* _wgetdcwd(int,wchar_t*,int);
229 int              _wmkdir(const wchar_t*);
230 int              _wrmdir(const wchar_t*);
231 #endif /* _WDIRECT_DEFINED */
232
233 #ifndef _WIO_DEFINED
234 #define _WIO_DEFINED
235 int         _waccess(const wchar_t*,int);
236 int         _wchmod(const wchar_t*,int);
237 int         _wcreat(const wchar_t*,int);
238 long        _wfindfirst(const wchar_t*,struct _wfinddata_t*);
239 long        _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*);
240 int         _wfindnext(long,struct _wfinddata_t*);
241 int         _wfindnexti64(long, struct _wfinddatai64_t*);
242 wchar_t*_wmktemp(wchar_t*);
243 int         _wopen(const wchar_t*,int,...);
244 int         _wrename(const wchar_t*,const wchar_t*);
245 int         _wsopen(const wchar_t*,int,int,...);
246 int         _wunlink(const wchar_t*);
247 #endif /* _WIO_DEFINED */
248
249 #ifndef _WLOCALE_DEFINED
250 #define _WLOCALE_DEFINED
251 wchar_t* _wsetlocale(int,const wchar_t*);
252 #endif /* _WLOCALE_DEFINED */
253
254 #ifndef _WPROCESS_DEFINED
255 #define _WPROCESS_DEFINED
256 int         _wexecl(const wchar_t*,const wchar_t*,...);
257 int         _wexecle(const wchar_t*,const wchar_t*,...);
258 int         _wexeclp(const wchar_t*,const wchar_t*,...);
259 int         _wexeclpe(const wchar_t*,const wchar_t*,...);
260 int         _wexecv(const wchar_t*,const wchar_t* const *);
261 int         _wexecve(const wchar_t*,const wchar_t* const *,const wchar_t* const *);
262 int         _wexecvp(const wchar_t*,const wchar_t* const *);
263 int         _wexecvpe(const wchar_t*,const wchar_t* const *,const wchar_t* const *);
264 int         _wspawnl(int,const wchar_t*,const wchar_t*,...);
265 int         _wspawnle(int,const wchar_t*,const wchar_t*,...);
266 int         _wspawnlp(int,const wchar_t*,const wchar_t*,...);
267 int         _wspawnlpe(int,const wchar_t*,const wchar_t*,...);
268 int         _wspawnv(int,const wchar_t*,const wchar_t* const *);
269 int         _wspawnve(int,const wchar_t*,const wchar_t* const *,const wchar_t* const *);
270 int         _wspawnvp(int,const wchar_t*,const wchar_t* const *);
271 int         _wspawnvpe(int,const wchar_t*,const wchar_t* const *,const wchar_t* const *);
272 int         _wsystem(const wchar_t*);
273 #endif /* _WPROCESS_DEFINED */
274
275 #ifndef _WSTAT_DEFINED
276 #define _WSTAT_DEFINED
277 int _wstat(const wchar_t*,struct _stat*);
278 int _wstati64(const wchar_t*,struct _stati64*);
279 #endif /* _WSTAT_DEFINED */
280
281 #ifndef _WSTDIO_DEFINED
282 #define _WSTDIO_DEFINED
283 wint_t  _fgetwchar(void);
284 wint_t  _fputwchar(wint_t);
285 wchar_t*_getws(wchar_t*);
286 int             _putws(const wchar_t*);
287 int             _snwprintf(wchar_t*,size_t,const wchar_t*,...);
288 int             _vsnwprintf(wchar_t*,size_t,const wchar_t*,va_list);
289 FILE*   _wfdopen(int,const wchar_t*);
290 FILE*   _wfopen(const wchar_t*,const wchar_t*);
291 FILE*   _wfreopen(const wchar_t*,const wchar_t*,FILE*);
292 FILE*   _wfsopen(const wchar_t*,const wchar_t*,int);
293 void            _wperror(const wchar_t*);
294 FILE*   _wpopen(const wchar_t*,const wchar_t*);
295 int             _wremove(const wchar_t*);
296 wchar_t*_wtempnam(const wchar_t*,const wchar_t*);
297 wchar_t*_wtmpnam(wchar_t*);
298
299 wint_t  fgetwc(FILE*);
300 wchar_t*fgetws(wchar_t*,int,FILE*);
301 wint_t  fputwc(wint_t,FILE*);
302 int             fputws(const wchar_t*,FILE*);
303 int             fwprintf(FILE*,const wchar_t*,...);
304 int             fputws(const wchar_t*,FILE*);
305 int             fwscanf(FILE*,const wchar_t*,...);
306 wint_t  getwc(FILE*);
307 wint_t  getwchar(void);
308 wchar_t*getws(wchar_t*);
309 wint_t  putwc(wint_t,FILE*);
310 wint_t  putwchar(wint_t);
311 int             putws(const wchar_t*);
312 int             swprintf(wchar_t*,const wchar_t*,...);
313 int             swscanf(const wchar_t*,const wchar_t*,...);
314 wint_t  ungetwc(wint_t,FILE*);
315 int             vfwprintf(FILE*,const wchar_t*,va_list);
316 int             vswprintf(wchar_t*,const wchar_t*,va_list);
317 int             vwprintf(const wchar_t*,va_list);
318 int             wprintf(const wchar_t*,...);
319 int             wscanf(const wchar_t*,...);
320 #endif /* _WSTDIO_DEFINED */
321
322 #ifndef _WSTDLIB_DEFINED
323 #define _WSTDLIB_DEFINED
324 wchar_t*_itow(int,wchar_t*,int);
325 wchar_t*_i64tow(__int64,wchar_t*,int);
326 wchar_t*_ltow(long,wchar_t*,int);
327 wchar_t*_ui64tow(unsigned __int64,wchar_t*,int);
328 wchar_t*_ultow(unsigned long,wchar_t*,int);
329 wchar_t*_wfullpath(wchar_t*,const wchar_t*,size_t);
330 wchar_t*_wgetenv(const wchar_t*);
331 void            _wmakepath(wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*);
332 void            _wperror(const wchar_t*);
333 int             _wputenv(const wchar_t*);
334 void            _wsearchenv(const wchar_t*,const wchar_t*,wchar_t*);
335 void            _wsplitpath(const wchar_t*,wchar_t*,wchar_t*,wchar_t*,wchar_t*);
336 int             _wsystem(const wchar_t*);
337 int             _wtoi(const wchar_t*);
338 __int64         _wtoi64(const wchar_t*);
339 long            _wtol(const wchar_t*);
340
341 size_t mbstowcs(wchar_t*,const char*,size_t);
342 int            mbtowc(wchar_t*,const char*,size_t);
343 double         wcstod(const wchar_t*,wchar_t**);
344 long           wcstol(const wchar_t*,wchar_t**,int);
345 size_t wcstombs(char*,const wchar_t*,size_t);
346 unsigned long  wcstoul(const wchar_t*,wchar_t**,int);
347 int            wctomb(char*,wchar_t);
348 #endif /* _WSTDLIB_DEFINED */
349
350 #ifndef _WSTRING_DEFINED
351 #define _WSTRING_DEFINED
352 wchar_t*_wcsdup(const wchar_t*);
353 int             _wcsicmp(const wchar_t*,const wchar_t*);
354 int             _wcsicoll(const wchar_t*,const wchar_t*);
355 wchar_t*_wcslwr(wchar_t*);
356 int             _wcsnicmp(const wchar_t*,const wchar_t*,size_t);
357 wchar_t*_wcsnset(wchar_t*,wchar_t,size_t);
358 wchar_t*_wcsrev(wchar_t*);
359 wchar_t*_wcsset(wchar_t*,wchar_t);
360 wchar_t*_wcsupr(wchar_t*);
361
362 wchar_t*wcscat(wchar_t*,const wchar_t*);
363 wchar_t*wcschr(const wchar_t*,wchar_t);
364 int             wcscmp(const wchar_t*,const wchar_t*);
365 int             wcscoll(const wchar_t*,const wchar_t*);
366 wchar_t*wcscpy(wchar_t*,const wchar_t*);
367 size_t  wcscspn(const wchar_t*,const wchar_t*);
368 size_t  wcslen(const wchar_t*);
369 wchar_t*wcsncat(wchar_t*,const wchar_t*,size_t);
370 int             wcsncmp(const wchar_t*,const wchar_t*,size_t);
371 wchar_t*wcsncpy(wchar_t*,const wchar_t*,size_t);
372 wchar_t*wcspbrk(const wchar_t*,const wchar_t*);
373 wchar_t*wcsrchr(const wchar_t*,wchar_t wcFor);
374 size_t  wcsspn(const wchar_t*,const wchar_t*);
375 wchar_t*wcsstr(const wchar_t*,const wchar_t*);
376 wchar_t*wcstok(wchar_t*,const wchar_t*);
377 size_t  wcsxfrm(wchar_t*,const wchar_t*,size_t);
378 #endif /* _WSTRING_DEFINED */
379
380 #ifndef _WTIME_DEFINED
381 #define _WTIME_DEFINED
382 wchar_t*_wasctime(const struct tm*);
383 size_t  wcsftime(wchar_t*,size_t,const wchar_t*,const struct tm*);
384 wchar_t*_wctime(const time_t*);
385 wchar_t*_wstrdate(wchar_t*);
386 wchar_t*_wstrtime(wchar_t*);
387 #endif /* _WTIME_DEFINED */
388
389 wchar_t btowc(int);
390 size_t  mbrlen(const char *,size_t,mbstate_t*);
391 size_t  mbrtowc(wchar_t*,const char*,size_t,mbstate_t*);
392 size_t  mbsrtowcs(wchar_t*,const char**,size_t,mbstate_t*);
393 size_t  wcrtomb(char*,wchar_t,mbstate_t*);
394 size_t  wcsrtombs(char*,const wchar_t**,size_t,mbstate_t*);
395 int             wctob(wint_t);
396
397 #ifdef __cplusplus
398 }
399 #endif
400
401 #endif /* __WINE_WCHAR_H */