msvcp90: Use macro to define RTTI data.
[wine] / dlls / msvcp90 / ios.c
1 /*
2  * Copyright 2011 Piotr Caban for CodeWeavers
3  *
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.
8  *
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.
13  *
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
17  */
18
19 #include "config.h"
20
21 #include <stdarg.h>
22 #include <stdio.h>
23
24 #include "msvcp90.h"
25 #include "windef.h"
26 #include "winbase.h"
27 #include "wine/debug.h"
28 WINE_DEFAULT_DEBUG_CHANNEL(msvcp90);
29
30 typedef enum {
31     IOSTATE_goodbit   = 0x00,
32     IOSTATE_eofbit    = 0x01,
33     IOSTATE_failbit   = 0x02,
34     IOSTATE_badbit    = 0x04,
35     IOSTATE__Hardfail = 0x10
36 } IOSB_iostate;
37
38 typedef enum {
39     FMTFLAG_skipws      = 0x0001,
40     FMTFLAG_unitbuf     = 0x0002,
41     FMTFLAG_uppercase   = 0x0004,
42     FMTFLAG_showbase    = 0x0008,
43     FMTFLAG_showpoint   = 0x0010,
44     FMTFLAG_showpos     = 0x0020,
45     FMTFLAG_left        = 0x0040,
46     FMTFLAG_right       = 0x0080,
47     FMTFLAG_internal    = 0x0100,
48     FMTFLAG_dec         = 0x0200,
49     FMTFLAG_oct         = 0x0400,
50     FMTFLAG_hex         = 0x0800,
51     FMTFLAG_scientific  = 0x1000,
52     FMTFLAG_fixed       = 0x2000,
53     FMTFLAG_hexfloat    = 0x3000,
54     FMTFLAG_boolalpha   = 0x4000,
55     FMTFLAG_stdio       = 0x8000,
56     FMTFLAG_adjustfield = FMTFLAG_left|FMTFLAG_right|FMTFLAG_internal,
57     FMTFLAG_basefield   = FMTFLAG_dec|FMTFLAG_oct|FMTFLAG_hex,
58     FMTFLAG_floadfield  = FMTFLAG_scientific|FMTFLAG_fixed
59 } IOSB_fmtflags;
60
61 typedef struct _iosarray {
62     struct _iosarray *next;
63     int index;
64     int long_val;
65     void *ptr_val;
66 } IOS_BASE_iosarray;
67
68 typedef enum {
69     EVENT_erase_event,
70     EVENT_imbue_event,
71     EVENT_copyfmt_event
72 } IOS_BASE_event;
73
74 struct _ios_base;
75 typedef void (CDECL *IOS_BASE_event_callback)(IOS_BASE_event, struct _ios_base*, int);
76 typedef struct _fnarray {
77     struct _fnarray *next;
78     int index;
79     IOS_BASE_event_callback event_handler;
80 } IOS_BASE_fnarray;
81
82 /* ?_Index@ios_base@std@@0HA */
83 int ios_base_Index = 0;
84 /* ?_Sync@ios_base@std@@0_NA */
85 MSVCP_bool ios_base_Sync = FALSE;
86
87 typedef struct _ios_base {
88     const vtable_ptr *vtable;
89     MSVCP_size_t stdstr;
90     IOSB_iostate state;
91     IOSB_iostate except;
92     IOSB_fmtflags fmtfl;
93     MSVCP_size_t prec;
94     MSVCP_size_t wide;
95     IOS_BASE_iosarray *arr;
96     IOS_BASE_fnarray *calls;
97     locale *loc;
98 } ios_base;
99
100 typedef struct {
101     streamoff off;
102     __int64 DECLSPEC_ALIGN(8) pos;
103     int state;
104 } fpos_int;
105
106 static inline const char* debugstr_fpos_int(fpos_int *fpos)
107 {
108     return wine_dbg_sprintf("fpos(%lu %s %d)", fpos->off, wine_dbgstr_longlong(fpos->pos), fpos->state);
109 }
110
111 typedef struct {
112     const vtable_ptr *vtable;
113     mutex lock;
114     char *rbuf;
115     char *wbuf;
116     char **prbuf;
117     char **pwbuf;
118     char *rpos;
119     char *wpos;
120     char **prpos;
121     char **pwpos;
122     int rsize;
123     int wsize;
124     int *prsize;
125     int *pwsize;
126     locale *loc;
127 } basic_streambuf_char;
128
129 void __thiscall basic_streambuf_char__Init_empty(basic_streambuf_char*);
130 void __thiscall basic_streambuf_char_setp(basic_streambuf_char*, char*, char*);
131 void __thiscall basic_streambuf_char_setg(basic_streambuf_char*, char*, char*, char*);
132
133 typedef struct {
134     ios_base child;
135     basic_streambuf_char *strbuf;
136     struct basic_ostream_char *stream;
137     char fillch;
138 } basic_ios_char;
139
140 typedef struct {
141     const vtable_ptr *vtable;
142     basic_ios_char child;
143 } basic_ostream_char;
144
145 /* ??_7ios_base@std@@6B@ */
146 extern const vtable_ptr MSVCP_ios_base_vtable;
147
148 /* ??_7?$basic_ios@DU?$char_traits@D@std@@@std@@6B@ */
149 extern const vtable_ptr MSVCP_basic_ios_char_vtable;
150
151 /* ??_7?$basic_streambuf@DU?$char_traits@D@std@@@std@@6B@ */
152 extern const vtable_ptr MSVCP_basic_streambuf_char_vtable;
153
154 /* ??_7?$basic_ostream@DU?$char_traits@D@std@@@std@@6B@ */
155 extern const vtable_ptr MSVCP_basic_ostream_char_vtable;
156
157 static const type_info iosb_type_info = {
158     &MSVCP_ios_base_vtable,
159     NULL,
160     ".?AV?$_Iosb@H@std@@"
161 };
162     
163 static const rtti_base_descriptor iosb_rtti_base_descriptor = {
164     &iosb_type_info,
165     0,
166     { 4, -1, 0 },
167     64
168 };
169
170 DEFINE_RTTI_DATA(ios_base, 0, 1, &iosb_rtti_base_descriptor, NULL, NULL, ".?AV?$_Iosb@H@std@@");
171 DEFINE_RTTI_DATA(basic_ios_char, 0, 2, &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
172         NULL, ".?AV?$basic_ios@DU?$char_traits@D@std@@@std@@");
173 DEFINE_RTTI_DATA(basic_streambuf_char, 0, 0, NULL, NULL, NULL,
174         ".?AV?$basic_streambuf@DU?$char_traits@D@std@@@std@@");
175 DEFINE_RTTI_DATA(basic_ostream_char, 4, 3, &basic_ios_char_rtti_base_descriptor, &ios_base_rtti_base_descriptor,
176         &iosb_rtti_base_descriptor, ".?AV?$basic_ostream@DU?$char_traits@D@std@@@std@@");
177
178 #ifndef __GNUC__
179 void __asm_dummy_vtables(void) {
180 #endif
181     __ASM_VTABLE(ios_base, "");
182     __ASM_VTABLE(basic_ios_char, "");
183     __ASM_VTABLE(basic_streambuf_char,
184             VTABLE_ADD_FUNC(basic_streambuf_char_overflow)
185             VTABLE_ADD_FUNC(basic_streambuf_char_pbackfail)
186             VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc)
187             VTABLE_ADD_FUNC(basic_streambuf_char_underflow)
188             VTABLE_ADD_FUNC(basic_streambuf_char_uflow)
189             VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn)
190             VTABLE_ADD_FUNC(basic_streambuf_char__Xsgetn_s)
191             VTABLE_ADD_FUNC(basic_streambuf_char_xsputn)
192             VTABLE_ADD_FUNC(basic_streambuf_char_seekoff)
193             VTABLE_ADD_FUNC(basic_streambuf_char_seekpos)
194             VTABLE_ADD_FUNC(basic_streambuf_char_setbuf)
195             VTABLE_ADD_FUNC(basic_streambuf_char_sync)
196             VTABLE_ADD_FUNC(basic_streambuf_char_imbue));
197     __ASM_VTABLE(basic_ostream_char, "");
198 #ifndef __GNUC__
199 }
200 #endif
201
202 /* ??0ios_base@std@@IAE@XZ */
203 /* ??0ios_base@std@@IEAA@XZ */
204 DEFINE_THISCALL_WRAPPER(ios_base_ctor, 4)
205 ios_base* __thiscall ios_base_ctor(ios_base *this)
206 {
207     FIXME("(%p) stub\n", this);
208
209     this->vtable = &MSVCP_ios_base_vtable;
210     return NULL;
211 }
212
213 /* ??0ios_base@std@@QAE@ABV01@@Z */
214 /* ??0ios_base@std@@QEAA@AEBV01@@Z */
215 DEFINE_THISCALL_WRAPPER(ios_base_copy_ctor, 8)
216 ios_base* __thiscall ios_base_copy_ctor(ios_base *this, const ios_base *copy)
217 {
218     FIXME("(%p %p) stub\n", this, copy);
219     return NULL;
220 }
221
222 /* ??1ios_base@std@@UAE@XZ */
223 /* ??1ios_base@std@@UEAA@XZ */
224 DEFINE_THISCALL_WRAPPER(ios_base_dtor, 4)
225 void __thiscall ios_base_dtor(ios_base *this)
226 {
227     FIXME("(%p) stub\n", this);
228 }
229
230 DEFINE_THISCALL_WRAPPER(MSVCP_ios_base_vector_dtor, 8)
231 ios_base* __thiscall MSVCP_ios_base_vector_dtor(ios_base *this, unsigned int flags)
232 {
233     TRACE("(%p %x) stub\n", this, flags);
234     if(flags & 2) {
235         /* we have an array, with the number of elements stored before the first object */
236         int i, *ptr = (int *)this-1;
237
238         for(i=*ptr-1; i>=0; i--)
239             ios_base_dtor(this+i);
240         MSVCRT_operator_delete(ptr);
241     } else {
242         ios_base_dtor(this);
243         if(flags & 1)
244             MSVCRT_operator_delete(this);
245     }
246
247     return this;
248 }
249
250 /* ??4ios_base@std@@QAEAAV01@ABV01@@Z */
251 /* ??4ios_base@std@@QEAAAEAV01@AEBV01@@Z */
252 DEFINE_THISCALL_WRAPPER(ios_base_assign, 8)
253 ios_base* __thiscall ios_base_assign(ios_base *this, const ios_base *right)
254 {
255     FIXME("(%p %p) stub\n", this, right);
256     return NULL;
257 }
258
259 /* ??7ios_base@std@@QBE_NXZ */
260 /* ??7ios_base@std@@QEBA_NXZ */
261 DEFINE_THISCALL_WRAPPER(ios_base_op_succ, 4)
262 MSVCP_bool __thiscall ios_base_op_succ(const ios_base *this)
263 {
264     FIXME("(%p) stub\n", this);
265     return FALSE;
266 }
267
268 /* ??Bios_base@std@@QBEPAXXZ */
269 /* ??Bios_base@std@@QEBAPEAXXZ */
270 DEFINE_THISCALL_WRAPPER(ios_base_op_fail, 4)
271 void* __thiscall ios_base_op_fail(const ios_base *this)
272 {
273     FIXME("(%p) stub\n", this);
274     return NULL;
275 }
276
277 /* ?_Addstd@ios_base@std@@SAXPAV12@@Z */
278 /* ?_Addstd@ios_base@std@@SAXPEAV12@@Z */
279 void CDECL ios_base_Addstd(ios_base *add)
280 {
281     FIXME("(%p) stub\n", add);
282 }
283
284 /* ?_Callfns@ios_base@std@@AAEXW4event@12@@Z */
285 /* ?_Callfns@ios_base@std@@AEAAXW4event@12@@Z */
286 DEFINE_THISCALL_WRAPPER(ios_base_Callfns, 8)
287 void __thiscall ios_base_Callfns(ios_base *this, IOS_BASE_event event)
288 {
289     FIXME("(%p %x) stub\n", this, event);
290 }
291
292 /* ?_Findarr@ios_base@std@@AAEAAU_Iosarray@12@H@Z */
293 /* ?_Findarr@ios_base@std@@AEAAAEAU_Iosarray@12@H@Z */
294 DEFINE_THISCALL_WRAPPER(ios_base_Findarr, 8)
295 IOS_BASE_iosarray* __thiscall ios_base_Findarr(ios_base *this, int index)
296 {
297     FIXME("(%p %d) stub\n", this, index);
298     return NULL;
299 }
300
301 /* ?_Index_func@ios_base@std@@CAAAHXZ */
302 /* ?_Index_func@ios_base@std@@CAAEAHXZ */
303 int* CDECL ios_base_Index_func(void)
304 {
305     TRACE("\n");
306     return &ios_base_Index;
307 }
308
309 /* ?_Init@ios_base@std@@IAEXXZ */
310 /* ?_Init@ios_base@std@@IEAAXXZ */
311 DEFINE_THISCALL_WRAPPER(ios_base_Init, 4)
312 void __thiscall ios_base_Init(ios_base *this)
313 {
314     FIXME("(%p) stub\n", this);
315 }
316
317 /* ?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z */
318 /* ?_Ios_base_dtor@ios_base@std@@CAXPEAV12@@Z */
319 void CDECL ios_base_Ios_base_dtor(ios_base *obj)
320 {
321     FIXME("(%p) stub\n", obj);
322 }
323
324 /* ?_Sync_func@ios_base@std@@CAAA_NXZ */
325 /* ?_Sync_func@ios_base@std@@CAAEA_NXZ */
326 MSVCP_bool* CDECL ios_base_Sync_func(void)
327 {
328     TRACE("\n");
329     return &ios_base_Sync;
330 }
331
332 /* ?_Tidy@ios_base@std@@AAAXXZ */
333 /* ?_Tidy@ios_base@std@@AEAAXXZ */
334 void CDECL ios_base_Tidy(ios_base *this)
335 {
336     FIXME("(%p) stub\n", this);
337 }
338
339 /* ?bad@ios_base@std@@QBE_NXZ */
340 /* ?bad@ios_base@std@@QEBA_NXZ */
341 DEFINE_THISCALL_WRAPPER(ios_base_bad, 4)
342 MSVCP_bool __thiscall ios_base_bad(const ios_base *this)
343 {
344     FIXME("(%p) stub\n", this);
345     return FALSE;
346 }
347
348 /* ?clear@ios_base@std@@QAEXH_N@Z */
349 /* ?clear@ios_base@std@@QEAAXH_N@Z */
350 DEFINE_THISCALL_WRAPPER(ios_base_clear_reraise, 12)
351 void __thiscall ios_base_clear_reraise(ios_base *this, IOSB_iostate state, MSVCP_bool reraise)
352 {
353     FIXME("(%p %x %x) stub\n", this, state, reraise);
354 }
355
356 /* ?clear@ios_base@std@@QAEXH@Z */
357 /* ?clear@ios_base@std@@QEAAXH@Z */
358 DEFINE_THISCALL_WRAPPER(ios_base_clear, 8)
359 void __thiscall ios_base_clear(ios_base *this, IOSB_iostate state)
360 {
361     ios_base_clear_reraise(this, state, FALSE);
362 }
363
364 /* ?clear@ios_base@std@@QAEXI@Z */
365 /* ?clear@ios_base@std@@QEAAXI@Z */
366 DEFINE_THISCALL_WRAPPER(ios_base_clear_unsigned, 8)
367 void __thiscall ios_base_clear_unsigned(ios_base *this, unsigned int state)
368 {
369     ios_base_clear_reraise(this, (IOSB_iostate)state, FALSE);
370 }
371
372 /* ?copyfmt@ios_base@std@@QAEAAV12@ABV12@@Z */
373 /* ?copyfmt@ios_base@std@@QEAAAEAV12@AEBV12@@Z */
374 DEFINE_THISCALL_WRAPPER(ios_base_copyfmt, 8)
375 ios_base* __thiscall ios_base_copyfmt(ios_base *this, const ios_base *obj)
376 {
377     FIXME("(%p %p) stub\n", this, obj);
378     return NULL;
379 }
380
381 /* ?eof@ios_base@std@@QBE_NXZ */
382 /* ?eof@ios_base@std@@QEBA_NXZ */
383 DEFINE_THISCALL_WRAPPER(ios_base_eof, 4)
384 MSVCP_bool __thiscall ios_base_eof(const ios_base *this)
385 {
386     FIXME("(%p) stub\n", this);
387     return FALSE;
388 }
389
390 /* ?exceptions@ios_base@std@@QAEXH@Z */
391 /* ?exceptions@ios_base@std@@QEAAXH@Z */
392 DEFINE_THISCALL_WRAPPER(ios_base_exception_set, 8)
393 void __thiscall ios_base_exception_set(ios_base *this, IOSB_iostate state)
394 {
395     FIXME("(%p %x) stub\n", this, state);
396 }
397
398 /* ?exceptions@ios_base@std@@QAEXI@Z */
399 /* ?exceptions@ios_base@std@@QEAAXI@Z */
400 DEFINE_THISCALL_WRAPPER(ios_base_exception_set_unsigned, 8)
401 void __thiscall ios_base_exception_set_unsigned(ios_base *this, unsigned int state)
402 {
403     FIXME("(%p %x) stub\n", this, state);
404 }
405
406 /* ?exceptions@ios_base@std@@QBEHXZ */
407 /* ?exceptions@ios_base@std@@QEBAHXZ */
408 DEFINE_THISCALL_WRAPPER(ios_base_exception_get, 4)
409 IOSB_iostate __thiscall ios_base_exception_get(ios_base *this)
410 {
411     FIXME("(%p) stub\n", this);
412     return 0;
413 }
414
415 /* ?fail@ios_base@std@@QBE_NXZ */
416 /* ?fail@ios_base@std@@QEBA_NXZ */
417 DEFINE_THISCALL_WRAPPER(ios_base_fail, 4)
418 MSVCP_bool __thiscall ios_base_fail(ios_base *this)
419 {
420     FIXME("(%p) stub\n", this);
421     return 0;
422 }
423
424 /* ?flags@ios_base@std@@QAEHH@Z */
425 /* ?flags@ios_base@std@@QEAAHH@Z */
426 DEFINE_THISCALL_WRAPPER(ios_base_flags_set, 8)
427 IOSB_fmtflags __thiscall ios_base_flags_set(ios_base *this, IOSB_fmtflags flags)
428 {
429     FIXME("(%p %x) stub\n", this, flags);
430     return 0;
431 }
432
433 /* ?flags@ios_base@std@@QBEHXZ */
434 /* ?flags@ios_base@std@@QEBAHXZ */
435 DEFINE_THISCALL_WRAPPER(ios_base_flags_get, 4)
436 IOSB_fmtflags __thiscall ios_base_flags_get(const ios_base *this)
437 {
438     FIXME("(%p) stub\n", this);
439     return 0;
440 }
441
442 /* ?getloc@ios_base@std@@QBE?AVlocale@2@XZ */
443 /* ?getloc@ios_base@std@@QEBA?AVlocale@2@XZ */
444 DEFINE_THISCALL_WRAPPER(ios_base_getloc, 4)
445 locale __thiscall ios_base_getloc(const ios_base *this)
446 {
447     locale ret = { NULL };
448     FIXME("(%p) stub\n", this);
449     return ret;
450 }
451
452 /* ?good@ios_base@std@@QBE_NXZ */
453 /* ?good@ios_base@std@@QEBA_NXZ */
454 DEFINE_THISCALL_WRAPPER(ios_base_good, 4)
455 MSVCP_bool __thiscall ios_base_good(const ios_base *this)
456 {
457     FIXME("(%p) stub\n", this);
458     return FALSE;
459 }
460
461 /* ?imbue@ios_base@std@@QAE?AVlocale@2@ABV32@@Z */
462 /* ?imbue@ios_base@std@@QEAA?AVlocale@2@AEBV32@@Z */
463 DEFINE_THISCALL_WRAPPER(ios_base_imbue, 8)
464 locale __thiscall ios_base_imbue(ios_base *this, const locale *loc)
465 {
466     locale ret = { NULL };
467     FIXME("(%p %p) stub\n", this, loc);
468     return ret;
469 }
470
471 /* ?iword@ios_base@std@@QAEAAJH@Z */
472 /* ?iword@ios_base@std@@QEAAAEAJH@Z */
473 DEFINE_THISCALL_WRAPPER(ios_base_iword, 8)
474 LONG* __thiscall ios_base_iword(ios_base *this, int index)
475 {
476     FIXME("(%p %d) stub\n", this, index);
477     return NULL;
478 }
479
480 /* ?precision@ios_base@std@@QAEHH@Z */
481 /* ?precision@ios_base@std@@QEAA_J_J@Z */
482 DEFINE_THISCALL_WRAPPER(ios_base_precision_set, 8)
483 MSVCP_size_t __thiscall ios_base_precision_set(ios_base *this, MSVCP_size_t precision)
484 {
485     FIXME("(%p %lu) stub\n", this, precision);
486     return 0;
487 }
488
489 /* ?precision@ios_base@std@@QBEHXZ */
490 /* ?precision@ios_base@std@@QEBA_JXZ */
491 DEFINE_THISCALL_WRAPPER(ios_base_precision_get, 4)
492 MSVCP_size_t __thiscall ios_base_precision_get(const ios_base *this)
493 {
494     FIXME("(%p) stub\n", this);
495     return 0;
496 }
497
498 /* ?pword@ios_base@std@@QAEAAPAXH@Z */
499 /* ?pword@ios_base@std@@QEAAAEAPEAXH@Z */
500 DEFINE_THISCALL_WRAPPER(ios_base_pword, 8)
501 void** __thiscall ios_base_pword(ios_base *this, int index)
502 {
503     FIXME("(%p %d) stub\n", this, index);
504     return NULL;
505 }
506
507 /* ?rdstate@ios_base@std@@QBEHXZ */
508 /* ?rdstate@ios_base@std@@QEBAHXZ */
509 DEFINE_THISCALL_WRAPPER(ios_base_rdstate, 4)
510 IOSB_iostate __thiscall ios_base_rdstate(const ios_base *this)
511 {
512     FIXME("(%p) stub\n", this);
513     return 0;
514 }
515
516 /* ?register_callback@ios_base@std@@QAEXP6AXW4event@12@AAV12@H@ZH@Z */
517 /* ?register_callback@ios_base@std@@QEAAXP6AXW4event@12@AEAV12@H@ZH@Z */
518 DEFINE_THISCALL_WRAPPER(ios_base_register_callback, 12)
519 void __thiscall ios_base_register_callback(ios_base *this, IOS_BASE_event_callback callback, int index)
520 {
521     FIXME("(%p %p %d) stub\n", this, callback, index);
522 }
523
524 /* ?setf@ios_base@std@@QAEHHH@Z */
525 /* ?setf@ios_base@std@@QEAAHHH@Z */
526 DEFINE_THISCALL_WRAPPER(ios_base_setf_mask, 12)
527 IOSB_fmtflags __thiscall ios_base_setf_mask(ios_base *this, IOSB_fmtflags flags, IOSB_fmtflags mask)
528 {
529     FIXME("(%p %x %x) stub\n", this, flags, mask);
530     return 0;
531 }
532
533 /* ?setf@ios_base@std@@QAEHH@Z */
534 /* ?setf@ios_base@std@@QEAAHH@Z */
535 DEFINE_THISCALL_WRAPPER(ios_base_setf, 8)
536 IOSB_fmtflags __thiscall ios_base_setf(ios_base *this, IOSB_fmtflags flags)
537 {
538     return ios_base_setf_mask(this, flags, ~0);
539 }
540
541 /* ?setstate@ios_base@std@@QAEXH_N@Z */
542 /* ?setstate@ios_base@std@@QEAAXH_N@Z */
543 DEFINE_THISCALL_WRAPPER(ios_base_setstate_reraise, 12)
544 void __thiscall ios_base_setstate_reraise(ios_base *this, IOSB_iostate state, MSVCP_bool reraise)
545 {
546     FIXME("(%p %x %x) stub\n", this, state, reraise);
547 }
548
549 /* ?setstate@ios_base@std@@QAEXH@Z */
550 /* ?setstate@ios_base@std@@QEAAXH@Z */
551 DEFINE_THISCALL_WRAPPER(ios_base_setstate, 8)
552 void __thiscall ios_base_setstate(ios_base *this, IOSB_iostate state)
553 {
554     ios_base_setstate_reraise(this, state, FALSE);
555 }
556
557 /* ?setstate@ios_base@std@@QAEXI@Z */
558 /* ?setstate@ios_base@std@@QEAAXI@Z */
559 DEFINE_THISCALL_WRAPPER(ios_base_setstate_unsigned, 8)
560 void __thiscall ios_base_setstate_unsigned(ios_base *this, unsigned int state)
561 {
562     ios_base_setstate_reraise(this, (IOSB_iostate)state, FALSE);
563 }
564
565 /* ?sync_with_stdio@ios_base@std@@SA_N_N@Z */
566 MSVCP_bool CDECL ios_base_sync_with_stdio(MSVCP_bool sync)
567 {
568     FIXME("(%x) stub\n", sync);
569     return FALSE;
570 }
571
572 /* ?unsetf@ios_base@std@@QAEXH@Z */
573 /* ?unsetf@ios_base@std@@QEAAXH@Z */
574 DEFINE_THISCALL_WRAPPER(ios_base_unsetf, 8)
575 void __thiscall ios_base_unsetf(ios_base *this, IOSB_fmtflags flags)
576 {
577     FIXME("(%p %x) stub\n", this, flags);
578 }
579
580 /* ?width@ios_base@std@@QAEHH@Z */
581 /* ?width@ios_base@std@@QEAA_J_J@Z */
582 DEFINE_THISCALL_WRAPPER(ios_base_width_set, 8)
583 MSVCP_size_t __thiscall ios_base_width_set(ios_base *this, MSVCP_size_t width)
584 {
585     FIXME("(%p %lu) stub\n", this, width);
586     return 0;
587 }
588
589 /* ?width@ios_base@std@@QBEHXZ */
590 /* ?width@ios_base@std@@QEBA_JXZ */
591 DEFINE_THISCALL_WRAPPER(ios_base_width_get, 4)
592 MSVCP_size_t __thiscall ios_base_width_get(ios_base *this)
593 {
594     FIXME("(%p) stub\n", this);
595     return 0;
596 }
597
598 /* ?xalloc@ios_base@std@@SAHXZ */
599 int CDECL ios_base_xalloc(void)
600 {
601     FIXME("stub\n");
602     return 0;
603 }
604
605 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IAE@XZ */
606 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IEAA@XZ */
607 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor, 4)
608 basic_ios_char* __thiscall basic_ios_char_ctor(basic_ios_char *this)
609 {
610     FIXME("(%p) stub\n", this);
611     return NULL;
612 }
613
614 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
615 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
616 DEFINE_THISCALL_WRAPPER(basic_ios_char_copy_ctor, 8)
617 basic_ios_char* __thiscall basic_ios_char_copy_ctor(basic_ios_char *this, const basic_ios_char *copy)
618 {
619     FIXME("(%p %p) stub\n", this, copy);
620     return NULL;
621 }
622
623 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UAE@XZ */
624 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UEAA@XZ */
625 DEFINE_THISCALL_WRAPPER(basic_ios_char_dtor, 4)
626 void __thiscall basic_ios_char_dtor(basic_ios_char *this)
627 {
628     FIXME("(%p) stub\n", this);
629 }
630
631 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ios_char_vector_dtor, 8)
632 basic_ios_char* __thiscall MSVCP_basic_ios_char_vector_dtor(basic_ios_char *this, unsigned int flags)
633 {
634     TRACE("(%p %x) stub\n", this, flags);
635     if(flags & 2) {
636         /* we have an array, with the number of elements stored before the first object */
637         int i, *ptr = (int *)this-1;
638
639         for(i=*ptr-1; i>=0; i--)
640             basic_ios_char_dtor(this+i);
641         MSVCRT_operator_delete(ptr);
642     } else {
643         basic_ios_char_dtor(this);
644         if(flags & 1)
645             MSVCRT_operator_delete(this);
646     }
647
648     return this;
649 }
650
651 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
652 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
653 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear_reraise, 12)
654 void __thiscall basic_ios_char_clear_reraise(basic_ios_char *this, IOSB_iostate state, MSVCP_bool reraise)
655 {
656     FIXME("(%p %x %x) stub\n", this, state, reraise);
657 }
658
659 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
660 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
661 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear, 8)
662 void __thiscall basic_ios_char_clear(basic_ios_char *this, unsigned int state)
663 {
664     basic_ios_char_clear_reraise(this, (IOSB_iostate)state, FALSE);
665 }
666
667 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEAAV12@ABV12@@Z */
668 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEBV12@@Z */
669 DEFINE_THISCALL_WRAPPER(basic_ios_char_copyfmt, 8)
670 basic_ios_char* __thiscall basic_ios_char_copyfmt(basic_ios_char *this, basic_ios_char *copy)
671 {
672     FIXME("(%p %p) stub\n", this, copy);
673     return NULL;
674 }
675
676 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEDD@Z */
677 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAADD@Z */
678 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_set, 8)
679 char __thiscall basic_ios_char_fill_set(basic_ios_char *this, char fill)
680 {
681     FIXME("(%p %c) stub\n", this, fill);
682     return 0;
683 }
684
685 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDXZ */
686 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADXZ */
687 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_get, 4)
688 char __thiscall basic_ios_char_fill_get(basic_ios_char *this)
689 {
690     FIXME("(%p) stub\n", this);
691     return 0;
692 }
693
694 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
695 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
696 DEFINE_THISCALL_WRAPPER(basic_ios_char_imbue, 4)
697 locale __thiscall basic_ios_char_imbue(basic_ios_char *this)
698 {
699     locale ret = { NULL };
700     FIXME("(%p) stub\n", this);
701     return ret;
702 }
703
704 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IAEXPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
705 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
706 DEFINE_THISCALL_WRAPPER(basic_ios_char_init, 12)
707 void __thiscall basic_ios_char_init(basic_ios_char *this, basic_streambuf_char *streambuf, MSVCP_bool isstd)
708 {
709     FIXME("(%p %p %x) stub\n", this, streambuf, isstd);
710 }
711
712 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDDD@Z */
713 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADDD@Z */
714 DEFINE_THISCALL_WRAPPER(basic_ios_char_narrow, 12)
715 char __thiscall basic_ios_char_narrow(basic_ios_char *this, char ch, char def)
716 {
717     FIXME("(%p %c %c) stub\n", this, ch, def);
718     return def;
719 }
720
721 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PAV32@@Z */
722 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAV32@@Z */
723 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_set, 8)
724 basic_streambuf_char* __thiscall basic_ios_char_rdbuf_set(basic_ios_char *this, basic_streambuf_char *streambuf)
725 {
726     FIXME("(%p %p) stub\n", this, streambuf);
727     return NULL;
728 }
729
730 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
731 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
732 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_get, 4)
733 basic_streambuf_char* __thiscall basic_ios_char_rdbuf_get(const basic_ios_char *this)
734 {
735     FIXME("(%p) stub\n", this);
736     return NULL;
737 }
738
739 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
740 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
741 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate_reraise, 12)
742 void __thiscall basic_ios_char_setstate_reraise(basic_ios_char *this, IOSB_iostate state, MSVCP_bool reraise)
743 {
744     FIXME("(%p %x %x) stub\n", this, state, reraise);
745 }
746
747 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
748 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
749 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate, 8)
750 void __thiscall basic_ios_char_setstate(basic_ios_char *this, unsigned int state)
751 {
752     basic_ios_char_setstate_reraise(this, (IOSB_iostate)state, FALSE);
753 }
754
755 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@PAV32@@Z */
756 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@PEAV32@@Z */
757 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_set, 8)
758 basic_ostream_char* __thiscall basic_ios_char_tie_set(basic_ios_char *this, basic_ostream_char *ostream)
759 {
760     FIXME("(%p %p) stub\n", this, ostream);
761     return NULL;
762 }
763
764 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
765 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
766 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_get, 4)
767 basic_ostream_char* __thiscall basic_ios_char_tie_get(const basic_ios_char *this)
768 {
769     FIXME("(%p)\n", this);
770     return NULL;
771 }
772
773 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDD@Z */
774 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADD@Z */
775 DEFINE_THISCALL_WRAPPER(basic_ios_char_widen, 8)
776 char __thiscall basic_ios_char_widen(basic_ios_char *this, char ch)
777 {
778     FIXME("(%p %c)\n", this, ch);
779     return 0;
780 }
781
782 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@W4_Uninitialized@1@@Z */
783 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
784 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor_uninitialized, 8)
785 basic_streambuf_char* __thiscall basic_streambuf_char_ctor_uninitialized(basic_streambuf_char *this, int uninitialized)
786 {
787     TRACE("(%p %d)\n", this, uninitialized);
788     this->vtable = &MSVCP_basic_streambuf_char_vtable;
789     mutex_ctor(&this->lock);
790     return this;
791 }
792
793 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@XZ */
794 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@XZ */
795 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor, 4)
796 basic_streambuf_char* __thiscall basic_streambuf_char_ctor(basic_streambuf_char *this)
797 {
798     TRACE("(%p)\n", this);
799
800     this->vtable = &MSVCP_basic_streambuf_char_vtable;
801     mutex_ctor(&this->lock);
802     this->loc = MSVCRT_operator_new(sizeof(locale));
803     locale_ctor(this->loc);
804     basic_streambuf_char__Init_empty(this);
805
806     return this;
807 }
808
809 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
810 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
811 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_dtor, 4)
812 void __thiscall basic_streambuf_char_dtor(basic_streambuf_char *this)
813 {
814     TRACE("(%p)\n", this);
815
816     mutex_dtor(&this->lock);
817     locale_dtor(this->loc);
818     MSVCRT_operator_delete(this->loc);
819 }
820
821 DEFINE_THISCALL_WRAPPER(MSVCP_basic_streambuf_char_vector_dtor, 8)
822 basic_streambuf_char* __thiscall MSVCP_basic_streambuf_char_vector_dtor(basic_streambuf_char *this, unsigned int flags)
823 {
824     TRACE("(%p %x)\n", this, flags);
825     if(flags & 2) {
826         /* we have an array, with the number of elements stored before the first object */
827         int i, *ptr = (int *)this-1;
828
829         for(i=*ptr-1; i>=0; i--)
830             basic_streambuf_char_dtor(this+i);
831         MSVCRT_operator_delete(ptr);
832     } else {
833         basic_streambuf_char_dtor(this);
834         if(flags & 1)
835             MSVCRT_operator_delete(this);
836     }
837
838     return this;
839 }
840
841 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
842 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
843 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gnavail, 4)
844 streamsize __thiscall basic_streambuf_char__Gnavail(const basic_streambuf_char *this)
845 {
846     TRACE("(%p)\n", this);
847     return *this->prpos ? *this->prsize : 0;
848 }
849
850 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
851 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
852 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gndec, 4)
853 char* __thiscall basic_streambuf_char__Gndec(basic_streambuf_char *this)
854 {
855     TRACE("(%p)\n", this);
856     (*this->prsize)++;
857     (*this->prpos)--;
858     return *this->prpos;
859 }
860
861 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
862 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
863 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gninc, 4)
864 char* __thiscall basic_streambuf_char__Gninc(basic_streambuf_char *this)
865 {
866     TRACE("(%p)\n", this);
867     (*this->prsize)--;
868     return (*this->prpos)++;
869 }
870
871 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
872 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
873 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gnpreinc, 4)
874 char* __thiscall basic_streambuf_char__Gnpreinc(basic_streambuf_char *this)
875 {
876     TRACE("(%p)\n", this);
877     (*this->prsize)--;
878     (*this->prpos)++;
879     return *this->prpos;
880 }
881
882 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAPAD0PAH001@Z */
883 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAPEAD0PEAH001@Z */
884 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init, 28)
885 void __thiscall basic_streambuf_char__Init(basic_streambuf_char *this, char **gf, char **gn, int *gc, char **pf, char **pn, int *pc)
886 {
887     TRACE("(%p %p %p %p %p %p %p)\n", this, gf, gn, gc, pf, pn, pc);
888
889     this->prbuf = gf;
890     this->pwbuf = pf;
891     this->prpos = gn;
892     this->pwpos = pn;
893     this->prsize = gc;
894     this->pwsize = pc;
895 }
896
897 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXXZ */
898 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXXZ */
899 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init_empty, 4)
900 void __thiscall basic_streambuf_char__Init_empty(basic_streambuf_char *this)
901 {
902     TRACE("(%p)\n", this);
903
904     this->prbuf = &this->rbuf;
905     this->pwbuf = &this->wbuf;
906     this->prpos = &this->rpos;
907     this->pwpos = &this->wpos;
908     this->prsize = &this->rsize;
909     this->pwsize = &this->wsize;
910
911     basic_streambuf_char_setp(this, NULL, NULL);
912     basic_streambuf_char_setg(this, NULL, NULL, NULL);
913 }
914
915 /* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
916 /* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
917 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Lock, 4)
918 void __thiscall basic_streambuf_char__Lock(basic_streambuf_char *this)
919 {
920     TRACE("(%p)\n", this);
921     mutex_lock(&this->lock);
922 }
923
924 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
925 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
926 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Pnavail, 4)
927 streamsize __thiscall basic_streambuf_char__Pnavail(const basic_streambuf_char *this)
928 {
929     TRACE("(%p)\n", this);
930     return *this->pwpos ? *this->pwsize : 0;
931 }
932
933 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
934 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
935 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Pninc, 4)
936 char* __thiscall basic_streambuf_char__Pninc(basic_streambuf_char *this)
937 {
938     TRACE("(%p)\n", this);
939     (*this->pwsize)--;
940     return (*this->pwpos)++;
941 }
942
943 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
944 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
945 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Sgetn_s, 16)
946 streamsize __thiscall basic_streambuf_char__Sgetn_s(basic_streambuf_char *this, char *ptr, MSVCP_size_t size, streamsize count)
947 {
948     FIXME("(%p %p %lu %lu) stub\n", this, ptr, size, count);
949     return 0;
950 }
951
952 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
953 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
954 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Unlock, 4)
955 void __thiscall basic_streambuf_char__Unlock(basic_streambuf_char *this)
956 {
957     TRACE("(%p)\n", this);
958     mutex_unlock(&this->lock);
959 }
960
961 /* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADIH@Z */
962 /* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_K_J@Z */
963 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Xsgetn_s, 16)
964 streamsize __thiscall basic_streambuf_char__Xsgetn_s(basic_streambuf_char *this, char *ptr, MSVCP_size_t size, streamsize count)
965 {
966     FIXME("(%p %p %lu %lu) stub\n", this, ptr, size, count);
967     return 0;
968 }
969
970 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
971 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
972 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_eback, 4)
973 char* __thiscall basic_streambuf_char_eback(const basic_streambuf_char *this)
974 {
975     FIXME("(%p) stub\n", this);
976     return NULL;
977 }
978
979 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
980 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
981 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_egptr, 4)
982 char* __thiscall basic_streambuf_char_egptr(const basic_streambuf_char *this)
983 {
984     FIXME("(%p) stub\n", this);
985     return NULL;
986 }
987
988 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
989 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
990 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_epptr, 4)
991 char* __thiscall basic_streambuf_char_epptr(const basic_streambuf_char *this)
992 {
993     FIXME("(%p) stub\n", this);
994     return NULL;
995 }
996
997 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
998 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
999 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gbump, 8)
1000 void __thiscall basic_streambuf_char_gbump(basic_streambuf_char *this, int off)
1001 {
1002     FIXME("(%p %d) stub\n", this, off);
1003 }
1004
1005 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QBE?AVlocale@2@XZ */
1006 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEBA?AVlocale@2@XZ */
1007 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_getloc, 4)
1008 locale __thiscall basic_streambuf_char_getloc(const basic_streambuf_char *this)
1009 {
1010     locale ret = { 0 }; /* FIXME */
1011     FIXME("(%p) stub\n", this);
1012     return ret;
1013 }
1014
1015 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1016 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1017 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gptr, 4)
1018 char* __thiscall basic_streambuf_char_gptr(const basic_streambuf_char *this)
1019 {
1020     FIXME("(%p) stub\n", this);
1021     return NULL;
1022 }
1023
1024 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
1025 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */
1026 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_imbue, 8)
1027 void __thiscall basic_streambuf_char_imbue(basic_streambuf_char *this, const locale *loc)
1028 {
1029     FIXME("(%p %p) stub\n", this, loc);
1030 }
1031
1032 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1033 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JXZ */
1034 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_in_avail, 4)
1035 streamsize __thiscall basic_streambuf_char_in_avail(basic_streambuf_char *this)
1036 {
1037     FIXME("(%p) stub\n", this);
1038     return 0;
1039 }
1040
1041 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
1042 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
1043 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_overflow, 8)
1044 int __thiscall basic_streambuf_char_overflow(basic_streambuf_char *this, int ch)
1045 {
1046     FIXME("(%p %d) stub\n", this, ch);
1047     return 0;
1048 }
1049
1050 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
1051 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
1052 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbackfail, 8)
1053 int __thiscall basic_streambuf_char_pbackfail(basic_streambuf_char *this, int ch)
1054 {
1055     FIXME("(%p %d) stub\n", this, ch);
1056     return 0;
1057 }
1058
1059 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1060 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1061 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbase, 4)
1062 char* __thiscall basic_streambuf_char_pbase(const basic_streambuf_char *this)
1063 {
1064     FIXME("(%p) stub\n", this);
1065     return NULL;
1066 }
1067
1068 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
1069 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
1070 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbump, 8)
1071 void __thiscall basic_streambuf_char_pbump(basic_streambuf_char *this, int off)
1072 {
1073     FIXME("(%p %d) stub\n", this, off);
1074 }
1075
1076 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1077 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1078 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pptr, 4)
1079 char* __thiscall basic_streambuf_char_pptr(const basic_streambuf_char *this)
1080 {
1081     FIXME("(%p) stub\n", this);
1082     return NULL;
1083 }
1084
1085 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1086 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1087 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubimbue, 8)
1088 locale __thiscall basic_streambuf_char_pubimbue(basic_streambuf_char *this, const locale *loc)
1089 {
1090     locale ret = { 0 }; /* FIXME */
1091     FIXME("(%p %p) stub\n", this, loc);
1092     return ret;
1093 }
1094
1095 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
1096 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
1097 DEFINE_THISCALL_WRAPPER_RETPTR(basic_streambuf_char_pubseekoff, 16)
1098 fpos_int __thiscall basic_streambuf_char_pubseekoff(basic_streambuf_char *this, streamoff off, int way, int mode)
1099 {
1100     fpos_int ret = { 0 }; /* FIXME */
1101     FIXME("(%p %lu %d %d) stub\n", this, off, way, mode);
1102     return ret;
1103 }
1104
1105 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */
1106 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */
1107 DEFINE_THISCALL_WRAPPER_RETPTR(basic_streambuf_char_pubseekoff_old, 16)
1108 fpos_int __thiscall basic_streambuf_char_pubseekoff_old(basic_streambuf_char *this, streamoff off, unsigned int way, unsigned int mode)
1109 {
1110     fpos_int ret = { 0 }; /* FIXME */
1111     FIXME("(%p %lu %d %d) stub\n", this, off, way, mode);
1112     return ret;
1113 }
1114
1115 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
1116 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
1117 DEFINE_THISCALL_WRAPPER_RETPTR(basic_streambuf_char_pubseekpos, 32)
1118 fpos_int __thiscall basic_streambuf_char_pubseekpos(basic_streambuf_char *this, fpos_int pos, int mode)
1119 {
1120     fpos_int ret = { 0 }; /* FIXME */
1121     FIXME("(%p %s %d) stub\n", this, debugstr_fpos_int(&pos), mode);
1122     return ret;
1123 }
1124
1125 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
1126 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
1127 DEFINE_THISCALL_WRAPPER_RETPTR(basic_streambuf_char_pubseekpos_old, 32)
1128 fpos_int __thiscall basic_streambuf_char_pubseekpos_old(basic_streambuf_char *this, fpos_int pos, unsigned int mode)
1129 {
1130     fpos_int ret = { 0 }; /* FIXME */
1131     FIXME("(%p %s %d) stub\n", this, debugstr_fpos_int(&pos), mode);
1132     return ret;
1133 }
1134
1135 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PADH@Z */
1136 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEAD_J@Z */
1137 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsetbuf, 12)
1138 basic_streambuf_char* __thiscall basic_streambuf_char_pubsetbuf(basic_streambuf_char *this, char *buf, streamsize count)
1139 {
1140     FIXME("(%p %p %lu) stub\n", this, buf, count);
1141     return NULL;
1142 }
1143
1144 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1145 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1146 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsync, 4)
1147 int __thiscall basic_streambuf_char_pubsync(basic_streambuf_char *this)
1148 {
1149     FIXME("(%p) stub\n", this);
1150     return 0;
1151 }
1152
1153 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1154 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1155 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sbumpc, 4)
1156 int __thiscall basic_streambuf_char_sbumpc(basic_streambuf_char *this)
1157 {
1158     FIXME("(%p) stub\n", this);
1159     return 0;
1160 }
1161
1162 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1163 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1164 DEFINE_THISCALL_WRAPPER_RETPTR(basic_streambuf_char_seekoff, 16)
1165 fpos_int __thiscall basic_streambuf_char_seekoff(basic_streambuf_char *this, streamoff off, int way, int mode)
1166 {
1167     fpos_int ret = { 0 }; /* FIXME */
1168     FIXME("(%p %lu %d %d) stub\n", this, off, way, mode);
1169     return ret;
1170 }
1171
1172 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
1173 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
1174 DEFINE_THISCALL_WRAPPER_RETPTR(basic_streambuf_char_seekpos, 32)
1175 fpos_int __thiscall basic_streambuf_char_seekpos(basic_streambuf_char *this, fpos_int pos, int mode)
1176 {
1177     fpos_int ret = { 0 }; /* FIXME */
1178     FIXME("(%p %s %d) stub\n", this, debugstr_fpos_int(&pos), mode);
1179     return ret;
1180 }
1181
1182 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEPAV12@PADH@Z */
1183 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAPEAV12@PEAD_J@Z */
1184 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setbuf, 12)
1185 basic_streambuf_char* __thiscall basic_streambuf_char_setbuf(basic_streambuf_char *this, char *buf, streamsize count)
1186 {
1187     FIXME("(%p %p %lu) stub\n", this, buf, count);
1188     return NULL;
1189 }
1190
1191 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
1192 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
1193 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setg, 16)
1194 void __thiscall basic_streambuf_char_setg(basic_streambuf_char *this, char *first, char *next, char *last)
1195 {
1196     TRACE("(%p %p %p %p)\n", this, first, next, last);
1197
1198     this->rbuf = first;
1199     this->rpos = next;
1200     this->rsize = last-next;
1201 }
1202
1203 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
1204 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
1205 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp_next, 16)
1206 void __thiscall basic_streambuf_char_setp_next(basic_streambuf_char *this, char *first, char *next, char *last)
1207 {
1208     TRACE("(%p %p %p %p)\n", this, first, next, last);
1209
1210     this->wbuf = first;
1211     this->wpos = next;
1212     this->wsize = last-next;
1213 }
1214
1215 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD0@Z */
1216 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD0@Z */
1217 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp, 12)
1218 void __thiscall basic_streambuf_char_setp(basic_streambuf_char *this, char *first, char *last)
1219 {
1220     basic_streambuf_char_setp_next(this, first, first, last);
1221 }
1222
1223 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1224 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1225 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetc, 4)
1226 int __thiscall basic_streambuf_char_sgetc(basic_streambuf_char *this)
1227 {
1228     FIXME("(%p) stub\n", this);
1229     return 0;
1230 }
1231
1232 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
1233 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
1234 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetn, 12)
1235 streamsize __thiscall basic_streambuf_char_sgetn(basic_streambuf_char *this, char *ptr, streamsize count)
1236 {
1237     FIXME("(%p %p %lu) stub\n", this, ptr, count);
1238     return 0;
1239 }
1240
1241 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1242 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JXZ */
1243 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_showmanyc, 4)
1244 streamsize __thiscall basic_streambuf_char_showmanyc(basic_streambuf_char *this)
1245 {
1246     FIXME("(%p) stub\n", this);
1247     return 0;
1248 }
1249
1250 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1251 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1252 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_snextc, 4)
1253 int __thiscall basic_streambuf_char_snextc(basic_streambuf_char *this)
1254 {
1255     FIXME("(%p) stub\n", this);
1256     return 0;
1257 }
1258
1259 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
1260 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
1261 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputbackc, 8)
1262 int __thiscall basic_streambuf_char_sputbackc(basic_streambuf_char *this, char ch)
1263 {
1264     FIXME("(%p %d) stub\n", this, ch);
1265     return 0;
1266 }
1267
1268 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
1269 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
1270 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputc, 8)
1271 int __thiscall basic_streambuf_char_sputc(basic_streambuf_char *this, char ch)
1272 {
1273     FIXME("(%p %d) stub\n", this, ch);
1274     return 0;
1275 }
1276
1277 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z */
1278 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEBD_J@Z */
1279 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputn, 12)
1280 streamsize __thiscall basic_streambuf_char_sputn(basic_streambuf_char *this, const char *ptr, streamsize count)
1281 {
1282     FIXME("(%p %p %lu) stub\n", this, ptr, count);
1283     return 0;
1284 }
1285
1286 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1287 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1288 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_stossc, 4)
1289 void __thiscall basic_streambuf_char_stossc(basic_streambuf_char *this)
1290 {
1291     FIXME("(%p) stub\n", this);
1292 }
1293
1294 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1295 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1296 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sungetc, 4)
1297 int __thiscall basic_streambuf_char_sungetc(basic_streambuf_char *this)
1298 {
1299     FIXME("(%p) stub\n", this);
1300     return 0;
1301 }
1302
1303 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1304 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
1305 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sync, 4)
1306 int __thiscall basic_streambuf_char_sync(basic_streambuf_char *this)
1307 {
1308     FIXME("(%p) stub\n", this);
1309     return 0;
1310 }
1311
1312 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1313 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
1314 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_uflow, 4)
1315 int __thiscall basic_streambuf_char_uflow(basic_streambuf_char *this)
1316 {
1317     FIXME("(%p) stub\n", this);
1318     return 0;
1319 }
1320
1321 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1322 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
1323 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_underflow, 4)
1324 int __thiscall basic_streambuf_char_underflow(basic_streambuf_char *this)
1325 {
1326     FIXME("(%p) stub\n", this);
1327     return 0;
1328 }
1329
1330 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADH@Z */
1331 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_J@Z */
1332 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsgetn, 12)
1333 streamsize __thiscall basic_streambuf_char_xsgetn(basic_streambuf_char *this, char *ptr, streamsize count)
1334 {
1335     FIXME("(%p %p %lu) stub\n", this, ptr, count);
1336     return 0;
1337 }
1338
1339 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPBDH@Z */
1340 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEBD_J@Z */
1341 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsputn, 12)
1342 streamsize __thiscall basic_streambuf_char_xsputn(basic_streambuf_char *this, const char *ptr, streamsize count)
1343 {
1344     FIXME("(%p %p %lu) stub\n", this, ptr, count);
1345     return 0;
1346 }
1347
1348 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
1349 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
1350 DEFINE_THISCALL_WRAPPER(basic_ostream_char_ctor, 12)
1351 basic_ostream_char* __thiscall basic_ostream_char_ctor(basic_ostream_char *this, basic_streambuf_char *strbuf, MSVCP_bool isstd)
1352 {
1353     FIXME("(%p %p %d) stub\n", this, strbuf, isstd);
1354
1355     this->vtable = &MSVCP_basic_ostream_char_vtable+1;
1356     this->child.child.vtable = &MSVCP_basic_ostream_char_vtable;
1357     return NULL;
1358 }
1359
1360 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */
1361 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */
1362 DEFINE_THISCALL_WRAPPER(basic_ostream_char_uninitialized, 12)
1363 basic_ostream_char* __thiscall basic_ostream_char_uninitialized(basic_ostream_char *this, int uninitialized, MSVCP_bool addstd)
1364 {
1365     FIXME("(%p %d %x) stub\n", this, uninitialized, addstd);
1366     return NULL;
1367 }
1368
1369 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
1370 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
1371 DEFINE_THISCALL_WRAPPER(basic_ostream_char_dtor, 4)
1372 void __thiscall basic_ostream_char_dtor(basic_ostream_char *this)
1373 {
1374     FIXME("(%p) stub\n", this);
1375 }
1376
1377 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ostream_char_vector_dtor, 8)
1378 basic_ostream_char* __thiscall MSVCP_basic_ostream_char_vector_dtor(basic_ostream_char *this, unsigned int flags)
1379 {
1380     TRACE("(%p %x) stub\n", this, flags);
1381     if(flags & 2) {
1382         /* we have an array, with the number of elements stored before the first object */
1383         int i, *ptr = (int *)this-1;
1384
1385         for(i=*ptr-1; i>=0; i--)
1386             basic_ostream_char_dtor(this+i);
1387         MSVCRT_operator_delete(ptr);
1388     } else {
1389         basic_ostream_char_dtor(this);
1390         if(flags & 1)
1391             MSVCRT_operator_delete(this);
1392     }
1393
1394     return this;
1395 }
1396
1397 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@F@Z */
1398 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@F@Z */
1399 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_short, 8)
1400 basic_ostream_char* __thiscall basic_ostream_char_print_short(basic_ostream_char *this, short val)
1401 {
1402     FIXME("(%p %d) stub\n", this, val);
1403     return NULL;
1404 }
1405
1406 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@G@Z */
1407 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@G@Z */
1408 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ushort, 8)
1409 basic_ostream_char* __thiscall basic_ostream_char_print_ushort(basic_ostream_char *this, unsigned short val)
1410 {
1411     FIXME("(%p %d) stub\n", this, val);
1412     return NULL;
1413 }
1414
1415 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z */
1416 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@H@Z */
1417 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int, 8)
1418 basic_ostream_char* __thiscall basic_ostream_char_print_int(basic_ostream_char *this, int val)
1419 {
1420     FIXME("(%p %d) stub\n", this, val);
1421     return NULL;
1422 }
1423
1424 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@I@Z */
1425 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@I@Z */
1426 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint, 8)
1427 basic_ostream_char* __thiscall basic_ostream_char_print_uint(basic_ostream_char *this, unsigned int val)
1428 {
1429     FIXME("(%p %d) stub\n", this, val);
1430     return NULL;
1431 }
1432
1433 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z */
1434 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@J@Z */
1435 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_long, 8)
1436 basic_ostream_char* __thiscall basic_ostream_char_print_long(basic_ostream_char *this, LONG val)
1437 {
1438     FIXME("(%p %d) stub\n", this, val);
1439     return NULL;
1440 }
1441
1442 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z */
1443 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@K@Z */
1444 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ulong, 8)
1445 basic_ostream_char* __thiscall basic_ostream_char_print_ulong(basic_ostream_char *this, ULONG val)
1446 {
1447     FIXME("(%p %d) stub\n", this, val);
1448     return NULL;
1449 }
1450
1451 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@M@Z */
1452 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@M@Z */
1453 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_float, 8)
1454 basic_ostream_char* __thiscall basic_ostream_char_print_float(basic_ostream_char *this, float val)
1455 {
1456     FIXME("(%p %f) stub\n", this, val);
1457     return NULL;
1458 }
1459
1460 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@N@Z */
1461 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@N@Z */
1462 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_double, 12)
1463 basic_ostream_char* __thiscall basic_ostream_char_print_double(basic_ostream_char *this, double val)
1464 {
1465     FIXME("(%p %lf) stub\n", this, val);
1466     return NULL;
1467 }
1468
1469 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
1470 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
1471 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_streambuf, 8)
1472 basic_ostream_char* __thiscall basic_ostream_char_print_streambuf(basic_ostream_char *this, basic_streambuf_char *val)
1473 {
1474     FIXME("(%p %p) stub\n", this, val);
1475     return NULL;
1476 }
1477
1478 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PBX@Z */
1479 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEBX@Z */
1480 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ptr, 8)
1481 basic_ostream_char* __thiscall basic_ostream_char_print_ptr(basic_ostream_char *this, const void *val)
1482 {
1483     FIXME("(%p %p) stub\n", this, val);
1484     return NULL;
1485 }
1486
1487 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_J@Z */
1488 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_J@Z */
1489 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int64, 12)
1490 basic_ostream_char* __thiscall basic_ostream_char_print_int64(basic_ostream_char *this, __int64 val)
1491 {
1492     FIXME("(%p) stub\n", this);
1493     return NULL;
1494 }
1495
1496 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_K@Z */
1497 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_K@Z */
1498 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint64, 12)
1499 basic_ostream_char* __thiscall basic_ostream_char_print_uint64(basic_ostream_char *this, unsigned __int64 val)
1500 {
1501     FIXME("(%p) stub\n", this);
1502     return NULL;
1503 }
1504
1505 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_N@Z */
1506 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_N@Z */
1507 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_bool, 8)
1508 basic_ostream_char* __thiscall basic_ostream_char_print_bool(basic_ostream_char *this, MSVCP_bool val)
1509 {
1510     FIXME("(%p %x) stub\n", this, val);
1511     return NULL;
1512 }
1513
1514 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
1515 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1516 DEFINE_THISCALL_WRAPPER(basic_ostream_char__Osfx, 4)
1517 void __thiscall basic_ostream_char__Osfx(basic_ostream_char *this)
1518 {
1519     FIXME("(%p) stub\n", this);
1520 }
1521
1522 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
1523 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
1524 DEFINE_THISCALL_WRAPPER(basic_ostream_char_flush, 4)
1525 basic_ostream_char* __thiscall basic_ostream_char_flush(basic_ostream_char *this)
1526 {
1527     FIXME("(%p) stub\n", this);
1528     return NULL;
1529 }
1530
1531 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE_NXZ */
1532 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA_NXZ */
1533 DEFINE_THISCALL_WRAPPER(basic_ostream_char_opfx, 4)
1534 MSVCP_bool __thiscall basic_ostream_char_opfx(basic_ostream_char *this)
1535 {
1536     FIXME("(%p) stub\n", this);
1537     return 0;
1538 }
1539
1540 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
1541 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1542 DEFINE_THISCALL_WRAPPER(basic_ostream_char_osfx, 4)
1543 void __thiscall basic_ostream_char_osfx(basic_ostream_char *this)
1544 {
1545     FIXME("(%p) stub\n", this);
1546 }
1547
1548 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
1549 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
1550 DEFINE_THISCALL_WRAPPER(basic_ostream_char_put, 8)
1551 basic_ostream_char* __thiscall basic_ostream_char_put(basic_ostream_char *this, char ch)
1552 {
1553     FIXME("(%p %c) stub\n", this, ch);
1554     return NULL;
1555 }
1556
1557 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@JH@Z */
1558 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
1559 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp, 12)
1560 basic_ostream_char* __thiscall basic_ostream_char_seekp(basic_ostream_char *this, streamoff off, int way)
1561 {
1562     FIXME("(%p %lu %d) stub\n", this, off, way);
1563     return NULL;
1564 }
1565
1566 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
1567 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
1568 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp_fpos, 28)
1569 basic_ostream_char* __thiscall basic_ostream_char_seekp_fpos(basic_ostream_char *this, fpos_int pos)
1570 {
1571     FIXME("(%p %s) stub\n", this, debugstr_fpos_int(&pos));
1572     return NULL;
1573 }
1574
1575 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
1576 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
1577 DEFINE_THISCALL_WRAPPER_RETPTR(basic_ostream_char_tellp, 4)
1578 fpos_int __thiscall basic_ostream_char_tellp(basic_ostream_char *this)
1579 {
1580     fpos_int ret = { 0 }; /* FIXME */
1581     FIXME("(%p) stub\n", this);
1582     return ret;
1583 }
1584
1585 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@PBDH@Z */
1586 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEBD_J@Z */
1587 DEFINE_THISCALL_WRAPPER(basic_ostream_char_write, 12)
1588 basic_ostream_char* __thiscall basic_ostream_char_write(basic_ostream_char *this, const char *str, streamsize count)
1589 {
1590     FIXME("(%p %s %lu) stub\n", this, debugstr_a(str), count);
1591     return NULL;
1592 }