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