cmd: Fix subdirectory prefix in for loops.
[wine.git] / dlls / msvcp90 / msvcp90.h
blob16eaa48c53fc91076b8a693137c621ebe3532db9
1 /*
2 * Copyright 2010 Piotr Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include "stdlib.h"
20 #include "windef.h"
21 #include "cxx.h"
23 #define ALIGNED_SIZE(size, alignment) (((size)+((alignment)-1))/(alignment)*(alignment))
25 typedef unsigned char MSVCP_bool;
26 typedef SIZE_T MSVCP_size_t;
28 #if _MSVCP_VER >= 100
29 typedef __int64 DECLSPEC_ALIGN(8) streamoff;
30 typedef __int64 DECLSPEC_ALIGN(8) streamsize;
31 #define STREAMOFF_BITS 64
32 #define STREAMSIZE_BITS 64
33 #else
34 typedef SSIZE_T streamoff;
35 typedef SSIZE_T streamsize;
36 #define STREAMOFF_BITS 32
37 #define STREAMSIZE_BITS 32
38 #endif
40 void __cdecl _invalid_parameter_noinfo(void);
41 void __cdecl _invalid_parameter(const wchar_t*, const wchar_t*,
42 const wchar_t*, unsigned int, uintptr_t);
43 BOOL __cdecl __uncaught_exception(void);
44 int __cdecl _callnewh(size_t);
46 extern void* (__cdecl *MSVCRT_operator_new)(MSVCP_size_t);
47 extern void (__cdecl *MSVCRT_operator_delete)(void*);
48 extern void* (__cdecl *MSVCRT_set_new_handler)(void*);
50 #if _MSVCP_VER >= 140
51 extern int* (__cdecl *UCRTBASE___processing_throw)(void);
52 #endif
54 #if _MSVCP_VER >= 110
55 /* keep in sync with msvcrt/lock.c */
56 typedef struct cs_queue
58 struct cs_queue *next;
59 BOOL free;
60 int unknown;
61 } cs_queue;
63 typedef struct
65 ULONG_PTR unk_thread_id;
66 cs_queue unk_active;
67 void *unknown[2];
68 cs_queue *head;
69 void *tail;
70 } critical_section;
72 extern critical_section* (__thiscall *critical_section_ctor)(critical_section*);
73 extern void (__thiscall *critical_section_dtor)(critical_section*);
74 extern void (__thiscall *critical_section_lock)(critical_section*);
75 extern void (__thiscall *critical_section_unlock)(critical_section*);
76 extern MSVCP_bool (__thiscall *critical_section_trylock)(critical_section*);
77 #endif
79 #if _MSVCP_VER >= 100
80 extern MSVCP_bool (__cdecl *Context_IsCurrentTaskCollectionCanceling)(void);
81 #endif
83 /* basic_string<char, char_traits<char>, allocator<char>> */
84 typedef struct
86 #if _MSVCP_VER <= 90
87 void *allocator;
88 #endif
89 union {
90 #if _MSVCP_VER >= 70
91 #define BUF_SIZE_CHAR 16
92 char buf[BUF_SIZE_CHAR];
93 #endif
94 char *ptr;
95 } data;
96 MSVCP_size_t size;
97 MSVCP_size_t res;
98 #if _MSVCP_VER == 100
99 char allocator;
100 #endif
101 } basic_string_char;
103 basic_string_char* __thiscall MSVCP_basic_string_char_ctor(basic_string_char*);
104 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr(basic_string_char*, const char*);
105 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr_len(basic_string_char*, const char*, MSVCP_size_t);
106 basic_string_char* __thiscall MSVCP_basic_string_char_copy_ctor(basic_string_char*, const basic_string_char*);
107 void* __thiscall MSVCP_basic_string_char_dtor(basic_string_char*);
108 const char* __thiscall MSVCP_basic_string_char_c_str(const basic_string_char*);
109 void __thiscall MSVCP_basic_string_char_clear(basic_string_char*);
110 basic_string_char* __thiscall MSVCP_basic_string_char_append_ch(basic_string_char*, char);
111 MSVCP_size_t __thiscall MSVCP_basic_string_char_length(const basic_string_char*);
112 basic_string_char* __thiscall MSVCP_basic_string_char_assign(basic_string_char*, const basic_string_char*);
114 typedef struct
116 #if _MSVCP_VER <= 90
117 void *allocator;
118 #endif
119 union {
120 #if _MSVCP_VER >= 70
121 #define BUF_SIZE_WCHAR 8
122 wchar_t buf[BUF_SIZE_WCHAR];
123 #endif
124 wchar_t *ptr;
125 } data;
126 MSVCP_size_t size;
127 MSVCP_size_t res;
128 #if _MSVCP_VER == 100
129 char allocator;
130 #endif
131 } basic_string_wchar;
133 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor(basic_string_wchar*);
134 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr(basic_string_wchar*, const wchar_t*);
135 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr_len(basic_string_wchar*, const wchar_t*, MSVCP_size_t);
136 void* __thiscall MSVCP_basic_string_wchar_dtor(basic_string_wchar*);
137 const wchar_t* __thiscall MSVCP_basic_string_wchar_c_str(const basic_string_wchar*);
138 void __thiscall MSVCP_basic_string_wchar_clear(basic_string_wchar*);
139 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_ch(basic_string_wchar*, wchar_t);
140 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_length(const basic_string_wchar*);
142 char* __thiscall MSVCP_allocator_char_allocate(void*, MSVCP_size_t);
143 void __thiscall MSVCP_allocator_char_deallocate(void*, char*, MSVCP_size_t);
144 MSVCP_size_t __thiscall MSVCP_allocator_char_max_size(const void*);
145 wchar_t* __thiscall MSVCP_allocator_wchar_allocate(void*, MSVCP_size_t);
146 void __thiscall MSVCP_allocator_wchar_deallocate(void*, wchar_t*, MSVCP_size_t);
147 MSVCP_size_t __thiscall MSVCP_allocator_wchar_max_size(const void*);
149 typedef struct
151 char *str;
152 char null_str;
153 } _Yarn_char;
155 _Yarn_char* __thiscall _Yarn_char_ctor(_Yarn_char*);
156 _Yarn_char* __thiscall _Yarn_char_ctor_cstr(_Yarn_char*, const char*);
157 _Yarn_char* __thiscall _Yarn_char_copy_ctor(_Yarn_char*, const _Yarn_char*);
158 const char* __thiscall _Yarn_char_c_str(const _Yarn_char*);
159 void __thiscall _Yarn_char_dtor(_Yarn_char*);
160 _Yarn_char* __thiscall _Yarn_char_op_assign(_Yarn_char*, const _Yarn_char*);
162 typedef struct
164 wchar_t *str;
165 wchar_t null_str;
166 } _Yarn_wchar;
168 _Yarn_wchar* __thiscall _Yarn_wchar_ctor(_Yarn_wchar*);
169 const wchar_t* __thiscall _Yarn_wchar__C_str(const _Yarn_wchar*);
170 void __thiscall _Yarn_wchar_dtor(_Yarn_wchar*);
171 _Yarn_wchar* __thiscall _Yarn_wchar_op_assign_cstr(_Yarn_wchar*, const wchar_t*);
173 /* class locale::facet */
174 typedef struct {
175 const vtable_ptr *vtable;
176 MSVCP_size_t refs;
177 } locale_facet;
179 typedef enum {
180 CODECVT_ok = 0,
181 CODECVT_partial = 1,
182 CODECVT_error = 2,
183 CODECVT_noconv = 3
184 } codecvt_base_result;
186 typedef struct {
187 #if _MSVCP_VER < 110
188 LCID handle;
189 #endif
190 unsigned page;
191 const short *table;
192 int delfl;
193 #if _MSVCP_VER >= 110
194 wchar_t *name;
195 #endif
196 } _Ctypevec;
198 #if _MSVCP_VER >= 140
199 typedef struct {
200 int wchar;
201 unsigned short byte, state;
202 } _Mbstatet;
203 #define MBSTATET_TO_INT(state) ((state)->wchar)
204 #else
205 typedef int _Mbstatet;
206 #define MBSTATET_TO_INT(state) (*(state))
207 #endif
209 /* class codecvt_base */
210 typedef struct {
211 locale_facet facet;
212 } codecvt_base;
214 /* class codecvt<char> */
215 typedef struct {
216 codecvt_base base;
217 } codecvt_char;
219 MSVCP_bool __thiscall codecvt_base_always_noconv(const codecvt_base*);
220 int __thiscall codecvt_char_unshift(const codecvt_char*, _Mbstatet*, char*, char*, char**);
221 int __thiscall codecvt_char_out(const codecvt_char*, _Mbstatet*, const char*,
222 const char*, const char**, char*, char*, char**);
223 int __thiscall codecvt_char_in(const codecvt_char*, _Mbstatet*, const char*,
224 const char*, const char**, char*, char*, char**);
225 int __thiscall codecvt_base_max_length(const codecvt_base*);
227 typedef struct {
228 #if _MSVCP_VER < 110
229 LCID handle;
230 #endif
231 unsigned page;
232 #if _MSVCP_VER >= 110
233 int mb_max;
234 int unk;
235 BYTE isleadbyte[32];
236 #endif
237 } _Cvtvec;
239 /* class codecvt<wchar> */
240 typedef struct {
241 codecvt_base base;
242 _Cvtvec cvt;
243 } codecvt_wchar;
245 int __thiscall codecvt_wchar_unshift(const codecvt_wchar*, _Mbstatet*, char*, char*, char**);
246 int __thiscall codecvt_wchar_out(const codecvt_wchar*, _Mbstatet*, const wchar_t*,
247 const wchar_t*, const wchar_t**, char*, char*, char**);
248 int __thiscall codecvt_wchar_in(const codecvt_wchar*, _Mbstatet*, const char*,
249 const char*, const char**, wchar_t*, wchar_t*, wchar_t**);
251 /* class ctype_base */
252 typedef struct {
253 locale_facet facet;
254 } ctype_base;
256 /* class ctype<char> */
257 typedef struct {
258 ctype_base base;
259 _Ctypevec ctype;
260 } ctype_char;
262 MSVCP_bool __thiscall ctype_char_is_ch(const ctype_char*, short, char);
263 char __thiscall ctype_char_narrow_ch(const ctype_char*, char, char);
264 char __thiscall ctype_char_widen_ch(const ctype_char*, char);
266 /* class ctype<wchar> */
267 typedef struct {
268 ctype_base base;
269 _Ctypevec ctype;
270 _Cvtvec cvt;
271 } ctype_wchar;
273 MSVCP_bool __thiscall ctype_wchar_is_ch(const ctype_wchar*, short, wchar_t);
274 char __thiscall ctype_wchar_narrow_ch(const ctype_wchar*, wchar_t, char);
275 wchar_t __thiscall ctype_wchar_widen_ch(const ctype_wchar*, char);
277 /* class locale */
278 typedef struct
280 #if _MSVCP_VER >= 140
281 int unused;
282 #endif
283 struct _locale__Locimp *ptr;
284 } locale;
286 locale* __thiscall locale_ctor(locale*);
287 locale* __thiscall locale_copy_ctor(locale*, const locale*);
288 locale* __thiscall locale_operator_assign(locale*, const locale*);
289 void __thiscall locale_dtor(locale*);
290 void free_locale(void);
291 codecvt_char* codecvt_char_use_facet(const locale*);
292 codecvt_wchar* codecvt_wchar_use_facet(const locale*);
293 codecvt_wchar* codecvt_short_use_facet(const locale*);
294 ctype_char* ctype_char_use_facet(const locale*);
295 ctype_wchar* ctype_wchar_use_facet(const locale*);
296 ctype_wchar* ctype_short_use_facet(const locale*);
298 /* class _Lockit */
299 typedef struct {
300 #if _MSVCP_VER >= 70
301 int locktype;
302 #else
303 char empty_struct;
304 #endif
305 } _Lockit;
307 #define _LOCK_LOCALE 0
308 #define _LOCK_MALLOC 1
309 #define _LOCK_STREAM 2
310 #define _LOCK_DEBUG 3
311 #define _MAX_LOCK 4
313 void init_lockit(void);
314 void free_lockit(void);
315 _Lockit* __thiscall _Lockit_ctor_locktype(_Lockit*, int);
316 void __thiscall _Lockit_dtor(_Lockit*);
318 /* class mutex */
319 typedef struct {
320 void *mutex;
321 } mutex;
323 mutex* __thiscall mutex_ctor(mutex*);
324 void __thiscall mutex_dtor(mutex*);
325 void __thiscall mutex_lock(mutex*);
326 void __thiscall mutex_unlock(mutex*);
328 typedef enum {
329 FMTFLAG_skipws = 0x0001,
330 FMTFLAG_unitbuf = 0x0002,
331 FMTFLAG_uppercase = 0x0004,
332 FMTFLAG_showbase = 0x0008,
333 FMTFLAG_showpoint = 0x0010,
334 FMTFLAG_showpos = 0x0020,
335 FMTFLAG_left = 0x0040,
336 FMTFLAG_right = 0x0080,
337 FMTFLAG_internal = 0x0100,
338 FMTFLAG_dec = 0x0200,
339 FMTFLAG_oct = 0x0400,
340 FMTFLAG_hex = 0x0800,
341 FMTFLAG_scientific = 0x1000,
342 FMTFLAG_fixed = 0x2000,
343 FMTFLAG_hexfloat = 0x3000,
344 FMTFLAG_boolalpha = 0x4000,
345 FMTFLAG_stdio = 0x8000,
346 FMTFLAG_adjustfield = FMTFLAG_left|FMTFLAG_right|FMTFLAG_internal,
347 FMTFLAG_basefield = FMTFLAG_dec|FMTFLAG_oct|FMTFLAG_hex,
348 FMTFLAG_floatfield = FMTFLAG_scientific|FMTFLAG_fixed,
349 FMTFLAG_mask = 0xffff
350 } IOSB_fmtflags;
352 typedef enum {
353 OPENMODE_in = 0x01,
354 OPENMODE_out = 0x02,
355 OPENMODE_ate = 0x04,
356 OPENMODE_app = 0x08,
357 OPENMODE_trunc = 0x10,
358 OPENMODE__Nocreate = 0x40,
359 OPENMODE__Noreplace = 0x80,
360 OPENMODE_binary = 0x20,
361 OPENMODE_mask = 0xff
362 } IOSB_openmode;
364 typedef enum {
365 SEEKDIR_beg = 0x0,
366 SEEKDIR_cur = 0x1,
367 SEEKDIR_end = 0x2,
368 SEEKDIR_mask = 0x3
369 } IOSB_seekdir;
371 typedef enum {
372 IOSTATE_goodbit = 0x00,
373 IOSTATE_eofbit = 0x01,
374 IOSTATE_failbit = 0x02,
375 IOSTATE_badbit = 0x04,
376 IOSTATE__Hardfail = 0x10,
377 IOSTATE_mask = 0x17
378 } IOSB_iostate;
380 typedef struct _iosarray {
381 struct _iosarray *next;
382 int index;
383 int long_val;
384 void *ptr_val;
385 } IOS_BASE_iosarray;
387 typedef enum {
388 EVENT_erase_event,
389 EVENT_imbue_event,
390 EVENT_copyfmt_event
391 } IOS_BASE_event;
393 struct _ios_base;
394 typedef void (CDECL *IOS_BASE_event_callback)(IOS_BASE_event, struct _ios_base*, int);
395 typedef struct _fnarray {
396 struct _fnarray *next;
397 int index;
398 IOS_BASE_event_callback event_handler;
399 } IOS_BASE_fnarray;
401 /* class ios_base */
402 typedef struct _ios_base {
403 const vtable_ptr *vtable;
404 #if _MSVCP_VER >= 100
405 MSVCP_size_t DECLSPEC_ALIGN(8) stdstr;
406 #elif _MSVCP_VER >= 71
407 MSVCP_size_t stdstr;
408 #endif
409 IOSB_iostate state;
410 IOSB_iostate except;
411 IOSB_fmtflags fmtfl;
412 streamsize prec;
413 streamsize wide;
414 IOS_BASE_iosarray *arr;
415 IOS_BASE_fnarray *calls;
416 #if _MSVCP_VER < 70
417 locale loc;
418 #else
419 locale *loc;
420 #endif
421 #if _MSVCP_VER <= 70
422 MSVCP_size_t stdstr;
423 #endif
424 } ios_base;
426 /* class basic_streambuf<char> */
427 typedef struct {
428 const vtable_ptr *vtable;
429 #if _MSVCP_VER >= 70 && _MSVCP_VER <= 100
430 mutex lock;
431 #endif
432 char *rbuf;
433 char *wbuf;
434 char **prbuf;
435 char **pwbuf;
436 char *rpos;
437 char *wpos;
438 char **prpos;
439 char **pwpos;
440 int rsize;
441 int wsize;
442 int *prsize;
443 int *pwsize;
444 #if _MSVCP_VER < 70
445 locale loc;
446 #else
447 locale *loc;
448 #endif
449 } basic_streambuf_char;
451 typedef struct {
452 basic_streambuf_char *strbuf;
453 MSVCP_bool got;
454 char val;
455 } istreambuf_iterator_char;
457 typedef struct {
458 #if _MSVCP_VER == 80
459 void *iter_container;
460 #endif
461 MSVCP_bool failed;
462 basic_streambuf_char *strbuf;
463 } ostreambuf_iterator_char;
465 int __thiscall basic_streambuf_char_sgetc(basic_streambuf_char*);
466 int __thiscall basic_streambuf_char_sbumpc(basic_streambuf_char*);
467 int __thiscall basic_streambuf_char_sputc(basic_streambuf_char*, char);
469 /* class basic_streambuf<wchar> */
470 typedef struct {
471 const vtable_ptr *vtable;
472 #if _MSVCP_VER >= 70 && _MSVCP_VER <= 100
473 mutex lock;
474 #endif
475 wchar_t *rbuf;
476 wchar_t *wbuf;
477 wchar_t **prbuf;
478 wchar_t **pwbuf;
479 wchar_t *rpos;
480 wchar_t *wpos;
481 wchar_t **prpos;
482 wchar_t **pwpos;
483 int rsize;
484 int wsize;
485 int *prsize;
486 int *pwsize;
487 #if _MSVCP_VER < 70
488 locale loc;
489 #else
490 locale *loc;
491 #endif
492 } basic_streambuf_wchar;
494 typedef struct {
495 basic_streambuf_wchar *strbuf;
496 MSVCP_bool got;
497 wchar_t val;
498 } istreambuf_iterator_wchar;
500 typedef struct {
501 #if _MSVCP_VER == 80
502 void *iter_container;
503 #endif
504 MSVCP_bool failed;
505 basic_streambuf_wchar *strbuf;
506 } ostreambuf_iterator_wchar;
508 unsigned short __thiscall basic_streambuf_wchar_sgetc(basic_streambuf_wchar*);
509 unsigned short __thiscall basic_streambuf_wchar_sbumpc(basic_streambuf_wchar*);
510 unsigned short __thiscall basic_streambuf_wchar_sputc(basic_streambuf_wchar*, wchar_t);
512 #if _MSVCP_VER < 70
513 #define IOS_LOCALE(ios) (&(ios)->loc)
514 #else
515 #define IOS_LOCALE(ios) ((ios)->loc)
516 #endif
518 /* class num_get<char> */
519 typedef struct {
520 locale_facet facet;
521 #if _MSVCP_VER <= 100
522 _Cvtvec cvt;
523 #endif
524 } num_get;
526 num_get* num_get_char_use_facet(const locale*);
527 istreambuf_iterator_char* __thiscall num_get_char_get_long(const num_get*, istreambuf_iterator_char*,
528 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONG*);
529 istreambuf_iterator_char* __thiscall num_get_char_get_ushort(const num_get*, istreambuf_iterator_char*,
530 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned short*);
531 istreambuf_iterator_char* __thiscall num_get_char_get_uint(const num_get*, istreambuf_iterator_char*,
532 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned int*);
533 istreambuf_iterator_char* __thiscall num_get_char_get_ulong(const num_get*, istreambuf_iterator_char*,
534 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONG*);
535 istreambuf_iterator_char* __thiscall num_get_char_get_float(const num_get*, istreambuf_iterator_char*,
536 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, float*);
537 istreambuf_iterator_char *__thiscall num_get_char_get_double(const num_get*, istreambuf_iterator_char*,
538 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*);
539 istreambuf_iterator_char *__thiscall num_get_char_get_ldouble(const num_get*, istreambuf_iterator_char*,
540 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*);
541 istreambuf_iterator_char *__thiscall num_get_char_get_void(const num_get*, istreambuf_iterator_char*,
542 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, void**);
543 istreambuf_iterator_char *__thiscall num_get_char_get_int64(const num_get*, istreambuf_iterator_char*,
544 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONGLONG*);
545 istreambuf_iterator_char *__thiscall num_get_char_get_uint64(const num_get*, istreambuf_iterator_char*,
546 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONGLONG*);
547 istreambuf_iterator_char *__thiscall num_get_char_get_bool(const num_get*, istreambuf_iterator_char*,
548 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, MSVCP_bool*);
550 num_get* num_get_wchar_use_facet(const locale*);
551 num_get* num_get_short_use_facet(const locale*);
552 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_long(const num_get*, istreambuf_iterator_wchar*,
553 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONG*);
554 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_ushort(const num_get*, istreambuf_iterator_wchar*,
555 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned short*);
556 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_uint(const num_get*, istreambuf_iterator_wchar*,
557 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned int*);
558 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_ulong(const num_get*, istreambuf_iterator_wchar*,
559 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONG*);
560 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_float(const num_get*, istreambuf_iterator_wchar*,
561 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, float*);
562 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_double(const num_get*, istreambuf_iterator_wchar*,
563 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*);
564 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_ldouble(const num_get*, istreambuf_iterator_wchar*,
565 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*);
566 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_void(const num_get*, istreambuf_iterator_wchar*,
567 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, void**);
568 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_int64(const num_get*, istreambuf_iterator_wchar*,
569 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONGLONG*);
570 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_uint64(const num_get*, istreambuf_iterator_wchar*,
571 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONGLONG*);
572 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_bool(const num_get*, istreambuf_iterator_wchar*,
573 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, MSVCP_bool*);
575 /* class num_put<char> */
576 /* class num_put<wchar> */
577 typedef struct {
578 locale_facet facet;
579 #if _MSVCP_VER < 110
580 _Cvtvec cvt;
581 #endif
582 } num_put;
584 num_put* num_put_char_use_facet(const locale*);
585 ostreambuf_iterator_char* __thiscall num_put_char_put_long(const num_put*, ostreambuf_iterator_char*,
586 ostreambuf_iterator_char, ios_base*, char, LONG);
587 ostreambuf_iterator_char* __thiscall num_put_char_put_ulong(const num_put*, ostreambuf_iterator_char*,
588 ostreambuf_iterator_char, ios_base*, char, ULONG);
589 ostreambuf_iterator_char* __thiscall num_put_char_put_double(const num_put*, ostreambuf_iterator_char*,
590 ostreambuf_iterator_char, ios_base*, char, double);
591 ostreambuf_iterator_char* __thiscall num_put_char_put_ldouble(const num_put*, ostreambuf_iterator_char*,
592 ostreambuf_iterator_char, ios_base*, char, double);
593 ostreambuf_iterator_char* __thiscall num_put_char_put_ptr(const num_put*, ostreambuf_iterator_char*,
594 ostreambuf_iterator_char, ios_base*, char, const void*);
595 ostreambuf_iterator_char* __thiscall num_put_char_put_int64(const num_put*, ostreambuf_iterator_char*,
596 ostreambuf_iterator_char, ios_base*, char, __int64);
597 ostreambuf_iterator_char* __thiscall num_put_char_put_uint64(const num_put*, ostreambuf_iterator_char*,
598 ostreambuf_iterator_char, ios_base*, char, unsigned __int64);
599 ostreambuf_iterator_char* __thiscall num_put_char_put_bool(const num_put*, ostreambuf_iterator_char*,
600 ostreambuf_iterator_char, ios_base*, char, MSVCP_bool);
602 num_put* num_put_wchar_use_facet(const locale*);
603 num_put* num_put_short_use_facet(const locale*);
604 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_long(const num_put*, ostreambuf_iterator_wchar*,
605 ostreambuf_iterator_wchar, ios_base*, wchar_t, LONG);
606 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_ulong(const num_put*, ostreambuf_iterator_wchar*,
607 ostreambuf_iterator_wchar, ios_base*, wchar_t, ULONG);
608 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_double(const num_put*, ostreambuf_iterator_wchar*,
609 ostreambuf_iterator_wchar, ios_base*, wchar_t, double);
610 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_ldouble(const num_put*, ostreambuf_iterator_wchar*,
611 ostreambuf_iterator_wchar, ios_base*, wchar_t, double);
612 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_ptr(const num_put*, ostreambuf_iterator_wchar*,
613 ostreambuf_iterator_wchar, ios_base*, wchar_t, const void*);
614 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_int64(const num_put*, ostreambuf_iterator_wchar*,
615 ostreambuf_iterator_wchar, ios_base*, wchar_t, __int64);
616 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_uint64(const num_put*, ostreambuf_iterator_wchar*,
617 ostreambuf_iterator_wchar, ios_base*, wchar_t, unsigned __int64);
618 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_bool(const num_put*, ostreambuf_iterator_wchar*,
619 ostreambuf_iterator_wchar, ios_base*, wchar_t, MSVCP_bool);
621 void init_exception(void*);
622 void init_locale(void*);
623 void init_io(void*);
624 void free_io(void);
625 void init_misc(void*);
627 /* class complex<float> */
628 typedef struct {
629 float real;
630 float imag;
631 } complex_float;
633 /* class complex<double> */
634 /* class complex<long double> */
635 typedef struct {
636 double real;
637 double imag;
638 } complex_double;
640 #if _MSVCP_VER < 80
641 static inline int memcpy_wrapper( void *dst, size_t size, const void *src, size_t count )
643 memcpy( dst, src, count );
644 return 0;
646 static inline int memmove_wrapper( void *dst, size_t size, const void *src, size_t count )
648 memmove( dst, src, count );
649 return 0;
651 static inline int mbstowcs_wrapper( size_t *ret, wchar_t *wcs, size_t size, const char *mbs, size_t count )
653 mbstowcs( wcs, mbs, count );
654 return 0;
656 #define memcpy_s( dst, size, src, count ) memcpy_wrapper( dst, size, src, count )
657 #define memmove_s( dst, size, src, count ) memmove_wrapper( dst, size, src, count )
658 #define mbstowcs_s( ret, wcs, size, mbs, count ) mbstowcs_wrapper( ret, wcs, size, mbs, count )
659 #define hypotf( x, y ) ((float)hypot( (double)(x), (double)(y) ))
660 #endif
662 void free_misc(void);
664 #if _MSVCP_VER >= 140
665 #define UCRTBASE_PRINTF_STANDARD_SNPRINTF_BEHAVIOUR (0x0002)
666 int __cdecl __stdio_common_vsprintf(unsigned __int64 options, char *str, size_t len, const char *format,
667 _locale_t locale, __ms_va_list valist);
668 #endif