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 void (__cdecl *pfunc)(ios_base*, streamsize);
140 const vtable_ptr *vtable;
155 } basic_streambuf_char;
158 const vtable_ptr *vtable;
173 } basic_streambuf_wchar;
179 } basic_filebuf__Initfl;
182 basic_streambuf_char base;
185 MSVCP_bool wrotesome;
189 } basic_filebuf_char;
193 basic_streambuf_char *strbuf;
194 struct _basic_ostream_char *stream;
200 basic_streambuf_wchar *strbuf;
201 struct _basic_ostream_wchar *stream;
205 typedef struct _basic_ostream_char {
207 /* virtual inheritance
208 * basic_ios_char basic_ios;
210 } basic_ostream_char;
212 typedef struct _basic_ostream_wchar {
214 /* virtual inheritance
215 * basic_ios_char basic_ios;
217 } basic_ostream_wchar;
222 /* virtual inheritance
223 * basic_ios_char basic_ios;
225 } basic_istream_char;
228 basic_istream_char base1;
229 basic_ostream_char base2;
230 /* virtual inheritance
231 * basic_ios_char basic_ios;
233 } basic_iostream_char;
236 basic_ostream_char base;
237 basic_filebuf_char filebuf;
238 /* virtual inheritance
239 * basic_ios_char basic_ios;
241 } basic_ofstream_char;
244 basic_istream_char base;
245 basic_filebuf_char filebuf;
246 /* virtual inheritance
247 * basic_ios_char basic_ios;
249 } basic_ifstream_char;
252 basic_iostream_char base;
253 basic_filebuf_char filebuf;
254 /* virtual inheritance
255 * basic_ios_char basic_ios;
257 } basic_fstream_char;
259 extern const vtable_ptr MSVCP_iosb_vtable;
261 /* ??_7ios_base@std@@6B@ */
262 extern const vtable_ptr MSVCP_ios_base_vtable;
264 /* ??_7?$basic_ios@DU?$char_traits@D@std@@@std@@6B@ */
265 extern const vtable_ptr MSVCP_basic_ios_char_vtable;
267 /* ??_7?$basic_ios@_WU?$char_traits@_W@std@@@std@@6B@ */
268 extern const vtable_ptr MSVCP_basic_ios_wchar_vtable;
270 /* ??_7?$basic_ios@GU?$char_traits@G@std@@@std@@6B@ */
271 extern const vtable_ptr MSVCP_basic_ios_short_vtable;
273 /* ??_7?$basic_streambuf@DU?$char_traits@D@std@@@std@@6B@ */
274 extern const vtable_ptr MSVCP_basic_streambuf_char_vtable;
276 /* ??_7?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@6B@ */
277 extern const vtable_ptr MSVCP_basic_streambuf_wchar_vtable;
279 /* ??_7?$basic_streambuf@GU?$char_traits@G@std@@@std@@6B@ */
280 extern const vtable_ptr MSVCP_basic_streambuf_short_vtable;
282 /* ??_7?$basic_filebuf@DU?$char_traits@D@std@@@std@@6B@ */
283 extern const vtable_ptr MSVCP_basic_filebuf_char_vtable;
285 /* ??_8?$basic_ostream@DU?$char_traits@D@std@@@std@@7B@ */
286 const int basic_ostream_char_vbtable[] = {0, sizeof(basic_ostream_char)};
287 /* ??_7?$basic_ostream@DU?$char_traits@D@std@@@std@@6B@ */
288 extern const vtable_ptr MSVCP_basic_ostream_char_vtable;
290 /* ??_8?$basic_istream@DU?$char_traits@D@std@@@std@@7B@ */
291 const int basic_istream_char_vbtable[] = {0, sizeof(basic_istream_char)};
292 /* ??_7?$basic_istream@DU?$char_traits@D@std@@@std@@6B@ */
293 extern const vtable_ptr MSVCP_basic_istream_char_vtable;
295 /* ??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
296 const int basic_iostream_char_vbtable1[] = {0, sizeof(basic_iostream_char)};
297 /* ??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
298 const int basic_iostream_char_vbtable2[] = {0, sizeof(basic_iostream_char)-FIELD_OFFSET(basic_iostream_char, base2)};
299 /* ??_7?$basic_iostream@DU?$char_traits@D@std@@@std@@6B@ */
300 extern const vtable_ptr MSVCP_basic_iostream_char_vtable;
302 /* ??_8?$basic_ofstream@DU?$char_traits@D@std@@@std@@7B@ */
303 const int basic_ofstream_char_vbtable[] = {0, sizeof(basic_ofstream_char)};
304 /* ??_7?$basic_ofstream@DU?$char_traits@D@std@@@std@@6B@ */
305 extern const vtable_ptr MSVCP_basic_ofstream_char_vtable;
307 /*??_8?$basic_ifstream@DU?$char_traits@D@std@@@std@@7B@ */
308 const int basic_ifstream_char_vbtable[] = {0, sizeof(basic_ifstream_char)};
309 /* ??_7?$basic_ifstream@DU?$char_traits@D@std@@@std@@6B@ */
310 extern const vtable_ptr MSVCP_basic_ifstream_char_vtable;
312 /* ??_8?$basic_fstream@DU?$char_traits@D@std@@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
313 const int basic_fstream_char_vbtable1[] = {0, sizeof(basic_fstream_char)};
314 /* ??_8?$basic_fstream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
315 const int basic_fstream_char_vbtable2[] = {0, sizeof(basic_fstream_char)-FIELD_OFFSET(basic_fstream_char, base.base2)};
316 /* ??_7?$basic_fstream@DU?$char_traits@D@std@@@std@@6B@ */
317 extern const vtable_ptr MSVCP_basic_fstream_char_vtable;
319 DEFINE_RTTI_DATA0(iosb, 0, ".?AV?$_Iosb@H@std@@");
320 DEFINE_RTTI_DATA1(ios_base, 0, &iosb_rtti_base_descriptor, ".?AV?$_Iosb@H@std@@");
321 DEFINE_RTTI_DATA2(basic_ios_char, 0, &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
322 ".?AV?$basic_ios@DU?$char_traits@D@std@@@std@@");
323 DEFINE_RTTI_DATA2(basic_ios_wchar, 0, &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
324 ".?AV?$basic_ios@_WU?$char_traits@_W@std@@@std@@");
325 DEFINE_RTTI_DATA2(basic_ios_short, 0, &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
326 ".?AV?$basic_ios@GU?$char_traits@G@std@@@std@@");
327 DEFINE_RTTI_DATA0(basic_streambuf_char, 0,
328 ".?AV?$basic_streambuf@DU?$char_traits@D@std@@@std@@");
329 DEFINE_RTTI_DATA0(basic_streambuf_wchar, 0,
330 ".?AV?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@");
331 DEFINE_RTTI_DATA0(basic_streambuf_short, 0,
332 ".?AV?$basic_streambuf@GU?$char_traits@G@std@@@std@@");
333 DEFINE_RTTI_DATA1(basic_filebuf_char, 0, &basic_streambuf_char_rtti_base_descriptor,
334 ".?AV?$basic_filebuf@DU?$char_traits@D@std@@@std@@");
335 DEFINE_RTTI_DATA3(basic_ostream_char, sizeof(basic_ostream_char), &basic_ios_char_rtti_base_descriptor,
336 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
337 ".?AV?$basic_ostream@DU?$char_traits@D@std@@@std@@");
338 DEFINE_RTTI_DATA3(basic_istream_char, sizeof(basic_istream_char), &basic_ios_char_rtti_base_descriptor,
339 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
340 ".?AV?$basic_istream@DU?$char_traits@D@std@@@std@@");
341 DEFINE_RTTI_DATA8(basic_iostream_char, sizeof(basic_iostream_char),
342 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
343 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
344 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
345 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
346 ".?AV?$basic_iostream@DU?$char_traits@D@std@@@std@@");
347 DEFINE_RTTI_DATA4(basic_ofstream_char, sizeof(basic_ofstream_char),
348 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
349 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
350 ".?AV?$basic_ofstream@DU?$char_traits@D@std@@@std@@");
351 DEFINE_RTTI_DATA4(basic_ifstream_char, sizeof(basic_ifstream_char),
352 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
353 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
354 ".?AV?$basic_ifstream@DU?$char_traits@D@std@@@std@@");
355 DEFINE_RTTI_DATA9(basic_fstream_char, sizeof(basic_fstream_char), &basic_istream_char_rtti_base_descriptor,
356 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
357 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
358 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
359 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
360 ".?AV?$basic_fstream@DU?$char_traits@D@std@@@std@@");
363 void __asm_dummy_vtables(void) {
365 __ASM_VTABLE(iosb, "");
366 __ASM_VTABLE(ios_base, "");
367 __ASM_VTABLE(basic_ios_char, "");
368 __ASM_VTABLE(basic_ios_wchar, "");
369 __ASM_VTABLE(basic_ios_short, "");
370 __ASM_VTABLE(basic_streambuf_char,
371 VTABLE_ADD_FUNC(basic_streambuf_char_overflow)
372 VTABLE_ADD_FUNC(basic_streambuf_char_pbackfail)
373 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc)
374 VTABLE_ADD_FUNC(basic_streambuf_char_underflow)
375 VTABLE_ADD_FUNC(basic_streambuf_char_uflow)
376 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn)
377 VTABLE_ADD_FUNC(basic_streambuf_char__Xsgetn_s)
378 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn)
379 VTABLE_ADD_FUNC(basic_streambuf_char_seekoff)
380 VTABLE_ADD_FUNC(basic_streambuf_char_seekpos)
381 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf)
382 VTABLE_ADD_FUNC(basic_streambuf_char_sync)
383 VTABLE_ADD_FUNC(basic_streambuf_char_imbue));
384 __ASM_VTABLE(basic_streambuf_wchar,
385 VTABLE_ADD_FUNC(basic_streambuf_wchar_overflow)
386 VTABLE_ADD_FUNC(basic_streambuf_wchar_pbackfail)
387 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
388 VTABLE_ADD_FUNC(basic_streambuf_wchar_underflow)
389 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow)
390 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
391 VTABLE_ADD_FUNC(basic_streambuf_wchar__Xsgetn_s)
392 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
393 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekoff)
394 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekpos)
395 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf)
396 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync)
397 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
398 __ASM_VTABLE(basic_streambuf_short,
399 VTABLE_ADD_FUNC(basic_streambuf_wchar_overflow)
400 VTABLE_ADD_FUNC(basic_streambuf_wchar_pbackfail)
401 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
402 VTABLE_ADD_FUNC(basic_streambuf_wchar_underflow)
403 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow)
404 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
405 VTABLE_ADD_FUNC(basic_streambuf_wchar__Xsgetn_s)
406 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
407 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekoff)
408 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekpos)
409 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf)
410 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync)
411 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
412 __ASM_VTABLE(basic_filebuf_char,
413 VTABLE_ADD_FUNC(basic_filebuf_char_overflow)
414 VTABLE_ADD_FUNC(basic_filebuf_char_pbackfail)
415 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc)
416 VTABLE_ADD_FUNC(basic_filebuf_char_underflow)
417 VTABLE_ADD_FUNC(basic_filebuf_char_uflow)
418 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn)
419 VTABLE_ADD_FUNC(basic_streambuf_char__Xsgetn_s)
420 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn)
421 VTABLE_ADD_FUNC(basic_filebuf_char_seekoff)
422 VTABLE_ADD_FUNC(basic_filebuf_char_seekpos)
423 VTABLE_ADD_FUNC(basic_filebuf_char_setbuf)
424 VTABLE_ADD_FUNC(basic_filebuf_char_sync)
425 VTABLE_ADD_FUNC(basic_filebuf_char_imbue));
426 __ASM_VTABLE(basic_ostream_char, "");
427 __ASM_VTABLE(basic_istream_char, "");
428 __ASM_VTABLE(basic_iostream_char, "");
429 __ASM_VTABLE(basic_ofstream_char, "");
430 __ASM_VTABLE(basic_ifstream_char, "");
431 __ASM_VTABLE(basic_fstream_char, "");
436 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
437 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
438 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp_next, 16)
439 void __thiscall basic_streambuf_char_setp_next(basic_streambuf_char *this, char *first, char *next, char *last)
441 TRACE("(%p %p %p %p)\n", this, first, next, last);
445 this->wsize = last-next;
448 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD0@Z */
449 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD0@Z */
450 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp, 12)
451 void __thiscall basic_streambuf_char_setp(basic_streambuf_char *this, char *first, char *last)
453 basic_streambuf_char_setp_next(this, first, first, last);
456 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
457 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
458 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setg, 16)
459 void __thiscall basic_streambuf_char_setg(basic_streambuf_char *this, char *first, char *next, char *last)
461 TRACE("(%p %p %p %p)\n", this, first, next, last);
465 this->rsize = last-next;
468 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXXZ */
469 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXXZ */
470 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init_empty, 4)
471 void __thiscall basic_streambuf_char__Init_empty(basic_streambuf_char *this)
473 TRACE("(%p)\n", this);
475 this->prbuf = &this->rbuf;
476 this->pwbuf = &this->wbuf;
477 this->prpos = &this->rpos;
478 this->pwpos = &this->wpos;
479 this->prsize = &this->rsize;
480 this->pwsize = &this->wsize;
482 basic_streambuf_char_setp(this, NULL, NULL);
483 basic_streambuf_char_setg(this, NULL, NULL, NULL);
486 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@W4_Uninitialized@1@@Z */
487 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
488 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor_uninitialized, 8)
489 basic_streambuf_char* __thiscall basic_streambuf_char_ctor_uninitialized(basic_streambuf_char *this, int uninitialized)
491 TRACE("(%p %d)\n", this, uninitialized);
492 this->vtable = &MSVCP_basic_streambuf_char_vtable;
493 mutex_ctor(&this->lock);
497 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@XZ */
498 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@XZ */
499 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor, 4)
500 basic_streambuf_char* __thiscall basic_streambuf_char_ctor(basic_streambuf_char *this)
502 TRACE("(%p)\n", this);
504 this->vtable = &MSVCP_basic_streambuf_char_vtable;
505 mutex_ctor(&this->lock);
506 this->loc = MSVCRT_operator_new(sizeof(locale));
507 locale_ctor(this->loc);
508 basic_streambuf_char__Init_empty(this);
513 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
514 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
515 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_dtor, 4)
516 void __thiscall basic_streambuf_char_dtor(basic_streambuf_char *this)
518 TRACE("(%p)\n", this);
520 mutex_dtor(&this->lock);
521 locale_dtor(this->loc);
522 MSVCRT_operator_delete(this->loc);
525 DEFINE_THISCALL_WRAPPER(MSVCP_basic_streambuf_char_vector_dtor, 8)
526 basic_streambuf_char* __thiscall MSVCP_basic_streambuf_char_vector_dtor(basic_streambuf_char *this, unsigned int flags)
528 TRACE("(%p %x)\n", this, flags);
530 /* we have an array, with the number of elements stored before the first object */
531 int i, *ptr = (int *)this-1;
533 for(i=*ptr-1; i>=0; i--)
534 basic_streambuf_char_dtor(this+i);
535 MSVCRT_operator_delete(ptr);
537 basic_streambuf_char_dtor(this);
539 MSVCRT_operator_delete(this);
545 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
546 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
547 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gnavail, 4)
548 streamsize __thiscall basic_streambuf_char__Gnavail(const basic_streambuf_char *this)
550 TRACE("(%p)\n", this);
551 return *this->prpos ? *this->prsize : 0;
554 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
555 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
556 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gndec, 4)
557 char* __thiscall basic_streambuf_char__Gndec(basic_streambuf_char *this)
559 TRACE("(%p)\n", this);
565 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
566 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
567 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gninc, 4)
568 char* __thiscall basic_streambuf_char__Gninc(basic_streambuf_char *this)
570 TRACE("(%p)\n", this);
572 return (*this->prpos)++;
575 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
576 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
577 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gnpreinc, 4)
578 char* __thiscall basic_streambuf_char__Gnpreinc(basic_streambuf_char *this)
580 TRACE("(%p)\n", this);
586 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAPAD0PAH001@Z */
587 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAPEAD0PEAH001@Z */
588 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init, 28)
589 void __thiscall basic_streambuf_char__Init(basic_streambuf_char *this, char **gf, char **gn, int *gc, char **pf, char **pn, int *pc)
591 TRACE("(%p %p %p %p %p %p %p)\n", this, gf, gn, gc, pf, pn, pc);
601 /* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
602 /* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
603 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Lock, 4)
604 void __thiscall basic_streambuf_char__Lock(basic_streambuf_char *this)
606 TRACE("(%p)\n", this);
607 mutex_lock(&this->lock);
610 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
611 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
612 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Pnavail, 4)
613 streamsize __thiscall basic_streambuf_char__Pnavail(const basic_streambuf_char *this)
615 TRACE("(%p)\n", this);
616 return *this->pwpos ? *this->pwsize : 0;
619 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
620 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
621 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Pninc, 4)
622 char* __thiscall basic_streambuf_char__Pninc(basic_streambuf_char *this)
624 TRACE("(%p)\n", this);
626 return (*this->pwpos)++;
629 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
630 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
631 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_underflow, 4)
632 #define call_basic_streambuf_char_underflow(this) CALL_VTBL_FUNC(this, 16, \
633 int, (basic_streambuf_char*), (this))
634 int __thiscall basic_streambuf_char_underflow(basic_streambuf_char *this)
636 TRACE("(%p)\n", this);
640 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
641 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
642 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_uflow, 4)
643 #define call_basic_streambuf_char_uflow(this) CALL_VTBL_FUNC(this, 20, \
644 int, (basic_streambuf_char*), (this))
645 int __thiscall basic_streambuf_char_uflow(basic_streambuf_char *this)
649 TRACE("(%p)\n", this);
651 if(call_basic_streambuf_char_underflow(this)==EOF)
660 /* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADIH@Z */
661 /* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_K_J@Z */
662 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Xsgetn_s, 16)
663 #define call_basic_streambuf_char__Xsgetn_s(this, ptr, size, count) CALL_VTBL_FUNC(this, 28, \
664 streamsize, (basic_streambuf_char*, char*, MSVCP_size_t, streamsize), (this, ptr, size, count))
665 streamsize __thiscall basic_streambuf_char__Xsgetn_s(basic_streambuf_char *this, char *ptr, MSVCP_size_t size, streamsize count)
667 streamsize copied, chunk;
669 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
671 for(copied=0; copied<count && size;) {
672 chunk = basic_streambuf_char__Gnavail(this);
673 if(chunk > count-copied)
674 chunk = count-copied;
677 memcpy_s(ptr+copied, size, *this->prpos, chunk);
678 *this->prpos += chunk;
679 *this->prsize -= chunk;
682 }else if((ptr[copied] = call_basic_streambuf_char_uflow(this)) != EOF) {
693 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
694 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
695 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Sgetn_s, 16)
696 streamsize __thiscall basic_streambuf_char__Sgetn_s(basic_streambuf_char *this, char *ptr, MSVCP_size_t size, streamsize count)
698 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
699 return call_basic_streambuf_char__Xsgetn_s(this, ptr, size, count);
702 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
703 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
704 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Unlock, 4)
705 void __thiscall basic_streambuf_char__Unlock(basic_streambuf_char *this)
707 TRACE("(%p)\n", this);
708 mutex_unlock(&this->lock);
711 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
712 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
713 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_eback, 4)
714 char* __thiscall basic_streambuf_char_eback(const basic_streambuf_char *this)
716 TRACE("(%p)\n", this);
720 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
721 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
722 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gptr, 4)
723 char* __thiscall basic_streambuf_char_gptr(const basic_streambuf_char *this)
725 TRACE("(%p)\n", this);
729 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
730 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
731 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_egptr, 4)
732 char* __thiscall basic_streambuf_char_egptr(const basic_streambuf_char *this)
734 TRACE("(%p)\n", this);
735 return *this->prpos+*this->prsize;
738 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
739 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
740 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_epptr, 4)
741 char* __thiscall basic_streambuf_char_epptr(const basic_streambuf_char *this)
743 TRACE("(%p)\n", this);
744 return *this->pwpos+*this->pwsize;
747 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
748 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
749 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gbump, 8)
750 void __thiscall basic_streambuf_char_gbump(basic_streambuf_char *this, int off)
752 TRACE("(%p %d)\n", this, off);
754 *this->prsize -= off;
757 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QBE?AVlocale@2@XZ */
758 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEBA?AVlocale@2@XZ */
759 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_getloc, 8)
760 locale* __thiscall basic_streambuf_char_getloc(const basic_streambuf_char *this, locale *ret)
762 TRACE("(%p)\n", this);
763 return locale_copy_ctor(ret, this->loc);
766 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
767 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */
768 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_imbue, 8)
769 #define call_basic_streambuf_char_imbue(this, loc) CALL_VTBL_FUNC(this, 52, \
770 void, (basic_streambuf_char*, const locale*), (this, loc))
771 void __thiscall basic_streambuf_char_imbue(basic_streambuf_char *this, const locale *loc)
773 TRACE("(%p %p)\n", this, loc);
776 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
777 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
778 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_overflow, 8)
779 #define call_basic_streambuf_char_overflow(this, ch) CALL_VTBL_FUNC(this, 4, \
780 int, (basic_streambuf_char*, int), (this, ch))
781 int __thiscall basic_streambuf_char_overflow(basic_streambuf_char *this, int ch)
783 TRACE("(%p %d)\n", this, ch);
787 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
788 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
789 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbackfail, 8)
790 #define call_basic_streambuf_char_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, \
791 int, (basic_streambuf_char*, int), (this, ch))
792 int __thiscall basic_streambuf_char_pbackfail(basic_streambuf_char *this, int ch)
794 TRACE("(%p %d)\n", this, ch);
798 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
799 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
800 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbase, 4)
801 char* __thiscall basic_streambuf_char_pbase(const basic_streambuf_char *this)
803 TRACE("(%p)\n", this);
807 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
808 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
809 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbump, 8)
810 void __thiscall basic_streambuf_char_pbump(basic_streambuf_char *this, int off)
812 TRACE("(%p %d)\n", this, off);
814 *this->pwsize -= off;
817 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
818 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
819 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pptr, 4)
820 char* __thiscall basic_streambuf_char_pptr(const basic_streambuf_char *this)
822 TRACE("(%p)\n", this);
826 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
827 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
828 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubimbue, 12)
829 locale* __thiscall basic_streambuf_char_pubimbue(basic_streambuf_char *this, locale *ret, const locale *loc)
831 TRACE("(%p %p)\n", this, loc);
832 memcpy(ret, this->loc, sizeof(locale));
833 call_basic_streambuf_char_imbue(this, loc);
834 locale_copy_ctor(this->loc, loc);
838 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
839 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
840 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekoff, 20)
841 #define call_basic_streambuf_char_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 36, \
842 fpos_int*, (basic_streambuf_char*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
843 fpos_int* __thiscall basic_streambuf_char_seekoff(basic_streambuf_char *this,
844 fpos_int *ret, streamoff off, int way, int mode)
846 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
853 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
854 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
855 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekoff, 20)
856 fpos_int* __thiscall basic_streambuf_char_pubseekoff(basic_streambuf_char *this,
857 fpos_int *ret, streamoff off, int way, int mode)
859 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
860 return call_basic_streambuf_char_seekoff(this, ret, off, way, mode);
863 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */
864 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */
865 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekoff_old, 20)
866 fpos_int* __thiscall basic_streambuf_char_pubseekoff_old(basic_streambuf_char *this,
867 fpos_int *ret, streamoff off, unsigned int way, unsigned int mode)
869 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
870 return basic_streambuf_char_pubseekoff(this, ret, off, way, mode);
873 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
874 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
875 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekpos, 36)
876 #define call_basic_streambuf_char_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 40, \
877 fpos_int*, (basic_streambuf_char*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
878 fpos_int* __thiscall basic_streambuf_char_seekpos(basic_streambuf_char *this,
879 fpos_int *ret, fpos_int pos, int mode)
881 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
888 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
889 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
890 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekpos, 36)
891 fpos_int* __thiscall basic_streambuf_char_pubseekpos(basic_streambuf_char *this,
892 fpos_int *ret, fpos_int pos, int mode)
894 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
895 return call_basic_streambuf_char_seekpos(this, ret, pos, mode);
898 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
899 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
900 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekpos_old, 36)
901 fpos_int* __thiscall basic_streambuf_char_pubseekpos_old(basic_streambuf_char *this,
902 fpos_int *ret, fpos_int pos, unsigned int mode)
904 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
905 return basic_streambuf_char_pubseekpos(this, ret, pos, mode);
908 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEPAV12@PADH@Z */
909 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAPEAV12@PEAD_J@Z */
910 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setbuf, 12)
911 #define call_basic_streambuf_char_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 44, \
912 basic_streambuf_char*, (basic_streambuf_char*, char*, streamsize), (this, buf, count))
913 basic_streambuf_char* __thiscall basic_streambuf_char_setbuf(basic_streambuf_char *this, char *buf, streamsize count)
915 TRACE("(%p %p %ld)\n", this, buf, count);
919 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PADH@Z */
920 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEAD_J@Z */
921 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsetbuf, 12)
922 basic_streambuf_char* __thiscall basic_streambuf_char_pubsetbuf(basic_streambuf_char *this, char *buf, streamsize count)
924 TRACE("(%p %p %ld)\n", this, buf, count);
925 return call_basic_streambuf_char_setbuf(this, buf, count);
928 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
929 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
930 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sync, 4)
931 #define call_basic_streambuf_char_sync(this) CALL_VTBL_FUNC(this, 48, \
932 int, (basic_streambuf_char*), (this))
933 int __thiscall basic_streambuf_char_sync(basic_streambuf_char *this)
935 TRACE("(%p)\n", this);
939 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
940 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
941 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsync, 4)
942 int __thiscall basic_streambuf_char_pubsync(basic_streambuf_char *this)
944 TRACE("(%p)\n", this);
945 return call_basic_streambuf_char_sync(this);
948 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
949 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
950 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetn, 12)
951 streamsize __thiscall basic_streambuf_char_sgetn(basic_streambuf_char *this, char *ptr, streamsize count)
953 TRACE("(%p %p %ld)\n", this, ptr, count);
954 return call_basic_streambuf_char__Xsgetn_s(this, ptr, -1, count);
957 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
958 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JXZ */
959 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_showmanyc, 4)
960 #define call_basic_streambuf_char_showmanyc(this) CALL_VTBL_FUNC(this, 12, \
961 streamsize, (basic_streambuf_char*), (this))
962 streamsize __thiscall basic_streambuf_char_showmanyc(basic_streambuf_char *this)
964 TRACE("(%p)\n", this);
968 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
969 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JXZ */
970 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_in_avail, 4)
971 streamsize __thiscall basic_streambuf_char_in_avail(basic_streambuf_char *this)
975 TRACE("(%p)\n", this);
977 ret = basic_streambuf_char__Gnavail(this);
978 return ret ? ret : call_basic_streambuf_char_showmanyc(this);
981 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
982 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
983 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputbackc, 8)
984 int __thiscall basic_streambuf_char_sputbackc(basic_streambuf_char *this, char ch)
986 TRACE("(%p %d)\n", this, ch);
987 if(*this->prpos && *this->prpos>*this->prbuf && (*this->prpos)[-1]==ch) {
993 return call_basic_streambuf_char_pbackfail(this, ch);
996 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
997 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
998 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputc, 8)
999 int __thiscall basic_streambuf_char_sputc(basic_streambuf_char *this, char ch)
1001 TRACE("(%p %d)\n", this, ch);
1002 return basic_streambuf_char__Pnavail(this) ?
1003 (*basic_streambuf_char__Pninc(this) = ch) :
1004 call_basic_streambuf_char_overflow(this, ch);
1007 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1008 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1009 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sungetc, 4)
1010 int __thiscall basic_streambuf_char_sungetc(basic_streambuf_char *this)
1012 TRACE("(%p)\n", this);
1013 if(*this->prpos && *this->prpos>*this->prbuf) {
1016 return **this->prpos;
1019 return call_basic_streambuf_char_pbackfail(this, EOF);
1022 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1023 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1024 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_stossc, 4)
1025 void __thiscall basic_streambuf_char_stossc(basic_streambuf_char *this)
1027 TRACE("(%p)\n", this);
1028 if(basic_streambuf_char__Gnavail(this))
1029 basic_streambuf_char__Gninc(this);
1031 call_basic_streambuf_char_uflow(this);
1034 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1035 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1036 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sbumpc, 4)
1037 int __thiscall basic_streambuf_char_sbumpc(basic_streambuf_char *this)
1039 TRACE("(%p)\n", this);
1040 return basic_streambuf_char__Gnavail(this) ?
1041 *basic_streambuf_char__Gninc(this) : call_basic_streambuf_char_uflow(this);
1044 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1045 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1046 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetc, 4)
1047 int __thiscall basic_streambuf_char_sgetc(basic_streambuf_char *this)
1049 TRACE("(%p)\n", this);
1050 return basic_streambuf_char__Gnavail(this) ?
1051 *basic_streambuf_char_gptr(this) : call_basic_streambuf_char_underflow(this);
1054 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1055 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1056 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_snextc, 4)
1057 int __thiscall basic_streambuf_char_snextc(basic_streambuf_char *this)
1059 TRACE("(%p)\n", this);
1061 if(basic_streambuf_char__Gnavail(this) > 1)
1062 return *basic_streambuf_char__Gnpreinc(this);
1063 return basic_streambuf_char_sbumpc(this)==EOF ?
1064 EOF : basic_streambuf_char_sgetc(this);
1067 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADH@Z */
1068 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_J@Z */
1069 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsgetn, 12)
1070 #define call_basic_streambuf_char_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, \
1071 streamsize, (basic_streambuf_char*, char*, streamsize), (this, ptr, count))
1072 streamsize __thiscall basic_streambuf_char_xsgetn(basic_streambuf_char *this, char *ptr, streamsize count)
1074 TRACE("(%p %p %ld)\n", this, ptr, count);
1075 return call_basic_streambuf_char__Xsgetn_s(this, ptr, -1, count);
1078 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPBDH@Z */
1079 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEBD_J@Z */
1080 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsputn, 12)
1081 #define call_basic_streambuf_char_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 32, \
1082 streamsize, (basic_streambuf_char*, const char*, streamsize), (this, ptr, count))
1083 streamsize __thiscall basic_streambuf_char_xsputn(basic_streambuf_char *this, const char *ptr, streamsize count)
1085 streamsize copied, chunk;
1087 TRACE("(%p %p %ld)\n", this, ptr, count);
1089 for(copied=0; copied<count;) {
1090 chunk = basic_streambuf_char__Pnavail(this);
1091 if(chunk > count-copied)
1092 chunk = count-copied;
1095 memcpy(*this->pwpos, ptr+copied, chunk);
1096 *this->pwpos += chunk;
1097 *this->pwsize -= chunk;
1099 }else if(call_basic_streambuf_char_overflow(this, ptr[copied]) != EOF) {
1109 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z */
1110 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEBD_J@Z */
1111 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputn, 12)
1112 streamsize __thiscall basic_streambuf_char_sputn(basic_streambuf_char *this, const char *ptr, streamsize count)
1114 TRACE("(%p %p %ld)\n", this, ptr, count);
1115 return call_basic_streambuf_char_xsputn(this, ptr, count);
1118 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */
1119 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */
1120 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
1121 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1122 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp_next, 16)
1123 void __thiscall basic_streambuf_wchar_setp_next(basic_streambuf_wchar *this, wchar_t *first, wchar_t *next, wchar_t *last)
1125 TRACE("(%p %p %p %p)\n", this, first, next, last);
1129 this->wsize = last-next;
1132 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W0@Z */
1133 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W0@Z */
1134 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG0@Z */
1135 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG0@Z */
1136 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp, 12)
1137 void __thiscall basic_streambuf_wchar_setp(basic_streambuf_wchar *this, wchar_t *first, wchar_t *last)
1139 basic_streambuf_wchar_setp_next(this, first, first, last);
1142 /* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */
1143 /* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */
1144 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
1145 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1146 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setg, 16)
1147 void __thiscall basic_streambuf_wchar_setg(basic_streambuf_wchar *this, wchar_t *first, wchar_t *next, wchar_t *last)
1149 TRACE("(%p %p %p %p)\n", this, first, next, last);
1153 this->rsize = last-next;
1156 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXXZ */
1157 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXXZ */
1158 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXXZ */
1159 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXXZ */
1160 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init_empty, 4)
1161 void __thiscall basic_streambuf_wchar__Init_empty(basic_streambuf_wchar *this)
1163 TRACE("(%p)\n", this);
1165 this->prbuf = &this->rbuf;
1166 this->pwbuf = &this->wbuf;
1167 this->prpos = &this->rpos;
1168 this->pwpos = &this->wpos;
1169 this->prsize = &this->rsize;
1170 this->pwsize = &this->wsize;
1172 basic_streambuf_wchar_setp(this, NULL, NULL);
1173 basic_streambuf_wchar_setg(this, NULL, NULL, NULL);
1176 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@W4_Uninitialized@1@@Z */
1177 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
1178 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_ctor_uninitialized, 8)
1179 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_ctor_uninitialized(basic_streambuf_wchar *this, int uninitialized)
1181 TRACE("(%p %d)\n", this, uninitialized);
1182 this->vtable = &MSVCP_basic_streambuf_wchar_vtable;
1183 mutex_ctor(&this->lock);
1187 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@W4_Uninitialized@1@@Z */
1188 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
1189 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor_uninitialized, 8)
1190 basic_streambuf_wchar* __thiscall basic_streambuf_short_ctor_uninitialized(basic_streambuf_wchar *this, int uninitialized)
1192 TRACE("(%p %d)\n", this, uninitialized);
1193 basic_streambuf_wchar_ctor_uninitialized(this, uninitialized);
1194 this->vtable = &MSVCP_basic_streambuf_short_vtable;
1198 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@XZ */
1199 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */
1200 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_ctor, 4)
1201 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_ctor(basic_streambuf_wchar *this)
1203 TRACE("(%p)\n", this);
1205 this->vtable = &MSVCP_basic_streambuf_wchar_vtable;
1206 mutex_ctor(&this->lock);
1207 this->loc = MSVCRT_operator_new(sizeof(locale));
1208 locale_ctor(this->loc);
1209 basic_streambuf_wchar__Init_empty(this);
1214 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@XZ */
1215 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@XZ */
1216 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor, 4)
1217 basic_streambuf_wchar* __thiscall basic_streambuf_short_ctor(basic_streambuf_wchar *this)
1219 TRACE("(%p)\n", this);
1220 basic_streambuf_wchar_ctor(this);
1221 this->vtable = &MSVCP_basic_streambuf_short_vtable;
1225 /* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
1226 /* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
1227 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UAE@XZ */
1228 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */
1229 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_dtor, 4)
1230 void __thiscall basic_streambuf_wchar_dtor(basic_streambuf_wchar *this)
1232 TRACE("(%p)\n", this);
1234 mutex_dtor(&this->lock);
1235 locale_dtor(this->loc);
1236 MSVCRT_operator_delete(this->loc);
1239 DEFINE_THISCALL_WRAPPER(MSVCP_basic_streambuf_wchar_vector_dtor, 8)
1240 basic_streambuf_wchar* __thiscall MSVCP_basic_streambuf_wchar_vector_dtor(basic_streambuf_wchar *this, unsigned int flags)
1242 TRACE("(%p %x)\n", this, flags);
1244 /* we have an array, with the number of elements stored before the first object */
1245 int i, *ptr = (int *)this-1;
1247 for(i=*ptr-1; i>=0; i--)
1248 basic_streambuf_wchar_dtor(this+i);
1249 MSVCRT_operator_delete(ptr);
1251 basic_streambuf_wchar_dtor(this);
1253 MSVCRT_operator_delete(this);
1259 DEFINE_THISCALL_WRAPPER(MSVCP_basic_streambuf_short_vector_dtor, 8)
1260 basic_streambuf_wchar* __thiscall MSVCP_basic_streambuf_short_vector_dtor(basic_streambuf_wchar *this, unsigned int flags)
1262 TRACE("(%p %x)\n", this, flags);
1263 return MSVCP_basic_streambuf_wchar_vector_dtor(this, flags);
1266 /* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */
1267 /* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */
1268 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1269 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1270 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gnavail, 4)
1271 streamsize __thiscall basic_streambuf_wchar__Gnavail(const basic_streambuf_wchar *this)
1273 TRACE("(%p)\n", this);
1274 return *this->prpos ? *this->prsize : 0;
1277 /* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1278 /* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1279 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1280 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1281 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gndec, 4)
1282 wchar_t* __thiscall basic_streambuf_wchar__Gndec(basic_streambuf_wchar *this)
1284 TRACE("(%p)\n", this);
1287 return *this->prpos;
1290 /* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1291 /* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1292 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1293 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1294 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gninc, 4)
1295 wchar_t* __thiscall basic_streambuf_wchar__Gninc(basic_streambuf_wchar *this)
1297 TRACE("(%p)\n", this);
1299 return (*this->prpos)++;
1302 /* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1303 /* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1304 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1305 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1306 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gnpreinc, 4)
1307 wchar_t* __thiscall basic_streambuf_wchar__Gnpreinc(basic_streambuf_wchar *this)
1309 TRACE("(%p)\n", this);
1312 return *this->prpos;
1315 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPAPA_W0PAH001@Z */
1316 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAPEA_W0PEAH001@Z */
1317 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAPAG0PAH001@Z */
1318 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAPEAG0PEAH001@Z */
1319 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init, 28)
1320 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)
1322 TRACE("(%p %p %p %p %p %p %p)\n", this, gf, gn, gc, pf, pn, pc);
1332 /* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1333 /* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1334 /* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1335 /* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1336 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Lock, 4)
1337 void __thiscall basic_streambuf_wchar__Lock(basic_streambuf_wchar *this)
1339 TRACE("(%p)\n", this);
1340 mutex_lock(&this->lock);
1343 /* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */
1344 /* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */
1345 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1346 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1347 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Pnavail, 4)
1348 streamsize __thiscall basic_streambuf_wchar__Pnavail(const basic_streambuf_wchar *this)
1350 TRACE("(%p)\n", this);
1351 return *this->pwpos ? *this->pwsize : 0;
1354 /* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1355 /* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1356 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1357 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1358 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Pninc, 4)
1359 wchar_t* __thiscall basic_streambuf_wchar__Pninc(basic_streambuf_wchar *this)
1361 TRACE("(%p)\n", this);
1363 return (*this->pwpos)++;
1366 /* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
1367 /* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
1368 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1369 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1370 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_underflow, 4)
1371 #define call_basic_streambuf_wchar_underflow(this) CALL_VTBL_FUNC(this, 16, \
1372 unsigned short, (basic_streambuf_wchar*), (this))
1373 unsigned short __thiscall basic_streambuf_wchar_underflow(basic_streambuf_wchar *this)
1375 TRACE("(%p)\n", this);
1379 /* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
1380 /* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
1381 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1382 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1383 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_uflow, 4)
1384 #define call_basic_streambuf_wchar_uflow(this) CALL_VTBL_FUNC(this, 20, \
1385 unsigned short, (basic_streambuf_wchar*), (this))
1386 unsigned short __thiscall basic_streambuf_wchar_uflow(basic_streambuf_wchar *this)
1390 TRACE("(%p)\n", this);
1392 if(call_basic_streambuf_wchar_underflow(this)==WEOF)
1395 ret = **this->prpos;
1401 /* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WIH@Z */
1402 /* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_K_J@Z */
1403 /* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGIH@Z */
1404 /* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_K_J@Z */
1405 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Xsgetn_s, 16)
1406 #define call_basic_streambuf_wchar__Xsgetn_s(this, ptr, size, count) CALL_VTBL_FUNC(this, 28, \
1407 streamsize, (basic_streambuf_wchar*, wchar_t*, MSVCP_size_t, streamsize), (this, ptr, size, count))
1408 streamsize __thiscall basic_streambuf_wchar__Xsgetn_s(basic_streambuf_wchar *this, wchar_t *ptr, MSVCP_size_t size, streamsize count)
1410 streamsize copied, chunk;
1412 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
1414 for(copied=0; copied<count && size;) {
1415 chunk = basic_streambuf_wchar__Gnavail(this);
1416 if(chunk > count-copied)
1417 chunk = count-copied;
1420 memcpy_s(ptr+copied, size, *this->prpos, chunk);
1421 *this->prpos += chunk;
1422 *this->prsize -= chunk;
1425 }else if((ptr[copied] = call_basic_streambuf_wchar_uflow(this)) != WEOF) {
1436 /* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WIH@Z */
1437 /* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_K_J@Z */
1438 /* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGIH@Z */
1439 /* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_K_J@Z */
1440 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Sgetn_s, 16)
1441 streamsize __thiscall basic_streambuf_wchar__Sgetn_s(basic_streambuf_wchar *this, wchar_t *ptr, MSVCP_size_t size, streamsize count)
1443 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
1444 return call_basic_streambuf_wchar__Xsgetn_s(this, ptr, size, count);
1447 /* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1448 /* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1449 /* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1450 /* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1451 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Unlock, 4)
1452 void __thiscall basic_streambuf_wchar__Unlock(basic_streambuf_wchar *this)
1454 TRACE("(%p)\n", this);
1455 mutex_unlock(&this->lock);
1458 /* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1459 /* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1460 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1461 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1462 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_eback, 4)
1463 wchar_t* __thiscall basic_streambuf_wchar_eback(const basic_streambuf_wchar *this)
1465 TRACE("(%p)\n", this);
1466 return *this->prbuf;
1469 /* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1470 /* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1471 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1472 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1473 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gptr, 4)
1474 wchar_t* __thiscall basic_streambuf_wchar_gptr(const basic_streambuf_wchar *this)
1476 TRACE("(%p)\n", this);
1477 return *this->prpos;
1480 /* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1481 /* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1482 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1483 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1484 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_egptr, 4)
1485 wchar_t* __thiscall basic_streambuf_wchar_egptr(const basic_streambuf_wchar *this)
1487 TRACE("(%p)\n", this);
1488 return *this->prpos+*this->prsize;
1491 /* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1492 /* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1493 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1494 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1495 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_epptr, 4)
1496 wchar_t* __thiscall basic_streambuf_wchar_epptr(const basic_streambuf_wchar *this)
1498 TRACE("(%p)\n", this);
1499 return *this->pwpos+*this->pwsize;
1502 /* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */
1503 /* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */
1504 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
1505 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
1506 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gbump, 8)
1507 void __thiscall basic_streambuf_wchar_gbump(basic_streambuf_wchar *this, int off)
1509 TRACE("(%p %d)\n", this, off);
1510 *this->prpos += off;
1511 *this->prsize -= off;
1514 /* ?getloc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QBE?AVlocale@2@XZ */
1515 /* ?getloc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEBA?AVlocale@2@XZ */
1516 /* ?getloc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QBE?AVlocale@2@XZ */
1517 /* ?getloc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEBA?AVlocale@2@XZ */
1518 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_getloc, 8)
1519 locale* __thiscall basic_streambuf_wchar_getloc(const basic_streambuf_wchar *this, locale *ret)
1521 TRACE("(%p)\n", this);
1522 return locale_copy_ctor(ret, this->loc);
1525 /* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEXABVlocale@2@@Z */
1526 /* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAXAEBVlocale@2@@Z */
1527 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEXABVlocale@2@@Z */
1528 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAXAEBVlocale@2@@Z */
1529 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_imbue, 8)
1530 #define call_basic_streambuf_wchar_imbue(this, loc) CALL_VTBL_FUNC(this, 52, \
1531 void, (basic_streambuf_wchar*, const locale*), (this, loc))
1532 void __thiscall basic_streambuf_wchar_imbue(basic_streambuf_wchar *this, const locale *loc)
1534 TRACE("(%p %p)\n", this, loc);
1537 /* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
1538 /* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
1539 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1540 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1541 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_overflow, 8)
1542 #define call_basic_streambuf_wchar_overflow(this, ch) CALL_VTBL_FUNC(this, 4, \
1543 unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1544 unsigned short __thiscall basic_streambuf_wchar_overflow(basic_streambuf_wchar *this, unsigned short ch)
1546 TRACE("(%p %d)\n", this, ch);
1550 /* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
1551 /* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
1552 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1553 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1554 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbackfail, 8)
1555 #define call_basic_streambuf_wchar_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, \
1556 unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1557 unsigned short __thiscall basic_streambuf_wchar_pbackfail(basic_streambuf_wchar *this, unsigned short ch)
1559 TRACE("(%p %d)\n", this, ch);
1563 /* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1564 /* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1565 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1566 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1567 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbase, 4)
1568 wchar_t* __thiscall basic_streambuf_wchar_pbase(const basic_streambuf_wchar *this)
1570 TRACE("(%p)\n", this);
1571 return *this->pwbuf;
1574 /* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */
1575 /* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */
1576 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
1577 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
1578 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbump, 8)
1579 void __thiscall basic_streambuf_wchar_pbump(basic_streambuf_wchar *this, int off)
1581 TRACE("(%p %d)\n", this, off);
1582 *this->pwpos += off;
1583 *this->pwsize -= off;
1586 /* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1587 /* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1588 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1589 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1590 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pptr, 4)
1591 wchar_t* __thiscall basic_streambuf_wchar_pptr(const basic_streambuf_wchar *this)
1593 TRACE("(%p)\n", this);
1594 return *this->pwpos;
1597 /* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1598 /* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1599 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1600 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1601 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubimbue, 12)
1602 locale* __thiscall basic_streambuf_wchar_pubimbue(basic_streambuf_wchar *this, locale *ret, const locale *loc)
1604 TRACE("(%p %p)\n", this, loc);
1605 memcpy(ret, this->loc, sizeof(locale));
1606 call_basic_streambuf_wchar_imbue(this, loc);
1607 locale_copy_ctor(this->loc, loc);
1611 /* ?seekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1612 /* ?seekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1613 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1614 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1615 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekoff, 20)
1616 #define call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 36, \
1617 fpos_int*, (basic_streambuf_wchar*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
1618 fpos_int* __thiscall basic_streambuf_wchar_seekoff(basic_streambuf_wchar *this,
1619 fpos_int *ret, streamoff off, int way, int mode)
1621 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
1628 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
1629 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
1630 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
1631 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
1632 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekoff, 20)
1633 fpos_int* __thiscall basic_streambuf_wchar_pubseekoff(basic_streambuf_wchar *this,
1634 fpos_int *ret, streamoff off, int way, int mode)
1636 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
1637 return call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode);
1640 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */
1641 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */
1642 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */
1643 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */
1644 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekoff_old, 20)
1645 fpos_int* __thiscall basic_streambuf_wchar_pubseekoff_old(basic_streambuf_wchar *this,
1646 fpos_int *ret, streamoff off, unsigned int way, unsigned int mode)
1648 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
1649 return basic_streambuf_wchar_pubseekoff(this, ret, off, way, mode);
1652 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
1653 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
1654 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
1655 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
1656 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekpos, 36)
1657 #define call_basic_streambuf_wchar_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 40, \
1658 fpos_int*, (basic_streambuf_wchar*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
1659 fpos_int* __thiscall basic_streambuf_wchar_seekpos(basic_streambuf_wchar *this,
1660 fpos_int *ret, fpos_int pos, int mode)
1662 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
1669 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
1670 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
1671 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
1672 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
1673 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos, 36)
1674 fpos_int* __thiscall basic_streambuf_wchar_pubseekpos(basic_streambuf_wchar *this,
1675 fpos_int *ret, fpos_int pos, int mode)
1677 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
1678 return call_basic_streambuf_wchar_seekpos(this, ret, pos, mode);
1681 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
1682 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
1683 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
1684 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
1685 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos_old, 36)
1686 fpos_int* __thiscall basic_streambuf_wchar_pubseekpos_old(basic_streambuf_wchar *this,
1687 fpos_int *ret, fpos_int pos, unsigned int mode)
1689 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
1690 return basic_streambuf_wchar_pubseekpos(this, ret, pos, mode);
1693 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEPAV12@PA_WH@Z */
1694 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAPEAV12@PEA_W_J@Z */
1695 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEPAV12@PAGH@Z */
1696 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAPEAV12@PEAG_J@Z */
1697 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setbuf, 12)
1698 #define call_basic_streambuf_wchar_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 44, \
1699 basic_streambuf_wchar*, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, buf, count))
1700 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_setbuf(basic_streambuf_wchar *this, wchar_t *buf, streamsize count)
1702 TRACE("(%p %p %ld)\n", this, buf, count);
1706 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PA_WH@Z */
1707 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEA_W_J@Z */
1708 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PAGH@Z */
1709 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEAG_J@Z */
1710 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsetbuf, 12)
1711 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_pubsetbuf(basic_streambuf_wchar *this, wchar_t *buf, streamsize count)
1713 TRACE("(%p %p %ld)\n", this, buf, count);
1714 return call_basic_streambuf_wchar_setbuf(this, buf, count);
1717 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
1718 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAHXZ */
1719 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
1720 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */
1721 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sync, 4)
1722 #define call_basic_streambuf_wchar_sync(this) CALL_VTBL_FUNC(this, 48, \
1723 int, (basic_streambuf_wchar*), (this))
1724 int __thiscall basic_streambuf_wchar_sync(basic_streambuf_wchar *this)
1726 TRACE("(%p)\n", this);
1730 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
1731 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAHXZ */
1732 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
1733 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHXZ */
1734 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsync, 4)
1735 int __thiscall basic_streambuf_wchar_pubsync(basic_streambuf_wchar *this)
1737 TRACE("(%p)\n", this);
1738 return call_basic_streambuf_wchar_sync(this);
1741 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WH@Z */
1742 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_J@Z */
1743 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */
1744 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */
1745 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetn, 12)
1746 streamsize __thiscall basic_streambuf_wchar_sgetn(basic_streambuf_wchar *this, wchar_t *ptr, streamsize count)
1748 TRACE("(%p %p %ld)\n", this, ptr, count);
1749 return call_basic_streambuf_wchar__Xsgetn_s(this, ptr, -1, count);
1752 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
1753 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JXZ */
1754 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
1755 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JXZ */
1756 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_showmanyc, 4)
1757 #define call_basic_streambuf_wchar_showmanyc(this) CALL_VTBL_FUNC(this, 12, \
1758 streamsize, (basic_streambuf_wchar*), (this))
1759 streamsize __thiscall basic_streambuf_wchar_showmanyc(basic_streambuf_wchar *this)
1761 TRACE("(%p)\n", this);
1765 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
1766 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JXZ */
1767 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
1768 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JXZ */
1769 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_in_avail, 4)
1770 streamsize __thiscall basic_streambuf_wchar_in_avail(basic_streambuf_wchar *this)
1774 TRACE("(%p)\n", this);
1776 ret = basic_streambuf_wchar__Gnavail(this);
1777 return ret ? ret : call_basic_streambuf_wchar_showmanyc(this);
1780 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
1781 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
1782 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
1783 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
1784 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputbackc, 8)
1785 unsigned short __thiscall basic_streambuf_wchar_sputbackc(basic_streambuf_wchar *this, wchar_t ch)
1787 TRACE("(%p %d)\n", this, ch);
1788 if(*this->prpos && *this->prpos>*this->prbuf && (*this->prpos)[-1]==ch) {
1794 return call_basic_streambuf_wchar_pbackfail(this, ch);
1797 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
1798 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
1799 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
1800 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHG@Z */
1801 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputc, 8)
1802 unsigned short __thiscall basic_streambuf_wchar_sputc(basic_streambuf_wchar *this, wchar_t ch)
1804 TRACE("(%p %d)\n", this, ch);
1805 return basic_streambuf_wchar__Pnavail(this) ?
1806 (*basic_streambuf_wchar__Pninc(this) = ch) :
1807 call_basic_streambuf_wchar_overflow(this, ch);
1810 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
1811 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
1812 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1813 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1814 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sungetc, 4)
1815 unsigned short __thiscall basic_streambuf_wchar_sungetc(basic_streambuf_wchar *this)
1817 TRACE("(%p)\n", this);
1818 if(*this->prpos && *this->prpos>*this->prbuf) {
1821 return **this->prpos;
1824 return call_basic_streambuf_wchar_pbackfail(this, WEOF);
1827 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1828 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1829 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1830 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1831 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_stossc, 4)
1832 void __thiscall basic_streambuf_wchar_stossc(basic_streambuf_wchar *this)
1834 TRACE("(%p)\n", this);
1835 if(basic_streambuf_wchar__Gnavail(this))
1836 basic_streambuf_wchar__Gninc(this);
1838 call_basic_streambuf_wchar_uflow(this);
1841 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
1842 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
1843 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1844 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1845 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sbumpc, 4)
1846 unsigned short __thiscall basic_streambuf_wchar_sbumpc(basic_streambuf_wchar *this)
1848 TRACE("(%p)\n", this);
1849 return basic_streambuf_wchar__Gnavail(this) ?
1850 *basic_streambuf_wchar__Gninc(this) : call_basic_streambuf_wchar_uflow(this);
1853 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
1854 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
1855 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1856 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1857 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetc, 4)
1858 unsigned short __thiscall basic_streambuf_wchar_sgetc(basic_streambuf_wchar *this)
1860 TRACE("(%p)\n", this);
1861 return basic_streambuf_wchar__Gnavail(this) ?
1862 *basic_streambuf_wchar_gptr(this) : call_basic_streambuf_wchar_underflow(this);
1865 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
1866 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
1867 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1868 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1869 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_snextc, 4)
1870 unsigned short __thiscall basic_streambuf_wchar_snextc(basic_streambuf_wchar *this)
1872 TRACE("(%p)\n", this);
1874 if(basic_streambuf_wchar__Gnavail(this) > 1)
1875 return *basic_streambuf_wchar__Gnpreinc(this);
1876 return basic_streambuf_wchar_sbumpc(this)==WEOF ?
1877 WEOF : basic_streambuf_wchar_sgetc(this);
1880 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WH@Z */
1881 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_J@Z */
1882 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGH@Z */
1883 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_J@Z */
1884 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsgetn, 12)
1885 #define call_basic_streambuf_wchar_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, \
1886 streamsize, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, ptr, count))
1887 streamsize __thiscall basic_streambuf_wchar_xsgetn(basic_streambuf_wchar *this, wchar_t *ptr, streamsize count)
1889 TRACE("(%p %p %ld)\n", this, ptr, count);
1890 return call_basic_streambuf_wchar__Xsgetn_s(this, ptr, -1, count);
1893 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPB_WH@Z */
1894 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEB_W_J@Z */
1895 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPBGH@Z */
1896 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEBG_J@Z */
1897 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsputn, 12)
1898 #define call_basic_streambuf_wchar_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 32, \
1899 streamsize, (basic_streambuf_wchar*, const wchar_t*, streamsize), (this, ptr, count))
1900 streamsize __thiscall basic_streambuf_wchar_xsputn(basic_streambuf_wchar *this, const wchar_t *ptr, streamsize count)
1902 streamsize copied, chunk;
1904 TRACE("(%p %p %ld)\n", this, ptr, count);
1906 for(copied=0; copied<count;) {
1907 chunk = basic_streambuf_wchar__Pnavail(this);
1908 if(chunk > count-copied)
1909 chunk = count-copied;
1912 memcpy(*this->pwpos, ptr+copied, chunk);
1913 *this->pwpos += chunk;
1914 *this->pwsize -= chunk;
1916 }else if(call_basic_streambuf_wchar_overflow(this, ptr[copied]) != WEOF) {
1926 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPB_WH@Z */
1927 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEB_W_J@Z */
1928 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPBGH@Z */
1929 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEBG_J@Z */
1930 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputn, 12)
1931 streamsize __thiscall basic_streambuf_wchar_sputn(basic_streambuf_wchar *this, const wchar_t *ptr, streamsize count)
1933 TRACE("(%p %p %ld)\n", this, ptr, count);
1934 return call_basic_streambuf_wchar_xsputn(this, ptr, count);
1937 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
1938 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
1939 int basic_filebuf_char__Init__Stinit = 0;
1941 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
1942 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
1943 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Init, 12)
1944 void __thiscall basic_filebuf_char__Init(basic_filebuf_char *this, FILE *file, basic_filebuf__Initfl which)
1946 TRACE("(%p %p %d)\n", this, file, which);
1949 this->wrotesome = FALSE;
1950 this->state = basic_filebuf_char__Init__Stinit;
1951 this->close = (which == INITFL_open);
1954 basic_streambuf_char__Init_empty(&this->base);
1956 basic_streambuf_char__Init(&this->base, &file->_base, &file->_ptr,
1957 &file->_cnt, &file->_base, &file->_ptr, &file->_cnt);
1960 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAV?$codecvt@DDH@2@@Z */
1961 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$codecvt@DDH@2@@Z */
1962 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Initcvt, 8)
1963 void __thiscall basic_filebuf_char__Initcvt(basic_filebuf_char *this, codecvt_char *cvt)
1965 TRACE("(%p %p)\n", this, cvt);
1967 if(codecvt_base_always_noconv(&cvt->base)) {
1970 basic_streambuf_char__Init_empty(&this->base);
1975 /* ?_Endwrite@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAE_NXZ */
1976 /* ?_Endwrite@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAA_NXZ */
1977 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Endwrite, 4)
1978 MSVCP_bool __thiscall basic_filebuf_char__Endwrite(basic_filebuf_char *this)
1980 TRACE("(%p)\n", this);
1982 if(!this->wrotesome || !this->cvt)
1986 if(call_basic_streambuf_char_overflow(&this->base, EOF) == EOF)
1990 /* TODO: check if we need a dynamic buffer here */
1995 ret = codecvt_char_unshift(this->cvt, &this->state, buf, buf+sizeof(buf), &next);
1998 this->wrotesome = FALSE;
2000 case CODECVT_partial:
2001 if(!fwrite(buf, next-buf, 1, this->file))
2006 case CODECVT_noconv:
2007 if(call_basic_streambuf_char_overflow(&this->base, EOF) == EOF)
2016 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@XZ */
2017 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@XZ */
2018 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_close, 4)
2019 basic_filebuf_char* __thiscall basic_filebuf_char_close(basic_filebuf_char *this)
2021 basic_filebuf_char *ret = this;
2023 TRACE("(%p)\n", this);
2028 /* TODO: handle exceptions */
2029 if(!basic_filebuf_char__Endwrite(this))
2031 if(!fclose(this->file))
2034 basic_filebuf_char__Init(this, NULL, INITFL_close);
2038 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
2039 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
2040 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_file, 8)
2041 basic_filebuf_char* __thiscall basic_filebuf_char_ctor_file(basic_filebuf_char *this, FILE *file)
2043 TRACE("(%p %p)\n", this, file);
2045 basic_streambuf_char_ctor(&this->base);
2046 this->base.vtable = &MSVCP_basic_filebuf_char_vtable;
2048 basic_filebuf_char__Init(this, file, INITFL_new);
2052 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
2053 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
2054 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor, 4)
2055 basic_filebuf_char* __thiscall basic_filebuf_char_ctor(basic_filebuf_char *this)
2057 return basic_filebuf_char_ctor_file(this, NULL);
2060 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
2061 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
2062 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_uninitialized, 8)
2063 basic_filebuf_char* __thiscall basic_filebuf_char_ctor_uninitialized(basic_filebuf_char *this, int uninitialized)
2065 TRACE("(%p %d)\n", this, uninitialized);
2067 basic_streambuf_char_ctor(&this->base);
2068 this->base.vtable = &MSVCP_basic_filebuf_char_vtable;
2072 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
2073 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
2074 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_dtor, 4)
2075 void __thiscall basic_filebuf_char_dtor(basic_filebuf_char *this)
2077 TRACE("(%p)\n", this);
2080 basic_filebuf_char_close(this);
2081 basic_streambuf_char_dtor(&this->base);
2084 DEFINE_THISCALL_WRAPPER(MSVCP_basic_filebuf_char_vector_dtor, 8)
2085 basic_filebuf_char* __thiscall MSVCP_basic_filebuf_char_vector_dtor(basic_filebuf_char *this, unsigned int flags)
2087 TRACE("(%p %x)\n", this, flags);
2089 /* we have an array, with the number of elements stored before the first object */
2090 int i, *ptr = (int *)this-1;
2092 for(i=*ptr-1; i>=0; i--)
2093 basic_filebuf_char_dtor(this+i);
2094 MSVCRT_operator_delete(ptr);
2096 basic_filebuf_char_dtor(this);
2098 MSVCRT_operator_delete(this);
2104 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QBE_NXZ */
2105 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
2106 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_is_open, 4)
2107 MSVCP_bool __thiscall basic_filebuf_char_is_open(const basic_filebuf_char *this)
2109 TRACE("(%p)\n", this);
2110 return this->file != NULL;
2113 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PB_WHH@Z */
2114 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEB_WHH@Z */
2115 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBGHH@Z */
2116 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBGHH@Z */
2117 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_wchar, 16)
2118 basic_filebuf_char* __thiscall basic_filebuf_char_open_wchar(basic_filebuf_char *this, const wchar_t *name, int mode, int prot)
2120 static const wchar_t rW[] = {'r',0};
2121 static const struct {
2123 const wchar_t str[4];
2124 const wchar_t str_bin[4];
2126 {OPENMODE_out, {'w',0}, {'w','b',0}},
2127 {OPENMODE_out|OPENMODE_app, {'a',0}, {'a','b',0}},
2128 {OPENMODE_app, {'a',0}, {'a','b',0}},
2129 {OPENMODE_out|OPENMODE_trunc, {'w',0}, {'w','b',0}},
2130 {OPENMODE_in, {'r',0}, {'r','b',0}},
2131 {OPENMODE_in|OPENMODE_out, {'r','+',0}, {'r','+','b',0}},
2132 {OPENMODE_in|OPENMODE_out|OPENMODE_trunc, {'w','+',0}, {'w','+','b',0}},
2133 {OPENMODE_in|OPENMODE_out|OPENMODE_app, {'a','+',0}, {'a','+','b',0}},
2134 {OPENMODE_in|OPENMODE_app, {'a','+',0}, {'a','+','b',0}}
2137 int real_mode = mode & ~(OPENMODE_ate|OPENMODE__Nocreate|OPENMODE__Noreplace|OPENMODE_binary);
2141 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
2143 if(basic_filebuf_char_is_open(this))
2146 for(mode_idx=0; mode_idx<sizeof(str_mode)/sizeof(str_mode[0]); mode_idx++)
2147 if(str_mode[mode_idx].mode == real_mode)
2149 if(mode_idx == sizeof(str_mode)/sizeof(str_mode[0]))
2152 if((mode & OPENMODE__Nocreate) && !(f = _wfopen(name, rW)))
2157 if((mode & OPENMODE__Noreplace) && (mode & (OPENMODE_out|OPENMODE_app))
2158 && (f = _wfopen(name, rW))) {
2163 f = _wfsopen(name, (mode & OPENMODE_binary) ? str_mode[mode_idx].str_bin
2164 : str_mode[mode_idx].str, prot);
2168 if((mode & OPENMODE_ate) && fseek(f, 0, SEEK_END)) {
2173 basic_filebuf_char__Init(this, f, INITFL_open);
2174 basic_filebuf_char__Initcvt(this, codecvt_char_use_facet(this->base.loc));
2178 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PB_WI@Z */
2179 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEB_WI@Z */
2180 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBGI@Z */
2181 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBGI@Z */
2182 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_wchar_mode, 12)
2183 basic_filebuf_char* __thiscall basic_filebuf_char_open_wchar_mode(basic_filebuf_char *this, const wchar_t *name, unsigned int mode)
2185 return basic_filebuf_char_open_wchar(this, name, mode, SH_DENYNO);
2188 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDHH@Z */
2189 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDHH@Z */
2190 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open, 16)
2191 basic_filebuf_char* __thiscall basic_filebuf_char_open(basic_filebuf_char *this, const char *name, int mode, int prot)
2193 wchar_t nameW[FILENAME_MAX];
2195 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
2197 if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0)
2199 return basic_filebuf_char_open_wchar(this, nameW, mode, prot);
2202 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDI@Z */
2203 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDI@Z */
2204 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_mode, 12)
2205 basic_filebuf_char* __thiscall basic_filebuf_char_open_mode(basic_filebuf_char *this, const char *name, unsigned int mode)
2207 return basic_filebuf_char_open(this, name, mode, SH_DENYNO);
2210 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2211 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2212 #define call_basic_filebuf_char_overflow(this, c) CALL_VTBL_FUNC(this, 4, \
2213 int, (basic_filebuf_char*, int), (this, c))
2214 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_overflow, 8)
2215 int __thiscall basic_filebuf_char_overflow(basic_filebuf_char *this, int c)
2217 char buf[8], *dyn_buf;
2218 char ch = c, *to_next;
2219 const char *from_next;
2223 TRACE("(%p %d)\n", this, c);
2225 if(!basic_filebuf_char_is_open(this))
2231 return fwrite(&ch, sizeof(char), 1, this->file) ? c : EOF;
2235 ret = codecvt_char_out(this->cvt, &this->state, from_next, &ch+1,
2236 &from_next, buf, buf+sizeof(buf), &to_next);
2239 case CODECVT_partial:
2244 if(!fwrite(buf, to_next-buf, 1, this->file))
2246 if(ret == CODECVT_partial)
2249 case CODECVT_noconv:
2250 return fwrite(&ch, sizeof(char), 1, this->file) ? c : EOF;
2256 max_size = codecvt_base_max_length(&this->cvt->base);
2257 dyn_buf = malloc(max_size);
2261 ret = codecvt_char_out(this->cvt, &this->state, from_next, &ch+1,
2262 &from_next, dyn_buf, dyn_buf+max_size, &to_next);
2266 ret = fwrite(dyn_buf, to_next-dyn_buf, 1, this->file);
2268 return ret ? c : EOF;
2269 case CODECVT_partial:
2270 ERR("buffer should be big enough to store all output\n");
2278 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2279 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2280 #define call_basic_filebuf_char_pbackfail(this, c) CALL_VTBL_FUNC(this, 8, \
2281 int, (basic_filebuf_char*, int), (this, c))
2282 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_pbackfail, 8)
2283 int __thiscall basic_filebuf_char_pbackfail(basic_filebuf_char *this, int c)
2285 TRACE("(%p %d)\n", this, c);
2287 if(!basic_filebuf_char_is_open(this))
2290 if(basic_streambuf_char_gptr(&this->base)>basic_streambuf_char_eback(&this->base)
2291 && (c==EOF || basic_streambuf_char_gptr(&this->base)[-1]==(char)c)) {
2292 basic_streambuf_char__Gndec(&this->base);
2293 return c==EOF ? !c : c;
2294 }else if(c!=EOF && !this->cvt) {
2295 return ungetc(c, this->file);
2301 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2302 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2303 #define call_basic_filebuf_char_uflow(this) CALL_VTBL_FUNC(this, 20, \
2304 int, (basic_filebuf_char*), (this))
2305 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_uflow, 4)
2306 int __thiscall basic_filebuf_char_uflow(basic_filebuf_char *this)
2308 char ch, buf[128], *to_next;
2309 const char *buf_next;
2312 TRACE("(%p)\n", this);
2314 if(!basic_filebuf_char_is_open(this))
2317 if(basic_streambuf_char_gptr(&this->base) < basic_streambuf_char_egptr(&this->base))
2318 return *basic_streambuf_char__Gninc(&this->base);
2320 c = fgetc(this->file);
2321 if(!this->cvt || !c)
2325 for(i=0; i < sizeof(buf)/sizeof(char); i++) {
2328 switch(codecvt_char_in(this->cvt, &this->state, buf_next,
2329 buf+i+1, &buf_next, &ch, &ch+1, &to_next)) {
2330 case CODECVT_partial:
2332 if(to_next == &ch) {
2333 c = fgetc(this->file);
2339 for(i--; i>=buf_next-buf; i--)
2340 ungetc(buf[i], this->file);
2342 case CODECVT_noconv:
2349 FIXME("buffer is to small\n");
2353 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2354 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2355 #define call_basic_filebuf_char_underflow(this) CALL_VTBL_FUNC(this, 16, \
2356 int, (basic_filebuf_char*), (this))
2357 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_underflow, 4)
2358 int __thiscall basic_filebuf_char_underflow(basic_filebuf_char *this)
2362 TRACE("(%p)\n", this);
2364 if(basic_streambuf_char_gptr(&this->base) < basic_streambuf_char_egptr(&this->base))
2365 return *basic_streambuf_char_gptr(&this->base);
2367 ret = call_basic_filebuf_char_uflow(this);
2369 ret = call_basic_filebuf_char_pbackfail(this, ret);
2373 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
2374 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
2375 #define call_basic_filebuf_char_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 36, \
2376 fpos_int*, (basic_filebuf_char*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
2377 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekoff, 20)
2378 fpos_int* __thiscall basic_filebuf_char_seekoff(basic_filebuf_char *this,
2379 fpos_int *ret, streamoff off, int way, int mode)
2383 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
2385 if(!basic_filebuf_char_is_open(this) || !basic_filebuf_char__Endwrite(this)
2386 || fseek(this->file, off, way)) {
2393 fgetpos(this->file, &pos);
2396 ret->state = this->state;
2400 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2401 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2402 #define call_basic_filebuf_char_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 40, \
2403 fpos_int*, (basic_filebuf_char*, fpos_int*, fpos_int, mode), (this, ret, pos, mode))
2404 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekpos, 36)
2405 fpos_int* __thiscall basic_filebuf_char_seekpos(basic_filebuf_char *this,
2406 fpos_int *ret, fpos_int pos, int mode)
2410 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
2412 if(!basic_filebuf_char_is_open(this) || !basic_filebuf_char__Endwrite(this)
2413 || fseek(this->file, (LONG)pos.pos, SEEK_SET)
2414 || (pos.off && fseek(this->file, pos.off, SEEK_CUR))) {
2421 fgetpos(this->file, &fpos);
2424 ret->state = this->state;
2428 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PADH@Z */
2429 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAD_J@Z */
2430 #define call_basic_filebuf_char_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 44, \
2431 basic_streambuf_char*, (basic_filebuf_char*, char*, streamsize), (this, buf, count))
2432 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_setbuf, 12)
2433 basic_streambuf_char* __thiscall basic_filebuf_char_setbuf(basic_filebuf_char *this, char *buf, streamsize count)
2435 TRACE("(%p %p %ld)\n", this, buf, count);
2437 if(!basic_filebuf_char_is_open(this))
2440 if(setvbuf(this->file, buf, (buf==NULL && count==0) ? _IONBF : _IOFBF, count))
2443 basic_filebuf_char__Init(this, this->file, INITFL_open);
2447 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2448 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2449 #define call_basic_filebuf_char_sync(this) CALL_VTBL_FUNC(this, 48, \
2450 int, (basic_filebuf_char*), (this))
2451 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_sync, 4)
2452 int __thiscall basic_filebuf_char_sync(basic_filebuf_char *this)
2454 TRACE("(%p)\n", this);
2456 if(!basic_filebuf_char_is_open(this))
2459 if(call_basic_filebuf_char_overflow(this, EOF) == EOF)
2461 return fflush(this->file);
2464 /* ?imbue@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
2465 /* ?imbue@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */
2466 #define call_basic_filebuf_char_imbue(this, loc) CALL_VTBL_FUNC(this, 52, \
2467 void, (basic_filebuf_char*, const locale*), (this, loc))
2468 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_imbue, 8)
2469 void __thiscall basic_filebuf_char_imbue(basic_filebuf_char *this, const locale *loc)
2471 TRACE("(%p %p)\n", this, loc);
2472 basic_filebuf_char__Initcvt(this, codecvt_char_use_facet(loc));
2475 /* ??0ios_base@std@@IAE@XZ */
2476 /* ??0ios_base@std@@IEAA@XZ */
2477 DEFINE_THISCALL_WRAPPER(ios_base_ctor, 4)
2478 ios_base* __thiscall ios_base_ctor(ios_base *this)
2480 TRACE("(%p)\n", this);
2481 this->vtable = &MSVCP_ios_base_vtable;
2485 /* ??0ios_base@std@@QAE@ABV01@@Z */
2486 /* ??0ios_base@std@@QEAA@AEBV01@@Z */
2487 DEFINE_THISCALL_WRAPPER(ios_base_copy_ctor, 8)
2488 ios_base* __thiscall ios_base_copy_ctor(ios_base *this, const ios_base *copy)
2490 TRACE("(%p %p)\n", this, copy);
2492 this->vtable = &MSVCP_ios_base_vtable;
2496 /* ?_Callfns@ios_base@std@@AAEXW4event@12@@Z */
2497 /* ?_Callfns@ios_base@std@@AEAAXW4event@12@@Z */
2498 DEFINE_THISCALL_WRAPPER(ios_base_Callfns, 8)
2499 void __thiscall ios_base_Callfns(ios_base *this, IOS_BASE_event event)
2501 IOS_BASE_fnarray *cur;
2503 TRACE("(%p %x)\n", this, event);
2505 for(cur=this->calls; cur; cur=cur->next)
2506 cur->event_handler(event, this, cur->index);
2509 /* ?_Tidy@ios_base@std@@AAAXXZ */
2510 /* ?_Tidy@ios_base@std@@AEAAXXZ */
2511 void CDECL ios_base_Tidy(ios_base *this)
2513 IOS_BASE_iosarray *arr_cur, *arr_next;
2514 IOS_BASE_fnarray *event_cur, *event_next;
2516 TRACE("(%p)\n", this);
2518 ios_base_Callfns(this, EVENT_erase_event);
2520 for(arr_cur=this->arr; arr_cur; arr_cur=arr_next) {
2521 arr_next = arr_cur->next;
2522 MSVCRT_operator_delete(arr_cur);
2526 for(event_cur=this->calls; event_cur; event_cur=event_next) {
2527 event_next = event_cur->next;
2528 MSVCRT_operator_delete(event_cur);
2533 /* ?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z */
2534 /* ?_Ios_base_dtor@ios_base@std@@CAXPEAV12@@Z */
2535 void CDECL ios_base_Ios_base_dtor(ios_base *obj)
2537 TRACE("(%p)\n", obj);
2539 locale_dtor(obj->loc);
2540 MSVCRT_operator_delete(obj->loc);
2545 /* ??1ios_base@std@@UAE@XZ */
2546 /* ??1ios_base@std@@UEAA@XZ */
2547 DEFINE_THISCALL_WRAPPER(ios_base_dtor, 4)
2548 void __thiscall ios_base_dtor(ios_base *this)
2550 ios_base_Ios_base_dtor(this);
2553 DEFINE_THISCALL_WRAPPER(MSVCP_ios_base_vector_dtor, 8)
2554 ios_base* __thiscall MSVCP_ios_base_vector_dtor(ios_base *this, unsigned int flags)
2556 TRACE("(%p %x)\n", this, flags);
2558 /* we have an array, with the number of elements stored before the first object */
2559 int i, *ptr = (int *)this-1;
2561 for(i=*ptr-1; i>=0; i--)
2562 ios_base_dtor(this+i);
2563 MSVCRT_operator_delete(ptr);
2565 ios_base_dtor(this);
2567 MSVCRT_operator_delete(this);
2573 DEFINE_THISCALL_WRAPPER(MSVCP_iosb_vector_dtor, 8)
2574 void* __thiscall MSVCP_iosb_vector_dtor(void *this, unsigned int flags)
2576 TRACE("(%p %x)\n", this, flags);
2578 int *ptr = (int *)this-1;
2579 MSVCRT_operator_delete(ptr);
2582 MSVCRT_operator_delete(this);
2588 /* ?_Findarr@ios_base@std@@AAEAAU_Iosarray@12@H@Z */
2589 /* ?_Findarr@ios_base@std@@AEAAAEAU_Iosarray@12@H@Z */
2590 DEFINE_THISCALL_WRAPPER(ios_base_Findarr, 8)
2591 IOS_BASE_iosarray* __thiscall ios_base_Findarr(ios_base *this, int index)
2593 IOS_BASE_iosarray *p;
2595 TRACE("(%p %d)\n", this, index);
2597 for(p=this->arr; p; p=p->next) {
2598 if(p->index == index)
2602 for(p=this->arr; p; p=p->next) {
2603 if(!p->long_val && !p->ptr_val) {
2609 p = MSVCRT_operator_new(sizeof(IOS_BASE_iosarray));
2610 p->next = this->arr;
2618 /* ?iword@ios_base@std@@QAEAAJH@Z */
2619 /* ?iword@ios_base@std@@QEAAAEAJH@Z */
2620 DEFINE_THISCALL_WRAPPER(ios_base_iword, 8)
2621 LONG* __thiscall ios_base_iword(ios_base *this, int index)
2623 TRACE("(%p %d)\n", this, index);
2624 return &ios_base_Findarr(this, index)->long_val;
2627 /* ?pword@ios_base@std@@QAEAAPAXH@Z */
2628 /* ?pword@ios_base@std@@QEAAAEAPEAXH@Z */
2629 DEFINE_THISCALL_WRAPPER(ios_base_pword, 8)
2630 void** __thiscall ios_base_pword(ios_base *this, int index)
2632 TRACE("(%p %d)\n", this, index);
2633 return &ios_base_Findarr(this, index)->ptr_val;
2636 /* ?register_callback@ios_base@std@@QAEXP6AXW4event@12@AAV12@H@ZH@Z */
2637 /* ?register_callback@ios_base@std@@QEAAXP6AXW4event@12@AEAV12@H@ZH@Z */
2638 DEFINE_THISCALL_WRAPPER(ios_base_register_callback, 12)
2639 void __thiscall ios_base_register_callback(ios_base *this, IOS_BASE_event_callback callback, int index)
2641 IOS_BASE_fnarray *event;
2643 TRACE("(%p %p %d)\n", this, callback, index);
2645 event = MSVCRT_operator_new(sizeof(IOS_BASE_fnarray));
2646 event->next = this->calls;
2647 event->index = index;
2648 event->event_handler = callback;
2649 this->calls = event;
2652 /* ?clear@ios_base@std@@QAEXH_N@Z */
2653 /* ?clear@ios_base@std@@QEAAXH_N@Z */
2654 DEFINE_THISCALL_WRAPPER(ios_base_clear_reraise, 12)
2655 void __thiscall ios_base_clear_reraise(ios_base *this, IOSB_iostate state, MSVCP_bool reraise)
2657 TRACE("(%p %x %x)\n", this, state, reraise);
2659 this->state = state & IOSTATE_mask;
2660 if(!(this->state & this->except))
2664 throw_exception(EXCEPTION_RERAISE, NULL);
2665 else if(this->state & this->except & IOSTATE_eofbit)
2666 throw_exception(EXCEPTION_FAILURE, "eofbit is set");
2667 else if(this->state & this->except & IOSTATE_failbit)
2668 throw_exception(EXCEPTION_FAILURE, "failbit is set");
2669 else if(this->state & this->except & IOSTATE_badbit)
2670 throw_exception(EXCEPTION_FAILURE, "badbit is set");
2671 else if(this->state & this->except & IOSTATE__Hardfail)
2672 throw_exception(EXCEPTION_FAILURE, "_Hardfail is set");
2675 /* ?clear@ios_base@std@@QAEXH@Z */
2676 /* ?clear@ios_base@std@@QEAAXH@Z */
2677 DEFINE_THISCALL_WRAPPER(ios_base_clear, 8)
2678 void __thiscall ios_base_clear(ios_base *this, IOSB_iostate state)
2680 ios_base_clear_reraise(this, state, FALSE);
2683 /* ?clear@ios_base@std@@QAEXI@Z */
2684 /* ?clear@ios_base@std@@QEAAXI@Z */
2685 DEFINE_THISCALL_WRAPPER(ios_base_clear_unsigned, 8)
2686 void __thiscall ios_base_clear_unsigned(ios_base *this, unsigned int state)
2688 ios_base_clear_reraise(this, (IOSB_iostate)state, FALSE);
2691 /* ?exceptions@ios_base@std@@QAEXH@Z */
2692 /* ?exceptions@ios_base@std@@QEAAXH@Z */
2693 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_set, 8)
2694 void __thiscall ios_base_exceptions_set(ios_base *this, IOSB_iostate state)
2696 TRACE("(%p %x)\n", this, state);
2697 this->except = state & IOSTATE_mask;
2698 ios_base_clear(this, this->state);
2701 /* ?exceptions@ios_base@std@@QAEXI@Z */
2702 /* ?exceptions@ios_base@std@@QEAAXI@Z */
2703 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_set_unsigned, 8)
2704 void __thiscall ios_base_exceptions_set_unsigned(ios_base *this, unsigned int state)
2706 TRACE("(%p %x)\n", this, state);
2707 ios_base_exceptions_set(this, state);
2710 /* ?exceptions@ios_base@std@@QBEHXZ */
2711 /* ?exceptions@ios_base@std@@QEBAHXZ */
2712 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_get, 4)
2713 IOSB_iostate __thiscall ios_base_exceptions_get(ios_base *this)
2715 TRACE("(%p)\n", this);
2716 return this->except;
2719 /* ?copyfmt@ios_base@std@@QAEAAV12@ABV12@@Z */
2720 /* ?copyfmt@ios_base@std@@QEAAAEAV12@AEBV12@@Z */
2721 DEFINE_THISCALL_WRAPPER(ios_base_copyfmt, 8)
2722 ios_base* __thiscall ios_base_copyfmt(ios_base *this, const ios_base *rhs)
2724 TRACE("(%p %p)\n", this, rhs);
2727 IOS_BASE_iosarray *arr_cur;
2728 IOS_BASE_fnarray *event_cur;
2730 ios_base_Tidy(this);
2732 for(arr_cur=rhs->arr; arr_cur; arr_cur=arr_cur->next) {
2733 if(arr_cur->long_val)
2734 *ios_base_iword(this, arr_cur->index) = arr_cur->long_val;
2735 if(arr_cur->ptr_val)
2736 *ios_base_pword(this, arr_cur->index) = arr_cur->ptr_val;
2738 this->stdstr = rhs->stdstr;
2739 this->fmtfl = rhs->fmtfl;
2740 this->prec = rhs->prec;
2741 this->wide = rhs->wide;
2742 locale_operator_assign(this->loc, rhs->loc);
2744 for(event_cur=rhs->calls; event_cur; event_cur=event_cur->next)
2745 ios_base_register_callback(this, event_cur->event_handler, event_cur->index);
2747 ios_base_Callfns(this, EVENT_copyfmt_event);
2748 ios_base_exceptions_set(this, rhs->except);
2754 /* ??4ios_base@std@@QAEAAV01@ABV01@@Z */
2755 /* ??4ios_base@std@@QEAAAEAV01@AEBV01@@Z */
2756 DEFINE_THISCALL_WRAPPER(ios_base_assign, 8)
2757 ios_base* __thiscall ios_base_assign(ios_base *this, const ios_base *right)
2759 TRACE("(%p %p)\n", this, right);
2762 this->state = right->state;
2763 ios_base_copyfmt(this, right);
2769 /* ?fail@ios_base@std@@QBE_NXZ */
2770 /* ?fail@ios_base@std@@QEBA_NXZ */
2771 DEFINE_THISCALL_WRAPPER(ios_base_fail, 4)
2772 MSVCP_bool __thiscall ios_base_fail(const ios_base *this)
2774 TRACE("(%p)\n", this);
2775 return (this->state & (IOSTATE_failbit|IOSTATE_badbit)) != 0;
2778 /* ??7ios_base@std@@QBE_NXZ */
2779 /* ??7ios_base@std@@QEBA_NXZ */
2780 DEFINE_THISCALL_WRAPPER(ios_base_op_succ, 4)
2781 MSVCP_bool __thiscall ios_base_op_succ(const ios_base *this)
2783 TRACE("(%p)\n", this);
2784 return ios_base_fail(this);
2787 /* ??Bios_base@std@@QBEPAXXZ */
2788 /* ??Bios_base@std@@QEBAPEAXXZ */
2789 DEFINE_THISCALL_WRAPPER(ios_base_op_fail, 4)
2790 void* __thiscall ios_base_op_fail(const ios_base *this)
2792 TRACE("(%p)\n", this);
2793 return ios_base_fail(this) ? NULL : (void*)this;
2796 /* ?_Addstd@ios_base@std@@SAXPAV12@@Z */
2797 /* ?_Addstd@ios_base@std@@SAXPEAV12@@Z */
2798 void CDECL ios_base_Addstd(ios_base *add)
2800 FIXME("(%p) stub\n", add);
2803 /* ?_Index_func@ios_base@std@@CAAAHXZ */
2804 /* ?_Index_func@ios_base@std@@CAAEAHXZ */
2805 int* CDECL ios_base_Index_func(void)
2808 return &ios_base_Index;
2811 /* ?_Init@ios_base@std@@IAEXXZ */
2812 /* ?_Init@ios_base@std@@IEAAXXZ */
2813 DEFINE_THISCALL_WRAPPER(ios_base_Init, 4)
2814 void __thiscall ios_base_Init(ios_base *this)
2816 TRACE("(%p)\n", this);
2819 this->state = this->except = IOSTATE_goodbit;
2820 this->fmtfl = FMTFLAG_skipws | FMTFLAG_dec;
2825 this->loc = MSVCRT_operator_new(sizeof(locale));
2826 locale_ctor(this->loc);
2829 /* ?_Sync_func@ios_base@std@@CAAA_NXZ */
2830 /* ?_Sync_func@ios_base@std@@CAAEA_NXZ */
2831 MSVCP_bool* CDECL ios_base_Sync_func(void)
2834 return &ios_base_Sync;
2837 /* ?bad@ios_base@std@@QBE_NXZ */
2838 /* ?bad@ios_base@std@@QEBA_NXZ */
2839 DEFINE_THISCALL_WRAPPER(ios_base_bad, 4)
2840 MSVCP_bool __thiscall ios_base_bad(const ios_base *this)
2842 TRACE("(%p)\n", this);
2843 return (this->state & IOSTATE_badbit) != 0;
2846 /* ?eof@ios_base@std@@QBE_NXZ */
2847 /* ?eof@ios_base@std@@QEBA_NXZ */
2848 DEFINE_THISCALL_WRAPPER(ios_base_eof, 4)
2849 MSVCP_bool __thiscall ios_base_eof(const ios_base *this)
2851 TRACE("(%p)\n", this);
2852 return (this->state & IOSTATE_eofbit) != 0;
2855 /* ?flags@ios_base@std@@QAEHH@Z */
2856 /* ?flags@ios_base@std@@QEAAHH@Z */
2857 DEFINE_THISCALL_WRAPPER(ios_base_flags_set, 8)
2858 IOSB_fmtflags __thiscall ios_base_flags_set(ios_base *this, IOSB_fmtflags flags)
2860 IOSB_fmtflags ret = this->fmtfl;
2862 TRACE("(%p %x)\n", this, flags);
2864 this->fmtfl = flags & FMTFLAG_mask;
2868 /* ?flags@ios_base@std@@QBEHXZ */
2869 /* ?flags@ios_base@std@@QEBAHXZ */
2870 DEFINE_THISCALL_WRAPPER(ios_base_flags_get, 4)
2871 IOSB_fmtflags __thiscall ios_base_flags_get(const ios_base *this)
2873 TRACE("(%p)\n", this);
2877 /* ?getloc@ios_base@std@@QBE?AVlocale@2@XZ */
2878 /* ?getloc@ios_base@std@@QEBA?AVlocale@2@XZ */
2879 DEFINE_THISCALL_WRAPPER(ios_base_getloc, 8)
2880 locale* __thiscall ios_base_getloc(const ios_base *this, locale *ret)
2882 TRACE("(%p)\n", this);
2883 return locale_copy_ctor(ret, this->loc);
2886 /* ?good@ios_base@std@@QBE_NXZ */
2887 /* ?good@ios_base@std@@QEBA_NXZ */
2888 DEFINE_THISCALL_WRAPPER(ios_base_good, 4)
2889 MSVCP_bool __thiscall ios_base_good(const ios_base *this)
2891 TRACE("(%p)\n", this);
2892 return this->state == IOSTATE_goodbit;
2895 /* ?imbue@ios_base@std@@QAE?AVlocale@2@ABV32@@Z */
2896 /* ?imbue@ios_base@std@@QEAA?AVlocale@2@AEBV32@@Z */
2897 DEFINE_THISCALL_WRAPPER(ios_base_imbue, 12)
2898 locale* __thiscall ios_base_imbue(ios_base *this, locale *ret, const locale *loc)
2900 TRACE("(%p %p)\n", this, loc);
2902 locale_copy_ctor(this->loc, loc);
2906 /* ?precision@ios_base@std@@QAEHH@Z */
2907 /* ?precision@ios_base@std@@QEAA_J_J@Z */
2908 DEFINE_THISCALL_WRAPPER(ios_base_precision_set, 8)
2909 streamsize __thiscall ios_base_precision_set(ios_base *this, streamsize precision)
2911 streamsize ret = this->prec;
2913 TRACE("(%p %ld)\n", this, precision);
2915 this->prec = precision;
2919 /* ?precision@ios_base@std@@QBEHXZ */
2920 /* ?precision@ios_base@std@@QEBA_JXZ */
2921 DEFINE_THISCALL_WRAPPER(ios_base_precision_get, 4)
2922 streamsize __thiscall ios_base_precision_get(const ios_base *this)
2924 TRACE("(%p)\n", this);
2928 /* ?rdstate@ios_base@std@@QBEHXZ */
2929 /* ?rdstate@ios_base@std@@QEBAHXZ */
2930 DEFINE_THISCALL_WRAPPER(ios_base_rdstate, 4)
2931 IOSB_iostate __thiscall ios_base_rdstate(const ios_base *this)
2933 TRACE("(%p)\n", this);
2937 /* ?setf@ios_base@std@@QAEHHH@Z */
2938 /* ?setf@ios_base@std@@QEAAHHH@Z */
2939 DEFINE_THISCALL_WRAPPER(ios_base_setf_mask, 12)
2940 IOSB_fmtflags __thiscall ios_base_setf_mask(ios_base *this, IOSB_fmtflags flags, IOSB_fmtflags mask)
2942 IOSB_fmtflags ret = this->fmtfl;
2944 TRACE("(%p %x %x)\n", this, flags, mask);
2946 this->fmtfl = (this->fmtfl & (~mask)) | (flags & mask & FMTFLAG_mask);
2950 /* ?setf@ios_base@std@@QAEHH@Z */
2951 /* ?setf@ios_base@std@@QEAAHH@Z */
2952 DEFINE_THISCALL_WRAPPER(ios_base_setf, 8)
2953 IOSB_fmtflags __thiscall ios_base_setf(ios_base *this, IOSB_fmtflags flags)
2955 return ios_base_setf_mask(this, flags, ~0);
2958 /* ?setstate@ios_base@std@@QAEXH_N@Z */
2959 /* ?setstate@ios_base@std@@QEAAXH_N@Z */
2960 DEFINE_THISCALL_WRAPPER(ios_base_setstate_reraise, 12)
2961 void __thiscall ios_base_setstate_reraise(ios_base *this, IOSB_iostate state, MSVCP_bool reraise)
2963 TRACE("(%p %x %x)\n", this, state, reraise);
2965 if(state != IOSTATE_goodbit)
2966 ios_base_clear_reraise(this, this->state | state, reraise);
2969 /* ?setstate@ios_base@std@@QAEXH@Z */
2970 /* ?setstate@ios_base@std@@QEAAXH@Z */
2971 DEFINE_THISCALL_WRAPPER(ios_base_setstate, 8)
2972 void __thiscall ios_base_setstate(ios_base *this, IOSB_iostate state)
2974 ios_base_setstate_reraise(this, state, FALSE);
2977 /* ?setstate@ios_base@std@@QAEXI@Z */
2978 /* ?setstate@ios_base@std@@QEAAXI@Z */
2979 DEFINE_THISCALL_WRAPPER(ios_base_setstate_unsigned, 8)
2980 void __thiscall ios_base_setstate_unsigned(ios_base *this, unsigned int state)
2982 ios_base_setstate_reraise(this, (IOSB_iostate)state, FALSE);
2985 /* ?sync_with_stdio@ios_base@std@@SA_N_N@Z */
2986 MSVCP_bool CDECL ios_base_sync_with_stdio(MSVCP_bool sync)
2991 TRACE("(%x)\n", sync);
2993 _Lockit_ctor_locktype(&lock, _LOCK_STREAM);
2994 ret = ios_base_Sync;
2995 ios_base_Sync = sync;
2996 _Lockit_dtor(&lock);
3000 /* ?unsetf@ios_base@std@@QAEXH@Z */
3001 /* ?unsetf@ios_base@std@@QEAAXH@Z */
3002 DEFINE_THISCALL_WRAPPER(ios_base_unsetf, 8)
3003 void __thiscall ios_base_unsetf(ios_base *this, IOSB_fmtflags flags)
3005 TRACE("(%p %x)\n", this, flags);
3006 this->fmtfl &= ~flags;
3009 /* ?width@ios_base@std@@QAEHH@Z */
3010 /* ?width@ios_base@std@@QEAA_J_J@Z */
3011 DEFINE_THISCALL_WRAPPER(ios_base_width_set, 8)
3012 streamsize __thiscall ios_base_width_set(ios_base *this, streamsize width)
3014 streamsize ret = this->wide;
3016 TRACE("(%p %ld)\n", this, width);
3022 /* ?width@ios_base@std@@QBEHXZ */
3023 /* ?width@ios_base@std@@QEBA_JXZ */
3024 DEFINE_THISCALL_WRAPPER(ios_base_width_get, 4)
3025 streamsize __thiscall ios_base_width_get(ios_base *this)
3027 TRACE("(%p)\n", this);
3031 /* ?xalloc@ios_base@std@@SAHXZ */
3032 int CDECL ios_base_xalloc(void)
3039 _Lockit_ctor_locktype(&lock, _LOCK_STREAM);
3040 ret = ios_base_Index++;
3041 _Lockit_dtor(&lock);
3045 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IAE@XZ */
3046 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IEAA@XZ */
3047 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor, 4)
3048 basic_ios_char* __thiscall basic_ios_char_ctor(basic_ios_char *this)
3050 TRACE("(%p)\n", this);
3052 ios_base_ctor(&this->base);
3053 this->base.vtable = &MSVCP_basic_ios_char_vtable;
3057 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IAEXPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
3058 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
3059 DEFINE_THISCALL_WRAPPER(basic_ios_char_init, 12)
3060 void __thiscall basic_ios_char_init(basic_ios_char *this, basic_streambuf_char *streambuf, MSVCP_bool isstd)
3062 TRACE("(%p %p %x)\n", this, streambuf, isstd);
3063 ios_base_Init(&this->base);
3064 this->strbuf = streambuf;
3065 this->stream = NULL;
3069 ios_base_setstate(&this->base, IOSTATE_badbit);
3072 FIXME("standard streams not handled yet\n");
3075 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
3076 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
3077 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor_streambuf, 8)
3078 basic_ios_char* __thiscall basic_ios_char_ctor_streambuf(basic_ios_char *this, basic_streambuf_char *strbuf)
3080 TRACE("(%p %p)\n", this, strbuf);
3082 basic_ios_char_ctor(this);
3083 basic_ios_char_init(this, strbuf, FALSE);
3087 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UAE@XZ */
3088 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UEAA@XZ */
3089 DEFINE_THISCALL_WRAPPER(basic_ios_char_dtor, 4)
3090 void __thiscall basic_ios_char_dtor(basic_ios_char *this)
3092 TRACE("(%p)\n", this);
3093 ios_base_dtor(&this->base);
3096 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ios_char_vector_dtor, 8)
3097 basic_ios_char* __thiscall MSVCP_basic_ios_char_vector_dtor(basic_ios_char *this, unsigned int flags)
3099 TRACE("(%p %x)\n", this, flags);
3101 /* we have an array, with the number of elements stored before the first object */
3102 int i, *ptr = (int *)this-1;
3104 for(i=*ptr-1; i>=0; i--)
3105 basic_ios_char_dtor(this+i);
3106 MSVCRT_operator_delete(ptr);
3108 basic_ios_char_dtor(this);
3110 MSVCRT_operator_delete(this);
3116 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
3117 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
3118 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear_reraise, 12)
3119 void __thiscall basic_ios_char_clear_reraise(basic_ios_char *this, IOSB_iostate state, MSVCP_bool reraise)
3121 TRACE("(%p %x %x)\n", this, state, reraise);
3122 ios_base_clear_reraise(&this->base, state | (this->strbuf ? IOSTATE_goodbit : IOSTATE_badbit), reraise);
3125 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
3126 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
3127 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear, 8)
3128 void __thiscall basic_ios_char_clear(basic_ios_char *this, unsigned int state)
3130 basic_ios_char_clear_reraise(this, (IOSB_iostate)state, FALSE);
3133 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEAAV12@ABV12@@Z */
3134 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEBV12@@Z */
3135 DEFINE_THISCALL_WRAPPER(basic_ios_char_copyfmt, 8)
3136 basic_ios_char* __thiscall basic_ios_char_copyfmt(basic_ios_char *this, basic_ios_char *copy)
3138 TRACE("(%p %p)\n", this, copy);
3142 this->stream = copy->stream;
3143 this->fillch = copy->fillch;
3144 ios_base_copyfmt(&this->base, ©->base);
3148 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEDD@Z */
3149 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAADD@Z */
3150 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_set, 8)
3151 char __thiscall basic_ios_char_fill_set(basic_ios_char *this, char fill)
3153 char ret = this->fillch;
3155 TRACE("(%p %c)\n", this, fill);
3157 this->fillch = fill;
3161 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDXZ */
3162 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADXZ */
3163 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_get, 4)
3164 char __thiscall basic_ios_char_fill_get(basic_ios_char *this)
3166 TRACE("(%p)\n", this);
3167 return this->fillch;
3170 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
3171 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
3172 DEFINE_THISCALL_WRAPPER(basic_ios_char_imbue, 12)
3173 locale *__thiscall basic_ios_char_imbue(basic_ios_char *this, locale *ret, const locale *loc)
3175 TRACE("(%p %p %p)\n", this, ret, loc);
3178 return basic_streambuf_char_pubimbue(this->strbuf, ret, loc);
3180 locale_copy_ctor(ret, loc);
3184 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDDD@Z */
3185 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADDD@Z */
3186 DEFINE_THISCALL_WRAPPER(basic_ios_char_narrow, 12)
3187 char __thiscall basic_ios_char_narrow(basic_ios_char *this, char ch, char def)
3189 FIXME("(%p %c %c) stub\n", this, ch, def);
3193 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PAV32@@Z */
3194 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAV32@@Z */
3195 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_set, 8)
3196 basic_streambuf_char* __thiscall basic_ios_char_rdbuf_set(basic_ios_char *this, basic_streambuf_char *streambuf)
3198 basic_streambuf_char *ret = this->strbuf;
3200 TRACE("(%p %p)\n", this, streambuf);
3202 this->strbuf = streambuf;
3203 basic_ios_char_clear(this, IOSTATE_goodbit);
3207 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
3208 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
3209 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_get, 4)
3210 basic_streambuf_char* __thiscall basic_ios_char_rdbuf_get(const basic_ios_char *this)
3212 TRACE("(%p)\n", this);
3213 return this->strbuf;
3216 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
3217 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
3218 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate_reraise, 12)
3219 void __thiscall basic_ios_char_setstate_reraise(basic_ios_char *this, IOSB_iostate state, MSVCP_bool reraise)
3221 TRACE("(%p %x %x)\n", this, state, reraise);
3223 if(state != IOSTATE_goodbit)
3224 basic_ios_char_clear_reraise(this, this->base.state | state, reraise);
3227 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
3228 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
3229 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate, 8)
3230 void __thiscall basic_ios_char_setstate(basic_ios_char *this, unsigned int state)
3232 basic_ios_char_setstate_reraise(this, (IOSB_iostate)state, FALSE);
3235 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@PAV32@@Z */
3236 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@PEAV32@@Z */
3237 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_set, 8)
3238 basic_ostream_char* __thiscall basic_ios_char_tie_set(basic_ios_char *this, basic_ostream_char *ostream)
3240 basic_ostream_char *ret = this->stream;
3242 TRACE("(%p %p)\n", this, ostream);
3244 this->stream = ostream;
3248 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
3249 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
3250 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_get, 4)
3251 basic_ostream_char* __thiscall basic_ios_char_tie_get(const basic_ios_char *this)
3253 TRACE("(%p)\n", this);
3254 return this->stream;
3257 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDD@Z */
3258 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADD@Z */
3259 DEFINE_THISCALL_WRAPPER(basic_ios_char_widen, 8)
3260 char __thiscall basic_ios_char_widen(basic_ios_char *this, char ch)
3262 FIXME("(%p %c) stub\n", this, ch);
3267 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAE@XZ */
3268 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */
3269 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_ctor, 4)
3270 basic_ios_wchar* __thiscall basic_ios_wchar_ctor(basic_ios_wchar *this)
3272 TRACE("(%p)\n", this);
3274 ios_base_ctor(&this->base);
3275 this->base.vtable = &MSVCP_basic_ios_wchar_vtable;
3279 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IAE@XZ */
3280 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IEAA@XZ */
3281 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor, 4)
3282 basic_ios_wchar* __thiscall basic_ios_short_ctor(basic_ios_wchar *this)
3284 basic_ios_wchar_ctor(this);
3285 this->base.vtable = &MSVCP_basic_ios_short_vtable;
3289 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAEXPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
3290 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAAXPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
3291 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IAEXPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
3292 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IEAAXPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
3293 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_init, 12)
3294 void __thiscall basic_ios_wchar_init(basic_ios_wchar *this, basic_streambuf_wchar *streambuf, MSVCP_bool isstd)
3296 TRACE("(%p %p %x)\n", this, streambuf, isstd);
3297 ios_base_Init(&this->base);
3298 this->strbuf = streambuf;
3299 this->stream = NULL;
3303 ios_base_setstate(&this->base, IOSTATE_badbit);
3306 FIXME("standard streams not handled yet\n");
3309 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
3310 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
3311 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_ctor_streambuf, 8)
3312 basic_ios_wchar* __thiscall basic_ios_wchar_ctor_streambuf(basic_ios_wchar *this, basic_streambuf_wchar *strbuf)
3314 TRACE("(%p %p)\n", this, strbuf);
3316 basic_ios_wchar_ctor(this);
3317 basic_ios_wchar_init(this, strbuf, FALSE);
3321 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
3322 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
3323 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor_streambuf, 8)
3324 basic_ios_wchar* __thiscall basic_ios_short_ctor_streambuf(basic_ios_wchar *this, basic_streambuf_wchar *strbuf)
3326 basic_ios_wchar_ctor_streambuf(this, strbuf);
3327 this->base.vtable = &MSVCP_basic_ios_short_vtable;
3331 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
3332 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
3333 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UAE@XZ */
3334 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UEAA@XZ */
3335 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_dtor, 4)
3336 void __thiscall basic_ios_wchar_dtor(basic_ios_wchar *this)
3338 TRACE("(%p)\n", this);
3339 ios_base_dtor(&this->base);
3342 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ios_wchar_vector_dtor, 8)
3343 basic_ios_wchar* __thiscall MSVCP_basic_ios_wchar_vector_dtor(basic_ios_wchar *this, unsigned int flags)
3345 TRACE("(%p %x)\n", this, flags);
3347 /* we have an array, with the number of elements stored before the first object */
3348 int i, *ptr = (int *)this-1;
3350 for(i=*ptr-1; i>=0; i--)
3351 basic_ios_wchar_dtor(this+i);
3352 MSVCRT_operator_delete(ptr);
3354 basic_ios_wchar_dtor(this);
3356 MSVCRT_operator_delete(this);
3362 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ios_short_vector_dtor, 8)
3363 basic_ios_wchar* __thiscall MSVCP_basic_ios_short_vector_dtor(basic_ios_wchar *this, unsigned int flags)
3365 return MSVCP_basic_ios_wchar_vector_dtor(this, flags);
3368 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
3369 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
3370 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
3371 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
3372 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_clear_reraise, 12)
3373 void __thiscall basic_ios_wchar_clear_reraise(basic_ios_wchar *this, IOSB_iostate state, MSVCP_bool reraise)
3375 TRACE("(%p %x %x)\n", this, state, reraise);
3376 ios_base_clear_reraise(&this->base, state | (this->strbuf ? IOSTATE_goodbit : IOSTATE_badbit), reraise);
3379 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
3380 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
3381 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
3382 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
3383 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_clear, 8)
3384 void __thiscall basic_ios_wchar_clear(basic_ios_wchar *this, unsigned int state)
3386 basic_ios_wchar_clear_reraise(this, (IOSB_iostate)state, FALSE);
3389 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEAAV12@ABV12@@Z */
3390 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEBV12@@Z */
3391 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEAAV12@ABV12@@Z */
3392 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEBV12@@Z */
3393 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_copyfmt, 8)
3394 basic_ios_wchar* __thiscall basic_ios_wchar_copyfmt(basic_ios_wchar *this, basic_ios_wchar *copy)
3396 TRACE("(%p %p)\n", this, copy);
3400 this->stream = copy->stream;
3401 this->fillch = copy->fillch;
3402 ios_base_copyfmt(&this->base, ©->base);
3406 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE_W_W@Z */
3407 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA_W_W@Z */
3408 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEGG@Z */
3409 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
3410 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_set, 8)
3411 wchar_t __thiscall basic_ios_wchar_fill_set(basic_ios_wchar *this, wchar_t fill)
3413 wchar_t ret = this->fillch;
3415 TRACE("(%p %c)\n", this, fill);
3417 this->fillch = fill;
3421 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WXZ */
3422 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WXZ */
3423 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGXZ */
3424 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGXZ */
3425 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_get, 4)
3426 wchar_t __thiscall basic_ios_wchar_fill_get(basic_ios_wchar *this)
3428 TRACE("(%p)\n", this);
3429 return this->fillch;
3432 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
3433 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
3434 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
3435 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
3436 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_imbue, 12)
3437 locale *__thiscall basic_ios_wchar_imbue(basic_ios_wchar *this, locale *ret, const locale *loc)
3439 TRACE("(%p %p %p)\n", this, ret, loc);
3442 return basic_streambuf_wchar_pubimbue(this->strbuf, ret, loc);
3444 locale_copy_ctor(ret, loc);
3448 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBED_WD@Z */
3449 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAD_WD@Z */
3450 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEDGD@Z */
3451 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBADGD@Z */
3452 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_narrow, 12)
3453 char __thiscall basic_ios_wchar_narrow(basic_ios_wchar *this, wchar_t ch, char def)
3455 FIXME("(%p %c %c) stub\n", this, ch, def);
3459 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
3460 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
3461 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAV32@@Z */
3462 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAV32@@Z */
3463 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_set, 8)
3464 basic_streambuf_wchar* __thiscall basic_ios_wchar_rdbuf_set(basic_ios_wchar *this, basic_streambuf_wchar *streambuf)
3466 basic_streambuf_wchar *ret = this->strbuf;
3468 TRACE("(%p %p)\n", this, streambuf);
3470 this->strbuf = streambuf;
3471 basic_ios_wchar_clear(this, IOSTATE_goodbit);
3475 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
3476 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
3477 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
3478 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
3479 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_get, 4)
3480 basic_streambuf_wchar* __thiscall basic_ios_wchar_rdbuf_get(const basic_ios_wchar *this)
3482 TRACE("(%p)\n", this);
3483 return this->strbuf;
3486 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
3487 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
3488 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
3489 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
3490 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_setstate_reraise, 12)
3491 void __thiscall basic_ios_wchar_setstate_reraise(basic_ios_wchar *this, IOSB_iostate state, MSVCP_bool reraise)
3493 TRACE("(%p %x %x)\n", this, state, reraise);
3495 if(state != IOSTATE_goodbit)
3496 basic_ios_wchar_clear_reraise(this, this->base.state | state, reraise);
3499 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
3500 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
3501 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
3502 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
3503 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_setstate, 8)
3504 void __thiscall basic_ios_wchar_setstate(basic_ios_wchar *this, IOSB_iostate state)
3506 basic_ios_wchar_setstate_reraise(this, state, FALSE);
3509 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
3510 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
3511 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@PAV32@@Z */
3512 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@PEAV32@@Z */
3513 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_set, 8)
3514 basic_ostream_wchar* __thiscall basic_ios_wchar_tie_set(basic_ios_wchar *this, basic_ostream_wchar *ostream)
3516 basic_ostream_wchar *ret = this->stream;
3518 TRACE("(%p %p)\n", this, ostream);
3520 this->stream = ostream;
3524 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
3525 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
3526 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
3527 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
3528 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_get, 4)
3529 basic_ostream_wchar* __thiscall basic_ios_wchar_tie_get(const basic_ios_wchar *this)
3531 TRACE("(%p)\n", this);
3532 return this->stream;
3535 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WD@Z */
3536 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WD@Z */
3537 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGD@Z */
3538 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGD@Z */
3539 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_widen, 8)
3540 wchar_t __thiscall basic_ios_wchar_widen(basic_ios_wchar *this, char ch)
3542 FIXME("(%p %c)\n", this, ch);
3546 /* Caution: basic_ostream uses virtual inheritance.
3547 * All constructors have additional parameter that says if base class should be initialized.
3548 * Base class needs to be accessed using vbtable.
3550 static inline basic_ios_char* basic_ostream_char_get_basic_ios(basic_ostream_char *this)
3552 return (basic_ios_char*)((char*)this+this->vbtable[1]);
3555 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
3556 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
3557 DEFINE_THISCALL_WRAPPER(basic_ostream_char_ctor, 16)
3558 basic_ostream_char* __thiscall basic_ostream_char_ctor(basic_ostream_char *this,
3559 basic_streambuf_char *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
3561 basic_ios_char *base;
3563 TRACE("(%p %p %d %d)\n", this, strbuf, isstd, virt_init);
3566 this->vbtable = basic_ostream_char_vbtable;
3567 base = basic_ostream_char_get_basic_ios(this);
3568 basic_ios_char_ctor(base);
3570 base = basic_ostream_char_get_basic_ios(this);
3573 base->base.vtable = &MSVCP_basic_ostream_char_vtable;
3574 basic_ios_char_init(base, strbuf, isstd);
3578 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */
3579 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */
3580 DEFINE_THISCALL_WRAPPER(basic_ostream_char_ctor_uninitialized, 16)
3581 basic_ostream_char* __thiscall basic_ostream_char_ctor_uninitialized(basic_ostream_char *this,
3582 int uninitialized, MSVCP_bool addstd, MSVCP_bool virt_init)
3584 basic_ios_char *base;
3586 TRACE("(%p %d %x)\n", this, uninitialized, addstd);
3589 this->vbtable = basic_ostream_char_vbtable;
3590 base = basic_ostream_char_get_basic_ios(this);
3591 basic_ios_char_ctor(base);
3593 base = basic_ostream_char_get_basic_ios(this);
3596 base->base.vtable = &MSVCP_basic_ostream_char_vtable;
3598 ios_base_Addstd(&base->base);
3602 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
3603 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
3604 DEFINE_THISCALL_WRAPPER(basic_ostream_char_dtor, 4)
3605 void __thiscall basic_ostream_char_dtor(basic_ostream_char *this)
3607 /* don't destroy virtual base here */
3608 TRACE("(%p)\n", this);
3611 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
3612 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
3613 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vbase_dtor, 4)
3614 void __thiscall basic_ostream_char_vbase_dtor(basic_ostream_char *this)
3616 TRACE("(%p)\n", this);
3617 basic_ostream_char_dtor(this);
3618 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(this));
3621 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ostream_char_vector_dtor, 8)
3622 basic_ostream_char* __thiscall MSVCP_basic_ostream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
3624 basic_ostream_char *this = (basic_ostream_char *)((char*)base - basic_ostream_char_vbtable[1] + basic_ostream_char_vbtable[0]);
3626 TRACE("(%p %x)\n", this, flags);
3629 /* we have an array, with the number of elements stored before the first object */
3630 int i, *ptr = (int *)this-1;
3632 for(i=*ptr-1; i>=0; i--)
3633 basic_ostream_char_vbase_dtor(this+i);
3634 MSVCRT_operator_delete(ptr);
3636 basic_ostream_char_vbase_dtor(this);
3638 MSVCRT_operator_delete(this);
3644 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
3645 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
3646 DEFINE_THISCALL_WRAPPER(basic_ostream_char_flush, 4)
3647 basic_ostream_char* __thiscall basic_ostream_char_flush(basic_ostream_char *this)
3649 /* this function is not matching C++ specification */
3650 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
3652 TRACE("(%p)\n", this);
3654 if(basic_ios_char_rdbuf_get(base) && ios_base_good(&base->base)
3655 && basic_streambuf_char_pubsync(basic_ios_char_rdbuf_get(base))==-1)
3656 basic_ios_char_setstate(base, IOSTATE_badbit);
3660 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
3661 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
3662 DEFINE_THISCALL_WRAPPER(basic_ostream_char__Osfx, 4)
3663 void __thiscall basic_ostream_char__Osfx(basic_ostream_char *this)
3665 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
3667 TRACE("(%p)\n", this);
3669 if(base->base.fmtfl & FMTFLAG_unitbuf)
3670 basic_ostream_char_flush(this);
3673 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
3674 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
3675 DEFINE_THISCALL_WRAPPER(basic_ostream_char_osfx, 4)
3676 void __thiscall basic_ostream_char_osfx(basic_ostream_char *this)
3678 TRACE("(%p)\n", this);
3679 basic_ostream_char__Osfx(this);
3682 static BOOL basic_ostream_char_sentry_create(basic_ostream_char *ostr)
3684 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
3686 if(basic_ios_char_rdbuf_get(base))
3687 basic_streambuf_char__Lock(base->strbuf);
3689 if(ios_base_good(&base->base) && base->stream)
3690 basic_ostream_char_flush(base->stream);
3692 return ios_base_good(&base->base);
3695 static void basic_ostream_char_sentry_destroy(basic_ostream_char *ostr)
3697 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
3699 if(ios_base_good(&base->base) && !__uncaught_exception())
3700 basic_ostream_char_osfx(ostr);
3702 if(basic_ios_char_rdbuf_get(base))
3703 basic_streambuf_char__Unlock(base->strbuf);
3706 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE_NXZ */
3707 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA_NXZ */
3708 DEFINE_THISCALL_WRAPPER(basic_ostream_char_opfx, 4)
3709 MSVCP_bool __thiscall basic_ostream_char_opfx(basic_ostream_char *this)
3711 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
3713 TRACE("(%p)\n", this);
3715 if(ios_base_good(&base->base) && base->stream)
3716 basic_ostream_char_flush(base->stream);
3717 return ios_base_good(&base->base);
3720 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
3721 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
3722 DEFINE_THISCALL_WRAPPER(basic_ostream_char_put, 8)
3723 basic_ostream_char* __thiscall basic_ostream_char_put(basic_ostream_char *this, char ch)
3725 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
3727 TRACE("(%p %c)\n", this, ch);
3729 if(!basic_ostream_char_sentry_create(this)
3730 || basic_streambuf_char_sputc(base->strbuf, ch)==EOF) {
3731 basic_ostream_char_sentry_destroy(this);
3732 basic_ios_char_setstate(base, IOSTATE_badbit);
3736 basic_ostream_char_sentry_destroy(this);
3740 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@JH@Z */
3741 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
3742 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp, 12)
3743 basic_ostream_char* __thiscall basic_ostream_char_seekp(basic_ostream_char *this, streamoff off, int way)
3745 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
3747 TRACE("(%p %ld %d)\n", this, off, way);
3749 if(!ios_base_fail(&base->base)) {
3752 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base),
3753 &seek, off, way, OPENMODE_out);
3754 if(seek.off==0 && seek.pos==-1 && seek.state==0)
3755 basic_ios_char_setstate(base, IOSTATE_failbit);
3760 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
3761 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
3762 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp_fpos, 28)
3763 basic_ostream_char* __thiscall basic_ostream_char_seekp_fpos(basic_ostream_char *this, fpos_int pos)
3765 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
3767 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
3769 if(!ios_base_fail(&base->base)) {
3772 basic_streambuf_char_pubseekpos(basic_ios_char_rdbuf_get(base),
3773 &seek, pos, OPENMODE_out);
3774 if(seek.off==0 && seek.pos==-1 && seek.state==0)
3775 basic_ios_char_setstate(base, IOSTATE_failbit);
3780 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
3781 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
3782 DEFINE_THISCALL_WRAPPER(basic_ostream_char_tellp, 8)
3783 fpos_int* __thiscall basic_ostream_char_tellp(basic_ostream_char *this, fpos_int *ret)
3785 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
3787 TRACE("(%p)\n", this);
3789 if(!ios_base_fail(&base->base)) {
3790 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base),
3791 ret, 0, SEEKDIR_cur, OPENMODE_out);
3800 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@PBDH@Z */
3801 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEBD_J@Z */
3802 DEFINE_THISCALL_WRAPPER(basic_ostream_char_write, 12)
3803 basic_ostream_char* __thiscall basic_ostream_char_write(basic_ostream_char *this, const char *str, streamsize count)
3805 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
3807 TRACE("(%p %s %ld)\n", this, debugstr_a(str), count);
3809 if(!basic_ostream_char_sentry_create(this)
3810 || basic_streambuf_char_sputn(base->strbuf, str, count)!=count) {
3811 basic_ostream_char_sentry_destroy(this);
3812 basic_ios_char_setstate(base, IOSTATE_badbit);
3816 basic_ostream_char_sentry_destroy(this);
3820 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@F@Z */
3821 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@F@Z */
3822 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_short, 8)
3823 basic_ostream_char* __thiscall basic_ostream_char_print_short(basic_ostream_char *this, short val)
3825 FIXME("(%p %d) stub\n", this, val);
3829 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@G@Z */
3830 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@G@Z */
3831 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ushort, 8)
3832 basic_ostream_char* __thiscall basic_ostream_char_print_ushort(basic_ostream_char *this, unsigned short val)
3834 FIXME("(%p %d) stub\n", this, val);
3838 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z */
3839 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@H@Z */
3840 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int, 8)
3841 basic_ostream_char* __thiscall basic_ostream_char_print_int(basic_ostream_char *this, int val)
3843 FIXME("(%p %d) stub\n", this, val);
3847 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@I@Z */
3848 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@I@Z */
3849 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint, 8)
3850 basic_ostream_char* __thiscall basic_ostream_char_print_uint(basic_ostream_char *this, unsigned int val)
3852 FIXME("(%p %d) stub\n", this, val);
3856 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z */
3857 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@J@Z */
3858 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_long, 8)
3859 basic_ostream_char* __thiscall basic_ostream_char_print_long(basic_ostream_char *this, LONG val)
3861 FIXME("(%p %d) stub\n", this, val);
3865 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z */
3866 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@K@Z */
3867 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ulong, 8)
3868 basic_ostream_char* __thiscall basic_ostream_char_print_ulong(basic_ostream_char *this, ULONG val)
3870 FIXME("(%p %d) stub\n", this, val);
3874 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@M@Z */
3875 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@M@Z */
3876 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_float, 8)
3877 basic_ostream_char* __thiscall basic_ostream_char_print_float(basic_ostream_char *this, float val)
3879 FIXME("(%p %f) stub\n", this, val);
3883 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@N@Z */
3884 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@N@Z */
3885 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_double, 12)
3886 basic_ostream_char* __thiscall basic_ostream_char_print_double(basic_ostream_char *this, double val)
3888 FIXME("(%p %lf) stub\n", this, val);
3892 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
3893 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
3894 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_streambuf, 8)
3895 basic_ostream_char* __thiscall basic_ostream_char_print_streambuf(basic_ostream_char *this, basic_streambuf_char *val)
3897 FIXME("(%p %p) stub\n", this, val);
3901 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PBX@Z */
3902 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEBX@Z */
3903 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ptr, 8)
3904 basic_ostream_char* __thiscall basic_ostream_char_print_ptr(basic_ostream_char *this, const void *val)
3906 FIXME("(%p %p) stub\n", this, val);
3910 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_J@Z */
3911 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_J@Z */
3912 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int64, 12)
3913 basic_ostream_char* __thiscall basic_ostream_char_print_int64(basic_ostream_char *this, __int64 val)
3915 FIXME("(%p) stub\n", this);
3919 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_K@Z */
3920 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_K@Z */
3921 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint64, 12)
3922 basic_ostream_char* __thiscall basic_ostream_char_print_uint64(basic_ostream_char *this, unsigned __int64 val)
3924 FIXME("(%p) stub\n", this);
3928 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_N@Z */
3929 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_N@Z */
3930 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_bool, 8)
3931 basic_ostream_char* __thiscall basic_ostream_char_print_bool(basic_ostream_char *this, MSVCP_bool val)
3933 FIXME("(%p %x) stub\n", this, val);
3937 /* ?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
3938 /* ?endl@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
3939 basic_ostream_char* __cdecl basic_ostream_char_endl(basic_ostream_char *ostr)
3941 TRACE("(%p)\n", ostr);
3943 basic_ostream_char_put(ostr, '\n');
3944 basic_ostream_char_flush(ostr);
3948 /* $?6DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
3949 /* ??$?6DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
3950 basic_ostream_char* __cdecl basic_ostream_char_print_bstr(basic_ostream_char *ostr, const basic_string_char *str)
3952 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
3953 IOSB_iostate state = IOSTATE_goodbit;
3955 TRACE("(%p %p)\n", ostr, str);
3957 if(basic_ostream_char_sentry_create(ostr)) {
3958 MSVCP_size_t len = MSVCP_basic_string_char_length(str);
3959 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
3961 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
3962 for(; pad!=0; pad--) {
3963 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
3964 state = IOSTATE_badbit;
3970 if(state == IOSTATE_goodbit) {
3971 if(basic_streambuf_char_sputn(base->strbuf, MSVCP_basic_string_char_c_str(str), len) != len)
3972 state = IOSTATE_badbit;
3975 for(; pad!=0; pad--) {
3976 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
3977 state = IOSTATE_badbit;
3982 base->base.wide = 0;
3984 state = IOSTATE_badbit;
3986 basic_ostream_char_sentry_destroy(ostr);
3988 basic_ios_char_setstate(base, state);
3992 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
3993 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
3994 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func, 8)
3995 basic_ostream_char* __thiscall basic_ostream_char_print_func(basic_ostream_char *this,
3996 basic_ostream_char* (__cdecl *pfunc)(basic_ostream_char*))
3998 TRACE("(%p %p)\n", this, pfunc);
4003 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
4004 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
4005 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_basic_ios, 8)
4006 basic_ostream_char* __thiscall basic_ostream_char_print_func_basic_ios(basic_ostream_char *this,
4007 basic_ios_char* (__cdecl *pfunc)(basic_ios_char*))
4009 TRACE("(%p %p)\n", this, pfunc);
4010 pfunc(basic_ostream_char_get_basic_ios(this));
4014 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
4015 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
4016 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_ios_base, 8)
4017 basic_ostream_char* __thiscall basic_ostream_char_print_func_ios_base(
4018 basic_ostream_char *this, ios_base* (__cdecl *pfunc)(ios_base*))
4020 TRACE("(%p %p)\n", this, pfunc);
4021 pfunc(&basic_ostream_char_get_basic_ios(this)->base);
4025 /* Caution: basic_istream uses virtual inheritance. */
4026 static inline basic_ios_char* basic_istream_char_get_basic_ios(basic_istream_char *this)
4028 return (basic_ios_char*)((char*)this+this->vbtable[1]);
4031 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
4032 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
4033 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_init, 20)
4034 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)
4036 basic_ios_char *base;
4038 TRACE("(%p %p %d %d %d)\n", this, strbuf, isstd, noinit, virt_init);
4041 this->vbtable = basic_istream_char_vbtable;
4042 base = basic_istream_char_get_basic_ios(this);
4043 basic_ios_char_ctor(base);
4045 base = basic_istream_char_get_basic_ios(this);
4048 base->base.vtable = &MSVCP_basic_istream_char_vtable;
4051 basic_ios_char_init(base, strbuf, isstd);
4055 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
4056 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
4057 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor, 16)
4058 basic_istream_char* __thiscall basic_istream_char_ctor(basic_istream_char *this, basic_streambuf_char *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
4060 return basic_istream_char_ctor_init(this, strbuf, isstd, FALSE, virt_init);
4063 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
4064 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
4065 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_uninitialized, 12)
4066 basic_istream_char* __thiscall basic_istream_char_ctor_uninitialized(basic_istream_char *this, int uninitialized, MSVCP_bool virt_init)
4068 basic_ios_char *base;
4070 TRACE("(%p %d %d)\n", this, uninitialized, virt_init);
4073 this->vbtable = basic_istream_char_vbtable;
4074 base = basic_istream_char_get_basic_ios(this);
4075 basic_ios_char_ctor(base);
4077 base = basic_istream_char_get_basic_ios(this);
4080 base->base.vtable = &MSVCP_basic_istream_char_vtable;
4081 ios_base_Addstd(&base->base);
4085 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UAE@XZ */
4086 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
4087 DEFINE_THISCALL_WRAPPER(basic_istream_char_dtor, 4)
4088 void __thiscall basic_istream_char_dtor(basic_istream_char *this)
4090 /* don't destroy virtual base here */
4091 TRACE("(%p)\n", this);
4094 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
4095 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
4096 DEFINE_THISCALL_WRAPPER(basic_istream_char_vbase_dtor, 4)
4097 void __thiscall basic_istream_char_vbase_dtor(basic_istream_char *this)
4099 TRACE("(%p)\n", this);
4100 basic_istream_char_dtor(this);
4101 basic_ios_char_dtor(basic_istream_char_get_basic_ios(this));
4104 DEFINE_THISCALL_WRAPPER(MSVCP_basic_istream_char_vector_dtor, 8)
4105 basic_istream_char* __thiscall MSVCP_basic_istream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
4107 basic_istream_char *this = (basic_istream_char *)((char*)base - basic_istream_char_vbtable[1] + basic_istream_char_vbtable[0]);
4109 TRACE("(%p %x)\n", this, flags);
4112 /* we have an array, with the number of elements stored before the first object */
4113 int i, *ptr = (int *)this-1;
4115 for(i=*ptr-1; i>=0; i--)
4116 basic_istream_char_vbase_dtor(this+i);
4117 MSVCRT_operator_delete(ptr);
4119 basic_istream_char_vbase_dtor(this);
4121 MSVCRT_operator_delete(this);
4127 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
4128 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
4129 DEFINE_THISCALL_WRAPPER(basic_istream_char__Ipfx, 8)
4130 MSVCP_bool __thiscall basic_istream_char__Ipfx(basic_istream_char *this, MSVCP_bool noskip)
4132 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
4134 TRACE("(%p %d)\n", this, noskip);
4136 if(!ios_base_good(&base->base)) {
4137 basic_ios_char_setstate(base, IOSTATE_failbit);
4141 if(basic_ios_char_tie_get(base))
4142 basic_ostream_char_flush(basic_ios_char_tie_get(base));
4144 if(!noskip && (ios_base_flags_get(&base->base) & FMTFLAG_skipws)) {
4145 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
4146 const ctype_char *ctype = ctype_char_use_facet(base->strbuf->loc);
4149 for(ch = basic_streambuf_char_sgetc(strbuf); ;
4150 ch = basic_streambuf_char_snextc(strbuf)) {
4152 basic_ios_char_setstate(base, IOSTATE_eofbit);
4156 if(!ctype_char_is_ch(ctype, _SPACE|_BLANK, ch))
4164 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
4165 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
4166 DEFINE_THISCALL_WRAPPER(basic_istream_char_ipfx, 8)
4167 MSVCP_bool __thiscall basic_istream_char_ipfx(basic_istream_char *this, MSVCP_bool noskip)
4169 return basic_istream_char__Ipfx(this, noskip);
4172 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
4173 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
4174 DEFINE_THISCALL_WRAPPER(basic_istream_char_isfx, 4)
4175 void __thiscall basic_istream_char_isfx(basic_istream_char *this)
4177 TRACE("(%p)\n", this);
4180 static BOOL basic_istream_char_sentry_create(basic_istream_char *istr, MSVCP_bool noskip)
4182 basic_ios_char *base = basic_istream_char_get_basic_ios(istr);
4184 if(basic_ios_char_rdbuf_get(base))
4185 basic_streambuf_char__Lock(base->strbuf);
4187 return basic_istream_char_ipfx(istr, noskip);
4190 static void basic_istream_char_sentry_destroy(basic_istream_char *istr)
4192 basic_ios_char *base = basic_istream_char_get_basic_ios(istr);
4194 if(basic_ios_char_rdbuf_get(base))
4195 basic_streambuf_char__Unlock(base->strbuf);
4198 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QBEHXZ */
4199 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QEBA_JXZ */
4200 DEFINE_THISCALL_WRAPPER(basic_istream_char_gcount, 4)
4201 int __thiscall basic_istream_char_gcount(const basic_istream_char *this)
4203 TRACE("(%p)\n", this);
4207 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
4208 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
4209 DEFINE_THISCALL_WRAPPER(basic_istream_char_get, 4)
4210 int __thiscall basic_istream_char_get(basic_istream_char *this)
4212 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
4215 TRACE("(%p)\n", this);
4219 if(!basic_istream_char_sentry_create(this, TRUE)) {
4220 basic_istream_char_sentry_destroy(this);
4224 ret = basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(base));
4225 basic_istream_char_sentry_destroy(this);
4227 basic_ios_char_setstate(base, IOSTATE_eofbit|IOSTATE_failbit);
4234 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAD@Z */
4235 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAD@Z */
4236 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_ch, 8)
4237 basic_istream_char* __thiscall basic_istream_char_get_ch(basic_istream_char *this, char *ch)
4241 TRACE("(%p %p)\n", this, ch);
4243 ret = basic_istream_char_get(this);
4249 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
4250 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
4251 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str_delim, 16)
4252 basic_istream_char* __thiscall basic_istream_char_get_str_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)) {
4262 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
4264 for(ch = basic_streambuf_char_sgetc(strbuf); count>1;
4265 ch = basic_streambuf_char_snextc(strbuf)) {
4266 if(ch==EOF || ch==delim)
4274 basic_istream_char_sentry_destroy(this);
4276 basic_ios_char_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
4277 (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
4283 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
4284 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
4285 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str, 12)
4286 basic_istream_char* __thiscall basic_istream_char_get_str(basic_istream_char *this, char *str, streamsize count)
4288 return basic_istream_char_get_str_delim(this, str, count, '\n');
4291 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
4292 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
4293 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf_delim, 12)
4294 basic_istream_char* __thiscall basic_istream_char_get_streambuf_delim(basic_istream_char *this, basic_streambuf_char *strbuf, char delim)
4296 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
4299 TRACE("(%p %p %c)\n", this, strbuf, delim);
4303 if(basic_istream_char_sentry_create(this, TRUE)) {
4304 basic_streambuf_char *strbuf_read = basic_ios_char_rdbuf_get(base);
4306 for(ch = basic_streambuf_char_sgetc(strbuf_read); ;
4307 ch = basic_streambuf_char_snextc(strbuf_read)) {
4308 if(ch==EOF || ch==delim)
4311 if(basic_streambuf_char_sputc(strbuf, ch) == EOF)
4316 basic_istream_char_sentry_destroy(this);
4318 basic_ios_char_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
4319 (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
4323 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
4324 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
4325 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf, 8)
4326 basic_istream_char* __thiscall basic_istream_char_get_streambuf(basic_istream_char *this, basic_streambuf_char *strbuf)
4328 return basic_istream_char_get_streambuf_delim(this, strbuf, '\n');
4331 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
4332 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
4333 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline_delim, 16)
4334 basic_istream_char* __thiscall basic_istream_char_getline_delim(basic_istream_char *this, char *str, streamsize count, char delim)
4336 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
4339 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
4343 if(basic_istream_char_sentry_create(this, TRUE) && count>0) {
4344 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
4347 ch = basic_streambuf_char_sbumpc(strbuf);
4349 if(ch==EOF || ch==delim)
4359 else if(ch != EOF) {
4360 ch = basic_streambuf_char_sgetc(strbuf);
4363 basic_streambuf_char__Gninc(strbuf);
4368 basic_istream_char_sentry_destroy(this);
4370 basic_ios_char_setstate(base, (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit) |
4371 (!this->count || (ch!=delim && ch!=EOF) ? IOSTATE_failbit : IOSTATE_goodbit));
4377 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
4378 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
4379 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline, 12)
4380 basic_istream_char* __thiscall basic_istream_char_getline(basic_istream_char *this, char *str, streamsize count)
4382 return basic_istream_char_getline_delim(this, str, count, '\n');
4385 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@HH@Z */
4386 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
4387 DEFINE_THISCALL_WRAPPER(basic_istream_char_ignore, 12)
4388 basic_istream_char* __thiscall basic_istream_char_ignore(basic_istream_char *this, streamsize count, int delim)
4390 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
4393 TRACE("(%p %ld %d)\n", this, count, delim);
4397 if(basic_istream_char_sentry_create(this, TRUE)) {
4398 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
4401 ch = basic_streambuf_char_sbumpc(strbuf);
4403 if(ch==EOF || ch==delim)
4407 if(count != INT_MAX)
4411 basic_istream_char_sentry_destroy(this);
4414 basic_ios_char_setstate(base, IOSTATE_eofbit);
4418 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
4419 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
4420 DEFINE_THISCALL_WRAPPER(basic_istream_char_peek, 4)
4421 int __thiscall basic_istream_char_peek(basic_istream_char *this)
4423 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
4426 TRACE("(%p)\n", this);
4430 if(basic_istream_char_sentry_create(this, TRUE))
4431 ret = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
4432 basic_istream_char_sentry_destroy(this);
4436 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADIH@Z */
4437 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_K_J@Z */
4438 DEFINE_THISCALL_WRAPPER(basic_istream_char__Read_s, 16)
4439 basic_istream_char* __thiscall basic_istream_char__Read_s(basic_istream_char *this, char *str, MSVCP_size_t size, streamsize count)
4441 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
4442 IOSB_iostate state = IOSTATE_goodbit;
4444 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
4446 if(basic_istream_char_sentry_create(this, TRUE)) {
4447 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
4449 this->count = basic_streambuf_char__Sgetn_s(strbuf, str, size, count);
4450 if(this->count != count)
4451 state |= IOSTATE_failbit | IOSTATE_eofbit;
4455 basic_istream_char_sentry_destroy(this);
4457 basic_ios_char_setstate(base, state);
4461 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
4462 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
4463 DEFINE_THISCALL_WRAPPER(basic_istream_char_read, 12)
4464 basic_istream_char* __thiscall basic_istream_char_read(basic_istream_char *this, char *str, streamsize count)
4466 return basic_istream_char__Read_s(this, str, count, count);
4469 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
4470 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
4471 DEFINE_THISCALL_WRAPPER(basic_istream_char__Readsome_s, 16)
4472 streamsize __thiscall basic_istream_char__Readsome_s(basic_istream_char *this, char *str, MSVCP_size_t size, streamsize count)
4474 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
4475 IOSB_iostate state = IOSTATE_goodbit;
4477 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
4481 if(basic_istream_char_sentry_create(this, TRUE)) {
4482 streamsize avail = basic_streambuf_char_in_avail(basic_ios_char_rdbuf_get(base));
4487 state |= IOSTATE_eofbit;
4489 basic_istream_char__Read_s(this, str, size, avail);
4491 state |= IOSTATE_failbit;
4493 basic_istream_char_sentry_destroy(this);
4495 basic_ios_char_setstate(base, state);
4499 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
4500 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
4501 DEFINE_THISCALL_WRAPPER(basic_istream_char_readsome, 12)
4502 streamsize __thiscall basic_istream_char_readsome(basic_istream_char *this, char *str, streamsize count)
4504 return basic_istream_char__Readsome_s(this, str, count, count);
4507 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
4508 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
4509 DEFINE_THISCALL_WRAPPER(basic_istream_char_putback, 8)
4510 basic_istream_char* __thiscall basic_istream_char_putback(basic_istream_char *this, char ch)
4512 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
4513 IOSB_iostate state = IOSTATE_goodbit;
4515 TRACE("(%p %c)\n", this, ch);
4519 if(basic_istream_char_sentry_create(this, TRUE)) {
4520 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
4522 if(!ios_base_good(&base->base))
4523 state |= IOSTATE_failbit;
4524 else if(!strbuf || basic_streambuf_char_sputbackc(strbuf, ch)==EOF)
4525 state |= IOSTATE_badbit;
4527 basic_istream_char_sentry_destroy(this);
4529 basic_ios_char_setstate(base, state);
4533 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
4534 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
4535 DEFINE_THISCALL_WRAPPER(basic_istream_char_unget, 4)
4536 basic_istream_char* __thiscall basic_istream_char_unget(basic_istream_char *this)
4538 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
4539 IOSB_iostate state = IOSTATE_goodbit;
4541 TRACE("(%p)\n", this);
4545 if(basic_istream_char_sentry_create(this, TRUE)) {
4546 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
4548 if(!ios_base_good(&base->base))
4549 state |= IOSTATE_failbit;
4550 else if(!strbuf || basic_streambuf_char_sungetc(strbuf)==EOF)
4551 state |= IOSTATE_badbit;
4553 basic_istream_char_sentry_destroy(this);
4555 basic_ios_char_setstate(base, state);
4559 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
4560 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
4561 DEFINE_THISCALL_WRAPPER(basic_istream_char_sync, 4)
4562 int __thiscall basic_istream_char_sync(basic_istream_char *this)
4564 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
4565 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
4567 TRACE("(%p)\n", this);
4572 if(basic_istream_char_sentry_create(this, TRUE)) {
4573 if(basic_streambuf_char_pubsync(strbuf) != -1) {
4574 basic_istream_char_sentry_destroy(this);
4578 basic_istream_char_sentry_destroy(this);
4580 basic_ios_char_setstate(base, IOSTATE_badbit);
4584 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
4585 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
4586 DEFINE_THISCALL_WRAPPER(basic_istream_char_tellg, 8)
4587 fpos_int* __thiscall basic_istream_char_tellg(basic_istream_char *this, fpos_int *ret)
4589 TRACE("(%p %p)\n", this, ret);
4591 if(basic_istream_char_sentry_create(this, TRUE)) {
4592 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
4593 if(!ios_base_fail(&base->base)) {
4594 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base),
4595 ret, 0, SEEKDIR_cur, OPENMODE_in);
4596 basic_istream_char_sentry_destroy(this);
4598 if(ret->off==0 && ret->pos==-1 && ret->state==0)
4599 basic_ios_char_setstate(base, IOSTATE_failbit);
4603 basic_istream_char_sentry_destroy(this);
4611 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@JH@Z */
4612 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
4613 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg, 12)
4614 basic_istream_char* __thiscall basic_istream_char_seekg(basic_istream_char *this, streamoff off, int dir)
4616 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
4618 TRACE("(%p %ld %d)\n", this, off, dir);
4620 if(basic_istream_char_sentry_create(this, TRUE)) {
4621 if(!ios_base_fail(&base->base)) {
4622 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
4625 basic_streambuf_char_pubseekoff(strbuf, &ret, off, dir, OPENMODE_in);
4626 basic_istream_char_sentry_destroy(this);
4628 if(ret.off==0 && ret.pos==-1 && ret.state==0)
4629 basic_ios_char_setstate(base, IOSTATE_failbit);
4631 basic_ios_char_clear(base, IOSTATE_goodbit);
4635 basic_istream_char_sentry_destroy(this);
4637 basic_ios_char_setstate(base, IOSTATE_failbit);
4641 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
4642 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
4643 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg_fpos, 28)
4644 basic_istream_char* __thiscall basic_istream_char_seekg_fpos(basic_istream_char *this, fpos_int pos)
4646 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
4648 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
4650 if(basic_istream_char_sentry_create(this, TRUE)) {
4651 if(!ios_base_fail(&base->base)) {
4652 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
4655 basic_streambuf_char_pubseekpos(strbuf, &ret, pos, OPENMODE_in);
4656 basic_istream_char_sentry_destroy(this);
4658 if(ret.off==0 && ret.pos==-1 && ret.state==0)
4659 basic_ios_char_setstate(base, IOSTATE_failbit);
4661 basic_ios_char_clear(base, IOSTATE_goodbit);
4665 basic_istream_char_sentry_destroy(this);
4667 basic_ios_char_setstate(base, IOSTATE_failbit);
4671 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAF@Z */
4672 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAF@Z */
4673 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_short, 8)
4674 basic_istream_char* __thiscall basic_istream_char_read_short(basic_istream_char *this, short *arg1)
4676 FIXME("(%p %p) stub\n", this, arg1);
4680 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAG@Z */
4681 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAG@Z */
4682 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ushort, 8)
4683 basic_istream_char* __thiscall basic_istream_char_read_ushort(basic_istream_char *this, unsigned short *arg1)
4685 FIXME("(%p %p) stub\n", this, arg1);
4689 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAH@Z */
4690 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAH@Z */
4691 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int, 8)
4692 basic_istream_char* __thiscall basic_istream_char_read_int(basic_istream_char *this, int *arg1)
4694 FIXME("(%p %p) stub\n", this, arg1);
4698 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAI@Z */
4699 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAI@Z */
4700 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint, 8)
4701 basic_istream_char* __thiscall basic_istream_char_read_uint(basic_istream_char *this, unsigned int *arg1)
4703 FIXME("(%p %p) stub\n", this, arg1);
4707 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAJ@Z */
4708 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAJ@Z */
4709 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_long, 8)
4710 basic_istream_char* __thiscall basic_istream_char_read_long(basic_istream_char *this, LONG *arg1)
4712 FIXME("(%p %p) stub\n", this, arg1);
4716 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAK@Z */
4717 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAK@Z */
4718 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ulong, 8)
4719 basic_istream_char* __thiscall basic_istream_char_read_ulong(basic_istream_char *this, ULONG *arg1)
4721 FIXME("(%p %p) stub\n", this, arg1);
4725 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAM@Z */
4726 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAM@Z */
4727 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_float, 8)
4728 basic_istream_char* __thiscall basic_istream_char_read_float(basic_istream_char *this, float *arg1)
4730 FIXME("(%p %p) stub\n", this, arg1);
4734 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAN@Z */
4735 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAN@Z */
4736 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_double, 8)
4737 basic_istream_char* __thiscall basic_istream_char_read_double(basic_istream_char *this, double *arg1)
4739 FIXME("(%p %p) stub\n", this, arg1);
4743 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAO@Z */
4744 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAO@Z */
4745 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ldouble, 8)
4746 basic_istream_char* __thiscall basic_istream_char_read_ldouble(basic_istream_char *this, long double *arg1)
4748 FIXME("(%p %p) stub\n", this, arg1);
4752 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAPAX@Z */
4753 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
4754 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ptr, 8)
4755 basic_istream_char* __thiscall basic_istream_char_read_ptr(basic_istream_char *this, void **arg1)
4757 FIXME("(%p %p) stub\n", this, arg1);
4761 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_J@Z */
4762 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_J@Z */
4763 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int64, 8)
4764 basic_istream_char* __thiscall basic_istream_char_read_int64(basic_istream_char *this, __int64 *arg1)
4766 FIXME("(%p %p) stub\n", this, arg1);
4770 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_K@Z */
4771 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_K@Z */
4772 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint64, 8)
4773 basic_istream_char* __thiscall basic_istream_char_read_uint64(basic_istream_char *this, unsigned __int64 *arg1)
4775 FIXME("(%p %p) stub\n", this, arg1);
4779 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_N@Z */
4780 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_N@Z */
4781 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_bool, 8)
4782 basic_istream_char* __thiscall basic_istream_char_read_bool(basic_istream_char *this, MSVCP_bool *arg1)
4784 FIXME("(%p %p) stub\n", this, arg1);
4788 /* ??$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 */
4789 /* ??$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 */
4790 basic_istream_char* __cdecl basic_istream_char_getline_bstr_delim(
4791 basic_istream_char *istream, basic_string_char *str, char delim)
4793 IOSB_iostate state = IOSTATE_failbit;
4796 TRACE("(%p %p %c)\n", istream, str, delim);
4798 if(basic_istream_char_sentry_create(istream, TRUE)) {
4799 MSVCP_basic_string_char_clear(str);
4801 for(c = basic_istream_char_get(istream); c!=delim && c!=EOF;
4802 c = basic_istream_char_get(istream)) {
4803 state = IOSTATE_goodbit;
4804 MSVCP_basic_string_char_append_ch(str, c);
4807 basic_istream_char_sentry_destroy(istream);
4809 basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream),
4810 state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
4814 /* ??$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 */
4815 /* ??$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 */
4816 basic_istream_char* __cdecl basic_istream_char_getline_bstr(
4817 basic_istream_char *istream, basic_string_char *str)
4819 return basic_istream_char_getline_bstr_delim(istream, str, '\n');
4822 /* ??$?5DU?$char_traits@D@std@@V?$allocator@D@1@@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 */
4823 /* ??$?5DU?$char_traits@D@std@@V?$allocator@D@1@@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 */
4824 basic_istream_char* __cdecl basic_istream_char_get_bstr(
4825 basic_istream_char *istream, basic_string_char *str)
4827 IOSB_iostate state = IOSTATE_failbit;
4830 TRACE("(%p %p)\n", istream, str);
4832 if(basic_istream_char_sentry_create(istream, FALSE)) {
4833 basic_ios_char *base = basic_istream_char_get_basic_ios(istream);
4834 const ctype_char *ctype = ctype_char_use_facet(base->strbuf->loc);
4836 MSVCP_basic_string_char_clear(str);
4838 for(c = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
4839 c!=EOF && !ctype_char_is_ch(ctype, _SPACE|_BLANK, c);
4840 c = basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base))) {
4841 state = IOSTATE_goodbit;
4842 MSVCP_basic_string_char_append_ch(str, c);
4845 basic_istream_char_sentry_destroy(istream);
4847 basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream),
4848 state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
4852 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4853 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4854 DEFINE_THISCALL_WRAPPER(basic_iostream_char_ctor, 12)
4855 basic_iostream_char* __thiscall basic_iostream_char_ctor(basic_iostream_char *this, basic_streambuf_char *strbuf, MSVCP_bool virt_init)
4857 basic_ios_char *basic_ios;
4859 TRACE("(%p %p %d)\n", this, strbuf, virt_init);
4862 this->base1.vbtable = basic_iostream_char_vbtable1;
4863 this->base2.vbtable = basic_iostream_char_vbtable2;
4864 basic_ios = basic_istream_char_get_basic_ios(&this->base1);
4865 basic_ios_char_ctor(basic_ios);
4867 basic_ios = basic_istream_char_get_basic_ios(&this->base1);
4870 basic_ios->base.vtable = &MSVCP_basic_iostream_char_vtable;
4872 basic_istream_char_ctor(&this->base1, strbuf, FALSE, FALSE);
4873 basic_ostream_char_ctor_uninitialized(&this->base2, 0, FALSE, FALSE);
4877 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
4878 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
4879 DEFINE_THISCALL_WRAPPER(basic_iostream_char_dtor, 4)
4880 void __thiscall basic_iostream_char_dtor(basic_iostream_char *this)
4882 TRACE("(%p)\n", this);
4883 basic_ostream_char_dtor(&this->base2);
4884 basic_istream_char_dtor(&this->base1);
4887 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
4888 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
4889 DEFINE_THISCALL_WRAPPER(basic_iostream_char_vbase_dtor, 4)
4890 void __thiscall basic_iostream_char_vbase_dtor(basic_iostream_char *this)
4892 TRACE("(%p)\n", this);
4893 basic_iostream_char_dtor(this);
4894 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base1));
4897 DEFINE_THISCALL_WRAPPER(MSVCP_basic_iostream_char_vector_dtor, 8)
4898 basic_iostream_char* __thiscall MSVCP_basic_iostream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
4900 basic_iostream_char *this = (basic_iostream_char *)((char*)base - basic_iostream_char_vbtable1[1] + basic_iostream_char_vbtable1[0]);
4902 TRACE("(%p %x)\n", this, flags);
4905 /* we have an array, with the number of elements stored before the first object */
4906 int i, *ptr = (int *)this-1;
4908 for(i=*ptr-1; i>=0; i--)
4909 basic_iostream_char_vbase_dtor(this+i);
4910 MSVCRT_operator_delete(ptr);
4912 basic_iostream_char_vbase_dtor(this);
4914 MSVCRT_operator_delete(this);
4920 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
4921 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
4922 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor, 8)
4923 basic_ofstream_char* __thiscall basic_ofstream_char_ctor(basic_ofstream_char *this, MSVCP_bool virt_init)
4925 basic_ios_char *basic_ios;
4927 TRACE("(%p %d)\n", this, virt_init);
4930 this->base.vbtable = basic_ofstream_char_vbtable;
4931 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
4932 basic_ios_char_ctor(basic_ios);
4934 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
4937 basic_filebuf_char_ctor(&this->filebuf);
4938 basic_ostream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
4939 basic_ios->base.vtable = &MSVCP_basic_ofstream_char_vtable;
4943 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
4944 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
4945 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_file, 12)
4946 basic_ofstream_char* __thiscall basic_ofstream_char_ctor_file(
4947 basic_ofstream_char *this, FILE *file, MSVCP_bool virt_init)
4949 basic_ios_char *basic_ios;
4951 TRACE("(%p %p %d)\n", this, file, virt_init);
4954 this->base.vbtable = basic_ofstream_char_vbtable;
4955 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
4956 basic_ios_char_ctor(basic_ios);
4958 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
4961 basic_filebuf_char_ctor_file(&this->filebuf, file);
4962 basic_ostream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
4963 basic_ios->base.vtable = &MSVCP_basic_ofstream_char_vtable;
4967 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PBDHH@Z */
4968 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDHH@Z */
4969 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_name, 20)
4970 basic_ofstream_char* __thiscall basic_ofstream_char_ctor_name(basic_ofstream_char *this,
4971 const char *name, int mode, int prot, MSVCP_bool virt_init)
4973 TRACE("(%p %s %d %d %d)\n", this, name, mode, prot, virt_init);
4975 basic_ofstream_char_ctor(this, virt_init);
4977 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_out, prot)) {
4978 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
4979 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
4984 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PBGHH@Z */
4985 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEBGHH@Z */
4986 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PB_WHH@Z */
4987 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEB_WHH@Z */
4988 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_name_wchar, 20)
4989 basic_ofstream_char* __thiscall basic_ofstream_char_ctor_name_wchar(basic_ofstream_char *this,
4990 const wchar_t *name, int mode, int prot, MSVCP_bool virt_init)
4992 TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name), mode, prot, virt_init);
4994 basic_ofstream_char_ctor(this, virt_init);
4996 if(!basic_filebuf_char_open_wchar(&this->filebuf, name, mode|OPENMODE_out, prot)) {
4997 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
4998 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
5003 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
5004 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
5005 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_dtor, 4)
5006 void __thiscall basic_ofstream_char_dtor(basic_ofstream_char *this)
5008 TRACE("(%p)\n", this);
5010 basic_ostream_char_dtor(&this->base);
5011 basic_filebuf_char_dtor(&this->filebuf);
5014 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5015 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5016 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_vbase_dtor, 4)
5017 void __thiscall basic_ofstream_char_vbase_dtor(basic_ofstream_char *this)
5019 TRACE("(%p)\n", this);
5021 basic_ofstream_char_dtor(this);
5022 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base));
5025 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ofstream_char_vector_dtor, 8)
5026 basic_ofstream_char* __thiscall MSVCP_basic_ofstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
5028 basic_ofstream_char *this = (basic_ofstream_char *)((char*)base - basic_ofstream_char_vbtable[1] + basic_ofstream_char_vbtable[0]);
5030 TRACE("(%p %x)\n", this, flags);
5033 /* we have an array, with the number of elements stored before the first object */
5034 int i, *ptr = (int *)this-1;
5036 for(i=*ptr-1; i>=0; i--)
5037 basic_ofstream_char_vbase_dtor(this+i);
5038 MSVCRT_operator_delete(ptr);
5040 basic_ofstream_char_vbase_dtor(this);
5042 MSVCRT_operator_delete(this);
5048 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5049 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5050 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_close, 4)
5051 void __thiscall basic_ofstream_char_close(basic_ofstream_char *this)
5053 TRACE("(%p)\n", this);
5055 if(!basic_filebuf_char_close(&this->filebuf)) {
5056 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
5057 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
5061 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
5062 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
5063 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_is_open, 4)
5064 MSVCP_bool __thiscall basic_ofstream_char_is_open(const basic_ofstream_char *this)
5066 TRACE("(%p)\n", this);
5067 return basic_filebuf_char_is_open(&this->filebuf);
5070 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDHH@Z */
5071 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDHH@Z */
5072 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open, 16)
5073 void __thiscall basic_ofstream_char_open(basic_ofstream_char *this,
5074 const char *name, int mode, int prot)
5076 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
5078 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_out, prot)) {
5079 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
5080 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
5084 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDI@Z */
5085 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDI@Z */
5086 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_old, 12)
5087 void __thiscall basic_ofstream_char_open_old(basic_ofstream_char *this,
5088 const char *name, unsigned int mode)
5090 basic_ofstream_char_open(this, name, mode, _SH_DENYNO);
5093 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBGHH@Z */
5094 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGHH@Z */
5095 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPB_WHH@Z */
5096 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WHH@Z */
5097 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_wchar, 16)
5098 void __thiscall basic_ofstream_char_open_wchar(basic_ofstream_char *this,
5099 const wchar_t *name, int mode, int prot)
5101 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
5103 if(!basic_filebuf_char_open_wchar(&this->filebuf, name, mode|OPENMODE_out, prot)) {
5104 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
5105 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
5109 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBGI@Z */
5110 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGI@Z */
5111 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPB_WI@Z */
5112 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WI@Z */
5113 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_wchar_old, 12)
5114 void __thiscall basic_ofstream_char_open_wchar_old(basic_ofstream_char *this,
5115 const wchar_t *name, unsigned int mode)
5117 basic_ofstream_char_open_wchar(this, name, mode, _SH_DENYNO);
5120 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
5121 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
5122 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_rdbuf, 4)
5123 basic_filebuf_char* __thiscall basic_ofstream_char_rdbuf(const basic_ofstream_char *this)
5125 TRACE("(%p)\n", this);
5126 return (basic_filebuf_char*)&this->filebuf;
5129 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
5130 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
5131 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor, 8)
5132 basic_ifstream_char* __thiscall basic_ifstream_char_ctor(basic_ifstream_char *this, MSVCP_bool virt_init)
5134 basic_ios_char *basic_ios;
5136 TRACE("(%p %d)\n", this, virt_init);
5139 this->base.vbtable = basic_ifstream_char_vbtable;
5140 basic_ios = basic_istream_char_get_basic_ios(&this->base);
5141 basic_ios_char_ctor(basic_ios);
5143 basic_ios = basic_istream_char_get_basic_ios(&this->base);
5146 basic_filebuf_char_ctor(&this->filebuf);
5147 basic_istream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
5148 basic_ios->base.vtable = &MSVCP_basic_ifstream_char_vtable;
5152 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
5153 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
5154 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_file, 12)
5155 basic_ifstream_char* __thiscall basic_ifstream_char_ctor_file(
5156 basic_ifstream_char *this, FILE *file, MSVCP_bool virt_init)
5158 basic_ios_char *basic_ios;
5160 TRACE("(%p %p %d)\n", this, file, virt_init);
5163 this->base.vbtable = basic_ifstream_char_vbtable;
5164 basic_ios = basic_istream_char_get_basic_ios(&this->base);
5165 basic_ios_char_ctor(basic_ios);
5167 basic_ios = basic_istream_char_get_basic_ios(&this->base);
5170 basic_filebuf_char_ctor_file(&this->filebuf, file);
5171 basic_istream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
5172 basic_ios->base.vtable = &MSVCP_basic_ifstream_char_vtable;
5176 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PBDHH@Z */
5177 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDHH@Z */
5178 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_name, 20)
5179 basic_ifstream_char* __thiscall basic_ifstream_char_ctor_name(basic_ifstream_char *this,
5180 const char *name, int mode, int prot, MSVCP_bool virt_init)
5182 TRACE("(%p %s %d %d %d)\n", this, name, mode, prot, virt_init);
5184 basic_ifstream_char_ctor(this, virt_init);
5186 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_in, prot)) {
5187 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
5188 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
5193 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PBGHH@Z */
5194 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEBGHH@Z */
5195 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PB_WHH@Z */
5196 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEB_WHH@Z */
5197 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_name_wchar, 20)
5198 basic_ifstream_char* __thiscall basic_ifstream_char_ctor_name_wchar(basic_ifstream_char *this,
5199 const wchar_t *name, int mode, int prot, MSVCP_bool virt_init)
5201 TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name), mode, prot, virt_init);
5203 basic_ifstream_char_ctor(this, virt_init);
5205 if(!basic_filebuf_char_open_wchar(&this->filebuf, name, mode|OPENMODE_in, prot)) {
5206 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
5207 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
5212 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
5213 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
5214 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_dtor, 4)
5215 void __thiscall basic_ifstream_char_dtor(basic_ifstream_char *this)
5217 TRACE("(%p)\n", this);
5219 basic_istream_char_dtor(&this->base);
5220 basic_filebuf_char_dtor(&this->filebuf);
5223 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5224 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5225 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_vbase_dtor, 4)
5226 void __thiscall basic_ifstream_char_vbase_dtor(basic_ifstream_char *this)
5228 TRACE("(%p)\n", this);
5230 basic_ifstream_char_dtor(this);
5231 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base));
5234 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ifstream_char_vector_dtor, 8)
5235 basic_ifstream_char* __thiscall MSVCP_basic_ifstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
5237 basic_ifstream_char *this = (basic_ifstream_char *)((char*)base - basic_ifstream_char_vbtable[1] + basic_ifstream_char_vbtable[0]);
5239 TRACE("(%p %x)\n", this, flags);
5242 /* we have an array, with the number of elements stored before the first object */
5243 int i, *ptr = (int *)this-1;
5245 for(i=*ptr-1; i>=0; i--)
5246 basic_ifstream_char_vbase_dtor(this+i);
5247 MSVCRT_operator_delete(ptr);
5249 basic_ifstream_char_vbase_dtor(this);
5251 MSVCRT_operator_delete(this);
5257 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5258 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5259 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_close, 4)
5260 void __thiscall basic_ifstream_char_close(basic_ifstream_char *this)
5262 TRACE("(%p)\n", this);
5264 if(!basic_filebuf_char_close(&this->filebuf)) {
5265 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
5266 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
5270 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
5271 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
5272 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_is_open, 4)
5273 MSVCP_bool __thiscall basic_ifstream_char_is_open(const basic_ifstream_char *this)
5275 TRACE("(%p)\n", this);
5276 return basic_filebuf_char_is_open(&this->filebuf);
5279 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDHH@Z */
5280 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDHH@Z */
5281 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open, 16)
5282 void __thiscall basic_ifstream_char_open(basic_ifstream_char *this,
5283 const char *name, int mode, int prot)
5285 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
5287 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_in, prot)) {
5288 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
5289 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
5293 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDI@Z */
5294 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDI@Z */
5295 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_old, 12)
5296 void __thiscall basic_ifstream_char_open_old(basic_ifstream_char *this,
5297 const char *name, unsigned int mode)
5299 basic_ifstream_char_open(this, name, mode, _SH_DENYNO);
5302 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBGHH@Z */
5303 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGHH@Z */
5304 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPB_WHH@Z */
5305 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WHH@Z */
5306 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_wchar, 16)
5307 void __thiscall basic_ifstream_char_open_wchar(basic_ifstream_char *this,
5308 const wchar_t *name, int mode, int prot)
5310 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
5312 if(!basic_filebuf_char_open_wchar(&this->filebuf, name, mode|OPENMODE_in, prot)) {
5313 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
5314 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
5318 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBGI@Z */
5319 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGI@Z */
5320 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPB_WI@Z */
5321 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WI@Z */
5322 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_wchar_old, 12)
5323 void __thiscall basic_ifstream_char_open_wchar_old(basic_ifstream_char *this,
5324 const wchar_t *name, unsigned int mode)
5326 basic_ifstream_char_open_wchar(this, name, mode, _SH_DENYNO);
5329 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
5330 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
5331 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_rdbuf, 4)
5332 basic_filebuf_char* __thiscall basic_ifstream_char_rdbuf(const basic_ifstream_char *this)
5334 TRACE("(%p)\n", this);
5335 return (basic_filebuf_char*)&this->filebuf;
5338 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
5339 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
5340 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor, 8)
5341 basic_fstream_char* __thiscall basic_fstream_char_ctor(basic_fstream_char *this, MSVCP_bool virt_init)
5343 basic_ios_char *basic_ios;
5345 TRACE("(%p %d)\n", this, virt_init);
5348 this->base.base1.vbtable = basic_fstream_char_vbtable1;
5349 this->base.base2.vbtable = basic_fstream_char_vbtable2;
5350 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
5351 basic_ios_char_ctor(basic_ios);
5353 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
5356 basic_filebuf_char_ctor(&this->filebuf);
5357 basic_iostream_char_ctor(&this->base, &this->filebuf.base, FALSE);
5358 basic_ios->base.vtable = &MSVCP_basic_fstream_char_vtable;
5362 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
5363 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
5364 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_file, 12)
5365 basic_fstream_char* __thiscall basic_fstream_char_ctor_file(basic_fstream_char *this,
5366 FILE *file, MSVCP_bool virt_init)
5368 basic_ios_char *basic_ios;
5370 TRACE("(%p %p %d)\n", this, file, virt_init);
5373 this->base.base1.vbtable = basic_fstream_char_vbtable1;
5374 this->base.base2.vbtable = basic_fstream_char_vbtable2;
5375 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
5376 basic_ios_char_ctor(basic_ios);
5378 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
5381 basic_filebuf_char_ctor_file(&this->filebuf, file);
5382 basic_iostream_char_ctor(&this->base, &this->filebuf.base, FALSE);
5383 basic_ios->base.vtable = &MSVCP_basic_fstream_char_vtable;
5387 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PBDHH@Z */
5388 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDHH@Z */
5389 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_name, 20)
5390 basic_fstream_char* __thiscall basic_fstream_char_ctor_name(basic_fstream_char *this,
5391 const char *name, int mode, int prot, MSVCP_bool virt_init)
5393 TRACE("(%p %s %d %d %d)\n", this, name, mode, prot, virt_init);
5395 basic_fstream_char_ctor(this, virt_init);
5397 if(!basic_filebuf_char_open(&this->filebuf, name, mode, prot)) {
5398 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
5399 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
5404 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PBGHH@Z */
5405 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEBGHH@Z */
5406 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PB_WHH@Z */
5407 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEB_WHH@Z */
5408 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_name_wchar, 20)
5409 basic_fstream_char* __thiscall basic_fstream_char_ctor_name_wchar(basic_fstream_char *this,
5410 const wchar_t *name, int mode, int prot, MSVCP_bool virt_init)
5412 TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name), mode, prot, virt_init);
5414 basic_fstream_char_ctor(this, virt_init);
5416 if(!basic_filebuf_char_open_wchar(&this->filebuf, name, mode, prot)) {
5417 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
5418 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
5423 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
5424 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
5425 DEFINE_THISCALL_WRAPPER(basic_fstream_char_dtor, 4)
5426 void __thiscall basic_fstream_char_dtor(basic_fstream_char *this)
5428 TRACE("(%p)\n", this);
5430 basic_iostream_char_dtor(&this->base);
5431 basic_filebuf_char_dtor(&this->filebuf);
5434 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5435 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5436 DEFINE_THISCALL_WRAPPER(basic_fstream_char_vbase_dtor, 4)
5437 void __thiscall basic_fstream_char_vbase_dtor(basic_fstream_char *this)
5439 TRACE("(%p)\n", this);
5441 basic_fstream_char_dtor(this);
5442 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base.base1));
5445 DEFINE_THISCALL_WRAPPER(MSVCP_basic_fstream_char_vector_dtor, 8)
5446 basic_fstream_char* __thiscall MSVCP_basic_fstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
5448 basic_fstream_char *this = (basic_fstream_char *)((char*)base - basic_fstream_char_vbtable1[1] + basic_fstream_char_vbtable1[0]);
5450 TRACE("(%p %x)\n", this, flags);
5453 /* we have an array, with the number of elements stored before the first object */
5454 int i, *ptr = (int *)this-1;
5456 for(i=*ptr-1; i>=0; i--)
5457 basic_fstream_char_vbase_dtor(this+i);
5458 MSVCRT_operator_delete(ptr);
5460 basic_fstream_char_vbase_dtor(this);
5462 MSVCRT_operator_delete(this);
5468 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5469 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5470 DEFINE_THISCALL_WRAPPER(basic_fstream_char_close, 4)
5471 void __thiscall basic_fstream_char_close(basic_fstream_char *this)
5473 TRACE("(%p)\n", this);
5475 if(!basic_filebuf_char_close(&this->filebuf)) {
5476 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
5477 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
5481 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
5482 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
5483 DEFINE_THISCALL_WRAPPER(basic_fstream_char_is_open, 4)
5484 MSVCP_bool __thiscall basic_fstream_char_is_open(const basic_fstream_char *this)
5486 TRACE("(%p)\n", this);
5487 return basic_filebuf_char_is_open(&this->filebuf);
5490 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDHH@Z */
5491 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDHH@Z */
5492 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open, 16)
5493 void __thiscall basic_fstream_char_open(basic_fstream_char *this,
5494 const char *name, int mode, int prot)
5496 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
5498 if(!basic_filebuf_char_open(&this->filebuf, name, mode, prot)) {
5499 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
5500 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
5504 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDI@Z */
5505 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDI@Z */
5506 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_old, 12)
5507 void __thiscall basic_fstream_char_open_old(basic_fstream_char *this,
5508 const char *name, unsigned int mode)
5510 basic_fstream_char_open(this, name, mode, _SH_DENYNO);
5513 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBGHH@Z */
5514 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGHH@Z */
5515 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPB_WHH@Z */
5516 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WHH@Z */
5517 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_wchar, 16)
5518 void __thiscall basic_fstream_char_open_wchar(basic_fstream_char *this,
5519 const wchar_t *name, int mode, int prot)
5521 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
5523 if(!basic_filebuf_char_open_wchar(&this->filebuf, name, mode, prot)) {
5524 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
5525 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
5529 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBGI@Z */
5530 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGI@Z */
5531 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPB_WI@Z */
5532 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WI@Z */
5533 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_wchar_old, 12)
5534 void __thiscall basic_fstream_char_open_wchar_old(basic_fstream_char *this,
5535 const wchar_t *name, unsigned int mode)
5537 basic_fstream_char_open_wchar(this, name, mode, _SH_DENYNO);
5540 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
5541 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
5542 DEFINE_THISCALL_WRAPPER(basic_fstream_char_rdbuf, 4)
5543 basic_filebuf_char* __thiscall basic_fstream_char_rdbuf(const basic_fstream_char *this)
5545 TRACE("(%p)\n", this);
5546 return (basic_filebuf_char*)&this->filebuf;
5549 static void __cdecl setprecision_func(ios_base *base, streamsize prec)
5551 ios_base_precision_set(base, prec);
5554 /* ?setprecision@std@@YA?AU?$_Smanip@H@1@H@Z */
5555 /* ?setprecision@std@@YA?AU?$_Smanip@_J@1@_J@Z */
5556 manip_streamsize* __cdecl setprecision(manip_streamsize *ret, streamsize prec)
5558 TRACE("(%p %ld)\n", ret, prec);
5560 ret->pfunc = setprecision_func;
5565 static void __cdecl setw_func(ios_base *base, streamsize width)
5567 ios_base_width_set(base, width);
5570 /* ?setw@std@@YA?AU?$_Smanip@H@1@H@Z */
5571 /* ?setw@std@@YA?AU?$_Smanip@_J@1@_J@Z */
5572 manip_streamsize* __cdecl setw(manip_streamsize *ret, streamsize width)
5574 TRACE("(%p %ld)\n", ret, width);
5576 ret->pfunc = setw_func;
5581 static basic_filebuf_char filebuf_stdin;
5582 /* ?cin@std@@3V?$basic_istream@DU?$char_traits@D@std@@@1@A */
5584 basic_istream_char obj;
5585 basic_ios_char vbase;
5587 /* ?_Ptr_cin@std@@3PAV?$basic_istream@DU?$char_traits@D@std@@@1@A */
5588 /* ?_Ptr_cin@std@@3PEAV?$basic_istream@DU?$char_traits@D@std@@@1@EA */
5589 basic_istream_char *_Ptr_cin = &cin.obj;
5591 static basic_filebuf_char filebuf_stdout;
5592 /* ?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
5594 basic_ostream_char obj;
5595 basic_ios_char vbase;
5597 /* ?_Ptr_cout@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
5598 /* ?_Ptr_cout@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
5599 basic_ostream_char *_Ptr_cout = &cout.obj;
5601 static basic_filebuf_char filebuf_stderr;
5602 /* ?cerr@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
5604 basic_ostream_char obj;
5605 basic_ios_char vbase;
5607 /* ?_Ptr_cerr@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
5608 /* ?_Ptr_cerr@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
5609 basic_ostream_char *_Ptr_cerr = &cerr.obj;
5613 basic_filebuf_char_ctor_file(&filebuf_stdin, stdin);
5614 basic_istream_char_ctor(&cin.obj, &filebuf_stdin.base, FALSE/*FIXME*/, TRUE);
5616 basic_filebuf_char_ctor_file(&filebuf_stdout, stdout);
5617 basic_ostream_char_ctor(&cout.obj, &filebuf_stdout.base, FALSE/*FIXME*/, TRUE);
5619 basic_filebuf_char_ctor_file(&filebuf_stderr, stderr);
5620 basic_ostream_char_ctor(&cerr.obj, &filebuf_stderr.base, FALSE/*FIXME*/, TRUE);
5625 basic_istream_char_dtor(&cin.obj);
5626 basic_filebuf_char_dtor(&filebuf_stdin);
5628 basic_ostream_char_dtor(&cout.obj);
5629 basic_filebuf_char_dtor(&filebuf_stdout);
5631 basic_ostream_char_dtor(&cerr.obj);
5632 basic_filebuf_char_dtor(&filebuf_stderr);