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
28 #include "wine/debug.h"
29 WINE_DEFAULT_DEBUG_CHANNEL(msvcp90);
32 IOSTATE_goodbit = 0x00,
33 IOSTATE_eofbit = 0x01,
34 IOSTATE_failbit = 0x02,
35 IOSTATE_badbit = 0x04,
36 IOSTATE__Hardfail = 0x10,
41 FMTFLAG_skipws = 0x0001,
42 FMTFLAG_unitbuf = 0x0002,
43 FMTFLAG_uppercase = 0x0004,
44 FMTFLAG_showbase = 0x0008,
45 FMTFLAG_showpoint = 0x0010,
46 FMTFLAG_showpos = 0x0020,
47 FMTFLAG_left = 0x0040,
48 FMTFLAG_right = 0x0080,
49 FMTFLAG_internal = 0x0100,
53 FMTFLAG_scientific = 0x1000,
54 FMTFLAG_fixed = 0x2000,
55 FMTFLAG_hexfloat = 0x3000,
56 FMTFLAG_boolalpha = 0x4000,
57 FMTFLAG_stdio = 0x8000,
58 FMTFLAG_adjustfield = FMTFLAG_left|FMTFLAG_right|FMTFLAG_internal,
59 FMTFLAG_basefield = FMTFLAG_dec|FMTFLAG_oct|FMTFLAG_hex,
60 FMTFLAG_floadfield = FMTFLAG_scientific|FMTFLAG_fixed,
69 OPENMODE_trunc = 0x10,
70 OPENMODE__Nocreate = 0x40,
71 OPENMODE__Noreplace = 0x80,
72 OPENMODE_binray = 0x20,
83 typedef struct _iosarray {
84 struct _iosarray *next;
97 typedef void (CDECL *IOS_BASE_event_callback)(IOS_BASE_event, struct _ios_base*, int);
98 typedef struct _fnarray {
99 struct _fnarray *next;
101 IOS_BASE_event_callback event_handler;
104 /* ?_Index@ios_base@std@@0HA */
105 int ios_base_Index = 0;
106 /* ?_Sync@ios_base@std@@0_NA */
107 MSVCP_bool ios_base_Sync = FALSE;
109 typedef struct _ios_base {
110 const vtable_ptr *vtable;
117 IOS_BASE_iosarray *arr;
118 IOS_BASE_fnarray *calls;
124 __int64 DECLSPEC_ALIGN(8) pos;
128 static inline const char* debugstr_fpos_int(fpos_int *fpos)
130 return wine_dbg_sprintf("fpos(%ld %s %d)", fpos->off, wine_dbgstr_longlong(fpos->pos), fpos->state);
134 const vtable_ptr *vtable;
149 } basic_streambuf_char;
152 const vtable_ptr *vtable;
167 } basic_streambuf_wchar;
171 basic_streambuf_char *strbuf;
172 struct _basic_ostream_char *stream;
178 basic_streambuf_wchar *strbuf;
179 struct _basic_ostream_wchar *stream;
183 typedef struct _basic_ostream_char {
185 /* virtual inheritance
186 * basic_ios_char base;
188 } basic_ostream_char;
190 typedef struct _basic_ostream_wchar {
192 /* virtual inheritance
193 * basic_ios_char base;
195 } basic_ostream_wchar;
200 /* virtual inheritance
201 * basic_ios_char base;
203 } basic_istream_char;
205 extern const vtable_ptr MSVCP_iosb_vtable;
207 /* ??_7ios_base@std@@6B@ */
208 extern const vtable_ptr MSVCP_ios_base_vtable;
210 /* ??_7?$basic_ios@DU?$char_traits@D@std@@@std@@6B@ */
211 extern const vtable_ptr MSVCP_basic_ios_char_vtable;
213 /* ??_7?$basic_ios@_WU?$char_traits@_W@std@@@std@@6B@ */
214 extern const vtable_ptr MSVCP_basic_ios_wchar_vtable;
216 /* ??_7?$basic_ios@GU?$char_traits@G@std@@@std@@6B@ */
217 extern const vtable_ptr MSVCP_basic_ios_short_vtable;
219 /* ??_7?$basic_streambuf@DU?$char_traits@D@std@@@std@@6B@ */
220 extern const vtable_ptr MSVCP_basic_streambuf_char_vtable;
222 /* ??_7?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@6B@ */
223 extern const vtable_ptr MSVCP_basic_streambuf_wchar_vtable;
225 /* ??_7?$basic_streambuf@GU?$char_traits@G@std@@@std@@6B@ */
226 extern const vtable_ptr MSVCP_basic_streambuf_short_vtable;
228 /* ??_8?$basic_ostream@DU?$char_traits@D@std@@@std@@7B@ */
229 const int basic_ostream_char_vbtable[] = {0, sizeof(basic_ostream_char)};
230 /* ??_7?$basic_ostream@DU?$char_traits@D@std@@@std@@6B@ */
231 extern const vtable_ptr MSVCP_basic_ostream_char_vtable;
233 /* ??_8?$basic_istream@DU?$char_traits@D@std@@@std@@7B@ */
234 const int basic_istream_char_vbtable[] = {0, sizeof(basic_istream_char)};
235 /* ??_7?$basic_istream@DU?$char_traits@D@std@@@std@@6B@ */
236 extern const vtable_ptr MSVCP_basic_istream_char_vtable;
238 DEFINE_RTTI_DATA(iosb, 0, 0, NULL, NULL, NULL, ".?AV?$_Iosb@H@std@@");
239 DEFINE_RTTI_DATA(ios_base, 0, 1, &iosb_rtti_base_descriptor, NULL, NULL, ".?AV?$_Iosb@H@std@@");
240 DEFINE_RTTI_DATA(basic_ios_char, 0, 2, &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
241 NULL, ".?AV?$basic_ios@DU?$char_traits@D@std@@@std@@");
242 DEFINE_RTTI_DATA(basic_ios_wchar, 0, 2, &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
243 NULL, ".?AV?$basic_ios@_WU?$char_traits@_W@std@@@std@@");
244 DEFINE_RTTI_DATA(basic_ios_short, 0, 2, &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
245 NULL, ".?AV?$basic_ios@GU?$char_traits@G@std@@@std@@");
246 DEFINE_RTTI_DATA(basic_streambuf_char, 0, 0, NULL, NULL, NULL,
247 ".?AV?$basic_streambuf@DU?$char_traits@D@std@@@std@@");
248 DEFINE_RTTI_DATA(basic_streambuf_wchar, 0, 0, NULL, NULL, NULL,
249 ".?AV?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@");
250 DEFINE_RTTI_DATA(basic_streambuf_short, 0, 0, NULL, NULL, NULL,
251 ".?AV?$basic_streambuf@GU?$char_traits@G@std@@@std@@");
252 DEFINE_RTTI_DATA(basic_ostream_char, sizeof(basic_ostream_char), 3, &basic_ios_char_rtti_base_descriptor,
253 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
254 ".?AV?$basic_ostream@DU?$char_traits@D@std@@@std@@");
255 DEFINE_RTTI_DATA(basic_istream_char, sizeof(basic_istream_char), 3, &basic_ios_char_rtti_base_descriptor,
256 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
257 ".?AV?$basic_istream@DU?$char_traits@D@std@@@std@@");
260 void __asm_dummy_vtables(void) {
262 __ASM_VTABLE(iosb, "");
263 __ASM_VTABLE(ios_base, "");
264 __ASM_VTABLE(basic_ios_char, "");
265 __ASM_VTABLE(basic_ios_wchar, "");
266 __ASM_VTABLE(basic_ios_short, "");
267 __ASM_VTABLE(basic_streambuf_char,
268 VTABLE_ADD_FUNC(basic_streambuf_char_overflow)
269 VTABLE_ADD_FUNC(basic_streambuf_char_pbackfail)
270 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc)
271 VTABLE_ADD_FUNC(basic_streambuf_char_underflow)
272 VTABLE_ADD_FUNC(basic_streambuf_char_uflow)
273 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn)
274 VTABLE_ADD_FUNC(basic_streambuf_char__Xsgetn_s)
275 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn)
276 VTABLE_ADD_FUNC(basic_streambuf_char_seekoff)
277 VTABLE_ADD_FUNC(basic_streambuf_char_seekpos)
278 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf)
279 VTABLE_ADD_FUNC(basic_streambuf_char_sync)
280 VTABLE_ADD_FUNC(basic_streambuf_char_imbue));
281 __ASM_VTABLE(basic_streambuf_wchar,
282 VTABLE_ADD_FUNC(basic_streambuf_wchar_overflow)
283 VTABLE_ADD_FUNC(basic_streambuf_wchar_pbackfail)
284 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
285 VTABLE_ADD_FUNC(basic_streambuf_wchar_underflow)
286 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow)
287 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
288 VTABLE_ADD_FUNC(basic_streambuf_wchar__Xsgetn_s)
289 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
290 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekoff)
291 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekpos)
292 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf)
293 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync)
294 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
295 __ASM_VTABLE(basic_streambuf_short,
296 VTABLE_ADD_FUNC(basic_streambuf_wchar_overflow)
297 VTABLE_ADD_FUNC(basic_streambuf_wchar_pbackfail)
298 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
299 VTABLE_ADD_FUNC(basic_streambuf_wchar_underflow)
300 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow)
301 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
302 VTABLE_ADD_FUNC(basic_streambuf_wchar__Xsgetn_s)
303 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
304 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekoff)
305 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekpos)
306 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf)
307 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync)
308 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
309 __ASM_VTABLE(basic_ostream_char, "");
310 __ASM_VTABLE(basic_istream_char, "");
315 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
316 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
317 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp_next, 16)
318 void __thiscall basic_streambuf_char_setp_next(basic_streambuf_char *this, char *first, char *next, char *last)
320 TRACE("(%p %p %p %p)\n", this, first, next, last);
324 this->wsize = last-next;
327 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD0@Z */
328 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD0@Z */
329 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp, 12)
330 void __thiscall basic_streambuf_char_setp(basic_streambuf_char *this, char *first, char *last)
332 basic_streambuf_char_setp_next(this, first, first, last);
335 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
336 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
337 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setg, 16)
338 void __thiscall basic_streambuf_char_setg(basic_streambuf_char *this, char *first, char *next, char *last)
340 TRACE("(%p %p %p %p)\n", this, first, next, last);
344 this->rsize = last-next;
347 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXXZ */
348 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXXZ */
349 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init_empty, 4)
350 void __thiscall basic_streambuf_char__Init_empty(basic_streambuf_char *this)
352 TRACE("(%p)\n", this);
354 this->prbuf = &this->rbuf;
355 this->pwbuf = &this->wbuf;
356 this->prpos = &this->rpos;
357 this->pwpos = &this->wpos;
358 this->prsize = &this->rsize;
359 this->pwsize = &this->wsize;
361 basic_streambuf_char_setp(this, NULL, NULL);
362 basic_streambuf_char_setg(this, NULL, NULL, NULL);
365 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@W4_Uninitialized@1@@Z */
366 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
367 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor_uninitialized, 8)
368 basic_streambuf_char* __thiscall basic_streambuf_char_ctor_uninitialized(basic_streambuf_char *this, int uninitialized)
370 TRACE("(%p %d)\n", this, uninitialized);
371 this->vtable = &MSVCP_basic_streambuf_char_vtable;
372 mutex_ctor(&this->lock);
376 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@XZ */
377 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@XZ */
378 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor, 4)
379 basic_streambuf_char* __thiscall basic_streambuf_char_ctor(basic_streambuf_char *this)
381 TRACE("(%p)\n", this);
383 this->vtable = &MSVCP_basic_streambuf_char_vtable;
384 mutex_ctor(&this->lock);
385 this->loc = MSVCRT_operator_new(sizeof(locale));
386 locale_ctor(this->loc);
387 basic_streambuf_char__Init_empty(this);
392 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
393 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
394 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_dtor, 4)
395 void __thiscall basic_streambuf_char_dtor(basic_streambuf_char *this)
397 TRACE("(%p)\n", this);
399 mutex_dtor(&this->lock);
400 locale_dtor(this->loc);
401 MSVCRT_operator_delete(this->loc);
404 DEFINE_THISCALL_WRAPPER(MSVCP_basic_streambuf_char_vector_dtor, 8)
405 basic_streambuf_char* __thiscall MSVCP_basic_streambuf_char_vector_dtor(basic_streambuf_char *this, unsigned int flags)
407 TRACE("(%p %x)\n", this, flags);
409 /* we have an array, with the number of elements stored before the first object */
410 int i, *ptr = (int *)this-1;
412 for(i=*ptr-1; i>=0; i--)
413 basic_streambuf_char_dtor(this+i);
414 MSVCRT_operator_delete(ptr);
416 basic_streambuf_char_dtor(this);
418 MSVCRT_operator_delete(this);
424 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
425 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
426 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gnavail, 4)
427 streamsize __thiscall basic_streambuf_char__Gnavail(const basic_streambuf_char *this)
429 TRACE("(%p)\n", this);
430 return *this->prpos ? *this->prsize : 0;
433 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
434 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
435 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gndec, 4)
436 char* __thiscall basic_streambuf_char__Gndec(basic_streambuf_char *this)
438 TRACE("(%p)\n", this);
444 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
445 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
446 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gninc, 4)
447 char* __thiscall basic_streambuf_char__Gninc(basic_streambuf_char *this)
449 TRACE("(%p)\n", this);
451 return (*this->prpos)++;
454 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
455 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
456 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gnpreinc, 4)
457 char* __thiscall basic_streambuf_char__Gnpreinc(basic_streambuf_char *this)
459 TRACE("(%p)\n", this);
465 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAPAD0PAH001@Z */
466 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAPEAD0PEAH001@Z */
467 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init, 28)
468 void __thiscall basic_streambuf_char__Init(basic_streambuf_char *this, char **gf, char **gn, int *gc, char **pf, char **pn, int *pc)
470 TRACE("(%p %p %p %p %p %p %p)\n", this, gf, gn, gc, pf, pn, pc);
480 /* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
481 /* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
482 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Lock, 4)
483 void __thiscall basic_streambuf_char__Lock(basic_streambuf_char *this)
485 TRACE("(%p)\n", this);
486 mutex_lock(&this->lock);
489 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
490 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
491 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Pnavail, 4)
492 streamsize __thiscall basic_streambuf_char__Pnavail(const basic_streambuf_char *this)
494 TRACE("(%p)\n", this);
495 return *this->pwpos ? *this->pwsize : 0;
498 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
499 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
500 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Pninc, 4)
501 char* __thiscall basic_streambuf_char__Pninc(basic_streambuf_char *this)
503 TRACE("(%p)\n", this);
505 return (*this->pwpos)++;
508 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
509 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
510 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_underflow, 4)
511 #define call_basic_streambuf_char_underflow(this) CALL_VTBL_FUNC(this, 16, \
512 int, (basic_streambuf_char*), (this))
513 int __thiscall basic_streambuf_char_underflow(basic_streambuf_char *this)
515 TRACE("(%p)\n", this);
519 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
520 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
521 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_uflow, 4)
522 #define call_basic_streambuf_char_uflow(this) CALL_VTBL_FUNC(this, 20, \
523 int, (basic_streambuf_char*), (this))
524 int __thiscall basic_streambuf_char_uflow(basic_streambuf_char *this)
528 TRACE("(%p)\n", this);
530 if(call_basic_streambuf_char_underflow(this)==EOF)
539 /* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADIH@Z */
540 /* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_K_J@Z */
541 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Xsgetn_s, 16)
542 #define call_basic_streambuf_char__Xsgetn_s(this, ptr, size, count) CALL_VTBL_FUNC(this, 28, \
543 streamsize, (basic_streambuf_char*, char*, MSVCP_size_t, streamsize), (this, ptr, size, count))
544 streamsize __thiscall basic_streambuf_char__Xsgetn_s(basic_streambuf_char *this, char *ptr, MSVCP_size_t size, streamsize count)
546 streamsize copied, chunk;
548 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
550 for(copied=0; copied<count && size;) {
551 chunk = basic_streambuf_char__Gnavail(this);
552 if(chunk > count-copied)
553 chunk = count-copied;
556 memcpy_s(ptr+copied, size, *this->prpos, chunk);
557 *this->prpos += chunk;
558 *this->prsize -= chunk;
561 }else if((ptr[copied] = call_basic_streambuf_char_uflow(this)) != EOF) {
572 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
573 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
574 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Sgetn_s, 16)
575 streamsize __thiscall basic_streambuf_char__Sgetn_s(basic_streambuf_char *this, char *ptr, MSVCP_size_t size, streamsize count)
577 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
578 return call_basic_streambuf_char__Xsgetn_s(this, ptr, size, count);
581 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
582 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
583 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Unlock, 4)
584 void __thiscall basic_streambuf_char__Unlock(basic_streambuf_char *this)
586 TRACE("(%p)\n", this);
587 mutex_unlock(&this->lock);
590 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
591 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
592 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_eback, 4)
593 char* __thiscall basic_streambuf_char_eback(const basic_streambuf_char *this)
595 TRACE("(%p)\n", this);
599 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
600 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
601 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gptr, 4)
602 char* __thiscall basic_streambuf_char_gptr(const basic_streambuf_char *this)
604 TRACE("(%p)\n", this);
608 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
609 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
610 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_egptr, 4)
611 char* __thiscall basic_streambuf_char_egptr(const basic_streambuf_char *this)
613 TRACE("(%p)\n", this);
614 return *this->prpos+*this->prsize;
617 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
618 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
619 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_epptr, 4)
620 char* __thiscall basic_streambuf_char_epptr(const basic_streambuf_char *this)
622 TRACE("(%p)\n", this);
623 return *this->pwpos+*this->pwsize;
626 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
627 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
628 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gbump, 8)
629 void __thiscall basic_streambuf_char_gbump(basic_streambuf_char *this, int off)
631 TRACE("(%p %d)\n", this, off);
633 *this->prsize -= off;
636 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QBE?AVlocale@2@XZ */
637 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEBA?AVlocale@2@XZ */
638 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_getloc, 8)
639 locale* __thiscall basic_streambuf_char_getloc(const basic_streambuf_char *this, locale *ret)
641 TRACE("(%p)\n", this);
642 return locale_copy_ctor(ret, this->loc);
645 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
646 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */
647 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_imbue, 8)
648 #define call_basic_streambuf_char_imbue(this, loc) CALL_VTBL_FUNC(this, 52, \
649 void, (basic_streambuf_char*, const locale*), (this, loc))
650 void __thiscall basic_streambuf_char_imbue(basic_streambuf_char *this, const locale *loc)
652 TRACE("(%p %p)\n", this, loc);
655 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
656 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
657 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_overflow, 8)
658 #define call_basic_streambuf_char_overflow(this, ch) CALL_VTBL_FUNC(this, 4, \
659 int, (basic_streambuf_char*, int), (this, ch))
660 int __thiscall basic_streambuf_char_overflow(basic_streambuf_char *this, int ch)
662 TRACE("(%p %d)\n", this, ch);
666 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
667 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
668 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbackfail, 8)
669 #define call_basic_streambuf_char_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, \
670 int, (basic_streambuf_char*, int), (this, ch))
671 int __thiscall basic_streambuf_char_pbackfail(basic_streambuf_char *this, int ch)
673 TRACE("(%p %d)\n", this, ch);
677 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
678 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
679 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbase, 4)
680 char* __thiscall basic_streambuf_char_pbase(const basic_streambuf_char *this)
682 TRACE("(%p)\n", this);
686 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
687 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
688 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbump, 8)
689 void __thiscall basic_streambuf_char_pbump(basic_streambuf_char *this, int off)
691 TRACE("(%p %d)\n", this, off);
693 *this->pwsize -= off;
696 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
697 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
698 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pptr, 4)
699 char* __thiscall basic_streambuf_char_pptr(const basic_streambuf_char *this)
701 TRACE("(%p)\n", this);
705 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
706 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
707 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubimbue, 12)
708 locale* __thiscall basic_streambuf_char_pubimbue(basic_streambuf_char *this, locale *ret, const locale *loc)
710 TRACE("(%p %p)\n", this, loc);
711 memcpy(ret, this->loc, sizeof(locale));
712 call_basic_streambuf_char_imbue(this, loc);
713 locale_copy_ctor(this->loc, loc);
717 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
718 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
719 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekoff, 20)
720 #define call_basic_streambuf_char_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 36, \
721 fpos_int*, (basic_streambuf_char*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
722 fpos_int* __thiscall basic_streambuf_char_seekoff(basic_streambuf_char *this,
723 fpos_int *ret, streamoff off, int way, int mode)
725 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
732 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
733 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
734 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekoff, 20)
735 fpos_int* __thiscall basic_streambuf_char_pubseekoff(basic_streambuf_char *this,
736 fpos_int *ret, streamoff off, int way, int mode)
738 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
739 return call_basic_streambuf_char_seekoff(this, ret, off, way, mode);
742 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */
743 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */
744 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekoff_old, 20)
745 fpos_int* __thiscall basic_streambuf_char_pubseekoff_old(basic_streambuf_char *this,
746 fpos_int *ret, streamoff off, unsigned int way, unsigned int mode)
748 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
749 return basic_streambuf_char_pubseekoff(this, ret, off, way, mode);
752 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
753 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
754 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekpos, 36)
755 #define call_basic_streambuf_char_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 40, \
756 fpos_int*, (basic_streambuf_char*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
757 fpos_int* __thiscall basic_streambuf_char_seekpos(basic_streambuf_char *this,
758 fpos_int *ret, fpos_int pos, int mode)
760 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
767 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
768 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
769 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekpos, 36)
770 fpos_int* __thiscall basic_streambuf_char_pubseekpos(basic_streambuf_char *this,
771 fpos_int *ret, fpos_int pos, int mode)
773 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
774 return call_basic_streambuf_char_seekpos(this, ret, pos, mode);
777 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
778 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
779 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekpos_old, 36)
780 fpos_int* __thiscall basic_streambuf_char_pubseekpos_old(basic_streambuf_char *this,
781 fpos_int *ret, fpos_int pos, unsigned int mode)
783 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
784 return basic_streambuf_char_pubseekpos(this, ret, pos, mode);
787 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEPAV12@PADH@Z */
788 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAPEAV12@PEAD_J@Z */
789 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setbuf, 12)
790 #define call_basic_streambuf_char_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 44, \
791 basic_streambuf_char*, (basic_streambuf_char*, char*, streamsize), (this, buf, count))
792 basic_streambuf_char* __thiscall basic_streambuf_char_setbuf(basic_streambuf_char *this, char *buf, streamsize count)
794 TRACE("(%p %p %ld)\n", this, buf, count);
798 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PADH@Z */
799 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEAD_J@Z */
800 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsetbuf, 12)
801 basic_streambuf_char* __thiscall basic_streambuf_char_pubsetbuf(basic_streambuf_char *this, char *buf, streamsize count)
803 TRACE("(%p %p %ld)\n", this, buf, count);
804 return call_basic_streambuf_char_setbuf(this, buf, count);
807 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
808 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
809 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sync, 4)
810 #define call_basic_streambuf_char_sync(this) CALL_VTBL_FUNC(this, 48, \
811 int, (basic_streambuf_char*), (this))
812 int __thiscall basic_streambuf_char_sync(basic_streambuf_char *this)
814 TRACE("(%p)\n", this);
818 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
819 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
820 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsync, 4)
821 int __thiscall basic_streambuf_char_pubsync(basic_streambuf_char *this)
823 TRACE("(%p)\n", this);
824 return call_basic_streambuf_char_sync(this);
827 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
828 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
829 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetn, 12)
830 streamsize __thiscall basic_streambuf_char_sgetn(basic_streambuf_char *this, char *ptr, streamsize count)
832 TRACE("(%p %p %ld)\n", this, ptr, count);
833 return call_basic_streambuf_char__Xsgetn_s(this, ptr, -1, count);
836 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
837 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JXZ */
838 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_showmanyc, 4)
839 #define call_basic_streambuf_char_showmanyc(this) CALL_VTBL_FUNC(this, 12, \
840 streamsize, (basic_streambuf_char*), (this))
841 streamsize __thiscall basic_streambuf_char_showmanyc(basic_streambuf_char *this)
843 TRACE("(%p)\n", this);
847 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
848 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JXZ */
849 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_in_avail, 4)
850 streamsize __thiscall basic_streambuf_char_in_avail(basic_streambuf_char *this)
854 TRACE("(%p)\n", this);
856 ret = basic_streambuf_char__Gnavail(this);
857 return ret ? ret : call_basic_streambuf_char_showmanyc(this);
860 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
861 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
862 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputbackc, 8)
863 int __thiscall basic_streambuf_char_sputbackc(basic_streambuf_char *this, char ch)
865 TRACE("(%p %d)\n", this, ch);
866 if(*this->prpos && *this->prpos>*this->prbuf && (*this->prpos)[-1]==ch) {
872 return call_basic_streambuf_char_pbackfail(this, ch);
875 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
876 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
877 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputc, 8)
878 int __thiscall basic_streambuf_char_sputc(basic_streambuf_char *this, char ch)
880 TRACE("(%p %d)\n", this, ch);
881 return basic_streambuf_char__Pnavail(this) ?
882 (*basic_streambuf_char__Pninc(this) = ch) :
883 call_basic_streambuf_char_overflow(this, ch);
886 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
887 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
888 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sungetc, 4)
889 int __thiscall basic_streambuf_char_sungetc(basic_streambuf_char *this)
891 TRACE("(%p)\n", this);
892 if(*this->prpos && *this->prpos>*this->prbuf) {
895 return **this->prpos;
898 return call_basic_streambuf_char_pbackfail(this, EOF);
901 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
902 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
903 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_stossc, 4)
904 void __thiscall basic_streambuf_char_stossc(basic_streambuf_char *this)
906 TRACE("(%p)\n", this);
907 if(basic_streambuf_char__Gnavail(this))
908 basic_streambuf_char__Gninc(this);
910 call_basic_streambuf_char_uflow(this);
913 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
914 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
915 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sbumpc, 4)
916 int __thiscall basic_streambuf_char_sbumpc(basic_streambuf_char *this)
918 TRACE("(%p)\n", this);
919 return basic_streambuf_char__Gnavail(this) ?
920 *basic_streambuf_char__Gninc(this) : call_basic_streambuf_char_uflow(this);
923 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
924 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
925 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetc, 4)
926 int __thiscall basic_streambuf_char_sgetc(basic_streambuf_char *this)
928 TRACE("(%p)\n", this);
929 return basic_streambuf_char__Gnavail(this) ?
930 *basic_streambuf_char_gptr(this) : call_basic_streambuf_char_underflow(this);
933 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
934 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
935 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_snextc, 4)
936 int __thiscall basic_streambuf_char_snextc(basic_streambuf_char *this)
938 TRACE("(%p)\n", this);
940 if(basic_streambuf_char__Gnavail(this) > 1)
941 return *basic_streambuf_char__Gnpreinc(this);
942 return basic_streambuf_char_sbumpc(this)==EOF ?
943 EOF : basic_streambuf_char_sgetc(this);
946 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADH@Z */
947 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_J@Z */
948 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsgetn, 12)
949 #define call_basic_streambuf_char_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, \
950 streamsize, (basic_streambuf_char*, char*, streamsize), (this, ptr, count))
951 streamsize __thiscall basic_streambuf_char_xsgetn(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 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPBDH@Z */
958 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEBD_J@Z */
959 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsputn, 12)
960 #define call_basic_streambuf_char_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 32, \
961 streamsize, (basic_streambuf_char*, const char*, streamsize), (this, ptr, count))
962 streamsize __thiscall basic_streambuf_char_xsputn(basic_streambuf_char *this, const char *ptr, streamsize count)
964 streamsize copied, chunk;
966 TRACE("(%p %p %ld)\n", this, ptr, count);
968 for(copied=0; copied<count;) {
969 chunk = basic_streambuf_char__Pnavail(this);
970 if(chunk > count-copied)
971 chunk = count-copied;
974 memcpy(*this->pwpos, ptr+copied, chunk);
975 *this->pwpos += chunk;
976 *this->pwsize -= chunk;
978 }else if(call_basic_streambuf_char_overflow(this, ptr[copied]) != EOF) {
988 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z */
989 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEBD_J@Z */
990 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputn, 12)
991 streamsize __thiscall basic_streambuf_char_sputn(basic_streambuf_char *this, const char *ptr, streamsize count)
993 TRACE("(%p %p %ld)\n", this, ptr, count);
994 return call_basic_streambuf_char_xsputn(this, ptr, count);
997 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */
998 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */
999 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
1000 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1001 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp_next, 16)
1002 void __thiscall basic_streambuf_wchar_setp_next(basic_streambuf_wchar *this, wchar_t *first, wchar_t *next, wchar_t *last)
1004 TRACE("(%p %p %p %p)\n", this, first, next, last);
1008 this->wsize = last-next;
1011 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W0@Z */
1012 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W0@Z */
1013 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG0@Z */
1014 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG0@Z */
1015 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp, 12)
1016 void __thiscall basic_streambuf_wchar_setp(basic_streambuf_wchar *this, wchar_t *first, wchar_t *last)
1018 basic_streambuf_wchar_setp_next(this, first, first, last);
1021 /* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */
1022 /* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */
1023 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
1024 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1025 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setg, 16)
1026 void __thiscall basic_streambuf_wchar_setg(basic_streambuf_wchar *this, wchar_t *first, wchar_t *next, wchar_t *last)
1028 TRACE("(%p %p %p %p)\n", this, first, next, last);
1032 this->rsize = last-next;
1035 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXXZ */
1036 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXXZ */
1037 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXXZ */
1038 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXXZ */
1039 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init_empty, 4)
1040 void __thiscall basic_streambuf_wchar__Init_empty(basic_streambuf_wchar *this)
1042 TRACE("(%p)\n", this);
1044 this->prbuf = &this->rbuf;
1045 this->pwbuf = &this->wbuf;
1046 this->prpos = &this->rpos;
1047 this->pwpos = &this->wpos;
1048 this->prsize = &this->rsize;
1049 this->pwsize = &this->wsize;
1051 basic_streambuf_wchar_setp(this, NULL, NULL);
1052 basic_streambuf_wchar_setg(this, NULL, NULL, NULL);
1055 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@W4_Uninitialized@1@@Z */
1056 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
1057 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_ctor_uninitialized, 8)
1058 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_ctor_uninitialized(basic_streambuf_wchar *this, int uninitialized)
1060 TRACE("(%p %d)\n", this, uninitialized);
1061 this->vtable = &MSVCP_basic_streambuf_wchar_vtable;
1062 mutex_ctor(&this->lock);
1066 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@W4_Uninitialized@1@@Z */
1067 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
1068 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor_uninitialized, 8)
1069 basic_streambuf_wchar* __thiscall basic_streambuf_short_ctor_uninitialized(basic_streambuf_wchar *this, int uninitialized)
1071 TRACE("(%p %d)\n", this, uninitialized);
1072 basic_streambuf_wchar_ctor_uninitialized(this, uninitialized);
1073 this->vtable = &MSVCP_basic_streambuf_short_vtable;
1077 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@XZ */
1078 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */
1079 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_ctor, 4)
1080 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_ctor(basic_streambuf_wchar *this)
1082 TRACE("(%p)\n", this);
1084 this->vtable = &MSVCP_basic_streambuf_wchar_vtable;
1085 mutex_ctor(&this->lock);
1086 this->loc = MSVCRT_operator_new(sizeof(locale));
1087 locale_ctor(this->loc);
1088 basic_streambuf_wchar__Init_empty(this);
1093 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@XZ */
1094 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@XZ */
1095 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor, 4)
1096 basic_streambuf_wchar* __thiscall basic_streambuf_short_ctor(basic_streambuf_wchar *this)
1098 TRACE("(%p)\n", this);
1099 basic_streambuf_wchar_ctor(this);
1100 this->vtable = &MSVCP_basic_streambuf_short_vtable;
1104 /* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
1105 /* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
1106 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UAE@XZ */
1107 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */
1108 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_dtor, 4)
1109 void __thiscall basic_streambuf_wchar_dtor(basic_streambuf_wchar *this)
1111 TRACE("(%p)\n", this);
1113 mutex_dtor(&this->lock);
1114 locale_dtor(this->loc);
1115 MSVCRT_operator_delete(this->loc);
1118 DEFINE_THISCALL_WRAPPER(MSVCP_basic_streambuf_wchar_vector_dtor, 8)
1119 basic_streambuf_wchar* __thiscall MSVCP_basic_streambuf_wchar_vector_dtor(basic_streambuf_wchar *this, unsigned int flags)
1121 TRACE("(%p %x)\n", this, flags);
1123 /* we have an array, with the number of elements stored before the first object */
1124 int i, *ptr = (int *)this-1;
1126 for(i=*ptr-1; i>=0; i--)
1127 basic_streambuf_wchar_dtor(this+i);
1128 MSVCRT_operator_delete(ptr);
1130 basic_streambuf_wchar_dtor(this);
1132 MSVCRT_operator_delete(this);
1138 DEFINE_THISCALL_WRAPPER(MSVCP_basic_streambuf_short_vector_dtor, 8)
1139 basic_streambuf_wchar* __thiscall MSVCP_basic_streambuf_short_vector_dtor(basic_streambuf_wchar *this, unsigned int flags)
1141 TRACE("(%p %x)\n", this, flags);
1142 return MSVCP_basic_streambuf_wchar_vector_dtor(this, flags);
1145 /* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */
1146 /* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */
1147 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1148 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1149 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gnavail, 4)
1150 streamsize __thiscall basic_streambuf_wchar__Gnavail(const basic_streambuf_wchar *this)
1152 TRACE("(%p)\n", this);
1153 return *this->prpos ? *this->prsize : 0;
1156 /* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1157 /* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1158 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1159 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1160 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gndec, 4)
1161 wchar_t* __thiscall basic_streambuf_wchar__Gndec(basic_streambuf_wchar *this)
1163 TRACE("(%p)\n", this);
1166 return *this->prpos;
1169 /* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1170 /* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1171 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1172 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1173 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gninc, 4)
1174 wchar_t* __thiscall basic_streambuf_wchar__Gninc(basic_streambuf_wchar *this)
1176 TRACE("(%p)\n", this);
1178 return (*this->prpos)++;
1181 /* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1182 /* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1183 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1184 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1185 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gnpreinc, 4)
1186 wchar_t* __thiscall basic_streambuf_wchar__Gnpreinc(basic_streambuf_wchar *this)
1188 TRACE("(%p)\n", this);
1191 return *this->prpos;
1194 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPAPA_W0PAH001@Z */
1195 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAPEA_W0PEAH001@Z */
1196 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAPAG0PAH001@Z */
1197 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAPEAG0PEAH001@Z */
1198 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init, 28)
1199 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)
1201 TRACE("(%p %p %p %p %p %p %p)\n", this, gf, gn, gc, pf, pn, pc);
1211 /* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1212 /* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1213 /* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1214 /* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1215 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Lock, 4)
1216 void __thiscall basic_streambuf_wchar__Lock(basic_streambuf_wchar *this)
1218 TRACE("(%p)\n", this);
1219 mutex_lock(&this->lock);
1222 /* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */
1223 /* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */
1224 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1225 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1226 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Pnavail, 4)
1227 streamsize __thiscall basic_streambuf_wchar__Pnavail(const basic_streambuf_wchar *this)
1229 TRACE("(%p)\n", this);
1230 return *this->pwpos ? *this->pwsize : 0;
1233 /* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1234 /* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1235 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1236 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1237 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Pninc, 4)
1238 wchar_t* __thiscall basic_streambuf_wchar__Pninc(basic_streambuf_wchar *this)
1240 TRACE("(%p)\n", this);
1242 return (*this->pwpos)++;
1245 /* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
1246 /* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
1247 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1248 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1249 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_underflow, 4)
1250 #define call_basic_streambuf_wchar_underflow(this) CALL_VTBL_FUNC(this, 16, \
1251 unsigned short, (basic_streambuf_wchar*), (this))
1252 unsigned short __thiscall basic_streambuf_wchar_underflow(basic_streambuf_wchar *this)
1254 TRACE("(%p)\n", this);
1258 /* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
1259 /* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
1260 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1261 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1262 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_uflow, 4)
1263 #define call_basic_streambuf_wchar_uflow(this) CALL_VTBL_FUNC(this, 20, \
1264 unsigned short, (basic_streambuf_wchar*), (this))
1265 unsigned short __thiscall basic_streambuf_wchar_uflow(basic_streambuf_wchar *this)
1269 TRACE("(%p)\n", this);
1271 if(call_basic_streambuf_wchar_underflow(this)==WEOF)
1274 ret = **this->prpos;
1280 /* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WIH@Z */
1281 /* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_K_J@Z */
1282 /* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGIH@Z */
1283 /* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_K_J@Z */
1284 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Xsgetn_s, 16)
1285 #define call_basic_streambuf_wchar__Xsgetn_s(this, ptr, size, count) CALL_VTBL_FUNC(this, 28, \
1286 streamsize, (basic_streambuf_wchar*, wchar_t*, MSVCP_size_t, streamsize), (this, ptr, size, count))
1287 streamsize __thiscall basic_streambuf_wchar__Xsgetn_s(basic_streambuf_wchar *this, wchar_t *ptr, MSVCP_size_t size, streamsize count)
1289 streamsize copied, chunk;
1291 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
1293 for(copied=0; copied<count && size;) {
1294 chunk = basic_streambuf_wchar__Gnavail(this);
1295 if(chunk > count-copied)
1296 chunk = count-copied;
1299 memcpy_s(ptr+copied, size, *this->prpos, chunk);
1300 *this->prpos += chunk;
1301 *this->prsize -= chunk;
1304 }else if((ptr[copied] = call_basic_streambuf_wchar_uflow(this)) != WEOF) {
1315 /* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WIH@Z */
1316 /* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_K_J@Z */
1317 /* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGIH@Z */
1318 /* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_K_J@Z */
1319 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Sgetn_s, 16)
1320 streamsize __thiscall basic_streambuf_wchar__Sgetn_s(basic_streambuf_wchar *this, wchar_t *ptr, MSVCP_size_t size, streamsize count)
1322 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
1323 return call_basic_streambuf_wchar__Xsgetn_s(this, ptr, size, count);
1326 /* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1327 /* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1328 /* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1329 /* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1330 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Unlock, 4)
1331 void __thiscall basic_streambuf_wchar__Unlock(basic_streambuf_wchar *this)
1333 TRACE("(%p)\n", this);
1334 mutex_unlock(&this->lock);
1337 /* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1338 /* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1339 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1340 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1341 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_eback, 4)
1342 wchar_t* __thiscall basic_streambuf_wchar_eback(const basic_streambuf_wchar *this)
1344 TRACE("(%p)\n", this);
1345 return *this->prbuf;
1348 /* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1349 /* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1350 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1351 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1352 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gptr, 4)
1353 wchar_t* __thiscall basic_streambuf_wchar_gptr(const basic_streambuf_wchar *this)
1355 TRACE("(%p)\n", this);
1356 return *this->prpos;
1359 /* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1360 /* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1361 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1362 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1363 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_egptr, 4)
1364 wchar_t* __thiscall basic_streambuf_wchar_egptr(const basic_streambuf_wchar *this)
1366 TRACE("(%p)\n", this);
1367 return *this->prpos+*this->prsize;
1370 /* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1371 /* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1372 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1373 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1374 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_epptr, 4)
1375 wchar_t* __thiscall basic_streambuf_wchar_epptr(const basic_streambuf_wchar *this)
1377 TRACE("(%p)\n", this);
1378 return *this->pwpos+*this->pwsize;
1381 /* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */
1382 /* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */
1383 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
1384 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
1385 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gbump, 8)
1386 void __thiscall basic_streambuf_wchar_gbump(basic_streambuf_wchar *this, int off)
1388 TRACE("(%p %d)\n", this, off);
1389 *this->prpos += off;
1390 *this->prsize -= off;
1393 /* ?getloc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QBE?AVlocale@2@XZ */
1394 /* ?getloc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEBA?AVlocale@2@XZ */
1395 /* ?getloc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QBE?AVlocale@2@XZ */
1396 /* ?getloc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEBA?AVlocale@2@XZ */
1397 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_getloc, 8)
1398 locale* __thiscall basic_streambuf_wchar_getloc(const basic_streambuf_wchar *this, locale *ret)
1400 TRACE("(%p)\n", this);
1401 return locale_copy_ctor(ret, this->loc);
1404 /* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEXABVlocale@2@@Z */
1405 /* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAXAEBVlocale@2@@Z */
1406 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEXABVlocale@2@@Z */
1407 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAXAEBVlocale@2@@Z */
1408 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_imbue, 8)
1409 #define call_basic_streambuf_wchar_imbue(this, loc) CALL_VTBL_FUNC(this, 52, \
1410 void, (basic_streambuf_wchar*, const locale*), (this, loc))
1411 void __thiscall basic_streambuf_wchar_imbue(basic_streambuf_wchar *this, const locale *loc)
1413 TRACE("(%p %p)\n", this, loc);
1416 /* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
1417 /* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
1418 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1419 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1420 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_overflow, 8)
1421 #define call_basic_streambuf_wchar_overflow(this, ch) CALL_VTBL_FUNC(this, 4, \
1422 unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1423 unsigned short __thiscall basic_streambuf_wchar_overflow(basic_streambuf_wchar *this, unsigned short ch)
1425 TRACE("(%p %d)\n", this, ch);
1429 /* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
1430 /* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
1431 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1432 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1433 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbackfail, 8)
1434 #define call_basic_streambuf_wchar_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, \
1435 unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1436 unsigned short __thiscall basic_streambuf_wchar_pbackfail(basic_streambuf_wchar *this, unsigned short ch)
1438 TRACE("(%p %d)\n", this, ch);
1442 /* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1443 /* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1444 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1445 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1446 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbase, 4)
1447 wchar_t* __thiscall basic_streambuf_wchar_pbase(const basic_streambuf_wchar *this)
1449 TRACE("(%p)\n", this);
1450 return *this->pwbuf;
1453 /* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */
1454 /* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */
1455 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
1456 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
1457 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbump, 8)
1458 void __thiscall basic_streambuf_wchar_pbump(basic_streambuf_wchar *this, int off)
1460 TRACE("(%p %d)\n", this, off);
1461 *this->pwpos += off;
1462 *this->pwsize -= off;
1465 /* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1466 /* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1467 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1468 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1469 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pptr, 4)
1470 wchar_t* __thiscall basic_streambuf_wchar_pptr(const basic_streambuf_wchar *this)
1472 TRACE("(%p)\n", this);
1473 return *this->pwpos;
1476 /* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1477 /* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1478 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1479 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1480 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubimbue, 12)
1481 locale* __thiscall basic_streambuf_wchar_pubimbue(basic_streambuf_wchar *this, locale *ret, const locale *loc)
1483 TRACE("(%p %p)\n", this, loc);
1484 memcpy(ret, this->loc, sizeof(locale));
1485 call_basic_streambuf_wchar_imbue(this, loc);
1486 locale_copy_ctor(this->loc, loc);
1490 /* ?seekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1491 /* ?seekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1492 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1493 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1494 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekoff, 20)
1495 #define call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 36, \
1496 fpos_int*, (basic_streambuf_wchar*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
1497 fpos_int* __thiscall basic_streambuf_wchar_seekoff(basic_streambuf_wchar *this,
1498 fpos_int *ret, streamoff off, int way, int mode)
1500 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
1507 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
1508 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
1509 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
1510 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
1511 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekoff, 20)
1512 fpos_int* __thiscall basic_streambuf_wchar_pubseekoff(basic_streambuf_wchar *this,
1513 fpos_int *ret, streamoff off, int way, int mode)
1515 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
1516 return call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode);
1519 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */
1520 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */
1521 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */
1522 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */
1523 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekoff_old, 20)
1524 fpos_int* __thiscall basic_streambuf_wchar_pubseekoff_old(basic_streambuf_wchar *this,
1525 fpos_int *ret, streamoff off, unsigned int way, unsigned int mode)
1527 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
1528 return basic_streambuf_wchar_pubseekoff(this, ret, off, way, mode);
1531 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
1532 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
1533 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
1534 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
1535 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekpos, 36)
1536 #define call_basic_streambuf_wchar_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 40, \
1537 fpos_int*, (basic_streambuf_wchar*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
1538 fpos_int* __thiscall basic_streambuf_wchar_seekpos(basic_streambuf_wchar *this,
1539 fpos_int *ret, fpos_int pos, int mode)
1541 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
1548 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
1549 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
1550 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
1551 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
1552 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos, 36)
1553 fpos_int* __thiscall basic_streambuf_wchar_pubseekpos(basic_streambuf_wchar *this,
1554 fpos_int *ret, fpos_int pos, int mode)
1556 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
1557 return call_basic_streambuf_wchar_seekpos(this, ret, pos, mode);
1560 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
1561 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
1562 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
1563 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
1564 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos_old, 36)
1565 fpos_int* __thiscall basic_streambuf_wchar_pubseekpos_old(basic_streambuf_wchar *this,
1566 fpos_int *ret, fpos_int pos, unsigned int mode)
1568 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
1569 return basic_streambuf_wchar_pubseekpos(this, ret, pos, mode);
1572 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEPAV12@PA_WH@Z */
1573 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAPEAV12@PEA_W_J@Z */
1574 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEPAV12@PAGH@Z */
1575 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAPEAV12@PEAG_J@Z */
1576 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setbuf, 12)
1577 #define call_basic_streambuf_wchar_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 44, \
1578 basic_streambuf_wchar*, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, buf, count))
1579 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_setbuf(basic_streambuf_wchar *this, wchar_t *buf, streamsize count)
1581 TRACE("(%p %p %ld)\n", this, buf, count);
1585 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PA_WH@Z */
1586 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEA_W_J@Z */
1587 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PAGH@Z */
1588 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEAG_J@Z */
1589 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsetbuf, 12)
1590 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_pubsetbuf(basic_streambuf_wchar *this, wchar_t *buf, streamsize count)
1592 TRACE("(%p %p %ld)\n", this, buf, count);
1593 return call_basic_streambuf_wchar_setbuf(this, buf, count);
1596 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
1597 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAHXZ */
1598 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
1599 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */
1600 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sync, 4)
1601 #define call_basic_streambuf_wchar_sync(this) CALL_VTBL_FUNC(this, 48, \
1602 int, (basic_streambuf_wchar*), (this))
1603 int __thiscall basic_streambuf_wchar_sync(basic_streambuf_wchar *this)
1605 TRACE("(%p)\n", this);
1609 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
1610 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAHXZ */
1611 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
1612 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHXZ */
1613 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsync, 4)
1614 int __thiscall basic_streambuf_wchar_pubsync(basic_streambuf_wchar *this)
1616 TRACE("(%p)\n", this);
1617 return call_basic_streambuf_wchar_sync(this);
1620 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WH@Z */
1621 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_J@Z */
1622 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */
1623 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */
1624 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetn, 12)
1625 streamsize __thiscall basic_streambuf_wchar_sgetn(basic_streambuf_wchar *this, wchar_t *ptr, streamsize count)
1627 TRACE("(%p %p %ld)\n", this, ptr, count);
1628 return call_basic_streambuf_wchar__Xsgetn_s(this, ptr, -1, count);
1631 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
1632 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JXZ */
1633 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
1634 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JXZ */
1635 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_showmanyc, 4)
1636 #define call_basic_streambuf_wchar_showmanyc(this) CALL_VTBL_FUNC(this, 12, \
1637 streamsize, (basic_streambuf_wchar*), (this))
1638 streamsize __thiscall basic_streambuf_wchar_showmanyc(basic_streambuf_wchar *this)
1640 TRACE("(%p)\n", this);
1644 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
1645 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JXZ */
1646 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
1647 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JXZ */
1648 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_in_avail, 4)
1649 streamsize __thiscall basic_streambuf_wchar_in_avail(basic_streambuf_wchar *this)
1653 TRACE("(%p)\n", this);
1655 ret = basic_streambuf_wchar__Gnavail(this);
1656 return ret ? ret : call_basic_streambuf_wchar_showmanyc(this);
1659 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
1660 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
1661 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
1662 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
1663 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputbackc, 8)
1664 unsigned short __thiscall basic_streambuf_wchar_sputbackc(basic_streambuf_wchar *this, wchar_t ch)
1666 TRACE("(%p %d)\n", this, ch);
1667 if(*this->prpos && *this->prpos>*this->prbuf && (*this->prpos)[-1]==ch) {
1673 return call_basic_streambuf_wchar_pbackfail(this, ch);
1676 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
1677 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
1678 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
1679 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHG@Z */
1680 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputc, 8)
1681 unsigned short __thiscall basic_streambuf_wchar_sputc(basic_streambuf_wchar *this, wchar_t ch)
1683 TRACE("(%p %d)\n", this, ch);
1684 return basic_streambuf_wchar__Pnavail(this) ?
1685 (*basic_streambuf_wchar__Pninc(this) = ch) :
1686 call_basic_streambuf_wchar_overflow(this, ch);
1689 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
1690 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
1691 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1692 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1693 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sungetc, 4)
1694 unsigned short __thiscall basic_streambuf_wchar_sungetc(basic_streambuf_wchar *this)
1696 TRACE("(%p)\n", this);
1697 if(*this->prpos && *this->prpos>*this->prbuf) {
1700 return **this->prpos;
1703 return call_basic_streambuf_wchar_pbackfail(this, WEOF);
1706 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1707 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1708 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1709 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1710 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_stossc, 4)
1711 void __thiscall basic_streambuf_wchar_stossc(basic_streambuf_wchar *this)
1713 TRACE("(%p)\n", this);
1714 if(basic_streambuf_wchar__Gnavail(this))
1715 basic_streambuf_wchar__Gninc(this);
1717 call_basic_streambuf_wchar_uflow(this);
1720 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
1721 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
1722 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1723 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1724 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sbumpc, 4)
1725 unsigned short __thiscall basic_streambuf_wchar_sbumpc(basic_streambuf_wchar *this)
1727 TRACE("(%p)\n", this);
1728 return basic_streambuf_wchar__Gnavail(this) ?
1729 *basic_streambuf_wchar__Gninc(this) : call_basic_streambuf_wchar_uflow(this);
1732 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
1733 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
1734 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1735 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1736 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetc, 4)
1737 unsigned short __thiscall basic_streambuf_wchar_sgetc(basic_streambuf_wchar *this)
1739 TRACE("(%p)\n", this);
1740 return basic_streambuf_wchar__Gnavail(this) ?
1741 *basic_streambuf_wchar_gptr(this) : call_basic_streambuf_wchar_underflow(this);
1744 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
1745 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
1746 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1747 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1748 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_snextc, 4)
1749 unsigned short __thiscall basic_streambuf_wchar_snextc(basic_streambuf_wchar *this)
1751 TRACE("(%p)\n", this);
1753 if(basic_streambuf_wchar__Gnavail(this) > 1)
1754 return *basic_streambuf_wchar__Gnpreinc(this);
1755 return basic_streambuf_wchar_sbumpc(this)==WEOF ?
1756 WEOF : basic_streambuf_wchar_sgetc(this);
1759 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WH@Z */
1760 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_J@Z */
1761 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGH@Z */
1762 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_J@Z */
1763 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsgetn, 12)
1764 #define call_basic_streambuf_wchar_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, \
1765 streamsize, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, ptr, count))
1766 streamsize __thiscall basic_streambuf_wchar_xsgetn(basic_streambuf_wchar *this, wchar_t *ptr, streamsize count)
1768 TRACE("(%p %p %ld)\n", this, ptr, count);
1769 return call_basic_streambuf_wchar__Xsgetn_s(this, ptr, -1, count);
1772 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPB_WH@Z */
1773 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEB_W_J@Z */
1774 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPBGH@Z */
1775 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEBG_J@Z */
1776 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsputn, 12)
1777 #define call_basic_streambuf_wchar_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 32, \
1778 streamsize, (basic_streambuf_wchar*, const wchar_t*, streamsize), (this, ptr, count))
1779 streamsize __thiscall basic_streambuf_wchar_xsputn(basic_streambuf_wchar *this, const wchar_t *ptr, streamsize count)
1781 streamsize copied, chunk;
1783 TRACE("(%p %p %ld)\n", this, ptr, count);
1785 for(copied=0; copied<count;) {
1786 chunk = basic_streambuf_wchar__Pnavail(this);
1787 if(chunk > count-copied)
1788 chunk = count-copied;
1791 memcpy(*this->pwpos, ptr+copied, chunk);
1792 *this->pwpos += chunk;
1793 *this->pwsize -= chunk;
1795 }else if(call_basic_streambuf_wchar_overflow(this, ptr[copied]) != WEOF) {
1805 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPB_WH@Z */
1806 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEB_W_J@Z */
1807 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPBGH@Z */
1808 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEBG_J@Z */
1809 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputn, 12)
1810 streamsize __thiscall basic_streambuf_wchar_sputn(basic_streambuf_wchar *this, const wchar_t *ptr, streamsize count)
1812 TRACE("(%p %p %ld)\n", this, ptr, count);
1813 return call_basic_streambuf_wchar_xsputn(this, ptr, count);
1816 /* ??0ios_base@std@@IAE@XZ */
1817 /* ??0ios_base@std@@IEAA@XZ */
1818 DEFINE_THISCALL_WRAPPER(ios_base_ctor, 4)
1819 ios_base* __thiscall ios_base_ctor(ios_base *this)
1821 TRACE("(%p)\n", this);
1822 this->vtable = &MSVCP_ios_base_vtable;
1826 /* ??0ios_base@std@@QAE@ABV01@@Z */
1827 /* ??0ios_base@std@@QEAA@AEBV01@@Z */
1828 DEFINE_THISCALL_WRAPPER(ios_base_copy_ctor, 8)
1829 ios_base* __thiscall ios_base_copy_ctor(ios_base *this, const ios_base *copy)
1831 TRACE("(%p %p)\n", this, copy);
1833 this->vtable = &MSVCP_ios_base_vtable;
1837 /* ?_Callfns@ios_base@std@@AAEXW4event@12@@Z */
1838 /* ?_Callfns@ios_base@std@@AEAAXW4event@12@@Z */
1839 DEFINE_THISCALL_WRAPPER(ios_base_Callfns, 8)
1840 void __thiscall ios_base_Callfns(ios_base *this, IOS_BASE_event event)
1842 IOS_BASE_fnarray *cur;
1844 TRACE("(%p %x)\n", this, event);
1846 for(cur=this->calls; cur; cur=cur->next)
1847 cur->event_handler(event, this, cur->index);
1850 /* ?_Tidy@ios_base@std@@AAAXXZ */
1851 /* ?_Tidy@ios_base@std@@AEAAXXZ */
1852 void CDECL ios_base_Tidy(ios_base *this)
1854 IOS_BASE_iosarray *arr_cur, *arr_next;
1855 IOS_BASE_fnarray *event_cur, *event_next;
1857 TRACE("(%p)\n", this);
1859 ios_base_Callfns(this, EVENT_erase_event);
1861 for(arr_cur=this->arr; arr_cur; arr_cur=arr_next) {
1862 arr_next = arr_cur->next;
1863 MSVCRT_operator_delete(arr_cur);
1867 for(event_cur=this->calls; event_cur; event_cur=event_next) {
1868 event_next = event_cur->next;
1869 MSVCRT_operator_delete(event_cur);
1874 /* ?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z */
1875 /* ?_Ios_base_dtor@ios_base@std@@CAXPEAV12@@Z */
1876 void CDECL ios_base_Ios_base_dtor(ios_base *obj)
1878 TRACE("(%p)\n", obj);
1880 locale_dtor(obj->loc);
1881 MSVCRT_operator_delete(obj->loc);
1886 /* ??1ios_base@std@@UAE@XZ */
1887 /* ??1ios_base@std@@UEAA@XZ */
1888 DEFINE_THISCALL_WRAPPER(ios_base_dtor, 4)
1889 void __thiscall ios_base_dtor(ios_base *this)
1891 ios_base_Ios_base_dtor(this);
1894 DEFINE_THISCALL_WRAPPER(MSVCP_ios_base_vector_dtor, 8)
1895 ios_base* __thiscall MSVCP_ios_base_vector_dtor(ios_base *this, unsigned int flags)
1897 TRACE("(%p %x)\n", this, flags);
1899 /* we have an array, with the number of elements stored before the first object */
1900 int i, *ptr = (int *)this-1;
1902 for(i=*ptr-1; i>=0; i--)
1903 ios_base_dtor(this+i);
1904 MSVCRT_operator_delete(ptr);
1906 ios_base_dtor(this);
1908 MSVCRT_operator_delete(this);
1914 DEFINE_THISCALL_WRAPPER(MSVCP_iosb_vector_dtor, 8)
1915 void* __thiscall MSVCP_iosb_vector_dtor(void *this, unsigned int flags)
1917 TRACE("(%p %x)\n", this, flags);
1919 int *ptr = (int *)this-1;
1920 MSVCRT_operator_delete(ptr);
1923 MSVCRT_operator_delete(this);
1929 /* ?_Findarr@ios_base@std@@AAEAAU_Iosarray@12@H@Z */
1930 /* ?_Findarr@ios_base@std@@AEAAAEAU_Iosarray@12@H@Z */
1931 DEFINE_THISCALL_WRAPPER(ios_base_Findarr, 8)
1932 IOS_BASE_iosarray* __thiscall ios_base_Findarr(ios_base *this, int index)
1934 IOS_BASE_iosarray *p;
1936 TRACE("(%p %d)\n", this, index);
1938 for(p=this->arr; p; p=p->next) {
1939 if(p->index == index)
1943 for(p=this->arr; p; p=p->next) {
1944 if(!p->long_val && !p->ptr_val) {
1950 p = MSVCRT_operator_new(sizeof(IOS_BASE_iosarray));
1951 p->next = this->arr;
1959 /* ?iword@ios_base@std@@QAEAAJH@Z */
1960 /* ?iword@ios_base@std@@QEAAAEAJH@Z */
1961 DEFINE_THISCALL_WRAPPER(ios_base_iword, 8)
1962 LONG* __thiscall ios_base_iword(ios_base *this, int index)
1964 TRACE("(%p %d)\n", this, index);
1965 return &ios_base_Findarr(this, index)->long_val;
1968 /* ?pword@ios_base@std@@QAEAAPAXH@Z */
1969 /* ?pword@ios_base@std@@QEAAAEAPEAXH@Z */
1970 DEFINE_THISCALL_WRAPPER(ios_base_pword, 8)
1971 void** __thiscall ios_base_pword(ios_base *this, int index)
1973 TRACE("(%p %d)\n", this, index);
1974 return &ios_base_Findarr(this, index)->ptr_val;
1977 /* ?register_callback@ios_base@std@@QAEXP6AXW4event@12@AAV12@H@ZH@Z */
1978 /* ?register_callback@ios_base@std@@QEAAXP6AXW4event@12@AEAV12@H@ZH@Z */
1979 DEFINE_THISCALL_WRAPPER(ios_base_register_callback, 12)
1980 void __thiscall ios_base_register_callback(ios_base *this, IOS_BASE_event_callback callback, int index)
1982 IOS_BASE_fnarray *event;
1984 TRACE("(%p %p %d)\n", this, callback, index);
1986 event = MSVCRT_operator_new(sizeof(IOS_BASE_fnarray));
1987 event->next = this->calls;
1988 event->index = index;
1989 event->event_handler = callback;
1990 this->calls = event;
1993 /* ?clear@ios_base@std@@QAEXH_N@Z */
1994 /* ?clear@ios_base@std@@QEAAXH_N@Z */
1995 DEFINE_THISCALL_WRAPPER(ios_base_clear_reraise, 12)
1996 void __thiscall ios_base_clear_reraise(ios_base *this, IOSB_iostate state, MSVCP_bool reraise)
1998 TRACE("(%p %x %x)\n", this, state, reraise);
2000 this->state = state & IOSTATE_mask;
2001 if(!(this->state & this->except))
2005 throw_exception(EXCEPTION_RERAISE, NULL);
2006 else if(this->state & this->except & IOSTATE_eofbit)
2007 throw_exception(EXCEPTION_FAILURE, "eofbit is set");
2008 else if(this->state & this->except & IOSTATE_failbit)
2009 throw_exception(EXCEPTION_FAILURE, "failbit is set");
2010 else if(this->state & this->except & IOSTATE_badbit)
2011 throw_exception(EXCEPTION_FAILURE, "badbit is set");
2012 else if(this->state & this->except & IOSTATE__Hardfail)
2013 throw_exception(EXCEPTION_FAILURE, "_Hardfail is set");
2016 /* ?clear@ios_base@std@@QAEXH@Z */
2017 /* ?clear@ios_base@std@@QEAAXH@Z */
2018 DEFINE_THISCALL_WRAPPER(ios_base_clear, 8)
2019 void __thiscall ios_base_clear(ios_base *this, IOSB_iostate state)
2021 ios_base_clear_reraise(this, state, FALSE);
2024 /* ?clear@ios_base@std@@QAEXI@Z */
2025 /* ?clear@ios_base@std@@QEAAXI@Z */
2026 DEFINE_THISCALL_WRAPPER(ios_base_clear_unsigned, 8)
2027 void __thiscall ios_base_clear_unsigned(ios_base *this, unsigned int state)
2029 ios_base_clear_reraise(this, (IOSB_iostate)state, FALSE);
2032 /* ?exceptions@ios_base@std@@QAEXH@Z */
2033 /* ?exceptions@ios_base@std@@QEAAXH@Z */
2034 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_set, 8)
2035 void __thiscall ios_base_exceptions_set(ios_base *this, IOSB_iostate state)
2037 TRACE("(%p %x)\n", this, state);
2038 this->except = state & IOSTATE_mask;
2039 ios_base_clear(this, this->state);
2042 /* ?exceptions@ios_base@std@@QAEXI@Z */
2043 /* ?exceptions@ios_base@std@@QEAAXI@Z */
2044 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_set_unsigned, 8)
2045 void __thiscall ios_base_exceptions_set_unsigned(ios_base *this, unsigned int state)
2047 TRACE("(%p %x)\n", this, state);
2048 ios_base_exceptions_set(this, state);
2051 /* ?exceptions@ios_base@std@@QBEHXZ */
2052 /* ?exceptions@ios_base@std@@QEBAHXZ */
2053 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_get, 4)
2054 IOSB_iostate __thiscall ios_base_exceptions_get(ios_base *this)
2056 TRACE("(%p)\n", this);
2057 return this->except;
2060 /* ?copyfmt@ios_base@std@@QAEAAV12@ABV12@@Z */
2061 /* ?copyfmt@ios_base@std@@QEAAAEAV12@AEBV12@@Z */
2062 DEFINE_THISCALL_WRAPPER(ios_base_copyfmt, 8)
2063 ios_base* __thiscall ios_base_copyfmt(ios_base *this, const ios_base *rhs)
2065 TRACE("(%p %p)\n", this, rhs);
2068 IOS_BASE_iosarray *arr_cur;
2069 IOS_BASE_fnarray *event_cur;
2071 ios_base_Tidy(this);
2073 for(arr_cur=rhs->arr; arr_cur; arr_cur=arr_cur->next) {
2074 if(arr_cur->long_val)
2075 *ios_base_iword(this, arr_cur->index) = arr_cur->long_val;
2076 if(arr_cur->ptr_val)
2077 *ios_base_pword(this, arr_cur->index) = arr_cur->ptr_val;
2079 this->stdstr = rhs->stdstr;
2080 this->fmtfl = rhs->fmtfl;
2081 this->prec = rhs->prec;
2082 this->wide = rhs->wide;
2083 locale_operator_assign(this->loc, rhs->loc);
2085 for(event_cur=rhs->calls; event_cur; event_cur=event_cur->next)
2086 ios_base_register_callback(this, event_cur->event_handler, event_cur->index);
2088 ios_base_Callfns(this, EVENT_copyfmt_event);
2089 ios_base_exceptions_set(this, rhs->except);
2095 /* ??4ios_base@std@@QAEAAV01@ABV01@@Z */
2096 /* ??4ios_base@std@@QEAAAEAV01@AEBV01@@Z */
2097 DEFINE_THISCALL_WRAPPER(ios_base_assign, 8)
2098 ios_base* __thiscall ios_base_assign(ios_base *this, const ios_base *right)
2100 TRACE("(%p %p)\n", this, right);
2103 this->state = right->state;
2104 ios_base_copyfmt(this, right);
2110 /* ?fail@ios_base@std@@QBE_NXZ */
2111 /* ?fail@ios_base@std@@QEBA_NXZ */
2112 DEFINE_THISCALL_WRAPPER(ios_base_fail, 4)
2113 MSVCP_bool __thiscall ios_base_fail(const ios_base *this)
2115 TRACE("(%p)\n", this);
2116 return (this->state & (IOSTATE_failbit|IOSTATE_badbit)) != 0;
2119 /* ??7ios_base@std@@QBE_NXZ */
2120 /* ??7ios_base@std@@QEBA_NXZ */
2121 DEFINE_THISCALL_WRAPPER(ios_base_op_succ, 4)
2122 MSVCP_bool __thiscall ios_base_op_succ(const ios_base *this)
2124 TRACE("(%p)\n", this);
2125 return ios_base_fail(this);
2128 /* ??Bios_base@std@@QBEPAXXZ */
2129 /* ??Bios_base@std@@QEBAPEAXXZ */
2130 DEFINE_THISCALL_WRAPPER(ios_base_op_fail, 4)
2131 void* __thiscall ios_base_op_fail(const ios_base *this)
2133 TRACE("(%p)\n", this);
2134 return ios_base_fail(this) ? NULL : (void*)this;
2137 /* ?_Addstd@ios_base@std@@SAXPAV12@@Z */
2138 /* ?_Addstd@ios_base@std@@SAXPEAV12@@Z */
2139 void CDECL ios_base_Addstd(ios_base *add)
2141 FIXME("(%p) stub\n", add);
2144 /* ?_Index_func@ios_base@std@@CAAAHXZ */
2145 /* ?_Index_func@ios_base@std@@CAAEAHXZ */
2146 int* CDECL ios_base_Index_func(void)
2149 return &ios_base_Index;
2152 /* ?_Init@ios_base@std@@IAEXXZ */
2153 /* ?_Init@ios_base@std@@IEAAXXZ */
2154 DEFINE_THISCALL_WRAPPER(ios_base_Init, 4)
2155 void __thiscall ios_base_Init(ios_base *this)
2157 TRACE("(%p)\n", this);
2160 this->state = this->except = IOSTATE_goodbit;
2161 this->fmtfl = FMTFLAG_skipws | FMTFLAG_dec;
2166 this->loc = MSVCRT_operator_new(sizeof(locale));
2167 locale_ctor(this->loc);
2170 /* ?_Sync_func@ios_base@std@@CAAA_NXZ */
2171 /* ?_Sync_func@ios_base@std@@CAAEA_NXZ */
2172 MSVCP_bool* CDECL ios_base_Sync_func(void)
2175 return &ios_base_Sync;
2178 /* ?bad@ios_base@std@@QBE_NXZ */
2179 /* ?bad@ios_base@std@@QEBA_NXZ */
2180 DEFINE_THISCALL_WRAPPER(ios_base_bad, 4)
2181 MSVCP_bool __thiscall ios_base_bad(const ios_base *this)
2183 TRACE("(%p)\n", this);
2184 return (this->state & IOSTATE_badbit) != 0;
2187 /* ?eof@ios_base@std@@QBE_NXZ */
2188 /* ?eof@ios_base@std@@QEBA_NXZ */
2189 DEFINE_THISCALL_WRAPPER(ios_base_eof, 4)
2190 MSVCP_bool __thiscall ios_base_eof(const ios_base *this)
2192 TRACE("(%p)\n", this);
2193 return (this->state & IOSTATE_eofbit) != 0;
2196 /* ?flags@ios_base@std@@QAEHH@Z */
2197 /* ?flags@ios_base@std@@QEAAHH@Z */
2198 DEFINE_THISCALL_WRAPPER(ios_base_flags_set, 8)
2199 IOSB_fmtflags __thiscall ios_base_flags_set(ios_base *this, IOSB_fmtflags flags)
2201 IOSB_fmtflags ret = this->fmtfl;
2203 TRACE("(%p %x)\n", this, flags);
2205 this->fmtfl = flags & FMTFLAG_mask;
2209 /* ?flags@ios_base@std@@QBEHXZ */
2210 /* ?flags@ios_base@std@@QEBAHXZ */
2211 DEFINE_THISCALL_WRAPPER(ios_base_flags_get, 4)
2212 IOSB_fmtflags __thiscall ios_base_flags_get(const ios_base *this)
2214 TRACE("(%p)\n", this);
2218 /* ?getloc@ios_base@std@@QBE?AVlocale@2@XZ */
2219 /* ?getloc@ios_base@std@@QEBA?AVlocale@2@XZ */
2220 DEFINE_THISCALL_WRAPPER(ios_base_getloc, 8)
2221 locale* __thiscall ios_base_getloc(const ios_base *this, locale *ret)
2223 TRACE("(%p)\n", this);
2224 return locale_copy_ctor(ret, this->loc);
2227 /* ?good@ios_base@std@@QBE_NXZ */
2228 /* ?good@ios_base@std@@QEBA_NXZ */
2229 DEFINE_THISCALL_WRAPPER(ios_base_good, 4)
2230 MSVCP_bool __thiscall ios_base_good(const ios_base *this)
2232 TRACE("(%p)\n", this);
2233 return this->state == IOSTATE_goodbit;
2236 /* ?imbue@ios_base@std@@QAE?AVlocale@2@ABV32@@Z */
2237 /* ?imbue@ios_base@std@@QEAA?AVlocale@2@AEBV32@@Z */
2238 DEFINE_THISCALL_WRAPPER(ios_base_imbue, 12)
2239 locale* __thiscall ios_base_imbue(ios_base *this, locale *ret, const locale *loc)
2241 TRACE("(%p %p)\n", this, loc);
2243 locale_copy_ctor(this->loc, loc);
2247 /* ?precision@ios_base@std@@QAEHH@Z */
2248 /* ?precision@ios_base@std@@QEAA_J_J@Z */
2249 DEFINE_THISCALL_WRAPPER(ios_base_precision_set, 8)
2250 streamsize __thiscall ios_base_precision_set(ios_base *this, streamsize precision)
2252 streamsize ret = this->prec;
2254 TRACE("(%p %ld)\n", this, precision);
2256 this->prec = precision;
2260 /* ?precision@ios_base@std@@QBEHXZ */
2261 /* ?precision@ios_base@std@@QEBA_JXZ */
2262 DEFINE_THISCALL_WRAPPER(ios_base_precision_get, 4)
2263 streamsize __thiscall ios_base_precision_get(const ios_base *this)
2265 TRACE("(%p)\n", this);
2269 /* ?rdstate@ios_base@std@@QBEHXZ */
2270 /* ?rdstate@ios_base@std@@QEBAHXZ */
2271 DEFINE_THISCALL_WRAPPER(ios_base_rdstate, 4)
2272 IOSB_iostate __thiscall ios_base_rdstate(const ios_base *this)
2274 TRACE("(%p)\n", this);
2278 /* ?setf@ios_base@std@@QAEHHH@Z */
2279 /* ?setf@ios_base@std@@QEAAHHH@Z */
2280 DEFINE_THISCALL_WRAPPER(ios_base_setf_mask, 12)
2281 IOSB_fmtflags __thiscall ios_base_setf_mask(ios_base *this, IOSB_fmtflags flags, IOSB_fmtflags mask)
2283 IOSB_fmtflags ret = this->fmtfl;
2285 TRACE("(%p %x %x)\n", this, flags, mask);
2287 this->fmtfl = (this->fmtfl & (~mask)) | (flags & mask & FMTFLAG_mask);
2291 /* ?setf@ios_base@std@@QAEHH@Z */
2292 /* ?setf@ios_base@std@@QEAAHH@Z */
2293 DEFINE_THISCALL_WRAPPER(ios_base_setf, 8)
2294 IOSB_fmtflags __thiscall ios_base_setf(ios_base *this, IOSB_fmtflags flags)
2296 return ios_base_setf_mask(this, flags, ~0);
2299 /* ?setstate@ios_base@std@@QAEXH_N@Z */
2300 /* ?setstate@ios_base@std@@QEAAXH_N@Z */
2301 DEFINE_THISCALL_WRAPPER(ios_base_setstate_reraise, 12)
2302 void __thiscall ios_base_setstate_reraise(ios_base *this, IOSB_iostate state, MSVCP_bool reraise)
2304 TRACE("(%p %x %x)\n", this, state, reraise);
2306 if(state != IOSTATE_goodbit)
2307 ios_base_clear_reraise(this, this->state | state, reraise);
2310 /* ?setstate@ios_base@std@@QAEXH@Z */
2311 /* ?setstate@ios_base@std@@QEAAXH@Z */
2312 DEFINE_THISCALL_WRAPPER(ios_base_setstate, 8)
2313 void __thiscall ios_base_setstate(ios_base *this, IOSB_iostate state)
2315 ios_base_setstate_reraise(this, state, FALSE);
2318 /* ?setstate@ios_base@std@@QAEXI@Z */
2319 /* ?setstate@ios_base@std@@QEAAXI@Z */
2320 DEFINE_THISCALL_WRAPPER(ios_base_setstate_unsigned, 8)
2321 void __thiscall ios_base_setstate_unsigned(ios_base *this, unsigned int state)
2323 ios_base_setstate_reraise(this, (IOSB_iostate)state, FALSE);
2326 /* ?sync_with_stdio@ios_base@std@@SA_N_N@Z */
2327 MSVCP_bool CDECL ios_base_sync_with_stdio(MSVCP_bool sync)
2332 TRACE("(%x)\n", sync);
2334 _Lockit_ctor_locktype(&lock, _LOCK_STREAM);
2335 ret = ios_base_Sync;
2336 ios_base_Sync = sync;
2337 _Lockit_dtor(&lock);
2341 /* ?unsetf@ios_base@std@@QAEXH@Z */
2342 /* ?unsetf@ios_base@std@@QEAAXH@Z */
2343 DEFINE_THISCALL_WRAPPER(ios_base_unsetf, 8)
2344 void __thiscall ios_base_unsetf(ios_base *this, IOSB_fmtflags flags)
2346 TRACE("(%p %x)\n", this, flags);
2347 this->fmtfl &= ~flags;
2350 /* ?width@ios_base@std@@QAEHH@Z */
2351 /* ?width@ios_base@std@@QEAA_J_J@Z */
2352 DEFINE_THISCALL_WRAPPER(ios_base_width_set, 8)
2353 streamsize __thiscall ios_base_width_set(ios_base *this, streamsize width)
2355 streamsize ret = this->wide;
2357 TRACE("(%p %ld)\n", this, width);
2363 /* ?width@ios_base@std@@QBEHXZ */
2364 /* ?width@ios_base@std@@QEBA_JXZ */
2365 DEFINE_THISCALL_WRAPPER(ios_base_width_get, 4)
2366 streamsize __thiscall ios_base_width_get(ios_base *this)
2368 TRACE("(%p)\n", this);
2372 /* ?xalloc@ios_base@std@@SAHXZ */
2373 int CDECL ios_base_xalloc(void)
2380 _Lockit_ctor_locktype(&lock, _LOCK_STREAM);
2381 ret = ios_base_Index++;
2382 _Lockit_dtor(&lock);
2386 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IAE@XZ */
2387 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IEAA@XZ */
2388 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor, 4)
2389 basic_ios_char* __thiscall basic_ios_char_ctor(basic_ios_char *this)
2391 TRACE("(%p)\n", this);
2393 ios_base_ctor(&this->base);
2394 this->base.vtable = &MSVCP_basic_ios_char_vtable;
2398 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IAEXPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
2399 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
2400 DEFINE_THISCALL_WRAPPER(basic_ios_char_init, 12)
2401 void __thiscall basic_ios_char_init(basic_ios_char *this, basic_streambuf_char *streambuf, MSVCP_bool isstd)
2403 TRACE("(%p %p %x)\n", this, streambuf, isstd);
2404 ios_base_Init(&this->base);
2405 this->strbuf = streambuf;
2406 this->stream = NULL;
2410 ios_base_setstate(&this->base, IOSTATE_badbit);
2413 FIXME("standard streams not handled yet\n");
2416 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
2417 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
2418 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor_streambuf, 8)
2419 basic_ios_char* __thiscall basic_ios_char_ctor_streambuf(basic_ios_char *this, basic_streambuf_char *strbuf)
2421 TRACE("(%p %p)\n", this, strbuf);
2423 basic_ios_char_ctor(this);
2424 basic_ios_char_init(this, strbuf, FALSE);
2428 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UAE@XZ */
2429 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UEAA@XZ */
2430 DEFINE_THISCALL_WRAPPER(basic_ios_char_dtor, 4)
2431 void __thiscall basic_ios_char_dtor(basic_ios_char *this)
2433 TRACE("(%p)\n", this);
2434 ios_base_dtor(&this->base);
2437 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ios_char_vector_dtor, 8)
2438 basic_ios_char* __thiscall MSVCP_basic_ios_char_vector_dtor(basic_ios_char *this, unsigned int flags)
2440 TRACE("(%p %x)\n", this, flags);
2442 /* we have an array, with the number of elements stored before the first object */
2443 int i, *ptr = (int *)this-1;
2445 for(i=*ptr-1; i>=0; i--)
2446 basic_ios_char_dtor(this+i);
2447 MSVCRT_operator_delete(ptr);
2449 basic_ios_char_dtor(this);
2451 MSVCRT_operator_delete(this);
2457 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
2458 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
2459 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear_reraise, 12)
2460 void __thiscall basic_ios_char_clear_reraise(basic_ios_char *this, IOSB_iostate state, MSVCP_bool reraise)
2462 TRACE("(%p %x %x)\n", this, state, reraise);
2463 ios_base_clear_reraise(&this->base, state | (this->strbuf ? IOSTATE_goodbit : IOSTATE_badbit), reraise);
2466 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
2467 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
2468 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear, 8)
2469 void __thiscall basic_ios_char_clear(basic_ios_char *this, unsigned int state)
2471 basic_ios_char_clear_reraise(this, (IOSB_iostate)state, FALSE);
2474 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEAAV12@ABV12@@Z */
2475 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEBV12@@Z */
2476 DEFINE_THISCALL_WRAPPER(basic_ios_char_copyfmt, 8)
2477 basic_ios_char* __thiscall basic_ios_char_copyfmt(basic_ios_char *this, basic_ios_char *copy)
2479 TRACE("(%p %p)\n", this, copy);
2483 this->stream = copy->stream;
2484 this->fillch = copy->fillch;
2485 ios_base_copyfmt(&this->base, ©->base);
2489 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEDD@Z */
2490 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAADD@Z */
2491 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_set, 8)
2492 char __thiscall basic_ios_char_fill_set(basic_ios_char *this, char fill)
2494 char ret = this->fillch;
2496 TRACE("(%p %c)\n", this, fill);
2498 this->fillch = fill;
2502 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDXZ */
2503 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADXZ */
2504 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_get, 4)
2505 char __thiscall basic_ios_char_fill_get(basic_ios_char *this)
2507 TRACE("(%p)\n", this);
2508 return this->fillch;
2511 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
2512 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
2513 DEFINE_THISCALL_WRAPPER(basic_ios_char_imbue, 12)
2514 locale *__thiscall basic_ios_char_imbue(basic_ios_char *this, locale *ret, const locale *loc)
2516 TRACE("(%p %p %p)\n", this, ret, loc);
2519 return basic_streambuf_char_pubimbue(this->strbuf, ret, loc);
2521 locale_copy_ctor(ret, loc);
2525 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDDD@Z */
2526 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADDD@Z */
2527 DEFINE_THISCALL_WRAPPER(basic_ios_char_narrow, 12)
2528 char __thiscall basic_ios_char_narrow(basic_ios_char *this, char ch, char def)
2530 FIXME("(%p %c %c) stub\n", this, ch, def);
2534 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PAV32@@Z */
2535 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAV32@@Z */
2536 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_set, 8)
2537 basic_streambuf_char* __thiscall basic_ios_char_rdbuf_set(basic_ios_char *this, basic_streambuf_char *streambuf)
2539 basic_streambuf_char *ret = this->strbuf;
2541 TRACE("(%p %p)\n", this, streambuf);
2543 this->strbuf = streambuf;
2544 basic_ios_char_clear(this, IOSTATE_goodbit);
2548 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
2549 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
2550 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_get, 4)
2551 basic_streambuf_char* __thiscall basic_ios_char_rdbuf_get(const basic_ios_char *this)
2553 TRACE("(%p)\n", this);
2554 return this->strbuf;
2557 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
2558 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
2559 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate_reraise, 12)
2560 void __thiscall basic_ios_char_setstate_reraise(basic_ios_char *this, IOSB_iostate state, MSVCP_bool reraise)
2562 TRACE("(%p %x %x)\n", this, state, reraise);
2564 if(state != IOSTATE_goodbit)
2565 basic_ios_char_clear_reraise(this, this->base.state | state, reraise);
2568 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
2569 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
2570 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate, 8)
2571 void __thiscall basic_ios_char_setstate(basic_ios_char *this, unsigned int state)
2573 basic_ios_char_setstate_reraise(this, (IOSB_iostate)state, FALSE);
2576 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@PAV32@@Z */
2577 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@PEAV32@@Z */
2578 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_set, 8)
2579 basic_ostream_char* __thiscall basic_ios_char_tie_set(basic_ios_char *this, basic_ostream_char *ostream)
2581 basic_ostream_char *ret = this->stream;
2583 TRACE("(%p %p)\n", this, ostream);
2585 this->stream = ostream;
2589 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
2590 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
2591 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_get, 4)
2592 basic_ostream_char* __thiscall basic_ios_char_tie_get(const basic_ios_char *this)
2594 TRACE("(%p)\n", this);
2595 return this->stream;
2598 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDD@Z */
2599 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADD@Z */
2600 DEFINE_THISCALL_WRAPPER(basic_ios_char_widen, 8)
2601 char __thiscall basic_ios_char_widen(basic_ios_char *this, char ch)
2603 FIXME("(%p %c) stub\n", this, ch);
2608 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAE@XZ */
2609 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */
2610 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_ctor, 4)
2611 basic_ios_wchar* __thiscall basic_ios_wchar_ctor(basic_ios_wchar *this)
2613 TRACE("(%p)\n", this);
2615 ios_base_ctor(&this->base);
2616 this->base.vtable = &MSVCP_basic_ios_wchar_vtable;
2620 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IAE@XZ */
2621 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IEAA@XZ */
2622 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor, 4)
2623 basic_ios_wchar* __thiscall basic_ios_short_ctor(basic_ios_wchar *this)
2625 basic_ios_wchar_ctor(this);
2626 this->base.vtable = &MSVCP_basic_ios_short_vtable;
2630 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAEXPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
2631 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAAXPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
2632 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IAEXPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
2633 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IEAAXPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
2634 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_init, 12)
2635 void __thiscall basic_ios_wchar_init(basic_ios_wchar *this, basic_streambuf_wchar *streambuf, MSVCP_bool isstd)
2637 TRACE("(%p %p %x)\n", this, streambuf, isstd);
2638 ios_base_Init(&this->base);
2639 this->strbuf = streambuf;
2640 this->stream = NULL;
2644 ios_base_setstate(&this->base, IOSTATE_badbit);
2647 FIXME("standard streams not handled yet\n");
2650 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
2651 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
2652 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_ctor_streambuf, 8)
2653 basic_ios_wchar* __thiscall basic_ios_wchar_ctor_streambuf(basic_ios_wchar *this, basic_streambuf_wchar *strbuf)
2655 TRACE("(%p %p)\n", this, strbuf);
2657 basic_ios_wchar_ctor(this);
2658 basic_ios_wchar_init(this, strbuf, FALSE);
2662 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
2663 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
2664 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor_streambuf, 8)
2665 basic_ios_wchar* __thiscall basic_ios_short_ctor_streambuf(basic_ios_wchar *this, basic_streambuf_wchar *strbuf)
2667 basic_ios_wchar_ctor_streambuf(this, strbuf);
2668 this->base.vtable = &MSVCP_basic_ios_short_vtable;
2672 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
2673 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
2674 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UAE@XZ */
2675 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UEAA@XZ */
2676 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_dtor, 4)
2677 void __thiscall basic_ios_wchar_dtor(basic_ios_wchar *this)
2679 TRACE("(%p)\n", this);
2680 ios_base_dtor(&this->base);
2683 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ios_wchar_vector_dtor, 8)
2684 basic_ios_wchar* __thiscall MSVCP_basic_ios_wchar_vector_dtor(basic_ios_wchar *this, unsigned int flags)
2686 TRACE("(%p %x)\n", this, flags);
2688 /* we have an array, with the number of elements stored before the first object */
2689 int i, *ptr = (int *)this-1;
2691 for(i=*ptr-1; i>=0; i--)
2692 basic_ios_wchar_dtor(this+i);
2693 MSVCRT_operator_delete(ptr);
2695 basic_ios_wchar_dtor(this);
2697 MSVCRT_operator_delete(this);
2703 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ios_short_vector_dtor, 8)
2704 basic_ios_wchar* __thiscall MSVCP_basic_ios_short_vector_dtor(basic_ios_wchar *this, unsigned int flags)
2706 return MSVCP_basic_ios_wchar_vector_dtor(this, flags);
2709 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
2710 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
2711 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
2712 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
2713 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_clear_reraise, 12)
2714 void __thiscall basic_ios_wchar_clear_reraise(basic_ios_wchar *this, IOSB_iostate state, MSVCP_bool reraise)
2716 TRACE("(%p %x %x)\n", this, state, reraise);
2717 ios_base_clear_reraise(&this->base, state | (this->strbuf ? IOSTATE_goodbit : IOSTATE_badbit), reraise);
2720 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
2721 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
2722 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
2723 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
2724 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_clear, 8)
2725 void __thiscall basic_ios_wchar_clear(basic_ios_wchar *this, unsigned int state)
2727 basic_ios_wchar_clear_reraise(this, (IOSB_iostate)state, FALSE);
2730 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEAAV12@ABV12@@Z */
2731 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEBV12@@Z */
2732 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEAAV12@ABV12@@Z */
2733 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEBV12@@Z */
2734 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_copyfmt, 8)
2735 basic_ios_wchar* __thiscall basic_ios_wchar_copyfmt(basic_ios_wchar *this, basic_ios_wchar *copy)
2737 TRACE("(%p %p)\n", this, copy);
2741 this->stream = copy->stream;
2742 this->fillch = copy->fillch;
2743 ios_base_copyfmt(&this->base, ©->base);
2747 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE_W_W@Z */
2748 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA_W_W@Z */
2749 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEGG@Z */
2750 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
2751 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_set, 8)
2752 wchar_t __thiscall basic_ios_wchar_fill_set(basic_ios_wchar *this, wchar_t fill)
2754 wchar_t ret = this->fillch;
2756 TRACE("(%p %c)\n", this, fill);
2758 this->fillch = fill;
2762 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WXZ */
2763 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WXZ */
2764 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGXZ */
2765 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGXZ */
2766 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_get, 4)
2767 wchar_t __thiscall basic_ios_wchar_fill_get(basic_ios_wchar *this)
2769 TRACE("(%p)\n", this);
2770 return this->fillch;
2773 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
2774 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
2775 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
2776 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
2777 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_imbue, 12)
2778 locale *__thiscall basic_ios_wchar_imbue(basic_ios_wchar *this, locale *ret, const locale *loc)
2780 TRACE("(%p %p %p)\n", this, ret, loc);
2783 return basic_streambuf_wchar_pubimbue(this->strbuf, ret, loc);
2785 locale_copy_ctor(ret, loc);
2789 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBED_WD@Z */
2790 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAD_WD@Z */
2791 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEDGD@Z */
2792 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBADGD@Z */
2793 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_narrow, 12)
2794 char __thiscall basic_ios_wchar_narrow(basic_ios_wchar *this, wchar_t ch, char def)
2796 FIXME("(%p %c %c) stub\n", this, ch, def);
2800 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
2801 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
2802 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAV32@@Z */
2803 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAV32@@Z */
2804 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_set, 8)
2805 basic_streambuf_wchar* __thiscall basic_ios_wchar_rdbuf_set(basic_ios_wchar *this, basic_streambuf_wchar *streambuf)
2807 basic_streambuf_wchar *ret = this->strbuf;
2809 TRACE("(%p %p)\n", this, streambuf);
2811 this->strbuf = streambuf;
2812 basic_ios_wchar_clear(this, IOSTATE_goodbit);
2816 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
2817 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
2818 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
2819 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
2820 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_get, 4)
2821 basic_streambuf_wchar* __thiscall basic_ios_wchar_rdbuf_get(const basic_ios_wchar *this)
2823 TRACE("(%p)\n", this);
2824 return this->strbuf;
2827 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
2828 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
2829 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
2830 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
2831 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_setstate_reraise, 12)
2832 void __thiscall basic_ios_wchar_setstate_reraise(basic_ios_wchar *this, IOSB_iostate state, MSVCP_bool reraise)
2834 TRACE("(%p %x %x)\n", this, state, reraise);
2836 if(state != IOSTATE_goodbit)
2837 basic_ios_wchar_clear_reraise(this, this->base.state | state, reraise);
2840 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
2841 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
2842 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
2843 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
2844 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_setstate, 8)
2845 void __thiscall basic_ios_wchar_setstate(basic_ios_wchar *this, IOSB_iostate state)
2847 basic_ios_wchar_setstate_reraise(this, state, FALSE);
2850 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
2851 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
2852 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@PAV32@@Z */
2853 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@PEAV32@@Z */
2854 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_set, 8)
2855 basic_ostream_wchar* __thiscall basic_ios_wchar_tie_set(basic_ios_wchar *this, basic_ostream_wchar *ostream)
2857 basic_ostream_wchar *ret = this->stream;
2859 TRACE("(%p %p)\n", this, ostream);
2861 this->stream = ostream;
2865 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
2866 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
2867 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
2868 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
2869 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_get, 4)
2870 basic_ostream_wchar* __thiscall basic_ios_wchar_tie_get(const basic_ios_wchar *this)
2872 TRACE("(%p)\n", this);
2873 return this->stream;
2876 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WD@Z */
2877 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WD@Z */
2878 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGD@Z */
2879 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGD@Z */
2880 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_widen, 8)
2881 wchar_t __thiscall basic_ios_wchar_widen(basic_ios_wchar *this, char ch)
2883 FIXME("(%p %c)\n", this, ch);
2887 /* Caution: basic_ostream uses virtual inheritance.
2888 * All constructors have additional parameter that says if base class should be initialized.
2889 * Base class needs to be accessed using vbtable.
2891 static inline basic_ios_char* basic_ostream_char_get_basic_ios(basic_ostream_char *this)
2893 return (basic_ios_char*)((char*)this+this->vbtable[1]);
2896 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
2897 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
2898 DEFINE_THISCALL_WRAPPER(basic_ostream_char_ctor, 16)
2899 basic_ostream_char* __thiscall basic_ostream_char_ctor(basic_ostream_char *this,
2900 basic_streambuf_char *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
2902 basic_ios_char *base;
2904 TRACE("(%p %p %d %d)\n", this, strbuf, isstd, virt_init);
2907 this->vbtable = basic_ostream_char_vbtable;
2908 base = basic_ostream_char_get_basic_ios(this);
2909 basic_ios_char_ctor(base);
2911 base = basic_ostream_char_get_basic_ios(this);
2914 base->base.vtable = &MSVCP_basic_ostream_char_vtable;
2915 basic_ios_char_init(base, strbuf, isstd);
2919 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */
2920 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */
2921 DEFINE_THISCALL_WRAPPER(basic_ostream_char_uninitialized, 16)
2922 basic_ostream_char* __thiscall basic_ostream_char_uninitialized(basic_ostream_char *this,
2923 int uninitialized, MSVCP_bool addstd, MSVCP_bool virt_init)
2925 basic_ios_char *base;
2927 TRACE("(%p %d %x)\n", this, uninitialized, addstd);
2930 this->vbtable = basic_ostream_char_vbtable;
2931 base = basic_ostream_char_get_basic_ios(this);
2932 basic_ios_char_ctor(base);
2934 base = basic_ostream_char_get_basic_ios(this);
2937 base->base.vtable = &MSVCP_basic_ostream_char_vtable;
2939 ios_base_Addstd(&base->base);
2943 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
2944 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
2945 DEFINE_THISCALL_WRAPPER(basic_ostream_char_dtor, 4)
2946 void __thiscall basic_ostream_char_dtor(basic_ostream_char *this)
2948 /* don't destroy virtual base here */
2949 TRACE("(%p)\n", this);
2952 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
2953 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
2954 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vbase_dtor, 4)
2955 void __thiscall basic_ostream_char_vbase_dtor(basic_ostream_char *this)
2957 TRACE("(%p)\n", this);
2958 basic_ostream_char_dtor(this);
2959 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(this));
2962 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ostream_char_vector_dtor, 8)
2963 basic_ostream_char* __thiscall MSVCP_basic_ostream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
2965 basic_ostream_char *this = (basic_ostream_char *)((char*)base - basic_ostream_char_vbtable[1] + basic_ostream_char_vbtable[0]);
2967 TRACE("(%p %x)\n", this, flags);
2970 /* we have an array, with the number of elements stored before the first object */
2971 int i, *ptr = (int *)this-1;
2973 for(i=*ptr-1; i>=0; i--)
2974 basic_ostream_char_vbase_dtor(this+i);
2975 MSVCRT_operator_delete(ptr);
2977 basic_ostream_char_vbase_dtor(this);
2979 MSVCRT_operator_delete(this);
2985 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
2986 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
2987 DEFINE_THISCALL_WRAPPER(basic_ostream_char_flush, 4)
2988 basic_ostream_char* __thiscall basic_ostream_char_flush(basic_ostream_char *this)
2990 /* this function is not matching C++ specification */
2991 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
2993 TRACE("(%p)\n", this);
2995 if(basic_ios_char_rdbuf_get(base) && ios_base_good(&base->base)
2996 && basic_streambuf_char_pubsync(basic_ios_char_rdbuf_get(base))==-1)
2997 basic_ios_char_setstate(base, IOSTATE_badbit);
3001 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
3002 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
3003 DEFINE_THISCALL_WRAPPER(basic_ostream_char__Osfx, 4)
3004 void __thiscall basic_ostream_char__Osfx(basic_ostream_char *this)
3006 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
3008 TRACE("(%p)\n", this);
3010 if(base->base.fmtfl & FMTFLAG_unitbuf)
3011 basic_ostream_char_flush(this);
3014 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
3015 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
3016 DEFINE_THISCALL_WRAPPER(basic_ostream_char_osfx, 4)
3017 void __thiscall basic_ostream_char_osfx(basic_ostream_char *this)
3019 TRACE("(%p)\n", this);
3020 basic_ostream_char__Osfx(this);
3023 static BOOL basic_ostream_char_sentry_create(basic_ostream_char *ostr)
3025 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
3027 if(basic_ios_char_rdbuf_get(base))
3028 basic_streambuf_char__Lock(base->strbuf);
3030 if(ios_base_good(&base->base) && base->stream)
3031 basic_ostream_char_flush(base->stream);
3033 return ios_base_good(&base->base);
3036 static void basic_ostream_char_sentry_destroy(basic_ostream_char *ostr)
3038 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
3040 if(ios_base_good(&base->base) && !__uncaught_exception())
3041 basic_ostream_char_osfx(ostr);
3043 if(basic_ios_char_rdbuf_get(base))
3044 basic_streambuf_char__Unlock(base->strbuf);
3047 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE_NXZ */
3048 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA_NXZ */
3049 DEFINE_THISCALL_WRAPPER(basic_ostream_char_opfx, 4)
3050 MSVCP_bool __thiscall basic_ostream_char_opfx(basic_ostream_char *this)
3052 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
3054 TRACE("(%p)\n", this);
3056 if(ios_base_good(&base->base) && base->stream)
3057 basic_ostream_char_flush(base->stream);
3058 return ios_base_good(&base->base);
3061 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
3062 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
3063 DEFINE_THISCALL_WRAPPER(basic_ostream_char_put, 8)
3064 basic_ostream_char* __thiscall basic_ostream_char_put(basic_ostream_char *this, char ch)
3066 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
3068 TRACE("(%p %c)\n", this, ch);
3070 if(!basic_ostream_char_sentry_create(this)
3071 || basic_streambuf_char_sputc(base->strbuf, ch)==EOF) {
3072 basic_ostream_char_sentry_destroy(this);
3073 basic_ios_char_setstate(base, IOSTATE_badbit);
3077 basic_ostream_char_sentry_destroy(this);
3081 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@JH@Z */
3082 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
3083 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp, 12)
3084 basic_ostream_char* __thiscall basic_ostream_char_seekp(basic_ostream_char *this, streamoff off, int way)
3086 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
3088 TRACE("(%p %ld %d)\n", this, off, way);
3090 if(!ios_base_fail(&base->base)) {
3093 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base),
3094 &seek, off, way, OPENMODE_out);
3095 if(seek.off==0 && seek.pos==-1 && seek.state==0)
3096 basic_ios_char_setstate(base, IOSTATE_failbit);
3101 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
3102 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
3103 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp_fpos, 28)
3104 basic_ostream_char* __thiscall basic_ostream_char_seekp_fpos(basic_ostream_char *this, fpos_int pos)
3106 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
3108 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
3110 if(!ios_base_fail(&base->base)) {
3113 basic_streambuf_char_pubseekpos(basic_ios_char_rdbuf_get(base),
3114 &seek, pos, OPENMODE_out);
3115 if(seek.off==0 && seek.pos==-1 && seek.state==0)
3116 basic_ios_char_setstate(base, IOSTATE_failbit);
3121 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
3122 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
3123 DEFINE_THISCALL_WRAPPER(basic_ostream_char_tellp, 8)
3124 fpos_int* __thiscall basic_ostream_char_tellp(basic_ostream_char *this, fpos_int *ret)
3126 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
3128 TRACE("(%p)\n", this);
3130 if(!ios_base_fail(&base->base)) {
3131 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base),
3132 ret, 0, SEEKDIR_cur, OPENMODE_out);
3141 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@PBDH@Z */
3142 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEBD_J@Z */
3143 DEFINE_THISCALL_WRAPPER(basic_ostream_char_write, 12)
3144 basic_ostream_char* __thiscall basic_ostream_char_write(basic_ostream_char *this, const char *str, streamsize count)
3146 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
3148 TRACE("(%p %s %ld)\n", this, debugstr_a(str), count);
3150 if(!basic_ostream_char_sentry_create(this)
3151 || basic_streambuf_char_sputn(base->strbuf, str, count)!=count) {
3152 basic_ostream_char_sentry_destroy(this);
3153 basic_ios_char_setstate(base, IOSTATE_badbit);
3157 basic_ostream_char_sentry_destroy(this);
3161 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@F@Z */
3162 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@F@Z */
3163 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_short, 8)
3164 basic_ostream_char* __thiscall basic_ostream_char_print_short(basic_ostream_char *this, short val)
3166 FIXME("(%p %d) stub\n", this, val);
3170 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@G@Z */
3171 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@G@Z */
3172 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ushort, 8)
3173 basic_ostream_char* __thiscall basic_ostream_char_print_ushort(basic_ostream_char *this, unsigned short val)
3175 FIXME("(%p %d) stub\n", this, val);
3179 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z */
3180 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@H@Z */
3181 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int, 8)
3182 basic_ostream_char* __thiscall basic_ostream_char_print_int(basic_ostream_char *this, int val)
3184 FIXME("(%p %d) stub\n", this, val);
3188 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@I@Z */
3189 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@I@Z */
3190 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint, 8)
3191 basic_ostream_char* __thiscall basic_ostream_char_print_uint(basic_ostream_char *this, unsigned int val)
3193 FIXME("(%p %d) stub\n", this, val);
3197 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z */
3198 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@J@Z */
3199 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_long, 8)
3200 basic_ostream_char* __thiscall basic_ostream_char_print_long(basic_ostream_char *this, LONG val)
3202 FIXME("(%p %d) stub\n", this, val);
3206 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z */
3207 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@K@Z */
3208 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ulong, 8)
3209 basic_ostream_char* __thiscall basic_ostream_char_print_ulong(basic_ostream_char *this, ULONG val)
3211 FIXME("(%p %d) stub\n", this, val);
3215 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@M@Z */
3216 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@M@Z */
3217 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_float, 8)
3218 basic_ostream_char* __thiscall basic_ostream_char_print_float(basic_ostream_char *this, float val)
3220 FIXME("(%p %f) stub\n", this, val);
3224 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@N@Z */
3225 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@N@Z */
3226 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_double, 12)
3227 basic_ostream_char* __thiscall basic_ostream_char_print_double(basic_ostream_char *this, double val)
3229 FIXME("(%p %lf) stub\n", this, val);
3233 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
3234 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
3235 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_streambuf, 8)
3236 basic_ostream_char* __thiscall basic_ostream_char_print_streambuf(basic_ostream_char *this, basic_streambuf_char *val)
3238 FIXME("(%p %p) stub\n", this, val);
3242 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PBX@Z */
3243 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEBX@Z */
3244 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ptr, 8)
3245 basic_ostream_char* __thiscall basic_ostream_char_print_ptr(basic_ostream_char *this, const void *val)
3247 FIXME("(%p %p) stub\n", this, val);
3251 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_J@Z */
3252 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_J@Z */
3253 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int64, 12)
3254 basic_ostream_char* __thiscall basic_ostream_char_print_int64(basic_ostream_char *this, __int64 val)
3256 FIXME("(%p) stub\n", this);
3260 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_K@Z */
3261 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_K@Z */
3262 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint64, 12)
3263 basic_ostream_char* __thiscall basic_ostream_char_print_uint64(basic_ostream_char *this, unsigned __int64 val)
3265 FIXME("(%p) stub\n", this);
3269 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_N@Z */
3270 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_N@Z */
3271 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_bool, 8)
3272 basic_ostream_char* __thiscall basic_ostream_char_print_bool(basic_ostream_char *this, MSVCP_bool val)
3274 FIXME("(%p %x) stub\n", this, val);
3278 /* Caution: basic_istream uses virtual inheritance. */
3279 static inline basic_ios_char* basic_istream_char_get_basic_ios(basic_istream_char *this)
3281 return (basic_ios_char*)((char*)this+this->vbtable[1]);
3284 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
3285 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
3286 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_init, 20)
3287 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)
3289 basic_ios_char *base;
3291 TRACE("(%p %p %d %d %d)\n", this, strbuf, isstd, noinit, virt_init);
3294 this->vbtable = basic_istream_char_vbtable;
3295 base = basic_istream_char_get_basic_ios(this);
3296 basic_ios_char_ctor(base);
3298 base = basic_istream_char_get_basic_ios(this);
3301 base->base.vtable = &MSVCP_basic_istream_char_vtable;
3304 basic_ios_char_init(base, strbuf, isstd);
3308 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
3309 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
3310 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor, 16)
3311 basic_istream_char* __thiscall basic_istream_char_ctor(basic_istream_char *this, basic_streambuf_char *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
3313 return basic_istream_char_ctor_init(this, strbuf, isstd, FALSE, virt_init);
3316 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
3317 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
3318 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_uninitialized, 12)
3319 basic_istream_char* __thiscall basic_istream_char_ctor_uninitialized(basic_istream_char *this, int uninitialized, MSVCP_bool virt_init)
3321 basic_ios_char *base;
3323 TRACE("(%p %d %d)\n", this, uninitialized, virt_init);
3326 this->vbtable = basic_istream_char_vbtable;
3327 base = basic_istream_char_get_basic_ios(this);
3328 basic_ios_char_ctor(base);
3330 base = basic_istream_char_get_basic_ios(this);
3333 base->base.vtable = &MSVCP_basic_istream_char_vtable;
3334 ios_base_Addstd(&base->base);
3338 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UAE@XZ */
3339 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
3340 DEFINE_THISCALL_WRAPPER(basic_istream_char_dtor, 4)
3341 void __thiscall basic_istream_char_dtor(basic_istream_char *this)
3343 /* don't destroy virtual base here */
3344 TRACE("(%p)\n", this);
3347 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
3348 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
3349 DEFINE_THISCALL_WRAPPER(basic_istream_char_vbase_dtor, 4)
3350 void __thiscall basic_istream_char_vbase_dtor(basic_istream_char *this)
3352 TRACE("(%p)\n", this);
3353 basic_istream_char_dtor(this);
3354 basic_ios_char_dtor(basic_istream_char_get_basic_ios(this));
3357 DEFINE_THISCALL_WRAPPER(MSVCP_basic_istream_char_vector_dtor, 8)
3358 basic_istream_char* __thiscall MSVCP_basic_istream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
3360 basic_istream_char *this = (basic_istream_char *)((char*)base - basic_istream_char_vbtable[1] + basic_istream_char_vbtable[0]);
3362 TRACE("(%p %x)\n", this, flags);
3365 /* we have an array, with the number of elements stored before the first object */
3366 int i, *ptr = (int *)this-1;
3368 for(i=*ptr-1; i>=0; i--)
3369 basic_istream_char_vbase_dtor(this+i);
3370 MSVCRT_operator_delete(ptr);
3372 basic_istream_char_vbase_dtor(this);
3374 MSVCRT_operator_delete(this);
3380 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
3381 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
3382 DEFINE_THISCALL_WRAPPER(basic_istream_char__Ipfx, 8)
3383 MSVCP_bool __thiscall basic_istream_char__Ipfx(basic_istream_char *this, MSVCP_bool noskip)
3385 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
3387 TRACE("(%p %d)\n", this, noskip);
3389 if(!ios_base_good(&base->base)) {
3390 basic_ios_char_setstate(base, IOSTATE_failbit);
3394 if(basic_ios_char_tie_get(base))
3395 basic_ostream_char_flush(basic_ios_char_tie_get(base));
3397 if(!noskip && (ios_base_flags_get(&base->base) & FMTFLAG_skipws)) {
3398 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
3401 for(ch = basic_streambuf_char_sgetc(strbuf); ;
3402 ch = basic_streambuf_char_snextc(strbuf)) {
3404 basic_ios_char_setstate(base, IOSTATE_eofbit);
3408 /* TODO: use locale class instead of isspace */
3417 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
3418 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
3419 DEFINE_THISCALL_WRAPPER(basic_istream_char_ipfx, 8)
3420 MSVCP_bool __thiscall basic_istream_char_ipfx(basic_istream_char *this, MSVCP_bool noskip)
3422 return basic_istream_char__Ipfx(this, noskip);
3425 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
3426 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
3427 DEFINE_THISCALL_WRAPPER(basic_istream_char_isfx, 4)
3428 void __thiscall basic_istream_char_isfx(basic_istream_char *this)
3430 TRACE("(%p)\n", this);
3433 static BOOL basic_istream_char_sentry_create(basic_istream_char *istr, MSVCP_bool noskip)
3435 basic_ios_char *base = basic_istream_char_get_basic_ios(istr);
3437 if(basic_ios_char_rdbuf_get(base))
3438 basic_streambuf_char__Lock(base->strbuf);
3440 return basic_istream_char_ipfx(istr, noskip);
3443 static void basic_istream_char_sentry_destroy(basic_istream_char *istr)
3445 basic_ios_char *base = basic_istream_char_get_basic_ios(istr);
3447 if(basic_ios_char_rdbuf_get(base))
3448 basic_streambuf_char__Unlock(base->strbuf);
3451 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QBEHXZ */
3452 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QEBA_JXZ */
3453 DEFINE_THISCALL_WRAPPER(basic_istream_char_gcount, 4)
3454 int __thiscall basic_istream_char_gcount(const basic_istream_char *this)
3456 TRACE("(%p)\n", this);
3460 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
3461 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
3462 DEFINE_THISCALL_WRAPPER(basic_istream_char_get, 4)
3463 int __thiscall basic_istream_char_get(basic_istream_char *this)
3465 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
3468 TRACE("(%p)\n", this);
3472 if(!basic_istream_char_sentry_create(this, TRUE)) {
3473 basic_istream_char_sentry_destroy(this);
3477 ret = basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(base));
3478 basic_istream_char_sentry_destroy(this);
3480 basic_ios_char_setstate(base, IOSTATE_eofbit|IOSTATE_failbit);
3487 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAD@Z */
3488 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAD@Z */
3489 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_ch, 8)
3490 basic_istream_char* __thiscall basic_istream_char_get_ch(basic_istream_char *this, char *ch)
3494 TRACE("(%p %p)\n", this, ch);
3496 ret = basic_istream_char_get(this);
3502 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
3503 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
3504 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str_delim, 16)
3505 basic_istream_char* __thiscall basic_istream_char_get_str_delim(basic_istream_char *this, char *str, streamsize count, char delim)
3507 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
3510 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
3514 if(basic_istream_char_sentry_create(this, TRUE)) {
3515 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
3517 for(ch = basic_streambuf_char_sgetc(strbuf); count>1;
3518 ch = basic_streambuf_char_snextc(strbuf)) {
3519 if(ch==EOF || ch==delim)
3527 basic_istream_char_sentry_destroy(this);
3529 basic_ios_char_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
3530 (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
3536 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
3537 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
3538 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str, 12)
3539 basic_istream_char* __thiscall basic_istream_char_get_str(basic_istream_char *this, char *str, streamsize count)
3541 return basic_istream_char_get_str_delim(this, str, count, '\n');
3544 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
3545 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
3546 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf_delim, 12)
3547 basic_istream_char* __thiscall basic_istream_char_get_streambuf_delim(basic_istream_char *this, basic_streambuf_char *strbuf, char delim)
3549 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
3552 TRACE("(%p %p %c)\n", this, strbuf, delim);
3556 if(basic_istream_char_sentry_create(this, TRUE)) {
3557 basic_streambuf_char *strbuf_read = basic_ios_char_rdbuf_get(base);
3559 for(ch = basic_streambuf_char_sgetc(strbuf_read); ;
3560 ch = basic_streambuf_char_snextc(strbuf_read)) {
3561 if(ch==EOF || ch==delim)
3564 if(basic_streambuf_char_sputc(strbuf, ch) == EOF)
3569 basic_istream_char_sentry_destroy(this);
3571 basic_ios_char_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
3572 (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
3576 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
3577 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
3578 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf, 8)
3579 basic_istream_char* __thiscall basic_istream_char_get_streambuf(basic_istream_char *this, basic_streambuf_char *strbuf)
3581 return basic_istream_char_get_streambuf_delim(this, strbuf, '\n');
3584 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
3585 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
3586 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline_delim, 16)
3587 basic_istream_char* __thiscall basic_istream_char_getline_delim(basic_istream_char *this, char *str, streamsize count, char delim)
3589 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
3592 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
3596 if(basic_istream_char_sentry_create(this, TRUE) && count>0) {
3597 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
3600 ch = basic_streambuf_char_sbumpc(strbuf);
3602 if(ch==EOF || ch==delim)
3612 else if(ch != EOF) {
3613 ch = basic_streambuf_char_sgetc(strbuf);
3616 basic_streambuf_char__Gninc(strbuf);
3621 basic_istream_char_sentry_destroy(this);
3623 basic_ios_char_setstate(base, (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit) |
3624 (!this->count || (ch!=delim && ch!=EOF) ? IOSTATE_failbit : IOSTATE_goodbit));
3630 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
3631 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
3632 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline, 12)
3633 basic_istream_char* __thiscall basic_istream_char_getline(basic_istream_char *this, char *str, streamsize count)
3635 return basic_istream_char_getline_delim(this, str, count, '\n');
3638 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@HH@Z */
3639 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
3640 DEFINE_THISCALL_WRAPPER(basic_istream_char_ignore, 12)
3641 basic_istream_char* __thiscall basic_istream_char_ignore(basic_istream_char *this, streamsize count, int delim)
3643 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
3646 TRACE("(%p %ld %d)\n", this, count, delim);
3650 if(basic_istream_char_sentry_create(this, TRUE)) {
3651 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
3654 ch = basic_streambuf_char_sbumpc(strbuf);
3656 if(ch==EOF || ch==delim)
3660 if(count != INT_MAX)
3664 basic_istream_char_sentry_destroy(this);
3667 basic_ios_char_setstate(base, IOSTATE_eofbit);
3671 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
3672 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
3673 DEFINE_THISCALL_WRAPPER(basic_istream_char_peek, 4)
3674 int __thiscall basic_istream_char_peek(basic_istream_char *this)
3676 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
3679 TRACE("(%p)\n", this);
3683 if(basic_istream_char_sentry_create(this, TRUE))
3684 ret = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
3685 basic_istream_char_sentry_destroy(this);
3689 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADIH@Z */
3690 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_K_J@Z */
3691 DEFINE_THISCALL_WRAPPER(basic_istream_char__Read_s, 16)
3692 basic_istream_char* __thiscall basic_istream_char__Read_s(basic_istream_char *this, char *str, MSVCP_size_t size, streamsize count)
3694 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
3695 IOSB_iostate state = IOSTATE_goodbit;
3697 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
3699 if(basic_istream_char_sentry_create(this, TRUE)) {
3700 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
3702 this->count = basic_streambuf_char__Sgetn_s(strbuf, str, size, count);
3703 if(this->count != count)
3704 state |= IOSTATE_failbit | IOSTATE_eofbit;
3708 basic_istream_char_sentry_destroy(this);
3710 basic_ios_char_setstate(base, state);
3714 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
3715 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
3716 DEFINE_THISCALL_WRAPPER(basic_istream_char_read, 12)
3717 basic_istream_char* __thiscall basic_istream_char_read(basic_istream_char *this, char *str, streamsize count)
3719 return basic_istream_char__Read_s(this, str, count, count);
3722 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
3723 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
3724 DEFINE_THISCALL_WRAPPER(basic_istream_char__Readsome_s, 16)
3725 streamsize __thiscall basic_istream_char__Readsome_s(basic_istream_char *this, char *str, MSVCP_size_t size, streamsize count)
3727 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
3728 IOSB_iostate state = IOSTATE_goodbit;
3730 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
3734 if(basic_istream_char_sentry_create(this, TRUE)) {
3735 streamsize avail = basic_streambuf_char_in_avail(basic_ios_char_rdbuf_get(base));
3740 state |= IOSTATE_eofbit;
3742 basic_istream_char__Read_s(this, str, size, avail);
3744 state |= IOSTATE_failbit;
3746 basic_istream_char_sentry_destroy(this);
3748 basic_ios_char_setstate(base, state);
3752 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
3753 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
3754 DEFINE_THISCALL_WRAPPER(basic_istream_char_readsome, 12)
3755 streamsize __thiscall basic_istream_char_readsome(basic_istream_char *this, char *str, streamsize count)
3757 return basic_istream_char__Readsome_s(this, str, count, count);
3760 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
3761 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
3762 DEFINE_THISCALL_WRAPPER(basic_istream_char_putback, 8)
3763 basic_istream_char* __thiscall basic_istream_char_putback(basic_istream_char *this, char ch)
3765 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
3766 IOSB_iostate state = IOSTATE_goodbit;
3768 TRACE("(%p %c)\n", this, ch);
3772 if(basic_istream_char_sentry_create(this, TRUE)) {
3773 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
3775 if(!ios_base_good(&base->base))
3776 state |= IOSTATE_failbit;
3777 else if(!strbuf || basic_streambuf_char_sputbackc(strbuf, ch)==EOF)
3778 state |= IOSTATE_badbit;
3780 basic_istream_char_sentry_destroy(this);
3782 basic_ios_char_setstate(base, state);
3786 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
3787 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
3788 DEFINE_THISCALL_WRAPPER(basic_istream_char_unget, 4)
3789 basic_istream_char* __thiscall basic_istream_char_unget(basic_istream_char *this)
3791 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
3792 IOSB_iostate state = IOSTATE_goodbit;
3794 TRACE("(%p)\n", this);
3798 if(basic_istream_char_sentry_create(this, TRUE)) {
3799 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
3801 if(!ios_base_good(&base->base))
3802 state |= IOSTATE_failbit;
3803 else if(!strbuf || basic_streambuf_char_sungetc(strbuf)==EOF)
3804 state |= IOSTATE_badbit;
3806 basic_istream_char_sentry_destroy(this);
3808 basic_ios_char_setstate(base, state);
3812 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
3813 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
3814 DEFINE_THISCALL_WRAPPER(basic_istream_char_sync, 4)
3815 int __thiscall basic_istream_char_sync(basic_istream_char *this)
3817 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
3818 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
3820 TRACE("(%p)\n", this);
3825 if(basic_istream_char_sentry_create(this, TRUE)) {
3826 if(basic_streambuf_char_pubsync(strbuf) != -1) {
3827 basic_istream_char_sentry_destroy(this);
3831 basic_istream_char_sentry_destroy(this);
3833 basic_ios_char_setstate(base, IOSTATE_badbit);
3837 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
3838 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
3839 DEFINE_THISCALL_WRAPPER(basic_istream_char_tellg, 8)
3840 fpos_int* __thiscall basic_istream_char_tellg(basic_istream_char *this, fpos_int *ret)
3842 TRACE("(%p %p)\n", this, ret);
3844 if(basic_istream_char_sentry_create(this, TRUE)) {
3845 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
3846 if(!ios_base_fail(&base->base)) {
3847 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base),
3848 ret, 0, SEEKDIR_cur, OPENMODE_in);
3849 basic_istream_char_sentry_destroy(this);
3851 if(ret->off==0 && ret->pos==-1 && ret->state==0)
3852 basic_ios_char_setstate(base, IOSTATE_failbit);
3856 basic_istream_char_sentry_destroy(this);
3864 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@JH@Z */
3865 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
3866 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg, 12)
3867 basic_istream_char* __thiscall basic_istream_char_seekg(basic_istream_char *this, streamoff off, int dir)
3869 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
3871 TRACE("(%p %ld %d)\n", this, off, dir);
3873 if(basic_istream_char_sentry_create(this, TRUE)) {
3874 if(!ios_base_fail(&base->base)) {
3875 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
3878 basic_streambuf_char_pubseekoff(strbuf, &ret, off, dir, OPENMODE_in);
3879 basic_istream_char_sentry_destroy(this);
3881 if(ret.off==0 && ret.pos==-1 && ret.state==0)
3882 basic_ios_char_setstate(base, IOSTATE_failbit);
3884 basic_ios_char_clear(base, IOSTATE_goodbit);
3888 basic_istream_char_sentry_destroy(this);
3890 basic_ios_char_setstate(base, IOSTATE_failbit);
3894 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
3895 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
3896 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg_fpos, 28)
3897 basic_istream_char* __thiscall basic_istream_char_seekg_fpos(basic_istream_char *this, fpos_int pos)
3899 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
3901 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
3903 if(basic_istream_char_sentry_create(this, TRUE)) {
3904 if(!ios_base_fail(&base->base)) {
3905 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
3908 basic_streambuf_char_pubseekpos(strbuf, &ret, pos, OPENMODE_in);
3909 basic_istream_char_sentry_destroy(this);
3911 if(ret.off==0 && ret.pos==-1 && ret.state==0)
3912 basic_ios_char_setstate(base, IOSTATE_failbit);
3914 basic_ios_char_clear(base, IOSTATE_goodbit);
3918 basic_istream_char_sentry_destroy(this);
3920 basic_ios_char_setstate(base, IOSTATE_failbit);
3924 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAF@Z */
3925 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAF@Z */
3926 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_short, 8)
3927 basic_istream_char* __thiscall basic_istream_char_read_short(basic_istream_char *this, short *arg1)
3929 FIXME("(%p %p) stub\n", this, arg1);
3933 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAG@Z */
3934 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAG@Z */
3935 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ushort, 8)
3936 basic_istream_char* __thiscall basic_istream_char_read_ushort(basic_istream_char *this, unsigned short *arg1)
3938 FIXME("(%p %p) stub\n", this, arg1);
3942 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAH@Z */
3943 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAH@Z */
3944 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int, 8)
3945 basic_istream_char* __thiscall basic_istream_char_read_int(basic_istream_char *this, int *arg1)
3947 FIXME("(%p %p) stub\n", this, arg1);
3951 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAI@Z */
3952 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAI@Z */
3953 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint, 8)
3954 basic_istream_char* __thiscall basic_istream_char_read_uint(basic_istream_char *this, unsigned int *arg1)
3956 FIXME("(%p %p) stub\n", this, arg1);
3960 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAJ@Z */
3961 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAJ@Z */
3962 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_long, 8)
3963 basic_istream_char* __thiscall basic_istream_char_read_long(basic_istream_char *this, LONG *arg1)
3965 FIXME("(%p %p) stub\n", this, arg1);
3969 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAK@Z */
3970 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAK@Z */
3971 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ulong, 8)
3972 basic_istream_char* __thiscall basic_istream_char_read_ulong(basic_istream_char *this, ULONG *arg1)
3974 FIXME("(%p %p) stub\n", this, arg1);
3978 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAM@Z */
3979 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAM@Z */
3980 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_float, 8)
3981 basic_istream_char* __thiscall basic_istream_char_read_float(basic_istream_char *this, float *arg1)
3983 FIXME("(%p %p) stub\n", this, arg1);
3987 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAN@Z */
3988 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAN@Z */
3989 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_double, 8)
3990 basic_istream_char* __thiscall basic_istream_char_read_double(basic_istream_char *this, double *arg1)
3992 FIXME("(%p %p) stub\n", this, arg1);
3996 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAO@Z */
3997 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAO@Z */
3998 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ldouble, 8)
3999 basic_istream_char* __thiscall basic_istream_char_read_ldouble(basic_istream_char *this, long double *arg1)
4001 FIXME("(%p %p) stub\n", this, arg1);
4005 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAPAX@Z */
4006 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
4007 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ptr, 8)
4008 basic_istream_char* __thiscall basic_istream_char_read_ptr(basic_istream_char *this, void **arg1)
4010 FIXME("(%p %p) stub\n", this, arg1);
4014 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_J@Z */
4015 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_J@Z */
4016 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int64, 8)
4017 basic_istream_char* __thiscall basic_istream_char_read_int64(basic_istream_char *this, __int64 *arg1)
4019 FIXME("(%p %p) stub\n", this, arg1);
4023 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_K@Z */
4024 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_K@Z */
4025 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint64, 8)
4026 basic_istream_char* __thiscall basic_istream_char_read_uint64(basic_istream_char *this, unsigned __int64 *arg1)
4028 FIXME("(%p %p) stub\n", this, arg1);
4032 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_N@Z */
4033 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_N@Z */
4034 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_bool, 8)
4035 basic_istream_char* __thiscall basic_istream_char_read_bool(basic_istream_char *this, MSVCP_bool *arg1)
4037 FIXME("(%p %p) stub\n", this, arg1);