msvcrt: Add _W_Getdays.
[wine/multimedia.git] / dlls / msvcrt / msvcrt.h
blobe11400b06926d9b52b006308d656091f00731899
1 /*
2 * Copyright 2001 Jon Griffiths
3 * Copyright 2004 Dimitrie O. Paun
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 * NOTES
20 * Naming conventions
21 * - Symbols are prefixed with MSVCRT_ if they conflict
22 * with libc symbols
23 * - Internal symbols are usually prefixed by msvcrt_.
24 * - Exported symbols that are not present in the public
25 * headers are usually kept the same as the original.
26 * Other conventions
27 * - To avoid conflicts with the standard C library,
28 * no msvcrt headers are included in the implementation.
29 * - Instead, symbols are duplicated here, prefixed with
30 * MSVCRT_, as explained above.
31 * - To avoid inconsistencies, a test for each symbol is
32 * added into tests/headers.c. Please always add a
33 * corresponding test when you add a new symbol!
36 #ifndef __WINE_MSVCRT_H
37 #define __WINE_MSVCRT_H
39 #include <stdarg.h>
41 #include "windef.h"
42 #include "winbase.h"
44 #define MSVCRT_LONG_MAX 0x7fffffff
45 #define MSVCRT_LONG_MIN (-MSVCRT_LONG_MAX-1)
46 #define MSVCRT_ULONG_MAX 0xffffffff
47 #define MSVCRT_I64_MAX (((__int64)0x7fffffff << 32) | 0xffffffff)
48 #define MSVCRT_I64_MIN (-MSVCRT_I64_MAX-1)
49 #define MSVCRT_UI64_MAX (((unsigned __int64)0xffffffff << 32) | 0xffffffff)
50 #define MSVCRT_MB_LEN_MAX 5
51 #ifdef _WIN64
52 #define MSVCRT_SIZE_MAX MSVCRT_UI64_MAX
53 #else
54 #define MSVCRT_SIZE_MAX MSVCRT_ULONG_MAX
55 #endif
57 #define MSVCRT__MAX_DRIVE 3
58 #define MSVCRT__MAX_DIR 256
59 #define MSVCRT__MAX_FNAME 256
60 #define MSVCRT__MAX_EXT 256
62 typedef unsigned char MSVCRT_bool;
63 typedef unsigned short MSVCRT_wchar_t;
64 typedef unsigned short MSVCRT_wint_t;
65 typedef unsigned short MSVCRT_wctype_t;
66 typedef unsigned short MSVCRT__ino_t;
67 typedef unsigned int MSVCRT__fsize_t;
68 typedef int MSVCRT_long;
69 typedef unsigned int MSVCRT_ulong;
70 typedef __int64 MSVCRT_longlong;
71 #ifdef _WIN64
72 typedef unsigned __int64 MSVCRT_size_t;
73 typedef __int64 MSVCRT_intptr_t;
74 typedef unsigned __int64 MSVCRT_uintptr_t;
75 #else
76 typedef unsigned long MSVCRT_size_t;
77 typedef long MSVCRT_intptr_t;
78 typedef unsigned long MSVCRT_uintptr_t;
79 #endif
80 typedef unsigned int MSVCRT__dev_t;
81 typedef int MSVCRT__off_t;
82 typedef int MSVCRT_clock_t;
83 typedef int MSVCRT___time32_t;
84 typedef __int64 DECLSPEC_ALIGN(8) MSVCRT___time64_t;
85 typedef __int64 DECLSPEC_ALIGN(8) MSVCRT_fpos_t;
86 typedef int MSVCRT_mbstate_t;
88 typedef void (__cdecl *MSVCRT_terminate_handler)(void);
89 typedef void (__cdecl *MSVCRT_terminate_function)(void);
90 typedef void (__cdecl *MSVCRT_unexpected_handler)(void);
91 typedef void (__cdecl *MSVCRT_unexpected_function)(void);
92 typedef void (__cdecl *MSVCRT__se_translator_function)(unsigned int code, struct _EXCEPTION_POINTERS *info);
93 typedef void (__cdecl *MSVCRT__beginthread_start_routine_t)(void *);
94 typedef unsigned int (__stdcall *MSVCRT__beginthreadex_start_routine_t)(void *);
95 typedef int (__cdecl *MSVCRT__onexit_t)(void);
96 typedef void (__cdecl *MSVCRT_invalid_parameter_handler)(const MSVCRT_wchar_t*, const MSVCRT_wchar_t*, const MSVCRT_wchar_t*, unsigned, MSVCRT_uintptr_t);
97 typedef void (__cdecl *MSVCRT_purecall_handler)(void);
98 typedef void (__cdecl *MSVCRT_security_error_handler)(int, void *);
100 typedef struct {ULONG x80[3];} MSVCRT__LDOUBLE; /* Intel 80 bit FP format has sizeof() 12 */
102 struct MSVCRT_tm {
103 int tm_sec;
104 int tm_min;
105 int tm_hour;
106 int tm_mday;
107 int tm_mon;
108 int tm_year;
109 int tm_wday;
110 int tm_yday;
111 int tm_isdst;
114 typedef struct MSVCRT_tagLC_ID {
115 unsigned short wLanguage;
116 unsigned short wCountry;
117 unsigned short wCodePage;
118 } MSVCRT_LC_ID, *MSVCRT_LPLC_ID;
120 typedef struct {
121 union {
122 char *str[43];
123 struct {
124 char *short_wday[7];
125 char *wday[7];
126 char *short_mon[12];
127 char *mon[12];
128 char *am;
129 char *pm;
130 char *short_date;
131 char *date;
132 char *time;
133 } names;
134 } str;
135 LCID lcid;
136 int unk[2];
137 union {
138 MSVCRT_wchar_t *wstr[43];
139 struct {
140 MSVCRT_wchar_t *short_wday[7];
141 MSVCRT_wchar_t *wday[7];
142 MSVCRT_wchar_t *short_mon[12];
143 MSVCRT_wchar_t *mon[12];
144 MSVCRT_wchar_t *am;
145 MSVCRT_wchar_t *pm;
146 MSVCRT_wchar_t *short_date;
147 MSVCRT_wchar_t *date;
148 MSVCRT_wchar_t *time;
149 } names;
150 } wstr;
151 char data[1];
152 } MSVCRT___lc_time_data;
154 typedef struct MSVCRT_threadlocaleinfostruct {
155 int refcount;
156 unsigned int lc_codepage;
157 unsigned int lc_collate_cp;
158 MSVCRT_ulong lc_handle[6];
159 MSVCRT_LC_ID lc_id[6];
160 struct {
161 char *locale;
162 wchar_t *wlocale;
163 int *refcount;
164 int *wrefcount;
165 } lc_category[6];
166 int lc_clike;
167 int mb_cur_max;
168 int *lconv_intl_refcount;
169 int *lconv_num_refcount;
170 int *lconv_mon_refcount;
171 struct MSVCRT_lconv *lconv;
172 int *ctype1_refcount;
173 unsigned short *ctype1;
174 unsigned short *pctype;
175 unsigned char *pclmap;
176 unsigned char *pcumap;
177 MSVCRT___lc_time_data *lc_time_curr;
178 } MSVCRT_threadlocinfo;
180 typedef struct MSVCRT_threadmbcinfostruct {
181 int refcount;
182 int mbcodepage;
183 int ismbcodepage;
184 int mblcid;
185 unsigned short mbulinfo[6];
186 unsigned char mbctype[257];
187 unsigned char mbcasemap[256];
188 } MSVCRT_threadmbcinfo;
190 typedef struct MSVCRT_threadlocaleinfostruct *MSVCRT_pthreadlocinfo;
191 typedef struct MSVCRT_threadmbcinfostruct *MSVCRT_pthreadmbcinfo;
193 typedef struct MSVCRT_localeinfo_struct
195 MSVCRT_pthreadlocinfo locinfo;
196 MSVCRT_pthreadmbcinfo mbcinfo;
197 } MSVCRT__locale_tstruct, *MSVCRT__locale_t;
200 /* TLS data */
201 extern DWORD msvcrt_tls_index DECLSPEC_HIDDEN;
203 /* Keep in sync with msvcr90/tests/msvcr90.c */
204 struct __thread_data {
205 DWORD tid;
206 HANDLE handle;
207 int thread_errno;
208 MSVCRT_ulong thread_doserrno;
209 int unk1;
210 unsigned int random_seed; /* seed for rand() */
211 char *strtok_next; /* next ptr for strtok() */
212 MSVCRT_wchar_t *wcstok_next; /* next ptr for wcstok() */
213 unsigned char *mbstok_next; /* next ptr for mbstok() */
214 char *strerror_buffer; /* buffer for strerror */
215 MSVCRT_wchar_t *wcserror_buffer; /* buffer for wcserror */
216 char *tmpnam_buffer; /* buffer for tmpname() */
217 MSVCRT_wchar_t *wtmpnam_buffer; /* buffer for wtmpname() */
218 void *unk2[2];
219 char *asctime_buffer; /* buffer for asctime */
220 MSVCRT_wchar_t *wasctime_buffer; /* buffer for wasctime */
221 struct MSVCRT_tm *time_buffer; /* buffer for localtime/gmtime */
222 char *efcvt_buffer; /* buffer for ecvt/fcvt */
223 int unk3[2];
224 void *unk4[3];
225 EXCEPTION_POINTERS *xcptinfo;
226 int fpecode;
227 MSVCRT_pthreadmbcinfo mbcinfo;
228 MSVCRT_pthreadlocinfo locinfo;
229 BOOL have_locale;
230 int unk5[1];
231 MSVCRT_terminate_function terminate_handler;
232 MSVCRT_unexpected_function unexpected_handler;
233 MSVCRT__se_translator_function se_translator;
234 void *unk6[3];
235 int unk7;
236 EXCEPTION_RECORD *exc_record;
237 void *unk8[100];
240 typedef struct __thread_data thread_data_t;
242 extern thread_data_t *msvcrt_get_thread_data(void) DECLSPEC_HIDDEN;
244 LCID MSVCRT_locale_to_LCID(const char*, unsigned short*) DECLSPEC_HIDDEN;
245 extern MSVCRT__locale_t MSVCRT_locale DECLSPEC_HIDDEN;
246 extern unsigned int MSVCRT___lc_codepage;
247 extern int MSVCRT___lc_collate_cp;
248 extern WORD MSVCRT__ctype [257];
250 void msvcrt_set_errno(int) DECLSPEC_HIDDEN;
251 #if _MSVCR_VER >= 80
252 void throw_bad_alloc(const char*) DECLSPEC_HIDDEN;
253 #endif
255 void __cdecl _purecall(void);
256 void __cdecl _amsg_exit(int errnum);
258 extern char **MSVCRT__environ;
259 extern MSVCRT_wchar_t **MSVCRT__wenviron;
261 extern char ** msvcrt_SnapshotOfEnvironmentA(char **) DECLSPEC_HIDDEN;
262 extern MSVCRT_wchar_t ** msvcrt_SnapshotOfEnvironmentW(MSVCRT_wchar_t **) DECLSPEC_HIDDEN;
264 MSVCRT_wchar_t *msvcrt_wstrdupa(const char *) DECLSPEC_HIDDEN;
266 extern unsigned int MSVCRT__commode;
268 /* FIXME: This should be declared in new.h but it's not an extern "C" so
269 * it would not be much use anyway. Even for Winelib applications.
271 int __cdecl MSVCRT__set_new_mode(int mode);
273 void* __cdecl MSVCRT_operator_new(MSVCRT_size_t);
274 void __cdecl MSVCRT_operator_delete(void*);
276 typedef void* (__cdecl *malloc_func_t)(MSVCRT_size_t);
277 typedef void (__cdecl *free_func_t)(void*);
279 /* Setup and teardown multi threaded locks */
280 extern void msvcrt_init_mt_locks(void) DECLSPEC_HIDDEN;
281 extern void msvcrt_free_locks(void) DECLSPEC_HIDDEN;
283 extern void msvcrt_init_exception(void*) DECLSPEC_HIDDEN;
284 extern BOOL msvcrt_init_locale(void) DECLSPEC_HIDDEN;
285 extern void msvcrt_init_math(void) DECLSPEC_HIDDEN;
286 extern void msvcrt_init_io(void) DECLSPEC_HIDDEN;
287 extern void msvcrt_free_io(void) DECLSPEC_HIDDEN;
288 extern void msvcrt_init_console(void) DECLSPEC_HIDDEN;
289 extern void msvcrt_free_console(void) DECLSPEC_HIDDEN;
290 extern void msvcrt_init_args(void) DECLSPEC_HIDDEN;
291 extern void msvcrt_free_args(void) DECLSPEC_HIDDEN;
292 extern void msvcrt_init_signals(void) DECLSPEC_HIDDEN;
293 extern void msvcrt_free_signals(void) DECLSPEC_HIDDEN;
294 extern void msvcrt_free_popen_data(void) DECLSPEC_HIDDEN;
295 extern BOOL msvcrt_init_heap(void) DECLSPEC_HIDDEN;
296 extern void msvcrt_destroy_heap(void) DECLSPEC_HIDDEN;
298 extern unsigned msvcrt_create_io_inherit_block(WORD*, BYTE**) DECLSPEC_HIDDEN;
300 extern unsigned int __cdecl _control87(unsigned int, unsigned int);
302 /* run-time error codes */
303 #define _RT_STACK 0
304 #define _RT_NULLPTR 1
305 #define _RT_FLOAT 2
306 #define _RT_INTDIV 3
307 #define _RT_EXECMEM 5
308 #define _RT_EXECFORM 6
309 #define _RT_EXECENV 7
310 #define _RT_SPACEARG 8
311 #define _RT_SPACEENV 9
312 #define _RT_ABORT 10
313 #define _RT_NPTR 12
314 #define _RT_FPTR 13
315 #define _RT_BREAK 14
316 #define _RT_INT 15
317 #define _RT_THREAD 16
318 #define _RT_LOCK 17
319 #define _RT_HEAP 18
320 #define _RT_OPENCON 19
321 #define _RT_QWIN 20
322 #define _RT_NOMAIN 21
323 #define _RT_NONCONT 22
324 #define _RT_INVALDISP 23
325 #define _RT_ONEXIT 24
326 #define _RT_PUREVIRT 25
327 #define _RT_STDIOINIT 26
328 #define _RT_LOWIOINIT 27
329 #define _RT_HEAPINIT 28
330 #define _RT_DOMAIN 120
331 #define _RT_SING 121
332 #define _RT_TLOSS 122
333 #define _RT_CRNL 252
334 #define _RT_BANNER 255
336 struct MSVCRT___timeb32 {
337 MSVCRT___time32_t time;
338 unsigned short millitm;
339 short timezone;
340 short dstflag;
343 struct MSVCRT___timeb64 {
344 MSVCRT___time64_t time;
345 unsigned short millitm;
346 short timezone;
347 short dstflag;
350 struct MSVCRT__iobuf {
351 char* _ptr;
352 int _cnt;
353 char* _base;
354 int _flag;
355 int _file;
356 int _charbuf;
357 int _bufsiz;
358 char* _tmpfname;
361 typedef struct MSVCRT__iobuf MSVCRT_FILE;
363 struct MSVCRT_lconv {
364 char* decimal_point;
365 char* thousands_sep;
366 char* grouping;
367 char* int_curr_symbol;
368 char* currency_symbol;
369 char* mon_decimal_point;
370 char* mon_thousands_sep;
371 char* mon_grouping;
372 char* positive_sign;
373 char* negative_sign;
374 char int_frac_digits;
375 char frac_digits;
376 char p_cs_precedes;
377 char p_sep_by_space;
378 char n_cs_precedes;
379 char n_sep_by_space;
380 char p_sign_posn;
381 char n_sign_posn;
382 #if _MSVCR_VER >= 120
383 MSVCRT_wchar_t* _W_decimal_point;
384 MSVCRT_wchar_t* _W_thousands_sep;
385 MSVCRT_wchar_t* _W_int_curr_symbol;
386 MSVCRT_wchar_t* _W_currency_symbol;
387 MSVCRT_wchar_t* _W_mon_decimal_point;
388 MSVCRT_wchar_t* _W_mon_thousands_sep;
389 MSVCRT_wchar_t* _W_positive_sign;
390 MSVCRT_wchar_t* _W_negative_sign;
391 #endif
394 struct MSVCRT__exception {
395 int type;
396 char* name;
397 double arg1;
398 double arg2;
399 double retval;
402 struct MSVCRT__complex {
403 double x; /* Real part */
404 double y; /* Imaginary part */
407 typedef struct MSVCRT__div_t {
408 int quot; /* quotient */
409 int rem; /* remainder */
410 } MSVCRT_div_t;
412 typedef struct MSVCRT__ldiv_t {
413 MSVCRT_long quot; /* quotient */
414 MSVCRT_long rem; /* remainder */
415 } MSVCRT_ldiv_t;
417 struct MSVCRT__heapinfo {
418 int* _pentry;
419 MSVCRT_size_t _size;
420 int _useflag;
423 #ifdef __i386__
424 struct MSVCRT___JUMP_BUFFER {
425 unsigned long Ebp;
426 unsigned long Ebx;
427 unsigned long Edi;
428 unsigned long Esi;
429 unsigned long Esp;
430 unsigned long Eip;
431 unsigned long Registration;
432 unsigned long TryLevel;
433 /* Start of new struct members */
434 unsigned long Cookie;
435 unsigned long UnwindFunc;
436 unsigned long UnwindData[6];
438 #elif defined(__x86_64__)
439 struct MSVCRT__SETJMP_FLOAT128
441 unsigned __int64 DECLSPEC_ALIGN(16) Part[2];
443 struct MSVCRT___JUMP_BUFFER
445 unsigned __int64 Frame;
446 unsigned __int64 Rbx;
447 unsigned __int64 Rsp;
448 unsigned __int64 Rbp;
449 unsigned __int64 Rsi;
450 unsigned __int64 Rdi;
451 unsigned __int64 R12;
452 unsigned __int64 R13;
453 unsigned __int64 R14;
454 unsigned __int64 R15;
455 unsigned __int64 Rip;
456 unsigned __int64 Spare;
457 struct MSVCRT__SETJMP_FLOAT128 Xmm6;
458 struct MSVCRT__SETJMP_FLOAT128 Xmm7;
459 struct MSVCRT__SETJMP_FLOAT128 Xmm8;
460 struct MSVCRT__SETJMP_FLOAT128 Xmm9;
461 struct MSVCRT__SETJMP_FLOAT128 Xmm10;
462 struct MSVCRT__SETJMP_FLOAT128 Xmm11;
463 struct MSVCRT__SETJMP_FLOAT128 Xmm12;
464 struct MSVCRT__SETJMP_FLOAT128 Xmm13;
465 struct MSVCRT__SETJMP_FLOAT128 Xmm14;
466 struct MSVCRT__SETJMP_FLOAT128 Xmm15;
468 #elif defined(__arm__)
469 struct MSVCRT___JUMP_BUFFER
471 unsigned long Frame;
472 unsigned long R4;
473 unsigned long R5;
474 unsigned long R6;
475 unsigned long R7;
476 unsigned long R8;
477 unsigned long R9;
478 unsigned long R10;
479 unsigned long R11;
480 unsigned long Sp;
481 unsigned long Pc;
482 unsigned long Fpscr;
483 unsigned long long D[8];
485 #endif /* __i386__ */
487 struct MSVCRT__diskfree_t {
488 unsigned int total_clusters;
489 unsigned int avail_clusters;
490 unsigned int sectors_per_cluster;
491 unsigned int bytes_per_sector;
494 struct MSVCRT__finddata32_t {
495 unsigned int attrib;
496 MSVCRT___time32_t time_create;
497 MSVCRT___time32_t time_access;
498 MSVCRT___time32_t time_write;
499 MSVCRT__fsize_t size;
500 char name[260];
503 struct MSVCRT__finddata32i64_t {
504 unsigned int attrib;
505 MSVCRT___time32_t time_create;
506 MSVCRT___time32_t time_access;
507 MSVCRT___time32_t time_write;
508 __int64 DECLSPEC_ALIGN(8) size;
509 char name[260];
512 struct MSVCRT__finddata64i32_t {
513 unsigned int attrib;
514 MSVCRT___time64_t time_create;
515 MSVCRT___time64_t time_access;
516 MSVCRT___time64_t time_write;
517 MSVCRT__fsize_t size;
518 char name[260];
521 struct MSVCRT__finddata64_t {
522 unsigned int attrib;
523 MSVCRT___time64_t time_create;
524 MSVCRT___time64_t time_access;
525 MSVCRT___time64_t time_write;
526 __int64 DECLSPEC_ALIGN(8) size;
527 char name[260];
530 struct MSVCRT__wfinddata32_t {
531 unsigned int attrib;
532 MSVCRT___time32_t time_create;
533 MSVCRT___time32_t time_access;
534 MSVCRT___time32_t time_write;
535 MSVCRT__fsize_t size;
536 MSVCRT_wchar_t name[260];
539 struct MSVCRT__wfinddata32i64_t {
540 unsigned int attrib;
541 MSVCRT___time32_t time_create;
542 MSVCRT___time32_t time_access;
543 MSVCRT___time32_t time_write;
544 __int64 DECLSPEC_ALIGN(8) size;
545 MSVCRT_wchar_t name[260];
548 struct MSVCRT__wfinddata64i32_t {
549 unsigned int attrib;
550 MSVCRT___time64_t time_create;
551 MSVCRT___time64_t time_access;
552 MSVCRT___time64_t time_write;
553 MSVCRT__fsize_t size;
554 MSVCRT_wchar_t name[260];
557 struct MSVCRT__wfinddata64_t {
558 unsigned int attrib;
559 MSVCRT___time64_t time_create;
560 MSVCRT___time64_t time_access;
561 MSVCRT___time64_t time_write;
562 __int64 DECLSPEC_ALIGN(8) size;
563 MSVCRT_wchar_t name[260];
566 struct MSVCRT___utimbuf32
568 MSVCRT___time32_t actime;
569 MSVCRT___time32_t modtime;
572 struct MSVCRT___utimbuf64
574 MSVCRT___time64_t actime;
575 MSVCRT___time64_t modtime;
578 /* for FreeBSD */
579 #undef st_atime
580 #undef st_ctime
581 #undef st_mtime
583 struct MSVCRT__stat32 {
584 MSVCRT__dev_t st_dev;
585 MSVCRT__ino_t st_ino;
586 unsigned short st_mode;
587 short st_nlink;
588 short st_uid;
589 short st_gid;
590 MSVCRT__dev_t st_rdev;
591 MSVCRT__off_t st_size;
592 MSVCRT___time32_t st_atime;
593 MSVCRT___time32_t st_mtime;
594 MSVCRT___time32_t st_ctime;
597 struct MSVCRT__stat32i64 {
598 MSVCRT__dev_t st_dev;
599 MSVCRT__ino_t st_ino;
600 unsigned short st_mode;
601 short st_nlink;
602 short st_uid;
603 short st_gid;
604 MSVCRT__dev_t st_rdev;
605 __int64 DECLSPEC_ALIGN(8) st_size;
606 MSVCRT___time32_t st_atime;
607 MSVCRT___time32_t st_mtime;
608 MSVCRT___time32_t st_ctime;
611 struct MSVCRT__stat64i32 {
612 MSVCRT__dev_t st_dev;
613 MSVCRT__ino_t st_ino;
614 unsigned short st_mode;
615 short st_nlink;
616 short st_uid;
617 short st_gid;
618 MSVCRT__dev_t st_rdev;
619 MSVCRT__off_t st_size;
620 MSVCRT___time64_t st_atime;
621 MSVCRT___time64_t st_mtime;
622 MSVCRT___time64_t st_ctime;
625 struct MSVCRT__stat64 {
626 MSVCRT__dev_t st_dev;
627 MSVCRT__ino_t st_ino;
628 unsigned short st_mode;
629 short st_nlink;
630 short st_uid;
631 short st_gid;
632 MSVCRT__dev_t st_rdev;
633 __int64 DECLSPEC_ALIGN(8) st_size;
634 MSVCRT___time64_t st_atime;
635 MSVCRT___time64_t st_mtime;
636 MSVCRT___time64_t st_ctime;
639 #ifdef _WIN64
640 #define MSVCRT__finddata_t MSVCRT__finddata64i32_t
641 #define MSVCRT__finddatai64_t MSVCRT__finddata64_t
642 #define MSVCRT__wfinddata_t MSVCRT__wfinddata64i32_t
643 #define MSVCRT__wfinddatai64_t MSVCRT__wfinddata64_t
644 #define MSVCRT__stat MSVCRT__stat64i32
645 #define MSVCRT__stati64 MSVCRT__stat64
646 #else
647 #define MSVCRT__finddata_t MSVCRT__finddata32_t
648 #define MSVCRT__finddatai64_t MSVCRT__finddata32i64_t
649 #define MSVCRT__wfinddata_t MSVCRT__wfinddata32_t
650 #define MSVCRT__wfinddatai64_t MSVCRT__wfinddata32i64_t
651 #define MSVCRT__stat MSVCRT__stat32
652 #define MSVCRT__stati64 MSVCRT__stat32i64
653 #endif
655 #define MSVCRT_WEOF (MSVCRT_wint_t)(0xFFFF)
656 #define MSVCRT_EOF (-1)
657 #define MSVCRT_TMP_MAX 0x7fff
658 #define MSVCRT_RAND_MAX 0x7fff
659 #define MSVCRT_BUFSIZ 512
661 #define MSVCRT_STDIN_FILENO 0
662 #define MSVCRT_STDOUT_FILENO 1
663 #define MSVCRT_STDERR_FILENO 2
665 /* more file._flag flags, but these conflict with Unix */
666 #define MSVCRT__IOFBF 0x0000
667 #define MSVCRT__IONBF 0x0004
668 #define MSVCRT__IOLBF 0x0040
670 #define MSVCRT_FILENAME_MAX 260
671 #define MSVCRT_DRIVE_MAX 3
672 #define MSVCRT_FNAME_MAX 256
673 #define MSVCRT_DIR_MAX 256
674 #define MSVCRT_EXT_MAX 256
675 #define MSVCRT_PATH_MAX 260
676 #define MSVCRT_stdin (MSVCRT__iob+MSVCRT_STDIN_FILENO)
677 #define MSVCRT_stdout (MSVCRT__iob+MSVCRT_STDOUT_FILENO)
678 #define MSVCRT_stderr (MSVCRT__iob+MSVCRT_STDERR_FILENO)
680 #define MSVCRT__P_WAIT 0
681 #define MSVCRT__P_NOWAIT 1
682 #define MSVCRT__P_OVERLAY 2
683 #define MSVCRT__P_NOWAITO 3
684 #define MSVCRT__P_DETACH 4
686 #define MSVCRT_EPERM 1
687 #define MSVCRT_ENOENT 2
688 #define MSVCRT_ESRCH 3
689 #define MSVCRT_EINTR 4
690 #define MSVCRT_EIO 5
691 #define MSVCRT_ENXIO 6
692 #define MSVCRT_E2BIG 7
693 #define MSVCRT_ENOEXEC 8
694 #define MSVCRT_EBADF 9
695 #define MSVCRT_ECHILD 10
696 #define MSVCRT_EAGAIN 11
697 #define MSVCRT_ENOMEM 12
698 #define MSVCRT_EACCES 13
699 #define MSVCRT_EFAULT 14
700 #define MSVCRT_EBUSY 16
701 #define MSVCRT_EEXIST 17
702 #define MSVCRT_EXDEV 18
703 #define MSVCRT_ENODEV 19
704 #define MSVCRT_ENOTDIR 20
705 #define MSVCRT_EISDIR 21
706 #define MSVCRT_EINVAL 22
707 #define MSVCRT_ENFILE 23
708 #define MSVCRT_EMFILE 24
709 #define MSVCRT_ENOTTY 25
710 #define MSVCRT_EFBIG 27
711 #define MSVCRT_ENOSPC 28
712 #define MSVCRT_ESPIPE 29
713 #define MSVCRT_EROFS 30
714 #define MSVCRT_EMLINK 31
715 #define MSVCRT_EPIPE 32
716 #define MSVCRT_EDOM 33
717 #define MSVCRT_ERANGE 34
718 #define MSVCRT_EDEADLK 36
719 #define MSVCRT_EDEADLOCK MSVCRT_EDEADLK
720 #define MSVCRT_ENAMETOOLONG 38
721 #define MSVCRT_ENOLCK 39
722 #define MSVCRT_ENOSYS 40
723 #define MSVCRT_ENOTEMPTY 41
724 #define MSVCRT_EILSEQ 42
725 #define MSVCRT_STRUNCATE 80
727 #define MSVCRT_LC_ALL 0
728 #define MSVCRT_LC_COLLATE 1
729 #define MSVCRT_LC_CTYPE 2
730 #define MSVCRT_LC_MONETARY 3
731 #define MSVCRT_LC_NUMERIC 4
732 #define MSVCRT_LC_TIME 5
733 #define MSVCRT_LC_MIN MSVCRT_LC_ALL
734 #define MSVCRT_LC_MAX MSVCRT_LC_TIME
736 #define MSVCRT__HEAPEMPTY -1
737 #define MSVCRT__HEAPOK -2
738 #define MSVCRT__HEAPBADBEGIN -3
739 #define MSVCRT__HEAPBADNODE -4
740 #define MSVCRT__HEAPEND -5
741 #define MSVCRT__HEAPBADPTR -6
743 #define MSVCRT__FREEENTRY 0
744 #define MSVCRT__USEDENTRY 1
746 #define MSVCRT__OUT_TO_DEFAULT 0
747 #define MSVCRT__OUT_TO_STDERR 1
748 #define MSVCRT__OUT_TO_MSGBOX 2
749 #define MSVCRT__REPORT_ERRMODE 3
751 /* ASCII char classification table - binary compatible */
752 #define MSVCRT__UPPER 0x0001 /* C1_UPPER */
753 #define MSVCRT__LOWER 0x0002 /* C1_LOWER */
754 #define MSVCRT__DIGIT 0x0004 /* C1_DIGIT */
755 #define MSVCRT__SPACE 0x0008 /* C1_SPACE */
756 #define MSVCRT__PUNCT 0x0010 /* C1_PUNCT */
757 #define MSVCRT__CONTROL 0x0020 /* C1_CNTRL */
758 #define MSVCRT__BLANK 0x0040 /* C1_BLANK */
759 #define MSVCRT__HEX 0x0080 /* C1_XDIGIT */
760 #define MSVCRT__LEADBYTE 0x8000
761 #define MSVCRT__ALPHA (0x0100|MSVCRT__UPPER|MSVCRT__LOWER) /* (C1_ALPHA|_UPPER|_LOWER) */
763 #define MSVCRT__IOREAD 0x0001
764 #define MSVCRT__IOWRT 0x0002
765 #define MSVCRT__IOMYBUF 0x0008
766 #define MSVCRT__IOEOF 0x0010
767 #define MSVCRT__IOERR 0x0020
768 #define MSVCRT__IOSTRG 0x0040
769 #define MSVCRT__IORW 0x0080
770 #define MSVCRT__USERBUF 0x0100
771 #define MSVCRT__IOCOMMIT 0x4000
773 #define MSVCRT__S_IEXEC 0x0040
774 #define MSVCRT__S_IWRITE 0x0080
775 #define MSVCRT__S_IREAD 0x0100
776 #define MSVCRT__S_IFIFO 0x1000
777 #define MSVCRT__S_IFCHR 0x2000
778 #define MSVCRT__S_IFDIR 0x4000
779 #define MSVCRT__S_IFREG 0x8000
780 #define MSVCRT__S_IFMT 0xF000
782 #define MSVCRT__LK_UNLCK 0
783 #define MSVCRT__LK_LOCK 1
784 #define MSVCRT__LK_NBLCK 2
785 #define MSVCRT__LK_RLCK 3
786 #define MSVCRT__LK_NBRLCK 4
788 #define MSVCRT__SH_COMPAT 0x00 /* Compatibility */
789 #define MSVCRT__SH_DENYRW 0x10 /* Deny read/write */
790 #define MSVCRT__SH_DENYWR 0x20 /* Deny write */
791 #define MSVCRT__SH_DENYRD 0x30 /* Deny read */
792 #define MSVCRT__SH_DENYNO 0x40 /* Deny nothing */
794 #define MSVCRT__O_RDONLY 0
795 #define MSVCRT__O_WRONLY 1
796 #define MSVCRT__O_RDWR 2
797 #define MSVCRT__O_ACCMODE (MSVCRT__O_RDONLY|MSVCRT__O_WRONLY|MSVCRT__O_RDWR)
798 #define MSVCRT__O_APPEND 0x0008
799 #define MSVCRT__O_RANDOM 0x0010
800 #define MSVCRT__O_SEQUENTIAL 0x0020
801 #define MSVCRT__O_TEMPORARY 0x0040
802 #define MSVCRT__O_NOINHERIT 0x0080
803 #define MSVCRT__O_CREAT 0x0100
804 #define MSVCRT__O_TRUNC 0x0200
805 #define MSVCRT__O_EXCL 0x0400
806 #define MSVCRT__O_SHORT_LIVED 0x1000
807 #define MSVCRT__O_TEXT 0x4000
808 #define MSVCRT__O_BINARY 0x8000
809 #define MSVCRT__O_RAW MSVCRT__O_BINARY
810 #define MSVCRT__O_WTEXT 0x10000
811 #define MSVCRT__O_U16TEXT 0x20000
812 #define MSVCRT__O_U8TEXT 0x40000
814 /* _statusfp bit flags */
815 #define MSVCRT__SW_INEXACT 0x00000001 /* inexact (precision) */
816 #define MSVCRT__SW_UNDERFLOW 0x00000002 /* underflow */
817 #define MSVCRT__SW_OVERFLOW 0x00000004 /* overflow */
818 #define MSVCRT__SW_ZERODIVIDE 0x00000008 /* zero divide */
819 #define MSVCRT__SW_INVALID 0x00000010 /* invalid */
821 #define MSVCRT__SW_UNEMULATED 0x00000040 /* unemulated instruction */
822 #define MSVCRT__SW_SQRTNEG 0x00000080 /* square root of a neg number */
823 #define MSVCRT__SW_STACKOVERFLOW 0x00000200 /* FP stack overflow */
824 #define MSVCRT__SW_STACKUNDERFLOW 0x00000400 /* FP stack underflow */
826 #define MSVCRT__SW_DENORMAL 0x00080000 /* denormal status bit */
828 /* fpclass constants */
829 #define MSVCRT__FPCLASS_SNAN 0x0001 /* Signaling "Not a Number" */
830 #define MSVCRT__FPCLASS_QNAN 0x0002 /* Quiet "Not a Number" */
831 #define MSVCRT__FPCLASS_NINF 0x0004 /* Negative Infinity */
832 #define MSVCRT__FPCLASS_NN 0x0008 /* Negative Normal */
833 #define MSVCRT__FPCLASS_ND 0x0010 /* Negative Denormal */
834 #define MSVCRT__FPCLASS_NZ 0x0020 /* Negative Zero */
835 #define MSVCRT__FPCLASS_PZ 0x0040 /* Positive Zero */
836 #define MSVCRT__FPCLASS_PD 0x0080 /* Positive Denormal */
837 #define MSVCRT__FPCLASS_PN 0x0100 /* Positive Normal */
838 #define MSVCRT__FPCLASS_PINF 0x0200 /* Positive Infinity */
840 /* fpclassify constants */
841 #define MSVCRT_FP_INFINITE 1
842 #define MSVCRT_FP_NAN 2
843 #define MSVCRT_FP_NORMAL -1
844 #define MSVCRT_FP_SUBNORMAL -2
845 #define MSVCRT_FP_ZERO 0
847 #define MSVCRT__MCW_EM 0x0008001f
848 #define MSVCRT__MCW_IC 0x00040000
849 #define MSVCRT__MCW_RC 0x00000300
850 #define MSVCRT__MCW_PC 0x00030000
851 #define MSVCRT__MCW_DN 0x03000000
853 #define MSVCRT__EM_INVALID 0x00000010
854 #define MSVCRT__EM_DENORMAL 0x00080000
855 #define MSVCRT__EM_ZERODIVIDE 0x00000008
856 #define MSVCRT__EM_OVERFLOW 0x00000004
857 #define MSVCRT__EM_UNDERFLOW 0x00000002
858 #define MSVCRT__EM_INEXACT 0x00000001
859 #define MSVCRT__IC_AFFINE 0x00040000
860 #define MSVCRT__IC_PROJECTIVE 0x00000000
861 #define MSVCRT__RC_CHOP 0x00000300
862 #define MSVCRT__RC_UP 0x00000200
863 #define MSVCRT__RC_DOWN 0x00000100
864 #define MSVCRT__RC_NEAR 0x00000000
865 #define MSVCRT__PC_24 0x00020000
866 #define MSVCRT__PC_53 0x00010000
867 #define MSVCRT__PC_64 0x00000000
868 #define MSVCRT__DN_SAVE 0x00000000
869 #define MSVCRT__DN_FLUSH 0x01000000
870 #define MSVCRT__DN_FLUSH_OPERANDS_SAVE_RESULTS 0x02000000
871 #define MSVCRT__DN_SAVE_OPERANDS_FLUSH_RESULTS 0x03000000
872 #define MSVCRT__EM_AMBIGUOUS 0x80000000
874 #define MSVCRT_CLOCKS_PER_SEC 1000
876 /* signals */
877 #define MSVCRT_SIGINT 2
878 #define MSVCRT_SIGILL 4
879 #define MSVCRT_SIGFPE 8
880 #define MSVCRT_SIGSEGV 11
881 #define MSVCRT_SIGTERM 15
882 #define MSVCRT_SIGBREAK 21
883 #define MSVCRT_SIGABRT 22
884 #define MSVCRT_NSIG (MSVCRT_SIGABRT + 1)
886 typedef void (__cdecl *MSVCRT___sighandler_t)(int);
888 #define MSVCRT_SIG_DFL ((MSVCRT___sighandler_t)0)
889 #define MSVCRT_SIG_IGN ((MSVCRT___sighandler_t)1)
890 #define MSVCRT_SIG_ERR ((MSVCRT___sighandler_t)-1)
892 #define MSVCRT__FPE_INVALID 0x81
893 #define MSVCRT__FPE_DENORMAL 0x82
894 #define MSVCRT__FPE_ZERODIVIDE 0x83
895 #define MSVCRT__FPE_OVERFLOW 0x84
896 #define MSVCRT__FPE_UNDERFLOW 0x85
897 #define MSVCRT__FPE_INEXACT 0x86
898 #define MSVCRT__FPE_UNEMULATED 0x87
899 #define MSVCRT__FPE_SQRTNEG 0x88
900 #define MSVCRT__FPE_STACKOVERFLOW 0x8a
901 #define MSVCRT__FPE_STACKUNDERFLOW 0x8b
902 #define MSVCRT__FPE_EXPLICITGEN 0x8c
904 #define _MS 0x01
905 #define _MP 0x02
906 #define _M1 0x04
907 #define _M2 0x08
909 #define _SBUP 0x10
910 #define _SBLOW 0x20
912 #define _MBC_SINGLE 0
913 #define _MBC_LEAD 1
914 #define _MBC_TRAIL 2
915 #define _MBC_ILLEGAL -1
917 #define _MB_CP_SBCS 0
918 #define _MB_CP_OEM -2
919 #define _MB_CP_ANSI -3
920 #define _MB_CP_LOCALE -4
922 #define MSVCRT__TRUNCATE ((MSVCRT_size_t)-1)
924 #define _MAX__TIME64_T (((MSVCRT___time64_t)0x00000007 << 32) | 0x93406FFF)
926 /* _set_abort_behavior codes */
927 #define MSVCRT__WRITE_ABORT_MSG 1
928 #define MSVCRT__CALL_REPORTFAULT 2
930 /* _get_output_format return code */
931 #define MSVCRT__TWO_DIGIT_EXPONENT 0x1
933 #define MSVCRT__NLSCMPERROR ((unsigned int)0x7fffffff)
935 void __cdecl MSVCRT_free(void*);
936 void* __cdecl MSVCRT_malloc(MSVCRT_size_t);
937 void* __cdecl MSVCRT_calloc(MSVCRT_size_t,MSVCRT_size_t);
938 void* __cdecl MSVCRT_realloc(void*,MSVCRT_size_t);
940 int __cdecl MSVCRT_iswalpha(MSVCRT_wint_t);
941 int __cdecl MSVCRT_iswspace(MSVCRT_wint_t);
942 int __cdecl MSVCRT_iswdigit(MSVCRT_wint_t);
943 int __cdecl MSVCRT_isleadbyte(int);
944 int __cdecl MSVCRT__isleadbyte_l(int, MSVCRT__locale_t);
946 void __cdecl MSVCRT__lock_file(MSVCRT_FILE*);
947 void __cdecl MSVCRT__unlock_file(MSVCRT_FILE*);
948 int __cdecl MSVCRT_fgetc(MSVCRT_FILE*);
949 int __cdecl MSVCRT__fgetc_nolock(MSVCRT_FILE*);
950 int __cdecl MSVCRT__fputc_nolock(int,MSVCRT_FILE*);
951 int __cdecl MSVCRT_ungetc(int,MSVCRT_FILE*);
952 int __cdecl MSVCRT__ungetc_nolock(int,MSVCRT_FILE*);
953 MSVCRT_wint_t __cdecl MSVCRT_fgetwc(MSVCRT_FILE*);
954 MSVCRT_wint_t __cdecl MSVCRT__fgetwc_nolock(MSVCRT_FILE*);
955 MSVCRT_wint_t __cdecl MSVCRT__fputwc_nolock(MSVCRT_wint_t,MSVCRT_FILE*);
956 MSVCRT_wint_t __cdecl MSVCRT_ungetwc(MSVCRT_wint_t,MSVCRT_FILE*);
957 MSVCRT_wint_t __cdecl MSVCRT__ungetwc_nolock(MSVCRT_wint_t, MSVCRT_FILE*);
958 int __cdecl MSVCRT__fseeki64_nolock(MSVCRT_FILE*,__int64,int);
959 __int64 __cdecl MSVCRT__ftelli64(MSVCRT_FILE* file);
960 __int64 __cdecl MSVCRT__ftelli64_nolock(MSVCRT_FILE*);
961 void __cdecl MSVCRT__exit(int);
962 void __cdecl MSVCRT_abort(void);
963 MSVCRT_ulong* __cdecl MSVCRT___doserrno(void);
964 int* __cdecl MSVCRT__errno(void);
965 char* __cdecl MSVCRT_getenv(const char*);
966 MSVCRT_size_t __cdecl MSVCRT__fread_nolock(void*,MSVCRT_size_t,MSVCRT_size_t,MSVCRT_FILE*);
967 MSVCRT_size_t __cdecl MSVCRT__fread_nolock_s(void*,MSVCRT_size_t,MSVCRT_size_t,MSVCRT_size_t,MSVCRT_FILE*);
968 MSVCRT_size_t __cdecl MSVCRT__fwrite_nolock(const void*,MSVCRT_size_t,MSVCRT_size_t,MSVCRT_FILE*);
969 int __cdecl MSVCRT_fclose(MSVCRT_FILE*);
970 int __cdecl MSVCRT__fclose_nolock(MSVCRT_FILE*);
971 int __cdecl MSVCRT__fflush_nolock(MSVCRT_FILE*);
972 void __cdecl MSVCRT_terminate(void);
973 MSVCRT_FILE* __cdecl MSVCRT__iob_func(void);
974 MSVCRT_clock_t __cdecl MSVCRT_clock(void);
975 MSVCRT___time32_t __cdecl MSVCRT__time32(MSVCRT___time32_t*);
976 MSVCRT___time64_t __cdecl MSVCRT__time64(MSVCRT___time64_t*);
977 MSVCRT_FILE* __cdecl MSVCRT__fdopen(int, const char *);
978 MSVCRT_FILE* __cdecl MSVCRT__wfdopen(int, const MSVCRT_wchar_t *);
979 int __cdecl MSVCRT_vsnprintf(char *str, MSVCRT_size_t len, const char *format, __ms_va_list valist);
980 int __cdecl MSVCRT_vsnwprintf(MSVCRT_wchar_t *str, MSVCRT_size_t len,
981 const MSVCRT_wchar_t *format, __ms_va_list valist );
982 int __cdecl MSVCRT__snwprintf(MSVCRT_wchar_t*, unsigned int, const MSVCRT_wchar_t*, ...);
983 int __cdecl MSVCRT_sprintf(char*,const char*,...);
984 int __cdecl MSVCRT__snprintf(char*,unsigned int,const char*,...);
985 int __cdecl MSVCRT__scprintf(const char*,...);
986 int __cdecl MSVCRT_raise(int sig);
987 int __cdecl MSVCRT__set_printf_count_output(int);
989 #define MSVCRT__ENABLE_PER_THREAD_LOCALE 1
990 #define MSVCRT__DISABLE_PER_THREAD_LOCALE 2
992 extern MSVCRT__locale_t MSVCRT_locale;
993 MSVCRT_pthreadlocinfo get_locinfo(void) DECLSPEC_HIDDEN;
994 MSVCRT_pthreadmbcinfo get_mbcinfo(void) DECLSPEC_HIDDEN;
995 void __cdecl MSVCRT__free_locale(MSVCRT__locale_t);
996 void free_locinfo(MSVCRT_pthreadlocinfo) DECLSPEC_HIDDEN;
997 void free_mbcinfo(MSVCRT_pthreadmbcinfo) DECLSPEC_HIDDEN;
998 int _setmbcp_l(int, LCID, MSVCRT_pthreadmbcinfo) DECLSPEC_HIDDEN;
1000 #ifndef __WINE_MSVCRT_TEST
1001 int __cdecl MSVCRT__write(int,const void*,unsigned int);
1002 int __cdecl _getch(void);
1003 int __cdecl _ismbblead(unsigned int);
1004 int __cdecl _ismbclegal(unsigned int c);
1005 int __cdecl _ismbstrail(const unsigned char* start, const unsigned char* str);
1006 int __cdecl MSVCRT_mbtowc(MSVCRT_wchar_t*,const char*,MSVCRT_size_t);
1007 MSVCRT_size_t __cdecl MSVCRT_mbstowcs(MSVCRT_wchar_t*,const char*,MSVCRT_size_t);
1008 MSVCRT_size_t __cdecl MSVCRT_wcstombs(char*,const MSVCRT_wchar_t*,MSVCRT_size_t);
1009 MSVCRT_intptr_t __cdecl MSVCRT__spawnve(int,const char*,const char* const *,const char* const *);
1010 MSVCRT_intptr_t __cdecl MSVRT__spawnvpe(int,const char*,const char* const *,const char* const *);
1011 MSVCRT_intptr_t __cdecl MSVCRT__wspawnve(int,const MSVCRT_wchar_t*,const MSVCRT_wchar_t* const *,const MSVCRT_wchar_t* const *);
1012 MSVCRT_intptr_t __cdecl MSVCRT__wspawnvpe(int,const MSVCRT_wchar_t*,const MSVCRT_wchar_t* const *,const MSVCRT_wchar_t* const *);
1013 void __cdecl MSVCRT__searchenv(const char*,const char*,char*);
1014 int __cdecl MSVCRT__getdrive(void);
1015 char* __cdecl MSVCRT__strdup(const char*);
1016 char* __cdecl MSVCRT__strnset(char*,int,MSVCRT_size_t);
1017 char* __cdecl _strset(char*,int);
1018 int __cdecl _ungetch(int);
1019 int __cdecl _cputs(const char*);
1020 int __cdecl _cprintf(const char*,...);
1021 int __cdecl _cwprintf(const MSVCRT_wchar_t*,...);
1022 char*** __cdecl MSVCRT___p__environ(void);
1023 int* __cdecl __p___mb_cur_max(void);
1024 unsigned int* __cdecl __p__fmode(void);
1025 MSVCRT_wchar_t* __cdecl MSVCRT__wcsdup(const MSVCRT_wchar_t*);
1026 MSVCRT_wchar_t*** __cdecl MSVCRT___p__wenviron(void);
1027 INT __cdecl MSVCRT_wctomb(char*,MSVCRT_wchar_t);
1028 char* __cdecl MSVCRT__strdate(char* date);
1029 char* __cdecl MSVCRT__strtime(char* date);
1030 int __cdecl _setmbcp(int);
1031 int __cdecl MSVCRT__close(int);
1032 int __cdecl MSVCRT__dup(int);
1033 int __cdecl MSVCRT__dup2(int, int);
1034 int __cdecl MSVCRT__pipe(int *, unsigned int, int);
1035 MSVCRT_wchar_t* __cdecl MSVCRT__wgetenv(const MSVCRT_wchar_t*);
1036 void __cdecl MSVCRT__wsearchenv(const MSVCRT_wchar_t*, const MSVCRT_wchar_t*, MSVCRT_wchar_t*);
1037 MSVCRT_intptr_t __cdecl MSVCRT__spawnvpe(int, const char*, const char* const*, const char* const*);
1038 void __cdecl MSVCRT__invalid_parameter(const MSVCRT_wchar_t *expr, const MSVCRT_wchar_t *func,
1039 const MSVCRT_wchar_t *file, unsigned int line, MSVCRT_uintptr_t arg);
1040 int __cdecl MSVCRT__toupper_l(int,MSVCRT__locale_t);
1041 int __cdecl MSVCRT__tolower_l(int,MSVCRT__locale_t);
1042 int __cdecl MSVCRT__strnicoll_l(const char*, const char*, MSVCRT_size_t, MSVCRT__locale_t);
1043 int __cdecl MSVCRT__strncoll_l(const char*, const char*, MSVCRT_size_t, MSVCRT__locale_t);
1044 unsigned int __cdecl MSVCRT__get_output_format(void);
1045 char* __cdecl MSVCRT_strtok_s(char*, const char*, char**);
1047 /* Maybe one day we'll enable the invalid parameter handlers with the full set of information (msvcrXXd)
1048 * #define MSVCRT_INVALID_PMT(x) MSVCRT_call_invalid_parameter_handler(x, __FUNCTION__, __FILE__, __LINE__, 0)
1049 * #define MSVCRT_CHECK_PMT(x) ((x) ? TRUE : MSVCRT_INVALID_PMT(#x),FALSE)
1050 * Until this is done, just keep the same semantics for CHECK_PMT(), but without generating / sending
1051 * any information
1052 * NB : MSVCRT_call_invalid_parameter_handler is a wrapper around MSVCRT__invalid_parameter in order
1053 * to do the Ansi to Unicode transformation
1055 #define MSVCRT_INVALID_PMT(x,err) (*MSVCRT__errno() = (err), MSVCRT__invalid_parameter(NULL, NULL, NULL, 0, 0))
1056 #define MSVCRT_CHECK_PMT_ERR(x,err) ((x) || (MSVCRT_INVALID_PMT( 0, (err) ), FALSE))
1057 #define MSVCRT_CHECK_PMT(x) MSVCRT_CHECK_PMT_ERR((x), MSVCRT_EINVAL)
1058 #endif
1060 #define MSVCRT__ARGMAX 100
1061 typedef int (*puts_clbk_a)(void*, int, const char*);
1062 typedef int (*puts_clbk_w)(void*, int, const MSVCRT_wchar_t*);
1063 typedef union _printf_arg
1065 void *get_ptr;
1066 int get_int;
1067 LONGLONG get_longlong;
1068 double get_double;
1069 } printf_arg;
1070 typedef printf_arg (*args_clbk)(void*, int, int, __ms_va_list*);
1071 int pf_printf_a(puts_clbk_a, void*, const char*, MSVCRT__locale_t,
1072 BOOL, BOOL, args_clbk, void*, __ms_va_list*) DECLSPEC_HIDDEN;
1073 int pf_printf_w(puts_clbk_w, void*, const MSVCRT_wchar_t*, MSVCRT__locale_t,
1074 BOOL, BOOL, args_clbk, void*, __ms_va_list*) DECLSPEC_HIDDEN;
1075 printf_arg arg_clbk_valist(void*, int, int, __ms_va_list*) DECLSPEC_HIDDEN;
1077 #define MSVCRT_FLT_MIN 1.175494351e-38F
1078 #define MSVCRT_DBL_MIN 2.2250738585072014e-308
1079 #define MSVCRT__OVERFLOW 3
1080 #define MSVCRT__UNDERFLOW 4
1082 typedef struct
1084 float f;
1085 } MSVCRT__CRT_FLOAT;
1087 typedef struct
1089 double x;
1090 } MSVCRT__CRT_DOUBLE;
1092 extern char* __cdecl __unDName(char *,const char*,int,malloc_func_t,free_func_t,unsigned short int);
1094 /* __unDName/__unDNameEx flags */
1095 #define UNDNAME_COMPLETE (0x0000)
1096 #define UNDNAME_NO_LEADING_UNDERSCORES (0x0001) /* Don't show __ in calling convention */
1097 #define UNDNAME_NO_MS_KEYWORDS (0x0002) /* Don't show calling convention at all */
1098 #define UNDNAME_NO_FUNCTION_RETURNS (0x0004) /* Don't show function/method return value */
1099 #define UNDNAME_NO_ALLOCATION_MODEL (0x0008)
1100 #define UNDNAME_NO_ALLOCATION_LANGUAGE (0x0010)
1101 #define UNDNAME_NO_MS_THISTYPE (0x0020)
1102 #define UNDNAME_NO_CV_THISTYPE (0x0040)
1103 #define UNDNAME_NO_THISTYPE (0x0060)
1104 #define UNDNAME_NO_ACCESS_SPECIFIERS (0x0080) /* Don't show access specifier (public/protected/private) */
1105 #define UNDNAME_NO_THROW_SIGNATURES (0x0100)
1106 #define UNDNAME_NO_MEMBER_TYPE (0x0200) /* Don't show static/virtual specifier */
1107 #define UNDNAME_NO_RETURN_UDT_MODEL (0x0400)
1108 #define UNDNAME_32_BIT_DECODE (0x0800)
1109 #define UNDNAME_NAME_ONLY (0x1000) /* Only report the variable/method name */
1110 #define UNDNAME_NO_ARGUMENTS (0x2000) /* Don't show method arguments */
1111 #define UNDNAME_NO_SPECIAL_SYMS (0x4000)
1112 #define UNDNAME_NO_COMPLEX_TYPE (0x8000)
1114 #endif /* __WINE_MSVCRT_H */