wined3d: Get resource info from the texture in surface_set_compatible_renderbuffer().
[wine.git] / include / msvcrt / wchar.h
blob702fa6725dee03de8c9160a9f8d970ca5c58c88c
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
11 #include <crtdefs.h>
12 #include <stdarg.h>
14 #include <pshpack8.h>
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
20 #ifndef NULL
21 #ifdef __cplusplus
22 #define NULL 0
23 #else
24 #define NULL ((void *)0)
25 #endif
26 #endif
28 #define WCHAR_MIN 0
29 #define WCHAR_MAX ((wchar_t)-1)
31 #ifndef DECLSPEC_ALIGN
32 # if defined(_MSC_VER) && (_MSC_VER >= 1300) && !defined(MIDL_PASS)
33 # define DECLSPEC_ALIGN(x) __declspec(align(x))
34 # elif defined(__GNUC__)
35 # define DECLSPEC_ALIGN(x) __attribute__((aligned(x)))
36 # else
37 # define DECLSPEC_ALIGN(x)
38 # endif
39 #endif
41 typedef int mbstate_t;
43 #ifndef WEOF
44 #define WEOF (wint_t)(0xFFFF)
45 #endif
47 #ifndef _FSIZE_T_DEFINED
48 typedef __msvcrt_ulong _fsize_t;
49 #define _FSIZE_T_DEFINED
50 #endif
52 #ifndef _DEV_T_DEFINED
53 typedef unsigned int _dev_t;
54 #define _DEV_T_DEFINED
55 #endif
57 #ifndef _INO_T_DEFINED
58 typedef unsigned short _ino_t;
59 #define _INO_T_DEFINED
60 #endif
62 #ifndef _OFF_T_DEFINED
63 typedef int _off_t;
64 #define _OFF_T_DEFINED
65 #endif
67 #ifndef _TM_DEFINED
68 #define _TM_DEFINED
69 struct tm {
70 int tm_sec;
71 int tm_min;
72 int tm_hour;
73 int tm_mday;
74 int tm_mon;
75 int tm_year;
76 int tm_wday;
77 int tm_yday;
78 int tm_isdst;
80 #endif /* _TM_DEFINED */
82 #ifndef _FILE_DEFINED
83 #define _FILE_DEFINED
84 typedef struct _iobuf
86 char* _ptr;
87 int _cnt;
88 char* _base;
89 int _flag;
90 int _file;
91 int _charbuf;
92 int _bufsiz;
93 char* _tmpfname;
94 } FILE;
95 #endif /* _FILE_DEFINED */
97 #ifndef _WFINDDATA_T_DEFINED
98 #define _WFINDDATA_T_DEFINED
100 struct _wfinddata_t {
101 unsigned attrib;
102 time_t time_create;
103 time_t time_access;
104 time_t time_write;
105 _fsize_t size;
106 wchar_t name[260];
109 struct _wfinddatai64_t {
110 unsigned attrib;
111 time_t time_create;
112 time_t time_access;
113 time_t time_write;
114 __int64 DECLSPEC_ALIGN(8) size;
115 wchar_t name[260];
118 #endif /* _WFINDDATA_T_DEFINED */
120 #ifndef _STAT_DEFINED
121 #define _STAT_DEFINED
123 struct _stat {
124 _dev_t st_dev;
125 _ino_t st_ino;
126 unsigned short st_mode;
127 short st_nlink;
128 short st_uid;
129 short st_gid;
130 _dev_t st_rdev;
131 _off_t st_size;
132 time_t st_atime;
133 time_t st_mtime;
134 time_t st_ctime;
137 struct stat {
138 _dev_t st_dev;
139 _ino_t st_ino;
140 unsigned short st_mode;
141 short st_nlink;
142 short st_uid;
143 short st_gid;
144 _dev_t st_rdev;
145 _off_t st_size;
146 time_t st_atime;
147 time_t st_mtime;
148 time_t st_ctime;
151 struct _stat32 {
152 _dev_t st_dev;
153 _ino_t st_ino;
154 unsigned short st_mode;
155 short st_nlink;
156 short st_uid;
157 short st_gid;
158 _dev_t st_rdev;
159 _off_t st_size;
160 __time32_t st_atime;
161 __time32_t st_mtime;
162 __time32_t st_ctime;
165 struct _stat32i64 {
166 _dev_t st_dev;
167 _ino_t st_ino;
168 unsigned short st_mode;
169 short st_nlink;
170 short st_uid;
171 short st_gid;
172 _dev_t st_rdev;
173 __int64 DECLSPEC_ALIGN(8) st_size;
174 time_t st_atime;
175 time_t st_mtime;
176 time_t st_ctime;
179 struct _stat64i32 {
180 _dev_t st_dev;
181 _ino_t st_ino;
182 unsigned short st_mode;
183 short st_nlink;
184 short st_uid;
185 short st_gid;
186 _dev_t st_rdev;
187 _off_t st_size;
188 __time64_t st_atime;
189 __time64_t st_mtime;
190 __time64_t st_ctime;
193 struct _stati64 {
194 _dev_t st_dev;
195 _ino_t st_ino;
196 unsigned short st_mode;
197 short st_nlink;
198 short st_uid;
199 short st_gid;
200 _dev_t st_rdev;
201 __int64 DECLSPEC_ALIGN(8) st_size;
202 time_t st_atime;
203 time_t st_mtime;
204 time_t st_ctime;
207 struct _stat64 {
208 _dev_t st_dev;
209 _ino_t st_ino;
210 unsigned short st_mode;
211 short st_nlink;
212 short st_uid;
213 short st_gid;
214 _dev_t st_rdev;
215 __int64 DECLSPEC_ALIGN(8) st_size;
216 __time64_t st_atime;
217 __time64_t st_mtime;
218 __time64_t st_ctime;
220 #endif /* _STAT_DEFINED */
222 /* ASCII char classification table - binary compatible */
223 #define _UPPER 0x0001 /* C1_UPPER */
224 #define _LOWER 0x0002 /* C1_LOWER */
225 #define _DIGIT 0x0004 /* C1_DIGIT */
226 #define _SPACE 0x0008 /* C1_SPACE */
227 #define _PUNCT 0x0010 /* C1_PUNCT */
228 #define _CONTROL 0x0020 /* C1_CNTRL */
229 #define _BLANK 0x0040 /* C1_BLANK */
230 #define _HEX 0x0080 /* C1_XDIGIT */
231 #define _LEADBYTE 0x8000
232 #define _ALPHA (0x0100|_UPPER|_LOWER) /* (C1_ALPHA|_UPPER|_LOWER) */
234 #ifndef _WCTYPE_DEFINED
235 #define _WCTYPE_DEFINED
236 int __cdecl is_wctype(wint_t,wctype_t);
237 int __cdecl isleadbyte(int);
238 int __cdecl iswalnum(wint_t);
239 int __cdecl iswalpha(wint_t);
240 int __cdecl iswascii(wint_t);
241 int __cdecl iswcntrl(wint_t);
242 int __cdecl iswctype(wint_t,wctype_t);
243 int __cdecl iswdigit(wint_t);
244 int __cdecl iswgraph(wint_t);
245 int __cdecl iswlower(wint_t);
246 int __cdecl iswprint(wint_t);
247 int __cdecl iswpunct(wint_t);
248 int __cdecl iswspace(wint_t);
249 int __cdecl iswupper(wint_t);
250 int __cdecl iswxdigit(wint_t);
251 wchar_t __cdecl towlower(wchar_t);
252 wchar_t __cdecl towupper(wchar_t);
253 #endif /* _WCTYPE_DEFINED */
255 #ifndef _WDIRECT_DEFINED
256 #define _WDIRECT_DEFINED
257 int __cdecl _wchdir(const wchar_t*);
258 wchar_t* __cdecl _wgetcwd(wchar_t*,int);
259 wchar_t* __cdecl _wgetdcwd(int,wchar_t*,int);
260 int __cdecl _wmkdir(const wchar_t*);
261 int __cdecl _wrmdir(const wchar_t*);
262 #endif /* _WDIRECT_DEFINED */
264 #ifndef _WIO_DEFINED
265 #define _WIO_DEFINED
266 int __cdecl _waccess(const wchar_t*,int);
267 int __cdecl _wchmod(const wchar_t*,int);
268 int __cdecl _wcreat(const wchar_t*,int);
269 intptr_t __cdecl _wfindfirst(const wchar_t*,struct _wfinddata_t*);
270 intptr_t __cdecl _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*);
271 int __cdecl _wfindnext(intptr_t,struct _wfinddata_t*);
272 int __cdecl _wfindnexti64(intptr_t, struct _wfinddatai64_t*);
273 wchar_t* __cdecl _wmktemp(wchar_t*);
274 int __cdecl _wopen(const wchar_t*,int,...);
275 int __cdecl _wrename(const wchar_t*,const wchar_t*);
276 int __cdecl _wsopen(const wchar_t*,int,int,...);
277 int __cdecl _wunlink(const wchar_t*);
278 #endif /* _WIO_DEFINED */
280 #ifndef _WLOCALE_DEFINED
281 #define _WLOCALE_DEFINED
282 wchar_t* __cdecl _wsetlocale(int,const wchar_t*);
283 #endif /* _WLOCALE_DEFINED */
285 #ifndef _WPROCESS_DEFINED
286 #define _WPROCESS_DEFINED
287 int __cdecl _wexecl(const wchar_t*,const wchar_t*,...);
288 int __cdecl _wexecle(const wchar_t*,const wchar_t*,...);
289 int __cdecl _wexeclp(const wchar_t*,const wchar_t*,...);
290 int __cdecl _wexeclpe(const wchar_t*,const wchar_t*,...);
291 int __cdecl _wexecv(const wchar_t*,const wchar_t* const *);
292 int __cdecl _wexecve(const wchar_t*,const wchar_t* const *,const wchar_t* const *);
293 int __cdecl _wexecvp(const wchar_t*,const wchar_t* const *);
294 int __cdecl _wexecvpe(const wchar_t*,const wchar_t* const *,const wchar_t* const *);
295 int __cdecl _wspawnl(int,const wchar_t*,const wchar_t*,...);
296 int __cdecl _wspawnle(int,const wchar_t*,const wchar_t*,...);
297 int __cdecl _wspawnlp(int,const wchar_t*,const wchar_t*,...);
298 int __cdecl _wspawnlpe(int,const wchar_t*,const wchar_t*,...);
299 int __cdecl _wspawnv(int,const wchar_t*,const wchar_t* const *);
300 int __cdecl _wspawnve(int,const wchar_t*,const wchar_t* const *,const wchar_t* const *);
301 int __cdecl _wspawnvp(int,const wchar_t*,const wchar_t* const *);
302 int __cdecl _wspawnvpe(int,const wchar_t*,const wchar_t* const *,const wchar_t* const *);
303 int __cdecl _wsystem(const wchar_t*);
304 #endif /* _WPROCESS_DEFINED */
306 #ifndef _WSTAT_DEFINED
307 #define _WSTAT_DEFINED
308 int __cdecl _wstat(const wchar_t*,struct _stat*);
309 int __cdecl _wstat32(const wchar_t*, struct _stat32*);
310 int __cdecl _wstati64(const wchar_t*,struct _stati64*);
311 int __cdecl _wstat64(const wchar_t*,struct _stat64*);
312 #endif /* _WSTAT_DEFINED */
314 #ifndef _WSTDIO_DEFINED
315 #define _WSTDIO_DEFINED
316 wint_t __cdecl _fgetwc_nolock(FILE*);
317 wint_t __cdecl _fgetwchar(void);
318 wint_t __cdecl _fputwc_nolock(wint_t,FILE*);
319 wint_t __cdecl _fputwchar(wint_t);
320 wint_t __cdecl _getwc_nolock(FILE*);
321 wchar_t* __cdecl _getws(wchar_t*);
322 wint_t __cdecl _putwc_nolock(wint_t,FILE*);
323 int __cdecl _putws(const wchar_t*);
324 int __cdecl _snwprintf(wchar_t*,size_t,const wchar_t*,...);
325 int __cdecl _snwprintf_s(wchar_t*,size_t,size_t,const wchar_t*,...);
326 int __cdecl _scwprintf(const wchar_t*,...);
327 wint_t __cdecl _ungetwc_nolock(wint_t,FILE*);
328 int __cdecl _vscwprintf(const wchar_t*,__ms_va_list);
329 int __cdecl _vscwprintf_p_l(const wchar_t*,_locale_t,__ms_va_list);
330 int __cdecl _vsnwprintf(wchar_t*,size_t,const wchar_t*,__ms_va_list);
331 int __cdecl _vsnwprintf_s(wchar_t*,size_t,size_t,const wchar_t*,__ms_va_list);
332 int __cdecl _vswprintf_p_l(wchar_t*,size_t,const wchar_t*,_locale_t,__ms_va_list);
333 FILE* __cdecl _wfdopen(int,const wchar_t*);
334 FILE* __cdecl _wfopen(const wchar_t*,const wchar_t*);
335 errno_t __cdecl _wfopen_s(FILE**,const wchar_t*,const wchar_t*);
336 FILE* __cdecl _wfreopen(const wchar_t*,const wchar_t*,FILE*);
337 FILE* __cdecl _wfsopen(const wchar_t*,const wchar_t*,int);
338 void __cdecl _wperror(const wchar_t*);
339 FILE* __cdecl _wpopen(const wchar_t*,const wchar_t*);
340 int __cdecl _wremove(const wchar_t*);
341 wchar_t* __cdecl _wtempnam(const wchar_t*,const wchar_t*);
342 wchar_t* __cdecl _wtmpnam(wchar_t*);
344 wint_t __cdecl fgetwc(FILE*);
345 wchar_t* __cdecl fgetws(wchar_t*,int,FILE*);
346 wint_t __cdecl fputwc(wint_t,FILE*);
347 int __cdecl fputws(const wchar_t*,FILE*);
348 int __cdecl fwprintf(FILE*,const wchar_t*,...);
349 int __cdecl fwprintf_s(FILE*,const wchar_t*,...);
350 int __cdecl fputws(const wchar_t*,FILE*);
351 int __cdecl fwscanf(FILE*,const wchar_t*,...);
352 int __cdecl fwscanf_s(FILE*,const wchar_t*,...);
353 wint_t __cdecl getwc(FILE*);
354 wint_t __cdecl getwchar(void);
355 wchar_t* __cdecl getws(wchar_t*);
356 wint_t __cdecl putwc(wint_t,FILE*);
357 wint_t __cdecl putwchar(wint_t);
358 int __cdecl putws(const wchar_t*);
359 int __cdecl swprintf(wchar_t*,const wchar_t*,...);
360 int __cdecl swprintf_s(wchar_t*,size_t,const wchar_t*,...);
361 int __cdecl swscanf(const wchar_t*,const wchar_t*,...);
362 int __cdecl swscanf_s(const wchar_t*,const wchar_t*,...);
363 wint_t __cdecl ungetwc(wint_t,FILE*);
364 int __cdecl vfwprintf(FILE*,const wchar_t*,__ms_va_list);
365 int __cdecl vfwprintf_s(FILE*,const wchar_t*,__ms_va_list);
366 int __cdecl vswprintf(wchar_t*,const wchar_t*,__ms_va_list);
367 int __cdecl vswprintf_s(wchar_t*,size_t,const wchar_t*,__ms_va_list);
368 int __cdecl vwprintf(const wchar_t*,__ms_va_list);
369 int __cdecl vwprintf_s(const wchar_t*,__ms_va_list);
370 int __cdecl wprintf(const wchar_t*,...);
371 int __cdecl wprintf_s(const wchar_t*,...);
372 int __cdecl wscanf(const wchar_t*,...);
373 int __cdecl wscanf_s(const wchar_t*,...);
374 #endif /* _WSTDIO_DEFINED */
376 #ifndef _WSTDLIB_DEFINED
377 #define _WSTDLIB_DEFINED
378 wchar_t* __cdecl _itow(int,wchar_t*,int);
379 wchar_t* __cdecl _i64tow(__int64,wchar_t*,int);
380 wchar_t* __cdecl _ltow(__msvcrt_long,wchar_t*,int);
381 wchar_t* __cdecl _ui64tow(unsigned __int64,wchar_t*,int);
382 wchar_t* __cdecl _ultow(__msvcrt_ulong,wchar_t*,int);
383 wchar_t* __cdecl _wfullpath(wchar_t*,const wchar_t*,size_t);
384 wchar_t* __cdecl _wgetenv(const wchar_t*);
385 void __cdecl _wmakepath(wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*,const wchar_t*);
386 void __cdecl _wperror(const wchar_t*);
387 int __cdecl _wputenv(const wchar_t*);
388 void __cdecl _wsearchenv(const wchar_t*,const wchar_t*,wchar_t*);
389 void __cdecl _wsplitpath(const wchar_t*,wchar_t*,wchar_t*,wchar_t*,wchar_t*);
390 errno_t __cdecl _wsplitpath_s(const wchar_t*,wchar_t*,size_t,wchar_t*,size_t,
391 wchar_t*,size_t,wchar_t*,size_t);
392 int __cdecl _wsystem(const wchar_t*);
393 double __cdecl _wtof(const wchar_t*);
394 int __cdecl _wtoi(const wchar_t*);
395 __int64 __cdecl _wtoi64(const wchar_t*);
396 __msvcrt_long __cdecl _wtol(const wchar_t*);
398 size_t __cdecl mbstowcs(wchar_t*,const char*,size_t);
399 errno_t __cdecl mbstowcs_s(size_t*,wchar_t*,size_t,const char*,size_t);
400 int __cdecl mbtowc(wchar_t*,const char*,size_t);
401 double __cdecl wcstod(const wchar_t*,wchar_t**);
402 __msvcrt_long __cdecl wcstol(const wchar_t*,wchar_t**,int);
403 size_t __cdecl wcstombs(char*,const wchar_t*,size_t);
404 errno_t __cdecl wcstombs_s(size_t*,char*,size_t,const wchar_t*,size_t);
405 __msvcrt_ulong __cdecl wcstoul(const wchar_t*,wchar_t**,int);
406 int __cdecl wctomb(char*,wchar_t);
407 #endif /* _WSTDLIB_DEFINED */
409 #ifndef _WSTRING_DEFINED
410 #define _WSTRING_DEFINED
411 int __cdecl _wcscoll_l(const wchar_t*,const wchar_t*,_locale_t);
412 wchar_t* __cdecl _wcsdup(const wchar_t*);
413 int __cdecl _wcsicmp(const wchar_t*,const wchar_t*);
414 int __cdecl _wcsicoll(const wchar_t*,const wchar_t*);
415 int __cdecl _wcsicoll_l(const wchar_t*,const wchar_t*,_locale_t);
416 wchar_t* __cdecl _wcslwr(wchar_t*);
417 int __cdecl _wcsncoll(const wchar_t*,const wchar_t*,size_t);
418 int __cdecl _wcsncoll_l(const wchar_t*,const wchar_t*,size_t,_locale_t);
419 int __cdecl _wcsnicmp(const wchar_t*,const wchar_t*,size_t);
420 int __cdecl _wcsnicoll(const wchar_t*,const wchar_t*,size_t);
421 int __cdecl _wcsnicoll_l(const wchar_t*,const wchar_t*,size_t,_locale_t);
422 wchar_t* __cdecl _wcsnset(wchar_t*,wchar_t,size_t);
423 wchar_t* __cdecl _wcsrev(wchar_t*);
424 wchar_t* __cdecl _wcsset(wchar_t*,wchar_t);
425 wchar_t* __cdecl _wcsupr(wchar_t*);
427 wchar_t* __cdecl wcscat(wchar_t*,const wchar_t*);
428 errno_t __cdecl wcscat_s(wchar_t*,size_t,const wchar_t*);
429 wchar_t* __cdecl wcschr(const wchar_t*,wchar_t);
430 int __cdecl wcscmp(const wchar_t*,const wchar_t*);
431 int __cdecl wcscoll(const wchar_t*,const wchar_t*);
432 wchar_t* __cdecl wcscpy(wchar_t*,const wchar_t*);
433 errno_t __cdecl wcscpy_s(wchar_t*,size_t,const wchar_t*);
434 size_t __cdecl wcscspn(const wchar_t*,const wchar_t*);
435 size_t __cdecl wcslen(const wchar_t*);
436 wchar_t* __cdecl wcsncat(wchar_t*,const wchar_t*,size_t);
437 int __cdecl wcsncmp(const wchar_t*,const wchar_t*,size_t);
438 wchar_t* __cdecl wcsncpy(wchar_t*,const wchar_t*,size_t);
439 errno_t __cdecl wcsncpy_s(wchar_t*,size_t,const wchar_t*,size_t);
440 wchar_t* __cdecl wcspbrk(const wchar_t*,const wchar_t*);
441 wchar_t* __cdecl wcsrchr(const wchar_t*,wchar_t wcFor);
442 size_t __cdecl wcsspn(const wchar_t*,const wchar_t*);
443 wchar_t* __cdecl wcsstr(const wchar_t*,const wchar_t*);
444 wchar_t* __cdecl wcstok(wchar_t*,const wchar_t*);
445 size_t __cdecl wcsxfrm(wchar_t*,const wchar_t*,size_t);
446 #endif /* _WSTRING_DEFINED */
448 #ifndef _WTIME_DEFINED
449 #define _WTIME_DEFINED
451 #ifdef _USE_32BIT_TIME_T
452 #define _wctime32 _wctime
453 #endif
455 wchar_t* __cdecl _wasctime(const struct tm*);
456 size_t __cdecl wcsftime(wchar_t*,size_t,const wchar_t*,const struct tm*);
457 wchar_t* __cdecl _wctime32(const __time32_t*);
458 wchar_t* __cdecl _wctime64(const __time64_t*);
459 wchar_t* __cdecl _wstrdate(wchar_t*);
460 errno_t __cdecl _wstrdate_s(wchar_t*,size_t);
461 wchar_t* __cdecl _wstrtime(wchar_t*);
462 errno_t __cdecl _wstrtime_s(wchar_t*,size_t);
464 #ifndef _USE_32BIT_TIME_T
465 static inline wchar_t* _wctime(const time_t *t) { return _wctime64(t); }
466 #endif
468 #endif /* _WTIME_DEFINED */
470 wchar_t __cdecl btowc(int);
471 size_t __cdecl mbrlen(const char *,size_t,mbstate_t*);
472 size_t __cdecl mbrtowc(wchar_t*,const char*,size_t,mbstate_t*);
473 size_t __cdecl mbsrtowcs(wchar_t*,const char**,size_t,mbstate_t*);
474 size_t __cdecl wcrtomb(char*,wchar_t,mbstate_t*);
475 size_t __cdecl wcsrtombs(char*,const wchar_t**,size_t,mbstate_t*);
476 int __cdecl wctob(wint_t);
478 #ifdef __cplusplus
480 #endif
482 #include <poppack.h>
484 #endif /* __WINE_WCHAR_H */