2 * Copyright 2011 Piotr Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
29 #include "wine/debug.h"
30 WINE_DEFAULT_DEBUG_CHANNEL(msvcp90
);
32 /* ?_Index@ios_base@std@@0HA */
33 int ios_base_Index
= 0;
34 /* ?_Sync@ios_base@std@@0_NA */
35 MSVCP_bool ios_base_Sync
= FALSE
;
39 __int64
DECLSPEC_ALIGN(8) pos
;
43 static inline const char* debugstr_fpos_int(fpos_int
*fpos
)
45 return wine_dbg_sprintf("fpos(%ld %s %d)", fpos
->off
, wine_dbgstr_longlong(fpos
->pos
), fpos
->state
);
49 void (__cdecl
*pfunc
)(ios_base
*, streamsize
);
57 } basic_filebuf__Initfl
;
60 basic_streambuf_char base
;
71 basic_streambuf_char
*strbuf
;
72 struct _basic_ostream_char
*stream
;
78 basic_streambuf_wchar
*strbuf
;
79 struct _basic_ostream_wchar
*stream
;
83 typedef struct _basic_ostream_char
{
85 /* virtual inheritance
86 * basic_ios_char basic_ios;
90 typedef struct _basic_ostream_wchar
{
92 /* virtual inheritance
93 * basic_ios_char basic_ios;
95 } basic_ostream_wchar
;
100 /* virtual inheritance
101 * basic_ios_char basic_ios;
103 } basic_istream_char
;
106 basic_istream_char base1
;
107 basic_ostream_char base2
;
108 /* virtual inheritance
109 * basic_ios_char basic_ios;
111 } basic_iostream_char
;
114 basic_ostream_char base
;
115 basic_filebuf_char filebuf
;
116 /* virtual inheritance
117 * basic_ios_char basic_ios;
119 } basic_ofstream_char
;
122 basic_istream_char base
;
123 basic_filebuf_char filebuf
;
124 /* virtual inheritance
125 * basic_ios_char basic_ios;
127 } basic_ifstream_char
;
130 basic_iostream_char base
;
131 basic_filebuf_char filebuf
;
132 /* virtual inheritance
133 * basic_ios_char basic_ios;
135 } basic_fstream_char
;
137 extern const vtable_ptr MSVCP_iosb_vtable
;
139 /* ??_7ios_base@std@@6B@ */
140 extern const vtable_ptr MSVCP_ios_base_vtable
;
142 /* ??_7?$basic_ios@DU?$char_traits@D@std@@@std@@6B@ */
143 extern const vtable_ptr MSVCP_basic_ios_char_vtable
;
145 /* ??_7?$basic_ios@_WU?$char_traits@_W@std@@@std@@6B@ */
146 extern const vtable_ptr MSVCP_basic_ios_wchar_vtable
;
148 /* ??_7?$basic_ios@GU?$char_traits@G@std@@@std@@6B@ */
149 extern const vtable_ptr MSVCP_basic_ios_short_vtable
;
151 /* ??_7?$basic_streambuf@DU?$char_traits@D@std@@@std@@6B@ */
152 extern const vtable_ptr MSVCP_basic_streambuf_char_vtable
;
154 /* ??_7?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@6B@ */
155 extern const vtable_ptr MSVCP_basic_streambuf_wchar_vtable
;
157 /* ??_7?$basic_streambuf@GU?$char_traits@G@std@@@std@@6B@ */
158 extern const vtable_ptr MSVCP_basic_streambuf_short_vtable
;
160 /* ??_7?$basic_filebuf@DU?$char_traits@D@std@@@std@@6B@ */
161 extern const vtable_ptr MSVCP_basic_filebuf_char_vtable
;
163 /* ??_8?$basic_ostream@DU?$char_traits@D@std@@@std@@7B@ */
164 const int basic_ostream_char_vbtable
[] = {0, sizeof(basic_ostream_char
)};
165 /* ??_7?$basic_ostream@DU?$char_traits@D@std@@@std@@6B@ */
166 extern const vtable_ptr MSVCP_basic_ostream_char_vtable
;
168 /* ??_8?$basic_istream@DU?$char_traits@D@std@@@std@@7B@ */
169 const int basic_istream_char_vbtable
[] = {0, sizeof(basic_istream_char
)};
170 /* ??_7?$basic_istream@DU?$char_traits@D@std@@@std@@6B@ */
171 extern const vtable_ptr MSVCP_basic_istream_char_vtable
;
173 /* ??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
174 const int basic_iostream_char_vbtable1
[] = {0, sizeof(basic_iostream_char
)};
175 /* ??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
176 const int basic_iostream_char_vbtable2
[] = {0, sizeof(basic_iostream_char
)-FIELD_OFFSET(basic_iostream_char
, base2
)};
177 /* ??_7?$basic_iostream@DU?$char_traits@D@std@@@std@@6B@ */
178 extern const vtable_ptr MSVCP_basic_iostream_char_vtable
;
180 /* ??_8?$basic_ofstream@DU?$char_traits@D@std@@@std@@7B@ */
181 const int basic_ofstream_char_vbtable
[] = {0, sizeof(basic_ofstream_char
)};
182 /* ??_7?$basic_ofstream@DU?$char_traits@D@std@@@std@@6B@ */
183 extern const vtable_ptr MSVCP_basic_ofstream_char_vtable
;
185 /*??_8?$basic_ifstream@DU?$char_traits@D@std@@@std@@7B@ */
186 const int basic_ifstream_char_vbtable
[] = {0, sizeof(basic_ifstream_char
)};
187 /* ??_7?$basic_ifstream@DU?$char_traits@D@std@@@std@@6B@ */
188 extern const vtable_ptr MSVCP_basic_ifstream_char_vtable
;
190 /* ??_8?$basic_fstream@DU?$char_traits@D@std@@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
191 const int basic_fstream_char_vbtable1
[] = {0, sizeof(basic_fstream_char
)};
192 /* ??_8?$basic_fstream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
193 const int basic_fstream_char_vbtable2
[] = {0, sizeof(basic_fstream_char
)-FIELD_OFFSET(basic_fstream_char
, base
.base2
)};
194 /* ??_7?$basic_fstream@DU?$char_traits@D@std@@@std@@6B@ */
195 extern const vtable_ptr MSVCP_basic_fstream_char_vtable
;
197 DEFINE_RTTI_DATA0(iosb
, 0, ".?AV?$_Iosb@H@std@@");
198 DEFINE_RTTI_DATA1(ios_base
, 0, &iosb_rtti_base_descriptor
, ".?AV?$_Iosb@H@std@@");
199 DEFINE_RTTI_DATA2(basic_ios_char
, 0, &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
200 ".?AV?$basic_ios@DU?$char_traits@D@std@@@std@@");
201 DEFINE_RTTI_DATA2(basic_ios_wchar
, 0, &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
202 ".?AV?$basic_ios@_WU?$char_traits@_W@std@@@std@@");
203 DEFINE_RTTI_DATA2(basic_ios_short
, 0, &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
204 ".?AV?$basic_ios@GU?$char_traits@G@std@@@std@@");
205 DEFINE_RTTI_DATA0(basic_streambuf_char
, 0,
206 ".?AV?$basic_streambuf@DU?$char_traits@D@std@@@std@@");
207 DEFINE_RTTI_DATA0(basic_streambuf_wchar
, 0,
208 ".?AV?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@");
209 DEFINE_RTTI_DATA0(basic_streambuf_short
, 0,
210 ".?AV?$basic_streambuf@GU?$char_traits@G@std@@@std@@");
211 DEFINE_RTTI_DATA1(basic_filebuf_char
, 0, &basic_streambuf_char_rtti_base_descriptor
,
212 ".?AV?$basic_filebuf@DU?$char_traits@D@std@@@std@@");
213 DEFINE_RTTI_DATA3(basic_ostream_char
, sizeof(basic_ostream_char
), &basic_ios_char_rtti_base_descriptor
,
214 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
215 ".?AV?$basic_ostream@DU?$char_traits@D@std@@@std@@");
216 DEFINE_RTTI_DATA3(basic_istream_char
, sizeof(basic_istream_char
), &basic_ios_char_rtti_base_descriptor
,
217 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
218 ".?AV?$basic_istream@DU?$char_traits@D@std@@@std@@");
219 DEFINE_RTTI_DATA8(basic_iostream_char
, sizeof(basic_iostream_char
),
220 &basic_istream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
221 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
222 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
223 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
224 ".?AV?$basic_iostream@DU?$char_traits@D@std@@@std@@");
225 DEFINE_RTTI_DATA4(basic_ofstream_char
, sizeof(basic_ofstream_char
),
226 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
227 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
228 ".?AV?$basic_ofstream@DU?$char_traits@D@std@@@std@@");
229 DEFINE_RTTI_DATA4(basic_ifstream_char
, sizeof(basic_ifstream_char
),
230 &basic_istream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
231 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
232 ".?AV?$basic_ifstream@DU?$char_traits@D@std@@@std@@");
233 DEFINE_RTTI_DATA9(basic_fstream_char
, sizeof(basic_fstream_char
), &basic_istream_char_rtti_base_descriptor
,
234 &basic_istream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
235 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
236 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
237 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
238 ".?AV?$basic_fstream@DU?$char_traits@D@std@@@std@@");
241 void __asm_dummy_vtables(void) {
243 __ASM_VTABLE(iosb
, "");
244 __ASM_VTABLE(ios_base
, "");
245 __ASM_VTABLE(basic_ios_char
, "");
246 __ASM_VTABLE(basic_ios_wchar
, "");
247 __ASM_VTABLE(basic_ios_short
, "");
248 __ASM_VTABLE(basic_streambuf_char
,
249 VTABLE_ADD_FUNC(basic_streambuf_char_overflow
)
250 VTABLE_ADD_FUNC(basic_streambuf_char_pbackfail
)
251 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc
)
252 VTABLE_ADD_FUNC(basic_streambuf_char_underflow
)
253 VTABLE_ADD_FUNC(basic_streambuf_char_uflow
)
254 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn
)
255 VTABLE_ADD_FUNC(basic_streambuf_char__Xsgetn_s
)
256 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn
)
257 VTABLE_ADD_FUNC(basic_streambuf_char_seekoff
)
258 VTABLE_ADD_FUNC(basic_streambuf_char_seekpos
)
259 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf
)
260 VTABLE_ADD_FUNC(basic_streambuf_char_sync
)
261 VTABLE_ADD_FUNC(basic_streambuf_char_imbue
));
262 __ASM_VTABLE(basic_streambuf_wchar
,
263 VTABLE_ADD_FUNC(basic_streambuf_wchar_overflow
)
264 VTABLE_ADD_FUNC(basic_streambuf_wchar_pbackfail
)
265 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc
)
266 VTABLE_ADD_FUNC(basic_streambuf_wchar_underflow
)
267 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow
)
268 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn
)
269 VTABLE_ADD_FUNC(basic_streambuf_wchar__Xsgetn_s
)
270 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn
)
271 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekoff
)
272 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekpos
)
273 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf
)
274 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync
)
275 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue
));
276 __ASM_VTABLE(basic_streambuf_short
,
277 VTABLE_ADD_FUNC(basic_streambuf_wchar_overflow
)
278 VTABLE_ADD_FUNC(basic_streambuf_wchar_pbackfail
)
279 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc
)
280 VTABLE_ADD_FUNC(basic_streambuf_wchar_underflow
)
281 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow
)
282 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn
)
283 VTABLE_ADD_FUNC(basic_streambuf_wchar__Xsgetn_s
)
284 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn
)
285 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekoff
)
286 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekpos
)
287 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf
)
288 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync
)
289 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue
));
290 __ASM_VTABLE(basic_filebuf_char
,
291 VTABLE_ADD_FUNC(basic_filebuf_char_overflow
)
292 VTABLE_ADD_FUNC(basic_filebuf_char_pbackfail
)
293 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc
)
294 VTABLE_ADD_FUNC(basic_filebuf_char_underflow
)
295 VTABLE_ADD_FUNC(basic_filebuf_char_uflow
)
296 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn
)
297 VTABLE_ADD_FUNC(basic_streambuf_char__Xsgetn_s
)
298 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn
)
299 VTABLE_ADD_FUNC(basic_filebuf_char_seekoff
)
300 VTABLE_ADD_FUNC(basic_filebuf_char_seekpos
)
301 VTABLE_ADD_FUNC(basic_filebuf_char_setbuf
)
302 VTABLE_ADD_FUNC(basic_filebuf_char_sync
)
303 VTABLE_ADD_FUNC(basic_filebuf_char_imbue
));
304 __ASM_VTABLE(basic_ostream_char
, "");
305 __ASM_VTABLE(basic_istream_char
, "");
306 __ASM_VTABLE(basic_iostream_char
, "");
307 __ASM_VTABLE(basic_ofstream_char
, "");
308 __ASM_VTABLE(basic_ifstream_char
, "");
309 __ASM_VTABLE(basic_fstream_char
, "");
314 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
315 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
316 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp_next
, 16)
317 void __thiscall
basic_streambuf_char_setp_next(basic_streambuf_char
*this, char *first
, char *next
, char *last
)
319 TRACE("(%p %p %p %p)\n", this, first
, next
, last
);
323 this->wsize
= last
-next
;
326 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD0@Z */
327 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD0@Z */
328 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp
, 12)
329 void __thiscall
basic_streambuf_char_setp(basic_streambuf_char
*this, char *first
, char *last
)
331 basic_streambuf_char_setp_next(this, first
, first
, last
);
334 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
335 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
336 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setg
, 16)
337 void __thiscall
basic_streambuf_char_setg(basic_streambuf_char
*this, char *first
, char *next
, char *last
)
339 TRACE("(%p %p %p %p)\n", this, first
, next
, last
);
343 this->rsize
= last
-next
;
346 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXXZ */
347 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXXZ */
348 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init_empty
, 4)
349 void __thiscall
basic_streambuf_char__Init_empty(basic_streambuf_char
*this)
351 TRACE("(%p)\n", this);
353 this->prbuf
= &this->rbuf
;
354 this->pwbuf
= &this->wbuf
;
355 this->prpos
= &this->rpos
;
356 this->pwpos
= &this->wpos
;
357 this->prsize
= &this->rsize
;
358 this->pwsize
= &this->wsize
;
360 basic_streambuf_char_setp(this, NULL
, NULL
);
361 basic_streambuf_char_setg(this, NULL
, NULL
, NULL
);
364 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@W4_Uninitialized@1@@Z */
365 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
366 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor_uninitialized
, 8)
367 basic_streambuf_char
* __thiscall
basic_streambuf_char_ctor_uninitialized(basic_streambuf_char
*this, int uninitialized
)
369 TRACE("(%p %d)\n", this, uninitialized
);
370 this->vtable
= &MSVCP_basic_streambuf_char_vtable
;
371 mutex_ctor(&this->lock
);
375 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@XZ */
376 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@XZ */
377 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor
, 4)
378 basic_streambuf_char
* __thiscall
basic_streambuf_char_ctor(basic_streambuf_char
*this)
380 TRACE("(%p)\n", this);
382 this->vtable
= &MSVCP_basic_streambuf_char_vtable
;
383 mutex_ctor(&this->lock
);
384 this->loc
= MSVCRT_operator_new(sizeof(locale
));
385 locale_ctor(this->loc
);
386 basic_streambuf_char__Init_empty(this);
391 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
392 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
393 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_dtor
, 4)
394 void __thiscall
basic_streambuf_char_dtor(basic_streambuf_char
*this)
396 TRACE("(%p)\n", this);
398 mutex_dtor(&this->lock
);
399 locale_dtor(this->loc
);
400 MSVCRT_operator_delete(this->loc
);
403 DEFINE_THISCALL_WRAPPER(MSVCP_basic_streambuf_char_vector_dtor
, 8)
404 basic_streambuf_char
* __thiscall
MSVCP_basic_streambuf_char_vector_dtor(basic_streambuf_char
*this, unsigned int flags
)
406 TRACE("(%p %x)\n", this, flags
);
408 /* we have an array, with the number of elements stored before the first object */
409 int i
, *ptr
= (int *)this-1;
411 for(i
=*ptr
-1; i
>=0; i
--)
412 basic_streambuf_char_dtor(this+i
);
413 MSVCRT_operator_delete(ptr
);
415 basic_streambuf_char_dtor(this);
417 MSVCRT_operator_delete(this);
423 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
424 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
425 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gnavail
, 4)
426 streamsize __thiscall
basic_streambuf_char__Gnavail(const basic_streambuf_char
*this)
428 TRACE("(%p)\n", this);
429 return *this->prpos
? *this->prsize
: 0;
432 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
433 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
434 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gndec
, 4)
435 char* __thiscall
basic_streambuf_char__Gndec(basic_streambuf_char
*this)
437 TRACE("(%p)\n", this);
443 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
444 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
445 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gninc
, 4)
446 char* __thiscall
basic_streambuf_char__Gninc(basic_streambuf_char
*this)
448 TRACE("(%p)\n", this);
450 return (*this->prpos
)++;
453 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
454 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
455 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gnpreinc
, 4)
456 char* __thiscall
basic_streambuf_char__Gnpreinc(basic_streambuf_char
*this)
458 TRACE("(%p)\n", this);
464 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAPAD0PAH001@Z */
465 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAPEAD0PEAH001@Z */
466 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init
, 28)
467 void __thiscall
basic_streambuf_char__Init(basic_streambuf_char
*this, char **gf
, char **gn
, int *gc
, char **pf
, char **pn
, int *pc
)
469 TRACE("(%p %p %p %p %p %p %p)\n", this, gf
, gn
, gc
, pf
, pn
, pc
);
479 /* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
480 /* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
481 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Lock
, 4)
482 void __thiscall
basic_streambuf_char__Lock(basic_streambuf_char
*this)
484 TRACE("(%p)\n", this);
485 mutex_lock(&this->lock
);
488 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
489 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
490 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Pnavail
, 4)
491 streamsize __thiscall
basic_streambuf_char__Pnavail(const basic_streambuf_char
*this)
493 TRACE("(%p)\n", this);
494 return *this->pwpos
? *this->pwsize
: 0;
497 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
498 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
499 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Pninc
, 4)
500 char* __thiscall
basic_streambuf_char__Pninc(basic_streambuf_char
*this)
502 TRACE("(%p)\n", this);
504 return (*this->pwpos
)++;
507 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
508 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
509 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_underflow
, 4)
510 #define call_basic_streambuf_char_underflow(this) CALL_VTBL_FUNC(this, 16, \
511 int, (basic_streambuf_char*), (this))
512 int __thiscall
basic_streambuf_char_underflow(basic_streambuf_char
*this)
514 TRACE("(%p)\n", this);
518 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
519 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
520 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_uflow
, 4)
521 #define call_basic_streambuf_char_uflow(this) CALL_VTBL_FUNC(this, 20, \
522 int, (basic_streambuf_char*), (this))
523 int __thiscall
basic_streambuf_char_uflow(basic_streambuf_char
*this)
527 TRACE("(%p)\n", this);
529 if(call_basic_streambuf_char_underflow(this)==EOF
)
538 /* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADIH@Z */
539 /* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_K_J@Z */
540 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Xsgetn_s
, 16)
541 #define call_basic_streambuf_char__Xsgetn_s(this, ptr, size, count) CALL_VTBL_FUNC(this, 28, \
542 streamsize, (basic_streambuf_char*, char*, MSVCP_size_t, streamsize), (this, ptr, size, count))
543 streamsize __thiscall
basic_streambuf_char__Xsgetn_s(basic_streambuf_char
*this, char *ptr
, MSVCP_size_t size
, streamsize count
)
545 streamsize copied
, chunk
;
547 TRACE("(%p %p %lu %ld)\n", this, ptr
, size
, count
);
549 for(copied
=0; copied
<count
&& size
;) {
550 chunk
= basic_streambuf_char__Gnavail(this);
551 if(chunk
> count
-copied
)
552 chunk
= count
-copied
;
555 memcpy_s(ptr
+copied
, size
, *this->prpos
, chunk
);
556 *this->prpos
+= chunk
;
557 *this->prsize
-= chunk
;
560 }else if((ptr
[copied
] = call_basic_streambuf_char_uflow(this)) != EOF
) {
571 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
572 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
573 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Sgetn_s
, 16)
574 streamsize __thiscall
basic_streambuf_char__Sgetn_s(basic_streambuf_char
*this, char *ptr
, MSVCP_size_t size
, streamsize count
)
576 TRACE("(%p %p %lu %ld)\n", this, ptr
, size
, count
);
577 return call_basic_streambuf_char__Xsgetn_s(this, ptr
, size
, count
);
580 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
581 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
582 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Unlock
, 4)
583 void __thiscall
basic_streambuf_char__Unlock(basic_streambuf_char
*this)
585 TRACE("(%p)\n", this);
586 mutex_unlock(&this->lock
);
589 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
590 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
591 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_eback
, 4)
592 char* __thiscall
basic_streambuf_char_eback(const basic_streambuf_char
*this)
594 TRACE("(%p)\n", this);
598 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
599 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
600 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gptr
, 4)
601 char* __thiscall
basic_streambuf_char_gptr(const basic_streambuf_char
*this)
603 TRACE("(%p)\n", this);
607 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
608 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
609 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_egptr
, 4)
610 char* __thiscall
basic_streambuf_char_egptr(const basic_streambuf_char
*this)
612 TRACE("(%p)\n", this);
613 return *this->prpos
+*this->prsize
;
616 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
617 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
618 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_epptr
, 4)
619 char* __thiscall
basic_streambuf_char_epptr(const basic_streambuf_char
*this)
621 TRACE("(%p)\n", this);
622 return *this->pwpos
+*this->pwsize
;
625 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
626 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
627 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gbump
, 8)
628 void __thiscall
basic_streambuf_char_gbump(basic_streambuf_char
*this, int off
)
630 TRACE("(%p %d)\n", this, off
);
632 *this->prsize
-= off
;
635 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QBE?AVlocale@2@XZ */
636 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEBA?AVlocale@2@XZ */
637 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_getloc
, 8)
638 locale
* __thiscall
basic_streambuf_char_getloc(const basic_streambuf_char
*this, locale
*ret
)
640 TRACE("(%p)\n", this);
641 return locale_copy_ctor(ret
, this->loc
);
644 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
645 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */
646 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_imbue
, 8)
647 #define call_basic_streambuf_char_imbue(this, loc) CALL_VTBL_FUNC(this, 52, \
648 void, (basic_streambuf_char*, const locale*), (this, loc))
649 void __thiscall
basic_streambuf_char_imbue(basic_streambuf_char
*this, const locale
*loc
)
651 TRACE("(%p %p)\n", this, loc
);
654 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
655 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
656 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_overflow
, 8)
657 #define call_basic_streambuf_char_overflow(this, ch) CALL_VTBL_FUNC(this, 4, \
658 int, (basic_streambuf_char*, int), (this, ch))
659 int __thiscall
basic_streambuf_char_overflow(basic_streambuf_char
*this, int ch
)
661 TRACE("(%p %d)\n", this, ch
);
665 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
666 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
667 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbackfail
, 8)
668 #define call_basic_streambuf_char_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, \
669 int, (basic_streambuf_char*, int), (this, ch))
670 int __thiscall
basic_streambuf_char_pbackfail(basic_streambuf_char
*this, int ch
)
672 TRACE("(%p %d)\n", this, ch
);
676 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
677 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
678 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbase
, 4)
679 char* __thiscall
basic_streambuf_char_pbase(const basic_streambuf_char
*this)
681 TRACE("(%p)\n", this);
685 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
686 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
687 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbump
, 8)
688 void __thiscall
basic_streambuf_char_pbump(basic_streambuf_char
*this, int off
)
690 TRACE("(%p %d)\n", this, off
);
692 *this->pwsize
-= off
;
695 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
696 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
697 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pptr
, 4)
698 char* __thiscall
basic_streambuf_char_pptr(const basic_streambuf_char
*this)
700 TRACE("(%p)\n", this);
704 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
705 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
706 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubimbue
, 12)
707 locale
* __thiscall
basic_streambuf_char_pubimbue(basic_streambuf_char
*this, locale
*ret
, const locale
*loc
)
709 TRACE("(%p %p)\n", this, loc
);
710 memcpy(ret
, this->loc
, sizeof(locale
));
711 call_basic_streambuf_char_imbue(this, loc
);
712 locale_copy_ctor(this->loc
, loc
);
716 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
717 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
718 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekoff
, 20)
719 #define call_basic_streambuf_char_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 36, \
720 fpos_int*, (basic_streambuf_char*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
721 fpos_int
* __thiscall
basic_streambuf_char_seekoff(basic_streambuf_char
*this,
722 fpos_int
*ret
, streamoff off
, int way
, int mode
)
724 TRACE("(%p %ld %d %d)\n", this, off
, way
, mode
);
731 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
732 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
733 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekoff
, 20)
734 fpos_int
* __thiscall
basic_streambuf_char_pubseekoff(basic_streambuf_char
*this,
735 fpos_int
*ret
, streamoff off
, int way
, int mode
)
737 TRACE("(%p %ld %d %d)\n", this, off
, way
, mode
);
738 return call_basic_streambuf_char_seekoff(this, ret
, off
, way
, mode
);
741 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */
742 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */
743 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekoff_old
, 20)
744 fpos_int
* __thiscall
basic_streambuf_char_pubseekoff_old(basic_streambuf_char
*this,
745 fpos_int
*ret
, streamoff off
, unsigned int way
, unsigned int mode
)
747 TRACE("(%p %ld %d %d)\n", this, off
, way
, mode
);
748 return basic_streambuf_char_pubseekoff(this, ret
, off
, way
, mode
);
751 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
752 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
753 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekpos
, 36)
754 #define call_basic_streambuf_char_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 40, \
755 fpos_int*, (basic_streambuf_char*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
756 fpos_int
* __thiscall
basic_streambuf_char_seekpos(basic_streambuf_char
*this,
757 fpos_int
*ret
, fpos_int pos
, int mode
)
759 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
766 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
767 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
768 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekpos
, 36)
769 fpos_int
* __thiscall
basic_streambuf_char_pubseekpos(basic_streambuf_char
*this,
770 fpos_int
*ret
, fpos_int pos
, int mode
)
772 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
773 return call_basic_streambuf_char_seekpos(this, ret
, pos
, mode
);
776 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
777 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
778 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekpos_old
, 36)
779 fpos_int
* __thiscall
basic_streambuf_char_pubseekpos_old(basic_streambuf_char
*this,
780 fpos_int
*ret
, fpos_int pos
, unsigned int mode
)
782 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
783 return basic_streambuf_char_pubseekpos(this, ret
, pos
, mode
);
786 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEPAV12@PADH@Z */
787 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAPEAV12@PEAD_J@Z */
788 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setbuf
, 12)
789 #define call_basic_streambuf_char_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 44, \
790 basic_streambuf_char*, (basic_streambuf_char*, char*, streamsize), (this, buf, count))
791 basic_streambuf_char
* __thiscall
basic_streambuf_char_setbuf(basic_streambuf_char
*this, char *buf
, streamsize count
)
793 TRACE("(%p %p %ld)\n", this, buf
, count
);
797 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PADH@Z */
798 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEAD_J@Z */
799 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsetbuf
, 12)
800 basic_streambuf_char
* __thiscall
basic_streambuf_char_pubsetbuf(basic_streambuf_char
*this, char *buf
, streamsize count
)
802 TRACE("(%p %p %ld)\n", this, buf
, count
);
803 return call_basic_streambuf_char_setbuf(this, buf
, count
);
806 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
807 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
808 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sync
, 4)
809 #define call_basic_streambuf_char_sync(this) CALL_VTBL_FUNC(this, 48, \
810 int, (basic_streambuf_char*), (this))
811 int __thiscall
basic_streambuf_char_sync(basic_streambuf_char
*this)
813 TRACE("(%p)\n", this);
817 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
818 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
819 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsync
, 4)
820 int __thiscall
basic_streambuf_char_pubsync(basic_streambuf_char
*this)
822 TRACE("(%p)\n", this);
823 return call_basic_streambuf_char_sync(this);
826 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
827 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
828 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetn
, 12)
829 streamsize __thiscall
basic_streambuf_char_sgetn(basic_streambuf_char
*this, char *ptr
, streamsize count
)
831 TRACE("(%p %p %ld)\n", this, ptr
, count
);
832 return call_basic_streambuf_char__Xsgetn_s(this, ptr
, -1, count
);
835 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
836 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JXZ */
837 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_showmanyc
, 4)
838 #define call_basic_streambuf_char_showmanyc(this) CALL_VTBL_FUNC(this, 12, \
839 streamsize, (basic_streambuf_char*), (this))
840 streamsize __thiscall
basic_streambuf_char_showmanyc(basic_streambuf_char
*this)
842 TRACE("(%p)\n", this);
846 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
847 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JXZ */
848 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_in_avail
, 4)
849 streamsize __thiscall
basic_streambuf_char_in_avail(basic_streambuf_char
*this)
853 TRACE("(%p)\n", this);
855 ret
= basic_streambuf_char__Gnavail(this);
856 return ret
? ret
: call_basic_streambuf_char_showmanyc(this);
859 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
860 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
861 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputbackc
, 8)
862 int __thiscall
basic_streambuf_char_sputbackc(basic_streambuf_char
*this, char ch
)
864 TRACE("(%p %d)\n", this, ch
);
865 if(*this->prpos
&& *this->prpos
>*this->prbuf
&& (*this->prpos
)[-1]==ch
) {
871 return call_basic_streambuf_char_pbackfail(this, ch
);
874 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
875 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
876 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputc
, 8)
877 int __thiscall
basic_streambuf_char_sputc(basic_streambuf_char
*this, char ch
)
879 TRACE("(%p %d)\n", this, ch
);
880 return basic_streambuf_char__Pnavail(this) ?
881 (*basic_streambuf_char__Pninc(this) = ch
) :
882 call_basic_streambuf_char_overflow(this, ch
);
885 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
886 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
887 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sungetc
, 4)
888 int __thiscall
basic_streambuf_char_sungetc(basic_streambuf_char
*this)
890 TRACE("(%p)\n", this);
891 if(*this->prpos
&& *this->prpos
>*this->prbuf
) {
894 return **this->prpos
;
897 return call_basic_streambuf_char_pbackfail(this, EOF
);
900 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
901 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
902 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_stossc
, 4)
903 void __thiscall
basic_streambuf_char_stossc(basic_streambuf_char
*this)
905 TRACE("(%p)\n", this);
906 if(basic_streambuf_char__Gnavail(this))
907 basic_streambuf_char__Gninc(this);
909 call_basic_streambuf_char_uflow(this);
912 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
913 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
914 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sbumpc
, 4)
915 int __thiscall
basic_streambuf_char_sbumpc(basic_streambuf_char
*this)
917 TRACE("(%p)\n", this);
918 return basic_streambuf_char__Gnavail(this) ?
919 *basic_streambuf_char__Gninc(this) : call_basic_streambuf_char_uflow(this);
922 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
923 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
924 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetc
, 4)
925 int __thiscall
basic_streambuf_char_sgetc(basic_streambuf_char
*this)
927 TRACE("(%p)\n", this);
928 return basic_streambuf_char__Gnavail(this) ?
929 *basic_streambuf_char_gptr(this) : call_basic_streambuf_char_underflow(this);
932 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
933 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
934 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_snextc
, 4)
935 int __thiscall
basic_streambuf_char_snextc(basic_streambuf_char
*this)
937 TRACE("(%p)\n", this);
939 if(basic_streambuf_char__Gnavail(this) > 1)
940 return *basic_streambuf_char__Gnpreinc(this);
941 return basic_streambuf_char_sbumpc(this)==EOF
?
942 EOF
: basic_streambuf_char_sgetc(this);
945 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADH@Z */
946 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_J@Z */
947 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsgetn
, 12)
948 #define call_basic_streambuf_char_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, \
949 streamsize, (basic_streambuf_char*, char*, streamsize), (this, ptr, count))
950 streamsize __thiscall
basic_streambuf_char_xsgetn(basic_streambuf_char
*this, char *ptr
, streamsize count
)
952 TRACE("(%p %p %ld)\n", this, ptr
, count
);
953 return call_basic_streambuf_char__Xsgetn_s(this, ptr
, -1, count
);
956 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPBDH@Z */
957 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEBD_J@Z */
958 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsputn
, 12)
959 #define call_basic_streambuf_char_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 32, \
960 streamsize, (basic_streambuf_char*, const char*, streamsize), (this, ptr, count))
961 streamsize __thiscall
basic_streambuf_char_xsputn(basic_streambuf_char
*this, const char *ptr
, streamsize count
)
963 streamsize copied
, chunk
;
965 TRACE("(%p %p %ld)\n", this, ptr
, count
);
967 for(copied
=0; copied
<count
;) {
968 chunk
= basic_streambuf_char__Pnavail(this);
969 if(chunk
> count
-copied
)
970 chunk
= count
-copied
;
973 memcpy(*this->pwpos
, ptr
+copied
, chunk
);
974 *this->pwpos
+= chunk
;
975 *this->pwsize
-= chunk
;
977 }else if(call_basic_streambuf_char_overflow(this, ptr
[copied
]) != EOF
) {
987 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z */
988 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEBD_J@Z */
989 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputn
, 12)
990 streamsize __thiscall
basic_streambuf_char_sputn(basic_streambuf_char
*this, const char *ptr
, streamsize count
)
992 TRACE("(%p %p %ld)\n", this, ptr
, count
);
993 return call_basic_streambuf_char_xsputn(this, ptr
, count
);
996 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */
997 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */
998 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
999 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1000 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp_next
, 16)
1001 void __thiscall
basic_streambuf_wchar_setp_next(basic_streambuf_wchar
*this, wchar_t *first
, wchar_t *next
, wchar_t *last
)
1003 TRACE("(%p %p %p %p)\n", this, first
, next
, last
);
1007 this->wsize
= last
-next
;
1010 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W0@Z */
1011 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W0@Z */
1012 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG0@Z */
1013 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG0@Z */
1014 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp
, 12)
1015 void __thiscall
basic_streambuf_wchar_setp(basic_streambuf_wchar
*this, wchar_t *first
, wchar_t *last
)
1017 basic_streambuf_wchar_setp_next(this, first
, first
, last
);
1020 /* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */
1021 /* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */
1022 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
1023 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1024 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setg
, 16)
1025 void __thiscall
basic_streambuf_wchar_setg(basic_streambuf_wchar
*this, wchar_t *first
, wchar_t *next
, wchar_t *last
)
1027 TRACE("(%p %p %p %p)\n", this, first
, next
, last
);
1031 this->rsize
= last
-next
;
1034 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXXZ */
1035 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXXZ */
1036 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXXZ */
1037 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXXZ */
1038 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init_empty
, 4)
1039 void __thiscall
basic_streambuf_wchar__Init_empty(basic_streambuf_wchar
*this)
1041 TRACE("(%p)\n", this);
1043 this->prbuf
= &this->rbuf
;
1044 this->pwbuf
= &this->wbuf
;
1045 this->prpos
= &this->rpos
;
1046 this->pwpos
= &this->wpos
;
1047 this->prsize
= &this->rsize
;
1048 this->pwsize
= &this->wsize
;
1050 basic_streambuf_wchar_setp(this, NULL
, NULL
);
1051 basic_streambuf_wchar_setg(this, NULL
, NULL
, NULL
);
1054 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@W4_Uninitialized@1@@Z */
1055 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
1056 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_ctor_uninitialized
, 8)
1057 basic_streambuf_wchar
* __thiscall
basic_streambuf_wchar_ctor_uninitialized(basic_streambuf_wchar
*this, int uninitialized
)
1059 TRACE("(%p %d)\n", this, uninitialized
);
1060 this->vtable
= &MSVCP_basic_streambuf_wchar_vtable
;
1061 mutex_ctor(&this->lock
);
1065 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@W4_Uninitialized@1@@Z */
1066 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
1067 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor_uninitialized
, 8)
1068 basic_streambuf_wchar
* __thiscall
basic_streambuf_short_ctor_uninitialized(basic_streambuf_wchar
*this, int uninitialized
)
1070 TRACE("(%p %d)\n", this, uninitialized
);
1071 basic_streambuf_wchar_ctor_uninitialized(this, uninitialized
);
1072 this->vtable
= &MSVCP_basic_streambuf_short_vtable
;
1076 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@XZ */
1077 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */
1078 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_ctor
, 4)
1079 basic_streambuf_wchar
* __thiscall
basic_streambuf_wchar_ctor(basic_streambuf_wchar
*this)
1081 TRACE("(%p)\n", this);
1083 this->vtable
= &MSVCP_basic_streambuf_wchar_vtable
;
1084 mutex_ctor(&this->lock
);
1085 this->loc
= MSVCRT_operator_new(sizeof(locale
));
1086 locale_ctor(this->loc
);
1087 basic_streambuf_wchar__Init_empty(this);
1092 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@XZ */
1093 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@XZ */
1094 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor
, 4)
1095 basic_streambuf_wchar
* __thiscall
basic_streambuf_short_ctor(basic_streambuf_wchar
*this)
1097 TRACE("(%p)\n", this);
1098 basic_streambuf_wchar_ctor(this);
1099 this->vtable
= &MSVCP_basic_streambuf_short_vtable
;
1103 /* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
1104 /* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
1105 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UAE@XZ */
1106 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */
1107 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_dtor
, 4)
1108 void __thiscall
basic_streambuf_wchar_dtor(basic_streambuf_wchar
*this)
1110 TRACE("(%p)\n", this);
1112 mutex_dtor(&this->lock
);
1113 locale_dtor(this->loc
);
1114 MSVCRT_operator_delete(this->loc
);
1117 DEFINE_THISCALL_WRAPPER(MSVCP_basic_streambuf_wchar_vector_dtor
, 8)
1118 basic_streambuf_wchar
* __thiscall
MSVCP_basic_streambuf_wchar_vector_dtor(basic_streambuf_wchar
*this, unsigned int flags
)
1120 TRACE("(%p %x)\n", this, flags
);
1122 /* we have an array, with the number of elements stored before the first object */
1123 int i
, *ptr
= (int *)this-1;
1125 for(i
=*ptr
-1; i
>=0; i
--)
1126 basic_streambuf_wchar_dtor(this+i
);
1127 MSVCRT_operator_delete(ptr
);
1129 basic_streambuf_wchar_dtor(this);
1131 MSVCRT_operator_delete(this);
1137 DEFINE_THISCALL_WRAPPER(MSVCP_basic_streambuf_short_vector_dtor
, 8)
1138 basic_streambuf_wchar
* __thiscall
MSVCP_basic_streambuf_short_vector_dtor(basic_streambuf_wchar
*this, unsigned int flags
)
1140 TRACE("(%p %x)\n", this, flags
);
1141 return MSVCP_basic_streambuf_wchar_vector_dtor(this, flags
);
1144 /* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */
1145 /* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */
1146 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1147 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1148 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gnavail
, 4)
1149 streamsize __thiscall
basic_streambuf_wchar__Gnavail(const basic_streambuf_wchar
*this)
1151 TRACE("(%p)\n", this);
1152 return *this->prpos
? *this->prsize
: 0;
1155 /* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1156 /* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1157 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1158 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1159 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gndec
, 4)
1160 wchar_t* __thiscall
basic_streambuf_wchar__Gndec(basic_streambuf_wchar
*this)
1162 TRACE("(%p)\n", this);
1165 return *this->prpos
;
1168 /* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1169 /* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1170 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1171 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1172 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gninc
, 4)
1173 wchar_t* __thiscall
basic_streambuf_wchar__Gninc(basic_streambuf_wchar
*this)
1175 TRACE("(%p)\n", this);
1177 return (*this->prpos
)++;
1180 /* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1181 /* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1182 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1183 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1184 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gnpreinc
, 4)
1185 wchar_t* __thiscall
basic_streambuf_wchar__Gnpreinc(basic_streambuf_wchar
*this)
1187 TRACE("(%p)\n", this);
1190 return *this->prpos
;
1193 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPAPA_W0PAH001@Z */
1194 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAPEA_W0PEAH001@Z */
1195 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAPAG0PAH001@Z */
1196 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAPEAG0PEAH001@Z */
1197 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init
, 28)
1198 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
)
1200 TRACE("(%p %p %p %p %p %p %p)\n", this, gf
, gn
, gc
, pf
, pn
, pc
);
1210 /* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1211 /* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1212 /* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1213 /* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1214 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Lock
, 4)
1215 void __thiscall
basic_streambuf_wchar__Lock(basic_streambuf_wchar
*this)
1217 TRACE("(%p)\n", this);
1218 mutex_lock(&this->lock
);
1221 /* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */
1222 /* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */
1223 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1224 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1225 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Pnavail
, 4)
1226 streamsize __thiscall
basic_streambuf_wchar__Pnavail(const basic_streambuf_wchar
*this)
1228 TRACE("(%p)\n", this);
1229 return *this->pwpos
? *this->pwsize
: 0;
1232 /* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1233 /* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1234 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1235 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1236 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Pninc
, 4)
1237 wchar_t* __thiscall
basic_streambuf_wchar__Pninc(basic_streambuf_wchar
*this)
1239 TRACE("(%p)\n", this);
1241 return (*this->pwpos
)++;
1244 /* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
1245 /* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
1246 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1247 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1248 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_underflow
, 4)
1249 #define call_basic_streambuf_wchar_underflow(this) CALL_VTBL_FUNC(this, 16, \
1250 unsigned short, (basic_streambuf_wchar*), (this))
1251 unsigned short __thiscall
basic_streambuf_wchar_underflow(basic_streambuf_wchar
*this)
1253 TRACE("(%p)\n", this);
1257 /* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
1258 /* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
1259 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1260 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1261 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_uflow
, 4)
1262 #define call_basic_streambuf_wchar_uflow(this) CALL_VTBL_FUNC(this, 20, \
1263 unsigned short, (basic_streambuf_wchar*), (this))
1264 unsigned short __thiscall
basic_streambuf_wchar_uflow(basic_streambuf_wchar
*this)
1268 TRACE("(%p)\n", this);
1270 if(call_basic_streambuf_wchar_underflow(this)==WEOF
)
1273 ret
= **this->prpos
;
1279 /* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WIH@Z */
1280 /* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_K_J@Z */
1281 /* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGIH@Z */
1282 /* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_K_J@Z */
1283 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Xsgetn_s
, 16)
1284 #define call_basic_streambuf_wchar__Xsgetn_s(this, ptr, size, count) CALL_VTBL_FUNC(this, 28, \
1285 streamsize, (basic_streambuf_wchar*, wchar_t*, MSVCP_size_t, streamsize), (this, ptr, size, count))
1286 streamsize __thiscall
basic_streambuf_wchar__Xsgetn_s(basic_streambuf_wchar
*this, wchar_t *ptr
, MSVCP_size_t size
, streamsize count
)
1288 streamsize copied
, chunk
;
1290 TRACE("(%p %p %lu %ld)\n", this, ptr
, size
, count
);
1292 for(copied
=0; copied
<count
&& size
;) {
1293 chunk
= basic_streambuf_wchar__Gnavail(this);
1294 if(chunk
> count
-copied
)
1295 chunk
= count
-copied
;
1298 memcpy_s(ptr
+copied
, size
, *this->prpos
, chunk
);
1299 *this->prpos
+= chunk
;
1300 *this->prsize
-= chunk
;
1303 }else if((ptr
[copied
] = call_basic_streambuf_wchar_uflow(this)) != WEOF
) {
1314 /* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WIH@Z */
1315 /* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_K_J@Z */
1316 /* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGIH@Z */
1317 /* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_K_J@Z */
1318 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Sgetn_s
, 16)
1319 streamsize __thiscall
basic_streambuf_wchar__Sgetn_s(basic_streambuf_wchar
*this, wchar_t *ptr
, MSVCP_size_t size
, streamsize count
)
1321 TRACE("(%p %p %lu %ld)\n", this, ptr
, size
, count
);
1322 return call_basic_streambuf_wchar__Xsgetn_s(this, ptr
, size
, count
);
1325 /* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1326 /* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1327 /* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1328 /* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1329 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Unlock
, 4)
1330 void __thiscall
basic_streambuf_wchar__Unlock(basic_streambuf_wchar
*this)
1332 TRACE("(%p)\n", this);
1333 mutex_unlock(&this->lock
);
1336 /* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1337 /* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1338 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1339 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1340 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_eback
, 4)
1341 wchar_t* __thiscall
basic_streambuf_wchar_eback(const basic_streambuf_wchar
*this)
1343 TRACE("(%p)\n", this);
1344 return *this->prbuf
;
1347 /* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1348 /* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1349 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1350 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1351 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gptr
, 4)
1352 wchar_t* __thiscall
basic_streambuf_wchar_gptr(const basic_streambuf_wchar
*this)
1354 TRACE("(%p)\n", this);
1355 return *this->prpos
;
1358 /* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1359 /* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1360 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1361 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1362 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_egptr
, 4)
1363 wchar_t* __thiscall
basic_streambuf_wchar_egptr(const basic_streambuf_wchar
*this)
1365 TRACE("(%p)\n", this);
1366 return *this->prpos
+*this->prsize
;
1369 /* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1370 /* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1371 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1372 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1373 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_epptr
, 4)
1374 wchar_t* __thiscall
basic_streambuf_wchar_epptr(const basic_streambuf_wchar
*this)
1376 TRACE("(%p)\n", this);
1377 return *this->pwpos
+*this->pwsize
;
1380 /* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */
1381 /* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */
1382 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
1383 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
1384 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gbump
, 8)
1385 void __thiscall
basic_streambuf_wchar_gbump(basic_streambuf_wchar
*this, int off
)
1387 TRACE("(%p %d)\n", this, off
);
1388 *this->prpos
+= off
;
1389 *this->prsize
-= off
;
1392 /* ?getloc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QBE?AVlocale@2@XZ */
1393 /* ?getloc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEBA?AVlocale@2@XZ */
1394 /* ?getloc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QBE?AVlocale@2@XZ */
1395 /* ?getloc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEBA?AVlocale@2@XZ */
1396 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_getloc
, 8)
1397 locale
* __thiscall
basic_streambuf_wchar_getloc(const basic_streambuf_wchar
*this, locale
*ret
)
1399 TRACE("(%p)\n", this);
1400 return locale_copy_ctor(ret
, this->loc
);
1403 /* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEXABVlocale@2@@Z */
1404 /* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAXAEBVlocale@2@@Z */
1405 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEXABVlocale@2@@Z */
1406 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAXAEBVlocale@2@@Z */
1407 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_imbue
, 8)
1408 #define call_basic_streambuf_wchar_imbue(this, loc) CALL_VTBL_FUNC(this, 52, \
1409 void, (basic_streambuf_wchar*, const locale*), (this, loc))
1410 void __thiscall
basic_streambuf_wchar_imbue(basic_streambuf_wchar
*this, const locale
*loc
)
1412 TRACE("(%p %p)\n", this, loc
);
1415 /* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
1416 /* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
1417 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1418 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1419 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_overflow
, 8)
1420 #define call_basic_streambuf_wchar_overflow(this, ch) CALL_VTBL_FUNC(this, 4, \
1421 unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1422 unsigned short __thiscall
basic_streambuf_wchar_overflow(basic_streambuf_wchar
*this, unsigned short ch
)
1424 TRACE("(%p %d)\n", this, ch
);
1428 /* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
1429 /* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
1430 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1431 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1432 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbackfail
, 8)
1433 #define call_basic_streambuf_wchar_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, \
1434 unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1435 unsigned short __thiscall
basic_streambuf_wchar_pbackfail(basic_streambuf_wchar
*this, unsigned short ch
)
1437 TRACE("(%p %d)\n", this, ch
);
1441 /* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1442 /* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1443 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1444 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1445 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbase
, 4)
1446 wchar_t* __thiscall
basic_streambuf_wchar_pbase(const basic_streambuf_wchar
*this)
1448 TRACE("(%p)\n", this);
1449 return *this->pwbuf
;
1452 /* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */
1453 /* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */
1454 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
1455 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
1456 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbump
, 8)
1457 void __thiscall
basic_streambuf_wchar_pbump(basic_streambuf_wchar
*this, int off
)
1459 TRACE("(%p %d)\n", this, off
);
1460 *this->pwpos
+= off
;
1461 *this->pwsize
-= off
;
1464 /* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1465 /* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1466 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1467 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1468 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pptr
, 4)
1469 wchar_t* __thiscall
basic_streambuf_wchar_pptr(const basic_streambuf_wchar
*this)
1471 TRACE("(%p)\n", this);
1472 return *this->pwpos
;
1475 /* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1476 /* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1477 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1478 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1479 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubimbue
, 12)
1480 locale
* __thiscall
basic_streambuf_wchar_pubimbue(basic_streambuf_wchar
*this, locale
*ret
, const locale
*loc
)
1482 TRACE("(%p %p)\n", this, loc
);
1483 memcpy(ret
, this->loc
, sizeof(locale
));
1484 call_basic_streambuf_wchar_imbue(this, loc
);
1485 locale_copy_ctor(this->loc
, loc
);
1489 /* ?seekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1490 /* ?seekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1491 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1492 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1493 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekoff
, 20)
1494 #define call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 36, \
1495 fpos_int*, (basic_streambuf_wchar*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
1496 fpos_int
* __thiscall
basic_streambuf_wchar_seekoff(basic_streambuf_wchar
*this,
1497 fpos_int
*ret
, streamoff off
, int way
, int mode
)
1499 TRACE("(%p %ld %d %d)\n", this, off
, way
, mode
);
1506 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
1507 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
1508 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
1509 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
1510 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekoff
, 20)
1511 fpos_int
* __thiscall
basic_streambuf_wchar_pubseekoff(basic_streambuf_wchar
*this,
1512 fpos_int
*ret
, streamoff off
, int way
, int mode
)
1514 TRACE("(%p %ld %d %d)\n", this, off
, way
, mode
);
1515 return call_basic_streambuf_wchar_seekoff(this, ret
, off
, way
, mode
);
1518 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */
1519 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */
1520 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */
1521 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */
1522 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekoff_old
, 20)
1523 fpos_int
* __thiscall
basic_streambuf_wchar_pubseekoff_old(basic_streambuf_wchar
*this,
1524 fpos_int
*ret
, streamoff off
, unsigned int way
, unsigned int mode
)
1526 TRACE("(%p %ld %d %d)\n", this, off
, way
, mode
);
1527 return basic_streambuf_wchar_pubseekoff(this, ret
, off
, way
, mode
);
1530 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
1531 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
1532 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
1533 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
1534 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekpos
, 36)
1535 #define call_basic_streambuf_wchar_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 40, \
1536 fpos_int*, (basic_streambuf_wchar*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
1537 fpos_int
* __thiscall
basic_streambuf_wchar_seekpos(basic_streambuf_wchar
*this,
1538 fpos_int
*ret
, fpos_int pos
, int mode
)
1540 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
1547 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
1548 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
1549 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
1550 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
1551 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos
, 36)
1552 fpos_int
* __thiscall
basic_streambuf_wchar_pubseekpos(basic_streambuf_wchar
*this,
1553 fpos_int
*ret
, fpos_int pos
, int mode
)
1555 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
1556 return call_basic_streambuf_wchar_seekpos(this, ret
, pos
, mode
);
1559 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
1560 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
1561 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
1562 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
1563 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos_old
, 36)
1564 fpos_int
* __thiscall
basic_streambuf_wchar_pubseekpos_old(basic_streambuf_wchar
*this,
1565 fpos_int
*ret
, fpos_int pos
, unsigned int mode
)
1567 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
1568 return basic_streambuf_wchar_pubseekpos(this, ret
, pos
, mode
);
1571 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEPAV12@PA_WH@Z */
1572 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAPEAV12@PEA_W_J@Z */
1573 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEPAV12@PAGH@Z */
1574 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAPEAV12@PEAG_J@Z */
1575 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setbuf
, 12)
1576 #define call_basic_streambuf_wchar_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 44, \
1577 basic_streambuf_wchar*, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, buf, count))
1578 basic_streambuf_wchar
* __thiscall
basic_streambuf_wchar_setbuf(basic_streambuf_wchar
*this, wchar_t *buf
, streamsize count
)
1580 TRACE("(%p %p %ld)\n", this, buf
, count
);
1584 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PA_WH@Z */
1585 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEA_W_J@Z */
1586 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PAGH@Z */
1587 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEAG_J@Z */
1588 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsetbuf
, 12)
1589 basic_streambuf_wchar
* __thiscall
basic_streambuf_wchar_pubsetbuf(basic_streambuf_wchar
*this, wchar_t *buf
, streamsize count
)
1591 TRACE("(%p %p %ld)\n", this, buf
, count
);
1592 return call_basic_streambuf_wchar_setbuf(this, buf
, count
);
1595 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
1596 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAHXZ */
1597 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
1598 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */
1599 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sync
, 4)
1600 #define call_basic_streambuf_wchar_sync(this) CALL_VTBL_FUNC(this, 48, \
1601 int, (basic_streambuf_wchar*), (this))
1602 int __thiscall
basic_streambuf_wchar_sync(basic_streambuf_wchar
*this)
1604 TRACE("(%p)\n", this);
1608 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
1609 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAHXZ */
1610 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
1611 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHXZ */
1612 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsync
, 4)
1613 int __thiscall
basic_streambuf_wchar_pubsync(basic_streambuf_wchar
*this)
1615 TRACE("(%p)\n", this);
1616 return call_basic_streambuf_wchar_sync(this);
1619 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WH@Z */
1620 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_J@Z */
1621 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */
1622 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */
1623 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetn
, 12)
1624 streamsize __thiscall
basic_streambuf_wchar_sgetn(basic_streambuf_wchar
*this, wchar_t *ptr
, streamsize count
)
1626 TRACE("(%p %p %ld)\n", this, ptr
, count
);
1627 return call_basic_streambuf_wchar__Xsgetn_s(this, ptr
, -1, count
);
1630 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
1631 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JXZ */
1632 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
1633 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JXZ */
1634 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_showmanyc
, 4)
1635 #define call_basic_streambuf_wchar_showmanyc(this) CALL_VTBL_FUNC(this, 12, \
1636 streamsize, (basic_streambuf_wchar*), (this))
1637 streamsize __thiscall
basic_streambuf_wchar_showmanyc(basic_streambuf_wchar
*this)
1639 TRACE("(%p)\n", this);
1643 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
1644 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JXZ */
1645 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
1646 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JXZ */
1647 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_in_avail
, 4)
1648 streamsize __thiscall
basic_streambuf_wchar_in_avail(basic_streambuf_wchar
*this)
1652 TRACE("(%p)\n", this);
1654 ret
= basic_streambuf_wchar__Gnavail(this);
1655 return ret
? ret
: call_basic_streambuf_wchar_showmanyc(this);
1658 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
1659 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
1660 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
1661 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
1662 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputbackc
, 8)
1663 unsigned short __thiscall
basic_streambuf_wchar_sputbackc(basic_streambuf_wchar
*this, wchar_t ch
)
1665 TRACE("(%p %d)\n", this, ch
);
1666 if(*this->prpos
&& *this->prpos
>*this->prbuf
&& (*this->prpos
)[-1]==ch
) {
1672 return call_basic_streambuf_wchar_pbackfail(this, ch
);
1675 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
1676 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
1677 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
1678 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHG@Z */
1679 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputc
, 8)
1680 unsigned short __thiscall
basic_streambuf_wchar_sputc(basic_streambuf_wchar
*this, wchar_t ch
)
1682 TRACE("(%p %d)\n", this, ch
);
1683 return basic_streambuf_wchar__Pnavail(this) ?
1684 (*basic_streambuf_wchar__Pninc(this) = ch
) :
1685 call_basic_streambuf_wchar_overflow(this, ch
);
1688 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
1689 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
1690 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1691 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1692 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sungetc
, 4)
1693 unsigned short __thiscall
basic_streambuf_wchar_sungetc(basic_streambuf_wchar
*this)
1695 TRACE("(%p)\n", this);
1696 if(*this->prpos
&& *this->prpos
>*this->prbuf
) {
1699 return **this->prpos
;
1702 return call_basic_streambuf_wchar_pbackfail(this, WEOF
);
1705 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1706 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1707 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1708 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1709 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_stossc
, 4)
1710 void __thiscall
basic_streambuf_wchar_stossc(basic_streambuf_wchar
*this)
1712 TRACE("(%p)\n", this);
1713 if(basic_streambuf_wchar__Gnavail(this))
1714 basic_streambuf_wchar__Gninc(this);
1716 call_basic_streambuf_wchar_uflow(this);
1719 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
1720 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
1721 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1722 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1723 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sbumpc
, 4)
1724 unsigned short __thiscall
basic_streambuf_wchar_sbumpc(basic_streambuf_wchar
*this)
1726 TRACE("(%p)\n", this);
1727 return basic_streambuf_wchar__Gnavail(this) ?
1728 *basic_streambuf_wchar__Gninc(this) : call_basic_streambuf_wchar_uflow(this);
1731 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
1732 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
1733 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1734 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1735 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetc
, 4)
1736 unsigned short __thiscall
basic_streambuf_wchar_sgetc(basic_streambuf_wchar
*this)
1738 TRACE("(%p)\n", this);
1739 return basic_streambuf_wchar__Gnavail(this) ?
1740 *basic_streambuf_wchar_gptr(this) : call_basic_streambuf_wchar_underflow(this);
1743 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
1744 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
1745 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1746 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1747 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_snextc
, 4)
1748 unsigned short __thiscall
basic_streambuf_wchar_snextc(basic_streambuf_wchar
*this)
1750 TRACE("(%p)\n", this);
1752 if(basic_streambuf_wchar__Gnavail(this) > 1)
1753 return *basic_streambuf_wchar__Gnpreinc(this);
1754 return basic_streambuf_wchar_sbumpc(this)==WEOF
?
1755 WEOF
: basic_streambuf_wchar_sgetc(this);
1758 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WH@Z */
1759 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_J@Z */
1760 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGH@Z */
1761 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_J@Z */
1762 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsgetn
, 12)
1763 #define call_basic_streambuf_wchar_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, \
1764 streamsize, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, ptr, count))
1765 streamsize __thiscall
basic_streambuf_wchar_xsgetn(basic_streambuf_wchar
*this, wchar_t *ptr
, streamsize count
)
1767 TRACE("(%p %p %ld)\n", this, ptr
, count
);
1768 return call_basic_streambuf_wchar__Xsgetn_s(this, ptr
, -1, count
);
1771 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPB_WH@Z */
1772 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEB_W_J@Z */
1773 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPBGH@Z */
1774 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEBG_J@Z */
1775 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsputn
, 12)
1776 #define call_basic_streambuf_wchar_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 32, \
1777 streamsize, (basic_streambuf_wchar*, const wchar_t*, streamsize), (this, ptr, count))
1778 streamsize __thiscall
basic_streambuf_wchar_xsputn(basic_streambuf_wchar
*this, const wchar_t *ptr
, streamsize count
)
1780 streamsize copied
, chunk
;
1782 TRACE("(%p %p %ld)\n", this, ptr
, count
);
1784 for(copied
=0; copied
<count
;) {
1785 chunk
= basic_streambuf_wchar__Pnavail(this);
1786 if(chunk
> count
-copied
)
1787 chunk
= count
-copied
;
1790 memcpy(*this->pwpos
, ptr
+copied
, chunk
);
1791 *this->pwpos
+= chunk
;
1792 *this->pwsize
-= chunk
;
1794 }else if(call_basic_streambuf_wchar_overflow(this, ptr
[copied
]) != WEOF
) {
1804 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPB_WH@Z */
1805 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEB_W_J@Z */
1806 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPBGH@Z */
1807 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEBG_J@Z */
1808 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputn
, 12)
1809 streamsize __thiscall
basic_streambuf_wchar_sputn(basic_streambuf_wchar
*this, const wchar_t *ptr
, streamsize count
)
1811 TRACE("(%p %p %ld)\n", this, ptr
, count
);
1812 return call_basic_streambuf_wchar_xsputn(this, ptr
, count
);
1815 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
1816 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
1817 int basic_filebuf_char__Init__Stinit
= 0;
1819 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
1820 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
1821 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Init
, 12)
1822 void __thiscall
basic_filebuf_char__Init(basic_filebuf_char
*this, FILE *file
, basic_filebuf__Initfl which
)
1824 TRACE("(%p %p %d)\n", this, file
, which
);
1827 this->wrotesome
= FALSE
;
1828 this->state
= basic_filebuf_char__Init__Stinit
;
1829 this->close
= (which
== INITFL_open
);
1832 basic_streambuf_char__Init_empty(&this->base
);
1834 basic_streambuf_char__Init(&this->base
, &file
->_base
, &file
->_ptr
,
1835 &file
->_cnt
, &file
->_base
, &file
->_ptr
, &file
->_cnt
);
1838 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAV?$codecvt@DDH@2@@Z */
1839 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$codecvt@DDH@2@@Z */
1840 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Initcvt
, 8)
1841 void __thiscall
basic_filebuf_char__Initcvt(basic_filebuf_char
*this, codecvt_char
*cvt
)
1843 TRACE("(%p %p)\n", this, cvt
);
1845 if(codecvt_base_always_noconv(&cvt
->base
)) {
1848 basic_streambuf_char__Init_empty(&this->base
);
1853 /* ?_Endwrite@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAE_NXZ */
1854 /* ?_Endwrite@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAA_NXZ */
1855 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Endwrite
, 4)
1856 MSVCP_bool __thiscall
basic_filebuf_char__Endwrite(basic_filebuf_char
*this)
1858 TRACE("(%p)\n", this);
1860 if(!this->wrotesome
|| !this->cvt
)
1864 if(call_basic_streambuf_char_overflow(&this->base
, EOF
) == EOF
)
1868 /* TODO: check if we need a dynamic buffer here */
1873 ret
= codecvt_char_unshift(this->cvt
, &this->state
, buf
, buf
+sizeof(buf
), &next
);
1876 this->wrotesome
= FALSE
;
1878 case CODECVT_partial
:
1879 if(!fwrite(buf
, next
-buf
, 1, this->file
))
1884 case CODECVT_noconv
:
1885 if(call_basic_streambuf_char_overflow(&this->base
, EOF
) == EOF
)
1894 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@XZ */
1895 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@XZ */
1896 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_close
, 4)
1897 basic_filebuf_char
* __thiscall
basic_filebuf_char_close(basic_filebuf_char
*this)
1899 basic_filebuf_char
*ret
= this;
1901 TRACE("(%p)\n", this);
1906 /* TODO: handle exceptions */
1907 if(!basic_filebuf_char__Endwrite(this))
1909 if(!fclose(this->file
))
1912 basic_filebuf_char__Init(this, NULL
, INITFL_close
);
1916 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
1917 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
1918 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_file
, 8)
1919 basic_filebuf_char
* __thiscall
basic_filebuf_char_ctor_file(basic_filebuf_char
*this, FILE *file
)
1921 TRACE("(%p %p)\n", this, file
);
1923 basic_streambuf_char_ctor(&this->base
);
1924 this->base
.vtable
= &MSVCP_basic_filebuf_char_vtable
;
1926 basic_filebuf_char__Init(this, file
, INITFL_new
);
1930 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1931 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1932 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor
, 4)
1933 basic_filebuf_char
* __thiscall
basic_filebuf_char_ctor(basic_filebuf_char
*this)
1935 return basic_filebuf_char_ctor_file(this, NULL
);
1938 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
1939 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
1940 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_uninitialized
, 8)
1941 basic_filebuf_char
* __thiscall
basic_filebuf_char_ctor_uninitialized(basic_filebuf_char
*this, int uninitialized
)
1943 TRACE("(%p %d)\n", this, uninitialized
);
1945 basic_streambuf_char_ctor(&this->base
);
1946 this->base
.vtable
= &MSVCP_basic_filebuf_char_vtable
;
1950 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
1951 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
1952 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_dtor
, 4)
1953 void __thiscall
basic_filebuf_char_dtor(basic_filebuf_char
*this)
1955 TRACE("(%p)\n", this);
1958 basic_filebuf_char_close(this);
1959 basic_streambuf_char_dtor(&this->base
);
1962 DEFINE_THISCALL_WRAPPER(MSVCP_basic_filebuf_char_vector_dtor
, 8)
1963 basic_filebuf_char
* __thiscall
MSVCP_basic_filebuf_char_vector_dtor(basic_filebuf_char
*this, unsigned int flags
)
1965 TRACE("(%p %x)\n", this, flags
);
1967 /* we have an array, with the number of elements stored before the first object */
1968 int i
, *ptr
= (int *)this-1;
1970 for(i
=*ptr
-1; i
>=0; i
--)
1971 basic_filebuf_char_dtor(this+i
);
1972 MSVCRT_operator_delete(ptr
);
1974 basic_filebuf_char_dtor(this);
1976 MSVCRT_operator_delete(this);
1982 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QBE_NXZ */
1983 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
1984 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_is_open
, 4)
1985 MSVCP_bool __thiscall
basic_filebuf_char_is_open(const basic_filebuf_char
*this)
1987 TRACE("(%p)\n", this);
1988 return this->file
!= NULL
;
1991 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PB_WHH@Z */
1992 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEB_WHH@Z */
1993 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBGHH@Z */
1994 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBGHH@Z */
1995 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_wchar
, 16)
1996 basic_filebuf_char
* __thiscall
basic_filebuf_char_open_wchar(basic_filebuf_char
*this, const wchar_t *name
, int mode
, int prot
)
1998 static const wchar_t rW
[] = {'r',0};
1999 static const struct {
2001 const wchar_t str
[4];
2002 const wchar_t str_bin
[4];
2004 {OPENMODE_out
, {'w',0}, {'w','b',0}},
2005 {OPENMODE_out
|OPENMODE_app
, {'a',0}, {'a','b',0}},
2006 {OPENMODE_app
, {'a',0}, {'a','b',0}},
2007 {OPENMODE_out
|OPENMODE_trunc
, {'w',0}, {'w','b',0}},
2008 {OPENMODE_in
, {'r',0}, {'r','b',0}},
2009 {OPENMODE_in
|OPENMODE_out
, {'r','+',0}, {'r','+','b',0}},
2010 {OPENMODE_in
|OPENMODE_out
|OPENMODE_trunc
, {'w','+',0}, {'w','+','b',0}},
2011 {OPENMODE_in
|OPENMODE_out
|OPENMODE_app
, {'a','+',0}, {'a','+','b',0}},
2012 {OPENMODE_in
|OPENMODE_app
, {'a','+',0}, {'a','+','b',0}}
2015 int real_mode
= mode
& ~(OPENMODE_ate
|OPENMODE__Nocreate
|OPENMODE__Noreplace
|OPENMODE_binary
);
2019 TRACE("(%p %s %d %d)\n", this, debugstr_w(name
), mode
, prot
);
2021 if(basic_filebuf_char_is_open(this))
2024 for(mode_idx
=0; mode_idx
<sizeof(str_mode
)/sizeof(str_mode
[0]); mode_idx
++)
2025 if(str_mode
[mode_idx
].mode
== real_mode
)
2027 if(mode_idx
== sizeof(str_mode
)/sizeof(str_mode
[0]))
2030 if((mode
& OPENMODE__Nocreate
) && !(f
= _wfopen(name
, rW
)))
2035 if((mode
& OPENMODE__Noreplace
) && (mode
& (OPENMODE_out
|OPENMODE_app
))
2036 && (f
= _wfopen(name
, rW
))) {
2041 f
= _wfsopen(name
, (mode
& OPENMODE_binary
) ? str_mode
[mode_idx
].str_bin
2042 : str_mode
[mode_idx
].str
, prot
);
2046 if((mode
& OPENMODE_ate
) && fseek(f
, 0, SEEK_END
)) {
2051 basic_filebuf_char__Init(this, f
, INITFL_open
);
2052 basic_filebuf_char__Initcvt(this, codecvt_char_use_facet(this->base
.loc
));
2056 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PB_WI@Z */
2057 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEB_WI@Z */
2058 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBGI@Z */
2059 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBGI@Z */
2060 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_wchar_mode
, 12)
2061 basic_filebuf_char
* __thiscall
basic_filebuf_char_open_wchar_mode(basic_filebuf_char
*this, const wchar_t *name
, unsigned int mode
)
2063 return basic_filebuf_char_open_wchar(this, name
, mode
, SH_DENYNO
);
2066 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDHH@Z */
2067 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDHH@Z */
2068 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open
, 16)
2069 basic_filebuf_char
* __thiscall
basic_filebuf_char_open(basic_filebuf_char
*this, const char *name
, int mode
, int prot
)
2071 wchar_t nameW
[FILENAME_MAX
];
2073 TRACE("(%p %s %d %d)\n", this, name
, mode
, prot
);
2075 if(mbstowcs_s(NULL
, nameW
, FILENAME_MAX
, name
, FILENAME_MAX
-1) != 0)
2077 return basic_filebuf_char_open_wchar(this, nameW
, mode
, prot
);
2080 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDI@Z */
2081 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDI@Z */
2082 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_mode
, 12)
2083 basic_filebuf_char
* __thiscall
basic_filebuf_char_open_mode(basic_filebuf_char
*this, const char *name
, unsigned int mode
)
2085 return basic_filebuf_char_open(this, name
, mode
, SH_DENYNO
);
2088 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2089 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2090 #define call_basic_filebuf_char_overflow(this, c) CALL_VTBL_FUNC(this, 4, \
2091 int, (basic_filebuf_char*, int), (this, c))
2092 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_overflow
, 8)
2093 int __thiscall
basic_filebuf_char_overflow(basic_filebuf_char
*this, int c
)
2095 char buf
[8], *dyn_buf
;
2096 char ch
= c
, *to_next
;
2097 const char *from_next
;
2101 TRACE("(%p %d)\n", this, c
);
2103 if(!basic_filebuf_char_is_open(this))
2109 return fwrite(&ch
, sizeof(char), 1, this->file
) ? c
: EOF
;
2113 ret
= codecvt_char_out(this->cvt
, &this->state
, from_next
, &ch
+1,
2114 &from_next
, buf
, buf
+sizeof(buf
), &to_next
);
2117 case CODECVT_partial
:
2122 if(!fwrite(buf
, to_next
-buf
, 1, this->file
))
2124 if(ret
== CODECVT_partial
)
2127 case CODECVT_noconv
:
2128 return fwrite(&ch
, sizeof(char), 1, this->file
) ? c
: EOF
;
2134 max_size
= codecvt_base_max_length(&this->cvt
->base
);
2135 dyn_buf
= malloc(max_size
);
2139 ret
= codecvt_char_out(this->cvt
, &this->state
, from_next
, &ch
+1,
2140 &from_next
, dyn_buf
, dyn_buf
+max_size
, &to_next
);
2144 ret
= fwrite(dyn_buf
, to_next
-dyn_buf
, 1, this->file
);
2146 return ret
? c
: EOF
;
2147 case CODECVT_partial
:
2148 ERR("buffer should be big enough to store all output\n");
2156 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2157 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2158 #define call_basic_filebuf_char_pbackfail(this, c) CALL_VTBL_FUNC(this, 8, \
2159 int, (basic_filebuf_char*, int), (this, c))
2160 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_pbackfail
, 8)
2161 int __thiscall
basic_filebuf_char_pbackfail(basic_filebuf_char
*this, int c
)
2163 TRACE("(%p %d)\n", this, c
);
2165 if(!basic_filebuf_char_is_open(this))
2168 if(basic_streambuf_char_gptr(&this->base
)>basic_streambuf_char_eback(&this->base
)
2169 && (c
==EOF
|| basic_streambuf_char_gptr(&this->base
)[-1]==(char)c
)) {
2170 basic_streambuf_char__Gndec(&this->base
);
2171 return c
==EOF
? !c
: c
;
2172 }else if(c
!=EOF
&& !this->cvt
) {
2173 return ungetc(c
, this->file
);
2179 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2180 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2181 #define call_basic_filebuf_char_uflow(this) CALL_VTBL_FUNC(this, 20, \
2182 int, (basic_filebuf_char*), (this))
2183 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_uflow
, 4)
2184 int __thiscall
basic_filebuf_char_uflow(basic_filebuf_char
*this)
2186 char ch
, buf
[128], *to_next
;
2187 const char *buf_next
;
2190 TRACE("(%p)\n", this);
2192 if(!basic_filebuf_char_is_open(this))
2195 if(basic_streambuf_char_gptr(&this->base
) < basic_streambuf_char_egptr(&this->base
))
2196 return *basic_streambuf_char__Gninc(&this->base
);
2198 c
= fgetc(this->file
);
2199 if(!this->cvt
|| !c
)
2203 for(i
=0; i
< sizeof(buf
)/sizeof(char); i
++) {
2206 switch(codecvt_char_in(this->cvt
, &this->state
, buf_next
,
2207 buf
+i
+1, &buf_next
, &ch
, &ch
+1, &to_next
)) {
2208 case CODECVT_partial
:
2210 if(to_next
== &ch
) {
2211 c
= fgetc(this->file
);
2217 for(i
--; i
>=buf_next
-buf
; i
--)
2218 ungetc(buf
[i
], this->file
);
2220 case CODECVT_noconv
:
2227 FIXME("buffer is to small\n");
2231 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2232 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2233 #define call_basic_filebuf_char_underflow(this) CALL_VTBL_FUNC(this, 16, \
2234 int, (basic_filebuf_char*), (this))
2235 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_underflow
, 4)
2236 int __thiscall
basic_filebuf_char_underflow(basic_filebuf_char
*this)
2240 TRACE("(%p)\n", this);
2242 if(basic_streambuf_char_gptr(&this->base
) < basic_streambuf_char_egptr(&this->base
))
2243 return *basic_streambuf_char_gptr(&this->base
);
2245 ret
= call_basic_filebuf_char_uflow(this);
2247 ret
= call_basic_filebuf_char_pbackfail(this, ret
);
2251 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
2252 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
2253 #define call_basic_filebuf_char_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 36, \
2254 fpos_int*, (basic_filebuf_char*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
2255 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekoff
, 20)
2256 fpos_int
* __thiscall
basic_filebuf_char_seekoff(basic_filebuf_char
*this,
2257 fpos_int
*ret
, streamoff off
, int way
, int mode
)
2261 TRACE("(%p %p %ld %d %d)\n", this, ret
, off
, way
, mode
);
2263 if(!basic_filebuf_char_is_open(this) || !basic_filebuf_char__Endwrite(this)
2264 || fseek(this->file
, off
, way
)) {
2271 fgetpos(this->file
, &pos
);
2274 ret
->state
= this->state
;
2278 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2279 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2280 #define call_basic_filebuf_char_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 40, \
2281 fpos_int*, (basic_filebuf_char*, fpos_int*, fpos_int, mode), (this, ret, pos, mode))
2282 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekpos
, 36)
2283 fpos_int
* __thiscall
basic_filebuf_char_seekpos(basic_filebuf_char
*this,
2284 fpos_int
*ret
, fpos_int pos
, int mode
)
2288 TRACE("(%p %p %s %d)\n", this, ret
, debugstr_fpos_int(&pos
), mode
);
2290 if(!basic_filebuf_char_is_open(this) || !basic_filebuf_char__Endwrite(this)
2291 || fseek(this->file
, (LONG
)pos
.pos
, SEEK_SET
)
2292 || (pos
.off
&& fseek(this->file
, pos
.off
, SEEK_CUR
))) {
2299 fgetpos(this->file
, &fpos
);
2302 ret
->state
= this->state
;
2306 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PADH@Z */
2307 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAD_J@Z */
2308 #define call_basic_filebuf_char_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 44, \
2309 basic_streambuf_char*, (basic_filebuf_char*, char*, streamsize), (this, buf, count))
2310 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_setbuf
, 12)
2311 basic_streambuf_char
* __thiscall
basic_filebuf_char_setbuf(basic_filebuf_char
*this, char *buf
, streamsize count
)
2313 TRACE("(%p %p %ld)\n", this, buf
, count
);
2315 if(!basic_filebuf_char_is_open(this))
2318 if(setvbuf(this->file
, buf
, (buf
==NULL
&& count
==0) ? _IONBF
: _IOFBF
, count
))
2321 basic_filebuf_char__Init(this, this->file
, INITFL_open
);
2325 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2326 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2327 #define call_basic_filebuf_char_sync(this) CALL_VTBL_FUNC(this, 48, \
2328 int, (basic_filebuf_char*), (this))
2329 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_sync
, 4)
2330 int __thiscall
basic_filebuf_char_sync(basic_filebuf_char
*this)
2332 TRACE("(%p)\n", this);
2334 if(!basic_filebuf_char_is_open(this))
2337 if(call_basic_filebuf_char_overflow(this, EOF
) == EOF
)
2339 return fflush(this->file
);
2342 /* ?imbue@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
2343 /* ?imbue@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */
2344 #define call_basic_filebuf_char_imbue(this, loc) CALL_VTBL_FUNC(this, 52, \
2345 void, (basic_filebuf_char*, const locale*), (this, loc))
2346 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_imbue
, 8)
2347 void __thiscall
basic_filebuf_char_imbue(basic_filebuf_char
*this, const locale
*loc
)
2349 TRACE("(%p %p)\n", this, loc
);
2350 basic_filebuf_char__Initcvt(this, codecvt_char_use_facet(loc
));
2353 /* ??0ios_base@std@@IAE@XZ */
2354 /* ??0ios_base@std@@IEAA@XZ */
2355 DEFINE_THISCALL_WRAPPER(ios_base_ctor
, 4)
2356 ios_base
* __thiscall
ios_base_ctor(ios_base
*this)
2358 TRACE("(%p)\n", this);
2359 this->vtable
= &MSVCP_ios_base_vtable
;
2363 /* ??0ios_base@std@@QAE@ABV01@@Z */
2364 /* ??0ios_base@std@@QEAA@AEBV01@@Z */
2365 DEFINE_THISCALL_WRAPPER(ios_base_copy_ctor
, 8)
2366 ios_base
* __thiscall
ios_base_copy_ctor(ios_base
*this, const ios_base
*copy
)
2368 TRACE("(%p %p)\n", this, copy
);
2370 this->vtable
= &MSVCP_ios_base_vtable
;
2374 /* ?_Callfns@ios_base@std@@AAEXW4event@12@@Z */
2375 /* ?_Callfns@ios_base@std@@AEAAXW4event@12@@Z */
2376 DEFINE_THISCALL_WRAPPER(ios_base_Callfns
, 8)
2377 void __thiscall
ios_base_Callfns(ios_base
*this, IOS_BASE_event event
)
2379 IOS_BASE_fnarray
*cur
;
2381 TRACE("(%p %x)\n", this, event
);
2383 for(cur
=this->calls
; cur
; cur
=cur
->next
)
2384 cur
->event_handler(event
, this, cur
->index
);
2387 /* ?_Tidy@ios_base@std@@AAAXXZ */
2388 /* ?_Tidy@ios_base@std@@AEAAXXZ */
2389 void CDECL
ios_base_Tidy(ios_base
*this)
2391 IOS_BASE_iosarray
*arr_cur
, *arr_next
;
2392 IOS_BASE_fnarray
*event_cur
, *event_next
;
2394 TRACE("(%p)\n", this);
2396 ios_base_Callfns(this, EVENT_erase_event
);
2398 for(arr_cur
=this->arr
; arr_cur
; arr_cur
=arr_next
) {
2399 arr_next
= arr_cur
->next
;
2400 MSVCRT_operator_delete(arr_cur
);
2404 for(event_cur
=this->calls
; event_cur
; event_cur
=event_next
) {
2405 event_next
= event_cur
->next
;
2406 MSVCRT_operator_delete(event_cur
);
2411 /* ?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z */
2412 /* ?_Ios_base_dtor@ios_base@std@@CAXPEAV12@@Z */
2413 void CDECL
ios_base_Ios_base_dtor(ios_base
*obj
)
2415 TRACE("(%p)\n", obj
);
2417 locale_dtor(obj
->loc
);
2418 MSVCRT_operator_delete(obj
->loc
);
2423 /* ??1ios_base@std@@UAE@XZ */
2424 /* ??1ios_base@std@@UEAA@XZ */
2425 DEFINE_THISCALL_WRAPPER(ios_base_dtor
, 4)
2426 void __thiscall
ios_base_dtor(ios_base
*this)
2428 ios_base_Ios_base_dtor(this);
2431 DEFINE_THISCALL_WRAPPER(MSVCP_ios_base_vector_dtor
, 8)
2432 ios_base
* __thiscall
MSVCP_ios_base_vector_dtor(ios_base
*this, unsigned int flags
)
2434 TRACE("(%p %x)\n", this, flags
);
2436 /* we have an array, with the number of elements stored before the first object */
2437 int i
, *ptr
= (int *)this-1;
2439 for(i
=*ptr
-1; i
>=0; i
--)
2440 ios_base_dtor(this+i
);
2441 MSVCRT_operator_delete(ptr
);
2443 ios_base_dtor(this);
2445 MSVCRT_operator_delete(this);
2451 DEFINE_THISCALL_WRAPPER(MSVCP_iosb_vector_dtor
, 8)
2452 void* __thiscall
MSVCP_iosb_vector_dtor(void *this, unsigned int flags
)
2454 TRACE("(%p %x)\n", this, flags
);
2456 int *ptr
= (int *)this-1;
2457 MSVCRT_operator_delete(ptr
);
2460 MSVCRT_operator_delete(this);
2466 /* ?_Findarr@ios_base@std@@AAEAAU_Iosarray@12@H@Z */
2467 /* ?_Findarr@ios_base@std@@AEAAAEAU_Iosarray@12@H@Z */
2468 DEFINE_THISCALL_WRAPPER(ios_base_Findarr
, 8)
2469 IOS_BASE_iosarray
* __thiscall
ios_base_Findarr(ios_base
*this, int index
)
2471 IOS_BASE_iosarray
*p
;
2473 TRACE("(%p %d)\n", this, index
);
2475 for(p
=this->arr
; p
; p
=p
->next
) {
2476 if(p
->index
== index
)
2480 for(p
=this->arr
; p
; p
=p
->next
) {
2481 if(!p
->long_val
&& !p
->ptr_val
) {
2487 p
= MSVCRT_operator_new(sizeof(IOS_BASE_iosarray
));
2488 p
->next
= this->arr
;
2496 /* ?iword@ios_base@std@@QAEAAJH@Z */
2497 /* ?iword@ios_base@std@@QEAAAEAJH@Z */
2498 DEFINE_THISCALL_WRAPPER(ios_base_iword
, 8)
2499 LONG
* __thiscall
ios_base_iword(ios_base
*this, int index
)
2501 TRACE("(%p %d)\n", this, index
);
2502 return &ios_base_Findarr(this, index
)->long_val
;
2505 /* ?pword@ios_base@std@@QAEAAPAXH@Z */
2506 /* ?pword@ios_base@std@@QEAAAEAPEAXH@Z */
2507 DEFINE_THISCALL_WRAPPER(ios_base_pword
, 8)
2508 void** __thiscall
ios_base_pword(ios_base
*this, int index
)
2510 TRACE("(%p %d)\n", this, index
);
2511 return &ios_base_Findarr(this, index
)->ptr_val
;
2514 /* ?register_callback@ios_base@std@@QAEXP6AXW4event@12@AAV12@H@ZH@Z */
2515 /* ?register_callback@ios_base@std@@QEAAXP6AXW4event@12@AEAV12@H@ZH@Z */
2516 DEFINE_THISCALL_WRAPPER(ios_base_register_callback
, 12)
2517 void __thiscall
ios_base_register_callback(ios_base
*this, IOS_BASE_event_callback callback
, int index
)
2519 IOS_BASE_fnarray
*event
;
2521 TRACE("(%p %p %d)\n", this, callback
, index
);
2523 event
= MSVCRT_operator_new(sizeof(IOS_BASE_fnarray
));
2524 event
->next
= this->calls
;
2525 event
->index
= index
;
2526 event
->event_handler
= callback
;
2527 this->calls
= event
;
2530 /* ?clear@ios_base@std@@QAEXH_N@Z */
2531 /* ?clear@ios_base@std@@QEAAXH_N@Z */
2532 DEFINE_THISCALL_WRAPPER(ios_base_clear_reraise
, 12)
2533 void __thiscall
ios_base_clear_reraise(ios_base
*this, IOSB_iostate state
, MSVCP_bool reraise
)
2535 TRACE("(%p %x %x)\n", this, state
, reraise
);
2537 this->state
= state
& IOSTATE_mask
;
2538 if(!(this->state
& this->except
))
2542 throw_exception(EXCEPTION_RERAISE
, NULL
);
2543 else if(this->state
& this->except
& IOSTATE_eofbit
)
2544 throw_exception(EXCEPTION_FAILURE
, "eofbit is set");
2545 else if(this->state
& this->except
& IOSTATE_failbit
)
2546 throw_exception(EXCEPTION_FAILURE
, "failbit is set");
2547 else if(this->state
& this->except
& IOSTATE_badbit
)
2548 throw_exception(EXCEPTION_FAILURE
, "badbit is set");
2549 else if(this->state
& this->except
& IOSTATE__Hardfail
)
2550 throw_exception(EXCEPTION_FAILURE
, "_Hardfail is set");
2553 /* ?clear@ios_base@std@@QAEXH@Z */
2554 /* ?clear@ios_base@std@@QEAAXH@Z */
2555 DEFINE_THISCALL_WRAPPER(ios_base_clear
, 8)
2556 void __thiscall
ios_base_clear(ios_base
*this, IOSB_iostate state
)
2558 ios_base_clear_reraise(this, state
, FALSE
);
2561 /* ?clear@ios_base@std@@QAEXI@Z */
2562 /* ?clear@ios_base@std@@QEAAXI@Z */
2563 DEFINE_THISCALL_WRAPPER(ios_base_clear_unsigned
, 8)
2564 void __thiscall
ios_base_clear_unsigned(ios_base
*this, unsigned int state
)
2566 ios_base_clear_reraise(this, (IOSB_iostate
)state
, FALSE
);
2569 /* ?exceptions@ios_base@std@@QAEXH@Z */
2570 /* ?exceptions@ios_base@std@@QEAAXH@Z */
2571 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_set
, 8)
2572 void __thiscall
ios_base_exceptions_set(ios_base
*this, IOSB_iostate state
)
2574 TRACE("(%p %x)\n", this, state
);
2575 this->except
= state
& IOSTATE_mask
;
2576 ios_base_clear(this, this->state
);
2579 /* ?exceptions@ios_base@std@@QAEXI@Z */
2580 /* ?exceptions@ios_base@std@@QEAAXI@Z */
2581 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_set_unsigned
, 8)
2582 void __thiscall
ios_base_exceptions_set_unsigned(ios_base
*this, unsigned int state
)
2584 TRACE("(%p %x)\n", this, state
);
2585 ios_base_exceptions_set(this, state
);
2588 /* ?exceptions@ios_base@std@@QBEHXZ */
2589 /* ?exceptions@ios_base@std@@QEBAHXZ */
2590 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_get
, 4)
2591 IOSB_iostate __thiscall
ios_base_exceptions_get(ios_base
*this)
2593 TRACE("(%p)\n", this);
2594 return this->except
;
2597 /* ?copyfmt@ios_base@std@@QAEAAV12@ABV12@@Z */
2598 /* ?copyfmt@ios_base@std@@QEAAAEAV12@AEBV12@@Z */
2599 DEFINE_THISCALL_WRAPPER(ios_base_copyfmt
, 8)
2600 ios_base
* __thiscall
ios_base_copyfmt(ios_base
*this, const ios_base
*rhs
)
2602 TRACE("(%p %p)\n", this, rhs
);
2605 IOS_BASE_iosarray
*arr_cur
;
2606 IOS_BASE_fnarray
*event_cur
;
2608 ios_base_Tidy(this);
2610 for(arr_cur
=rhs
->arr
; arr_cur
; arr_cur
=arr_cur
->next
) {
2611 if(arr_cur
->long_val
)
2612 *ios_base_iword(this, arr_cur
->index
) = arr_cur
->long_val
;
2613 if(arr_cur
->ptr_val
)
2614 *ios_base_pword(this, arr_cur
->index
) = arr_cur
->ptr_val
;
2616 this->stdstr
= rhs
->stdstr
;
2617 this->fmtfl
= rhs
->fmtfl
;
2618 this->prec
= rhs
->prec
;
2619 this->wide
= rhs
->wide
;
2620 locale_operator_assign(this->loc
, rhs
->loc
);
2622 for(event_cur
=rhs
->calls
; event_cur
; event_cur
=event_cur
->next
)
2623 ios_base_register_callback(this, event_cur
->event_handler
, event_cur
->index
);
2625 ios_base_Callfns(this, EVENT_copyfmt_event
);
2626 ios_base_exceptions_set(this, rhs
->except
);
2632 /* ??4ios_base@std@@QAEAAV01@ABV01@@Z */
2633 /* ??4ios_base@std@@QEAAAEAV01@AEBV01@@Z */
2634 DEFINE_THISCALL_WRAPPER(ios_base_assign
, 8)
2635 ios_base
* __thiscall
ios_base_assign(ios_base
*this, const ios_base
*right
)
2637 TRACE("(%p %p)\n", this, right
);
2640 this->state
= right
->state
;
2641 ios_base_copyfmt(this, right
);
2647 /* ?fail@ios_base@std@@QBE_NXZ */
2648 /* ?fail@ios_base@std@@QEBA_NXZ */
2649 DEFINE_THISCALL_WRAPPER(ios_base_fail
, 4)
2650 MSVCP_bool __thiscall
ios_base_fail(const ios_base
*this)
2652 TRACE("(%p)\n", this);
2653 return (this->state
& (IOSTATE_failbit
|IOSTATE_badbit
)) != 0;
2656 /* ??7ios_base@std@@QBE_NXZ */
2657 /* ??7ios_base@std@@QEBA_NXZ */
2658 DEFINE_THISCALL_WRAPPER(ios_base_op_succ
, 4)
2659 MSVCP_bool __thiscall
ios_base_op_succ(const ios_base
*this)
2661 TRACE("(%p)\n", this);
2662 return ios_base_fail(this);
2665 /* ??Bios_base@std@@QBEPAXXZ */
2666 /* ??Bios_base@std@@QEBAPEAXXZ */
2667 DEFINE_THISCALL_WRAPPER(ios_base_op_fail
, 4)
2668 void* __thiscall
ios_base_op_fail(const ios_base
*this)
2670 TRACE("(%p)\n", this);
2671 return ios_base_fail(this) ? NULL
: (void*)this;
2674 /* ?_Addstd@ios_base@std@@SAXPAV12@@Z */
2675 /* ?_Addstd@ios_base@std@@SAXPEAV12@@Z */
2676 void CDECL
ios_base_Addstd(ios_base
*add
)
2678 FIXME("(%p) stub\n", add
);
2681 /* ?_Index_func@ios_base@std@@CAAAHXZ */
2682 /* ?_Index_func@ios_base@std@@CAAEAHXZ */
2683 int* CDECL
ios_base_Index_func(void)
2686 return &ios_base_Index
;
2689 /* ?_Init@ios_base@std@@IAEXXZ */
2690 /* ?_Init@ios_base@std@@IEAAXXZ */
2691 DEFINE_THISCALL_WRAPPER(ios_base_Init
, 4)
2692 void __thiscall
ios_base_Init(ios_base
*this)
2694 TRACE("(%p)\n", this);
2697 this->state
= this->except
= IOSTATE_goodbit
;
2698 this->fmtfl
= FMTFLAG_skipws
| FMTFLAG_dec
;
2703 this->loc
= MSVCRT_operator_new(sizeof(locale
));
2704 locale_ctor(this->loc
);
2707 /* ?_Sync_func@ios_base@std@@CAAA_NXZ */
2708 /* ?_Sync_func@ios_base@std@@CAAEA_NXZ */
2709 MSVCP_bool
* CDECL
ios_base_Sync_func(void)
2712 return &ios_base_Sync
;
2715 /* ?bad@ios_base@std@@QBE_NXZ */
2716 /* ?bad@ios_base@std@@QEBA_NXZ */
2717 DEFINE_THISCALL_WRAPPER(ios_base_bad
, 4)
2718 MSVCP_bool __thiscall
ios_base_bad(const ios_base
*this)
2720 TRACE("(%p)\n", this);
2721 return (this->state
& IOSTATE_badbit
) != 0;
2724 /* ?eof@ios_base@std@@QBE_NXZ */
2725 /* ?eof@ios_base@std@@QEBA_NXZ */
2726 DEFINE_THISCALL_WRAPPER(ios_base_eof
, 4)
2727 MSVCP_bool __thiscall
ios_base_eof(const ios_base
*this)
2729 TRACE("(%p)\n", this);
2730 return (this->state
& IOSTATE_eofbit
) != 0;
2733 /* ?flags@ios_base@std@@QAEHH@Z */
2734 /* ?flags@ios_base@std@@QEAAHH@Z */
2735 DEFINE_THISCALL_WRAPPER(ios_base_flags_set
, 8)
2736 IOSB_fmtflags __thiscall
ios_base_flags_set(ios_base
*this, IOSB_fmtflags flags
)
2738 IOSB_fmtflags ret
= this->fmtfl
;
2740 TRACE("(%p %x)\n", this, flags
);
2742 this->fmtfl
= flags
& FMTFLAG_mask
;
2746 /* ?flags@ios_base@std@@QBEHXZ */
2747 /* ?flags@ios_base@std@@QEBAHXZ */
2748 DEFINE_THISCALL_WRAPPER(ios_base_flags_get
, 4)
2749 IOSB_fmtflags __thiscall
ios_base_flags_get(const ios_base
*this)
2751 TRACE("(%p)\n", this);
2755 /* ?getloc@ios_base@std@@QBE?AVlocale@2@XZ */
2756 /* ?getloc@ios_base@std@@QEBA?AVlocale@2@XZ */
2757 DEFINE_THISCALL_WRAPPER(ios_base_getloc
, 8)
2758 locale
* __thiscall
ios_base_getloc(const ios_base
*this, locale
*ret
)
2760 TRACE("(%p)\n", this);
2761 return locale_copy_ctor(ret
, this->loc
);
2764 /* ?good@ios_base@std@@QBE_NXZ */
2765 /* ?good@ios_base@std@@QEBA_NXZ */
2766 DEFINE_THISCALL_WRAPPER(ios_base_good
, 4)
2767 MSVCP_bool __thiscall
ios_base_good(const ios_base
*this)
2769 TRACE("(%p)\n", this);
2770 return this->state
== IOSTATE_goodbit
;
2773 /* ?imbue@ios_base@std@@QAE?AVlocale@2@ABV32@@Z */
2774 /* ?imbue@ios_base@std@@QEAA?AVlocale@2@AEBV32@@Z */
2775 DEFINE_THISCALL_WRAPPER(ios_base_imbue
, 12)
2776 locale
* __thiscall
ios_base_imbue(ios_base
*this, locale
*ret
, const locale
*loc
)
2778 TRACE("(%p %p)\n", this, loc
);
2780 locale_copy_ctor(this->loc
, loc
);
2784 /* ?precision@ios_base@std@@QAEHH@Z */
2785 /* ?precision@ios_base@std@@QEAA_J_J@Z */
2786 DEFINE_THISCALL_WRAPPER(ios_base_precision_set
, 8)
2787 streamsize __thiscall
ios_base_precision_set(ios_base
*this, streamsize precision
)
2789 streamsize ret
= this->prec
;
2791 TRACE("(%p %ld)\n", this, precision
);
2793 this->prec
= precision
;
2797 /* ?precision@ios_base@std@@QBEHXZ */
2798 /* ?precision@ios_base@std@@QEBA_JXZ */
2799 DEFINE_THISCALL_WRAPPER(ios_base_precision_get
, 4)
2800 streamsize __thiscall
ios_base_precision_get(const ios_base
*this)
2802 TRACE("(%p)\n", this);
2806 /* ?rdstate@ios_base@std@@QBEHXZ */
2807 /* ?rdstate@ios_base@std@@QEBAHXZ */
2808 DEFINE_THISCALL_WRAPPER(ios_base_rdstate
, 4)
2809 IOSB_iostate __thiscall
ios_base_rdstate(const ios_base
*this)
2811 TRACE("(%p)\n", this);
2815 /* ?setf@ios_base@std@@QAEHHH@Z */
2816 /* ?setf@ios_base@std@@QEAAHHH@Z */
2817 DEFINE_THISCALL_WRAPPER(ios_base_setf_mask
, 12)
2818 IOSB_fmtflags __thiscall
ios_base_setf_mask(ios_base
*this, IOSB_fmtflags flags
, IOSB_fmtflags mask
)
2820 IOSB_fmtflags ret
= this->fmtfl
;
2822 TRACE("(%p %x %x)\n", this, flags
, mask
);
2824 this->fmtfl
= (this->fmtfl
& (~mask
)) | (flags
& mask
& FMTFLAG_mask
);
2828 /* ?setf@ios_base@std@@QAEHH@Z */
2829 /* ?setf@ios_base@std@@QEAAHH@Z */
2830 DEFINE_THISCALL_WRAPPER(ios_base_setf
, 8)
2831 IOSB_fmtflags __thiscall
ios_base_setf(ios_base
*this, IOSB_fmtflags flags
)
2833 return ios_base_setf_mask(this, flags
, ~0);
2836 /* ?setstate@ios_base@std@@QAEXH_N@Z */
2837 /* ?setstate@ios_base@std@@QEAAXH_N@Z */
2838 DEFINE_THISCALL_WRAPPER(ios_base_setstate_reraise
, 12)
2839 void __thiscall
ios_base_setstate_reraise(ios_base
*this, IOSB_iostate state
, MSVCP_bool reraise
)
2841 TRACE("(%p %x %x)\n", this, state
, reraise
);
2843 if(state
!= IOSTATE_goodbit
)
2844 ios_base_clear_reraise(this, this->state
| state
, reraise
);
2847 /* ?setstate@ios_base@std@@QAEXH@Z */
2848 /* ?setstate@ios_base@std@@QEAAXH@Z */
2849 DEFINE_THISCALL_WRAPPER(ios_base_setstate
, 8)
2850 void __thiscall
ios_base_setstate(ios_base
*this, IOSB_iostate state
)
2852 ios_base_setstate_reraise(this, state
, FALSE
);
2855 /* ?setstate@ios_base@std@@QAEXI@Z */
2856 /* ?setstate@ios_base@std@@QEAAXI@Z */
2857 DEFINE_THISCALL_WRAPPER(ios_base_setstate_unsigned
, 8)
2858 void __thiscall
ios_base_setstate_unsigned(ios_base
*this, unsigned int state
)
2860 ios_base_setstate_reraise(this, (IOSB_iostate
)state
, FALSE
);
2863 /* ?sync_with_stdio@ios_base@std@@SA_N_N@Z */
2864 MSVCP_bool CDECL
ios_base_sync_with_stdio(MSVCP_bool sync
)
2869 TRACE("(%x)\n", sync
);
2871 _Lockit_ctor_locktype(&lock
, _LOCK_STREAM
);
2872 ret
= ios_base_Sync
;
2873 ios_base_Sync
= sync
;
2874 _Lockit_dtor(&lock
);
2878 /* ?unsetf@ios_base@std@@QAEXH@Z */
2879 /* ?unsetf@ios_base@std@@QEAAXH@Z */
2880 DEFINE_THISCALL_WRAPPER(ios_base_unsetf
, 8)
2881 void __thiscall
ios_base_unsetf(ios_base
*this, IOSB_fmtflags flags
)
2883 TRACE("(%p %x)\n", this, flags
);
2884 this->fmtfl
&= ~flags
;
2887 /* ?width@ios_base@std@@QAEHH@Z */
2888 /* ?width@ios_base@std@@QEAA_J_J@Z */
2889 DEFINE_THISCALL_WRAPPER(ios_base_width_set
, 8)
2890 streamsize __thiscall
ios_base_width_set(ios_base
*this, streamsize width
)
2892 streamsize ret
= this->wide
;
2894 TRACE("(%p %ld)\n", this, width
);
2900 /* ?width@ios_base@std@@QBEHXZ */
2901 /* ?width@ios_base@std@@QEBA_JXZ */
2902 DEFINE_THISCALL_WRAPPER(ios_base_width_get
, 4)
2903 streamsize __thiscall
ios_base_width_get(ios_base
*this)
2905 TRACE("(%p)\n", this);
2909 /* ?xalloc@ios_base@std@@SAHXZ */
2910 int CDECL
ios_base_xalloc(void)
2917 _Lockit_ctor_locktype(&lock
, _LOCK_STREAM
);
2918 ret
= ios_base_Index
++;
2919 _Lockit_dtor(&lock
);
2923 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IAE@XZ */
2924 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IEAA@XZ */
2925 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor
, 4)
2926 basic_ios_char
* __thiscall
basic_ios_char_ctor(basic_ios_char
*this)
2928 TRACE("(%p)\n", this);
2930 ios_base_ctor(&this->base
);
2931 this->base
.vtable
= &MSVCP_basic_ios_char_vtable
;
2935 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IAEXPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
2936 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
2937 DEFINE_THISCALL_WRAPPER(basic_ios_char_init
, 12)
2938 void __thiscall
basic_ios_char_init(basic_ios_char
*this, basic_streambuf_char
*streambuf
, MSVCP_bool isstd
)
2940 TRACE("(%p %p %x)\n", this, streambuf
, isstd
);
2941 ios_base_Init(&this->base
);
2942 this->strbuf
= streambuf
;
2943 this->stream
= NULL
;
2947 ios_base_setstate(&this->base
, IOSTATE_badbit
);
2950 FIXME("standard streams not handled yet\n");
2953 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
2954 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
2955 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor_streambuf
, 8)
2956 basic_ios_char
* __thiscall
basic_ios_char_ctor_streambuf(basic_ios_char
*this, basic_streambuf_char
*strbuf
)
2958 TRACE("(%p %p)\n", this, strbuf
);
2960 basic_ios_char_ctor(this);
2961 basic_ios_char_init(this, strbuf
, FALSE
);
2965 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UAE@XZ */
2966 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UEAA@XZ */
2967 DEFINE_THISCALL_WRAPPER(basic_ios_char_dtor
, 4)
2968 void __thiscall
basic_ios_char_dtor(basic_ios_char
*this)
2970 TRACE("(%p)\n", this);
2971 ios_base_dtor(&this->base
);
2974 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ios_char_vector_dtor
, 8)
2975 basic_ios_char
* __thiscall
MSVCP_basic_ios_char_vector_dtor(basic_ios_char
*this, unsigned int flags
)
2977 TRACE("(%p %x)\n", this, flags
);
2979 /* we have an array, with the number of elements stored before the first object */
2980 int i
, *ptr
= (int *)this-1;
2982 for(i
=*ptr
-1; i
>=0; i
--)
2983 basic_ios_char_dtor(this+i
);
2984 MSVCRT_operator_delete(ptr
);
2986 basic_ios_char_dtor(this);
2988 MSVCRT_operator_delete(this);
2994 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
2995 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
2996 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear_reraise
, 12)
2997 void __thiscall
basic_ios_char_clear_reraise(basic_ios_char
*this, IOSB_iostate state
, MSVCP_bool reraise
)
2999 TRACE("(%p %x %x)\n", this, state
, reraise
);
3000 ios_base_clear_reraise(&this->base
, state
| (this->strbuf
? IOSTATE_goodbit
: IOSTATE_badbit
), reraise
);
3003 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
3004 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
3005 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear
, 8)
3006 void __thiscall
basic_ios_char_clear(basic_ios_char
*this, unsigned int state
)
3008 basic_ios_char_clear_reraise(this, (IOSB_iostate
)state
, FALSE
);
3011 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEAAV12@ABV12@@Z */
3012 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEBV12@@Z */
3013 DEFINE_THISCALL_WRAPPER(basic_ios_char_copyfmt
, 8)
3014 basic_ios_char
* __thiscall
basic_ios_char_copyfmt(basic_ios_char
*this, basic_ios_char
*copy
)
3016 TRACE("(%p %p)\n", this, copy
);
3020 this->stream
= copy
->stream
;
3021 this->fillch
= copy
->fillch
;
3022 ios_base_copyfmt(&this->base
, ©
->base
);
3026 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEDD@Z */
3027 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAADD@Z */
3028 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_set
, 8)
3029 char __thiscall
basic_ios_char_fill_set(basic_ios_char
*this, char fill
)
3031 char ret
= this->fillch
;
3033 TRACE("(%p %c)\n", this, fill
);
3035 this->fillch
= fill
;
3039 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDXZ */
3040 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADXZ */
3041 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_get
, 4)
3042 char __thiscall
basic_ios_char_fill_get(basic_ios_char
*this)
3044 TRACE("(%p)\n", this);
3045 return this->fillch
;
3048 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
3049 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
3050 DEFINE_THISCALL_WRAPPER(basic_ios_char_imbue
, 12)
3051 locale
*__thiscall
basic_ios_char_imbue(basic_ios_char
*this, locale
*ret
, const locale
*loc
)
3053 TRACE("(%p %p %p)\n", this, ret
, loc
);
3056 basic_streambuf_char_pubimbue(this->strbuf
, ret
, loc
);
3060 return ios_base_imbue(&this->base
, ret
, loc
);
3063 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDDD@Z */
3064 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADDD@Z */
3065 DEFINE_THISCALL_WRAPPER(basic_ios_char_narrow
, 12)
3066 char __thiscall
basic_ios_char_narrow(basic_ios_char
*this, char ch
, char def
)
3068 TRACE("(%p %c %c)\n", this, ch
, def
);
3069 return ctype_char_narrow_ch(ctype_char_use_facet(this->strbuf
->loc
), ch
, def
);
3072 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PAV32@@Z */
3073 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAV32@@Z */
3074 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_set
, 8)
3075 basic_streambuf_char
* __thiscall
basic_ios_char_rdbuf_set(basic_ios_char
*this, basic_streambuf_char
*streambuf
)
3077 basic_streambuf_char
*ret
= this->strbuf
;
3079 TRACE("(%p %p)\n", this, streambuf
);
3081 this->strbuf
= streambuf
;
3082 basic_ios_char_clear(this, IOSTATE_goodbit
);
3086 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
3087 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
3088 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_get
, 4)
3089 basic_streambuf_char
* __thiscall
basic_ios_char_rdbuf_get(const basic_ios_char
*this)
3091 TRACE("(%p)\n", this);
3092 return this->strbuf
;
3095 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
3096 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
3097 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate_reraise
, 12)
3098 void __thiscall
basic_ios_char_setstate_reraise(basic_ios_char
*this, IOSB_iostate state
, MSVCP_bool reraise
)
3100 TRACE("(%p %x %x)\n", this, state
, reraise
);
3102 if(state
!= IOSTATE_goodbit
)
3103 basic_ios_char_clear_reraise(this, this->base
.state
| state
, reraise
);
3106 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
3107 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
3108 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate
, 8)
3109 void __thiscall
basic_ios_char_setstate(basic_ios_char
*this, unsigned int state
)
3111 basic_ios_char_setstate_reraise(this, (IOSB_iostate
)state
, FALSE
);
3114 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@PAV32@@Z */
3115 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@PEAV32@@Z */
3116 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_set
, 8)
3117 basic_ostream_char
* __thiscall
basic_ios_char_tie_set(basic_ios_char
*this, basic_ostream_char
*ostream
)
3119 basic_ostream_char
*ret
= this->stream
;
3121 TRACE("(%p %p)\n", this, ostream
);
3123 this->stream
= ostream
;
3127 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
3128 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
3129 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_get
, 4)
3130 basic_ostream_char
* __thiscall
basic_ios_char_tie_get(const basic_ios_char
*this)
3132 TRACE("(%p)\n", this);
3133 return this->stream
;
3136 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDD@Z */
3137 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADD@Z */
3138 DEFINE_THISCALL_WRAPPER(basic_ios_char_widen
, 8)
3139 char __thiscall
basic_ios_char_widen(basic_ios_char
*this, char ch
)
3141 TRACE("(%p %c)\n", this, ch
);
3142 return ctype_char_widen_ch(ctype_char_use_facet(this->strbuf
->loc
), ch
);
3146 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAE@XZ */
3147 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */
3148 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_ctor
, 4)
3149 basic_ios_wchar
* __thiscall
basic_ios_wchar_ctor(basic_ios_wchar
*this)
3151 TRACE("(%p)\n", this);
3153 ios_base_ctor(&this->base
);
3154 this->base
.vtable
= &MSVCP_basic_ios_wchar_vtable
;
3158 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IAE@XZ */
3159 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IEAA@XZ */
3160 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor
, 4)
3161 basic_ios_wchar
* __thiscall
basic_ios_short_ctor(basic_ios_wchar
*this)
3163 basic_ios_wchar_ctor(this);
3164 this->base
.vtable
= &MSVCP_basic_ios_short_vtable
;
3168 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAEXPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
3169 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAAXPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
3170 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IAEXPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
3171 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IEAAXPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
3172 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_init
, 12)
3173 void __thiscall
basic_ios_wchar_init(basic_ios_wchar
*this, basic_streambuf_wchar
*streambuf
, MSVCP_bool isstd
)
3175 TRACE("(%p %p %x)\n", this, streambuf
, isstd
);
3176 ios_base_Init(&this->base
);
3177 this->strbuf
= streambuf
;
3178 this->stream
= NULL
;
3182 ios_base_setstate(&this->base
, IOSTATE_badbit
);
3185 FIXME("standard streams not handled yet\n");
3188 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
3189 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
3190 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_ctor_streambuf
, 8)
3191 basic_ios_wchar
* __thiscall
basic_ios_wchar_ctor_streambuf(basic_ios_wchar
*this, basic_streambuf_wchar
*strbuf
)
3193 TRACE("(%p %p)\n", this, strbuf
);
3195 basic_ios_wchar_ctor(this);
3196 basic_ios_wchar_init(this, strbuf
, FALSE
);
3200 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
3201 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
3202 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor_streambuf
, 8)
3203 basic_ios_wchar
* __thiscall
basic_ios_short_ctor_streambuf(basic_ios_wchar
*this, basic_streambuf_wchar
*strbuf
)
3205 basic_ios_wchar_ctor_streambuf(this, strbuf
);
3206 this->base
.vtable
= &MSVCP_basic_ios_short_vtable
;
3210 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
3211 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
3212 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UAE@XZ */
3213 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UEAA@XZ */
3214 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_dtor
, 4)
3215 void __thiscall
basic_ios_wchar_dtor(basic_ios_wchar
*this)
3217 TRACE("(%p)\n", this);
3218 ios_base_dtor(&this->base
);
3221 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ios_wchar_vector_dtor
, 8)
3222 basic_ios_wchar
* __thiscall
MSVCP_basic_ios_wchar_vector_dtor(basic_ios_wchar
*this, unsigned int flags
)
3224 TRACE("(%p %x)\n", this, flags
);
3226 /* we have an array, with the number of elements stored before the first object */
3227 int i
, *ptr
= (int *)this-1;
3229 for(i
=*ptr
-1; i
>=0; i
--)
3230 basic_ios_wchar_dtor(this+i
);
3231 MSVCRT_operator_delete(ptr
);
3233 basic_ios_wchar_dtor(this);
3235 MSVCRT_operator_delete(this);
3241 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ios_short_vector_dtor
, 8)
3242 basic_ios_wchar
* __thiscall
MSVCP_basic_ios_short_vector_dtor(basic_ios_wchar
*this, unsigned int flags
)
3244 return MSVCP_basic_ios_wchar_vector_dtor(this, flags
);
3247 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
3248 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
3249 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
3250 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
3251 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_clear_reraise
, 12)
3252 void __thiscall
basic_ios_wchar_clear_reraise(basic_ios_wchar
*this, IOSB_iostate state
, MSVCP_bool reraise
)
3254 TRACE("(%p %x %x)\n", this, state
, reraise
);
3255 ios_base_clear_reraise(&this->base
, state
| (this->strbuf
? IOSTATE_goodbit
: IOSTATE_badbit
), reraise
);
3258 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
3259 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
3260 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
3261 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
3262 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_clear
, 8)
3263 void __thiscall
basic_ios_wchar_clear(basic_ios_wchar
*this, unsigned int state
)
3265 basic_ios_wchar_clear_reraise(this, (IOSB_iostate
)state
, FALSE
);
3268 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEAAV12@ABV12@@Z */
3269 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEBV12@@Z */
3270 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEAAV12@ABV12@@Z */
3271 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEBV12@@Z */
3272 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_copyfmt
, 8)
3273 basic_ios_wchar
* __thiscall
basic_ios_wchar_copyfmt(basic_ios_wchar
*this, basic_ios_wchar
*copy
)
3275 TRACE("(%p %p)\n", this, copy
);
3279 this->stream
= copy
->stream
;
3280 this->fillch
= copy
->fillch
;
3281 ios_base_copyfmt(&this->base
, ©
->base
);
3285 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE_W_W@Z */
3286 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA_W_W@Z */
3287 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEGG@Z */
3288 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
3289 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_set
, 8)
3290 wchar_t __thiscall
basic_ios_wchar_fill_set(basic_ios_wchar
*this, wchar_t fill
)
3292 wchar_t ret
= this->fillch
;
3294 TRACE("(%p %c)\n", this, fill
);
3296 this->fillch
= fill
;
3300 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WXZ */
3301 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WXZ */
3302 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGXZ */
3303 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGXZ */
3304 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_get
, 4)
3305 wchar_t __thiscall
basic_ios_wchar_fill_get(basic_ios_wchar
*this)
3307 TRACE("(%p)\n", this);
3308 return this->fillch
;
3311 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
3312 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
3313 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
3314 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
3315 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_imbue
, 12)
3316 locale
*__thiscall
basic_ios_wchar_imbue(basic_ios_wchar
*this, locale
*ret
, const locale
*loc
)
3318 TRACE("(%p %p %p)\n", this, ret
, loc
);
3321 return basic_streambuf_wchar_pubimbue(this->strbuf
, ret
, loc
);
3323 locale_copy_ctor(ret
, loc
);
3327 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBED_WD@Z */
3328 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAD_WD@Z */
3329 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEDGD@Z */
3330 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBADGD@Z */
3331 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_narrow
, 12)
3332 char __thiscall
basic_ios_wchar_narrow(basic_ios_wchar
*this, wchar_t ch
, char def
)
3334 TRACE("(%p %c %c)\n", this, ch
, def
);
3335 return ctype_wchar_narrow_ch(ctype_wchar_use_facet(this->strbuf
->loc
), ch
, def
);
3338 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
3339 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
3340 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAV32@@Z */
3341 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAV32@@Z */
3342 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_set
, 8)
3343 basic_streambuf_wchar
* __thiscall
basic_ios_wchar_rdbuf_set(basic_ios_wchar
*this, basic_streambuf_wchar
*streambuf
)
3345 basic_streambuf_wchar
*ret
= this->strbuf
;
3347 TRACE("(%p %p)\n", this, streambuf
);
3349 this->strbuf
= streambuf
;
3350 basic_ios_wchar_clear(this, IOSTATE_goodbit
);
3354 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
3355 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
3356 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
3357 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
3358 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_get
, 4)
3359 basic_streambuf_wchar
* __thiscall
basic_ios_wchar_rdbuf_get(const basic_ios_wchar
*this)
3361 TRACE("(%p)\n", this);
3362 return this->strbuf
;
3365 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
3366 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
3367 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
3368 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
3369 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_setstate_reraise
, 12)
3370 void __thiscall
basic_ios_wchar_setstate_reraise(basic_ios_wchar
*this, IOSB_iostate state
, MSVCP_bool reraise
)
3372 TRACE("(%p %x %x)\n", this, state
, reraise
);
3374 if(state
!= IOSTATE_goodbit
)
3375 basic_ios_wchar_clear_reraise(this, this->base
.state
| state
, reraise
);
3378 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
3379 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
3380 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
3381 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
3382 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_setstate
, 8)
3383 void __thiscall
basic_ios_wchar_setstate(basic_ios_wchar
*this, IOSB_iostate state
)
3385 basic_ios_wchar_setstate_reraise(this, state
, FALSE
);
3388 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
3389 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
3390 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@PAV32@@Z */
3391 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@PEAV32@@Z */
3392 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_set
, 8)
3393 basic_ostream_wchar
* __thiscall
basic_ios_wchar_tie_set(basic_ios_wchar
*this, basic_ostream_wchar
*ostream
)
3395 basic_ostream_wchar
*ret
= this->stream
;
3397 TRACE("(%p %p)\n", this, ostream
);
3399 this->stream
= ostream
;
3403 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
3404 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
3405 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
3406 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
3407 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_get
, 4)
3408 basic_ostream_wchar
* __thiscall
basic_ios_wchar_tie_get(const basic_ios_wchar
*this)
3410 TRACE("(%p)\n", this);
3411 return this->stream
;
3414 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WD@Z */
3415 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WD@Z */
3416 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGD@Z */
3417 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGD@Z */
3418 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_widen
, 8)
3419 wchar_t __thiscall
basic_ios_wchar_widen(basic_ios_wchar
*this, char ch
)
3421 TRACE("(%p %c)\n", this, ch
);
3422 return ctype_wchar_widen_ch(ctype_wchar_use_facet(this->strbuf
->loc
), ch
);
3425 /* Caution: basic_ostream uses virtual inheritance.
3426 * All constructors have additional parameter that says if base class should be initialized.
3427 * Base class needs to be accessed using vbtable.
3429 static inline basic_ios_char
* basic_ostream_char_get_basic_ios(basic_ostream_char
*this)
3431 return (basic_ios_char
*)((char*)this+this->vbtable
[1]);
3434 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
3435 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
3436 DEFINE_THISCALL_WRAPPER(basic_ostream_char_ctor
, 16)
3437 basic_ostream_char
* __thiscall
basic_ostream_char_ctor(basic_ostream_char
*this,
3438 basic_streambuf_char
*strbuf
, MSVCP_bool isstd
, MSVCP_bool virt_init
)
3440 basic_ios_char
*base
;
3442 TRACE("(%p %p %d %d)\n", this, strbuf
, isstd
, virt_init
);
3445 this->vbtable
= basic_ostream_char_vbtable
;
3446 base
= basic_ostream_char_get_basic_ios(this);
3447 basic_ios_char_ctor(base
);
3449 base
= basic_ostream_char_get_basic_ios(this);
3452 base
->base
.vtable
= &MSVCP_basic_ostream_char_vtable
;
3453 basic_ios_char_init(base
, strbuf
, isstd
);
3457 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */
3458 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */
3459 DEFINE_THISCALL_WRAPPER(basic_ostream_char_ctor_uninitialized
, 16)
3460 basic_ostream_char
* __thiscall
basic_ostream_char_ctor_uninitialized(basic_ostream_char
*this,
3461 int uninitialized
, MSVCP_bool addstd
, MSVCP_bool virt_init
)
3463 basic_ios_char
*base
;
3465 TRACE("(%p %d %x)\n", this, uninitialized
, addstd
);
3468 this->vbtable
= basic_ostream_char_vbtable
;
3469 base
= basic_ostream_char_get_basic_ios(this);
3470 basic_ios_char_ctor(base
);
3472 base
= basic_ostream_char_get_basic_ios(this);
3475 base
->base
.vtable
= &MSVCP_basic_ostream_char_vtable
;
3477 ios_base_Addstd(&base
->base
);
3481 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
3482 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
3483 DEFINE_THISCALL_WRAPPER(basic_ostream_char_dtor
, 4)
3484 void __thiscall
basic_ostream_char_dtor(basic_ostream_char
*this)
3486 /* don't destroy virtual base here */
3487 TRACE("(%p)\n", this);
3490 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
3491 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
3492 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vbase_dtor
, 4)
3493 void __thiscall
basic_ostream_char_vbase_dtor(basic_ostream_char
*this)
3495 TRACE("(%p)\n", this);
3496 basic_ostream_char_dtor(this);
3497 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(this));
3500 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ostream_char_vector_dtor
, 8)
3501 basic_ostream_char
* __thiscall
MSVCP_basic_ostream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
3503 basic_ostream_char
*this = (basic_ostream_char
*)((char*)base
- basic_ostream_char_vbtable
[1] + basic_ostream_char_vbtable
[0]);
3505 TRACE("(%p %x)\n", this, flags
);
3508 /* we have an array, with the number of elements stored before the first object */
3509 int i
, *ptr
= (int *)this-1;
3511 for(i
=*ptr
-1; i
>=0; i
--)
3512 basic_ostream_char_vbase_dtor(this+i
);
3513 MSVCRT_operator_delete(ptr
);
3515 basic_ostream_char_vbase_dtor(this);
3517 MSVCRT_operator_delete(this);
3523 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
3524 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
3525 DEFINE_THISCALL_WRAPPER(basic_ostream_char_flush
, 4)
3526 basic_ostream_char
* __thiscall
basic_ostream_char_flush(basic_ostream_char
*this)
3528 /* this function is not matching C++ specification */
3529 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
3531 TRACE("(%p)\n", this);
3533 if(basic_ios_char_rdbuf_get(base
) && ios_base_good(&base
->base
)
3534 && basic_streambuf_char_pubsync(basic_ios_char_rdbuf_get(base
))==-1)
3535 basic_ios_char_setstate(base
, IOSTATE_badbit
);
3539 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
3540 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
3541 DEFINE_THISCALL_WRAPPER(basic_ostream_char__Osfx
, 4)
3542 void __thiscall
basic_ostream_char__Osfx(basic_ostream_char
*this)
3544 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
3546 TRACE("(%p)\n", this);
3548 if(base
->base
.fmtfl
& FMTFLAG_unitbuf
)
3549 basic_ostream_char_flush(this);
3552 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
3553 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
3554 DEFINE_THISCALL_WRAPPER(basic_ostream_char_osfx
, 4)
3555 void __thiscall
basic_ostream_char_osfx(basic_ostream_char
*this)
3557 TRACE("(%p)\n", this);
3558 basic_ostream_char__Osfx(this);
3561 static BOOL
basic_ostream_char_sentry_create(basic_ostream_char
*ostr
)
3563 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
3565 if(basic_ios_char_rdbuf_get(base
))
3566 basic_streambuf_char__Lock(base
->strbuf
);
3568 if(ios_base_good(&base
->base
) && base
->stream
)
3569 basic_ostream_char_flush(base
->stream
);
3571 return ios_base_good(&base
->base
);
3574 static void basic_ostream_char_sentry_destroy(basic_ostream_char
*ostr
)
3576 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
3578 if(ios_base_good(&base
->base
) && !__uncaught_exception())
3579 basic_ostream_char_osfx(ostr
);
3581 if(basic_ios_char_rdbuf_get(base
))
3582 basic_streambuf_char__Unlock(base
->strbuf
);
3585 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE_NXZ */
3586 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA_NXZ */
3587 DEFINE_THISCALL_WRAPPER(basic_ostream_char_opfx
, 4)
3588 MSVCP_bool __thiscall
basic_ostream_char_opfx(basic_ostream_char
*this)
3590 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
3592 TRACE("(%p)\n", this);
3594 if(ios_base_good(&base
->base
) && base
->stream
)
3595 basic_ostream_char_flush(base
->stream
);
3596 return ios_base_good(&base
->base
);
3599 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
3600 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
3601 DEFINE_THISCALL_WRAPPER(basic_ostream_char_put
, 8)
3602 basic_ostream_char
* __thiscall
basic_ostream_char_put(basic_ostream_char
*this, char ch
)
3604 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
3606 TRACE("(%p %c)\n", this, ch
);
3608 if(!basic_ostream_char_sentry_create(this)
3609 || basic_streambuf_char_sputc(base
->strbuf
, ch
)==EOF
) {
3610 basic_ostream_char_sentry_destroy(this);
3611 basic_ios_char_setstate(base
, IOSTATE_badbit
);
3615 basic_ostream_char_sentry_destroy(this);
3619 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@JH@Z */
3620 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
3621 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp
, 12)
3622 basic_ostream_char
* __thiscall
basic_ostream_char_seekp(basic_ostream_char
*this, streamoff off
, int way
)
3624 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
3626 TRACE("(%p %ld %d)\n", this, off
, way
);
3628 if(!ios_base_fail(&base
->base
)) {
3631 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base
),
3632 &seek
, off
, way
, OPENMODE_out
);
3633 if(seek
.off
==0 && seek
.pos
==-1 && seek
.state
==0)
3634 basic_ios_char_setstate(base
, IOSTATE_failbit
);
3639 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
3640 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
3641 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp_fpos
, 28)
3642 basic_ostream_char
* __thiscall
basic_ostream_char_seekp_fpos(basic_ostream_char
*this, fpos_int pos
)
3644 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
3646 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos
));
3648 if(!ios_base_fail(&base
->base
)) {
3651 basic_streambuf_char_pubseekpos(basic_ios_char_rdbuf_get(base
),
3652 &seek
, pos
, OPENMODE_out
);
3653 if(seek
.off
==0 && seek
.pos
==-1 && seek
.state
==0)
3654 basic_ios_char_setstate(base
, IOSTATE_failbit
);
3659 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
3660 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
3661 DEFINE_THISCALL_WRAPPER(basic_ostream_char_tellp
, 8)
3662 fpos_int
* __thiscall
basic_ostream_char_tellp(basic_ostream_char
*this, fpos_int
*ret
)
3664 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
3666 TRACE("(%p)\n", this);
3668 if(!ios_base_fail(&base
->base
)) {
3669 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base
),
3670 ret
, 0, SEEKDIR_cur
, OPENMODE_out
);
3679 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@PBDH@Z */
3680 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEBD_J@Z */
3681 DEFINE_THISCALL_WRAPPER(basic_ostream_char_write
, 12)
3682 basic_ostream_char
* __thiscall
basic_ostream_char_write(basic_ostream_char
*this, const char *str
, streamsize count
)
3684 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
3686 TRACE("(%p %s %ld)\n", this, debugstr_a(str
), count
);
3688 if(!basic_ostream_char_sentry_create(this)
3689 || basic_streambuf_char_sputn(base
->strbuf
, str
, count
)!=count
) {
3690 basic_ostream_char_sentry_destroy(this);
3691 basic_ios_char_setstate(base
, IOSTATE_badbit
);
3695 basic_ostream_char_sentry_destroy(this);
3699 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@F@Z */
3700 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@F@Z */
3701 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_short
, 8)
3702 basic_ostream_char
* __thiscall
basic_ostream_char_print_short(basic_ostream_char
*this, short val
)
3704 FIXME("(%p %d) stub\n", this, val
);
3708 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@G@Z */
3709 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@G@Z */
3710 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ushort
, 8)
3711 basic_ostream_char
* __thiscall
basic_ostream_char_print_ushort(basic_ostream_char
*this, unsigned short val
)
3713 FIXME("(%p %d) stub\n", this, val
);
3717 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z */
3718 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@H@Z */
3719 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int
, 8)
3720 basic_ostream_char
* __thiscall
basic_ostream_char_print_int(basic_ostream_char
*this, int val
)
3722 FIXME("(%p %d) stub\n", this, val
);
3726 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@I@Z */
3727 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@I@Z */
3728 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint
, 8)
3729 basic_ostream_char
* __thiscall
basic_ostream_char_print_uint(basic_ostream_char
*this, unsigned int val
)
3731 FIXME("(%p %d) stub\n", this, val
);
3735 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z */
3736 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@J@Z */
3737 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_long
, 8)
3738 basic_ostream_char
* __thiscall
basic_ostream_char_print_long(basic_ostream_char
*this, LONG val
)
3740 FIXME("(%p %d) stub\n", this, val
);
3744 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z */
3745 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@K@Z */
3746 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ulong
, 8)
3747 basic_ostream_char
* __thiscall
basic_ostream_char_print_ulong(basic_ostream_char
*this, ULONG val
)
3749 FIXME("(%p %d) stub\n", this, val
);
3753 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@M@Z */
3754 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@M@Z */
3755 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_float
, 8)
3756 basic_ostream_char
* __thiscall
basic_ostream_char_print_float(basic_ostream_char
*this, float val
)
3758 FIXME("(%p %f) stub\n", this, val
);
3762 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@N@Z */
3763 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@N@Z */
3764 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_double
, 12)
3765 basic_ostream_char
* __thiscall
basic_ostream_char_print_double(basic_ostream_char
*this, double val
)
3767 FIXME("(%p %lf) stub\n", this, val
);
3771 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
3772 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
3773 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_streambuf
, 8)
3774 basic_ostream_char
* __thiscall
basic_ostream_char_print_streambuf(basic_ostream_char
*this, basic_streambuf_char
*val
)
3776 FIXME("(%p %p) stub\n", this, val
);
3780 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PBX@Z */
3781 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEBX@Z */
3782 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ptr
, 8)
3783 basic_ostream_char
* __thiscall
basic_ostream_char_print_ptr(basic_ostream_char
*this, const void *val
)
3785 FIXME("(%p %p) stub\n", this, val
);
3789 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_J@Z */
3790 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_J@Z */
3791 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int64
, 12)
3792 basic_ostream_char
* __thiscall
basic_ostream_char_print_int64(basic_ostream_char
*this, __int64 val
)
3794 FIXME("(%p) stub\n", this);
3798 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_K@Z */
3799 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_K@Z */
3800 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint64
, 12)
3801 basic_ostream_char
* __thiscall
basic_ostream_char_print_uint64(basic_ostream_char
*this, unsigned __int64 val
)
3803 FIXME("(%p) stub\n", this);
3807 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_N@Z */
3808 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_N@Z */
3809 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_bool
, 8)
3810 basic_ostream_char
* __thiscall
basic_ostream_char_print_bool(basic_ostream_char
*this, MSVCP_bool val
)
3812 FIXME("(%p %x) stub\n", this, val
);
3816 /* ?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
3817 /* ?endl@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
3818 basic_ostream_char
* __cdecl
basic_ostream_char_endl(basic_ostream_char
*ostr
)
3820 TRACE("(%p)\n", ostr
);
3822 basic_ostream_char_put(ostr
, '\n');
3823 basic_ostream_char_flush(ostr
);
3827 /* $?6DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
3828 /* ??$?6DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
3829 basic_ostream_char
* __cdecl
basic_ostream_char_print_bstr(basic_ostream_char
*ostr
, const basic_string_char
*str
)
3831 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
3832 IOSB_iostate state
= IOSTATE_goodbit
;
3834 TRACE("(%p %p)\n", ostr
, str
);
3836 if(basic_ostream_char_sentry_create(ostr
)) {
3837 MSVCP_size_t len
= MSVCP_basic_string_char_length(str
);
3838 streamsize pad
= (base
->base
.wide
>len
? base
->base
.wide
-len
: 0);
3840 if((base
->base
.fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
3841 for(; pad
!=0; pad
--) {
3842 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
3843 state
= IOSTATE_badbit
;
3849 if(state
== IOSTATE_goodbit
) {
3850 if(basic_streambuf_char_sputn(base
->strbuf
, MSVCP_basic_string_char_c_str(str
), len
) != len
)
3851 state
= IOSTATE_badbit
;
3854 for(; pad
!=0; pad
--) {
3855 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
3856 state
= IOSTATE_badbit
;
3861 base
->base
.wide
= 0;
3863 state
= IOSTATE_badbit
;
3865 basic_ostream_char_sentry_destroy(ostr
);
3867 basic_ios_char_setstate(base
, state
);
3871 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
3872 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
3873 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func
, 8)
3874 basic_ostream_char
* __thiscall
basic_ostream_char_print_func(basic_ostream_char
*this,
3875 basic_ostream_char
* (__cdecl
*pfunc
)(basic_ostream_char
*))
3877 TRACE("(%p %p)\n", this, pfunc
);
3882 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
3883 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
3884 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_basic_ios
, 8)
3885 basic_ostream_char
* __thiscall
basic_ostream_char_print_func_basic_ios(basic_ostream_char
*this,
3886 basic_ios_char
* (__cdecl
*pfunc
)(basic_ios_char
*))
3888 TRACE("(%p %p)\n", this, pfunc
);
3889 pfunc(basic_ostream_char_get_basic_ios(this));
3893 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
3894 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
3895 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_ios_base
, 8)
3896 basic_ostream_char
* __thiscall
basic_ostream_char_print_func_ios_base(
3897 basic_ostream_char
*this, ios_base
* (__cdecl
*pfunc
)(ios_base
*))
3899 TRACE("(%p %p)\n", this, pfunc
);
3900 pfunc(&basic_ostream_char_get_basic_ios(this)->base
);
3904 /* Caution: basic_istream uses virtual inheritance. */
3905 static inline basic_ios_char
* basic_istream_char_get_basic_ios(basic_istream_char
*this)
3907 return (basic_ios_char
*)((char*)this+this->vbtable
[1]);
3910 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
3911 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
3912 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_init
, 20)
3913 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
)
3915 basic_ios_char
*base
;
3917 TRACE("(%p %p %d %d %d)\n", this, strbuf
, isstd
, noinit
, virt_init
);
3920 this->vbtable
= basic_istream_char_vbtable
;
3921 base
= basic_istream_char_get_basic_ios(this);
3922 basic_ios_char_ctor(base
);
3924 base
= basic_istream_char_get_basic_ios(this);
3927 base
->base
.vtable
= &MSVCP_basic_istream_char_vtable
;
3930 basic_ios_char_init(base
, strbuf
, isstd
);
3934 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
3935 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
3936 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor
, 16)
3937 basic_istream_char
* __thiscall
basic_istream_char_ctor(basic_istream_char
*this, basic_streambuf_char
*strbuf
, MSVCP_bool isstd
, MSVCP_bool virt_init
)
3939 return basic_istream_char_ctor_init(this, strbuf
, isstd
, FALSE
, virt_init
);
3942 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
3943 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
3944 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_uninitialized
, 12)
3945 basic_istream_char
* __thiscall
basic_istream_char_ctor_uninitialized(basic_istream_char
*this, int uninitialized
, MSVCP_bool virt_init
)
3947 basic_ios_char
*base
;
3949 TRACE("(%p %d %d)\n", this, uninitialized
, virt_init
);
3952 this->vbtable
= basic_istream_char_vbtable
;
3953 base
= basic_istream_char_get_basic_ios(this);
3954 basic_ios_char_ctor(base
);
3956 base
= basic_istream_char_get_basic_ios(this);
3959 base
->base
.vtable
= &MSVCP_basic_istream_char_vtable
;
3960 ios_base_Addstd(&base
->base
);
3964 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UAE@XZ */
3965 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
3966 DEFINE_THISCALL_WRAPPER(basic_istream_char_dtor
, 4)
3967 void __thiscall
basic_istream_char_dtor(basic_istream_char
*this)
3969 /* don't destroy virtual base here */
3970 TRACE("(%p)\n", this);
3973 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
3974 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
3975 DEFINE_THISCALL_WRAPPER(basic_istream_char_vbase_dtor
, 4)
3976 void __thiscall
basic_istream_char_vbase_dtor(basic_istream_char
*this)
3978 TRACE("(%p)\n", this);
3979 basic_istream_char_dtor(this);
3980 basic_ios_char_dtor(basic_istream_char_get_basic_ios(this));
3983 DEFINE_THISCALL_WRAPPER(MSVCP_basic_istream_char_vector_dtor
, 8)
3984 basic_istream_char
* __thiscall
MSVCP_basic_istream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
3986 basic_istream_char
*this = (basic_istream_char
*)((char*)base
- basic_istream_char_vbtable
[1] + basic_istream_char_vbtable
[0]);
3988 TRACE("(%p %x)\n", this, flags
);
3991 /* we have an array, with the number of elements stored before the first object */
3992 int i
, *ptr
= (int *)this-1;
3994 for(i
=*ptr
-1; i
>=0; i
--)
3995 basic_istream_char_vbase_dtor(this+i
);
3996 MSVCRT_operator_delete(ptr
);
3998 basic_istream_char_vbase_dtor(this);
4000 MSVCRT_operator_delete(this);
4006 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
4007 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
4008 DEFINE_THISCALL_WRAPPER(basic_istream_char__Ipfx
, 8)
4009 MSVCP_bool __thiscall
basic_istream_char__Ipfx(basic_istream_char
*this, MSVCP_bool noskip
)
4011 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
4013 TRACE("(%p %d)\n", this, noskip
);
4015 if(!ios_base_good(&base
->base
)) {
4016 basic_ios_char_setstate(base
, IOSTATE_failbit
);
4020 if(basic_ios_char_tie_get(base
))
4021 basic_ostream_char_flush(basic_ios_char_tie_get(base
));
4023 if(!noskip
&& (ios_base_flags_get(&base
->base
) & FMTFLAG_skipws
)) {
4024 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4025 const ctype_char
*ctype
= ctype_char_use_facet(base
->strbuf
->loc
);
4028 for(ch
= basic_streambuf_char_sgetc(strbuf
); ;
4029 ch
= basic_streambuf_char_snextc(strbuf
)) {
4031 basic_ios_char_setstate(base
, IOSTATE_eofbit
);
4035 if(!ctype_char_is_ch(ctype
, _SPACE
|_BLANK
, ch
))
4043 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
4044 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
4045 DEFINE_THISCALL_WRAPPER(basic_istream_char_ipfx
, 8)
4046 MSVCP_bool __thiscall
basic_istream_char_ipfx(basic_istream_char
*this, MSVCP_bool noskip
)
4048 return basic_istream_char__Ipfx(this, noskip
);
4051 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
4052 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
4053 DEFINE_THISCALL_WRAPPER(basic_istream_char_isfx
, 4)
4054 void __thiscall
basic_istream_char_isfx(basic_istream_char
*this)
4056 TRACE("(%p)\n", this);
4059 static BOOL
basic_istream_char_sentry_create(basic_istream_char
*istr
, MSVCP_bool noskip
)
4061 basic_ios_char
*base
= basic_istream_char_get_basic_ios(istr
);
4063 if(basic_ios_char_rdbuf_get(base
))
4064 basic_streambuf_char__Lock(base
->strbuf
);
4066 return basic_istream_char_ipfx(istr
, noskip
);
4069 static void basic_istream_char_sentry_destroy(basic_istream_char
*istr
)
4071 basic_ios_char
*base
= basic_istream_char_get_basic_ios(istr
);
4073 if(basic_ios_char_rdbuf_get(base
))
4074 basic_streambuf_char__Unlock(base
->strbuf
);
4077 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QBEHXZ */
4078 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QEBA_JXZ */
4079 DEFINE_THISCALL_WRAPPER(basic_istream_char_gcount
, 4)
4080 int __thiscall
basic_istream_char_gcount(const basic_istream_char
*this)
4082 TRACE("(%p)\n", this);
4086 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
4087 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
4088 DEFINE_THISCALL_WRAPPER(basic_istream_char_get
, 4)
4089 int __thiscall
basic_istream_char_get(basic_istream_char
*this)
4091 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
4094 TRACE("(%p)\n", this);
4098 if(!basic_istream_char_sentry_create(this, TRUE
)) {
4099 basic_istream_char_sentry_destroy(this);
4103 ret
= basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(base
));
4104 basic_istream_char_sentry_destroy(this);
4106 basic_ios_char_setstate(base
, IOSTATE_eofbit
|IOSTATE_failbit
);
4113 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAD@Z */
4114 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAD@Z */
4115 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_ch
, 8)
4116 basic_istream_char
* __thiscall
basic_istream_char_get_ch(basic_istream_char
*this, char *ch
)
4120 TRACE("(%p %p)\n", this, ch
);
4122 ret
= basic_istream_char_get(this);
4128 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
4129 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
4130 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str_delim
, 16)
4131 basic_istream_char
* __thiscall
basic_istream_char_get_str_delim(basic_istream_char
*this, char *str
, streamsize count
, char delim
)
4133 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
4136 TRACE("(%p %p %ld %c)\n", this, str
, count
, delim
);
4140 if(basic_istream_char_sentry_create(this, TRUE
)) {
4141 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4143 for(ch
= basic_streambuf_char_sgetc(strbuf
); count
>1;
4144 ch
= basic_streambuf_char_snextc(strbuf
)) {
4145 if(ch
==EOF
|| ch
==delim
)
4153 basic_istream_char_sentry_destroy(this);
4155 basic_ios_char_setstate(base
, (!this->count
? IOSTATE_failbit
: IOSTATE_goodbit
) |
4156 (ch
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
4162 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
4163 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
4164 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str
, 12)
4165 basic_istream_char
* __thiscall
basic_istream_char_get_str(basic_istream_char
*this, char *str
, streamsize count
)
4167 return basic_istream_char_get_str_delim(this, str
, count
, '\n');
4170 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
4171 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
4172 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf_delim
, 12)
4173 basic_istream_char
* __thiscall
basic_istream_char_get_streambuf_delim(basic_istream_char
*this, basic_streambuf_char
*strbuf
, char delim
)
4175 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
4178 TRACE("(%p %p %c)\n", this, strbuf
, delim
);
4182 if(basic_istream_char_sentry_create(this, TRUE
)) {
4183 basic_streambuf_char
*strbuf_read
= basic_ios_char_rdbuf_get(base
);
4185 for(ch
= basic_streambuf_char_sgetc(strbuf_read
); ;
4186 ch
= basic_streambuf_char_snextc(strbuf_read
)) {
4187 if(ch
==EOF
|| ch
==delim
)
4190 if(basic_streambuf_char_sputc(strbuf
, ch
) == EOF
)
4195 basic_istream_char_sentry_destroy(this);
4197 basic_ios_char_setstate(base
, (!this->count
? IOSTATE_failbit
: IOSTATE_goodbit
) |
4198 (ch
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
4202 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
4203 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
4204 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf
, 8)
4205 basic_istream_char
* __thiscall
basic_istream_char_get_streambuf(basic_istream_char
*this, basic_streambuf_char
*strbuf
)
4207 return basic_istream_char_get_streambuf_delim(this, strbuf
, '\n');
4210 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
4211 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
4212 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline_delim
, 16)
4213 basic_istream_char
* __thiscall
basic_istream_char_getline_delim(basic_istream_char
*this, char *str
, streamsize count
, char delim
)
4215 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
4218 TRACE("(%p %p %ld %c)\n", this, str
, count
, delim
);
4222 if(basic_istream_char_sentry_create(this, TRUE
) && count
>0) {
4223 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4226 ch
= basic_streambuf_char_sbumpc(strbuf
);
4228 if(ch
==EOF
|| ch
==delim
)
4238 else if(ch
!= EOF
) {
4239 ch
= basic_streambuf_char_sgetc(strbuf
);
4242 basic_streambuf_char__Gninc(strbuf
);
4247 basic_istream_char_sentry_destroy(this);
4249 basic_ios_char_setstate(base
, (ch
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
) |
4250 (!this->count
|| (ch
!=delim
&& ch
!=EOF
) ? IOSTATE_failbit
: IOSTATE_goodbit
));
4256 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
4257 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
4258 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline
, 12)
4259 basic_istream_char
* __thiscall
basic_istream_char_getline(basic_istream_char
*this, char *str
, streamsize count
)
4261 return basic_istream_char_getline_delim(this, str
, count
, '\n');
4264 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@HH@Z */
4265 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
4266 DEFINE_THISCALL_WRAPPER(basic_istream_char_ignore
, 12)
4267 basic_istream_char
* __thiscall
basic_istream_char_ignore(basic_istream_char
*this, streamsize count
, int delim
)
4269 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
4272 TRACE("(%p %ld %d)\n", this, count
, delim
);
4276 if(basic_istream_char_sentry_create(this, TRUE
)) {
4277 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4280 ch
= basic_streambuf_char_sbumpc(strbuf
);
4282 if(ch
==EOF
|| ch
==delim
)
4286 if(count
!= INT_MAX
)
4290 basic_istream_char_sentry_destroy(this);
4293 basic_ios_char_setstate(base
, IOSTATE_eofbit
);
4297 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
4298 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
4299 DEFINE_THISCALL_WRAPPER(basic_istream_char_peek
, 4)
4300 int __thiscall
basic_istream_char_peek(basic_istream_char
*this)
4302 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
4305 TRACE("(%p)\n", this);
4309 if(basic_istream_char_sentry_create(this, TRUE
))
4310 ret
= basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base
));
4311 basic_istream_char_sentry_destroy(this);
4315 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADIH@Z */
4316 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_K_J@Z */
4317 DEFINE_THISCALL_WRAPPER(basic_istream_char__Read_s
, 16)
4318 basic_istream_char
* __thiscall
basic_istream_char__Read_s(basic_istream_char
*this, char *str
, MSVCP_size_t size
, streamsize count
)
4320 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
4321 IOSB_iostate state
= IOSTATE_goodbit
;
4323 TRACE("(%p %p %lu %ld)\n", this, str
, size
, count
);
4325 if(basic_istream_char_sentry_create(this, TRUE
)) {
4326 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4328 this->count
= basic_streambuf_char__Sgetn_s(strbuf
, str
, size
, count
);
4329 if(this->count
!= count
)
4330 state
|= IOSTATE_failbit
| IOSTATE_eofbit
;
4334 basic_istream_char_sentry_destroy(this);
4336 basic_ios_char_setstate(base
, state
);
4340 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
4341 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
4342 DEFINE_THISCALL_WRAPPER(basic_istream_char_read
, 12)
4343 basic_istream_char
* __thiscall
basic_istream_char_read(basic_istream_char
*this, char *str
, streamsize count
)
4345 return basic_istream_char__Read_s(this, str
, count
, count
);
4348 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
4349 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
4350 DEFINE_THISCALL_WRAPPER(basic_istream_char__Readsome_s
, 16)
4351 streamsize __thiscall
basic_istream_char__Readsome_s(basic_istream_char
*this, char *str
, MSVCP_size_t size
, streamsize count
)
4353 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
4354 IOSB_iostate state
= IOSTATE_goodbit
;
4356 TRACE("(%p %p %lu %ld)\n", this, str
, size
, count
);
4360 if(basic_istream_char_sentry_create(this, TRUE
)) {
4361 streamsize avail
= basic_streambuf_char_in_avail(basic_ios_char_rdbuf_get(base
));
4366 state
|= IOSTATE_eofbit
;
4368 basic_istream_char__Read_s(this, str
, size
, avail
);
4370 state
|= IOSTATE_failbit
;
4372 basic_istream_char_sentry_destroy(this);
4374 basic_ios_char_setstate(base
, state
);
4378 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
4379 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
4380 DEFINE_THISCALL_WRAPPER(basic_istream_char_readsome
, 12)
4381 streamsize __thiscall
basic_istream_char_readsome(basic_istream_char
*this, char *str
, streamsize count
)
4383 return basic_istream_char__Readsome_s(this, str
, count
, count
);
4386 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
4387 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
4388 DEFINE_THISCALL_WRAPPER(basic_istream_char_putback
, 8)
4389 basic_istream_char
* __thiscall
basic_istream_char_putback(basic_istream_char
*this, char ch
)
4391 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
4392 IOSB_iostate state
= IOSTATE_goodbit
;
4394 TRACE("(%p %c)\n", this, ch
);
4398 if(basic_istream_char_sentry_create(this, TRUE
)) {
4399 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4401 if(!ios_base_good(&base
->base
))
4402 state
|= IOSTATE_failbit
;
4403 else if(!strbuf
|| basic_streambuf_char_sputbackc(strbuf
, ch
)==EOF
)
4404 state
|= IOSTATE_badbit
;
4406 basic_istream_char_sentry_destroy(this);
4408 basic_ios_char_setstate(base
, state
);
4412 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
4413 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
4414 DEFINE_THISCALL_WRAPPER(basic_istream_char_unget
, 4)
4415 basic_istream_char
* __thiscall
basic_istream_char_unget(basic_istream_char
*this)
4417 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
4418 IOSB_iostate state
= IOSTATE_goodbit
;
4420 TRACE("(%p)\n", this);
4424 if(basic_istream_char_sentry_create(this, TRUE
)) {
4425 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4427 if(!ios_base_good(&base
->base
))
4428 state
|= IOSTATE_failbit
;
4429 else if(!strbuf
|| basic_streambuf_char_sungetc(strbuf
)==EOF
)
4430 state
|= IOSTATE_badbit
;
4432 basic_istream_char_sentry_destroy(this);
4434 basic_ios_char_setstate(base
, state
);
4438 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
4439 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
4440 DEFINE_THISCALL_WRAPPER(basic_istream_char_sync
, 4)
4441 int __thiscall
basic_istream_char_sync(basic_istream_char
*this)
4443 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
4444 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4446 TRACE("(%p)\n", this);
4451 if(basic_istream_char_sentry_create(this, TRUE
)) {
4452 if(basic_streambuf_char_pubsync(strbuf
) != -1) {
4453 basic_istream_char_sentry_destroy(this);
4457 basic_istream_char_sentry_destroy(this);
4459 basic_ios_char_setstate(base
, IOSTATE_badbit
);
4463 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
4464 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
4465 DEFINE_THISCALL_WRAPPER(basic_istream_char_tellg
, 8)
4466 fpos_int
* __thiscall
basic_istream_char_tellg(basic_istream_char
*this, fpos_int
*ret
)
4468 TRACE("(%p %p)\n", this, ret
);
4470 if(basic_istream_char_sentry_create(this, TRUE
)) {
4471 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
4472 if(!ios_base_fail(&base
->base
)) {
4473 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base
),
4474 ret
, 0, SEEKDIR_cur
, OPENMODE_in
);
4475 basic_istream_char_sentry_destroy(this);
4477 if(ret
->off
==0 && ret
->pos
==-1 && ret
->state
==0)
4478 basic_ios_char_setstate(base
, IOSTATE_failbit
);
4482 basic_istream_char_sentry_destroy(this);
4490 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@JH@Z */
4491 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
4492 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg
, 12)
4493 basic_istream_char
* __thiscall
basic_istream_char_seekg(basic_istream_char
*this, streamoff off
, int dir
)
4495 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
4497 TRACE("(%p %ld %d)\n", this, off
, dir
);
4499 if(basic_istream_char_sentry_create(this, TRUE
)) {
4500 if(!ios_base_fail(&base
->base
)) {
4501 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4504 basic_streambuf_char_pubseekoff(strbuf
, &ret
, off
, dir
, OPENMODE_in
);
4505 basic_istream_char_sentry_destroy(this);
4507 if(ret
.off
==0 && ret
.pos
==-1 && ret
.state
==0)
4508 basic_ios_char_setstate(base
, IOSTATE_failbit
);
4510 basic_ios_char_clear(base
, IOSTATE_goodbit
);
4514 basic_istream_char_sentry_destroy(this);
4516 basic_ios_char_setstate(base
, IOSTATE_failbit
);
4520 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
4521 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
4522 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg_fpos
, 28)
4523 basic_istream_char
* __thiscall
basic_istream_char_seekg_fpos(basic_istream_char
*this, fpos_int pos
)
4525 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
4527 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos
));
4529 if(basic_istream_char_sentry_create(this, TRUE
)) {
4530 if(!ios_base_fail(&base
->base
)) {
4531 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4534 basic_streambuf_char_pubseekpos(strbuf
, &ret
, pos
, OPENMODE_in
);
4535 basic_istream_char_sentry_destroy(this);
4537 if(ret
.off
==0 && ret
.pos
==-1 && ret
.state
==0)
4538 basic_ios_char_setstate(base
, IOSTATE_failbit
);
4540 basic_ios_char_clear(base
, IOSTATE_goodbit
);
4544 basic_istream_char_sentry_destroy(this);
4546 basic_ios_char_setstate(base
, IOSTATE_failbit
);
4550 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAF@Z */
4551 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAF@Z */
4552 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_short
, 8)
4553 basic_istream_char
* __thiscall
basic_istream_char_read_short(basic_istream_char
*this, short *v
)
4555 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
4556 int state
= IOSTATE_goodbit
;
4558 TRACE("(%p %p)\n", this, v
);
4560 if(basic_istream_char_sentry_create(this, FALSE
)) {
4561 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4562 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
4563 istreambuf_iterator_char first
={0}, last
={0};
4566 first
.strbuf
= strbuf
;
4567 num_get_char_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, &tmp
);
4569 if(!(state
&IOSTATE_failbit
) && tmp
==(LONG
)((short)tmp
))
4572 state
|= IOSTATE_failbit
;
4574 basic_istream_char_sentry_destroy(this);
4576 basic_ios_char_setstate(base
, state
);
4580 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAG@Z */
4581 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAG@Z */
4582 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ushort
, 8)
4583 basic_istream_char
* __thiscall
basic_istream_char_read_ushort(basic_istream_char
*this, unsigned short *v
)
4585 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
4586 int state
= IOSTATE_goodbit
;
4588 TRACE("(%p %p)\n", this, v
);
4590 if(basic_istream_char_sentry_create(this, FALSE
)) {
4591 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4592 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
4593 istreambuf_iterator_char first
={0}, last
={0};
4595 first
.strbuf
= strbuf
;
4596 num_get_char_get_ushort(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
4598 basic_istream_char_sentry_destroy(this);
4600 basic_ios_char_setstate(base
, state
);
4604 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAH@Z */
4605 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAH@Z */
4606 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int
, 8)
4607 basic_istream_char
* __thiscall
basic_istream_char_read_int(basic_istream_char
*this, int *v
)
4609 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
4610 int state
= IOSTATE_goodbit
;
4612 TRACE("(%p %p)\n", this, v
);
4614 if(basic_istream_char_sentry_create(this, FALSE
)) {
4615 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4616 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
4617 istreambuf_iterator_char first
={0}, last
={0};
4619 first
.strbuf
= strbuf
;
4620 num_get_char_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
4622 basic_istream_char_sentry_destroy(this);
4624 basic_ios_char_setstate(base
, state
);
4628 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAI@Z */
4629 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAI@Z */
4630 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint
, 8)
4631 basic_istream_char
* __thiscall
basic_istream_char_read_uint(basic_istream_char
*this, unsigned int *v
)
4633 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
4634 int state
= IOSTATE_goodbit
;
4636 TRACE("(%p %p)\n", this, v
);
4638 if(basic_istream_char_sentry_create(this, FALSE
)) {
4639 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4640 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
4641 istreambuf_iterator_char first
={0}, last
={0};
4643 first
.strbuf
= strbuf
;
4644 num_get_char_get_uint(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
4646 basic_istream_char_sentry_destroy(this);
4648 basic_ios_char_setstate(base
, state
);
4652 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAJ@Z */
4653 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAJ@Z */
4654 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_long
, 8)
4655 basic_istream_char
* __thiscall
basic_istream_char_read_long(basic_istream_char
*this, LONG
*v
)
4657 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
4658 int state
= IOSTATE_goodbit
;
4660 TRACE("(%p %p)\n", this, v
);
4662 if(basic_istream_char_sentry_create(this, FALSE
)) {
4663 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4664 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
4665 istreambuf_iterator_char first
={0}, last
={0};
4667 first
.strbuf
= strbuf
;
4668 num_get_char_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
4670 basic_istream_char_sentry_destroy(this);
4672 basic_ios_char_setstate(base
, state
);
4676 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAK@Z */
4677 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAK@Z */
4678 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ulong
, 8)
4679 basic_istream_char
* __thiscall
basic_istream_char_read_ulong(basic_istream_char
*this, ULONG
*v
)
4681 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
4682 int state
= IOSTATE_goodbit
;
4684 TRACE("(%p %p)\n", this, v
);
4686 if(basic_istream_char_sentry_create(this, FALSE
)) {
4687 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4688 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
4689 istreambuf_iterator_char first
={0}, last
={0};
4691 first
.strbuf
= strbuf
;
4692 num_get_char_get_ulong(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
4694 basic_istream_char_sentry_destroy(this);
4696 basic_ios_char_setstate(base
, state
);
4700 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAM@Z */
4701 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAM@Z */
4702 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_float
, 8)
4703 basic_istream_char
* __thiscall
basic_istream_char_read_float(basic_istream_char
*this, float *v
)
4705 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
4706 int state
= IOSTATE_goodbit
;
4708 TRACE("(%p %p)\n", this, v
);
4710 if(basic_istream_char_sentry_create(this, FALSE
)) {
4711 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4712 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
4713 istreambuf_iterator_char first
={0}, last
={0};
4715 first
.strbuf
= strbuf
;
4716 num_get_char_get_float(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
4718 basic_istream_char_sentry_destroy(this);
4720 basic_ios_char_setstate(base
, state
);
4724 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAN@Z */
4725 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAN@Z */
4726 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_double
, 8)
4727 basic_istream_char
* __thiscall
basic_istream_char_read_double(basic_istream_char
*this, double *v
)
4729 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
4730 int state
= IOSTATE_goodbit
;
4732 TRACE("(%p %p)\n", this, v
);
4734 if(basic_istream_char_sentry_create(this, FALSE
)) {
4735 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4736 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
4737 istreambuf_iterator_char first
={0}, last
={0};
4739 first
.strbuf
= strbuf
;
4740 num_get_char_get_double(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
4742 basic_istream_char_sentry_destroy(this);
4744 basic_ios_char_setstate(base
, state
);
4748 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAO@Z */
4749 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAO@Z */
4750 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ldouble
, 8)
4751 basic_istream_char
* __thiscall
basic_istream_char_read_ldouble(basic_istream_char
*this, double *v
)
4753 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
4754 int state
= IOSTATE_goodbit
;
4756 TRACE("(%p %p)\n", this, v
);
4758 if(basic_istream_char_sentry_create(this, FALSE
)) {
4759 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4760 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
4761 istreambuf_iterator_char first
={0}, last
={0};
4763 first
.strbuf
= strbuf
;
4764 num_get_char_get_ldouble(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
4766 basic_istream_char_sentry_destroy(this);
4768 basic_ios_char_setstate(base
, state
);
4772 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAPAX@Z */
4773 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
4774 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ptr
, 8)
4775 basic_istream_char
* __thiscall
basic_istream_char_read_ptr(basic_istream_char
*this, void **v
)
4777 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
4778 int state
= IOSTATE_goodbit
;
4780 TRACE("(%p %p)\n", this, v
);
4782 if(basic_istream_char_sentry_create(this, FALSE
)) {
4783 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4784 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
4785 istreambuf_iterator_char first
={0}, last
={0};
4787 first
.strbuf
= strbuf
;
4788 num_get_char_get_void(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
4790 basic_istream_char_sentry_destroy(this);
4792 basic_ios_char_setstate(base
, state
);
4796 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_J@Z */
4797 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_J@Z */
4798 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int64
, 8)
4799 basic_istream_char
* __thiscall
basic_istream_char_read_int64(basic_istream_char
*this, __int64
*v
)
4801 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
4802 int state
= IOSTATE_goodbit
;
4804 TRACE("(%p %p)\n", this, v
);
4806 if(basic_istream_char_sentry_create(this, FALSE
)) {
4807 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4808 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
4809 istreambuf_iterator_char first
={0}, last
={0};
4811 first
.strbuf
= strbuf
;
4812 num_get_char_get_int64(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
4814 basic_istream_char_sentry_destroy(this);
4816 basic_ios_char_setstate(base
, state
);
4820 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_K@Z */
4821 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_K@Z */
4822 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint64
, 8)
4823 basic_istream_char
* __thiscall
basic_istream_char_read_uint64(basic_istream_char
*this, unsigned __int64
*v
)
4825 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
4826 int state
= IOSTATE_goodbit
;
4828 TRACE("(%p %p)\n", this, v
);
4830 if(basic_istream_char_sentry_create(this, FALSE
)) {
4831 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4832 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
4833 istreambuf_iterator_char first
={0}, last
={0};
4835 first
.strbuf
= strbuf
;
4836 num_get_char_get_uint64(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
4838 basic_istream_char_sentry_destroy(this);
4840 basic_ios_char_setstate(base
, state
);
4844 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_N@Z */
4845 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_N@Z */
4846 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_bool
, 8)
4847 basic_istream_char
* __thiscall
basic_istream_char_read_bool(basic_istream_char
*this, MSVCP_bool
*v
)
4849 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
4850 int state
= IOSTATE_goodbit
;
4852 TRACE("(%p %p)\n", this, v
);
4854 if(basic_istream_char_sentry_create(this, FALSE
)) {
4855 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4856 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
4857 istreambuf_iterator_char first
={0}, last
={0};
4859 first
.strbuf
= strbuf
;
4860 num_get_char_get_bool(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
4862 basic_istream_char_sentry_destroy(this);
4864 basic_ios_char_setstate(base
, state
);
4868 /* ??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@D@Z */
4869 /* ??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@D@Z */
4870 basic_istream_char
* __cdecl
basic_istream_char_getline_bstr_delim(
4871 basic_istream_char
*istream
, basic_string_char
*str
, char delim
)
4873 IOSB_iostate state
= IOSTATE_failbit
;
4876 TRACE("(%p %p %c)\n", istream
, str
, delim
);
4878 if(basic_istream_char_sentry_create(istream
, TRUE
)) {
4879 MSVCP_basic_string_char_clear(str
);
4881 for(c
= basic_istream_char_get(istream
); c
!=delim
&& c
!=EOF
;
4882 c
= basic_istream_char_get(istream
)) {
4883 state
= IOSTATE_goodbit
;
4884 MSVCP_basic_string_char_append_ch(str
, c
);
4887 basic_istream_char_sentry_destroy(istream
);
4889 basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream
),
4890 state
| (c
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
4894 /* ??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
4895 /* ??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
4896 basic_istream_char
* __cdecl
basic_istream_char_getline_bstr(
4897 basic_istream_char
*istream
, basic_string_char
*str
)
4899 return basic_istream_char_getline_bstr_delim(istream
, str
, '\n');
4902 /* ??$?5DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
4903 /* ??$?5DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
4904 basic_istream_char
* __cdecl
basic_istream_char_get_bstr(
4905 basic_istream_char
*istream
, basic_string_char
*str
)
4907 IOSB_iostate state
= IOSTATE_failbit
;
4910 TRACE("(%p %p)\n", istream
, str
);
4912 if(basic_istream_char_sentry_create(istream
, FALSE
)) {
4913 basic_ios_char
*base
= basic_istream_char_get_basic_ios(istream
);
4914 const ctype_char
*ctype
= ctype_char_use_facet(base
->strbuf
->loc
);
4916 MSVCP_basic_string_char_clear(str
);
4918 for(c
= basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base
));
4919 c
!=EOF
&& !ctype_char_is_ch(ctype
, _SPACE
|_BLANK
, c
);
4920 c
= basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base
))) {
4921 state
= IOSTATE_goodbit
;
4922 MSVCP_basic_string_char_append_ch(str
, c
);
4925 basic_istream_char_sentry_destroy(istream
);
4927 basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream
),
4928 state
| (c
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
4932 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4933 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4934 DEFINE_THISCALL_WRAPPER(basic_iostream_char_ctor
, 12)
4935 basic_iostream_char
* __thiscall
basic_iostream_char_ctor(basic_iostream_char
*this, basic_streambuf_char
*strbuf
, MSVCP_bool virt_init
)
4937 basic_ios_char
*basic_ios
;
4939 TRACE("(%p %p %d)\n", this, strbuf
, virt_init
);
4942 this->base1
.vbtable
= basic_iostream_char_vbtable1
;
4943 this->base2
.vbtable
= basic_iostream_char_vbtable2
;
4944 basic_ios
= basic_istream_char_get_basic_ios(&this->base1
);
4945 basic_ios_char_ctor(basic_ios
);
4947 basic_ios
= basic_istream_char_get_basic_ios(&this->base1
);
4950 basic_ios
->base
.vtable
= &MSVCP_basic_iostream_char_vtable
;
4952 basic_istream_char_ctor(&this->base1
, strbuf
, FALSE
, FALSE
);
4953 basic_ostream_char_ctor_uninitialized(&this->base2
, 0, FALSE
, FALSE
);
4957 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
4958 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
4959 DEFINE_THISCALL_WRAPPER(basic_iostream_char_dtor
, 4)
4960 void __thiscall
basic_iostream_char_dtor(basic_iostream_char
*this)
4962 TRACE("(%p)\n", this);
4963 basic_ostream_char_dtor(&this->base2
);
4964 basic_istream_char_dtor(&this->base1
);
4967 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
4968 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
4969 DEFINE_THISCALL_WRAPPER(basic_iostream_char_vbase_dtor
, 4)
4970 void __thiscall
basic_iostream_char_vbase_dtor(basic_iostream_char
*this)
4972 TRACE("(%p)\n", this);
4973 basic_iostream_char_dtor(this);
4974 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base1
));
4977 DEFINE_THISCALL_WRAPPER(MSVCP_basic_iostream_char_vector_dtor
, 8)
4978 basic_iostream_char
* __thiscall
MSVCP_basic_iostream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
4980 basic_iostream_char
*this = (basic_iostream_char
*)((char*)base
- basic_iostream_char_vbtable1
[1] + basic_iostream_char_vbtable1
[0]);
4982 TRACE("(%p %x)\n", this, flags
);
4985 /* we have an array, with the number of elements stored before the first object */
4986 int i
, *ptr
= (int *)this-1;
4988 for(i
=*ptr
-1; i
>=0; i
--)
4989 basic_iostream_char_vbase_dtor(this+i
);
4990 MSVCRT_operator_delete(ptr
);
4992 basic_iostream_char_vbase_dtor(this);
4994 MSVCRT_operator_delete(this);
5000 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
5001 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
5002 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor
, 8)
5003 basic_ofstream_char
* __thiscall
basic_ofstream_char_ctor(basic_ofstream_char
*this, MSVCP_bool virt_init
)
5005 basic_ios_char
*basic_ios
;
5007 TRACE("(%p %d)\n", this, virt_init
);
5010 this->base
.vbtable
= basic_ofstream_char_vbtable
;
5011 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
5012 basic_ios_char_ctor(basic_ios
);
5014 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
5017 basic_filebuf_char_ctor(&this->filebuf
);
5018 basic_ostream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
, FALSE
);
5019 basic_ios
->base
.vtable
= &MSVCP_basic_ofstream_char_vtable
;
5023 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
5024 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
5025 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_file
, 12)
5026 basic_ofstream_char
* __thiscall
basic_ofstream_char_ctor_file(
5027 basic_ofstream_char
*this, FILE *file
, MSVCP_bool virt_init
)
5029 basic_ios_char
*basic_ios
;
5031 TRACE("(%p %p %d)\n", this, file
, virt_init
);
5034 this->base
.vbtable
= basic_ofstream_char_vbtable
;
5035 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
5036 basic_ios_char_ctor(basic_ios
);
5038 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
5041 basic_filebuf_char_ctor_file(&this->filebuf
, file
);
5042 basic_ostream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
, FALSE
);
5043 basic_ios
->base
.vtable
= &MSVCP_basic_ofstream_char_vtable
;
5047 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PBDHH@Z */
5048 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDHH@Z */
5049 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_name
, 20)
5050 basic_ofstream_char
* __thiscall
basic_ofstream_char_ctor_name(basic_ofstream_char
*this,
5051 const char *name
, int mode
, int prot
, MSVCP_bool virt_init
)
5053 TRACE("(%p %s %d %d %d)\n", this, name
, mode
, prot
, virt_init
);
5055 basic_ofstream_char_ctor(this, virt_init
);
5057 if(!basic_filebuf_char_open(&this->filebuf
, name
, mode
|OPENMODE_out
, prot
)) {
5058 basic_ios_char
*basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
5059 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
5064 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PBGHH@Z */
5065 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEBGHH@Z */
5066 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PB_WHH@Z */
5067 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEB_WHH@Z */
5068 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_name_wchar
, 20)
5069 basic_ofstream_char
* __thiscall
basic_ofstream_char_ctor_name_wchar(basic_ofstream_char
*this,
5070 const wchar_t *name
, int mode
, int prot
, MSVCP_bool virt_init
)
5072 TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name
), mode
, prot
, virt_init
);
5074 basic_ofstream_char_ctor(this, virt_init
);
5076 if(!basic_filebuf_char_open_wchar(&this->filebuf
, name
, mode
|OPENMODE_out
, prot
)) {
5077 basic_ios_char
*basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
5078 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
5083 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
5084 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
5085 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_dtor
, 4)
5086 void __thiscall
basic_ofstream_char_dtor(basic_ofstream_char
*this)
5088 TRACE("(%p)\n", this);
5090 basic_ostream_char_dtor(&this->base
);
5091 basic_filebuf_char_dtor(&this->filebuf
);
5094 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5095 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5096 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_vbase_dtor
, 4)
5097 void __thiscall
basic_ofstream_char_vbase_dtor(basic_ofstream_char
*this)
5099 TRACE("(%p)\n", this);
5101 basic_ofstream_char_dtor(this);
5102 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base
));
5105 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ofstream_char_vector_dtor
, 8)
5106 basic_ofstream_char
* __thiscall
MSVCP_basic_ofstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
5108 basic_ofstream_char
*this = (basic_ofstream_char
*)((char*)base
- basic_ofstream_char_vbtable
[1] + basic_ofstream_char_vbtable
[0]);
5110 TRACE("(%p %x)\n", this, flags
);
5113 /* we have an array, with the number of elements stored before the first object */
5114 int i
, *ptr
= (int *)this-1;
5116 for(i
=*ptr
-1; i
>=0; i
--)
5117 basic_ofstream_char_vbase_dtor(this+i
);
5118 MSVCRT_operator_delete(ptr
);
5120 basic_ofstream_char_vbase_dtor(this);
5122 MSVCRT_operator_delete(this);
5128 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5129 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5130 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_close
, 4)
5131 void __thiscall
basic_ofstream_char_close(basic_ofstream_char
*this)
5133 TRACE("(%p)\n", this);
5135 if(!basic_filebuf_char_close(&this->filebuf
)) {
5136 basic_ios_char
*basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
5137 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
5141 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
5142 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
5143 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_is_open
, 4)
5144 MSVCP_bool __thiscall
basic_ofstream_char_is_open(const basic_ofstream_char
*this)
5146 TRACE("(%p)\n", this);
5147 return basic_filebuf_char_is_open(&this->filebuf
);
5150 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDHH@Z */
5151 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDHH@Z */
5152 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open
, 16)
5153 void __thiscall
basic_ofstream_char_open(basic_ofstream_char
*this,
5154 const char *name
, int mode
, int prot
)
5156 TRACE("(%p %s %d %d)\n", this, name
, mode
, prot
);
5158 if(!basic_filebuf_char_open(&this->filebuf
, name
, mode
|OPENMODE_out
, prot
)) {
5159 basic_ios_char
*basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
5160 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
5164 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDI@Z */
5165 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDI@Z */
5166 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_old
, 12)
5167 void __thiscall
basic_ofstream_char_open_old(basic_ofstream_char
*this,
5168 const char *name
, unsigned int mode
)
5170 basic_ofstream_char_open(this, name
, mode
, _SH_DENYNO
);
5173 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBGHH@Z */
5174 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGHH@Z */
5175 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPB_WHH@Z */
5176 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WHH@Z */
5177 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_wchar
, 16)
5178 void __thiscall
basic_ofstream_char_open_wchar(basic_ofstream_char
*this,
5179 const wchar_t *name
, int mode
, int prot
)
5181 TRACE("(%p %s %d %d)\n", this, debugstr_w(name
), mode
, prot
);
5183 if(!basic_filebuf_char_open_wchar(&this->filebuf
, name
, mode
|OPENMODE_out
, prot
)) {
5184 basic_ios_char
*basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
5185 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
5189 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBGI@Z */
5190 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGI@Z */
5191 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPB_WI@Z */
5192 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WI@Z */
5193 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_wchar_old
, 12)
5194 void __thiscall
basic_ofstream_char_open_wchar_old(basic_ofstream_char
*this,
5195 const wchar_t *name
, unsigned int mode
)
5197 basic_ofstream_char_open_wchar(this, name
, mode
, _SH_DENYNO
);
5200 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
5201 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
5202 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_rdbuf
, 4)
5203 basic_filebuf_char
* __thiscall
basic_ofstream_char_rdbuf(const basic_ofstream_char
*this)
5205 TRACE("(%p)\n", this);
5206 return (basic_filebuf_char
*)&this->filebuf
;
5209 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
5210 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
5211 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor
, 8)
5212 basic_ifstream_char
* __thiscall
basic_ifstream_char_ctor(basic_ifstream_char
*this, MSVCP_bool virt_init
)
5214 basic_ios_char
*basic_ios
;
5216 TRACE("(%p %d)\n", this, virt_init
);
5219 this->base
.vbtable
= basic_ifstream_char_vbtable
;
5220 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
5221 basic_ios_char_ctor(basic_ios
);
5223 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
5226 basic_filebuf_char_ctor(&this->filebuf
);
5227 basic_istream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
, FALSE
);
5228 basic_ios
->base
.vtable
= &MSVCP_basic_ifstream_char_vtable
;
5232 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
5233 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
5234 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_file
, 12)
5235 basic_ifstream_char
* __thiscall
basic_ifstream_char_ctor_file(
5236 basic_ifstream_char
*this, FILE *file
, MSVCP_bool virt_init
)
5238 basic_ios_char
*basic_ios
;
5240 TRACE("(%p %p %d)\n", this, file
, virt_init
);
5243 this->base
.vbtable
= basic_ifstream_char_vbtable
;
5244 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
5245 basic_ios_char_ctor(basic_ios
);
5247 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
5250 basic_filebuf_char_ctor_file(&this->filebuf
, file
);
5251 basic_istream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
, FALSE
);
5252 basic_ios
->base
.vtable
= &MSVCP_basic_ifstream_char_vtable
;
5256 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PBDHH@Z */
5257 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDHH@Z */
5258 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_name
, 20)
5259 basic_ifstream_char
* __thiscall
basic_ifstream_char_ctor_name(basic_ifstream_char
*this,
5260 const char *name
, int mode
, int prot
, MSVCP_bool virt_init
)
5262 TRACE("(%p %s %d %d %d)\n", this, name
, mode
, prot
, virt_init
);
5264 basic_ifstream_char_ctor(this, virt_init
);
5266 if(!basic_filebuf_char_open(&this->filebuf
, name
, mode
|OPENMODE_in
, prot
)) {
5267 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
5268 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
5273 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PBGHH@Z */
5274 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEBGHH@Z */
5275 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PB_WHH@Z */
5276 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEB_WHH@Z */
5277 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_name_wchar
, 20)
5278 basic_ifstream_char
* __thiscall
basic_ifstream_char_ctor_name_wchar(basic_ifstream_char
*this,
5279 const wchar_t *name
, int mode
, int prot
, MSVCP_bool virt_init
)
5281 TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name
), mode
, prot
, virt_init
);
5283 basic_ifstream_char_ctor(this, virt_init
);
5285 if(!basic_filebuf_char_open_wchar(&this->filebuf
, name
, mode
|OPENMODE_in
, prot
)) {
5286 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
5287 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
5292 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
5293 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
5294 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_dtor
, 4)
5295 void __thiscall
basic_ifstream_char_dtor(basic_ifstream_char
*this)
5297 TRACE("(%p)\n", this);
5299 basic_istream_char_dtor(&this->base
);
5300 basic_filebuf_char_dtor(&this->filebuf
);
5303 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5304 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5305 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_vbase_dtor
, 4)
5306 void __thiscall
basic_ifstream_char_vbase_dtor(basic_ifstream_char
*this)
5308 TRACE("(%p)\n", this);
5310 basic_ifstream_char_dtor(this);
5311 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base
));
5314 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ifstream_char_vector_dtor
, 8)
5315 basic_ifstream_char
* __thiscall
MSVCP_basic_ifstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
5317 basic_ifstream_char
*this = (basic_ifstream_char
*)((char*)base
- basic_ifstream_char_vbtable
[1] + basic_ifstream_char_vbtable
[0]);
5319 TRACE("(%p %x)\n", this, flags
);
5322 /* we have an array, with the number of elements stored before the first object */
5323 int i
, *ptr
= (int *)this-1;
5325 for(i
=*ptr
-1; i
>=0; i
--)
5326 basic_ifstream_char_vbase_dtor(this+i
);
5327 MSVCRT_operator_delete(ptr
);
5329 basic_ifstream_char_vbase_dtor(this);
5331 MSVCRT_operator_delete(this);
5337 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5338 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5339 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_close
, 4)
5340 void __thiscall
basic_ifstream_char_close(basic_ifstream_char
*this)
5342 TRACE("(%p)\n", this);
5344 if(!basic_filebuf_char_close(&this->filebuf
)) {
5345 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
5346 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
5350 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
5351 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
5352 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_is_open
, 4)
5353 MSVCP_bool __thiscall
basic_ifstream_char_is_open(const basic_ifstream_char
*this)
5355 TRACE("(%p)\n", this);
5356 return basic_filebuf_char_is_open(&this->filebuf
);
5359 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDHH@Z */
5360 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDHH@Z */
5361 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open
, 16)
5362 void __thiscall
basic_ifstream_char_open(basic_ifstream_char
*this,
5363 const char *name
, int mode
, int prot
)
5365 TRACE("(%p %s %d %d)\n", this, name
, mode
, prot
);
5367 if(!basic_filebuf_char_open(&this->filebuf
, name
, mode
|OPENMODE_in
, prot
)) {
5368 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
5369 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
5373 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDI@Z */
5374 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDI@Z */
5375 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_old
, 12)
5376 void __thiscall
basic_ifstream_char_open_old(basic_ifstream_char
*this,
5377 const char *name
, unsigned int mode
)
5379 basic_ifstream_char_open(this, name
, mode
, _SH_DENYNO
);
5382 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBGHH@Z */
5383 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGHH@Z */
5384 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPB_WHH@Z */
5385 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WHH@Z */
5386 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_wchar
, 16)
5387 void __thiscall
basic_ifstream_char_open_wchar(basic_ifstream_char
*this,
5388 const wchar_t *name
, int mode
, int prot
)
5390 TRACE("(%p %s %d %d)\n", this, debugstr_w(name
), mode
, prot
);
5392 if(!basic_filebuf_char_open_wchar(&this->filebuf
, name
, mode
|OPENMODE_in
, prot
)) {
5393 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
5394 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
5398 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBGI@Z */
5399 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGI@Z */
5400 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPB_WI@Z */
5401 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WI@Z */
5402 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_wchar_old
, 12)
5403 void __thiscall
basic_ifstream_char_open_wchar_old(basic_ifstream_char
*this,
5404 const wchar_t *name
, unsigned int mode
)
5406 basic_ifstream_char_open_wchar(this, name
, mode
, _SH_DENYNO
);
5409 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
5410 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
5411 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_rdbuf
, 4)
5412 basic_filebuf_char
* __thiscall
basic_ifstream_char_rdbuf(const basic_ifstream_char
*this)
5414 TRACE("(%p)\n", this);
5415 return (basic_filebuf_char
*)&this->filebuf
;
5418 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
5419 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
5420 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor
, 8)
5421 basic_fstream_char
* __thiscall
basic_fstream_char_ctor(basic_fstream_char
*this, MSVCP_bool virt_init
)
5423 basic_ios_char
*basic_ios
;
5425 TRACE("(%p %d)\n", this, virt_init
);
5428 this->base
.base1
.vbtable
= basic_fstream_char_vbtable1
;
5429 this->base
.base2
.vbtable
= basic_fstream_char_vbtable2
;
5430 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
5431 basic_ios_char_ctor(basic_ios
);
5433 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
5436 basic_filebuf_char_ctor(&this->filebuf
);
5437 basic_iostream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
);
5438 basic_ios
->base
.vtable
= &MSVCP_basic_fstream_char_vtable
;
5442 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
5443 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
5444 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_file
, 12)
5445 basic_fstream_char
* __thiscall
basic_fstream_char_ctor_file(basic_fstream_char
*this,
5446 FILE *file
, MSVCP_bool virt_init
)
5448 basic_ios_char
*basic_ios
;
5450 TRACE("(%p %p %d)\n", this, file
, virt_init
);
5453 this->base
.base1
.vbtable
= basic_fstream_char_vbtable1
;
5454 this->base
.base2
.vbtable
= basic_fstream_char_vbtable2
;
5455 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
5456 basic_ios_char_ctor(basic_ios
);
5458 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
5461 basic_filebuf_char_ctor_file(&this->filebuf
, file
);
5462 basic_iostream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
);
5463 basic_ios
->base
.vtable
= &MSVCP_basic_fstream_char_vtable
;
5467 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PBDHH@Z */
5468 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDHH@Z */
5469 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_name
, 20)
5470 basic_fstream_char
* __thiscall
basic_fstream_char_ctor_name(basic_fstream_char
*this,
5471 const char *name
, int mode
, int prot
, MSVCP_bool virt_init
)
5473 TRACE("(%p %s %d %d %d)\n", this, name
, mode
, prot
, virt_init
);
5475 basic_fstream_char_ctor(this, virt_init
);
5477 if(!basic_filebuf_char_open(&this->filebuf
, name
, mode
, prot
)) {
5478 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
5479 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
5484 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PBGHH@Z */
5485 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEBGHH@Z */
5486 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PB_WHH@Z */
5487 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEB_WHH@Z */
5488 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_name_wchar
, 20)
5489 basic_fstream_char
* __thiscall
basic_fstream_char_ctor_name_wchar(basic_fstream_char
*this,
5490 const wchar_t *name
, int mode
, int prot
, MSVCP_bool virt_init
)
5492 TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name
), mode
, prot
, virt_init
);
5494 basic_fstream_char_ctor(this, virt_init
);
5496 if(!basic_filebuf_char_open_wchar(&this->filebuf
, name
, mode
, prot
)) {
5497 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
5498 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
5503 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
5504 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
5505 DEFINE_THISCALL_WRAPPER(basic_fstream_char_dtor
, 4)
5506 void __thiscall
basic_fstream_char_dtor(basic_fstream_char
*this)
5508 TRACE("(%p)\n", this);
5510 basic_iostream_char_dtor(&this->base
);
5511 basic_filebuf_char_dtor(&this->filebuf
);
5514 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5515 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5516 DEFINE_THISCALL_WRAPPER(basic_fstream_char_vbase_dtor
, 4)
5517 void __thiscall
basic_fstream_char_vbase_dtor(basic_fstream_char
*this)
5519 TRACE("(%p)\n", this);
5521 basic_fstream_char_dtor(this);
5522 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base
.base1
));
5525 DEFINE_THISCALL_WRAPPER(MSVCP_basic_fstream_char_vector_dtor
, 8)
5526 basic_fstream_char
* __thiscall
MSVCP_basic_fstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
5528 basic_fstream_char
*this = (basic_fstream_char
*)((char*)base
- basic_fstream_char_vbtable1
[1] + basic_fstream_char_vbtable1
[0]);
5530 TRACE("(%p %x)\n", this, flags
);
5533 /* we have an array, with the number of elements stored before the first object */
5534 int i
, *ptr
= (int *)this-1;
5536 for(i
=*ptr
-1; i
>=0; i
--)
5537 basic_fstream_char_vbase_dtor(this+i
);
5538 MSVCRT_operator_delete(ptr
);
5540 basic_fstream_char_vbase_dtor(this);
5542 MSVCRT_operator_delete(this);
5548 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5549 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5550 DEFINE_THISCALL_WRAPPER(basic_fstream_char_close
, 4)
5551 void __thiscall
basic_fstream_char_close(basic_fstream_char
*this)
5553 TRACE("(%p)\n", this);
5555 if(!basic_filebuf_char_close(&this->filebuf
)) {
5556 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
5557 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
5561 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
5562 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
5563 DEFINE_THISCALL_WRAPPER(basic_fstream_char_is_open
, 4)
5564 MSVCP_bool __thiscall
basic_fstream_char_is_open(const basic_fstream_char
*this)
5566 TRACE("(%p)\n", this);
5567 return basic_filebuf_char_is_open(&this->filebuf
);
5570 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDHH@Z */
5571 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDHH@Z */
5572 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open
, 16)
5573 void __thiscall
basic_fstream_char_open(basic_fstream_char
*this,
5574 const char *name
, int mode
, int prot
)
5576 TRACE("(%p %s %d %d)\n", this, name
, mode
, prot
);
5578 if(!basic_filebuf_char_open(&this->filebuf
, name
, mode
, prot
)) {
5579 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
5580 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
5584 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDI@Z */
5585 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDI@Z */
5586 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_old
, 12)
5587 void __thiscall
basic_fstream_char_open_old(basic_fstream_char
*this,
5588 const char *name
, unsigned int mode
)
5590 basic_fstream_char_open(this, name
, mode
, _SH_DENYNO
);
5593 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBGHH@Z */
5594 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGHH@Z */
5595 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPB_WHH@Z */
5596 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WHH@Z */
5597 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_wchar
, 16)
5598 void __thiscall
basic_fstream_char_open_wchar(basic_fstream_char
*this,
5599 const wchar_t *name
, int mode
, int prot
)
5601 TRACE("(%p %s %d %d)\n", this, debugstr_w(name
), mode
, prot
);
5603 if(!basic_filebuf_char_open_wchar(&this->filebuf
, name
, mode
, prot
)) {
5604 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
5605 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
5609 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBGI@Z */
5610 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGI@Z */
5611 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPB_WI@Z */
5612 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WI@Z */
5613 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_wchar_old
, 12)
5614 void __thiscall
basic_fstream_char_open_wchar_old(basic_fstream_char
*this,
5615 const wchar_t *name
, unsigned int mode
)
5617 basic_fstream_char_open_wchar(this, name
, mode
, _SH_DENYNO
);
5620 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
5621 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
5622 DEFINE_THISCALL_WRAPPER(basic_fstream_char_rdbuf
, 4)
5623 basic_filebuf_char
* __thiscall
basic_fstream_char_rdbuf(const basic_fstream_char
*this)
5625 TRACE("(%p)\n", this);
5626 return (basic_filebuf_char
*)&this->filebuf
;
5629 static void __cdecl
setprecision_func(ios_base
*base
, streamsize prec
)
5631 ios_base_precision_set(base
, prec
);
5634 /* ?setprecision@std@@YA?AU?$_Smanip@H@1@H@Z */
5635 /* ?setprecision@std@@YA?AU?$_Smanip@_J@1@_J@Z */
5636 manip_streamsize
* __cdecl
setprecision(manip_streamsize
*ret
, streamsize prec
)
5638 TRACE("(%p %ld)\n", ret
, prec
);
5640 ret
->pfunc
= setprecision_func
;
5645 static void __cdecl
setw_func(ios_base
*base
, streamsize width
)
5647 ios_base_width_set(base
, width
);
5650 /* ?setw@std@@YA?AU?$_Smanip@H@1@H@Z */
5651 /* ?setw@std@@YA?AU?$_Smanip@_J@1@_J@Z */
5652 manip_streamsize
* __cdecl
setw(manip_streamsize
*ret
, streamsize width
)
5654 TRACE("(%p %ld)\n", ret
, width
);
5656 ret
->pfunc
= setw_func
;
5661 static basic_filebuf_char filebuf_stdin
;
5662 /* ?cin@std@@3V?$basic_istream@DU?$char_traits@D@std@@@1@A */
5664 basic_istream_char obj
;
5665 basic_ios_char vbase
;
5667 /* ?_Ptr_cin@std@@3PAV?$basic_istream@DU?$char_traits@D@std@@@1@A */
5668 /* ?_Ptr_cin@std@@3PEAV?$basic_istream@DU?$char_traits@D@std@@@1@EA */
5669 basic_istream_char
*_Ptr_cin
= &cin
.obj
;
5671 static basic_filebuf_char filebuf_stdout
;
5672 /* ?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
5674 basic_ostream_char obj
;
5675 basic_ios_char vbase
;
5677 /* ?_Ptr_cout@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
5678 /* ?_Ptr_cout@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
5679 basic_ostream_char
*_Ptr_cout
= &cout
.obj
;
5681 static basic_filebuf_char filebuf_stderr
;
5682 /* ?cerr@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
5684 basic_ostream_char obj
;
5685 basic_ios_char vbase
;
5687 /* ?_Ptr_cerr@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
5688 /* ?_Ptr_cerr@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
5689 basic_ostream_char
*_Ptr_cerr
= &cerr
.obj
;
5693 basic_filebuf_char_ctor_file(&filebuf_stdin
, stdin
);
5694 basic_istream_char_ctor(&cin
.obj
, &filebuf_stdin
.base
, FALSE
/*FIXME*/, TRUE
);
5696 basic_filebuf_char_ctor_file(&filebuf_stdout
, stdout
);
5697 basic_ostream_char_ctor(&cout
.obj
, &filebuf_stdout
.base
, FALSE
/*FIXME*/, TRUE
);
5699 basic_filebuf_char_ctor_file(&filebuf_stderr
, stderr
);
5700 basic_ostream_char_ctor(&cerr
.obj
, &filebuf_stderr
.base
, FALSE
/*FIXME*/, TRUE
);
5705 basic_istream_char_dtor(&cin
.obj
);
5706 basic_filebuf_char_dtor(&filebuf_stdin
);
5708 basic_ostream_char_dtor(&cout
.obj
);
5709 basic_filebuf_char_dtor(&filebuf_stdout
);
5711 basic_ostream_char_dtor(&cerr
.obj
);
5712 basic_filebuf_char_dtor(&filebuf_stderr
);