2 * Copyright 2011 Piotr Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
29 #include "wine/debug.h"
30 WINE_DEFAULT_DEBUG_CHANNEL(msvcp90);
33 IOSTATE_goodbit = 0x00,
34 IOSTATE_eofbit = 0x01,
35 IOSTATE_failbit = 0x02,
36 IOSTATE_badbit = 0x04,
37 IOSTATE__Hardfail = 0x10,
42 FMTFLAG_skipws = 0x0001,
43 FMTFLAG_unitbuf = 0x0002,
44 FMTFLAG_uppercase = 0x0004,
45 FMTFLAG_showbase = 0x0008,
46 FMTFLAG_showpoint = 0x0010,
47 FMTFLAG_showpos = 0x0020,
48 FMTFLAG_left = 0x0040,
49 FMTFLAG_right = 0x0080,
50 FMTFLAG_internal = 0x0100,
54 FMTFLAG_scientific = 0x1000,
55 FMTFLAG_fixed = 0x2000,
56 FMTFLAG_hexfloat = 0x3000,
57 FMTFLAG_boolalpha = 0x4000,
58 FMTFLAG_stdio = 0x8000,
59 FMTFLAG_adjustfield = FMTFLAG_left|FMTFLAG_right|FMTFLAG_internal,
60 FMTFLAG_basefield = FMTFLAG_dec|FMTFLAG_oct|FMTFLAG_hex,
61 FMTFLAG_floadfield = FMTFLAG_scientific|FMTFLAG_fixed,
70 OPENMODE_trunc = 0x10,
71 OPENMODE__Nocreate = 0x40,
72 OPENMODE__Noreplace = 0x80,
73 OPENMODE_binary = 0x20,
84 typedef struct _iosarray {
85 struct _iosarray *next;
98 typedef void (CDECL *IOS_BASE_event_callback)(IOS_BASE_event, struct _ios_base*, int);
99 typedef struct _fnarray {
100 struct _fnarray *next;
102 IOS_BASE_event_callback event_handler;
105 /* ?_Index@ios_base@std@@0HA */
106 int ios_base_Index = 0;
107 /* ?_Sync@ios_base@std@@0_NA */
108 MSVCP_bool ios_base_Sync = FALSE;
110 typedef struct _ios_base {
111 const vtable_ptr *vtable;
118 IOS_BASE_iosarray *arr;
119 IOS_BASE_fnarray *calls;
125 __int64 DECLSPEC_ALIGN(8) pos;
129 static inline const char* debugstr_fpos_int(fpos_int *fpos)
131 return wine_dbg_sprintf("fpos(%ld %s %d)", fpos->off, wine_dbgstr_longlong(fpos->pos), fpos->state);
135 const vtable_ptr *vtable;
150 } basic_streambuf_char;
153 const vtable_ptr *vtable;
168 } basic_streambuf_wchar;
174 } basic_filebuf__Initfl;
177 basic_streambuf_char base;
180 MSVCP_bool wrotesome;
184 } basic_filebuf_char;
188 basic_streambuf_char *strbuf;
189 struct _basic_ostream_char *stream;
195 basic_streambuf_wchar *strbuf;
196 struct _basic_ostream_wchar *stream;
200 typedef struct _basic_ostream_char {
202 /* virtual inheritance
203 * basic_ios_char basic_ios;
205 } basic_ostream_char;
207 typedef struct _basic_ostream_wchar {
209 /* virtual inheritance
210 * basic_ios_char basic_ios;
212 } basic_ostream_wchar;
217 /* virtual inheritance
218 * basic_ios_char basic_ios;
220 } basic_istream_char;
223 basic_istream_char base1;
224 basic_ostream_char base2;
225 /* virtual inheritance
226 * basic_ios_char basic_ios;
228 } basic_iostream_char;
231 basic_ostream_char base;
232 basic_filebuf_char filebuf;
233 /* virtual inheritance
234 * basic_ios_char basic_ios;
236 } basic_ofstream_char;
239 basic_istream_char base;
240 basic_filebuf_char filebuf;
241 /* virtual inheritance
242 * basic_ios_char basic_ios;
244 } basic_ifstream_char;
247 basic_iostream_char base;
248 basic_filebuf_char filebuf;
249 /* virtual inheritance
250 * basic_ios_char basic_ios;
252 } basic_fstream_char;
254 extern const vtable_ptr MSVCP_iosb_vtable;
256 /* ??_7ios_base@std@@6B@ */
257 extern const vtable_ptr MSVCP_ios_base_vtable;
259 /* ??_7?$basic_ios@DU?$char_traits@D@std@@@std@@6B@ */
260 extern const vtable_ptr MSVCP_basic_ios_char_vtable;
262 /* ??_7?$basic_ios@_WU?$char_traits@_W@std@@@std@@6B@ */
263 extern const vtable_ptr MSVCP_basic_ios_wchar_vtable;
265 /* ??_7?$basic_ios@GU?$char_traits@G@std@@@std@@6B@ */
266 extern const vtable_ptr MSVCP_basic_ios_short_vtable;
268 /* ??_7?$basic_streambuf@DU?$char_traits@D@std@@@std@@6B@ */
269 extern const vtable_ptr MSVCP_basic_streambuf_char_vtable;
271 /* ??_7?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@6B@ */
272 extern const vtable_ptr MSVCP_basic_streambuf_wchar_vtable;
274 /* ??_7?$basic_streambuf@GU?$char_traits@G@std@@@std@@6B@ */
275 extern const vtable_ptr MSVCP_basic_streambuf_short_vtable;
277 /* ??_7?$basic_filebuf@DU?$char_traits@D@std@@@std@@6B@ */
278 extern const vtable_ptr MSVCP_basic_filebuf_char_vtable;
280 /* ??_8?$basic_ostream@DU?$char_traits@D@std@@@std@@7B@ */
281 const int basic_ostream_char_vbtable[] = {0, sizeof(basic_ostream_char)};
282 /* ??_7?$basic_ostream@DU?$char_traits@D@std@@@std@@6B@ */
283 extern const vtable_ptr MSVCP_basic_ostream_char_vtable;
285 /* ??_8?$basic_istream@DU?$char_traits@D@std@@@std@@7B@ */
286 const int basic_istream_char_vbtable[] = {0, sizeof(basic_istream_char)};
287 /* ??_7?$basic_istream@DU?$char_traits@D@std@@@std@@6B@ */
288 extern const vtable_ptr MSVCP_basic_istream_char_vtable;
290 /* ??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
291 const int basic_iostream_char_vbtable1[] = {0, sizeof(basic_iostream_char)};
292 /* ??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
293 const int basic_iostream_char_vbtable2[] = {0, sizeof(basic_iostream_char)-FIELD_OFFSET(basic_iostream_char, base2)};
294 /* ??_7?$basic_iostream@DU?$char_traits@D@std@@@std@@6B@ */
295 extern const vtable_ptr MSVCP_basic_iostream_char_vtable;
297 /* ??_8?$basic_ofstream@DU?$char_traits@D@std@@@std@@7B@ */
298 const int basic_ofstream_char_vbtable[] = {0, sizeof(basic_ofstream_char)};
299 /* ??_7?$basic_ofstream@DU?$char_traits@D@std@@@std@@6B@ */
300 extern const vtable_ptr MSVCP_basic_ofstream_char_vtable;
302 /*??_8?$basic_ifstream@DU?$char_traits@D@std@@@std@@7B@ */
303 const int basic_ifstream_char_vbtable[] = {0, sizeof(basic_ifstream_char)};
304 /* ??_7?$basic_ifstream@DU?$char_traits@D@std@@@std@@6B@ */
305 extern const vtable_ptr MSVCP_basic_ifstream_char_vtable;
307 /* ??_8?$basic_fstream@DU?$char_traits@D@std@@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
308 const int basic_fstream_char_vbtable1[] = {0, sizeof(basic_fstream_char)};
309 /* ??_8?$basic_fstream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
310 const int basic_fstream_char_vbtable2[] = {0, sizeof(basic_fstream_char)-FIELD_OFFSET(basic_fstream_char, base.base2)};
311 /* ??_7?$basic_fstream@DU?$char_traits@D@std@@@std@@6B@ */
312 extern const vtable_ptr MSVCP_basic_fstream_char_vtable;
314 DEFINE_RTTI_DATA0(iosb, 0, ".?AV?$_Iosb@H@std@@");
315 DEFINE_RTTI_DATA1(ios_base, 0, &iosb_rtti_base_descriptor, ".?AV?$_Iosb@H@std@@");
316 DEFINE_RTTI_DATA2(basic_ios_char, 0, &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
317 ".?AV?$basic_ios@DU?$char_traits@D@std@@@std@@");
318 DEFINE_RTTI_DATA2(basic_ios_wchar, 0, &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
319 ".?AV?$basic_ios@_WU?$char_traits@_W@std@@@std@@");
320 DEFINE_RTTI_DATA2(basic_ios_short, 0, &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
321 ".?AV?$basic_ios@GU?$char_traits@G@std@@@std@@");
322 DEFINE_RTTI_DATA0(basic_streambuf_char, 0,
323 ".?AV?$basic_streambuf@DU?$char_traits@D@std@@@std@@");
324 DEFINE_RTTI_DATA0(basic_streambuf_wchar, 0,
325 ".?AV?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@");
326 DEFINE_RTTI_DATA0(basic_streambuf_short, 0,
327 ".?AV?$basic_streambuf@GU?$char_traits@G@std@@@std@@");
328 DEFINE_RTTI_DATA1(basic_filebuf_char, 0, &basic_streambuf_char_rtti_base_descriptor,
329 ".?AV?$basic_filebuf@DU?$char_traits@D@std@@@std@@");
330 DEFINE_RTTI_DATA3(basic_ostream_char, sizeof(basic_ostream_char), &basic_ios_char_rtti_base_descriptor,
331 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
332 ".?AV?$basic_ostream@DU?$char_traits@D@std@@@std@@");
333 DEFINE_RTTI_DATA3(basic_istream_char, sizeof(basic_istream_char), &basic_ios_char_rtti_base_descriptor,
334 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
335 ".?AV?$basic_istream@DU?$char_traits@D@std@@@std@@");
336 DEFINE_RTTI_DATA8(basic_iostream_char, sizeof(basic_iostream_char),
337 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
338 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
339 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
340 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
341 ".?AV?$basic_iostream@DU?$char_traits@D@std@@@std@@");
342 DEFINE_RTTI_DATA4(basic_ofstream_char, sizeof(basic_ofstream_char),
343 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
344 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
345 ".?AV?$basic_ofstream@DU?$char_traits@D@std@@@std@@");
346 DEFINE_RTTI_DATA4(basic_ifstream_char, sizeof(basic_ifstream_char),
347 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
348 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
349 ".?AV?$basic_ifstream@DU?$char_traits@D@std@@@std@@");
350 DEFINE_RTTI_DATA9(basic_fstream_char, sizeof(basic_fstream_char), &basic_istream_char_rtti_base_descriptor,
351 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
352 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
353 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
354 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
355 ".?AV?$basic_fstream@DU?$char_traits@D@std@@@std@@");
358 void __asm_dummy_vtables(void) {
360 __ASM_VTABLE(iosb, "");
361 __ASM_VTABLE(ios_base, "");
362 __ASM_VTABLE(basic_ios_char, "");
363 __ASM_VTABLE(basic_ios_wchar, "");
364 __ASM_VTABLE(basic_ios_short, "");
365 __ASM_VTABLE(basic_streambuf_char,
366 VTABLE_ADD_FUNC(basic_streambuf_char_overflow)
367 VTABLE_ADD_FUNC(basic_streambuf_char_pbackfail)
368 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc)
369 VTABLE_ADD_FUNC(basic_streambuf_char_underflow)
370 VTABLE_ADD_FUNC(basic_streambuf_char_uflow)
371 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn)
372 VTABLE_ADD_FUNC(basic_streambuf_char__Xsgetn_s)
373 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn)
374 VTABLE_ADD_FUNC(basic_streambuf_char_seekoff)
375 VTABLE_ADD_FUNC(basic_streambuf_char_seekpos)
376 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf)
377 VTABLE_ADD_FUNC(basic_streambuf_char_sync)
378 VTABLE_ADD_FUNC(basic_streambuf_char_imbue));
379 __ASM_VTABLE(basic_streambuf_wchar,
380 VTABLE_ADD_FUNC(basic_streambuf_wchar_overflow)
381 VTABLE_ADD_FUNC(basic_streambuf_wchar_pbackfail)
382 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
383 VTABLE_ADD_FUNC(basic_streambuf_wchar_underflow)
384 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow)
385 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
386 VTABLE_ADD_FUNC(basic_streambuf_wchar__Xsgetn_s)
387 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
388 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekoff)
389 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekpos)
390 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf)
391 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync)
392 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
393 __ASM_VTABLE(basic_streambuf_short,
394 VTABLE_ADD_FUNC(basic_streambuf_wchar_overflow)
395 VTABLE_ADD_FUNC(basic_streambuf_wchar_pbackfail)
396 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
397 VTABLE_ADD_FUNC(basic_streambuf_wchar_underflow)
398 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow)
399 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
400 VTABLE_ADD_FUNC(basic_streambuf_wchar__Xsgetn_s)
401 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
402 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekoff)
403 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekpos)
404 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf)
405 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync)
406 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
407 __ASM_VTABLE(basic_filebuf_char,
408 VTABLE_ADD_FUNC(basic_filebuf_char_overflow)
409 VTABLE_ADD_FUNC(basic_filebuf_char_pbackfail)
410 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc)
411 VTABLE_ADD_FUNC(basic_filebuf_char_underflow)
412 VTABLE_ADD_FUNC(basic_filebuf_char_uflow)
413 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn)
414 VTABLE_ADD_FUNC(basic_streambuf_char__Xsgetn_s)
415 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn)
416 VTABLE_ADD_FUNC(basic_filebuf_char_seekoff)
417 VTABLE_ADD_FUNC(basic_filebuf_char_seekpos)
418 VTABLE_ADD_FUNC(basic_filebuf_char_setbuf)
419 VTABLE_ADD_FUNC(basic_filebuf_char_sync)
420 VTABLE_ADD_FUNC(basic_filebuf_char_imbue));
421 __ASM_VTABLE(basic_ostream_char, "");
422 __ASM_VTABLE(basic_istream_char, "");
423 __ASM_VTABLE(basic_iostream_char, "");
424 __ASM_VTABLE(basic_ofstream_char, "");
425 __ASM_VTABLE(basic_ifstream_char, "");
426 __ASM_VTABLE(basic_fstream_char, "");
431 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
432 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
433 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp_next, 16)
434 void __thiscall basic_streambuf_char_setp_next(basic_streambuf_char *this, char *first, char *next, char *last)
436 TRACE("(%p %p %p %p)\n", this, first, next, last);
440 this->wsize = last-next;
443 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD0@Z */
444 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD0@Z */
445 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp, 12)
446 void __thiscall basic_streambuf_char_setp(basic_streambuf_char *this, char *first, char *last)
448 basic_streambuf_char_setp_next(this, first, first, last);
451 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
452 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
453 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setg, 16)
454 void __thiscall basic_streambuf_char_setg(basic_streambuf_char *this, char *first, char *next, char *last)
456 TRACE("(%p %p %p %p)\n", this, first, next, last);
460 this->rsize = last-next;
463 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXXZ */
464 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXXZ */
465 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init_empty, 4)
466 void __thiscall basic_streambuf_char__Init_empty(basic_streambuf_char *this)
468 TRACE("(%p)\n", this);
470 this->prbuf = &this->rbuf;
471 this->pwbuf = &this->wbuf;
472 this->prpos = &this->rpos;
473 this->pwpos = &this->wpos;
474 this->prsize = &this->rsize;
475 this->pwsize = &this->wsize;
477 basic_streambuf_char_setp(this, NULL, NULL);
478 basic_streambuf_char_setg(this, NULL, NULL, NULL);
481 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@W4_Uninitialized@1@@Z */
482 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
483 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor_uninitialized, 8)
484 basic_streambuf_char* __thiscall basic_streambuf_char_ctor_uninitialized(basic_streambuf_char *this, int uninitialized)
486 TRACE("(%p %d)\n", this, uninitialized);
487 this->vtable = &MSVCP_basic_streambuf_char_vtable;
488 mutex_ctor(&this->lock);
492 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@XZ */
493 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@XZ */
494 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor, 4)
495 basic_streambuf_char* __thiscall basic_streambuf_char_ctor(basic_streambuf_char *this)
497 TRACE("(%p)\n", this);
499 this->vtable = &MSVCP_basic_streambuf_char_vtable;
500 mutex_ctor(&this->lock);
501 this->loc = MSVCRT_operator_new(sizeof(locale));
502 locale_ctor(this->loc);
503 basic_streambuf_char__Init_empty(this);
508 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
509 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
510 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_dtor, 4)
511 void __thiscall basic_streambuf_char_dtor(basic_streambuf_char *this)
513 TRACE("(%p)\n", this);
515 mutex_dtor(&this->lock);
516 locale_dtor(this->loc);
517 MSVCRT_operator_delete(this->loc);
520 DEFINE_THISCALL_WRAPPER(MSVCP_basic_streambuf_char_vector_dtor, 8)
521 basic_streambuf_char* __thiscall MSVCP_basic_streambuf_char_vector_dtor(basic_streambuf_char *this, unsigned int flags)
523 TRACE("(%p %x)\n", this, flags);
525 /* we have an array, with the number of elements stored before the first object */
526 int i, *ptr = (int *)this-1;
528 for(i=*ptr-1; i>=0; i--)
529 basic_streambuf_char_dtor(this+i);
530 MSVCRT_operator_delete(ptr);
532 basic_streambuf_char_dtor(this);
534 MSVCRT_operator_delete(this);
540 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
541 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
542 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gnavail, 4)
543 streamsize __thiscall basic_streambuf_char__Gnavail(const basic_streambuf_char *this)
545 TRACE("(%p)\n", this);
546 return *this->prpos ? *this->prsize : 0;
549 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
550 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
551 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gndec, 4)
552 char* __thiscall basic_streambuf_char__Gndec(basic_streambuf_char *this)
554 TRACE("(%p)\n", this);
560 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
561 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
562 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gninc, 4)
563 char* __thiscall basic_streambuf_char__Gninc(basic_streambuf_char *this)
565 TRACE("(%p)\n", this);
567 return (*this->prpos)++;
570 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
571 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
572 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gnpreinc, 4)
573 char* __thiscall basic_streambuf_char__Gnpreinc(basic_streambuf_char *this)
575 TRACE("(%p)\n", this);
581 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAPAD0PAH001@Z */
582 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAPEAD0PEAH001@Z */
583 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init, 28)
584 void __thiscall basic_streambuf_char__Init(basic_streambuf_char *this, char **gf, char **gn, int *gc, char **pf, char **pn, int *pc)
586 TRACE("(%p %p %p %p %p %p %p)\n", this, gf, gn, gc, pf, pn, pc);
596 /* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
597 /* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
598 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Lock, 4)
599 void __thiscall basic_streambuf_char__Lock(basic_streambuf_char *this)
601 TRACE("(%p)\n", this);
602 mutex_lock(&this->lock);
605 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
606 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
607 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Pnavail, 4)
608 streamsize __thiscall basic_streambuf_char__Pnavail(const basic_streambuf_char *this)
610 TRACE("(%p)\n", this);
611 return *this->pwpos ? *this->pwsize : 0;
614 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
615 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
616 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Pninc, 4)
617 char* __thiscall basic_streambuf_char__Pninc(basic_streambuf_char *this)
619 TRACE("(%p)\n", this);
621 return (*this->pwpos)++;
624 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
625 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
626 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_underflow, 4)
627 #define call_basic_streambuf_char_underflow(this) CALL_VTBL_FUNC(this, 16, \
628 int, (basic_streambuf_char*), (this))
629 int __thiscall basic_streambuf_char_underflow(basic_streambuf_char *this)
631 TRACE("(%p)\n", this);
635 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
636 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
637 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_uflow, 4)
638 #define call_basic_streambuf_char_uflow(this) CALL_VTBL_FUNC(this, 20, \
639 int, (basic_streambuf_char*), (this))
640 int __thiscall basic_streambuf_char_uflow(basic_streambuf_char *this)
644 TRACE("(%p)\n", this);
646 if(call_basic_streambuf_char_underflow(this)==EOF)
655 /* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADIH@Z */
656 /* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_K_J@Z */
657 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Xsgetn_s, 16)
658 #define call_basic_streambuf_char__Xsgetn_s(this, ptr, size, count) CALL_VTBL_FUNC(this, 28, \
659 streamsize, (basic_streambuf_char*, char*, MSVCP_size_t, streamsize), (this, ptr, size, count))
660 streamsize __thiscall basic_streambuf_char__Xsgetn_s(basic_streambuf_char *this, char *ptr, MSVCP_size_t size, streamsize count)
662 streamsize copied, chunk;
664 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
666 for(copied=0; copied<count && size;) {
667 chunk = basic_streambuf_char__Gnavail(this);
668 if(chunk > count-copied)
669 chunk = count-copied;
672 memcpy_s(ptr+copied, size, *this->prpos, chunk);
673 *this->prpos += chunk;
674 *this->prsize -= chunk;
677 }else if((ptr[copied] = call_basic_streambuf_char_uflow(this)) != EOF) {
688 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
689 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
690 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Sgetn_s, 16)
691 streamsize __thiscall basic_streambuf_char__Sgetn_s(basic_streambuf_char *this, char *ptr, MSVCP_size_t size, streamsize count)
693 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
694 return call_basic_streambuf_char__Xsgetn_s(this, ptr, size, count);
697 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
698 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
699 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Unlock, 4)
700 void __thiscall basic_streambuf_char__Unlock(basic_streambuf_char *this)
702 TRACE("(%p)\n", this);
703 mutex_unlock(&this->lock);
706 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
707 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
708 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_eback, 4)
709 char* __thiscall basic_streambuf_char_eback(const basic_streambuf_char *this)
711 TRACE("(%p)\n", this);
715 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
716 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
717 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gptr, 4)
718 char* __thiscall basic_streambuf_char_gptr(const basic_streambuf_char *this)
720 TRACE("(%p)\n", this);
724 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
725 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
726 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_egptr, 4)
727 char* __thiscall basic_streambuf_char_egptr(const basic_streambuf_char *this)
729 TRACE("(%p)\n", this);
730 return *this->prpos+*this->prsize;
733 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
734 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
735 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_epptr, 4)
736 char* __thiscall basic_streambuf_char_epptr(const basic_streambuf_char *this)
738 TRACE("(%p)\n", this);
739 return *this->pwpos+*this->pwsize;
742 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
743 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
744 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gbump, 8)
745 void __thiscall basic_streambuf_char_gbump(basic_streambuf_char *this, int off)
747 TRACE("(%p %d)\n", this, off);
749 *this->prsize -= off;
752 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QBE?AVlocale@2@XZ */
753 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEBA?AVlocale@2@XZ */
754 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_getloc, 8)
755 locale* __thiscall basic_streambuf_char_getloc(const basic_streambuf_char *this, locale *ret)
757 TRACE("(%p)\n", this);
758 return locale_copy_ctor(ret, this->loc);
761 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
762 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */
763 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_imbue, 8)
764 #define call_basic_streambuf_char_imbue(this, loc) CALL_VTBL_FUNC(this, 52, \
765 void, (basic_streambuf_char*, const locale*), (this, loc))
766 void __thiscall basic_streambuf_char_imbue(basic_streambuf_char *this, const locale *loc)
768 TRACE("(%p %p)\n", this, loc);
771 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
772 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
773 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_overflow, 8)
774 #define call_basic_streambuf_char_overflow(this, ch) CALL_VTBL_FUNC(this, 4, \
775 int, (basic_streambuf_char*, int), (this, ch))
776 int __thiscall basic_streambuf_char_overflow(basic_streambuf_char *this, int ch)
778 TRACE("(%p %d)\n", this, ch);
782 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
783 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
784 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbackfail, 8)
785 #define call_basic_streambuf_char_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, \
786 int, (basic_streambuf_char*, int), (this, ch))
787 int __thiscall basic_streambuf_char_pbackfail(basic_streambuf_char *this, int ch)
789 TRACE("(%p %d)\n", this, ch);
793 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
794 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
795 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbase, 4)
796 char* __thiscall basic_streambuf_char_pbase(const basic_streambuf_char *this)
798 TRACE("(%p)\n", this);
802 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
803 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
804 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbump, 8)
805 void __thiscall basic_streambuf_char_pbump(basic_streambuf_char *this, int off)
807 TRACE("(%p %d)\n", this, off);
809 *this->pwsize -= off;
812 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
813 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
814 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pptr, 4)
815 char* __thiscall basic_streambuf_char_pptr(const basic_streambuf_char *this)
817 TRACE("(%p)\n", this);
821 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
822 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
823 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubimbue, 12)
824 locale* __thiscall basic_streambuf_char_pubimbue(basic_streambuf_char *this, locale *ret, const locale *loc)
826 TRACE("(%p %p)\n", this, loc);
827 memcpy(ret, this->loc, sizeof(locale));
828 call_basic_streambuf_char_imbue(this, loc);
829 locale_copy_ctor(this->loc, loc);
833 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
834 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
835 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekoff, 20)
836 #define call_basic_streambuf_char_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 36, \
837 fpos_int*, (basic_streambuf_char*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
838 fpos_int* __thiscall basic_streambuf_char_seekoff(basic_streambuf_char *this,
839 fpos_int *ret, streamoff off, int way, int mode)
841 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
848 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
849 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
850 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekoff, 20)
851 fpos_int* __thiscall basic_streambuf_char_pubseekoff(basic_streambuf_char *this,
852 fpos_int *ret, streamoff off, int way, int mode)
854 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
855 return call_basic_streambuf_char_seekoff(this, ret, off, way, mode);
858 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */
859 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */
860 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekoff_old, 20)
861 fpos_int* __thiscall basic_streambuf_char_pubseekoff_old(basic_streambuf_char *this,
862 fpos_int *ret, streamoff off, unsigned int way, unsigned int mode)
864 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
865 return basic_streambuf_char_pubseekoff(this, ret, off, way, mode);
868 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
869 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
870 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekpos, 36)
871 #define call_basic_streambuf_char_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 40, \
872 fpos_int*, (basic_streambuf_char*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
873 fpos_int* __thiscall basic_streambuf_char_seekpos(basic_streambuf_char *this,
874 fpos_int *ret, fpos_int pos, int mode)
876 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
883 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
884 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
885 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekpos, 36)
886 fpos_int* __thiscall basic_streambuf_char_pubseekpos(basic_streambuf_char *this,
887 fpos_int *ret, fpos_int pos, int mode)
889 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
890 return call_basic_streambuf_char_seekpos(this, ret, pos, mode);
893 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
894 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
895 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekpos_old, 36)
896 fpos_int* __thiscall basic_streambuf_char_pubseekpos_old(basic_streambuf_char *this,
897 fpos_int *ret, fpos_int pos, unsigned int mode)
899 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
900 return basic_streambuf_char_pubseekpos(this, ret, pos, mode);
903 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEPAV12@PADH@Z */
904 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAPEAV12@PEAD_J@Z */
905 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setbuf, 12)
906 #define call_basic_streambuf_char_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 44, \
907 basic_streambuf_char*, (basic_streambuf_char*, char*, streamsize), (this, buf, count))
908 basic_streambuf_char* __thiscall basic_streambuf_char_setbuf(basic_streambuf_char *this, char *buf, streamsize count)
910 TRACE("(%p %p %ld)\n", this, buf, count);
914 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PADH@Z */
915 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEAD_J@Z */
916 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsetbuf, 12)
917 basic_streambuf_char* __thiscall basic_streambuf_char_pubsetbuf(basic_streambuf_char *this, char *buf, streamsize count)
919 TRACE("(%p %p %ld)\n", this, buf, count);
920 return call_basic_streambuf_char_setbuf(this, buf, count);
923 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
924 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
925 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sync, 4)
926 #define call_basic_streambuf_char_sync(this) CALL_VTBL_FUNC(this, 48, \
927 int, (basic_streambuf_char*), (this))
928 int __thiscall basic_streambuf_char_sync(basic_streambuf_char *this)
930 TRACE("(%p)\n", this);
934 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
935 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
936 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsync, 4)
937 int __thiscall basic_streambuf_char_pubsync(basic_streambuf_char *this)
939 TRACE("(%p)\n", this);
940 return call_basic_streambuf_char_sync(this);
943 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
944 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
945 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetn, 12)
946 streamsize __thiscall basic_streambuf_char_sgetn(basic_streambuf_char *this, char *ptr, streamsize count)
948 TRACE("(%p %p %ld)\n", this, ptr, count);
949 return call_basic_streambuf_char__Xsgetn_s(this, ptr, -1, count);
952 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
953 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JXZ */
954 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_showmanyc, 4)
955 #define call_basic_streambuf_char_showmanyc(this) CALL_VTBL_FUNC(this, 12, \
956 streamsize, (basic_streambuf_char*), (this))
957 streamsize __thiscall basic_streambuf_char_showmanyc(basic_streambuf_char *this)
959 TRACE("(%p)\n", this);
963 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
964 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JXZ */
965 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_in_avail, 4)
966 streamsize __thiscall basic_streambuf_char_in_avail(basic_streambuf_char *this)
970 TRACE("(%p)\n", this);
972 ret = basic_streambuf_char__Gnavail(this);
973 return ret ? ret : call_basic_streambuf_char_showmanyc(this);
976 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
977 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
978 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputbackc, 8)
979 int __thiscall basic_streambuf_char_sputbackc(basic_streambuf_char *this, char ch)
981 TRACE("(%p %d)\n", this, ch);
982 if(*this->prpos && *this->prpos>*this->prbuf && (*this->prpos)[-1]==ch) {
988 return call_basic_streambuf_char_pbackfail(this, ch);
991 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
992 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
993 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputc, 8)
994 int __thiscall basic_streambuf_char_sputc(basic_streambuf_char *this, char ch)
996 TRACE("(%p %d)\n", this, ch);
997 return basic_streambuf_char__Pnavail(this) ?
998 (*basic_streambuf_char__Pninc(this) = ch) :
999 call_basic_streambuf_char_overflow(this, ch);
1002 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1003 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1004 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sungetc, 4)
1005 int __thiscall basic_streambuf_char_sungetc(basic_streambuf_char *this)
1007 TRACE("(%p)\n", this);
1008 if(*this->prpos && *this->prpos>*this->prbuf) {
1011 return **this->prpos;
1014 return call_basic_streambuf_char_pbackfail(this, EOF);
1017 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1018 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1019 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_stossc, 4)
1020 void __thiscall basic_streambuf_char_stossc(basic_streambuf_char *this)
1022 TRACE("(%p)\n", this);
1023 if(basic_streambuf_char__Gnavail(this))
1024 basic_streambuf_char__Gninc(this);
1026 call_basic_streambuf_char_uflow(this);
1029 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1030 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1031 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sbumpc, 4)
1032 int __thiscall basic_streambuf_char_sbumpc(basic_streambuf_char *this)
1034 TRACE("(%p)\n", this);
1035 return basic_streambuf_char__Gnavail(this) ?
1036 *basic_streambuf_char__Gninc(this) : call_basic_streambuf_char_uflow(this);
1039 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1040 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1041 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetc, 4)
1042 int __thiscall basic_streambuf_char_sgetc(basic_streambuf_char *this)
1044 TRACE("(%p)\n", this);
1045 return basic_streambuf_char__Gnavail(this) ?
1046 *basic_streambuf_char_gptr(this) : call_basic_streambuf_char_underflow(this);
1049 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1050 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1051 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_snextc, 4)
1052 int __thiscall basic_streambuf_char_snextc(basic_streambuf_char *this)
1054 TRACE("(%p)\n", this);
1056 if(basic_streambuf_char__Gnavail(this) > 1)
1057 return *basic_streambuf_char__Gnpreinc(this);
1058 return basic_streambuf_char_sbumpc(this)==EOF ?
1059 EOF : basic_streambuf_char_sgetc(this);
1062 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADH@Z */
1063 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_J@Z */
1064 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsgetn, 12)
1065 #define call_basic_streambuf_char_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, \
1066 streamsize, (basic_streambuf_char*, char*, streamsize), (this, ptr, count))
1067 streamsize __thiscall basic_streambuf_char_xsgetn(basic_streambuf_char *this, char *ptr, streamsize count)
1069 TRACE("(%p %p %ld)\n", this, ptr, count);
1070 return call_basic_streambuf_char__Xsgetn_s(this, ptr, -1, count);
1073 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPBDH@Z */
1074 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEBD_J@Z */
1075 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsputn, 12)
1076 #define call_basic_streambuf_char_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 32, \
1077 streamsize, (basic_streambuf_char*, const char*, streamsize), (this, ptr, count))
1078 streamsize __thiscall basic_streambuf_char_xsputn(basic_streambuf_char *this, const char *ptr, streamsize count)
1080 streamsize copied, chunk;
1082 TRACE("(%p %p %ld)\n", this, ptr, count);
1084 for(copied=0; copied<count;) {
1085 chunk = basic_streambuf_char__Pnavail(this);
1086 if(chunk > count-copied)
1087 chunk = count-copied;
1090 memcpy(*this->pwpos, ptr+copied, chunk);
1091 *this->pwpos += chunk;
1092 *this->pwsize -= chunk;
1094 }else if(call_basic_streambuf_char_overflow(this, ptr[copied]) != EOF) {
1104 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z */
1105 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEBD_J@Z */
1106 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputn, 12)
1107 streamsize __thiscall basic_streambuf_char_sputn(basic_streambuf_char *this, const char *ptr, streamsize count)
1109 TRACE("(%p %p %ld)\n", this, ptr, count);
1110 return call_basic_streambuf_char_xsputn(this, ptr, count);
1113 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */
1114 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */
1115 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
1116 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1117 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp_next, 16)
1118 void __thiscall basic_streambuf_wchar_setp_next(basic_streambuf_wchar *this, wchar_t *first, wchar_t *next, wchar_t *last)
1120 TRACE("(%p %p %p %p)\n", this, first, next, last);
1124 this->wsize = last-next;
1127 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W0@Z */
1128 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W0@Z */
1129 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG0@Z */
1130 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG0@Z */
1131 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp, 12)
1132 void __thiscall basic_streambuf_wchar_setp(basic_streambuf_wchar *this, wchar_t *first, wchar_t *last)
1134 basic_streambuf_wchar_setp_next(this, first, first, last);
1137 /* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */
1138 /* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */
1139 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
1140 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1141 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setg, 16)
1142 void __thiscall basic_streambuf_wchar_setg(basic_streambuf_wchar *this, wchar_t *first, wchar_t *next, wchar_t *last)
1144 TRACE("(%p %p %p %p)\n", this, first, next, last);
1148 this->rsize = last-next;
1151 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXXZ */
1152 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXXZ */
1153 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXXZ */
1154 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXXZ */
1155 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init_empty, 4)
1156 void __thiscall basic_streambuf_wchar__Init_empty(basic_streambuf_wchar *this)
1158 TRACE("(%p)\n", this);
1160 this->prbuf = &this->rbuf;
1161 this->pwbuf = &this->wbuf;
1162 this->prpos = &this->rpos;
1163 this->pwpos = &this->wpos;
1164 this->prsize = &this->rsize;
1165 this->pwsize = &this->wsize;
1167 basic_streambuf_wchar_setp(this, NULL, NULL);
1168 basic_streambuf_wchar_setg(this, NULL, NULL, NULL);
1171 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@W4_Uninitialized@1@@Z */
1172 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
1173 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_ctor_uninitialized, 8)
1174 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_ctor_uninitialized(basic_streambuf_wchar *this, int uninitialized)
1176 TRACE("(%p %d)\n", this, uninitialized);
1177 this->vtable = &MSVCP_basic_streambuf_wchar_vtable;
1178 mutex_ctor(&this->lock);
1182 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@W4_Uninitialized@1@@Z */
1183 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
1184 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor_uninitialized, 8)
1185 basic_streambuf_wchar* __thiscall basic_streambuf_short_ctor_uninitialized(basic_streambuf_wchar *this, int uninitialized)
1187 TRACE("(%p %d)\n", this, uninitialized);
1188 basic_streambuf_wchar_ctor_uninitialized(this, uninitialized);
1189 this->vtable = &MSVCP_basic_streambuf_short_vtable;
1193 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@XZ */
1194 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */
1195 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_ctor, 4)
1196 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_ctor(basic_streambuf_wchar *this)
1198 TRACE("(%p)\n", this);
1200 this->vtable = &MSVCP_basic_streambuf_wchar_vtable;
1201 mutex_ctor(&this->lock);
1202 this->loc = MSVCRT_operator_new(sizeof(locale));
1203 locale_ctor(this->loc);
1204 basic_streambuf_wchar__Init_empty(this);
1209 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@XZ */
1210 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@XZ */
1211 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor, 4)
1212 basic_streambuf_wchar* __thiscall basic_streambuf_short_ctor(basic_streambuf_wchar *this)
1214 TRACE("(%p)\n", this);
1215 basic_streambuf_wchar_ctor(this);
1216 this->vtable = &MSVCP_basic_streambuf_short_vtable;
1220 /* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
1221 /* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
1222 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UAE@XZ */
1223 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */
1224 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_dtor, 4)
1225 void __thiscall basic_streambuf_wchar_dtor(basic_streambuf_wchar *this)
1227 TRACE("(%p)\n", this);
1229 mutex_dtor(&this->lock);
1230 locale_dtor(this->loc);
1231 MSVCRT_operator_delete(this->loc);
1234 DEFINE_THISCALL_WRAPPER(MSVCP_basic_streambuf_wchar_vector_dtor, 8)
1235 basic_streambuf_wchar* __thiscall MSVCP_basic_streambuf_wchar_vector_dtor(basic_streambuf_wchar *this, unsigned int flags)
1237 TRACE("(%p %x)\n", this, flags);
1239 /* we have an array, with the number of elements stored before the first object */
1240 int i, *ptr = (int *)this-1;
1242 for(i=*ptr-1; i>=0; i--)
1243 basic_streambuf_wchar_dtor(this+i);
1244 MSVCRT_operator_delete(ptr);
1246 basic_streambuf_wchar_dtor(this);
1248 MSVCRT_operator_delete(this);
1254 DEFINE_THISCALL_WRAPPER(MSVCP_basic_streambuf_short_vector_dtor, 8)
1255 basic_streambuf_wchar* __thiscall MSVCP_basic_streambuf_short_vector_dtor(basic_streambuf_wchar *this, unsigned int flags)
1257 TRACE("(%p %x)\n", this, flags);
1258 return MSVCP_basic_streambuf_wchar_vector_dtor(this, flags);
1261 /* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */
1262 /* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */
1263 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1264 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1265 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gnavail, 4)
1266 streamsize __thiscall basic_streambuf_wchar__Gnavail(const basic_streambuf_wchar *this)
1268 TRACE("(%p)\n", this);
1269 return *this->prpos ? *this->prsize : 0;
1272 /* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1273 /* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1274 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1275 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1276 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gndec, 4)
1277 wchar_t* __thiscall basic_streambuf_wchar__Gndec(basic_streambuf_wchar *this)
1279 TRACE("(%p)\n", this);
1282 return *this->prpos;
1285 /* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1286 /* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1287 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1288 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1289 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gninc, 4)
1290 wchar_t* __thiscall basic_streambuf_wchar__Gninc(basic_streambuf_wchar *this)
1292 TRACE("(%p)\n", this);
1294 return (*this->prpos)++;
1297 /* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1298 /* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1299 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1300 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1301 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gnpreinc, 4)
1302 wchar_t* __thiscall basic_streambuf_wchar__Gnpreinc(basic_streambuf_wchar *this)
1304 TRACE("(%p)\n", this);
1307 return *this->prpos;
1310 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPAPA_W0PAH001@Z */
1311 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAPEA_W0PEAH001@Z */
1312 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAPAG0PAH001@Z */
1313 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAPEAG0PEAH001@Z */
1314 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init, 28)
1315 void __thiscall basic_streambuf_wchar__Init(basic_streambuf_wchar *this, wchar_t **gf, wchar_t **gn, int *gc, wchar_t **pf, wchar_t **pn, int *pc)
1317 TRACE("(%p %p %p %p %p %p %p)\n", this, gf, gn, gc, pf, pn, pc);
1327 /* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1328 /* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1329 /* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1330 /* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1331 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Lock, 4)
1332 void __thiscall basic_streambuf_wchar__Lock(basic_streambuf_wchar *this)
1334 TRACE("(%p)\n", this);
1335 mutex_lock(&this->lock);
1338 /* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */
1339 /* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */
1340 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1341 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1342 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Pnavail, 4)
1343 streamsize __thiscall basic_streambuf_wchar__Pnavail(const basic_streambuf_wchar *this)
1345 TRACE("(%p)\n", this);
1346 return *this->pwpos ? *this->pwsize : 0;
1349 /* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1350 /* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1351 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1352 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1353 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Pninc, 4)
1354 wchar_t* __thiscall basic_streambuf_wchar__Pninc(basic_streambuf_wchar *this)
1356 TRACE("(%p)\n", this);
1358 return (*this->pwpos)++;
1361 /* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
1362 /* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
1363 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1364 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1365 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_underflow, 4)
1366 #define call_basic_streambuf_wchar_underflow(this) CALL_VTBL_FUNC(this, 16, \
1367 unsigned short, (basic_streambuf_wchar*), (this))
1368 unsigned short __thiscall basic_streambuf_wchar_underflow(basic_streambuf_wchar *this)
1370 TRACE("(%p)\n", this);
1374 /* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
1375 /* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
1376 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1377 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1378 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_uflow, 4)
1379 #define call_basic_streambuf_wchar_uflow(this) CALL_VTBL_FUNC(this, 20, \
1380 unsigned short, (basic_streambuf_wchar*), (this))
1381 unsigned short __thiscall basic_streambuf_wchar_uflow(basic_streambuf_wchar *this)
1385 TRACE("(%p)\n", this);
1387 if(call_basic_streambuf_wchar_underflow(this)==WEOF)
1390 ret = **this->prpos;
1396 /* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WIH@Z */
1397 /* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_K_J@Z */
1398 /* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGIH@Z */
1399 /* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_K_J@Z */
1400 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Xsgetn_s, 16)
1401 #define call_basic_streambuf_wchar__Xsgetn_s(this, ptr, size, count) CALL_VTBL_FUNC(this, 28, \
1402 streamsize, (basic_streambuf_wchar*, wchar_t*, MSVCP_size_t, streamsize), (this, ptr, size, count))
1403 streamsize __thiscall basic_streambuf_wchar__Xsgetn_s(basic_streambuf_wchar *this, wchar_t *ptr, MSVCP_size_t size, streamsize count)
1405 streamsize copied, chunk;
1407 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
1409 for(copied=0; copied<count && size;) {
1410 chunk = basic_streambuf_wchar__Gnavail(this);
1411 if(chunk > count-copied)
1412 chunk = count-copied;
1415 memcpy_s(ptr+copied, size, *this->prpos, chunk);
1416 *this->prpos += chunk;
1417 *this->prsize -= chunk;
1420 }else if((ptr[copied] = call_basic_streambuf_wchar_uflow(this)) != WEOF) {
1431 /* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WIH@Z */
1432 /* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_K_J@Z */
1433 /* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGIH@Z */
1434 /* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_K_J@Z */
1435 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Sgetn_s, 16)
1436 streamsize __thiscall basic_streambuf_wchar__Sgetn_s(basic_streambuf_wchar *this, wchar_t *ptr, MSVCP_size_t size, streamsize count)
1438 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
1439 return call_basic_streambuf_wchar__Xsgetn_s(this, ptr, size, count);
1442 /* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1443 /* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1444 /* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1445 /* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1446 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Unlock, 4)
1447 void __thiscall basic_streambuf_wchar__Unlock(basic_streambuf_wchar *this)
1449 TRACE("(%p)\n", this);
1450 mutex_unlock(&this->lock);
1453 /* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1454 /* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1455 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1456 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1457 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_eback, 4)
1458 wchar_t* __thiscall basic_streambuf_wchar_eback(const basic_streambuf_wchar *this)
1460 TRACE("(%p)\n", this);
1461 return *this->prbuf;
1464 /* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1465 /* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1466 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1467 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1468 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gptr, 4)
1469 wchar_t* __thiscall basic_streambuf_wchar_gptr(const basic_streambuf_wchar *this)
1471 TRACE("(%p)\n", this);
1472 return *this->prpos;
1475 /* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1476 /* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1477 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1478 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1479 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_egptr, 4)
1480 wchar_t* __thiscall basic_streambuf_wchar_egptr(const basic_streambuf_wchar *this)
1482 TRACE("(%p)\n", this);
1483 return *this->prpos+*this->prsize;
1486 /* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1487 /* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1488 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1489 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1490 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_epptr, 4)
1491 wchar_t* __thiscall basic_streambuf_wchar_epptr(const basic_streambuf_wchar *this)
1493 TRACE("(%p)\n", this);
1494 return *this->pwpos+*this->pwsize;
1497 /* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */
1498 /* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */
1499 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
1500 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
1501 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gbump, 8)
1502 void __thiscall basic_streambuf_wchar_gbump(basic_streambuf_wchar *this, int off)
1504 TRACE("(%p %d)\n", this, off);
1505 *this->prpos += off;
1506 *this->prsize -= off;
1509 /* ?getloc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QBE?AVlocale@2@XZ */
1510 /* ?getloc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEBA?AVlocale@2@XZ */
1511 /* ?getloc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QBE?AVlocale@2@XZ */
1512 /* ?getloc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEBA?AVlocale@2@XZ */
1513 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_getloc, 8)
1514 locale* __thiscall basic_streambuf_wchar_getloc(const basic_streambuf_wchar *this, locale *ret)
1516 TRACE("(%p)\n", this);
1517 return locale_copy_ctor(ret, this->loc);
1520 /* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEXABVlocale@2@@Z */
1521 /* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAXAEBVlocale@2@@Z */
1522 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEXABVlocale@2@@Z */
1523 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAXAEBVlocale@2@@Z */
1524 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_imbue, 8)
1525 #define call_basic_streambuf_wchar_imbue(this, loc) CALL_VTBL_FUNC(this, 52, \
1526 void, (basic_streambuf_wchar*, const locale*), (this, loc))
1527 void __thiscall basic_streambuf_wchar_imbue(basic_streambuf_wchar *this, const locale *loc)
1529 TRACE("(%p %p)\n", this, loc);
1532 /* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
1533 /* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
1534 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1535 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1536 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_overflow, 8)
1537 #define call_basic_streambuf_wchar_overflow(this, ch) CALL_VTBL_FUNC(this, 4, \
1538 unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1539 unsigned short __thiscall basic_streambuf_wchar_overflow(basic_streambuf_wchar *this, unsigned short ch)
1541 TRACE("(%p %d)\n", this, ch);
1545 /* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
1546 /* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
1547 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1548 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1549 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbackfail, 8)
1550 #define call_basic_streambuf_wchar_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, \
1551 unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1552 unsigned short __thiscall basic_streambuf_wchar_pbackfail(basic_streambuf_wchar *this, unsigned short ch)
1554 TRACE("(%p %d)\n", this, ch);
1558 /* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1559 /* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1560 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1561 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1562 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbase, 4)
1563 wchar_t* __thiscall basic_streambuf_wchar_pbase(const basic_streambuf_wchar *this)
1565 TRACE("(%p)\n", this);
1566 return *this->pwbuf;
1569 /* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */
1570 /* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */
1571 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
1572 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
1573 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbump, 8)
1574 void __thiscall basic_streambuf_wchar_pbump(basic_streambuf_wchar *this, int off)
1576 TRACE("(%p %d)\n", this, off);
1577 *this->pwpos += off;
1578 *this->pwsize -= off;
1581 /* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1582 /* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1583 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1584 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1585 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pptr, 4)
1586 wchar_t* __thiscall basic_streambuf_wchar_pptr(const basic_streambuf_wchar *this)
1588 TRACE("(%p)\n", this);
1589 return *this->pwpos;
1592 /* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1593 /* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1594 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1595 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1596 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubimbue, 12)
1597 locale* __thiscall basic_streambuf_wchar_pubimbue(basic_streambuf_wchar *this, locale *ret, const locale *loc)
1599 TRACE("(%p %p)\n", this, loc);
1600 memcpy(ret, this->loc, sizeof(locale));
1601 call_basic_streambuf_wchar_imbue(this, loc);
1602 locale_copy_ctor(this->loc, loc);
1606 /* ?seekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1607 /* ?seekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1608 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1609 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1610 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekoff, 20)
1611 #define call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 36, \
1612 fpos_int*, (basic_streambuf_wchar*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
1613 fpos_int* __thiscall basic_streambuf_wchar_seekoff(basic_streambuf_wchar *this,
1614 fpos_int *ret, streamoff off, int way, int mode)
1616 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
1623 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
1624 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
1625 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
1626 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
1627 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekoff, 20)
1628 fpos_int* __thiscall basic_streambuf_wchar_pubseekoff(basic_streambuf_wchar *this,
1629 fpos_int *ret, streamoff off, int way, int mode)
1631 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
1632 return call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode);
1635 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */
1636 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */
1637 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */
1638 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */
1639 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekoff_old, 20)
1640 fpos_int* __thiscall basic_streambuf_wchar_pubseekoff_old(basic_streambuf_wchar *this,
1641 fpos_int *ret, streamoff off, unsigned int way, unsigned int mode)
1643 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
1644 return basic_streambuf_wchar_pubseekoff(this, ret, off, way, mode);
1647 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
1648 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
1649 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
1650 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
1651 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekpos, 36)
1652 #define call_basic_streambuf_wchar_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 40, \
1653 fpos_int*, (basic_streambuf_wchar*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
1654 fpos_int* __thiscall basic_streambuf_wchar_seekpos(basic_streambuf_wchar *this,
1655 fpos_int *ret, fpos_int pos, int mode)
1657 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
1664 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
1665 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
1666 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
1667 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
1668 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos, 36)
1669 fpos_int* __thiscall basic_streambuf_wchar_pubseekpos(basic_streambuf_wchar *this,
1670 fpos_int *ret, fpos_int pos, int mode)
1672 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
1673 return call_basic_streambuf_wchar_seekpos(this, ret, pos, mode);
1676 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
1677 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
1678 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
1679 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
1680 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos_old, 36)
1681 fpos_int* __thiscall basic_streambuf_wchar_pubseekpos_old(basic_streambuf_wchar *this,
1682 fpos_int *ret, fpos_int pos, unsigned int mode)
1684 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
1685 return basic_streambuf_wchar_pubseekpos(this, ret, pos, mode);
1688 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEPAV12@PA_WH@Z */
1689 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAPEAV12@PEA_W_J@Z */
1690 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEPAV12@PAGH@Z */
1691 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAPEAV12@PEAG_J@Z */
1692 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setbuf, 12)
1693 #define call_basic_streambuf_wchar_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 44, \
1694 basic_streambuf_wchar*, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, buf, count))
1695 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_setbuf(basic_streambuf_wchar *this, wchar_t *buf, streamsize count)
1697 TRACE("(%p %p %ld)\n", this, buf, count);
1701 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PA_WH@Z */
1702 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEA_W_J@Z */
1703 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PAGH@Z */
1704 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEAG_J@Z */
1705 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsetbuf, 12)
1706 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_pubsetbuf(basic_streambuf_wchar *this, wchar_t *buf, streamsize count)
1708 TRACE("(%p %p %ld)\n", this, buf, count);
1709 return call_basic_streambuf_wchar_setbuf(this, buf, count);
1712 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
1713 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAHXZ */
1714 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
1715 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */
1716 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sync, 4)
1717 #define call_basic_streambuf_wchar_sync(this) CALL_VTBL_FUNC(this, 48, \
1718 int, (basic_streambuf_wchar*), (this))
1719 int __thiscall basic_streambuf_wchar_sync(basic_streambuf_wchar *this)
1721 TRACE("(%p)\n", this);
1725 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
1726 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAHXZ */
1727 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
1728 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHXZ */
1729 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsync, 4)
1730 int __thiscall basic_streambuf_wchar_pubsync(basic_streambuf_wchar *this)
1732 TRACE("(%p)\n", this);
1733 return call_basic_streambuf_wchar_sync(this);
1736 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WH@Z */
1737 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_J@Z */
1738 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */
1739 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */
1740 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetn, 12)
1741 streamsize __thiscall basic_streambuf_wchar_sgetn(basic_streambuf_wchar *this, wchar_t *ptr, streamsize count)
1743 TRACE("(%p %p %ld)\n", this, ptr, count);
1744 return call_basic_streambuf_wchar__Xsgetn_s(this, ptr, -1, count);
1747 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
1748 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JXZ */
1749 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
1750 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JXZ */
1751 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_showmanyc, 4)
1752 #define call_basic_streambuf_wchar_showmanyc(this) CALL_VTBL_FUNC(this, 12, \
1753 streamsize, (basic_streambuf_wchar*), (this))
1754 streamsize __thiscall basic_streambuf_wchar_showmanyc(basic_streambuf_wchar *this)
1756 TRACE("(%p)\n", this);
1760 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
1761 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JXZ */
1762 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
1763 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JXZ */
1764 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_in_avail, 4)
1765 streamsize __thiscall basic_streambuf_wchar_in_avail(basic_streambuf_wchar *this)
1769 TRACE("(%p)\n", this);
1771 ret = basic_streambuf_wchar__Gnavail(this);
1772 return ret ? ret : call_basic_streambuf_wchar_showmanyc(this);
1775 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
1776 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
1777 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
1778 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
1779 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputbackc, 8)
1780 unsigned short __thiscall basic_streambuf_wchar_sputbackc(basic_streambuf_wchar *this, wchar_t ch)
1782 TRACE("(%p %d)\n", this, ch);
1783 if(*this->prpos && *this->prpos>*this->prbuf && (*this->prpos)[-1]==ch) {
1789 return call_basic_streambuf_wchar_pbackfail(this, ch);
1792 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
1793 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
1794 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
1795 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHG@Z */
1796 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputc, 8)
1797 unsigned short __thiscall basic_streambuf_wchar_sputc(basic_streambuf_wchar *this, wchar_t ch)
1799 TRACE("(%p %d)\n", this, ch);
1800 return basic_streambuf_wchar__Pnavail(this) ?
1801 (*basic_streambuf_wchar__Pninc(this) = ch) :
1802 call_basic_streambuf_wchar_overflow(this, ch);
1805 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
1806 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
1807 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1808 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1809 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sungetc, 4)
1810 unsigned short __thiscall basic_streambuf_wchar_sungetc(basic_streambuf_wchar *this)
1812 TRACE("(%p)\n", this);
1813 if(*this->prpos && *this->prpos>*this->prbuf) {
1816 return **this->prpos;
1819 return call_basic_streambuf_wchar_pbackfail(this, WEOF);
1822 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1823 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1824 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1825 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1826 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_stossc, 4)
1827 void __thiscall basic_streambuf_wchar_stossc(basic_streambuf_wchar *this)
1829 TRACE("(%p)\n", this);
1830 if(basic_streambuf_wchar__Gnavail(this))
1831 basic_streambuf_wchar__Gninc(this);
1833 call_basic_streambuf_wchar_uflow(this);
1836 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
1837 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
1838 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1839 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1840 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sbumpc, 4)
1841 unsigned short __thiscall basic_streambuf_wchar_sbumpc(basic_streambuf_wchar *this)
1843 TRACE("(%p)\n", this);
1844 return basic_streambuf_wchar__Gnavail(this) ?
1845 *basic_streambuf_wchar__Gninc(this) : call_basic_streambuf_wchar_uflow(this);
1848 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
1849 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
1850 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1851 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1852 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetc, 4)
1853 unsigned short __thiscall basic_streambuf_wchar_sgetc(basic_streambuf_wchar *this)
1855 TRACE("(%p)\n", this);
1856 return basic_streambuf_wchar__Gnavail(this) ?
1857 *basic_streambuf_wchar_gptr(this) : call_basic_streambuf_wchar_underflow(this);
1860 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
1861 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
1862 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1863 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1864 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_snextc, 4)
1865 unsigned short __thiscall basic_streambuf_wchar_snextc(basic_streambuf_wchar *this)
1867 TRACE("(%p)\n", this);
1869 if(basic_streambuf_wchar__Gnavail(this) > 1)
1870 return *basic_streambuf_wchar__Gnpreinc(this);
1871 return basic_streambuf_wchar_sbumpc(this)==WEOF ?
1872 WEOF : basic_streambuf_wchar_sgetc(this);
1875 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WH@Z */
1876 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_J@Z */
1877 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGH@Z */
1878 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_J@Z */
1879 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsgetn, 12)
1880 #define call_basic_streambuf_wchar_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, \
1881 streamsize, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, ptr, count))
1882 streamsize __thiscall basic_streambuf_wchar_xsgetn(basic_streambuf_wchar *this, wchar_t *ptr, streamsize count)
1884 TRACE("(%p %p %ld)\n", this, ptr, count);
1885 return call_basic_streambuf_wchar__Xsgetn_s(this, ptr, -1, count);
1888 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPB_WH@Z */
1889 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEB_W_J@Z */
1890 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPBGH@Z */
1891 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEBG_J@Z */
1892 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsputn, 12)
1893 #define call_basic_streambuf_wchar_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 32, \
1894 streamsize, (basic_streambuf_wchar*, const wchar_t*, streamsize), (this, ptr, count))
1895 streamsize __thiscall basic_streambuf_wchar_xsputn(basic_streambuf_wchar *this, const wchar_t *ptr, streamsize count)
1897 streamsize copied, chunk;
1899 TRACE("(%p %p %ld)\n", this, ptr, count);
1901 for(copied=0; copied<count;) {
1902 chunk = basic_streambuf_wchar__Pnavail(this);
1903 if(chunk > count-copied)
1904 chunk = count-copied;
1907 memcpy(*this->pwpos, ptr+copied, chunk);
1908 *this->pwpos += chunk;
1909 *this->pwsize -= chunk;
1911 }else if(call_basic_streambuf_wchar_overflow(this, ptr[copied]) != WEOF) {
1921 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPB_WH@Z */
1922 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEB_W_J@Z */
1923 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPBGH@Z */
1924 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEBG_J@Z */
1925 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputn, 12)
1926 streamsize __thiscall basic_streambuf_wchar_sputn(basic_streambuf_wchar *this, const wchar_t *ptr, streamsize count)
1928 TRACE("(%p %p %ld)\n", this, ptr, count);
1929 return call_basic_streambuf_wchar_xsputn(this, ptr, count);
1932 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
1933 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
1934 int basic_filebuf_char__Init__Stinit = 0;
1936 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
1937 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
1938 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Init, 12)
1939 void __thiscall basic_filebuf_char__Init(basic_filebuf_char *this, FILE *file, basic_filebuf__Initfl which)
1941 TRACE("(%p %p %d)\n", this, file, which);
1944 this->wrotesome = FALSE;
1945 this->state = basic_filebuf_char__Init__Stinit;
1946 this->close = (which == INITFL_open);
1949 basic_streambuf_char__Init_empty(&this->base);
1951 basic_streambuf_char__Init(&this->base, &file->_base, &file->_ptr,
1952 &file->_cnt, &file->_base, &file->_ptr, &file->_cnt);
1955 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAV?$codecvt@DDH@2@@Z */
1956 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$codecvt@DDH@2@@Z */
1957 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Initcvt, 8)
1958 void __thiscall basic_filebuf_char__Initcvt(basic_filebuf_char *this, codecvt_char *cvt)
1960 TRACE("(%p %p)\n", this, cvt);
1962 if(codecvt_base_always_noconv(&cvt->base)) {
1965 basic_streambuf_char__Init_empty(&this->base);
1970 /* ?_Endwrite@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAE_NXZ */
1971 /* ?_Endwrite@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAA_NXZ */
1972 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Endwrite, 4)
1973 MSVCP_bool __thiscall basic_filebuf_char__Endwrite(basic_filebuf_char *this)
1975 TRACE("(%p)\n", this);
1977 if(!this->wrotesome || !this->cvt)
1981 if(call_basic_streambuf_char_overflow(&this->base, EOF) == EOF)
1985 /* TODO: check if we need a dynamic buffer here */
1990 ret = codecvt_char_unshift(this->cvt, &this->state, buf, buf+sizeof(buf), &next);
1993 this->wrotesome = FALSE;
1995 case CODECVT_partial:
1996 if(!fwrite(buf, next-buf, 1, this->file))
2001 case CODECVT_noconv:
2002 if(call_basic_streambuf_char_overflow(&this->base, EOF) == EOF)
2011 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@XZ */
2012 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@XZ */
2013 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_close, 4)
2014 basic_filebuf_char* __thiscall basic_filebuf_char_close(basic_filebuf_char *this)
2016 basic_filebuf_char *ret = this;
2018 TRACE("(%p)\n", this);
2023 /* TODO: handle exceptions */
2024 if(!basic_filebuf_char__Endwrite(this))
2026 if(!fclose(this->file))
2029 basic_filebuf_char__Init(this, NULL, INITFL_close);
2033 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
2034 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
2035 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_file, 8)
2036 basic_filebuf_char* __thiscall basic_filebuf_char_ctor_file(basic_filebuf_char *this, FILE *file)
2038 TRACE("(%p %p)\n", this, file);
2040 basic_streambuf_char_ctor(&this->base);
2041 this->base.vtable = &MSVCP_basic_filebuf_char_vtable;
2043 basic_filebuf_char__Init(this, file, INITFL_new);
2047 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
2048 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
2049 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor, 4)
2050 basic_filebuf_char* __thiscall basic_filebuf_char_ctor(basic_filebuf_char *this)
2052 return basic_filebuf_char_ctor_file(this, NULL);
2055 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
2056 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
2057 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_uninitialized, 8)
2058 basic_filebuf_char* __thiscall basic_filebuf_char_ctor_uninitialized(basic_filebuf_char *this, int uninitialized)
2060 TRACE("(%p %d)\n", this, uninitialized);
2062 basic_streambuf_char_ctor(&this->base);
2063 this->base.vtable = &MSVCP_basic_filebuf_char_vtable;
2067 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
2068 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
2069 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_dtor, 4)
2070 void __thiscall basic_filebuf_char_dtor(basic_filebuf_char *this)
2072 TRACE("(%p)\n", this);
2075 basic_filebuf_char_close(this);
2076 basic_streambuf_char_dtor(&this->base);
2079 DEFINE_THISCALL_WRAPPER(MSVCP_basic_filebuf_char_vector_dtor, 8)
2080 basic_filebuf_char* __thiscall MSVCP_basic_filebuf_char_vector_dtor(basic_filebuf_char *this, unsigned int flags)
2082 TRACE("(%p %x)\n", this, flags);
2084 /* we have an array, with the number of elements stored before the first object */
2085 int i, *ptr = (int *)this-1;
2087 for(i=*ptr-1; i>=0; i--)
2088 basic_filebuf_char_dtor(this+i);
2089 MSVCRT_operator_delete(ptr);
2091 basic_filebuf_char_dtor(this);
2093 MSVCRT_operator_delete(this);
2099 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QBE_NXZ */
2100 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
2101 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_is_open, 4)
2102 MSVCP_bool __thiscall basic_filebuf_char_is_open(const basic_filebuf_char *this)
2104 TRACE("(%p)\n", this);
2105 return this->file != NULL;
2108 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PB_WHH@Z */
2109 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEB_WHH@Z */
2110 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBGHH@Z */
2111 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBGHH@Z */
2112 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_wchar, 16)
2113 basic_filebuf_char* __thiscall basic_filebuf_char_open_wchar(basic_filebuf_char *this, const wchar_t *name, int mode, int prot)
2115 static const wchar_t rW[] = {'r',0};
2116 static const struct {
2118 const wchar_t str[4];
2119 const wchar_t str_bin[4];
2121 {OPENMODE_out, {'w',0}, {'w','b',0}},
2122 {OPENMODE_out|OPENMODE_app, {'a',0}, {'a','b',0}},
2123 {OPENMODE_app, {'a',0}, {'a','b',0}},
2124 {OPENMODE_out|OPENMODE_trunc, {'w',0}, {'w','b',0}},
2125 {OPENMODE_in, {'r',0}, {'r','b',0}},
2126 {OPENMODE_in|OPENMODE_out, {'r','+',0}, {'r','+','b',0}},
2127 {OPENMODE_in|OPENMODE_out|OPENMODE_trunc, {'w','+',0}, {'w','+','b',0}},
2128 {OPENMODE_in|OPENMODE_out|OPENMODE_app, {'a','+',0}, {'a','+','b',0}},
2129 {OPENMODE_in|OPENMODE_app, {'a','+',0}, {'a','+','b',0}}
2132 int real_mode = mode & ~(OPENMODE_ate|OPENMODE__Nocreate|OPENMODE__Noreplace|OPENMODE_binary);
2136 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
2138 if(basic_filebuf_char_is_open(this))
2141 for(mode_idx=0; mode_idx<sizeof(str_mode)/sizeof(str_mode[0]); mode_idx++)
2142 if(str_mode[mode_idx].mode == real_mode)
2144 if(mode_idx == sizeof(str_mode)/sizeof(str_mode[0]))
2147 if((mode & OPENMODE__Nocreate) && !(f = _wfopen(name, rW)))
2152 if((mode & OPENMODE__Noreplace) && (mode & (OPENMODE_out|OPENMODE_app))
2153 && (f = _wfopen(name, rW))) {
2158 f = _wfsopen(name, (mode & OPENMODE_binary) ? str_mode[mode_idx].str_bin
2159 : str_mode[mode_idx].str, prot);
2163 if((mode & OPENMODE_ate) && fseek(f, 0, SEEK_END)) {
2168 basic_filebuf_char__Init(this, f, INITFL_open);
2169 basic_filebuf_char__Initcvt(this, codecvt_char_use_facet(this->base.loc));
2173 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PB_WI@Z */
2174 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEB_WI@Z */
2175 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBGI@Z */
2176 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBGI@Z */
2177 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_wchar_mode, 12)
2178 basic_filebuf_char* __thiscall basic_filebuf_char_open_wchar_mode(basic_filebuf_char *this, const wchar_t *name, unsigned int mode)
2180 return basic_filebuf_char_open_wchar(this, name, mode, SH_DENYNO);
2183 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDHH@Z */
2184 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDHH@Z */
2185 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open, 16)
2186 basic_filebuf_char* __thiscall basic_filebuf_char_open(basic_filebuf_char *this, const char *name, int mode, int prot)
2188 wchar_t nameW[FILENAME_MAX];
2190 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
2192 if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0)
2194 return basic_filebuf_char_open_wchar(this, nameW, mode, prot);
2197 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDI@Z */
2198 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDI@Z */
2199 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_mode, 12)
2200 basic_filebuf_char* __thiscall basic_filebuf_char_open_mode(basic_filebuf_char *this, const char *name, unsigned int mode)
2202 return basic_filebuf_char_open(this, name, mode, SH_DENYNO);
2205 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2206 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2207 #define call_basic_filebuf_char_overflow(this, c) CALL_VTBL_FUNC(this, 4, \
2208 int, (basic_filebuf_char*, int), (this, c))
2209 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_overflow, 8)
2210 int __thiscall basic_filebuf_char_overflow(basic_filebuf_char *this, int c)
2212 char buf[8], *dyn_buf;
2213 char ch = c, *to_next;
2214 const char *from_next;
2218 TRACE("(%p %d)\n", this, c);
2220 if(!basic_filebuf_char_is_open(this))
2226 return fwrite(&ch, sizeof(char), 1, this->file) ? c : EOF;
2230 ret = codecvt_char_out(this->cvt, &this->state, from_next, &ch+1,
2231 &from_next, buf, buf+sizeof(buf), &to_next);
2234 case CODECVT_partial:
2239 if(!fwrite(buf, to_next-buf, 1, this->file))
2241 if(ret == CODECVT_partial)
2244 case CODECVT_noconv:
2245 return fwrite(&ch, sizeof(char), 1, this->file) ? c : EOF;
2251 max_size = codecvt_base_max_length(&this->cvt->base);
2252 dyn_buf = malloc(max_size);
2256 ret = codecvt_char_out(this->cvt, &this->state, from_next, &ch+1,
2257 &from_next, dyn_buf, dyn_buf+max_size, &to_next);
2261 ret = fwrite(dyn_buf, to_next-dyn_buf, 1, this->file);
2263 return ret ? c : EOF;
2264 case CODECVT_partial:
2265 ERR("buffer should be big enough to store all output\n");
2273 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2274 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2275 #define call_basic_filebuf_char_pbackfail(this, c) CALL_VTBL_FUNC(this, 8, \
2276 int, (basic_filebuf_char*, int), (this, c))
2277 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_pbackfail, 8)
2278 int __thiscall basic_filebuf_char_pbackfail(basic_filebuf_char *this, int c)
2280 TRACE("(%p %d)\n", this, c);
2282 if(!basic_filebuf_char_is_open(this))
2285 if(basic_streambuf_char_gptr(&this->base)>basic_streambuf_char_eback(&this->base)
2286 && (c==EOF || basic_streambuf_char_gptr(&this->base)[-1]==(char)c)) {
2287 basic_streambuf_char__Gndec(&this->base);
2288 return c==EOF ? !c : c;
2289 }else if(c!=EOF && !this->cvt) {
2290 return ungetc(c, this->file);
2296 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2297 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2298 #define call_basic_filebuf_char_uflow(this) CALL_VTBL_FUNC(this, 20, \
2299 int, (basic_filebuf_char*), (this))
2300 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_uflow, 4)
2301 int __thiscall basic_filebuf_char_uflow(basic_filebuf_char *this)
2303 char ch, buf[128], *to_next;
2304 const char *buf_next;
2307 TRACE("(%p)\n", this);
2309 if(!basic_filebuf_char_is_open(this))
2312 if(basic_streambuf_char_gptr(&this->base) < basic_streambuf_char_egptr(&this->base))
2313 return *basic_streambuf_char__Gninc(&this->base);
2315 c = fgetc(this->file);
2316 if(!this->cvt || !c)
2320 for(i=0; i < sizeof(buf)/sizeof(char); i++) {
2323 switch(codecvt_char_in(this->cvt, &this->state, buf_next,
2324 buf+i+1, &buf_next, &ch, &ch+1, &to_next)) {
2325 case CODECVT_partial:
2327 if(to_next == &ch) {
2328 c = fgetc(this->file);
2334 for(i--; i>=buf_next-buf; i--)
2335 ungetc(buf[i], this->file);
2337 case CODECVT_noconv:
2344 FIXME("buffer is to small\n");
2348 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2349 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2350 #define call_basic_filebuf_char_underflow(this) CALL_VTBL_FUNC(this, 16, \
2351 int, (basic_filebuf_char*), (this))
2352 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_underflow, 4)
2353 int __thiscall basic_filebuf_char_underflow(basic_filebuf_char *this)
2357 TRACE("(%p)\n", this);
2359 if(basic_streambuf_char_gptr(&this->base) < basic_streambuf_char_egptr(&this->base))
2360 return *basic_streambuf_char_gptr(&this->base);
2362 ret = call_basic_filebuf_char_uflow(this);
2364 ret = call_basic_filebuf_char_pbackfail(this, ret);
2368 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
2369 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
2370 #define call_basic_filebuf_char_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 36, \
2371 fpos_int*, (basic_filebuf_char*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
2372 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekoff, 20)
2373 fpos_int* __thiscall basic_filebuf_char_seekoff(basic_filebuf_char *this,
2374 fpos_int *ret, streamoff off, int way, int mode)
2378 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
2380 if(!basic_filebuf_char_is_open(this) || !basic_filebuf_char__Endwrite(this)
2381 || fseek(this->file, off, way)) {
2388 fgetpos(this->file, &pos);
2391 ret->state = this->state;
2395 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2396 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2397 #define call_basic_filebuf_char_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 40, \
2398 fpos_int*, (basic_filebuf_char*, fpos_int*, fpos_int, mode), (this, ret, pos, mode))
2399 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekpos, 36)
2400 fpos_int* __thiscall basic_filebuf_char_seekpos(basic_filebuf_char *this,
2401 fpos_int *ret, fpos_int pos, int mode)
2405 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
2407 if(!basic_filebuf_char_is_open(this) || !basic_filebuf_char__Endwrite(this)
2408 || fseek(this->file, (LONG)pos.pos, SEEK_SET)
2409 || (pos.off && fseek(this->file, pos.off, SEEK_CUR))) {
2416 fgetpos(this->file, &fpos);
2419 ret->state = this->state;
2423 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PADH@Z */
2424 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAD_J@Z */
2425 #define call_basic_filebuf_char_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 44, \
2426 basic_streambuf_char*, (basic_filebuf_char*, char*, streamsize), (this, buf, count))
2427 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_setbuf, 12)
2428 basic_streambuf_char* __thiscall basic_filebuf_char_setbuf(basic_filebuf_char *this, char *buf, streamsize count)
2430 TRACE("(%p %p %ld)\n", this, buf, count);
2432 if(!basic_filebuf_char_is_open(this))
2435 if(setvbuf(this->file, buf, (buf==NULL && count==0) ? _IONBF : _IOFBF, count))
2438 basic_filebuf_char__Init(this, this->file, INITFL_open);
2442 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2443 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2444 #define call_basic_filebuf_char_sync(this) CALL_VTBL_FUNC(this, 48, \
2445 int, (basic_filebuf_char*), (this))
2446 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_sync, 4)
2447 int __thiscall basic_filebuf_char_sync(basic_filebuf_char *this)
2449 TRACE("(%p)\n", this);
2451 if(!basic_filebuf_char_is_open(this))
2454 if(call_basic_filebuf_char_overflow(this, EOF) == EOF)
2456 return fflush(this->file);
2459 /* ?imbue@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
2460 /* ?imbue@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */
2461 #define call_basic_filebuf_char_imbue(this, loc) CALL_VTBL_FUNC(this, 52, \
2462 void, (basic_filebuf_char*, const locale*), (this, loc))
2463 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_imbue, 8)
2464 void __thiscall basic_filebuf_char_imbue(basic_filebuf_char *this, const locale *loc)
2466 TRACE("(%p %p)\n", this, loc);
2467 basic_filebuf_char__Initcvt(this, codecvt_char_use_facet(loc));
2470 /* ??0ios_base@std@@IAE@XZ */
2471 /* ??0ios_base@std@@IEAA@XZ */
2472 DEFINE_THISCALL_WRAPPER(ios_base_ctor, 4)
2473 ios_base* __thiscall ios_base_ctor(ios_base *this)
2475 TRACE("(%p)\n", this);
2476 this->vtable = &MSVCP_ios_base_vtable;
2480 /* ??0ios_base@std@@QAE@ABV01@@Z */
2481 /* ??0ios_base@std@@QEAA@AEBV01@@Z */
2482 DEFINE_THISCALL_WRAPPER(ios_base_copy_ctor, 8)
2483 ios_base* __thiscall ios_base_copy_ctor(ios_base *this, const ios_base *copy)
2485 TRACE("(%p %p)\n", this, copy);
2487 this->vtable = &MSVCP_ios_base_vtable;
2491 /* ?_Callfns@ios_base@std@@AAEXW4event@12@@Z */
2492 /* ?_Callfns@ios_base@std@@AEAAXW4event@12@@Z */
2493 DEFINE_THISCALL_WRAPPER(ios_base_Callfns, 8)
2494 void __thiscall ios_base_Callfns(ios_base *this, IOS_BASE_event event)
2496 IOS_BASE_fnarray *cur;
2498 TRACE("(%p %x)\n", this, event);
2500 for(cur=this->calls; cur; cur=cur->next)
2501 cur->event_handler(event, this, cur->index);
2504 /* ?_Tidy@ios_base@std@@AAAXXZ */
2505 /* ?_Tidy@ios_base@std@@AEAAXXZ */
2506 void CDECL ios_base_Tidy(ios_base *this)
2508 IOS_BASE_iosarray *arr_cur, *arr_next;
2509 IOS_BASE_fnarray *event_cur, *event_next;
2511 TRACE("(%p)\n", this);
2513 ios_base_Callfns(this, EVENT_erase_event);
2515 for(arr_cur=this->arr; arr_cur; arr_cur=arr_next) {
2516 arr_next = arr_cur->next;
2517 MSVCRT_operator_delete(arr_cur);
2521 for(event_cur=this->calls; event_cur; event_cur=event_next) {
2522 event_next = event_cur->next;
2523 MSVCRT_operator_delete(event_cur);
2528 /* ?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z */
2529 /* ?_Ios_base_dtor@ios_base@std@@CAXPEAV12@@Z */
2530 void CDECL ios_base_Ios_base_dtor(ios_base *obj)
2532 TRACE("(%p)\n", obj);
2534 locale_dtor(obj->loc);
2535 MSVCRT_operator_delete(obj->loc);
2540 /* ??1ios_base@std@@UAE@XZ */
2541 /* ??1ios_base@std@@UEAA@XZ */
2542 DEFINE_THISCALL_WRAPPER(ios_base_dtor, 4)
2543 void __thiscall ios_base_dtor(ios_base *this)
2545 ios_base_Ios_base_dtor(this);
2548 DEFINE_THISCALL_WRAPPER(MSVCP_ios_base_vector_dtor, 8)
2549 ios_base* __thiscall MSVCP_ios_base_vector_dtor(ios_base *this, unsigned int flags)
2551 TRACE("(%p %x)\n", this, flags);
2553 /* we have an array, with the number of elements stored before the first object */
2554 int i, *ptr = (int *)this-1;
2556 for(i=*ptr-1; i>=0; i--)
2557 ios_base_dtor(this+i);
2558 MSVCRT_operator_delete(ptr);
2560 ios_base_dtor(this);
2562 MSVCRT_operator_delete(this);
2568 DEFINE_THISCALL_WRAPPER(MSVCP_iosb_vector_dtor, 8)
2569 void* __thiscall MSVCP_iosb_vector_dtor(void *this, unsigned int flags)
2571 TRACE("(%p %x)\n", this, flags);
2573 int *ptr = (int *)this-1;
2574 MSVCRT_operator_delete(ptr);
2577 MSVCRT_operator_delete(this);
2583 /* ?_Findarr@ios_base@std@@AAEAAU_Iosarray@12@H@Z */
2584 /* ?_Findarr@ios_base@std@@AEAAAEAU_Iosarray@12@H@Z */
2585 DEFINE_THISCALL_WRAPPER(ios_base_Findarr, 8)
2586 IOS_BASE_iosarray* __thiscall ios_base_Findarr(ios_base *this, int index)
2588 IOS_BASE_iosarray *p;
2590 TRACE("(%p %d)\n", this, index);
2592 for(p=this->arr; p; p=p->next) {
2593 if(p->index == index)
2597 for(p=this->arr; p; p=p->next) {
2598 if(!p->long_val && !p->ptr_val) {
2604 p = MSVCRT_operator_new(sizeof(IOS_BASE_iosarray));
2605 p->next = this->arr;
2613 /* ?iword@ios_base@std@@QAEAAJH@Z */
2614 /* ?iword@ios_base@std@@QEAAAEAJH@Z */
2615 DEFINE_THISCALL_WRAPPER(ios_base_iword, 8)
2616 LONG* __thiscall ios_base_iword(ios_base *this, int index)
2618 TRACE("(%p %d)\n", this, index);
2619 return &ios_base_Findarr(this, index)->long_val;
2622 /* ?pword@ios_base@std@@QAEAAPAXH@Z */
2623 /* ?pword@ios_base@std@@QEAAAEAPEAXH@Z */
2624 DEFINE_THISCALL_WRAPPER(ios_base_pword, 8)
2625 void** __thiscall ios_base_pword(ios_base *this, int index)
2627 TRACE("(%p %d)\n", this, index);
2628 return &ios_base_Findarr(this, index)->ptr_val;
2631 /* ?register_callback@ios_base@std@@QAEXP6AXW4event@12@AAV12@H@ZH@Z */
2632 /* ?register_callback@ios_base@std@@QEAAXP6AXW4event@12@AEAV12@H@ZH@Z */
2633 DEFINE_THISCALL_WRAPPER(ios_base_register_callback, 12)
2634 void __thiscall ios_base_register_callback(ios_base *this, IOS_BASE_event_callback callback, int index)
2636 IOS_BASE_fnarray *event;
2638 TRACE("(%p %p %d)\n", this, callback, index);
2640 event = MSVCRT_operator_new(sizeof(IOS_BASE_fnarray));
2641 event->next = this->calls;
2642 event->index = index;
2643 event->event_handler = callback;
2644 this->calls = event;
2647 /* ?clear@ios_base@std@@QAEXH_N@Z */
2648 /* ?clear@ios_base@std@@QEAAXH_N@Z */
2649 DEFINE_THISCALL_WRAPPER(ios_base_clear_reraise, 12)
2650 void __thiscall ios_base_clear_reraise(ios_base *this, IOSB_iostate state, MSVCP_bool reraise)
2652 TRACE("(%p %x %x)\n", this, state, reraise);
2654 this->state = state & IOSTATE_mask;
2655 if(!(this->state & this->except))
2659 throw_exception(EXCEPTION_RERAISE, NULL);
2660 else if(this->state & this->except & IOSTATE_eofbit)
2661 throw_exception(EXCEPTION_FAILURE, "eofbit is set");
2662 else if(this->state & this->except & IOSTATE_failbit)
2663 throw_exception(EXCEPTION_FAILURE, "failbit is set");
2664 else if(this->state & this->except & IOSTATE_badbit)
2665 throw_exception(EXCEPTION_FAILURE, "badbit is set");
2666 else if(this->state & this->except & IOSTATE__Hardfail)
2667 throw_exception(EXCEPTION_FAILURE, "_Hardfail is set");
2670 /* ?clear@ios_base@std@@QAEXH@Z */
2671 /* ?clear@ios_base@std@@QEAAXH@Z */
2672 DEFINE_THISCALL_WRAPPER(ios_base_clear, 8)
2673 void __thiscall ios_base_clear(ios_base *this, IOSB_iostate state)
2675 ios_base_clear_reraise(this, state, FALSE);
2678 /* ?clear@ios_base@std@@QAEXI@Z */
2679 /* ?clear@ios_base@std@@QEAAXI@Z */
2680 DEFINE_THISCALL_WRAPPER(ios_base_clear_unsigned, 8)
2681 void __thiscall ios_base_clear_unsigned(ios_base *this, unsigned int state)
2683 ios_base_clear_reraise(this, (IOSB_iostate)state, FALSE);
2686 /* ?exceptions@ios_base@std@@QAEXH@Z */
2687 /* ?exceptions@ios_base@std@@QEAAXH@Z */
2688 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_set, 8)
2689 void __thiscall ios_base_exceptions_set(ios_base *this, IOSB_iostate state)
2691 TRACE("(%p %x)\n", this, state);
2692 this->except = state & IOSTATE_mask;
2693 ios_base_clear(this, this->state);
2696 /* ?exceptions@ios_base@std@@QAEXI@Z */
2697 /* ?exceptions@ios_base@std@@QEAAXI@Z */
2698 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_set_unsigned, 8)
2699 void __thiscall ios_base_exceptions_set_unsigned(ios_base *this, unsigned int state)
2701 TRACE("(%p %x)\n", this, state);
2702 ios_base_exceptions_set(this, state);
2705 /* ?exceptions@ios_base@std@@QBEHXZ */
2706 /* ?exceptions@ios_base@std@@QEBAHXZ */
2707 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_get, 4)
2708 IOSB_iostate __thiscall ios_base_exceptions_get(ios_base *this)
2710 TRACE("(%p)\n", this);
2711 return this->except;
2714 /* ?copyfmt@ios_base@std@@QAEAAV12@ABV12@@Z */
2715 /* ?copyfmt@ios_base@std@@QEAAAEAV12@AEBV12@@Z */
2716 DEFINE_THISCALL_WRAPPER(ios_base_copyfmt, 8)
2717 ios_base* __thiscall ios_base_copyfmt(ios_base *this, const ios_base *rhs)
2719 TRACE("(%p %p)\n", this, rhs);
2722 IOS_BASE_iosarray *arr_cur;
2723 IOS_BASE_fnarray *event_cur;
2725 ios_base_Tidy(this);
2727 for(arr_cur=rhs->arr; arr_cur; arr_cur=arr_cur->next) {
2728 if(arr_cur->long_val)
2729 *ios_base_iword(this, arr_cur->index) = arr_cur->long_val;
2730 if(arr_cur->ptr_val)
2731 *ios_base_pword(this, arr_cur->index) = arr_cur->ptr_val;
2733 this->stdstr = rhs->stdstr;
2734 this->fmtfl = rhs->fmtfl;
2735 this->prec = rhs->prec;
2736 this->wide = rhs->wide;
2737 locale_operator_assign(this->loc, rhs->loc);
2739 for(event_cur=rhs->calls; event_cur; event_cur=event_cur->next)
2740 ios_base_register_callback(this, event_cur->event_handler, event_cur->index);
2742 ios_base_Callfns(this, EVENT_copyfmt_event);
2743 ios_base_exceptions_set(this, rhs->except);
2749 /* ??4ios_base@std@@QAEAAV01@ABV01@@Z */
2750 /* ??4ios_base@std@@QEAAAEAV01@AEBV01@@Z */
2751 DEFINE_THISCALL_WRAPPER(ios_base_assign, 8)
2752 ios_base* __thiscall ios_base_assign(ios_base *this, const ios_base *right)
2754 TRACE("(%p %p)\n", this, right);
2757 this->state = right->state;
2758 ios_base_copyfmt(this, right);
2764 /* ?fail@ios_base@std@@QBE_NXZ */
2765 /* ?fail@ios_base@std@@QEBA_NXZ */
2766 DEFINE_THISCALL_WRAPPER(ios_base_fail, 4)
2767 MSVCP_bool __thiscall ios_base_fail(const ios_base *this)
2769 TRACE("(%p)\n", this);
2770 return (this->state & (IOSTATE_failbit|IOSTATE_badbit)) != 0;
2773 /* ??7ios_base@std@@QBE_NXZ */
2774 /* ??7ios_base@std@@QEBA_NXZ */
2775 DEFINE_THISCALL_WRAPPER(ios_base_op_succ, 4)
2776 MSVCP_bool __thiscall ios_base_op_succ(const ios_base *this)
2778 TRACE("(%p)\n", this);
2779 return ios_base_fail(this);
2782 /* ??Bios_base@std@@QBEPAXXZ */
2783 /* ??Bios_base@std@@QEBAPEAXXZ */
2784 DEFINE_THISCALL_WRAPPER(ios_base_op_fail, 4)
2785 void* __thiscall ios_base_op_fail(const ios_base *this)
2787 TRACE("(%p)\n", this);
2788 return ios_base_fail(this) ? NULL : (void*)this;
2791 /* ?_Addstd@ios_base@std@@SAXPAV12@@Z */
2792 /* ?_Addstd@ios_base@std@@SAXPEAV12@@Z */
2793 void CDECL ios_base_Addstd(ios_base *add)
2795 FIXME("(%p) stub\n", add);
2798 /* ?_Index_func@ios_base@std@@CAAAHXZ */
2799 /* ?_Index_func@ios_base@std@@CAAEAHXZ */
2800 int* CDECL ios_base_Index_func(void)
2803 return &ios_base_Index;
2806 /* ?_Init@ios_base@std@@IAEXXZ */
2807 /* ?_Init@ios_base@std@@IEAAXXZ */
2808 DEFINE_THISCALL_WRAPPER(ios_base_Init, 4)
2809 void __thiscall ios_base_Init(ios_base *this)
2811 TRACE("(%p)\n", this);
2814 this->state = this->except = IOSTATE_goodbit;
2815 this->fmtfl = FMTFLAG_skipws | FMTFLAG_dec;
2820 this->loc = MSVCRT_operator_new(sizeof(locale));
2821 locale_ctor(this->loc);
2824 /* ?_Sync_func@ios_base@std@@CAAA_NXZ */
2825 /* ?_Sync_func@ios_base@std@@CAAEA_NXZ */
2826 MSVCP_bool* CDECL ios_base_Sync_func(void)
2829 return &ios_base_Sync;
2832 /* ?bad@ios_base@std@@QBE_NXZ */
2833 /* ?bad@ios_base@std@@QEBA_NXZ */
2834 DEFINE_THISCALL_WRAPPER(ios_base_bad, 4)
2835 MSVCP_bool __thiscall ios_base_bad(const ios_base *this)
2837 TRACE("(%p)\n", this);
2838 return (this->state & IOSTATE_badbit) != 0;
2841 /* ?eof@ios_base@std@@QBE_NXZ */
2842 /* ?eof@ios_base@std@@QEBA_NXZ */
2843 DEFINE_THISCALL_WRAPPER(ios_base_eof, 4)
2844 MSVCP_bool __thiscall ios_base_eof(const ios_base *this)
2846 TRACE("(%p)\n", this);
2847 return (this->state & IOSTATE_eofbit) != 0;
2850 /* ?flags@ios_base@std@@QAEHH@Z */
2851 /* ?flags@ios_base@std@@QEAAHH@Z */
2852 DEFINE_THISCALL_WRAPPER(ios_base_flags_set, 8)
2853 IOSB_fmtflags __thiscall ios_base_flags_set(ios_base *this, IOSB_fmtflags flags)
2855 IOSB_fmtflags ret = this->fmtfl;
2857 TRACE("(%p %x)\n", this, flags);
2859 this->fmtfl = flags & FMTFLAG_mask;
2863 /* ?flags@ios_base@std@@QBEHXZ */
2864 /* ?flags@ios_base@std@@QEBAHXZ */
2865 DEFINE_THISCALL_WRAPPER(ios_base_flags_get, 4)
2866 IOSB_fmtflags __thiscall ios_base_flags_get(const ios_base *this)
2868 TRACE("(%p)\n", this);
2872 /* ?getloc@ios_base@std@@QBE?AVlocale@2@XZ */
2873 /* ?getloc@ios_base@std@@QEBA?AVlocale@2@XZ */
2874 DEFINE_THISCALL_WRAPPER(ios_base_getloc, 8)
2875 locale* __thiscall ios_base_getloc(const ios_base *this, locale *ret)
2877 TRACE("(%p)\n", this);
2878 return locale_copy_ctor(ret, this->loc);
2881 /* ?good@ios_base@std@@QBE_NXZ */
2882 /* ?good@ios_base@std@@QEBA_NXZ */
2883 DEFINE_THISCALL_WRAPPER(ios_base_good, 4)
2884 MSVCP_bool __thiscall ios_base_good(const ios_base *this)
2886 TRACE("(%p)\n", this);
2887 return this->state == IOSTATE_goodbit;
2890 /* ?imbue@ios_base@std@@QAE?AVlocale@2@ABV32@@Z */
2891 /* ?imbue@ios_base@std@@QEAA?AVlocale@2@AEBV32@@Z */
2892 DEFINE_THISCALL_WRAPPER(ios_base_imbue, 12)
2893 locale* __thiscall ios_base_imbue(ios_base *this, locale *ret, const locale *loc)
2895 TRACE("(%p %p)\n", this, loc);
2897 locale_copy_ctor(this->loc, loc);
2901 /* ?precision@ios_base@std@@QAEHH@Z */
2902 /* ?precision@ios_base@std@@QEAA_J_J@Z */
2903 DEFINE_THISCALL_WRAPPER(ios_base_precision_set, 8)
2904 streamsize __thiscall ios_base_precision_set(ios_base *this, streamsize precision)
2906 streamsize ret = this->prec;
2908 TRACE("(%p %ld)\n", this, precision);
2910 this->prec = precision;
2914 /* ?precision@ios_base@std@@QBEHXZ */
2915 /* ?precision@ios_base@std@@QEBA_JXZ */
2916 DEFINE_THISCALL_WRAPPER(ios_base_precision_get, 4)
2917 streamsize __thiscall ios_base_precision_get(const ios_base *this)
2919 TRACE("(%p)\n", this);
2923 /* ?rdstate@ios_base@std@@QBEHXZ */
2924 /* ?rdstate@ios_base@std@@QEBAHXZ */
2925 DEFINE_THISCALL_WRAPPER(ios_base_rdstate, 4)
2926 IOSB_iostate __thiscall ios_base_rdstate(const ios_base *this)
2928 TRACE("(%p)\n", this);
2932 /* ?setf@ios_base@std@@QAEHHH@Z */
2933 /* ?setf@ios_base@std@@QEAAHHH@Z */
2934 DEFINE_THISCALL_WRAPPER(ios_base_setf_mask, 12)
2935 IOSB_fmtflags __thiscall ios_base_setf_mask(ios_base *this, IOSB_fmtflags flags, IOSB_fmtflags mask)
2937 IOSB_fmtflags ret = this->fmtfl;
2939 TRACE("(%p %x %x)\n", this, flags, mask);
2941 this->fmtfl = (this->fmtfl & (~mask)) | (flags & mask & FMTFLAG_mask);
2945 /* ?setf@ios_base@std@@QAEHH@Z */
2946 /* ?setf@ios_base@std@@QEAAHH@Z */
2947 DEFINE_THISCALL_WRAPPER(ios_base_setf, 8)
2948 IOSB_fmtflags __thiscall ios_base_setf(ios_base *this, IOSB_fmtflags flags)
2950 return ios_base_setf_mask(this, flags, ~0);
2953 /* ?setstate@ios_base@std@@QAEXH_N@Z */
2954 /* ?setstate@ios_base@std@@QEAAXH_N@Z */
2955 DEFINE_THISCALL_WRAPPER(ios_base_setstate_reraise, 12)
2956 void __thiscall ios_base_setstate_reraise(ios_base *this, IOSB_iostate state, MSVCP_bool reraise)
2958 TRACE("(%p %x %x)\n", this, state, reraise);
2960 if(state != IOSTATE_goodbit)
2961 ios_base_clear_reraise(this, this->state | state, reraise);
2964 /* ?setstate@ios_base@std@@QAEXH@Z */
2965 /* ?setstate@ios_base@std@@QEAAXH@Z */
2966 DEFINE_THISCALL_WRAPPER(ios_base_setstate, 8)
2967 void __thiscall ios_base_setstate(ios_base *this, IOSB_iostate state)
2969 ios_base_setstate_reraise(this, state, FALSE);
2972 /* ?setstate@ios_base@std@@QAEXI@Z */
2973 /* ?setstate@ios_base@std@@QEAAXI@Z */
2974 DEFINE_THISCALL_WRAPPER(ios_base_setstate_unsigned, 8)
2975 void __thiscall ios_base_setstate_unsigned(ios_base *this, unsigned int state)
2977 ios_base_setstate_reraise(this, (IOSB_iostate)state, FALSE);
2980 /* ?sync_with_stdio@ios_base@std@@SA_N_N@Z */
2981 MSVCP_bool CDECL ios_base_sync_with_stdio(MSVCP_bool sync)
2986 TRACE("(%x)\n", sync);
2988 _Lockit_ctor_locktype(&lock, _LOCK_STREAM);
2989 ret = ios_base_Sync;
2990 ios_base_Sync = sync;
2991 _Lockit_dtor(&lock);
2995 /* ?unsetf@ios_base@std@@QAEXH@Z */
2996 /* ?unsetf@ios_base@std@@QEAAXH@Z */
2997 DEFINE_THISCALL_WRAPPER(ios_base_unsetf, 8)
2998 void __thiscall ios_base_unsetf(ios_base *this, IOSB_fmtflags flags)
3000 TRACE("(%p %x)\n", this, flags);
3001 this->fmtfl &= ~flags;
3004 /* ?width@ios_base@std@@QAEHH@Z */
3005 /* ?width@ios_base@std@@QEAA_J_J@Z */
3006 DEFINE_THISCALL_WRAPPER(ios_base_width_set, 8)
3007 streamsize __thiscall ios_base_width_set(ios_base *this, streamsize width)
3009 streamsize ret = this->wide;
3011 TRACE("(%p %ld)\n", this, width);
3017 /* ?width@ios_base@std@@QBEHXZ */
3018 /* ?width@ios_base@std@@QEBA_JXZ */
3019 DEFINE_THISCALL_WRAPPER(ios_base_width_get, 4)
3020 streamsize __thiscall ios_base_width_get(ios_base *this)
3022 TRACE("(%p)\n", this);
3026 /* ?xalloc@ios_base@std@@SAHXZ */
3027 int CDECL ios_base_xalloc(void)
3034 _Lockit_ctor_locktype(&lock, _LOCK_STREAM);
3035 ret = ios_base_Index++;
3036 _Lockit_dtor(&lock);
3040 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IAE@XZ */
3041 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IEAA@XZ */
3042 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor, 4)
3043 basic_ios_char* __thiscall basic_ios_char_ctor(basic_ios_char *this)
3045 TRACE("(%p)\n", this);
3047 ios_base_ctor(&this->base);
3048 this->base.vtable = &MSVCP_basic_ios_char_vtable;
3052 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IAEXPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
3053 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
3054 DEFINE_THISCALL_WRAPPER(basic_ios_char_init, 12)
3055 void __thiscall basic_ios_char_init(basic_ios_char *this, basic_streambuf_char *streambuf, MSVCP_bool isstd)
3057 TRACE("(%p %p %x)\n", this, streambuf, isstd);
3058 ios_base_Init(&this->base);
3059 this->strbuf = streambuf;
3060 this->stream = NULL;
3064 ios_base_setstate(&this->base, IOSTATE_badbit);
3067 FIXME("standard streams not handled yet\n");
3070 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
3071 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
3072 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor_streambuf, 8)
3073 basic_ios_char* __thiscall basic_ios_char_ctor_streambuf(basic_ios_char *this, basic_streambuf_char *strbuf)
3075 TRACE("(%p %p)\n", this, strbuf);
3077 basic_ios_char_ctor(this);
3078 basic_ios_char_init(this, strbuf, FALSE);
3082 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UAE@XZ */
3083 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UEAA@XZ */
3084 DEFINE_THISCALL_WRAPPER(basic_ios_char_dtor, 4)
3085 void __thiscall basic_ios_char_dtor(basic_ios_char *this)
3087 TRACE("(%p)\n", this);
3088 ios_base_dtor(&this->base);
3091 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ios_char_vector_dtor, 8)
3092 basic_ios_char* __thiscall MSVCP_basic_ios_char_vector_dtor(basic_ios_char *this, unsigned int flags)
3094 TRACE("(%p %x)\n", this, flags);
3096 /* we have an array, with the number of elements stored before the first object */
3097 int i, *ptr = (int *)this-1;
3099 for(i=*ptr-1; i>=0; i--)
3100 basic_ios_char_dtor(this+i);
3101 MSVCRT_operator_delete(ptr);
3103 basic_ios_char_dtor(this);
3105 MSVCRT_operator_delete(this);
3111 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
3112 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
3113 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear_reraise, 12)
3114 void __thiscall basic_ios_char_clear_reraise(basic_ios_char *this, IOSB_iostate state, MSVCP_bool reraise)
3116 TRACE("(%p %x %x)\n", this, state, reraise);
3117 ios_base_clear_reraise(&this->base, state | (this->strbuf ? IOSTATE_goodbit : IOSTATE_badbit), reraise);
3120 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
3121 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
3122 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear, 8)
3123 void __thiscall basic_ios_char_clear(basic_ios_char *this, unsigned int state)
3125 basic_ios_char_clear_reraise(this, (IOSB_iostate)state, FALSE);
3128 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEAAV12@ABV12@@Z */
3129 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEBV12@@Z */
3130 DEFINE_THISCALL_WRAPPER(basic_ios_char_copyfmt, 8)
3131 basic_ios_char* __thiscall basic_ios_char_copyfmt(basic_ios_char *this, basic_ios_char *copy)
3133 TRACE("(%p %p)\n", this, copy);
3137 this->stream = copy->stream;
3138 this->fillch = copy->fillch;
3139 ios_base_copyfmt(&this->base, ©->base);
3143 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEDD@Z */
3144 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAADD@Z */
3145 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_set, 8)
3146 char __thiscall basic_ios_char_fill_set(basic_ios_char *this, char fill)
3148 char ret = this->fillch;
3150 TRACE("(%p %c)\n", this, fill);
3152 this->fillch = fill;
3156 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDXZ */
3157 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADXZ */
3158 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_get, 4)
3159 char __thiscall basic_ios_char_fill_get(basic_ios_char *this)
3161 TRACE("(%p)\n", this);
3162 return this->fillch;
3165 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
3166 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
3167 DEFINE_THISCALL_WRAPPER(basic_ios_char_imbue, 12)
3168 locale *__thiscall basic_ios_char_imbue(basic_ios_char *this, locale *ret, const locale *loc)
3170 TRACE("(%p %p %p)\n", this, ret, loc);
3173 return basic_streambuf_char_pubimbue(this->strbuf, ret, loc);
3175 locale_copy_ctor(ret, loc);
3179 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDDD@Z */
3180 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADDD@Z */
3181 DEFINE_THISCALL_WRAPPER(basic_ios_char_narrow, 12)
3182 char __thiscall basic_ios_char_narrow(basic_ios_char *this, char ch, char def)
3184 FIXME("(%p %c %c) stub\n", this, ch, def);
3188 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PAV32@@Z */
3189 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAV32@@Z */
3190 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_set, 8)
3191 basic_streambuf_char* __thiscall basic_ios_char_rdbuf_set(basic_ios_char *this, basic_streambuf_char *streambuf)
3193 basic_streambuf_char *ret = this->strbuf;
3195 TRACE("(%p %p)\n", this, streambuf);
3197 this->strbuf = streambuf;
3198 basic_ios_char_clear(this, IOSTATE_goodbit);
3202 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
3203 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
3204 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_get, 4)
3205 basic_streambuf_char* __thiscall basic_ios_char_rdbuf_get(const basic_ios_char *this)
3207 TRACE("(%p)\n", this);
3208 return this->strbuf;
3211 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
3212 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
3213 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate_reraise, 12)
3214 void __thiscall basic_ios_char_setstate_reraise(basic_ios_char *this, IOSB_iostate state, MSVCP_bool reraise)
3216 TRACE("(%p %x %x)\n", this, state, reraise);
3218 if(state != IOSTATE_goodbit)
3219 basic_ios_char_clear_reraise(this, this->base.state | state, reraise);
3222 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
3223 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
3224 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate, 8)
3225 void __thiscall basic_ios_char_setstate(basic_ios_char *this, unsigned int state)
3227 basic_ios_char_setstate_reraise(this, (IOSB_iostate)state, FALSE);
3230 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@PAV32@@Z */
3231 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@PEAV32@@Z */
3232 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_set, 8)
3233 basic_ostream_char* __thiscall basic_ios_char_tie_set(basic_ios_char *this, basic_ostream_char *ostream)
3235 basic_ostream_char *ret = this->stream;
3237 TRACE("(%p %p)\n", this, ostream);
3239 this->stream = ostream;
3243 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
3244 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
3245 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_get, 4)
3246 basic_ostream_char* __thiscall basic_ios_char_tie_get(const basic_ios_char *this)
3248 TRACE("(%p)\n", this);
3249 return this->stream;
3252 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDD@Z */
3253 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADD@Z */
3254 DEFINE_THISCALL_WRAPPER(basic_ios_char_widen, 8)
3255 char __thiscall basic_ios_char_widen(basic_ios_char *this, char ch)
3257 FIXME("(%p %c) stub\n", this, ch);
3262 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAE@XZ */
3263 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */
3264 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_ctor, 4)
3265 basic_ios_wchar* __thiscall basic_ios_wchar_ctor(basic_ios_wchar *this)
3267 TRACE("(%p)\n", this);
3269 ios_base_ctor(&this->base);
3270 this->base.vtable = &MSVCP_basic_ios_wchar_vtable;
3274 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IAE@XZ */
3275 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IEAA@XZ */
3276 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor, 4)
3277 basic_ios_wchar* __thiscall basic_ios_short_ctor(basic_ios_wchar *this)
3279 basic_ios_wchar_ctor(this);
3280 this->base.vtable = &MSVCP_basic_ios_short_vtable;
3284 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAEXPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
3285 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAAXPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
3286 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IAEXPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
3287 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IEAAXPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
3288 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_init, 12)
3289 void __thiscall basic_ios_wchar_init(basic_ios_wchar *this, basic_streambuf_wchar *streambuf, MSVCP_bool isstd)
3291 TRACE("(%p %p %x)\n", this, streambuf, isstd);
3292 ios_base_Init(&this->base);
3293 this->strbuf = streambuf;
3294 this->stream = NULL;
3298 ios_base_setstate(&this->base, IOSTATE_badbit);
3301 FIXME("standard streams not handled yet\n");
3304 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
3305 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
3306 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_ctor_streambuf, 8)
3307 basic_ios_wchar* __thiscall basic_ios_wchar_ctor_streambuf(basic_ios_wchar *this, basic_streambuf_wchar *strbuf)
3309 TRACE("(%p %p)\n", this, strbuf);
3311 basic_ios_wchar_ctor(this);
3312 basic_ios_wchar_init(this, strbuf, FALSE);
3316 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
3317 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
3318 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor_streambuf, 8)
3319 basic_ios_wchar* __thiscall basic_ios_short_ctor_streambuf(basic_ios_wchar *this, basic_streambuf_wchar *strbuf)
3321 basic_ios_wchar_ctor_streambuf(this, strbuf);
3322 this->base.vtable = &MSVCP_basic_ios_short_vtable;
3326 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
3327 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
3328 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UAE@XZ */
3329 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UEAA@XZ */
3330 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_dtor, 4)
3331 void __thiscall basic_ios_wchar_dtor(basic_ios_wchar *this)
3333 TRACE("(%p)\n", this);
3334 ios_base_dtor(&this->base);
3337 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ios_wchar_vector_dtor, 8)
3338 basic_ios_wchar* __thiscall MSVCP_basic_ios_wchar_vector_dtor(basic_ios_wchar *this, unsigned int flags)
3340 TRACE("(%p %x)\n", this, flags);
3342 /* we have an array, with the number of elements stored before the first object */
3343 int i, *ptr = (int *)this-1;
3345 for(i=*ptr-1; i>=0; i--)
3346 basic_ios_wchar_dtor(this+i);
3347 MSVCRT_operator_delete(ptr);
3349 basic_ios_wchar_dtor(this);
3351 MSVCRT_operator_delete(this);
3357 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ios_short_vector_dtor, 8)
3358 basic_ios_wchar* __thiscall MSVCP_basic_ios_short_vector_dtor(basic_ios_wchar *this, unsigned int flags)
3360 return MSVCP_basic_ios_wchar_vector_dtor(this, flags);
3363 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
3364 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
3365 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
3366 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
3367 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_clear_reraise, 12)
3368 void __thiscall basic_ios_wchar_clear_reraise(basic_ios_wchar *this, IOSB_iostate state, MSVCP_bool reraise)
3370 TRACE("(%p %x %x)\n", this, state, reraise);
3371 ios_base_clear_reraise(&this->base, state | (this->strbuf ? IOSTATE_goodbit : IOSTATE_badbit), reraise);
3374 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
3375 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
3376 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
3377 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
3378 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_clear, 8)
3379 void __thiscall basic_ios_wchar_clear(basic_ios_wchar *this, unsigned int state)
3381 basic_ios_wchar_clear_reraise(this, (IOSB_iostate)state, FALSE);
3384 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEAAV12@ABV12@@Z */
3385 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEBV12@@Z */
3386 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEAAV12@ABV12@@Z */
3387 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEBV12@@Z */
3388 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_copyfmt, 8)
3389 basic_ios_wchar* __thiscall basic_ios_wchar_copyfmt(basic_ios_wchar *this, basic_ios_wchar *copy)
3391 TRACE("(%p %p)\n", this, copy);
3395 this->stream = copy->stream;
3396 this->fillch = copy->fillch;
3397 ios_base_copyfmt(&this->base, ©->base);
3401 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE_W_W@Z */
3402 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA_W_W@Z */
3403 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEGG@Z */
3404 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
3405 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_set, 8)
3406 wchar_t __thiscall basic_ios_wchar_fill_set(basic_ios_wchar *this, wchar_t fill)
3408 wchar_t ret = this->fillch;
3410 TRACE("(%p %c)\n", this, fill);
3412 this->fillch = fill;
3416 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WXZ */
3417 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WXZ */
3418 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGXZ */
3419 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGXZ */
3420 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_get, 4)
3421 wchar_t __thiscall basic_ios_wchar_fill_get(basic_ios_wchar *this)
3423 TRACE("(%p)\n", this);
3424 return this->fillch;
3427 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
3428 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
3429 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
3430 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
3431 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_imbue, 12)
3432 locale *__thiscall basic_ios_wchar_imbue(basic_ios_wchar *this, locale *ret, const locale *loc)
3434 TRACE("(%p %p %p)\n", this, ret, loc);
3437 return basic_streambuf_wchar_pubimbue(this->strbuf, ret, loc);
3439 locale_copy_ctor(ret, loc);
3443 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBED_WD@Z */
3444 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAD_WD@Z */
3445 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEDGD@Z */
3446 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBADGD@Z */
3447 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_narrow, 12)
3448 char __thiscall basic_ios_wchar_narrow(basic_ios_wchar *this, wchar_t ch, char def)
3450 FIXME("(%p %c %c) stub\n", this, ch, def);
3454 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
3455 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
3456 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAV32@@Z */
3457 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAV32@@Z */
3458 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_set, 8)
3459 basic_streambuf_wchar* __thiscall basic_ios_wchar_rdbuf_set(basic_ios_wchar *this, basic_streambuf_wchar *streambuf)
3461 basic_streambuf_wchar *ret = this->strbuf;
3463 TRACE("(%p %p)\n", this, streambuf);
3465 this->strbuf = streambuf;
3466 basic_ios_wchar_clear(this, IOSTATE_goodbit);
3470 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
3471 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
3472 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
3473 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
3474 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_get, 4)
3475 basic_streambuf_wchar* __thiscall basic_ios_wchar_rdbuf_get(const basic_ios_wchar *this)
3477 TRACE("(%p)\n", this);
3478 return this->strbuf;
3481 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
3482 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
3483 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
3484 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
3485 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_setstate_reraise, 12)
3486 void __thiscall basic_ios_wchar_setstate_reraise(basic_ios_wchar *this, IOSB_iostate state, MSVCP_bool reraise)
3488 TRACE("(%p %x %x)\n", this, state, reraise);
3490 if(state != IOSTATE_goodbit)
3491 basic_ios_wchar_clear_reraise(this, this->base.state | state, reraise);
3494 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
3495 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
3496 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
3497 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
3498 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_setstate, 8)
3499 void __thiscall basic_ios_wchar_setstate(basic_ios_wchar *this, IOSB_iostate state)
3501 basic_ios_wchar_setstate_reraise(this, state, FALSE);
3504 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
3505 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
3506 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@PAV32@@Z */
3507 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@PEAV32@@Z */
3508 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_set, 8)
3509 basic_ostream_wchar* __thiscall basic_ios_wchar_tie_set(basic_ios_wchar *this, basic_ostream_wchar *ostream)
3511 basic_ostream_wchar *ret = this->stream;
3513 TRACE("(%p %p)\n", this, ostream);
3515 this->stream = ostream;
3519 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
3520 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
3521 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
3522 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
3523 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_get, 4)
3524 basic_ostream_wchar* __thiscall basic_ios_wchar_tie_get(const basic_ios_wchar *this)
3526 TRACE("(%p)\n", this);
3527 return this->stream;
3530 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WD@Z */
3531 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WD@Z */
3532 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGD@Z */
3533 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGD@Z */
3534 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_widen, 8)
3535 wchar_t __thiscall basic_ios_wchar_widen(basic_ios_wchar *this, char ch)
3537 FIXME("(%p %c)\n", this, ch);
3541 /* Caution: basic_ostream uses virtual inheritance.
3542 * All constructors have additional parameter that says if base class should be initialized.
3543 * Base class needs to be accessed using vbtable.
3545 static inline basic_ios_char* basic_ostream_char_get_basic_ios(basic_ostream_char *this)
3547 return (basic_ios_char*)((char*)this+this->vbtable[1]);
3550 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
3551 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
3552 DEFINE_THISCALL_WRAPPER(basic_ostream_char_ctor, 16)
3553 basic_ostream_char* __thiscall basic_ostream_char_ctor(basic_ostream_char *this,
3554 basic_streambuf_char *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
3556 basic_ios_char *base;
3558 TRACE("(%p %p %d %d)\n", this, strbuf, isstd, virt_init);
3561 this->vbtable = basic_ostream_char_vbtable;
3562 base = basic_ostream_char_get_basic_ios(this);
3563 basic_ios_char_ctor(base);
3565 base = basic_ostream_char_get_basic_ios(this);
3568 base->base.vtable = &MSVCP_basic_ostream_char_vtable;
3569 basic_ios_char_init(base, strbuf, isstd);
3573 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */
3574 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */
3575 DEFINE_THISCALL_WRAPPER(basic_ostream_char_ctor_uninitialized, 16)
3576 basic_ostream_char* __thiscall basic_ostream_char_ctor_uninitialized(basic_ostream_char *this,
3577 int uninitialized, MSVCP_bool addstd, MSVCP_bool virt_init)
3579 basic_ios_char *base;
3581 TRACE("(%p %d %x)\n", this, uninitialized, addstd);
3584 this->vbtable = basic_ostream_char_vbtable;
3585 base = basic_ostream_char_get_basic_ios(this);
3586 basic_ios_char_ctor(base);
3588 base = basic_ostream_char_get_basic_ios(this);
3591 base->base.vtable = &MSVCP_basic_ostream_char_vtable;
3593 ios_base_Addstd(&base->base);
3597 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
3598 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
3599 DEFINE_THISCALL_WRAPPER(basic_ostream_char_dtor, 4)
3600 void __thiscall basic_ostream_char_dtor(basic_ostream_char *this)
3602 /* don't destroy virtual base here */
3603 TRACE("(%p)\n", this);
3606 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
3607 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
3608 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vbase_dtor, 4)
3609 void __thiscall basic_ostream_char_vbase_dtor(basic_ostream_char *this)
3611 TRACE("(%p)\n", this);
3612 basic_ostream_char_dtor(this);
3613 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(this));
3616 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ostream_char_vector_dtor, 8)
3617 basic_ostream_char* __thiscall MSVCP_basic_ostream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
3619 basic_ostream_char *this = (basic_ostream_char *)((char*)base - basic_ostream_char_vbtable[1] + basic_ostream_char_vbtable[0]);
3621 TRACE("(%p %x)\n", this, flags);
3624 /* we have an array, with the number of elements stored before the first object */
3625 int i, *ptr = (int *)this-1;
3627 for(i=*ptr-1; i>=0; i--)
3628 basic_ostream_char_vbase_dtor(this+i);
3629 MSVCRT_operator_delete(ptr);
3631 basic_ostream_char_vbase_dtor(this);
3633 MSVCRT_operator_delete(this);
3639 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
3640 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
3641 DEFINE_THISCALL_WRAPPER(basic_ostream_char_flush, 4)
3642 basic_ostream_char* __thiscall basic_ostream_char_flush(basic_ostream_char *this)
3644 /* this function is not matching C++ specification */
3645 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
3647 TRACE("(%p)\n", this);
3649 if(basic_ios_char_rdbuf_get(base) && ios_base_good(&base->base)
3650 && basic_streambuf_char_pubsync(basic_ios_char_rdbuf_get(base))==-1)
3651 basic_ios_char_setstate(base, IOSTATE_badbit);
3655 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
3656 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
3657 DEFINE_THISCALL_WRAPPER(basic_ostream_char__Osfx, 4)
3658 void __thiscall basic_ostream_char__Osfx(basic_ostream_char *this)
3660 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
3662 TRACE("(%p)\n", this);
3664 if(base->base.fmtfl & FMTFLAG_unitbuf)
3665 basic_ostream_char_flush(this);
3668 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
3669 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
3670 DEFINE_THISCALL_WRAPPER(basic_ostream_char_osfx, 4)
3671 void __thiscall basic_ostream_char_osfx(basic_ostream_char *this)
3673 TRACE("(%p)\n", this);
3674 basic_ostream_char__Osfx(this);
3677 static BOOL basic_ostream_char_sentry_create(basic_ostream_char *ostr)
3679 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
3681 if(basic_ios_char_rdbuf_get(base))
3682 basic_streambuf_char__Lock(base->strbuf);
3684 if(ios_base_good(&base->base) && base->stream)
3685 basic_ostream_char_flush(base->stream);
3687 return ios_base_good(&base->base);
3690 static void basic_ostream_char_sentry_destroy(basic_ostream_char *ostr)
3692 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
3694 if(ios_base_good(&base->base) && !__uncaught_exception())
3695 basic_ostream_char_osfx(ostr);
3697 if(basic_ios_char_rdbuf_get(base))
3698 basic_streambuf_char__Unlock(base->strbuf);
3701 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE_NXZ */
3702 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA_NXZ */
3703 DEFINE_THISCALL_WRAPPER(basic_ostream_char_opfx, 4)
3704 MSVCP_bool __thiscall basic_ostream_char_opfx(basic_ostream_char *this)
3706 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
3708 TRACE("(%p)\n", this);
3710 if(ios_base_good(&base->base) && base->stream)
3711 basic_ostream_char_flush(base->stream);
3712 return ios_base_good(&base->base);
3715 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
3716 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
3717 DEFINE_THISCALL_WRAPPER(basic_ostream_char_put, 8)
3718 basic_ostream_char* __thiscall basic_ostream_char_put(basic_ostream_char *this, char ch)
3720 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
3722 TRACE("(%p %c)\n", this, ch);
3724 if(!basic_ostream_char_sentry_create(this)
3725 || basic_streambuf_char_sputc(base->strbuf, ch)==EOF) {
3726 basic_ostream_char_sentry_destroy(this);
3727 basic_ios_char_setstate(base, IOSTATE_badbit);
3731 basic_ostream_char_sentry_destroy(this);
3735 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@JH@Z */
3736 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
3737 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp, 12)
3738 basic_ostream_char* __thiscall basic_ostream_char_seekp(basic_ostream_char *this, streamoff off, int way)
3740 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
3742 TRACE("(%p %ld %d)\n", this, off, way);
3744 if(!ios_base_fail(&base->base)) {
3747 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base),
3748 &seek, off, way, OPENMODE_out);
3749 if(seek.off==0 && seek.pos==-1 && seek.state==0)
3750 basic_ios_char_setstate(base, IOSTATE_failbit);
3755 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
3756 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
3757 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp_fpos, 28)
3758 basic_ostream_char* __thiscall basic_ostream_char_seekp_fpos(basic_ostream_char *this, fpos_int pos)
3760 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
3762 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
3764 if(!ios_base_fail(&base->base)) {
3767 basic_streambuf_char_pubseekpos(basic_ios_char_rdbuf_get(base),
3768 &seek, pos, OPENMODE_out);
3769 if(seek.off==0 && seek.pos==-1 && seek.state==0)
3770 basic_ios_char_setstate(base, IOSTATE_failbit);
3775 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
3776 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
3777 DEFINE_THISCALL_WRAPPER(basic_ostream_char_tellp, 8)
3778 fpos_int* __thiscall basic_ostream_char_tellp(basic_ostream_char *this, fpos_int *ret)
3780 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
3782 TRACE("(%p)\n", this);
3784 if(!ios_base_fail(&base->base)) {
3785 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base),
3786 ret, 0, SEEKDIR_cur, OPENMODE_out);
3795 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@PBDH@Z */
3796 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEBD_J@Z */
3797 DEFINE_THISCALL_WRAPPER(basic_ostream_char_write, 12)
3798 basic_ostream_char* __thiscall basic_ostream_char_write(basic_ostream_char *this, const char *str, streamsize count)
3800 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
3802 TRACE("(%p %s %ld)\n", this, debugstr_a(str), count);
3804 if(!basic_ostream_char_sentry_create(this)
3805 || basic_streambuf_char_sputn(base->strbuf, str, count)!=count) {
3806 basic_ostream_char_sentry_destroy(this);
3807 basic_ios_char_setstate(base, IOSTATE_badbit);
3811 basic_ostream_char_sentry_destroy(this);
3815 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@F@Z */
3816 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@F@Z */
3817 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_short, 8)
3818 basic_ostream_char* __thiscall basic_ostream_char_print_short(basic_ostream_char *this, short val)
3820 FIXME("(%p %d) stub\n", this, val);
3824 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@G@Z */
3825 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@G@Z */
3826 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ushort, 8)
3827 basic_ostream_char* __thiscall basic_ostream_char_print_ushort(basic_ostream_char *this, unsigned short val)
3829 FIXME("(%p %d) stub\n", this, val);
3833 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z */
3834 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@H@Z */
3835 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int, 8)
3836 basic_ostream_char* __thiscall basic_ostream_char_print_int(basic_ostream_char *this, int val)
3838 FIXME("(%p %d) stub\n", this, val);
3842 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@I@Z */
3843 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@I@Z */
3844 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint, 8)
3845 basic_ostream_char* __thiscall basic_ostream_char_print_uint(basic_ostream_char *this, unsigned int val)
3847 FIXME("(%p %d) stub\n", this, val);
3851 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z */
3852 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@J@Z */
3853 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_long, 8)
3854 basic_ostream_char* __thiscall basic_ostream_char_print_long(basic_ostream_char *this, LONG val)
3856 FIXME("(%p %d) stub\n", this, val);
3860 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z */
3861 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@K@Z */
3862 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ulong, 8)
3863 basic_ostream_char* __thiscall basic_ostream_char_print_ulong(basic_ostream_char *this, ULONG val)
3865 FIXME("(%p %d) stub\n", this, val);
3869 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@M@Z */
3870 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@M@Z */
3871 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_float, 8)
3872 basic_ostream_char* __thiscall basic_ostream_char_print_float(basic_ostream_char *this, float val)
3874 FIXME("(%p %f) stub\n", this, val);
3878 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@N@Z */
3879 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@N@Z */
3880 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_double, 12)
3881 basic_ostream_char* __thiscall basic_ostream_char_print_double(basic_ostream_char *this, double val)
3883 FIXME("(%p %lf) stub\n", this, val);
3887 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
3888 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
3889 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_streambuf, 8)
3890 basic_ostream_char* __thiscall basic_ostream_char_print_streambuf(basic_ostream_char *this, basic_streambuf_char *val)
3892 FIXME("(%p %p) stub\n", this, val);
3896 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PBX@Z */
3897 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEBX@Z */
3898 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ptr, 8)
3899 basic_ostream_char* __thiscall basic_ostream_char_print_ptr(basic_ostream_char *this, const void *val)
3901 FIXME("(%p %p) stub\n", this, val);
3905 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_J@Z */
3906 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_J@Z */
3907 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int64, 12)
3908 basic_ostream_char* __thiscall basic_ostream_char_print_int64(basic_ostream_char *this, __int64 val)
3910 FIXME("(%p) stub\n", this);
3914 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_K@Z */
3915 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_K@Z */
3916 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint64, 12)
3917 basic_ostream_char* __thiscall basic_ostream_char_print_uint64(basic_ostream_char *this, unsigned __int64 val)
3919 FIXME("(%p) stub\n", this);
3923 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_N@Z */
3924 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_N@Z */
3925 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_bool, 8)
3926 basic_ostream_char* __thiscall basic_ostream_char_print_bool(basic_ostream_char *this, MSVCP_bool val)
3928 FIXME("(%p %x) stub\n", this, val);
3932 /* ?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
3933 /* ?endl@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
3934 basic_ostream_char* __cdecl basic_ostream_char_endl(basic_ostream_char *ostr)
3936 TRACE("(%p)\n", ostr);
3938 basic_ostream_char_put(ostr, '\n');
3939 basic_ostream_char_flush(ostr);
3943 /* Caution: basic_istream uses virtual inheritance. */
3944 static inline basic_ios_char* basic_istream_char_get_basic_ios(basic_istream_char *this)
3946 return (basic_ios_char*)((char*)this+this->vbtable[1]);
3949 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
3950 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
3951 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_init, 20)
3952 basic_istream_char* __thiscall basic_istream_char_ctor_init(basic_istream_char *this, basic_streambuf_char *strbuf, MSVCP_bool isstd, MSVCP_bool noinit, MSVCP_bool virt_init)
3954 basic_ios_char *base;
3956 TRACE("(%p %p %d %d %d)\n", this, strbuf, isstd, noinit, virt_init);
3959 this->vbtable = basic_istream_char_vbtable;
3960 base = basic_istream_char_get_basic_ios(this);
3961 basic_ios_char_ctor(base);
3963 base = basic_istream_char_get_basic_ios(this);
3966 base->base.vtable = &MSVCP_basic_istream_char_vtable;
3969 basic_ios_char_init(base, strbuf, isstd);
3973 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
3974 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
3975 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor, 16)
3976 basic_istream_char* __thiscall basic_istream_char_ctor(basic_istream_char *this, basic_streambuf_char *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
3978 return basic_istream_char_ctor_init(this, strbuf, isstd, FALSE, virt_init);
3981 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
3982 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
3983 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_uninitialized, 12)
3984 basic_istream_char* __thiscall basic_istream_char_ctor_uninitialized(basic_istream_char *this, int uninitialized, MSVCP_bool virt_init)
3986 basic_ios_char *base;
3988 TRACE("(%p %d %d)\n", this, uninitialized, virt_init);
3991 this->vbtable = basic_istream_char_vbtable;
3992 base = basic_istream_char_get_basic_ios(this);
3993 basic_ios_char_ctor(base);
3995 base = basic_istream_char_get_basic_ios(this);
3998 base->base.vtable = &MSVCP_basic_istream_char_vtable;
3999 ios_base_Addstd(&base->base);
4003 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UAE@XZ */
4004 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
4005 DEFINE_THISCALL_WRAPPER(basic_istream_char_dtor, 4)
4006 void __thiscall basic_istream_char_dtor(basic_istream_char *this)
4008 /* don't destroy virtual base here */
4009 TRACE("(%p)\n", this);
4012 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
4013 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
4014 DEFINE_THISCALL_WRAPPER(basic_istream_char_vbase_dtor, 4)
4015 void __thiscall basic_istream_char_vbase_dtor(basic_istream_char *this)
4017 TRACE("(%p)\n", this);
4018 basic_istream_char_dtor(this);
4019 basic_ios_char_dtor(basic_istream_char_get_basic_ios(this));
4022 DEFINE_THISCALL_WRAPPER(MSVCP_basic_istream_char_vector_dtor, 8)
4023 basic_istream_char* __thiscall MSVCP_basic_istream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
4025 basic_istream_char *this = (basic_istream_char *)((char*)base - basic_istream_char_vbtable[1] + basic_istream_char_vbtable[0]);
4027 TRACE("(%p %x)\n", this, flags);
4030 /* we have an array, with the number of elements stored before the first object */
4031 int i, *ptr = (int *)this-1;
4033 for(i=*ptr-1; i>=0; i--)
4034 basic_istream_char_vbase_dtor(this+i);
4035 MSVCRT_operator_delete(ptr);
4037 basic_istream_char_vbase_dtor(this);
4039 MSVCRT_operator_delete(this);
4045 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
4046 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
4047 DEFINE_THISCALL_WRAPPER(basic_istream_char__Ipfx, 8)
4048 MSVCP_bool __thiscall basic_istream_char__Ipfx(basic_istream_char *this, MSVCP_bool noskip)
4050 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
4052 TRACE("(%p %d)\n", this, noskip);
4054 if(!ios_base_good(&base->base)) {
4055 basic_ios_char_setstate(base, IOSTATE_failbit);
4059 if(basic_ios_char_tie_get(base))
4060 basic_ostream_char_flush(basic_ios_char_tie_get(base));
4062 if(!noskip && (ios_base_flags_get(&base->base) & FMTFLAG_skipws)) {
4063 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
4064 const ctype_char *ctype = ctype_char_use_facet(base->strbuf->loc);
4067 for(ch = basic_streambuf_char_sgetc(strbuf); ;
4068 ch = basic_streambuf_char_snextc(strbuf)) {
4070 basic_ios_char_setstate(base, IOSTATE_eofbit);
4074 if(!ctype_char_is_ch(ctype, _SPACE|_BLANK, ch))
4082 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
4083 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
4084 DEFINE_THISCALL_WRAPPER(basic_istream_char_ipfx, 8)
4085 MSVCP_bool __thiscall basic_istream_char_ipfx(basic_istream_char *this, MSVCP_bool noskip)
4087 return basic_istream_char__Ipfx(this, noskip);
4090 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
4091 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
4092 DEFINE_THISCALL_WRAPPER(basic_istream_char_isfx, 4)
4093 void __thiscall basic_istream_char_isfx(basic_istream_char *this)
4095 TRACE("(%p)\n", this);
4098 static BOOL basic_istream_char_sentry_create(basic_istream_char *istr, MSVCP_bool noskip)
4100 basic_ios_char *base = basic_istream_char_get_basic_ios(istr);
4102 if(basic_ios_char_rdbuf_get(base))
4103 basic_streambuf_char__Lock(base->strbuf);
4105 return basic_istream_char_ipfx(istr, noskip);
4108 static void basic_istream_char_sentry_destroy(basic_istream_char *istr)
4110 basic_ios_char *base = basic_istream_char_get_basic_ios(istr);
4112 if(basic_ios_char_rdbuf_get(base))
4113 basic_streambuf_char__Unlock(base->strbuf);
4116 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QBEHXZ */
4117 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QEBA_JXZ */
4118 DEFINE_THISCALL_WRAPPER(basic_istream_char_gcount, 4)
4119 int __thiscall basic_istream_char_gcount(const basic_istream_char *this)
4121 TRACE("(%p)\n", this);
4125 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
4126 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
4127 DEFINE_THISCALL_WRAPPER(basic_istream_char_get, 4)
4128 int __thiscall basic_istream_char_get(basic_istream_char *this)
4130 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
4133 TRACE("(%p)\n", this);
4137 if(!basic_istream_char_sentry_create(this, TRUE)) {
4138 basic_istream_char_sentry_destroy(this);
4142 ret = basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(base));
4143 basic_istream_char_sentry_destroy(this);
4145 basic_ios_char_setstate(base, IOSTATE_eofbit|IOSTATE_failbit);
4152 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAD@Z */
4153 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAD@Z */
4154 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_ch, 8)
4155 basic_istream_char* __thiscall basic_istream_char_get_ch(basic_istream_char *this, char *ch)
4159 TRACE("(%p %p)\n", this, ch);
4161 ret = basic_istream_char_get(this);
4167 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
4168 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
4169 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str_delim, 16)
4170 basic_istream_char* __thiscall basic_istream_char_get_str_delim(basic_istream_char *this, char *str, streamsize count, char delim)
4172 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
4175 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
4179 if(basic_istream_char_sentry_create(this, TRUE)) {
4180 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
4182 for(ch = basic_streambuf_char_sgetc(strbuf); count>1;
4183 ch = basic_streambuf_char_snextc(strbuf)) {
4184 if(ch==EOF || ch==delim)
4192 basic_istream_char_sentry_destroy(this);
4194 basic_ios_char_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
4195 (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
4201 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
4202 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
4203 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str, 12)
4204 basic_istream_char* __thiscall basic_istream_char_get_str(basic_istream_char *this, char *str, streamsize count)
4206 return basic_istream_char_get_str_delim(this, str, count, '\n');
4209 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
4210 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
4211 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf_delim, 12)
4212 basic_istream_char* __thiscall basic_istream_char_get_streambuf_delim(basic_istream_char *this, basic_streambuf_char *strbuf, char delim)
4214 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
4217 TRACE("(%p %p %c)\n", this, strbuf, delim);
4221 if(basic_istream_char_sentry_create(this, TRUE)) {
4222 basic_streambuf_char *strbuf_read = basic_ios_char_rdbuf_get(base);
4224 for(ch = basic_streambuf_char_sgetc(strbuf_read); ;
4225 ch = basic_streambuf_char_snextc(strbuf_read)) {
4226 if(ch==EOF || ch==delim)
4229 if(basic_streambuf_char_sputc(strbuf, ch) == EOF)
4234 basic_istream_char_sentry_destroy(this);
4236 basic_ios_char_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
4237 (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
4241 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
4242 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
4243 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf, 8)
4244 basic_istream_char* __thiscall basic_istream_char_get_streambuf(basic_istream_char *this, basic_streambuf_char *strbuf)
4246 return basic_istream_char_get_streambuf_delim(this, strbuf, '\n');
4249 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
4250 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
4251 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline_delim, 16)
4252 basic_istream_char* __thiscall basic_istream_char_getline_delim(basic_istream_char *this, char *str, streamsize count, char delim)
4254 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
4257 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
4261 if(basic_istream_char_sentry_create(this, TRUE) && count>0) {
4262 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
4265 ch = basic_streambuf_char_sbumpc(strbuf);
4267 if(ch==EOF || ch==delim)
4277 else if(ch != EOF) {
4278 ch = basic_streambuf_char_sgetc(strbuf);
4281 basic_streambuf_char__Gninc(strbuf);
4286 basic_istream_char_sentry_destroy(this);
4288 basic_ios_char_setstate(base, (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit) |
4289 (!this->count || (ch!=delim && ch!=EOF) ? IOSTATE_failbit : IOSTATE_goodbit));
4295 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
4296 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
4297 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline, 12)
4298 basic_istream_char* __thiscall basic_istream_char_getline(basic_istream_char *this, char *str, streamsize count)
4300 return basic_istream_char_getline_delim(this, str, count, '\n');
4303 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@HH@Z */
4304 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
4305 DEFINE_THISCALL_WRAPPER(basic_istream_char_ignore, 12)
4306 basic_istream_char* __thiscall basic_istream_char_ignore(basic_istream_char *this, streamsize count, int delim)
4308 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
4311 TRACE("(%p %ld %d)\n", this, count, delim);
4315 if(basic_istream_char_sentry_create(this, TRUE)) {
4316 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
4319 ch = basic_streambuf_char_sbumpc(strbuf);
4321 if(ch==EOF || ch==delim)
4325 if(count != INT_MAX)
4329 basic_istream_char_sentry_destroy(this);
4332 basic_ios_char_setstate(base, IOSTATE_eofbit);
4336 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
4337 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
4338 DEFINE_THISCALL_WRAPPER(basic_istream_char_peek, 4)
4339 int __thiscall basic_istream_char_peek(basic_istream_char *this)
4341 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
4344 TRACE("(%p)\n", this);
4348 if(basic_istream_char_sentry_create(this, TRUE))
4349 ret = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
4350 basic_istream_char_sentry_destroy(this);
4354 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADIH@Z */
4355 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_K_J@Z */
4356 DEFINE_THISCALL_WRAPPER(basic_istream_char__Read_s, 16)
4357 basic_istream_char* __thiscall basic_istream_char__Read_s(basic_istream_char *this, char *str, MSVCP_size_t size, streamsize count)
4359 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
4360 IOSB_iostate state = IOSTATE_goodbit;
4362 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
4364 if(basic_istream_char_sentry_create(this, TRUE)) {
4365 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
4367 this->count = basic_streambuf_char__Sgetn_s(strbuf, str, size, count);
4368 if(this->count != count)
4369 state |= IOSTATE_failbit | IOSTATE_eofbit;
4373 basic_istream_char_sentry_destroy(this);
4375 basic_ios_char_setstate(base, state);
4379 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
4380 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
4381 DEFINE_THISCALL_WRAPPER(basic_istream_char_read, 12)
4382 basic_istream_char* __thiscall basic_istream_char_read(basic_istream_char *this, char *str, streamsize count)
4384 return basic_istream_char__Read_s(this, str, count, count);
4387 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
4388 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
4389 DEFINE_THISCALL_WRAPPER(basic_istream_char__Readsome_s, 16)
4390 streamsize __thiscall basic_istream_char__Readsome_s(basic_istream_char *this, char *str, MSVCP_size_t size, streamsize count)
4392 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
4393 IOSB_iostate state = IOSTATE_goodbit;
4395 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
4399 if(basic_istream_char_sentry_create(this, TRUE)) {
4400 streamsize avail = basic_streambuf_char_in_avail(basic_ios_char_rdbuf_get(base));
4405 state |= IOSTATE_eofbit;
4407 basic_istream_char__Read_s(this, str, size, avail);
4409 state |= IOSTATE_failbit;
4411 basic_istream_char_sentry_destroy(this);
4413 basic_ios_char_setstate(base, state);
4417 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
4418 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
4419 DEFINE_THISCALL_WRAPPER(basic_istream_char_readsome, 12)
4420 streamsize __thiscall basic_istream_char_readsome(basic_istream_char *this, char *str, streamsize count)
4422 return basic_istream_char__Readsome_s(this, str, count, count);
4425 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
4426 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
4427 DEFINE_THISCALL_WRAPPER(basic_istream_char_putback, 8)
4428 basic_istream_char* __thiscall basic_istream_char_putback(basic_istream_char *this, char ch)
4430 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
4431 IOSB_iostate state = IOSTATE_goodbit;
4433 TRACE("(%p %c)\n", this, ch);
4437 if(basic_istream_char_sentry_create(this, TRUE)) {
4438 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
4440 if(!ios_base_good(&base->base))
4441 state |= IOSTATE_failbit;
4442 else if(!strbuf || basic_streambuf_char_sputbackc(strbuf, ch)==EOF)
4443 state |= IOSTATE_badbit;
4445 basic_istream_char_sentry_destroy(this);
4447 basic_ios_char_setstate(base, state);
4451 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
4452 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
4453 DEFINE_THISCALL_WRAPPER(basic_istream_char_unget, 4)
4454 basic_istream_char* __thiscall basic_istream_char_unget(basic_istream_char *this)
4456 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
4457 IOSB_iostate state = IOSTATE_goodbit;
4459 TRACE("(%p)\n", this);
4463 if(basic_istream_char_sentry_create(this, TRUE)) {
4464 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
4466 if(!ios_base_good(&base->base))
4467 state |= IOSTATE_failbit;
4468 else if(!strbuf || basic_streambuf_char_sungetc(strbuf)==EOF)
4469 state |= IOSTATE_badbit;
4471 basic_istream_char_sentry_destroy(this);
4473 basic_ios_char_setstate(base, state);
4477 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
4478 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
4479 DEFINE_THISCALL_WRAPPER(basic_istream_char_sync, 4)
4480 int __thiscall basic_istream_char_sync(basic_istream_char *this)
4482 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
4483 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
4485 TRACE("(%p)\n", this);
4490 if(basic_istream_char_sentry_create(this, TRUE)) {
4491 if(basic_streambuf_char_pubsync(strbuf) != -1) {
4492 basic_istream_char_sentry_destroy(this);
4496 basic_istream_char_sentry_destroy(this);
4498 basic_ios_char_setstate(base, IOSTATE_badbit);
4502 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
4503 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
4504 DEFINE_THISCALL_WRAPPER(basic_istream_char_tellg, 8)
4505 fpos_int* __thiscall basic_istream_char_tellg(basic_istream_char *this, fpos_int *ret)
4507 TRACE("(%p %p)\n", this, ret);
4509 if(basic_istream_char_sentry_create(this, TRUE)) {
4510 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
4511 if(!ios_base_fail(&base->base)) {
4512 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base),
4513 ret, 0, SEEKDIR_cur, OPENMODE_in);
4514 basic_istream_char_sentry_destroy(this);
4516 if(ret->off==0 && ret->pos==-1 && ret->state==0)
4517 basic_ios_char_setstate(base, IOSTATE_failbit);
4521 basic_istream_char_sentry_destroy(this);
4529 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@JH@Z */
4530 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
4531 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg, 12)
4532 basic_istream_char* __thiscall basic_istream_char_seekg(basic_istream_char *this, streamoff off, int dir)
4534 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
4536 TRACE("(%p %ld %d)\n", this, off, dir);
4538 if(basic_istream_char_sentry_create(this, TRUE)) {
4539 if(!ios_base_fail(&base->base)) {
4540 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
4543 basic_streambuf_char_pubseekoff(strbuf, &ret, off, dir, OPENMODE_in);
4544 basic_istream_char_sentry_destroy(this);
4546 if(ret.off==0 && ret.pos==-1 && ret.state==0)
4547 basic_ios_char_setstate(base, IOSTATE_failbit);
4549 basic_ios_char_clear(base, IOSTATE_goodbit);
4553 basic_istream_char_sentry_destroy(this);
4555 basic_ios_char_setstate(base, IOSTATE_failbit);
4559 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
4560 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
4561 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg_fpos, 28)
4562 basic_istream_char* __thiscall basic_istream_char_seekg_fpos(basic_istream_char *this, fpos_int pos)
4564 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
4566 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
4568 if(basic_istream_char_sentry_create(this, TRUE)) {
4569 if(!ios_base_fail(&base->base)) {
4570 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
4573 basic_streambuf_char_pubseekpos(strbuf, &ret, pos, OPENMODE_in);
4574 basic_istream_char_sentry_destroy(this);
4576 if(ret.off==0 && ret.pos==-1 && ret.state==0)
4577 basic_ios_char_setstate(base, IOSTATE_failbit);
4579 basic_ios_char_clear(base, IOSTATE_goodbit);
4583 basic_istream_char_sentry_destroy(this);
4585 basic_ios_char_setstate(base, IOSTATE_failbit);
4589 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAF@Z */
4590 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAF@Z */
4591 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_short, 8)
4592 basic_istream_char* __thiscall basic_istream_char_read_short(basic_istream_char *this, short *arg1)
4594 FIXME("(%p %p) stub\n", this, arg1);
4598 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAG@Z */
4599 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAG@Z */
4600 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ushort, 8)
4601 basic_istream_char* __thiscall basic_istream_char_read_ushort(basic_istream_char *this, unsigned short *arg1)
4603 FIXME("(%p %p) stub\n", this, arg1);
4607 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAH@Z */
4608 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAH@Z */
4609 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int, 8)
4610 basic_istream_char* __thiscall basic_istream_char_read_int(basic_istream_char *this, int *arg1)
4612 FIXME("(%p %p) stub\n", this, arg1);
4616 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAI@Z */
4617 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAI@Z */
4618 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint, 8)
4619 basic_istream_char* __thiscall basic_istream_char_read_uint(basic_istream_char *this, unsigned int *arg1)
4621 FIXME("(%p %p) stub\n", this, arg1);
4625 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAJ@Z */
4626 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAJ@Z */
4627 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_long, 8)
4628 basic_istream_char* __thiscall basic_istream_char_read_long(basic_istream_char *this, LONG *arg1)
4630 FIXME("(%p %p) stub\n", this, arg1);
4634 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAK@Z */
4635 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAK@Z */
4636 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ulong, 8)
4637 basic_istream_char* __thiscall basic_istream_char_read_ulong(basic_istream_char *this, ULONG *arg1)
4639 FIXME("(%p %p) stub\n", this, arg1);
4643 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAM@Z */
4644 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAM@Z */
4645 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_float, 8)
4646 basic_istream_char* __thiscall basic_istream_char_read_float(basic_istream_char *this, float *arg1)
4648 FIXME("(%p %p) stub\n", this, arg1);
4652 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAN@Z */
4653 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAN@Z */
4654 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_double, 8)
4655 basic_istream_char* __thiscall basic_istream_char_read_double(basic_istream_char *this, double *arg1)
4657 FIXME("(%p %p) stub\n", this, arg1);
4661 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAO@Z */
4662 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAO@Z */
4663 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ldouble, 8)
4664 basic_istream_char* __thiscall basic_istream_char_read_ldouble(basic_istream_char *this, long double *arg1)
4666 FIXME("(%p %p) stub\n", this, arg1);
4670 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAPAX@Z */
4671 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
4672 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ptr, 8)
4673 basic_istream_char* __thiscall basic_istream_char_read_ptr(basic_istream_char *this, void **arg1)
4675 FIXME("(%p %p) stub\n", this, arg1);
4679 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_J@Z */
4680 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_J@Z */
4681 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int64, 8)
4682 basic_istream_char* __thiscall basic_istream_char_read_int64(basic_istream_char *this, __int64 *arg1)
4684 FIXME("(%p %p) stub\n", this, arg1);
4688 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_K@Z */
4689 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_K@Z */
4690 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint64, 8)
4691 basic_istream_char* __thiscall basic_istream_char_read_uint64(basic_istream_char *this, unsigned __int64 *arg1)
4693 FIXME("(%p %p) stub\n", this, arg1);
4697 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_N@Z */
4698 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_N@Z */
4699 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_bool, 8)
4700 basic_istream_char* __thiscall basic_istream_char_read_bool(basic_istream_char *this, MSVCP_bool *arg1)
4702 FIXME("(%p %p) stub\n", this, arg1);
4706 /* ??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@D@Z */
4707 /* ??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@D@Z */
4708 basic_istream_char* __cdecl basic_istream_char_getline_str_delim(
4709 basic_istream_char *istream, basic_string_char *str, char delim)
4711 IOSB_iostate state = IOSTATE_failbit;
4714 TRACE("(%p %p %c)\n", istream, str, delim);
4716 if(basic_istream_char_sentry_create(istream, TRUE)) {
4717 MSVCP_basic_string_char_clear(str);
4719 for(c = basic_istream_char_get(istream); c!=delim && c!=EOF;
4720 c = basic_istream_char_get(istream)) {
4721 state = IOSTATE_goodbit;
4722 MSVCP_basic_string_char_append_ch(str, c);
4725 basic_istream_char_sentry_destroy(istream);
4727 basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream), state);
4731 /* ??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
4732 /* ??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
4733 basic_istream_char* __cdecl basic_istream_char_getline_str(
4734 basic_istream_char *istream, basic_string_char *str)
4736 return basic_istream_char_getline_str_delim(istream, str, '\n');
4739 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4740 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4741 DEFINE_THISCALL_WRAPPER(basic_iostream_char_ctor, 12)
4742 basic_iostream_char* __thiscall basic_iostream_char_ctor(basic_iostream_char *this, basic_streambuf_char *strbuf, MSVCP_bool virt_init)
4744 basic_ios_char *basic_ios;
4746 TRACE("(%p %p %d)\n", this, strbuf, virt_init);
4749 this->base1.vbtable = basic_iostream_char_vbtable1;
4750 this->base2.vbtable = basic_iostream_char_vbtable2;
4751 basic_ios = basic_istream_char_get_basic_ios(&this->base1);
4752 basic_ios_char_ctor(basic_ios);
4754 basic_ios = basic_istream_char_get_basic_ios(&this->base1);
4757 basic_ios->base.vtable = &MSVCP_basic_iostream_char_vtable;
4759 basic_istream_char_ctor(&this->base1, strbuf, FALSE, FALSE);
4760 basic_ostream_char_ctor_uninitialized(&this->base2, 0, FALSE, FALSE);
4764 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
4765 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
4766 DEFINE_THISCALL_WRAPPER(basic_iostream_char_dtor, 4)
4767 void __thiscall basic_iostream_char_dtor(basic_iostream_char *this)
4769 TRACE("(%p)\n", this);
4770 basic_ostream_char_dtor(&this->base2);
4771 basic_istream_char_dtor(&this->base1);
4774 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
4775 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
4776 DEFINE_THISCALL_WRAPPER(basic_iostream_char_vbase_dtor, 4)
4777 void __thiscall basic_iostream_char_vbase_dtor(basic_iostream_char *this)
4779 TRACE("(%p)\n", this);
4780 basic_iostream_char_dtor(this);
4781 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base1));
4784 DEFINE_THISCALL_WRAPPER(MSVCP_basic_iostream_char_vector_dtor, 8)
4785 basic_iostream_char* __thiscall MSVCP_basic_iostream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
4787 basic_iostream_char *this = (basic_iostream_char *)((char*)base - basic_iostream_char_vbtable1[1] + basic_iostream_char_vbtable1[0]);
4789 TRACE("(%p %x)\n", this, flags);
4792 /* we have an array, with the number of elements stored before the first object */
4793 int i, *ptr = (int *)this-1;
4795 for(i=*ptr-1; i>=0; i--)
4796 basic_iostream_char_vbase_dtor(this+i);
4797 MSVCRT_operator_delete(ptr);
4799 basic_iostream_char_vbase_dtor(this);
4801 MSVCRT_operator_delete(this);
4807 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
4808 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
4809 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor, 8)
4810 basic_ofstream_char* __thiscall basic_ofstream_char_ctor(basic_ofstream_char *this, MSVCP_bool virt_init)
4812 basic_ios_char *basic_ios;
4814 TRACE("(%p %d)\n", this, virt_init);
4817 this->base.vbtable = basic_ofstream_char_vbtable;
4818 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
4819 basic_ios_char_ctor(basic_ios);
4821 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
4824 basic_filebuf_char_ctor(&this->filebuf);
4825 basic_ostream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
4826 basic_ios->base.vtable = &MSVCP_basic_ofstream_char_vtable;
4830 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
4831 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
4832 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_file, 12)
4833 basic_ofstream_char* __thiscall basic_ofstream_char_ctor_file(
4834 basic_ofstream_char *this, FILE *file, MSVCP_bool virt_init)
4836 basic_ios_char *basic_ios;
4838 TRACE("(%p %p %d)\n", this, file, virt_init);
4841 this->base.vbtable = basic_ofstream_char_vbtable;
4842 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
4843 basic_ios_char_ctor(basic_ios);
4845 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
4848 basic_filebuf_char_ctor_file(&this->filebuf, file);
4849 basic_ostream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
4850 basic_ios->base.vtable = &MSVCP_basic_ofstream_char_vtable;
4854 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PBDHH@Z */
4855 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDHH@Z */
4856 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_name, 20)
4857 basic_ofstream_char* __thiscall basic_ofstream_char_ctor_name(basic_ofstream_char *this,
4858 const char *name, int mode, int prot, MSVCP_bool virt_init)
4860 TRACE("(%p %s %d %d %d)\n", this, name, mode, prot, virt_init);
4862 basic_ofstream_char_ctor(this, virt_init);
4864 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_out, prot)) {
4865 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
4866 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
4871 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PBGHH@Z */
4872 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEBGHH@Z */
4873 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PB_WHH@Z */
4874 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEB_WHH@Z */
4875 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_name_wchar, 20)
4876 basic_ofstream_char* __thiscall basic_ofstream_char_ctor_name_wchar(basic_ofstream_char *this,
4877 const wchar_t *name, int mode, int prot, MSVCP_bool virt_init)
4879 TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name), mode, prot, virt_init);
4881 basic_ofstream_char_ctor(this, virt_init);
4883 if(!basic_filebuf_char_open_wchar(&this->filebuf, name, mode|OPENMODE_out, prot)) {
4884 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
4885 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
4890 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
4891 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
4892 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_dtor, 4)
4893 void __thiscall basic_ofstream_char_dtor(basic_ofstream_char *this)
4895 TRACE("(%p)\n", this);
4897 basic_ostream_char_dtor(&this->base);
4898 basic_filebuf_char_dtor(&this->filebuf);
4901 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
4902 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
4903 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_vbase_dtor, 4)
4904 void __thiscall basic_ofstream_char_vbase_dtor(basic_ofstream_char *this)
4906 TRACE("(%p)\n", this);
4908 basic_ofstream_char_dtor(this);
4909 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base));
4912 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ofstream_char_vector_dtor, 8)
4913 basic_ofstream_char* __thiscall MSVCP_basic_ofstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
4915 basic_ofstream_char *this = (basic_ofstream_char *)((char*)base - basic_ofstream_char_vbtable[1] + basic_ofstream_char_vbtable[0]);
4917 TRACE("(%p %x)\n", this, flags);
4920 /* we have an array, with the number of elements stored before the first object */
4921 int i, *ptr = (int *)this-1;
4923 for(i=*ptr-1; i>=0; i--)
4924 basic_ofstream_char_vbase_dtor(this+i);
4925 MSVCRT_operator_delete(ptr);
4927 basic_ofstream_char_vbase_dtor(this);
4929 MSVCRT_operator_delete(this);
4935 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
4936 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
4937 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_close, 4)
4938 void __thiscall basic_ofstream_char_close(basic_ofstream_char *this)
4940 TRACE("(%p)\n", this);
4942 if(!basic_filebuf_char_close(&this->filebuf)) {
4943 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
4944 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
4948 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
4949 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
4950 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_is_open, 4)
4951 MSVCP_bool __thiscall basic_ofstream_char_is_open(const basic_ofstream_char *this)
4953 TRACE("(%p)\n", this);
4954 return basic_filebuf_char_is_open(&this->filebuf);
4957 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDHH@Z */
4958 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDHH@Z */
4959 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open, 16)
4960 void __thiscall basic_ofstream_char_open(basic_ofstream_char *this,
4961 const char *name, int mode, int prot)
4963 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
4965 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_out, prot)) {
4966 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
4967 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
4971 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDI@Z */
4972 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDI@Z */
4973 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_old, 12)
4974 void __thiscall basic_ofstream_char_open_old(basic_ofstream_char *this,
4975 const char *name, unsigned int mode)
4977 basic_ofstream_char_open(this, name, mode, _SH_DENYNO);
4980 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBGHH@Z */
4981 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGHH@Z */
4982 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPB_WHH@Z */
4983 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WHH@Z */
4984 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_wchar, 16)
4985 void __thiscall basic_ofstream_char_open_wchar(basic_ofstream_char *this,
4986 const wchar_t *name, int mode, int prot)
4988 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
4990 if(!basic_filebuf_char_open_wchar(&this->filebuf, name, mode|OPENMODE_out, prot)) {
4991 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
4992 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
4996 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBGI@Z */
4997 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGI@Z */
4998 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPB_WI@Z */
4999 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WI@Z */
5000 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_wchar_old, 12)
5001 void __thiscall basic_ofstream_char_open_wchar_old(basic_ofstream_char *this,
5002 const wchar_t *name, unsigned int mode)
5004 basic_ofstream_char_open_wchar(this, name, mode, _SH_DENYNO);
5007 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
5008 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
5009 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_rdbuf, 4)
5010 basic_filebuf_char* __thiscall basic_ofstream_char_rdbuf(const basic_ofstream_char *this)
5012 TRACE("(%p)\n", this);
5013 return (basic_filebuf_char*)&this->filebuf;
5016 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
5017 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
5018 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor, 8)
5019 basic_ifstream_char* __thiscall basic_ifstream_char_ctor(basic_ifstream_char *this, MSVCP_bool virt_init)
5021 basic_ios_char *basic_ios;
5023 TRACE("(%p %d)\n", this, virt_init);
5026 this->base.vbtable = basic_ifstream_char_vbtable;
5027 basic_ios = basic_istream_char_get_basic_ios(&this->base);
5028 basic_ios_char_ctor(basic_ios);
5030 basic_ios = basic_istream_char_get_basic_ios(&this->base);
5033 basic_filebuf_char_ctor(&this->filebuf);
5034 basic_istream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
5035 basic_ios->base.vtable = &MSVCP_basic_ifstream_char_vtable;
5039 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
5040 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
5041 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_file, 12)
5042 basic_ifstream_char* __thiscall basic_ifstream_char_ctor_file(
5043 basic_ifstream_char *this, FILE *file, MSVCP_bool virt_init)
5045 basic_ios_char *basic_ios;
5047 TRACE("(%p %p %d)\n", this, file, virt_init);
5050 this->base.vbtable = basic_ifstream_char_vbtable;
5051 basic_ios = basic_istream_char_get_basic_ios(&this->base);
5052 basic_ios_char_ctor(basic_ios);
5054 basic_ios = basic_istream_char_get_basic_ios(&this->base);
5057 basic_filebuf_char_ctor_file(&this->filebuf, file);
5058 basic_istream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
5059 basic_ios->base.vtable = &MSVCP_basic_ifstream_char_vtable;
5063 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PBDHH@Z */
5064 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDHH@Z */
5065 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_name, 20)
5066 basic_ifstream_char* __thiscall basic_ifstream_char_ctor_name(basic_ifstream_char *this,
5067 const char *name, int mode, int prot, MSVCP_bool virt_init)
5069 TRACE("(%p %s %d %d %d)\n", this, name, mode, prot, virt_init);
5071 basic_ifstream_char_ctor(this, virt_init);
5073 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_in, prot)) {
5074 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
5075 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
5080 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PBGHH@Z */
5081 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEBGHH@Z */
5082 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PB_WHH@Z */
5083 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEB_WHH@Z */
5084 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_name_wchar, 20)
5085 basic_ifstream_char* __thiscall basic_ifstream_char_ctor_name_wchar(basic_ifstream_char *this,
5086 const wchar_t *name, int mode, int prot, MSVCP_bool virt_init)
5088 TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name), mode, prot, virt_init);
5090 basic_ifstream_char_ctor(this, virt_init);
5092 if(!basic_filebuf_char_open_wchar(&this->filebuf, name, mode|OPENMODE_in, prot)) {
5093 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
5094 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
5099 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
5100 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
5101 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_dtor, 4)
5102 void __thiscall basic_ifstream_char_dtor(basic_ifstream_char *this)
5104 TRACE("(%p)\n", this);
5106 basic_istream_char_dtor(&this->base);
5107 basic_filebuf_char_dtor(&this->filebuf);
5110 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5111 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5112 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_vbase_dtor, 4)
5113 void __thiscall basic_ifstream_char_vbase_dtor(basic_ifstream_char *this)
5115 TRACE("(%p)\n", this);
5117 basic_ifstream_char_dtor(this);
5118 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base));
5121 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ifstream_char_vector_dtor, 8)
5122 basic_ifstream_char* __thiscall MSVCP_basic_ifstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
5124 basic_ifstream_char *this = (basic_ifstream_char *)((char*)base - basic_ifstream_char_vbtable[1] + basic_ifstream_char_vbtable[0]);
5126 TRACE("(%p %x)\n", this, flags);
5129 /* we have an array, with the number of elements stored before the first object */
5130 int i, *ptr = (int *)this-1;
5132 for(i=*ptr-1; i>=0; i--)
5133 basic_ifstream_char_vbase_dtor(this+i);
5134 MSVCRT_operator_delete(ptr);
5136 basic_ifstream_char_vbase_dtor(this);
5138 MSVCRT_operator_delete(this);
5144 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5145 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5146 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_close, 4)
5147 void __thiscall basic_ifstream_char_close(basic_ifstream_char *this)
5149 TRACE("(%p)\n", this);
5151 if(!basic_filebuf_char_close(&this->filebuf)) {
5152 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
5153 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
5157 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
5158 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
5159 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_is_open, 4)
5160 MSVCP_bool __thiscall basic_ifstream_char_is_open(const basic_ifstream_char *this)
5162 TRACE("(%p)\n", this);
5163 return basic_filebuf_char_is_open(&this->filebuf);
5166 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDHH@Z */
5167 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDHH@Z */
5168 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open, 16)
5169 void __thiscall basic_ifstream_char_open(basic_ifstream_char *this,
5170 const char *name, int mode, int prot)
5172 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
5174 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_in, prot)) {
5175 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
5176 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
5180 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDI@Z */
5181 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDI@Z */
5182 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_old, 12)
5183 void __thiscall basic_ifstream_char_open_old(basic_ifstream_char *this,
5184 const char *name, unsigned int mode)
5186 basic_ifstream_char_open(this, name, mode, _SH_DENYNO);
5189 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBGHH@Z */
5190 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGHH@Z */
5191 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPB_WHH@Z */
5192 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WHH@Z */
5193 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_wchar, 16)
5194 void __thiscall basic_ifstream_char_open_wchar(basic_ifstream_char *this,
5195 const wchar_t *name, int mode, int prot)
5197 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
5199 if(!basic_filebuf_char_open_wchar(&this->filebuf, name, mode|OPENMODE_in, prot)) {
5200 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
5201 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
5205 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBGI@Z */
5206 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGI@Z */
5207 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPB_WI@Z */
5208 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WI@Z */
5209 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_wchar_old, 12)
5210 void __thiscall basic_ifstream_char_open_wchar_old(basic_ifstream_char *this,
5211 const wchar_t *name, unsigned int mode)
5213 basic_ifstream_char_open_wchar(this, name, mode, _SH_DENYNO);
5216 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
5217 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
5218 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_rdbuf, 4)
5219 basic_filebuf_char* __thiscall basic_ifstream_char_rdbuf(const basic_ifstream_char *this)
5221 TRACE("(%p)\n", this);
5222 return (basic_filebuf_char*)&this->filebuf;
5225 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
5226 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
5227 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor, 8)
5228 basic_fstream_char* __thiscall basic_fstream_char_ctor(basic_fstream_char *this, MSVCP_bool virt_init)
5230 basic_ios_char *basic_ios;
5232 TRACE("(%p %d)\n", this, virt_init);
5235 this->base.base1.vbtable = basic_fstream_char_vbtable1;
5236 this->base.base2.vbtable = basic_fstream_char_vbtable2;
5237 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
5238 basic_ios_char_ctor(basic_ios);
5240 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
5243 basic_filebuf_char_ctor(&this->filebuf);
5244 basic_iostream_char_ctor(&this->base, &this->filebuf.base, FALSE);
5245 basic_ios->base.vtable = &MSVCP_basic_fstream_char_vtable;
5249 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
5250 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
5251 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_file, 12)
5252 basic_fstream_char* __thiscall basic_fstream_char_ctor_file(basic_fstream_char *this,
5253 FILE *file, MSVCP_bool virt_init)
5255 basic_ios_char *basic_ios;
5257 TRACE("(%p %p %d)\n", this, file, virt_init);
5260 this->base.base1.vbtable = basic_fstream_char_vbtable1;
5261 this->base.base2.vbtable = basic_fstream_char_vbtable2;
5262 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
5263 basic_ios_char_ctor(basic_ios);
5265 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
5268 basic_filebuf_char_ctor_file(&this->filebuf, file);
5269 basic_iostream_char_ctor(&this->base, &this->filebuf.base, FALSE);
5270 basic_ios->base.vtable = &MSVCP_basic_fstream_char_vtable;
5274 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PBDHH@Z */
5275 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDHH@Z */
5276 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_name, 20)
5277 basic_fstream_char* __thiscall basic_fstream_char_ctor_name(basic_fstream_char *this,
5278 const char *name, int mode, int prot, MSVCP_bool virt_init)
5280 TRACE("(%p %s %d %d %d)\n", this, name, mode, prot, virt_init);
5282 basic_fstream_char_ctor(this, virt_init);
5284 if(!basic_filebuf_char_open(&this->filebuf, name, mode, prot)) {
5285 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
5286 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
5291 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PBGHH@Z */
5292 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEBGHH@Z */
5293 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PB_WHH@Z */
5294 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEB_WHH@Z */
5295 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_name_wchar, 20)
5296 basic_fstream_char* __thiscall basic_fstream_char_ctor_name_wchar(basic_fstream_char *this,
5297 const wchar_t *name, int mode, int prot, MSVCP_bool virt_init)
5299 TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name), mode, prot, virt_init);
5301 basic_fstream_char_ctor(this, virt_init);
5303 if(!basic_filebuf_char_open_wchar(&this->filebuf, name, mode, prot)) {
5304 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
5305 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
5310 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
5311 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
5312 DEFINE_THISCALL_WRAPPER(basic_fstream_char_dtor, 4)
5313 void __thiscall basic_fstream_char_dtor(basic_fstream_char *this)
5315 TRACE("(%p)\n", this);
5317 basic_iostream_char_dtor(&this->base);
5318 basic_filebuf_char_dtor(&this->filebuf);
5321 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5322 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5323 DEFINE_THISCALL_WRAPPER(basic_fstream_char_vbase_dtor, 4)
5324 void __thiscall basic_fstream_char_vbase_dtor(basic_fstream_char *this)
5326 TRACE("(%p)\n", this);
5328 basic_fstream_char_dtor(this);
5329 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base.base1));
5332 DEFINE_THISCALL_WRAPPER(MSVCP_basic_fstream_char_vector_dtor, 8)
5333 basic_fstream_char* __thiscall MSVCP_basic_fstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
5335 basic_fstream_char *this = (basic_fstream_char *)((char*)base - basic_fstream_char_vbtable1[1] + basic_fstream_char_vbtable1[0]);
5337 TRACE("(%p %x)\n", this, flags);
5340 /* we have an array, with the number of elements stored before the first object */
5341 int i, *ptr = (int *)this-1;
5343 for(i=*ptr-1; i>=0; i--)
5344 basic_fstream_char_vbase_dtor(this+i);
5345 MSVCRT_operator_delete(ptr);
5347 basic_fstream_char_vbase_dtor(this);
5349 MSVCRT_operator_delete(this);
5355 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5356 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5357 DEFINE_THISCALL_WRAPPER(basic_fstream_char_close, 4)
5358 void __thiscall basic_fstream_char_close(basic_fstream_char *this)
5360 TRACE("(%p)\n", this);
5362 if(!basic_filebuf_char_close(&this->filebuf)) {
5363 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
5364 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
5368 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
5369 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
5370 DEFINE_THISCALL_WRAPPER(basic_fstream_char_is_open, 4)
5371 MSVCP_bool __thiscall basic_fstream_char_is_open(const basic_fstream_char *this)
5373 TRACE("(%p)\n", this);
5374 return basic_filebuf_char_is_open(&this->filebuf);
5377 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDHH@Z */
5378 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDHH@Z */
5379 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open, 16)
5380 void __thiscall basic_fstream_char_open(basic_fstream_char *this,
5381 const char *name, int mode, int prot)
5383 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
5385 if(!basic_filebuf_char_open(&this->filebuf, name, mode, prot)) {
5386 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
5387 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
5391 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDI@Z */
5392 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDI@Z */
5393 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_old, 12)
5394 void __thiscall basic_fstream_char_open_old(basic_fstream_char *this,
5395 const char *name, unsigned int mode)
5397 basic_fstream_char_open(this, name, mode, _SH_DENYNO);
5400 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBGHH@Z */
5401 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGHH@Z */
5402 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPB_WHH@Z */
5403 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WHH@Z */
5404 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_wchar, 16)
5405 void __thiscall basic_fstream_char_open_wchar(basic_fstream_char *this,
5406 const wchar_t *name, int mode, int prot)
5408 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
5410 if(!basic_filebuf_char_open_wchar(&this->filebuf, name, mode, prot)) {
5411 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
5412 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
5416 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBGI@Z */
5417 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGI@Z */
5418 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPB_WI@Z */
5419 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WI@Z */
5420 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_wchar_old, 12)
5421 void __thiscall basic_fstream_char_open_wchar_old(basic_fstream_char *this,
5422 const wchar_t *name, unsigned int mode)
5424 basic_fstream_char_open_wchar(this, name, mode, _SH_DENYNO);
5427 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
5428 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
5429 DEFINE_THISCALL_WRAPPER(basic_fstream_char_rdbuf, 4)
5430 basic_filebuf_char* __thiscall basic_fstream_char_rdbuf(const basic_fstream_char *this)
5432 TRACE("(%p)\n", this);
5433 return (basic_filebuf_char*)&this->filebuf;