appwiz.cpl: Add __WINE_ALLOC_SIZE attributes to heap_xxx() functions.
[wine.git] / dlls / msvcp90 / msvcp90.h
blob86b787b075591c2707ee83f594ca5446f8e2dbb4
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 >= 110
51 /* keep in sync with msvcrt/lock.c */
52 typedef struct cs_queue
54 struct cs_queue *next;
55 BOOL free;
56 int unknown;
57 } cs_queue;
59 typedef struct
61 ULONG_PTR unk_thread_id;
62 cs_queue unk_active;
63 void *unknown[2];
64 cs_queue *head;
65 void *tail;
66 } critical_section;
68 extern critical_section* (__thiscall *critical_section_ctor)(critical_section*);
69 extern void (__thiscall *critical_section_dtor)(critical_section*);
70 extern void (__thiscall *critical_section_lock)(critical_section*);
71 extern void (__thiscall *critical_section_unlock)(critical_section*);
72 extern MSVCP_bool (__thiscall *critical_section_trylock)(critical_section*);
73 #endif
75 /* basic_string<char, char_traits<char>, allocator<char>> */
76 typedef struct
78 #if _MSVCP_VER <= 90
79 void *allocator;
80 #endif
81 union {
82 #if _MSVCP_VER >= 70
83 #define BUF_SIZE_CHAR 16
84 char buf[BUF_SIZE_CHAR];
85 #endif
86 char *ptr;
87 } data;
88 MSVCP_size_t size;
89 MSVCP_size_t res;
90 #if _MSVCP_VER == 100
91 char allocator;
92 #endif
93 } basic_string_char;
95 basic_string_char* __thiscall MSVCP_basic_string_char_ctor(basic_string_char*);
96 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr(basic_string_char*, const char*);
97 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr_len(basic_string_char*, const char*, MSVCP_size_t);
98 basic_string_char* __thiscall MSVCP_basic_string_char_copy_ctor(basic_string_char*, const basic_string_char*);
99 void* __thiscall MSVCP_basic_string_char_dtor(basic_string_char*);
100 const char* __thiscall MSVCP_basic_string_char_c_str(const basic_string_char*);
101 void __thiscall MSVCP_basic_string_char_clear(basic_string_char*);
102 basic_string_char* __thiscall MSVCP_basic_string_char_append_ch(basic_string_char*, char);
103 MSVCP_size_t __thiscall MSVCP_basic_string_char_length(const basic_string_char*);
104 basic_string_char* __thiscall MSVCP_basic_string_char_assign(basic_string_char*, const basic_string_char*);
106 typedef struct
108 #if _MSVCP_VER <= 90
109 void *allocator;
110 #endif
111 union {
112 #if _MSVCP_VER >= 70
113 #define BUF_SIZE_WCHAR 8
114 wchar_t buf[BUF_SIZE_WCHAR];
115 #endif
116 wchar_t *ptr;
117 } data;
118 MSVCP_size_t size;
119 MSVCP_size_t res;
120 #if _MSVCP_VER == 100
121 char allocator;
122 #endif
123 } basic_string_wchar;
125 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor(basic_string_wchar*);
126 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr(basic_string_wchar*, const wchar_t*);
127 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr_len(basic_string_wchar*, const wchar_t*, MSVCP_size_t);
128 void* __thiscall MSVCP_basic_string_wchar_dtor(basic_string_wchar*);
129 const wchar_t* __thiscall MSVCP_basic_string_wchar_c_str(const basic_string_wchar*);
130 void __thiscall MSVCP_basic_string_wchar_clear(basic_string_wchar*);
131 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_ch(basic_string_wchar*, wchar_t);
132 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_length(const basic_string_wchar*);
134 char* __thiscall MSVCP_allocator_char_allocate(void*, MSVCP_size_t);
135 void __thiscall MSVCP_allocator_char_deallocate(void*, char*, MSVCP_size_t);
136 MSVCP_size_t __thiscall MSVCP_allocator_char_max_size(const void*);
137 wchar_t* __thiscall MSVCP_allocator_wchar_allocate(void*, MSVCP_size_t);
138 void __thiscall MSVCP_allocator_wchar_deallocate(void*, wchar_t*, MSVCP_size_t);
139 MSVCP_size_t __thiscall MSVCP_allocator_wchar_max_size(const void*);
141 typedef struct
143 char *str;
144 char null_str;
145 } _Yarn_char;
147 _Yarn_char* __thiscall _Yarn_char_ctor(_Yarn_char*);
148 _Yarn_char* __thiscall _Yarn_char_ctor_cstr(_Yarn_char*, const char*);
149 _Yarn_char* __thiscall _Yarn_char_copy_ctor(_Yarn_char*, const _Yarn_char*);
150 const char* __thiscall _Yarn_char_c_str(const _Yarn_char*);
151 void __thiscall _Yarn_char_dtor(_Yarn_char*);
152 _Yarn_char* __thiscall _Yarn_char_op_assign(_Yarn_char*, const _Yarn_char*);
154 typedef struct
156 wchar_t *str;
157 wchar_t null_str;
158 } _Yarn_wchar;
160 _Yarn_wchar* __thiscall _Yarn_wchar_ctor(_Yarn_wchar*);
161 const wchar_t* __thiscall _Yarn_wchar__C_str(const _Yarn_wchar*);
162 void __thiscall _Yarn_wchar_dtor(_Yarn_wchar*);
163 _Yarn_wchar* __thiscall _Yarn_wchar_op_assign_cstr(_Yarn_wchar*, const wchar_t*);
165 /* class locale::facet */
166 typedef struct {
167 const vtable_ptr *vtable;
168 MSVCP_size_t refs;
169 } locale_facet;
171 typedef enum {
172 CODECVT_ok = 0,
173 CODECVT_partial = 1,
174 CODECVT_error = 2,
175 CODECVT_noconv = 3
176 } codecvt_base_result;
178 typedef struct {
179 #if _MSVCP_VER < 110
180 LCID handle;
181 #endif
182 unsigned page;
183 const short *table;
184 int delfl;
185 #if _MSVCP_VER >= 110
186 wchar_t *name;
187 #endif
188 } _Ctypevec;
190 #if _MSVCP_VER >= 140
191 typedef struct {
192 int wchar;
193 unsigned short byte, state;
194 } _Mbstatet;
195 #define MBSTATET_TO_INT(state) ((state)->wchar)
196 #else
197 typedef int _Mbstatet;
198 #define MBSTATET_TO_INT(state) (*(state))
199 #endif
201 /* class codecvt_base */
202 typedef struct {
203 locale_facet facet;
204 } codecvt_base;
206 /* class codecvt<char> */
207 typedef struct {
208 codecvt_base base;
209 } codecvt_char;
211 MSVCP_bool __thiscall codecvt_base_always_noconv(const codecvt_base*);
212 int __thiscall codecvt_char_unshift(const codecvt_char*, _Mbstatet*, char*, char*, char**);
213 int __thiscall codecvt_char_out(const codecvt_char*, _Mbstatet*, const char*,
214 const char*, const char**, char*, char*, char**);
215 int __thiscall codecvt_char_in(const codecvt_char*, _Mbstatet*, const char*,
216 const char*, const char**, char*, char*, char**);
217 int __thiscall codecvt_base_max_length(const codecvt_base*);
219 typedef struct {
220 #if _MSVCP_VER < 110
221 LCID handle;
222 #endif
223 unsigned page;
224 #if _MSVCP_VER >= 110
225 int mb_max;
226 int unk;
227 BYTE isleadbyte[32];
228 #endif
229 } _Cvtvec;
231 /* class codecvt<wchar> */
232 typedef struct {
233 codecvt_base base;
234 _Cvtvec cvt;
235 } codecvt_wchar;
237 int __thiscall codecvt_wchar_unshift(const codecvt_wchar*, _Mbstatet*, char*, char*, char**);
238 int __thiscall codecvt_wchar_out(const codecvt_wchar*, _Mbstatet*, const wchar_t*,
239 const wchar_t*, const wchar_t**, char*, char*, char**);
240 int __thiscall codecvt_wchar_in(const codecvt_wchar*, _Mbstatet*, const char*,
241 const char*, const char**, wchar_t*, wchar_t*, wchar_t**);
243 /* class ctype_base */
244 typedef struct {
245 locale_facet facet;
246 } ctype_base;
248 /* class ctype<char> */
249 typedef struct {
250 ctype_base base;
251 _Ctypevec ctype;
252 } ctype_char;
254 MSVCP_bool __thiscall ctype_char_is_ch(const ctype_char*, short, char);
255 char __thiscall ctype_char_narrow_ch(const ctype_char*, char, char);
256 char __thiscall ctype_char_widen_ch(const ctype_char*, char);
258 /* class ctype<wchar> */
259 typedef struct {
260 ctype_base base;
261 _Ctypevec ctype;
262 _Cvtvec cvt;
263 } ctype_wchar;
265 MSVCP_bool __thiscall ctype_wchar_is_ch(const ctype_wchar*, short, wchar_t);
266 char __thiscall ctype_wchar_narrow_ch(const ctype_wchar*, wchar_t, char);
267 wchar_t __thiscall ctype_wchar_widen_ch(const ctype_wchar*, char);
269 /* class locale */
270 typedef struct
272 #if _MSVCP_VER >= 140
273 int unused;
274 #endif
275 struct _locale__Locimp *ptr;
276 } locale;
278 locale* __thiscall locale_ctor(locale*);
279 locale* __thiscall locale_copy_ctor(locale*, const locale*);
280 locale* __thiscall locale_operator_assign(locale*, const locale*);
281 void __thiscall locale_dtor(locale*);
282 void free_locale(void);
283 codecvt_char* codecvt_char_use_facet(const locale*);
284 codecvt_wchar* codecvt_wchar_use_facet(const locale*);
285 codecvt_wchar* codecvt_short_use_facet(const locale*);
286 ctype_char* ctype_char_use_facet(const locale*);
287 ctype_wchar* ctype_wchar_use_facet(const locale*);
288 ctype_wchar* ctype_short_use_facet(const locale*);
290 /* class _Lockit */
291 typedef struct {
292 #if _MSVCP_VER >= 70
293 int locktype;
294 #else
295 char empty_struct;
296 #endif
297 } _Lockit;
299 #define _LOCK_LOCALE 0
300 #define _LOCK_MALLOC 1
301 #define _LOCK_STREAM 2
302 #define _LOCK_DEBUG 3
303 #define _MAX_LOCK 4
305 void init_lockit(void);
306 void free_lockit(void);
307 _Lockit* __thiscall _Lockit_ctor_locktype(_Lockit*, int);
308 void __thiscall _Lockit_dtor(_Lockit*);
310 /* class mutex */
311 typedef struct {
312 void *mutex;
313 } mutex;
315 mutex* __thiscall mutex_ctor(mutex*);
316 void __thiscall mutex_dtor(mutex*);
317 void __thiscall mutex_lock(mutex*);
318 void __thiscall mutex_unlock(mutex*);
320 typedef enum {
321 FMTFLAG_skipws = 0x0001,
322 FMTFLAG_unitbuf = 0x0002,
323 FMTFLAG_uppercase = 0x0004,
324 FMTFLAG_showbase = 0x0008,
325 FMTFLAG_showpoint = 0x0010,
326 FMTFLAG_showpos = 0x0020,
327 FMTFLAG_left = 0x0040,
328 FMTFLAG_right = 0x0080,
329 FMTFLAG_internal = 0x0100,
330 FMTFLAG_dec = 0x0200,
331 FMTFLAG_oct = 0x0400,
332 FMTFLAG_hex = 0x0800,
333 FMTFLAG_scientific = 0x1000,
334 FMTFLAG_fixed = 0x2000,
335 FMTFLAG_hexfloat = 0x3000,
336 FMTFLAG_boolalpha = 0x4000,
337 FMTFLAG_stdio = 0x8000,
338 FMTFLAG_adjustfield = FMTFLAG_left|FMTFLAG_right|FMTFLAG_internal,
339 FMTFLAG_basefield = FMTFLAG_dec|FMTFLAG_oct|FMTFLAG_hex,
340 FMTFLAG_floatfield = FMTFLAG_scientific|FMTFLAG_fixed,
341 FMTFLAG_mask = 0xffff
342 } IOSB_fmtflags;
344 typedef enum {
345 OPENMODE_in = 0x01,
346 OPENMODE_out = 0x02,
347 OPENMODE_ate = 0x04,
348 OPENMODE_app = 0x08,
349 OPENMODE_trunc = 0x10,
350 OPENMODE__Nocreate = 0x40,
351 OPENMODE__Noreplace = 0x80,
352 OPENMODE_binary = 0x20,
353 OPENMODE_mask = 0xff
354 } IOSB_openmode;
356 typedef enum {
357 SEEKDIR_beg = 0x0,
358 SEEKDIR_cur = 0x1,
359 SEEKDIR_end = 0x2,
360 SEEKDIR_mask = 0x3
361 } IOSB_seekdir;
363 typedef enum {
364 IOSTATE_goodbit = 0x00,
365 IOSTATE_eofbit = 0x01,
366 IOSTATE_failbit = 0x02,
367 IOSTATE_badbit = 0x04,
368 IOSTATE__Hardfail = 0x10,
369 IOSTATE_mask = 0x17
370 } IOSB_iostate;
372 typedef struct _iosarray {
373 struct _iosarray *next;
374 int index;
375 int long_val;
376 void *ptr_val;
377 } IOS_BASE_iosarray;
379 typedef enum {
380 EVENT_erase_event,
381 EVENT_imbue_event,
382 EVENT_copyfmt_event
383 } IOS_BASE_event;
385 struct _ios_base;
386 typedef void (CDECL *IOS_BASE_event_callback)(IOS_BASE_event, struct _ios_base*, int);
387 typedef struct _fnarray {
388 struct _fnarray *next;
389 int index;
390 IOS_BASE_event_callback event_handler;
391 } IOS_BASE_fnarray;
393 /* class ios_base */
394 typedef struct _ios_base {
395 const vtable_ptr *vtable;
396 #if _MSVCP_VER >= 100
397 MSVCP_size_t DECLSPEC_ALIGN(8) stdstr;
398 #elif _MSVCP_VER >= 71
399 MSVCP_size_t stdstr;
400 #endif
401 IOSB_iostate state;
402 IOSB_iostate except;
403 IOSB_fmtflags fmtfl;
404 streamsize prec;
405 streamsize wide;
406 IOS_BASE_iosarray *arr;
407 IOS_BASE_fnarray *calls;
408 #if _MSVCP_VER < 70
409 locale loc;
410 #else
411 locale *loc;
412 #endif
413 #if _MSVCP_VER <= 70
414 MSVCP_size_t stdstr;
415 #endif
416 } ios_base;
418 /* class basic_streambuf<char> */
419 typedef struct {
420 const vtable_ptr *vtable;
421 #if _MSVCP_VER >= 70 && _MSVCP_VER <= 100
422 mutex lock;
423 #endif
424 char *rbuf;
425 char *wbuf;
426 char **prbuf;
427 char **pwbuf;
428 char *rpos;
429 char *wpos;
430 char **prpos;
431 char **pwpos;
432 int rsize;
433 int wsize;
434 int *prsize;
435 int *pwsize;
436 #if _MSVCP_VER < 70
437 locale loc;
438 #else
439 locale *loc;
440 #endif
441 } basic_streambuf_char;
443 typedef struct {
444 basic_streambuf_char *strbuf;
445 MSVCP_bool got;
446 char val;
447 } istreambuf_iterator_char;
449 typedef struct {
450 #if _MSVCP_VER == 80
451 void *iter_container;
452 #endif
453 MSVCP_bool failed;
454 basic_streambuf_char *strbuf;
455 } ostreambuf_iterator_char;
457 int __thiscall basic_streambuf_char_sgetc(basic_streambuf_char*);
458 int __thiscall basic_streambuf_char_sbumpc(basic_streambuf_char*);
459 int __thiscall basic_streambuf_char_sputc(basic_streambuf_char*, char);
461 /* class basic_streambuf<wchar> */
462 typedef struct {
463 const vtable_ptr *vtable;
464 #if _MSVCP_VER >= 70 && _MSVCP_VER <= 100
465 mutex lock;
466 #endif
467 wchar_t *rbuf;
468 wchar_t *wbuf;
469 wchar_t **prbuf;
470 wchar_t **pwbuf;
471 wchar_t *rpos;
472 wchar_t *wpos;
473 wchar_t **prpos;
474 wchar_t **pwpos;
475 int rsize;
476 int wsize;
477 int *prsize;
478 int *pwsize;
479 #if _MSVCP_VER < 70
480 locale loc;
481 #else
482 locale *loc;
483 #endif
484 } basic_streambuf_wchar;
486 typedef struct {
487 basic_streambuf_wchar *strbuf;
488 MSVCP_bool got;
489 wchar_t val;
490 } istreambuf_iterator_wchar;
492 typedef struct {
493 #if _MSVCP_VER == 80
494 void *iter_container;
495 #endif
496 MSVCP_bool failed;
497 basic_streambuf_wchar *strbuf;
498 } ostreambuf_iterator_wchar;
500 unsigned short __thiscall basic_streambuf_wchar_sgetc(basic_streambuf_wchar*);
501 unsigned short __thiscall basic_streambuf_wchar_sbumpc(basic_streambuf_wchar*);
502 unsigned short __thiscall basic_streambuf_wchar_sputc(basic_streambuf_wchar*, wchar_t);
504 #if _MSVCP_VER < 70
505 #define IOS_LOCALE(ios) (&(ios)->loc)
506 #else
507 #define IOS_LOCALE(ios) ((ios)->loc)
508 #endif
510 /* class num_get<char> */
511 typedef struct {
512 locale_facet facet;
513 #if _MSVCP_VER <= 100
514 _Cvtvec cvt;
515 #endif
516 } num_get;
518 num_get* num_get_char_use_facet(const locale*);
519 istreambuf_iterator_char* __thiscall num_get_char_get_long(const num_get*, istreambuf_iterator_char*,
520 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONG*);
521 istreambuf_iterator_char* __thiscall num_get_char_get_ushort(const num_get*, istreambuf_iterator_char*,
522 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned short*);
523 istreambuf_iterator_char* __thiscall num_get_char_get_uint(const num_get*, istreambuf_iterator_char*,
524 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned int*);
525 istreambuf_iterator_char* __thiscall num_get_char_get_ulong(const num_get*, istreambuf_iterator_char*,
526 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONG*);
527 istreambuf_iterator_char* __thiscall num_get_char_get_float(const num_get*, istreambuf_iterator_char*,
528 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, float*);
529 istreambuf_iterator_char *__thiscall num_get_char_get_double(const num_get*, istreambuf_iterator_char*,
530 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*);
531 istreambuf_iterator_char *__thiscall num_get_char_get_ldouble(const num_get*, istreambuf_iterator_char*,
532 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*);
533 istreambuf_iterator_char *__thiscall num_get_char_get_void(const num_get*, istreambuf_iterator_char*,
534 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, void**);
535 istreambuf_iterator_char *__thiscall num_get_char_get_int64(const num_get*, istreambuf_iterator_char*,
536 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONGLONG*);
537 istreambuf_iterator_char *__thiscall num_get_char_get_uint64(const num_get*, istreambuf_iterator_char*,
538 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONGLONG*);
539 istreambuf_iterator_char *__thiscall num_get_char_get_bool(const num_get*, istreambuf_iterator_char*,
540 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, MSVCP_bool*);
542 num_get* num_get_wchar_use_facet(const locale*);
543 num_get* num_get_short_use_facet(const locale*);
544 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_long(const num_get*, istreambuf_iterator_wchar*,
545 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONG*);
546 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_ushort(const num_get*, istreambuf_iterator_wchar*,
547 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned short*);
548 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_uint(const num_get*, istreambuf_iterator_wchar*,
549 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned int*);
550 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_ulong(const num_get*, istreambuf_iterator_wchar*,
551 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONG*);
552 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_float(const num_get*, istreambuf_iterator_wchar*,
553 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, float*);
554 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_double(const num_get*, istreambuf_iterator_wchar*,
555 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*);
556 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_ldouble(const num_get*, istreambuf_iterator_wchar*,
557 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*);
558 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_void(const num_get*, istreambuf_iterator_wchar*,
559 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, void**);
560 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_int64(const num_get*, istreambuf_iterator_wchar*,
561 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONGLONG*);
562 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_uint64(const num_get*, istreambuf_iterator_wchar*,
563 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONGLONG*);
564 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_bool(const num_get*, istreambuf_iterator_wchar*,
565 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, MSVCP_bool*);
567 /* class num_put<char> */
568 /* class num_put<wchar> */
569 typedef struct {
570 locale_facet facet;
571 #if _MSVCP_VER < 110
572 _Cvtvec cvt;
573 #endif
574 } num_put;
576 num_put* num_put_char_use_facet(const locale*);
577 ostreambuf_iterator_char* __thiscall num_put_char_put_long(const num_put*, ostreambuf_iterator_char*,
578 ostreambuf_iterator_char, ios_base*, char, LONG);
579 ostreambuf_iterator_char* __thiscall num_put_char_put_ulong(const num_put*, ostreambuf_iterator_char*,
580 ostreambuf_iterator_char, ios_base*, char, ULONG);
581 ostreambuf_iterator_char* __thiscall num_put_char_put_double(const num_put*, ostreambuf_iterator_char*,
582 ostreambuf_iterator_char, ios_base*, char, double);
583 ostreambuf_iterator_char* __thiscall num_put_char_put_ldouble(const num_put*, ostreambuf_iterator_char*,
584 ostreambuf_iterator_char, ios_base*, char, double);
585 ostreambuf_iterator_char* __thiscall num_put_char_put_ptr(const num_put*, ostreambuf_iterator_char*,
586 ostreambuf_iterator_char, ios_base*, char, const void*);
587 ostreambuf_iterator_char* __thiscall num_put_char_put_int64(const num_put*, ostreambuf_iterator_char*,
588 ostreambuf_iterator_char, ios_base*, char, __int64);
589 ostreambuf_iterator_char* __thiscall num_put_char_put_uint64(const num_put*, ostreambuf_iterator_char*,
590 ostreambuf_iterator_char, ios_base*, char, unsigned __int64);
591 ostreambuf_iterator_char* __thiscall num_put_char_put_bool(const num_put*, ostreambuf_iterator_char*,
592 ostreambuf_iterator_char, ios_base*, char, MSVCP_bool);
594 num_put* num_put_wchar_use_facet(const locale*);
595 num_put* num_put_short_use_facet(const locale*);
596 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_long(const num_put*, ostreambuf_iterator_wchar*,
597 ostreambuf_iterator_wchar, ios_base*, wchar_t, LONG);
598 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_ulong(const num_put*, ostreambuf_iterator_wchar*,
599 ostreambuf_iterator_wchar, ios_base*, wchar_t, ULONG);
600 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_double(const num_put*, ostreambuf_iterator_wchar*,
601 ostreambuf_iterator_wchar, ios_base*, wchar_t, double);
602 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_ldouble(const num_put*, ostreambuf_iterator_wchar*,
603 ostreambuf_iterator_wchar, ios_base*, wchar_t, double);
604 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_ptr(const num_put*, ostreambuf_iterator_wchar*,
605 ostreambuf_iterator_wchar, ios_base*, wchar_t, const void*);
606 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_int64(const num_put*, ostreambuf_iterator_wchar*,
607 ostreambuf_iterator_wchar, ios_base*, wchar_t, __int64);
608 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_uint64(const num_put*, ostreambuf_iterator_wchar*,
609 ostreambuf_iterator_wchar, ios_base*, wchar_t, unsigned __int64);
610 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_bool(const num_put*, ostreambuf_iterator_wchar*,
611 ostreambuf_iterator_wchar, ios_base*, wchar_t, MSVCP_bool);
613 void init_exception(void*);
614 void init_locale(void*);
615 void init_io(void*);
616 void free_io(void);
617 void init_misc(void*);
619 /* class complex<float> */
620 typedef struct {
621 float real;
622 float imag;
623 } complex_float;
625 /* class complex<double> */
626 /* class complex<long double> */
627 typedef struct {
628 double real;
629 double imag;
630 } complex_double;
632 #if _MSVCP_VER < 80
633 static inline int memcpy_wrapper( void *dst, size_t size, const void *src, size_t count )
635 memcpy( dst, src, count );
636 return 0;
638 static inline int memmove_wrapper( void *dst, size_t size, const void *src, size_t count )
640 memmove( dst, src, count );
641 return 0;
643 static inline int mbstowcs_wrapper( size_t *ret, wchar_t *wcs, size_t size, const char *mbs, size_t count )
645 mbstowcs( wcs, mbs, count );
646 return 0;
648 #define memcpy_s( dst, size, src, count ) memcpy_wrapper( dst, size, src, count )
649 #define memmove_s( dst, size, src, count ) memmove_wrapper( dst, size, src, count )
650 #define mbstowcs_s( ret, wcs, size, mbs, count ) mbstowcs_wrapper( ret, wcs, size, mbs, count )
651 #define hypotf( x, y ) ((float)hypot( (double)(x), (double)(y) ))
652 #endif
654 void free_misc(void);
656 #if _MSVCP_VER >= 140
657 #define UCRTBASE_PRINTF_STANDARD_SNPRINTF_BEHAVIOUR (0x0002)
658 int __cdecl __stdio_common_vsprintf(unsigned __int64 options, char *str, size_t len, const char *format,
659 _locale_t locale, __ms_va_list valist);
660 #endif