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