hidclass.sys: Break the report descriptor into multiple lines.
[wine.git] / dlls / msvcp90 / msvcp90.h
blobe098c3d9f2d65444c87599b0b6b5a93b65fb005a
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 typedef struct
153 wchar_t *str;
154 wchar_t null_str;
155 } _Yarn_wchar;
157 _Yarn_wchar* __thiscall _Yarn_wchar_ctor(_Yarn_wchar*);
158 const wchar_t* __thiscall _Yarn_wchar__C_str(const _Yarn_wchar*);
159 void __thiscall _Yarn_wchar_dtor(_Yarn_wchar*);
160 _Yarn_wchar* __thiscall _Yarn_wchar_op_assign_cstr(_Yarn_wchar*, const wchar_t*);
162 /* class locale::facet */
163 typedef struct {
164 const vtable_ptr *vtable;
165 MSVCP_size_t refs;
166 } locale_facet;
168 typedef enum {
169 CODECVT_ok = 0,
170 CODECVT_partial = 1,
171 CODECVT_error = 2,
172 CODECVT_noconv = 3
173 } codecvt_base_result;
175 typedef struct {
176 #if _MSVCP_VER < 110
177 LCID handle;
178 #endif
179 unsigned page;
180 const short *table;
181 int delfl;
182 #if _MSVCP_VER >= 110
183 wchar_t *name;
184 #endif
185 } _Ctypevec;
187 /* class codecvt_base */
188 typedef struct {
189 locale_facet facet;
190 } codecvt_base;
192 /* class codecvt<char> */
193 typedef struct {
194 codecvt_base base;
195 } codecvt_char;
197 MSVCP_bool __thiscall codecvt_base_always_noconv(const codecvt_base*);
198 int __thiscall codecvt_char_unshift(const codecvt_char*, int*, char*, char*, char**);
199 int __thiscall codecvt_char_out(const codecvt_char*, int*, const char*,
200 const char*, const char**, char*, char*, char**);
201 int __thiscall codecvt_char_in(const codecvt_char*, int*, const char*,
202 const char*, const char**, char*, char*, char**);
203 int __thiscall codecvt_base_max_length(const codecvt_base*);
205 typedef struct {
206 #if _MSVCP_VER < 110
207 LCID handle;
208 #endif
209 unsigned page;
210 #if _MSVCP_VER >= 110
211 int mb_max;
212 int unk;
213 BYTE isleadbyte[32];
214 #endif
215 } _Cvtvec;
217 /* class codecvt<wchar> */
218 typedef struct {
219 codecvt_base base;
220 _Cvtvec cvt;
221 } codecvt_wchar;
223 int __thiscall codecvt_wchar_unshift(const codecvt_wchar*, int*, char*, char*, char**);
224 int __thiscall codecvt_wchar_out(const codecvt_wchar*, int*, const wchar_t*,
225 const wchar_t*, const wchar_t**, char*, char*, char**);
226 int __thiscall codecvt_wchar_in(const codecvt_wchar*, int*, const char*,
227 const char*, const char**, wchar_t*, wchar_t*, wchar_t**);
229 /* class ctype_base */
230 typedef struct {
231 locale_facet facet;
232 } ctype_base;
234 /* class ctype<char> */
235 typedef struct {
236 ctype_base base;
237 _Ctypevec ctype;
238 } ctype_char;
240 MSVCP_bool __thiscall ctype_char_is_ch(const ctype_char*, short, char);
241 char __thiscall ctype_char_narrow_ch(const ctype_char*, char, char);
242 char __thiscall ctype_char_widen_ch(const ctype_char*, char);
244 /* class ctype<wchar> */
245 typedef struct {
246 ctype_base base;
247 _Ctypevec ctype;
248 _Cvtvec cvt;
249 } ctype_wchar;
251 MSVCP_bool __thiscall ctype_wchar_is_ch(const ctype_wchar*, short, wchar_t);
252 char __thiscall ctype_wchar_narrow_ch(const ctype_wchar*, wchar_t, char);
253 wchar_t __thiscall ctype_wchar_widen_ch(const ctype_wchar*, char);
255 /* class locale */
256 typedef struct
258 struct _locale__Locimp *ptr;
259 } locale;
261 locale* __thiscall locale_ctor(locale*);
262 locale* __thiscall locale_copy_ctor(locale*, const locale*);
263 locale* __thiscall locale_operator_assign(locale*, const locale*);
264 void __thiscall locale_dtor(locale*);
265 void free_locale(void);
266 codecvt_char* codecvt_char_use_facet(const locale*);
267 codecvt_wchar* codecvt_wchar_use_facet(const locale*);
268 codecvt_wchar* codecvt_short_use_facet(const locale*);
269 ctype_char* ctype_char_use_facet(const locale*);
270 ctype_wchar* ctype_wchar_use_facet(const locale*);
271 ctype_wchar* ctype_short_use_facet(const locale*);
273 /* class _Lockit */
274 typedef struct {
275 #if _MSVCP_VER >= 70
276 int locktype;
277 #else
278 char empty_struct;
279 #endif
280 } _Lockit;
282 #define _LOCK_LOCALE 0
283 #define _LOCK_MALLOC 1
284 #define _LOCK_STREAM 2
285 #define _LOCK_DEBUG 3
286 #define _MAX_LOCK 4
288 void init_lockit(void);
289 void free_lockit(void);
290 _Lockit* __thiscall _Lockit_ctor_locktype(_Lockit*, int);
291 void __thiscall _Lockit_dtor(_Lockit*);
293 /* class mutex */
294 typedef struct {
295 void *mutex;
296 } mutex;
298 mutex* __thiscall mutex_ctor(mutex*);
299 void __thiscall mutex_dtor(mutex*);
300 void __thiscall mutex_lock(mutex*);
301 void __thiscall mutex_unlock(mutex*);
303 typedef enum {
304 FMTFLAG_skipws = 0x0001,
305 FMTFLAG_unitbuf = 0x0002,
306 FMTFLAG_uppercase = 0x0004,
307 FMTFLAG_showbase = 0x0008,
308 FMTFLAG_showpoint = 0x0010,
309 FMTFLAG_showpos = 0x0020,
310 FMTFLAG_left = 0x0040,
311 FMTFLAG_right = 0x0080,
312 FMTFLAG_internal = 0x0100,
313 FMTFLAG_dec = 0x0200,
314 FMTFLAG_oct = 0x0400,
315 FMTFLAG_hex = 0x0800,
316 FMTFLAG_scientific = 0x1000,
317 FMTFLAG_fixed = 0x2000,
318 FMTFLAG_hexfloat = 0x3000,
319 FMTFLAG_boolalpha = 0x4000,
320 FMTFLAG_stdio = 0x8000,
321 FMTFLAG_adjustfield = FMTFLAG_left|FMTFLAG_right|FMTFLAG_internal,
322 FMTFLAG_basefield = FMTFLAG_dec|FMTFLAG_oct|FMTFLAG_hex,
323 FMTFLAG_floatfield = FMTFLAG_scientific|FMTFLAG_fixed,
324 FMTFLAG_mask = 0xffff
325 } IOSB_fmtflags;
327 typedef enum {
328 OPENMODE_in = 0x01,
329 OPENMODE_out = 0x02,
330 OPENMODE_ate = 0x04,
331 OPENMODE_app = 0x08,
332 OPENMODE_trunc = 0x10,
333 OPENMODE__Nocreate = 0x40,
334 OPENMODE__Noreplace = 0x80,
335 OPENMODE_binary = 0x20,
336 OPENMODE_mask = 0xff
337 } IOSB_openmode;
339 typedef enum {
340 SEEKDIR_beg = 0x0,
341 SEEKDIR_cur = 0x1,
342 SEEKDIR_end = 0x2,
343 SEEKDIR_mask = 0x3
344 } IOSB_seekdir;
346 typedef enum {
347 IOSTATE_goodbit = 0x00,
348 IOSTATE_eofbit = 0x01,
349 IOSTATE_failbit = 0x02,
350 IOSTATE_badbit = 0x04,
351 IOSTATE__Hardfail = 0x10,
352 IOSTATE_mask = 0x17
353 } IOSB_iostate;
355 typedef struct _iosarray {
356 struct _iosarray *next;
357 int index;
358 int long_val;
359 void *ptr_val;
360 } IOS_BASE_iosarray;
362 typedef enum {
363 EVENT_erase_event,
364 EVENT_imbue_event,
365 EVENT_copyfmt_event
366 } IOS_BASE_event;
368 struct _ios_base;
369 typedef void (CDECL *IOS_BASE_event_callback)(IOS_BASE_event, struct _ios_base*, int);
370 typedef struct _fnarray {
371 struct _fnarray *next;
372 int index;
373 IOS_BASE_event_callback event_handler;
374 } IOS_BASE_fnarray;
376 /* class ios_base */
377 typedef struct _ios_base {
378 const vtable_ptr *vtable;
379 #if _MSVCP_VER >= 100
380 MSVCP_size_t DECLSPEC_ALIGN(8) stdstr;
381 #elif _MSVCP_VER >= 71
382 MSVCP_size_t stdstr;
383 #endif
384 IOSB_iostate state;
385 IOSB_iostate except;
386 IOSB_fmtflags fmtfl;
387 streamsize prec;
388 streamsize wide;
389 IOS_BASE_iosarray *arr;
390 IOS_BASE_fnarray *calls;
391 #if _MSVCP_VER < 70
392 locale loc;
393 #else
394 locale *loc;
395 #endif
396 #if _MSVCP_VER <= 70
397 MSVCP_size_t stdstr;
398 #endif
399 } ios_base;
401 /* class basic_streambuf<char> */
402 typedef struct {
403 const vtable_ptr *vtable;
404 #if _MSVCP_VER >= 70 && _MSVCP_VER <= 100
405 mutex lock;
406 #endif
407 char *rbuf;
408 char *wbuf;
409 char **prbuf;
410 char **pwbuf;
411 char *rpos;
412 char *wpos;
413 char **prpos;
414 char **pwpos;
415 int rsize;
416 int wsize;
417 int *prsize;
418 int *pwsize;
419 #if _MSVCP_VER < 70
420 locale loc;
421 #else
422 locale *loc;
423 #endif
424 } basic_streambuf_char;
426 typedef struct {
427 basic_streambuf_char *strbuf;
428 MSVCP_bool got;
429 char val;
430 } istreambuf_iterator_char;
432 typedef struct {
433 #if _MSVCP_VER == 80
434 void *iter_container;
435 #endif
436 MSVCP_bool failed;
437 basic_streambuf_char *strbuf;
438 } ostreambuf_iterator_char;
440 int __thiscall basic_streambuf_char_sgetc(basic_streambuf_char*);
441 int __thiscall basic_streambuf_char_sbumpc(basic_streambuf_char*);
442 int __thiscall basic_streambuf_char_sputc(basic_streambuf_char*, char);
444 /* class basic_streambuf<wchar> */
445 typedef struct {
446 const vtable_ptr *vtable;
447 #if _MSVCP_VER >= 70 && _MSVCP_VER <= 100
448 mutex lock;
449 #endif
450 wchar_t *rbuf;
451 wchar_t *wbuf;
452 wchar_t **prbuf;
453 wchar_t **pwbuf;
454 wchar_t *rpos;
455 wchar_t *wpos;
456 wchar_t **prpos;
457 wchar_t **pwpos;
458 int rsize;
459 int wsize;
460 int *prsize;
461 int *pwsize;
462 #if _MSVCP_VER < 70
463 locale loc;
464 #else
465 locale *loc;
466 #endif
467 } basic_streambuf_wchar;
469 typedef struct {
470 basic_streambuf_wchar *strbuf;
471 MSVCP_bool got;
472 wchar_t val;
473 } istreambuf_iterator_wchar;
475 typedef struct {
476 #if _MSVCP_VER == 80
477 void *iter_container;
478 #endif
479 MSVCP_bool failed;
480 basic_streambuf_wchar *strbuf;
481 } ostreambuf_iterator_wchar;
483 unsigned short __thiscall basic_streambuf_wchar_sgetc(basic_streambuf_wchar*);
484 unsigned short __thiscall basic_streambuf_wchar_sbumpc(basic_streambuf_wchar*);
485 unsigned short __thiscall basic_streambuf_wchar_sputc(basic_streambuf_wchar*, wchar_t);
487 #if _MSVCP_VER < 70
488 #define IOS_LOCALE(ios) (&(ios)->loc)
489 #else
490 #define IOS_LOCALE(ios) ((ios)->loc)
491 #endif
493 /* class num_get<char> */
494 typedef struct {
495 locale_facet facet;
496 _Cvtvec cvt;
497 } num_get;
499 num_get* num_get_char_use_facet(const locale*);
500 istreambuf_iterator_char* __thiscall num_get_char_get_long(const num_get*, istreambuf_iterator_char*,
501 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONG*);
502 istreambuf_iterator_char* __thiscall num_get_char_get_ushort(const num_get*, istreambuf_iterator_char*,
503 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned short*);
504 istreambuf_iterator_char* __thiscall num_get_char_get_uint(const num_get*, istreambuf_iterator_char*,
505 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned int*);
506 istreambuf_iterator_char* __thiscall num_get_char_get_ulong(const num_get*, istreambuf_iterator_char*,
507 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONG*);
508 istreambuf_iterator_char* __thiscall num_get_char_get_float(const num_get*, istreambuf_iterator_char*,
509 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, float*);
510 istreambuf_iterator_char *__thiscall num_get_char_get_double(const num_get*, istreambuf_iterator_char*,
511 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*);
512 istreambuf_iterator_char *__thiscall num_get_char_get_ldouble(const num_get*, istreambuf_iterator_char*,
513 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*);
514 istreambuf_iterator_char *__thiscall num_get_char_get_void(const num_get*, istreambuf_iterator_char*,
515 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, void**);
516 istreambuf_iterator_char *__thiscall num_get_char_get_int64(const num_get*, istreambuf_iterator_char*,
517 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONGLONG*);
518 istreambuf_iterator_char *__thiscall num_get_char_get_uint64(const num_get*, istreambuf_iterator_char*,
519 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONGLONG*);
520 istreambuf_iterator_char *__thiscall num_get_char_get_bool(const num_get*, istreambuf_iterator_char*,
521 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, MSVCP_bool*);
523 num_get* num_get_wchar_use_facet(const locale*);
524 num_get* num_get_short_use_facet(const locale*);
525 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_long(const num_get*, istreambuf_iterator_wchar*,
526 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONG*);
527 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_ushort(const num_get*, istreambuf_iterator_wchar*,
528 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned short*);
529 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_uint(const num_get*, istreambuf_iterator_wchar*,
530 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned int*);
531 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_ulong(const num_get*, istreambuf_iterator_wchar*,
532 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONG*);
533 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_float(const num_get*, istreambuf_iterator_wchar*,
534 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, float*);
535 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_double(const num_get*, istreambuf_iterator_wchar*,
536 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*);
537 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_ldouble(const num_get*, istreambuf_iterator_wchar*,
538 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*);
539 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_void(const num_get*, istreambuf_iterator_wchar*,
540 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, void**);
541 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_int64(const num_get*, istreambuf_iterator_wchar*,
542 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONGLONG*);
543 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_uint64(const num_get*, istreambuf_iterator_wchar*,
544 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONGLONG*);
545 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_bool(const num_get*, istreambuf_iterator_wchar*,
546 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, MSVCP_bool*);
548 /* class num_put<char> */
549 /* class num_put<wchar> */
550 typedef struct {
551 locale_facet facet;
552 _Cvtvec cvt;
553 } num_put;
555 num_put* num_put_char_use_facet(const locale*);
556 ostreambuf_iterator_char* __thiscall num_put_char_put_long(const num_put*, ostreambuf_iterator_char*,
557 ostreambuf_iterator_char, ios_base*, char, LONG);
558 ostreambuf_iterator_char* __thiscall num_put_char_put_ulong(const num_put*, ostreambuf_iterator_char*,
559 ostreambuf_iterator_char, ios_base*, char, ULONG);
560 ostreambuf_iterator_char* __thiscall num_put_char_put_double(const num_put*, ostreambuf_iterator_char*,
561 ostreambuf_iterator_char, ios_base*, char, double);
562 ostreambuf_iterator_char* __thiscall num_put_char_put_ldouble(const num_put*, ostreambuf_iterator_char*,
563 ostreambuf_iterator_char, ios_base*, char, double);
564 ostreambuf_iterator_char* __thiscall num_put_char_put_ptr(const num_put*, ostreambuf_iterator_char*,
565 ostreambuf_iterator_char, ios_base*, char, const void*);
566 ostreambuf_iterator_char* __thiscall num_put_char_put_int64(const num_put*, ostreambuf_iterator_char*,
567 ostreambuf_iterator_char, ios_base*, char, __int64);
568 ostreambuf_iterator_char* __thiscall num_put_char_put_uint64(const num_put*, ostreambuf_iterator_char*,
569 ostreambuf_iterator_char, ios_base*, char, unsigned __int64);
570 ostreambuf_iterator_char* __thiscall num_put_char_put_bool(const num_put*, ostreambuf_iterator_char*,
571 ostreambuf_iterator_char, ios_base*, char, MSVCP_bool);
573 num_put* num_put_wchar_use_facet(const locale*);
574 num_put* num_put_short_use_facet(const locale*);
575 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_long(const num_put*, ostreambuf_iterator_wchar*,
576 ostreambuf_iterator_wchar, ios_base*, wchar_t, LONG);
577 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_ulong(const num_put*, ostreambuf_iterator_wchar*,
578 ostreambuf_iterator_wchar, ios_base*, wchar_t, ULONG);
579 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_double(const num_put*, ostreambuf_iterator_wchar*,
580 ostreambuf_iterator_wchar, ios_base*, wchar_t, double);
581 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_ldouble(const num_put*, ostreambuf_iterator_wchar*,
582 ostreambuf_iterator_wchar, ios_base*, wchar_t, double);
583 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_ptr(const num_put*, ostreambuf_iterator_wchar*,
584 ostreambuf_iterator_wchar, ios_base*, wchar_t, const void*);
585 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_int64(const num_put*, ostreambuf_iterator_wchar*,
586 ostreambuf_iterator_wchar, ios_base*, wchar_t, __int64);
587 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_uint64(const num_put*, ostreambuf_iterator_wchar*,
588 ostreambuf_iterator_wchar, ios_base*, wchar_t, unsigned __int64);
589 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_bool(const num_put*, ostreambuf_iterator_wchar*,
590 ostreambuf_iterator_wchar, ios_base*, wchar_t, MSVCP_bool);
592 void init_exception(void*);
593 void init_locale(void*);
594 void init_io(void*);
595 void free_io(void);
596 void init_misc(void*);
598 /* class complex<float> */
599 typedef struct {
600 float real;
601 float imag;
602 } complex_float;
604 /* class complex<double> */
605 /* class complex<long double> */
606 typedef struct {
607 double real;
608 double imag;
609 } complex_double;
611 #if _MSVCP_VER < 80
612 static inline int memcpy_wrapper( void *dst, size_t size, const void *src, size_t count )
614 memcpy( dst, src, count );
615 return 0;
617 static inline int memmove_wrapper( void *dst, size_t size, const void *src, size_t count )
619 memmove( dst, src, count );
620 return 0;
622 static inline int mbstowcs_wrapper( size_t *ret, wchar_t *wcs, size_t size, const char *mbs, size_t count )
624 mbstowcs( wcs, mbs, count );
625 return 0;
627 #define memcpy_s( dst, size, src, count ) memcpy_wrapper( dst, size, src, count )
628 #define memmove_s( dst, size, src, count ) memmove_wrapper( dst, size, src, count )
629 #define mbstowcs_s( ret, wcs, size, mbs, count ) mbstowcs_wrapper( ret, wcs, size, mbs, count )
630 #define hypotf( x, y ) ((float)hypot( (double)(x), (double)(y) ))
631 #endif
633 void free_misc(void);