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