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