winedbg: Don't dereference possibly NULL thread pointer.
[wine/zf.git] / dlls / msvcp90 / msvcp90.h
blobb2e0ae8b15c7baedc38b9a7b9359cb841125e7e8
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 "stdbool.h"
20 #include "stdlib.h"
21 #include "windef.h"
22 #include "cxx.h"
24 #define CXX_EXCEPTION 0xe06d7363
25 #define ALIGNED_SIZE(size, alignment) (((size)+((alignment)-1))/(alignment)*(alignment))
27 #define MSVCP_SIZE_T_MAX (~(size_t)0)
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 BOOL __cdecl __uncaught_exception(void);
42 int __cdecl _callnewh(size_t);
44 extern void* (__cdecl *MSVCRT_operator_new)(size_t);
45 extern void (__cdecl *MSVCRT_operator_delete)(void*);
46 extern void* (__cdecl *MSVCRT_set_new_handler)(void*);
48 #if _MSVCP_VER >= 110
49 /* keep in sync with msvcrt/lock.c */
50 typedef struct cs_queue
52 struct cs_queue *next;
53 BOOL free;
54 int unknown;
55 } cs_queue;
57 typedef struct
59 ULONG_PTR unk_thread_id;
60 cs_queue unk_active;
61 void *unknown[2];
62 cs_queue *head;
63 void *tail;
64 } critical_section;
66 extern critical_section* (__thiscall *critical_section_ctor)(critical_section*);
67 extern void (__thiscall *critical_section_dtor)(critical_section*);
68 extern void (__thiscall *critical_section_lock)(critical_section*);
69 extern void (__thiscall *critical_section_unlock)(critical_section*);
70 extern bool (__thiscall *critical_section_trylock)(critical_section*);
71 #endif
73 #if _MSVCP_VER >= 100
74 extern bool (__cdecl *Context_IsCurrentTaskCollectionCanceling)(void);
75 #endif
77 /* basic_string<char, char_traits<char>, allocator<char>> */
78 typedef struct
80 #if _MSVCP_VER <= 90
81 void *allocator;
82 #endif
83 union {
84 #if _MSVCP_VER >= 70
85 #define BUF_SIZE_CHAR 16
86 char buf[BUF_SIZE_CHAR];
87 #endif
88 char *ptr;
89 } data;
90 size_t size;
91 size_t res;
92 #if _MSVCP_VER == 100
93 char allocator;
94 #endif
95 } basic_string_char;
97 basic_string_char* __thiscall MSVCP_basic_string_char_ctor(basic_string_char*);
98 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr(basic_string_char*, const char*);
99 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr_len(basic_string_char*, const char*, size_t);
100 basic_string_char* __thiscall MSVCP_basic_string_char_copy_ctor(basic_string_char*, const basic_string_char*);
101 void* __thiscall MSVCP_basic_string_char_dtor(basic_string_char*);
102 const char* __thiscall MSVCP_basic_string_char_c_str(const basic_string_char*);
103 void __thiscall MSVCP_basic_string_char_clear(basic_string_char*);
104 basic_string_char* __thiscall MSVCP_basic_string_char_append_ch(basic_string_char*, char);
105 size_t __thiscall MSVCP_basic_string_char_length(const basic_string_char*);
106 basic_string_char* __thiscall MSVCP_basic_string_char_assign(basic_string_char*, const basic_string_char*);
108 typedef struct
110 #if _MSVCP_VER <= 90
111 void *allocator;
112 #endif
113 union {
114 #if _MSVCP_VER >= 70
115 #define BUF_SIZE_WCHAR 8
116 wchar_t buf[BUF_SIZE_WCHAR];
117 #endif
118 wchar_t *ptr;
119 } data;
120 size_t size;
121 size_t res;
122 #if _MSVCP_VER == 100
123 char allocator;
124 #endif
125 } basic_string_wchar;
127 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor(basic_string_wchar*);
128 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr(basic_string_wchar*, const wchar_t*);
129 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr_len(basic_string_wchar*, const wchar_t*, size_t);
130 void* __thiscall MSVCP_basic_string_wchar_dtor(basic_string_wchar*);
131 const wchar_t* __thiscall MSVCP_basic_string_wchar_c_str(const basic_string_wchar*);
132 void __thiscall MSVCP_basic_string_wchar_clear(basic_string_wchar*);
133 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_ch(basic_string_wchar*, wchar_t);
134 size_t __thiscall MSVCP_basic_string_wchar_length(const basic_string_wchar*);
136 char* __thiscall MSVCP_allocator_char_allocate(void*, size_t);
137 void __thiscall MSVCP_allocator_char_deallocate(void*, char*, size_t);
138 size_t __thiscall MSVCP_allocator_char_max_size(const void*);
139 wchar_t* __thiscall MSVCP_allocator_wchar_allocate(void*, size_t);
140 void __thiscall MSVCP_allocator_wchar_deallocate(void*, wchar_t*, size_t);
141 size_t __thiscall MSVCP_allocator_wchar_max_size(const void*);
143 typedef struct
145 char *str;
146 char null_str;
147 } _Yarn_char;
149 _Yarn_char* __thiscall _Yarn_char_ctor(_Yarn_char*);
150 _Yarn_char* __thiscall _Yarn_char_ctor_cstr(_Yarn_char*, const char*);
151 _Yarn_char* __thiscall _Yarn_char_copy_ctor(_Yarn_char*, const _Yarn_char*);
152 const char* __thiscall _Yarn_char_c_str(const _Yarn_char*);
153 void __thiscall _Yarn_char_dtor(_Yarn_char*);
154 _Yarn_char* __thiscall _Yarn_char_op_assign(_Yarn_char*, const _Yarn_char*);
156 typedef struct
158 wchar_t *str;
159 wchar_t null_str;
160 } _Yarn_wchar;
162 _Yarn_wchar* __thiscall _Yarn_wchar_ctor(_Yarn_wchar*);
163 const wchar_t* __thiscall _Yarn_wchar__C_str(const _Yarn_wchar*);
164 void __thiscall _Yarn_wchar_dtor(_Yarn_wchar*);
165 _Yarn_wchar* __thiscall _Yarn_wchar_op_assign_cstr(_Yarn_wchar*, const wchar_t*);
167 /* class locale::facet */
168 typedef struct {
169 const vtable_ptr *vtable;
170 size_t refs;
171 } locale_facet;
173 typedef enum {
174 CODECVT_ok = 0,
175 CODECVT_partial = 1,
176 CODECVT_error = 2,
177 CODECVT_noconv = 3
178 } codecvt_base_result;
180 typedef struct {
181 #if _MSVCP_VER < 110
182 LCID handle;
183 #endif
184 unsigned page;
185 const short *table;
186 int delfl;
187 #if _MSVCP_VER >= 110
188 wchar_t *name;
189 #endif
190 } _Ctypevec;
192 #if _MSVCP_VER >= 140
193 typedef struct {
194 int wchar;
195 unsigned short byte, state;
196 } _Mbstatet;
197 #define MBSTATET_TO_INT(state) ((state)->wchar)
198 #else
199 typedef int _Mbstatet;
200 #define MBSTATET_TO_INT(state) (*(state))
201 #endif
203 /* class codecvt_base */
204 typedef struct {
205 locale_facet facet;
206 } codecvt_base;
208 /* class codecvt<char> */
209 typedef struct {
210 codecvt_base base;
211 } codecvt_char;
213 bool __thiscall codecvt_base_always_noconv(const codecvt_base*);
214 int __thiscall codecvt_char_unshift(const codecvt_char*, _Mbstatet*, char*, char*, char**);
215 int __thiscall codecvt_char_out(const codecvt_char*, _Mbstatet*, const char*,
216 const char*, const char**, char*, char*, char**);
217 int __thiscall codecvt_char_in(const codecvt_char*, _Mbstatet*, const char*,
218 const char*, const char**, char*, char*, char**);
219 int __thiscall codecvt_base_max_length(const codecvt_base*);
221 typedef struct {
222 #if _MSVCP_VER < 110
223 LCID handle;
224 #endif
225 unsigned page;
226 #if _MSVCP_VER >= 110
227 int mb_max;
228 int unk;
229 BYTE isleadbyte[32];
230 #endif
231 } _Cvtvec;
233 /* class codecvt<wchar> */
234 typedef struct {
235 codecvt_base base;
236 _Cvtvec cvt;
237 } codecvt_wchar;
239 int __thiscall codecvt_wchar_unshift(const codecvt_wchar*, _Mbstatet*, char*, char*, char**);
240 int __thiscall codecvt_wchar_out(const codecvt_wchar*, _Mbstatet*, const wchar_t*,
241 const wchar_t*, const wchar_t**, char*, char*, char**);
242 int __thiscall codecvt_wchar_in(const codecvt_wchar*, _Mbstatet*, const char*,
243 const char*, const char**, wchar_t*, wchar_t*, wchar_t**);
245 /* class ctype_base */
246 typedef struct {
247 locale_facet facet;
248 } ctype_base;
250 /* class ctype<char> */
251 typedef struct {
252 ctype_base base;
253 _Ctypevec ctype;
254 } ctype_char;
256 bool __thiscall ctype_char_is_ch(const ctype_char*, short, char);
257 char __thiscall ctype_char_narrow_ch(const ctype_char*, char, char);
258 char __thiscall ctype_char_widen_ch(const ctype_char*, char);
260 /* class ctype<wchar> */
261 typedef struct {
262 ctype_base base;
263 _Ctypevec ctype;
264 _Cvtvec cvt;
265 } ctype_wchar;
267 bool __thiscall ctype_wchar_is_ch(const ctype_wchar*, short, wchar_t);
268 char __thiscall ctype_wchar_narrow_ch(const ctype_wchar*, wchar_t, char);
269 wchar_t __thiscall ctype_wchar_widen_ch(const ctype_wchar*, char);
271 /* class locale */
272 typedef struct
274 #if _MSVCP_VER >= 140
275 int unused;
276 #endif
277 struct _locale__Locimp *ptr;
278 } locale;
280 locale* __thiscall locale_ctor(locale*);
281 locale* __thiscall locale_copy_ctor(locale*, const locale*);
282 locale* __thiscall locale_operator_assign(locale*, const locale*);
283 void __thiscall locale_dtor(locale*);
284 void free_locale(void);
285 codecvt_char* codecvt_char_use_facet(const locale*);
286 codecvt_wchar* codecvt_wchar_use_facet(const locale*);
287 codecvt_wchar* codecvt_short_use_facet(const locale*);
288 ctype_char* ctype_char_use_facet(const locale*);
289 ctype_wchar* ctype_wchar_use_facet(const locale*);
290 ctype_wchar* ctype_short_use_facet(const locale*);
292 /* class _Init_locks */
293 typedef struct {
294 char empty_struct;
295 } _Init_locks;
297 void __cdecl _Init_locks__Init_locks_ctor(_Init_locks*);
298 void __cdecl _Init_locks__Init_locks_dtor(_Init_locks*);
300 /* class _Lockit */
301 typedef struct {
302 #if _MSVCP_VER >= 70
303 int locktype;
304 #else
305 char empty_struct;
306 #endif
307 } _Lockit;
309 #define _LOCK_LOCALE 0
310 #define _LOCK_MALLOC 1
311 #define _LOCK_STREAM 2
312 #define _LOCK_DEBUG 3
313 #define _MAX_LOCK 4
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 size_t DECLSPEC_ALIGN(8) stdstr;
406 #elif _MSVCP_VER >= 71
407 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 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 bool got;
454 char val;
455 } istreambuf_iterator_char;
457 typedef struct {
458 #if _MSVCP_VER == 80
459 void *iter_container;
460 #endif
461 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 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 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*, 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*, 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, 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, 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);