user32/tests: Don't test function directly when reporting GetLastError().
[wine/multimedia.git] / dlls / msvcp90 / msvcp90.h
blob5e7b427ccee0c8dac8a7146034ceb73187f331b1
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(const wchar_t*, const wchar_t*,
41 const wchar_t*, unsigned int, uintptr_t);
42 BOOL __cdecl __uncaught_exception(void);
44 extern void* (__cdecl *MSVCRT_operator_new)(MSVCP_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 MSVCP_bool (__thiscall *critical_section_trylock)(critical_section*);
71 #endif
73 /* basic_string<char, char_traits<char>, allocator<char>> */
74 #define BUF_SIZE_CHAR 16
75 typedef struct
77 #if _MSVCP_VER <= 90
78 void *allocator;
79 #endif
80 union {
81 char buf[BUF_SIZE_CHAR];
82 char *ptr;
83 } data;
84 MSVCP_size_t size;
85 MSVCP_size_t res;
86 #if _MSVCP_VER == 100
87 char allocator;
88 #endif
89 } basic_string_char;
91 basic_string_char* __thiscall MSVCP_basic_string_char_ctor(basic_string_char*);
92 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr(basic_string_char*, const char*);
93 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr_len(basic_string_char*, const char*, MSVCP_size_t);
94 basic_string_char* __thiscall MSVCP_basic_string_char_copy_ctor(basic_string_char*, const basic_string_char*);
95 void __thiscall MSVCP_basic_string_char_dtor(basic_string_char*);
96 const char* __thiscall MSVCP_basic_string_char_c_str(const basic_string_char*);
97 void __thiscall MSVCP_basic_string_char_clear(basic_string_char*);
98 basic_string_char* __thiscall MSVCP_basic_string_char_append_ch(basic_string_char*, char);
99 MSVCP_size_t __thiscall MSVCP_basic_string_char_length(const basic_string_char*);
100 basic_string_char* __thiscall MSVCP_basic_string_char_assign(basic_string_char*, const basic_string_char*);
102 #define BUF_SIZE_WCHAR 8
103 typedef struct
105 #if _MSVCP_VER <= 90
106 void *allocator;
107 #endif
108 union {
109 wchar_t buf[BUF_SIZE_WCHAR];
110 wchar_t *ptr;
111 } data;
112 MSVCP_size_t size;
113 MSVCP_size_t res;
114 #if _MSVCP_VER == 100
115 char allocator;
116 #endif
117 } basic_string_wchar;
119 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor(basic_string_wchar*);
120 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr(basic_string_wchar*, const wchar_t*);
121 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr_len(basic_string_wchar*, const wchar_t*, MSVCP_size_t);
122 void __thiscall MSVCP_basic_string_wchar_dtor(basic_string_wchar*);
123 const wchar_t* __thiscall MSVCP_basic_string_wchar_c_str(const basic_string_wchar*);
124 void __thiscall MSVCP_basic_string_wchar_clear(basic_string_wchar*);
125 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_ch(basic_string_wchar*, wchar_t);
126 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_length(const basic_string_wchar*);
128 char* __thiscall MSVCP_allocator_char_allocate(void*, MSVCP_size_t);
129 void __thiscall MSVCP_allocator_char_deallocate(void*, char*, MSVCP_size_t);
130 MSVCP_size_t __thiscall MSVCP_allocator_char_max_size(const void*);
131 wchar_t* __thiscall MSVCP_allocator_wchar_allocate(void*, MSVCP_size_t);
132 void __thiscall MSVCP_allocator_wchar_deallocate(void*, wchar_t*, MSVCP_size_t);
133 MSVCP_size_t __thiscall MSVCP_allocator_wchar_max_size(const void*);
135 typedef struct
137 char *str;
138 char null_str;
139 } _Yarn_char;
141 _Yarn_char* __thiscall _Yarn_char_ctor_cstr(_Yarn_char*, const char*);
142 _Yarn_char* __thiscall _Yarn_char_copy_ctor(_Yarn_char*, const _Yarn_char*);
143 const char* __thiscall _Yarn_char_c_str(const _Yarn_char*);
144 void __thiscall _Yarn_char_dtor(_Yarn_char*);
145 _Yarn_char* __thiscall _Yarn_char_op_assign(_Yarn_char*, const _Yarn_char*);
147 /* class locale::facet */
148 typedef struct {
149 const vtable_ptr *vtable;
150 MSVCP_size_t refs;
151 } locale_facet;
153 typedef enum {
154 CODECVT_ok = 0,
155 CODECVT_partial = 1,
156 CODECVT_error = 2,
157 CODECVT_noconv = 3
158 } codecvt_base_result;
160 typedef struct {
161 #if _MSVCP_VER < 110
162 LCID handle;
163 #endif
164 unsigned page;
165 const short *table;
166 int delfl;
167 #if _MSVCP_VER >= 110
168 wchar_t *name;
169 #endif
170 } _Ctypevec;
172 /* class codecvt_base */
173 typedef struct {
174 locale_facet facet;
175 } codecvt_base;
177 /* class codecvt<char> */
178 typedef struct {
179 codecvt_base base;
180 } codecvt_char;
182 MSVCP_bool __thiscall codecvt_base_always_noconv(const codecvt_base*);
183 int __thiscall codecvt_char_unshift(const codecvt_char*, int*, char*, char*, char**);
184 int __thiscall codecvt_char_out(const codecvt_char*, int*, const char*,
185 const char*, const char**, char*, char*, char**);
186 int __thiscall codecvt_char_in(const codecvt_char*, int*, const char*,
187 const char*, const char**, char*, char*, char**);
188 int __thiscall codecvt_base_max_length(const codecvt_base*);
190 typedef struct {
191 LCID handle;
192 unsigned page;
193 } _Cvtvec;
195 /* class codecvt<wchar> */
196 typedef struct {
197 codecvt_base base;
198 _Cvtvec cvt;
199 } codecvt_wchar;
201 int __thiscall codecvt_wchar_unshift(const codecvt_wchar*, int*, char*, char*, char**);
202 int __thiscall codecvt_wchar_out(const codecvt_wchar*, int*, const wchar_t*,
203 const wchar_t*, const wchar_t**, char*, char*, char**);
204 int __thiscall codecvt_wchar_in(const codecvt_wchar*, int*, const char*,
205 const char*, const char**, wchar_t*, wchar_t*, wchar_t**);
207 /* class ctype_base */
208 typedef struct {
209 locale_facet facet;
210 } ctype_base;
212 /* class ctype<char> */
213 typedef struct {
214 ctype_base base;
215 _Ctypevec ctype;
216 } ctype_char;
218 MSVCP_bool __thiscall ctype_char_is_ch(const ctype_char*, short, char);
219 char __thiscall ctype_char_narrow_ch(const ctype_char*, char, char);
220 char __thiscall ctype_char_widen_ch(const ctype_char*, char);
222 /* class ctype<wchar> */
223 typedef struct {
224 ctype_base base;
225 _Ctypevec ctype;
226 _Cvtvec cvt;
227 } ctype_wchar;
229 MSVCP_bool __thiscall ctype_wchar_is_ch(const ctype_wchar*, short, wchar_t);
230 char __thiscall ctype_wchar_narrow_ch(const ctype_wchar*, wchar_t, char);
231 wchar_t __thiscall ctype_wchar_widen_ch(const ctype_wchar*, char);
233 /* class locale */
234 typedef struct
236 struct _locale__Locimp *ptr;
237 } locale;
239 locale* __thiscall locale_ctor(locale*);
240 locale* __thiscall locale_copy_ctor(locale*, const locale*);
241 locale* __thiscall locale_operator_assign(locale*, const locale*);
242 void __thiscall locale_dtor(locale*);
243 void free_locale(void);
244 codecvt_char* codecvt_char_use_facet(const locale*);
245 codecvt_wchar* codecvt_wchar_use_facet(const locale*);
246 codecvt_wchar* codecvt_short_use_facet(const locale*);
247 ctype_char* ctype_char_use_facet(const locale*);
248 ctype_wchar* ctype_wchar_use_facet(const locale*);
249 ctype_wchar* ctype_short_use_facet(const locale*);
251 /* class _Lockit */
252 typedef struct {
253 int locktype;
254 } _Lockit;
256 #define _LOCK_LOCALE 0
257 #define _LOCK_MALLOC 1
258 #define _LOCK_STREAM 2
259 #define _LOCK_DEBUG 3
260 #define _MAX_LOCK 4
262 void init_lockit(void);
263 void free_lockit(void);
264 _Lockit* __thiscall _Lockit_ctor_locktype(_Lockit*, int);
265 void __thiscall _Lockit_dtor(_Lockit*);
267 /* class mutex */
268 typedef struct {
269 void *mutex;
270 } mutex;
272 mutex* __thiscall mutex_ctor(mutex*);
273 void __thiscall mutex_dtor(mutex*);
274 void __thiscall mutex_lock(mutex*);
275 void __thiscall mutex_unlock(mutex*);
277 typedef enum {
278 FMTFLAG_skipws = 0x0001,
279 FMTFLAG_unitbuf = 0x0002,
280 FMTFLAG_uppercase = 0x0004,
281 FMTFLAG_showbase = 0x0008,
282 FMTFLAG_showpoint = 0x0010,
283 FMTFLAG_showpos = 0x0020,
284 FMTFLAG_left = 0x0040,
285 FMTFLAG_right = 0x0080,
286 FMTFLAG_internal = 0x0100,
287 FMTFLAG_dec = 0x0200,
288 FMTFLAG_oct = 0x0400,
289 FMTFLAG_hex = 0x0800,
290 FMTFLAG_scientific = 0x1000,
291 FMTFLAG_fixed = 0x2000,
292 FMTFLAG_hexfloat = 0x3000,
293 FMTFLAG_boolalpha = 0x4000,
294 FMTFLAG_stdio = 0x8000,
295 FMTFLAG_adjustfield = FMTFLAG_left|FMTFLAG_right|FMTFLAG_internal,
296 FMTFLAG_basefield = FMTFLAG_dec|FMTFLAG_oct|FMTFLAG_hex,
297 FMTFLAG_floatfield = FMTFLAG_scientific|FMTFLAG_fixed,
298 FMTFLAG_mask = 0xffff
299 } IOSB_fmtflags;
301 typedef enum {
302 OPENMODE_in = 0x01,
303 OPENMODE_out = 0x02,
304 OPENMODE_ate = 0x04,
305 OPENMODE_app = 0x08,
306 OPENMODE_trunc = 0x10,
307 OPENMODE__Nocreate = 0x40,
308 OPENMODE__Noreplace = 0x80,
309 OPENMODE_binary = 0x20,
310 OPENMODE_mask = 0xff
311 } IOSB_openmode;
313 typedef enum {
314 SEEKDIR_beg = 0x0,
315 SEEKDIR_cur = 0x1,
316 SEEKDIR_end = 0x2,
317 SEEKDIR_mask = 0x3
318 } IOSB_seekdir;
320 typedef enum {
321 IOSTATE_goodbit = 0x00,
322 IOSTATE_eofbit = 0x01,
323 IOSTATE_failbit = 0x02,
324 IOSTATE_badbit = 0x04,
325 IOSTATE__Hardfail = 0x10,
326 IOSTATE_mask = 0x17
327 } IOSB_iostate;
329 typedef struct _iosarray {
330 struct _iosarray *next;
331 int index;
332 int long_val;
333 void *ptr_val;
334 } IOS_BASE_iosarray;
336 typedef enum {
337 EVENT_erase_event,
338 EVENT_imbue_event,
339 EVENT_copyfmt_event
340 } IOS_BASE_event;
342 struct _ios_base;
343 typedef void (CDECL *IOS_BASE_event_callback)(IOS_BASE_event, struct _ios_base*, int);
344 typedef struct _fnarray {
345 struct _fnarray *next;
346 int index;
347 IOS_BASE_event_callback event_handler;
348 } IOS_BASE_fnarray;
350 /* class ios_base */
351 typedef struct _ios_base {
352 const vtable_ptr *vtable;
353 #if _MSVCP_VER >= 100
354 MSVCP_size_t DECLSPEC_ALIGN(8) stdstr;
355 #elif _MSVCP_VER >= 71
356 MSVCP_size_t stdstr;
357 #endif
358 IOSB_iostate state;
359 IOSB_iostate except;
360 IOSB_fmtflags fmtfl;
361 streamsize prec;
362 streamsize wide;
363 IOS_BASE_iosarray *arr;
364 IOS_BASE_fnarray *calls;
365 locale *loc;
366 #if _MSVCP_VER == 70
367 MSVCP_size_t stdstr;
368 #endif
369 } ios_base;
371 /* class basic_streambuf<char> */
372 typedef struct {
373 const vtable_ptr *vtable;
374 #if _MSVCP_VER <= 100
375 mutex lock;
376 #endif
377 char *rbuf;
378 char *wbuf;
379 char **prbuf;
380 char **pwbuf;
381 char *rpos;
382 char *wpos;
383 char **prpos;
384 char **pwpos;
385 int rsize;
386 int wsize;
387 int *prsize;
388 int *pwsize;
389 locale *loc;
390 } basic_streambuf_char;
392 typedef struct {
393 basic_streambuf_char *strbuf;
394 MSVCP_bool got;
395 char val;
396 } istreambuf_iterator_char;
398 typedef struct {
399 #if _MSVCP_VER == 80
400 void *iter_container;
401 #endif
402 MSVCP_bool failed;
403 basic_streambuf_char *strbuf;
404 } ostreambuf_iterator_char;
406 int __thiscall basic_streambuf_char_sgetc(basic_streambuf_char*);
407 int __thiscall basic_streambuf_char_sbumpc(basic_streambuf_char*);
408 int __thiscall basic_streambuf_char_sputc(basic_streambuf_char*, char);
410 /* class basic_streambuf<wchar> */
411 typedef struct {
412 const vtable_ptr *vtable;
413 #if _MSVCP_VER <= 100
414 mutex lock;
415 #endif
416 wchar_t *rbuf;
417 wchar_t *wbuf;
418 wchar_t **prbuf;
419 wchar_t **pwbuf;
420 wchar_t *rpos;
421 wchar_t *wpos;
422 wchar_t **prpos;
423 wchar_t **pwpos;
424 int rsize;
425 int wsize;
426 int *prsize;
427 int *pwsize;
428 locale *loc;
429 } basic_streambuf_wchar;
431 typedef struct {
432 basic_streambuf_wchar *strbuf;
433 MSVCP_bool got;
434 wchar_t val;
435 } istreambuf_iterator_wchar;
437 typedef struct {
438 #if _MSVCP_VER == 80
439 void *iter_container;
440 #endif
441 MSVCP_bool failed;
442 basic_streambuf_wchar *strbuf;
443 } ostreambuf_iterator_wchar;
445 unsigned short __thiscall basic_streambuf_wchar_sgetc(basic_streambuf_wchar*);
446 unsigned short __thiscall basic_streambuf_wchar_sbumpc(basic_streambuf_wchar*);
447 unsigned short __thiscall basic_streambuf_wchar_sputc(basic_streambuf_wchar*, wchar_t);
449 /* class num_get<char> */
450 typedef struct {
451 locale_facet facet;
452 _Cvtvec cvt;
453 } num_get;
455 num_get* num_get_char_use_facet(const locale*);
456 istreambuf_iterator_char* __thiscall num_get_char_get_long(const num_get*, istreambuf_iterator_char*,
457 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONG*);
458 istreambuf_iterator_char* __thiscall num_get_char_get_ushort(const num_get*, istreambuf_iterator_char*,
459 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned short*);
460 istreambuf_iterator_char* __thiscall num_get_char_get_uint(const num_get*, istreambuf_iterator_char*,
461 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned int*);
462 istreambuf_iterator_char* __thiscall num_get_char_get_ulong(const num_get*, istreambuf_iterator_char*,
463 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONG*);
464 istreambuf_iterator_char* __thiscall num_get_char_get_float(const num_get*, istreambuf_iterator_char*,
465 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, float*);
466 istreambuf_iterator_char *__thiscall num_get_char_get_double(const num_get*, istreambuf_iterator_char*,
467 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*);
468 istreambuf_iterator_char *__thiscall num_get_char_get_ldouble(const num_get*, istreambuf_iterator_char*,
469 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*);
470 istreambuf_iterator_char *__thiscall num_get_char_get_void(const num_get*, istreambuf_iterator_char*,
471 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, void**);
472 istreambuf_iterator_char *__thiscall num_get_char_get_int64(const num_get*, istreambuf_iterator_char*,
473 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONGLONG*);
474 istreambuf_iterator_char *__thiscall num_get_char_get_uint64(const num_get*, istreambuf_iterator_char*,
475 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONGLONG*);
476 istreambuf_iterator_char *__thiscall num_get_char_get_bool(const num_get*, istreambuf_iterator_char*,
477 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, MSVCP_bool*);
479 num_get* num_get_wchar_use_facet(const locale*);
480 num_get* num_get_short_use_facet(const locale*);
481 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_long(const num_get*, istreambuf_iterator_wchar*,
482 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONG*);
483 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_ushort(const num_get*, istreambuf_iterator_wchar*,
484 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned short*);
485 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_uint(const num_get*, istreambuf_iterator_wchar*,
486 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned int*);
487 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_ulong(const num_get*, istreambuf_iterator_wchar*,
488 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONG*);
489 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_float(const num_get*, istreambuf_iterator_wchar*,
490 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, float*);
491 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_double(const num_get*, istreambuf_iterator_wchar*,
492 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*);
493 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_ldouble(const num_get*, istreambuf_iterator_wchar*,
494 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*);
495 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_void(const num_get*, istreambuf_iterator_wchar*,
496 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, void**);
497 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_int64(const num_get*, istreambuf_iterator_wchar*,
498 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONGLONG*);
499 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_uint64(const num_get*, istreambuf_iterator_wchar*,
500 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONGLONG*);
501 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_bool(const num_get*, istreambuf_iterator_wchar*,
502 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, MSVCP_bool*);
504 /* class num_put<char> */
505 /* class num_put<wchar> */
506 typedef struct {
507 locale_facet facet;
508 _Cvtvec cvt;
509 } num_put;
511 num_put* num_put_char_use_facet(const locale*);
512 ostreambuf_iterator_char* __thiscall num_put_char_put_long(const num_put*, ostreambuf_iterator_char*,
513 ostreambuf_iterator_char, ios_base*, char, LONG);
514 ostreambuf_iterator_char* __thiscall num_put_char_put_ulong(const num_put*, ostreambuf_iterator_char*,
515 ostreambuf_iterator_char, ios_base*, char, ULONG);
516 ostreambuf_iterator_char* __thiscall num_put_char_put_double(const num_put*, ostreambuf_iterator_char*,
517 ostreambuf_iterator_char, ios_base*, char, double);
518 ostreambuf_iterator_char* __thiscall num_put_char_put_ldouble(const num_put*, ostreambuf_iterator_char*,
519 ostreambuf_iterator_char, ios_base*, char, double);
520 ostreambuf_iterator_char* __thiscall num_put_char_put_ptr(const num_put*, ostreambuf_iterator_char*,
521 ostreambuf_iterator_char, ios_base*, char, const void*);
522 ostreambuf_iterator_char* __thiscall num_put_char_put_int64(const num_put*, ostreambuf_iterator_char*,
523 ostreambuf_iterator_char, ios_base*, char, __int64);
524 ostreambuf_iterator_char* __thiscall num_put_char_put_uint64(const num_put*, ostreambuf_iterator_char*,
525 ostreambuf_iterator_char, ios_base*, char, unsigned __int64);
526 ostreambuf_iterator_char* __thiscall num_put_char_put_bool(const num_put*, ostreambuf_iterator_char*,
527 ostreambuf_iterator_char, ios_base*, char, MSVCP_bool);
529 num_put* num_put_wchar_use_facet(const locale*);
530 num_put* num_put_short_use_facet(const locale*);
531 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_long(const num_put*, ostreambuf_iterator_wchar*,
532 ostreambuf_iterator_wchar, ios_base*, wchar_t, LONG);
533 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_ulong(const num_put*, ostreambuf_iterator_wchar*,
534 ostreambuf_iterator_wchar, ios_base*, wchar_t, ULONG);
535 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_double(const num_put*, ostreambuf_iterator_wchar*,
536 ostreambuf_iterator_wchar, ios_base*, wchar_t, double);
537 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_ldouble(const num_put*, ostreambuf_iterator_wchar*,
538 ostreambuf_iterator_wchar, ios_base*, wchar_t, double);
539 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_ptr(const num_put*, ostreambuf_iterator_wchar*,
540 ostreambuf_iterator_wchar, ios_base*, wchar_t, const void*);
541 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_int64(const num_put*, ostreambuf_iterator_wchar*,
542 ostreambuf_iterator_wchar, ios_base*, wchar_t, __int64);
543 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_uint64(const num_put*, ostreambuf_iterator_wchar*,
544 ostreambuf_iterator_wchar, ios_base*, wchar_t, unsigned __int64);
545 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_bool(const num_put*, ostreambuf_iterator_wchar*,
546 ostreambuf_iterator_wchar, ios_base*, wchar_t, MSVCP_bool);
548 void init_exception(void*);
549 void init_locale(void*);
550 void init_io(void*);
551 void free_io(void);
552 void init_misc(void*);
554 /* class complex<float> */
555 typedef struct {
556 float real;
557 float imag;
558 } complex_float;
560 /* class complex<double> */
561 /* class complex<long double> */
562 typedef struct {
563 double real;
564 double imag;
565 } complex_double;
567 #if _MSVCP_VER < 80
568 static inline int memcpy_wrapper( void *dst, size_t size, const void *src, size_t count )
570 memcpy( dst, src, count );
571 return 0;
573 static inline int memmove_wrapper( void *dst, size_t size, const void *src, size_t count )
575 memmove( dst, src, count );
576 return 0;
578 static inline int mbstowcs_wrapper( size_t *ret, wchar_t *wcs, size_t size, const char *mbs, size_t count )
580 mbstowcs( wcs, mbs, count );
581 return 0;
583 #define memcpy_s( dst, size, src, count ) memcpy_wrapper( dst, size, src, count )
584 #define memmove_s( dst, size, src, count ) memmove_wrapper( dst, size, src, count )
585 #define mbstowcs_s( ret, wcs, size, mbs, count ) mbstowcs_wrapper( ret, wcs, size, mbs, count )
586 #define hypotf( x, y ) ((float)hypot( (double)(x), (double)(y) ))
587 #endif