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(msvcp
);
32 /* ?_Index@ios_base@std@@0HA */
33 int ios_base_Index
= 0;
34 /* ?_Sync@ios_base@std@@0_NA */
35 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(%Id %I64d %d)", fpos
->off
, fpos
->pos
, fpos
->state
);
49 void (__cdecl
*pfunc
)(ios_base
*, streamsize
);
54 void (__cdecl
*pfunc
)(ios_base
*, int);
62 } basic_filebuf__Initfl
;
65 basic_streambuf_char base
;
69 basic_string_char
*str
;
76 basic_streambuf_wchar base
;
80 basic_string_char
*str
;
84 } basic_filebuf_wchar
;
87 STRINGBUF_allocated
= 1,
88 STRINGBUF_no_write
= 2,
89 STRINGBUF_no_read
= 4,
92 } basic_stringbuf_state
;
95 basic_streambuf_char base
;
100 char allocator
; /* empty struct */
101 } basic_stringbuf_char
;
104 basic_streambuf_wchar base
;
109 char allocator
; /* empty struct */
110 } basic_stringbuf_wchar
;
114 basic_streambuf_char
*strbuf
;
115 struct _basic_ostream_char
*stream
;
121 basic_streambuf_wchar
*strbuf
;
122 struct _basic_ostream_wchar
*stream
;
126 typedef struct _basic_ostream_char
{
128 /* virtual inheritance
129 * basic_ios_char basic_ios;
131 } basic_ostream_char
;
133 typedef struct _basic_ostream_wchar
{
135 /* virtual inheritance
136 * basic_ios_wchar basic_ios;
138 } basic_ostream_wchar
;
143 /* virtual inheritance
144 * basic_ios_char basic_ios;
146 } basic_istream_char
;
151 /* virtual inheritance
152 * basic_ios_wchar basic_ios;
154 } basic_istream_wchar
;
157 basic_istream_char base1
;
158 basic_ostream_char base2
;
159 /* virtual inheritance
160 * basic_ios_char basic_ios;
162 } basic_iostream_char
;
165 basic_istream_wchar base1
;
166 basic_ostream_wchar base2
;
167 /* virtual inheritance
168 * basic_ios_wchar basic_ios;
170 } basic_iostream_wchar
;
173 basic_ostream_char base
;
174 basic_filebuf_char filebuf
;
175 /* virtual inheritance
176 * basic_ios_char basic_ios;
178 } basic_ofstream_char
;
181 basic_ostream_wchar base
;
182 basic_filebuf_wchar filebuf
;
183 /* virtual inheritance
184 * basic_ios_wchar basic_ios;
186 } basic_ofstream_wchar
;
189 basic_istream_char base
;
190 basic_filebuf_char filebuf
;
191 /* virtual inheritance
192 * basic_ios_char basic_ios;
194 } basic_ifstream_char
;
197 basic_istream_wchar base
;
198 basic_filebuf_wchar filebuf
;
199 /* virtual inheritance
200 * basic_ios_wchar basic_ios;
202 } basic_ifstream_wchar
;
205 basic_iostream_char base
;
206 basic_filebuf_char filebuf
;
207 /* virtual inheritance
208 * basic_ios_char basic_ios;
210 } basic_fstream_char
;
213 basic_iostream_wchar base
;
214 basic_filebuf_wchar filebuf
;
215 /* virtual inheritance
216 * basic_ios_char basic_ios;
218 } basic_fstream_wchar
;
221 basic_ostream_char base
;
222 basic_stringbuf_char strbuf
;
223 /* virtual inheritance
224 * basic_ios_char basic_ios;
226 } basic_ostringstream_char
;
229 basic_ostream_wchar base
;
230 basic_stringbuf_wchar strbuf
;
231 /* virtual inheritance
232 * basic_ios_wchar basic_ios;
234 } basic_ostringstream_wchar
;
237 basic_istream_char base
;
238 basic_stringbuf_char strbuf
;
239 /* virtual inheritance
240 * basic_ios_char basic_ios;
242 } basic_istringstream_char
;
245 basic_istream_wchar base
;
246 basic_stringbuf_wchar strbuf
;
247 /* virtual inheritance
248 * basic_ios_wchar basic_ios;
250 } basic_istringstream_wchar
;
253 basic_iostream_char base
;
254 basic_stringbuf_char strbuf
;
255 /* virtual inheritance
256 * basic_ios_char basic_ios;
258 } basic_stringstream_char
;
261 basic_iostream_wchar base
;
262 basic_stringbuf_wchar strbuf
;
263 /* virtual inheritance
264 * basic_ios_wchar basic_ios;
266 } basic_stringstream_wchar
;
269 STRSTATE_Allocated
= 1,
270 STRSTATE_Constant
= 2,
271 STRSTATE_Dynamic
= 4,
273 } strstreambuf__Strstate
;
276 basic_streambuf_char base
;
281 void* (__cdecl
*palloc
)(size_t);
282 void (__cdecl
*pfree
)(void*);
286 basic_ostream_char base
;
288 /* virtual inheritance
289 * basic_ios_char basic_ios;
294 basic_istream_char base
;
296 /* virtual inheritance
297 * basic_ios_char basic_ios;
302 basic_iostream_char base
;
304 /* virtual inheritance
305 * basic_ios_char basic_ios;
309 #define VBTABLE_ALIGN 4
311 extern const vtable_ptr iosb_vtable
;
313 /* ??_7ios_base@std@@6B@ */
314 extern const vtable_ptr ios_base_vtable
;
316 /* ??_7?$basic_ios@DU?$char_traits@D@std@@@std@@6B@ */
317 extern const vtable_ptr basic_ios_char_vtable
;
319 /* ??_7?$basic_ios@GU?$char_traits@G@std@@@std@@6B@ */
320 extern const vtable_ptr basic_ios_short_vtable
;
322 /* ??_7?$basic_streambuf@DU?$char_traits@D@std@@@std@@6B@ */
323 extern const vtable_ptr basic_streambuf_char_vtable
;
325 /* ??_7?$basic_streambuf@GU?$char_traits@G@std@@@std@@6B@ */
326 extern const vtable_ptr basic_streambuf_short_vtable
;
328 /* ??_7?$basic_filebuf@DU?$char_traits@D@std@@@std@@6B@ */
329 extern const vtable_ptr basic_filebuf_char_vtable
;
331 /* ??_7?$basic_filebuf@GU?$char_traits@G@std@@@std@@6B@ */
332 extern const vtable_ptr basic_filebuf_short_vtable
;
334 /* ??_7?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
335 extern const vtable_ptr basic_stringbuf_char_vtable
;
337 /* ??_7?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
338 extern const vtable_ptr basic_stringbuf_short_vtable
;
340 /* ??_8?$basic_ostream@DU?$char_traits@D@std@@@std@@7B@ */
341 const int basic_ostream_char_vbtable
[] = {0, ALIGNED_SIZE(sizeof(basic_ostream_char
), VBTABLE_ALIGN
)};
342 /* ??_7?$basic_ostream@DU?$char_traits@D@std@@@std@@6B@ */
343 extern const vtable_ptr basic_ostream_char_vtable
;
345 /* ??_8?$basic_ostream@GU?$char_traits@G@std@@@std@@7B@ */
346 const int basic_ostream_short_vbtable
[] = {0, ALIGNED_SIZE(sizeof(basic_ostream_wchar
), VBTABLE_ALIGN
)};
347 /* ??_7?$basic_ostream@GU?$char_traits@G@std@@@std@@6B@ */
348 extern const vtable_ptr basic_ostream_short_vtable
;
350 /* ??_8?$basic_istream@DU?$char_traits@D@std@@@std@@7B@ */
351 const int basic_istream_char_vbtable
[] = {0, ALIGNED_SIZE(sizeof(basic_istream_char
), VBTABLE_ALIGN
)};
352 /* ??_7?$basic_istream@DU?$char_traits@D@std@@@std@@6B@ */
353 extern const vtable_ptr basic_istream_char_vtable
;
355 /* ??_8?$basic_istream@GU?$char_traits@G@std@@@std@@7B@ */
356 const int basic_istream_short_vbtable
[] = {0, ALIGNED_SIZE(sizeof(basic_istream_wchar
), VBTABLE_ALIGN
)};
357 /* ??_7?$basic_istream@GU?$char_traits@G@std@@@std@@6B@ */
358 extern const vtable_ptr basic_istream_short_vtable
;
360 /* ??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
361 const int basic_iostream_char_vbtable1
[] = {0, ALIGNED_SIZE(sizeof(basic_iostream_char
), VBTABLE_ALIGN
)};
362 /* ??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
363 const int basic_iostream_char_vbtable2
[] = {0, ALIGNED_SIZE(sizeof(basic_iostream_char
), VBTABLE_ALIGN
)-FIELD_OFFSET(basic_iostream_char
, base2
)};
364 /* ??_7?$basic_iostream@DU?$char_traits@D@std@@@std@@6B@ */
365 extern const vtable_ptr basic_iostream_char_vtable
;
367 /* ??_8?$basic_iostream@GU?$char_traits@G@std@@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@ */
368 const int basic_iostream_short_vbtable1
[] = {0, ALIGNED_SIZE(sizeof(basic_iostream_wchar
), VBTABLE_ALIGN
)};
369 /* ??_8?$basic_iostream@GU?$char_traits@G@std@@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@ */
370 const int basic_iostream_short_vbtable2
[] = {0, ALIGNED_SIZE(sizeof(basic_iostream_wchar
), VBTABLE_ALIGN
)-FIELD_OFFSET(basic_iostream_wchar
, base2
)};
371 /* ??_7?$basic_iostream@GU?$char_traits@G@std@@@std@@6B@ */
372 extern const vtable_ptr basic_iostream_short_vtable
;
374 /* ??_8?$basic_ofstream@DU?$char_traits@D@std@@@std@@7B@ */
375 const int basic_ofstream_char_vbtable
[] = {0, sizeof(basic_ofstream_char
)};
376 /* ??_7?$basic_ofstream@DU?$char_traits@D@std@@@std@@6B@ */
377 extern const vtable_ptr basic_ofstream_char_vtable
;
379 /* ??_8?$basic_ofstream@GU?$char_traits@G@std@@@std@@7B@ */
380 const int basic_ofstream_short_vbtable
[] = {0, sizeof(basic_ofstream_wchar
)};
381 /* ??_7?$basic_ofstream@GU?$char_traits@G@std@@@std@@6B@ */
382 extern const vtable_ptr basic_ofstream_short_vtable
;
384 /* ??_8?$basic_ifstream@DU?$char_traits@D@std@@@std@@7B@ */
385 const int basic_ifstream_char_vbtable
[] = {0, sizeof(basic_ifstream_char
)};
386 /* ??_7?$basic_ifstream@DU?$char_traits@D@std@@@std@@6B@ */
387 extern const vtable_ptr basic_ifstream_char_vtable
;
389 /* ??_8?$basic_ifstream@GU?$char_traits@G@std@@@std@@7B@ */
390 const int basic_ifstream_short_vbtable
[] = {0, sizeof(basic_ifstream_wchar
)};
391 /* ??_7?$basic_ifstream@GU?$char_traits@G@std@@@std@@6B@ */
392 extern const vtable_ptr basic_ifstream_short_vtable
;
394 /* ??_8?$basic_fstream@DU?$char_traits@D@std@@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
395 const int basic_fstream_char_vbtable1
[] = {0, sizeof(basic_fstream_char
)};
396 /* ??_8?$basic_fstream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
397 const int basic_fstream_char_vbtable2
[] = {0, sizeof(basic_fstream_char
)-FIELD_OFFSET(basic_fstream_char
, base
.base2
)};
398 /* ??_7?$basic_fstream@DU?$char_traits@D@std@@@std@@6B@ */
399 extern const vtable_ptr basic_fstream_char_vtable
;
401 /* ??_8?$basic_fstream@GU?$char_traits@G@std@@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@ */
402 const int basic_fstream_short_vbtable1
[] = {0, sizeof(basic_fstream_wchar
)};
403 /* ??_8?$basic_fstream@GU?$char_traits@G@std@@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@ */
404 const int basic_fstream_short_vbtable2
[] = {0, sizeof(basic_fstream_wchar
)-FIELD_OFFSET(basic_fstream_wchar
, base
.base2
)};
405 /* ??_7?$basic_fstream@GU?$char_traits@G@std@@@std@@6B@ */
406 extern const vtable_ptr basic_fstream_short_vtable
;
408 /* ??_8?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B@ */
409 const int basic_ostringstream_char_vbtable
[] = {0, sizeof(basic_ostringstream_char
)};
410 /* ??_7?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
411 extern const vtable_ptr basic_ostringstream_char_vtable
;
413 /* ??_8?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B@ */
414 const int basic_ostringstream_short_vbtable
[] = {0, sizeof(basic_ostringstream_wchar
)};
415 /* ??_7?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
416 extern const vtable_ptr basic_ostringstream_short_vtable
;
418 /* ??_8?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B@ */
419 const int basic_istringstream_char_vbtable
[] = {0, sizeof(basic_istringstream_char
)};
420 /* ??_7?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
421 extern const vtable_ptr basic_istringstream_char_vtable
;
423 /* ??_8?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B@ */
424 const int basic_istringstream_short_vbtable
[] = {0, sizeof(basic_istringstream_wchar
)};
425 /* ??_7?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
426 extern const vtable_ptr basic_istringstream_short_vtable
;
428 /* ??_8?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
429 const int basic_stringstream_char_vbtable1
[] = {0, sizeof(basic_stringstream_char
)};
430 /* ??_8?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
431 const int basic_stringstream_char_vbtable2
[] = {0, sizeof(basic_stringstream_char
)-FIELD_OFFSET(basic_stringstream_char
, base
.base2
)};
432 /* ??_7?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
433 extern const vtable_ptr basic_stringstream_char_vtable
;
435 /* ??_8?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@ */
436 const int basic_stringstream_short_vbtable1
[] = {0, sizeof(basic_stringstream_wchar
)};
437 /* ??_8?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@ */
438 const int basic_stringstream_short_vbtable2
[] = {0, sizeof(basic_stringstream_wchar
)-FIELD_OFFSET(basic_stringstream_wchar
, base
.base2
)};
439 /* ??_7?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
440 extern const vtable_ptr basic_stringstream_short_vtable
;
442 /* ??_7strstreambuf@std@@6B */
443 extern const vtable_ptr strstreambuf_vtable
;
445 static const int ostrstream_vbtable
[] = {0, sizeof(ostrstream
)};
446 extern const vtable_ptr ostrstream_vtable
;
448 static const int istrstream_vbtable
[] = {0, sizeof(istrstream
)};
450 static const int strstream_vbtable1
[] = {0, sizeof(strstream
)};
451 static const int strstream_vbtable2
[] = {0, sizeof(strstream
)-FIELD_OFFSET(strstream
, base
.base2
)};
452 extern const vtable_ptr strstream_vtable
;
454 DEFINE_RTTI_DATA0(iosb
, 0, ".?AV?$_Iosb@H@std@@")
455 DEFINE_RTTI_DATA1(ios_base
, 0, &iosb_rtti_base_descriptor
, ".?AV?$_Iosb@H@std@@")
456 DEFINE_RTTI_DATA2(basic_ios_char
, 0, &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
457 ".?AV?$basic_ios@DU?$char_traits@D@std@@@std@@")
458 DEFINE_RTTI_DATA2(basic_ios_short
, 0, &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
459 ".?AV?$basic_ios@GU?$char_traits@G@std@@@std@@")
460 DEFINE_RTTI_DATA0(basic_streambuf_char
, 0,
461 ".?AV?$basic_streambuf@DU?$char_traits@D@std@@@std@@")
462 DEFINE_RTTI_DATA0(basic_streambuf_short
, 0,
463 ".?AV?$basic_streambuf@GU?$char_traits@G@std@@@std@@")
464 DEFINE_RTTI_DATA1(basic_filebuf_char
, 0, &basic_streambuf_char_rtti_base_descriptor
,
465 ".?AV?$basic_filebuf@DU?$char_traits@D@std@@@std@@")
466 DEFINE_RTTI_DATA1(basic_filebuf_short
, 0, &basic_streambuf_short_rtti_base_descriptor
,
467 ".?AV?$basic_filebuf@GU?$char_traits@G@std@@@std@@")
468 DEFINE_RTTI_DATA1(basic_stringbuf_char
, 0, &basic_streambuf_char_rtti_base_descriptor
,
469 ".?AV?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@")
470 DEFINE_RTTI_DATA1(basic_stringbuf_short
, 0, &basic_streambuf_short_rtti_base_descriptor
,
471 ".?AV?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@")
472 DEFINE_RTTI_DATA3(basic_ostream_char
, sizeof(basic_ostream_char
), &basic_ios_char_rtti_base_descriptor
,
473 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
474 ".?AV?$basic_ostream@DU?$char_traits@D@std@@@std@@")
475 DEFINE_RTTI_DATA3(basic_ostream_short
, sizeof(basic_ostream_wchar
), &basic_ios_short_rtti_base_descriptor
,
476 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
477 ".?AV?$basic_ostream@GU?$char_traits@G@std@@@std@@")
478 DEFINE_RTTI_DATA3(basic_istream_char
, sizeof(basic_istream_char
), &basic_ios_char_rtti_base_descriptor
,
479 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
480 ".?AV?$basic_istream@DU?$char_traits@D@std@@@std@@")
481 DEFINE_RTTI_DATA3(basic_istream_short
, sizeof(basic_istream_wchar
), &basic_ios_short_rtti_base_descriptor
,
482 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
483 ".?AV?$basic_istream@GU?$char_traits@G@std@@@std@@")
484 DEFINE_RTTI_DATA8(basic_iostream_char
, sizeof(basic_iostream_char
),
485 &basic_istream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
486 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
487 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
488 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
489 ".?AV?$basic_iostream@DU?$char_traits@D@std@@@std@@")
490 DEFINE_RTTI_DATA8(basic_iostream_short
, sizeof(basic_iostream_wchar
),
491 &basic_istream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
492 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
493 &basic_ostream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
494 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
495 ".?AV?$basic_iostream@GU?$char_traits@G@std@@@std@@")
496 DEFINE_RTTI_DATA4(basic_ofstream_char
, sizeof(basic_ofstream_char
),
497 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
498 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
499 ".?AV?$basic_ofstream@DU?$char_traits@D@std@@@std@@")
500 DEFINE_RTTI_DATA4(basic_ofstream_short
, sizeof(basic_ofstream_wchar
),
501 &basic_ostream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
502 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
503 ".?AV?$basic_ofstream@GU?$char_traits@G@std@@@std@@")
504 DEFINE_RTTI_DATA4(basic_ifstream_char
, sizeof(basic_ifstream_char
),
505 &basic_istream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
506 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
507 ".?AV?$basic_ifstream@DU?$char_traits@D@std@@@std@@")
508 DEFINE_RTTI_DATA4(basic_ifstream_short
, sizeof(basic_ifstream_wchar
),
509 &basic_istream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
510 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
511 ".?AV?$basic_ifstream@GU?$char_traits@G@std@@@std@@")
512 DEFINE_RTTI_DATA8(basic_fstream_char
, sizeof(basic_fstream_char
),
513 &basic_istream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
514 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
515 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
516 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
517 ".?AV?$basic_fstream@DU?$char_traits@D@std@@@std@@")
518 DEFINE_RTTI_DATA8(basic_fstream_short
, sizeof(basic_fstream_wchar
),
519 &basic_istream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
520 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
521 &basic_ostream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
522 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
523 ".?AV?$basic_fstream@GU?$char_traits@G@std@@@std@@")
524 DEFINE_RTTI_DATA4(basic_ostringstream_char
, sizeof(basic_ostringstream_char
),
525 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
526 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
527 ".?AV?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@")
528 DEFINE_RTTI_DATA4(basic_ostringstream_short
, sizeof(basic_ostringstream_wchar
),
529 &basic_ostream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
530 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
531 ".?AV?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@")
532 DEFINE_RTTI_DATA4(basic_istringstream_char
, sizeof(basic_istringstream_char
),
533 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
534 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
535 ".?AV?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@")
536 DEFINE_RTTI_DATA4(basic_istringstream_short
, sizeof(basic_istringstream_wchar
),
537 &basic_ostream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
538 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
539 ".?AV?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@")
540 DEFINE_RTTI_DATA8(basic_stringstream_char
, sizeof(basic_stringstream_char
),
541 &basic_istream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
542 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
543 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
544 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
545 ".?AV?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@")
546 DEFINE_RTTI_DATA8(basic_stringstream_short
, sizeof(basic_stringstream_wchar
),
547 &basic_istream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
548 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
549 &basic_ostream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
550 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
551 ".?AV?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@")
552 DEFINE_RTTI_DATA1(strstreambuf
, sizeof(strstreambuf
),
553 &basic_streambuf_char_rtti_base_descriptor
, ".?AVstrstreambuf@std@@")
554 DEFINE_RTTI_DATA4(ostrstream
, sizeof(ostrstream
),
555 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
556 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
557 "?AVostrstream@std@@")
558 DEFINE_RTTI_DATA8(strstream
, sizeof(strstream
),
559 &basic_istream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
560 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
561 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
562 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
563 "?AVstrstream@std@@")
565 __ASM_BLOCK_BEGIN(ios_vtables
)
567 VTABLE_ADD_FUNC(iosb_vector_dtor
));
568 __ASM_VTABLE(ios_base
,
569 VTABLE_ADD_FUNC(ios_base_vector_dtor
));
570 __ASM_VTABLE(basic_ios_char
,
571 VTABLE_ADD_FUNC(basic_ios_char_vector_dtor
));
572 __ASM_VTABLE(basic_ios_short
,
573 VTABLE_ADD_FUNC(basic_ios_short_vector_dtor
));
574 __ASM_VTABLE(basic_streambuf_char
,
575 VTABLE_ADD_FUNC(basic_streambuf_char_vector_dtor
)
576 VTABLE_ADD_FUNC(basic_streambuf_char_overflow
)
577 VTABLE_ADD_FUNC(basic_streambuf_char_pbackfail
)
578 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc
)
579 VTABLE_ADD_FUNC(basic_streambuf_char_underflow
)
580 VTABLE_ADD_FUNC(basic_streambuf_char_uflow
)
581 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn
)
582 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn
)
583 VTABLE_ADD_FUNC(basic_streambuf_char_seekoff
)
584 VTABLE_ADD_FUNC(basic_streambuf_char_seekpos
)
585 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf
)
586 VTABLE_ADD_FUNC(basic_streambuf_char_sync
)
587 VTABLE_ADD_FUNC(basic_streambuf_char_imbue
));
588 __ASM_VTABLE(basic_streambuf_short
,
589 VTABLE_ADD_FUNC(basic_streambuf_wchar_vector_dtor
)
590 VTABLE_ADD_FUNC(basic_streambuf_wchar_overflow
)
591 VTABLE_ADD_FUNC(basic_streambuf_wchar_pbackfail
)
592 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc
)
593 VTABLE_ADD_FUNC(basic_streambuf_wchar_underflow
)
594 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow
)
595 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn
)
596 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn
)
597 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekoff
)
598 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekpos
)
599 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf
)
600 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync
)
601 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue
));
602 __ASM_VTABLE(basic_filebuf_char
,
603 VTABLE_ADD_FUNC(basic_filebuf_char_vector_dtor
)
604 VTABLE_ADD_FUNC(basic_filebuf_char_overflow
)
605 VTABLE_ADD_FUNC(basic_filebuf_char_pbackfail
)
606 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc
)
607 VTABLE_ADD_FUNC(basic_filebuf_char_underflow
)
608 VTABLE_ADD_FUNC(basic_filebuf_char_uflow
)
609 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn
)
610 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn
)
611 VTABLE_ADD_FUNC(basic_filebuf_char_seekoff
)
612 VTABLE_ADD_FUNC(basic_filebuf_char_seekpos
)
613 VTABLE_ADD_FUNC(basic_filebuf_char_setbuf
)
614 VTABLE_ADD_FUNC(basic_filebuf_char_sync
)
615 VTABLE_ADD_FUNC(basic_streambuf_char_imbue
));
616 __ASM_VTABLE(basic_filebuf_short
,
617 VTABLE_ADD_FUNC(basic_filebuf_short_vector_dtor
)
618 VTABLE_ADD_FUNC(basic_filebuf_short_overflow
)
619 VTABLE_ADD_FUNC(basic_filebuf_short_pbackfail
)
620 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc
)
621 VTABLE_ADD_FUNC(basic_filebuf_short_underflow
)
622 VTABLE_ADD_FUNC(basic_filebuf_short_uflow
)
623 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn
)
624 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn
)
625 VTABLE_ADD_FUNC(basic_filebuf_short_seekoff
)
626 VTABLE_ADD_FUNC(basic_filebuf_short_seekpos
)
627 VTABLE_ADD_FUNC(basic_filebuf_short_setbuf
)
628 VTABLE_ADD_FUNC(basic_filebuf_short_sync
)
629 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue
));
630 __ASM_VTABLE(basic_stringbuf_char
,
631 VTABLE_ADD_FUNC(basic_stringbuf_char_vector_dtor
)
632 VTABLE_ADD_FUNC(basic_stringbuf_char_overflow
)
633 VTABLE_ADD_FUNC(basic_stringbuf_char_pbackfail
)
634 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc
)
635 VTABLE_ADD_FUNC(basic_stringbuf_char_underflow
)
636 VTABLE_ADD_FUNC(basic_streambuf_char_uflow
)
637 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn
)
638 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn
)
639 VTABLE_ADD_FUNC(basic_stringbuf_char_seekoff
)
640 VTABLE_ADD_FUNC(basic_stringbuf_char_seekpos
)
641 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf
)
642 VTABLE_ADD_FUNC(basic_streambuf_char_sync
)
643 VTABLE_ADD_FUNC(basic_streambuf_char_imbue
));
644 __ASM_VTABLE(basic_stringbuf_short
,
645 VTABLE_ADD_FUNC(basic_stringbuf_short_vector_dtor
)
646 VTABLE_ADD_FUNC(basic_stringbuf_short_overflow
)
647 VTABLE_ADD_FUNC(basic_stringbuf_short_pbackfail
)
648 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc
)
649 VTABLE_ADD_FUNC(basic_stringbuf_short_underflow
)
650 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow
)
651 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn
)
652 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn
)
653 VTABLE_ADD_FUNC(basic_stringbuf_short_seekoff
)
654 VTABLE_ADD_FUNC(basic_stringbuf_short_seekpos
)
655 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf
)
656 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync
)
657 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue
));
658 __ASM_VTABLE(basic_ostream_char
,
659 VTABLE_ADD_FUNC(basic_ostream_char_vector_dtor
));
660 __ASM_VTABLE(basic_ostream_short
,
661 VTABLE_ADD_FUNC(basic_ostream_short_vector_dtor
));
662 __ASM_VTABLE(basic_istream_char
,
663 VTABLE_ADD_FUNC(basic_istream_char_vector_dtor
));
664 __ASM_VTABLE(basic_istream_short
,
665 VTABLE_ADD_FUNC(basic_istream_short_vector_dtor
));
666 __ASM_VTABLE(basic_iostream_char
,
667 VTABLE_ADD_FUNC(basic_iostream_char_vector_dtor
));
668 __ASM_VTABLE(basic_iostream_short
,
669 VTABLE_ADD_FUNC(basic_iostream_short_vector_dtor
));
670 __ASM_VTABLE(basic_ofstream_char
,
671 VTABLE_ADD_FUNC(basic_ofstream_char_vector_dtor
));
672 __ASM_VTABLE(basic_ofstream_short
,
673 VTABLE_ADD_FUNC(basic_ofstream_short_vector_dtor
));
674 __ASM_VTABLE(basic_ifstream_char
,
675 VTABLE_ADD_FUNC(basic_ifstream_char_vector_dtor
));
676 __ASM_VTABLE(basic_ifstream_short
,
677 VTABLE_ADD_FUNC(basic_ifstream_short_vector_dtor
));
678 __ASM_VTABLE(basic_fstream_char
,
679 VTABLE_ADD_FUNC(basic_fstream_char_vector_dtor
));
680 __ASM_VTABLE(basic_fstream_short
,
681 VTABLE_ADD_FUNC(basic_fstream_short_vector_dtor
));
682 __ASM_VTABLE(basic_ostringstream_char
,
683 VTABLE_ADD_FUNC(basic_ostringstream_char_vector_dtor
));
684 __ASM_VTABLE(basic_ostringstream_short
,
685 VTABLE_ADD_FUNC(basic_ostringstream_short_vector_dtor
));
686 __ASM_VTABLE(basic_istringstream_char
,
687 VTABLE_ADD_FUNC(basic_istringstream_char_vector_dtor
));
688 __ASM_VTABLE(basic_istringstream_short
,
689 VTABLE_ADD_FUNC(basic_istringstream_short_vector_dtor
));
690 __ASM_VTABLE(basic_stringstream_char
,
691 VTABLE_ADD_FUNC(basic_stringstream_char_vector_dtor
));
692 __ASM_VTABLE(basic_stringstream_short
,
693 VTABLE_ADD_FUNC(basic_stringstream_short_vector_dtor
));
694 __ASM_VTABLE(strstreambuf
,
695 VTABLE_ADD_FUNC(strstreambuf_vector_dtor
)
696 VTABLE_ADD_FUNC(strstreambuf_overflow
)
697 VTABLE_ADD_FUNC(strstreambuf_pbackfail
)
698 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc
)
699 VTABLE_ADD_FUNC(strstreambuf_underflow
)
700 VTABLE_ADD_FUNC(basic_streambuf_char_uflow
)
701 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn
)
702 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn
)
703 VTABLE_ADD_FUNC(strstreambuf_seekoff
)
704 VTABLE_ADD_FUNC(strstreambuf_seekpos
)
705 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf
)
706 VTABLE_ADD_FUNC(basic_streambuf_char_sync
)
707 VTABLE_ADD_FUNC(basic_streambuf_char_imbue
));
708 __ASM_VTABLE(ostrstream
,
709 VTABLE_ADD_FUNC(ostrstream_vector_dtor
));
710 __ASM_VTABLE(strstream
,
711 VTABLE_ADD_FUNC(strstream_vector_dtor
));
714 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
715 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
716 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp_next
, 16)
717 void __thiscall
basic_streambuf_char_setp_next(basic_streambuf_char
*this, char *first
, char *next
, char *last
)
719 TRACE("(%p %p %p %p)\n", this, first
, next
, last
);
723 this->wsize
= last
-next
;
726 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD0@Z */
727 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD0@Z */
728 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp
, 12)
729 void __thiscall
basic_streambuf_char_setp(basic_streambuf_char
*this, char *first
, char *last
)
731 basic_streambuf_char_setp_next(this, first
, first
, last
);
734 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
735 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
736 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setg
, 16)
737 void __thiscall
basic_streambuf_char_setg(basic_streambuf_char
*this, char *first
, char *next
, char *last
)
739 TRACE("(%p %p %p %p)\n", this, first
, next
, last
);
743 this->rsize
= last
-next
;
746 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXXZ */
747 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXXZ */
748 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init_empty
, 4)
749 void __thiscall
basic_streambuf_char__Init_empty(basic_streambuf_char
*this)
751 TRACE("(%p)\n", this);
753 this->prbuf
= &this->rbuf
;
754 this->pwbuf
= &this->wbuf
;
755 this->prpos
= &this->rpos
;
756 this->pwpos
= &this->wpos
;
757 this->prsize
= &this->rsize
;
758 this->pwsize
= &this->wsize
;
760 basic_streambuf_char_setp(this, NULL
, NULL
);
761 basic_streambuf_char_setg(this, NULL
, NULL
, NULL
);
764 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@W4_Uninitialized@1@@Z */
765 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
766 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor_uninitialized
, 8)
767 basic_streambuf_char
* __thiscall
basic_streambuf_char_ctor_uninitialized(basic_streambuf_char
*this, int uninitialized
)
769 TRACE("(%p %d)\n", this, uninitialized
);
770 this->vtable
= &basic_streambuf_char_vtable
;
774 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@XZ */
775 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@XZ */
776 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor
, 4)
777 basic_streambuf_char
* __thiscall
basic_streambuf_char_ctor(basic_streambuf_char
*this)
779 TRACE("(%p)\n", this);
781 this->vtable
= &basic_streambuf_char_vtable
;
782 locale_ctor(IOS_LOCALE(this));
783 basic_streambuf_char__Init_empty(this);
788 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
789 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
790 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_dtor
, 4)
791 void __thiscall
basic_streambuf_char_dtor(basic_streambuf_char
*this)
793 TRACE("(%p)\n", this);
794 locale_dtor(IOS_LOCALE(this));
797 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_vector_dtor
, 8)
798 basic_streambuf_char
* __thiscall
basic_streambuf_char_vector_dtor(basic_streambuf_char
*this, unsigned int flags
)
800 TRACE("(%p %x)\n", this, flags
);
802 /* we have an array, with the number of elements stored before the first object */
803 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
805 for(i
=*ptr
-1; i
>=0; i
--)
806 basic_streambuf_char_dtor(this+i
);
807 operator_delete(ptr
);
809 basic_streambuf_char_dtor(this);
811 operator_delete(this);
817 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
818 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
819 static streamsize
basic_streambuf_char__Gnavail(const basic_streambuf_char
*this)
821 TRACE("(%p)\n", this);
822 return *this->prpos
? *this->prsize
: 0;
825 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
826 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
827 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gndec
, 4)
828 char* __thiscall
basic_streambuf_char__Gndec(basic_streambuf_char
*this)
830 TRACE("(%p)\n", this);
836 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
837 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
838 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gninc
, 4)
839 char* __thiscall
basic_streambuf_char__Gninc(basic_streambuf_char
*this)
841 TRACE("(%p)\n", this);
843 return (*this->prpos
)++;
846 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
847 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
848 static char* basic_streambuf_char__Gnpreinc(basic_streambuf_char
*this)
850 TRACE("(%p)\n", this);
856 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAPAD0PAH001@Z */
857 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAPEAD0PEAH001@Z */
858 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init
, 28)
859 void __thiscall
basic_streambuf_char__Init(basic_streambuf_char
*this, char **gf
, char **gn
, int *gc
, char **pf
, char **pn
, int *pc
)
861 TRACE("(%p %p %p %p %p %p %p)\n", this, gf
, gn
, gc
, pf
, pn
, pc
);
871 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
872 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
873 static streamsize
basic_streambuf_char__Pnavail(const basic_streambuf_char
*this)
875 TRACE("(%p)\n", this);
876 return *this->pwpos
? *this->pwsize
: 0;
879 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
880 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
881 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Pninc
, 4)
882 char* __thiscall
basic_streambuf_char__Pninc(basic_streambuf_char
*this)
884 TRACE("(%p)\n", this);
886 return (*this->pwpos
)++;
889 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
890 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
891 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_underflow
, 4)
892 #define call_basic_streambuf_char_underflow(this) CALL_VTBL_FUNC(this, 16, int, (basic_streambuf_char*), (this))
893 int __thiscall
basic_streambuf_char_underflow(basic_streambuf_char
*this)
895 TRACE("(%p)\n", this);
899 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
900 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
901 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_uflow
, 4)
902 #define call_basic_streambuf_char_uflow(this) CALL_VTBL_FUNC(this, 20, int, (basic_streambuf_char*), (this))
903 int __thiscall
basic_streambuf_char_uflow(basic_streambuf_char
*this)
907 TRACE("(%p)\n", this);
909 if(call_basic_streambuf_char_underflow(this)==EOF
)
912 ret
= (unsigned char)**this->prpos
;
918 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
919 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
920 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_eback
, 4)
921 char* __thiscall
basic_streambuf_char_eback(const basic_streambuf_char
*this)
923 TRACE("(%p)\n", this);
927 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
928 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
929 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gptr
, 4)
930 char* __thiscall
basic_streambuf_char_gptr(const basic_streambuf_char
*this)
932 TRACE("(%p)\n", this);
936 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
937 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
938 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_egptr
, 4)
939 char* __thiscall
basic_streambuf_char_egptr(const basic_streambuf_char
*this)
941 TRACE("(%p)\n", this);
942 return *this->prpos
+*this->prsize
;
945 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
946 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
947 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_epptr
, 4)
948 char* __thiscall
basic_streambuf_char_epptr(const basic_streambuf_char
*this)
950 TRACE("(%p)\n", this);
951 return *this->pwpos
+*this->pwsize
;
954 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
955 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
956 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gbump
, 8)
957 void __thiscall
basic_streambuf_char_gbump(basic_streambuf_char
*this, int off
)
959 TRACE("(%p %d)\n", this, off
);
961 *this->prsize
-= off
;
964 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@XZ */
965 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QBE?AVlocale@2@XZ */
966 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@XZ */
967 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEBA?AVlocale@2@XZ */
968 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_getloc
, 8)
969 locale
* __thiscall
basic_streambuf_char_getloc(const basic_streambuf_char
*this, locale
*ret
)
971 TRACE("(%p)\n", this);
972 return locale_copy_ctor(ret
, IOS_LOCALE(this));
975 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
976 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */
977 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_imbue
, 8)
978 #define call_basic_streambuf_char_imbue(this, loc) CALL_VTBL_FUNC(this, 48, void, (basic_streambuf_char*, const locale*), (this, loc))
979 void __thiscall
basic_streambuf_char_imbue(basic_streambuf_char
*this, const locale
*loc
)
981 TRACE("(%p %p)\n", this, loc
);
984 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
985 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
986 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_overflow
, 8)
987 #define call_basic_streambuf_char_overflow(this, ch) CALL_VTBL_FUNC(this, 4, int, (basic_streambuf_char*, int), (this, ch))
988 int __thiscall
basic_streambuf_char_overflow(basic_streambuf_char
*this, int ch
)
990 TRACE("(%p %d)\n", this, ch
);
994 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
995 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
996 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbackfail
, 8)
997 #define call_basic_streambuf_char_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, int, (basic_streambuf_char*, int), (this, ch))
998 int __thiscall
basic_streambuf_char_pbackfail(basic_streambuf_char
*this, int ch
)
1000 TRACE("(%p %d)\n", this, ch
);
1004 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1005 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1006 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbase
, 4)
1007 char* __thiscall
basic_streambuf_char_pbase(const basic_streambuf_char
*this)
1009 TRACE("(%p)\n", this);
1010 return *this->pwbuf
;
1013 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
1014 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
1015 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbump
, 8)
1016 void __thiscall
basic_streambuf_char_pbump(basic_streambuf_char
*this, int off
)
1018 TRACE("(%p %d)\n", this, off
);
1019 *this->pwpos
+= off
;
1020 *this->pwsize
-= off
;
1023 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1024 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1025 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pptr
, 4)
1026 char* __thiscall
basic_streambuf_char_pptr(const basic_streambuf_char
*this)
1028 TRACE("(%p)\n", this);
1029 return *this->pwpos
;
1032 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1033 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1034 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubimbue
, 12)
1035 locale
* __thiscall
basic_streambuf_char_pubimbue(basic_streambuf_char
*this, locale
*ret
, const locale
*loc
)
1037 TRACE("(%p %p)\n", this, loc
);
1038 memcpy(ret
, IOS_LOCALE(this), sizeof(locale
));
1039 call_basic_streambuf_char_imbue(this, loc
);
1040 locale_copy_ctor(IOS_LOCALE(this), loc
);
1044 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
1045 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
1046 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1047 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1048 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekoff
, 20)
1049 #define call_basic_streambuf_char_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 32, fpos_int*, (basic_streambuf_char*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
1050 fpos_int
* __thiscall
basic_streambuf_char_seekoff(basic_streambuf_char
*this,
1051 fpos_int
*ret
, streamoff off
, int way
, int mode
)
1053 TRACE("(%p %Id %d %d)\n", this, off
, way
, mode
);
1060 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
1061 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
1062 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JFF@Z */
1063 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JFF@Z */
1064 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
1065 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
1066 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekoff
, 20)
1067 fpos_int
* __thiscall
basic_streambuf_char_pubseekoff(basic_streambuf_char
*this,
1068 fpos_int
*ret
, streamoff off
, int way
, int mode
)
1070 TRACE("(%p %Id %d %d)\n", this, off
, way
, mode
);
1071 return call_basic_streambuf_char_seekoff(this, ret
, off
, way
, mode
);
1074 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
1075 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
1076 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekpos
, 36)
1077 #define call_basic_streambuf_char_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 36, fpos_int*, (basic_streambuf_char*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
1078 fpos_int
* __thiscall
basic_streambuf_char_seekpos(basic_streambuf_char
*this,
1079 fpos_int
*ret
, fpos_int pos
, int mode
)
1081 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
1088 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
1089 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
1090 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekpos
, 36)
1091 fpos_int
* __thiscall
basic_streambuf_char_pubseekpos(basic_streambuf_char
*this,
1092 fpos_int
*ret
, fpos_int pos
, int mode
)
1094 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
1095 return call_basic_streambuf_char_seekpos(this, ret
, pos
, mode
);
1098 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEPAV12@PADH@Z */
1099 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAPEAV12@PEAD_J@Z */
1100 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setbuf
, 12)
1101 #define call_basic_streambuf_char_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 40, basic_streambuf_char*, (basic_streambuf_char*, char*, streamsize), (this, buf, count))
1102 basic_streambuf_char
* __thiscall
basic_streambuf_char_setbuf(basic_streambuf_char
*this, char *buf
, streamsize count
)
1104 TRACE("(%p %p %Id)\n", this, buf
, count
);
1108 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PADH@Z */
1109 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEAD_J@Z */
1110 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsetbuf
, 12)
1111 basic_streambuf_char
* __thiscall
basic_streambuf_char_pubsetbuf(basic_streambuf_char
*this, char *buf
, streamsize count
)
1113 TRACE("(%p %p %Id)\n", this, buf
, count
);
1114 return call_basic_streambuf_char_setbuf(this, buf
, count
);
1117 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1118 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
1119 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sync
, 4)
1120 #define call_basic_streambuf_char_sync(this) CALL_VTBL_FUNC(this, 44, int, (basic_streambuf_char*), (this))
1121 int __thiscall
basic_streambuf_char_sync(basic_streambuf_char
*this)
1123 TRACE("(%p)\n", this);
1127 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1128 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1129 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsync
, 4)
1130 int __thiscall
basic_streambuf_char_pubsync(basic_streambuf_char
*this)
1132 TRACE("(%p)\n", this);
1133 return call_basic_streambuf_char_sync(this);
1136 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADH@Z */
1137 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_J@Z */
1138 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsgetn
, 12)
1139 #define call_basic_streambuf_char_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, streamsize, (basic_streambuf_char*, char*, streamsize), (this, ptr, count))
1140 streamsize __thiscall
basic_streambuf_char_xsgetn(basic_streambuf_char
*this, char *ptr
, streamsize count
)
1142 streamsize copied
, chunk
;
1145 TRACE("(%p %p %Id)\n", this, ptr
, count
);
1147 for(copied
=0; copied
<count
;) {
1148 chunk
= basic_streambuf_char__Gnavail(this);
1149 if(chunk
> count
-copied
)
1150 chunk
= count
-copied
;
1153 memcpy(ptr
+copied
, *this->prpos
, chunk
);
1154 *this->prpos
+= chunk
;
1155 *this->prsize
-= chunk
;
1157 }else if((c
= call_basic_streambuf_char_uflow(this)) != EOF
) {
1168 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
1169 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
1170 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetn
, 12)
1171 streamsize __thiscall
basic_streambuf_char_sgetn(basic_streambuf_char
*this, char *ptr
, streamsize count
)
1173 TRACE("(%p %p %Id)\n", this, ptr
, count
);
1174 return call_basic_streambuf_char_xsgetn(this, ptr
, count
);
1177 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1178 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JXZ */
1179 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_showmanyc
, 4)
1180 #define call_basic_streambuf_char_showmanyc(this) CALL_VTBL_FUNC(this, 12, streamsize, (basic_streambuf_char*), (this))
1181 streamsize __thiscall
basic_streambuf_char_showmanyc(basic_streambuf_char
*this)
1183 TRACE("(%p)\n", this);
1187 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1188 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JXZ */
1189 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_in_avail
, 4)
1190 streamsize __thiscall
basic_streambuf_char_in_avail(basic_streambuf_char
*this)
1194 TRACE("(%p)\n", this);
1196 ret
= basic_streambuf_char__Gnavail(this);
1197 return ret
? ret
: call_basic_streambuf_char_showmanyc(this);
1200 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
1201 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
1202 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputbackc
, 8)
1203 int __thiscall
basic_streambuf_char_sputbackc(basic_streambuf_char
*this, char ch
)
1205 TRACE("(%p %d)\n", this, ch
);
1206 if(*this->prpos
&& *this->prpos
>*this->prbuf
&& (*this->prpos
)[-1]==ch
) {
1209 return (unsigned char)ch
;
1212 return call_basic_streambuf_char_pbackfail(this, (unsigned char)ch
);
1215 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
1216 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
1217 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputc
, 8)
1218 int __thiscall
basic_streambuf_char_sputc(basic_streambuf_char
*this, char ch
)
1220 TRACE("(%p %d)\n", this, ch
);
1221 return basic_streambuf_char__Pnavail(this) ?
1222 (unsigned char)(*basic_streambuf_char__Pninc(this) = ch
) :
1223 call_basic_streambuf_char_overflow(this, (unsigned char)ch
);
1226 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1227 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1228 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sungetc
, 4)
1229 int __thiscall
basic_streambuf_char_sungetc(basic_streambuf_char
*this)
1231 TRACE("(%p)\n", this);
1232 if(*this->prpos
&& *this->prpos
>*this->prbuf
) {
1235 return (unsigned char)**this->prpos
;
1238 return call_basic_streambuf_char_pbackfail(this, EOF
);
1241 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1242 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1243 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_stossc
, 4)
1244 void __thiscall
basic_streambuf_char_stossc(basic_streambuf_char
*this)
1246 TRACE("(%p)\n", this);
1247 if(basic_streambuf_char__Gnavail(this))
1248 basic_streambuf_char__Gninc(this);
1250 call_basic_streambuf_char_uflow(this);
1253 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1254 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1255 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sbumpc
, 4)
1256 int __thiscall
basic_streambuf_char_sbumpc(basic_streambuf_char
*this)
1258 TRACE("(%p)\n", this);
1259 return basic_streambuf_char__Gnavail(this) ?
1260 (int)(unsigned char)*basic_streambuf_char__Gninc(this) : call_basic_streambuf_char_uflow(this);
1263 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1264 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1265 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetc
, 4)
1266 int __thiscall
basic_streambuf_char_sgetc(basic_streambuf_char
*this)
1268 TRACE("(%p)\n", this);
1269 return basic_streambuf_char__Gnavail(this) ?
1270 (int)(unsigned char)*basic_streambuf_char_gptr(this) : call_basic_streambuf_char_underflow(this);
1273 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1274 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1275 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_snextc
, 4)
1276 int __thiscall
basic_streambuf_char_snextc(basic_streambuf_char
*this)
1278 TRACE("(%p)\n", this);
1280 if(basic_streambuf_char__Gnavail(this) > 1)
1281 return (unsigned char)*basic_streambuf_char__Gnpreinc(this);
1282 return basic_streambuf_char_sbumpc(this)==EOF
?
1283 EOF
: basic_streambuf_char_sgetc(this);
1286 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPBDH@Z */
1287 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEBD_J@Z */
1288 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsputn
, 12)
1289 #define call_basic_streambuf_char_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 28, streamsize, (basic_streambuf_char*, const char*, streamsize), (this, ptr, count))
1290 streamsize __thiscall
basic_streambuf_char_xsputn(basic_streambuf_char
*this, const char *ptr
, streamsize count
)
1292 streamsize copied
, chunk
;
1294 TRACE("(%p %p %Id)\n", this, ptr
, count
);
1296 for(copied
=0; copied
<count
;) {
1297 chunk
= basic_streambuf_char__Pnavail(this);
1298 if(chunk
> count
-copied
)
1299 chunk
= count
-copied
;
1302 memcpy(*this->pwpos
, ptr
+copied
, chunk
);
1303 *this->pwpos
+= chunk
;
1304 *this->pwsize
-= chunk
;
1306 }else if(call_basic_streambuf_char_overflow(this, (unsigned char)ptr
[copied
]) != EOF
) {
1316 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z */
1317 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEBD_J@Z */
1318 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputn
, 12)
1319 streamsize __thiscall
basic_streambuf_char_sputn(basic_streambuf_char
*this, const char *ptr
, streamsize count
)
1321 TRACE("(%p %p %Id)\n", this, ptr
, count
);
1322 return call_basic_streambuf_char_xsputn(this, ptr
, count
);
1325 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
1326 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1327 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp_next
, 16)
1328 void __thiscall
basic_streambuf_wchar_setp_next(basic_streambuf_wchar
*this, wchar_t *first
, wchar_t *next
, wchar_t *last
)
1330 TRACE("(%p %p %p %p)\n", this, first
, next
, last
);
1334 this->wsize
= last
-next
;
1337 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG0@Z */
1338 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG0@Z */
1339 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp
, 12)
1340 void __thiscall
basic_streambuf_wchar_setp(basic_streambuf_wchar
*this, wchar_t *first
, wchar_t *last
)
1342 basic_streambuf_wchar_setp_next(this, first
, first
, last
);
1345 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
1346 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1347 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setg
, 16)
1348 void __thiscall
basic_streambuf_wchar_setg(basic_streambuf_wchar
*this, wchar_t *first
, wchar_t *next
, wchar_t *last
)
1350 TRACE("(%p %p %p %p)\n", this, first
, next
, last
);
1354 this->rsize
= last
-next
;
1357 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXXZ */
1358 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXXZ */
1359 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init_empty
, 4)
1360 void __thiscall
basic_streambuf_wchar__Init_empty(basic_streambuf_wchar
*this)
1362 TRACE("(%p)\n", this);
1364 this->prbuf
= &this->rbuf
;
1365 this->pwbuf
= &this->wbuf
;
1366 this->prpos
= &this->rpos
;
1367 this->pwpos
= &this->wpos
;
1368 this->prsize
= &this->rsize
;
1369 this->pwsize
= &this->wsize
;
1371 basic_streambuf_wchar_setp(this, NULL
, NULL
);
1372 basic_streambuf_wchar_setg(this, NULL
, NULL
, NULL
);
1375 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@W4_Uninitialized@1@@Z */
1376 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
1377 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor_uninitialized
, 8)
1378 basic_streambuf_wchar
* __thiscall
basic_streambuf_short_ctor_uninitialized(basic_streambuf_wchar
*this, int uninitialized
)
1380 TRACE("(%p %d)\n", this, uninitialized
);
1381 this->vtable
= &basic_streambuf_short_vtable
;
1385 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@XZ */
1386 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@XZ */
1387 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor
, 4)
1388 basic_streambuf_wchar
* __thiscall
basic_streambuf_short_ctor(basic_streambuf_wchar
*this)
1390 TRACE("(%p)\n", this);
1392 this->vtable
= &basic_streambuf_short_vtable
;
1393 locale_ctor(IOS_LOCALE(this));
1394 basic_streambuf_wchar__Init_empty(this);
1399 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UAE@XZ */
1400 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */
1401 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_dtor
, 4)
1402 void __thiscall
basic_streambuf_wchar_dtor(basic_streambuf_wchar
*this)
1404 TRACE("(%p)\n", this);
1405 locale_dtor(IOS_LOCALE(this));
1408 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_vector_dtor
, 8)
1409 basic_streambuf_wchar
* __thiscall
basic_streambuf_wchar_vector_dtor(basic_streambuf_wchar
*this, unsigned int flags
)
1411 TRACE("(%p %x)\n", this, flags
);
1413 /* we have an array, with the number of elements stored before the first object */
1414 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1416 for(i
=*ptr
-1; i
>=0; i
--)
1417 basic_streambuf_wchar_dtor(this+i
);
1418 operator_delete(ptr
);
1420 basic_streambuf_wchar_dtor(this);
1422 operator_delete(this);
1428 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1429 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1430 static streamsize
basic_streambuf_wchar__Gnavail(const basic_streambuf_wchar
*this)
1432 TRACE("(%p)\n", this);
1433 return *this->prpos
? *this->prsize
: 0;
1436 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1437 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1438 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gndec
, 4)
1439 wchar_t* __thiscall
basic_streambuf_wchar__Gndec(basic_streambuf_wchar
*this)
1441 TRACE("(%p)\n", this);
1444 return *this->prpos
;
1447 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1448 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1449 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gninc
, 4)
1450 wchar_t* __thiscall
basic_streambuf_wchar__Gninc(basic_streambuf_wchar
*this)
1452 TRACE("(%p)\n", this);
1454 return (*this->prpos
)++;
1457 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1458 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1459 static wchar_t* basic_streambuf_wchar__Gnpreinc(basic_streambuf_wchar
*this)
1461 TRACE("(%p)\n", this);
1464 return *this->prpos
;
1467 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAPAG0PAH001@Z */
1468 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAPEAG0PEAH001@Z */
1469 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init
, 28)
1470 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
)
1472 TRACE("(%p %p %p %p %p %p %p)\n", this, gf
, gn
, gc
, pf
, pn
, pc
);
1482 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1483 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1484 static streamsize
basic_streambuf_wchar__Pnavail(const basic_streambuf_wchar
*this)
1486 TRACE("(%p)\n", this);
1487 return *this->pwpos
? *this->pwsize
: 0;
1490 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1491 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1492 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Pninc
, 4)
1493 wchar_t* __thiscall
basic_streambuf_wchar__Pninc(basic_streambuf_wchar
*this)
1495 TRACE("(%p)\n", this);
1497 return (*this->pwpos
)++;
1500 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1501 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1502 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_underflow
, 4)
1503 #define call_basic_streambuf_wchar_underflow(this) CALL_VTBL_FUNC(this, 16, unsigned short, (basic_streambuf_wchar*), (this))
1504 unsigned short __thiscall
basic_streambuf_wchar_underflow(basic_streambuf_wchar
*this)
1506 TRACE("(%p)\n", this);
1510 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1511 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1512 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_uflow
, 4)
1513 #define call_basic_streambuf_wchar_uflow(this) CALL_VTBL_FUNC(this, 20, unsigned short, (basic_streambuf_wchar*), (this))
1514 unsigned short __thiscall
basic_streambuf_wchar_uflow(basic_streambuf_wchar
*this)
1518 TRACE("(%p)\n", this);
1520 if(call_basic_streambuf_wchar_underflow(this)==WEOF
)
1523 ret
= **this->prpos
;
1529 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1530 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1531 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_eback
, 4)
1532 wchar_t* __thiscall
basic_streambuf_wchar_eback(const basic_streambuf_wchar
*this)
1534 TRACE("(%p)\n", this);
1535 return *this->prbuf
;
1538 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1539 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1540 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gptr
, 4)
1541 wchar_t* __thiscall
basic_streambuf_wchar_gptr(const basic_streambuf_wchar
*this)
1543 TRACE("(%p)\n", this);
1544 return *this->prpos
;
1547 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1548 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1549 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_egptr
, 4)
1550 wchar_t* __thiscall
basic_streambuf_wchar_egptr(const basic_streambuf_wchar
*this)
1552 TRACE("(%p)\n", this);
1553 return *this->prpos
+*this->prsize
;
1556 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1557 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1558 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_epptr
, 4)
1559 wchar_t* __thiscall
basic_streambuf_wchar_epptr(const basic_streambuf_wchar
*this)
1561 TRACE("(%p)\n", this);
1562 return *this->pwpos
+*this->pwsize
;
1565 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
1566 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
1567 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gbump
, 8)
1568 void __thiscall
basic_streambuf_wchar_gbump(basic_streambuf_wchar
*this, int off
)
1570 TRACE("(%p %d)\n", this, off
);
1571 *this->prpos
+= off
;
1572 *this->prsize
-= off
;
1575 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEXABVlocale@2@@Z */
1576 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAXAEBVlocale@2@@Z */
1577 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_imbue
, 8)
1578 #define call_basic_streambuf_wchar_imbue(this, loc) CALL_VTBL_FUNC(this, 48, void, (basic_streambuf_wchar*, const locale*), (this, loc))
1579 void __thiscall
basic_streambuf_wchar_imbue(basic_streambuf_wchar
*this, const locale
*loc
)
1581 TRACE("(%p %p)\n", this, loc
);
1584 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1585 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1586 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_overflow
, 8)
1587 #define call_basic_streambuf_wchar_overflow(this, ch) CALL_VTBL_FUNC(this, 4, unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1588 unsigned short __thiscall
basic_streambuf_wchar_overflow(basic_streambuf_wchar
*this, unsigned short ch
)
1590 TRACE("(%p %d)\n", this, ch
);
1594 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1595 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1596 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbackfail
, 8)
1597 #define call_basic_streambuf_wchar_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1598 unsigned short __thiscall
basic_streambuf_wchar_pbackfail(basic_streambuf_wchar
*this, unsigned short ch
)
1600 TRACE("(%p %d)\n", this, ch
);
1604 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1605 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1606 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbase
, 4)
1607 wchar_t* __thiscall
basic_streambuf_wchar_pbase(const basic_streambuf_wchar
*this)
1609 TRACE("(%p)\n", this);
1610 return *this->pwbuf
;
1613 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
1614 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
1615 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbump
, 8)
1616 void __thiscall
basic_streambuf_wchar_pbump(basic_streambuf_wchar
*this, int off
)
1618 TRACE("(%p %d)\n", this, off
);
1619 *this->pwpos
+= off
;
1620 *this->pwsize
-= off
;
1623 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1624 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1625 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pptr
, 4)
1626 wchar_t* __thiscall
basic_streambuf_wchar_pptr(const basic_streambuf_wchar
*this)
1628 TRACE("(%p)\n", this);
1629 return *this->pwpos
;
1632 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1633 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1634 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubimbue
, 12)
1635 locale
* __thiscall
basic_streambuf_wchar_pubimbue(basic_streambuf_wchar
*this, locale
*ret
, const locale
*loc
)
1637 TRACE("(%p %p)\n", this, loc
);
1638 memcpy(ret
, IOS_LOCALE(this), sizeof(locale
));
1639 call_basic_streambuf_wchar_imbue(this, loc
);
1640 locale_copy_ctor(IOS_LOCALE(this), loc
);
1644 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
1645 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
1646 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1647 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1648 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekoff
, 20)
1649 #define call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 32, fpos_int*, (basic_streambuf_wchar*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
1650 fpos_int
* __thiscall
basic_streambuf_wchar_seekoff(basic_streambuf_wchar
*this,
1651 fpos_int
*ret
, streamoff off
, int way
, int mode
)
1653 TRACE("(%p %Id %d %d)\n", this, off
, way
, mode
);
1660 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
1661 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
1662 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JFF@Z */
1663 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JFF@Z */
1664 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
1665 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JW4seekdir@ioos_base@2@H@Z */
1666 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekoff
, 20)
1667 fpos_int
* __thiscall
basic_streambuf_wchar_pubseekoff(basic_streambuf_wchar
*this,
1668 fpos_int
*ret
, streamoff off
, int way
, int mode
)
1670 TRACE("(%p %Id %d %d)\n", this, off
, way
, mode
);
1671 return call_basic_streambuf_wchar_seekoff(this, ret
, off
, way
, mode
);
1674 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
1675 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
1676 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekpos
, 36)
1677 #define call_basic_streambuf_wchar_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 36, fpos_int*, (basic_streambuf_wchar*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
1678 fpos_int
* __thiscall
basic_streambuf_wchar_seekpos(basic_streambuf_wchar
*this,
1679 fpos_int
*ret
, fpos_int pos
, int mode
)
1681 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
1688 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
1689 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
1690 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos
, 36)
1691 fpos_int
* __thiscall
basic_streambuf_wchar_pubseekpos(basic_streambuf_wchar
*this,
1692 fpos_int
*ret
, fpos_int pos
, int mode
)
1694 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
1695 return call_basic_streambuf_wchar_seekpos(this, ret
, pos
, mode
);
1698 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEPAV12@PAGH@Z */
1699 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAPEAV12@PEAG_J@Z */
1700 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setbuf
, 12)
1701 #define call_basic_streambuf_wchar_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 40, basic_streambuf_wchar*, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, buf, count))
1702 basic_streambuf_wchar
* __thiscall
basic_streambuf_wchar_setbuf(basic_streambuf_wchar
*this, wchar_t *buf
, streamsize count
)
1704 TRACE("(%p %p %Id)\n", this, buf
, count
);
1708 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PAGH@Z */
1709 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEAG_J@Z */
1710 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsetbuf
, 12)
1711 basic_streambuf_wchar
* __thiscall
basic_streambuf_wchar_pubsetbuf(basic_streambuf_wchar
*this, wchar_t *buf
, streamsize count
)
1713 TRACE("(%p %p %Id)\n", this, buf
, count
);
1714 return call_basic_streambuf_wchar_setbuf(this, buf
, count
);
1717 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
1718 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */
1719 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sync
, 4)
1720 #define call_basic_streambuf_wchar_sync(this) CALL_VTBL_FUNC(this, 44, int, (basic_streambuf_wchar*), (this))
1721 int __thiscall
basic_streambuf_wchar_sync(basic_streambuf_wchar
*this)
1723 TRACE("(%p)\n", this);
1727 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
1728 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHXZ */
1729 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsync
, 4)
1730 int __thiscall
basic_streambuf_wchar_pubsync(basic_streambuf_wchar
*this)
1732 TRACE("(%p)\n", this);
1733 return call_basic_streambuf_wchar_sync(this);
1736 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGH@Z */
1737 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_J@Z */
1738 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsgetn
, 12)
1739 #define call_basic_streambuf_wchar_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, streamsize, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, ptr, count))
1740 streamsize __thiscall
basic_streambuf_wchar_xsgetn(basic_streambuf_wchar
*this, wchar_t *ptr
, streamsize count
)
1742 streamsize copied
, chunk
;
1745 TRACE("(%p %p %Id)\n", this, ptr
, count
);
1747 for(copied
=0; copied
<count
;) {
1748 chunk
= basic_streambuf_wchar__Gnavail(this);
1749 if(chunk
> count
-copied
)
1750 chunk
= count
-copied
;
1753 memcpy(ptr
+copied
, *this->prpos
, chunk
*sizeof(wchar_t));
1754 *this->prpos
+= chunk
;
1755 *this->prsize
-= chunk
;
1757 }else if((c
= call_basic_streambuf_wchar_uflow(this)) != WEOF
) {
1768 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */
1769 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */
1770 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetn
, 12)
1771 streamsize __thiscall
basic_streambuf_wchar_sgetn(basic_streambuf_wchar
*this, wchar_t *ptr
, streamsize count
)
1773 TRACE("(%p %p %Id)\n", this, ptr
, count
);
1774 return call_basic_streambuf_wchar_xsgetn(this, ptr
, count
);
1777 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
1778 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JXZ */
1779 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_showmanyc
, 4)
1780 #define call_basic_streambuf_wchar_showmanyc(this) CALL_VTBL_FUNC(this, 12, streamsize, (basic_streambuf_wchar*), (this))
1781 streamsize __thiscall
basic_streambuf_wchar_showmanyc(basic_streambuf_wchar
*this)
1783 TRACE("(%p)\n", this);
1787 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
1788 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JXZ */
1789 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_in_avail
, 4)
1790 streamsize __thiscall
basic_streambuf_wchar_in_avail(basic_streambuf_wchar
*this)
1794 TRACE("(%p)\n", this);
1796 ret
= basic_streambuf_wchar__Gnavail(this);
1797 return ret
? ret
: call_basic_streambuf_wchar_showmanyc(this);
1800 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
1801 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
1802 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputbackc
, 8)
1803 unsigned short __thiscall
basic_streambuf_wchar_sputbackc(basic_streambuf_wchar
*this, wchar_t ch
)
1805 TRACE("(%p %d)\n", this, ch
);
1806 if(*this->prpos
&& *this->prpos
>*this->prbuf
&& (*this->prpos
)[-1]==ch
) {
1812 return call_basic_streambuf_wchar_pbackfail(this, ch
);
1815 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
1816 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHG@Z */
1817 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputc
, 8)
1818 unsigned short __thiscall
basic_streambuf_wchar_sputc(basic_streambuf_wchar
*this, wchar_t ch
)
1820 TRACE("(%p %d)\n", this, ch
);
1821 return basic_streambuf_wchar__Pnavail(this) ?
1822 (*basic_streambuf_wchar__Pninc(this) = ch
) :
1823 call_basic_streambuf_wchar_overflow(this, ch
);
1826 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1827 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1828 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sungetc
, 4)
1829 unsigned short __thiscall
basic_streambuf_wchar_sungetc(basic_streambuf_wchar
*this)
1831 TRACE("(%p)\n", this);
1832 if(*this->prpos
&& *this->prpos
>*this->prbuf
) {
1835 return **this->prpos
;
1838 return call_basic_streambuf_wchar_pbackfail(this, WEOF
);
1841 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1842 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1843 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_stossc
, 4)
1844 void __thiscall
basic_streambuf_wchar_stossc(basic_streambuf_wchar
*this)
1846 TRACE("(%p)\n", this);
1847 if(basic_streambuf_wchar__Gnavail(this))
1848 basic_streambuf_wchar__Gninc(this);
1850 call_basic_streambuf_wchar_uflow(this);
1853 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1854 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1855 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sbumpc
, 4)
1856 unsigned short __thiscall
basic_streambuf_wchar_sbumpc(basic_streambuf_wchar
*this)
1858 TRACE("(%p)\n", this);
1859 return basic_streambuf_wchar__Gnavail(this) ?
1860 *basic_streambuf_wchar__Gninc(this) : call_basic_streambuf_wchar_uflow(this);
1863 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1864 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1865 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetc
, 4)
1866 unsigned short __thiscall
basic_streambuf_wchar_sgetc(basic_streambuf_wchar
*this)
1868 TRACE("(%p)\n", this);
1869 return basic_streambuf_wchar__Gnavail(this) ?
1870 *basic_streambuf_wchar_gptr(this) : call_basic_streambuf_wchar_underflow(this);
1873 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1874 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1875 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_snextc
, 4)
1876 unsigned short __thiscall
basic_streambuf_wchar_snextc(basic_streambuf_wchar
*this)
1878 TRACE("(%p)\n", this);
1880 if(basic_streambuf_wchar__Gnavail(this) > 1)
1881 return *basic_streambuf_wchar__Gnpreinc(this);
1882 return basic_streambuf_wchar_sbumpc(this)==WEOF
?
1883 WEOF
: basic_streambuf_wchar_sgetc(this);
1886 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPBGH@Z */
1887 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEBG_J@Z */
1888 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsputn
, 12)
1889 #define call_basic_streambuf_wchar_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 28, streamsize, (basic_streambuf_wchar*, const wchar_t*, streamsize), (this, ptr, count))
1890 streamsize __thiscall
basic_streambuf_wchar_xsputn(basic_streambuf_wchar
*this, const wchar_t *ptr
, streamsize count
)
1892 streamsize copied
, chunk
;
1894 TRACE("(%p %p %Id)\n", this, ptr
, count
);
1896 for(copied
=0; copied
<count
;) {
1897 chunk
= basic_streambuf_wchar__Pnavail(this);
1898 if(chunk
> count
-copied
)
1899 chunk
= count
-copied
;
1902 memcpy(*this->pwpos
, ptr
+copied
, chunk
*sizeof(wchar_t));
1903 *this->pwpos
+= chunk
;
1904 *this->pwsize
-= chunk
;
1906 }else if(call_basic_streambuf_wchar_overflow(this, ptr
[copied
]) != WEOF
) {
1916 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPBGH@Z */
1917 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEBG_J@Z */
1918 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputn
, 12)
1919 streamsize __thiscall
basic_streambuf_wchar_sputn(basic_streambuf_wchar
*this, const wchar_t *ptr
, streamsize count
)
1921 TRACE("(%p %p %Id)\n", this, ptr
, count
);
1922 return call_basic_streambuf_wchar_xsputn(this, ptr
, count
);
1925 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
1926 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
1927 int basic_filebuf_char__Init__Stinit
= 0;
1929 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
1930 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
1931 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Init
, 12)
1932 void __thiscall
basic_filebuf_char__Init(basic_filebuf_char
*this, FILE *file
, basic_filebuf__Initfl which
)
1934 TRACE("(%p %p %d)\n", this, file
, which
);
1937 this->state0
= basic_filebuf_char__Init__Stinit
;
1938 this->state
= basic_filebuf_char__Init__Stinit
;
1939 if(which
== INITFL_new
)
1941 this->close
= (which
== INITFL_open
);
1944 basic_streambuf_char__Init_empty(&this->base
);
1946 basic_streambuf_char__Init(&this->base
, &file
->_base
, &file
->_ptr
,
1947 &file
->_cnt
, &file
->_base
, &file
->_ptr
, &file
->_cnt
);
1950 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXXZ */
1951 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXXZ */
1952 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Initcvt
, 4)
1953 void __thiscall
basic_filebuf_char__Initcvt(basic_filebuf_char
*this)
1955 codecvt_char
*cvt
= codecvt_char_use_facet(IOS_LOCALE(&this->base
));
1957 TRACE("(%p)\n", this);
1959 locale__Addfac(&this->loc
, &cvt
->base
.facet
, codecvt_char_id
.id
, LC_CTYPE
);
1960 if(codecvt_base_always_noconv(&cvt
->base
)) {
1963 this->str
= operator_new(sizeof(basic_string_char
));
1964 MSVCP_basic_string_char_ctor(this->str
);
1969 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@XZ */
1970 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@XZ */
1971 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_close
, 4)
1972 basic_filebuf_char
* __thiscall
basic_filebuf_char_close(basic_filebuf_char
*this)
1974 basic_filebuf_char
*ret
= this;
1976 TRACE("(%p)\n", this);
1978 if(!this->file
|| fclose(this->file
))
1981 basic_filebuf_char__Init(this, NULL
, INITFL_close
);
1985 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
1986 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
1987 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_file
, 8)
1988 basic_filebuf_char
* __thiscall
basic_filebuf_char_ctor_file(basic_filebuf_char
*this, FILE *file
)
1990 TRACE("(%p %p)\n", this, file
);
1992 basic_streambuf_char_ctor(&this->base
);
1993 this->base
.vtable
= &basic_filebuf_char_vtable
;
1995 locale_ctor(&this->loc
);
1996 basic_filebuf_char__Init(this, file
, INITFL_new
);
2000 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
2001 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
2002 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor
, 4)
2003 basic_filebuf_char
* __thiscall
basic_filebuf_char_ctor(basic_filebuf_char
*this)
2005 return basic_filebuf_char_ctor_file(this, NULL
);
2008 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
2009 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
2010 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_uninitialized
, 8)
2011 basic_filebuf_char
* __thiscall
basic_filebuf_char_ctor_uninitialized(basic_filebuf_char
*this, int uninitialized
)
2013 TRACE("(%p %d)\n", this, uninitialized
);
2015 basic_streambuf_char_ctor_uninitialized(&this->base
, 0);
2016 this->base
.vtable
= &basic_filebuf_char_vtable
;
2017 locale_ctor(&this->loc
);
2021 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
2022 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
2023 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_dtor
, 4)
2024 void __thiscall
basic_filebuf_char_dtor(basic_filebuf_char
*this)
2026 TRACE("(%p)\n", this);
2029 basic_filebuf_char_close(this);
2031 MSVCP_basic_string_char_dtor(this->str
);
2032 operator_delete(this->str
);
2034 locale_dtor(&this->loc
);
2035 basic_streambuf_char_dtor(&this->base
);
2038 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_vector_dtor
, 8)
2039 basic_filebuf_char
* __thiscall
basic_filebuf_char_vector_dtor(basic_filebuf_char
*this, unsigned int flags
)
2041 TRACE("(%p %x)\n", this, flags
);
2043 /* we have an array, with the number of elements stored before the first object */
2044 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
2046 for(i
=*ptr
-1; i
>=0; i
--)
2047 basic_filebuf_char_dtor(this+i
);
2048 operator_delete(ptr
);
2050 basic_filebuf_char_dtor(this);
2052 operator_delete(this);
2058 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QBE_NXZ */
2059 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
2060 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_is_open
, 4)
2061 bool __thiscall
basic_filebuf_char_is_open(const basic_filebuf_char
*this)
2063 TRACE("(%p)\n", this);
2064 return this->file
!= NULL
;
2067 /* ?_Fiopen@std@@YAPAU_iobuf@@PB_WHH@Z */
2068 /* ?_Fiopen@std@@YAPEAU_iobuf@@PEB_WHH@Z */
2069 static FILE* _Fiopen_wchar(const wchar_t *name
, int mode
, int prot
)
2071 static const struct {
2073 const wchar_t str
[4];
2074 const wchar_t str_bin
[4];
2076 {OPENMODE_out
, L
"w", L
"wb"},
2077 {OPENMODE_out
|OPENMODE_app
, L
"a", L
"ab"},
2078 {OPENMODE_app
, L
"a", L
"ab"},
2079 {OPENMODE_out
|OPENMODE_trunc
, L
"w", L
"wb"},
2080 {OPENMODE_in
, L
"r", L
"rb"},
2081 {OPENMODE_in
|OPENMODE_out
, L
"r+", L
"r+b"},
2082 {OPENMODE_in
|OPENMODE_out
|OPENMODE_trunc
, L
"w+", L
"w+b"},
2083 {OPENMODE_in
|OPENMODE_out
|OPENMODE_app
, L
"a+", L
"a+b"},
2084 {OPENMODE_in
|OPENMODE_app
, L
"a+", L
"a+b"}
2087 int real_mode
= mode
& ~(OPENMODE_ate
|OPENMODE__Nocreate
|OPENMODE__Noreplace
|OPENMODE_binary
);
2091 TRACE("(%s %d %d)\n", debugstr_w(name
), mode
, prot
);
2093 for(mode_idx
=0; mode_idx
<ARRAY_SIZE(str_mode
); mode_idx
++)
2094 if(str_mode
[mode_idx
].mode
== real_mode
)
2096 if(mode_idx
== ARRAY_SIZE(str_mode
))
2099 if((mode
& OPENMODE__Nocreate
) && !(f
= _wfopen(name
, L
"r")))
2104 if((mode
& OPENMODE__Noreplace
) && (mode
& (OPENMODE_out
|OPENMODE_app
))
2105 && (f
= _wfopen(name
, L
"r"))) {
2110 f
= _wfsopen(name
, (mode
& OPENMODE_binary
) ? str_mode
[mode_idx
].str_bin
2111 : str_mode
[mode_idx
].str
, prot
);
2115 if((mode
& OPENMODE_ate
) && fseek(f
, 0, SEEK_END
)) {
2123 /* ?__Fiopen@std@@YAPAU_iobuf@@PBDH@Z */
2124 /* ?__Fiopen@std@@YAPEAU_iobuf@@PEBDH@Z */
2125 FILE* __cdecl
___Fiopen(const char *name
, int mode
)
2127 wchar_t nameW
[FILENAME_MAX
];
2129 TRACE("(%p %d)\n", name
, mode
);
2131 if(mbstowcs_s(NULL
, nameW
, FILENAME_MAX
, name
, FILENAME_MAX
-1) != 0)
2133 return _Fiopen_wchar(nameW
, mode
, _SH_DENYNO
);
2136 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDH@Z */
2137 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDH@Z */
2138 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDI@Z */
2139 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDI@Z */
2140 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_mode
, 12)
2141 basic_filebuf_char
* __thiscall
basic_filebuf_char_open_mode(basic_filebuf_char
*this, const char *name
, unsigned int mode
)
2145 TRACE("(%p %s %d)\n", this, name
, mode
);
2147 if(basic_filebuf_char_is_open(this))
2149 if(!(f
= ___Fiopen(name
, mode
)))
2152 basic_filebuf_char__Init(this, f
, INITFL_open
);
2153 basic_filebuf_char__Initcvt(this);
2157 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDF@Z */
2158 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDF@Z */
2159 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_mode_old
, 12)
2160 basic_filebuf_char
* __thiscall
basic_filebuf_char_open_mode_old(basic_filebuf_char
*this, const char *name
, short mode
)
2162 return basic_filebuf_char_open_mode(this, name
, mode
);
2165 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2166 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2167 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_overflow
, 8)
2168 int __thiscall
basic_filebuf_char_overflow(basic_filebuf_char
*this, int c
)
2170 char *ptr
, ch
= c
, *to_next
;
2171 const char *from_next
;
2175 TRACE("(%p %d)\n", this, c
);
2177 if(!basic_filebuf_char_is_open(this))
2183 return fwrite(&ch
, sizeof(char), 1, this->file
) ? c
: EOF
;
2186 MSVCP_basic_string_char_clear(this->str
);
2187 MSVCP_basic_string_char_append_len_ch(this->str
, 8, '\0');
2188 ptr
= this->str
->ptr
;
2189 ret
= codecvt_char_out(this->cvt
, &this->state
, from_next
, &ch
+1, &from_next
,
2190 ptr
, ptr
+MSVCP_basic_string_char_length(this->str
), &to_next
);
2193 case CODECVT_partial
:
2194 if(from_next
== &ch
)
2197 if(!fwrite(ptr
, to_next
-ptr
, 1, this->file
))
2200 case CODECVT_noconv
:
2201 return fwrite(&ch
, sizeof(char), 1, this->file
) ? c
: EOF
;
2207 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2208 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2209 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_pbackfail
, 8)
2210 int __thiscall
basic_filebuf_char_pbackfail(basic_filebuf_char
*this, int c
)
2212 TRACE("(%p %d)\n", this, c
);
2214 if(!basic_filebuf_char_is_open(this))
2217 if(basic_streambuf_char_gptr(&this->base
)>basic_streambuf_char_eback(&this->base
)
2218 && (c
==EOF
|| (int)(unsigned char)basic_streambuf_char_gptr(&this->base
)[-1]==c
)) {
2219 basic_streambuf_char__Gndec(&this->base
);
2220 return c
==EOF
? !c
: c
;
2221 }else if(c
== EOF
) {
2223 }else if(!this->cvt
) {
2224 return ungetc(c
, this->file
);
2225 }else if(MSVCP_basic_string_char_length(this->str
)) {
2229 b
= e
+this->str
->size
-1;
2230 for(cur
= b
; cur
>=e
; cur
--) {
2231 if(ungetc(*cur
, this->file
) == EOF
) {
2232 for(; cur
<=b
; cur
++)
2237 MSVCP_basic_string_char_clear(this->str
);
2238 this->state
= this->state0
;
2245 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2246 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2247 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_uflow
, 4)
2248 int __thiscall
basic_filebuf_char_uflow(basic_filebuf_char
*this)
2251 const char *buf_next
;
2254 TRACE("(%p)\n", this);
2256 if(!basic_filebuf_char_is_open(this))
2259 if(basic_streambuf_char_gptr(&this->base
) < basic_streambuf_char_egptr(&this->base
))
2260 return (unsigned char)*basic_streambuf_char__Gninc(&this->base
);
2262 c
= fgetc(this->file
);
2263 if(!this->cvt
|| c
==EOF
)
2266 MSVCP_basic_string_char_clear(this->str
);
2267 this->state0
= this->state
;
2269 MSVCP_basic_string_char_append_ch(this->str
, c
);
2270 this->state
= this->state0
;
2272 switch(codecvt_char_in(this->cvt
, &this->state
, this->str
->ptr
,
2273 this->str
->ptr
+this->str
->size
, &buf_next
, &ch
, &ch
+1, &to_next
)) {
2274 case CODECVT_partial
:
2276 case CODECVT_noconv
:
2277 return (unsigned char)this->str
->ptr
[0];
2279 return (unsigned char)ch
;
2284 c
= fgetc(this->file
);
2290 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2291 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2292 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_underflow
, 4)
2293 int __thiscall
basic_filebuf_char_underflow(basic_filebuf_char
*this)
2297 TRACE("(%p)\n", this);
2299 if(basic_streambuf_char_gptr(&this->base
) < basic_streambuf_char_egptr(&this->base
))
2300 return (unsigned char)*basic_streambuf_char_gptr(&this->base
);
2302 ret
= call_basic_streambuf_char_uflow(&this->base
);
2304 ret
= call_basic_streambuf_char_pbackfail(&this->base
, ret
);
2308 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
2309 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
2310 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
2311 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
2312 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekoff
, 20)
2313 fpos_int
* __thiscall
basic_filebuf_char_seekoff(basic_filebuf_char
*this,
2314 fpos_int
*ret
, streamoff off
, int way
, int mode
)
2318 TRACE("(%p %p %Id %d %d)\n", this, ret
, off
, way
, mode
);
2320 if(!basic_filebuf_char_is_open(this) || fseek(this->file
, off
, way
)) {
2327 fgetpos(this->file
, &pos
);
2330 ret
->state
= this->state
;
2334 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2335 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2336 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekpos
, 36)
2337 fpos_int
* __thiscall
basic_filebuf_char_seekpos(basic_filebuf_char
*this,
2338 fpos_int
*ret
, fpos_int pos
, int mode
)
2342 TRACE("(%p %p %s %d)\n", this, ret
, debugstr_fpos_int(&pos
), mode
);
2344 if(!basic_filebuf_char_is_open(this) || fseek(this->file
, (LONG
)pos
.pos
, SEEK_SET
)
2345 || (pos
.off
&& fseek(this->file
, pos
.off
, SEEK_CUR
))) {
2352 fgetpos(this->file
, &fpos
);
2355 ret
->state
= this->state
;
2359 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PADH@Z */
2360 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAD_J@Z */
2361 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_setbuf
, 12)
2362 basic_streambuf_char
* __thiscall
basic_filebuf_char_setbuf(basic_filebuf_char
*this, char *buf
, streamsize count
)
2364 TRACE("(%p %p %Id)\n", this, buf
, count
);
2366 if(!basic_filebuf_char_is_open(this))
2369 if(setvbuf(this->file
, buf
, (buf
==NULL
&& count
==0) ? _IONBF
: _IOFBF
, count
))
2372 basic_filebuf_char__Init(this, this->file
, INITFL_open
);
2376 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2377 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2378 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_sync
, 4)
2379 int __thiscall
basic_filebuf_char_sync(basic_filebuf_char
*this)
2381 TRACE("(%p)\n", this);
2383 if(!basic_filebuf_char_is_open(this))
2386 if(call_basic_streambuf_char_overflow(&this->base
, EOF
) == EOF
)
2388 return fflush(this->file
);
2391 /* ?_Stinit@?1??_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
2392 /* ?_Stinit@?1??_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
2393 int basic_filebuf_short__Init__Stinit
= 0;
2395 /* ?_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2396 /* ?_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2397 DEFINE_THISCALL_WRAPPER(basic_filebuf_short__Init
, 12)
2398 void __thiscall
basic_filebuf_short__Init(basic_filebuf_wchar
*this, FILE *file
, basic_filebuf__Initfl which
)
2400 TRACE("(%p %p %d)\n", this, file
, which
);
2403 this->state0
= basic_filebuf_short__Init__Stinit
;
2404 this->state
= basic_filebuf_short__Init__Stinit
;
2405 if(which
== INITFL_new
)
2407 this->close
= (which
== INITFL_open
);
2410 basic_streambuf_wchar__Init_empty(&this->base
);
2413 /* ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXXZ */
2414 /* ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXXZ */
2415 DEFINE_THISCALL_WRAPPER(basic_filebuf_short__Initcvt
, 4)
2416 void __thiscall
basic_filebuf_short__Initcvt(basic_filebuf_wchar
*this)
2418 codecvt_wchar
*cvt
= codecvt_short_use_facet(IOS_LOCALE(&this->base
));
2420 TRACE("(%p)\n", this);
2422 if(codecvt_base_always_noconv(&cvt
->base
)) {
2425 basic_streambuf_wchar__Init_empty(&this->base
);
2430 /* ?close@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@XZ */
2431 /* ?close@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@XZ */
2432 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_close
, 4)
2433 basic_filebuf_wchar
* __thiscall
basic_filebuf_short_close(basic_filebuf_wchar
*this)
2435 basic_filebuf_wchar
*ret
= this;
2437 TRACE("(%p)\n", this);
2439 if(!this->file
|| fclose(this->file
))
2442 basic_filebuf_short__Init(this, NULL
, INITFL_close
);
2446 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
2447 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
2448 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor_file
, 8)
2449 basic_filebuf_wchar
* __thiscall
basic_filebuf_short_ctor_file(basic_filebuf_wchar
*this, FILE *file
)
2451 TRACE("(%p %p)\n", this, file
);
2453 basic_streambuf_short_ctor(&this->base
);
2454 this->base
.vtable
= &basic_filebuf_short_vtable
;
2456 locale_ctor(&this->loc
);
2457 basic_filebuf_short__Init(this, file
, INITFL_new
);
2461 /* ??_F?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
2462 /* ??_F?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
2463 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor
, 4)
2464 basic_filebuf_wchar
* __thiscall
basic_filebuf_short_ctor(basic_filebuf_wchar
*this)
2466 return basic_filebuf_short_ctor_file(this, NULL
);
2469 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z */
2470 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
2471 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor_uninitialized
, 8)
2472 basic_filebuf_wchar
* __thiscall
basic_filebuf_short_ctor_uninitialized(basic_filebuf_wchar
*this, int uninitialized
)
2474 TRACE("(%p %d)\n", this, uninitialized
);
2476 basic_streambuf_short_ctor_uninitialized(&this->base
, 0);
2477 this->base
.vtable
= &basic_filebuf_short_vtable
;
2478 locale_ctor(&this->loc
);
2482 /* ??1?$basic_filebuf@GU?$char_traits@G@std@@@std@@UAE@XZ */
2483 /* ??1?$basic_filebuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */
2484 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_dtor
, 4)
2485 void __thiscall
basic_filebuf_short_dtor(basic_filebuf_wchar
*this)
2487 TRACE("(%p)\n", this);
2490 basic_filebuf_short_close(this);
2492 MSVCP_basic_string_char_dtor(this->str
);
2493 operator_delete(this->str
);
2495 locale_dtor(&this->loc
);
2496 basic_streambuf_wchar_dtor(&this->base
);
2499 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_vector_dtor
, 8)
2500 basic_filebuf_wchar
* __thiscall
basic_filebuf_short_vector_dtor(basic_filebuf_wchar
*this, unsigned int flags
)
2502 TRACE("(%p %x)\n", this, flags
);
2504 /* we have an array, with the number of elements stored before the first object */
2505 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
2507 for(i
=*ptr
-1; i
>=0; i
--)
2508 basic_filebuf_short_dtor(this+i
);
2509 operator_delete(ptr
);
2511 basic_filebuf_short_dtor(this);
2513 operator_delete(this);
2519 /* ?is_open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QBE_NXZ */
2520 /* ?is_open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
2521 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_is_open
, 4)
2522 bool __thiscall
basic_filebuf_short_is_open(const basic_filebuf_wchar
*this)
2524 TRACE("(%p)\n", this);
2525 return this->file
!= NULL
;
2528 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDH@Z */
2529 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDH@Z */
2530 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_open_mode
, 12)
2531 basic_filebuf_wchar
* __thiscall
basic_filebuf_short_open_mode(basic_filebuf_wchar
*this, const char *name
, unsigned int mode
)
2533 wchar_t nameW
[FILENAME_MAX
];
2536 TRACE("(%p %p %u)\n", this, name
, mode
);
2538 if(basic_filebuf_short_is_open(this))
2541 if(mbstowcs_s(NULL
, nameW
, FILENAME_MAX
, name
, FILENAME_MAX
-1) != 0)
2544 if(!(f
= _Fiopen_wchar(nameW
, mode
, SH_DENYNO
)))
2547 basic_filebuf_short__Init(this, f
, INITFL_open
);
2548 basic_filebuf_short__Initcvt(this);
2552 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDF@Z */
2553 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDF@Z */
2554 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_open_mode_old
, 12)
2555 basic_filebuf_wchar
* __thiscall
basic_filebuf_short_open_mode_old(basic_filebuf_wchar
*this, const char *name
, short mode
)
2557 TRACE("(%p %p %d)\n", this, name
, mode
);
2558 return basic_filebuf_short_open_mode(this, name
, mode
);
2561 /* ?overflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
2562 /* ?overflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
2563 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_overflow
, 8)
2564 unsigned short __thiscall
basic_filebuf_short_overflow(basic_filebuf_wchar
*this, unsigned short c
)
2566 char *ptr
, *to_next
;
2568 const wchar_t *from_next
;
2572 TRACE("(%p %d)\n", this, c
);
2574 if(!basic_filebuf_short_is_open(this))
2580 return fwrite(&ch
, sizeof(wchar_t), 1, this->file
) ? c
: WEOF
;
2583 MSVCP_basic_string_char_clear(this->str
);
2584 MSVCP_basic_string_char_append_len_ch(this->str
, 8, '\0');
2585 ptr
= this->str
->ptr
;
2586 ret
= codecvt_wchar_out(this->cvt
, &this->state
, &ch
, &ch
+1, &from_next
,
2587 ptr
, ptr
+MSVCP_basic_string_char_length(this->str
), &to_next
);
2590 case CODECVT_partial
:
2591 if(from_next
== &ch
)
2595 if(!fwrite(ptr
, to_next
-ptr
, 1, this->file
))
2598 case CODECVT_noconv
:
2599 return fwrite(&ch
, sizeof(wchar_t), 1, this->file
) ? c
: WEOF
;
2605 /* ?pbackfail@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
2606 /* ?pbackfail@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
2607 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_pbackfail
, 8)
2608 unsigned short __thiscall
basic_filebuf_short_pbackfail(basic_filebuf_wchar
*this, unsigned short c
)
2610 TRACE("(%p %d)\n", this, c
);
2612 if(!basic_filebuf_short_is_open(this))
2615 if(basic_streambuf_wchar_gptr(&this->base
)>basic_streambuf_wchar_eback(&this->base
)
2616 && (c
==WEOF
|| basic_streambuf_wchar_gptr(&this->base
)[-1]==c
)) {
2617 basic_streambuf_wchar__Gndec(&this->base
);
2618 return c
==WEOF
? !c
: c
;
2619 }else if(c
== WEOF
) {
2621 }else if(!this->cvt
) {
2622 return ungetwc(c
, this->file
);
2623 }else if(MSVCP_basic_string_char_length(this->str
)) {
2627 b
= e
+this->str
->size
-1;
2628 for(cur
= b
; cur
>=e
; cur
--) {
2629 if(ungetc(*cur
, this->file
) == EOF
) {
2630 for(; cur
<=b
; cur
++)
2635 MSVCP_basic_string_char_clear(this->str
);
2636 this->state
= this->state0
;
2643 /* ?uflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
2644 /* ?uflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
2645 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_uflow
, 4)
2646 unsigned short __thiscall
basic_filebuf_short_uflow(basic_filebuf_wchar
*this)
2648 wchar_t ch
, *to_next
;
2649 const char *buf_next
;
2652 TRACE("(%p)\n", this);
2654 if(!basic_filebuf_short_is_open(this))
2657 if(basic_streambuf_wchar_gptr(&this->base
) < basic_streambuf_wchar_egptr(&this->base
))
2658 return *basic_streambuf_wchar__Gninc(&this->base
);
2661 return fgetwc(this->file
);
2663 MSVCP_basic_string_char_clear(this->str
);
2664 this->state0
= this->state
;
2666 if((c
= fgetc(this->file
)) == EOF
)
2668 MSVCP_basic_string_char_append_ch(this->str
, c
);
2669 this->state
= this->state0
;
2671 switch(codecvt_wchar_in(this->cvt
, &this->state
, this->str
->ptr
,
2672 this->str
->ptr
+this->str
->size
, &buf_next
, &ch
, &ch
+1, &to_next
)) {
2673 case CODECVT_partial
:
2675 case CODECVT_noconv
:
2676 if(this->str
->size
< sizeof(unsigned short)/sizeof(char))
2678 return *(unsigned short*)this->str
->ptr
;
2680 return (unsigned short)ch
;
2687 /* ?underflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
2688 /* ?underflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
2689 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_underflow
, 4)
2690 unsigned short __thiscall
basic_filebuf_short_underflow(basic_filebuf_wchar
*this)
2694 TRACE("(%p)\n", this);
2696 if(basic_streambuf_wchar_gptr(&this->base
) < basic_streambuf_wchar_egptr(&this->base
))
2697 return *basic_streambuf_wchar_gptr(&this->base
);
2699 ret
= call_basic_streambuf_wchar_uflow(&this->base
);
2701 ret
= call_basic_streambuf_wchar_pbackfail(&this->base
, ret
);
2705 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
2706 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
2707 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
2708 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
2709 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_seekoff
, 20)
2710 fpos_int
* __thiscall
basic_filebuf_short_seekoff(basic_filebuf_wchar
*this,
2711 fpos_int
*ret
, streamoff off
, int way
, int mode
)
2715 TRACE("(%p %p %Id %d %d)\n", this, ret
, off
, way
, mode
);
2717 if(!basic_filebuf_short_is_open(this) || fseek(this->file
, off
, way
)) {
2724 fgetpos(this->file
, &pos
);
2727 ret
->state
= this->state
;
2731 /* ?seekpos@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2732 /* ?seekpos@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2733 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_seekpos
, 36)
2734 fpos_int
* __thiscall
basic_filebuf_short_seekpos(basic_filebuf_wchar
*this,
2735 fpos_int
*ret
, fpos_int pos
, int mode
)
2739 TRACE("(%p %p %s %d)\n", this, ret
, debugstr_fpos_int(&pos
), mode
);
2741 if(!basic_filebuf_short_is_open(this) || fseek(this->file
, (LONG
)pos
.pos
, SEEK_SET
)
2742 || (pos
.off
&& fseek(this->file
, pos
.off
, SEEK_CUR
))) {
2749 fgetpos(this->file
, &fpos
);
2752 ret
->state
= this->state
;
2756 /* ?setbuf@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAGH@Z */
2757 /* ?setbuf@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAG_J@Z */
2758 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_setbuf
, 12)
2759 basic_streambuf_wchar
* __thiscall
basic_filebuf_short_setbuf(basic_filebuf_wchar
*this, wchar_t *buf
, streamsize count
)
2761 TRACE("(%p %p %Id)\n", this, buf
, count
);
2763 if(!basic_filebuf_short_is_open(this))
2766 if(setvbuf(this->file
, (char*)buf
, (buf
==NULL
&& count
==0) ? _IONBF
: _IOFBF
, count
*sizeof(wchar_t)))
2769 basic_filebuf_short__Init(this, this->file
, INITFL_open
);
2773 /* ?sync@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
2774 /* ?sync@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */
2775 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_sync
, 4)
2776 int __thiscall
basic_filebuf_short_sync(basic_filebuf_wchar
*this)
2778 TRACE("(%p)\n", this);
2780 if(!basic_filebuf_short_is_open(this))
2783 if(call_basic_streambuf_wchar_overflow(&this->base
, WEOF
) == WEOF
)
2785 return fflush(this->file
);
2788 /* ?_Getstate@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEHH@Z */
2789 /* ?_Getstate@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAHH@Z */
2790 /* ?_Mode@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEHH@Z */
2791 /* ?_Mode@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAHH@Z */
2792 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Getstate
, 8)
2793 int __thiscall
basic_stringbuf_char__Getstate(basic_stringbuf_char
*this, IOSB_openmode mode
)
2797 if(!(mode
& OPENMODE_in
))
2798 state
|= STRINGBUF_no_read
;
2800 if(!(mode
& OPENMODE_out
))
2801 state
|= STRINGBUF_no_write
;
2803 if(mode
& OPENMODE_ate
)
2804 state
|= STRINGBUF_at_end
;
2806 if(mode
& OPENMODE_app
)
2807 state
|= STRINGBUF_append
;
2812 /* ?_Init@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXPBDIH@Z */
2813 /* ?_Init@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAXPEBD_KH@Z */
2814 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Init
, 16)
2815 void __thiscall
basic_stringbuf_char__Init(basic_stringbuf_char
*this, const char *str
, size_t count
, int state
)
2817 TRACE("(%p, %p, %Iu, %d)\n", this, str
, count
, state
);
2819 basic_streambuf_char__Init_empty(&this->base
);
2821 this->state
= state
;
2822 this->seekhigh
= NULL
;
2825 char *buf
= operator_new(count
);
2827 memcpy(buf
, str
, count
);
2828 this->seekhigh
= buf
+ count
;
2830 this->state
|= STRINGBUF_allocated
;
2832 if(!(state
& STRINGBUF_no_read
))
2833 basic_streambuf_char_setg(&this->base
, buf
, buf
, buf
+ count
);
2835 if(!(state
& STRINGBUF_no_write
)) {
2836 basic_streambuf_char_setp_next(&this->base
, buf
, (state
& STRINGBUF_at_end
) ? buf
+ count
: buf
, buf
+ count
);
2838 if(!basic_streambuf_char_gptr(&this->base
))
2839 basic_streambuf_char_setg(&this->base
, buf
, 0, buf
);
2844 /* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@H@Z */
2845 /* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@H@Z */
2846 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor_str
, 12)
2847 basic_stringbuf_char
* __thiscall
basic_stringbuf_char_ctor_str(basic_stringbuf_char
*this,
2848 const basic_string_char
*str
, IOSB_openmode mode
)
2850 TRACE("(%p %p %d)\n", this, str
, mode
);
2852 basic_streambuf_char_ctor(&this->base
);
2853 this->base
.vtable
= &basic_stringbuf_char_vtable
;
2855 basic_stringbuf_char__Init(this, MSVCP_basic_string_char_c_str(str
),
2856 str
->size
, basic_stringbuf_char__Getstate(this, mode
));
2860 /* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
2861 /* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
2862 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor_mode
, 8)
2863 basic_stringbuf_char
* __thiscall
basic_stringbuf_char_ctor_mode(
2864 basic_stringbuf_char
*this, IOSB_openmode mode
)
2866 TRACE("(%p %d)\n", this, mode
);
2868 basic_streambuf_char_ctor(&this->base
);
2869 this->base
.vtable
= &basic_stringbuf_char_vtable
;
2871 basic_stringbuf_char__Init(this, NULL
, 0, basic_stringbuf_char__Getstate(this, mode
));
2875 /* ??_F?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
2876 /* ??_F?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
2877 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor
, 4)
2878 basic_stringbuf_char
* __thiscall
basic_stringbuf_char_ctor(basic_stringbuf_char
*this)
2880 return basic_stringbuf_char_ctor_mode(this, OPENMODE_in
|OPENMODE_out
);
2883 /* ?_Tidy@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXXZ */
2884 /* ?_Tidy@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAXXZ */
2885 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Tidy
, 4)
2886 void __thiscall
basic_stringbuf_char__Tidy(basic_stringbuf_char
*this)
2888 TRACE("(%p)\n", this);
2890 if(this->state
& STRINGBUF_allocated
) {
2891 operator_delete(basic_streambuf_char_eback(&this->base
));
2892 this->seekhigh
= NULL
;
2893 this->state
&= ~STRINGBUF_allocated
;
2896 basic_streambuf_char__Init_empty(&this->base
);
2899 /* ??1?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
2900 /* ??1?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
2901 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_dtor
, 4)
2902 void __thiscall
basic_stringbuf_char_dtor(basic_stringbuf_char
*this)
2904 TRACE("(%p)\n", this);
2906 basic_stringbuf_char__Tidy(this);
2907 basic_streambuf_char_dtor(&this->base
);
2910 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_vector_dtor
, 8)
2911 basic_stringbuf_char
* __thiscall
basic_stringbuf_char_vector_dtor(basic_stringbuf_char
*this, unsigned int flags
)
2913 TRACE("(%p %x)\n", this, flags
);
2916 /* we have an array, with the number of elements stored before the first object */
2917 INT_PTR i
, *ptr
= (INT_PTR
*) this - 1;
2919 for (i
= *ptr
- 1; i
>= 0; i
--)
2920 basic_stringbuf_char_dtor(this+i
);
2922 operator_delete(ptr
);
2924 basic_stringbuf_char_dtor(this);
2927 operator_delete(this);
2933 /* ?overflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHH@Z */
2934 /* ?overflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHH@Z */
2935 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_overflow
, 8)
2936 int __thiscall
basic_stringbuf_char_overflow(basic_stringbuf_char
*this, int meta
)
2938 size_t oldsize
, size
;
2941 TRACE("(%p %x)\n", this, meta
);
2945 if(this->state
& STRINGBUF_no_write
)
2948 ptr
= basic_streambuf_char_pptr(&this->base
);
2949 if((this->state
&STRINGBUF_append
) && ptr
<this->seekhigh
)
2950 basic_streambuf_char_setp_next(&this->base
, basic_streambuf_char_pbase(&this->base
),
2951 this->seekhigh
, basic_streambuf_char_epptr(&this->base
));
2953 if(ptr
&& ptr
<basic_streambuf_char_epptr(&this->base
))
2954 return (unsigned char)(*basic_streambuf_char__Pninc(&this->base
) = meta
);
2956 oldsize
= (ptr
? basic_streambuf_char_epptr(&this->base
)-basic_streambuf_char_eback(&this->base
): 0);
2959 buf
= operator_new(size
);
2962 this->seekhigh
= buf
;
2963 basic_streambuf_char_setp(&this->base
, buf
, buf
+size
);
2964 if(this->state
& STRINGBUF_no_read
)
2965 basic_streambuf_char_setg(&this->base
, buf
, NULL
, buf
);
2967 basic_streambuf_char_setg(&this->base
, buf
, buf
, buf
+1);
2969 this->state
|= STRINGBUF_allocated
;
2971 ptr
= basic_streambuf_char_eback(&this->base
);
2972 memcpy(buf
, ptr
, oldsize
);
2974 this->seekhigh
= buf
+(this->seekhigh
-ptr
);
2975 basic_streambuf_char_setp_next(&this->base
, buf
,
2976 buf
+(basic_streambuf_char_pptr(&this->base
)-ptr
), buf
+size
);
2977 if(this->state
& STRINGBUF_no_read
)
2978 basic_streambuf_char_setg(&this->base
, buf
, NULL
, buf
);
2980 basic_streambuf_char_setg(&this->base
, buf
,
2981 buf
+(basic_streambuf_char_gptr(&this->base
)-ptr
),
2982 basic_streambuf_char_pptr(&this->base
)+1);
2984 operator_delete(ptr
);
2987 return (unsigned char)(*basic_streambuf_char__Pninc(&this->base
) = meta
);
2990 /* ?pbackfail@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHH@Z */
2991 /* ?pbackfail@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHH@Z */
2992 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_pbackfail
, 8)
2993 int __thiscall
basic_stringbuf_char_pbackfail(basic_stringbuf_char
*this, int c
)
2997 TRACE("(%p %x)\n", this, c
);
2999 cur
= basic_streambuf_char_gptr(&this->base
);
3000 if(!cur
|| cur
==basic_streambuf_char_eback(&this->base
)
3001 || (c
!=EOF
&& c
!=cur
[-1] && this->state
&STRINGBUF_no_write
))
3006 basic_streambuf_char_gbump(&this->base
, -1);
3007 return c
==EOF
? !EOF
: c
;
3010 /* ?underflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHXZ */
3011 /* ?underflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHXZ */
3012 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_underflow
, 4)
3013 int __thiscall
basic_stringbuf_char_underflow(basic_stringbuf_char
*this)
3017 TRACE("(%p)\n", this);
3019 cur
= basic_streambuf_char_gptr(&this->base
);
3020 if(!cur
|| this->state
&STRINGBUF_no_read
)
3023 ptr
= basic_streambuf_char_pptr(&this->base
);
3024 if(this->seekhigh
< ptr
)
3025 this->seekhigh
= ptr
;
3027 ptr
= basic_streambuf_char_egptr(&this->base
);
3028 if(this->seekhigh
> ptr
)
3029 basic_streambuf_char_setg(&this->base
, basic_streambuf_char_eback(&this->base
), cur
, this->seekhigh
);
3031 if(cur
< this->seekhigh
)
3032 return (unsigned char)*cur
;
3036 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
3037 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
3038 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */
3039 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
3040 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekoff
, 20)
3041 fpos_int
* __thiscall
basic_stringbuf_char_seekoff(basic_stringbuf_char
*this,
3042 fpos_int
*ret
, streamoff off
, int way
, int mode
)
3044 char *beg
, *cur_r
, *cur_w
;
3046 TRACE("(%p %p %Id %d %d)\n", this, ret
, off
, way
, mode
);
3048 cur_w
= basic_streambuf_char_pptr(&this->base
);
3049 if(cur_w
> this->seekhigh
)
3050 this->seekhigh
= cur_w
;
3056 beg
= basic_streambuf_char_eback(&this->base
);
3057 cur_r
= basic_streambuf_char_gptr(&this->base
);
3058 if((mode
& OPENMODE_in
) && cur_r
) {
3059 if(way
==SEEKDIR_cur
&& !(mode
& OPENMODE_out
))
3061 else if(way
== SEEKDIR_end
)
3062 off
+= this->seekhigh
-beg
;
3063 else if(way
!= SEEKDIR_beg
)
3066 if(off
<0 || off
>this->seekhigh
-beg
) {
3069 basic_streambuf_char_gbump(&this->base
, beg
-cur_r
+off
);
3070 if((mode
& OPENMODE_out
) && cur_w
) {
3071 basic_streambuf_char_setp_next(&this->base
, beg
,
3072 basic_streambuf_char_gptr(&this->base
),
3073 basic_streambuf_char_epptr(&this->base
));
3076 }else if((mode
& OPENMODE_out
) && cur_w
) {
3077 if(way
== SEEKDIR_cur
)
3079 else if(way
== SEEKDIR_end
)
3080 off
+= this->seekhigh
-beg
;
3081 else if(way
!= SEEKDIR_beg
)
3084 if(off
<0 || off
>this->seekhigh
-beg
)
3087 basic_streambuf_char_pbump(&this->base
, beg
-cur_w
+off
);
3096 /* ?seekpos@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3097 /* ?seekpos@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3098 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekpos
, 36)
3099 fpos_int
* __thiscall
basic_stringbuf_char_seekpos(basic_stringbuf_char
*this,
3100 fpos_int
*ret
, fpos_int pos
, int mode
)
3102 TRACE("(%p %p %s %d)\n", this, ret
, debugstr_fpos_int(&pos
), mode
);
3104 if(pos
.off
==-1 && pos
.pos
==0 && pos
.state
==0) {
3109 return basic_stringbuf_char_seekoff(this, ret
, pos
.pos
+pos
.off
, SEEKDIR_beg
, mode
);
3112 /* ?str@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
3113 /* ?str@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
3114 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_str_set
, 8)
3115 void __thiscall
basic_stringbuf_char_str_set(basic_stringbuf_char
*this, const basic_string_char
*str
)
3117 TRACE("(%p %p)\n", this, str
);
3119 basic_stringbuf_char__Tidy(this);
3120 basic_stringbuf_char__Init(this, MSVCP_basic_string_char_c_str(str
), str
->size
, this->state
);
3123 /* ?str@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3124 /* ?str@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3125 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_str_get
, 8)
3126 basic_string_char
* __thiscall
basic_stringbuf_char_str_get(const basic_stringbuf_char
*this, basic_string_char
*ret
)
3130 TRACE("(%p)\n", this);
3132 if(!(this->state
& STRINGBUF_no_write
) && basic_streambuf_char_pptr(&this->base
)) {
3135 ptr
= basic_streambuf_char_pbase(&this->base
);
3136 pptr
= basic_streambuf_char_pptr(&this->base
);
3138 return MSVCP_basic_string_char_ctor_cstr_len(ret
, ptr
, (this->seekhigh
< pptr
? pptr
: this->seekhigh
) - ptr
);
3141 if(!(this->state
& STRINGBUF_no_read
) && basic_streambuf_char_gptr(&this->base
)) {
3142 ptr
= basic_streambuf_char_eback(&this->base
);
3143 return MSVCP_basic_string_char_ctor_cstr_len(ret
, ptr
, basic_streambuf_char_egptr(&this->base
) - ptr
);
3146 return MSVCP_basic_string_char_ctor(ret
);
3149 /* ?_Getstate@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEHH@Z */
3150 /* ?_Getstate@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAHH@Z */
3151 /* ?_Mode@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEHH@Z */
3152 /* ?_Mode@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAHH@Z */
3153 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short__Getstate
, 8)
3154 int __thiscall
basic_stringbuf_short__Getstate(basic_stringbuf_wchar
*this, IOSB_openmode mode
)
3158 if(!(mode
& OPENMODE_in
))
3159 state
|= STRINGBUF_no_read
;
3161 if(!(mode
& OPENMODE_out
))
3162 state
|= STRINGBUF_no_write
;
3164 if(mode
& OPENMODE_ate
)
3165 state
|= STRINGBUF_at_end
;
3167 if(mode
& OPENMODE_app
)
3168 state
|= STRINGBUF_append
;
3173 /* ?_Init@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEXPBGIH@Z */
3174 /* ?_Init@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAXPEBG_KH@Z */
3175 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short__Init
, 16)
3176 void __thiscall
basic_stringbuf_short__Init(basic_stringbuf_wchar
*this, const wchar_t *str
, size_t count
, int state
)
3178 TRACE("(%p, %p, %Iu, %d)\n", this, str
, count
, state
);
3180 basic_streambuf_wchar__Init_empty(&this->base
);
3182 this->state
= state
;
3183 this->seekhigh
= NULL
;
3186 wchar_t *buf
= operator_new(count
*sizeof(wchar_t));
3188 memcpy(buf
, str
, count
*sizeof(wchar_t));
3189 this->seekhigh
= buf
+ count
;
3191 this->state
|= STRINGBUF_allocated
;
3193 if(!(state
& STRINGBUF_no_read
))
3194 basic_streambuf_wchar_setg(&this->base
, buf
, buf
, buf
+ count
);
3196 if(!(state
& STRINGBUF_no_write
)) {
3197 basic_streambuf_wchar_setp_next(&this->base
, buf
, (state
& STRINGBUF_at_end
) ? buf
+ count
: buf
, buf
+ count
);
3199 if(!basic_streambuf_wchar_gptr(&this->base
))
3200 basic_streambuf_wchar_setg(&this->base
, buf
, 0, buf
);
3205 /* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@1@H@Z */
3206 /* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@1@H@Z */
3207 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor_str
, 12)
3208 basic_stringbuf_wchar
* __thiscall
basic_stringbuf_short_ctor_str(basic_stringbuf_wchar
*this,
3209 const basic_string_wchar
*str
, IOSB_openmode mode
)
3211 TRACE("(%p %p %d)\n", this, str
, mode
);
3213 basic_streambuf_short_ctor(&this->base
);
3214 this->base
.vtable
= &basic_stringbuf_short_vtable
;
3216 basic_stringbuf_short__Init(this, MSVCP_basic_string_wchar_c_str(str
),
3217 str
->size
, basic_stringbuf_short__Getstate(this, mode
));
3221 /* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
3222 /* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
3223 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor_mode
, 8)
3224 basic_stringbuf_wchar
* __thiscall
basic_stringbuf_short_ctor_mode(
3225 basic_stringbuf_wchar
*this, IOSB_openmode mode
)
3227 TRACE("(%p %d)\n", this, mode
);
3229 basic_streambuf_short_ctor(&this->base
);
3230 this->base
.vtable
= &basic_stringbuf_short_vtable
;
3232 basic_stringbuf_short__Init(this, NULL
, 0, basic_stringbuf_short__Getstate(this, mode
));
3236 /* ??_F?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
3237 /* ??_F?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
3238 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor
, 4)
3239 basic_stringbuf_wchar
* __thiscall
basic_stringbuf_short_ctor(basic_stringbuf_wchar
*this)
3241 return basic_stringbuf_short_ctor_mode(this, OPENMODE_in
|OPENMODE_out
);
3244 /* ?_Tidy@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEXXZ */
3245 /* ?_Tidy@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAXXZ */
3246 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short__Tidy
, 4)
3247 void __thiscall
basic_stringbuf_short__Tidy(basic_stringbuf_wchar
*this)
3249 TRACE("(%p)\n", this);
3251 if(this->state
& STRINGBUF_allocated
) {
3252 operator_delete(basic_streambuf_wchar_eback(&this->base
));
3253 this->seekhigh
= NULL
;
3254 this->state
&= ~STRINGBUF_allocated
;
3257 basic_streambuf_wchar__Init_empty(&this->base
);
3260 /* ??1?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
3261 /* ??1?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
3262 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_dtor
, 4)
3263 void __thiscall
basic_stringbuf_short_dtor(basic_stringbuf_wchar
*this)
3265 TRACE("(%p)\n", this);
3267 basic_stringbuf_short__Tidy(this);
3268 basic_streambuf_wchar_dtor(&this->base
);
3271 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_vector_dtor
, 8)
3272 basic_stringbuf_wchar
* __thiscall
basic_stringbuf_short_vector_dtor(basic_stringbuf_wchar
*this, unsigned int flags
)
3274 TRACE("(%p %x)\n", this, flags
);
3277 /* we have an array, with the number of elements stored before the first object */
3278 INT_PTR i
, *ptr
= (INT_PTR
*) this - 1;
3280 for (i
= *ptr
- 1; i
>= 0; i
--)
3281 basic_stringbuf_short_dtor(this+i
);
3283 operator_delete(ptr
);
3285 basic_stringbuf_short_dtor(this);
3288 operator_delete(this);
3294 /* ?overflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGG@Z */
3295 /* ?overflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGG@Z */
3296 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_overflow
, 8)
3297 unsigned short __thiscall
basic_stringbuf_short_overflow(basic_stringbuf_wchar
*this, unsigned short meta
)
3299 size_t oldsize
, size
;
3302 TRACE("(%p %x)\n", this, meta
);
3306 if(this->state
& STRINGBUF_no_write
)
3309 ptr
= basic_streambuf_wchar_pptr(&this->base
);
3310 if((this->state
&STRINGBUF_append
) && ptr
<this->seekhigh
)
3311 basic_streambuf_wchar_setp_next(&this->base
, basic_streambuf_wchar_pbase(&this->base
),
3312 this->seekhigh
, basic_streambuf_wchar_epptr(&this->base
));
3314 if(ptr
&& ptr
<basic_streambuf_wchar_epptr(&this->base
))
3315 return (*basic_streambuf_wchar__Pninc(&this->base
) = meta
);
3317 oldsize
= (ptr
? basic_streambuf_wchar_epptr(&this->base
)-basic_streambuf_wchar_eback(&this->base
): 0);
3320 buf
= operator_new(size
*sizeof(wchar_t));
3323 this->seekhigh
= buf
;
3324 basic_streambuf_wchar_setp(&this->base
, buf
, buf
+size
);
3325 if(this->state
& STRINGBUF_no_read
)
3326 basic_streambuf_wchar_setg(&this->base
, buf
, NULL
, buf
);
3328 basic_streambuf_wchar_setg(&this->base
, buf
, buf
, buf
+1);
3330 this->state
|= STRINGBUF_allocated
;
3332 ptr
= basic_streambuf_wchar_eback(&this->base
);
3333 memcpy(buf
, ptr
, oldsize
*sizeof(wchar_t));
3335 this->seekhigh
= buf
+(this->seekhigh
-ptr
);
3336 basic_streambuf_wchar_setp_next(&this->base
, buf
,
3337 buf
+(basic_streambuf_wchar_pptr(&this->base
)-ptr
), buf
+size
);
3338 if(this->state
& STRINGBUF_no_read
)
3339 basic_streambuf_wchar_setg(&this->base
, buf
, NULL
, buf
);
3341 basic_streambuf_wchar_setg(&this->base
, buf
,
3342 buf
+(basic_streambuf_wchar_gptr(&this->base
)-ptr
),
3343 basic_streambuf_wchar_pptr(&this->base
)+1);
3345 operator_delete(ptr
);
3348 return (*basic_streambuf_wchar__Pninc(&this->base
) = meta
);
3351 /* ?pbackfail@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGG@Z */
3352 /* ?pbackfail@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGG@Z */
3353 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_pbackfail
, 8)
3354 unsigned short __thiscall
basic_stringbuf_short_pbackfail(basic_stringbuf_wchar
*this, unsigned short c
)
3358 TRACE("(%p %x)\n", this, c
);
3360 cur
= basic_streambuf_wchar_gptr(&this->base
);
3361 if(!cur
|| cur
==basic_streambuf_wchar_eback(&this->base
)
3362 || (c
!=WEOF
&& c
!=cur
[-1] && this->state
&STRINGBUF_no_write
))
3367 basic_streambuf_wchar_gbump(&this->base
, -1);
3368 return c
==WEOF
? !WEOF
: c
;
3371 /* ?underflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGXZ */
3372 /* ?underflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGXZ */
3373 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_underflow
, 4)
3374 unsigned short __thiscall
basic_stringbuf_short_underflow(basic_stringbuf_wchar
*this)
3378 TRACE("(%p)\n", this);
3380 cur
= basic_streambuf_wchar_gptr(&this->base
);
3381 if(!cur
|| this->state
&STRINGBUF_no_read
)
3384 ptr
= basic_streambuf_wchar_pptr(&this->base
);
3385 if(this->seekhigh
< ptr
)
3386 this->seekhigh
= ptr
;
3388 ptr
= basic_streambuf_wchar_egptr(&this->base
);
3389 if(this->seekhigh
> ptr
)
3390 basic_streambuf_wchar_setg(&this->base
, basic_streambuf_wchar_eback(&this->base
), cur
, this->seekhigh
);
3392 if(cur
< this->seekhigh
)
3397 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
3398 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
3399 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */
3400 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
3401 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_seekoff
, 20)
3402 fpos_int
* __thiscall
basic_stringbuf_short_seekoff(basic_stringbuf_wchar
*this,
3403 fpos_int
*ret
, streamoff off
, int way
, int mode
)
3405 wchar_t *beg
, *cur_r
, *cur_w
;
3407 TRACE("(%p %p %Id %d %d)\n", this, ret
, off
, way
, mode
);
3409 cur_w
= basic_streambuf_wchar_pptr(&this->base
);
3410 if(cur_w
> this->seekhigh
)
3411 this->seekhigh
= cur_w
;
3417 beg
= basic_streambuf_wchar_eback(&this->base
);
3418 cur_r
= basic_streambuf_wchar_gptr(&this->base
);
3419 if((mode
& OPENMODE_in
) && cur_r
) {
3420 if(way
==SEEKDIR_cur
&& !(mode
& OPENMODE_out
))
3422 else if(way
== SEEKDIR_end
)
3423 off
+= this->seekhigh
-beg
;
3424 else if(way
!= SEEKDIR_beg
)
3427 if(off
<0 || off
>this->seekhigh
-beg
) {
3430 basic_streambuf_wchar_gbump(&this->base
, beg
-cur_r
+off
);
3431 if((mode
& OPENMODE_out
) && cur_w
) {
3432 basic_streambuf_wchar_setp_next(&this->base
, beg
,
3433 basic_streambuf_wchar_gptr(&this->base
),
3434 basic_streambuf_wchar_epptr(&this->base
));
3437 }else if((mode
& OPENMODE_out
) && cur_w
) {
3438 if(way
== SEEKDIR_cur
)
3440 else if(way
== SEEKDIR_end
)
3441 off
+= this->seekhigh
-beg
;
3442 else if(way
!= SEEKDIR_beg
)
3445 if(off
<0 || off
>this->seekhigh
-beg
)
3448 basic_streambuf_wchar_pbump(&this->base
, beg
-cur_w
+off
);
3457 /* ?seekpos@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3458 /* ?seekpos@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3459 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_seekpos
, 36)
3460 fpos_int
* __thiscall
basic_stringbuf_short_seekpos(basic_stringbuf_wchar
*this,
3461 fpos_int
*ret
, fpos_int pos
, int mode
)
3463 TRACE("(%p %p %s %d)\n", this, ret
, debugstr_fpos_int(&pos
), mode
);
3465 if(pos
.off
==-1 && pos
.pos
==0 && pos
.state
==0) {
3470 return basic_stringbuf_short_seekoff(this, ret
, pos
.pos
+pos
.off
, SEEKDIR_beg
, mode
);
3473 /* ?str@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z */
3474 /* ?str@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z */
3475 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_str_set
, 8)
3476 void __thiscall
basic_stringbuf_short_str_set(basic_stringbuf_wchar
*this, const basic_string_wchar
*str
)
3478 TRACE("(%p %p)\n", this, str
);
3480 basic_stringbuf_short__Tidy(this);
3481 basic_stringbuf_short__Init(this, MSVCP_basic_string_wchar_c_str(str
), str
->size
, this->state
);
3484 /* ?str@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3485 /* ?str@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3486 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_str_get
, 8)
3487 basic_string_wchar
* __thiscall
basic_stringbuf_short_str_get(const basic_stringbuf_wchar
*this, basic_string_wchar
*ret
)
3491 TRACE("(%p)\n", this);
3493 if(!(this->state
& STRINGBUF_no_write
) && basic_streambuf_wchar_pptr(&this->base
)) {
3496 ptr
= basic_streambuf_wchar_pbase(&this->base
);
3497 pptr
= basic_streambuf_wchar_pptr(&this->base
);
3499 return MSVCP_basic_string_wchar_ctor_cstr_len(ret
, ptr
, (this->seekhigh
< pptr
? pptr
: this->seekhigh
) - ptr
);
3502 if(!(this->state
& STRINGBUF_no_read
) && basic_streambuf_wchar_gptr(&this->base
)) {
3503 ptr
= basic_streambuf_wchar_eback(&this->base
);
3504 return MSVCP_basic_string_wchar_ctor_cstr_len(ret
, ptr
, basic_streambuf_wchar_egptr(&this->base
) - ptr
);
3507 return MSVCP_basic_string_wchar_ctor(ret
);
3510 /* ??0ios_base@std@@IAE@XZ */
3511 /* ??0ios_base@std@@IEAA@XZ */
3512 DEFINE_THISCALL_WRAPPER(ios_base_ctor
, 4)
3513 ios_base
* __thiscall
ios_base_ctor(ios_base
*this)
3515 TRACE("(%p)\n", this);
3516 this->vtable
= &ios_base_vtable
;
3517 locale_ctor_uninitialized(IOS_LOCALE(this), 0);
3521 /* ??0ios_base@std@@QAE@ABV01@@Z */
3522 /* ??0ios_base@std@@QEAA@AEBV01@@Z */
3523 DEFINE_THISCALL_WRAPPER(ios_base_copy_ctor
, 8)
3524 ios_base
* __thiscall
ios_base_copy_ctor(ios_base
*this, const ios_base
*copy
)
3526 TRACE("(%p %p)\n", this, copy
);
3528 this->vtable
= &ios_base_vtable
;
3532 /* ?_Callfns@ios_base@std@@AAEXW4event@12@@Z */
3533 /* ?_Callfns@ios_base@std@@AEAAXW4event@12@@Z */
3534 DEFINE_THISCALL_WRAPPER(ios_base_Callfns
, 8)
3535 void __thiscall
ios_base_Callfns(ios_base
*this, IOS_BASE_event event
)
3537 IOS_BASE_fnarray
*cur
;
3539 TRACE("(%p %x)\n", this, event
);
3541 for(cur
=this->calls
; cur
; cur
=cur
->next
)
3542 cur
->event_handler(event
, this, cur
->index
);
3545 /* ?_Tidy@ios_base@std@@AAAXXZ */
3546 /* ?_Tidy@ios_base@std@@AEAAXXZ */
3547 void __cdecl
ios_base_Tidy(ios_base
*this)
3549 IOS_BASE_iosarray
*arr_cur
, *arr_next
;
3550 IOS_BASE_fnarray
*event_cur
, *event_next
;
3552 TRACE("(%p)\n", this);
3554 ios_base_Callfns(this, EVENT_erase_event
);
3556 for(arr_cur
=this->arr
; arr_cur
; arr_cur
=arr_next
) {
3557 arr_next
= arr_cur
->next
;
3558 operator_delete(arr_cur
);
3562 for(event_cur
=this->calls
; event_cur
; event_cur
=event_next
) {
3563 event_next
= event_cur
->next
;
3564 operator_delete(event_cur
);
3569 /* ??1ios_base@std@@UAE@XZ */
3570 /* ??1ios_base@std@@UEAA@XZ */
3571 DEFINE_THISCALL_WRAPPER(ios_base_dtor
, 4)
3572 void __thiscall
ios_base_dtor(ios_base
*this)
3574 TRACE("(%p)\n", this);
3575 locale_dtor(IOS_LOCALE(this));
3576 ios_base_Tidy(this);
3579 DEFINE_THISCALL_WRAPPER(ios_base_vector_dtor
, 8)
3580 ios_base
* __thiscall
ios_base_vector_dtor(ios_base
*this, unsigned int flags
)
3582 TRACE("(%p %x)\n", this, flags
);
3584 /* we have an array, with the number of elements stored before the first object */
3585 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3587 for(i
=*ptr
-1; i
>=0; i
--)
3588 ios_base_dtor(this+i
);
3589 operator_delete(ptr
);
3591 ios_base_dtor(this);
3593 operator_delete(this);
3599 DEFINE_THISCALL_WRAPPER(iosb_vector_dtor
, 8)
3600 void* __thiscall
iosb_vector_dtor(void *this, unsigned int flags
)
3602 TRACE("(%p %x)\n", this, flags
);
3604 INT_PTR
*ptr
= (INT_PTR
*)this-1;
3605 operator_delete(ptr
);
3608 operator_delete(this);
3614 /* ?_Findarr@ios_base@std@@AAEAAU_Iosarray@12@H@Z */
3615 /* ?_Findarr@ios_base@std@@AEAAAEAU_Iosarray@12@H@Z */
3616 DEFINE_THISCALL_WRAPPER(ios_base_Findarr
, 8)
3617 IOS_BASE_iosarray
* __thiscall
ios_base_Findarr(ios_base
*this, int index
)
3619 IOS_BASE_iosarray
*p
;
3621 TRACE("(%p %d)\n", this, index
);
3623 for(p
=this->arr
; p
; p
=p
->next
) {
3624 if(p
->index
== index
)
3628 for(p
=this->arr
; p
; p
=p
->next
) {
3629 if(!p
->long_val
&& !p
->ptr_val
) {
3635 p
= operator_new(sizeof(IOS_BASE_iosarray
));
3636 p
->next
= this->arr
;
3644 /* ?iword@ios_base@std@@QAEAAJH@Z */
3645 /* ?iword@ios_base@std@@QEAAAEAJH@Z */
3646 DEFINE_THISCALL_WRAPPER(ios_base_iword
, 8)
3647 LONG
* __thiscall
ios_base_iword(ios_base
*this, int index
)
3649 TRACE("(%p %d)\n", this, index
);
3650 return &ios_base_Findarr(this, index
)->long_val
;
3653 /* ?pword@ios_base@std@@QAEAAPAXH@Z */
3654 /* ?pword@ios_base@std@@QEAAAEAPEAXH@Z */
3655 DEFINE_THISCALL_WRAPPER(ios_base_pword
, 8)
3656 void** __thiscall
ios_base_pword(ios_base
*this, int index
)
3658 TRACE("(%p %d)\n", this, index
);
3659 return &ios_base_Findarr(this, index
)->ptr_val
;
3662 /* ?register_callback@ios_base@std@@QAEXP6AXW4event@12@AAV12@H@ZH@Z */
3663 /* ?register_callback@ios_base@std@@QEAAXP6AXW4event@12@AEAV12@H@ZH@Z */
3664 DEFINE_THISCALL_WRAPPER(ios_base_register_callback
, 12)
3665 void __thiscall
ios_base_register_callback(ios_base
*this, IOS_BASE_event_callback callback
, int index
)
3667 IOS_BASE_fnarray
*event
;
3669 TRACE("(%p %p %d)\n", this, callback
, index
);
3671 event
= operator_new(sizeof(IOS_BASE_fnarray
));
3672 event
->next
= this->calls
;
3673 event
->index
= index
;
3674 event
->event_handler
= callback
;
3675 this->calls
= event
;
3678 /* ?clear@ios_base@std@@QAEXH_N@Z */
3679 /* ?clear@ios_base@std@@QEAAXH_N@Z */
3680 DEFINE_THISCALL_WRAPPER(ios_base_clear_reraise
, 12)
3681 void __thiscall
ios_base_clear_reraise(ios_base
*this, IOSB_iostate state
, bool reraise
)
3683 TRACE("(%p %x %x)\n", this, state
, reraise
);
3685 this->state
= state
& IOSTATE_mask
;
3686 if(!(this->state
& this->except
))
3690 _CxxThrowException(NULL
, NULL
);
3691 else if(this->state
& this->except
& IOSTATE_eofbit
)
3692 throw_failure("eofbit is set");
3693 else if(this->state
& this->except
& IOSTATE_failbit
)
3694 throw_failure("failbit is set");
3695 else if(this->state
& this->except
& IOSTATE_badbit
)
3696 throw_failure("badbit is set");
3697 else if(this->state
& this->except
& IOSTATE__Hardfail
)
3698 throw_failure("_Hardfail is set");
3701 /* ?clear@ios_base@std@@QAEXF@Z */
3702 /* ?clear@ios_base@std@@QEAAXF@Z */
3703 DEFINE_THISCALL_WRAPPER(ios_base_clear
, 8)
3704 void __thiscall
ios_base_clear(ios_base
*this, IOSB_iostate state
)
3706 ios_base_clear_reraise(this, state
, FALSE
);
3709 /* ?exceptions@ios_base@std@@QAEXH@Z */
3710 /* ?exceptions@ios_base@std@@QEAAXH@Z */
3711 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_set
, 8)
3712 void __thiscall
ios_base_exceptions_set(ios_base
*this, IOSB_iostate state
)
3714 TRACE("(%p %x)\n", this, state
);
3715 this->except
= state
& IOSTATE_mask
;
3716 ios_base_clear(this, this->state
);
3719 /* ?exceptions@ios_base@std@@QBEHXZ */
3720 /* ?exceptions@ios_base@std@@QEBAHXZ */
3721 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_get
, 4)
3722 IOSB_iostate __thiscall
ios_base_exceptions_get(ios_base
*this)
3724 TRACE("(%p)\n", this);
3725 return this->except
;
3728 /* ?copyfmt@ios_base@std@@QAEAAV12@ABV12@@Z */
3729 /* ?copyfmt@ios_base@std@@QEAAAEAV12@AEBV12@@Z */
3730 DEFINE_THISCALL_WRAPPER(ios_base_copyfmt
, 8)
3731 ios_base
* __thiscall
ios_base_copyfmt(ios_base
*this, const ios_base
*rhs
)
3733 TRACE("(%p %p)\n", this, rhs
);
3736 IOS_BASE_iosarray
*arr_cur
;
3737 IOS_BASE_fnarray
*event_cur
;
3739 ios_base_Tidy(this);
3741 for(arr_cur
=rhs
->arr
; arr_cur
; arr_cur
=arr_cur
->next
) {
3742 if(arr_cur
->long_val
)
3743 *ios_base_iword(this, arr_cur
->index
) = arr_cur
->long_val
;
3744 if(arr_cur
->ptr_val
)
3745 *ios_base_pword(this, arr_cur
->index
) = arr_cur
->ptr_val
;
3747 this->stdstr
= rhs
->stdstr
;
3748 this->fmtfl
= rhs
->fmtfl
;
3749 this->prec
= rhs
->prec
;
3750 this->wide
= rhs
->wide
;
3751 locale_operator_assign(IOS_LOCALE(this), IOS_LOCALE(rhs
));
3753 for(event_cur
=rhs
->calls
; event_cur
; event_cur
=event_cur
->next
)
3754 ios_base_register_callback(this, event_cur
->event_handler
, event_cur
->index
);
3756 ios_base_Callfns(this, EVENT_copyfmt_event
);
3757 ios_base_exceptions_set(this, rhs
->except
);
3763 /* ??4ios_base@std@@QAEAAV01@ABV01@@Z */
3764 /* ??4ios_base@std@@QEAAAEAV01@AEBV01@@Z */
3765 DEFINE_THISCALL_WRAPPER(ios_base_assign
, 8)
3766 ios_base
* __thiscall
ios_base_assign(ios_base
*this, const ios_base
*right
)
3768 TRACE("(%p %p)\n", this, right
);
3771 this->state
= right
->state
;
3772 ios_base_copyfmt(this, right
);
3778 /* ?fail@ios_base@std@@QBE_NXZ */
3779 /* ?fail@ios_base@std@@QEBA_NXZ */
3780 DEFINE_THISCALL_WRAPPER(ios_base_fail
, 4)
3781 bool __thiscall
ios_base_fail(const ios_base
*this)
3783 TRACE("(%p)\n", this);
3784 return (this->state
& (IOSTATE_failbit
|IOSTATE_badbit
)) != 0;
3787 /* ??7ios_base@std@@QBE_NXZ */
3788 /* ??7ios_base@std@@QEBA_NXZ */
3789 DEFINE_THISCALL_WRAPPER(ios_base_op_succ
, 4)
3790 bool __thiscall
ios_base_op_succ(const ios_base
*this)
3792 TRACE("(%p)\n", this);
3793 return ios_base_fail(this);
3796 /* ??Bios_base@std@@QBEPAXXZ */
3797 /* ??Bios_base@std@@QEBAPEAXXZ */
3798 DEFINE_THISCALL_WRAPPER(ios_base_op_fail
, 4)
3799 void* __thiscall
ios_base_op_fail(const ios_base
*this)
3801 TRACE("(%p)\n", this);
3802 return ios_base_fail(this) ? NULL
: (void*)this;
3805 /* ?_Addstd@ios_base@std@@IAEXXZ */
3806 /* ?_Addstd@ios_base@std@@IEAAXXZ */
3807 DEFINE_THISCALL_WRAPPER(ios_base_Addstd
, 4)
3808 void __thiscall
ios_base_Addstd(ios_base
*this)
3810 FIXME("(%p) stub\n", this);
3813 /* ?_Init@ios_base@std@@IAEXXZ */
3814 /* ?_Init@ios_base@std@@IEAAXXZ */
3815 DEFINE_THISCALL_WRAPPER(ios_base__Init
, 4)
3816 void __thiscall
ios_base__Init(ios_base
*this)
3818 TRACE("(%p)\n", this);
3821 this->state
= this->except
= IOSTATE_goodbit
;
3822 this->fmtfl
= FMTFLAG_skipws
| FMTFLAG_dec
;
3827 locale_ctor(IOS_LOCALE(this));
3830 /* ?bad@ios_base@std@@QBE_NXZ */
3831 /* ?bad@ios_base@std@@QEBA_NXZ */
3832 DEFINE_THISCALL_WRAPPER(ios_base_bad
, 4)
3833 bool __thiscall
ios_base_bad(const ios_base
*this)
3835 TRACE("(%p)\n", this);
3836 return (this->state
& IOSTATE_badbit
) != 0;
3839 /* ?eof@ios_base@std@@QBE_NXZ */
3840 /* ?eof@ios_base@std@@QEBA_NXZ */
3841 DEFINE_THISCALL_WRAPPER(ios_base_eof
, 4)
3842 bool __thiscall
ios_base_eof(const ios_base
*this)
3844 TRACE("(%p)\n", this);
3845 return (this->state
& IOSTATE_eofbit
) != 0;
3848 /* ?flags@ios_base@std@@QAEHH@Z */
3849 /* ?flags@ios_base@std@@QEAAHH@Z */
3850 DEFINE_THISCALL_WRAPPER(ios_base_flags_set
, 8)
3851 IOSB_fmtflags __thiscall
ios_base_flags_set(ios_base
*this, IOSB_fmtflags flags
)
3853 IOSB_fmtflags ret
= this->fmtfl
;
3855 TRACE("(%p %x)\n", this, flags
);
3857 this->fmtfl
= flags
& FMTFLAG_mask
;
3861 /* ?flags@ios_base@std@@QBEHXZ */
3862 /* ?flags@ios_base@std@@QEBAHXZ */
3863 DEFINE_THISCALL_WRAPPER(ios_base_flags_get
, 4)
3864 IOSB_fmtflags __thiscall
ios_base_flags_get(const ios_base
*this)
3866 TRACE("(%p)\n", this);
3870 /* ?getloc@ios_base@std@@QBE?AVlocale@2@XZ */
3871 /* ?getloc@ios_base@std@@QEBA?AVlocale@2@XZ */
3872 DEFINE_THISCALL_WRAPPER(ios_base_getloc
, 8)
3873 locale
* __thiscall
ios_base_getloc(const ios_base
*this, locale
*ret
)
3875 TRACE("(%p)\n", this);
3876 return locale_copy_ctor(ret
, IOS_LOCALE(this));
3879 /* ?good@ios_base@std@@QBE_NXZ */
3880 /* ?good@ios_base@std@@QEBA_NXZ */
3881 DEFINE_THISCALL_WRAPPER(ios_base_good
, 4)
3882 bool __thiscall
ios_base_good(const ios_base
*this)
3884 TRACE("(%p)\n", this);
3885 return this->state
== IOSTATE_goodbit
;
3888 /* ?imbue@ios_base@std@@QAE?AVlocale@2@ABV32@@Z */
3889 /* ?imbue@ios_base@std@@QEAA?AVlocale@2@AEBV32@@Z */
3890 DEFINE_THISCALL_WRAPPER(ios_base_imbue
, 12)
3891 locale
* __thiscall
ios_base_imbue(ios_base
*this, locale
*ret
, const locale
*loc
)
3893 TRACE("(%p %p)\n", this, loc
);
3894 *ret
= *IOS_LOCALE(this);
3895 locale_copy_ctor(IOS_LOCALE(this), loc
);
3899 /* ?precision@ios_base@std@@QAEHH@Z */
3900 /* ?precision@ios_base@std@@QEAA_J_J@Z */
3901 DEFINE_THISCALL_WRAPPER(ios_base_precision_set
, 8)
3902 streamsize __thiscall
ios_base_precision_set(ios_base
*this, streamsize precision
)
3904 streamsize ret
= this->prec
;
3906 TRACE("(%p %Id)\n", this, precision
);
3908 this->prec
= precision
;
3912 /* ?precision@ios_base@std@@QBEHXZ */
3913 /* ?precision@ios_base@std@@QEBA_JXZ */
3914 DEFINE_THISCALL_WRAPPER(ios_base_precision_get
, 4)
3915 streamsize __thiscall
ios_base_precision_get(const ios_base
*this)
3917 TRACE("(%p)\n", this);
3921 /* ?rdstate@ios_base@std@@QBEHXZ */
3922 /* ?rdstate@ios_base@std@@QEBAHXZ */
3923 DEFINE_THISCALL_WRAPPER(ios_base_rdstate
, 4)
3924 IOSB_iostate __thiscall
ios_base_rdstate(const ios_base
*this)
3926 TRACE("(%p)\n", this);
3930 /* ?setf@ios_base@std@@QAEHHH@Z */
3931 /* ?setf@ios_base@std@@QEAAHHH@Z */
3932 DEFINE_THISCALL_WRAPPER(ios_base_setf_mask
, 12)
3933 IOSB_fmtflags __thiscall
ios_base_setf_mask(ios_base
*this, IOSB_fmtflags flags
, IOSB_fmtflags mask
)
3935 IOSB_fmtflags ret
= this->fmtfl
;
3937 TRACE("(%p %x %x)\n", this, flags
, mask
);
3939 this->fmtfl
= (this->fmtfl
& (~mask
)) | (flags
& mask
& FMTFLAG_mask
);
3943 /* ?setf@ios_base@std@@QAEHH@Z */
3944 /* ?setf@ios_base@std@@QEAAHH@Z */
3945 DEFINE_THISCALL_WRAPPER(ios_base_setf
, 8)
3946 IOSB_fmtflags __thiscall
ios_base_setf(ios_base
*this, IOSB_fmtflags flags
)
3948 IOSB_fmtflags ret
= this->fmtfl
;
3950 TRACE("(%p %x)\n", this, flags
);
3952 this->fmtfl
|= flags
& FMTFLAG_mask
;
3956 /* ?setstate@ios_base@std@@QAEXH_N@Z */
3957 /* ?setstate@ios_base@std@@QEAAXH_N@Z */
3958 DEFINE_THISCALL_WRAPPER(ios_base_setstate_reraise
, 12)
3959 void __thiscall
ios_base_setstate_reraise(ios_base
*this, IOSB_iostate state
, bool reraise
)
3961 TRACE("(%p %x %x)\n", this, state
, reraise
);
3963 if(state
!= IOSTATE_goodbit
)
3964 ios_base_clear_reraise(this, this->state
| state
, reraise
);
3967 /* ?setstate@ios_base@std@@QAEXH@Z */
3968 /* ?setstate@ios_base@std@@QEAAXH@Z */
3969 DEFINE_THISCALL_WRAPPER(ios_base_setstate
, 8)
3970 void __thiscall
ios_base_setstate(ios_base
*this, IOSB_iostate state
)
3972 ios_base_setstate_reraise(this, state
, FALSE
);
3975 /* ?sync_with_stdio@ios_base@std@@SA_N_N@Z */
3976 bool __cdecl
ios_base_sync_with_stdio(bool sync
)
3981 TRACE("(%x)\n", sync
);
3983 _Lockit_ctor_locktype(&lock
, _LOCK_STREAM
);
3984 ret
= ios_base_Sync
;
3985 ios_base_Sync
= sync
;
3986 _Lockit_dtor(&lock
);
3990 /* ?unsetf@ios_base@std@@QAEXH@Z */
3991 /* ?unsetf@ios_base@std@@QEAAXH@Z */
3992 DEFINE_THISCALL_WRAPPER(ios_base_unsetf
, 8)
3993 void __thiscall
ios_base_unsetf(ios_base
*this, IOSB_fmtflags flags
)
3995 TRACE("(%p %x)\n", this, flags
);
3996 this->fmtfl
&= ~flags
;
3999 /* ?width@ios_base@std@@QAEHH@Z */
4000 /* ?width@ios_base@std@@QEAA_J_J@Z */
4001 DEFINE_THISCALL_WRAPPER(ios_base_width_set
, 8)
4002 streamsize __thiscall
ios_base_width_set(ios_base
*this, streamsize width
)
4004 streamsize ret
= this->wide
;
4006 TRACE("(%p %Id)\n", this, width
);
4012 /* ?width@ios_base@std@@QBEHXZ */
4013 /* ?width@ios_base@std@@QEBA_JXZ */
4014 DEFINE_THISCALL_WRAPPER(ios_base_width_get
, 4)
4015 streamsize __thiscall
ios_base_width_get(ios_base
*this)
4017 TRACE("(%p)\n", this);
4021 /* ?xalloc@ios_base@std@@SAHXZ */
4022 int __cdecl
ios_base_xalloc(void)
4029 _Lockit_ctor_locktype(&lock
, _LOCK_STREAM
);
4030 ret
= ios_base_Index
++;
4031 _Lockit_dtor(&lock
);
4035 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IAE@XZ */
4036 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IEAA@XZ */
4037 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor
, 4)
4038 basic_ios_char
* __thiscall
basic_ios_char_ctor(basic_ios_char
*this)
4040 TRACE("(%p)\n", this);
4042 ios_base_ctor(&this->base
);
4043 this->base
.vtable
= &basic_ios_char_vtable
;
4047 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IAEXPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
4048 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
4049 DEFINE_THISCALL_WRAPPER(basic_ios_char_init
, 12)
4050 void __thiscall
basic_ios_char_init(basic_ios_char
*this, basic_streambuf_char
*streambuf
, bool isstd
)
4052 TRACE("(%p %p %x)\n", this, streambuf
, isstd
);
4053 ios_base__Init(&this->base
);
4054 this->strbuf
= streambuf
;
4055 this->stream
= NULL
;
4059 ios_base_setstate(&this->base
, IOSTATE_badbit
);
4062 FIXME("standard streams not handled yet\n");
4065 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4066 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4067 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor_streambuf
, 8)
4068 basic_ios_char
* __thiscall
basic_ios_char_ctor_streambuf(basic_ios_char
*this, basic_streambuf_char
*strbuf
)
4070 TRACE("(%p %p)\n", this, strbuf
);
4072 basic_ios_char_ctor(this);
4073 basic_ios_char_init(this, strbuf
, FALSE
);
4077 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UAE@XZ */
4078 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UEAA@XZ */
4079 DEFINE_THISCALL_WRAPPER(basic_ios_char_dtor
, 4)
4080 void __thiscall
basic_ios_char_dtor(basic_ios_char
*this)
4082 TRACE("(%p)\n", this);
4083 ios_base_dtor(&this->base
);
4086 DEFINE_THISCALL_WRAPPER(basic_ios_char_vector_dtor
, 8)
4087 basic_ios_char
* __thiscall
basic_ios_char_vector_dtor(basic_ios_char
*this, unsigned int flags
)
4089 TRACE("(%p %x)\n", this, flags
);
4091 /* we have an array, with the number of elements stored before the first object */
4092 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
4094 for(i
=*ptr
-1; i
>=0; i
--)
4095 basic_ios_char_dtor(this+i
);
4096 operator_delete(ptr
);
4098 basic_ios_char_dtor(this);
4100 operator_delete(this);
4106 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
4107 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
4108 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear_reraise
, 12)
4109 void __thiscall
basic_ios_char_clear_reraise(basic_ios_char
*this, IOSB_iostate state
, bool reraise
)
4111 TRACE("(%p %x %x)\n", this, state
, reraise
);
4112 ios_base_clear_reraise(&this->base
, state
| (this->strbuf
? IOSTATE_goodbit
: IOSTATE_badbit
), reraise
);
4115 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
4116 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
4117 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear
, 8)
4118 void __thiscall
basic_ios_char_clear(basic_ios_char
*this, unsigned int state
)
4120 basic_ios_char_clear_reraise(this, (IOSB_iostate
)state
, FALSE
);
4123 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEAAV12@ABV12@@Z */
4124 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEBV12@@Z */
4125 DEFINE_THISCALL_WRAPPER(basic_ios_char_copyfmt
, 8)
4126 basic_ios_char
* __thiscall
basic_ios_char_copyfmt(basic_ios_char
*this, basic_ios_char
*copy
)
4128 TRACE("(%p %p)\n", this, copy
);
4132 this->stream
= copy
->stream
;
4133 this->fillch
= copy
->fillch
;
4134 ios_base_copyfmt(&this->base
, ©
->base
);
4138 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEDD@Z */
4139 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAADD@Z */
4140 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_set
, 8)
4141 char __thiscall
basic_ios_char_fill_set(basic_ios_char
*this, char fill
)
4143 char ret
= this->fillch
;
4145 TRACE("(%p %c)\n", this, fill
);
4147 this->fillch
= fill
;
4151 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDXZ */
4152 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADXZ */
4153 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_get
, 4)
4154 char __thiscall
basic_ios_char_fill_get(basic_ios_char
*this)
4156 TRACE("(%p)\n", this);
4157 return this->fillch
;
4160 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
4161 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
4162 DEFINE_THISCALL_WRAPPER(basic_ios_char_imbue
, 12)
4163 locale
*__thiscall
basic_ios_char_imbue(basic_ios_char
*this, locale
*ret
, const locale
*loc
)
4165 TRACE("(%p %p %p)\n", this, ret
, loc
);
4168 basic_streambuf_char_pubimbue(this->strbuf
, ret
, loc
);
4172 return ios_base_imbue(&this->base
, ret
, loc
);
4175 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDDD@Z */
4176 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADDD@Z */
4177 DEFINE_THISCALL_WRAPPER(basic_ios_char_narrow
, 12)
4178 char __thiscall
basic_ios_char_narrow(basic_ios_char
*this, char ch
, char def
)
4180 TRACE("(%p %c %c)\n", this, ch
, def
);
4181 return ctype_char_narrow_ch(ctype_char_use_facet(IOS_LOCALE(this->strbuf
)), ch
, def
);
4184 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PAV32@@Z */
4185 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAV32@@Z */
4186 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_set
, 8)
4187 basic_streambuf_char
* __thiscall
basic_ios_char_rdbuf_set(basic_ios_char
*this, basic_streambuf_char
*streambuf
)
4189 basic_streambuf_char
*ret
= this->strbuf
;
4191 TRACE("(%p %p)\n", this, streambuf
);
4193 this->strbuf
= streambuf
;
4194 basic_ios_char_clear(this, IOSTATE_goodbit
);
4198 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
4199 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
4200 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_get
, 4)
4201 basic_streambuf_char
* __thiscall
basic_ios_char_rdbuf_get(const basic_ios_char
*this)
4203 TRACE("(%p)\n", this);
4204 return this->strbuf
;
4207 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
4208 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
4209 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate_reraise
, 12)
4210 void __thiscall
basic_ios_char_setstate_reraise(basic_ios_char
*this, IOSB_iostate state
, bool reraise
)
4212 TRACE("(%p %x %x)\n", this, state
, reraise
);
4214 if(state
!= IOSTATE_goodbit
)
4215 basic_ios_char_clear_reraise(this, this->base
.state
| state
, reraise
);
4218 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
4219 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
4220 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate
, 8)
4221 void __thiscall
basic_ios_char_setstate(basic_ios_char
*this, unsigned int state
)
4223 basic_ios_char_setstate_reraise(this, (IOSB_iostate
)state
, FALSE
);
4226 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@PAV32@@Z */
4227 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@PEAV32@@Z */
4228 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_set
, 8)
4229 basic_ostream_char
* __thiscall
basic_ios_char_tie_set(basic_ios_char
*this, basic_ostream_char
*ostream
)
4231 basic_ostream_char
*ret
= this->stream
;
4233 TRACE("(%p %p)\n", this, ostream
);
4235 this->stream
= ostream
;
4239 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
4240 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
4241 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_get
, 4)
4242 basic_ostream_char
* __thiscall
basic_ios_char_tie_get(const basic_ios_char
*this)
4244 TRACE("(%p)\n", this);
4245 return this->stream
;
4248 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDD@Z */
4249 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADD@Z */
4250 DEFINE_THISCALL_WRAPPER(basic_ios_char_widen
, 8)
4251 char __thiscall
basic_ios_char_widen(basic_ios_char
*this, char ch
)
4253 TRACE("(%p %c)\n", this, ch
);
4254 return ctype_char_widen_ch(ctype_char_use_facet(IOS_LOCALE(this->strbuf
)), ch
);
4257 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IAE@XZ */
4258 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IEAA@XZ */
4259 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor
, 4)
4260 basic_ios_wchar
* __thiscall
basic_ios_short_ctor(basic_ios_wchar
*this)
4262 TRACE("(%p)\n", this);
4264 ios_base_ctor(&this->base
);
4265 this->base
.vtable
= &basic_ios_short_vtable
;
4269 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IAEXPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
4270 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IEAAXPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
4271 DEFINE_THISCALL_WRAPPER(basic_ios_short_init
, 12)
4272 void __thiscall
basic_ios_short_init(basic_ios_wchar
*this, basic_streambuf_wchar
*streambuf
, bool isstd
)
4274 TRACE("(%p %p %x)\n", this, streambuf
, isstd
);
4275 ios_base__Init(&this->base
);
4276 this->strbuf
= streambuf
;
4277 this->stream
= NULL
;
4281 ios_base_setstate(&this->base
, IOSTATE_badbit
);
4284 FIXME("standard streams not handled yet\n");
4287 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
4288 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
4289 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor_streambuf
, 8)
4290 basic_ios_wchar
* __thiscall
basic_ios_short_ctor_streambuf(basic_ios_wchar
*this, basic_streambuf_wchar
*strbuf
)
4292 TRACE("(%p %p)\n", this, strbuf
);
4294 basic_ios_short_ctor(this);
4295 basic_ios_short_init(this, strbuf
, FALSE
);
4299 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UAE@XZ */
4300 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UEAA@XZ */
4301 DEFINE_THISCALL_WRAPPER(basic_ios_short_dtor
, 4)
4302 void __thiscall
basic_ios_short_dtor(basic_ios_wchar
*this)
4304 TRACE("(%p)\n", this);
4305 ios_base_dtor(&this->base
);
4308 DEFINE_THISCALL_WRAPPER(basic_ios_short_vector_dtor
, 8)
4309 basic_ios_wchar
* __thiscall
basic_ios_short_vector_dtor(basic_ios_wchar
*this, unsigned int flags
)
4311 TRACE("(%p %x)\n", this, flags
);
4313 /* we have an array, with the number of elements stored before the first object */
4314 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
4316 for(i
=*ptr
-1; i
>=0; i
--)
4317 basic_ios_short_dtor(this+i
);
4318 operator_delete(ptr
);
4320 basic_ios_short_dtor(this);
4322 operator_delete(this);
4328 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
4329 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
4330 DEFINE_THISCALL_WRAPPER(basic_ios_short_clear_reraise
, 12)
4331 void __thiscall
basic_ios_short_clear_reraise(basic_ios_wchar
*this, IOSB_iostate state
, bool reraise
)
4333 TRACE("(%p %x %x)\n", this, state
, reraise
);
4334 ios_base_clear_reraise(&this->base
, state
| (this->strbuf
? IOSTATE_goodbit
: IOSTATE_badbit
), reraise
);
4337 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
4338 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
4339 DEFINE_THISCALL_WRAPPER(basic_ios_short_clear
, 8)
4340 void __thiscall
basic_ios_short_clear(basic_ios_wchar
*this, unsigned int state
)
4342 basic_ios_short_clear_reraise(this, (IOSB_iostate
)state
, FALSE
);
4345 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEAAV12@ABV12@@Z */
4346 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEBV12@@Z */
4347 DEFINE_THISCALL_WRAPPER(basic_ios_short_copyfmt
, 8)
4348 basic_ios_wchar
* __thiscall
basic_ios_short_copyfmt(basic_ios_wchar
*this, basic_ios_wchar
*copy
)
4350 TRACE("(%p %p)\n", this, copy
);
4354 this->stream
= copy
->stream
;
4355 this->fillch
= copy
->fillch
;
4356 ios_base_copyfmt(&this->base
, ©
->base
);
4360 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEGG@Z */
4361 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
4362 DEFINE_THISCALL_WRAPPER(basic_ios_short_fill_set
, 8)
4363 wchar_t __thiscall
basic_ios_short_fill_set(basic_ios_wchar
*this, wchar_t fill
)
4365 wchar_t ret
= this->fillch
;
4367 TRACE("(%p %c)\n", this, fill
);
4369 this->fillch
= fill
;
4373 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGXZ */
4374 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGXZ */
4375 DEFINE_THISCALL_WRAPPER(basic_ios_short_fill_get
, 4)
4376 wchar_t __thiscall
basic_ios_short_fill_get(basic_ios_wchar
*this)
4378 TRACE("(%p)\n", this);
4379 return this->fillch
;
4382 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
4383 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
4384 DEFINE_THISCALL_WRAPPER(basic_ios_short_imbue
, 12)
4385 locale
*__thiscall
basic_ios_short_imbue(basic_ios_wchar
*this, locale
*ret
, const locale
*loc
)
4387 TRACE("(%p %p %p)\n", this, ret
, loc
);
4390 basic_streambuf_wchar_pubimbue(this->strbuf
, ret
, loc
);
4394 return ios_base_imbue(&this->base
, ret
, loc
);
4397 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEDGD@Z */
4398 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBADGD@Z */
4399 DEFINE_THISCALL_WRAPPER(basic_ios_short_narrow
, 12)
4400 char __thiscall
basic_ios_short_narrow(basic_ios_wchar
*this, wchar_t ch
, char def
)
4402 TRACE("(%p %c %c)\n", this, ch
, def
);
4403 return ctype_wchar_narrow_ch(ctype_wchar_use_facet(IOS_LOCALE(this->strbuf
)), ch
, def
);
4406 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAV32@@Z */
4407 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAV32@@Z */
4408 DEFINE_THISCALL_WRAPPER(basic_ios_short_rdbuf_set
, 8)
4409 basic_streambuf_wchar
* __thiscall
basic_ios_short_rdbuf_set(basic_ios_wchar
*this, basic_streambuf_wchar
*streambuf
)
4411 basic_streambuf_wchar
*ret
= this->strbuf
;
4413 TRACE("(%p %p)\n", this, streambuf
);
4415 this->strbuf
= streambuf
;
4416 basic_ios_short_clear(this, IOSTATE_goodbit
);
4420 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
4421 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
4422 DEFINE_THISCALL_WRAPPER(basic_ios_short_rdbuf_get
, 4)
4423 basic_streambuf_wchar
* __thiscall
basic_ios_short_rdbuf_get(const basic_ios_wchar
*this)
4425 TRACE("(%p)\n", this);
4426 return this->strbuf
;
4429 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
4430 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
4431 DEFINE_THISCALL_WRAPPER(basic_ios_short_setstate_reraise
, 12)
4432 void __thiscall
basic_ios_short_setstate_reraise(basic_ios_wchar
*this, IOSB_iostate state
, bool reraise
)
4434 TRACE("(%p %x %x)\n", this, state
, reraise
);
4436 if(state
!= IOSTATE_goodbit
)
4437 basic_ios_short_clear_reraise(this, this->base
.state
| state
, reraise
);
4440 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
4441 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
4442 DEFINE_THISCALL_WRAPPER(basic_ios_short_setstate
, 8)
4443 void __thiscall
basic_ios_short_setstate(basic_ios_wchar
*this, IOSB_iostate state
)
4445 basic_ios_short_setstate_reraise(this, state
, FALSE
);
4448 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@PAV32@@Z */
4449 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@PEAV32@@Z */
4450 DEFINE_THISCALL_WRAPPER(basic_ios_short_tie_set
, 8)
4451 basic_ostream_wchar
* __thiscall
basic_ios_short_tie_set(basic_ios_wchar
*this, basic_ostream_wchar
*ostream
)
4453 basic_ostream_wchar
*ret
= this->stream
;
4455 TRACE("(%p %p)\n", this, ostream
);
4457 this->stream
= ostream
;
4461 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
4462 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
4463 DEFINE_THISCALL_WRAPPER(basic_ios_short_tie_get
, 4)
4464 basic_ostream_wchar
* __thiscall
basic_ios_short_tie_get(const basic_ios_wchar
*this)
4466 TRACE("(%p)\n", this);
4467 return this->stream
;
4470 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGD@Z */
4471 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGD@Z */
4472 DEFINE_THISCALL_WRAPPER(basic_ios_short_widen
, 8)
4473 wchar_t __thiscall
basic_ios_short_widen(basic_ios_wchar
*this, char ch
)
4475 TRACE("(%p %c)\n", this, ch
);
4476 return ctype_wchar_widen_ch(ctype_wchar_use_facet(IOS_LOCALE(this->strbuf
)), ch
);
4479 /* Caution: basic_ostream uses virtual inheritance.
4480 * All constructors have additional parameter that says if base class should be initialized.
4481 * Base class needs to be accessed using vbtable.
4483 static inline basic_ios_char
* basic_ostream_char_get_basic_ios(basic_ostream_char
*this)
4485 return (basic_ios_char
*)((char*)this+this->vbtable
[1]);
4488 static inline basic_ios_char
* basic_ostream_char_to_basic_ios(basic_ostream_char
*ptr
)
4490 return (basic_ios_char
*)((char*)ptr
+basic_ostream_char_vbtable
[1]);
4493 static inline basic_ostream_char
* basic_ostream_char_from_basic_ios(basic_ios_char
*ptr
)
4495 return (basic_ostream_char
*)((char*)ptr
-basic_ostream_char_vbtable
[1]);
4498 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
4499 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
4500 DEFINE_THISCALL_WRAPPER(basic_ostream_char_ctor
, 20)
4501 basic_ostream_char
* __thiscall
basic_ostream_char_ctor(basic_ostream_char
*this,
4502 basic_streambuf_char
*strbuf
, bool isstd
, bool init
, bool virt_init
)
4504 basic_ios_char
*base
;
4506 TRACE("(%p %p %d %d %d)\n", this, strbuf
, isstd
, init
, virt_init
);
4509 this->vbtable
= basic_ostream_char_vbtable
;
4510 base
= basic_ostream_char_get_basic_ios(this);
4511 basic_ios_char_ctor(base
);
4513 base
= basic_ostream_char_get_basic_ios(this);
4516 base
->base
.vtable
= &basic_ostream_char_vtable
;
4518 basic_ios_char_init(base
, strbuf
, isstd
);
4522 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
4523 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
4524 DEFINE_THISCALL_WRAPPER(basic_ostream_char_ctor_uninitialized
, 12)
4525 basic_ostream_char
* __thiscall
basic_ostream_char_ctor_uninitialized(basic_ostream_char
*this,
4526 int uninitialized
, bool virt_init
)
4528 basic_ios_char
*base
;
4530 TRACE("(%p %d)\n", this, uninitialized
);
4533 this->vbtable
= basic_ostream_char_vbtable
;
4534 base
= basic_ostream_char_get_basic_ios(this);
4535 basic_ios_char_ctor(base
);
4537 base
= basic_ostream_char_get_basic_ios(this);
4540 base
->base
.vtable
= &basic_ostream_char_vtable
;
4541 ios_base_Addstd(&base
->base
);
4545 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
4546 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
4547 DEFINE_THISCALL_WRAPPER(basic_ostream_char_dtor
, 4)
4548 void __thiscall
basic_ostream_char_dtor(basic_ios_char
*base
)
4550 basic_ostream_char
*this = basic_ostream_char_from_basic_ios(base
);
4552 /* don't destroy virtual base here */
4553 TRACE("(%p)\n", this);
4556 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
4557 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
4558 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vbase_dtor
, 4)
4559 void __thiscall
basic_ostream_char_vbase_dtor(basic_ostream_char
*this)
4561 TRACE("(%p)\n", this);
4562 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(this));
4563 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(this));
4566 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vector_dtor
, 8)
4567 basic_ostream_char
* __thiscall
basic_ostream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
4569 basic_ostream_char
*this = basic_ostream_char_from_basic_ios(base
);
4571 TRACE("(%p %x)\n", this, flags
);
4574 /* we have an array, with the number of elements stored before the first object */
4575 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
4577 for(i
=*ptr
-1; i
>=0; i
--)
4578 basic_ostream_char_vbase_dtor(this+i
);
4579 operator_delete(ptr
);
4581 basic_ostream_char_vbase_dtor(this);
4583 operator_delete(this);
4589 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
4590 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
4591 DEFINE_THISCALL_WRAPPER(basic_ostream_char_flush
, 4)
4592 basic_ostream_char
* __thiscall
basic_ostream_char_flush(basic_ostream_char
*this)
4594 /* this function is not matching C++ specification */
4595 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4597 TRACE("(%p)\n", this);
4599 if(basic_ios_char_rdbuf_get(base
) && ios_base_good(&base
->base
)
4600 && basic_streambuf_char_pubsync(basic_ios_char_rdbuf_get(base
))==-1)
4601 basic_ios_char_setstate(base
, IOSTATE_badbit
);
4605 /* ?flush@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
4606 /* ?flush@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
4607 basic_ostream_char
* __cdecl
flush_ostream_char(basic_ostream_char
*ostream
)
4609 return basic_ostream_char_flush(ostream
);
4612 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
4613 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
4614 DEFINE_THISCALL_WRAPPER(basic_ostream_char_osfx
, 4)
4615 void __thiscall
basic_ostream_char_osfx(basic_ostream_char
*this)
4617 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4619 TRACE("(%p)\n", this);
4621 if(base
->base
.fmtfl
& FMTFLAG_unitbuf
)
4622 basic_ostream_char_flush(this);
4625 static BOOL
basic_ostream_char_sentry_create(basic_ostream_char
*ostr
)
4627 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
4629 if(ios_base_good(&base
->base
) && base
->stream
)
4630 basic_ostream_char_flush(base
->stream
);
4632 return ios_base_good(&base
->base
);
4635 static void basic_ostream_char_sentry_destroy(basic_ostream_char
*ostr
)
4637 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
4639 if(ios_base_good(&base
->base
) && !__uncaught_exception())
4640 basic_ostream_char_osfx(ostr
);
4643 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE_NXZ */
4644 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA_NXZ */
4645 DEFINE_THISCALL_WRAPPER(basic_ostream_char_opfx
, 4)
4646 bool __thiscall
basic_ostream_char_opfx(basic_ostream_char
*this)
4648 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4650 TRACE("(%p)\n", this);
4652 if(ios_base_good(&base
->base
) && base
->stream
)
4653 basic_ostream_char_flush(base
->stream
);
4654 return ios_base_good(&base
->base
);
4657 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
4658 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
4659 DEFINE_THISCALL_WRAPPER(basic_ostream_char_put
, 8)
4660 basic_ostream_char
* __thiscall
basic_ostream_char_put(basic_ostream_char
*this, char ch
)
4662 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4664 TRACE("(%p %c)\n", this, ch
);
4666 if(!basic_ostream_char_sentry_create(this)
4667 || basic_streambuf_char_sputc(base
->strbuf
, ch
)==EOF
) {
4668 basic_ostream_char_sentry_destroy(this);
4669 basic_ios_char_setstate(base
, IOSTATE_badbit
);
4673 basic_ostream_char_sentry_destroy(this);
4677 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@JH@Z */
4678 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
4679 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp
, 12)
4680 basic_ostream_char
* __thiscall
basic_ostream_char_seekp(basic_ostream_char
*this, streamoff off
, int way
)
4682 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4684 TRACE("(%p %Id %d)\n", this, off
, way
);
4686 if(!ios_base_fail(&base
->base
)) {
4689 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base
),
4690 &seek
, off
, way
, OPENMODE_out
);
4691 if(seek
.off
==-1 && seek
.pos
==0 && seek
.state
==0)
4692 basic_ios_char_setstate(base
, IOSTATE_failbit
);
4697 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
4698 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
4699 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp_fpos
, 28)
4700 basic_ostream_char
* __thiscall
basic_ostream_char_seekp_fpos(basic_ostream_char
*this, fpos_int pos
)
4702 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4704 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos
));
4706 if(!ios_base_fail(&base
->base
)) {
4709 basic_streambuf_char_pubseekpos(basic_ios_char_rdbuf_get(base
),
4710 &seek
, pos
, OPENMODE_out
);
4711 if(seek
.off
==-1 && seek
.pos
==0 && seek
.state
==0)
4712 basic_ios_char_setstate(base
, IOSTATE_failbit
);
4717 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
4718 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
4719 DEFINE_THISCALL_WRAPPER(basic_ostream_char_tellp
, 8)
4720 fpos_int
* __thiscall
basic_ostream_char_tellp(basic_ostream_char
*this, fpos_int
*ret
)
4722 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4724 TRACE("(%p)\n", this);
4726 if(!ios_base_fail(&base
->base
)) {
4727 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base
),
4728 ret
, 0, SEEKDIR_cur
, OPENMODE_out
);
4737 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@PBDH@Z */
4738 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEBD_J@Z */
4739 DEFINE_THISCALL_WRAPPER(basic_ostream_char_write
, 12)
4740 basic_ostream_char
* __thiscall
basic_ostream_char_write(basic_ostream_char
*this, const char *str
, streamsize count
)
4742 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4744 TRACE("(%p %s %Id)\n", this, debugstr_a(str
), count
);
4746 if(!basic_ostream_char_sentry_create(this)
4747 || basic_streambuf_char_sputn(base
->strbuf
, str
, count
)!=count
) {
4748 basic_ostream_char_sentry_destroy(this);
4749 basic_ios_char_setstate(base
, IOSTATE_badbit
);
4753 basic_ostream_char_sentry_destroy(this);
4757 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@F@Z */
4758 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@F@Z */
4759 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_short
, 8)
4760 basic_ostream_char
* __thiscall
basic_ostream_char_print_short(basic_ostream_char
*this, short val
)
4762 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4763 int state
= IOSTATE_goodbit
;
4765 TRACE("(%p %d)\n", this, val
);
4767 if(basic_ostream_char_sentry_create(this)) {
4768 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4769 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
4770 ostreambuf_iterator_char dest
;
4772 memset(&dest
, 0, sizeof(dest
));
4773 dest
.strbuf
= strbuf
;
4774 num_put_char_put_long(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
),
4775 (ios_base_flags_get(&base
->base
) & FMTFLAG_basefield
& (FMTFLAG_oct
| FMTFLAG_hex
))
4776 ? (LONG
)((unsigned short)val
) : (LONG
)val
);
4778 basic_ostream_char_sentry_destroy(this);
4780 basic_ios_char_setstate(base
, state
);
4784 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@G@Z */
4785 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@G@Z */
4786 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ushort
, 8)
4787 basic_ostream_char
* __thiscall
basic_ostream_char_print_ushort(basic_ostream_char
*this, unsigned short val
)
4789 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4790 int state
= IOSTATE_goodbit
;
4792 TRACE("(%p %u)\n", this, val
);
4794 if(basic_ostream_char_sentry_create(this)) {
4795 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4796 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
4797 ostreambuf_iterator_char dest
;
4799 memset(&dest
, 0, sizeof(dest
));
4800 dest
.strbuf
= strbuf
;
4801 num_put_char_put_ulong(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4803 basic_ostream_char_sentry_destroy(this);
4805 basic_ios_char_setstate(base
, state
);
4809 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z */
4810 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@H@Z */
4811 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z */
4812 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@J@Z */
4813 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int
, 8)
4814 basic_ostream_char
* __thiscall
basic_ostream_char_print_int(basic_ostream_char
*this, int val
)
4816 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4817 int state
= IOSTATE_goodbit
;
4819 TRACE("(%p %d)\n", this, val
);
4821 if(basic_ostream_char_sentry_create(this)) {
4822 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4823 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
4824 ostreambuf_iterator_char dest
;
4826 memset(&dest
, 0, sizeof(dest
));
4827 dest
.strbuf
= strbuf
;
4828 num_put_char_put_long(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4830 basic_ostream_char_sentry_destroy(this);
4832 basic_ios_char_setstate(base
, state
);
4836 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@I@Z */
4837 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@I@Z */
4838 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z */
4839 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@K@Z */
4840 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint
, 8)
4841 basic_ostream_char
* __thiscall
basic_ostream_char_print_uint(basic_ostream_char
*this, unsigned int val
)
4843 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4844 int state
= IOSTATE_goodbit
;
4846 TRACE("(%p %u)\n", this, val
);
4848 if(basic_ostream_char_sentry_create(this)) {
4849 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4850 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
4851 ostreambuf_iterator_char dest
;
4853 memset(&dest
, 0, sizeof(dest
));
4854 dest
.strbuf
= strbuf
;
4855 num_put_char_put_ulong(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4857 basic_ostream_char_sentry_destroy(this);
4859 basic_ios_char_setstate(base
, state
);
4863 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@M@Z */
4864 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@M@Z */
4865 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_float
, 8)
4866 basic_ostream_char
* __thiscall
basic_ostream_char_print_float(basic_ostream_char
*this, float val
)
4868 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4869 int state
= IOSTATE_goodbit
;
4871 TRACE("(%p %f)\n", this, val
);
4873 if(basic_ostream_char_sentry_create(this)) {
4874 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4875 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
4876 ostreambuf_iterator_char dest
;
4878 memset(&dest
, 0, sizeof(dest
));
4879 dest
.strbuf
= strbuf
;
4880 num_put_char_put_double(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4882 basic_ostream_char_sentry_destroy(this);
4884 basic_ios_char_setstate(base
, state
);
4888 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@N@Z */
4889 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@N@Z */
4890 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_double
, 12)
4891 basic_ostream_char
* __thiscall
basic_ostream_char_print_double(basic_ostream_char
*this, double val
)
4893 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4894 int state
= IOSTATE_goodbit
;
4896 TRACE("(%p %lf)\n", this, val
);
4898 if(basic_ostream_char_sentry_create(this)) {
4899 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4900 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
4901 ostreambuf_iterator_char dest
;
4903 memset(&dest
, 0, sizeof(dest
));
4904 dest
.strbuf
= strbuf
;
4905 num_put_char_put_double(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4907 basic_ostream_char_sentry_destroy(this);
4909 basic_ios_char_setstate(base
, state
);
4913 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@O@Z */
4914 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@O@Z */
4915 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ldouble
, 12)
4916 basic_ostream_char
* __thiscall
basic_ostream_char_print_ldouble(basic_ostream_char
*this, double val
)
4918 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4919 int state
= IOSTATE_goodbit
;
4921 TRACE("(%p %lf)\n", this, val
);
4923 if(basic_ostream_char_sentry_create(this)) {
4924 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4925 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
4926 ostreambuf_iterator_char dest
;
4928 memset(&dest
, 0, sizeof(dest
));
4929 dest
.strbuf
= strbuf
;
4930 num_put_char_put_ldouble(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4932 basic_ostream_char_sentry_destroy(this);
4934 basic_ios_char_setstate(base
, state
);
4938 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4939 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4940 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_streambuf
, 8)
4941 basic_ostream_char
* __thiscall
basic_ostream_char_print_streambuf(basic_ostream_char
*this, basic_streambuf_char
*val
)
4943 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4944 IOSB_iostate state
= IOSTATE_badbit
;
4947 TRACE("(%p %p)\n", this, val
);
4949 if(basic_ostream_char_sentry_create(this)) {
4950 for(c
= basic_streambuf_char_sgetc(val
); c
!=EOF
;
4951 c
= basic_streambuf_char_snextc(val
)) {
4952 state
= IOSTATE_goodbit
;
4954 if(basic_streambuf_char_sputc(base
->strbuf
, c
) == EOF
) {
4955 state
= IOSTATE_badbit
;
4960 state
= IOSTATE_badbit
;
4962 basic_ostream_char_sentry_destroy(this);
4964 ios_base_width_set(&base
->base
, 0);
4965 basic_ios_char_setstate(base
, state
);
4969 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PBX@Z */
4970 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEBX@Z */
4971 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ptr
, 8)
4972 basic_ostream_char
* __thiscall
basic_ostream_char_print_ptr(basic_ostream_char
*this, const void *val
)
4974 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4975 int state
= IOSTATE_goodbit
;
4977 TRACE("(%p %p)\n", this, val
);
4979 if(basic_ostream_char_sentry_create(this)) {
4980 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4981 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
4982 ostreambuf_iterator_char dest
;
4984 memset(&dest
, 0, sizeof(dest
));
4985 dest
.strbuf
= strbuf
;
4986 num_put_char_put_ptr(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4988 basic_ostream_char_sentry_destroy(this);
4990 basic_ios_char_setstate(base
, state
);
4994 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_J@Z */
4995 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_J@Z */
4996 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int64
, 12)
4997 basic_ostream_char
* __thiscall
basic_ostream_char_print_int64(basic_ostream_char
*this, __int64 val
)
4999 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
5000 int state
= IOSTATE_goodbit
;
5002 TRACE("(%p)\n", this);
5004 if(basic_ostream_char_sentry_create(this)) {
5005 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
5006 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
5007 ostreambuf_iterator_char dest
;
5009 memset(&dest
, 0, sizeof(dest
));
5010 dest
.strbuf
= strbuf
;
5011 num_put_char_put_int64(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
5013 basic_ostream_char_sentry_destroy(this);
5015 basic_ios_char_setstate(base
, state
);
5019 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_K@Z */
5020 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_K@Z */
5021 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint64
, 12)
5022 basic_ostream_char
* __thiscall
basic_ostream_char_print_uint64(basic_ostream_char
*this, unsigned __int64 val
)
5024 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
5025 int state
= IOSTATE_goodbit
;
5027 TRACE("(%p)\n", this);
5029 if(basic_ostream_char_sentry_create(this)) {
5030 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
5031 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
5032 ostreambuf_iterator_char dest
;
5034 memset(&dest
, 0, sizeof(dest
));
5035 dest
.strbuf
= strbuf
;
5036 num_put_char_put_uint64(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
5038 basic_ostream_char_sentry_destroy(this);
5040 basic_ios_char_setstate(base
, state
);
5044 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_N@Z */
5045 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_N@Z */
5046 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_bool
, 8)
5047 basic_ostream_char
* __thiscall
basic_ostream_char_print_bool(basic_ostream_char
*this, bool val
)
5049 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
5050 int state
= IOSTATE_goodbit
;
5052 TRACE("(%p %x)\n", this, val
);
5054 if(basic_ostream_char_sentry_create(this)) {
5055 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
5056 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
5057 ostreambuf_iterator_char dest
;
5059 memset(&dest
, 0, sizeof(dest
));
5060 dest
.strbuf
= strbuf
;
5061 num_put_char_put_bool(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
5063 basic_ostream_char_sentry_destroy(this);
5065 basic_ios_char_setstate(base
, state
);
5069 /* ?ends@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
5070 /* ?ends@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
5071 basic_ostream_char
* __cdecl
basic_ostream_char_ends(basic_ostream_char
*ostr
)
5073 TRACE("(%p)\n", ostr
);
5075 basic_ostream_char_put(ostr
, 0);
5079 /* ?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
5080 /* ?endl@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
5081 basic_ostream_char
* __cdecl
basic_ostream_char_endl(basic_ostream_char
*ostr
)
5083 TRACE("(%p)\n", ostr
);
5085 basic_ostream_char_put(ostr
, '\n');
5086 basic_ostream_char_flush(ostr
);
5090 /* ??$?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 */
5091 /* ??$?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 */
5092 basic_ostream_char
* __cdecl
basic_ostream_char_print_bstr(basic_ostream_char
*ostr
, const basic_string_char
*str
)
5094 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
5095 IOSB_iostate state
= IOSTATE_goodbit
;
5097 TRACE("(%p %p)\n", ostr
, str
);
5099 if(basic_ostream_char_sentry_create(ostr
)) {
5100 size_t len
= MSVCP_basic_string_char_length(str
);
5101 streamsize pad
= (base
->base
.wide
>len
? base
->base
.wide
-len
: 0);
5103 if((base
->base
.fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
5104 for(; pad
!=0; pad
--) {
5105 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
5106 state
= IOSTATE_badbit
;
5112 if(state
== IOSTATE_goodbit
) {
5113 if(basic_streambuf_char_sputn(base
->strbuf
, MSVCP_basic_string_char_c_str(str
), len
) != len
)
5114 state
= IOSTATE_badbit
;
5117 if(state
== IOSTATE_goodbit
) {
5118 for(; pad
!=0; pad
--) {
5119 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
5120 state
= IOSTATE_badbit
;
5126 base
->base
.wide
= 0;
5128 state
= IOSTATE_badbit
;
5130 basic_ostream_char_sentry_destroy(ostr
);
5132 basic_ios_char_setstate(base
, state
);
5136 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@C@Z */
5137 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@C@Z */
5138 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@D@Z */
5139 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@D@Z */
5140 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@E@Z */
5141 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@E@Z */
5142 basic_ostream_char
* __cdecl
basic_ostream_char_print_ch(basic_ostream_char
*ostr
, char ch
)
5144 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
5145 IOSB_iostate state
= IOSTATE_goodbit
;
5147 TRACE("(%p %d)\n", ostr
, ch
);
5149 if(basic_ostream_char_sentry_create(ostr
)) {
5150 streamsize pad
= (base
->base
.wide
>1 ? base
->base
.wide
-1 : 0);
5152 if((base
->base
.fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
5153 for(; pad
!=0; pad
--) {
5154 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
5155 state
= IOSTATE_badbit
;
5161 if(state
== IOSTATE_goodbit
) {
5162 if(basic_streambuf_char_sputc(base
->strbuf
, ch
) == EOF
)
5163 state
= IOSTATE_badbit
;
5166 if(state
== IOSTATE_goodbit
) {
5167 for(; pad
!=0; pad
--) {
5168 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
5169 state
= IOSTATE_badbit
;
5175 base
->base
.wide
= 0;
5177 state
= IOSTATE_badbit
;
5179 basic_ostream_char_sentry_destroy(ostr
);
5181 basic_ios_char_setstate(base
, state
);
5185 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBC@Z */
5186 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBC@Z */
5187 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z */
5188 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBD@Z */
5189 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBE@Z */
5190 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBE@Z */
5191 basic_ostream_char
* __cdecl
basic_ostream_char_print_str(basic_ostream_char
*ostr
, const char *str
)
5193 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
5194 IOSB_iostate state
= IOSTATE_goodbit
;
5196 TRACE("(%p %s)\n", ostr
, str
);
5198 if(basic_ostream_char_sentry_create(ostr
)) {
5199 size_t len
= strlen(str
);
5200 streamsize pad
= (base
->base
.wide
>len
? base
->base
.wide
-len
: 0);
5202 if((base
->base
.fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
5203 for(; pad
!=0; pad
--) {
5204 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
5205 state
= IOSTATE_badbit
;
5211 if(state
== IOSTATE_goodbit
) {
5212 if(basic_streambuf_char_sputn(base
->strbuf
, str
, len
) != len
)
5213 state
= IOSTATE_badbit
;
5216 if(state
== IOSTATE_goodbit
) {
5217 for(; pad
!=0; pad
--) {
5218 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
5219 state
= IOSTATE_badbit
;
5225 base
->base
.wide
= 0;
5227 state
= IOSTATE_badbit
;
5229 basic_ostream_char_sentry_destroy(ostr
);
5231 basic_ios_char_setstate(base
, state
);
5235 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
5236 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
5237 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func
, 8)
5238 basic_ostream_char
* __thiscall
basic_ostream_char_print_func(basic_ostream_char
*this,
5239 basic_ostream_char
* (__cdecl
*pfunc
)(basic_ostream_char
*))
5241 TRACE("(%p %p)\n", this, pfunc
);
5246 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
5247 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
5248 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_basic_ios
, 8)
5249 basic_ostream_char
* __thiscall
basic_ostream_char_print_func_basic_ios(basic_ostream_char
*this,
5250 basic_ios_char
* (__cdecl
*pfunc
)(basic_ios_char
*))
5252 TRACE("(%p %p)\n", this, pfunc
);
5253 pfunc(basic_ostream_char_get_basic_ios(this));
5257 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
5258 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
5259 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_ios_base
, 8)
5260 basic_ostream_char
* __thiscall
basic_ostream_char_print_func_ios_base(
5261 basic_ostream_char
*this, ios_base
* (__cdecl
*pfunc
)(ios_base
*))
5263 TRACE("(%p %p)\n", this, pfunc
);
5264 pfunc(&basic_ostream_char_get_basic_ios(this)->base
);
5268 /* Caution: basic_ostream uses virtual inheritance. */
5269 static inline basic_ios_wchar
* basic_ostream_short_get_basic_ios(basic_ostream_wchar
*this)
5271 return (basic_ios_wchar
*)((char*)this+this->vbtable
[1]);
5274 static inline basic_ios_wchar
* basic_ostream_short_to_basic_ios(basic_ostream_wchar
*ptr
)
5276 return (basic_ios_wchar
*)((char*)ptr
+basic_ostream_short_vbtable
[1]);
5279 static inline basic_ostream_wchar
* basic_ostream_short_from_basic_ios(basic_ios_wchar
*ptr
)
5281 return (basic_ostream_wchar
*)((char*)ptr
-basic_ostream_short_vbtable
[1]);
5284 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */
5285 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */
5286 DEFINE_THISCALL_WRAPPER(basic_ostream_short_ctor
, 20)
5287 basic_ostream_wchar
* __thiscall
basic_ostream_short_ctor(basic_ostream_wchar
*this,
5288 basic_streambuf_wchar
*strbuf
, bool isstd
, bool init
, bool virt_init
)
5290 basic_ios_wchar
*base
;
5292 TRACE("(%p %p %d %d)\n", this, strbuf
, isstd
, virt_init
);
5295 this->vbtable
= basic_ostream_short_vbtable
;
5296 base
= basic_ostream_short_get_basic_ios(this);
5297 basic_ios_short_ctor(base
);
5299 base
= basic_ostream_short_get_basic_ios(this);
5302 base
->base
.vtable
= &basic_ostream_short_vtable
;
5304 basic_ios_short_init(base
, strbuf
, isstd
);
5308 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z */
5309 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
5310 DEFINE_THISCALL_WRAPPER(basic_ostream_short_ctor_uninitialized
, 12)
5311 basic_ostream_wchar
* __thiscall
basic_ostream_short_ctor_uninitialized(basic_ostream_wchar
*this,
5312 int uninitialized
, bool virt_init
)
5314 basic_ios_wchar
*base
;
5316 TRACE("(%p %d)\n", this, uninitialized
);
5319 this->vbtable
= basic_ostream_short_vbtable
;
5320 base
= basic_ostream_short_get_basic_ios(this);
5321 basic_ios_short_ctor(base
);
5323 base
= basic_ostream_short_get_basic_ios(this);
5326 base
->base
.vtable
= &basic_ostream_short_vtable
;
5327 ios_base_Addstd(&base
->base
);
5331 /* ??1?$basic_ostream@GU?$char_traits@G@std@@@std@@UAE@XZ */
5332 /* ??1?$basic_ostream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
5333 DEFINE_THISCALL_WRAPPER(basic_ostream_short_dtor
, 4)
5334 void __thiscall
basic_ostream_short_dtor(basic_ios_wchar
*base
)
5336 basic_ostream_wchar
*this = basic_ostream_short_from_basic_ios(base
);
5338 /* don't destroy virtual base here */
5339 TRACE("(%p)\n", this);
5342 /* ??_D?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
5343 /* ??_D?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
5344 DEFINE_THISCALL_WRAPPER(basic_ostream_short_vbase_dtor
, 4)
5345 void __thiscall
basic_ostream_short_vbase_dtor(basic_ostream_wchar
*this)
5347 TRACE("(%p)\n", this);
5348 basic_ostream_short_dtor(basic_ostream_short_to_basic_ios(this));
5349 basic_ios_short_dtor(basic_ostream_short_get_basic_ios(this));
5352 DEFINE_THISCALL_WRAPPER(basic_ostream_short_vector_dtor
, 8)
5353 basic_ostream_wchar
* __thiscall
basic_ostream_short_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
5355 basic_ostream_wchar
*this = basic_ostream_short_from_basic_ios(base
);
5357 TRACE("(%p %x)\n", this, flags
);
5360 /* we have an array, with the number of elements stored before the first object */
5361 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
5363 for(i
=*ptr
-1; i
>=0; i
--)
5364 basic_ostream_short_vbase_dtor(this+i
);
5365 operator_delete(ptr
);
5367 basic_ostream_short_vbase_dtor(this);
5369 operator_delete(this);
5375 /* ?flush@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@XZ */
5376 /* ?flush@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@XZ */
5377 DEFINE_THISCALL_WRAPPER(basic_ostream_short_flush
, 4)
5378 basic_ostream_wchar
* __thiscall
basic_ostream_short_flush(basic_ostream_wchar
*this)
5380 /* this function is not matching C++ specification */
5381 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5383 TRACE("(%p)\n", this);
5385 if(basic_ios_short_rdbuf_get(base
) && ios_base_good(&base
->base
)
5386 && basic_streambuf_wchar_pubsync(basic_ios_short_rdbuf_get(base
))==-1)
5387 basic_ios_short_setstate(base
, IOSTATE_badbit
);
5391 /* ?flush@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
5392 /* ?flush@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
5393 basic_ostream_wchar
* __cdecl
flush_ostream_short(basic_ostream_wchar
*ostream
)
5395 return basic_ostream_short_flush(ostream
);
5398 /* ?osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
5399 /* ?osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
5400 DEFINE_THISCALL_WRAPPER(basic_ostream_short_osfx
, 4)
5401 void __thiscall
basic_ostream_short_osfx(basic_ostream_wchar
*this)
5403 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5405 TRACE("(%p)\n", this);
5407 if(base
->base
.fmtfl
& FMTFLAG_unitbuf
)
5408 basic_ostream_short_flush(this);
5411 static BOOL
basic_ostream_short_sentry_create(basic_ostream_wchar
*ostr
)
5413 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(ostr
);
5415 if(ios_base_good(&base
->base
) && base
->stream
)
5416 basic_ostream_short_flush(base
->stream
);
5418 return ios_base_good(&base
->base
);
5421 static void basic_ostream_short_sentry_destroy(basic_ostream_wchar
*ostr
)
5423 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(ostr
);
5425 if(ios_base_good(&base
->base
) && !__uncaught_exception())
5426 basic_ostream_short_osfx(ostr
);
5429 /* ?opfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE_NXZ */
5430 /* ?opfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA_NXZ */
5431 DEFINE_THISCALL_WRAPPER(basic_ostream_short_opfx
, 4)
5432 bool __thiscall
basic_ostream_short_opfx(basic_ostream_wchar
*this)
5434 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5436 TRACE("(%p)\n", this);
5438 if(ios_base_good(&base
->base
) && base
->stream
)
5439 basic_ostream_short_flush(base
->stream
);
5440 return ios_base_good(&base
->base
);
5443 /* ?put@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@G@Z */
5444 /* ?put@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@G@Z */
5445 DEFINE_THISCALL_WRAPPER(basic_ostream_short_put
, 8)
5446 basic_ostream_wchar
* __thiscall
basic_ostream_short_put(basic_ostream_wchar
*this, wchar_t ch
)
5448 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5450 TRACE("(%p %c)\n", this, ch
);
5452 if(!basic_ostream_short_sentry_create(this)
5453 || basic_streambuf_wchar_sputc(base
->strbuf
, ch
)==WEOF
) {
5454 basic_ostream_short_sentry_destroy(this);
5455 basic_ios_short_setstate(base
, IOSTATE_badbit
);
5459 basic_ostream_short_sentry_destroy(this);
5463 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@JH@Z */
5464 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JH@Z */
5465 DEFINE_THISCALL_WRAPPER(basic_ostream_short_seekp
, 12)
5466 basic_ostream_wchar
* __thiscall
basic_ostream_short_seekp(basic_ostream_wchar
*this, streamoff off
, int way
)
5468 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5470 TRACE("(%p %Id %d)\n", this, off
, way
);
5472 if(!ios_base_fail(&base
->base
)) {
5475 basic_streambuf_wchar_pubseekoff(basic_ios_short_rdbuf_get(base
),
5476 &seek
, off
, way
, OPENMODE_out
);
5477 if(seek
.off
==-1 && seek
.pos
==0 && seek
.state
==0)
5478 basic_ios_short_setstate(base
, IOSTATE_failbit
);
5483 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
5484 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
5485 DEFINE_THISCALL_WRAPPER(basic_ostream_short_seekp_fpos
, 28)
5486 basic_ostream_wchar
* __thiscall
basic_ostream_short_seekp_fpos(basic_ostream_wchar
*this, fpos_int pos
)
5488 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5490 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos
));
5492 if(!ios_base_fail(&base
->base
)) {
5495 basic_streambuf_wchar_pubseekpos(basic_ios_short_rdbuf_get(base
),
5496 &seek
, pos
, OPENMODE_out
);
5497 if(seek
.off
==-1 && seek
.pos
==0 && seek
.state
==0)
5498 basic_ios_short_setstate(base
, IOSTATE_failbit
);
5503 /* ?tellp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@XZ */
5504 /* ?tellp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
5505 DEFINE_THISCALL_WRAPPER(basic_ostream_short_tellp
, 8)
5506 fpos_int
* __thiscall
basic_ostream_short_tellp(basic_ostream_wchar
*this, fpos_int
*ret
)
5508 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5510 TRACE("(%p)\n", this);
5512 if(!ios_base_fail(&base
->base
)) {
5513 basic_streambuf_wchar_pubseekoff(basic_ios_short_rdbuf_get(base
),
5514 ret
, 0, SEEKDIR_cur
, OPENMODE_out
);
5523 /* ?write@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@PBGH@Z */
5524 /* ?write@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEBG_J@Z */
5525 DEFINE_THISCALL_WRAPPER(basic_ostream_short_write
, 12)
5526 basic_ostream_wchar
* __thiscall
basic_ostream_short_write(basic_ostream_wchar
*this, const wchar_t *str
, streamsize count
)
5528 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5530 TRACE("(%p %s %Id)\n", this, debugstr_w(str
), count
);
5532 if(!basic_ostream_short_sentry_create(this)
5533 || basic_streambuf_wchar_sputn(base
->strbuf
, str
, count
)!=count
) {
5534 basic_ostream_short_sentry_destroy(this);
5535 basic_ios_short_setstate(base
, IOSTATE_badbit
);
5539 basic_ostream_short_sentry_destroy(this);
5543 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@F@Z */
5544 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@F@Z */
5545 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_short
, 8)
5546 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_short(basic_ostream_wchar
*this, short val
)
5548 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5549 const num_put
*numput
= num_put_short_use_facet(IOS_LOCALE(basic_ios_short_rdbuf_get(base
)));
5550 int state
= IOSTATE_goodbit
;
5552 TRACE("(%p %d)\n", this, val
);
5554 if(basic_ostream_short_sentry_create(this)) {
5555 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
5556 ostreambuf_iterator_wchar dest
;
5558 memset(&dest
, 0, sizeof(dest
));
5559 dest
.strbuf
= strbuf
;
5560 num_put_wchar_put_long(numput
, &dest
, dest
, &base
->base
, basic_ios_short_fill_get(base
),
5561 (ios_base_flags_get(&base
->base
) & FMTFLAG_basefield
& (FMTFLAG_oct
| FMTFLAG_hex
))
5562 ? (LONG
)((unsigned short)val
) : (LONG
)val
);
5564 basic_ostream_short_sentry_destroy(this);
5566 basic_ios_short_setstate(base
, state
);
5570 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@G@Z */
5571 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@G@Z */
5572 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ushort
, 8)
5573 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_ushort(basic_ostream_wchar
*this, unsigned short val
)
5575 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5576 const num_put
*numput
= num_put_short_use_facet(IOS_LOCALE(basic_ios_short_rdbuf_get(base
)));
5577 int state
= IOSTATE_goodbit
;
5579 TRACE("(%p %d)\n", this, val
);
5581 if(basic_ostream_short_sentry_create(this)) {
5582 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
5583 ostreambuf_iterator_wchar dest
;
5585 memset(&dest
, 0, sizeof(dest
));
5586 dest
.strbuf
= strbuf
;
5587 num_put_wchar_put_ulong(numput
, &dest
, dest
, &base
->base
, basic_ios_short_fill_get(base
), val
);
5589 basic_ostream_short_sentry_destroy(this);
5591 basic_ios_short_setstate(base
, state
);
5595 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@H@Z */
5596 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@H@Z */
5597 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@J@Z */
5598 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@J@Z */
5599 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int
, 8)
5600 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_int(basic_ostream_wchar
*this, int val
)
5602 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5603 const num_put
*numput
= num_put_short_use_facet(IOS_LOCALE(basic_ios_short_rdbuf_get(base
)));
5604 int state
= IOSTATE_goodbit
;
5606 TRACE("(%p %d)\n", this, val
);
5608 if(basic_ostream_short_sentry_create(this)) {
5609 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
5610 ostreambuf_iterator_wchar dest
;
5612 memset(&dest
, 0, sizeof(dest
));
5613 dest
.strbuf
= strbuf
;
5614 num_put_wchar_put_long(numput
, &dest
, dest
, &base
->base
, basic_ios_short_fill_get(base
), val
);
5616 basic_ostream_short_sentry_destroy(this);
5618 basic_ios_short_setstate(base
, state
);
5622 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@I@Z */
5623 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@I@Z */
5624 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@K@Z */
5625 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@K@Z */
5626 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint
, 8)
5627 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_uint(basic_ostream_wchar
*this, unsigned int val
)
5629 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5630 const num_put
*numput
= num_put_short_use_facet(IOS_LOCALE(basic_ios_short_rdbuf_get(base
)));
5631 int state
= IOSTATE_goodbit
;
5633 TRACE("(%p %u)\n", this, val
);
5635 if(basic_ostream_short_sentry_create(this)) {
5636 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
5637 ostreambuf_iterator_wchar dest
;
5639 memset(&dest
, 0, sizeof(dest
));
5640 dest
.strbuf
= strbuf
;
5641 num_put_wchar_put_ulong(numput
, &dest
, dest
, &base
->base
, basic_ios_short_fill_get(base
), val
);
5643 basic_ostream_short_sentry_destroy(this);
5645 basic_ios_short_setstate(base
, state
);
5649 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@M@Z */
5650 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@M@Z */
5651 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_float
, 8)
5652 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_float(basic_ostream_wchar
*this, float val
)
5654 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5655 const num_put
*numput
= num_put_short_use_facet(IOS_LOCALE(basic_ios_short_rdbuf_get(base
)));
5656 int state
= IOSTATE_goodbit
;
5658 TRACE("(%p %f)\n", this, val
);
5660 if(basic_ostream_short_sentry_create(this)) {
5661 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
5662 ostreambuf_iterator_wchar dest
;
5664 memset(&dest
, 0, sizeof(dest
));
5665 dest
.strbuf
= strbuf
;
5666 num_put_wchar_put_double(numput
, &dest
, dest
, &base
->base
, basic_ios_short_fill_get(base
), val
);
5668 basic_ostream_short_sentry_destroy(this);
5670 basic_ios_short_setstate(base
, state
);
5674 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@N@Z */
5675 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@N@Z */
5676 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_double
, 12)
5677 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_double(basic_ostream_wchar
*this, double val
)
5679 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5680 const num_put
*numput
= num_put_short_use_facet(IOS_LOCALE(basic_ios_short_rdbuf_get(base
)));
5681 int state
= IOSTATE_goodbit
;
5683 TRACE("(%p %lf)\n", this, val
);
5685 if(basic_ostream_short_sentry_create(this)) {
5686 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
5687 ostreambuf_iterator_wchar dest
;
5689 memset(&dest
, 0, sizeof(dest
));
5690 dest
.strbuf
= strbuf
;
5691 num_put_wchar_put_double(numput
, &dest
, dest
, &base
->base
, basic_ios_short_fill_get(base
), val
);
5693 basic_ostream_short_sentry_destroy(this);
5695 basic_ios_short_setstate(base
, state
);
5699 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@O@Z */
5700 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@O@Z */
5701 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ldouble
, 12)
5702 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_ldouble(basic_ostream_wchar
*this, double val
)
5704 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5705 const num_put
*numput
= num_put_short_use_facet(IOS_LOCALE(basic_ios_short_rdbuf_get(base
)));
5706 int state
= IOSTATE_goodbit
;
5708 TRACE("(%p %lf)\n", this, val
);
5710 if(basic_ostream_short_sentry_create(this)) {
5711 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
5712 ostreambuf_iterator_wchar dest
;
5714 memset(&dest
, 0, sizeof(dest
));
5715 dest
.strbuf
= strbuf
;
5716 num_put_wchar_put_ldouble(numput
, &dest
, dest
, &base
->base
, basic_ios_short_fill_get(base
), val
);
5718 basic_ostream_short_sentry_destroy(this);
5720 basic_ios_short_setstate(base
, state
);
5724 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
5725 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
5726 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_streambuf
, 8)
5727 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_streambuf(basic_ostream_wchar
*this, basic_streambuf_wchar
*val
)
5729 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5730 IOSB_iostate state
= IOSTATE_badbit
;
5731 unsigned short c
= '\n';
5733 TRACE("(%p %p)\n", this, val
);
5735 if(basic_ostream_short_sentry_create(this)) {
5736 for(c
= basic_streambuf_wchar_sgetc(val
); c
!=WEOF
;
5737 c
= basic_streambuf_wchar_snextc(val
)) {
5738 state
= IOSTATE_goodbit
;
5740 if(basic_streambuf_wchar_sputc(base
->strbuf
, c
) == WEOF
) {
5741 state
= IOSTATE_badbit
;
5746 state
= IOSTATE_badbit
;
5748 basic_ostream_short_sentry_destroy(this);
5750 ios_base_width_set(&base
->base
, 0);
5751 basic_ios_short_setstate(base
, state
);
5755 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PBX@Z */
5756 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEBX@Z */
5757 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ptr
, 8)
5758 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_ptr(basic_ostream_wchar
*this, const void *val
)
5760 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5761 const num_put
*numput
= num_put_short_use_facet(IOS_LOCALE(basic_ios_short_rdbuf_get(base
)));
5762 int state
= IOSTATE_goodbit
;
5764 TRACE("(%p %p)\n", this, val
);
5766 if(basic_ostream_short_sentry_create(this)) {
5767 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
5768 ostreambuf_iterator_wchar dest
;
5770 memset(&dest
, 0, sizeof(dest
));
5771 dest
.strbuf
= strbuf
;
5772 num_put_wchar_put_ptr(numput
, &dest
, dest
, &base
->base
, basic_ios_short_fill_get(base
), val
);
5774 basic_ostream_short_sentry_destroy(this);
5776 basic_ios_short_setstate(base
, state
);
5780 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_J@Z */
5781 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_J@Z */
5782 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int64
, 12)
5783 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_int64(basic_ostream_wchar
*this, __int64 val
)
5785 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5786 const num_put
*numput
= num_put_short_use_facet(IOS_LOCALE(basic_ios_short_rdbuf_get(base
)));
5787 int state
= IOSTATE_goodbit
;
5789 TRACE("(%p)\n", this);
5791 if(basic_ostream_short_sentry_create(this)) {
5792 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
5793 ostreambuf_iterator_wchar dest
;
5795 memset(&dest
, 0, sizeof(dest
));
5796 dest
.strbuf
= strbuf
;
5797 num_put_wchar_put_int64(numput
, &dest
, dest
, &base
->base
, basic_ios_short_fill_get(base
), val
);
5799 basic_ostream_short_sentry_destroy(this);
5801 basic_ios_short_setstate(base
, state
);
5805 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_K@Z */
5806 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_K@Z */
5807 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint64
, 12)
5808 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_uint64(basic_ostream_wchar
*this, unsigned __int64 val
)
5810 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5811 const num_put
*numput
= num_put_short_use_facet(IOS_LOCALE(basic_ios_short_rdbuf_get(base
)));
5812 int state
= IOSTATE_goodbit
;
5814 TRACE("(%p)\n", this);
5816 if(basic_ostream_short_sentry_create(this)) {
5817 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
5818 ostreambuf_iterator_wchar dest
;
5820 memset(&dest
, 0, sizeof(dest
));
5821 dest
.strbuf
= strbuf
;
5822 num_put_wchar_put_uint64(numput
, &dest
, dest
, &base
->base
, basic_ios_short_fill_get(base
), val
);
5824 basic_ostream_short_sentry_destroy(this);
5826 basic_ios_short_setstate(base
, state
);
5830 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_N@Z */
5831 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_N@Z */
5832 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_bool
, 8)
5833 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_bool(basic_ostream_wchar
*this, bool val
)
5835 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5836 const num_put
*numput
= num_put_short_use_facet(IOS_LOCALE(basic_ios_short_rdbuf_get(base
)));
5837 int state
= IOSTATE_goodbit
;
5839 TRACE("(%p %x)\n", this, val
);
5841 if(basic_ostream_short_sentry_create(this)) {
5842 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
5843 ostreambuf_iterator_wchar dest
;
5845 memset(&dest
, 0, sizeof(dest
));
5846 dest
.strbuf
= strbuf
;
5847 num_put_wchar_put_bool(numput
, &dest
, dest
, &base
->base
, basic_ios_short_fill_get(base
), val
);
5849 basic_ostream_short_sentry_destroy(this);
5851 basic_ios_short_setstate(base
, state
);
5855 /* ?ends@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
5856 /* ?ends@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
5857 basic_ostream_wchar
* __cdecl
basic_ostream_short_ends(basic_ostream_wchar
*ostr
)
5859 TRACE("(%p)\n", ostr
);
5861 basic_ostream_short_put(ostr
, 0);
5865 /* ?endl@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
5866 /* ?endl@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
5867 basic_ostream_wchar
* __cdecl
basic_ostream_short_endl(basic_ostream_wchar
*ostr
)
5869 TRACE("(%p)\n", ostr
);
5871 basic_ostream_short_put(ostr
, '\n');
5872 basic_ostream_short_flush(ostr
);
5876 /* ??$?6GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@0@AAV10@ABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
5877 /* ??$?6GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@0@AEAV10@AEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
5878 basic_ostream_wchar
* __cdecl
basic_ostream_short_print_bstr(basic_ostream_wchar
*ostr
, const basic_string_wchar
*str
)
5880 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(ostr
);
5881 IOSB_iostate state
= IOSTATE_goodbit
;
5883 TRACE("(%p %p)\n", ostr
, str
);
5885 if(basic_ostream_short_sentry_create(ostr
)) {
5886 size_t len
= MSVCP_basic_string_wchar_length(str
);
5887 streamsize pad
= (base
->base
.wide
>len
? base
->base
.wide
-len
: 0);
5889 if((base
->base
.fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
5890 for(; pad
!=0; pad
--) {
5891 if(basic_streambuf_wchar_sputc(base
->strbuf
, base
->fillch
) == WEOF
) {
5892 state
= IOSTATE_badbit
;
5898 if(state
== IOSTATE_goodbit
) {
5899 if(basic_streambuf_wchar_sputn(base
->strbuf
, MSVCP_basic_string_wchar_c_str(str
), len
) != len
)
5900 state
= IOSTATE_badbit
;
5903 if(state
== IOSTATE_goodbit
) {
5904 for(; pad
!=0; pad
--) {
5905 if(basic_streambuf_wchar_sputc(base
->strbuf
, base
->fillch
) == WEOF
) {
5906 state
= IOSTATE_badbit
;
5912 base
->base
.wide
= 0;
5914 state
= IOSTATE_badbit
;
5916 basic_ostream_short_sentry_destroy(ostr
);
5918 basic_ios_short_setstate(base
, state
);
5922 /* ??$?6GU?$char_traits@G@std@@@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@0@AAV10@G@Z */
5923 /* ??$?6GU?$char_traits@G@std@@@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@0@AEAV10@G@Z */
5924 basic_ostream_wchar
* __cdecl
basic_ostream_short_print_ch(basic_ostream_wchar
*ostr
, wchar_t ch
)
5926 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(ostr
);
5927 IOSB_iostate state
= IOSTATE_goodbit
;
5929 TRACE("(%p %d)\n", ostr
, ch
);
5931 if(basic_ostream_short_sentry_create(ostr
)) {
5932 streamsize pad
= (base
->base
.wide
>1 ? base
->base
.wide
-1 : 0);
5934 if((base
->base
.fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
5935 for(; pad
!=0; pad
--) {
5936 if(basic_streambuf_wchar_sputc(base
->strbuf
, base
->fillch
) == WEOF
) {
5937 state
= IOSTATE_badbit
;
5943 if(state
== IOSTATE_goodbit
) {
5944 if(basic_streambuf_wchar_sputc(base
->strbuf
, ch
) == WEOF
)
5945 state
= IOSTATE_badbit
;
5948 if(state
== IOSTATE_goodbit
) {
5949 for(; pad
!=0; pad
--) {
5950 if(basic_streambuf_wchar_sputc(base
->strbuf
, base
->fillch
) == WEOF
) {
5951 state
= IOSTATE_badbit
;
5957 base
->base
.wide
= 0;
5959 state
= IOSTATE_badbit
;
5961 basic_ostream_short_sentry_destroy(ostr
);
5963 basic_ios_short_setstate(base
, state
);
5967 /* ??$?6GU?$char_traits@G@std@@@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@0@AAV10@PBG@Z */
5968 /* ??$?6GU?$char_traits@G@std@@@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@0@AEAV10@PEBG@Z */
5969 basic_ostream_wchar
* __cdecl
basic_ostream_short_print_str(basic_ostream_wchar
*ostr
, const wchar_t *str
)
5971 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(ostr
);
5972 IOSB_iostate state
= IOSTATE_goodbit
;
5974 TRACE("(%p %s)\n", ostr
, debugstr_w(str
));
5976 if(basic_ostream_short_sentry_create(ostr
)) {
5977 size_t len
= wcslen(str
);
5978 streamsize pad
= (base
->base
.wide
>len
? base
->base
.wide
-len
: 0);
5980 if((base
->base
.fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
5981 for(; pad
!=0; pad
--) {
5982 if(basic_streambuf_wchar_sputc(base
->strbuf
, base
->fillch
) == WEOF
) {
5983 state
= IOSTATE_badbit
;
5989 if(state
== IOSTATE_goodbit
) {
5990 if(basic_streambuf_wchar_sputn(base
->strbuf
, str
, len
) != len
)
5991 state
= IOSTATE_badbit
;
5994 if(state
== IOSTATE_goodbit
) {
5995 for(; pad
!=0; pad
--) {
5996 if(basic_streambuf_wchar_sputc(base
->strbuf
, base
->fillch
) == WEOF
) {
5997 state
= IOSTATE_badbit
;
6003 base
->base
.wide
= 0;
6005 state
= IOSTATE_badbit
;
6007 basic_ostream_short_sentry_destroy(ostr
);
6009 basic_ios_short_setstate(base
, state
);
6013 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
6014 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
6015 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_func
, 8)
6016 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_func(basic_ostream_wchar
*this,
6017 basic_ostream_wchar
* (__cdecl
*pfunc
)(basic_ostream_wchar
*))
6019 TRACE("(%p %p)\n", this, pfunc
);
6024 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@GU?$char_traits@G@std@@@1@AAV21@@Z@Z */
6025 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@GU?$char_traits@G@std@@@1@AEAV21@@Z@Z */
6026 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_func_basic_ios
, 8)
6027 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_func_basic_ios(basic_ostream_wchar
*this,
6028 basic_ios_wchar
* (__cdecl
*pfunc
)(basic_ios_wchar
*))
6030 TRACE("(%p %p)\n", this, pfunc
);
6031 pfunc(basic_ostream_short_get_basic_ios(this));
6035 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
6036 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
6037 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_func_ios_base
, 8)
6038 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_func_ios_base(
6039 basic_ostream_wchar
*this, ios_base
* (__cdecl
*pfunc
)(ios_base
*))
6041 TRACE("(%p %p)\n", this, pfunc
);
6042 pfunc(&basic_ostream_short_get_basic_ios(this)->base
);
6046 /* Caution: basic_istream uses virtual inheritance. */
6047 static inline basic_ios_char
* basic_istream_char_get_basic_ios(basic_istream_char
*this)
6049 return (basic_ios_char
*)((char*)this+this->vbtable
[1]);
6052 static inline basic_ios_char
* basic_istream_char_to_basic_ios(basic_istream_char
*ptr
)
6054 return (basic_ios_char
*)((char*)ptr
+basic_istream_char_vbtable
[1]);
6057 static inline basic_istream_char
* basic_istream_char_from_basic_ios(basic_ios_char
*ptr
)
6059 return (basic_istream_char
*)((char*)ptr
-basic_istream_char_vbtable
[1]);
6062 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
6063 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
6064 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor
, 16)
6065 basic_istream_char
* __thiscall
basic_istream_char_ctor(basic_istream_char
*this, basic_streambuf_char
*strbuf
, bool isstd
, bool virt_init
)
6067 basic_ios_char
*base
;
6069 TRACE("(%p %p %d %d)\n", this, strbuf
, isstd
, virt_init
);
6072 this->vbtable
= basic_istream_char_vbtable
;
6073 base
= basic_istream_char_get_basic_ios(this);
6074 basic_ios_char_ctor(base
);
6076 base
= basic_istream_char_get_basic_ios(this);
6079 base
->base
.vtable
= &basic_istream_char_vtable
;
6081 basic_ios_char_init(base
, strbuf
, isstd
);
6085 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
6086 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
6087 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_uninitialized
, 12)
6088 basic_istream_char
* __thiscall
basic_istream_char_ctor_uninitialized(basic_istream_char
*this, int uninitialized
, bool virt_init
)
6090 basic_ios_char
*base
;
6092 TRACE("(%p %d %d)\n", this, uninitialized
, virt_init
);
6095 this->vbtable
= basic_istream_char_vbtable
;
6096 base
= basic_istream_char_get_basic_ios(this);
6097 basic_ios_char_ctor(base
);
6099 base
= basic_istream_char_get_basic_ios(this);
6102 base
->base
.vtable
= &basic_istream_char_vtable
;
6103 ios_base_Addstd(&base
->base
);
6107 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UAE@XZ */
6108 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
6109 DEFINE_THISCALL_WRAPPER(basic_istream_char_dtor
, 4)
6110 void __thiscall
basic_istream_char_dtor(basic_ios_char
*base
)
6112 basic_istream_char
*this = basic_istream_char_from_basic_ios(base
);
6114 /* don't destroy virtual base here */
6115 TRACE("(%p)\n", this);
6118 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
6119 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
6120 DEFINE_THISCALL_WRAPPER(basic_istream_char_vbase_dtor
, 4)
6121 void __thiscall
basic_istream_char_vbase_dtor(basic_istream_char
*this)
6123 TRACE("(%p)\n", this);
6124 basic_istream_char_dtor(basic_istream_char_to_basic_ios(this));
6125 basic_ios_char_dtor(basic_istream_char_get_basic_ios(this));
6128 DEFINE_THISCALL_WRAPPER(basic_istream_char_vector_dtor
, 8)
6129 basic_istream_char
* __thiscall
basic_istream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
6131 basic_istream_char
*this = basic_istream_char_from_basic_ios(base
);
6133 TRACE("(%p %x)\n", this, flags
);
6136 /* we have an array, with the number of elements stored before the first object */
6137 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
6139 for(i
=*ptr
-1; i
>=0; i
--)
6140 basic_istream_char_vbase_dtor(this+i
);
6141 operator_delete(ptr
);
6143 basic_istream_char_vbase_dtor(this);
6145 operator_delete(this);
6151 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
6152 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
6153 DEFINE_THISCALL_WRAPPER(basic_istream_char_ipfx
, 8)
6154 bool __thiscall
basic_istream_char_ipfx(basic_istream_char
*this, bool noskip
)
6156 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6158 TRACE("(%p %d)\n", this, noskip
);
6160 if(ios_base_good(&base
->base
)) {
6161 if(basic_ios_char_tie_get(base
))
6162 basic_ostream_char_flush(basic_ios_char_tie_get(base
));
6164 if(!noskip
&& (ios_base_flags_get(&base
->base
) & FMTFLAG_skipws
)) {
6165 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6166 const ctype_char
*ctype
= ctype_char_use_facet(IOS_LOCALE(base
->strbuf
));
6169 for(ch
= basic_streambuf_char_sgetc(strbuf
); ;
6170 ch
= basic_streambuf_char_snextc(strbuf
)) {
6171 if(ch
==EOF
|| !ctype_char_is_ch(ctype
, _SPACE
|_BLANK
, ch
))
6177 if(!ios_base_good(&base
->base
)) {
6178 basic_ios_char_setstate(base
, IOSTATE_failbit
);
6185 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
6186 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
6187 DEFINE_THISCALL_WRAPPER(basic_istream_char_isfx
, 4)
6188 void __thiscall
basic_istream_char_isfx(basic_istream_char
*this)
6190 TRACE("(%p)\n", this);
6193 static BOOL
basic_istream_char_sentry_create(basic_istream_char
*istr
, bool noskip
)
6195 return basic_istream_char_ipfx(istr
, noskip
);
6198 static void basic_istream_char_sentry_destroy(basic_istream_char
*istr
)
6202 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QBEHXZ */
6203 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QEBA_JXZ */
6204 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QBA_JXZ */
6205 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QBE_JXZ */
6206 DEFINE_THISCALL_WRAPPER(basic_istream_char_gcount
, 4)
6207 streamsize __thiscall
basic_istream_char_gcount(const basic_istream_char
*this)
6209 TRACE("(%p)\n", this);
6213 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
6214 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
6215 DEFINE_THISCALL_WRAPPER(basic_istream_char_get
, 4)
6216 int __thiscall
basic_istream_char_get(basic_istream_char
*this)
6218 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6221 TRACE("(%p)\n", this);
6225 if(!basic_istream_char_sentry_create(this, TRUE
)) {
6226 basic_istream_char_sentry_destroy(this);
6230 ret
= basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(base
));
6231 basic_istream_char_sentry_destroy(this);
6233 basic_ios_char_setstate(base
, IOSTATE_eofbit
|IOSTATE_failbit
);
6240 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAD@Z */
6241 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAD@Z */
6242 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_ch
, 8)
6243 basic_istream_char
* __thiscall
basic_istream_char_get_ch(basic_istream_char
*this, char *ch
)
6247 TRACE("(%p %p)\n", this, ch
);
6249 ret
= basic_istream_char_get(this);
6255 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
6256 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
6257 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str_delim
, 16)
6258 basic_istream_char
* __thiscall
basic_istream_char_get_str_delim(basic_istream_char
*this, char *str
, streamsize count
, char delim
)
6260 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6263 TRACE("(%p %p %Id %s)\n", this, str
, count
, debugstr_an(&delim
, 1));
6267 if(basic_istream_char_sentry_create(this, TRUE
)) {
6268 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6270 for(ch
= basic_streambuf_char_sgetc(strbuf
); count
>1;
6271 ch
= basic_streambuf_char_snextc(strbuf
)) {
6272 if(ch
==EOF
|| ch
==delim
)
6280 basic_istream_char_sentry_destroy(this);
6282 basic_ios_char_setstate(base
, (!this->count
? IOSTATE_failbit
: IOSTATE_goodbit
) |
6283 (ch
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
6289 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
6290 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
6291 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str
, 12)
6292 basic_istream_char
* __thiscall
basic_istream_char_get_str(basic_istream_char
*this, char *str
, streamsize count
)
6294 return basic_istream_char_get_str_delim(this, str
, count
, '\n');
6297 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
6298 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
6299 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf_delim
, 12)
6300 basic_istream_char
* __thiscall
basic_istream_char_get_streambuf_delim(basic_istream_char
*this, basic_streambuf_char
*strbuf
, char delim
)
6302 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6305 TRACE("(%p %p %s)\n", this, strbuf
, debugstr_an(&delim
, 1));
6309 if(basic_istream_char_sentry_create(this, TRUE
)) {
6310 basic_streambuf_char
*strbuf_read
= basic_ios_char_rdbuf_get(base
);
6312 for(ch
= basic_streambuf_char_sgetc(strbuf_read
); ;
6313 ch
= basic_streambuf_char_snextc(strbuf_read
)) {
6314 if(ch
==EOF
|| ch
==delim
)
6317 if(basic_streambuf_char_sputc(strbuf
, ch
) == EOF
)
6322 basic_istream_char_sentry_destroy(this);
6324 basic_ios_char_setstate(base
, (!this->count
? IOSTATE_failbit
: IOSTATE_goodbit
) |
6325 (ch
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
6329 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
6330 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
6331 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf
, 8)
6332 basic_istream_char
* __thiscall
basic_istream_char_get_streambuf(basic_istream_char
*this, basic_streambuf_char
*strbuf
)
6334 return basic_istream_char_get_streambuf_delim(this, strbuf
, '\n');
6337 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
6338 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
6339 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline_delim
, 16)
6340 basic_istream_char
* __thiscall
basic_istream_char_getline_delim(basic_istream_char
*this, char *str
, streamsize count
, char delim
)
6342 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6343 int ch
= (unsigned char)delim
;
6345 TRACE("(%p %p %Id %s)\n", this, str
, count
, debugstr_an(&delim
, 1));
6349 if(basic_istream_char_sentry_create(this, TRUE
) && count
>0) {
6350 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6353 ch
= basic_streambuf_char_sbumpc(strbuf
);
6355 if(ch
==EOF
|| ch
==(unsigned char)delim
)
6363 if(ch
== (unsigned char)delim
)
6365 else if(ch
!= EOF
) {
6366 ch
= basic_streambuf_char_sgetc(strbuf
);
6368 if(ch
== (unsigned char)delim
) {
6369 basic_streambuf_char__Gninc(strbuf
);
6374 basic_istream_char_sentry_destroy(this);
6376 basic_ios_char_setstate(base
, (ch
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
) |
6377 (!this->count
|| (ch
!=(unsigned char)delim
&& ch
!=EOF
) ? IOSTATE_failbit
: IOSTATE_goodbit
));
6383 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
6384 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
6385 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline
, 12)
6386 basic_istream_char
* __thiscall
basic_istream_char_getline(basic_istream_char
*this, char *str
, streamsize count
)
6388 return basic_istream_char_getline_delim(this, str
, count
, '\n');
6391 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@HH@Z */
6392 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
6393 DEFINE_THISCALL_WRAPPER(basic_istream_char_ignore
, 12)
6394 basic_istream_char
* __thiscall
basic_istream_char_ignore(basic_istream_char
*this, streamsize count
, int delim
)
6396 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6397 int ch
= (unsigned char)delim
;
6400 TRACE("(%p %Id %d)\n", this, count
, delim
);
6404 if(basic_istream_char_sentry_create(this, TRUE
)) {
6405 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6406 state
= IOSTATE_goodbit
;
6409 ch
= basic_streambuf_char_sbumpc(strbuf
);
6412 state
= IOSTATE_eofbit
;
6420 if(count
!= INT_MAX
)
6424 state
= IOSTATE_failbit
;
6425 basic_istream_char_sentry_destroy(this);
6427 basic_ios_char_setstate(base
, state
);
6431 /* ?ws@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@1@AAV21@@Z */
6432 /* ?ws@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
6433 basic_istream_char
* __cdecl
ws_basic_istream_char(basic_istream_char
*istream
)
6435 basic_ios_char
*base
= basic_istream_char_get_basic_ios(istream
);
6438 TRACE("(%p)\n", istream
);
6440 if(basic_istream_char_sentry_create(istream
, TRUE
)) {
6441 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6442 const ctype_char
*ctype
= ctype_char_use_facet(IOS_LOCALE(strbuf
));
6444 for(ch
= basic_streambuf_char_sgetc(strbuf
); ctype_char_is_ch(ctype
, _SPACE
, ch
);
6445 ch
= basic_streambuf_char_snextc(strbuf
)) {
6450 basic_istream_char_sentry_destroy(istream
);
6453 basic_ios_char_setstate(base
, IOSTATE_eofbit
);
6457 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
6458 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
6459 DEFINE_THISCALL_WRAPPER(basic_istream_char_peek
, 4)
6460 int __thiscall
basic_istream_char_peek(basic_istream_char
*this)
6462 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6465 TRACE("(%p)\n", this);
6469 if(basic_istream_char_sentry_create(this, TRUE
))
6470 ret
= basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base
));
6471 basic_istream_char_sentry_destroy(this);
6474 basic_ios_char_setstate(base
, IOSTATE_eofbit
);
6479 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
6480 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
6481 DEFINE_THISCALL_WRAPPER(basic_istream_char_read
, 12)
6482 basic_istream_char
* __thiscall
basic_istream_char_read(basic_istream_char
*this, char *str
, streamsize count
)
6484 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6485 IOSB_iostate state
= IOSTATE_goodbit
;
6487 TRACE("(%p %p %Id)\n", this, str
, count
);
6489 if(basic_istream_char_sentry_create(this, TRUE
)) {
6490 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6492 this->count
= basic_streambuf_char_sgetn(strbuf
, str
, count
);
6493 if(this->count
!= count
)
6494 state
|= IOSTATE_failbit
| IOSTATE_eofbit
;
6498 basic_istream_char_sentry_destroy(this);
6500 basic_ios_char_setstate(base
, state
);
6504 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
6505 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
6506 DEFINE_THISCALL_WRAPPER(basic_istream_char_readsome
, 12)
6507 streamsize __thiscall
basic_istream_char_readsome(basic_istream_char
*this, char *str
, streamsize count
)
6509 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6510 IOSB_iostate state
= IOSTATE_goodbit
;
6512 TRACE("(%p %p %Id)\n", this, str
, count
);
6516 if(basic_istream_char_sentry_create(this, TRUE
)) {
6517 streamsize avail
= basic_streambuf_char_in_avail(basic_ios_char_rdbuf_get(base
));
6522 state
|= IOSTATE_eofbit
;
6524 basic_istream_char_read(this, str
, avail
);
6526 state
|= IOSTATE_failbit
;
6528 basic_istream_char_sentry_destroy(this);
6530 basic_ios_char_setstate(base
, state
);
6534 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
6535 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
6536 DEFINE_THISCALL_WRAPPER(basic_istream_char_putback
, 8)
6537 basic_istream_char
* __thiscall
basic_istream_char_putback(basic_istream_char
*this, char ch
)
6539 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6540 IOSB_iostate state
= IOSTATE_goodbit
;
6542 TRACE("(%p %c)\n", this, ch
);
6546 if(basic_istream_char_sentry_create(this, TRUE
)) {
6547 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6549 if(!ios_base_good(&base
->base
))
6550 state
|= IOSTATE_failbit
;
6551 else if(!strbuf
|| basic_streambuf_char_sputbackc(strbuf
, ch
)==EOF
)
6552 state
|= IOSTATE_badbit
;
6554 basic_istream_char_sentry_destroy(this);
6556 basic_ios_char_setstate(base
, state
);
6560 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
6561 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
6562 DEFINE_THISCALL_WRAPPER(basic_istream_char_unget
, 4)
6563 basic_istream_char
* __thiscall
basic_istream_char_unget(basic_istream_char
*this)
6565 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6566 IOSB_iostate state
= IOSTATE_goodbit
;
6568 TRACE("(%p)\n", this);
6572 if(basic_istream_char_sentry_create(this, TRUE
)) {
6573 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6575 if(!ios_base_good(&base
->base
))
6576 state
|= IOSTATE_failbit
;
6577 else if(!strbuf
|| basic_streambuf_char_sungetc(strbuf
)==EOF
)
6578 state
|= IOSTATE_badbit
;
6580 basic_istream_char_sentry_destroy(this);
6582 basic_ios_char_setstate(base
, state
);
6586 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
6587 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
6588 DEFINE_THISCALL_WRAPPER(basic_istream_char_sync
, 4)
6589 int __thiscall
basic_istream_char_sync(basic_istream_char
*this)
6591 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6592 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6594 TRACE("(%p)\n", this);
6599 if(basic_istream_char_sentry_create(this, TRUE
)) {
6600 if(basic_streambuf_char_pubsync(strbuf
) != -1) {
6601 basic_istream_char_sentry_destroy(this);
6605 basic_istream_char_sentry_destroy(this);
6607 basic_ios_char_setstate(base
, IOSTATE_badbit
);
6611 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
6612 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
6613 DEFINE_THISCALL_WRAPPER(basic_istream_char_tellg
, 8)
6614 fpos_int
* __thiscall
basic_istream_char_tellg(basic_istream_char
*this, fpos_int
*ret
)
6616 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6618 TRACE("(%p %p)\n", this, ret
);
6620 if(ios_base_fail(&base
->base
)) {
6627 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base
),
6628 ret
, 0, SEEKDIR_cur
, OPENMODE_in
);
6633 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@JW4seekdir@ios_base@2@@Z */
6634 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JW4seekdir@ios_base@2@@Z */
6635 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@JH@Z */
6636 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
6637 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg
, 12)
6638 basic_istream_char
* __thiscall
basic_istream_char_seekg(basic_istream_char
*this, streamoff off
, int dir
)
6640 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6642 TRACE("(%p %Id %d)\n", this, off
, dir
);
6644 if(!ios_base_fail(&base
->base
)) {
6645 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6648 basic_streambuf_char_pubseekoff(strbuf
, &ret
, off
, dir
, OPENMODE_in
);
6654 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
6655 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
6656 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg_fpos
, 28)
6657 basic_istream_char
* __thiscall
basic_istream_char_seekg_fpos(basic_istream_char
*this, fpos_int pos
)
6659 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6661 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos
));
6663 if(!ios_base_fail(&base
->base
)) {
6664 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6667 basic_streambuf_char_pubseekpos(strbuf
, &ret
, pos
, OPENMODE_in
);
6673 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAF@Z */
6674 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAF@Z */
6675 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_short
, 8)
6676 basic_istream_char
* __thiscall
basic_istream_char_read_short(basic_istream_char
*this, short *v
)
6678 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6679 int state
= IOSTATE_goodbit
;
6681 TRACE("(%p %p)\n", this, v
);
6683 if(basic_istream_char_sentry_create(this, FALSE
)) {
6684 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6685 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
6686 istreambuf_iterator_char first
={0}, last
={0};
6689 first
.strbuf
= strbuf
;
6690 num_get_char_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, &tmp
);
6692 if(!(state
&IOSTATE_failbit
) && tmp
==(LONG
)((short)tmp
))
6695 state
|= IOSTATE_failbit
;
6697 basic_istream_char_sentry_destroy(this);
6699 basic_ios_char_setstate(base
, state
);
6703 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAG@Z */
6704 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAG@Z */
6705 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ushort
, 8)
6706 basic_istream_char
* __thiscall
basic_istream_char_read_ushort(basic_istream_char
*this, unsigned short *v
)
6708 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6709 int state
= IOSTATE_goodbit
;
6711 TRACE("(%p %p)\n", this, v
);
6713 if(basic_istream_char_sentry_create(this, FALSE
)) {
6714 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6715 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
6716 istreambuf_iterator_char first
={0}, last
={0};
6718 first
.strbuf
= strbuf
;
6719 num_get_char_get_ushort(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6721 basic_istream_char_sentry_destroy(this);
6723 basic_ios_char_setstate(base
, state
);
6727 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAH@Z */
6728 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAH@Z */
6729 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int
, 8)
6730 basic_istream_char
* __thiscall
basic_istream_char_read_int(basic_istream_char
*this, int *v
)
6732 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6733 int state
= IOSTATE_goodbit
;
6735 TRACE("(%p %p)\n", this, v
);
6737 if(basic_istream_char_sentry_create(this, FALSE
)) {
6738 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6739 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
6740 istreambuf_iterator_char first
={0}, last
={0};
6742 first
.strbuf
= strbuf
;
6743 num_get_char_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, (LONG
*)v
);
6745 basic_istream_char_sentry_destroy(this);
6747 basic_ios_char_setstate(base
, state
);
6751 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAI@Z */
6752 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAI@Z */
6753 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint
, 8)
6754 basic_istream_char
* __thiscall
basic_istream_char_read_uint(basic_istream_char
*this, unsigned int *v
)
6756 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6757 int state
= IOSTATE_goodbit
;
6759 TRACE("(%p %p)\n", this, v
);
6761 if(basic_istream_char_sentry_create(this, FALSE
)) {
6762 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6763 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
6764 istreambuf_iterator_char first
={0}, last
={0};
6766 first
.strbuf
= strbuf
;
6767 num_get_char_get_uint(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6769 basic_istream_char_sentry_destroy(this);
6771 basic_ios_char_setstate(base
, state
);
6775 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAJ@Z */
6776 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAJ@Z */
6777 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_long
, 8)
6778 basic_istream_char
* __thiscall
basic_istream_char_read_long(basic_istream_char
*this, LONG
*v
)
6780 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6781 int state
= IOSTATE_goodbit
;
6783 TRACE("(%p %p)\n", this, v
);
6785 if(basic_istream_char_sentry_create(this, FALSE
)) {
6786 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6787 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
6788 istreambuf_iterator_char first
={0}, last
={0};
6790 first
.strbuf
= strbuf
;
6791 num_get_char_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6793 basic_istream_char_sentry_destroy(this);
6795 basic_ios_char_setstate(base
, state
);
6799 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAK@Z */
6800 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAK@Z */
6801 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ulong
, 8)
6802 basic_istream_char
* __thiscall
basic_istream_char_read_ulong(basic_istream_char
*this, ULONG
*v
)
6804 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6805 int state
= IOSTATE_goodbit
;
6807 TRACE("(%p %p)\n", this, v
);
6809 if(basic_istream_char_sentry_create(this, FALSE
)) {
6810 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6811 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
6812 istreambuf_iterator_char first
={0}, last
={0};
6814 first
.strbuf
= strbuf
;
6815 num_get_char_get_ulong(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6817 basic_istream_char_sentry_destroy(this);
6819 basic_ios_char_setstate(base
, state
);
6823 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAM@Z */
6824 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAM@Z */
6825 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_float
, 8)
6826 basic_istream_char
* __thiscall
basic_istream_char_read_float(basic_istream_char
*this, float *v
)
6828 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6829 int state
= IOSTATE_goodbit
;
6831 TRACE("(%p %p)\n", this, v
);
6833 if(basic_istream_char_sentry_create(this, FALSE
)) {
6834 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6835 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
6836 istreambuf_iterator_char first
={0}, last
={0};
6838 first
.strbuf
= strbuf
;
6839 num_get_char_get_float(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6841 basic_istream_char_sentry_destroy(this);
6843 basic_ios_char_setstate(base
, state
);
6847 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAN@Z */
6848 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAN@Z */
6849 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_double
, 8)
6850 basic_istream_char
* __thiscall
basic_istream_char_read_double(basic_istream_char
*this, double *v
)
6852 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6853 int state
= IOSTATE_goodbit
;
6855 TRACE("(%p %p)\n", this, v
);
6857 if(basic_istream_char_sentry_create(this, FALSE
)) {
6858 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6859 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
6860 istreambuf_iterator_char first
={0}, last
={0};
6862 first
.strbuf
= strbuf
;
6863 num_get_char_get_double(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6865 basic_istream_char_sentry_destroy(this);
6867 basic_ios_char_setstate(base
, state
);
6871 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAO@Z */
6872 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAO@Z */
6873 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ldouble
, 8)
6874 basic_istream_char
* __thiscall
basic_istream_char_read_ldouble(basic_istream_char
*this, double *v
)
6876 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6877 int state
= IOSTATE_goodbit
;
6879 TRACE("(%p %p)\n", this, v
);
6881 if(basic_istream_char_sentry_create(this, FALSE
)) {
6882 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6883 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
6884 istreambuf_iterator_char first
={0}, last
={0};
6886 first
.strbuf
= strbuf
;
6887 num_get_char_get_ldouble(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6889 basic_istream_char_sentry_destroy(this);
6891 basic_ios_char_setstate(base
, state
);
6895 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAPAX@Z */
6896 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
6897 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ptr
, 8)
6898 basic_istream_char
* __thiscall
basic_istream_char_read_ptr(basic_istream_char
*this, void **v
)
6900 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6901 int state
= IOSTATE_goodbit
;
6903 TRACE("(%p %p)\n", this, v
);
6905 if(basic_istream_char_sentry_create(this, FALSE
)) {
6906 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6907 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
6908 istreambuf_iterator_char first
={0}, last
={0};
6910 first
.strbuf
= strbuf
;
6911 num_get_char_get_void(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6913 basic_istream_char_sentry_destroy(this);
6915 basic_ios_char_setstate(base
, state
);
6919 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_J@Z */
6920 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_J@Z */
6921 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int64
, 8)
6922 basic_istream_char
* __thiscall
basic_istream_char_read_int64(basic_istream_char
*this, __int64
*v
)
6924 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6925 int state
= IOSTATE_goodbit
;
6927 TRACE("(%p %p)\n", this, v
);
6929 if(basic_istream_char_sentry_create(this, FALSE
)) {
6930 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6931 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
6932 istreambuf_iterator_char first
={0}, last
={0};
6934 first
.strbuf
= strbuf
;
6935 num_get_char_get_int64(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6937 basic_istream_char_sentry_destroy(this);
6939 basic_ios_char_setstate(base
, state
);
6943 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_K@Z */
6944 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_K@Z */
6945 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint64
, 8)
6946 basic_istream_char
* __thiscall
basic_istream_char_read_uint64(basic_istream_char
*this, unsigned __int64
*v
)
6948 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6949 int state
= IOSTATE_goodbit
;
6951 TRACE("(%p %p)\n", this, v
);
6953 if(basic_istream_char_sentry_create(this, FALSE
)) {
6954 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6955 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
6956 istreambuf_iterator_char first
={0}, last
={0};
6958 first
.strbuf
= strbuf
;
6959 num_get_char_get_uint64(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6961 basic_istream_char_sentry_destroy(this);
6963 basic_ios_char_setstate(base
, state
);
6967 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_N@Z */
6968 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_N@Z */
6969 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_bool
, 8)
6970 basic_istream_char
* __thiscall
basic_istream_char_read_bool(basic_istream_char
*this, bool *v
)
6972 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6973 int state
= IOSTATE_goodbit
;
6975 TRACE("(%p %p)\n", this, v
);
6977 if(basic_istream_char_sentry_create(this, FALSE
)) {
6978 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6979 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
6980 istreambuf_iterator_char first
={0}, last
={0};
6982 first
.strbuf
= strbuf
;
6983 num_get_char_get_bool(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6985 basic_istream_char_sentry_destroy(this);
6987 basic_ios_char_setstate(base
, state
);
6991 /* ??$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 */
6992 /* ??$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 */
6993 basic_istream_char
* __cdecl
basic_istream_char_getline_bstr_delim(
6994 basic_istream_char
*istream
, basic_string_char
*str
, char delim
)
6996 basic_ios_char
*base
= basic_istream_char_get_basic_ios(istream
);
6997 IOSB_iostate state
= IOSTATE_goodbit
;
6998 int c
= (unsigned char)delim
;
7000 TRACE("(%p %p %s)\n", istream
, str
, debugstr_an(&delim
, 1));
7002 MSVCP_basic_string_char_clear(str
);
7003 if(basic_istream_char_sentry_create(istream
, TRUE
)) {
7004 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
7006 c
= basic_streambuf_char_sgetc(strbuf
);
7007 for(; c
!=(unsigned char)delim
&& c
!=EOF
; c
= basic_streambuf_char_snextc(strbuf
))
7008 MSVCP_basic_string_char_append_ch(str
, c
);
7009 if(c
==EOF
) state
|= IOSTATE_eofbit
;
7010 else if(c
==(unsigned char)delim
) basic_streambuf_char_sbumpc(strbuf
);
7012 if(!MSVCP_basic_string_char_length(str
) && c
!=(unsigned char)delim
) state
|= IOSTATE_failbit
;
7014 basic_istream_char_sentry_destroy(istream
);
7016 basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream
), state
);
7020 /* ??$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 */
7021 /* ??$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 */
7022 basic_istream_char
* __cdecl
basic_istream_char_getline_bstr(
7023 basic_istream_char
*istream
, basic_string_char
*str
)
7025 return basic_istream_char_getline_bstr_delim(istream
, str
, '\n');
7028 /* ??$?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 */
7029 /* ??$?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 */
7030 basic_istream_char
* __cdecl
basic_istream_char_read_bstr(
7031 basic_istream_char
*istream
, basic_string_char
*str
)
7033 basic_ios_char
*base
= basic_istream_char_get_basic_ios(istream
);
7034 IOSB_iostate state
= IOSTATE_failbit
;
7037 TRACE("(%p %p)\n", istream
, str
);
7039 if(basic_istream_char_sentry_create(istream
, FALSE
)) {
7040 const ctype_char
*ctype
= ctype_char_use_facet(IOS_LOCALE(base
->strbuf
));
7041 size_t count
= ios_base_width_get(&base
->base
);
7046 MSVCP_basic_string_char_clear(str
);
7048 for(c
= basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base
));
7049 c
!=EOF
&& !ctype_char_is_ch(ctype
, _SPACE
|_BLANK
, c
) && count
>0;
7050 c
= basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base
)), count
--) {
7051 state
= IOSTATE_goodbit
;
7052 MSVCP_basic_string_char_append_ch(str
, c
);
7055 basic_istream_char_sentry_destroy(istream
);
7057 ios_base_width_set(&base
->base
, 0);
7058 basic_ios_char_setstate(base
, state
| (c
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
7062 /* ??$?5DU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAD@Z */
7063 /* ??$?5DU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAD@Z */
7064 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAC@Z */
7065 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAC@Z */
7066 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAE@Z */
7067 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAE@Z */
7068 basic_istream_char
* __cdecl
basic_istream_char_read_str(basic_istream_char
*istream
, char *str
)
7070 basic_ios_char
*base
= basic_istream_char_get_basic_ios(istream
);
7071 IOSB_iostate state
= IOSTATE_failbit
;
7074 TRACE("(%p %p)\n", istream
, str
);
7076 if(basic_istream_char_sentry_create(istream
, FALSE
)) {
7077 const ctype_char
*ctype
= ctype_char_use_facet(IOS_LOCALE(base
->strbuf
));
7078 size_t count
= ios_base_width_get(&base
->base
)-1;
7080 for(c
= basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base
));
7081 c
!=EOF
&& !ctype_char_is_ch(ctype
, _SPACE
|_BLANK
, c
) && count
>0;
7082 c
= basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base
)), count
--) {
7083 state
= IOSTATE_goodbit
;
7087 basic_istream_char_sentry_destroy(istream
);
7090 ios_base_width_set(&base
->base
, 0);
7091 basic_ios_char_setstate(base
, state
| (c
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
7095 /* ??$?5DU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAD@Z */
7096 /* ??$?5DU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAD@Z */
7097 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAC@Z */
7098 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAC@Z */
7099 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAE@Z */
7100 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAE@Z */
7101 basic_istream_char
* __cdecl
basic_istream_char_read_ch(basic_istream_char
*istream
, char *ch
)
7103 IOSB_iostate state
= IOSTATE_failbit
;
7106 TRACE("(%p %p)\n", istream
, ch
);
7108 if(basic_istream_char_sentry_create(istream
, FALSE
)) {
7109 c
= basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(
7110 basic_istream_char_get_basic_ios(istream
)));
7112 state
= IOSTATE_goodbit
;
7116 basic_istream_char_sentry_destroy(istream
);
7118 basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream
),
7119 state
| (c
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
7123 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
7124 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
7125 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_streambuf
, 8)
7126 basic_istream_char
* __thiscall
basic_istream_char_read_streambuf(
7127 basic_istream_char
*this, basic_streambuf_char
*streambuf
)
7129 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
7130 IOSB_iostate state
= IOSTATE_failbit
;
7133 TRACE("(%p %p)\n", this, streambuf
);
7135 if(basic_istream_char_sentry_create(this, FALSE
)) {
7136 for(c
= basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base
)); c
!=EOF
;
7137 c
= basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base
))) {
7138 state
= IOSTATE_goodbit
;
7139 if(basic_streambuf_char_sputc(streambuf
, c
) == EOF
)
7143 basic_istream_char_sentry_destroy(this);
7145 basic_ios_char_setstate(base
, state
| (c
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
7149 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
7150 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
7151 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func
, 8)
7152 basic_istream_char
* __thiscall
basic_istream_char_read_func(basic_istream_char
*this,
7153 basic_istream_char
* (__cdecl
*pfunc
)(basic_istream_char
*))
7155 TRACE("(%p %p)\n", this, pfunc
);
7160 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
7161 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
7162 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_basic_ios
, 8)
7163 basic_istream_char
* __thiscall
basic_istream_char_read_func_basic_ios(basic_istream_char
*this,
7164 basic_ios_char
* (__cdecl
*pfunc
)(basic_ios_char
*))
7166 TRACE("(%p %p)\n", this, pfunc
);
7167 pfunc(basic_istream_char_get_basic_ios(this));
7171 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
7172 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
7173 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_ios_base
, 8)
7174 basic_istream_char
* __thiscall
basic_istream_char_read_func_ios_base(basic_istream_char
*this,
7175 ios_base
* (__cdecl
*pfunc
)(ios_base
*))
7177 TRACE("(%p %p)\n", this, pfunc
);
7178 pfunc(&basic_istream_char_get_basic_ios(this)->base
);
7182 /* Caution: basic_istream uses virtual inheritance. */
7183 static inline basic_ios_wchar
* basic_istream_short_get_basic_ios(basic_istream_wchar
*this)
7185 return (basic_ios_wchar
*)((char*)this+this->vbtable
[1]);
7188 static inline basic_ios_wchar
* basic_istream_short_to_basic_ios(basic_istream_wchar
*ptr
)
7190 return (basic_ios_wchar
*)((char*)ptr
+basic_istream_short_vbtable
[1]);
7193 static inline basic_istream_wchar
* basic_istream_short_from_basic_ios(basic_ios_wchar
*ptr
)
7195 return (basic_istream_wchar
*)((char*)ptr
-basic_istream_short_vbtable
[1]);
7198 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
7199 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
7200 DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor
, 16)
7201 basic_istream_wchar
* __thiscall
basic_istream_short_ctor(basic_istream_wchar
*this,
7202 basic_streambuf_wchar
*strbuf
, bool isstd
, bool virt_init
)
7204 basic_ios_wchar
*base
;
7206 TRACE("(%p %p %d %d)\n", this, strbuf
, isstd
, virt_init
);
7209 this->vbtable
= basic_istream_short_vbtable
;
7210 base
= basic_istream_short_get_basic_ios(this);
7211 basic_ios_short_ctor(base
);
7213 base
= basic_istream_short_get_basic_ios(this);
7216 base
->base
.vtable
= &basic_istream_short_vtable
;
7218 basic_ios_short_init(base
, strbuf
, isstd
);
7222 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z */
7223 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
7224 DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor_uninitialized
, 12)
7225 basic_istream_wchar
* __thiscall
basic_istream_short_ctor_uninitialized(
7226 basic_istream_wchar
*this, int uninitialized
, bool virt_init
)
7228 basic_ios_wchar
*base
;
7230 TRACE("(%p %d %d)\n", this, uninitialized
, virt_init
);
7233 this->vbtable
= basic_istream_short_vbtable
;
7234 base
= basic_istream_short_get_basic_ios(this);
7235 basic_ios_short_ctor(base
);
7237 base
= basic_istream_short_get_basic_ios(this);
7240 base
->base
.vtable
= &basic_istream_short_vtable
;
7241 ios_base_Addstd(&base
->base
);
7245 /* ??1?$basic_istream@GU?$char_traits@G@std@@@std@@UAE@XZ */
7246 /* ??1?$basic_istream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
7247 DEFINE_THISCALL_WRAPPER(basic_istream_short_dtor
, 4)
7248 void __thiscall
basic_istream_short_dtor(basic_ios_wchar
*base
)
7250 basic_istream_wchar
*this = basic_istream_short_from_basic_ios(base
);
7252 /* don't destroy virtual base here */
7253 TRACE("(%p)\n", this);
7256 /* ??_D?$basic_istream@GU?$char_traits@G@std@@@std@@QAEXXZ */
7257 /* ??_D?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
7258 DEFINE_THISCALL_WRAPPER(basic_istream_short_vbase_dtor
, 4)
7259 void __thiscall
basic_istream_short_vbase_dtor(basic_istream_wchar
*this)
7261 TRACE("(%p)\n", this);
7262 basic_istream_short_dtor(basic_istream_short_to_basic_ios(this));
7263 basic_ios_short_dtor(basic_istream_short_get_basic_ios(this));
7266 DEFINE_THISCALL_WRAPPER(basic_istream_short_vector_dtor
, 8)
7267 basic_istream_wchar
* __thiscall
basic_istream_short_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
7269 basic_istream_wchar
*this = basic_istream_short_from_basic_ios(base
);
7271 TRACE("(%p %x)\n", this, flags
);
7274 /* we have an array, with the number of elements stored before the first object */
7275 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
7277 for(i
=*ptr
-1; i
>=0; i
--)
7278 basic_istream_short_vbase_dtor(this+i
);
7279 operator_delete(ptr
);
7281 basic_istream_short_vbase_dtor(this);
7283 operator_delete(this);
7289 /* ?ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE_N_N@Z */
7290 /* ?ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_N_N@Z */
7291 DEFINE_THISCALL_WRAPPER(basic_istream_short_ipfx
, 8)
7292 bool __thiscall
basic_istream_short_ipfx(basic_istream_wchar
*this, bool noskip
)
7294 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7296 TRACE("(%p %d)\n", this, noskip
);
7298 if(ios_base_good(&base
->base
)) {
7299 if(basic_ios_short_tie_get(base
))
7300 basic_ostream_short_flush(basic_ios_short_tie_get(base
));
7302 if(!noskip
&& (ios_base_flags_get(&base
->base
) & FMTFLAG_skipws
)) {
7303 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7304 const ctype_wchar
*ctype
= ctype_wchar_use_facet(IOS_LOCALE(base
->strbuf
));
7307 for(ch
= basic_streambuf_wchar_sgetc(strbuf
); ;
7308 ch
= basic_streambuf_wchar_snextc(strbuf
)) {
7309 if(ch
==WEOF
|| !ctype_wchar_is_ch(ctype
, _SPACE
|_BLANK
, ch
))
7315 if(!ios_base_good(&base
->base
)) {
7316 basic_ios_short_setstate(base
, IOSTATE_failbit
);
7322 /* ?isfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEXXZ */
7323 /* ?isfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
7324 DEFINE_THISCALL_WRAPPER(basic_istream_short_isfx
, 4)
7325 void __thiscall
basic_istream_short_isfx(basic_istream_wchar
*this)
7327 TRACE("(%p)\n", this);
7330 static BOOL
basic_istream_short_sentry_create(basic_istream_wchar
*istr
, bool noskip
)
7332 return basic_istream_short_ipfx(istr
, noskip
);
7335 static void basic_istream_short_sentry_destroy(basic_istream_wchar
*istr
)
7339 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QBEHXZ */
7340 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QEBA_JXZ */
7341 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QBA_JXZ */
7342 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QBE_JXZ */
7343 DEFINE_THISCALL_WRAPPER(basic_istream_short_gcount
, 4)
7344 streamsize __thiscall
basic_istream_short_gcount(const basic_istream_wchar
*this)
7346 TRACE("(%p)\n", this);
7350 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEGXZ */
7351 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAGXZ */
7352 DEFINE_THISCALL_WRAPPER(basic_istream_short_get
, 4)
7353 unsigned short __thiscall
basic_istream_short_get(basic_istream_wchar
*this)
7355 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7358 TRACE("(%p)\n", this);
7362 if(!basic_istream_short_sentry_create(this, TRUE
)) {
7363 basic_istream_short_sentry_destroy(this);
7367 ret
= basic_streambuf_wchar_sbumpc(basic_ios_short_rdbuf_get(base
));
7368 basic_istream_short_sentry_destroy(this);
7370 basic_ios_short_setstate(base
, IOSTATE_eofbit
|IOSTATE_failbit
);
7377 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAG@Z */
7378 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAG@Z */
7379 DEFINE_THISCALL_WRAPPER(basic_istream_short_get_ch
, 8)
7380 basic_istream_wchar
* __thiscall
basic_istream_short_get_ch(basic_istream_wchar
*this, wchar_t *ch
)
7384 TRACE("(%p %p)\n", this, ch
);
7386 ret
= basic_istream_short_get(this);
7392 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGHG@Z */
7393 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_JG@Z */
7394 DEFINE_THISCALL_WRAPPER(basic_istream_short_get_str_delim
, 16)
7395 basic_istream_wchar
* __thiscall
basic_istream_short_get_str_delim(basic_istream_wchar
*this, wchar_t *str
, streamsize count
, wchar_t delim
)
7397 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7398 unsigned short ch
= delim
;
7400 TRACE("(%p %p %Id %s)\n", this, str
, count
, debugstr_wn(&delim
, 1));
7404 if(basic_istream_short_sentry_create(this, TRUE
)) {
7405 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7407 for(ch
= basic_streambuf_wchar_sgetc(strbuf
); count
>1;
7408 ch
= basic_streambuf_wchar_snextc(strbuf
)) {
7409 if(ch
==WEOF
|| ch
==delim
)
7417 basic_istream_short_sentry_destroy(this);
7419 basic_ios_short_setstate(base
, (!this->count
? IOSTATE_failbit
: IOSTATE_goodbit
) |
7420 (ch
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
7426 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
7427 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
7428 DEFINE_THISCALL_WRAPPER(basic_istream_short_get_str
, 12)
7429 basic_istream_wchar
* __thiscall
basic_istream_short_get_str(basic_istream_wchar
*this, wchar_t *str
, streamsize count
)
7431 return basic_istream_short_get_str_delim(this, str
, count
, '\n');
7434 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAV?$basic_streambuf@GU?$char_traits@G@std@@@2@G@Z */
7435 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@G@Z */
7436 DEFINE_THISCALL_WRAPPER(basic_istream_short_get_streambuf_delim
, 12)
7437 basic_istream_wchar
* __thiscall
basic_istream_short_get_streambuf_delim(basic_istream_wchar
*this, basic_streambuf_wchar
*strbuf
, wchar_t delim
)
7439 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7440 unsigned short ch
= delim
;
7442 TRACE("(%p %p %s)\n", this, strbuf
, debugstr_wn(&delim
, 1));
7446 if(basic_istream_short_sentry_create(this, TRUE
)) {
7447 basic_streambuf_wchar
*strbuf_read
= basic_ios_short_rdbuf_get(base
);
7449 for(ch
= basic_streambuf_wchar_sgetc(strbuf_read
); ;
7450 ch
= basic_streambuf_wchar_snextc(strbuf_read
)) {
7451 if(ch
==WEOF
|| ch
==delim
)
7454 if(basic_streambuf_wchar_sputc(strbuf
, ch
) == WEOF
)
7459 basic_istream_short_sentry_destroy(this);
7461 basic_ios_short_setstate(base
, (!this->count
? IOSTATE_failbit
: IOSTATE_goodbit
) |
7462 (ch
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
7466 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAV?$basic_streambuf@GU?$char_traits@G@std@@@2@@Z */
7467 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@@Z */
7468 DEFINE_THISCALL_WRAPPER(basic_istream_short_get_streambuf
, 8)
7469 basic_istream_wchar
* __thiscall
basic_istream_short_get_streambuf(basic_istream_wchar
*this, basic_streambuf_wchar
*strbuf
)
7471 return basic_istream_short_get_streambuf_delim(this, strbuf
, '\n');
7474 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGHG@Z */
7475 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_JG@Z */
7476 DEFINE_THISCALL_WRAPPER(basic_istream_short_getline_delim
, 16)
7477 basic_istream_wchar
* __thiscall
basic_istream_short_getline_delim(basic_istream_wchar
*this, wchar_t *str
, streamsize count
, wchar_t delim
)
7479 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7480 unsigned short ch
= delim
;
7482 TRACE("(%p %p %Id %s)\n", this, str
, count
, debugstr_wn(&delim
, 1));
7486 if(basic_istream_short_sentry_create(this, TRUE
) && count
>0) {
7487 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7490 ch
= basic_streambuf_wchar_sbumpc(strbuf
);
7492 if(ch
==WEOF
|| ch
==delim
)
7502 else if(ch
!= WEOF
) {
7503 ch
= basic_streambuf_wchar_sgetc(strbuf
);
7506 basic_streambuf_wchar__Gninc(strbuf
);
7511 basic_istream_short_sentry_destroy(this);
7513 basic_ios_short_setstate(base
, (ch
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
) |
7514 (!this->count
|| (ch
!=delim
&& ch
!=WEOF
) ? IOSTATE_failbit
: IOSTATE_goodbit
));
7520 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
7521 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
7522 DEFINE_THISCALL_WRAPPER(basic_istream_short_getline
, 12)
7523 basic_istream_wchar
* __thiscall
basic_istream_short_getline(basic_istream_wchar
*this, wchar_t *str
, streamsize count
)
7525 return basic_istream_short_getline_delim(this, str
, count
, '\n');
7528 /* ?ignore@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@HG@Z */
7529 /* ?ignore@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JG@Z */
7530 DEFINE_THISCALL_WRAPPER(basic_istream_short_ignore
, 12)
7531 basic_istream_wchar
* __thiscall
basic_istream_short_ignore(basic_istream_wchar
*this, streamsize count
, unsigned short delim
)
7533 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7534 unsigned short ch
= delim
;
7537 TRACE("(%p %Id %d)\n", this, count
, delim
);
7541 if(basic_istream_short_sentry_create(this, TRUE
)) {
7542 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7543 state
= IOSTATE_goodbit
;
7546 ch
= basic_streambuf_wchar_sbumpc(strbuf
);
7549 state
= IOSTATE_eofbit
;
7557 if(count
!= INT_MAX
)
7561 state
= IOSTATE_failbit
;
7562 basic_istream_short_sentry_destroy(this);
7564 basic_ios_short_setstate(base
, state
);
7568 /* ?ws@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@1@AAV21@@Z */
7569 /* ?ws@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
7570 basic_istream_wchar
* __cdecl
ws_basic_istream_short(basic_istream_wchar
*istream
)
7572 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(istream
);
7573 unsigned short ch
= '\n';
7575 TRACE("(%p)\n", istream
);
7577 if(basic_istream_short_sentry_create(istream
, TRUE
)) {
7578 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7579 const ctype_wchar
*ctype
= ctype_wchar_use_facet(IOS_LOCALE(strbuf
));
7581 for(ch
= basic_streambuf_wchar_sgetc(strbuf
); ctype_wchar_is_ch(ctype
, _SPACE
, ch
);
7582 ch
= basic_streambuf_wchar_snextc(strbuf
)) {
7587 basic_istream_short_sentry_destroy(istream
);
7590 basic_ios_short_setstate(base
, IOSTATE_eofbit
);
7594 /* ?peek@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEGXZ */
7595 /* ?peek@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAGXZ */
7596 DEFINE_THISCALL_WRAPPER(basic_istream_short_peek
, 4)
7597 unsigned short __thiscall
basic_istream_short_peek(basic_istream_wchar
*this)
7599 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7600 unsigned short ret
= WEOF
;
7602 TRACE("(%p)\n", this);
7606 if(basic_istream_short_sentry_create(this, TRUE
))
7607 ret
= basic_streambuf_wchar_sgetc(basic_ios_short_rdbuf_get(base
));
7608 basic_istream_short_sentry_destroy(this);
7611 basic_ios_short_setstate(base
, IOSTATE_eofbit
);
7616 /* ?read@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
7617 /* ?read@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
7618 DEFINE_THISCALL_WRAPPER(basic_istream_short_read
, 12)
7619 basic_istream_wchar
* __thiscall
basic_istream_short_read(basic_istream_wchar
*this, wchar_t *str
, streamsize count
)
7621 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7622 IOSB_iostate state
= IOSTATE_goodbit
;
7624 TRACE("(%p %p %Id)\n", this, str
, count
);
7626 if(basic_istream_short_sentry_create(this, TRUE
)) {
7627 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7629 this->count
= basic_streambuf_wchar_sgetn(strbuf
, str
, count
);
7630 if(this->count
!= count
)
7631 state
|= IOSTATE_failbit
| IOSTATE_eofbit
;
7635 basic_istream_short_sentry_destroy(this);
7637 basic_ios_short_setstate(base
, state
);
7641 /* ?readsome@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */
7642 /* ?readsome@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */
7643 DEFINE_THISCALL_WRAPPER(basic_istream_short_readsome
, 12)
7644 streamsize __thiscall
basic_istream_short_readsome(basic_istream_wchar
*this, wchar_t *str
, streamsize count
)
7646 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7647 IOSB_iostate state
= IOSTATE_goodbit
;
7649 TRACE("(%p %p %Id)\n", this, str
, count
);
7653 if(basic_istream_short_sentry_create(this, TRUE
)) {
7654 streamsize avail
= basic_streambuf_wchar_in_avail(basic_ios_short_rdbuf_get(base
));
7659 state
|= IOSTATE_eofbit
;
7661 basic_istream_short_read(this, str
, avail
);
7663 state
|= IOSTATE_failbit
;
7665 basic_istream_short_sentry_destroy(this);
7667 basic_ios_short_setstate(base
, state
);
7671 /* ?putback@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@G@Z */
7672 /* ?putback@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@G@Z */
7673 DEFINE_THISCALL_WRAPPER(basic_istream_short_putback
, 8)
7674 basic_istream_wchar
* __thiscall
basic_istream_short_putback(basic_istream_wchar
*this, wchar_t ch
)
7676 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7677 IOSB_iostate state
= IOSTATE_goodbit
;
7679 TRACE("(%p %c)\n", this, ch
);
7683 if(basic_istream_short_sentry_create(this, TRUE
)) {
7684 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7686 if(!ios_base_good(&base
->base
))
7687 state
|= IOSTATE_failbit
;
7688 else if(!strbuf
|| basic_streambuf_wchar_sputbackc(strbuf
, ch
)==WEOF
)
7689 state
|= IOSTATE_badbit
;
7691 basic_istream_short_sentry_destroy(this);
7693 basic_ios_short_setstate(base
, state
);
7697 /* ?unget@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@XZ */
7698 /* ?unget@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@XZ */
7699 DEFINE_THISCALL_WRAPPER(basic_istream_short_unget
, 4)
7700 basic_istream_wchar
* __thiscall
basic_istream_short_unget(basic_istream_wchar
*this)
7702 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7703 IOSB_iostate state
= IOSTATE_goodbit
;
7705 TRACE("(%p)\n", this);
7709 if(basic_istream_short_sentry_create(this, TRUE
)) {
7710 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7712 if(!ios_base_good(&base
->base
))
7713 state
|= IOSTATE_failbit
;
7714 else if(!strbuf
|| basic_streambuf_wchar_sungetc(strbuf
)==WEOF
)
7715 state
|= IOSTATE_badbit
;
7717 basic_istream_short_sentry_destroy(this);
7719 basic_ios_short_setstate(base
, state
);
7723 /* ?sync@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHXZ */
7724 /* ?sync@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAHXZ */
7725 DEFINE_THISCALL_WRAPPER(basic_istream_short_sync
, 4)
7726 int __thiscall
basic_istream_short_sync(basic_istream_wchar
*this)
7728 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7729 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7731 TRACE("(%p)\n", this);
7736 if(basic_istream_short_sentry_create(this, TRUE
)) {
7737 if(basic_streambuf_wchar_pubsync(strbuf
) != -1) {
7738 basic_istream_short_sentry_destroy(this);
7742 basic_istream_short_sentry_destroy(this);
7744 basic_ios_short_setstate(base
, IOSTATE_badbit
);
7748 /* ?tellg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@XZ */
7749 /* ?tellg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
7750 DEFINE_THISCALL_WRAPPER(basic_istream_short_tellg
, 8)
7751 fpos_int
* __thiscall
basic_istream_short_tellg(basic_istream_wchar
*this, fpos_int
*ret
)
7753 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7755 TRACE("(%p %p)\n", this, ret
);
7757 if(ios_base_fail(&base
->base
)) {
7764 basic_streambuf_wchar_pubseekoff(basic_ios_short_rdbuf_get(base
),
7765 ret
, 0, SEEKDIR_cur
, OPENMODE_in
);
7770 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@JW4seekdir@ios_base@2@@Z */
7771 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JW4seekdir@ios_base@2@@Z */
7772 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@JH@Z */
7773 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JH@Z */
7774 DEFINE_THISCALL_WRAPPER(basic_istream_short_seekg
, 12)
7775 basic_istream_wchar
* __thiscall
basic_istream_short_seekg(basic_istream_wchar
*this, streamoff off
, int dir
)
7777 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7779 TRACE("(%p %Id %d)\n", this, off
, dir
);
7781 if(!ios_base_fail(&base
->base
)) {
7782 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7785 basic_streambuf_wchar_pubseekoff(strbuf
, &ret
, off
, dir
, OPENMODE_in
);
7791 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
7792 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
7793 DEFINE_THISCALL_WRAPPER(basic_istream_short_seekg_fpos
, 28)
7794 basic_istream_wchar
* __thiscall
basic_istream_short_seekg_fpos(basic_istream_wchar
*this, fpos_int pos
)
7796 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7798 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos
));
7800 if(!ios_base_fail(&base
->base
)) {
7801 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7804 basic_streambuf_wchar_pubseekpos(strbuf
, &ret
, pos
, OPENMODE_in
);
7810 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAF@Z */
7811 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAF@Z */
7812 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_short
, 8)
7813 basic_istream_wchar
* __thiscall
basic_istream_short_read_short(basic_istream_wchar
*this, short *v
)
7815 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7816 const num_get
*numget
= num_get_short_use_facet(IOS_LOCALE(base
->strbuf
));
7817 int state
= IOSTATE_goodbit
;
7819 TRACE("(%p %p)\n", this, v
);
7821 if(basic_istream_short_sentry_create(this, FALSE
)) {
7822 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7823 istreambuf_iterator_wchar first
={0}, last
={0};
7826 first
.strbuf
= strbuf
;
7827 num_get_wchar_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, &tmp
);
7829 if(!(state
&IOSTATE_failbit
) && tmp
==(LONG
)((short)tmp
))
7832 state
|= IOSTATE_failbit
;
7834 basic_istream_short_sentry_destroy(this);
7836 basic_ios_short_setstate(base
, state
);
7840 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAH@Z */
7841 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAH@Z */
7842 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int
, 8)
7843 basic_istream_wchar
* __thiscall
basic_istream_short_read_int(basic_istream_wchar
*this, int *v
)
7845 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7846 const num_get
*numget
= num_get_short_use_facet(IOS_LOCALE(base
->strbuf
));
7847 int state
= IOSTATE_goodbit
;
7849 TRACE("(%p %p)\n", this, v
);
7851 if(basic_istream_short_sentry_create(this, FALSE
)) {
7852 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7853 istreambuf_iterator_wchar first
={0}, last
={0};
7855 first
.strbuf
= strbuf
;
7856 num_get_wchar_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, (LONG
*)v
);
7858 basic_istream_short_sentry_destroy(this);
7860 basic_ios_short_setstate(base
, state
);
7864 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAI@Z */
7865 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAI@Z */
7866 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint
, 8)
7867 basic_istream_wchar
* __thiscall
basic_istream_short_read_uint(basic_istream_wchar
*this, unsigned int *v
)
7869 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7870 const num_get
*numget
= num_get_short_use_facet(IOS_LOCALE(base
->strbuf
));
7871 int state
= IOSTATE_goodbit
;
7873 TRACE("(%p %p)\n", this, v
);
7875 if(basic_istream_short_sentry_create(this, FALSE
)) {
7876 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7877 istreambuf_iterator_wchar first
={0}, last
={0};
7879 first
.strbuf
= strbuf
;
7880 num_get_wchar_get_uint(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7882 basic_istream_short_sentry_destroy(this);
7884 basic_ios_short_setstate(base
, state
);
7888 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAJ@Z */
7889 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAJ@Z */
7890 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_long
, 8)
7891 basic_istream_wchar
* __thiscall
basic_istream_short_read_long(basic_istream_wchar
*this, LONG
*v
)
7893 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7894 const num_get
*numget
= num_get_short_use_facet(IOS_LOCALE(base
->strbuf
));
7895 int state
= IOSTATE_goodbit
;
7897 TRACE("(%p %p)\n", this, v
);
7899 if(basic_istream_short_sentry_create(this, FALSE
)) {
7900 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7901 istreambuf_iterator_wchar first
={0}, last
={0};
7903 first
.strbuf
= strbuf
;
7904 num_get_wchar_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7906 basic_istream_short_sentry_destroy(this);
7908 basic_ios_short_setstate(base
, state
);
7912 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAK@Z */
7913 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAK@Z */
7914 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ulong
, 8)
7915 basic_istream_wchar
* __thiscall
basic_istream_short_read_ulong(basic_istream_wchar
*this, ULONG
*v
)
7917 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7918 const num_get
*numget
= num_get_short_use_facet(IOS_LOCALE(base
->strbuf
));
7919 int state
= IOSTATE_goodbit
;
7921 TRACE("(%p %p)\n", this, v
);
7923 if(basic_istream_short_sentry_create(this, FALSE
)) {
7924 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7925 istreambuf_iterator_wchar first
={0}, last
={0};
7927 first
.strbuf
= strbuf
;
7928 num_get_wchar_get_ulong(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7930 basic_istream_short_sentry_destroy(this);
7932 basic_ios_short_setstate(base
, state
);
7936 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAM@Z */
7937 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAM@Z */
7938 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_float
, 8)
7939 basic_istream_wchar
* __thiscall
basic_istream_short_read_float(basic_istream_wchar
*this, float *v
)
7941 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7942 const num_get
*numget
= num_get_short_use_facet(IOS_LOCALE(base
->strbuf
));
7943 int state
= IOSTATE_goodbit
;
7945 TRACE("(%p %p)\n", this, v
);
7947 if(basic_istream_short_sentry_create(this, FALSE
)) {
7948 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7949 istreambuf_iterator_wchar first
={0}, last
={0};
7951 first
.strbuf
= strbuf
;
7952 num_get_wchar_get_float(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7954 basic_istream_short_sentry_destroy(this);
7956 basic_ios_short_setstate(base
, state
);
7960 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAN@Z */
7961 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAN@Z */
7962 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_double
, 8)
7963 basic_istream_wchar
* __thiscall
basic_istream_short_read_double(basic_istream_wchar
*this, double *v
)
7965 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7966 const num_get
*numget
= num_get_short_use_facet(IOS_LOCALE(base
->strbuf
));
7967 int state
= IOSTATE_goodbit
;
7969 TRACE("(%p %p)\n", this, v
);
7971 if(basic_istream_short_sentry_create(this, FALSE
)) {
7972 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7973 istreambuf_iterator_wchar first
={0}, last
={0};
7975 first
.strbuf
= strbuf
;
7976 num_get_wchar_get_double(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7978 basic_istream_short_sentry_destroy(this);
7980 basic_ios_short_setstate(base
, state
);
7984 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAO@Z */
7985 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAO@Z */
7986 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ldouble
, 8)
7987 basic_istream_wchar
* __thiscall
basic_istream_short_read_ldouble(basic_istream_wchar
*this, double *v
)
7989 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7990 const num_get
*numget
= num_get_short_use_facet(IOS_LOCALE(base
->strbuf
));
7991 int state
= IOSTATE_goodbit
;
7993 TRACE("(%p %p)\n", this, v
);
7995 if(basic_istream_short_sentry_create(this, FALSE
)) {
7996 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7997 istreambuf_iterator_wchar first
={0}, last
={0};
7999 first
.strbuf
= strbuf
;
8000 num_get_wchar_get_ldouble(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
8002 basic_istream_short_sentry_destroy(this);
8004 basic_ios_short_setstate(base
, state
);
8008 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAPAX@Z */
8009 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
8010 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ptr
, 8)
8011 basic_istream_wchar
* __thiscall
basic_istream_short_read_ptr(basic_istream_wchar
*this, void **v
)
8013 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
8014 const num_get
*numget
= num_get_short_use_facet(IOS_LOCALE(base
->strbuf
));
8015 int state
= IOSTATE_goodbit
;
8017 TRACE("(%p %p)\n", this, v
);
8019 if(basic_istream_short_sentry_create(this, FALSE
)) {
8020 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
8021 istreambuf_iterator_wchar first
={0}, last
={0};
8023 first
.strbuf
= strbuf
;
8024 num_get_wchar_get_void(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
8026 basic_istream_short_sentry_destroy(this);
8028 basic_ios_short_setstate(base
, state
);
8032 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_J@Z */
8033 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_J@Z */
8034 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int64
, 8)
8035 basic_istream_wchar
* __thiscall
basic_istream_short_read_int64(basic_istream_wchar
*this, __int64
*v
)
8037 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
8038 const num_get
*numget
= num_get_short_use_facet(IOS_LOCALE(base
->strbuf
));
8039 int state
= IOSTATE_goodbit
;
8041 TRACE("(%p %p)\n", this, v
);
8043 if(basic_istream_short_sentry_create(this, FALSE
)) {
8044 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
8045 istreambuf_iterator_wchar first
={0}, last
={0};
8047 first
.strbuf
= strbuf
;
8048 num_get_wchar_get_int64(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
8050 basic_istream_short_sentry_destroy(this);
8052 basic_ios_short_setstate(base
, state
);
8056 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_K@Z */
8057 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_K@Z */
8058 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint64
, 8)
8059 basic_istream_wchar
* __thiscall
basic_istream_short_read_uint64(basic_istream_wchar
*this, unsigned __int64
*v
)
8061 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
8062 const num_get
*numget
= num_get_short_use_facet(IOS_LOCALE(base
->strbuf
));
8063 int state
= IOSTATE_goodbit
;
8065 TRACE("(%p %p)\n", this, v
);
8067 if(basic_istream_short_sentry_create(this, FALSE
)) {
8068 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
8069 istreambuf_iterator_wchar first
={0}, last
={0};
8071 first
.strbuf
= strbuf
;
8072 num_get_wchar_get_uint64(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
8074 basic_istream_short_sentry_destroy(this);
8076 basic_ios_short_setstate(base
, state
);
8080 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_N@Z */
8081 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_N@Z */
8082 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_bool
, 8)
8083 basic_istream_wchar
* __thiscall
basic_istream_short_read_bool(basic_istream_wchar
*this, bool *v
)
8085 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
8086 const num_get
*numget
= num_get_short_use_facet(IOS_LOCALE(base
->strbuf
));
8087 int state
= IOSTATE_goodbit
;
8089 TRACE("(%p %p)\n", this, v
);
8091 if(basic_istream_short_sentry_create(this, FALSE
)) {
8092 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
8093 istreambuf_iterator_wchar first
={0}, last
={0};
8095 first
.strbuf
= strbuf
;
8096 num_get_wchar_get_bool(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
8098 basic_istream_short_sentry_destroy(this);
8100 basic_ios_short_setstate(base
, state
);
8104 /* ??$getline@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@AAV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@G@Z */
8105 /* ??$getline@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@AEAV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@G@Z */
8106 basic_istream_wchar
* __cdecl
basic_istream_short_getline_bstr_delim(
8107 basic_istream_wchar
*istream
, basic_string_wchar
*str
, wchar_t delim
)
8109 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(istream
);
8110 IOSB_iostate state
= IOSTATE_goodbit
;
8113 TRACE("(%p %p %s)\n", istream
, str
, debugstr_wn(&delim
, 1));
8115 MSVCP_basic_string_wchar_clear(str
);
8116 if(basic_istream_short_sentry_create(istream
, TRUE
)) {
8117 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
8119 c
= basic_streambuf_wchar_sgetc(strbuf
);
8120 for(; c
!=delim
&& c
!=WEOF
; c
= basic_streambuf_wchar_snextc(strbuf
))
8121 MSVCP_basic_string_wchar_append_ch(str
, c
);
8122 if(c
==delim
) basic_streambuf_wchar_sbumpc(strbuf
);
8123 else if(c
==WEOF
) state
|= IOSTATE_eofbit
;
8125 if(!MSVCP_basic_string_wchar_length(str
) && c
!=delim
) state
|= IOSTATE_failbit
;
8127 basic_istream_short_sentry_destroy(istream
);
8129 basic_ios_short_setstate(basic_istream_short_get_basic_ios(istream
), state
);
8133 /* ??$getline@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@AAV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
8134 /* ??$getline@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@AEAV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
8135 basic_istream_wchar
* __cdecl
basic_istream_short_getline_bstr(
8136 basic_istream_wchar
*istream
, basic_string_wchar
*str
)
8138 return basic_istream_short_getline_bstr_delim(istream
, str
, '\n');
8141 /* ??$?5GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@AAV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
8142 /* ??$?5GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@AEAV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
8143 basic_istream_wchar
* __cdecl
basic_istream_short_read_bstr(
8144 basic_istream_wchar
*istream
, basic_string_wchar
*str
)
8146 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(istream
);
8147 const ctype_wchar
*ctype
= ctype_short_use_facet(IOS_LOCALE(base
->strbuf
));
8148 IOSB_iostate state
= IOSTATE_failbit
;
8151 TRACE("(%p %p)\n", istream
, str
);
8153 if(basic_istream_short_sentry_create(istream
, FALSE
)) {
8154 size_t count
= ios_base_width_get(&base
->base
);
8159 MSVCP_basic_string_wchar_clear(str
);
8161 for(c
= basic_streambuf_wchar_sgetc(basic_ios_short_rdbuf_get(base
));
8162 c
!=WEOF
&& !ctype_wchar_is_ch(ctype
, _SPACE
|_BLANK
, c
) && count
>0;
8163 c
= basic_streambuf_wchar_snextc(basic_ios_short_rdbuf_get(base
)), count
--) {
8164 state
= IOSTATE_goodbit
;
8165 MSVCP_basic_string_wchar_append_ch(str
, c
);
8168 basic_istream_short_sentry_destroy(istream
);
8170 ios_base_width_set(&base
->base
, 0);
8171 basic_ios_short_setstate(base
, state
| (c
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
8175 /* ??$?5GU?$char_traits@G@std@@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@PAG@Z */
8176 /* ??$?5GU?$char_traits@G@std@@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@PEAG@Z */
8177 basic_istream_wchar
* __cdecl
basic_istream_short_read_str(basic_istream_wchar
*istream
, wchar_t *str
)
8179 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(istream
);
8180 const ctype_wchar
*ctype
= ctype_short_use_facet(IOS_LOCALE(base
->strbuf
));
8181 IOSB_iostate state
= IOSTATE_failbit
;
8182 unsigned short c
= '\n';
8184 TRACE("(%p %p)\n", istream
, str
);
8186 if(basic_istream_short_sentry_create(istream
, FALSE
)) {
8187 size_t count
= ios_base_width_get(&base
->base
)-1;
8189 for(c
= basic_streambuf_wchar_sgetc(basic_ios_short_rdbuf_get(base
));
8190 c
!=WEOF
&& !ctype_wchar_is_ch(ctype
, _SPACE
|_BLANK
, c
) && count
>0;
8191 c
= basic_streambuf_wchar_snextc(basic_ios_short_rdbuf_get(base
)), count
--) {
8192 state
= IOSTATE_goodbit
;
8196 basic_istream_short_sentry_destroy(istream
);
8199 ios_base_width_set(&base
->base
, 0);
8200 basic_ios_short_setstate(base
, state
| (c
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
8204 /* ??$?5GU?$char_traits@G@std@@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@AAG@Z */
8205 /* ??$?5GU?$char_traits@G@std@@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@AEAG@Z */
8206 basic_istream_wchar
* __cdecl
basic_istream_short_read_ch(basic_istream_wchar
*istream
, wchar_t *ch
)
8208 IOSB_iostate state
= IOSTATE_failbit
;
8209 unsigned short c
= 0;
8211 TRACE("(%p %p)\n", istream
, ch
);
8213 if(basic_istream_short_sentry_create(istream
, FALSE
)) {
8214 c
= basic_streambuf_wchar_sbumpc(basic_ios_short_rdbuf_get(
8215 basic_istream_short_get_basic_ios(istream
)));
8217 state
= IOSTATE_goodbit
;
8221 basic_istream_short_sentry_destroy(istream
);
8223 basic_ios_short_setstate(basic_istream_short_get_basic_ios(istream
),
8224 state
| (c
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
8228 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
8229 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
8230 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_streambuf
, 8)
8231 basic_istream_wchar
* __thiscall
basic_istream_short_read_streambuf(
8232 basic_istream_wchar
*this, basic_streambuf_wchar
*streambuf
)
8234 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
8235 IOSB_iostate state
= IOSTATE_failbit
;
8236 unsigned short c
= '\n';
8238 TRACE("(%p %p)\n", this, streambuf
);
8240 if(basic_istream_short_sentry_create(this, FALSE
)) {
8241 for(c
= basic_streambuf_wchar_sgetc(basic_ios_short_rdbuf_get(base
)); c
!=WEOF
;
8242 c
= basic_streambuf_wchar_snextc(basic_ios_short_rdbuf_get(base
))) {
8243 state
= IOSTATE_goodbit
;
8244 if(basic_streambuf_wchar_sputc(streambuf
, c
) == WEOF
)
8248 basic_istream_short_sentry_destroy(this);
8250 basic_ios_short_setstate(base
, state
| (c
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
8254 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
8255 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
8256 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_func
, 8)
8257 basic_istream_wchar
* __thiscall
basic_istream_short_read_func(basic_istream_wchar
*this,
8258 basic_istream_wchar
* (__cdecl
*pfunc
)(basic_istream_wchar
*))
8260 TRACE("(%p %p)\n", this, pfunc
);
8265 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@GU?$char_traits@G@std@@@1@AAV21@@Z@Z */
8266 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@GU?$char_traits@G@std@@@1@AEAV21@@Z@Z */
8267 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_func_basic_ios
, 8)
8268 basic_istream_wchar
* __thiscall
basic_istream_short_read_func_basic_ios(basic_istream_wchar
*this,
8269 basic_ios_wchar
* (__cdecl
*pfunc
)(basic_ios_wchar
*))
8271 TRACE("(%p %p)\n", this, pfunc
);
8272 pfunc(basic_istream_short_get_basic_ios(this));
8276 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
8277 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
8278 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_func_ios_base
, 8)
8279 basic_istream_wchar
* __thiscall
basic_istream_short_read_func_ios_base(
8280 basic_istream_wchar
*this, ios_base
* (__cdecl
*pfunc
)(ios_base
*))
8282 TRACE("(%p %p)\n", this, pfunc
);
8283 pfunc(&basic_istream_short_get_basic_ios(this)->base
);
8287 static inline basic_ios_char
* basic_iostream_char_to_basic_ios(basic_iostream_char
*ptr
)
8289 return (basic_ios_char
*)((char*)ptr
+basic_iostream_char_vbtable1
[1]);
8292 static inline basic_iostream_char
* basic_iostream_char_from_basic_ios(basic_ios_char
*ptr
)
8294 return (basic_iostream_char
*)((char*)ptr
-basic_iostream_char_vbtable1
[1]);
8297 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
8298 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
8299 DEFINE_THISCALL_WRAPPER(basic_iostream_char_ctor
, 12)
8300 basic_iostream_char
* __thiscall
basic_iostream_char_ctor(basic_iostream_char
*this, basic_streambuf_char
*strbuf
, bool virt_init
)
8302 basic_ios_char
*basic_ios
;
8304 TRACE("(%p %p %d)\n", this, strbuf
, virt_init
);
8307 this->base1
.vbtable
= basic_iostream_char_vbtable1
;
8308 this->base2
.vbtable
= basic_iostream_char_vbtable2
;
8309 basic_ios
= basic_istream_char_get_basic_ios(&this->base1
);
8310 basic_ios_char_ctor(basic_ios
);
8312 basic_ios
= basic_istream_char_get_basic_ios(&this->base1
);
8315 basic_ios
->base
.vtable
= &basic_iostream_char_vtable
;
8317 basic_istream_char_ctor(&this->base1
, strbuf
, FALSE
, FALSE
);
8318 basic_ostream_char_ctor(&this->base2
, NULL
, FALSE
, FALSE
, FALSE
);
8322 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
8323 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
8324 DEFINE_THISCALL_WRAPPER(basic_iostream_char_dtor
, 4)
8325 void __thiscall
basic_iostream_char_dtor(basic_ios_char
*base
)
8327 basic_iostream_char
*this = basic_iostream_char_from_basic_ios(base
);
8329 TRACE("(%p)\n", this);
8330 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base2
));
8331 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base1
));
8334 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
8335 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
8336 DEFINE_THISCALL_WRAPPER(basic_iostream_char_vbase_dtor
, 4)
8337 void __thiscall
basic_iostream_char_vbase_dtor(basic_iostream_char
*this)
8339 TRACE("(%p)\n", this);
8340 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(this));
8341 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base1
));
8344 DEFINE_THISCALL_WRAPPER(basic_iostream_char_vector_dtor
, 8)
8345 basic_iostream_char
* __thiscall
basic_iostream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
8347 basic_iostream_char
*this = basic_iostream_char_from_basic_ios(base
);
8349 TRACE("(%p %x)\n", this, flags
);
8352 /* we have an array, with the number of elements stored before the first object */
8353 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
8355 for(i
=*ptr
-1; i
>=0; i
--)
8356 basic_iostream_char_vbase_dtor(this+i
);
8357 operator_delete(ptr
);
8359 basic_iostream_char_vbase_dtor(this);
8361 operator_delete(this);
8367 static inline basic_ios_wchar
* basic_iostream_short_to_basic_ios(basic_iostream_wchar
*ptr
)
8369 return (basic_ios_wchar
*)((char*)ptr
+basic_iostream_short_vbtable1
[1]);
8372 static inline basic_iostream_wchar
* basic_iostream_short_from_basic_ios(basic_ios_wchar
*ptr
)
8374 return (basic_iostream_wchar
*)((char*)ptr
-basic_iostream_short_vbtable1
[1]);
8377 /* ??0?$basic_iostream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
8378 /* ??0?$basic_iostream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
8379 DEFINE_THISCALL_WRAPPER(basic_iostream_short_ctor
, 12)
8380 basic_iostream_wchar
* __thiscall
basic_iostream_short_ctor(basic_iostream_wchar
*this,
8381 basic_streambuf_wchar
*strbuf
, bool virt_init
)
8383 basic_ios_wchar
*basic_ios
;
8385 TRACE("(%p %p %d)\n", this, strbuf
, virt_init
);
8388 this->base1
.vbtable
= basic_iostream_short_vbtable1
;
8389 this->base2
.vbtable
= basic_iostream_short_vbtable2
;
8390 basic_ios
= basic_istream_short_get_basic_ios(&this->base1
);
8391 basic_ios_short_ctor(basic_ios
);
8393 basic_ios
= basic_istream_short_get_basic_ios(&this->base1
);
8396 basic_istream_short_ctor(&this->base1
, strbuf
, FALSE
, FALSE
);
8397 basic_ostream_short_ctor(&this->base2
, NULL
, FALSE
, FALSE
, FALSE
);
8399 basic_ios
->base
.vtable
= &basic_iostream_short_vtable
;
8403 /* ??1?$basic_iostream@GU?$char_traits@G@std@@@std@@UAE@XZ */
8404 /* ??1?$basic_iostream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
8405 DEFINE_THISCALL_WRAPPER(basic_iostream_short_dtor
, 4)
8406 void __thiscall
basic_iostream_short_dtor(basic_ios_wchar
*base
)
8408 basic_iostream_wchar
*this = basic_iostream_short_from_basic_ios(base
);
8410 TRACE("(%p)\n", this);
8411 basic_ostream_short_dtor(basic_ostream_short_to_basic_ios(&this->base2
));
8412 basic_istream_short_dtor(basic_istream_short_to_basic_ios(&this->base1
));
8415 /* ??_D?$basic_iostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
8416 /* ??_D?$basic_iostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
8417 DEFINE_THISCALL_WRAPPER(basic_iostream_short_vbase_dtor
, 4)
8418 void __thiscall
basic_iostream_short_vbase_dtor(basic_iostream_wchar
*this)
8420 TRACE("(%p)\n", this);
8421 basic_iostream_short_dtor(basic_iostream_short_to_basic_ios(this));
8422 basic_ios_short_dtor(basic_istream_short_get_basic_ios(&this->base1
));
8425 DEFINE_THISCALL_WRAPPER(basic_iostream_short_vector_dtor
, 8)
8426 basic_iostream_wchar
* __thiscall
basic_iostream_short_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
8428 basic_iostream_wchar
*this = basic_iostream_short_from_basic_ios(base
);
8430 TRACE("(%p %x)\n", this, flags
);
8433 /* we have an array, with the number of elements stored before the first object */
8434 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
8436 for(i
=*ptr
-1; i
>=0; i
--)
8437 basic_iostream_short_vbase_dtor(this+i
);
8438 operator_delete(ptr
);
8440 basic_iostream_short_vbase_dtor(this);
8442 operator_delete(this);
8448 static inline basic_ios_char
* basic_ofstream_char_to_basic_ios(basic_ofstream_char
*ptr
)
8450 return (basic_ios_char
*)((char*)ptr
+basic_ofstream_char_vbtable
[1]);
8453 static inline basic_ofstream_char
* basic_ofstream_char_from_basic_ios(basic_ios_char
*ptr
)
8455 return (basic_ofstream_char
*)((char*)ptr
-basic_ofstream_char_vbtable
[1]);
8458 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
8459 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
8460 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor
, 8)
8461 basic_ofstream_char
* __thiscall
basic_ofstream_char_ctor(basic_ofstream_char
*this, bool virt_init
)
8463 basic_ios_char
*basic_ios
;
8465 TRACE("(%p %d)\n", this, virt_init
);
8468 this->base
.vbtable
= basic_ofstream_char_vbtable
;
8469 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8470 basic_ios_char_ctor(basic_ios
);
8472 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8475 basic_filebuf_char_ctor(&this->filebuf
);
8476 basic_ostream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
, TRUE
, FALSE
);
8477 basic_ios
->base
.vtable
= &basic_ofstream_char_vtable
;
8481 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@ABV01@@Z */
8482 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@AEBV01@@Z */
8483 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_copy_ctor
, 12)
8484 basic_ofstream_char
* __thiscall
basic_ofstream_char_copy_ctor(basic_ofstream_char
*this,
8485 basic_ofstream_char
*copy
, bool virt_init
)
8487 basic_ios_char
*basic_ios
;
8489 TRACE("(%p %p %d)\n", this, copy
, virt_init
);
8492 this->base
.vbtable
= basic_ofstream_char_vbtable
;
8493 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8494 basic_ios_char_ctor(basic_ios
);
8496 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8499 basic_filebuf_char_ctor_file(&this->filebuf
, copy
->filebuf
.file
);
8500 basic_ostream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
, TRUE
, FALSE
);
8501 basic_ios
->base
.vtable
= &basic_ofstream_char_vtable
;
8505 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PBDH@Z */
8506 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDH@Z */
8507 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_name
, 16)
8508 basic_ofstream_char
* __thiscall
basic_ofstream_char_ctor_name(basic_ofstream_char
*this,
8509 const char *name
, int mode
, bool virt_init
)
8511 TRACE("(%p %s %d %d)\n", this, name
, mode
, virt_init
);
8513 basic_ofstream_char_ctor(this, virt_init
);
8515 if(!basic_filebuf_char_open_mode(&this->filebuf
, name
, mode
|OPENMODE_out
)) {
8516 basic_ios_char
*basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8517 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8522 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
8523 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
8524 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_dtor
, 4)
8525 void __thiscall
basic_ofstream_char_dtor(basic_ios_char
*base
)
8527 basic_ofstream_char
*this = basic_ofstream_char_from_basic_ios(base
);
8529 TRACE("(%p)\n", this);
8531 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base
));
8532 basic_filebuf_char_dtor(&this->filebuf
);
8535 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
8536 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
8537 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_vbase_dtor
, 4)
8538 void __thiscall
basic_ofstream_char_vbase_dtor(basic_ofstream_char
*this)
8540 TRACE("(%p)\n", this);
8542 basic_ofstream_char_dtor(basic_ofstream_char_to_basic_ios(this));
8543 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base
));
8546 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_vector_dtor
, 8)
8547 basic_ofstream_char
* __thiscall
basic_ofstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
8549 basic_ofstream_char
*this = basic_ofstream_char_from_basic_ios(base
);
8551 TRACE("(%p %x)\n", this, flags
);
8554 /* we have an array, with the number of elements stored before the first object */
8555 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
8557 for(i
=*ptr
-1; i
>=0; i
--)
8558 basic_ofstream_char_vbase_dtor(this+i
);
8559 operator_delete(ptr
);
8561 basic_ofstream_char_vbase_dtor(this);
8563 operator_delete(this);
8569 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
8570 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
8571 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_close
, 4)
8572 void __thiscall
basic_ofstream_char_close(basic_ofstream_char
*this)
8574 TRACE("(%p)\n", this);
8576 if(!basic_filebuf_char_close(&this->filebuf
)) {
8577 basic_ios_char
*basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8578 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8582 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
8583 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
8584 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_is_open
, 4)
8585 bool __thiscall
basic_ofstream_char_is_open(const basic_ofstream_char
*this)
8587 TRACE("(%p)\n", this);
8588 return basic_filebuf_char_is_open(&this->filebuf
);
8591 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDH@Z */
8592 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDH@Z */
8593 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open
, 12)
8594 void __thiscall
basic_ofstream_char_open(basic_ofstream_char
*this,
8595 const char *name
, int mode
)
8597 TRACE("(%p %s %d)\n", this, name
, mode
);
8599 if(!basic_filebuf_char_open_mode(&this->filebuf
, name
, mode
|OPENMODE_out
)) {
8600 basic_ios_char
*basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8601 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8605 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDF@Z */
8606 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDF@Z */
8607 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_old
, 12)
8608 void __thiscall
basic_ofstream_char_open_old(basic_ofstream_char
*this,
8609 const char *name
, short mode
)
8611 basic_ofstream_char_open(this, name
, mode
);
8614 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
8615 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
8616 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_rdbuf
, 4)
8617 basic_filebuf_char
* __thiscall
basic_ofstream_char_rdbuf(const basic_ofstream_char
*this)
8619 TRACE("(%p)\n", this);
8620 return (basic_filebuf_char
*)&this->filebuf
;
8623 static inline basic_ios_wchar
* basic_ofstream_short_to_basic_ios(basic_ofstream_wchar
*ptr
)
8625 return (basic_ios_wchar
*)((char*)ptr
+basic_ofstream_short_vbtable
[1]);
8628 static inline basic_ofstream_wchar
* basic_ofstream_short_from_basic_ios(basic_ios_wchar
*ptr
)
8630 return (basic_ofstream_wchar
*)((char*)ptr
-basic_ofstream_short_vbtable
[1]);
8633 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
8634 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
8635 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_ctor
, 8)
8636 basic_ofstream_wchar
* __thiscall
basic_ofstream_short_ctor(basic_ofstream_wchar
*this, bool virt_init
)
8638 basic_ios_wchar
*basic_ios
;
8640 TRACE("(%p %d)\n", this, virt_init
);
8643 this->base
.vbtable
= basic_ofstream_short_vbtable
;
8644 basic_ios
= basic_ostream_short_get_basic_ios(&this->base
);
8645 basic_ios_short_ctor(basic_ios
);
8647 basic_ios
= basic_ostream_short_get_basic_ios(&this->base
);
8650 basic_filebuf_short_ctor(&this->filebuf
);
8651 basic_ostream_short_ctor(&this->base
, &this->filebuf
.base
, FALSE
, TRUE
, FALSE
);
8652 basic_ios
->base
.vtable
= &basic_ofstream_short_vtable
;
8656 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@ABV01@@Z */
8657 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@AEBV01@@Z */
8658 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_copy_ctor
, 12)
8659 basic_ofstream_wchar
* __thiscall
basic_ofstream_short_copy_ctor(basic_ofstream_wchar
*this,
8660 basic_ofstream_wchar
*copy
, bool virt_init
)
8662 basic_ios_wchar
*basic_ios
;
8664 TRACE("(%p %p %d)\n", this, copy
, virt_init
);
8667 this->base
.vbtable
= basic_ofstream_short_vbtable
;
8668 basic_ios
= basic_ostream_short_get_basic_ios(&this->base
);
8669 basic_ios_short_ctor(basic_ios
);
8671 basic_ios
= basic_ostream_short_get_basic_ios(&this->base
);
8674 basic_filebuf_short_ctor_file(&this->filebuf
, copy
->filebuf
.file
);
8675 basic_ostream_short_ctor(&this->base
, &this->filebuf
.base
, FALSE
, TRUE
, FALSE
);
8676 basic_ios
->base
.vtable
= &basic_ofstream_short_vtable
;
8680 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@PBDH@Z */
8681 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@PEBDH@Z */
8682 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_ctor_name
, 16)
8683 basic_ofstream_wchar
* __thiscall
basic_ofstream_short_ctor_name(basic_ofstream_wchar
*this,
8684 const char *name
, int mode
, bool virt_init
)
8686 TRACE("(%p %s %d %d)\n", this, name
, mode
, virt_init
);
8688 basic_ofstream_short_ctor(this, virt_init
);
8690 if(!basic_filebuf_short_open_mode(&this->filebuf
, name
, mode
|OPENMODE_out
)) {
8691 basic_ios_wchar
*basic_ios
= basic_ostream_short_get_basic_ios(&this->base
);
8692 basic_ios_short_setstate(basic_ios
, IOSTATE_failbit
);
8697 /* ??1?$basic_ofstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
8698 /* ??1?$basic_ofstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
8699 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_dtor
, 4)
8700 void __thiscall
basic_ofstream_short_dtor(basic_ios_wchar
*base
)
8702 basic_ofstream_wchar
*this = basic_ofstream_short_from_basic_ios(base
);
8704 TRACE("(%p)\n", this);
8706 basic_ostream_short_dtor(basic_ostream_short_to_basic_ios(&this->base
));
8707 basic_filebuf_short_dtor(&this->filebuf
);
8710 /* ??_D?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
8711 /* ??_D?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
8712 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_vbase_dtor
, 4)
8713 void __thiscall
basic_ofstream_short_vbase_dtor(basic_ofstream_wchar
*this)
8715 TRACE("(%p)\n", this);
8717 basic_ofstream_short_dtor(basic_ofstream_short_to_basic_ios(this));
8718 basic_ios_short_dtor(basic_ostream_short_get_basic_ios(&this->base
));
8721 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_vector_dtor
, 8)
8722 basic_ofstream_wchar
* __thiscall
basic_ofstream_short_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
8724 basic_ofstream_wchar
*this = basic_ofstream_short_from_basic_ios(base
);
8726 TRACE("(%p %x)\n", this, flags
);
8729 /* we have an array, with the number of elements stored before the first object */
8730 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
8732 for(i
=*ptr
-1; i
>=0; i
--)
8733 basic_ofstream_short_vbase_dtor(this+i
);
8734 operator_delete(ptr
);
8736 basic_ofstream_short_vbase_dtor(this);
8738 operator_delete(this);
8744 /* ?close@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
8745 /* ?close@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
8746 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_close
, 4)
8747 void __thiscall
basic_ofstream_short_close(basic_ofstream_wchar
*this)
8749 TRACE("(%p)\n", this);
8751 if(!basic_filebuf_short_close(&this->filebuf
)) {
8752 basic_ios_wchar
*basic_ios
= basic_ostream_short_get_basic_ios(&this->base
);
8753 basic_ios_short_setstate(basic_ios
, IOSTATE_failbit
);
8757 /* ?is_open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
8758 /* ?is_open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
8759 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_is_open
, 4)
8760 bool __thiscall
basic_ofstream_short_is_open(const basic_ofstream_wchar
*this)
8762 TRACE("(%p)\n", this);
8763 return basic_filebuf_short_is_open(&this->filebuf
);
8766 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPBDH@Z */
8767 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDH@Z */
8768 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_open
, 12)
8769 void __thiscall
basic_ofstream_short_open(basic_ofstream_wchar
*this,
8770 const char *name
, int mode
)
8772 TRACE("(%p %s %d)\n", this, name
, mode
);
8774 if(!basic_filebuf_short_open_mode(&this->filebuf
, name
, mode
|OPENMODE_out
)) {
8775 basic_ios_wchar
*basic_ios
= basic_ostream_short_get_basic_ios(&this->base
);
8776 basic_ios_short_setstate(basic_ios
, IOSTATE_failbit
);
8780 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPBDF@Z */
8781 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDF@Z */
8782 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_open_old
, 12)
8783 void __thiscall
basic_ofstream_short_open_old(basic_ofstream_wchar
*this,
8784 const char *name
, int mode
)
8786 basic_ofstream_short_open(this, name
, mode
);
8789 /* ?rdbuf@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
8790 /* ?rdbuf@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
8791 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_rdbuf
, 4)
8792 basic_filebuf_wchar
* __thiscall
basic_ofstream_short_rdbuf(const basic_ofstream_wchar
*this)
8794 TRACE("(%p)\n", this);
8795 return (basic_filebuf_wchar
*)&this->filebuf
;
8798 static inline basic_ios_char
* basic_ifstream_char_to_basic_ios(basic_ifstream_char
*ptr
)
8800 return (basic_ios_char
*)((char*)ptr
+basic_ifstream_char_vbtable
[1]);
8803 static inline basic_ifstream_char
* basic_ifstream_char_from_basic_ios(basic_ios_char
*ptr
)
8805 return (basic_ifstream_char
*)((char*)ptr
-basic_ifstream_char_vbtable
[1]);
8808 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
8809 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
8810 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor
, 8)
8811 basic_ifstream_char
* __thiscall
basic_ifstream_char_ctor(basic_ifstream_char
*this, bool virt_init
)
8813 basic_ios_char
*basic_ios
;
8815 TRACE("(%p %d)\n", this, virt_init
);
8818 this->base
.vbtable
= basic_ifstream_char_vbtable
;
8819 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8820 basic_ios_char_ctor(basic_ios
);
8822 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8825 basic_filebuf_char_ctor(&this->filebuf
);
8826 basic_istream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
, FALSE
);
8827 basic_ios
->base
.vtable
= &basic_ifstream_char_vtable
;
8831 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@ABV01@@Z */
8832 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@AEBV01@@Z */
8833 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_copy_ctor
, 12)
8834 basic_ifstream_char
* __thiscall
basic_ifstream_char_copy_ctor(basic_ifstream_char
*this,
8835 const basic_ifstream_char
*copy
, bool virt_init
)
8837 basic_ios_char
*basic_ios
;
8839 TRACE("(%p %p %d)\n", this, copy
, virt_init
);
8842 this->base
.vbtable
= basic_ifstream_char_vbtable
;
8843 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8844 basic_ios_char_ctor(basic_ios
);
8846 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8849 basic_filebuf_char_ctor_file(&this->filebuf
, copy
->filebuf
.file
);
8850 basic_istream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
, FALSE
);
8851 basic_ios
->base
.vtable
= &basic_ifstream_char_vtable
;
8855 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PBDH@Z */
8856 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDH@Z */
8857 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_name
, 16)
8858 basic_ifstream_char
* __thiscall
basic_ifstream_char_ctor_name(basic_ifstream_char
*this,
8859 const char *name
, int mode
, bool virt_init
)
8861 TRACE("(%p %s %d %d)\n", this, name
, mode
, virt_init
);
8863 basic_ifstream_char_ctor(this, virt_init
);
8865 if(!basic_filebuf_char_open_mode(&this->filebuf
, name
, mode
|OPENMODE_in
)) {
8866 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8867 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8872 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
8873 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
8874 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_dtor
, 4)
8875 void __thiscall
basic_ifstream_char_dtor(basic_ios_char
*base
)
8877 basic_ifstream_char
*this = basic_ifstream_char_from_basic_ios(base
);
8879 TRACE("(%p)\n", this);
8881 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base
));
8882 basic_filebuf_char_dtor(&this->filebuf
);
8885 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
8886 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
8887 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_vbase_dtor
, 4)
8888 void __thiscall
basic_ifstream_char_vbase_dtor(basic_ifstream_char
*this)
8890 TRACE("(%p)\n", this);
8892 basic_ifstream_char_dtor(basic_ifstream_char_to_basic_ios(this));
8893 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base
));
8896 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_vector_dtor
, 8)
8897 basic_ifstream_char
* __thiscall
basic_ifstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
8899 basic_ifstream_char
*this = basic_ifstream_char_from_basic_ios(base
);
8901 TRACE("(%p %x)\n", this, flags
);
8904 /* we have an array, with the number of elements stored before the first object */
8905 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
8907 for(i
=*ptr
-1; i
>=0; i
--)
8908 basic_ifstream_char_vbase_dtor(this+i
);
8909 operator_delete(ptr
);
8911 basic_ifstream_char_vbase_dtor(this);
8913 operator_delete(this);
8919 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
8920 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
8921 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_close
, 4)
8922 void __thiscall
basic_ifstream_char_close(basic_ifstream_char
*this)
8924 TRACE("(%p)\n", this);
8926 if(!basic_filebuf_char_close(&this->filebuf
)) {
8927 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8928 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8932 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
8933 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
8934 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_is_open
, 4)
8935 bool __thiscall
basic_ifstream_char_is_open(const basic_ifstream_char
*this)
8937 TRACE("(%p)\n", this);
8938 return basic_filebuf_char_is_open(&this->filebuf
);
8941 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDH@Z */
8942 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDH@Z */
8943 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open
, 12)
8944 void __thiscall
basic_ifstream_char_open(basic_ifstream_char
*this,
8945 const char *name
, int mode
)
8947 TRACE("(%p %s %d)\n", this, name
, mode
);
8949 if(!basic_filebuf_char_open_mode(&this->filebuf
, name
, mode
|OPENMODE_in
)) {
8950 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8951 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8955 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDF@Z */
8956 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDF@Z */
8957 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_old
, 12)
8958 void __thiscall
basic_ifstream_char_open_old(basic_ifstream_char
*this,
8959 const char *name
, short mode
)
8961 basic_ifstream_char_open(this, name
, mode
);
8964 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
8965 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
8966 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_rdbuf
, 4)
8967 basic_filebuf_char
* __thiscall
basic_ifstream_char_rdbuf(const basic_ifstream_char
*this)
8969 TRACE("(%p)\n", this);
8970 return (basic_filebuf_char
*)&this->filebuf
;
8973 static inline basic_ios_wchar
* basic_ifstream_short_to_basic_ios(basic_ifstream_wchar
*ptr
)
8975 return (basic_ios_wchar
*)((char*)ptr
+basic_ifstream_short_vbtable
[1]);
8978 static inline basic_ifstream_wchar
* basic_ifstream_short_from_basic_ios(basic_ios_wchar
*ptr
)
8980 return (basic_ifstream_wchar
*)((char*)ptr
-basic_ifstream_short_vbtable
[1]);
8983 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
8984 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
8985 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_ctor
, 8)
8986 basic_ifstream_wchar
* __thiscall
basic_ifstream_short_ctor(basic_ifstream_wchar
*this, bool virt_init
)
8988 basic_ios_wchar
*basic_ios
;
8990 TRACE("(%p %d)\n", this, virt_init
);
8993 this->base
.vbtable
= basic_ifstream_short_vbtable
;
8994 basic_ios
= basic_istream_short_get_basic_ios(&this->base
);
8995 basic_ios_short_ctor(basic_ios
);
8997 basic_ios
= basic_istream_short_get_basic_ios(&this->base
);
9000 basic_filebuf_short_ctor(&this->filebuf
);
9001 basic_istream_short_ctor(&this->base
, &this->filebuf
.base
, FALSE
, FALSE
);
9002 basic_ios
->base
.vtable
= &basic_ifstream_short_vtable
;
9006 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@ABV01@@Z */
9007 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@AEBV01@@Z */
9008 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_copy_ctor
, 12)
9009 basic_ifstream_wchar
* __thiscall
basic_ifstream_short_copy_ctor(basic_ifstream_wchar
*this,
9010 basic_ifstream_wchar
*copy
, bool virt_init
)
9012 basic_ios_wchar
*basic_ios
;
9014 TRACE("(%p %p %d)\n", this, copy
, virt_init
);
9017 this->base
.vbtable
= basic_ifstream_short_vbtable
;
9018 basic_ios
= basic_istream_short_get_basic_ios(&this->base
);
9019 basic_ios_short_ctor(basic_ios
);
9021 basic_ios
= basic_istream_short_get_basic_ios(&this->base
);
9024 basic_filebuf_short_ctor_file(&this->filebuf
, copy
->filebuf
.file
);
9025 basic_istream_short_ctor(&this->base
, &this->filebuf
.base
, FALSE
, FALSE
);
9026 basic_ios
->base
.vtable
= &basic_ifstream_short_vtable
;
9030 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@PBDH@Z */
9031 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@PEBDH@Z */
9032 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_ctor_name
, 16)
9033 basic_ifstream_wchar
* __thiscall
basic_ifstream_short_ctor_name(basic_ifstream_wchar
*this,
9034 const char *name
, int mode
, bool virt_init
)
9036 TRACE("(%p %s %d %d)\n", this, name
, mode
, virt_init
);
9038 basic_ifstream_short_ctor(this, virt_init
);
9040 if(!basic_filebuf_short_open_mode(&this->filebuf
, name
, mode
|OPENMODE_in
)) {
9041 basic_ios_wchar
*basic_ios
= basic_istream_short_get_basic_ios(&this->base
);
9042 basic_ios_short_setstate(basic_ios
, IOSTATE_failbit
);
9047 /* ??1?$basic_ifstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
9048 /* ??1?$basic_ifstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
9049 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_dtor
, 4)
9050 void __thiscall
basic_ifstream_short_dtor(basic_ios_wchar
*base
)
9052 basic_ifstream_wchar
*this = basic_ifstream_short_from_basic_ios(base
);
9054 TRACE("(%p)\n", this);
9056 basic_istream_short_dtor(basic_istream_short_to_basic_ios(&this->base
));
9057 basic_filebuf_short_dtor(&this->filebuf
);
9060 /* ??_D?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9061 /* ??_D?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9062 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_vbase_dtor
, 4)
9063 void __thiscall
basic_ifstream_short_vbase_dtor(basic_ifstream_wchar
*this)
9065 TRACE("(%p)\n", this);
9067 basic_ifstream_short_dtor(basic_ifstream_short_to_basic_ios(this));
9068 basic_ios_short_dtor(basic_istream_short_get_basic_ios(&this->base
));
9071 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_vector_dtor
, 8)
9072 basic_ifstream_wchar
* __thiscall
basic_ifstream_short_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
9074 basic_ifstream_wchar
*this = basic_ifstream_short_from_basic_ios(base
);
9076 TRACE("(%p %x)\n", this, flags
);
9079 /* we have an array, with the number of elements stored before the first object */
9080 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
9082 for(i
=*ptr
-1; i
>=0; i
--)
9083 basic_ifstream_short_vbase_dtor(this+i
);
9084 operator_delete(ptr
);
9086 basic_ifstream_short_vbase_dtor(this);
9088 operator_delete(this);
9094 /* ?close@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9095 /* ?close@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9096 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_close
, 4)
9097 void __thiscall
basic_ifstream_short_close(basic_ifstream_wchar
*this)
9099 TRACE("(%p)\n", this);
9101 if(!basic_filebuf_short_close(&this->filebuf
)) {
9102 basic_ios_wchar
*basic_ios
= basic_istream_short_get_basic_ios(&this->base
);
9103 basic_ios_short_setstate(basic_ios
, IOSTATE_failbit
);
9107 /* ?is_open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
9108 /* ?is_open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
9109 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_is_open
, 4)
9110 bool __thiscall
basic_ifstream_short_is_open(const basic_ifstream_wchar
*this)
9112 TRACE("(%p)\n", this);
9113 return basic_filebuf_short_is_open(&this->filebuf
);
9116 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPBDH@Z */
9117 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDH@Z */
9118 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_open
, 12)
9119 void __thiscall
basic_ifstream_short_open(basic_ifstream_wchar
*this,
9120 const char *name
, int mode
)
9122 TRACE("(%p %s %d)\n", this, name
, mode
);
9124 if(!basic_filebuf_short_open_mode(&this->filebuf
, name
, mode
|OPENMODE_in
)) {
9125 basic_ios_wchar
*basic_ios
= basic_istream_short_get_basic_ios(&this->base
);
9126 basic_ios_short_setstate(basic_ios
, IOSTATE_failbit
);
9130 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPBDF@Z */
9131 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDF@Z */
9132 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_open_old
, 12)
9133 void __thiscall
basic_ifstream_short_open_old(basic_ifstream_wchar
*this,
9134 const char *name
, short mode
)
9136 basic_ifstream_short_open(this, name
, mode
);
9139 /* ?rdbuf@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
9140 /* ?rdbuf@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
9141 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_rdbuf
, 4)
9142 basic_filebuf_wchar
* __thiscall
basic_ifstream_short_rdbuf(const basic_ifstream_wchar
*this)
9144 TRACE("(%p)\n", this);
9145 return (basic_filebuf_wchar
*)&this->filebuf
;
9148 static inline basic_ios_char
* basic_fstream_char_to_basic_ios(basic_fstream_char
*ptr
)
9150 return (basic_ios_char
*)((char*)ptr
+basic_fstream_char_vbtable1
[1]);
9153 static inline basic_fstream_char
* basic_fstream_char_from_basic_ios(basic_ios_char
*ptr
)
9155 return (basic_fstream_char
*)((char*)ptr
-basic_fstream_char_vbtable1
[1]);
9158 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
9159 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
9160 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor
, 8)
9161 basic_fstream_char
* __thiscall
basic_fstream_char_ctor(basic_fstream_char
*this, bool virt_init
)
9163 basic_ios_char
*basic_ios
;
9165 TRACE("(%p %d)\n", this, virt_init
);
9168 this->base
.base1
.vbtable
= basic_fstream_char_vbtable1
;
9169 this->base
.base2
.vbtable
= basic_fstream_char_vbtable2
;
9170 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
9171 basic_ios_char_ctor(basic_ios
);
9173 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
9176 basic_filebuf_char_ctor(&this->filebuf
);
9177 basic_iostream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
);
9178 basic_ios
->base
.vtable
= &basic_fstream_char_vtable
;
9182 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@ABV01@@Z */
9183 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@AEBV01@@Z */
9184 DEFINE_THISCALL_WRAPPER(basic_fstream_char_copy_ctor
, 12)
9185 basic_fstream_char
* __thiscall
basic_fstream_char_copy_ctor(basic_fstream_char
*this,
9186 basic_fstream_char
*copy
, bool virt_init
)
9188 basic_ios_char
*basic_ios
;
9190 TRACE("(%p %p %d)\n", this, copy
, virt_init
);
9193 this->base
.base1
.vbtable
= basic_fstream_char_vbtable1
;
9194 this->base
.base2
.vbtable
= basic_fstream_char_vbtable2
;
9195 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
9196 basic_ios_char_ctor(basic_ios
);
9198 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
9201 basic_filebuf_char_ctor_file(&this->filebuf
, copy
->filebuf
.file
);
9202 basic_iostream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
);
9203 basic_ios
->base
.vtable
= &basic_fstream_char_vtable
;
9207 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PBDH@Z */
9208 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDH@Z */
9209 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_name
, 16)
9210 basic_fstream_char
* __thiscall
basic_fstream_char_ctor_name(basic_fstream_char
*this,
9211 const char *name
, int mode
, bool virt_init
)
9213 TRACE("(%p %s %d %d)\n", this, name
, mode
, virt_init
);
9215 basic_fstream_char_ctor(this, virt_init
);
9217 if(!basic_filebuf_char_open_mode(&this->filebuf
, name
, mode
)) {
9218 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
9219 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
9224 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
9225 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
9226 DEFINE_THISCALL_WRAPPER(basic_fstream_char_dtor
, 4)
9227 void __thiscall
basic_fstream_char_dtor(basic_ios_char
*base
)
9229 basic_fstream_char
*this = basic_fstream_char_from_basic_ios(base
);
9231 TRACE("(%p)\n", this);
9233 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base
));
9234 basic_filebuf_char_dtor(&this->filebuf
);
9237 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9238 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9239 DEFINE_THISCALL_WRAPPER(basic_fstream_char_vbase_dtor
, 4)
9240 void __thiscall
basic_fstream_char_vbase_dtor(basic_fstream_char
*this)
9242 TRACE("(%p)\n", this);
9244 basic_fstream_char_dtor(basic_fstream_char_to_basic_ios(this));
9245 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base
.base1
));
9248 DEFINE_THISCALL_WRAPPER(basic_fstream_char_vector_dtor
, 8)
9249 basic_fstream_char
* __thiscall
basic_fstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
9251 basic_fstream_char
*this = basic_fstream_char_from_basic_ios(base
);
9253 TRACE("(%p %x)\n", this, flags
);
9256 /* we have an array, with the number of elements stored before the first object */
9257 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
9259 for(i
=*ptr
-1; i
>=0; i
--)
9260 basic_fstream_char_vbase_dtor(this+i
);
9261 operator_delete(ptr
);
9263 basic_fstream_char_vbase_dtor(this);
9265 operator_delete(this);
9271 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9272 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9273 DEFINE_THISCALL_WRAPPER(basic_fstream_char_close
, 4)
9274 void __thiscall
basic_fstream_char_close(basic_fstream_char
*this)
9276 TRACE("(%p)\n", this);
9278 if(!basic_filebuf_char_close(&this->filebuf
)) {
9279 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
9280 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
9284 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
9285 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
9286 DEFINE_THISCALL_WRAPPER(basic_fstream_char_is_open
, 4)
9287 bool __thiscall
basic_fstream_char_is_open(const basic_fstream_char
*this)
9289 TRACE("(%p)\n", this);
9290 return basic_filebuf_char_is_open(&this->filebuf
);
9293 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDH@Z */
9294 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDH@Z */
9295 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open
, 12)
9296 void __thiscall
basic_fstream_char_open(basic_fstream_char
*this,
9297 const char *name
, int mode
)
9299 TRACE("(%p %s %d)\n", this, name
, mode
);
9301 if(!basic_filebuf_char_open_mode(&this->filebuf
, name
, mode
)) {
9302 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
9303 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
9307 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDF@Z */
9308 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDF@Z */
9309 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_old
, 12)
9310 void __thiscall
basic_fstream_char_open_old(basic_fstream_char
*this,
9311 const char *name
, int mode
)
9313 basic_fstream_char_open(this, name
, mode
);
9316 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
9317 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
9318 DEFINE_THISCALL_WRAPPER(basic_fstream_char_rdbuf
, 4)
9319 basic_filebuf_char
* __thiscall
basic_fstream_char_rdbuf(const basic_fstream_char
*this)
9321 TRACE("(%p)\n", this);
9322 return (basic_filebuf_char
*)&this->filebuf
;
9325 static inline basic_ios_wchar
* basic_fstream_short_to_basic_ios(basic_fstream_wchar
*ptr
)
9327 return (basic_ios_wchar
*)((char*)ptr
+basic_fstream_short_vbtable1
[1]);
9330 static inline basic_fstream_wchar
* basic_fstream_short_from_basic_ios(basic_ios_wchar
*ptr
)
9332 return (basic_fstream_wchar
*)((char*)ptr
-basic_fstream_short_vbtable1
[1]);
9335 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
9336 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
9337 DEFINE_THISCALL_WRAPPER(basic_fstream_short_ctor
, 8)
9338 basic_fstream_wchar
* __thiscall
basic_fstream_short_ctor(basic_fstream_wchar
*this, bool virt_init
)
9340 basic_ios_wchar
*basic_ios
;
9342 TRACE("(%p %d)\n", this, virt_init
);
9345 this->base
.base1
.vbtable
= basic_fstream_short_vbtable1
;
9346 this->base
.base2
.vbtable
= basic_fstream_short_vbtable2
;
9347 basic_ios
= basic_istream_short_get_basic_ios(&this->base
.base1
);
9348 basic_ios_short_ctor(basic_ios
);
9350 basic_ios
= basic_istream_short_get_basic_ios(&this->base
.base1
);
9353 basic_filebuf_short_ctor(&this->filebuf
);
9354 basic_iostream_short_ctor(&this->base
, &this->filebuf
.base
, FALSE
);
9355 basic_ios
->base
.vtable
= &basic_fstream_short_vtable
;
9359 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@ABV01@@Z */
9360 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@AEBV01@@Z */
9361 DEFINE_THISCALL_WRAPPER(basic_fstream_short_copy_ctor
, 12)
9362 basic_fstream_wchar
* __thiscall
basic_fstream_short_copy_ctor(basic_fstream_wchar
*this,
9363 basic_fstream_wchar
*copy
, bool virt_init
)
9365 basic_ios_wchar
*basic_ios
;
9367 TRACE("(%p %p %d)\n", this, copy
, virt_init
);
9370 this->base
.base1
.vbtable
= basic_fstream_short_vbtable1
;
9371 this->base
.base2
.vbtable
= basic_fstream_short_vbtable2
;
9372 basic_ios
= basic_istream_short_get_basic_ios(&this->base
.base1
);
9373 basic_ios_short_ctor(basic_ios
);
9375 basic_ios
= basic_istream_short_get_basic_ios(&this->base
.base1
);
9378 basic_filebuf_short_ctor_file(&this->filebuf
, copy
->filebuf
.file
);
9379 basic_iostream_short_ctor(&this->base
, &this->filebuf
.base
, FALSE
);
9380 basic_ios
->base
.vtable
= &basic_fstream_short_vtable
;
9384 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@PBGHH@Z */
9385 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@PEBGHH@Z */
9386 DEFINE_THISCALL_WRAPPER(basic_fstream_short_ctor_name
, 16)
9387 basic_fstream_wchar
* __thiscall
basic_fstream_short_ctor_name(basic_fstream_wchar
*this,
9388 const char *name
, int mode
, bool virt_init
)
9390 TRACE("(%p %s %d %d)\n", this, name
, mode
, virt_init
);
9392 basic_fstream_short_ctor(this, virt_init
);
9394 if(!basic_filebuf_short_open_mode(&this->filebuf
, name
, mode
)) {
9395 basic_ios_wchar
*basic_ios
= basic_istream_short_get_basic_ios(&this->base
.base1
);
9396 basic_ios_short_setstate(basic_ios
, IOSTATE_failbit
);
9401 /* ??1?$basic_fstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
9402 /* ??1?$basic_fstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
9403 DEFINE_THISCALL_WRAPPER(basic_fstream_short_dtor
, 4)
9404 void __thiscall
basic_fstream_short_dtor(basic_ios_wchar
*base
)
9406 basic_fstream_wchar
*this = basic_fstream_short_from_basic_ios(base
);
9408 TRACE("(%p)\n", this);
9410 basic_iostream_short_dtor(basic_iostream_short_to_basic_ios(&this->base
));
9411 basic_filebuf_short_dtor(&this->filebuf
);
9414 /* ??_D?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9415 /* ??_D?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9416 DEFINE_THISCALL_WRAPPER(basic_fstream_short_vbase_dtor
, 4)
9417 void __thiscall
basic_fstream_short_vbase_dtor(basic_fstream_wchar
*this)
9419 TRACE("(%p)\n", this);
9421 basic_fstream_short_dtor(basic_fstream_short_to_basic_ios(this));
9422 basic_ios_short_dtor(basic_istream_short_get_basic_ios(&this->base
.base1
));
9425 DEFINE_THISCALL_WRAPPER(basic_fstream_short_vector_dtor
, 8)
9426 basic_fstream_wchar
* __thiscall
basic_fstream_short_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
9428 basic_fstream_wchar
*this = basic_fstream_short_from_basic_ios(base
);
9430 TRACE("(%p %x)\n", this, flags
);
9433 /* we have an array, with the number of elements stored before the first object */
9434 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
9436 for(i
=*ptr
-1; i
>=0; i
--)
9437 basic_fstream_short_vbase_dtor(this+i
);
9438 operator_delete(ptr
);
9440 basic_fstream_short_vbase_dtor(this);
9442 operator_delete(this);
9448 /* ?close@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9449 /* ?close@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9450 DEFINE_THISCALL_WRAPPER(basic_fstream_short_close
, 4)
9451 void __thiscall
basic_fstream_short_close(basic_fstream_wchar
*this)
9453 TRACE("(%p)\n", this);
9455 if(!basic_filebuf_short_close(&this->filebuf
)) {
9456 basic_ios_wchar
*basic_ios
= basic_istream_short_get_basic_ios(&this->base
.base1
);
9457 basic_ios_short_setstate(basic_ios
, IOSTATE_failbit
);
9461 /* ?is_open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
9462 /* ?is_open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
9463 DEFINE_THISCALL_WRAPPER(basic_fstream_short_is_open
, 4)
9464 bool __thiscall
basic_fstream_short_is_open(const basic_fstream_wchar
*this)
9466 TRACE("(%p)\n", this);
9467 return basic_filebuf_short_is_open(&this->filebuf
);
9470 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXPBDH@Z */
9471 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDH@Z */
9472 DEFINE_THISCALL_WRAPPER(basic_fstream_short_open
, 12)
9473 void __thiscall
basic_fstream_short_open(basic_fstream_wchar
*this,
9474 const char *name
, int mode
)
9476 TRACE("(%p %s %d)\n", this, name
, mode
);
9478 if(!basic_filebuf_short_open_mode(&this->filebuf
, name
, mode
)) {
9479 basic_ios_wchar
*basic_ios
= basic_istream_short_get_basic_ios(&this->base
.base1
);
9480 basic_ios_short_setstate(basic_ios
, IOSTATE_failbit
);
9484 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDF@Z */
9485 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDF@Z */
9486 DEFINE_THISCALL_WRAPPER(basic_fstream_short_open_old
, 12)
9487 void __thiscall
basic_fstream_short_open_old(basic_fstream_wchar
*this,
9488 const char *name
, int mode
)
9490 basic_fstream_short_open(this, name
, mode
);
9493 /* ?rdbuf@?$basic_fstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
9494 /* ?rdbuf@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
9495 DEFINE_THISCALL_WRAPPER(basic_fstream_short_rdbuf
, 4)
9496 basic_filebuf_wchar
* __thiscall
basic_fstream_short_rdbuf(const basic_fstream_wchar
*this)
9498 TRACE("(%p)\n", this);
9499 return (basic_filebuf_wchar
*)&this->filebuf
;
9502 static inline basic_ios_char
* basic_ostringstream_char_to_basic_ios(basic_ostringstream_char
*ptr
)
9504 return (basic_ios_char
*)((char*)ptr
+basic_ostringstream_char_vbtable
[1]);
9507 static inline basic_ostringstream_char
* basic_ostringstream_char_from_basic_ios(basic_ios_char
*ptr
)
9509 return (basic_ostringstream_char
*)((char*)ptr
-basic_ostringstream_char_vbtable
[1]);
9512 /* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@H@Z */
9513 /* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@H@Z */
9514 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor_str
, 16)
9515 basic_ostringstream_char
* __thiscall
basic_ostringstream_char_ctor_str(basic_ostringstream_char
*this,
9516 const basic_string_char
*str
, int mode
, bool virt_init
)
9518 basic_ios_char
*basic_ios
;
9520 TRACE("(%p %p %d %d)\n", this, str
, mode
, virt_init
);
9523 this->base
.vbtable
= basic_ostringstream_char_vbtable
;
9524 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
9525 basic_ios_char_ctor(basic_ios
);
9527 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
9530 basic_stringbuf_char_ctor_str(&this->strbuf
, str
, mode
|OPENMODE_out
);
9531 basic_ostream_char_ctor(&this->base
, &this->strbuf
.base
, FALSE
, TRUE
, FALSE
);
9532 basic_ios
->base
.vtable
= &basic_ostringstream_char_vtable
;
9536 /* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
9537 /* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
9538 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor_mode
, 12)
9539 basic_ostringstream_char
* __thiscall
basic_ostringstream_char_ctor_mode(
9540 basic_ostringstream_char
*this, int mode
, bool virt_init
)
9542 basic_ios_char
*basic_ios
;
9544 TRACE("(%p %d %d)\n", this, mode
, virt_init
);
9547 this->base
.vbtable
= basic_ostringstream_char_vbtable
;
9548 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
9549 basic_ios_char_ctor(basic_ios
);
9551 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
9554 basic_stringbuf_char_ctor_mode(&this->strbuf
, mode
|OPENMODE_out
);
9555 basic_ostream_char_ctor(&this->base
, &this->strbuf
.base
, FALSE
, TRUE
, FALSE
);
9556 basic_ios
->base
.vtable
= &basic_ostringstream_char_vtable
;
9560 /* ??_F?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
9561 /* ??_F?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
9562 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor
, 4)
9563 basic_ostringstream_char
* __thiscall
basic_ostringstream_char_ctor(
9564 basic_ostringstream_char
*this)
9566 return basic_ostringstream_char_ctor_mode(this, 0, TRUE
);
9569 /* ??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
9570 /* ??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
9571 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_dtor
, 4)
9572 void __thiscall
basic_ostringstream_char_dtor(basic_ios_char
*base
)
9574 basic_ostringstream_char
*this = basic_ostringstream_char_from_basic_ios(base
);
9576 TRACE("(%p)\n", this);
9578 basic_stringbuf_char_dtor(&this->strbuf
);
9579 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base
));
9582 /* ??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
9583 /* ??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
9584 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_vbase_dtor
, 4)
9585 void __thiscall
basic_ostringstream_char_vbase_dtor(basic_ostringstream_char
*this)
9587 TRACE("(%p)\n", this);
9589 basic_ostringstream_char_dtor(basic_ostringstream_char_to_basic_ios(this));
9590 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base
));
9593 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_vector_dtor
, 8)
9594 basic_ostringstream_char
* __thiscall
basic_ostringstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
9596 basic_ostringstream_char
*this = basic_ostringstream_char_from_basic_ios(base
);
9598 TRACE("(%p %x)\n", this, flags
);
9601 /* we have an array, with the number of elements stored before the first object */
9602 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
9604 for(i
=*ptr
-1; i
>=0; i
--)
9605 basic_ostringstream_char_vbase_dtor(this+i
);
9606 operator_delete(ptr
);
9608 basic_ostringstream_char_vbase_dtor(this);
9610 operator_delete(this);
9616 /* ?rdbuf@?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPAV?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
9617 /* ?rdbuf@?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEAV?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
9618 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_rdbuf
, 4)
9619 basic_stringbuf_char
* __thiscall
basic_ostringstream_char_rdbuf(const basic_ostringstream_char
*this)
9621 TRACE("(%p)\n", this);
9622 return (basic_stringbuf_char
*)&this->strbuf
;
9625 /* ?str@?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
9626 /* ?str@?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
9627 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_str_set
, 8)
9628 void __thiscall
basic_ostringstream_char_str_set(basic_ostringstream_char
*this, const basic_string_char
*str
)
9630 TRACE("(%p %p)\n", this, str
);
9631 basic_stringbuf_char_str_set(&this->strbuf
, str
);
9634 /* ?str@?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
9635 /* ?str@?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
9636 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_str_get
, 8)
9637 basic_string_char
* __thiscall
basic_ostringstream_char_str_get(const basic_ostringstream_char
*this, basic_string_char
*ret
)
9639 TRACE("(%p %p)\n", this, ret
);
9640 return basic_stringbuf_char_str_get(&this->strbuf
, ret
);
9643 static inline basic_ios_wchar
* basic_ostringstream_short_to_basic_ios(basic_ostringstream_wchar
*ptr
)
9645 return (basic_ios_wchar
*)((char*)ptr
+basic_ostringstream_short_vbtable
[1]);
9648 static inline basic_ostringstream_wchar
* basic_ostringstream_short_from_basic_ios(basic_ios_wchar
*ptr
)
9650 return (basic_ostringstream_wchar
*)((char*)ptr
-basic_ostringstream_short_vbtable
[1]);
9653 /* ??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@1@H@Z */
9654 /* ??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@1@H@Z */
9655 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor_str
, 16)
9656 basic_ostringstream_wchar
* __thiscall
basic_ostringstream_short_ctor_str(basic_ostringstream_wchar
*this,
9657 const basic_string_wchar
*str
, int mode
, bool virt_init
)
9659 basic_ios_wchar
*basic_ios
;
9661 TRACE("(%p %p %d %d)\n", this, str
, mode
, virt_init
);
9664 this->base
.vbtable
= basic_ostringstream_short_vbtable
;
9665 basic_ios
= basic_ostream_short_get_basic_ios(&this->base
);
9666 basic_ios_short_ctor(basic_ios
);
9668 basic_ios
= basic_ostream_short_get_basic_ios(&this->base
);
9671 basic_stringbuf_short_ctor_str(&this->strbuf
, str
, mode
|OPENMODE_out
);
9672 basic_ostream_short_ctor(&this->base
, &this->strbuf
.base
, FALSE
, TRUE
, FALSE
);
9673 basic_ios
->base
.vtable
= &basic_ostringstream_short_vtable
;
9677 /* ??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
9678 /* ??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
9679 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor_mode
, 12)
9680 basic_ostringstream_wchar
* __thiscall
basic_ostringstream_short_ctor_mode(
9681 basic_ostringstream_wchar
*this, int mode
, bool virt_init
)
9683 basic_ios_wchar
*basic_ios
;
9685 TRACE("(%p %d %d)\n", this, mode
, virt_init
);
9688 this->base
.vbtable
= basic_ostringstream_short_vbtable
;
9689 basic_ios
= basic_ostream_short_get_basic_ios(&this->base
);
9690 basic_ios_short_ctor(basic_ios
);
9692 basic_ios
= basic_ostream_short_get_basic_ios(&this->base
);
9695 basic_stringbuf_short_ctor_mode(&this->strbuf
, mode
|OPENMODE_out
);
9696 basic_ostream_short_ctor(&this->base
, &this->strbuf
.base
, FALSE
, TRUE
, FALSE
);
9697 basic_ios
->base
.vtable
= &basic_ostringstream_short_vtable
;
9701 /* ??_F?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
9702 /* ??_F?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
9703 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor
, 4)
9704 basic_ostringstream_wchar
* __thiscall
basic_ostringstream_short_ctor(
9705 basic_ostringstream_wchar
*this)
9707 return basic_ostringstream_short_ctor_mode(this, 0, TRUE
);
9710 /* ??1?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
9711 /* ??1?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
9712 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_dtor
, 4)
9713 void __thiscall
basic_ostringstream_short_dtor(basic_ios_wchar
*base
)
9715 basic_ostringstream_wchar
*this = basic_ostringstream_short_from_basic_ios(base
);
9717 TRACE("(%p)\n", this);
9719 basic_stringbuf_short_dtor(&this->strbuf
);
9720 basic_ostream_short_dtor(basic_ostream_short_to_basic_ios(&this->base
));
9723 /* ??_D?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
9724 /* ??_D?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
9725 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_vbase_dtor
, 4)
9726 void __thiscall
basic_ostringstream_short_vbase_dtor(basic_ostringstream_wchar
*this)
9728 TRACE("(%p)\n", this);
9730 basic_ostringstream_short_dtor(basic_ostringstream_short_to_basic_ios(this));
9731 basic_ios_short_dtor(basic_ostream_short_get_basic_ios(&this->base
));
9734 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_vector_dtor
, 8)
9735 basic_ostringstream_wchar
* __thiscall
basic_ostringstream_short_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
9737 basic_ostringstream_wchar
*this = basic_ostringstream_short_from_basic_ios(base
);
9739 TRACE("(%p %x)\n", this, flags
);
9742 /* we have an array, with the number of elements stored before the first object */
9743 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
9745 for(i
=*ptr
-1; i
>=0; i
--)
9746 basic_ostringstream_short_vbase_dtor(this+i
);
9747 operator_delete(ptr
);
9749 basic_ostringstream_short_vbase_dtor(this);
9751 operator_delete(this);
9757 /* ?rdbuf@?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPAV?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
9758 /* ?rdbuf@?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEAV?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
9759 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_rdbuf
, 4)
9760 basic_stringbuf_wchar
* __thiscall
basic_ostringstream_short_rdbuf(const basic_ostringstream_wchar
*this)
9762 TRACE("(%p)\n", this);
9763 return (basic_stringbuf_wchar
*)&this->strbuf
;
9766 /* ?str@?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z */
9767 /* ?str@?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z */
9768 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_str_set
, 8)
9769 void __thiscall
basic_ostringstream_short_str_set(basic_ostringstream_wchar
*this, const basic_string_wchar
*str
)
9771 TRACE("(%p %p)\n", this, str
);
9772 basic_stringbuf_short_str_set(&this->strbuf
, str
);
9775 /* ?str@?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
9776 /* ?str@?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
9777 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_str_get
, 8)
9778 basic_string_wchar
* __thiscall
basic_ostringstream_short_str_get(const basic_ostringstream_wchar
*this, basic_string_wchar
*ret
)
9780 TRACE("(%p %p)\n", this, ret
);
9781 return basic_stringbuf_short_str_get(&this->strbuf
, ret
);
9784 static inline basic_ios_char
* basic_istringstream_char_to_basic_ios(basic_istringstream_char
*ptr
)
9786 return (basic_ios_char
*)((char*)ptr
+basic_istringstream_char_vbtable
[1]);
9789 static inline basic_istringstream_char
* basic_istringstream_char_from_basic_ios(basic_ios_char
*ptr
)
9791 return (basic_istringstream_char
*)((char*)ptr
-basic_istringstream_char_vbtable
[1]);
9794 /* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@H@Z */
9795 /* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@H@Z */
9796 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor_str
, 16)
9797 basic_istringstream_char
* __thiscall
basic_istringstream_char_ctor_str(basic_istringstream_char
*this,
9798 const basic_string_char
*str
, int mode
, bool virt_init
)
9800 basic_ios_char
*basic_ios
;
9802 TRACE("(%p %p %d %d)\n", this, str
, mode
, virt_init
);
9805 this->base
.vbtable
= basic_istringstream_char_vbtable
;
9806 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
9807 basic_ios_char_ctor(basic_ios
);
9809 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
9812 basic_stringbuf_char_ctor_str(&this->strbuf
, str
, mode
|OPENMODE_in
);
9813 basic_istream_char_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
9814 basic_ios
->base
.vtable
= &basic_istringstream_char_vtable
;
9818 /* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
9819 /* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
9820 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor_mode
, 12)
9821 basic_istringstream_char
* __thiscall
basic_istringstream_char_ctor_mode(
9822 basic_istringstream_char
*this, int mode
, bool virt_init
)
9824 basic_ios_char
*basic_ios
;
9826 TRACE("(%p %d %d)\n", this, mode
, virt_init
);
9829 this->base
.vbtable
= basic_istringstream_char_vbtable
;
9830 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
9831 basic_ios_char_ctor(basic_ios
);
9833 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
9836 basic_stringbuf_char_ctor_mode(&this->strbuf
, mode
|OPENMODE_in
);
9837 basic_istream_char_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
9838 basic_ios
->base
.vtable
= &basic_istringstream_char_vtable
;
9842 /* ??_F?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
9843 /* ??_F?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
9844 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor
, 4)
9845 basic_istringstream_char
* __thiscall
basic_istringstream_char_ctor(
9846 basic_istringstream_char
*this)
9848 return basic_istringstream_char_ctor_mode(this, 0, TRUE
);
9851 /* ??1?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
9852 /* ??1?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
9853 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_dtor
, 4)
9854 void __thiscall
basic_istringstream_char_dtor(basic_ios_char
*base
)
9856 basic_istringstream_char
*this = basic_istringstream_char_from_basic_ios(base
);
9858 TRACE("(%p)\n", this);
9860 basic_stringbuf_char_dtor(&this->strbuf
);
9861 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base
));
9864 /* ??_D?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
9865 /* ??_D?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
9866 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_vbase_dtor
, 4)
9867 void __thiscall
basic_istringstream_char_vbase_dtor(basic_istringstream_char
*this)
9869 TRACE("(%p)\n", this);
9871 basic_istringstream_char_dtor(basic_istringstream_char_to_basic_ios(this));
9872 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base
));
9875 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_vector_dtor
, 8)
9876 basic_istringstream_char
* __thiscall
basic_istringstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
9878 basic_istringstream_char
*this = basic_istringstream_char_from_basic_ios(base
);
9880 TRACE("(%p %x)\n", this, flags
);
9883 /* we have an array, with the number of elements stored before the first object */
9884 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
9886 for(i
=*ptr
-1; i
>=0; i
--)
9887 basic_istringstream_char_vbase_dtor(this+i
);
9888 operator_delete(ptr
);
9890 basic_istringstream_char_vbase_dtor(this);
9892 operator_delete(this);
9898 /* ?rdbuf@?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPAV?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
9899 /* ?rdbuf@?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEAV?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
9900 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_rdbuf
, 4)
9901 basic_stringbuf_char
* __thiscall
basic_istringstream_char_rdbuf(const basic_istringstream_char
*this)
9903 TRACE("(%p)\n", this);
9904 return (basic_stringbuf_char
*)&this->strbuf
;
9907 /* ?str@?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
9908 /* ?str@?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
9909 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_str_set
, 8)
9910 void __thiscall
basic_istringstream_char_str_set(basic_istringstream_char
*this, const basic_string_char
*str
)
9912 TRACE("(%p %p)\n", this, str
);
9913 basic_stringbuf_char_str_set(&this->strbuf
, str
);
9916 /* ?str@?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
9917 /* ?str@?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
9918 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_str_get
, 8)
9919 basic_string_char
* __thiscall
basic_istringstream_char_str_get(const basic_istringstream_char
*this, basic_string_char
*ret
)
9921 TRACE("(%p %p)\n", this, ret
);
9922 return basic_stringbuf_char_str_get(&this->strbuf
, ret
);
9925 static inline basic_ios_wchar
* basic_istringstream_short_to_basic_ios(basic_istringstream_wchar
*ptr
)
9927 return (basic_ios_wchar
*)((char*)ptr
+basic_istringstream_short_vbtable
[1]);
9930 static inline basic_istringstream_wchar
* basic_istringstream_short_from_basic_ios(basic_ios_wchar
*ptr
)
9932 return (basic_istringstream_wchar
*)((char*)ptr
-basic_istringstream_short_vbtable
[1]);
9935 /* ??0?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@1@H@Z */
9936 /* ??0?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@1@H@Z */
9937 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor_str
, 16)
9938 basic_istringstream_wchar
* __thiscall
basic_istringstream_short_ctor_str(basic_istringstream_wchar
*this,
9939 const basic_string_wchar
*str
, int mode
, bool virt_init
)
9941 basic_ios_wchar
*basic_ios
;
9943 TRACE("(%p %p %d %d)\n", this, str
, mode
, virt_init
);
9946 this->base
.vbtable
= basic_istringstream_short_vbtable
;
9947 basic_ios
= basic_istream_short_get_basic_ios(&this->base
);
9948 basic_ios_short_ctor(basic_ios
);
9950 basic_ios
= basic_istream_short_get_basic_ios(&this->base
);
9953 basic_stringbuf_short_ctor_str(&this->strbuf
, str
, mode
|OPENMODE_in
);
9954 basic_istream_short_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
9955 basic_ios
->base
.vtable
= &basic_istringstream_short_vtable
;
9959 /* ??0?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
9960 /* ??0?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
9961 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor_mode
, 12)
9962 basic_istringstream_wchar
* __thiscall
basic_istringstream_short_ctor_mode(
9963 basic_istringstream_wchar
*this, int mode
, bool virt_init
)
9965 basic_ios_wchar
*basic_ios
;
9967 TRACE("(%p %d %d)\n", this, mode
, virt_init
);
9970 this->base
.vbtable
= basic_istringstream_short_vbtable
;
9971 basic_ios
= basic_istream_short_get_basic_ios(&this->base
);
9972 basic_ios_short_ctor(basic_ios
);
9974 basic_ios
= basic_istream_short_get_basic_ios(&this->base
);
9977 basic_stringbuf_short_ctor_mode(&this->strbuf
, mode
|OPENMODE_in
);
9978 basic_istream_short_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
9979 basic_ios
->base
.vtable
= &basic_istringstream_short_vtable
;
9983 /* ??_F?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
9984 /* ??_F?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
9985 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor
, 4)
9986 basic_istringstream_wchar
* __thiscall
basic_istringstream_short_ctor(
9987 basic_istringstream_wchar
*this)
9989 return basic_istringstream_short_ctor_mode(this, 0, TRUE
);
9992 /* ??1?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
9993 /* ??1?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
9994 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_dtor
, 4)
9995 void __thiscall
basic_istringstream_short_dtor(basic_ios_wchar
*base
)
9997 basic_istringstream_wchar
*this = basic_istringstream_short_from_basic_ios(base
);
9999 TRACE("(%p)\n", this);
10001 basic_stringbuf_short_dtor(&this->strbuf
);
10002 basic_istream_short_dtor(basic_istream_short_to_basic_ios(&this->base
));
10005 /* ??_D?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
10006 /* ??_D?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
10007 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_vbase_dtor
, 4)
10008 void __thiscall
basic_istringstream_short_vbase_dtor(basic_istringstream_wchar
*this)
10010 TRACE("(%p)\n", this);
10012 basic_istringstream_short_dtor(basic_istringstream_short_to_basic_ios(this));
10013 basic_ios_short_dtor(basic_istream_short_get_basic_ios(&this->base
));
10016 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_vector_dtor
, 8)
10017 basic_istringstream_wchar
* __thiscall
basic_istringstream_short_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
10019 basic_istringstream_wchar
*this = basic_istringstream_short_from_basic_ios(base
);
10021 TRACE("(%p %x)\n", this, flags
);
10024 /* we have an array, with the number of elements stored before the first object */
10025 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
10027 for(i
=*ptr
-1; i
>=0; i
--)
10028 basic_istringstream_short_vbase_dtor(this+i
);
10029 operator_delete(ptr
);
10031 basic_istringstream_short_vbase_dtor(this);
10033 operator_delete(this);
10039 /* ?rdbuf@?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPAV?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
10040 /* ?rdbuf@?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEAV?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
10041 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_rdbuf
, 4)
10042 basic_stringbuf_wchar
* __thiscall
basic_istringstream_short_rdbuf(const basic_istringstream_wchar
*this)
10044 TRACE("(%p)\n", this);
10045 return (basic_stringbuf_wchar
*)&this->strbuf
;
10048 /* ?str@?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z */
10049 /* ?str@?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z */
10050 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_str_set
, 8)
10051 void __thiscall
basic_istringstream_short_str_set(basic_istringstream_wchar
*this, const basic_string_wchar
*str
)
10053 TRACE("(%p %p)\n", this, str
);
10054 basic_stringbuf_short_str_set(&this->strbuf
, str
);
10057 /* ?str@?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
10058 /* ?str@?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
10059 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_str_get
, 8)
10060 basic_string_wchar
* __thiscall
basic_istringstream_short_str_get(const basic_istringstream_wchar
*this, basic_string_wchar
*ret
)
10062 TRACE("(%p %p)\n", this, ret
);
10063 return basic_stringbuf_short_str_get(&this->strbuf
, ret
);
10066 static inline basic_ios_char
* basic_stringstream_char_to_basic_ios(basic_stringstream_char
*ptr
)
10068 return (basic_ios_char
*)((char*)ptr
+basic_stringstream_char_vbtable1
[1]);
10071 static inline basic_stringstream_char
* basic_stringstream_char_from_basic_ios(basic_ios_char
*ptr
)
10073 return (basic_stringstream_char
*)((char*)ptr
-basic_stringstream_char_vbtable1
[1]);
10076 /* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@H@Z */
10077 /* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@H@Z */
10078 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor_str
, 16)
10079 basic_stringstream_char
* __thiscall
basic_stringstream_char_ctor_str(basic_stringstream_char
*this,
10080 const basic_string_char
*str
, int mode
, bool virt_init
)
10082 basic_ios_char
*basic_ios
;
10084 TRACE("(%p %p %d %d)\n", this, str
, mode
, virt_init
);
10087 this->base
.base1
.vbtable
= basic_stringstream_char_vbtable1
;
10088 this->base
.base2
.vbtable
= basic_stringstream_char_vbtable2
;
10089 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
10090 basic_ios_char_ctor(basic_ios
);
10092 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
10095 basic_stringbuf_char_ctor_str(&this->strbuf
, str
, mode
);
10096 basic_iostream_char_ctor(&this->base
, &this->strbuf
.base
, FALSE
);
10097 basic_ios
->base
.vtable
= &basic_stringstream_char_vtable
;
10101 /* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
10102 /* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
10103 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor_mode
, 12)
10104 basic_stringstream_char
* __thiscall
basic_stringstream_char_ctor_mode(
10105 basic_stringstream_char
*this, int mode
, bool virt_init
)
10107 basic_ios_char
*basic_ios
;
10109 TRACE("(%p %d %d)\n", this, mode
, virt_init
);
10112 this->base
.base1
.vbtable
= basic_stringstream_char_vbtable1
;
10113 this->base
.base2
.vbtable
= basic_stringstream_char_vbtable2
;
10114 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
10115 basic_ios_char_ctor(basic_ios
);
10117 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
10120 basic_stringbuf_char_ctor_mode(&this->strbuf
, mode
);
10121 basic_iostream_char_ctor(&this->base
, &this->strbuf
.base
, FALSE
);
10122 basic_ios
->base
.vtable
= &basic_stringstream_char_vtable
;
10126 /* ??_F?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
10127 /* ??_F?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
10128 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor
, 4)
10129 basic_stringstream_char
* __thiscall
basic_stringstream_char_ctor(
10130 basic_stringstream_char
*this)
10132 return basic_stringstream_char_ctor_mode(
10133 this, OPENMODE_out
|OPENMODE_in
, TRUE
);
10136 /* ??1?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
10137 /* ??1?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
10138 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_dtor
, 4)
10139 void __thiscall
basic_stringstream_char_dtor(basic_ios_char
*base
)
10141 basic_stringstream_char
*this = basic_stringstream_char_from_basic_ios(base
);
10143 TRACE("(%p)\n", this);
10145 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base
));
10146 basic_stringbuf_char_dtor(&this->strbuf
);
10149 /* ??_D?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
10150 /* ??_D?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
10151 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_vbase_dtor
, 4)
10152 void __thiscall
basic_stringstream_char_vbase_dtor(basic_stringstream_char
*this)
10154 TRACE("(%p)\n", this);
10156 basic_stringstream_char_dtor(basic_stringstream_char_to_basic_ios(this));
10157 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base
.base1
));
10160 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_vector_dtor
, 8)
10161 basic_stringstream_char
* __thiscall
basic_stringstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
10163 basic_stringstream_char
*this = basic_stringstream_char_from_basic_ios(base
);
10165 TRACE("(%p %x)\n", this, flags
);
10168 /* we have an array, with the number of elements stored before the first object */
10169 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
10171 for(i
=*ptr
-1; i
>=0; i
--)
10172 basic_stringstream_char_vbase_dtor(this+i
);
10173 operator_delete(ptr
);
10175 basic_stringstream_char_vbase_dtor(this);
10177 operator_delete(this);
10183 /* ?rdbuf@?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPAV?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10184 /* ?rdbuf@?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEAV?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10185 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_rdbuf
, 4)
10186 basic_stringbuf_char
* __thiscall
basic_stringstream_char_rdbuf(const basic_stringstream_char
*this)
10188 TRACE("(%p)\n", this);
10189 return (basic_stringbuf_char
*)&this->strbuf
;
10192 /* ?str@?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
10193 /* ?str@?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
10194 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_str_set
, 8)
10195 void __thiscall
basic_stringstream_char_str_set(basic_stringstream_char
*this, const basic_string_char
*str
)
10197 TRACE("(%p %p)\n", this, str
);
10198 basic_stringbuf_char_str_set(&this->strbuf
, str
);
10201 /* ?str@?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10202 /* ?str@?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10203 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_str_get
, 8)
10204 basic_string_char
* __thiscall
basic_stringstream_char_str_get(const basic_stringstream_char
*this, basic_string_char
*ret
)
10206 TRACE("(%p %p)\n", this, ret
);
10207 return basic_stringbuf_char_str_get(&this->strbuf
, ret
);
10210 static inline basic_ios_wchar
* basic_stringstream_short_to_basic_ios(basic_stringstream_wchar
*ptr
)
10212 return (basic_ios_wchar
*)((char*)ptr
+basic_stringstream_short_vbtable1
[1]);
10215 static inline basic_stringstream_wchar
* basic_stringstream_short_from_basic_ios(basic_ios_wchar
*ptr
)
10217 return (basic_stringstream_wchar
*)((char*)ptr
-basic_stringstream_short_vbtable1
[1]);
10220 /* ??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@1@H@Z */
10221 /* ??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@1@H@Z */
10222 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor_str
, 16)
10223 basic_stringstream_wchar
* __thiscall
basic_stringstream_short_ctor_str(basic_stringstream_wchar
*this,
10224 const basic_string_wchar
*str
, int mode
, bool virt_init
)
10226 basic_ios_wchar
*basic_ios
;
10228 TRACE("(%p %p %d %d)\n", this, str
, mode
, virt_init
);
10231 this->base
.base1
.vbtable
= basic_stringstream_short_vbtable1
;
10232 this->base
.base2
.vbtable
= basic_stringstream_short_vbtable2
;
10233 basic_ios
= basic_istream_short_get_basic_ios(&this->base
.base1
);
10234 basic_ios_short_ctor(basic_ios
);
10236 basic_ios
= basic_istream_short_get_basic_ios(&this->base
.base1
);
10239 basic_stringbuf_short_ctor_str(&this->strbuf
, str
, mode
);
10240 basic_iostream_short_ctor(&this->base
, &this->strbuf
.base
, FALSE
);
10241 basic_ios
->base
.vtable
= &basic_stringstream_short_vtable
;
10245 /* ??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
10246 /* ??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
10247 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor_mode
, 12)
10248 basic_stringstream_wchar
* __thiscall
basic_stringstream_short_ctor_mode(
10249 basic_stringstream_wchar
*this, int mode
, bool virt_init
)
10251 basic_ios_wchar
*basic_ios
;
10253 TRACE("(%p %d %d)\n", this, mode
, virt_init
);
10256 this->base
.base1
.vbtable
= basic_stringstream_short_vbtable1
;
10257 this->base
.base2
.vbtable
= basic_stringstream_short_vbtable2
;
10258 basic_ios
= basic_istream_short_get_basic_ios(&this->base
.base1
);
10259 basic_ios_short_ctor(basic_ios
);
10261 basic_ios
= basic_istream_short_get_basic_ios(&this->base
.base1
);
10264 basic_stringbuf_short_ctor_mode(&this->strbuf
, mode
);
10265 basic_iostream_short_ctor(&this->base
, &this->strbuf
.base
, FALSE
);
10266 basic_ios
->base
.vtable
= &basic_stringstream_short_vtable
;
10270 /* ??_F?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
10271 /* ??_F?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
10272 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor
, 4)
10273 basic_stringstream_wchar
* __thiscall
basic_stringstream_short_ctor(
10274 basic_stringstream_wchar
*this)
10276 return basic_stringstream_short_ctor_mode(
10277 this, OPENMODE_out
|OPENMODE_in
, TRUE
);
10280 /* ??1?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
10281 /* ??1?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
10282 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_dtor
, 4)
10283 void __thiscall
basic_stringstream_short_dtor(basic_ios_wchar
*base
)
10285 basic_stringstream_wchar
*this = basic_stringstream_short_from_basic_ios(base
);
10287 TRACE("(%p)\n", this);
10289 basic_iostream_short_dtor(basic_iostream_short_to_basic_ios(&this->base
));
10290 basic_stringbuf_short_dtor(&this->strbuf
);
10293 /* ??_D?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
10294 /* ??_D?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
10295 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_vbase_dtor
, 4)
10296 void __thiscall
basic_stringstream_short_vbase_dtor(basic_stringstream_wchar
*this)
10298 TRACE("(%p)\n", this);
10300 basic_stringstream_short_dtor(basic_stringstream_short_to_basic_ios(this));
10301 basic_ios_short_dtor(basic_istream_short_get_basic_ios(&this->base
.base1
));
10304 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_vector_dtor
, 8)
10305 basic_stringstream_wchar
* __thiscall
basic_stringstream_short_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
10307 basic_stringstream_wchar
*this = basic_stringstream_short_from_basic_ios(base
);
10309 TRACE("(%p %x)\n", this, flags
);
10312 /* we have an array, with the number of elements stored before the first object */
10313 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
10315 for(i
=*ptr
-1; i
>=0; i
--)
10316 basic_stringstream_short_vbase_dtor(this+i
);
10317 operator_delete(ptr
);
10319 basic_stringstream_short_vbase_dtor(this);
10321 operator_delete(this);
10327 /* ?rdbuf@?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPAV?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
10328 /* ?rdbuf@?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEAV?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
10329 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_rdbuf
, 4)
10330 basic_stringbuf_wchar
* __thiscall
basic_stringstream_short_rdbuf(const basic_stringstream_wchar
*this)
10332 TRACE("(%p)\n", this);
10333 return (basic_stringbuf_wchar
*)&this->strbuf
;
10336 /* ?str@?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z */
10337 /* ?str@?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z */
10338 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_str_set
, 8)
10339 void __thiscall
basic_stringstream_short_str_set(basic_stringstream_wchar
*this, const basic_string_wchar
*str
)
10341 TRACE("(%p %p)\n", this, str
);
10342 basic_stringbuf_short_str_set(&this->strbuf
, str
);
10345 /* ?str@?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
10346 /* ?str@?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
10347 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_str_get
, 8)
10348 basic_string_wchar
* __thiscall
basic_stringstream_short_str_get(const basic_stringstream_wchar
*this, basic_string_wchar
*ret
)
10350 TRACE("(%p %p)\n", this, ret
);
10351 return basic_stringbuf_short_str_get(&this->strbuf
, ret
);
10354 /* ?_Init@strstreambuf@std@@IAEXHPAD0H@Z */
10355 /* ?_Init@strstreambuf@std@@IEAAX_JPEAD1H@Z */
10356 DEFINE_THISCALL_WRAPPER(strstreambuf__Init
, 20)
10357 void __thiscall
strstreambuf__Init(strstreambuf
*this, streamsize len
, char *g
, char *p
, int mode
)
10359 TRACE("(%p %Id %p %p %d)\n", this, len
, g
, p
, mode
);
10361 this->minsize
= 32;
10362 this->endsave
= NULL
;
10363 this->strmode
= mode
;
10364 this->palloc
= NULL
;
10365 this->pfree
= NULL
;
10368 this->strmode
|= STRSTATE_Dynamic
;
10369 if(len
> this->minsize
)
10370 this->minsize
= len
;
10371 this->seekhigh
= NULL
;
10380 this->seekhigh
= g
+len
;
10381 basic_streambuf_char_setg(&this->base
, g
, g
, p
? p
: this->seekhigh
);
10383 basic_streambuf_char_setp(&this->base
, p
, this->seekhigh
);
10386 static strstreambuf
* strstreambuf_ctor_get_put(strstreambuf
*this, char *g
, streamsize len
, char *p
)
10388 TRACE("(%p %p %Id %p)\n", this, g
, len
, p
);
10390 basic_streambuf_char_ctor(&this->base
);
10391 this->base
.vtable
= &strstreambuf_vtable
;
10393 strstreambuf__Init(this, len
, g
, p
, 0);
10397 /* ?_Tidy@strstreambuf@std@@IAEXXZ */
10398 /* ?_Tidy@strstreambuf@std@@IEAAXXZ */
10399 DEFINE_THISCALL_WRAPPER(strstreambuf__Tidy
, 4)
10400 void __thiscall
strstreambuf__Tidy(strstreambuf
*this)
10402 TRACE("(%p)\n", this);
10404 if((this->strmode
& STRSTATE_Allocated
) && !(this->strmode
& STRSTATE_Frozen
)) {
10406 this->pfree(basic_streambuf_char_eback(&this->base
));
10408 operator_delete(basic_streambuf_char_eback(&this->base
));
10411 this->endsave
= NULL
;
10412 this->seekhigh
= NULL
;
10413 this->strmode
&= ~(STRSTATE_Allocated
| STRSTATE_Frozen
);
10414 basic_streambuf_char_setg(&this->base
, NULL
, NULL
, NULL
);
10415 basic_streambuf_char_setp(&this->base
, NULL
, NULL
);
10418 /* ??1strstreambuf@std@@UAE@XZ */
10419 /* ??1strstreambuf@std@@UEAA@XZ */
10420 DEFINE_THISCALL_WRAPPER(strstreambuf_dtor
, 4)
10421 void __thiscall
strstreambuf_dtor(strstreambuf
*this)
10423 TRACE("(%p)\n", this);
10425 strstreambuf__Tidy(this);
10426 basic_streambuf_char_dtor(&this->base
);
10429 DEFINE_THISCALL_WRAPPER(strstreambuf_vector_dtor
, 8)
10430 strstreambuf
* __thiscall
strstreambuf_vector_dtor(strstreambuf
*this, unsigned int flags
)
10432 TRACE("(%p %x)\n", this, flags
);
10434 /* we have an array, with the number of elements stored before the first object */
10435 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
10437 for(i
=*ptr
-1; i
>=0; i
--)
10438 strstreambuf_dtor(this+i
);
10439 operator_delete(ptr
);
10441 strstreambuf_dtor(this);
10443 operator_delete(this);
10449 /* ?freeze@strstreambuf@std@@QAEX_N@Z */
10450 /* ?freeze@strstreambuf@std@@QEAAX_N@Z */
10451 DEFINE_THISCALL_WRAPPER(strstreambuf_freeze
, 8)
10452 void __thiscall
strstreambuf_freeze(strstreambuf
*this, bool freeze
)
10454 TRACE("(%p %d)\n", this, freeze
);
10456 if(!freeze
== !(this->strmode
& STRSTATE_Frozen
))
10460 this->strmode
|= STRSTATE_Frozen
;
10461 this->endsave
= basic_streambuf_char_epptr(&this->base
);
10462 basic_streambuf_char_setp_next(&this->base
, basic_streambuf_char_pbase(&this->base
),
10463 basic_streambuf_char_pptr(&this->base
), basic_streambuf_char_eback(&this->base
));
10465 this->strmode
&= ~STRSTATE_Frozen
;
10466 basic_streambuf_char_setp_next(&this->base
, basic_streambuf_char_pbase(&this->base
),
10467 basic_streambuf_char_pptr(&this->base
), this->endsave
);
10471 /* ?overflow@strstreambuf@std@@MAEHH@Z */
10472 /* ?overflow@strstreambuf@std@@MEAAHH@Z */
10473 DEFINE_THISCALL_WRAPPER(strstreambuf_overflow
, 8)
10474 int __thiscall
strstreambuf_overflow(strstreambuf
*this, int c
)
10476 size_t old_size
, size
;
10479 TRACE("(%p %d)\n", this, c
);
10484 if(this->strmode
& STRSTATE_Frozen
)
10487 ptr
= basic_streambuf_char_pptr(&this->base
);
10488 if(ptr
&& ptr
<basic_streambuf_char_epptr(&this->base
))
10489 return (unsigned char)(*basic_streambuf_char__Pninc(&this->base
) = c
);
10491 if(!(this->strmode
& STRSTATE_Dynamic
) || (this->strmode
& STRSTATE_Constant
))
10494 ptr
= basic_streambuf_char_eback(&this->base
);
10495 old_size
= ptr
? basic_streambuf_char_epptr(&this->base
) - ptr
: 0;
10497 size
= old_size
+ old_size
/2;
10498 if(size
< this->minsize
)
10499 size
= this->minsize
;
10502 buf
= this->palloc(size
);
10504 buf
= operator_new(size
);
10508 memcpy(buf
, ptr
, old_size
);
10509 if(this->strmode
& STRSTATE_Allocated
) {
10513 operator_delete(ptr
);
10516 this->strmode
|= STRSTATE_Allocated
;
10518 this->seekhigh
= buf
;
10519 basic_streambuf_char_setp(&this->base
, buf
, buf
+size
);
10520 basic_streambuf_char_setg(&this->base
, buf
, buf
, buf
);
10522 this->seekhigh
= this->seekhigh
-ptr
+buf
;
10523 basic_streambuf_char_setp_next(&this->base
, basic_streambuf_char_pbase(&this->base
)-ptr
+buf
,
10524 basic_streambuf_char_pptr(&this->base
)-ptr
+buf
, buf
+size
);
10525 basic_streambuf_char_setg(&this->base
, buf
, basic_streambuf_char_gptr(&this->base
)-ptr
+buf
,
10526 basic_streambuf_char_pptr(&this->base
));
10529 return (unsigned char)(*basic_streambuf_char__Pninc(&this->base
) = c
);
10532 /* ?pbackfail@strstreambuf@std@@MAEHH@Z */
10533 /* ?pbackfail@strstreambuf@std@@MEAAHH@Z */
10534 DEFINE_THISCALL_WRAPPER(strstreambuf_pbackfail
, 8)
10535 int __thiscall
strstreambuf_pbackfail(strstreambuf
*this, int c
)
10537 char *ptr
= basic_streambuf_char_gptr(&this->base
);
10539 TRACE("(%p %d)\n", this, c
);
10541 if(ptr
<=basic_streambuf_char_eback(&this->base
)
10542 || ((this->strmode
& STRSTATE_Constant
) && c
!=ptr
[-1]))
10545 basic_streambuf_char_gbump(&this->base
, -1);
10548 if(this->strmode
& STRSTATE_Constant
)
10549 return (unsigned char)c
;
10551 return (unsigned char)(ptr
[0] = c
);
10554 /* ?seekoff@strstreambuf@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
10555 /* ?seekoff@strstreambuf@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
10556 /* ?seekoff@strstreambuf@std@@MAE?AV?$fpos@H@2@JHH@Z */
10557 /* ?seekoff@strstreambuf@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
10558 DEFINE_THISCALL_WRAPPER(strstreambuf_seekoff
, 20)
10559 fpos_int
* __thiscall
strstreambuf_seekoff(strstreambuf
*this, fpos_int
*ret
, streamoff off
, int way
, int mode
)
10561 char *eback
= basic_streambuf_char_eback(&this->base
);
10562 char *pptr
= basic_streambuf_char_pptr(&this->base
);
10563 char *gptr
= basic_streambuf_char_gptr(&this->base
);
10565 TRACE("(%p %p %Id %d %d)\n", this, ret
, off
, way
, mode
);
10570 if(pptr
> this->seekhigh
)
10571 this->seekhigh
= pptr
;
10573 if((mode
& OPENMODE_in
) && gptr
) {
10574 if(way
==SEEKDIR_cur
&& !(mode
& OPENMODE_out
))
10576 else if(way
== SEEKDIR_end
)
10577 off
+= this->seekhigh
-eback
;
10578 else if(way
!= SEEKDIR_beg
)
10581 if(off
<0 || off
>this->seekhigh
-eback
) {
10584 basic_streambuf_char_gbump(&this->base
, eback
-gptr
+off
);
10585 if((mode
& OPENMODE_out
) && pptr
) {
10586 basic_streambuf_char_setp_next(&this->base
, eback
,
10587 gptr
, basic_streambuf_char_epptr(&this->base
));
10590 }else if((mode
& OPENMODE_out
) && pptr
) {
10591 if(way
== SEEKDIR_cur
)
10593 else if(way
== SEEKDIR_end
)
10594 off
+= this->seekhigh
-eback
;
10595 else if(way
!= SEEKDIR_beg
)
10598 if(off
<0 || off
>this->seekhigh
-eback
)
10601 basic_streambuf_char_pbump(&this->base
, eback
-pptr
+off
);
10610 /* ?seekpos@strstreambuf@std@@MAE?AV?$fpos@H@2@V32@H@Z */
10611 /* ?seekpos@strstreambuf@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
10612 DEFINE_THISCALL_WRAPPER(strstreambuf_seekpos
, 36)
10613 fpos_int
* __thiscall
strstreambuf_seekpos(strstreambuf
*this, fpos_int
*ret
, fpos_int pos
, int mode
)
10615 TRACE("(%p %p %s %d)\n", this, ret
, debugstr_fpos_int(&pos
), mode
);
10617 if(pos
.off
==-1 && pos
.pos
==0 && pos
.state
==0) {
10622 return strstreambuf_seekoff(this, ret
, pos
.pos
+pos
.off
, SEEKDIR_beg
, mode
);
10625 /* ?underflow@strstreambuf@std@@MAEHXZ */
10626 /* ?underflow@strstreambuf@std@@MEAAHXZ */
10627 DEFINE_THISCALL_WRAPPER(strstreambuf_underflow
, 4)
10628 int __thiscall
strstreambuf_underflow(strstreambuf
*this)
10630 char *gptr
= basic_streambuf_char_gptr(&this->base
);
10633 TRACE("(%p)\n", this);
10638 if(gptr
< basic_streambuf_char_egptr(&this->base
))
10639 return (unsigned char)(*gptr
);
10641 pptr
= basic_streambuf_char_gptr(&this->base
);
10642 if(pptr
> this->seekhigh
)
10643 this->seekhigh
= pptr
;
10645 if(this->seekhigh
<= gptr
)
10648 basic_streambuf_char_setg(&this->base
, basic_streambuf_char_eback(&this->base
),
10649 gptr
, this->seekhigh
);
10650 return (unsigned char)(*gptr
);
10653 static inline basic_ios_char
* ostrstream_to_basic_ios(ostrstream
*ptr
)
10655 return (basic_ios_char
*)((char*)ptr
+ostrstream_vbtable
[1]);
10658 static inline ostrstream
* ostrstream_from_basic_ios(basic_ios_char
*ptr
)
10660 return (ostrstream
*)((char*)ptr
-ostrstream_vbtable
[1]);
10663 /* ??0ostrstream@std@@QAE@PADHH@Z */
10664 DEFINE_THISCALL_WRAPPER(ostrstream_ctor
, 20)
10665 ostrstream
* __thiscall
ostrstream_ctor(ostrstream
*this, char *buf
, streamsize size
, int mode
, bool virt_init
)
10667 basic_ios_char
*basic_ios
;
10669 TRACE("(%p %p %Id %d %d)\n", this, buf
, size
, mode
, virt_init
);
10672 this->base
.vbtable
= ostrstream_vbtable
;
10673 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
10674 basic_ios_char_ctor(basic_ios
);
10676 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
10679 strstreambuf_ctor_get_put(&this->buf
, buf
, size
,
10680 buf
&& (mode
& OPENMODE_app
) ? buf
+strlen(buf
) : buf
);
10681 basic_ostream_char_ctor(&this->base
, &this->buf
.base
, FALSE
, TRUE
, FALSE
);
10682 basic_ios
->base
.vtable
= &ostrstream_vtable
;
10686 /* ??1ostrstream@std@@UAE@XZ */
10687 /* ??1ostrstream@std@@UEAA@XZ */
10688 DEFINE_THISCALL_WRAPPER(ostrstream_dtor
, 4)
10689 void __thiscall
ostrstream_dtor(basic_ios_char
*base
)
10691 ostrstream
*this = ostrstream_from_basic_ios(base
);
10693 TRACE("(%p)\n", this);
10695 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base
));
10696 strstreambuf_dtor(&this->buf
);
10699 static void ostrstream_vbase_dtor(ostrstream
*this)
10701 TRACE("(%p)\n", this);
10703 ostrstream_dtor(ostrstream_to_basic_ios(this));
10704 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base
));
10707 DEFINE_THISCALL_WRAPPER(ostrstream_vector_dtor
, 8)
10708 ostrstream
* __thiscall
ostrstream_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
10710 ostrstream
*this = ostrstream_from_basic_ios(base
);
10712 TRACE("(%p %x)\n", this, flags
);
10715 /* we have an array, with the number of elements stored before the first object */
10716 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
10718 for(i
=*ptr
-1; i
>=0; i
--)
10719 ostrstream_vbase_dtor(this+i
);
10720 operator_delete(ptr
);
10722 ostrstream_vbase_dtor(this);
10724 operator_delete(this);
10730 static inline istrstream
* istrstream_from_basic_ios(basic_ios_char
*ptr
)
10732 return (istrstream
*)((char*)ptr
-istrstream_vbtable
[1]);
10735 /* ??1istrstream@std@@UAE@XZ */
10736 /* ??1istrstream@std@@UEAA@XZ */
10737 DEFINE_THISCALL_WRAPPER(istrstream_dtor
, 4)
10738 void __thiscall
istrstream_dtor(basic_ios_char
*base
)
10740 istrstream
*this = istrstream_from_basic_ios(base
);
10742 TRACE("(%p)\n", this);
10744 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base
));
10745 strstreambuf_dtor(&this->buf
);
10748 static inline basic_ios_char
* strstream_to_basic_ios(strstream
*ptr
)
10750 return (basic_ios_char
*)((char*)ptr
+strstream_vbtable1
[1]);
10753 static inline strstream
* strstream_from_basic_ios(basic_ios_char
*ptr
)
10755 return (strstream
*)((char*)ptr
-strstream_vbtable1
[1]);
10758 /* ??$?6MDU?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@ABV?$complex@M@0@@Z */
10759 /* ??$?6MDU?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@AEBV?$complex@M@0@@Z */
10760 basic_ostream_char
* __cdecl
basic_ostream_char_print_complex_float(basic_ostream_char
*ostr
, const complex_float
*val
)
10763 basic_ostringstream_char obj
;
10764 basic_ios_char vbase
;
10766 ios_base
*ostringstream_ios_base
, *ostream_ios_base
;
10768 basic_string_char str
;
10769 basic_ostringstream_char_ctor(&oss
.obj
);
10770 ostringstream_ios_base
= &oss
.vbase
.base
;
10771 ostream_ios_base
= &basic_ostream_char_get_basic_ios(ostr
)->base
;
10772 TRACE("(%p %p)\n", ostr
, val
);
10774 ios_base_imbue(ostringstream_ios_base
, &loc
, IOS_LOCALE(ostream_ios_base
));
10776 ios_base_precision_set(ostringstream_ios_base
, ios_base_precision_get(ostream_ios_base
));
10777 ios_base_flags_set(ostringstream_ios_base
, ios_base_flags_get(ostream_ios_base
));
10779 basic_ostream_char_print_ch(&oss
.obj
.base
, '(');
10780 basic_ostream_char_print_float(&oss
.obj
.base
, val
->real
);
10781 basic_ostream_char_print_ch(&oss
.obj
.base
, ',');
10782 basic_ostream_char_print_float(&oss
.obj
.base
, val
->imag
);
10783 basic_ostream_char_print_ch(&oss
.obj
.base
, ')');
10785 basic_ostringstream_char_str_get(&oss
.obj
, &str
);
10786 basic_ostringstream_char_dtor(&oss
.vbase
);
10787 basic_ostream_char_print_bstr(ostr
, &str
);
10788 MSVCP_basic_string_char_dtor(&str
);
10792 /* ??$?6NDU?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@ABV?$complex@N@0@@Z */
10793 /* ??$?6NDU?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@AEBV?$complex@N@0@@Z */
10794 basic_ostream_char
* __cdecl
basic_ostream_char_print_complex_double(basic_ostream_char
*ostr
, const complex_double
*val
)
10797 basic_ostringstream_char obj
;
10798 basic_ios_char vbase
;
10800 ios_base
*ostringstream_ios_base
, *ostream_ios_base
;
10802 basic_string_char str
;
10803 basic_ostringstream_char_ctor(&oss
.obj
);
10804 ostringstream_ios_base
= &oss
.vbase
.base
;
10805 ostream_ios_base
= &basic_ostream_char_get_basic_ios(ostr
)->base
;
10806 TRACE("(%p %p)\n", ostr
, val
);
10808 ios_base_imbue(ostringstream_ios_base
, &loc
, IOS_LOCALE(ostream_ios_base
));
10810 ios_base_precision_set(ostringstream_ios_base
, ios_base_precision_get(ostream_ios_base
));
10811 ios_base_flags_set(ostringstream_ios_base
, ios_base_flags_get(ostream_ios_base
));
10813 basic_ostream_char_print_ch(&oss
.obj
.base
, '(');
10814 basic_ostream_char_print_double(&oss
.obj
.base
, val
->real
);
10815 basic_ostream_char_print_ch(&oss
.obj
.base
, ',');
10816 basic_ostream_char_print_double(&oss
.obj
.base
, val
->imag
);
10817 basic_ostream_char_print_ch(&oss
.obj
.base
, ')');
10819 basic_ostringstream_char_str_get(&oss
.obj
, &str
);
10820 basic_ostringstream_char_dtor(&oss
.vbase
);
10821 basic_ostream_char_print_bstr(ostr
, &str
);
10822 MSVCP_basic_string_char_dtor(&str
);
10826 /* ??$?6odu?$char_traits@d@std@@@std@@yaaav?$basic_ostream@du?$char_traits@d@std@@@0@aav10@abv?$complex@o@0@@Z */
10827 /* ??$?6ODU?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@AEBV?$complex@O@0@@Z */
10828 basic_ostream_char
* __cdecl
basic_ostream_char_print_complex_ldouble(basic_ostream_char
*ostr
, const complex_double
*val
)
10831 basic_ostringstream_char obj
;
10832 basic_ios_char vbase
;
10834 ios_base
*ostringstream_ios_base
, *ostream_ios_base
;
10836 basic_string_char str
;
10837 basic_ostringstream_char_ctor(&oss
.obj
);
10838 ostringstream_ios_base
= &oss
.vbase
.base
;
10839 ostream_ios_base
= &basic_ostream_char_get_basic_ios(ostr
)->base
;
10840 TRACE("(%p %p)\n", ostr
, val
);
10842 ios_base_imbue(ostringstream_ios_base
, &loc
, IOS_LOCALE(ostream_ios_base
));
10844 ios_base_precision_set(ostringstream_ios_base
, ios_base_precision_get(ostream_ios_base
));
10845 ios_base_flags_set(ostringstream_ios_base
, ios_base_flags_get(ostream_ios_base
));
10847 basic_ostream_char_print_ch(&oss
.obj
.base
, '(');
10848 basic_ostream_char_print_ldouble(&oss
.obj
.base
, val
->real
);
10849 basic_ostream_char_print_ch(&oss
.obj
.base
, ',');
10850 basic_ostream_char_print_ldouble(&oss
.obj
.base
, val
->imag
);
10851 basic_ostream_char_print_ch(&oss
.obj
.base
, ')');
10853 basic_ostringstream_char_str_get(&oss
.obj
, &str
);
10854 basic_ostringstream_char_dtor(&oss
.vbase
);
10855 basic_ostream_char_print_bstr(ostr
, &str
);
10856 MSVCP_basic_string_char_dtor(&str
);
10860 /* ??0strstream@std@@QAE@PADHH@Z */
10861 /* ??0strstream@std@@QEAA@PEAD_JH@Z */
10862 DEFINE_THISCALL_WRAPPER(strstream_ctor
, 20)
10863 strstream
* __thiscall
strstream_ctor(strstream
*this, char *buf
, streamsize size
, int mode
, bool virt_init
)
10865 basic_ios_char
*basic_ios
;
10867 TRACE("(%p %p %Id %d %d)\n", this, buf
, size
, mode
, virt_init
);
10870 this->base
.base1
.vbtable
= strstream_vbtable1
;
10871 this->base
.base2
.vbtable
= strstream_vbtable2
;
10872 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
10873 basic_ios_char_ctor(basic_ios
);
10875 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
10878 strstreambuf_ctor_get_put(&this->buf
, buf
, size
,
10879 buf
&& (mode
& OPENMODE_app
) ? buf
+strlen(buf
) : buf
);
10880 basic_iostream_char_ctor(&this->base
, &this->buf
.base
, FALSE
);
10881 basic_ios
->base
.vtable
= &strstream_vtable
;
10885 /* ??1strstream@std@@UAE@XZ */
10886 /* ??1strstream@std@@UEAA@XZ */
10887 DEFINE_THISCALL_WRAPPER(strstream_dtor
, 4)
10888 void __thiscall
strstream_dtor(basic_ios_char
*base
)
10890 strstream
*this = strstream_from_basic_ios(base
);
10892 TRACE("(%p)\n", this);
10894 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base
));
10895 strstreambuf_dtor(&this->buf
);
10898 static void strstream_vbase_dtor(strstream
*this)
10900 TRACE("(%p)\n", this);
10902 strstream_dtor(strstream_to_basic_ios(this));
10903 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base
.base1
));
10906 DEFINE_THISCALL_WRAPPER(strstream_vector_dtor
, 8)
10907 strstream
* __thiscall
strstream_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
10909 strstream
*this = strstream_from_basic_ios(base
);
10911 TRACE("(%p %x)\n", this, flags
);
10914 /* we have an array, with the number of elements stored before the first object */
10915 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
10917 for(i
=*ptr
-1; i
>=0; i
--)
10918 strstream_vbase_dtor(this+i
);
10919 operator_delete(ptr
);
10921 strstream_vbase_dtor(this);
10923 operator_delete(this);
10929 static void __cdecl
setprecision_func(ios_base
*base
, streamsize prec
)
10931 ios_base_precision_set(base
, prec
);
10934 /* ?setprecision@std@@YA?AU?$_Smanip@H@1@H@Z */
10935 /* ?setprecision@std@@YA?AU?$_Smanip@_J@1@_J@Z */
10936 manip_streamsize
* __cdecl
setprecision(manip_streamsize
*ret
, streamsize prec
)
10938 TRACE("(%p %Id)\n", ret
, prec
);
10940 ret
->pfunc
= setprecision_func
;
10945 static void __cdecl
setw_func(ios_base
*base
, streamsize width
)
10947 ios_base_width_set(base
, width
);
10950 /* ?setw@std@@YA?AU?$_Smanip@H@1@H@Z */
10951 /* ?setw@std@@YA?AU?$_Smanip@_J@1@_J@Z */
10952 manip_streamsize
* __cdecl
setw(manip_streamsize
*ret
, streamsize width
)
10954 TRACE("(%p %Id)\n", ret
, width
);
10956 ret
->pfunc
= setw_func
;
10961 static void __cdecl
resetioflags_func(ios_base
*base
, int mask
)
10963 ios_base_setf_mask(base
, 0, mask
);
10966 /* ?resetiosflags@std@@YA?AU?$_Smanip@H@1@H@Z */
10967 manip_int
* __cdecl
resetiosflags(manip_int
*ret
, int mask
)
10969 TRACE("(%p %d)\n", ret
, mask
);
10971 ret
->pfunc
= resetioflags_func
;
10976 static void __cdecl
setiosflags_func(ios_base
*base
, int mask
)
10978 ios_base_setf_mask(base
, FMTFLAG_mask
, mask
);
10981 /* ?setiosflags@std@@YA?AU?$_Smanip@H@1@H@Z */
10982 manip_int
* __cdecl
setiosflags(manip_int
*ret
, int mask
)
10984 TRACE("(%p %d)\n", ret
, mask
);
10986 ret
->pfunc
= setiosflags_func
;
10991 static void __cdecl
setbase_func(ios_base
*base
, int set_base
)
10994 set_base
= FMTFLAG_dec
;
10995 else if(set_base
== 8)
10996 set_base
= FMTFLAG_oct
;
10997 else if(set_base
== 16)
10998 set_base
= FMTFLAG_hex
;
11002 ios_base_setf_mask(base
, set_base
, FMTFLAG_basefield
);
11005 /* ?setbase@std@@YA?AU?$_Smanip@H@1@H@Z */
11006 manip_int
* __cdecl
setbase(manip_int
*ret
, int base
)
11008 TRACE("(%p %d)\n", ret
, base
);
11010 ret
->pfunc
= setbase_func
;
11015 static basic_filebuf_char filebuf_char_stdin
;
11016 /* ?cin@std@@3V?$basic_istream@DU?$char_traits@D@std@@@1@A */
11018 basic_istream_char obj
;
11019 basic_ios_char vbase
;
11022 static basic_filebuf_wchar filebuf_short_stdin
;
11023 /* ?wcin@std@@3V?$basic_istream@GU?$char_traits@G@std@@@1@A */
11025 basic_istream_wchar obj
;
11026 basic_ios_wchar vbase
;
11027 } ucin
= { { 0 } };
11029 static basic_filebuf_char filebuf_char_stdout
;
11030 /* ?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
11032 basic_ostream_char obj
;
11033 basic_ios_char vbase
;
11034 } cout
= { { 0 } };
11036 static basic_filebuf_wchar filebuf_short_stdout
;
11037 /* ?wcout@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
11039 basic_ostream_wchar obj
;
11040 basic_ios_wchar vbase
;
11041 } ucout
= { { 0 } };
11043 static basic_filebuf_char filebuf_char_stderr
;
11044 /* ?cerr@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
11046 basic_ostream_char obj
;
11047 basic_ios_char vbase
;
11048 } cerr
= { { 0 } };
11050 static basic_filebuf_wchar filebuf_short_stderr
;
11051 /* ?wcerr@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
11053 basic_ostream_wchar obj
;
11054 basic_ios_wchar vbase
;
11055 } ucerr
= { { 0 } };
11057 static basic_filebuf_char filebuf_char_log
;
11058 /* ?clog@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
11060 basic_ostream_char obj
;
11061 basic_ios_char vbase
;
11062 } MSVCP_clog
= { { 0 } };
11064 static basic_filebuf_wchar filebuf_short_log
;
11065 /* ?wclog@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
11067 basic_ostream_wchar obj
;
11068 basic_ios_wchar vbase
;
11069 } uclog
= { { 0 } };
11071 /* ?_Init_cnt@Init@ios_base@std@@0HA */
11072 int ios_base_Init__Init_cnt
= -1;
11074 /* ??0Init@ios_base@std@@QAE@XZ */
11075 /* ??0Init@ios_base@std@@QEAA@XZ */
11076 DEFINE_THISCALL_WRAPPER(ios_base_Init_ctor
, 4)
11077 void* __thiscall
ios_base_Init_ctor(void *this)
11079 TRACE("(%p)\n", this);
11081 if(ios_base_Init__Init_cnt
< 0)
11082 ios_base_Init__Init_cnt
= 1;
11084 ios_base_Init__Init_cnt
++;
11088 /* ??1Init@ios_base@std@@QAE@XZ */
11089 /* ??1Init@ios_base@std@@QEAA@XZ */
11090 DEFINE_THISCALL_WRAPPER(ios_base_Init_dtor
, 4)
11091 void __thiscall
ios_base_Init_dtor(void *this)
11093 TRACE("(%p)\n", this);
11095 ios_base_Init__Init_cnt
--;
11096 if(!ios_base_Init__Init_cnt
) {
11097 basic_ostream_char_flush(&cout
.obj
);
11098 basic_ostream_char_flush(&cerr
.obj
);
11099 basic_ostream_char_flush(&MSVCP_clog
.obj
);
11103 /* ??4Init@ios_base@std@@QAEAAV012@ABV012@@Z */
11104 /* ??4Init@ios_base@std@@QEAAAEAV012@AEBV012@@Z */
11105 DEFINE_THISCALL_WRAPPER(ios_base_Init_op_assign
, 8)
11106 void* __thiscall
ios_base_Init_op_assign(void *this, void *rhs
)
11108 TRACE("(%p %p)\n", this, rhs
);
11112 /* ?_Init_cnt@_Winit@std@@0HA */
11113 int _Winit__Init_cnt
= -1;
11115 /* ??0_Winit@std@@QAE@XZ */
11116 /* ??0_Winit@std@@QEAA@XZ */
11117 DEFINE_THISCALL_WRAPPER(_Winit_ctor
, 4)
11118 void* __thiscall
_Winit_ctor(void *this)
11120 TRACE("(%p)\n", this);
11122 if(_Winit__Init_cnt
< 0)
11123 _Winit__Init_cnt
= 1;
11125 _Winit__Init_cnt
++;
11130 /* ??1_Winit@std@@QAE@XZ */
11131 /* ??1_Winit@std@@QAE@XZ */
11132 DEFINE_THISCALL_WRAPPER(_Winit_dtor
, 4)
11133 void __thiscall
_Winit_dtor(void *this)
11135 TRACE("(%p)\n", this);
11137 _Winit__Init_cnt
--;
11138 if(!_Winit__Init_cnt
) {
11139 basic_ostream_short_flush(&ucout
.obj
);
11140 basic_ostream_short_flush(&ucerr
.obj
);
11141 basic_ostream_short_flush(&uclog
.obj
);
11145 /* ??4_Winit@std@@QAEAAV01@ABV01@@Z */
11146 /* ??4_Winit@std@@QEAAAEAV01@AEBV01@@Z */
11147 DEFINE_THISCALL_WRAPPER(_Winit_op_assign
, 8)
11148 void* __thiscall
_Winit_op_assign(void *this, void *rhs
)
11150 TRACE("(%p %p)\n", this, rhs
);
11154 void init_io(void *base
)
11157 init_iosb_rtti(base
);
11158 init_ios_base_rtti(base
);
11159 init_basic_ios_char_rtti(base
);
11160 init_basic_ios_short_rtti(base
);
11161 init_basic_streambuf_char_rtti(base
);
11162 init_basic_streambuf_short_rtti(base
);
11163 init_basic_filebuf_char_rtti(base
);
11164 init_basic_filebuf_short_rtti(base
);
11165 init_basic_stringbuf_char_rtti(base
);
11166 init_basic_stringbuf_short_rtti(base
);
11167 init_basic_ostream_char_rtti(base
);
11168 init_basic_ostream_short_rtti(base
);
11169 init_basic_istream_char_rtti(base
);
11170 init_basic_istream_short_rtti(base
);
11171 init_basic_iostream_char_rtti(base
);
11172 init_basic_iostream_short_rtti(base
);
11173 init_basic_ofstream_char_rtti(base
);
11174 init_basic_ofstream_short_rtti(base
);
11175 init_basic_ifstream_char_rtti(base
);
11176 init_basic_ifstream_short_rtti(base
);
11177 init_basic_fstream_char_rtti(base
);
11178 init_basic_fstream_short_rtti(base
);
11179 init_basic_ostringstream_char_rtti(base
);
11180 init_basic_ostringstream_short_rtti(base
);
11181 init_basic_istringstream_char_rtti(base
);
11182 init_basic_istringstream_short_rtti(base
);
11183 init_basic_stringstream_char_rtti(base
);
11184 init_basic_stringstream_short_rtti(base
);
11185 init_strstreambuf_rtti(base
);
11186 init_strstream_rtti(base
);
11187 init_ostrstream_rtti(base
);
11190 basic_filebuf_char_ctor_file(&filebuf_char_stdin
, stdin
);
11191 basic_istream_char_ctor(&cin
.obj
, &filebuf_char_stdin
.base
, FALSE
/*FIXME*/, TRUE
);
11193 basic_filebuf_short_ctor_file(&filebuf_short_stdin
, stdin
);
11194 basic_istream_short_ctor(&ucin
.obj
, &filebuf_short_stdin
.base
, FALSE
/*FIXME*/, TRUE
);
11196 basic_filebuf_char_ctor_file(&filebuf_char_stdout
, stdout
);
11197 basic_ostream_char_ctor(&cout
.obj
, &filebuf_char_stdout
.base
, FALSE
/*FIXME*/, TRUE
, TRUE
);
11199 basic_filebuf_short_ctor_file(&filebuf_short_stdout
, stdout
);
11200 basic_ostream_short_ctor(&ucout
.obj
, &filebuf_short_stdout
.base
, FALSE
/*FIXME*/, TRUE
, TRUE
);
11202 basic_filebuf_char_ctor_file(&filebuf_char_stderr
, stderr
);
11203 basic_ostream_char_ctor(&cerr
.obj
, &filebuf_char_stderr
.base
, FALSE
/*FIXME*/, TRUE
, TRUE
);
11205 basic_filebuf_short_ctor_file(&filebuf_short_stderr
, stderr
);
11206 basic_ostream_short_ctor(&ucerr
.obj
, &filebuf_short_stderr
.base
, FALSE
/*FIXME*/, TRUE
, TRUE
);
11208 basic_filebuf_char_ctor_file(&filebuf_char_log
, stderr
);
11209 basic_ostream_char_ctor(&MSVCP_clog
.obj
, &filebuf_char_log
.base
, FALSE
/*FIXME*/, TRUE
, TRUE
);
11211 basic_filebuf_short_ctor_file(&filebuf_short_log
, stderr
);
11212 basic_ostream_short_ctor(&uclog
.obj
, &filebuf_short_log
.base
, FALSE
/*FIXME*/, TRUE
, TRUE
);
11217 basic_istream_char_vbase_dtor(&cin
.obj
);
11218 basic_filebuf_char_dtor(&filebuf_char_stdin
);
11220 basic_istream_short_vbase_dtor(&ucin
.obj
);
11221 basic_filebuf_short_dtor(&filebuf_short_stdin
);
11223 basic_ostream_char_vbase_dtor(&cout
.obj
);
11224 basic_filebuf_char_dtor(&filebuf_char_stdout
);
11226 basic_ostream_short_vbase_dtor(&ucout
.obj
);
11227 basic_filebuf_short_dtor(&filebuf_short_stdout
);
11229 basic_ostream_char_vbase_dtor(&cerr
.obj
);
11230 basic_filebuf_char_dtor(&filebuf_char_stderr
);
11232 basic_ostream_short_vbase_dtor(&ucerr
.obj
);
11233 basic_filebuf_short_dtor(&filebuf_short_stderr
);
11235 basic_ostream_char_vbase_dtor(&MSVCP_clog
.obj
);
11236 basic_filebuf_char_dtor(&filebuf_char_log
);
11238 basic_ostream_short_vbase_dtor(&uclog
.obj
);
11239 basic_filebuf_short_dtor(&filebuf_short_log
);