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
30 #include "wine/debug.h"
31 WINE_DEFAULT_DEBUG_CHANNEL(msvcp
);
33 /* ?_Index@ios_base@std@@0HA */
34 int ios_base_Index
= 0;
35 /* ?_Sync@ios_base@std@@0_NA */
36 bool ios_base_Sync
= FALSE
;
40 __int64
DECLSPEC_ALIGN(8) pos
;
44 static inline const char* debugstr_fpos_int(fpos_int
*fpos
)
46 return wine_dbg_sprintf("fpos(%Id %I64d %d)", fpos
->off
, fpos
->pos
, fpos
->state
);
50 void (__cdecl
*pfunc
)(ios_base
*, streamsize
);
55 void (__cdecl
*pfunc
)(ios_base
*, int);
63 } basic_filebuf__Initfl
;
66 basic_streambuf_char base
;
70 basic_string_char
*str
;
77 basic_streambuf_wchar base
;
81 basic_string_char
*str
;
85 } basic_filebuf_wchar
;
88 STRINGBUF_allocated
= 1,
89 STRINGBUF_no_write
= 2,
90 STRINGBUF_no_read
= 4,
93 } basic_stringbuf_state
;
96 basic_streambuf_char base
;
101 char allocator
; /* empty struct */
102 } basic_stringbuf_char
;
105 basic_streambuf_wchar base
;
110 char allocator
; /* empty struct */
111 } basic_stringbuf_wchar
;
115 basic_streambuf_char
*strbuf
;
116 struct _basic_ostream_char
*stream
;
122 basic_streambuf_wchar
*strbuf
;
123 struct _basic_ostream_wchar
*stream
;
127 typedef struct _basic_ostream_char
{
129 /* virtual inheritance
130 * basic_ios_char basic_ios;
132 } basic_ostream_char
;
134 typedef struct _basic_ostream_wchar
{
136 /* virtual inheritance
137 * basic_ios_wchar basic_ios;
139 } basic_ostream_wchar
;
144 /* virtual inheritance
145 * basic_ios_char basic_ios;
147 } basic_istream_char
;
152 /* virtual inheritance
153 * basic_ios_wchar basic_ios;
155 } basic_istream_wchar
;
158 basic_istream_char base1
;
159 basic_ostream_char base2
;
160 /* virtual inheritance
161 * basic_ios_char basic_ios;
163 } basic_iostream_char
;
166 basic_istream_wchar base1
;
167 basic_ostream_wchar base2
;
168 /* virtual inheritance
169 * basic_ios_wchar basic_ios;
171 } basic_iostream_wchar
;
174 basic_ostream_char base
;
175 basic_filebuf_char filebuf
;
176 /* virtual inheritance
177 * basic_ios_char basic_ios;
179 } basic_ofstream_char
;
182 basic_ostream_wchar base
;
183 basic_filebuf_wchar filebuf
;
184 /* virtual inheritance
185 * basic_ios_wchar basic_ios;
187 } basic_ofstream_wchar
;
190 basic_istream_char base
;
191 basic_filebuf_char filebuf
;
192 /* virtual inheritance
193 * basic_ios_char basic_ios;
195 } basic_ifstream_char
;
198 basic_istream_wchar base
;
199 basic_filebuf_wchar filebuf
;
200 /* virtual inheritance
201 * basic_ios_wchar basic_ios;
203 } basic_ifstream_wchar
;
206 basic_iostream_char base
;
207 basic_filebuf_char filebuf
;
208 /* virtual inheritance
209 * basic_ios_char basic_ios;
211 } basic_fstream_char
;
214 basic_iostream_wchar base
;
215 basic_filebuf_wchar filebuf
;
216 /* virtual inheritance
217 * basic_ios_char basic_ios;
219 } basic_fstream_wchar
;
222 basic_ostream_char base
;
223 basic_stringbuf_char strbuf
;
224 /* virtual inheritance
225 * basic_ios_char basic_ios;
227 } basic_ostringstream_char
;
230 basic_ostream_wchar base
;
231 basic_stringbuf_wchar strbuf
;
232 /* virtual inheritance
233 * basic_ios_wchar basic_ios;
235 } basic_ostringstream_wchar
;
238 basic_istream_char base
;
239 basic_stringbuf_char strbuf
;
240 /* virtual inheritance
241 * basic_ios_char basic_ios;
243 } basic_istringstream_char
;
246 basic_istream_wchar base
;
247 basic_stringbuf_wchar strbuf
;
248 /* virtual inheritance
249 * basic_ios_wchar basic_ios;
251 } basic_istringstream_wchar
;
254 basic_iostream_char base
;
255 basic_stringbuf_char strbuf
;
256 /* virtual inheritance
257 * basic_ios_char basic_ios;
259 } basic_stringstream_char
;
262 basic_iostream_wchar base
;
263 basic_stringbuf_wchar strbuf
;
264 /* virtual inheritance
265 * basic_ios_wchar basic_ios;
267 } basic_stringstream_wchar
;
270 STRSTATE_Allocated
= 1,
271 STRSTATE_Constant
= 2,
272 STRSTATE_Dynamic
= 4,
274 } strstreambuf__Strstate
;
277 basic_streambuf_char base
;
282 void* (__cdecl
*palloc
)(size_t);
283 void (__cdecl
*pfree
)(void*);
287 basic_ostream_char base
;
289 /* virtual inheritance
290 * basic_ios_char basic_ios;
295 basic_istream_char base
;
297 /* virtual inheritance
298 * basic_ios_char basic_ios;
303 basic_iostream_char base
;
305 /* virtual inheritance
306 * basic_ios_char basic_ios;
310 #define VBTABLE_ALIGN 4
312 extern const vtable_ptr iosb_vtable
;
314 /* ??_7ios_base@std@@6B@ */
315 extern const vtable_ptr ios_base_vtable
;
317 /* ??_7?$basic_ios@DU?$char_traits@D@std@@@std@@6B@ */
318 extern const vtable_ptr basic_ios_char_vtable
;
320 /* ??_7?$basic_ios@GU?$char_traits@G@std@@@std@@6B@ */
321 extern const vtable_ptr basic_ios_short_vtable
;
323 /* ??_7?$basic_streambuf@DU?$char_traits@D@std@@@std@@6B@ */
324 extern const vtable_ptr basic_streambuf_char_vtable
;
326 /* ??_7?$basic_streambuf@GU?$char_traits@G@std@@@std@@6B@ */
327 extern const vtable_ptr basic_streambuf_short_vtable
;
329 /* ??_7?$basic_filebuf@DU?$char_traits@D@std@@@std@@6B@ */
330 extern const vtable_ptr basic_filebuf_char_vtable
;
332 /* ??_7?$basic_filebuf@GU?$char_traits@G@std@@@std@@6B@ */
333 extern const vtable_ptr basic_filebuf_short_vtable
;
335 /* ??_7?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
336 extern const vtable_ptr basic_stringbuf_char_vtable
;
338 /* ??_7?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
339 extern const vtable_ptr basic_stringbuf_short_vtable
;
341 /* ??_8?$basic_ostream@DU?$char_traits@D@std@@@std@@7B@ */
342 const int basic_ostream_char_vbtable
[] = {0, ALIGNED_SIZE(sizeof(basic_ostream_char
), VBTABLE_ALIGN
)};
343 /* ??_7?$basic_ostream@DU?$char_traits@D@std@@@std@@6B@ */
344 extern const vtable_ptr basic_ostream_char_vtable
;
346 /* ??_8?$basic_ostream@GU?$char_traits@G@std@@@std@@7B@ */
347 const int basic_ostream_short_vbtable
[] = {0, ALIGNED_SIZE(sizeof(basic_ostream_wchar
), VBTABLE_ALIGN
)};
348 /* ??_7?$basic_ostream@GU?$char_traits@G@std@@@std@@6B@ */
349 extern const vtable_ptr basic_ostream_short_vtable
;
351 /* ??_8?$basic_istream@DU?$char_traits@D@std@@@std@@7B@ */
352 const int basic_istream_char_vbtable
[] = {0, ALIGNED_SIZE(sizeof(basic_istream_char
), VBTABLE_ALIGN
)};
353 /* ??_7?$basic_istream@DU?$char_traits@D@std@@@std@@6B@ */
354 extern const vtable_ptr basic_istream_char_vtable
;
356 /* ??_8?$basic_istream@GU?$char_traits@G@std@@@std@@7B@ */
357 const int basic_istream_short_vbtable
[] = {0, ALIGNED_SIZE(sizeof(basic_istream_wchar
), VBTABLE_ALIGN
)};
358 /* ??_7?$basic_istream@GU?$char_traits@G@std@@@std@@6B@ */
359 extern const vtable_ptr basic_istream_short_vtable
;
361 /* ??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
362 const int basic_iostream_char_vbtable1
[] = {0, ALIGNED_SIZE(sizeof(basic_iostream_char
), VBTABLE_ALIGN
)};
363 /* ??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
364 const int basic_iostream_char_vbtable2
[] = {0, ALIGNED_SIZE(sizeof(basic_iostream_char
), VBTABLE_ALIGN
)-FIELD_OFFSET(basic_iostream_char
, base2
)};
365 /* ??_7?$basic_iostream@DU?$char_traits@D@std@@@std@@6B@ */
366 extern const vtable_ptr basic_iostream_char_vtable
;
368 /* ??_8?$basic_iostream@GU?$char_traits@G@std@@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@ */
369 const int basic_iostream_short_vbtable1
[] = {0, ALIGNED_SIZE(sizeof(basic_iostream_wchar
), VBTABLE_ALIGN
)};
370 /* ??_8?$basic_iostream@GU?$char_traits@G@std@@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@ */
371 const int basic_iostream_short_vbtable2
[] = {0, ALIGNED_SIZE(sizeof(basic_iostream_wchar
), VBTABLE_ALIGN
)-FIELD_OFFSET(basic_iostream_wchar
, base2
)};
372 /* ??_7?$basic_iostream@GU?$char_traits@G@std@@@std@@6B@ */
373 extern const vtable_ptr basic_iostream_short_vtable
;
375 /* ??_8?$basic_ofstream@DU?$char_traits@D@std@@@std@@7B@ */
376 const int basic_ofstream_char_vbtable
[] = {0, sizeof(basic_ofstream_char
)};
377 /* ??_7?$basic_ofstream@DU?$char_traits@D@std@@@std@@6B@ */
378 extern const vtable_ptr basic_ofstream_char_vtable
;
380 /* ??_8?$basic_ofstream@GU?$char_traits@G@std@@@std@@7B@ */
381 const int basic_ofstream_short_vbtable
[] = {0, sizeof(basic_ofstream_wchar
)};
382 /* ??_7?$basic_ofstream@GU?$char_traits@G@std@@@std@@6B@ */
383 extern const vtable_ptr basic_ofstream_short_vtable
;
385 /* ??_8?$basic_ifstream@DU?$char_traits@D@std@@@std@@7B@ */
386 const int basic_ifstream_char_vbtable
[] = {0, sizeof(basic_ifstream_char
)};
387 /* ??_7?$basic_ifstream@DU?$char_traits@D@std@@@std@@6B@ */
388 extern const vtable_ptr basic_ifstream_char_vtable
;
390 /* ??_8?$basic_ifstream@GU?$char_traits@G@std@@@std@@7B@ */
391 const int basic_ifstream_short_vbtable
[] = {0, sizeof(basic_ifstream_wchar
)};
392 /* ??_7?$basic_ifstream@GU?$char_traits@G@std@@@std@@6B@ */
393 extern const vtable_ptr basic_ifstream_short_vtable
;
395 /* ??_8?$basic_fstream@DU?$char_traits@D@std@@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
396 const int basic_fstream_char_vbtable1
[] = {0, sizeof(basic_fstream_char
)};
397 /* ??_8?$basic_fstream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
398 const int basic_fstream_char_vbtable2
[] = {0, sizeof(basic_fstream_char
)-FIELD_OFFSET(basic_fstream_char
, base
.base2
)};
399 /* ??_7?$basic_fstream@DU?$char_traits@D@std@@@std@@6B@ */
400 extern const vtable_ptr basic_fstream_char_vtable
;
402 /* ??_8?$basic_fstream@GU?$char_traits@G@std@@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@ */
403 const int basic_fstream_short_vbtable1
[] = {0, sizeof(basic_fstream_wchar
)};
404 /* ??_8?$basic_fstream@GU?$char_traits@G@std@@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@ */
405 const int basic_fstream_short_vbtable2
[] = {0, sizeof(basic_fstream_wchar
)-FIELD_OFFSET(basic_fstream_wchar
, base
.base2
)};
406 /* ??_7?$basic_fstream@GU?$char_traits@G@std@@@std@@6B@ */
407 extern const vtable_ptr basic_fstream_short_vtable
;
409 /* ??_8?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B@ */
410 const int basic_ostringstream_char_vbtable
[] = {0, sizeof(basic_ostringstream_char
)};
411 /* ??_7?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
412 extern const vtable_ptr basic_ostringstream_char_vtable
;
414 /* ??_8?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B@ */
415 const int basic_ostringstream_short_vbtable
[] = {0, sizeof(basic_ostringstream_wchar
)};
416 /* ??_7?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
417 extern const vtable_ptr basic_ostringstream_short_vtable
;
419 /* ??_8?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B@ */
420 const int basic_istringstream_char_vbtable
[] = {0, sizeof(basic_istringstream_char
)};
421 /* ??_7?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
422 extern const vtable_ptr basic_istringstream_char_vtable
;
424 /* ??_8?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B@ */
425 const int basic_istringstream_short_vbtable
[] = {0, sizeof(basic_istringstream_wchar
)};
426 /* ??_7?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
427 extern const vtable_ptr basic_istringstream_short_vtable
;
429 /* ??_8?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
430 const int basic_stringstream_char_vbtable1
[] = {0, sizeof(basic_stringstream_char
)};
431 /* ??_8?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
432 const int basic_stringstream_char_vbtable2
[] = {0, sizeof(basic_stringstream_char
)-FIELD_OFFSET(basic_stringstream_char
, base
.base2
)};
433 /* ??_7?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
434 extern const vtable_ptr basic_stringstream_char_vtable
;
436 /* ??_8?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@ */
437 const int basic_stringstream_short_vbtable1
[] = {0, sizeof(basic_stringstream_wchar
)};
438 /* ??_8?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@ */
439 const int basic_stringstream_short_vbtable2
[] = {0, sizeof(basic_stringstream_wchar
)-FIELD_OFFSET(basic_stringstream_wchar
, base
.base2
)};
440 /* ??_7?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
441 extern const vtable_ptr basic_stringstream_short_vtable
;
443 /* ??_7strstreambuf@std@@6B */
444 extern const vtable_ptr strstreambuf_vtable
;
446 static const int ostrstream_vbtable
[] = {0, sizeof(ostrstream
)};
447 extern const vtable_ptr ostrstream_vtable
;
449 static const int istrstream_vbtable
[] = {0, sizeof(istrstream
)};
451 static const int strstream_vbtable1
[] = {0, sizeof(strstream
)};
452 static const int strstream_vbtable2
[] = {0, sizeof(strstream
)-FIELD_OFFSET(strstream
, base
.base2
)};
453 extern const vtable_ptr strstream_vtable
;
455 DEFINE_RTTI_DATA0(iosb
, 0, ".?AV?$_Iosb@H@std@@")
456 DEFINE_RTTI_DATA1(ios_base
, 0, &iosb_rtti_base_descriptor
, ".?AV?$_Iosb@H@std@@")
457 DEFINE_RTTI_DATA2(basic_ios_char
, 0, &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
458 ".?AV?$basic_ios@DU?$char_traits@D@std@@@std@@")
459 DEFINE_RTTI_DATA2(basic_ios_short
, 0, &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
460 ".?AV?$basic_ios@GU?$char_traits@G@std@@@std@@")
461 DEFINE_RTTI_DATA0(basic_streambuf_char
, 0,
462 ".?AV?$basic_streambuf@DU?$char_traits@D@std@@@std@@")
463 DEFINE_RTTI_DATA0(basic_streambuf_short
, 0,
464 ".?AV?$basic_streambuf@GU?$char_traits@G@std@@@std@@")
465 DEFINE_RTTI_DATA1(basic_filebuf_char
, 0, &basic_streambuf_char_rtti_base_descriptor
,
466 ".?AV?$basic_filebuf@DU?$char_traits@D@std@@@std@@")
467 DEFINE_RTTI_DATA1(basic_filebuf_short
, 0, &basic_streambuf_short_rtti_base_descriptor
,
468 ".?AV?$basic_filebuf@GU?$char_traits@G@std@@@std@@")
469 DEFINE_RTTI_DATA1(basic_stringbuf_char
, 0, &basic_streambuf_char_rtti_base_descriptor
,
470 ".?AV?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@")
471 DEFINE_RTTI_DATA1(basic_stringbuf_short
, 0, &basic_streambuf_short_rtti_base_descriptor
,
472 ".?AV?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@")
473 DEFINE_RTTI_DATA3(basic_ostream_char
, sizeof(basic_ostream_char
), &basic_ios_char_rtti_base_descriptor
,
474 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
475 ".?AV?$basic_ostream@DU?$char_traits@D@std@@@std@@")
476 DEFINE_RTTI_DATA3(basic_ostream_short
, sizeof(basic_ostream_wchar
), &basic_ios_short_rtti_base_descriptor
,
477 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
478 ".?AV?$basic_ostream@GU?$char_traits@G@std@@@std@@")
479 DEFINE_RTTI_DATA3(basic_istream_char
, sizeof(basic_istream_char
), &basic_ios_char_rtti_base_descriptor
,
480 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
481 ".?AV?$basic_istream@DU?$char_traits@D@std@@@std@@")
482 DEFINE_RTTI_DATA3(basic_istream_short
, sizeof(basic_istream_wchar
), &basic_ios_short_rtti_base_descriptor
,
483 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
484 ".?AV?$basic_istream@GU?$char_traits@G@std@@@std@@")
485 DEFINE_RTTI_DATA8(basic_iostream_char
, sizeof(basic_iostream_char
),
486 &basic_istream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
487 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
488 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
489 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
490 ".?AV?$basic_iostream@DU?$char_traits@D@std@@@std@@")
491 DEFINE_RTTI_DATA8(basic_iostream_short
, sizeof(basic_iostream_wchar
),
492 &basic_istream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
493 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
494 &basic_ostream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
495 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
496 ".?AV?$basic_iostream@GU?$char_traits@G@std@@@std@@")
497 DEFINE_RTTI_DATA4(basic_ofstream_char
, sizeof(basic_ofstream_char
),
498 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
499 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
500 ".?AV?$basic_ofstream@DU?$char_traits@D@std@@@std@@")
501 DEFINE_RTTI_DATA4(basic_ofstream_short
, sizeof(basic_ofstream_wchar
),
502 &basic_ostream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
503 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
504 ".?AV?$basic_ofstream@GU?$char_traits@G@std@@@std@@")
505 DEFINE_RTTI_DATA4(basic_ifstream_char
, sizeof(basic_ifstream_char
),
506 &basic_istream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
507 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
508 ".?AV?$basic_ifstream@DU?$char_traits@D@std@@@std@@")
509 DEFINE_RTTI_DATA4(basic_ifstream_short
, sizeof(basic_ifstream_wchar
),
510 &basic_istream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
511 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
512 ".?AV?$basic_ifstream@GU?$char_traits@G@std@@@std@@")
513 DEFINE_RTTI_DATA8(basic_fstream_char
, sizeof(basic_fstream_char
),
514 &basic_istream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
515 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
516 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
517 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
518 ".?AV?$basic_fstream@DU?$char_traits@D@std@@@std@@")
519 DEFINE_RTTI_DATA8(basic_fstream_short
, sizeof(basic_fstream_wchar
),
520 &basic_istream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
521 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
522 &basic_ostream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
523 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
524 ".?AV?$basic_fstream@GU?$char_traits@G@std@@@std@@")
525 DEFINE_RTTI_DATA4(basic_ostringstream_char
, sizeof(basic_ostringstream_char
),
526 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
527 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
528 ".?AV?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@")
529 DEFINE_RTTI_DATA4(basic_ostringstream_short
, sizeof(basic_ostringstream_wchar
),
530 &basic_ostream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
531 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
532 ".?AV?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@")
533 DEFINE_RTTI_DATA4(basic_istringstream_char
, sizeof(basic_istringstream_char
),
534 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
535 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
536 ".?AV?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@")
537 DEFINE_RTTI_DATA4(basic_istringstream_short
, sizeof(basic_istringstream_wchar
),
538 &basic_ostream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
539 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
540 ".?AV?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@")
541 DEFINE_RTTI_DATA8(basic_stringstream_char
, sizeof(basic_stringstream_char
),
542 &basic_istream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
543 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
544 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
545 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
546 ".?AV?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@")
547 DEFINE_RTTI_DATA8(basic_stringstream_short
, sizeof(basic_stringstream_wchar
),
548 &basic_istream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
549 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
550 &basic_ostream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
551 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
552 ".?AV?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@")
553 DEFINE_RTTI_DATA1(strstreambuf
, sizeof(strstreambuf
),
554 &basic_streambuf_char_rtti_base_descriptor
, ".?AVstrstreambuf@std@@")
555 DEFINE_RTTI_DATA4(ostrstream
, sizeof(ostrstream
),
556 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
557 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
558 "?AVostrstream@std@@")
559 DEFINE_RTTI_DATA8(strstream
, sizeof(strstream
),
560 &basic_istream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
561 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
562 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
563 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
564 "?AVstrstream@std@@")
566 __ASM_BLOCK_BEGIN(ios_vtables
)
568 VTABLE_ADD_FUNC(iosb_vector_dtor
));
569 __ASM_VTABLE(ios_base
,
570 VTABLE_ADD_FUNC(ios_base_vector_dtor
));
571 __ASM_VTABLE(basic_ios_char
,
572 VTABLE_ADD_FUNC(basic_ios_char_vector_dtor
));
573 __ASM_VTABLE(basic_ios_short
,
574 VTABLE_ADD_FUNC(basic_ios_short_vector_dtor
));
575 __ASM_VTABLE(basic_streambuf_char
,
576 VTABLE_ADD_FUNC(basic_streambuf_char_vector_dtor
)
577 VTABLE_ADD_FUNC(basic_streambuf_char_overflow
)
578 VTABLE_ADD_FUNC(basic_streambuf_char_pbackfail
)
579 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc
)
580 VTABLE_ADD_FUNC(basic_streambuf_char_underflow
)
581 VTABLE_ADD_FUNC(basic_streambuf_char_uflow
)
582 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn
)
583 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn
)
584 VTABLE_ADD_FUNC(basic_streambuf_char_seekoff
)
585 VTABLE_ADD_FUNC(basic_streambuf_char_seekpos
)
586 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf
)
587 VTABLE_ADD_FUNC(basic_streambuf_char_sync
)
588 VTABLE_ADD_FUNC(basic_streambuf_char_imbue
));
589 __ASM_VTABLE(basic_streambuf_short
,
590 VTABLE_ADD_FUNC(basic_streambuf_wchar_vector_dtor
)
591 VTABLE_ADD_FUNC(basic_streambuf_wchar_overflow
)
592 VTABLE_ADD_FUNC(basic_streambuf_wchar_pbackfail
)
593 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc
)
594 VTABLE_ADD_FUNC(basic_streambuf_wchar_underflow
)
595 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow
)
596 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn
)
597 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn
)
598 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekoff
)
599 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekpos
)
600 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf
)
601 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync
)
602 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue
));
603 __ASM_VTABLE(basic_filebuf_char
,
604 VTABLE_ADD_FUNC(basic_filebuf_char_vector_dtor
)
605 VTABLE_ADD_FUNC(basic_filebuf_char_overflow
)
606 VTABLE_ADD_FUNC(basic_filebuf_char_pbackfail
)
607 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc
)
608 VTABLE_ADD_FUNC(basic_filebuf_char_underflow
)
609 VTABLE_ADD_FUNC(basic_filebuf_char_uflow
)
610 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn
)
611 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn
)
612 VTABLE_ADD_FUNC(basic_filebuf_char_seekoff
)
613 VTABLE_ADD_FUNC(basic_filebuf_char_seekpos
)
614 VTABLE_ADD_FUNC(basic_filebuf_char_setbuf
)
615 VTABLE_ADD_FUNC(basic_filebuf_char_sync
)
616 VTABLE_ADD_FUNC(basic_streambuf_char_imbue
));
617 __ASM_VTABLE(basic_filebuf_short
,
618 VTABLE_ADD_FUNC(basic_filebuf_short_vector_dtor
)
619 VTABLE_ADD_FUNC(basic_filebuf_short_overflow
)
620 VTABLE_ADD_FUNC(basic_filebuf_short_pbackfail
)
621 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc
)
622 VTABLE_ADD_FUNC(basic_filebuf_short_underflow
)
623 VTABLE_ADD_FUNC(basic_filebuf_short_uflow
)
624 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn
)
625 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn
)
626 VTABLE_ADD_FUNC(basic_filebuf_short_seekoff
)
627 VTABLE_ADD_FUNC(basic_filebuf_short_seekpos
)
628 VTABLE_ADD_FUNC(basic_filebuf_short_setbuf
)
629 VTABLE_ADD_FUNC(basic_filebuf_short_sync
)
630 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue
));
631 __ASM_VTABLE(basic_stringbuf_char
,
632 VTABLE_ADD_FUNC(basic_stringbuf_char_vector_dtor
)
633 VTABLE_ADD_FUNC(basic_stringbuf_char_overflow
)
634 VTABLE_ADD_FUNC(basic_stringbuf_char_pbackfail
)
635 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc
)
636 VTABLE_ADD_FUNC(basic_stringbuf_char_underflow
)
637 VTABLE_ADD_FUNC(basic_streambuf_char_uflow
)
638 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn
)
639 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn
)
640 VTABLE_ADD_FUNC(basic_stringbuf_char_seekoff
)
641 VTABLE_ADD_FUNC(basic_stringbuf_char_seekpos
)
642 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf
)
643 VTABLE_ADD_FUNC(basic_streambuf_char_sync
)
644 VTABLE_ADD_FUNC(basic_streambuf_char_imbue
));
645 __ASM_VTABLE(basic_stringbuf_short
,
646 VTABLE_ADD_FUNC(basic_stringbuf_short_vector_dtor
)
647 VTABLE_ADD_FUNC(basic_stringbuf_short_overflow
)
648 VTABLE_ADD_FUNC(basic_stringbuf_short_pbackfail
)
649 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc
)
650 VTABLE_ADD_FUNC(basic_stringbuf_short_underflow
)
651 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow
)
652 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn
)
653 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn
)
654 VTABLE_ADD_FUNC(basic_stringbuf_short_seekoff
)
655 VTABLE_ADD_FUNC(basic_stringbuf_short_seekpos
)
656 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf
)
657 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync
)
658 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue
));
659 __ASM_VTABLE(basic_ostream_char
,
660 VTABLE_ADD_FUNC(basic_ostream_char_vector_dtor
));
661 __ASM_VTABLE(basic_ostream_short
,
662 VTABLE_ADD_FUNC(basic_ostream_short_vector_dtor
));
663 __ASM_VTABLE(basic_istream_char
,
664 VTABLE_ADD_FUNC(basic_istream_char_vector_dtor
));
665 __ASM_VTABLE(basic_istream_short
,
666 VTABLE_ADD_FUNC(basic_istream_short_vector_dtor
));
667 __ASM_VTABLE(basic_iostream_char
,
668 VTABLE_ADD_FUNC(basic_iostream_char_vector_dtor
));
669 __ASM_VTABLE(basic_iostream_short
,
670 VTABLE_ADD_FUNC(basic_iostream_short_vector_dtor
));
671 __ASM_VTABLE(basic_ofstream_char
,
672 VTABLE_ADD_FUNC(basic_ofstream_char_vector_dtor
));
673 __ASM_VTABLE(basic_ofstream_short
,
674 VTABLE_ADD_FUNC(basic_ofstream_short_vector_dtor
));
675 __ASM_VTABLE(basic_ifstream_char
,
676 VTABLE_ADD_FUNC(basic_ifstream_char_vector_dtor
));
677 __ASM_VTABLE(basic_ifstream_short
,
678 VTABLE_ADD_FUNC(basic_ifstream_short_vector_dtor
));
679 __ASM_VTABLE(basic_fstream_char
,
680 VTABLE_ADD_FUNC(basic_fstream_char_vector_dtor
));
681 __ASM_VTABLE(basic_fstream_short
,
682 VTABLE_ADD_FUNC(basic_fstream_short_vector_dtor
));
683 __ASM_VTABLE(basic_ostringstream_char
,
684 VTABLE_ADD_FUNC(basic_ostringstream_char_vector_dtor
));
685 __ASM_VTABLE(basic_ostringstream_short
,
686 VTABLE_ADD_FUNC(basic_ostringstream_short_vector_dtor
));
687 __ASM_VTABLE(basic_istringstream_char
,
688 VTABLE_ADD_FUNC(basic_istringstream_char_vector_dtor
));
689 __ASM_VTABLE(basic_istringstream_short
,
690 VTABLE_ADD_FUNC(basic_istringstream_short_vector_dtor
));
691 __ASM_VTABLE(basic_stringstream_char
,
692 VTABLE_ADD_FUNC(basic_stringstream_char_vector_dtor
));
693 __ASM_VTABLE(basic_stringstream_short
,
694 VTABLE_ADD_FUNC(basic_stringstream_short_vector_dtor
));
695 __ASM_VTABLE(strstreambuf
,
696 VTABLE_ADD_FUNC(strstreambuf_vector_dtor
)
697 VTABLE_ADD_FUNC(strstreambuf_overflow
)
698 VTABLE_ADD_FUNC(strstreambuf_pbackfail
)
699 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc
)
700 VTABLE_ADD_FUNC(strstreambuf_underflow
)
701 VTABLE_ADD_FUNC(basic_streambuf_char_uflow
)
702 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn
)
703 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn
)
704 VTABLE_ADD_FUNC(strstreambuf_seekoff
)
705 VTABLE_ADD_FUNC(strstreambuf_seekpos
)
706 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf
)
707 VTABLE_ADD_FUNC(basic_streambuf_char_sync
)
708 VTABLE_ADD_FUNC(basic_streambuf_char_imbue
));
709 __ASM_VTABLE(ostrstream
,
710 VTABLE_ADD_FUNC(ostrstream_vector_dtor
));
711 __ASM_VTABLE(strstream
,
712 VTABLE_ADD_FUNC(strstream_vector_dtor
));
715 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
716 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
717 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp_next
, 16)
718 void __thiscall
basic_streambuf_char_setp_next(basic_streambuf_char
*this, char *first
, char *next
, char *last
)
720 TRACE("(%p %p %p %p)\n", this, first
, next
, last
);
724 this->wsize
= last
-next
;
727 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD0@Z */
728 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD0@Z */
729 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp
, 12)
730 void __thiscall
basic_streambuf_char_setp(basic_streambuf_char
*this, char *first
, char *last
)
732 basic_streambuf_char_setp_next(this, first
, first
, last
);
735 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
736 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
737 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setg
, 16)
738 void __thiscall
basic_streambuf_char_setg(basic_streambuf_char
*this, char *first
, char *next
, char *last
)
740 TRACE("(%p %p %p %p)\n", this, first
, next
, last
);
744 this->rsize
= last
-next
;
747 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXXZ */
748 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXXZ */
749 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init_empty
, 4)
750 void __thiscall
basic_streambuf_char__Init_empty(basic_streambuf_char
*this)
752 TRACE("(%p)\n", this);
754 this->prbuf
= &this->rbuf
;
755 this->pwbuf
= &this->wbuf
;
756 this->prpos
= &this->rpos
;
757 this->pwpos
= &this->wpos
;
758 this->prsize
= &this->rsize
;
759 this->pwsize
= &this->wsize
;
761 basic_streambuf_char_setp(this, NULL
, NULL
);
762 basic_streambuf_char_setg(this, NULL
, NULL
, NULL
);
765 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@W4_Uninitialized@1@@Z */
766 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
767 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor_uninitialized
, 8)
768 basic_streambuf_char
* __thiscall
basic_streambuf_char_ctor_uninitialized(basic_streambuf_char
*this, int uninitialized
)
770 TRACE("(%p %d)\n", this, uninitialized
);
771 this->vtable
= &basic_streambuf_char_vtable
;
775 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@XZ */
776 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@XZ */
777 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor
, 4)
778 basic_streambuf_char
* __thiscall
basic_streambuf_char_ctor(basic_streambuf_char
*this)
780 TRACE("(%p)\n", this);
782 this->vtable
= &basic_streambuf_char_vtable
;
783 locale_ctor(IOS_LOCALE(this));
784 basic_streambuf_char__Init_empty(this);
789 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
790 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
791 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_dtor
, 4)
792 void __thiscall
basic_streambuf_char_dtor(basic_streambuf_char
*this)
794 TRACE("(%p)\n", this);
795 locale_dtor(IOS_LOCALE(this));
798 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_vector_dtor
, 8)
799 basic_streambuf_char
* __thiscall
basic_streambuf_char_vector_dtor(basic_streambuf_char
*this, unsigned int flags
)
801 TRACE("(%p %x)\n", this, flags
);
803 /* we have an array, with the number of elements stored before the first object */
804 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
806 for(i
=*ptr
-1; i
>=0; i
--)
807 basic_streambuf_char_dtor(this+i
);
808 operator_delete(ptr
);
810 basic_streambuf_char_dtor(this);
812 operator_delete(this);
818 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
819 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
820 static streamsize
basic_streambuf_char__Gnavail(const basic_streambuf_char
*this)
822 TRACE("(%p)\n", this);
823 return *this->prpos
? *this->prsize
: 0;
826 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
827 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
828 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gndec
, 4)
829 char* __thiscall
basic_streambuf_char__Gndec(basic_streambuf_char
*this)
831 TRACE("(%p)\n", this);
837 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
838 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
839 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gninc
, 4)
840 char* __thiscall
basic_streambuf_char__Gninc(basic_streambuf_char
*this)
842 TRACE("(%p)\n", this);
844 return (*this->prpos
)++;
847 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
848 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
849 static char* basic_streambuf_char__Gnpreinc(basic_streambuf_char
*this)
851 TRACE("(%p)\n", this);
857 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAPAD0PAH001@Z */
858 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAPEAD0PEAH001@Z */
859 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init
, 28)
860 void __thiscall
basic_streambuf_char__Init(basic_streambuf_char
*this, char **gf
, char **gn
, int *gc
, char **pf
, char **pn
, int *pc
)
862 TRACE("(%p %p %p %p %p %p %p)\n", this, gf
, gn
, gc
, pf
, pn
, pc
);
872 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
873 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
874 static streamsize
basic_streambuf_char__Pnavail(const basic_streambuf_char
*this)
876 TRACE("(%p)\n", this);
877 return *this->pwpos
? *this->pwsize
: 0;
880 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
881 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
882 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Pninc
, 4)
883 char* __thiscall
basic_streambuf_char__Pninc(basic_streambuf_char
*this)
885 TRACE("(%p)\n", this);
887 return (*this->pwpos
)++;
890 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
891 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
892 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_underflow
, 4)
893 #define call_basic_streambuf_char_underflow(this) CALL_VTBL_FUNC(this, 16, int, (basic_streambuf_char*), (this))
894 int __thiscall
basic_streambuf_char_underflow(basic_streambuf_char
*this)
896 TRACE("(%p)\n", this);
900 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
901 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
902 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_uflow
, 4)
903 #define call_basic_streambuf_char_uflow(this) CALL_VTBL_FUNC(this, 20, int, (basic_streambuf_char*), (this))
904 int __thiscall
basic_streambuf_char_uflow(basic_streambuf_char
*this)
908 TRACE("(%p)\n", this);
910 if(call_basic_streambuf_char_underflow(this)==EOF
)
913 ret
= (unsigned char)**this->prpos
;
919 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
920 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
921 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_eback
, 4)
922 char* __thiscall
basic_streambuf_char_eback(const basic_streambuf_char
*this)
924 TRACE("(%p)\n", this);
928 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
929 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
930 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gptr
, 4)
931 char* __thiscall
basic_streambuf_char_gptr(const basic_streambuf_char
*this)
933 TRACE("(%p)\n", this);
937 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
938 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
939 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_egptr
, 4)
940 char* __thiscall
basic_streambuf_char_egptr(const basic_streambuf_char
*this)
942 TRACE("(%p)\n", this);
943 return *this->prpos
+*this->prsize
;
946 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
947 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
948 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_epptr
, 4)
949 char* __thiscall
basic_streambuf_char_epptr(const basic_streambuf_char
*this)
951 TRACE("(%p)\n", this);
952 return *this->pwpos
+*this->pwsize
;
955 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
956 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
957 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gbump
, 8)
958 void __thiscall
basic_streambuf_char_gbump(basic_streambuf_char
*this, int off
)
960 TRACE("(%p %d)\n", this, off
);
962 *this->prsize
-= off
;
965 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@XZ */
966 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QBE?AVlocale@2@XZ */
967 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@XZ */
968 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEBA?AVlocale@2@XZ */
969 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_getloc
, 8)
970 locale
* __thiscall
basic_streambuf_char_getloc(const basic_streambuf_char
*this, locale
*ret
)
972 TRACE("(%p)\n", this);
973 return locale_copy_ctor(ret
, IOS_LOCALE(this));
976 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
977 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */
978 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_imbue
, 8)
979 #define call_basic_streambuf_char_imbue(this, loc) CALL_VTBL_FUNC(this, 48, void, (basic_streambuf_char*, const locale*), (this, loc))
980 void __thiscall
basic_streambuf_char_imbue(basic_streambuf_char
*this, const locale
*loc
)
982 TRACE("(%p %p)\n", this, loc
);
985 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
986 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
987 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_overflow
, 8)
988 #define call_basic_streambuf_char_overflow(this, ch) CALL_VTBL_FUNC(this, 4, int, (basic_streambuf_char*, int), (this, ch))
989 int __thiscall
basic_streambuf_char_overflow(basic_streambuf_char
*this, int ch
)
991 TRACE("(%p %d)\n", this, ch
);
995 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
996 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
997 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbackfail
, 8)
998 #define call_basic_streambuf_char_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, int, (basic_streambuf_char*, int), (this, ch))
999 int __thiscall
basic_streambuf_char_pbackfail(basic_streambuf_char
*this, int ch
)
1001 TRACE("(%p %d)\n", this, ch
);
1005 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1006 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1007 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbase
, 4)
1008 char* __thiscall
basic_streambuf_char_pbase(const basic_streambuf_char
*this)
1010 TRACE("(%p)\n", this);
1011 return *this->pwbuf
;
1014 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
1015 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
1016 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbump
, 8)
1017 void __thiscall
basic_streambuf_char_pbump(basic_streambuf_char
*this, int off
)
1019 TRACE("(%p %d)\n", this, off
);
1020 *this->pwpos
+= off
;
1021 *this->pwsize
-= off
;
1024 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1025 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1026 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pptr
, 4)
1027 char* __thiscall
basic_streambuf_char_pptr(const basic_streambuf_char
*this)
1029 TRACE("(%p)\n", this);
1030 return *this->pwpos
;
1033 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1034 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1035 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubimbue
, 12)
1036 locale
* __thiscall
basic_streambuf_char_pubimbue(basic_streambuf_char
*this, locale
*ret
, const locale
*loc
)
1038 TRACE("(%p %p)\n", this, loc
);
1039 memcpy(ret
, IOS_LOCALE(this), sizeof(locale
));
1040 call_basic_streambuf_char_imbue(this, loc
);
1041 locale_copy_ctor(IOS_LOCALE(this), loc
);
1045 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
1046 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
1047 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1048 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1049 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekoff
, 20)
1050 #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))
1051 fpos_int
* __thiscall
basic_streambuf_char_seekoff(basic_streambuf_char
*this,
1052 fpos_int
*ret
, streamoff off
, int way
, int mode
)
1054 TRACE("(%p %Id %d %d)\n", this, off
, way
, mode
);
1061 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
1062 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
1063 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JFF@Z */
1064 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JFF@Z */
1065 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
1066 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
1067 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekoff
, 20)
1068 fpos_int
* __thiscall
basic_streambuf_char_pubseekoff(basic_streambuf_char
*this,
1069 fpos_int
*ret
, streamoff off
, int way
, int mode
)
1071 TRACE("(%p %Id %d %d)\n", this, off
, way
, mode
);
1072 return call_basic_streambuf_char_seekoff(this, ret
, off
, way
, mode
);
1075 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
1076 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
1077 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekpos
, 36)
1078 #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))
1079 fpos_int
* __thiscall
basic_streambuf_char_seekpos(basic_streambuf_char
*this,
1080 fpos_int
*ret
, fpos_int pos
, int mode
)
1082 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
1089 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
1090 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
1091 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekpos
, 36)
1092 fpos_int
* __thiscall
basic_streambuf_char_pubseekpos(basic_streambuf_char
*this,
1093 fpos_int
*ret
, fpos_int pos
, int mode
)
1095 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
1096 return call_basic_streambuf_char_seekpos(this, ret
, pos
, mode
);
1099 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEPAV12@PADH@Z */
1100 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAPEAV12@PEAD_J@Z */
1101 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setbuf
, 12)
1102 #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))
1103 basic_streambuf_char
* __thiscall
basic_streambuf_char_setbuf(basic_streambuf_char
*this, char *buf
, streamsize count
)
1105 TRACE("(%p %p %Id)\n", this, buf
, count
);
1109 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PADH@Z */
1110 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEAD_J@Z */
1111 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsetbuf
, 12)
1112 basic_streambuf_char
* __thiscall
basic_streambuf_char_pubsetbuf(basic_streambuf_char
*this, char *buf
, streamsize count
)
1114 TRACE("(%p %p %Id)\n", this, buf
, count
);
1115 return call_basic_streambuf_char_setbuf(this, buf
, count
);
1118 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1119 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
1120 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sync
, 4)
1121 #define call_basic_streambuf_char_sync(this) CALL_VTBL_FUNC(this, 44, int, (basic_streambuf_char*), (this))
1122 int __thiscall
basic_streambuf_char_sync(basic_streambuf_char
*this)
1124 TRACE("(%p)\n", this);
1128 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1129 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1130 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsync
, 4)
1131 int __thiscall
basic_streambuf_char_pubsync(basic_streambuf_char
*this)
1133 TRACE("(%p)\n", this);
1134 return call_basic_streambuf_char_sync(this);
1137 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADH@Z */
1138 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_J@Z */
1139 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsgetn
, 12)
1140 #define call_basic_streambuf_char_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, streamsize, (basic_streambuf_char*, char*, streamsize), (this, ptr, count))
1141 streamsize __thiscall
basic_streambuf_char_xsgetn(basic_streambuf_char
*this, char *ptr
, streamsize count
)
1143 streamsize copied
, chunk
;
1146 TRACE("(%p %p %Id)\n", this, ptr
, count
);
1148 for(copied
=0; copied
<count
;) {
1149 chunk
= basic_streambuf_char__Gnavail(this);
1150 if(chunk
> count
-copied
)
1151 chunk
= count
-copied
;
1154 memcpy(ptr
+copied
, *this->prpos
, chunk
);
1155 *this->prpos
+= chunk
;
1156 *this->prsize
-= chunk
;
1158 }else if((c
= call_basic_streambuf_char_uflow(this)) != EOF
) {
1169 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
1170 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
1171 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetn
, 12)
1172 streamsize __thiscall
basic_streambuf_char_sgetn(basic_streambuf_char
*this, char *ptr
, streamsize count
)
1174 TRACE("(%p %p %Id)\n", this, ptr
, count
);
1175 return call_basic_streambuf_char_xsgetn(this, ptr
, count
);
1178 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1179 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JXZ */
1180 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_showmanyc
, 4)
1181 #define call_basic_streambuf_char_showmanyc(this) CALL_VTBL_FUNC(this, 12, streamsize, (basic_streambuf_char*), (this))
1182 streamsize __thiscall
basic_streambuf_char_showmanyc(basic_streambuf_char
*this)
1184 TRACE("(%p)\n", this);
1188 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1189 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JXZ */
1190 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_in_avail
, 4)
1191 streamsize __thiscall
basic_streambuf_char_in_avail(basic_streambuf_char
*this)
1195 TRACE("(%p)\n", this);
1197 ret
= basic_streambuf_char__Gnavail(this);
1198 return ret
? ret
: call_basic_streambuf_char_showmanyc(this);
1201 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
1202 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
1203 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputbackc
, 8)
1204 int __thiscall
basic_streambuf_char_sputbackc(basic_streambuf_char
*this, char ch
)
1206 TRACE("(%p %d)\n", this, ch
);
1207 if(*this->prpos
&& *this->prpos
>*this->prbuf
&& (*this->prpos
)[-1]==ch
) {
1210 return (unsigned char)ch
;
1213 return call_basic_streambuf_char_pbackfail(this, (unsigned char)ch
);
1216 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
1217 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
1218 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputc
, 8)
1219 int __thiscall
basic_streambuf_char_sputc(basic_streambuf_char
*this, char ch
)
1221 TRACE("(%p %d)\n", this, ch
);
1222 return basic_streambuf_char__Pnavail(this) ?
1223 (unsigned char)(*basic_streambuf_char__Pninc(this) = ch
) :
1224 call_basic_streambuf_char_overflow(this, (unsigned char)ch
);
1227 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1228 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1229 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sungetc
, 4)
1230 int __thiscall
basic_streambuf_char_sungetc(basic_streambuf_char
*this)
1232 TRACE("(%p)\n", this);
1233 if(*this->prpos
&& *this->prpos
>*this->prbuf
) {
1236 return (unsigned char)**this->prpos
;
1239 return call_basic_streambuf_char_pbackfail(this, EOF
);
1242 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1243 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1244 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_stossc
, 4)
1245 void __thiscall
basic_streambuf_char_stossc(basic_streambuf_char
*this)
1247 TRACE("(%p)\n", this);
1248 if(basic_streambuf_char__Gnavail(this))
1249 basic_streambuf_char__Gninc(this);
1251 call_basic_streambuf_char_uflow(this);
1254 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1255 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1256 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sbumpc
, 4)
1257 int __thiscall
basic_streambuf_char_sbumpc(basic_streambuf_char
*this)
1259 TRACE("(%p)\n", this);
1260 return basic_streambuf_char__Gnavail(this) ?
1261 (int)(unsigned char)*basic_streambuf_char__Gninc(this) : call_basic_streambuf_char_uflow(this);
1264 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1265 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1266 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetc
, 4)
1267 int __thiscall
basic_streambuf_char_sgetc(basic_streambuf_char
*this)
1269 TRACE("(%p)\n", this);
1270 return basic_streambuf_char__Gnavail(this) ?
1271 (int)(unsigned char)*basic_streambuf_char_gptr(this) : call_basic_streambuf_char_underflow(this);
1274 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1275 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1276 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_snextc
, 4)
1277 int __thiscall
basic_streambuf_char_snextc(basic_streambuf_char
*this)
1279 TRACE("(%p)\n", this);
1281 if(basic_streambuf_char__Gnavail(this) > 1)
1282 return (unsigned char)*basic_streambuf_char__Gnpreinc(this);
1283 return basic_streambuf_char_sbumpc(this)==EOF
?
1284 EOF
: basic_streambuf_char_sgetc(this);
1287 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPBDH@Z */
1288 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEBD_J@Z */
1289 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsputn
, 12)
1290 #define call_basic_streambuf_char_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 28, streamsize, (basic_streambuf_char*, const char*, streamsize), (this, ptr, count))
1291 streamsize __thiscall
basic_streambuf_char_xsputn(basic_streambuf_char
*this, const char *ptr
, streamsize count
)
1293 streamsize copied
, chunk
;
1295 TRACE("(%p %p %Id)\n", this, ptr
, count
);
1297 for(copied
=0; copied
<count
;) {
1298 chunk
= basic_streambuf_char__Pnavail(this);
1299 if(chunk
> count
-copied
)
1300 chunk
= count
-copied
;
1303 memcpy(*this->pwpos
, ptr
+copied
, chunk
);
1304 *this->pwpos
+= chunk
;
1305 *this->pwsize
-= chunk
;
1307 }else if(call_basic_streambuf_char_overflow(this, (unsigned char)ptr
[copied
]) != EOF
) {
1317 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z */
1318 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEBD_J@Z */
1319 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputn
, 12)
1320 streamsize __thiscall
basic_streambuf_char_sputn(basic_streambuf_char
*this, const char *ptr
, streamsize count
)
1322 TRACE("(%p %p %Id)\n", this, ptr
, count
);
1323 return call_basic_streambuf_char_xsputn(this, ptr
, count
);
1326 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
1327 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1328 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp_next
, 16)
1329 void __thiscall
basic_streambuf_wchar_setp_next(basic_streambuf_wchar
*this, wchar_t *first
, wchar_t *next
, wchar_t *last
)
1331 TRACE("(%p %p %p %p)\n", this, first
, next
, last
);
1335 this->wsize
= last
-next
;
1338 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG0@Z */
1339 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG0@Z */
1340 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp
, 12)
1341 void __thiscall
basic_streambuf_wchar_setp(basic_streambuf_wchar
*this, wchar_t *first
, wchar_t *last
)
1343 basic_streambuf_wchar_setp_next(this, first
, first
, last
);
1346 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
1347 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1348 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setg
, 16)
1349 void __thiscall
basic_streambuf_wchar_setg(basic_streambuf_wchar
*this, wchar_t *first
, wchar_t *next
, wchar_t *last
)
1351 TRACE("(%p %p %p %p)\n", this, first
, next
, last
);
1355 this->rsize
= last
-next
;
1358 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXXZ */
1359 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXXZ */
1360 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init_empty
, 4)
1361 void __thiscall
basic_streambuf_wchar__Init_empty(basic_streambuf_wchar
*this)
1363 TRACE("(%p)\n", this);
1365 this->prbuf
= &this->rbuf
;
1366 this->pwbuf
= &this->wbuf
;
1367 this->prpos
= &this->rpos
;
1368 this->pwpos
= &this->wpos
;
1369 this->prsize
= &this->rsize
;
1370 this->pwsize
= &this->wsize
;
1372 basic_streambuf_wchar_setp(this, NULL
, NULL
);
1373 basic_streambuf_wchar_setg(this, NULL
, NULL
, NULL
);
1376 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@W4_Uninitialized@1@@Z */
1377 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
1378 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor_uninitialized
, 8)
1379 basic_streambuf_wchar
* __thiscall
basic_streambuf_short_ctor_uninitialized(basic_streambuf_wchar
*this, int uninitialized
)
1381 TRACE("(%p %d)\n", this, uninitialized
);
1382 this->vtable
= &basic_streambuf_short_vtable
;
1386 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@XZ */
1387 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@XZ */
1388 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor
, 4)
1389 basic_streambuf_wchar
* __thiscall
basic_streambuf_short_ctor(basic_streambuf_wchar
*this)
1391 TRACE("(%p)\n", this);
1393 this->vtable
= &basic_streambuf_short_vtable
;
1394 locale_ctor(IOS_LOCALE(this));
1395 basic_streambuf_wchar__Init_empty(this);
1400 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UAE@XZ */
1401 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */
1402 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_dtor
, 4)
1403 void __thiscall
basic_streambuf_wchar_dtor(basic_streambuf_wchar
*this)
1405 TRACE("(%p)\n", this);
1406 locale_dtor(IOS_LOCALE(this));
1409 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_vector_dtor
, 8)
1410 basic_streambuf_wchar
* __thiscall
basic_streambuf_wchar_vector_dtor(basic_streambuf_wchar
*this, unsigned int flags
)
1412 TRACE("(%p %x)\n", this, flags
);
1414 /* we have an array, with the number of elements stored before the first object */
1415 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1417 for(i
=*ptr
-1; i
>=0; i
--)
1418 basic_streambuf_wchar_dtor(this+i
);
1419 operator_delete(ptr
);
1421 basic_streambuf_wchar_dtor(this);
1423 operator_delete(this);
1429 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1430 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1431 static streamsize
basic_streambuf_wchar__Gnavail(const basic_streambuf_wchar
*this)
1433 TRACE("(%p)\n", this);
1434 return *this->prpos
? *this->prsize
: 0;
1437 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1438 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1439 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gndec
, 4)
1440 wchar_t* __thiscall
basic_streambuf_wchar__Gndec(basic_streambuf_wchar
*this)
1442 TRACE("(%p)\n", this);
1445 return *this->prpos
;
1448 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1449 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1450 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gninc
, 4)
1451 wchar_t* __thiscall
basic_streambuf_wchar__Gninc(basic_streambuf_wchar
*this)
1453 TRACE("(%p)\n", this);
1455 return (*this->prpos
)++;
1458 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1459 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1460 static wchar_t* basic_streambuf_wchar__Gnpreinc(basic_streambuf_wchar
*this)
1462 TRACE("(%p)\n", this);
1465 return *this->prpos
;
1468 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAPAG0PAH001@Z */
1469 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAPEAG0PEAH001@Z */
1470 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init
, 28)
1471 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
)
1473 TRACE("(%p %p %p %p %p %p %p)\n", this, gf
, gn
, gc
, pf
, pn
, pc
);
1483 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1484 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1485 static streamsize
basic_streambuf_wchar__Pnavail(const basic_streambuf_wchar
*this)
1487 TRACE("(%p)\n", this);
1488 return *this->pwpos
? *this->pwsize
: 0;
1491 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1492 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1493 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Pninc
, 4)
1494 wchar_t* __thiscall
basic_streambuf_wchar__Pninc(basic_streambuf_wchar
*this)
1496 TRACE("(%p)\n", this);
1498 return (*this->pwpos
)++;
1501 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1502 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1503 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_underflow
, 4)
1504 #define call_basic_streambuf_wchar_underflow(this) CALL_VTBL_FUNC(this, 16, unsigned short, (basic_streambuf_wchar*), (this))
1505 unsigned short __thiscall
basic_streambuf_wchar_underflow(basic_streambuf_wchar
*this)
1507 TRACE("(%p)\n", this);
1511 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1512 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1513 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_uflow
, 4)
1514 #define call_basic_streambuf_wchar_uflow(this) CALL_VTBL_FUNC(this, 20, unsigned short, (basic_streambuf_wchar*), (this))
1515 unsigned short __thiscall
basic_streambuf_wchar_uflow(basic_streambuf_wchar
*this)
1519 TRACE("(%p)\n", this);
1521 if(call_basic_streambuf_wchar_underflow(this)==WEOF
)
1524 ret
= **this->prpos
;
1530 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1531 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1532 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_eback
, 4)
1533 wchar_t* __thiscall
basic_streambuf_wchar_eback(const basic_streambuf_wchar
*this)
1535 TRACE("(%p)\n", this);
1536 return *this->prbuf
;
1539 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1540 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1541 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gptr
, 4)
1542 wchar_t* __thiscall
basic_streambuf_wchar_gptr(const basic_streambuf_wchar
*this)
1544 TRACE("(%p)\n", this);
1545 return *this->prpos
;
1548 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1549 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1550 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_egptr
, 4)
1551 wchar_t* __thiscall
basic_streambuf_wchar_egptr(const basic_streambuf_wchar
*this)
1553 TRACE("(%p)\n", this);
1554 return *this->prpos
+*this->prsize
;
1557 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1558 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1559 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_epptr
, 4)
1560 wchar_t* __thiscall
basic_streambuf_wchar_epptr(const basic_streambuf_wchar
*this)
1562 TRACE("(%p)\n", this);
1563 return *this->pwpos
+*this->pwsize
;
1566 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
1567 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
1568 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gbump
, 8)
1569 void __thiscall
basic_streambuf_wchar_gbump(basic_streambuf_wchar
*this, int off
)
1571 TRACE("(%p %d)\n", this, off
);
1572 *this->prpos
+= off
;
1573 *this->prsize
-= off
;
1576 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEXABVlocale@2@@Z */
1577 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAXAEBVlocale@2@@Z */
1578 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_imbue
, 8)
1579 #define call_basic_streambuf_wchar_imbue(this, loc) CALL_VTBL_FUNC(this, 48, void, (basic_streambuf_wchar*, const locale*), (this, loc))
1580 void __thiscall
basic_streambuf_wchar_imbue(basic_streambuf_wchar
*this, const locale
*loc
)
1582 TRACE("(%p %p)\n", this, loc
);
1585 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1586 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1587 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_overflow
, 8)
1588 #define call_basic_streambuf_wchar_overflow(this, ch) CALL_VTBL_FUNC(this, 4, unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1589 unsigned short __thiscall
basic_streambuf_wchar_overflow(basic_streambuf_wchar
*this, unsigned short ch
)
1591 TRACE("(%p %d)\n", this, ch
);
1595 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1596 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1597 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbackfail
, 8)
1598 #define call_basic_streambuf_wchar_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1599 unsigned short __thiscall
basic_streambuf_wchar_pbackfail(basic_streambuf_wchar
*this, unsigned short ch
)
1601 TRACE("(%p %d)\n", this, ch
);
1605 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1606 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1607 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbase
, 4)
1608 wchar_t* __thiscall
basic_streambuf_wchar_pbase(const basic_streambuf_wchar
*this)
1610 TRACE("(%p)\n", this);
1611 return *this->pwbuf
;
1614 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
1615 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
1616 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbump
, 8)
1617 void __thiscall
basic_streambuf_wchar_pbump(basic_streambuf_wchar
*this, int off
)
1619 TRACE("(%p %d)\n", this, off
);
1620 *this->pwpos
+= off
;
1621 *this->pwsize
-= off
;
1624 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1625 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1626 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pptr
, 4)
1627 wchar_t* __thiscall
basic_streambuf_wchar_pptr(const basic_streambuf_wchar
*this)
1629 TRACE("(%p)\n", this);
1630 return *this->pwpos
;
1633 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1634 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1635 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubimbue
, 12)
1636 locale
* __thiscall
basic_streambuf_wchar_pubimbue(basic_streambuf_wchar
*this, locale
*ret
, const locale
*loc
)
1638 TRACE("(%p %p)\n", this, loc
);
1639 memcpy(ret
, IOS_LOCALE(this), sizeof(locale
));
1640 call_basic_streambuf_wchar_imbue(this, loc
);
1641 locale_copy_ctor(IOS_LOCALE(this), loc
);
1645 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
1646 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
1647 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1648 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1649 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekoff
, 20)
1650 #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))
1651 fpos_int
* __thiscall
basic_streambuf_wchar_seekoff(basic_streambuf_wchar
*this,
1652 fpos_int
*ret
, streamoff off
, int way
, int mode
)
1654 TRACE("(%p %Id %d %d)\n", this, off
, way
, mode
);
1661 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
1662 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
1663 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JFF@Z */
1664 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JFF@Z */
1665 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
1666 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JW4seekdir@ioos_base@2@H@Z */
1667 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekoff
, 20)
1668 fpos_int
* __thiscall
basic_streambuf_wchar_pubseekoff(basic_streambuf_wchar
*this,
1669 fpos_int
*ret
, streamoff off
, int way
, int mode
)
1671 TRACE("(%p %Id %d %d)\n", this, off
, way
, mode
);
1672 return call_basic_streambuf_wchar_seekoff(this, ret
, off
, way
, mode
);
1675 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
1676 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
1677 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekpos
, 36)
1678 #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))
1679 fpos_int
* __thiscall
basic_streambuf_wchar_seekpos(basic_streambuf_wchar
*this,
1680 fpos_int
*ret
, fpos_int pos
, int mode
)
1682 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
1689 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
1690 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
1691 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos
, 36)
1692 fpos_int
* __thiscall
basic_streambuf_wchar_pubseekpos(basic_streambuf_wchar
*this,
1693 fpos_int
*ret
, fpos_int pos
, int mode
)
1695 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
1696 return call_basic_streambuf_wchar_seekpos(this, ret
, pos
, mode
);
1699 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEPAV12@PAGH@Z */
1700 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAPEAV12@PEAG_J@Z */
1701 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setbuf
, 12)
1702 #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))
1703 basic_streambuf_wchar
* __thiscall
basic_streambuf_wchar_setbuf(basic_streambuf_wchar
*this, wchar_t *buf
, streamsize count
)
1705 TRACE("(%p %p %Id)\n", this, buf
, count
);
1709 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PAGH@Z */
1710 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEAG_J@Z */
1711 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsetbuf
, 12)
1712 basic_streambuf_wchar
* __thiscall
basic_streambuf_wchar_pubsetbuf(basic_streambuf_wchar
*this, wchar_t *buf
, streamsize count
)
1714 TRACE("(%p %p %Id)\n", this, buf
, count
);
1715 return call_basic_streambuf_wchar_setbuf(this, buf
, count
);
1718 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
1719 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */
1720 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sync
, 4)
1721 #define call_basic_streambuf_wchar_sync(this) CALL_VTBL_FUNC(this, 44, int, (basic_streambuf_wchar*), (this))
1722 int __thiscall
basic_streambuf_wchar_sync(basic_streambuf_wchar
*this)
1724 TRACE("(%p)\n", this);
1728 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
1729 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHXZ */
1730 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsync
, 4)
1731 int __thiscall
basic_streambuf_wchar_pubsync(basic_streambuf_wchar
*this)
1733 TRACE("(%p)\n", this);
1734 return call_basic_streambuf_wchar_sync(this);
1737 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGH@Z */
1738 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_J@Z */
1739 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsgetn
, 12)
1740 #define call_basic_streambuf_wchar_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, streamsize, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, ptr, count))
1741 streamsize __thiscall
basic_streambuf_wchar_xsgetn(basic_streambuf_wchar
*this, wchar_t *ptr
, streamsize count
)
1743 streamsize copied
, chunk
;
1746 TRACE("(%p %p %Id)\n", this, ptr
, count
);
1748 for(copied
=0; copied
<count
;) {
1749 chunk
= basic_streambuf_wchar__Gnavail(this);
1750 if(chunk
> count
-copied
)
1751 chunk
= count
-copied
;
1754 memcpy(ptr
+copied
, *this->prpos
, chunk
*sizeof(wchar_t));
1755 *this->prpos
+= chunk
;
1756 *this->prsize
-= chunk
;
1758 }else if((c
= call_basic_streambuf_wchar_uflow(this)) != WEOF
) {
1769 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */
1770 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */
1771 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetn
, 12)
1772 streamsize __thiscall
basic_streambuf_wchar_sgetn(basic_streambuf_wchar
*this, wchar_t *ptr
, streamsize count
)
1774 TRACE("(%p %p %Id)\n", this, ptr
, count
);
1775 return call_basic_streambuf_wchar_xsgetn(this, ptr
, count
);
1778 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
1779 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JXZ */
1780 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_showmanyc
, 4)
1781 #define call_basic_streambuf_wchar_showmanyc(this) CALL_VTBL_FUNC(this, 12, streamsize, (basic_streambuf_wchar*), (this))
1782 streamsize __thiscall
basic_streambuf_wchar_showmanyc(basic_streambuf_wchar
*this)
1784 TRACE("(%p)\n", this);
1788 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
1789 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JXZ */
1790 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_in_avail
, 4)
1791 streamsize __thiscall
basic_streambuf_wchar_in_avail(basic_streambuf_wchar
*this)
1795 TRACE("(%p)\n", this);
1797 ret
= basic_streambuf_wchar__Gnavail(this);
1798 return ret
? ret
: call_basic_streambuf_wchar_showmanyc(this);
1801 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
1802 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
1803 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputbackc
, 8)
1804 unsigned short __thiscall
basic_streambuf_wchar_sputbackc(basic_streambuf_wchar
*this, wchar_t ch
)
1806 TRACE("(%p %d)\n", this, ch
);
1807 if(*this->prpos
&& *this->prpos
>*this->prbuf
&& (*this->prpos
)[-1]==ch
) {
1813 return call_basic_streambuf_wchar_pbackfail(this, ch
);
1816 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
1817 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHG@Z */
1818 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputc
, 8)
1819 unsigned short __thiscall
basic_streambuf_wchar_sputc(basic_streambuf_wchar
*this, wchar_t ch
)
1821 TRACE("(%p %d)\n", this, ch
);
1822 return basic_streambuf_wchar__Pnavail(this) ?
1823 (*basic_streambuf_wchar__Pninc(this) = ch
) :
1824 call_basic_streambuf_wchar_overflow(this, ch
);
1827 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1828 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1829 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sungetc
, 4)
1830 unsigned short __thiscall
basic_streambuf_wchar_sungetc(basic_streambuf_wchar
*this)
1832 TRACE("(%p)\n", this);
1833 if(*this->prpos
&& *this->prpos
>*this->prbuf
) {
1836 return **this->prpos
;
1839 return call_basic_streambuf_wchar_pbackfail(this, WEOF
);
1842 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1843 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1844 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_stossc
, 4)
1845 void __thiscall
basic_streambuf_wchar_stossc(basic_streambuf_wchar
*this)
1847 TRACE("(%p)\n", this);
1848 if(basic_streambuf_wchar__Gnavail(this))
1849 basic_streambuf_wchar__Gninc(this);
1851 call_basic_streambuf_wchar_uflow(this);
1854 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1855 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1856 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sbumpc
, 4)
1857 unsigned short __thiscall
basic_streambuf_wchar_sbumpc(basic_streambuf_wchar
*this)
1859 TRACE("(%p)\n", this);
1860 return basic_streambuf_wchar__Gnavail(this) ?
1861 *basic_streambuf_wchar__Gninc(this) : call_basic_streambuf_wchar_uflow(this);
1864 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1865 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1866 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetc
, 4)
1867 unsigned short __thiscall
basic_streambuf_wchar_sgetc(basic_streambuf_wchar
*this)
1869 TRACE("(%p)\n", this);
1870 return basic_streambuf_wchar__Gnavail(this) ?
1871 *basic_streambuf_wchar_gptr(this) : call_basic_streambuf_wchar_underflow(this);
1874 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1875 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1876 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_snextc
, 4)
1877 unsigned short __thiscall
basic_streambuf_wchar_snextc(basic_streambuf_wchar
*this)
1879 TRACE("(%p)\n", this);
1881 if(basic_streambuf_wchar__Gnavail(this) > 1)
1882 return *basic_streambuf_wchar__Gnpreinc(this);
1883 return basic_streambuf_wchar_sbumpc(this)==WEOF
?
1884 WEOF
: basic_streambuf_wchar_sgetc(this);
1887 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPBGH@Z */
1888 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEBG_J@Z */
1889 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsputn
, 12)
1890 #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))
1891 streamsize __thiscall
basic_streambuf_wchar_xsputn(basic_streambuf_wchar
*this, const wchar_t *ptr
, streamsize count
)
1893 streamsize copied
, chunk
;
1895 TRACE("(%p %p %Id)\n", this, ptr
, count
);
1897 for(copied
=0; copied
<count
;) {
1898 chunk
= basic_streambuf_wchar__Pnavail(this);
1899 if(chunk
> count
-copied
)
1900 chunk
= count
-copied
;
1903 memcpy(*this->pwpos
, ptr
+copied
, chunk
*sizeof(wchar_t));
1904 *this->pwpos
+= chunk
;
1905 *this->pwsize
-= chunk
;
1907 }else if(call_basic_streambuf_wchar_overflow(this, ptr
[copied
]) != WEOF
) {
1917 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPBGH@Z */
1918 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEBG_J@Z */
1919 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputn
, 12)
1920 streamsize __thiscall
basic_streambuf_wchar_sputn(basic_streambuf_wchar
*this, const wchar_t *ptr
, streamsize count
)
1922 TRACE("(%p %p %Id)\n", this, ptr
, count
);
1923 return call_basic_streambuf_wchar_xsputn(this, ptr
, count
);
1926 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
1927 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
1928 int basic_filebuf_char__Init__Stinit
= 0;
1930 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
1931 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
1932 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Init
, 12)
1933 void __thiscall
basic_filebuf_char__Init(basic_filebuf_char
*this, FILE *file
, basic_filebuf__Initfl which
)
1935 TRACE("(%p %p %d)\n", this, file
, which
);
1938 this->state0
= basic_filebuf_char__Init__Stinit
;
1939 this->state
= basic_filebuf_char__Init__Stinit
;
1940 if(which
== INITFL_new
)
1942 this->close
= (which
== INITFL_open
);
1945 basic_streambuf_char__Init_empty(&this->base
);
1947 basic_streambuf_char__Init(&this->base
, &file
->_base
, &file
->_ptr
,
1948 &file
->_cnt
, &file
->_base
, &file
->_ptr
, &file
->_cnt
);
1951 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXXZ */
1952 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXXZ */
1953 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Initcvt
, 4)
1954 void __thiscall
basic_filebuf_char__Initcvt(basic_filebuf_char
*this)
1956 codecvt_char
*cvt
= codecvt_char_use_facet(IOS_LOCALE(&this->base
));
1958 TRACE("(%p)\n", this);
1960 locale__Addfac(&this->loc
, &cvt
->base
.facet
, codecvt_char_id
.id
, LC_CTYPE
);
1961 if(codecvt_base_always_noconv(&cvt
->base
)) {
1964 this->str
= operator_new(sizeof(basic_string_char
));
1965 MSVCP_basic_string_char_ctor(this->str
);
1970 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@XZ */
1971 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@XZ */
1972 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_close
, 4)
1973 basic_filebuf_char
* __thiscall
basic_filebuf_char_close(basic_filebuf_char
*this)
1975 basic_filebuf_char
*ret
= this;
1977 TRACE("(%p)\n", this);
1979 if(!this->file
|| fclose(this->file
))
1982 basic_filebuf_char__Init(this, NULL
, INITFL_close
);
1986 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
1987 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
1988 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_file
, 8)
1989 basic_filebuf_char
* __thiscall
basic_filebuf_char_ctor_file(basic_filebuf_char
*this, FILE *file
)
1991 TRACE("(%p %p)\n", this, file
);
1993 basic_streambuf_char_ctor(&this->base
);
1994 this->base
.vtable
= &basic_filebuf_char_vtable
;
1996 locale_ctor(&this->loc
);
1997 basic_filebuf_char__Init(this, file
, INITFL_new
);
2001 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
2002 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
2003 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor
, 4)
2004 basic_filebuf_char
* __thiscall
basic_filebuf_char_ctor(basic_filebuf_char
*this)
2006 return basic_filebuf_char_ctor_file(this, NULL
);
2009 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
2010 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
2011 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_uninitialized
, 8)
2012 basic_filebuf_char
* __thiscall
basic_filebuf_char_ctor_uninitialized(basic_filebuf_char
*this, int uninitialized
)
2014 TRACE("(%p %d)\n", this, uninitialized
);
2016 basic_streambuf_char_ctor_uninitialized(&this->base
, 0);
2017 this->base
.vtable
= &basic_filebuf_char_vtable
;
2018 locale_ctor(&this->loc
);
2022 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
2023 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
2024 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_dtor
, 4)
2025 void __thiscall
basic_filebuf_char_dtor(basic_filebuf_char
*this)
2027 TRACE("(%p)\n", this);
2030 basic_filebuf_char_close(this);
2032 MSVCP_basic_string_char_dtor(this->str
);
2033 operator_delete(this->str
);
2035 locale_dtor(&this->loc
);
2036 basic_streambuf_char_dtor(&this->base
);
2039 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_vector_dtor
, 8)
2040 basic_filebuf_char
* __thiscall
basic_filebuf_char_vector_dtor(basic_filebuf_char
*this, unsigned int flags
)
2042 TRACE("(%p %x)\n", this, flags
);
2044 /* we have an array, with the number of elements stored before the first object */
2045 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
2047 for(i
=*ptr
-1; i
>=0; i
--)
2048 basic_filebuf_char_dtor(this+i
);
2049 operator_delete(ptr
);
2051 basic_filebuf_char_dtor(this);
2053 operator_delete(this);
2059 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QBE_NXZ */
2060 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
2061 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_is_open
, 4)
2062 bool __thiscall
basic_filebuf_char_is_open(const basic_filebuf_char
*this)
2064 TRACE("(%p)\n", this);
2065 return this->file
!= NULL
;
2068 /* ?_Fiopen@std@@YAPAU_iobuf@@PB_WHH@Z */
2069 /* ?_Fiopen@std@@YAPEAU_iobuf@@PEB_WHH@Z */
2070 static FILE* _Fiopen_wchar(const wchar_t *name
, int mode
, int prot
)
2072 static const struct {
2074 const wchar_t str
[4];
2075 const wchar_t str_bin
[4];
2077 {OPENMODE_out
, L
"w", L
"wb"},
2078 {OPENMODE_out
|OPENMODE_app
, L
"a", L
"ab"},
2079 {OPENMODE_app
, L
"a", L
"ab"},
2080 {OPENMODE_out
|OPENMODE_trunc
, L
"w", L
"wb"},
2081 {OPENMODE_in
, L
"r", L
"rb"},
2082 {OPENMODE_in
|OPENMODE_out
, L
"r+", L
"r+b"},
2083 {OPENMODE_in
|OPENMODE_out
|OPENMODE_trunc
, L
"w+", L
"w+b"},
2084 {OPENMODE_in
|OPENMODE_out
|OPENMODE_app
, L
"a+", L
"a+b"},
2085 {OPENMODE_in
|OPENMODE_app
, L
"a+", L
"a+b"}
2088 int real_mode
= mode
& ~(OPENMODE_ate
|OPENMODE__Nocreate
|OPENMODE__Noreplace
|OPENMODE_binary
);
2092 TRACE("(%s %d %d)\n", debugstr_w(name
), mode
, prot
);
2094 for(mode_idx
=0; mode_idx
<ARRAY_SIZE(str_mode
); mode_idx
++)
2095 if(str_mode
[mode_idx
].mode
== real_mode
)
2097 if(mode_idx
== ARRAY_SIZE(str_mode
))
2100 if((mode
& OPENMODE__Nocreate
) && !(f
= _wfopen(name
, L
"r")))
2105 if((mode
& OPENMODE__Noreplace
) && (mode
& (OPENMODE_out
|OPENMODE_app
))
2106 && (f
= _wfopen(name
, L
"r"))) {
2111 f
= _wfsopen(name
, (mode
& OPENMODE_binary
) ? str_mode
[mode_idx
].str_bin
2112 : str_mode
[mode_idx
].str
, prot
);
2116 if((mode
& OPENMODE_ate
) && fseek(f
, 0, SEEK_END
)) {
2124 /* ?__Fiopen@std@@YAPAU_iobuf@@PBDH@Z */
2125 /* ?__Fiopen@std@@YAPEAU_iobuf@@PEBDH@Z */
2126 FILE* __cdecl
___Fiopen(const char *name
, int mode
)
2128 wchar_t nameW
[FILENAME_MAX
];
2130 TRACE("(%p %d)\n", name
, mode
);
2132 if(!MultiByteToWideChar(CP_ACP
, 0, name
, -1, nameW
, FILENAME_MAX
-1))
2134 return _Fiopen_wchar(nameW
, mode
, _SH_DENYNO
);
2137 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDH@Z */
2138 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDH@Z */
2139 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDI@Z */
2140 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDI@Z */
2141 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_mode
, 12)
2142 basic_filebuf_char
* __thiscall
basic_filebuf_char_open_mode(basic_filebuf_char
*this, const char *name
, unsigned int mode
)
2146 TRACE("(%p %s %d)\n", this, name
, mode
);
2148 if(basic_filebuf_char_is_open(this))
2150 if(!(f
= ___Fiopen(name
, mode
)))
2153 basic_filebuf_char__Init(this, f
, INITFL_open
);
2154 basic_filebuf_char__Initcvt(this);
2158 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDF@Z */
2159 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDF@Z */
2160 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_mode_old
, 12)
2161 basic_filebuf_char
* __thiscall
basic_filebuf_char_open_mode_old(basic_filebuf_char
*this, const char *name
, short mode
)
2163 return basic_filebuf_char_open_mode(this, name
, mode
);
2166 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2167 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2168 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_overflow
, 8)
2169 int __thiscall
basic_filebuf_char_overflow(basic_filebuf_char
*this, int c
)
2171 char *ptr
, ch
= c
, *to_next
;
2172 const char *from_next
;
2176 TRACE("(%p %d)\n", this, c
);
2178 if(!basic_filebuf_char_is_open(this))
2184 return fwrite(&ch
, sizeof(char), 1, this->file
) ? c
: EOF
;
2187 MSVCP_basic_string_char_clear(this->str
);
2188 MSVCP_basic_string_char_append_len_ch(this->str
, 8, '\0');
2189 ptr
= this->str
->ptr
;
2190 ret
= codecvt_char_out(this->cvt
, &this->state
, from_next
, &ch
+1, &from_next
,
2191 ptr
, ptr
+MSVCP_basic_string_char_length(this->str
), &to_next
);
2194 case CODECVT_partial
:
2195 if(from_next
== &ch
)
2198 if(!fwrite(ptr
, to_next
-ptr
, 1, this->file
))
2201 case CODECVT_noconv
:
2202 return fwrite(&ch
, sizeof(char), 1, this->file
) ? c
: EOF
;
2208 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2209 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2210 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_pbackfail
, 8)
2211 int __thiscall
basic_filebuf_char_pbackfail(basic_filebuf_char
*this, int c
)
2213 TRACE("(%p %d)\n", this, c
);
2215 if(!basic_filebuf_char_is_open(this))
2218 if(basic_streambuf_char_gptr(&this->base
)>basic_streambuf_char_eback(&this->base
)
2219 && (c
==EOF
|| (int)(unsigned char)basic_streambuf_char_gptr(&this->base
)[-1]==c
)) {
2220 basic_streambuf_char__Gndec(&this->base
);
2221 return c
==EOF
? !c
: c
;
2222 }else if(c
== EOF
) {
2224 }else if(!this->cvt
) {
2225 return ungetc(c
, this->file
);
2226 }else if(MSVCP_basic_string_char_length(this->str
)) {
2230 b
= e
+this->str
->size
-1;
2231 for(cur
= b
; cur
>=e
; cur
--) {
2232 if(ungetc(*cur
, this->file
) == EOF
) {
2233 for(; cur
<=b
; cur
++)
2238 MSVCP_basic_string_char_clear(this->str
);
2239 this->state
= this->state0
;
2246 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2247 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2248 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_uflow
, 4)
2249 int __thiscall
basic_filebuf_char_uflow(basic_filebuf_char
*this)
2252 const char *buf_next
;
2255 TRACE("(%p)\n", this);
2257 if(!basic_filebuf_char_is_open(this))
2260 if(basic_streambuf_char_gptr(&this->base
) < basic_streambuf_char_egptr(&this->base
))
2261 return (unsigned char)*basic_streambuf_char__Gninc(&this->base
);
2263 c
= fgetc(this->file
);
2264 if(!this->cvt
|| c
==EOF
)
2267 MSVCP_basic_string_char_clear(this->str
);
2268 this->state0
= this->state
;
2270 MSVCP_basic_string_char_append_ch(this->str
, c
);
2271 this->state
= this->state0
;
2273 switch(codecvt_char_in(this->cvt
, &this->state
, this->str
->ptr
,
2274 this->str
->ptr
+this->str
->size
, &buf_next
, &ch
, &ch
+1, &to_next
)) {
2275 case CODECVT_partial
:
2277 case CODECVT_noconv
:
2278 return (unsigned char)this->str
->ptr
[0];
2280 return (unsigned char)ch
;
2285 c
= fgetc(this->file
);
2291 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2292 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2293 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_underflow
, 4)
2294 int __thiscall
basic_filebuf_char_underflow(basic_filebuf_char
*this)
2298 TRACE("(%p)\n", this);
2300 if(basic_streambuf_char_gptr(&this->base
) < basic_streambuf_char_egptr(&this->base
))
2301 return (unsigned char)*basic_streambuf_char_gptr(&this->base
);
2303 ret
= call_basic_streambuf_char_uflow(&this->base
);
2305 ret
= call_basic_streambuf_char_pbackfail(&this->base
, ret
);
2309 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
2310 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
2311 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
2312 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
2313 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekoff
, 20)
2314 fpos_int
* __thiscall
basic_filebuf_char_seekoff(basic_filebuf_char
*this,
2315 fpos_int
*ret
, streamoff off
, int way
, int mode
)
2319 TRACE("(%p %p %Id %d %d)\n", this, ret
, off
, way
, mode
);
2321 if(!basic_filebuf_char_is_open(this) || fseek(this->file
, off
, way
)) {
2328 fgetpos(this->file
, &pos
);
2331 ret
->state
= this->state
;
2335 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2336 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2337 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekpos
, 36)
2338 fpos_int
* __thiscall
basic_filebuf_char_seekpos(basic_filebuf_char
*this,
2339 fpos_int
*ret
, fpos_int pos
, int mode
)
2343 TRACE("(%p %p %s %d)\n", this, ret
, debugstr_fpos_int(&pos
), mode
);
2345 if(!basic_filebuf_char_is_open(this) || fseek(this->file
, (LONG
)pos
.pos
, SEEK_SET
)
2346 || (pos
.off
&& fseek(this->file
, pos
.off
, SEEK_CUR
))) {
2353 fgetpos(this->file
, &fpos
);
2356 ret
->state
= this->state
;
2360 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PADH@Z */
2361 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAD_J@Z */
2362 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_setbuf
, 12)
2363 basic_streambuf_char
* __thiscall
basic_filebuf_char_setbuf(basic_filebuf_char
*this, char *buf
, streamsize count
)
2365 TRACE("(%p %p %Id)\n", this, buf
, count
);
2367 if(!basic_filebuf_char_is_open(this))
2370 if(setvbuf(this->file
, buf
, (buf
==NULL
&& count
==0) ? _IONBF
: _IOFBF
, count
))
2373 basic_filebuf_char__Init(this, this->file
, INITFL_open
);
2377 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2378 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2379 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_sync
, 4)
2380 int __thiscall
basic_filebuf_char_sync(basic_filebuf_char
*this)
2382 TRACE("(%p)\n", this);
2384 if(!basic_filebuf_char_is_open(this))
2387 if(call_basic_streambuf_char_overflow(&this->base
, EOF
) == EOF
)
2389 return fflush(this->file
);
2392 /* ?_Stinit@?1??_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
2393 /* ?_Stinit@?1??_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
2394 int basic_filebuf_short__Init__Stinit
= 0;
2396 /* ?_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2397 /* ?_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2398 DEFINE_THISCALL_WRAPPER(basic_filebuf_short__Init
, 12)
2399 void __thiscall
basic_filebuf_short__Init(basic_filebuf_wchar
*this, FILE *file
, basic_filebuf__Initfl which
)
2401 TRACE("(%p %p %d)\n", this, file
, which
);
2404 this->state0
= basic_filebuf_short__Init__Stinit
;
2405 this->state
= basic_filebuf_short__Init__Stinit
;
2406 if(which
== INITFL_new
)
2408 this->close
= (which
== INITFL_open
);
2411 basic_streambuf_wchar__Init_empty(&this->base
);
2414 /* ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXXZ */
2415 /* ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXXZ */
2416 DEFINE_THISCALL_WRAPPER(basic_filebuf_short__Initcvt
, 4)
2417 void __thiscall
basic_filebuf_short__Initcvt(basic_filebuf_wchar
*this)
2419 codecvt_wchar
*cvt
= codecvt_short_use_facet(IOS_LOCALE(&this->base
));
2421 TRACE("(%p)\n", this);
2423 if(codecvt_base_always_noconv(&cvt
->base
)) {
2426 basic_streambuf_wchar__Init_empty(&this->base
);
2431 /* ?close@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@XZ */
2432 /* ?close@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@XZ */
2433 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_close
, 4)
2434 basic_filebuf_wchar
* __thiscall
basic_filebuf_short_close(basic_filebuf_wchar
*this)
2436 basic_filebuf_wchar
*ret
= this;
2438 TRACE("(%p)\n", this);
2440 if(!this->file
|| fclose(this->file
))
2443 basic_filebuf_short__Init(this, NULL
, INITFL_close
);
2447 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
2448 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
2449 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor_file
, 8)
2450 basic_filebuf_wchar
* __thiscall
basic_filebuf_short_ctor_file(basic_filebuf_wchar
*this, FILE *file
)
2452 TRACE("(%p %p)\n", this, file
);
2454 basic_streambuf_short_ctor(&this->base
);
2455 this->base
.vtable
= &basic_filebuf_short_vtable
;
2457 locale_ctor(&this->loc
);
2458 basic_filebuf_short__Init(this, file
, INITFL_new
);
2462 /* ??_F?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
2463 /* ??_F?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
2464 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor
, 4)
2465 basic_filebuf_wchar
* __thiscall
basic_filebuf_short_ctor(basic_filebuf_wchar
*this)
2467 return basic_filebuf_short_ctor_file(this, NULL
);
2470 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z */
2471 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
2472 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor_uninitialized
, 8)
2473 basic_filebuf_wchar
* __thiscall
basic_filebuf_short_ctor_uninitialized(basic_filebuf_wchar
*this, int uninitialized
)
2475 TRACE("(%p %d)\n", this, uninitialized
);
2477 basic_streambuf_short_ctor_uninitialized(&this->base
, 0);
2478 this->base
.vtable
= &basic_filebuf_short_vtable
;
2479 locale_ctor(&this->loc
);
2483 /* ??1?$basic_filebuf@GU?$char_traits@G@std@@@std@@UAE@XZ */
2484 /* ??1?$basic_filebuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */
2485 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_dtor
, 4)
2486 void __thiscall
basic_filebuf_short_dtor(basic_filebuf_wchar
*this)
2488 TRACE("(%p)\n", this);
2491 basic_filebuf_short_close(this);
2493 MSVCP_basic_string_char_dtor(this->str
);
2494 operator_delete(this->str
);
2496 locale_dtor(&this->loc
);
2497 basic_streambuf_wchar_dtor(&this->base
);
2500 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_vector_dtor
, 8)
2501 basic_filebuf_wchar
* __thiscall
basic_filebuf_short_vector_dtor(basic_filebuf_wchar
*this, unsigned int flags
)
2503 TRACE("(%p %x)\n", this, flags
);
2505 /* we have an array, with the number of elements stored before the first object */
2506 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
2508 for(i
=*ptr
-1; i
>=0; i
--)
2509 basic_filebuf_short_dtor(this+i
);
2510 operator_delete(ptr
);
2512 basic_filebuf_short_dtor(this);
2514 operator_delete(this);
2520 /* ?is_open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QBE_NXZ */
2521 /* ?is_open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
2522 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_is_open
, 4)
2523 bool __thiscall
basic_filebuf_short_is_open(const basic_filebuf_wchar
*this)
2525 TRACE("(%p)\n", this);
2526 return this->file
!= NULL
;
2529 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDH@Z */
2530 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDH@Z */
2531 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_open_mode
, 12)
2532 basic_filebuf_wchar
* __thiscall
basic_filebuf_short_open_mode(basic_filebuf_wchar
*this, const char *name
, unsigned int mode
)
2534 wchar_t nameW
[FILENAME_MAX
];
2537 TRACE("(%p %p %u)\n", this, name
, mode
);
2539 if(basic_filebuf_short_is_open(this))
2542 if(mbstowcs_s(NULL
, nameW
, FILENAME_MAX
, name
, FILENAME_MAX
-1) != 0)
2545 if(!(f
= _Fiopen_wchar(nameW
, mode
, SH_DENYNO
)))
2548 basic_filebuf_short__Init(this, f
, INITFL_open
);
2549 basic_filebuf_short__Initcvt(this);
2553 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDF@Z */
2554 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDF@Z */
2555 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_open_mode_old
, 12)
2556 basic_filebuf_wchar
* __thiscall
basic_filebuf_short_open_mode_old(basic_filebuf_wchar
*this, const char *name
, short mode
)
2558 TRACE("(%p %p %d)\n", this, name
, mode
);
2559 return basic_filebuf_short_open_mode(this, name
, mode
);
2562 /* ?overflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
2563 /* ?overflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
2564 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_overflow
, 8)
2565 unsigned short __thiscall
basic_filebuf_short_overflow(basic_filebuf_wchar
*this, unsigned short c
)
2567 char *ptr
, *to_next
;
2569 const wchar_t *from_next
;
2573 TRACE("(%p %d)\n", this, c
);
2575 if(!basic_filebuf_short_is_open(this))
2581 return fwrite(&ch
, sizeof(wchar_t), 1, this->file
) ? c
: WEOF
;
2584 MSVCP_basic_string_char_clear(this->str
);
2585 MSVCP_basic_string_char_append_len_ch(this->str
, 8, '\0');
2586 ptr
= this->str
->ptr
;
2587 ret
= codecvt_wchar_out(this->cvt
, &this->state
, &ch
, &ch
+1, &from_next
,
2588 ptr
, ptr
+MSVCP_basic_string_char_length(this->str
), &to_next
);
2591 case CODECVT_partial
:
2592 if(from_next
== &ch
)
2596 if(!fwrite(ptr
, to_next
-ptr
, 1, this->file
))
2599 case CODECVT_noconv
:
2600 return fwrite(&ch
, sizeof(wchar_t), 1, this->file
) ? c
: WEOF
;
2606 /* ?pbackfail@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
2607 /* ?pbackfail@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
2608 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_pbackfail
, 8)
2609 unsigned short __thiscall
basic_filebuf_short_pbackfail(basic_filebuf_wchar
*this, unsigned short c
)
2611 TRACE("(%p %d)\n", this, c
);
2613 if(!basic_filebuf_short_is_open(this))
2616 if(basic_streambuf_wchar_gptr(&this->base
)>basic_streambuf_wchar_eback(&this->base
)
2617 && (c
==WEOF
|| basic_streambuf_wchar_gptr(&this->base
)[-1]==c
)) {
2618 basic_streambuf_wchar__Gndec(&this->base
);
2619 return c
==WEOF
? !c
: c
;
2620 }else if(c
== WEOF
) {
2622 }else if(!this->cvt
) {
2623 return ungetwc(c
, this->file
);
2624 }else if(MSVCP_basic_string_char_length(this->str
)) {
2628 b
= e
+this->str
->size
-1;
2629 for(cur
= b
; cur
>=e
; cur
--) {
2630 if(ungetc(*cur
, this->file
) == EOF
) {
2631 for(; cur
<=b
; cur
++)
2636 MSVCP_basic_string_char_clear(this->str
);
2637 this->state
= this->state0
;
2644 /* ?uflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
2645 /* ?uflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
2646 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_uflow
, 4)
2647 unsigned short __thiscall
basic_filebuf_short_uflow(basic_filebuf_wchar
*this)
2649 wchar_t ch
, *to_next
;
2650 const char *buf_next
;
2653 TRACE("(%p)\n", this);
2655 if(!basic_filebuf_short_is_open(this))
2658 if(basic_streambuf_wchar_gptr(&this->base
) < basic_streambuf_wchar_egptr(&this->base
))
2659 return *basic_streambuf_wchar__Gninc(&this->base
);
2662 return fgetwc(this->file
);
2664 MSVCP_basic_string_char_clear(this->str
);
2665 this->state0
= this->state
;
2667 if((c
= fgetc(this->file
)) == EOF
)
2669 MSVCP_basic_string_char_append_ch(this->str
, c
);
2670 this->state
= this->state0
;
2672 switch(codecvt_wchar_in(this->cvt
, &this->state
, this->str
->ptr
,
2673 this->str
->ptr
+this->str
->size
, &buf_next
, &ch
, &ch
+1, &to_next
)) {
2674 case CODECVT_partial
:
2676 case CODECVT_noconv
:
2677 if(this->str
->size
< sizeof(unsigned short)/sizeof(char))
2679 return *(unsigned short*)this->str
->ptr
;
2681 return (unsigned short)ch
;
2688 /* ?underflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
2689 /* ?underflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
2690 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_underflow
, 4)
2691 unsigned short __thiscall
basic_filebuf_short_underflow(basic_filebuf_wchar
*this)
2695 TRACE("(%p)\n", this);
2697 if(basic_streambuf_wchar_gptr(&this->base
) < basic_streambuf_wchar_egptr(&this->base
))
2698 return *basic_streambuf_wchar_gptr(&this->base
);
2700 ret
= call_basic_streambuf_wchar_uflow(&this->base
);
2702 ret
= call_basic_streambuf_wchar_pbackfail(&this->base
, ret
);
2706 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
2707 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
2708 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
2709 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
2710 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_seekoff
, 20)
2711 fpos_int
* __thiscall
basic_filebuf_short_seekoff(basic_filebuf_wchar
*this,
2712 fpos_int
*ret
, streamoff off
, int way
, int mode
)
2716 TRACE("(%p %p %Id %d %d)\n", this, ret
, off
, way
, mode
);
2718 if(!basic_filebuf_short_is_open(this) || fseek(this->file
, off
, way
)) {
2725 fgetpos(this->file
, &pos
);
2728 ret
->state
= this->state
;
2732 /* ?seekpos@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2733 /* ?seekpos@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2734 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_seekpos
, 36)
2735 fpos_int
* __thiscall
basic_filebuf_short_seekpos(basic_filebuf_wchar
*this,
2736 fpos_int
*ret
, fpos_int pos
, int mode
)
2740 TRACE("(%p %p %s %d)\n", this, ret
, debugstr_fpos_int(&pos
), mode
);
2742 if(!basic_filebuf_short_is_open(this) || fseek(this->file
, (LONG
)pos
.pos
, SEEK_SET
)
2743 || (pos
.off
&& fseek(this->file
, pos
.off
, SEEK_CUR
))) {
2750 fgetpos(this->file
, &fpos
);
2753 ret
->state
= this->state
;
2757 /* ?setbuf@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAGH@Z */
2758 /* ?setbuf@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAG_J@Z */
2759 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_setbuf
, 12)
2760 basic_streambuf_wchar
* __thiscall
basic_filebuf_short_setbuf(basic_filebuf_wchar
*this, wchar_t *buf
, streamsize count
)
2762 TRACE("(%p %p %Id)\n", this, buf
, count
);
2764 if(!basic_filebuf_short_is_open(this))
2767 if(setvbuf(this->file
, (char*)buf
, (buf
==NULL
&& count
==0) ? _IONBF
: _IOFBF
, count
*sizeof(wchar_t)))
2770 basic_filebuf_short__Init(this, this->file
, INITFL_open
);
2774 /* ?sync@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
2775 /* ?sync@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */
2776 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_sync
, 4)
2777 int __thiscall
basic_filebuf_short_sync(basic_filebuf_wchar
*this)
2779 TRACE("(%p)\n", this);
2781 if(!basic_filebuf_short_is_open(this))
2784 if(call_basic_streambuf_wchar_overflow(&this->base
, WEOF
) == WEOF
)
2786 return fflush(this->file
);
2789 /* ?_Getstate@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEHH@Z */
2790 /* ?_Getstate@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAHH@Z */
2791 /* ?_Mode@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEHH@Z */
2792 /* ?_Mode@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAHH@Z */
2793 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Getstate
, 8)
2794 int __thiscall
basic_stringbuf_char__Getstate(basic_stringbuf_char
*this, IOSB_openmode mode
)
2798 if(!(mode
& OPENMODE_in
))
2799 state
|= STRINGBUF_no_read
;
2801 if(!(mode
& OPENMODE_out
))
2802 state
|= STRINGBUF_no_write
;
2804 if(mode
& OPENMODE_ate
)
2805 state
|= STRINGBUF_at_end
;
2807 if(mode
& OPENMODE_app
)
2808 state
|= STRINGBUF_append
;
2813 /* ?_Init@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXPBDIH@Z */
2814 /* ?_Init@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAXPEBD_KH@Z */
2815 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Init
, 16)
2816 void __thiscall
basic_stringbuf_char__Init(basic_stringbuf_char
*this, const char *str
, size_t count
, int state
)
2818 TRACE("(%p, %p, %Iu, %d)\n", this, str
, count
, state
);
2820 basic_streambuf_char__Init_empty(&this->base
);
2822 this->state
= state
;
2823 this->seekhigh
= NULL
;
2826 char *buf
= operator_new(count
);
2828 memcpy(buf
, str
, count
);
2829 this->seekhigh
= buf
+ count
;
2831 this->state
|= STRINGBUF_allocated
;
2833 if(!(state
& STRINGBUF_no_read
))
2834 basic_streambuf_char_setg(&this->base
, buf
, buf
, buf
+ count
);
2836 if(!(state
& STRINGBUF_no_write
)) {
2837 basic_streambuf_char_setp_next(&this->base
, buf
, (state
& STRINGBUF_at_end
) ? buf
+ count
: buf
, buf
+ count
);
2839 if(!basic_streambuf_char_gptr(&this->base
))
2840 basic_streambuf_char_setg(&this->base
, buf
, 0, buf
);
2845 /* ??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 */
2846 /* ??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 */
2847 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor_str
, 12)
2848 basic_stringbuf_char
* __thiscall
basic_stringbuf_char_ctor_str(basic_stringbuf_char
*this,
2849 const basic_string_char
*str
, IOSB_openmode mode
)
2851 TRACE("(%p %p %d)\n", this, str
, mode
);
2853 basic_streambuf_char_ctor(&this->base
);
2854 this->base
.vtable
= &basic_stringbuf_char_vtable
;
2856 basic_stringbuf_char__Init(this, MSVCP_basic_string_char_c_str(str
),
2857 str
->size
, basic_stringbuf_char__Getstate(this, mode
));
2861 /* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
2862 /* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
2863 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor_mode
, 8)
2864 basic_stringbuf_char
* __thiscall
basic_stringbuf_char_ctor_mode(
2865 basic_stringbuf_char
*this, IOSB_openmode mode
)
2867 TRACE("(%p %d)\n", this, mode
);
2869 basic_streambuf_char_ctor(&this->base
);
2870 this->base
.vtable
= &basic_stringbuf_char_vtable
;
2872 basic_stringbuf_char__Init(this, NULL
, 0, basic_stringbuf_char__Getstate(this, mode
));
2876 /* ??_F?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
2877 /* ??_F?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
2878 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor
, 4)
2879 basic_stringbuf_char
* __thiscall
basic_stringbuf_char_ctor(basic_stringbuf_char
*this)
2881 return basic_stringbuf_char_ctor_mode(this, OPENMODE_in
|OPENMODE_out
);
2884 /* ?_Tidy@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXXZ */
2885 /* ?_Tidy@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAXXZ */
2886 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Tidy
, 4)
2887 void __thiscall
basic_stringbuf_char__Tidy(basic_stringbuf_char
*this)
2889 TRACE("(%p)\n", this);
2891 if(this->state
& STRINGBUF_allocated
) {
2892 operator_delete(basic_streambuf_char_eback(&this->base
));
2893 this->seekhigh
= NULL
;
2894 this->state
&= ~STRINGBUF_allocated
;
2897 basic_streambuf_char__Init_empty(&this->base
);
2900 /* ??1?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
2901 /* ??1?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
2902 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_dtor
, 4)
2903 void __thiscall
basic_stringbuf_char_dtor(basic_stringbuf_char
*this)
2905 TRACE("(%p)\n", this);
2907 basic_stringbuf_char__Tidy(this);
2908 basic_streambuf_char_dtor(&this->base
);
2911 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_vector_dtor
, 8)
2912 basic_stringbuf_char
* __thiscall
basic_stringbuf_char_vector_dtor(basic_stringbuf_char
*this, unsigned int flags
)
2914 TRACE("(%p %x)\n", this, flags
);
2917 /* we have an array, with the number of elements stored before the first object */
2918 INT_PTR i
, *ptr
= (INT_PTR
*) this - 1;
2920 for (i
= *ptr
- 1; i
>= 0; i
--)
2921 basic_stringbuf_char_dtor(this+i
);
2923 operator_delete(ptr
);
2925 basic_stringbuf_char_dtor(this);
2928 operator_delete(this);
2934 /* ?overflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHH@Z */
2935 /* ?overflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHH@Z */
2936 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_overflow
, 8)
2937 int __thiscall
basic_stringbuf_char_overflow(basic_stringbuf_char
*this, int meta
)
2939 size_t oldsize
, size
;
2942 TRACE("(%p %x)\n", this, meta
);
2946 if(this->state
& STRINGBUF_no_write
)
2949 ptr
= basic_streambuf_char_pptr(&this->base
);
2950 if((this->state
&STRINGBUF_append
) && ptr
<this->seekhigh
)
2951 basic_streambuf_char_setp_next(&this->base
, basic_streambuf_char_pbase(&this->base
),
2952 this->seekhigh
, basic_streambuf_char_epptr(&this->base
));
2954 if(ptr
&& ptr
<basic_streambuf_char_epptr(&this->base
))
2955 return (unsigned char)(*basic_streambuf_char__Pninc(&this->base
) = meta
);
2957 oldsize
= (ptr
? basic_streambuf_char_epptr(&this->base
)-basic_streambuf_char_eback(&this->base
): 0);
2960 buf
= operator_new(size
);
2963 this->seekhigh
= buf
;
2964 basic_streambuf_char_setp(&this->base
, buf
, buf
+size
);
2965 if(this->state
& STRINGBUF_no_read
)
2966 basic_streambuf_char_setg(&this->base
, buf
, NULL
, buf
);
2968 basic_streambuf_char_setg(&this->base
, buf
, buf
, buf
+1);
2970 this->state
|= STRINGBUF_allocated
;
2972 ptr
= basic_streambuf_char_eback(&this->base
);
2973 memcpy(buf
, ptr
, oldsize
);
2975 this->seekhigh
= buf
+(this->seekhigh
-ptr
);
2976 basic_streambuf_char_setp_next(&this->base
, buf
,
2977 buf
+(basic_streambuf_char_pptr(&this->base
)-ptr
), buf
+size
);
2978 if(this->state
& STRINGBUF_no_read
)
2979 basic_streambuf_char_setg(&this->base
, buf
, NULL
, buf
);
2981 basic_streambuf_char_setg(&this->base
, buf
,
2982 buf
+(basic_streambuf_char_gptr(&this->base
)-ptr
),
2983 basic_streambuf_char_pptr(&this->base
)+1);
2985 operator_delete(ptr
);
2988 return (unsigned char)(*basic_streambuf_char__Pninc(&this->base
) = meta
);
2991 /* ?pbackfail@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHH@Z */
2992 /* ?pbackfail@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHH@Z */
2993 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_pbackfail
, 8)
2994 int __thiscall
basic_stringbuf_char_pbackfail(basic_stringbuf_char
*this, int c
)
2998 TRACE("(%p %x)\n", this, c
);
3000 cur
= basic_streambuf_char_gptr(&this->base
);
3001 if(!cur
|| cur
==basic_streambuf_char_eback(&this->base
)
3002 || (c
!=EOF
&& c
!=cur
[-1] && this->state
&STRINGBUF_no_write
))
3007 basic_streambuf_char_gbump(&this->base
, -1);
3008 return c
==EOF
? !EOF
: c
;
3011 /* ?underflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHXZ */
3012 /* ?underflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHXZ */
3013 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_underflow
, 4)
3014 int __thiscall
basic_stringbuf_char_underflow(basic_stringbuf_char
*this)
3018 TRACE("(%p)\n", this);
3020 cur
= basic_streambuf_char_gptr(&this->base
);
3021 if(!cur
|| this->state
&STRINGBUF_no_read
)
3024 ptr
= basic_streambuf_char_pptr(&this->base
);
3025 if(this->seekhigh
< ptr
)
3026 this->seekhigh
= ptr
;
3028 ptr
= basic_streambuf_char_egptr(&this->base
);
3029 if(this->seekhigh
> ptr
)
3030 basic_streambuf_char_setg(&this->base
, basic_streambuf_char_eback(&this->base
), cur
, this->seekhigh
);
3032 if(cur
< this->seekhigh
)
3033 return (unsigned char)*cur
;
3037 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
3038 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
3039 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */
3040 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
3041 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekoff
, 20)
3042 fpos_int
* __thiscall
basic_stringbuf_char_seekoff(basic_stringbuf_char
*this,
3043 fpos_int
*ret
, streamoff off
, int way
, int mode
)
3045 char *beg
, *cur_r
, *cur_w
;
3047 TRACE("(%p %p %Id %d %d)\n", this, ret
, off
, way
, mode
);
3049 cur_w
= basic_streambuf_char_pptr(&this->base
);
3050 if(cur_w
> this->seekhigh
)
3051 this->seekhigh
= cur_w
;
3057 beg
= basic_streambuf_char_eback(&this->base
);
3058 cur_r
= basic_streambuf_char_gptr(&this->base
);
3059 if((mode
& OPENMODE_in
) && cur_r
) {
3060 if(way
==SEEKDIR_cur
&& !(mode
& OPENMODE_out
))
3062 else if(way
== SEEKDIR_end
)
3063 off
+= this->seekhigh
-beg
;
3064 else if(way
!= SEEKDIR_beg
)
3067 if(off
<0 || off
>this->seekhigh
-beg
) {
3070 basic_streambuf_char_gbump(&this->base
, beg
-cur_r
+off
);
3071 if((mode
& OPENMODE_out
) && cur_w
) {
3072 basic_streambuf_char_setp_next(&this->base
, beg
,
3073 basic_streambuf_char_gptr(&this->base
),
3074 basic_streambuf_char_epptr(&this->base
));
3077 }else if((mode
& OPENMODE_out
) && cur_w
) {
3078 if(way
== SEEKDIR_cur
)
3080 else if(way
== SEEKDIR_end
)
3081 off
+= this->seekhigh
-beg
;
3082 else if(way
!= SEEKDIR_beg
)
3085 if(off
<0 || off
>this->seekhigh
-beg
)
3088 basic_streambuf_char_pbump(&this->base
, beg
-cur_w
+off
);
3097 /* ?seekpos@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3098 /* ?seekpos@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3099 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekpos
, 36)
3100 fpos_int
* __thiscall
basic_stringbuf_char_seekpos(basic_stringbuf_char
*this,
3101 fpos_int
*ret
, fpos_int pos
, int mode
)
3103 TRACE("(%p %p %s %d)\n", this, ret
, debugstr_fpos_int(&pos
), mode
);
3105 if(pos
.off
==-1 && pos
.pos
==0 && pos
.state
==0) {
3110 return basic_stringbuf_char_seekoff(this, ret
, pos
.pos
+pos
.off
, SEEKDIR_beg
, mode
);
3113 /* ?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 */
3114 /* ?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 */
3115 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_str_set
, 8)
3116 void __thiscall
basic_stringbuf_char_str_set(basic_stringbuf_char
*this, const basic_string_char
*str
)
3118 TRACE("(%p %p)\n", this, str
);
3120 basic_stringbuf_char__Tidy(this);
3121 basic_stringbuf_char__Init(this, MSVCP_basic_string_char_c_str(str
), str
->size
, this->state
);
3124 /* ?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 */
3125 /* ?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 */
3126 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_str_get
, 8)
3127 basic_string_char
* __thiscall
basic_stringbuf_char_str_get(const basic_stringbuf_char
*this, basic_string_char
*ret
)
3131 TRACE("(%p)\n", this);
3133 if(!(this->state
& STRINGBUF_no_write
) && basic_streambuf_char_pptr(&this->base
)) {
3136 ptr
= basic_streambuf_char_pbase(&this->base
);
3137 pptr
= basic_streambuf_char_pptr(&this->base
);
3139 return MSVCP_basic_string_char_ctor_cstr_len(ret
, ptr
, (this->seekhigh
< pptr
? pptr
: this->seekhigh
) - ptr
);
3142 if(!(this->state
& STRINGBUF_no_read
) && basic_streambuf_char_gptr(&this->base
)) {
3143 ptr
= basic_streambuf_char_eback(&this->base
);
3144 return MSVCP_basic_string_char_ctor_cstr_len(ret
, ptr
, basic_streambuf_char_egptr(&this->base
) - ptr
);
3147 return MSVCP_basic_string_char_ctor(ret
);
3150 /* ?_Getstate@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEHH@Z */
3151 /* ?_Getstate@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAHH@Z */
3152 /* ?_Mode@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEHH@Z */
3153 /* ?_Mode@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAHH@Z */
3154 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short__Getstate
, 8)
3155 int __thiscall
basic_stringbuf_short__Getstate(basic_stringbuf_wchar
*this, IOSB_openmode mode
)
3159 if(!(mode
& OPENMODE_in
))
3160 state
|= STRINGBUF_no_read
;
3162 if(!(mode
& OPENMODE_out
))
3163 state
|= STRINGBUF_no_write
;
3165 if(mode
& OPENMODE_ate
)
3166 state
|= STRINGBUF_at_end
;
3168 if(mode
& OPENMODE_app
)
3169 state
|= STRINGBUF_append
;
3174 /* ?_Init@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEXPBGIH@Z */
3175 /* ?_Init@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAXPEBG_KH@Z */
3176 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short__Init
, 16)
3177 void __thiscall
basic_stringbuf_short__Init(basic_stringbuf_wchar
*this, const wchar_t *str
, size_t count
, int state
)
3179 TRACE("(%p, %p, %Iu, %d)\n", this, str
, count
, state
);
3181 basic_streambuf_wchar__Init_empty(&this->base
);
3183 this->state
= state
;
3184 this->seekhigh
= NULL
;
3187 wchar_t *buf
= operator_new(count
*sizeof(wchar_t));
3189 memcpy(buf
, str
, count
*sizeof(wchar_t));
3190 this->seekhigh
= buf
+ count
;
3192 this->state
|= STRINGBUF_allocated
;
3194 if(!(state
& STRINGBUF_no_read
))
3195 basic_streambuf_wchar_setg(&this->base
, buf
, buf
, buf
+ count
);
3197 if(!(state
& STRINGBUF_no_write
)) {
3198 basic_streambuf_wchar_setp_next(&this->base
, buf
, (state
& STRINGBUF_at_end
) ? buf
+ count
: buf
, buf
+ count
);
3200 if(!basic_streambuf_wchar_gptr(&this->base
))
3201 basic_streambuf_wchar_setg(&this->base
, buf
, 0, buf
);
3206 /* ??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 */
3207 /* ??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 */
3208 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor_str
, 12)
3209 basic_stringbuf_wchar
* __thiscall
basic_stringbuf_short_ctor_str(basic_stringbuf_wchar
*this,
3210 const basic_string_wchar
*str
, IOSB_openmode mode
)
3212 TRACE("(%p %p %d)\n", this, str
, mode
);
3214 basic_streambuf_short_ctor(&this->base
);
3215 this->base
.vtable
= &basic_stringbuf_short_vtable
;
3217 basic_stringbuf_short__Init(this, MSVCP_basic_string_wchar_c_str(str
),
3218 str
->size
, basic_stringbuf_short__Getstate(this, mode
));
3222 /* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
3223 /* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
3224 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor_mode
, 8)
3225 basic_stringbuf_wchar
* __thiscall
basic_stringbuf_short_ctor_mode(
3226 basic_stringbuf_wchar
*this, IOSB_openmode mode
)
3228 TRACE("(%p %d)\n", this, mode
);
3230 basic_streambuf_short_ctor(&this->base
);
3231 this->base
.vtable
= &basic_stringbuf_short_vtable
;
3233 basic_stringbuf_short__Init(this, NULL
, 0, basic_stringbuf_short__Getstate(this, mode
));
3237 /* ??_F?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
3238 /* ??_F?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
3239 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor
, 4)
3240 basic_stringbuf_wchar
* __thiscall
basic_stringbuf_short_ctor(basic_stringbuf_wchar
*this)
3242 return basic_stringbuf_short_ctor_mode(this, OPENMODE_in
|OPENMODE_out
);
3245 /* ?_Tidy@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEXXZ */
3246 /* ?_Tidy@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAXXZ */
3247 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short__Tidy
, 4)
3248 void __thiscall
basic_stringbuf_short__Tidy(basic_stringbuf_wchar
*this)
3250 TRACE("(%p)\n", this);
3252 if(this->state
& STRINGBUF_allocated
) {
3253 operator_delete(basic_streambuf_wchar_eback(&this->base
));
3254 this->seekhigh
= NULL
;
3255 this->state
&= ~STRINGBUF_allocated
;
3258 basic_streambuf_wchar__Init_empty(&this->base
);
3261 /* ??1?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
3262 /* ??1?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
3263 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_dtor
, 4)
3264 void __thiscall
basic_stringbuf_short_dtor(basic_stringbuf_wchar
*this)
3266 TRACE("(%p)\n", this);
3268 basic_stringbuf_short__Tidy(this);
3269 basic_streambuf_wchar_dtor(&this->base
);
3272 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_vector_dtor
, 8)
3273 basic_stringbuf_wchar
* __thiscall
basic_stringbuf_short_vector_dtor(basic_stringbuf_wchar
*this, unsigned int flags
)
3275 TRACE("(%p %x)\n", this, flags
);
3278 /* we have an array, with the number of elements stored before the first object */
3279 INT_PTR i
, *ptr
= (INT_PTR
*) this - 1;
3281 for (i
= *ptr
- 1; i
>= 0; i
--)
3282 basic_stringbuf_short_dtor(this+i
);
3284 operator_delete(ptr
);
3286 basic_stringbuf_short_dtor(this);
3289 operator_delete(this);
3295 /* ?overflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGG@Z */
3296 /* ?overflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGG@Z */
3297 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_overflow
, 8)
3298 unsigned short __thiscall
basic_stringbuf_short_overflow(basic_stringbuf_wchar
*this, unsigned short meta
)
3300 size_t oldsize
, size
;
3303 TRACE("(%p %x)\n", this, meta
);
3307 if(this->state
& STRINGBUF_no_write
)
3310 ptr
= basic_streambuf_wchar_pptr(&this->base
);
3311 if((this->state
&STRINGBUF_append
) && ptr
<this->seekhigh
)
3312 basic_streambuf_wchar_setp_next(&this->base
, basic_streambuf_wchar_pbase(&this->base
),
3313 this->seekhigh
, basic_streambuf_wchar_epptr(&this->base
));
3315 if(ptr
&& ptr
<basic_streambuf_wchar_epptr(&this->base
))
3316 return (*basic_streambuf_wchar__Pninc(&this->base
) = meta
);
3318 oldsize
= (ptr
? basic_streambuf_wchar_epptr(&this->base
)-basic_streambuf_wchar_eback(&this->base
): 0);
3321 buf
= operator_new(size
*sizeof(wchar_t));
3324 this->seekhigh
= buf
;
3325 basic_streambuf_wchar_setp(&this->base
, buf
, buf
+size
);
3326 if(this->state
& STRINGBUF_no_read
)
3327 basic_streambuf_wchar_setg(&this->base
, buf
, NULL
, buf
);
3329 basic_streambuf_wchar_setg(&this->base
, buf
, buf
, buf
+1);
3331 this->state
|= STRINGBUF_allocated
;
3333 ptr
= basic_streambuf_wchar_eback(&this->base
);
3334 memcpy(buf
, ptr
, oldsize
*sizeof(wchar_t));
3336 this->seekhigh
= buf
+(this->seekhigh
-ptr
);
3337 basic_streambuf_wchar_setp_next(&this->base
, buf
,
3338 buf
+(basic_streambuf_wchar_pptr(&this->base
)-ptr
), buf
+size
);
3339 if(this->state
& STRINGBUF_no_read
)
3340 basic_streambuf_wchar_setg(&this->base
, buf
, NULL
, buf
);
3342 basic_streambuf_wchar_setg(&this->base
, buf
,
3343 buf
+(basic_streambuf_wchar_gptr(&this->base
)-ptr
),
3344 basic_streambuf_wchar_pptr(&this->base
)+1);
3346 operator_delete(ptr
);
3349 return (*basic_streambuf_wchar__Pninc(&this->base
) = meta
);
3352 /* ?pbackfail@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGG@Z */
3353 /* ?pbackfail@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGG@Z */
3354 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_pbackfail
, 8)
3355 unsigned short __thiscall
basic_stringbuf_short_pbackfail(basic_stringbuf_wchar
*this, unsigned short c
)
3359 TRACE("(%p %x)\n", this, c
);
3361 cur
= basic_streambuf_wchar_gptr(&this->base
);
3362 if(!cur
|| cur
==basic_streambuf_wchar_eback(&this->base
)
3363 || (c
!=WEOF
&& c
!=cur
[-1] && this->state
&STRINGBUF_no_write
))
3368 basic_streambuf_wchar_gbump(&this->base
, -1);
3369 return c
==WEOF
? !WEOF
: c
;
3372 /* ?underflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGXZ */
3373 /* ?underflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGXZ */
3374 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_underflow
, 4)
3375 unsigned short __thiscall
basic_stringbuf_short_underflow(basic_stringbuf_wchar
*this)
3379 TRACE("(%p)\n", this);
3381 cur
= basic_streambuf_wchar_gptr(&this->base
);
3382 if(!cur
|| this->state
&STRINGBUF_no_read
)
3385 ptr
= basic_streambuf_wchar_pptr(&this->base
);
3386 if(this->seekhigh
< ptr
)
3387 this->seekhigh
= ptr
;
3389 ptr
= basic_streambuf_wchar_egptr(&this->base
);
3390 if(this->seekhigh
> ptr
)
3391 basic_streambuf_wchar_setg(&this->base
, basic_streambuf_wchar_eback(&this->base
), cur
, this->seekhigh
);
3393 if(cur
< this->seekhigh
)
3398 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
3399 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
3400 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */
3401 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
3402 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_seekoff
, 20)
3403 fpos_int
* __thiscall
basic_stringbuf_short_seekoff(basic_stringbuf_wchar
*this,
3404 fpos_int
*ret
, streamoff off
, int way
, int mode
)
3406 wchar_t *beg
, *cur_r
, *cur_w
;
3408 TRACE("(%p %p %Id %d %d)\n", this, ret
, off
, way
, mode
);
3410 cur_w
= basic_streambuf_wchar_pptr(&this->base
);
3411 if(cur_w
> this->seekhigh
)
3412 this->seekhigh
= cur_w
;
3418 beg
= basic_streambuf_wchar_eback(&this->base
);
3419 cur_r
= basic_streambuf_wchar_gptr(&this->base
);
3420 if((mode
& OPENMODE_in
) && cur_r
) {
3421 if(way
==SEEKDIR_cur
&& !(mode
& OPENMODE_out
))
3423 else if(way
== SEEKDIR_end
)
3424 off
+= this->seekhigh
-beg
;
3425 else if(way
!= SEEKDIR_beg
)
3428 if(off
<0 || off
>this->seekhigh
-beg
) {
3431 basic_streambuf_wchar_gbump(&this->base
, beg
-cur_r
+off
);
3432 if((mode
& OPENMODE_out
) && cur_w
) {
3433 basic_streambuf_wchar_setp_next(&this->base
, beg
,
3434 basic_streambuf_wchar_gptr(&this->base
),
3435 basic_streambuf_wchar_epptr(&this->base
));
3438 }else if((mode
& OPENMODE_out
) && cur_w
) {
3439 if(way
== SEEKDIR_cur
)
3441 else if(way
== SEEKDIR_end
)
3442 off
+= this->seekhigh
-beg
;
3443 else if(way
!= SEEKDIR_beg
)
3446 if(off
<0 || off
>this->seekhigh
-beg
)
3449 basic_streambuf_wchar_pbump(&this->base
, beg
-cur_w
+off
);
3458 /* ?seekpos@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3459 /* ?seekpos@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3460 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_seekpos
, 36)
3461 fpos_int
* __thiscall
basic_stringbuf_short_seekpos(basic_stringbuf_wchar
*this,
3462 fpos_int
*ret
, fpos_int pos
, int mode
)
3464 TRACE("(%p %p %s %d)\n", this, ret
, debugstr_fpos_int(&pos
), mode
);
3466 if(pos
.off
==-1 && pos
.pos
==0 && pos
.state
==0) {
3471 return basic_stringbuf_short_seekoff(this, ret
, pos
.pos
+pos
.off
, SEEKDIR_beg
, mode
);
3474 /* ?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 */
3475 /* ?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 */
3476 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_str_set
, 8)
3477 void __thiscall
basic_stringbuf_short_str_set(basic_stringbuf_wchar
*this, const basic_string_wchar
*str
)
3479 TRACE("(%p %p)\n", this, str
);
3481 basic_stringbuf_short__Tidy(this);
3482 basic_stringbuf_short__Init(this, MSVCP_basic_string_wchar_c_str(str
), str
->size
, this->state
);
3485 /* ?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 */
3486 /* ?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 */
3487 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_str_get
, 8)
3488 basic_string_wchar
* __thiscall
basic_stringbuf_short_str_get(const basic_stringbuf_wchar
*this, basic_string_wchar
*ret
)
3492 TRACE("(%p)\n", this);
3494 if(!(this->state
& STRINGBUF_no_write
) && basic_streambuf_wchar_pptr(&this->base
)) {
3497 ptr
= basic_streambuf_wchar_pbase(&this->base
);
3498 pptr
= basic_streambuf_wchar_pptr(&this->base
);
3500 return MSVCP_basic_string_wchar_ctor_cstr_len(ret
, ptr
, (this->seekhigh
< pptr
? pptr
: this->seekhigh
) - ptr
);
3503 if(!(this->state
& STRINGBUF_no_read
) && basic_streambuf_wchar_gptr(&this->base
)) {
3504 ptr
= basic_streambuf_wchar_eback(&this->base
);
3505 return MSVCP_basic_string_wchar_ctor_cstr_len(ret
, ptr
, basic_streambuf_wchar_egptr(&this->base
) - ptr
);
3508 return MSVCP_basic_string_wchar_ctor(ret
);
3511 /* ??0ios_base@std@@IAE@XZ */
3512 /* ??0ios_base@std@@IEAA@XZ */
3513 DEFINE_THISCALL_WRAPPER(ios_base_ctor
, 4)
3514 ios_base
* __thiscall
ios_base_ctor(ios_base
*this)
3516 TRACE("(%p)\n", this);
3517 this->vtable
= &ios_base_vtable
;
3518 locale_ctor_uninitialized(IOS_LOCALE(this), 0);
3522 /* ??0ios_base@std@@QAE@ABV01@@Z */
3523 /* ??0ios_base@std@@QEAA@AEBV01@@Z */
3524 DEFINE_THISCALL_WRAPPER(ios_base_copy_ctor
, 8)
3525 ios_base
* __thiscall
ios_base_copy_ctor(ios_base
*this, const ios_base
*copy
)
3527 TRACE("(%p %p)\n", this, copy
);
3529 this->vtable
= &ios_base_vtable
;
3533 /* ?_Callfns@ios_base@std@@AAEXW4event@12@@Z */
3534 /* ?_Callfns@ios_base@std@@AEAAXW4event@12@@Z */
3535 DEFINE_THISCALL_WRAPPER(ios_base_Callfns
, 8)
3536 void __thiscall
ios_base_Callfns(ios_base
*this, IOS_BASE_event event
)
3538 IOS_BASE_fnarray
*cur
;
3540 TRACE("(%p %x)\n", this, event
);
3542 for(cur
=this->calls
; cur
; cur
=cur
->next
)
3543 cur
->event_handler(event
, this, cur
->index
);
3546 /* ?_Tidy@ios_base@std@@AAAXXZ */
3547 /* ?_Tidy@ios_base@std@@AEAAXXZ */
3548 void __cdecl
ios_base_Tidy(ios_base
*this)
3550 IOS_BASE_iosarray
*arr_cur
, *arr_next
;
3551 IOS_BASE_fnarray
*event_cur
, *event_next
;
3553 TRACE("(%p)\n", this);
3555 ios_base_Callfns(this, EVENT_erase_event
);
3557 for(arr_cur
=this->arr
; arr_cur
; arr_cur
=arr_next
) {
3558 arr_next
= arr_cur
->next
;
3559 operator_delete(arr_cur
);
3563 for(event_cur
=this->calls
; event_cur
; event_cur
=event_next
) {
3564 event_next
= event_cur
->next
;
3565 operator_delete(event_cur
);
3570 /* ??1ios_base@std@@UAE@XZ */
3571 /* ??1ios_base@std@@UEAA@XZ */
3572 DEFINE_THISCALL_WRAPPER(ios_base_dtor
, 4)
3573 void __thiscall
ios_base_dtor(ios_base
*this)
3575 TRACE("(%p)\n", this);
3576 locale_dtor(IOS_LOCALE(this));
3577 ios_base_Tidy(this);
3580 DEFINE_THISCALL_WRAPPER(ios_base_vector_dtor
, 8)
3581 ios_base
* __thiscall
ios_base_vector_dtor(ios_base
*this, unsigned int flags
)
3583 TRACE("(%p %x)\n", this, flags
);
3585 /* we have an array, with the number of elements stored before the first object */
3586 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3588 for(i
=*ptr
-1; i
>=0; i
--)
3589 ios_base_dtor(this+i
);
3590 operator_delete(ptr
);
3592 ios_base_dtor(this);
3594 operator_delete(this);
3600 DEFINE_THISCALL_WRAPPER(iosb_vector_dtor
, 8)
3601 void* __thiscall
iosb_vector_dtor(void *this, unsigned int flags
)
3603 TRACE("(%p %x)\n", this, flags
);
3605 INT_PTR
*ptr
= (INT_PTR
*)this-1;
3606 operator_delete(ptr
);
3609 operator_delete(this);
3615 /* ?_Findarr@ios_base@std@@AAEAAU_Iosarray@12@H@Z */
3616 /* ?_Findarr@ios_base@std@@AEAAAEAU_Iosarray@12@H@Z */
3617 DEFINE_THISCALL_WRAPPER(ios_base_Findarr
, 8)
3618 IOS_BASE_iosarray
* __thiscall
ios_base_Findarr(ios_base
*this, int index
)
3620 IOS_BASE_iosarray
*p
;
3622 TRACE("(%p %d)\n", this, index
);
3624 for(p
=this->arr
; p
; p
=p
->next
) {
3625 if(p
->index
== index
)
3629 for(p
=this->arr
; p
; p
=p
->next
) {
3630 if(!p
->long_val
&& !p
->ptr_val
) {
3636 p
= operator_new(sizeof(IOS_BASE_iosarray
));
3637 p
->next
= this->arr
;
3645 /* ?iword@ios_base@std@@QAEAAJH@Z */
3646 /* ?iword@ios_base@std@@QEAAAEAJH@Z */
3647 DEFINE_THISCALL_WRAPPER(ios_base_iword
, 8)
3648 LONG
* __thiscall
ios_base_iword(ios_base
*this, int index
)
3650 TRACE("(%p %d)\n", this, index
);
3651 return &ios_base_Findarr(this, index
)->long_val
;
3654 /* ?pword@ios_base@std@@QAEAAPAXH@Z */
3655 /* ?pword@ios_base@std@@QEAAAEAPEAXH@Z */
3656 DEFINE_THISCALL_WRAPPER(ios_base_pword
, 8)
3657 void** __thiscall
ios_base_pword(ios_base
*this, int index
)
3659 TRACE("(%p %d)\n", this, index
);
3660 return &ios_base_Findarr(this, index
)->ptr_val
;
3663 /* ?register_callback@ios_base@std@@QAEXP6AXW4event@12@AAV12@H@ZH@Z */
3664 /* ?register_callback@ios_base@std@@QEAAXP6AXW4event@12@AEAV12@H@ZH@Z */
3665 DEFINE_THISCALL_WRAPPER(ios_base_register_callback
, 12)
3666 void __thiscall
ios_base_register_callback(ios_base
*this, IOS_BASE_event_callback callback
, int index
)
3668 IOS_BASE_fnarray
*event
;
3670 TRACE("(%p %p %d)\n", this, callback
, index
);
3672 event
= operator_new(sizeof(IOS_BASE_fnarray
));
3673 event
->next
= this->calls
;
3674 event
->index
= index
;
3675 event
->event_handler
= callback
;
3676 this->calls
= event
;
3679 /* ?clear@ios_base@std@@QAEXH_N@Z */
3680 /* ?clear@ios_base@std@@QEAAXH_N@Z */
3681 DEFINE_THISCALL_WRAPPER(ios_base_clear_reraise
, 12)
3682 void __thiscall
ios_base_clear_reraise(ios_base
*this, IOSB_iostate state
, bool reraise
)
3684 TRACE("(%p %x %x)\n", this, state
, reraise
);
3686 this->state
= state
& IOSTATE_mask
;
3687 if(!(this->state
& this->except
))
3691 _CxxThrowException(NULL
, NULL
);
3692 else if(this->state
& this->except
& IOSTATE_eofbit
)
3693 throw_failure("eofbit is set");
3694 else if(this->state
& this->except
& IOSTATE_failbit
)
3695 throw_failure("failbit is set");
3696 else if(this->state
& this->except
& IOSTATE_badbit
)
3697 throw_failure("badbit is set");
3698 else if(this->state
& this->except
& IOSTATE__Hardfail
)
3699 throw_failure("_Hardfail is set");
3702 /* ?clear@ios_base@std@@QAEXF@Z */
3703 /* ?clear@ios_base@std@@QEAAXF@Z */
3704 DEFINE_THISCALL_WRAPPER(ios_base_clear
, 8)
3705 void __thiscall
ios_base_clear(ios_base
*this, IOSB_iostate state
)
3707 ios_base_clear_reraise(this, state
, FALSE
);
3710 /* ?exceptions@ios_base@std@@QAEXH@Z */
3711 /* ?exceptions@ios_base@std@@QEAAXH@Z */
3712 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_set
, 8)
3713 void __thiscall
ios_base_exceptions_set(ios_base
*this, IOSB_iostate state
)
3715 TRACE("(%p %x)\n", this, state
);
3716 this->except
= state
& IOSTATE_mask
;
3717 ios_base_clear(this, this->state
);
3720 /* ?exceptions@ios_base@std@@QBEHXZ */
3721 /* ?exceptions@ios_base@std@@QEBAHXZ */
3722 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_get
, 4)
3723 IOSB_iostate __thiscall
ios_base_exceptions_get(ios_base
*this)
3725 TRACE("(%p)\n", this);
3726 return this->except
;
3729 /* ?copyfmt@ios_base@std@@QAEAAV12@ABV12@@Z */
3730 /* ?copyfmt@ios_base@std@@QEAAAEAV12@AEBV12@@Z */
3731 DEFINE_THISCALL_WRAPPER(ios_base_copyfmt
, 8)
3732 ios_base
* __thiscall
ios_base_copyfmt(ios_base
*this, const ios_base
*rhs
)
3734 TRACE("(%p %p)\n", this, rhs
);
3737 IOS_BASE_iosarray
*arr_cur
;
3738 IOS_BASE_fnarray
*event_cur
;
3740 ios_base_Tidy(this);
3742 for(arr_cur
=rhs
->arr
; arr_cur
; arr_cur
=arr_cur
->next
) {
3743 if(arr_cur
->long_val
)
3744 *ios_base_iword(this, arr_cur
->index
) = arr_cur
->long_val
;
3745 if(arr_cur
->ptr_val
)
3746 *ios_base_pword(this, arr_cur
->index
) = arr_cur
->ptr_val
;
3748 this->stdstr
= rhs
->stdstr
;
3749 this->fmtfl
= rhs
->fmtfl
;
3750 this->prec
= rhs
->prec
;
3751 this->wide
= rhs
->wide
;
3752 locale_operator_assign(IOS_LOCALE(this), IOS_LOCALE(rhs
));
3754 for(event_cur
=rhs
->calls
; event_cur
; event_cur
=event_cur
->next
)
3755 ios_base_register_callback(this, event_cur
->event_handler
, event_cur
->index
);
3757 ios_base_Callfns(this, EVENT_copyfmt_event
);
3758 ios_base_exceptions_set(this, rhs
->except
);
3764 /* ??4ios_base@std@@QAEAAV01@ABV01@@Z */
3765 /* ??4ios_base@std@@QEAAAEAV01@AEBV01@@Z */
3766 DEFINE_THISCALL_WRAPPER(ios_base_assign
, 8)
3767 ios_base
* __thiscall
ios_base_assign(ios_base
*this, const ios_base
*right
)
3769 TRACE("(%p %p)\n", this, right
);
3772 this->state
= right
->state
;
3773 ios_base_copyfmt(this, right
);
3779 /* ?fail@ios_base@std@@QBE_NXZ */
3780 /* ?fail@ios_base@std@@QEBA_NXZ */
3781 DEFINE_THISCALL_WRAPPER(ios_base_fail
, 4)
3782 bool __thiscall
ios_base_fail(const ios_base
*this)
3784 TRACE("(%p)\n", this);
3785 return (this->state
& (IOSTATE_failbit
|IOSTATE_badbit
)) != 0;
3788 /* ??7ios_base@std@@QBE_NXZ */
3789 /* ??7ios_base@std@@QEBA_NXZ */
3790 DEFINE_THISCALL_WRAPPER(ios_base_op_succ
, 4)
3791 bool __thiscall
ios_base_op_succ(const ios_base
*this)
3793 TRACE("(%p)\n", this);
3794 return ios_base_fail(this);
3797 /* ??Bios_base@std@@QBEPAXXZ */
3798 /* ??Bios_base@std@@QEBAPEAXXZ */
3799 DEFINE_THISCALL_WRAPPER(ios_base_op_fail
, 4)
3800 void* __thiscall
ios_base_op_fail(const ios_base
*this)
3802 TRACE("(%p)\n", this);
3803 return ios_base_fail(this) ? NULL
: (void*)this;
3806 /* ?_Addstd@ios_base@std@@IAEXXZ */
3807 /* ?_Addstd@ios_base@std@@IEAAXXZ */
3808 DEFINE_THISCALL_WRAPPER(ios_base_Addstd
, 4)
3809 void __thiscall
ios_base_Addstd(ios_base
*this)
3811 FIXME("(%p) stub\n", this);
3814 /* ?_Init@ios_base@std@@IAEXXZ */
3815 /* ?_Init@ios_base@std@@IEAAXXZ */
3816 DEFINE_THISCALL_WRAPPER(ios_base__Init
, 4)
3817 void __thiscall
ios_base__Init(ios_base
*this)
3819 TRACE("(%p)\n", this);
3822 this->state
= this->except
= IOSTATE_goodbit
;
3823 this->fmtfl
= FMTFLAG_skipws
| FMTFLAG_dec
;
3828 locale_ctor(IOS_LOCALE(this));
3831 /* ?bad@ios_base@std@@QBE_NXZ */
3832 /* ?bad@ios_base@std@@QEBA_NXZ */
3833 DEFINE_THISCALL_WRAPPER(ios_base_bad
, 4)
3834 bool __thiscall
ios_base_bad(const ios_base
*this)
3836 TRACE("(%p)\n", this);
3837 return (this->state
& IOSTATE_badbit
) != 0;
3840 /* ?eof@ios_base@std@@QBE_NXZ */
3841 /* ?eof@ios_base@std@@QEBA_NXZ */
3842 DEFINE_THISCALL_WRAPPER(ios_base_eof
, 4)
3843 bool __thiscall
ios_base_eof(const ios_base
*this)
3845 TRACE("(%p)\n", this);
3846 return (this->state
& IOSTATE_eofbit
) != 0;
3849 /* ?flags@ios_base@std@@QAEHH@Z */
3850 /* ?flags@ios_base@std@@QEAAHH@Z */
3851 DEFINE_THISCALL_WRAPPER(ios_base_flags_set
, 8)
3852 IOSB_fmtflags __thiscall
ios_base_flags_set(ios_base
*this, IOSB_fmtflags flags
)
3854 IOSB_fmtflags ret
= this->fmtfl
;
3856 TRACE("(%p %x)\n", this, flags
);
3858 this->fmtfl
= flags
& FMTFLAG_mask
;
3862 /* ?flags@ios_base@std@@QBEHXZ */
3863 /* ?flags@ios_base@std@@QEBAHXZ */
3864 DEFINE_THISCALL_WRAPPER(ios_base_flags_get
, 4)
3865 IOSB_fmtflags __thiscall
ios_base_flags_get(const ios_base
*this)
3867 TRACE("(%p)\n", this);
3871 /* ?getloc@ios_base@std@@QBE?AVlocale@2@XZ */
3872 /* ?getloc@ios_base@std@@QEBA?AVlocale@2@XZ */
3873 DEFINE_THISCALL_WRAPPER(ios_base_getloc
, 8)
3874 locale
* __thiscall
ios_base_getloc(const ios_base
*this, locale
*ret
)
3876 TRACE("(%p)\n", this);
3877 return locale_copy_ctor(ret
, IOS_LOCALE(this));
3880 /* ?good@ios_base@std@@QBE_NXZ */
3881 /* ?good@ios_base@std@@QEBA_NXZ */
3882 DEFINE_THISCALL_WRAPPER(ios_base_good
, 4)
3883 bool __thiscall
ios_base_good(const ios_base
*this)
3885 TRACE("(%p)\n", this);
3886 return this->state
== IOSTATE_goodbit
;
3889 /* ?imbue@ios_base@std@@QAE?AVlocale@2@ABV32@@Z */
3890 /* ?imbue@ios_base@std@@QEAA?AVlocale@2@AEBV32@@Z */
3891 DEFINE_THISCALL_WRAPPER(ios_base_imbue
, 12)
3892 locale
* __thiscall
ios_base_imbue(ios_base
*this, locale
*ret
, const locale
*loc
)
3894 TRACE("(%p %p)\n", this, loc
);
3895 *ret
= *IOS_LOCALE(this);
3896 locale_copy_ctor(IOS_LOCALE(this), loc
);
3900 /* ?precision@ios_base@std@@QAEHH@Z */
3901 /* ?precision@ios_base@std@@QEAA_J_J@Z */
3902 DEFINE_THISCALL_WRAPPER(ios_base_precision_set
, 8)
3903 streamsize __thiscall
ios_base_precision_set(ios_base
*this, streamsize precision
)
3905 streamsize ret
= this->prec
;
3907 TRACE("(%p %Id)\n", this, precision
);
3909 this->prec
= precision
;
3913 /* ?precision@ios_base@std@@QBEHXZ */
3914 /* ?precision@ios_base@std@@QEBA_JXZ */
3915 DEFINE_THISCALL_WRAPPER(ios_base_precision_get
, 4)
3916 streamsize __thiscall
ios_base_precision_get(const ios_base
*this)
3918 TRACE("(%p)\n", this);
3922 /* ?rdstate@ios_base@std@@QBEHXZ */
3923 /* ?rdstate@ios_base@std@@QEBAHXZ */
3924 DEFINE_THISCALL_WRAPPER(ios_base_rdstate
, 4)
3925 IOSB_iostate __thiscall
ios_base_rdstate(const ios_base
*this)
3927 TRACE("(%p)\n", this);
3931 /* ?setf@ios_base@std@@QAEHHH@Z */
3932 /* ?setf@ios_base@std@@QEAAHHH@Z */
3933 DEFINE_THISCALL_WRAPPER(ios_base_setf_mask
, 12)
3934 IOSB_fmtflags __thiscall
ios_base_setf_mask(ios_base
*this, IOSB_fmtflags flags
, IOSB_fmtflags mask
)
3936 IOSB_fmtflags ret
= this->fmtfl
;
3938 TRACE("(%p %x %x)\n", this, flags
, mask
);
3940 this->fmtfl
= (this->fmtfl
& (~mask
)) | (flags
& mask
& FMTFLAG_mask
);
3944 /* ?setf@ios_base@std@@QAEHH@Z */
3945 /* ?setf@ios_base@std@@QEAAHH@Z */
3946 DEFINE_THISCALL_WRAPPER(ios_base_setf
, 8)
3947 IOSB_fmtflags __thiscall
ios_base_setf(ios_base
*this, IOSB_fmtflags flags
)
3949 IOSB_fmtflags ret
= this->fmtfl
;
3951 TRACE("(%p %x)\n", this, flags
);
3953 this->fmtfl
|= flags
& FMTFLAG_mask
;
3957 /* ?setstate@ios_base@std@@QAEXH_N@Z */
3958 /* ?setstate@ios_base@std@@QEAAXH_N@Z */
3959 DEFINE_THISCALL_WRAPPER(ios_base_setstate_reraise
, 12)
3960 void __thiscall
ios_base_setstate_reraise(ios_base
*this, IOSB_iostate state
, bool reraise
)
3962 TRACE("(%p %x %x)\n", this, state
, reraise
);
3964 if(state
!= IOSTATE_goodbit
)
3965 ios_base_clear_reraise(this, this->state
| state
, reraise
);
3968 /* ?setstate@ios_base@std@@QAEXH@Z */
3969 /* ?setstate@ios_base@std@@QEAAXH@Z */
3970 DEFINE_THISCALL_WRAPPER(ios_base_setstate
, 8)
3971 void __thiscall
ios_base_setstate(ios_base
*this, IOSB_iostate state
)
3973 ios_base_setstate_reraise(this, state
, FALSE
);
3976 /* ?sync_with_stdio@ios_base@std@@SA_N_N@Z */
3977 bool __cdecl
ios_base_sync_with_stdio(bool sync
)
3982 TRACE("(%x)\n", sync
);
3984 _Lockit_ctor_locktype(&lock
, _LOCK_STREAM
);
3985 ret
= ios_base_Sync
;
3986 ios_base_Sync
= sync
;
3987 _Lockit_dtor(&lock
);
3991 /* ?unsetf@ios_base@std@@QAEXH@Z */
3992 /* ?unsetf@ios_base@std@@QEAAXH@Z */
3993 DEFINE_THISCALL_WRAPPER(ios_base_unsetf
, 8)
3994 void __thiscall
ios_base_unsetf(ios_base
*this, IOSB_fmtflags flags
)
3996 TRACE("(%p %x)\n", this, flags
);
3997 this->fmtfl
&= ~flags
;
4000 /* ?width@ios_base@std@@QAEHH@Z */
4001 /* ?width@ios_base@std@@QEAA_J_J@Z */
4002 DEFINE_THISCALL_WRAPPER(ios_base_width_set
, 8)
4003 streamsize __thiscall
ios_base_width_set(ios_base
*this, streamsize width
)
4005 streamsize ret
= this->wide
;
4007 TRACE("(%p %Id)\n", this, width
);
4013 /* ?width@ios_base@std@@QBEHXZ */
4014 /* ?width@ios_base@std@@QEBA_JXZ */
4015 DEFINE_THISCALL_WRAPPER(ios_base_width_get
, 4)
4016 streamsize __thiscall
ios_base_width_get(ios_base
*this)
4018 TRACE("(%p)\n", this);
4022 /* ?xalloc@ios_base@std@@SAHXZ */
4023 int __cdecl
ios_base_xalloc(void)
4030 _Lockit_ctor_locktype(&lock
, _LOCK_STREAM
);
4031 ret
= ios_base_Index
++;
4032 _Lockit_dtor(&lock
);
4036 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IAE@XZ */
4037 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IEAA@XZ */
4038 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor
, 4)
4039 basic_ios_char
* __thiscall
basic_ios_char_ctor(basic_ios_char
*this)
4041 TRACE("(%p)\n", this);
4043 ios_base_ctor(&this->base
);
4044 this->base
.vtable
= &basic_ios_char_vtable
;
4048 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IAEXPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
4049 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
4050 DEFINE_THISCALL_WRAPPER(basic_ios_char_init
, 12)
4051 void __thiscall
basic_ios_char_init(basic_ios_char
*this, basic_streambuf_char
*streambuf
, bool isstd
)
4053 TRACE("(%p %p %x)\n", this, streambuf
, isstd
);
4054 ios_base__Init(&this->base
);
4055 this->strbuf
= streambuf
;
4056 this->stream
= NULL
;
4060 ios_base_setstate(&this->base
, IOSTATE_badbit
);
4063 FIXME("standard streams not handled yet\n");
4066 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4067 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4068 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor_streambuf
, 8)
4069 basic_ios_char
* __thiscall
basic_ios_char_ctor_streambuf(basic_ios_char
*this, basic_streambuf_char
*strbuf
)
4071 TRACE("(%p %p)\n", this, strbuf
);
4073 basic_ios_char_ctor(this);
4074 basic_ios_char_init(this, strbuf
, FALSE
);
4078 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UAE@XZ */
4079 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UEAA@XZ */
4080 DEFINE_THISCALL_WRAPPER(basic_ios_char_dtor
, 4)
4081 void __thiscall
basic_ios_char_dtor(basic_ios_char
*this)
4083 TRACE("(%p)\n", this);
4084 ios_base_dtor(&this->base
);
4087 DEFINE_THISCALL_WRAPPER(basic_ios_char_vector_dtor
, 8)
4088 basic_ios_char
* __thiscall
basic_ios_char_vector_dtor(basic_ios_char
*this, unsigned int flags
)
4090 TRACE("(%p %x)\n", this, flags
);
4092 /* we have an array, with the number of elements stored before the first object */
4093 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
4095 for(i
=*ptr
-1; i
>=0; i
--)
4096 basic_ios_char_dtor(this+i
);
4097 operator_delete(ptr
);
4099 basic_ios_char_dtor(this);
4101 operator_delete(this);
4107 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
4108 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
4109 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear_reraise
, 12)
4110 void __thiscall
basic_ios_char_clear_reraise(basic_ios_char
*this, IOSB_iostate state
, bool reraise
)
4112 TRACE("(%p %x %x)\n", this, state
, reraise
);
4113 ios_base_clear_reraise(&this->base
, state
| (this->strbuf
? IOSTATE_goodbit
: IOSTATE_badbit
), reraise
);
4116 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
4117 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
4118 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear
, 8)
4119 void __thiscall
basic_ios_char_clear(basic_ios_char
*this, unsigned int state
)
4121 basic_ios_char_clear_reraise(this, (IOSB_iostate
)state
, FALSE
);
4124 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEAAV12@ABV12@@Z */
4125 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEBV12@@Z */
4126 DEFINE_THISCALL_WRAPPER(basic_ios_char_copyfmt
, 8)
4127 basic_ios_char
* __thiscall
basic_ios_char_copyfmt(basic_ios_char
*this, basic_ios_char
*copy
)
4129 TRACE("(%p %p)\n", this, copy
);
4133 this->stream
= copy
->stream
;
4134 this->fillch
= copy
->fillch
;
4135 ios_base_copyfmt(&this->base
, ©
->base
);
4139 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEDD@Z */
4140 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAADD@Z */
4141 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_set
, 8)
4142 char __thiscall
basic_ios_char_fill_set(basic_ios_char
*this, char fill
)
4144 char ret
= this->fillch
;
4146 TRACE("(%p %c)\n", this, fill
);
4148 this->fillch
= fill
;
4152 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDXZ */
4153 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADXZ */
4154 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_get
, 4)
4155 char __thiscall
basic_ios_char_fill_get(basic_ios_char
*this)
4157 TRACE("(%p)\n", this);
4158 return this->fillch
;
4161 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
4162 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
4163 DEFINE_THISCALL_WRAPPER(basic_ios_char_imbue
, 12)
4164 locale
*__thiscall
basic_ios_char_imbue(basic_ios_char
*this, locale
*ret
, const locale
*loc
)
4166 TRACE("(%p %p %p)\n", this, ret
, loc
);
4169 basic_streambuf_char_pubimbue(this->strbuf
, ret
, loc
);
4173 return ios_base_imbue(&this->base
, ret
, loc
);
4176 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDDD@Z */
4177 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADDD@Z */
4178 DEFINE_THISCALL_WRAPPER(basic_ios_char_narrow
, 12)
4179 char __thiscall
basic_ios_char_narrow(basic_ios_char
*this, char ch
, char def
)
4181 TRACE("(%p %c %c)\n", this, ch
, def
);
4182 return ctype_char_narrow_ch(ctype_char_use_facet(IOS_LOCALE(this->strbuf
)), ch
, def
);
4185 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PAV32@@Z */
4186 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAV32@@Z */
4187 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_set
, 8)
4188 basic_streambuf_char
* __thiscall
basic_ios_char_rdbuf_set(basic_ios_char
*this, basic_streambuf_char
*streambuf
)
4190 basic_streambuf_char
*ret
= this->strbuf
;
4192 TRACE("(%p %p)\n", this, streambuf
);
4194 this->strbuf
= streambuf
;
4195 basic_ios_char_clear(this, IOSTATE_goodbit
);
4199 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
4200 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
4201 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_get
, 4)
4202 basic_streambuf_char
* __thiscall
basic_ios_char_rdbuf_get(const basic_ios_char
*this)
4204 TRACE("(%p)\n", this);
4205 return this->strbuf
;
4208 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
4209 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
4210 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate_reraise
, 12)
4211 void __thiscall
basic_ios_char_setstate_reraise(basic_ios_char
*this, IOSB_iostate state
, bool reraise
)
4213 TRACE("(%p %x %x)\n", this, state
, reraise
);
4215 if(state
!= IOSTATE_goodbit
)
4216 basic_ios_char_clear_reraise(this, this->base
.state
| state
, reraise
);
4219 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
4220 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
4221 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate
, 8)
4222 void __thiscall
basic_ios_char_setstate(basic_ios_char
*this, unsigned int state
)
4224 basic_ios_char_setstate_reraise(this, (IOSB_iostate
)state
, FALSE
);
4227 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@PAV32@@Z */
4228 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@PEAV32@@Z */
4229 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_set
, 8)
4230 basic_ostream_char
* __thiscall
basic_ios_char_tie_set(basic_ios_char
*this, basic_ostream_char
*ostream
)
4232 basic_ostream_char
*ret
= this->stream
;
4234 TRACE("(%p %p)\n", this, ostream
);
4236 this->stream
= ostream
;
4240 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
4241 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
4242 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_get
, 4)
4243 basic_ostream_char
* __thiscall
basic_ios_char_tie_get(const basic_ios_char
*this)
4245 TRACE("(%p)\n", this);
4246 return this->stream
;
4249 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDD@Z */
4250 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADD@Z */
4251 DEFINE_THISCALL_WRAPPER(basic_ios_char_widen
, 8)
4252 char __thiscall
basic_ios_char_widen(basic_ios_char
*this, char ch
)
4254 TRACE("(%p %c)\n", this, ch
);
4255 return ctype_char_widen_ch(ctype_char_use_facet(IOS_LOCALE(this->strbuf
)), ch
);
4258 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IAE@XZ */
4259 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IEAA@XZ */
4260 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor
, 4)
4261 basic_ios_wchar
* __thiscall
basic_ios_short_ctor(basic_ios_wchar
*this)
4263 TRACE("(%p)\n", this);
4265 ios_base_ctor(&this->base
);
4266 this->base
.vtable
= &basic_ios_short_vtable
;
4270 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IAEXPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
4271 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IEAAXPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
4272 DEFINE_THISCALL_WRAPPER(basic_ios_short_init
, 12)
4273 void __thiscall
basic_ios_short_init(basic_ios_wchar
*this, basic_streambuf_wchar
*streambuf
, bool isstd
)
4275 TRACE("(%p %p %x)\n", this, streambuf
, isstd
);
4276 ios_base__Init(&this->base
);
4277 this->strbuf
= streambuf
;
4278 this->stream
= NULL
;
4282 ios_base_setstate(&this->base
, IOSTATE_badbit
);
4285 FIXME("standard streams not handled yet\n");
4288 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
4289 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
4290 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor_streambuf
, 8)
4291 basic_ios_wchar
* __thiscall
basic_ios_short_ctor_streambuf(basic_ios_wchar
*this, basic_streambuf_wchar
*strbuf
)
4293 TRACE("(%p %p)\n", this, strbuf
);
4295 basic_ios_short_ctor(this);
4296 basic_ios_short_init(this, strbuf
, FALSE
);
4300 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UAE@XZ */
4301 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UEAA@XZ */
4302 DEFINE_THISCALL_WRAPPER(basic_ios_short_dtor
, 4)
4303 void __thiscall
basic_ios_short_dtor(basic_ios_wchar
*this)
4305 TRACE("(%p)\n", this);
4306 ios_base_dtor(&this->base
);
4309 DEFINE_THISCALL_WRAPPER(basic_ios_short_vector_dtor
, 8)
4310 basic_ios_wchar
* __thiscall
basic_ios_short_vector_dtor(basic_ios_wchar
*this, unsigned int flags
)
4312 TRACE("(%p %x)\n", this, flags
);
4314 /* we have an array, with the number of elements stored before the first object */
4315 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
4317 for(i
=*ptr
-1; i
>=0; i
--)
4318 basic_ios_short_dtor(this+i
);
4319 operator_delete(ptr
);
4321 basic_ios_short_dtor(this);
4323 operator_delete(this);
4329 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
4330 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
4331 DEFINE_THISCALL_WRAPPER(basic_ios_short_clear_reraise
, 12)
4332 void __thiscall
basic_ios_short_clear_reraise(basic_ios_wchar
*this, IOSB_iostate state
, bool reraise
)
4334 TRACE("(%p %x %x)\n", this, state
, reraise
);
4335 ios_base_clear_reraise(&this->base
, state
| (this->strbuf
? IOSTATE_goodbit
: IOSTATE_badbit
), reraise
);
4338 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
4339 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
4340 DEFINE_THISCALL_WRAPPER(basic_ios_short_clear
, 8)
4341 void __thiscall
basic_ios_short_clear(basic_ios_wchar
*this, unsigned int state
)
4343 basic_ios_short_clear_reraise(this, (IOSB_iostate
)state
, FALSE
);
4346 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEAAV12@ABV12@@Z */
4347 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEBV12@@Z */
4348 DEFINE_THISCALL_WRAPPER(basic_ios_short_copyfmt
, 8)
4349 basic_ios_wchar
* __thiscall
basic_ios_short_copyfmt(basic_ios_wchar
*this, basic_ios_wchar
*copy
)
4351 TRACE("(%p %p)\n", this, copy
);
4355 this->stream
= copy
->stream
;
4356 this->fillch
= copy
->fillch
;
4357 ios_base_copyfmt(&this->base
, ©
->base
);
4361 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEGG@Z */
4362 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
4363 DEFINE_THISCALL_WRAPPER(basic_ios_short_fill_set
, 8)
4364 wchar_t __thiscall
basic_ios_short_fill_set(basic_ios_wchar
*this, wchar_t fill
)
4366 wchar_t ret
= this->fillch
;
4368 TRACE("(%p %c)\n", this, fill
);
4370 this->fillch
= fill
;
4374 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGXZ */
4375 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGXZ */
4376 DEFINE_THISCALL_WRAPPER(basic_ios_short_fill_get
, 4)
4377 wchar_t __thiscall
basic_ios_short_fill_get(basic_ios_wchar
*this)
4379 TRACE("(%p)\n", this);
4380 return this->fillch
;
4383 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
4384 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
4385 DEFINE_THISCALL_WRAPPER(basic_ios_short_imbue
, 12)
4386 locale
*__thiscall
basic_ios_short_imbue(basic_ios_wchar
*this, locale
*ret
, const locale
*loc
)
4388 TRACE("(%p %p %p)\n", this, ret
, loc
);
4391 basic_streambuf_wchar_pubimbue(this->strbuf
, ret
, loc
);
4395 return ios_base_imbue(&this->base
, ret
, loc
);
4398 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEDGD@Z */
4399 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBADGD@Z */
4400 DEFINE_THISCALL_WRAPPER(basic_ios_short_narrow
, 12)
4401 char __thiscall
basic_ios_short_narrow(basic_ios_wchar
*this, wchar_t ch
, char def
)
4403 TRACE("(%p %c %c)\n", this, ch
, def
);
4404 return ctype_wchar_narrow_ch(ctype_wchar_use_facet(IOS_LOCALE(this->strbuf
)), ch
, def
);
4407 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAV32@@Z */
4408 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAV32@@Z */
4409 DEFINE_THISCALL_WRAPPER(basic_ios_short_rdbuf_set
, 8)
4410 basic_streambuf_wchar
* __thiscall
basic_ios_short_rdbuf_set(basic_ios_wchar
*this, basic_streambuf_wchar
*streambuf
)
4412 basic_streambuf_wchar
*ret
= this->strbuf
;
4414 TRACE("(%p %p)\n", this, streambuf
);
4416 this->strbuf
= streambuf
;
4417 basic_ios_short_clear(this, IOSTATE_goodbit
);
4421 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
4422 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
4423 DEFINE_THISCALL_WRAPPER(basic_ios_short_rdbuf_get
, 4)
4424 basic_streambuf_wchar
* __thiscall
basic_ios_short_rdbuf_get(const basic_ios_wchar
*this)
4426 TRACE("(%p)\n", this);
4427 return this->strbuf
;
4430 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
4431 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
4432 DEFINE_THISCALL_WRAPPER(basic_ios_short_setstate_reraise
, 12)
4433 void __thiscall
basic_ios_short_setstate_reraise(basic_ios_wchar
*this, IOSB_iostate state
, bool reraise
)
4435 TRACE("(%p %x %x)\n", this, state
, reraise
);
4437 if(state
!= IOSTATE_goodbit
)
4438 basic_ios_short_clear_reraise(this, this->base
.state
| state
, reraise
);
4441 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
4442 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
4443 DEFINE_THISCALL_WRAPPER(basic_ios_short_setstate
, 8)
4444 void __thiscall
basic_ios_short_setstate(basic_ios_wchar
*this, IOSB_iostate state
)
4446 basic_ios_short_setstate_reraise(this, state
, FALSE
);
4449 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@PAV32@@Z */
4450 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@PEAV32@@Z */
4451 DEFINE_THISCALL_WRAPPER(basic_ios_short_tie_set
, 8)
4452 basic_ostream_wchar
* __thiscall
basic_ios_short_tie_set(basic_ios_wchar
*this, basic_ostream_wchar
*ostream
)
4454 basic_ostream_wchar
*ret
= this->stream
;
4456 TRACE("(%p %p)\n", this, ostream
);
4458 this->stream
= ostream
;
4462 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
4463 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
4464 DEFINE_THISCALL_WRAPPER(basic_ios_short_tie_get
, 4)
4465 basic_ostream_wchar
* __thiscall
basic_ios_short_tie_get(const basic_ios_wchar
*this)
4467 TRACE("(%p)\n", this);
4468 return this->stream
;
4471 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGD@Z */
4472 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGD@Z */
4473 DEFINE_THISCALL_WRAPPER(basic_ios_short_widen
, 8)
4474 wchar_t __thiscall
basic_ios_short_widen(basic_ios_wchar
*this, char ch
)
4476 TRACE("(%p %c)\n", this, ch
);
4477 return ctype_wchar_widen_ch(ctype_wchar_use_facet(IOS_LOCALE(this->strbuf
)), ch
);
4480 /* Caution: basic_ostream uses virtual inheritance.
4481 * All constructors have additional parameter that says if base class should be initialized.
4482 * Base class needs to be accessed using vbtable.
4484 static inline basic_ios_char
* basic_ostream_char_get_basic_ios(basic_ostream_char
*this)
4486 return (basic_ios_char
*)((char*)this+this->vbtable
[1]);
4489 static inline basic_ios_char
* basic_ostream_char_to_basic_ios(basic_ostream_char
*ptr
)
4491 return (basic_ios_char
*)((char*)ptr
+basic_ostream_char_vbtable
[1]);
4494 static inline basic_ostream_char
* basic_ostream_char_from_basic_ios(basic_ios_char
*ptr
)
4496 return (basic_ostream_char
*)((char*)ptr
-basic_ostream_char_vbtable
[1]);
4499 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
4500 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
4501 DEFINE_THISCALL_WRAPPER(basic_ostream_char_ctor
, 20)
4502 basic_ostream_char
* __thiscall
basic_ostream_char_ctor(basic_ostream_char
*this,
4503 basic_streambuf_char
*strbuf
, bool isstd
, bool init
, bool virt_init
)
4505 basic_ios_char
*base
;
4507 TRACE("(%p %p %d %d %d)\n", this, strbuf
, isstd
, init
, virt_init
);
4510 this->vbtable
= basic_ostream_char_vbtable
;
4511 base
= basic_ostream_char_get_basic_ios(this);
4512 basic_ios_char_ctor(base
);
4514 base
= basic_ostream_char_get_basic_ios(this);
4517 base
->base
.vtable
= &basic_ostream_char_vtable
;
4519 basic_ios_char_init(base
, strbuf
, isstd
);
4523 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
4524 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
4525 DEFINE_THISCALL_WRAPPER(basic_ostream_char_ctor_uninitialized
, 12)
4526 basic_ostream_char
* __thiscall
basic_ostream_char_ctor_uninitialized(basic_ostream_char
*this,
4527 int uninitialized
, bool virt_init
)
4529 basic_ios_char
*base
;
4531 TRACE("(%p %d)\n", this, uninitialized
);
4534 this->vbtable
= basic_ostream_char_vbtable
;
4535 base
= basic_ostream_char_get_basic_ios(this);
4536 basic_ios_char_ctor(base
);
4538 base
= basic_ostream_char_get_basic_ios(this);
4541 base
->base
.vtable
= &basic_ostream_char_vtable
;
4542 ios_base_Addstd(&base
->base
);
4546 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
4547 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
4548 DEFINE_THISCALL_WRAPPER(basic_ostream_char_dtor
, 4)
4549 void __thiscall
basic_ostream_char_dtor(basic_ios_char
*base
)
4551 basic_ostream_char
*this = basic_ostream_char_from_basic_ios(base
);
4553 /* don't destroy virtual base here */
4554 TRACE("(%p)\n", this);
4557 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
4558 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
4559 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vbase_dtor
, 4)
4560 void __thiscall
basic_ostream_char_vbase_dtor(basic_ostream_char
*this)
4562 TRACE("(%p)\n", this);
4563 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(this));
4564 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(this));
4567 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vector_dtor
, 8)
4568 basic_ostream_char
* __thiscall
basic_ostream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
4570 basic_ostream_char
*this = basic_ostream_char_from_basic_ios(base
);
4572 TRACE("(%p %x)\n", this, flags
);
4575 /* we have an array, with the number of elements stored before the first object */
4576 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
4578 for(i
=*ptr
-1; i
>=0; i
--)
4579 basic_ostream_char_vbase_dtor(this+i
);
4580 operator_delete(ptr
);
4582 basic_ostream_char_vbase_dtor(this);
4584 operator_delete(this);
4590 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
4591 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
4592 DEFINE_THISCALL_WRAPPER(basic_ostream_char_flush
, 4)
4593 basic_ostream_char
* __thiscall
basic_ostream_char_flush(basic_ostream_char
*this)
4595 /* this function is not matching C++ specification */
4596 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4598 TRACE("(%p)\n", this);
4600 if(basic_ios_char_rdbuf_get(base
) && ios_base_good(&base
->base
)
4601 && basic_streambuf_char_pubsync(basic_ios_char_rdbuf_get(base
))==-1)
4602 basic_ios_char_setstate(base
, IOSTATE_badbit
);
4606 /* ?flush@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
4607 /* ?flush@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
4608 basic_ostream_char
* __cdecl
flush_ostream_char(basic_ostream_char
*ostream
)
4610 return basic_ostream_char_flush(ostream
);
4613 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
4614 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
4615 DEFINE_THISCALL_WRAPPER(basic_ostream_char_osfx
, 4)
4616 void __thiscall
basic_ostream_char_osfx(basic_ostream_char
*this)
4618 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4620 TRACE("(%p)\n", this);
4622 if(base
->base
.fmtfl
& FMTFLAG_unitbuf
)
4623 basic_ostream_char_flush(this);
4626 static BOOL
basic_ostream_char_sentry_create(basic_ostream_char
*ostr
)
4628 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
4630 if(ios_base_good(&base
->base
) && base
->stream
)
4631 basic_ostream_char_flush(base
->stream
);
4633 return ios_base_good(&base
->base
);
4636 static void basic_ostream_char_sentry_destroy(basic_ostream_char
*ostr
)
4638 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
4640 if(ios_base_good(&base
->base
) && !__uncaught_exception())
4641 basic_ostream_char_osfx(ostr
);
4644 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE_NXZ */
4645 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA_NXZ */
4646 DEFINE_THISCALL_WRAPPER(basic_ostream_char_opfx
, 4)
4647 bool __thiscall
basic_ostream_char_opfx(basic_ostream_char
*this)
4649 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4651 TRACE("(%p)\n", this);
4653 if(ios_base_good(&base
->base
) && base
->stream
)
4654 basic_ostream_char_flush(base
->stream
);
4655 return ios_base_good(&base
->base
);
4658 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
4659 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
4660 DEFINE_THISCALL_WRAPPER(basic_ostream_char_put
, 8)
4661 basic_ostream_char
* __thiscall
basic_ostream_char_put(basic_ostream_char
*this, char ch
)
4663 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4665 TRACE("(%p %c)\n", this, ch
);
4667 if(!basic_ostream_char_sentry_create(this)
4668 || basic_streambuf_char_sputc(base
->strbuf
, ch
)==EOF
) {
4669 basic_ostream_char_sentry_destroy(this);
4670 basic_ios_char_setstate(base
, IOSTATE_badbit
);
4674 basic_ostream_char_sentry_destroy(this);
4678 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@JH@Z */
4679 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
4680 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp
, 12)
4681 basic_ostream_char
* __thiscall
basic_ostream_char_seekp(basic_ostream_char
*this, streamoff off
, int way
)
4683 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4685 TRACE("(%p %Id %d)\n", this, off
, way
);
4687 if(!ios_base_fail(&base
->base
)) {
4690 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base
),
4691 &seek
, off
, way
, OPENMODE_out
);
4692 if(seek
.off
==-1 && seek
.pos
==0 && seek
.state
==0)
4693 basic_ios_char_setstate(base
, IOSTATE_failbit
);
4698 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
4699 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
4700 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp_fpos
, 28)
4701 basic_ostream_char
* __thiscall
basic_ostream_char_seekp_fpos(basic_ostream_char
*this, fpos_int pos
)
4703 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4705 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos
));
4707 if(!ios_base_fail(&base
->base
)) {
4710 basic_streambuf_char_pubseekpos(basic_ios_char_rdbuf_get(base
),
4711 &seek
, pos
, OPENMODE_out
);
4712 if(seek
.off
==-1 && seek
.pos
==0 && seek
.state
==0)
4713 basic_ios_char_setstate(base
, IOSTATE_failbit
);
4718 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
4719 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
4720 DEFINE_THISCALL_WRAPPER(basic_ostream_char_tellp
, 8)
4721 fpos_int
* __thiscall
basic_ostream_char_tellp(basic_ostream_char
*this, fpos_int
*ret
)
4723 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4725 TRACE("(%p)\n", this);
4727 if(!ios_base_fail(&base
->base
)) {
4728 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base
),
4729 ret
, 0, SEEKDIR_cur
, OPENMODE_out
);
4738 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@PBDH@Z */
4739 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEBD_J@Z */
4740 DEFINE_THISCALL_WRAPPER(basic_ostream_char_write
, 12)
4741 basic_ostream_char
* __thiscall
basic_ostream_char_write(basic_ostream_char
*this, const char *str
, streamsize count
)
4743 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4745 TRACE("(%p %s %Id)\n", this, debugstr_a(str
), count
);
4747 if(!basic_ostream_char_sentry_create(this)
4748 || basic_streambuf_char_sputn(base
->strbuf
, str
, count
)!=count
) {
4749 basic_ostream_char_sentry_destroy(this);
4750 basic_ios_char_setstate(base
, IOSTATE_badbit
);
4754 basic_ostream_char_sentry_destroy(this);
4758 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@F@Z */
4759 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@F@Z */
4760 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_short
, 8)
4761 basic_ostream_char
* __thiscall
basic_ostream_char_print_short(basic_ostream_char
*this, short val
)
4763 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4764 int state
= IOSTATE_goodbit
;
4766 TRACE("(%p %d)\n", this, val
);
4768 if(basic_ostream_char_sentry_create(this)) {
4769 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4770 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
4771 ostreambuf_iterator_char dest
;
4773 memset(&dest
, 0, sizeof(dest
));
4774 dest
.strbuf
= strbuf
;
4775 num_put_char_put_long(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
),
4776 (ios_base_flags_get(&base
->base
) & FMTFLAG_basefield
& (FMTFLAG_oct
| FMTFLAG_hex
))
4777 ? (LONG
)((unsigned short)val
) : (LONG
)val
);
4779 basic_ostream_char_sentry_destroy(this);
4781 basic_ios_char_setstate(base
, state
);
4785 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@G@Z */
4786 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@G@Z */
4787 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ushort
, 8)
4788 basic_ostream_char
* __thiscall
basic_ostream_char_print_ushort(basic_ostream_char
*this, unsigned short val
)
4790 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4791 int state
= IOSTATE_goodbit
;
4793 TRACE("(%p %u)\n", this, val
);
4795 if(basic_ostream_char_sentry_create(this)) {
4796 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4797 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
4798 ostreambuf_iterator_char dest
;
4800 memset(&dest
, 0, sizeof(dest
));
4801 dest
.strbuf
= strbuf
;
4802 num_put_char_put_ulong(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4804 basic_ostream_char_sentry_destroy(this);
4806 basic_ios_char_setstate(base
, state
);
4810 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z */
4811 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@H@Z */
4812 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z */
4813 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@J@Z */
4814 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int
, 8)
4815 basic_ostream_char
* __thiscall
basic_ostream_char_print_int(basic_ostream_char
*this, int val
)
4817 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4818 int state
= IOSTATE_goodbit
;
4820 TRACE("(%p %d)\n", this, val
);
4822 if(basic_ostream_char_sentry_create(this)) {
4823 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4824 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
4825 ostreambuf_iterator_char dest
;
4827 memset(&dest
, 0, sizeof(dest
));
4828 dest
.strbuf
= strbuf
;
4829 num_put_char_put_long(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4831 basic_ostream_char_sentry_destroy(this);
4833 basic_ios_char_setstate(base
, state
);
4837 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@I@Z */
4838 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@I@Z */
4839 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z */
4840 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@K@Z */
4841 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint
, 8)
4842 basic_ostream_char
* __thiscall
basic_ostream_char_print_uint(basic_ostream_char
*this, unsigned int val
)
4844 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4845 int state
= IOSTATE_goodbit
;
4847 TRACE("(%p %u)\n", this, val
);
4849 if(basic_ostream_char_sentry_create(this)) {
4850 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4851 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
4852 ostreambuf_iterator_char dest
;
4854 memset(&dest
, 0, sizeof(dest
));
4855 dest
.strbuf
= strbuf
;
4856 num_put_char_put_ulong(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4858 basic_ostream_char_sentry_destroy(this);
4860 basic_ios_char_setstate(base
, state
);
4864 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@M@Z */
4865 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@M@Z */
4866 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_float
, 8)
4867 basic_ostream_char
* __thiscall
basic_ostream_char_print_float(basic_ostream_char
*this, float val
)
4869 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4870 int state
= IOSTATE_goodbit
;
4872 TRACE("(%p %f)\n", this, val
);
4874 if(basic_ostream_char_sentry_create(this)) {
4875 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4876 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
4877 ostreambuf_iterator_char dest
;
4879 memset(&dest
, 0, sizeof(dest
));
4880 dest
.strbuf
= strbuf
;
4881 num_put_char_put_double(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4883 basic_ostream_char_sentry_destroy(this);
4885 basic_ios_char_setstate(base
, state
);
4889 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@N@Z */
4890 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@N@Z */
4891 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_double
, 12)
4892 basic_ostream_char
* __thiscall
basic_ostream_char_print_double(basic_ostream_char
*this, double val
)
4894 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4895 int state
= IOSTATE_goodbit
;
4897 TRACE("(%p %lf)\n", this, val
);
4899 if(basic_ostream_char_sentry_create(this)) {
4900 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4901 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
4902 ostreambuf_iterator_char dest
;
4904 memset(&dest
, 0, sizeof(dest
));
4905 dest
.strbuf
= strbuf
;
4906 num_put_char_put_double(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4908 basic_ostream_char_sentry_destroy(this);
4910 basic_ios_char_setstate(base
, state
);
4914 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@O@Z */
4915 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@O@Z */
4916 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ldouble
, 12)
4917 basic_ostream_char
* __thiscall
basic_ostream_char_print_ldouble(basic_ostream_char
*this, double val
)
4919 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4920 int state
= IOSTATE_goodbit
;
4922 TRACE("(%p %lf)\n", this, val
);
4924 if(basic_ostream_char_sentry_create(this)) {
4925 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4926 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
4927 ostreambuf_iterator_char dest
;
4929 memset(&dest
, 0, sizeof(dest
));
4930 dest
.strbuf
= strbuf
;
4931 num_put_char_put_ldouble(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4933 basic_ostream_char_sentry_destroy(this);
4935 basic_ios_char_setstate(base
, state
);
4939 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4940 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4941 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_streambuf
, 8)
4942 basic_ostream_char
* __thiscall
basic_ostream_char_print_streambuf(basic_ostream_char
*this, basic_streambuf_char
*val
)
4944 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4945 IOSB_iostate state
= IOSTATE_badbit
;
4948 TRACE("(%p %p)\n", this, val
);
4950 if(basic_ostream_char_sentry_create(this)) {
4951 for(c
= basic_streambuf_char_sgetc(val
); c
!=EOF
;
4952 c
= basic_streambuf_char_snextc(val
)) {
4953 state
= IOSTATE_goodbit
;
4955 if(basic_streambuf_char_sputc(base
->strbuf
, c
) == EOF
) {
4956 state
= IOSTATE_badbit
;
4961 state
= IOSTATE_badbit
;
4963 basic_ostream_char_sentry_destroy(this);
4965 ios_base_width_set(&base
->base
, 0);
4966 basic_ios_char_setstate(base
, state
);
4970 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PBX@Z */
4971 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEBX@Z */
4972 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ptr
, 8)
4973 basic_ostream_char
* __thiscall
basic_ostream_char_print_ptr(basic_ostream_char
*this, const void *val
)
4975 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4976 int state
= IOSTATE_goodbit
;
4978 TRACE("(%p %p)\n", this, val
);
4980 if(basic_ostream_char_sentry_create(this)) {
4981 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4982 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
4983 ostreambuf_iterator_char dest
;
4985 memset(&dest
, 0, sizeof(dest
));
4986 dest
.strbuf
= strbuf
;
4987 num_put_char_put_ptr(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4989 basic_ostream_char_sentry_destroy(this);
4991 basic_ios_char_setstate(base
, state
);
4995 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_J@Z */
4996 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_J@Z */
4997 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int64
, 12)
4998 basic_ostream_char
* __thiscall
basic_ostream_char_print_int64(basic_ostream_char
*this, __int64 val
)
5000 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
5001 int state
= IOSTATE_goodbit
;
5003 TRACE("(%p)\n", this);
5005 if(basic_ostream_char_sentry_create(this)) {
5006 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
5007 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
5008 ostreambuf_iterator_char dest
;
5010 memset(&dest
, 0, sizeof(dest
));
5011 dest
.strbuf
= strbuf
;
5012 num_put_char_put_int64(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
5014 basic_ostream_char_sentry_destroy(this);
5016 basic_ios_char_setstate(base
, state
);
5020 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_K@Z */
5021 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_K@Z */
5022 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint64
, 12)
5023 basic_ostream_char
* __thiscall
basic_ostream_char_print_uint64(basic_ostream_char
*this, unsigned __int64 val
)
5025 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
5026 int state
= IOSTATE_goodbit
;
5028 TRACE("(%p)\n", this);
5030 if(basic_ostream_char_sentry_create(this)) {
5031 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
5032 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
5033 ostreambuf_iterator_char dest
;
5035 memset(&dest
, 0, sizeof(dest
));
5036 dest
.strbuf
= strbuf
;
5037 num_put_char_put_uint64(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
5039 basic_ostream_char_sentry_destroy(this);
5041 basic_ios_char_setstate(base
, state
);
5045 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_N@Z */
5046 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_N@Z */
5047 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_bool
, 8)
5048 basic_ostream_char
* __thiscall
basic_ostream_char_print_bool(basic_ostream_char
*this, bool val
)
5050 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
5051 int state
= IOSTATE_goodbit
;
5053 TRACE("(%p %x)\n", this, val
);
5055 if(basic_ostream_char_sentry_create(this)) {
5056 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
5057 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
5058 ostreambuf_iterator_char dest
;
5060 memset(&dest
, 0, sizeof(dest
));
5061 dest
.strbuf
= strbuf
;
5062 num_put_char_put_bool(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
5064 basic_ostream_char_sentry_destroy(this);
5066 basic_ios_char_setstate(base
, state
);
5070 /* ?ends@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
5071 /* ?ends@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
5072 basic_ostream_char
* __cdecl
basic_ostream_char_ends(basic_ostream_char
*ostr
)
5074 TRACE("(%p)\n", ostr
);
5076 basic_ostream_char_put(ostr
, 0);
5080 /* ?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
5081 /* ?endl@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
5082 basic_ostream_char
* __cdecl
basic_ostream_char_endl(basic_ostream_char
*ostr
)
5084 TRACE("(%p)\n", ostr
);
5086 basic_ostream_char_put(ostr
, '\n');
5087 basic_ostream_char_flush(ostr
);
5091 /* ??$?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 */
5092 /* ??$?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 */
5093 basic_ostream_char
* __cdecl
basic_ostream_char_print_bstr(basic_ostream_char
*ostr
, const basic_string_char
*str
)
5095 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
5096 IOSB_iostate state
= IOSTATE_goodbit
;
5098 TRACE("(%p %p)\n", ostr
, str
);
5100 if(basic_ostream_char_sentry_create(ostr
)) {
5101 size_t len
= MSVCP_basic_string_char_length(str
);
5102 streamsize pad
= (base
->base
.wide
>len
? base
->base
.wide
-len
: 0);
5104 if((base
->base
.fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
5105 for(; pad
!=0; pad
--) {
5106 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
5107 state
= IOSTATE_badbit
;
5113 if(state
== IOSTATE_goodbit
) {
5114 if(basic_streambuf_char_sputn(base
->strbuf
, MSVCP_basic_string_char_c_str(str
), len
) != len
)
5115 state
= IOSTATE_badbit
;
5118 if(state
== IOSTATE_goodbit
) {
5119 for(; pad
!=0; pad
--) {
5120 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
5121 state
= IOSTATE_badbit
;
5127 base
->base
.wide
= 0;
5129 state
= IOSTATE_badbit
;
5131 basic_ostream_char_sentry_destroy(ostr
);
5133 basic_ios_char_setstate(base
, state
);
5137 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@C@Z */
5138 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@C@Z */
5139 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@D@Z */
5140 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@D@Z */
5141 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@E@Z */
5142 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@E@Z */
5143 basic_ostream_char
* __cdecl
basic_ostream_char_print_ch(basic_ostream_char
*ostr
, char ch
)
5145 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
5146 IOSB_iostate state
= IOSTATE_goodbit
;
5148 TRACE("(%p %d)\n", ostr
, ch
);
5150 if(basic_ostream_char_sentry_create(ostr
)) {
5151 streamsize pad
= (base
->base
.wide
>1 ? base
->base
.wide
-1 : 0);
5153 if((base
->base
.fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
5154 for(; pad
!=0; pad
--) {
5155 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
5156 state
= IOSTATE_badbit
;
5162 if(state
== IOSTATE_goodbit
) {
5163 if(basic_streambuf_char_sputc(base
->strbuf
, ch
) == EOF
)
5164 state
= IOSTATE_badbit
;
5167 if(state
== IOSTATE_goodbit
) {
5168 for(; pad
!=0; pad
--) {
5169 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
5170 state
= IOSTATE_badbit
;
5176 base
->base
.wide
= 0;
5178 state
= IOSTATE_badbit
;
5180 basic_ostream_char_sentry_destroy(ostr
);
5182 basic_ios_char_setstate(base
, state
);
5186 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBC@Z */
5187 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBC@Z */
5188 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z */
5189 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBD@Z */
5190 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBE@Z */
5191 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBE@Z */
5192 basic_ostream_char
* __cdecl
basic_ostream_char_print_str(basic_ostream_char
*ostr
, const char *str
)
5194 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
5195 IOSB_iostate state
= IOSTATE_goodbit
;
5197 TRACE("(%p %s)\n", ostr
, str
);
5199 if(basic_ostream_char_sentry_create(ostr
)) {
5200 size_t len
= strlen(str
);
5201 streamsize pad
= (base
->base
.wide
>len
? base
->base
.wide
-len
: 0);
5203 if((base
->base
.fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
5204 for(; pad
!=0; pad
--) {
5205 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
5206 state
= IOSTATE_badbit
;
5212 if(state
== IOSTATE_goodbit
) {
5213 if(basic_streambuf_char_sputn(base
->strbuf
, str
, len
) != len
)
5214 state
= IOSTATE_badbit
;
5217 if(state
== IOSTATE_goodbit
) {
5218 for(; pad
!=0; pad
--) {
5219 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
5220 state
= IOSTATE_badbit
;
5226 base
->base
.wide
= 0;
5228 state
= IOSTATE_badbit
;
5230 basic_ostream_char_sentry_destroy(ostr
);
5232 basic_ios_char_setstate(base
, state
);
5236 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
5237 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
5238 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func
, 8)
5239 basic_ostream_char
* __thiscall
basic_ostream_char_print_func(basic_ostream_char
*this,
5240 basic_ostream_char
* (__cdecl
*pfunc
)(basic_ostream_char
*))
5242 TRACE("(%p %p)\n", this, pfunc
);
5247 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
5248 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
5249 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_basic_ios
, 8)
5250 basic_ostream_char
* __thiscall
basic_ostream_char_print_func_basic_ios(basic_ostream_char
*this,
5251 basic_ios_char
* (__cdecl
*pfunc
)(basic_ios_char
*))
5253 TRACE("(%p %p)\n", this, pfunc
);
5254 pfunc(basic_ostream_char_get_basic_ios(this));
5258 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
5259 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
5260 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_ios_base
, 8)
5261 basic_ostream_char
* __thiscall
basic_ostream_char_print_func_ios_base(
5262 basic_ostream_char
*this, ios_base
* (__cdecl
*pfunc
)(ios_base
*))
5264 TRACE("(%p %p)\n", this, pfunc
);
5265 pfunc(&basic_ostream_char_get_basic_ios(this)->base
);
5269 /* Caution: basic_ostream uses virtual inheritance. */
5270 static inline basic_ios_wchar
* basic_ostream_short_get_basic_ios(basic_ostream_wchar
*this)
5272 return (basic_ios_wchar
*)((char*)this+this->vbtable
[1]);
5275 static inline basic_ios_wchar
* basic_ostream_short_to_basic_ios(basic_ostream_wchar
*ptr
)
5277 return (basic_ios_wchar
*)((char*)ptr
+basic_ostream_short_vbtable
[1]);
5280 static inline basic_ostream_wchar
* basic_ostream_short_from_basic_ios(basic_ios_wchar
*ptr
)
5282 return (basic_ostream_wchar
*)((char*)ptr
-basic_ostream_short_vbtable
[1]);
5285 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */
5286 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */
5287 DEFINE_THISCALL_WRAPPER(basic_ostream_short_ctor
, 20)
5288 basic_ostream_wchar
* __thiscall
basic_ostream_short_ctor(basic_ostream_wchar
*this,
5289 basic_streambuf_wchar
*strbuf
, bool isstd
, bool init
, bool virt_init
)
5291 basic_ios_wchar
*base
;
5293 TRACE("(%p %p %d %d)\n", this, strbuf
, isstd
, virt_init
);
5296 this->vbtable
= basic_ostream_short_vbtable
;
5297 base
= basic_ostream_short_get_basic_ios(this);
5298 basic_ios_short_ctor(base
);
5300 base
= basic_ostream_short_get_basic_ios(this);
5303 base
->base
.vtable
= &basic_ostream_short_vtable
;
5305 basic_ios_short_init(base
, strbuf
, isstd
);
5309 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z */
5310 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
5311 DEFINE_THISCALL_WRAPPER(basic_ostream_short_ctor_uninitialized
, 12)
5312 basic_ostream_wchar
* __thiscall
basic_ostream_short_ctor_uninitialized(basic_ostream_wchar
*this,
5313 int uninitialized
, bool virt_init
)
5315 basic_ios_wchar
*base
;
5317 TRACE("(%p %d)\n", this, uninitialized
);
5320 this->vbtable
= basic_ostream_short_vbtable
;
5321 base
= basic_ostream_short_get_basic_ios(this);
5322 basic_ios_short_ctor(base
);
5324 base
= basic_ostream_short_get_basic_ios(this);
5327 base
->base
.vtable
= &basic_ostream_short_vtable
;
5328 ios_base_Addstd(&base
->base
);
5332 /* ??1?$basic_ostream@GU?$char_traits@G@std@@@std@@UAE@XZ */
5333 /* ??1?$basic_ostream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
5334 DEFINE_THISCALL_WRAPPER(basic_ostream_short_dtor
, 4)
5335 void __thiscall
basic_ostream_short_dtor(basic_ios_wchar
*base
)
5337 basic_ostream_wchar
*this = basic_ostream_short_from_basic_ios(base
);
5339 /* don't destroy virtual base here */
5340 TRACE("(%p)\n", this);
5343 /* ??_D?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
5344 /* ??_D?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
5345 DEFINE_THISCALL_WRAPPER(basic_ostream_short_vbase_dtor
, 4)
5346 void __thiscall
basic_ostream_short_vbase_dtor(basic_ostream_wchar
*this)
5348 TRACE("(%p)\n", this);
5349 basic_ostream_short_dtor(basic_ostream_short_to_basic_ios(this));
5350 basic_ios_short_dtor(basic_ostream_short_get_basic_ios(this));
5353 DEFINE_THISCALL_WRAPPER(basic_ostream_short_vector_dtor
, 8)
5354 basic_ostream_wchar
* __thiscall
basic_ostream_short_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
5356 basic_ostream_wchar
*this = basic_ostream_short_from_basic_ios(base
);
5358 TRACE("(%p %x)\n", this, flags
);
5361 /* we have an array, with the number of elements stored before the first object */
5362 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
5364 for(i
=*ptr
-1; i
>=0; i
--)
5365 basic_ostream_short_vbase_dtor(this+i
);
5366 operator_delete(ptr
);
5368 basic_ostream_short_vbase_dtor(this);
5370 operator_delete(this);
5376 /* ?flush@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@XZ */
5377 /* ?flush@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@XZ */
5378 DEFINE_THISCALL_WRAPPER(basic_ostream_short_flush
, 4)
5379 basic_ostream_wchar
* __thiscall
basic_ostream_short_flush(basic_ostream_wchar
*this)
5381 /* this function is not matching C++ specification */
5382 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5384 TRACE("(%p)\n", this);
5386 if(basic_ios_short_rdbuf_get(base
) && ios_base_good(&base
->base
)
5387 && basic_streambuf_wchar_pubsync(basic_ios_short_rdbuf_get(base
))==-1)
5388 basic_ios_short_setstate(base
, IOSTATE_badbit
);
5392 /* ?flush@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
5393 /* ?flush@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
5394 basic_ostream_wchar
* __cdecl
flush_ostream_short(basic_ostream_wchar
*ostream
)
5396 return basic_ostream_short_flush(ostream
);
5399 /* ?osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
5400 /* ?osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
5401 DEFINE_THISCALL_WRAPPER(basic_ostream_short_osfx
, 4)
5402 void __thiscall
basic_ostream_short_osfx(basic_ostream_wchar
*this)
5404 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5406 TRACE("(%p)\n", this);
5408 if(base
->base
.fmtfl
& FMTFLAG_unitbuf
)
5409 basic_ostream_short_flush(this);
5412 static BOOL
basic_ostream_short_sentry_create(basic_ostream_wchar
*ostr
)
5414 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(ostr
);
5416 if(ios_base_good(&base
->base
) && base
->stream
)
5417 basic_ostream_short_flush(base
->stream
);
5419 return ios_base_good(&base
->base
);
5422 static void basic_ostream_short_sentry_destroy(basic_ostream_wchar
*ostr
)
5424 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(ostr
);
5426 if(ios_base_good(&base
->base
) && !__uncaught_exception())
5427 basic_ostream_short_osfx(ostr
);
5430 /* ?opfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE_NXZ */
5431 /* ?opfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA_NXZ */
5432 DEFINE_THISCALL_WRAPPER(basic_ostream_short_opfx
, 4)
5433 bool __thiscall
basic_ostream_short_opfx(basic_ostream_wchar
*this)
5435 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5437 TRACE("(%p)\n", this);
5439 if(ios_base_good(&base
->base
) && base
->stream
)
5440 basic_ostream_short_flush(base
->stream
);
5441 return ios_base_good(&base
->base
);
5444 /* ?put@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@G@Z */
5445 /* ?put@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@G@Z */
5446 DEFINE_THISCALL_WRAPPER(basic_ostream_short_put
, 8)
5447 basic_ostream_wchar
* __thiscall
basic_ostream_short_put(basic_ostream_wchar
*this, wchar_t ch
)
5449 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5451 TRACE("(%p %c)\n", this, ch
);
5453 if(!basic_ostream_short_sentry_create(this)
5454 || basic_streambuf_wchar_sputc(base
->strbuf
, ch
)==WEOF
) {
5455 basic_ostream_short_sentry_destroy(this);
5456 basic_ios_short_setstate(base
, IOSTATE_badbit
);
5460 basic_ostream_short_sentry_destroy(this);
5464 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@JH@Z */
5465 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JH@Z */
5466 DEFINE_THISCALL_WRAPPER(basic_ostream_short_seekp
, 12)
5467 basic_ostream_wchar
* __thiscall
basic_ostream_short_seekp(basic_ostream_wchar
*this, streamoff off
, int way
)
5469 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5471 TRACE("(%p %Id %d)\n", this, off
, way
);
5473 if(!ios_base_fail(&base
->base
)) {
5476 basic_streambuf_wchar_pubseekoff(basic_ios_short_rdbuf_get(base
),
5477 &seek
, off
, way
, OPENMODE_out
);
5478 if(seek
.off
==-1 && seek
.pos
==0 && seek
.state
==0)
5479 basic_ios_short_setstate(base
, IOSTATE_failbit
);
5484 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
5485 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
5486 DEFINE_THISCALL_WRAPPER(basic_ostream_short_seekp_fpos
, 28)
5487 basic_ostream_wchar
* __thiscall
basic_ostream_short_seekp_fpos(basic_ostream_wchar
*this, fpos_int pos
)
5489 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5491 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos
));
5493 if(!ios_base_fail(&base
->base
)) {
5496 basic_streambuf_wchar_pubseekpos(basic_ios_short_rdbuf_get(base
),
5497 &seek
, pos
, OPENMODE_out
);
5498 if(seek
.off
==-1 && seek
.pos
==0 && seek
.state
==0)
5499 basic_ios_short_setstate(base
, IOSTATE_failbit
);
5504 /* ?tellp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@XZ */
5505 /* ?tellp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
5506 DEFINE_THISCALL_WRAPPER(basic_ostream_short_tellp
, 8)
5507 fpos_int
* __thiscall
basic_ostream_short_tellp(basic_ostream_wchar
*this, fpos_int
*ret
)
5509 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5511 TRACE("(%p)\n", this);
5513 if(!ios_base_fail(&base
->base
)) {
5514 basic_streambuf_wchar_pubseekoff(basic_ios_short_rdbuf_get(base
),
5515 ret
, 0, SEEKDIR_cur
, OPENMODE_out
);
5524 /* ?write@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@PBGH@Z */
5525 /* ?write@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEBG_J@Z */
5526 DEFINE_THISCALL_WRAPPER(basic_ostream_short_write
, 12)
5527 basic_ostream_wchar
* __thiscall
basic_ostream_short_write(basic_ostream_wchar
*this, const wchar_t *str
, streamsize count
)
5529 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5531 TRACE("(%p %s %Id)\n", this, debugstr_w(str
), count
);
5533 if(!basic_ostream_short_sentry_create(this)
5534 || basic_streambuf_wchar_sputn(base
->strbuf
, str
, count
)!=count
) {
5535 basic_ostream_short_sentry_destroy(this);
5536 basic_ios_short_setstate(base
, IOSTATE_badbit
);
5540 basic_ostream_short_sentry_destroy(this);
5544 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@F@Z */
5545 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@F@Z */
5546 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_short
, 8)
5547 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_short(basic_ostream_wchar
*this, short val
)
5549 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5550 const num_put
*numput
= num_put_short_use_facet(IOS_LOCALE(basic_ios_short_rdbuf_get(base
)));
5551 int state
= IOSTATE_goodbit
;
5553 TRACE("(%p %d)\n", this, val
);
5555 if(basic_ostream_short_sentry_create(this)) {
5556 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
5557 ostreambuf_iterator_wchar dest
;
5559 memset(&dest
, 0, sizeof(dest
));
5560 dest
.strbuf
= strbuf
;
5561 num_put_wchar_put_long(numput
, &dest
, dest
, &base
->base
, basic_ios_short_fill_get(base
),
5562 (ios_base_flags_get(&base
->base
) & FMTFLAG_basefield
& (FMTFLAG_oct
| FMTFLAG_hex
))
5563 ? (LONG
)((unsigned short)val
) : (LONG
)val
);
5565 basic_ostream_short_sentry_destroy(this);
5567 basic_ios_short_setstate(base
, state
);
5571 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@G@Z */
5572 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@G@Z */
5573 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ushort
, 8)
5574 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_ushort(basic_ostream_wchar
*this, unsigned short val
)
5576 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5577 const num_put
*numput
= num_put_short_use_facet(IOS_LOCALE(basic_ios_short_rdbuf_get(base
)));
5578 int state
= IOSTATE_goodbit
;
5580 TRACE("(%p %d)\n", this, val
);
5582 if(basic_ostream_short_sentry_create(this)) {
5583 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
5584 ostreambuf_iterator_wchar dest
;
5586 memset(&dest
, 0, sizeof(dest
));
5587 dest
.strbuf
= strbuf
;
5588 num_put_wchar_put_ulong(numput
, &dest
, dest
, &base
->base
, basic_ios_short_fill_get(base
), val
);
5590 basic_ostream_short_sentry_destroy(this);
5592 basic_ios_short_setstate(base
, state
);
5596 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@H@Z */
5597 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@H@Z */
5598 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@J@Z */
5599 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@J@Z */
5600 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int
, 8)
5601 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_int(basic_ostream_wchar
*this, int val
)
5603 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5604 const num_put
*numput
= num_put_short_use_facet(IOS_LOCALE(basic_ios_short_rdbuf_get(base
)));
5605 int state
= IOSTATE_goodbit
;
5607 TRACE("(%p %d)\n", this, val
);
5609 if(basic_ostream_short_sentry_create(this)) {
5610 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
5611 ostreambuf_iterator_wchar dest
;
5613 memset(&dest
, 0, sizeof(dest
));
5614 dest
.strbuf
= strbuf
;
5615 num_put_wchar_put_long(numput
, &dest
, dest
, &base
->base
, basic_ios_short_fill_get(base
), val
);
5617 basic_ostream_short_sentry_destroy(this);
5619 basic_ios_short_setstate(base
, state
);
5623 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@I@Z */
5624 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@I@Z */
5625 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@K@Z */
5626 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@K@Z */
5627 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint
, 8)
5628 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_uint(basic_ostream_wchar
*this, unsigned int val
)
5630 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5631 const num_put
*numput
= num_put_short_use_facet(IOS_LOCALE(basic_ios_short_rdbuf_get(base
)));
5632 int state
= IOSTATE_goodbit
;
5634 TRACE("(%p %u)\n", this, val
);
5636 if(basic_ostream_short_sentry_create(this)) {
5637 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
5638 ostreambuf_iterator_wchar dest
;
5640 memset(&dest
, 0, sizeof(dest
));
5641 dest
.strbuf
= strbuf
;
5642 num_put_wchar_put_ulong(numput
, &dest
, dest
, &base
->base
, basic_ios_short_fill_get(base
), val
);
5644 basic_ostream_short_sentry_destroy(this);
5646 basic_ios_short_setstate(base
, state
);
5650 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@M@Z */
5651 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@M@Z */
5652 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_float
, 8)
5653 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_float(basic_ostream_wchar
*this, float val
)
5655 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5656 const num_put
*numput
= num_put_short_use_facet(IOS_LOCALE(basic_ios_short_rdbuf_get(base
)));
5657 int state
= IOSTATE_goodbit
;
5659 TRACE("(%p %f)\n", this, val
);
5661 if(basic_ostream_short_sentry_create(this)) {
5662 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
5663 ostreambuf_iterator_wchar dest
;
5665 memset(&dest
, 0, sizeof(dest
));
5666 dest
.strbuf
= strbuf
;
5667 num_put_wchar_put_double(numput
, &dest
, dest
, &base
->base
, basic_ios_short_fill_get(base
), val
);
5669 basic_ostream_short_sentry_destroy(this);
5671 basic_ios_short_setstate(base
, state
);
5675 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@N@Z */
5676 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@N@Z */
5677 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_double
, 12)
5678 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_double(basic_ostream_wchar
*this, double val
)
5680 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5681 const num_put
*numput
= num_put_short_use_facet(IOS_LOCALE(basic_ios_short_rdbuf_get(base
)));
5682 int state
= IOSTATE_goodbit
;
5684 TRACE("(%p %lf)\n", this, val
);
5686 if(basic_ostream_short_sentry_create(this)) {
5687 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
5688 ostreambuf_iterator_wchar dest
;
5690 memset(&dest
, 0, sizeof(dest
));
5691 dest
.strbuf
= strbuf
;
5692 num_put_wchar_put_double(numput
, &dest
, dest
, &base
->base
, basic_ios_short_fill_get(base
), val
);
5694 basic_ostream_short_sentry_destroy(this);
5696 basic_ios_short_setstate(base
, state
);
5700 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@O@Z */
5701 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@O@Z */
5702 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ldouble
, 12)
5703 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_ldouble(basic_ostream_wchar
*this, double val
)
5705 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5706 const num_put
*numput
= num_put_short_use_facet(IOS_LOCALE(basic_ios_short_rdbuf_get(base
)));
5707 int state
= IOSTATE_goodbit
;
5709 TRACE("(%p %lf)\n", this, val
);
5711 if(basic_ostream_short_sentry_create(this)) {
5712 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
5713 ostreambuf_iterator_wchar dest
;
5715 memset(&dest
, 0, sizeof(dest
));
5716 dest
.strbuf
= strbuf
;
5717 num_put_wchar_put_ldouble(numput
, &dest
, dest
, &base
->base
, basic_ios_short_fill_get(base
), val
);
5719 basic_ostream_short_sentry_destroy(this);
5721 basic_ios_short_setstate(base
, state
);
5725 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
5726 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
5727 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_streambuf
, 8)
5728 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_streambuf(basic_ostream_wchar
*this, basic_streambuf_wchar
*val
)
5730 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5731 IOSB_iostate state
= IOSTATE_badbit
;
5732 unsigned short c
= '\n';
5734 TRACE("(%p %p)\n", this, val
);
5736 if(basic_ostream_short_sentry_create(this)) {
5737 for(c
= basic_streambuf_wchar_sgetc(val
); c
!=WEOF
;
5738 c
= basic_streambuf_wchar_snextc(val
)) {
5739 state
= IOSTATE_goodbit
;
5741 if(basic_streambuf_wchar_sputc(base
->strbuf
, c
) == WEOF
) {
5742 state
= IOSTATE_badbit
;
5747 state
= IOSTATE_badbit
;
5749 basic_ostream_short_sentry_destroy(this);
5751 ios_base_width_set(&base
->base
, 0);
5752 basic_ios_short_setstate(base
, state
);
5756 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PBX@Z */
5757 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEBX@Z */
5758 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ptr
, 8)
5759 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_ptr(basic_ostream_wchar
*this, const void *val
)
5761 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5762 const num_put
*numput
= num_put_short_use_facet(IOS_LOCALE(basic_ios_short_rdbuf_get(base
)));
5763 int state
= IOSTATE_goodbit
;
5765 TRACE("(%p %p)\n", this, val
);
5767 if(basic_ostream_short_sentry_create(this)) {
5768 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
5769 ostreambuf_iterator_wchar dest
;
5771 memset(&dest
, 0, sizeof(dest
));
5772 dest
.strbuf
= strbuf
;
5773 num_put_wchar_put_ptr(numput
, &dest
, dest
, &base
->base
, basic_ios_short_fill_get(base
), val
);
5775 basic_ostream_short_sentry_destroy(this);
5777 basic_ios_short_setstate(base
, state
);
5781 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_J@Z */
5782 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_J@Z */
5783 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int64
, 12)
5784 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_int64(basic_ostream_wchar
*this, __int64 val
)
5786 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5787 const num_put
*numput
= num_put_short_use_facet(IOS_LOCALE(basic_ios_short_rdbuf_get(base
)));
5788 int state
= IOSTATE_goodbit
;
5790 TRACE("(%p)\n", this);
5792 if(basic_ostream_short_sentry_create(this)) {
5793 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
5794 ostreambuf_iterator_wchar dest
;
5796 memset(&dest
, 0, sizeof(dest
));
5797 dest
.strbuf
= strbuf
;
5798 num_put_wchar_put_int64(numput
, &dest
, dest
, &base
->base
, basic_ios_short_fill_get(base
), val
);
5800 basic_ostream_short_sentry_destroy(this);
5802 basic_ios_short_setstate(base
, state
);
5806 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_K@Z */
5807 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_K@Z */
5808 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint64
, 12)
5809 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_uint64(basic_ostream_wchar
*this, unsigned __int64 val
)
5811 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5812 const num_put
*numput
= num_put_short_use_facet(IOS_LOCALE(basic_ios_short_rdbuf_get(base
)));
5813 int state
= IOSTATE_goodbit
;
5815 TRACE("(%p)\n", this);
5817 if(basic_ostream_short_sentry_create(this)) {
5818 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
5819 ostreambuf_iterator_wchar dest
;
5821 memset(&dest
, 0, sizeof(dest
));
5822 dest
.strbuf
= strbuf
;
5823 num_put_wchar_put_uint64(numput
, &dest
, dest
, &base
->base
, basic_ios_short_fill_get(base
), val
);
5825 basic_ostream_short_sentry_destroy(this);
5827 basic_ios_short_setstate(base
, state
);
5831 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_N@Z */
5832 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_N@Z */
5833 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_bool
, 8)
5834 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_bool(basic_ostream_wchar
*this, bool val
)
5836 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(this);
5837 const num_put
*numput
= num_put_short_use_facet(IOS_LOCALE(basic_ios_short_rdbuf_get(base
)));
5838 int state
= IOSTATE_goodbit
;
5840 TRACE("(%p %x)\n", this, val
);
5842 if(basic_ostream_short_sentry_create(this)) {
5843 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
5844 ostreambuf_iterator_wchar dest
;
5846 memset(&dest
, 0, sizeof(dest
));
5847 dest
.strbuf
= strbuf
;
5848 num_put_wchar_put_bool(numput
, &dest
, dest
, &base
->base
, basic_ios_short_fill_get(base
), val
);
5850 basic_ostream_short_sentry_destroy(this);
5852 basic_ios_short_setstate(base
, state
);
5856 /* ?ends@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
5857 /* ?ends@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
5858 basic_ostream_wchar
* __cdecl
basic_ostream_short_ends(basic_ostream_wchar
*ostr
)
5860 TRACE("(%p)\n", ostr
);
5862 basic_ostream_short_put(ostr
, 0);
5866 /* ?endl@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
5867 /* ?endl@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
5868 basic_ostream_wchar
* __cdecl
basic_ostream_short_endl(basic_ostream_wchar
*ostr
)
5870 TRACE("(%p)\n", ostr
);
5872 basic_ostream_short_put(ostr
, '\n');
5873 basic_ostream_short_flush(ostr
);
5877 /* ??$?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 */
5878 /* ??$?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 */
5879 basic_ostream_wchar
* __cdecl
basic_ostream_short_print_bstr(basic_ostream_wchar
*ostr
, const basic_string_wchar
*str
)
5881 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(ostr
);
5882 IOSB_iostate state
= IOSTATE_goodbit
;
5884 TRACE("(%p %p)\n", ostr
, str
);
5886 if(basic_ostream_short_sentry_create(ostr
)) {
5887 size_t len
= MSVCP_basic_string_wchar_length(str
);
5888 streamsize pad
= (base
->base
.wide
>len
? base
->base
.wide
-len
: 0);
5890 if((base
->base
.fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
5891 for(; pad
!=0; pad
--) {
5892 if(basic_streambuf_wchar_sputc(base
->strbuf
, base
->fillch
) == WEOF
) {
5893 state
= IOSTATE_badbit
;
5899 if(state
== IOSTATE_goodbit
) {
5900 if(basic_streambuf_wchar_sputn(base
->strbuf
, MSVCP_basic_string_wchar_c_str(str
), len
) != len
)
5901 state
= IOSTATE_badbit
;
5904 if(state
== IOSTATE_goodbit
) {
5905 for(; pad
!=0; pad
--) {
5906 if(basic_streambuf_wchar_sputc(base
->strbuf
, base
->fillch
) == WEOF
) {
5907 state
= IOSTATE_badbit
;
5913 base
->base
.wide
= 0;
5915 state
= IOSTATE_badbit
;
5917 basic_ostream_short_sentry_destroy(ostr
);
5919 basic_ios_short_setstate(base
, state
);
5923 /* ??$?6GU?$char_traits@G@std@@@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@0@AAV10@G@Z */
5924 /* ??$?6GU?$char_traits@G@std@@@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@0@AEAV10@G@Z */
5925 basic_ostream_wchar
* __cdecl
basic_ostream_short_print_ch(basic_ostream_wchar
*ostr
, wchar_t ch
)
5927 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(ostr
);
5928 IOSB_iostate state
= IOSTATE_goodbit
;
5930 TRACE("(%p %d)\n", ostr
, ch
);
5932 if(basic_ostream_short_sentry_create(ostr
)) {
5933 streamsize pad
= (base
->base
.wide
>1 ? base
->base
.wide
-1 : 0);
5935 if((base
->base
.fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
5936 for(; pad
!=0; pad
--) {
5937 if(basic_streambuf_wchar_sputc(base
->strbuf
, base
->fillch
) == WEOF
) {
5938 state
= IOSTATE_badbit
;
5944 if(state
== IOSTATE_goodbit
) {
5945 if(basic_streambuf_wchar_sputc(base
->strbuf
, ch
) == WEOF
)
5946 state
= IOSTATE_badbit
;
5949 if(state
== IOSTATE_goodbit
) {
5950 for(; pad
!=0; pad
--) {
5951 if(basic_streambuf_wchar_sputc(base
->strbuf
, base
->fillch
) == WEOF
) {
5952 state
= IOSTATE_badbit
;
5958 base
->base
.wide
= 0;
5960 state
= IOSTATE_badbit
;
5962 basic_ostream_short_sentry_destroy(ostr
);
5964 basic_ios_short_setstate(base
, state
);
5968 /* ??$?6GU?$char_traits@G@std@@@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@0@AAV10@PBG@Z */
5969 /* ??$?6GU?$char_traits@G@std@@@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@0@AEAV10@PEBG@Z */
5970 basic_ostream_wchar
* __cdecl
basic_ostream_short_print_str(basic_ostream_wchar
*ostr
, const wchar_t *str
)
5972 basic_ios_wchar
*base
= basic_ostream_short_get_basic_ios(ostr
);
5973 IOSB_iostate state
= IOSTATE_goodbit
;
5975 TRACE("(%p %s)\n", ostr
, debugstr_w(str
));
5977 if(basic_ostream_short_sentry_create(ostr
)) {
5978 size_t len
= wcslen(str
);
5979 streamsize pad
= (base
->base
.wide
>len
? base
->base
.wide
-len
: 0);
5981 if((base
->base
.fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
5982 for(; pad
!=0; pad
--) {
5983 if(basic_streambuf_wchar_sputc(base
->strbuf
, base
->fillch
) == WEOF
) {
5984 state
= IOSTATE_badbit
;
5990 if(state
== IOSTATE_goodbit
) {
5991 if(basic_streambuf_wchar_sputn(base
->strbuf
, str
, len
) != len
)
5992 state
= IOSTATE_badbit
;
5995 if(state
== IOSTATE_goodbit
) {
5996 for(; pad
!=0; pad
--) {
5997 if(basic_streambuf_wchar_sputc(base
->strbuf
, base
->fillch
) == WEOF
) {
5998 state
= IOSTATE_badbit
;
6004 base
->base
.wide
= 0;
6006 state
= IOSTATE_badbit
;
6008 basic_ostream_short_sentry_destroy(ostr
);
6010 basic_ios_short_setstate(base
, state
);
6014 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
6015 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
6016 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_func
, 8)
6017 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_func(basic_ostream_wchar
*this,
6018 basic_ostream_wchar
* (__cdecl
*pfunc
)(basic_ostream_wchar
*))
6020 TRACE("(%p %p)\n", this, pfunc
);
6025 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@GU?$char_traits@G@std@@@1@AAV21@@Z@Z */
6026 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@GU?$char_traits@G@std@@@1@AEAV21@@Z@Z */
6027 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_func_basic_ios
, 8)
6028 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_func_basic_ios(basic_ostream_wchar
*this,
6029 basic_ios_wchar
* (__cdecl
*pfunc
)(basic_ios_wchar
*))
6031 TRACE("(%p %p)\n", this, pfunc
);
6032 pfunc(basic_ostream_short_get_basic_ios(this));
6036 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
6037 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
6038 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_func_ios_base
, 8)
6039 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_func_ios_base(
6040 basic_ostream_wchar
*this, ios_base
* (__cdecl
*pfunc
)(ios_base
*))
6042 TRACE("(%p %p)\n", this, pfunc
);
6043 pfunc(&basic_ostream_short_get_basic_ios(this)->base
);
6047 /* Caution: basic_istream uses virtual inheritance. */
6048 static inline basic_ios_char
* basic_istream_char_get_basic_ios(basic_istream_char
*this)
6050 return (basic_ios_char
*)((char*)this+this->vbtable
[1]);
6053 static inline basic_ios_char
* basic_istream_char_to_basic_ios(basic_istream_char
*ptr
)
6055 return (basic_ios_char
*)((char*)ptr
+basic_istream_char_vbtable
[1]);
6058 static inline basic_istream_char
* basic_istream_char_from_basic_ios(basic_ios_char
*ptr
)
6060 return (basic_istream_char
*)((char*)ptr
-basic_istream_char_vbtable
[1]);
6063 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
6064 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
6065 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor
, 16)
6066 basic_istream_char
* __thiscall
basic_istream_char_ctor(basic_istream_char
*this, basic_streambuf_char
*strbuf
, bool isstd
, bool virt_init
)
6068 basic_ios_char
*base
;
6070 TRACE("(%p %p %d %d)\n", this, strbuf
, isstd
, virt_init
);
6073 this->vbtable
= basic_istream_char_vbtable
;
6074 base
= basic_istream_char_get_basic_ios(this);
6075 basic_ios_char_ctor(base
);
6077 base
= basic_istream_char_get_basic_ios(this);
6080 base
->base
.vtable
= &basic_istream_char_vtable
;
6082 basic_ios_char_init(base
, strbuf
, isstd
);
6086 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
6087 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
6088 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_uninitialized
, 12)
6089 basic_istream_char
* __thiscall
basic_istream_char_ctor_uninitialized(basic_istream_char
*this, int uninitialized
, bool virt_init
)
6091 basic_ios_char
*base
;
6093 TRACE("(%p %d %d)\n", this, uninitialized
, virt_init
);
6096 this->vbtable
= basic_istream_char_vbtable
;
6097 base
= basic_istream_char_get_basic_ios(this);
6098 basic_ios_char_ctor(base
);
6100 base
= basic_istream_char_get_basic_ios(this);
6103 base
->base
.vtable
= &basic_istream_char_vtable
;
6104 ios_base_Addstd(&base
->base
);
6108 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UAE@XZ */
6109 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
6110 DEFINE_THISCALL_WRAPPER(basic_istream_char_dtor
, 4)
6111 void __thiscall
basic_istream_char_dtor(basic_ios_char
*base
)
6113 basic_istream_char
*this = basic_istream_char_from_basic_ios(base
);
6115 /* don't destroy virtual base here */
6116 TRACE("(%p)\n", this);
6119 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
6120 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
6121 DEFINE_THISCALL_WRAPPER(basic_istream_char_vbase_dtor
, 4)
6122 void __thiscall
basic_istream_char_vbase_dtor(basic_istream_char
*this)
6124 TRACE("(%p)\n", this);
6125 basic_istream_char_dtor(basic_istream_char_to_basic_ios(this));
6126 basic_ios_char_dtor(basic_istream_char_get_basic_ios(this));
6129 DEFINE_THISCALL_WRAPPER(basic_istream_char_vector_dtor
, 8)
6130 basic_istream_char
* __thiscall
basic_istream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
6132 basic_istream_char
*this = basic_istream_char_from_basic_ios(base
);
6134 TRACE("(%p %x)\n", this, flags
);
6137 /* we have an array, with the number of elements stored before the first object */
6138 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
6140 for(i
=*ptr
-1; i
>=0; i
--)
6141 basic_istream_char_vbase_dtor(this+i
);
6142 operator_delete(ptr
);
6144 basic_istream_char_vbase_dtor(this);
6146 operator_delete(this);
6152 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
6153 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
6154 DEFINE_THISCALL_WRAPPER(basic_istream_char_ipfx
, 8)
6155 bool __thiscall
basic_istream_char_ipfx(basic_istream_char
*this, bool noskip
)
6157 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6159 TRACE("(%p %d)\n", this, noskip
);
6161 if(ios_base_good(&base
->base
)) {
6162 if(basic_ios_char_tie_get(base
))
6163 basic_ostream_char_flush(basic_ios_char_tie_get(base
));
6165 if(!noskip
&& (ios_base_flags_get(&base
->base
) & FMTFLAG_skipws
)) {
6166 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6167 const ctype_char
*ctype
= ctype_char_use_facet(IOS_LOCALE(base
->strbuf
));
6170 for(ch
= basic_streambuf_char_sgetc(strbuf
); ;
6171 ch
= basic_streambuf_char_snextc(strbuf
)) {
6172 if(ch
==EOF
|| !ctype_char_is_ch(ctype
, _SPACE
|_BLANK
, ch
))
6178 if(!ios_base_good(&base
->base
)) {
6179 basic_ios_char_setstate(base
, IOSTATE_failbit
);
6186 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
6187 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
6188 DEFINE_THISCALL_WRAPPER(basic_istream_char_isfx
, 4)
6189 void __thiscall
basic_istream_char_isfx(basic_istream_char
*this)
6191 TRACE("(%p)\n", this);
6194 static BOOL
basic_istream_char_sentry_create(basic_istream_char
*istr
, bool noskip
)
6196 return basic_istream_char_ipfx(istr
, noskip
);
6199 static void basic_istream_char_sentry_destroy(basic_istream_char
*istr
)
6203 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QBEHXZ */
6204 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QEBA_JXZ */
6205 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QBA_JXZ */
6206 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QBE_JXZ */
6207 DEFINE_THISCALL_WRAPPER(basic_istream_char_gcount
, 4)
6208 streamsize __thiscall
basic_istream_char_gcount(const basic_istream_char
*this)
6210 TRACE("(%p)\n", this);
6214 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
6215 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
6216 DEFINE_THISCALL_WRAPPER(basic_istream_char_get
, 4)
6217 int __thiscall
basic_istream_char_get(basic_istream_char
*this)
6219 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6222 TRACE("(%p)\n", this);
6226 if(!basic_istream_char_sentry_create(this, TRUE
)) {
6227 basic_istream_char_sentry_destroy(this);
6231 ret
= basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(base
));
6232 basic_istream_char_sentry_destroy(this);
6234 basic_ios_char_setstate(base
, IOSTATE_eofbit
|IOSTATE_failbit
);
6241 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAD@Z */
6242 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAD@Z */
6243 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_ch
, 8)
6244 basic_istream_char
* __thiscall
basic_istream_char_get_ch(basic_istream_char
*this, char *ch
)
6248 TRACE("(%p %p)\n", this, ch
);
6250 ret
= basic_istream_char_get(this);
6256 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
6257 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
6258 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str_delim
, 16)
6259 basic_istream_char
* __thiscall
basic_istream_char_get_str_delim(basic_istream_char
*this, char *str
, streamsize count
, char delim
)
6261 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6264 TRACE("(%p %p %Id %s)\n", this, str
, count
, debugstr_an(&delim
, 1));
6268 if(basic_istream_char_sentry_create(this, TRUE
)) {
6269 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6271 for(ch
= basic_streambuf_char_sgetc(strbuf
); count
>1;
6272 ch
= basic_streambuf_char_snextc(strbuf
)) {
6273 if(ch
==EOF
|| ch
==delim
)
6281 basic_istream_char_sentry_destroy(this);
6283 basic_ios_char_setstate(base
, (!this->count
? IOSTATE_failbit
: IOSTATE_goodbit
) |
6284 (ch
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
6290 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
6291 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
6292 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str
, 12)
6293 basic_istream_char
* __thiscall
basic_istream_char_get_str(basic_istream_char
*this, char *str
, streamsize count
)
6295 return basic_istream_char_get_str_delim(this, str
, count
, '\n');
6298 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
6299 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
6300 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf_delim
, 12)
6301 basic_istream_char
* __thiscall
basic_istream_char_get_streambuf_delim(basic_istream_char
*this, basic_streambuf_char
*strbuf
, char delim
)
6303 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6306 TRACE("(%p %p %s)\n", this, strbuf
, debugstr_an(&delim
, 1));
6310 if(basic_istream_char_sentry_create(this, TRUE
)) {
6311 basic_streambuf_char
*strbuf_read
= basic_ios_char_rdbuf_get(base
);
6313 for(ch
= basic_streambuf_char_sgetc(strbuf_read
); ;
6314 ch
= basic_streambuf_char_snextc(strbuf_read
)) {
6315 if(ch
==EOF
|| ch
==delim
)
6318 if(basic_streambuf_char_sputc(strbuf
, ch
) == EOF
)
6323 basic_istream_char_sentry_destroy(this);
6325 basic_ios_char_setstate(base
, (!this->count
? IOSTATE_failbit
: IOSTATE_goodbit
) |
6326 (ch
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
6330 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
6331 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
6332 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf
, 8)
6333 basic_istream_char
* __thiscall
basic_istream_char_get_streambuf(basic_istream_char
*this, basic_streambuf_char
*strbuf
)
6335 return basic_istream_char_get_streambuf_delim(this, strbuf
, '\n');
6338 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
6339 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
6340 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline_delim
, 16)
6341 basic_istream_char
* __thiscall
basic_istream_char_getline_delim(basic_istream_char
*this, char *str
, streamsize count
, char delim
)
6343 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6344 int ch
= (unsigned char)delim
;
6346 TRACE("(%p %p %Id %s)\n", this, str
, count
, debugstr_an(&delim
, 1));
6350 if(basic_istream_char_sentry_create(this, TRUE
) && count
>0) {
6351 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6354 ch
= basic_streambuf_char_sbumpc(strbuf
);
6356 if(ch
==EOF
|| ch
==(unsigned char)delim
)
6364 if(ch
== (unsigned char)delim
)
6366 else if(ch
!= EOF
) {
6367 ch
= basic_streambuf_char_sgetc(strbuf
);
6369 if(ch
== (unsigned char)delim
) {
6370 basic_streambuf_char__Gninc(strbuf
);
6375 basic_istream_char_sentry_destroy(this);
6377 basic_ios_char_setstate(base
, (ch
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
) |
6378 (!this->count
|| (ch
!=(unsigned char)delim
&& ch
!=EOF
) ? IOSTATE_failbit
: IOSTATE_goodbit
));
6384 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
6385 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
6386 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline
, 12)
6387 basic_istream_char
* __thiscall
basic_istream_char_getline(basic_istream_char
*this, char *str
, streamsize count
)
6389 return basic_istream_char_getline_delim(this, str
, count
, '\n');
6392 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@HH@Z */
6393 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
6394 DEFINE_THISCALL_WRAPPER(basic_istream_char_ignore
, 12)
6395 basic_istream_char
* __thiscall
basic_istream_char_ignore(basic_istream_char
*this, streamsize count
, int delim
)
6397 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6398 int ch
= (unsigned char)delim
;
6401 TRACE("(%p %Id %d)\n", this, count
, delim
);
6405 if(basic_istream_char_sentry_create(this, TRUE
)) {
6406 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6407 state
= IOSTATE_goodbit
;
6410 ch
= basic_streambuf_char_sbumpc(strbuf
);
6413 state
= IOSTATE_eofbit
;
6421 if(count
!= INT_MAX
)
6425 state
= IOSTATE_failbit
;
6426 basic_istream_char_sentry_destroy(this);
6428 basic_ios_char_setstate(base
, state
);
6432 /* ?ws@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@1@AAV21@@Z */
6433 /* ?ws@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
6434 basic_istream_char
* __cdecl
ws_basic_istream_char(basic_istream_char
*istream
)
6436 basic_ios_char
*base
= basic_istream_char_get_basic_ios(istream
);
6439 TRACE("(%p)\n", istream
);
6441 if(basic_istream_char_sentry_create(istream
, TRUE
)) {
6442 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6443 const ctype_char
*ctype
= ctype_char_use_facet(IOS_LOCALE(strbuf
));
6445 for(ch
= basic_streambuf_char_sgetc(strbuf
); ctype_char_is_ch(ctype
, _SPACE
, ch
);
6446 ch
= basic_streambuf_char_snextc(strbuf
)) {
6451 basic_istream_char_sentry_destroy(istream
);
6454 basic_ios_char_setstate(base
, IOSTATE_eofbit
);
6458 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
6459 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
6460 DEFINE_THISCALL_WRAPPER(basic_istream_char_peek
, 4)
6461 int __thiscall
basic_istream_char_peek(basic_istream_char
*this)
6463 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6466 TRACE("(%p)\n", this);
6470 if(basic_istream_char_sentry_create(this, TRUE
))
6471 ret
= basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base
));
6472 basic_istream_char_sentry_destroy(this);
6475 basic_ios_char_setstate(base
, IOSTATE_eofbit
);
6480 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
6481 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
6482 DEFINE_THISCALL_WRAPPER(basic_istream_char_read
, 12)
6483 basic_istream_char
* __thiscall
basic_istream_char_read(basic_istream_char
*this, char *str
, streamsize count
)
6485 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6486 IOSB_iostate state
= IOSTATE_goodbit
;
6488 TRACE("(%p %p %Id)\n", this, str
, count
);
6490 if(basic_istream_char_sentry_create(this, TRUE
)) {
6491 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6493 this->count
= basic_streambuf_char_sgetn(strbuf
, str
, count
);
6494 if(this->count
!= count
)
6495 state
|= IOSTATE_failbit
| IOSTATE_eofbit
;
6499 basic_istream_char_sentry_destroy(this);
6501 basic_ios_char_setstate(base
, state
);
6505 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
6506 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
6507 DEFINE_THISCALL_WRAPPER(basic_istream_char_readsome
, 12)
6508 streamsize __thiscall
basic_istream_char_readsome(basic_istream_char
*this, char *str
, streamsize count
)
6510 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6511 IOSB_iostate state
= IOSTATE_goodbit
;
6513 TRACE("(%p %p %Id)\n", this, str
, count
);
6517 if(basic_istream_char_sentry_create(this, TRUE
)) {
6518 streamsize avail
= basic_streambuf_char_in_avail(basic_ios_char_rdbuf_get(base
));
6523 state
|= IOSTATE_eofbit
;
6525 basic_istream_char_read(this, str
, avail
);
6527 state
|= IOSTATE_failbit
;
6529 basic_istream_char_sentry_destroy(this);
6531 basic_ios_char_setstate(base
, state
);
6535 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
6536 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
6537 DEFINE_THISCALL_WRAPPER(basic_istream_char_putback
, 8)
6538 basic_istream_char
* __thiscall
basic_istream_char_putback(basic_istream_char
*this, char ch
)
6540 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6541 IOSB_iostate state
= IOSTATE_goodbit
;
6543 TRACE("(%p %c)\n", this, ch
);
6547 if(basic_istream_char_sentry_create(this, TRUE
)) {
6548 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6550 if(!ios_base_good(&base
->base
))
6551 state
|= IOSTATE_failbit
;
6552 else if(!strbuf
|| basic_streambuf_char_sputbackc(strbuf
, ch
)==EOF
)
6553 state
|= IOSTATE_badbit
;
6555 basic_istream_char_sentry_destroy(this);
6557 basic_ios_char_setstate(base
, state
);
6561 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
6562 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
6563 DEFINE_THISCALL_WRAPPER(basic_istream_char_unget
, 4)
6564 basic_istream_char
* __thiscall
basic_istream_char_unget(basic_istream_char
*this)
6566 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6567 IOSB_iostate state
= IOSTATE_goodbit
;
6569 TRACE("(%p)\n", this);
6573 if(basic_istream_char_sentry_create(this, TRUE
)) {
6574 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6576 if(!ios_base_good(&base
->base
))
6577 state
|= IOSTATE_failbit
;
6578 else if(!strbuf
|| basic_streambuf_char_sungetc(strbuf
)==EOF
)
6579 state
|= IOSTATE_badbit
;
6581 basic_istream_char_sentry_destroy(this);
6583 basic_ios_char_setstate(base
, state
);
6587 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
6588 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
6589 DEFINE_THISCALL_WRAPPER(basic_istream_char_sync
, 4)
6590 int __thiscall
basic_istream_char_sync(basic_istream_char
*this)
6592 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6593 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6595 TRACE("(%p)\n", this);
6600 if(basic_istream_char_sentry_create(this, TRUE
)) {
6601 if(basic_streambuf_char_pubsync(strbuf
) != -1) {
6602 basic_istream_char_sentry_destroy(this);
6606 basic_istream_char_sentry_destroy(this);
6608 basic_ios_char_setstate(base
, IOSTATE_badbit
);
6612 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
6613 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
6614 DEFINE_THISCALL_WRAPPER(basic_istream_char_tellg
, 8)
6615 fpos_int
* __thiscall
basic_istream_char_tellg(basic_istream_char
*this, fpos_int
*ret
)
6617 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6619 TRACE("(%p %p)\n", this, ret
);
6621 if(ios_base_fail(&base
->base
)) {
6628 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base
),
6629 ret
, 0, SEEKDIR_cur
, OPENMODE_in
);
6634 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@JW4seekdir@ios_base@2@@Z */
6635 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JW4seekdir@ios_base@2@@Z */
6636 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@JH@Z */
6637 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
6638 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg
, 12)
6639 basic_istream_char
* __thiscall
basic_istream_char_seekg(basic_istream_char
*this, streamoff off
, int dir
)
6641 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6643 TRACE("(%p %Id %d)\n", this, off
, dir
);
6645 if(!ios_base_fail(&base
->base
)) {
6646 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6649 basic_streambuf_char_pubseekoff(strbuf
, &ret
, off
, dir
, OPENMODE_in
);
6655 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
6656 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
6657 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg_fpos
, 28)
6658 basic_istream_char
* __thiscall
basic_istream_char_seekg_fpos(basic_istream_char
*this, fpos_int pos
)
6660 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6662 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos
));
6664 if(!ios_base_fail(&base
->base
)) {
6665 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6668 basic_streambuf_char_pubseekpos(strbuf
, &ret
, pos
, OPENMODE_in
);
6674 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAF@Z */
6675 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAF@Z */
6676 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_short
, 8)
6677 basic_istream_char
* __thiscall
basic_istream_char_read_short(basic_istream_char
*this, short *v
)
6679 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6680 int state
= IOSTATE_goodbit
;
6682 TRACE("(%p %p)\n", this, v
);
6684 if(basic_istream_char_sentry_create(this, FALSE
)) {
6685 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6686 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
6687 istreambuf_iterator_char first
={0}, last
={0};
6690 first
.strbuf
= strbuf
;
6691 num_get_char_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, &tmp
);
6693 if(!(state
&IOSTATE_failbit
) && tmp
==(LONG
)((short)tmp
))
6696 state
|= IOSTATE_failbit
;
6698 basic_istream_char_sentry_destroy(this);
6700 basic_ios_char_setstate(base
, state
);
6704 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAG@Z */
6705 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAG@Z */
6706 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ushort
, 8)
6707 basic_istream_char
* __thiscall
basic_istream_char_read_ushort(basic_istream_char
*this, unsigned short *v
)
6709 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6710 int state
= IOSTATE_goodbit
;
6712 TRACE("(%p %p)\n", this, v
);
6714 if(basic_istream_char_sentry_create(this, FALSE
)) {
6715 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6716 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
6717 istreambuf_iterator_char first
={0}, last
={0};
6719 first
.strbuf
= strbuf
;
6720 num_get_char_get_ushort(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6722 basic_istream_char_sentry_destroy(this);
6724 basic_ios_char_setstate(base
, state
);
6728 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAH@Z */
6729 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAH@Z */
6730 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int
, 8)
6731 basic_istream_char
* __thiscall
basic_istream_char_read_int(basic_istream_char
*this, int *v
)
6733 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6734 int state
= IOSTATE_goodbit
;
6736 TRACE("(%p %p)\n", this, v
);
6738 if(basic_istream_char_sentry_create(this, FALSE
)) {
6739 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6740 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
6741 istreambuf_iterator_char first
={0}, last
={0};
6743 first
.strbuf
= strbuf
;
6744 num_get_char_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, (LONG
*)v
);
6746 basic_istream_char_sentry_destroy(this);
6748 basic_ios_char_setstate(base
, state
);
6752 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAI@Z */
6753 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAI@Z */
6754 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint
, 8)
6755 basic_istream_char
* __thiscall
basic_istream_char_read_uint(basic_istream_char
*this, unsigned int *v
)
6757 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6758 int state
= IOSTATE_goodbit
;
6760 TRACE("(%p %p)\n", this, v
);
6762 if(basic_istream_char_sentry_create(this, FALSE
)) {
6763 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6764 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
6765 istreambuf_iterator_char first
={0}, last
={0};
6767 first
.strbuf
= strbuf
;
6768 num_get_char_get_uint(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6770 basic_istream_char_sentry_destroy(this);
6772 basic_ios_char_setstate(base
, state
);
6776 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAJ@Z */
6777 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAJ@Z */
6778 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_long
, 8)
6779 basic_istream_char
* __thiscall
basic_istream_char_read_long(basic_istream_char
*this, LONG
*v
)
6781 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6782 int state
= IOSTATE_goodbit
;
6784 TRACE("(%p %p)\n", this, v
);
6786 if(basic_istream_char_sentry_create(this, FALSE
)) {
6787 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6788 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
6789 istreambuf_iterator_char first
={0}, last
={0};
6791 first
.strbuf
= strbuf
;
6792 num_get_char_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6794 basic_istream_char_sentry_destroy(this);
6796 basic_ios_char_setstate(base
, state
);
6800 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAK@Z */
6801 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAK@Z */
6802 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ulong
, 8)
6803 basic_istream_char
* __thiscall
basic_istream_char_read_ulong(basic_istream_char
*this, ULONG
*v
)
6805 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6806 int state
= IOSTATE_goodbit
;
6808 TRACE("(%p %p)\n", this, v
);
6810 if(basic_istream_char_sentry_create(this, FALSE
)) {
6811 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6812 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
6813 istreambuf_iterator_char first
={0}, last
={0};
6815 first
.strbuf
= strbuf
;
6816 num_get_char_get_ulong(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6818 basic_istream_char_sentry_destroy(this);
6820 basic_ios_char_setstate(base
, state
);
6824 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAM@Z */
6825 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAM@Z */
6826 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_float
, 8)
6827 basic_istream_char
* __thiscall
basic_istream_char_read_float(basic_istream_char
*this, float *v
)
6829 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6830 int state
= IOSTATE_goodbit
;
6832 TRACE("(%p %p)\n", this, v
);
6834 if(basic_istream_char_sentry_create(this, FALSE
)) {
6835 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6836 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
6837 istreambuf_iterator_char first
={0}, last
={0};
6839 first
.strbuf
= strbuf
;
6840 num_get_char_get_float(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6842 basic_istream_char_sentry_destroy(this);
6844 basic_ios_char_setstate(base
, state
);
6848 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAN@Z */
6849 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAN@Z */
6850 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_double
, 8)
6851 basic_istream_char
* __thiscall
basic_istream_char_read_double(basic_istream_char
*this, double *v
)
6853 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6854 int state
= IOSTATE_goodbit
;
6856 TRACE("(%p %p)\n", this, v
);
6858 if(basic_istream_char_sentry_create(this, FALSE
)) {
6859 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6860 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
6861 istreambuf_iterator_char first
={0}, last
={0};
6863 first
.strbuf
= strbuf
;
6864 num_get_char_get_double(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6866 basic_istream_char_sentry_destroy(this);
6868 basic_ios_char_setstate(base
, state
);
6872 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAO@Z */
6873 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAO@Z */
6874 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ldouble
, 8)
6875 basic_istream_char
* __thiscall
basic_istream_char_read_ldouble(basic_istream_char
*this, double *v
)
6877 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6878 int state
= IOSTATE_goodbit
;
6880 TRACE("(%p %p)\n", this, v
);
6882 if(basic_istream_char_sentry_create(this, FALSE
)) {
6883 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6884 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
6885 istreambuf_iterator_char first
={0}, last
={0};
6887 first
.strbuf
= strbuf
;
6888 num_get_char_get_ldouble(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6890 basic_istream_char_sentry_destroy(this);
6892 basic_ios_char_setstate(base
, state
);
6896 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAPAX@Z */
6897 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
6898 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ptr
, 8)
6899 basic_istream_char
* __thiscall
basic_istream_char_read_ptr(basic_istream_char
*this, void **v
)
6901 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6902 int state
= IOSTATE_goodbit
;
6904 TRACE("(%p %p)\n", this, v
);
6906 if(basic_istream_char_sentry_create(this, FALSE
)) {
6907 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6908 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
6909 istreambuf_iterator_char first
={0}, last
={0};
6911 first
.strbuf
= strbuf
;
6912 num_get_char_get_void(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6914 basic_istream_char_sentry_destroy(this);
6916 basic_ios_char_setstate(base
, state
);
6920 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_J@Z */
6921 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_J@Z */
6922 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int64
, 8)
6923 basic_istream_char
* __thiscall
basic_istream_char_read_int64(basic_istream_char
*this, __int64
*v
)
6925 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6926 int state
= IOSTATE_goodbit
;
6928 TRACE("(%p %p)\n", this, v
);
6930 if(basic_istream_char_sentry_create(this, FALSE
)) {
6931 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6932 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
6933 istreambuf_iterator_char first
={0}, last
={0};
6935 first
.strbuf
= strbuf
;
6936 num_get_char_get_int64(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6938 basic_istream_char_sentry_destroy(this);
6940 basic_ios_char_setstate(base
, state
);
6944 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_K@Z */
6945 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_K@Z */
6946 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint64
, 8)
6947 basic_istream_char
* __thiscall
basic_istream_char_read_uint64(basic_istream_char
*this, unsigned __int64
*v
)
6949 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6950 int state
= IOSTATE_goodbit
;
6952 TRACE("(%p %p)\n", this, v
);
6954 if(basic_istream_char_sentry_create(this, FALSE
)) {
6955 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6956 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
6957 istreambuf_iterator_char first
={0}, last
={0};
6959 first
.strbuf
= strbuf
;
6960 num_get_char_get_uint64(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6962 basic_istream_char_sentry_destroy(this);
6964 basic_ios_char_setstate(base
, state
);
6968 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_N@Z */
6969 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_N@Z */
6970 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_bool
, 8)
6971 basic_istream_char
* __thiscall
basic_istream_char_read_bool(basic_istream_char
*this, bool *v
)
6973 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6974 int state
= IOSTATE_goodbit
;
6976 TRACE("(%p %p)\n", this, v
);
6978 if(basic_istream_char_sentry_create(this, FALSE
)) {
6979 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6980 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
6981 istreambuf_iterator_char first
={0}, last
={0};
6983 first
.strbuf
= strbuf
;
6984 num_get_char_get_bool(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6986 basic_istream_char_sentry_destroy(this);
6988 basic_ios_char_setstate(base
, state
);
6992 /* ??$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 */
6993 /* ??$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 */
6994 basic_istream_char
* __cdecl
basic_istream_char_getline_bstr_delim(
6995 basic_istream_char
*istream
, basic_string_char
*str
, char delim
)
6997 basic_ios_char
*base
= basic_istream_char_get_basic_ios(istream
);
6998 IOSB_iostate state
= IOSTATE_goodbit
;
6999 int c
= (unsigned char)delim
;
7001 TRACE("(%p %p %s)\n", istream
, str
, debugstr_an(&delim
, 1));
7003 MSVCP_basic_string_char_clear(str
);
7004 if(basic_istream_char_sentry_create(istream
, TRUE
)) {
7005 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
7007 c
= basic_streambuf_char_sgetc(strbuf
);
7008 for(; c
!=(unsigned char)delim
&& c
!=EOF
; c
= basic_streambuf_char_snextc(strbuf
))
7009 MSVCP_basic_string_char_append_ch(str
, c
);
7010 if(c
==EOF
) state
|= IOSTATE_eofbit
;
7011 else if(c
==(unsigned char)delim
) basic_streambuf_char_sbumpc(strbuf
);
7013 if(!MSVCP_basic_string_char_length(str
) && c
!=(unsigned char)delim
) state
|= IOSTATE_failbit
;
7015 basic_istream_char_sentry_destroy(istream
);
7017 basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream
), state
);
7021 /* ??$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 */
7022 /* ??$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 */
7023 basic_istream_char
* __cdecl
basic_istream_char_getline_bstr(
7024 basic_istream_char
*istream
, basic_string_char
*str
)
7026 return basic_istream_char_getline_bstr_delim(istream
, str
, '\n');
7029 /* ??$?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 */
7030 /* ??$?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 */
7031 basic_istream_char
* __cdecl
basic_istream_char_read_bstr(
7032 basic_istream_char
*istream
, basic_string_char
*str
)
7034 basic_ios_char
*base
= basic_istream_char_get_basic_ios(istream
);
7035 IOSB_iostate state
= IOSTATE_failbit
;
7038 TRACE("(%p %p)\n", istream
, str
);
7040 if(basic_istream_char_sentry_create(istream
, FALSE
)) {
7041 const ctype_char
*ctype
= ctype_char_use_facet(IOS_LOCALE(base
->strbuf
));
7042 size_t count
= ios_base_width_get(&base
->base
);
7047 MSVCP_basic_string_char_clear(str
);
7049 for(c
= basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base
));
7050 c
!=EOF
&& !ctype_char_is_ch(ctype
, _SPACE
|_BLANK
, c
) && count
>0;
7051 c
= basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base
)), count
--) {
7052 state
= IOSTATE_goodbit
;
7053 MSVCP_basic_string_char_append_ch(str
, c
);
7056 basic_istream_char_sentry_destroy(istream
);
7058 ios_base_width_set(&base
->base
, 0);
7059 basic_ios_char_setstate(base
, state
| (c
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
7063 /* ??$?5DU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAD@Z */
7064 /* ??$?5DU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAD@Z */
7065 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAC@Z */
7066 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAC@Z */
7067 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAE@Z */
7068 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAE@Z */
7069 basic_istream_char
* __cdecl
basic_istream_char_read_str(basic_istream_char
*istream
, char *str
)
7071 basic_ios_char
*base
= basic_istream_char_get_basic_ios(istream
);
7072 IOSB_iostate state
= IOSTATE_failbit
;
7075 TRACE("(%p %p)\n", istream
, str
);
7077 if(basic_istream_char_sentry_create(istream
, FALSE
)) {
7078 const ctype_char
*ctype
= ctype_char_use_facet(IOS_LOCALE(base
->strbuf
));
7079 size_t count
= ios_base_width_get(&base
->base
)-1;
7081 for(c
= basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base
));
7082 c
!=EOF
&& !ctype_char_is_ch(ctype
, _SPACE
|_BLANK
, c
) && count
>0;
7083 c
= basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base
)), count
--) {
7084 state
= IOSTATE_goodbit
;
7088 basic_istream_char_sentry_destroy(istream
);
7091 ios_base_width_set(&base
->base
, 0);
7092 basic_ios_char_setstate(base
, state
| (c
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
7096 /* ??$?5DU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAD@Z */
7097 /* ??$?5DU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAD@Z */
7098 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAC@Z */
7099 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAC@Z */
7100 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAE@Z */
7101 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAE@Z */
7102 basic_istream_char
* __cdecl
basic_istream_char_read_ch(basic_istream_char
*istream
, char *ch
)
7104 IOSB_iostate state
= IOSTATE_failbit
;
7107 TRACE("(%p %p)\n", istream
, ch
);
7109 if(basic_istream_char_sentry_create(istream
, FALSE
)) {
7110 c
= basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(
7111 basic_istream_char_get_basic_ios(istream
)));
7113 state
= IOSTATE_goodbit
;
7117 basic_istream_char_sentry_destroy(istream
);
7119 basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream
),
7120 state
| (c
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
7124 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
7125 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
7126 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_streambuf
, 8)
7127 basic_istream_char
* __thiscall
basic_istream_char_read_streambuf(
7128 basic_istream_char
*this, basic_streambuf_char
*streambuf
)
7130 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
7131 IOSB_iostate state
= IOSTATE_failbit
;
7134 TRACE("(%p %p)\n", this, streambuf
);
7136 if(basic_istream_char_sentry_create(this, FALSE
)) {
7137 for(c
= basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base
)); c
!=EOF
;
7138 c
= basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base
))) {
7139 state
= IOSTATE_goodbit
;
7140 if(basic_streambuf_char_sputc(streambuf
, c
) == EOF
)
7144 basic_istream_char_sentry_destroy(this);
7146 basic_ios_char_setstate(base
, state
| (c
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
7150 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
7151 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
7152 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func
, 8)
7153 basic_istream_char
* __thiscall
basic_istream_char_read_func(basic_istream_char
*this,
7154 basic_istream_char
* (__cdecl
*pfunc
)(basic_istream_char
*))
7156 TRACE("(%p %p)\n", this, pfunc
);
7161 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
7162 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
7163 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_basic_ios
, 8)
7164 basic_istream_char
* __thiscall
basic_istream_char_read_func_basic_ios(basic_istream_char
*this,
7165 basic_ios_char
* (__cdecl
*pfunc
)(basic_ios_char
*))
7167 TRACE("(%p %p)\n", this, pfunc
);
7168 pfunc(basic_istream_char_get_basic_ios(this));
7172 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
7173 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
7174 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_ios_base
, 8)
7175 basic_istream_char
* __thiscall
basic_istream_char_read_func_ios_base(basic_istream_char
*this,
7176 ios_base
* (__cdecl
*pfunc
)(ios_base
*))
7178 TRACE("(%p %p)\n", this, pfunc
);
7179 pfunc(&basic_istream_char_get_basic_ios(this)->base
);
7183 /* Caution: basic_istream uses virtual inheritance. */
7184 static inline basic_ios_wchar
* basic_istream_short_get_basic_ios(basic_istream_wchar
*this)
7186 return (basic_ios_wchar
*)((char*)this+this->vbtable
[1]);
7189 static inline basic_ios_wchar
* basic_istream_short_to_basic_ios(basic_istream_wchar
*ptr
)
7191 return (basic_ios_wchar
*)((char*)ptr
+basic_istream_short_vbtable
[1]);
7194 static inline basic_istream_wchar
* basic_istream_short_from_basic_ios(basic_ios_wchar
*ptr
)
7196 return (basic_istream_wchar
*)((char*)ptr
-basic_istream_short_vbtable
[1]);
7199 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
7200 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
7201 DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor
, 16)
7202 basic_istream_wchar
* __thiscall
basic_istream_short_ctor(basic_istream_wchar
*this,
7203 basic_streambuf_wchar
*strbuf
, bool isstd
, bool virt_init
)
7205 basic_ios_wchar
*base
;
7207 TRACE("(%p %p %d %d)\n", this, strbuf
, isstd
, virt_init
);
7210 this->vbtable
= basic_istream_short_vbtable
;
7211 base
= basic_istream_short_get_basic_ios(this);
7212 basic_ios_short_ctor(base
);
7214 base
= basic_istream_short_get_basic_ios(this);
7217 base
->base
.vtable
= &basic_istream_short_vtable
;
7219 basic_ios_short_init(base
, strbuf
, isstd
);
7223 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z */
7224 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
7225 DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor_uninitialized
, 12)
7226 basic_istream_wchar
* __thiscall
basic_istream_short_ctor_uninitialized(
7227 basic_istream_wchar
*this, int uninitialized
, bool virt_init
)
7229 basic_ios_wchar
*base
;
7231 TRACE("(%p %d %d)\n", this, uninitialized
, virt_init
);
7234 this->vbtable
= basic_istream_short_vbtable
;
7235 base
= basic_istream_short_get_basic_ios(this);
7236 basic_ios_short_ctor(base
);
7238 base
= basic_istream_short_get_basic_ios(this);
7241 base
->base
.vtable
= &basic_istream_short_vtable
;
7242 ios_base_Addstd(&base
->base
);
7246 /* ??1?$basic_istream@GU?$char_traits@G@std@@@std@@UAE@XZ */
7247 /* ??1?$basic_istream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
7248 DEFINE_THISCALL_WRAPPER(basic_istream_short_dtor
, 4)
7249 void __thiscall
basic_istream_short_dtor(basic_ios_wchar
*base
)
7251 basic_istream_wchar
*this = basic_istream_short_from_basic_ios(base
);
7253 /* don't destroy virtual base here */
7254 TRACE("(%p)\n", this);
7257 /* ??_D?$basic_istream@GU?$char_traits@G@std@@@std@@QAEXXZ */
7258 /* ??_D?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
7259 DEFINE_THISCALL_WRAPPER(basic_istream_short_vbase_dtor
, 4)
7260 void __thiscall
basic_istream_short_vbase_dtor(basic_istream_wchar
*this)
7262 TRACE("(%p)\n", this);
7263 basic_istream_short_dtor(basic_istream_short_to_basic_ios(this));
7264 basic_ios_short_dtor(basic_istream_short_get_basic_ios(this));
7267 DEFINE_THISCALL_WRAPPER(basic_istream_short_vector_dtor
, 8)
7268 basic_istream_wchar
* __thiscall
basic_istream_short_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
7270 basic_istream_wchar
*this = basic_istream_short_from_basic_ios(base
);
7272 TRACE("(%p %x)\n", this, flags
);
7275 /* we have an array, with the number of elements stored before the first object */
7276 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
7278 for(i
=*ptr
-1; i
>=0; i
--)
7279 basic_istream_short_vbase_dtor(this+i
);
7280 operator_delete(ptr
);
7282 basic_istream_short_vbase_dtor(this);
7284 operator_delete(this);
7290 /* ?ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE_N_N@Z */
7291 /* ?ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_N_N@Z */
7292 DEFINE_THISCALL_WRAPPER(basic_istream_short_ipfx
, 8)
7293 bool __thiscall
basic_istream_short_ipfx(basic_istream_wchar
*this, bool noskip
)
7295 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7297 TRACE("(%p %d)\n", this, noskip
);
7299 if(ios_base_good(&base
->base
)) {
7300 if(basic_ios_short_tie_get(base
))
7301 basic_ostream_short_flush(basic_ios_short_tie_get(base
));
7303 if(!noskip
&& (ios_base_flags_get(&base
->base
) & FMTFLAG_skipws
)) {
7304 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7305 const ctype_wchar
*ctype
= ctype_wchar_use_facet(IOS_LOCALE(base
->strbuf
));
7308 for(ch
= basic_streambuf_wchar_sgetc(strbuf
); ;
7309 ch
= basic_streambuf_wchar_snextc(strbuf
)) {
7310 if(ch
==WEOF
|| !ctype_wchar_is_ch(ctype
, _SPACE
|_BLANK
, ch
))
7316 if(!ios_base_good(&base
->base
)) {
7317 basic_ios_short_setstate(base
, IOSTATE_failbit
);
7323 /* ?isfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEXXZ */
7324 /* ?isfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
7325 DEFINE_THISCALL_WRAPPER(basic_istream_short_isfx
, 4)
7326 void __thiscall
basic_istream_short_isfx(basic_istream_wchar
*this)
7328 TRACE("(%p)\n", this);
7331 static BOOL
basic_istream_short_sentry_create(basic_istream_wchar
*istr
, bool noskip
)
7333 return basic_istream_short_ipfx(istr
, noskip
);
7336 static void basic_istream_short_sentry_destroy(basic_istream_wchar
*istr
)
7340 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QBEHXZ */
7341 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QEBA_JXZ */
7342 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QBA_JXZ */
7343 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QBE_JXZ */
7344 DEFINE_THISCALL_WRAPPER(basic_istream_short_gcount
, 4)
7345 streamsize __thiscall
basic_istream_short_gcount(const basic_istream_wchar
*this)
7347 TRACE("(%p)\n", this);
7351 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEGXZ */
7352 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAGXZ */
7353 DEFINE_THISCALL_WRAPPER(basic_istream_short_get
, 4)
7354 unsigned short __thiscall
basic_istream_short_get(basic_istream_wchar
*this)
7356 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7359 TRACE("(%p)\n", this);
7363 if(!basic_istream_short_sentry_create(this, TRUE
)) {
7364 basic_istream_short_sentry_destroy(this);
7368 ret
= basic_streambuf_wchar_sbumpc(basic_ios_short_rdbuf_get(base
));
7369 basic_istream_short_sentry_destroy(this);
7371 basic_ios_short_setstate(base
, IOSTATE_eofbit
|IOSTATE_failbit
);
7378 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAG@Z */
7379 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAG@Z */
7380 DEFINE_THISCALL_WRAPPER(basic_istream_short_get_ch
, 8)
7381 basic_istream_wchar
* __thiscall
basic_istream_short_get_ch(basic_istream_wchar
*this, wchar_t *ch
)
7385 TRACE("(%p %p)\n", this, ch
);
7387 ret
= basic_istream_short_get(this);
7393 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGHG@Z */
7394 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_JG@Z */
7395 DEFINE_THISCALL_WRAPPER(basic_istream_short_get_str_delim
, 16)
7396 basic_istream_wchar
* __thiscall
basic_istream_short_get_str_delim(basic_istream_wchar
*this, wchar_t *str
, streamsize count
, wchar_t delim
)
7398 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7399 unsigned short ch
= delim
;
7401 TRACE("(%p %p %Id %s)\n", this, str
, count
, debugstr_wn(&delim
, 1));
7405 if(basic_istream_short_sentry_create(this, TRUE
)) {
7406 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7408 for(ch
= basic_streambuf_wchar_sgetc(strbuf
); count
>1;
7409 ch
= basic_streambuf_wchar_snextc(strbuf
)) {
7410 if(ch
==WEOF
|| ch
==delim
)
7418 basic_istream_short_sentry_destroy(this);
7420 basic_ios_short_setstate(base
, (!this->count
? IOSTATE_failbit
: IOSTATE_goodbit
) |
7421 (ch
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
7427 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
7428 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
7429 DEFINE_THISCALL_WRAPPER(basic_istream_short_get_str
, 12)
7430 basic_istream_wchar
* __thiscall
basic_istream_short_get_str(basic_istream_wchar
*this, wchar_t *str
, streamsize count
)
7432 return basic_istream_short_get_str_delim(this, str
, count
, '\n');
7435 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAV?$basic_streambuf@GU?$char_traits@G@std@@@2@G@Z */
7436 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@G@Z */
7437 DEFINE_THISCALL_WRAPPER(basic_istream_short_get_streambuf_delim
, 12)
7438 basic_istream_wchar
* __thiscall
basic_istream_short_get_streambuf_delim(basic_istream_wchar
*this, basic_streambuf_wchar
*strbuf
, wchar_t delim
)
7440 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7441 unsigned short ch
= delim
;
7443 TRACE("(%p %p %s)\n", this, strbuf
, debugstr_wn(&delim
, 1));
7447 if(basic_istream_short_sentry_create(this, TRUE
)) {
7448 basic_streambuf_wchar
*strbuf_read
= basic_ios_short_rdbuf_get(base
);
7450 for(ch
= basic_streambuf_wchar_sgetc(strbuf_read
); ;
7451 ch
= basic_streambuf_wchar_snextc(strbuf_read
)) {
7452 if(ch
==WEOF
|| ch
==delim
)
7455 if(basic_streambuf_wchar_sputc(strbuf
, ch
) == WEOF
)
7460 basic_istream_short_sentry_destroy(this);
7462 basic_ios_short_setstate(base
, (!this->count
? IOSTATE_failbit
: IOSTATE_goodbit
) |
7463 (ch
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
7467 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAV?$basic_streambuf@GU?$char_traits@G@std@@@2@@Z */
7468 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@@Z */
7469 DEFINE_THISCALL_WRAPPER(basic_istream_short_get_streambuf
, 8)
7470 basic_istream_wchar
* __thiscall
basic_istream_short_get_streambuf(basic_istream_wchar
*this, basic_streambuf_wchar
*strbuf
)
7472 return basic_istream_short_get_streambuf_delim(this, strbuf
, '\n');
7475 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGHG@Z */
7476 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_JG@Z */
7477 DEFINE_THISCALL_WRAPPER(basic_istream_short_getline_delim
, 16)
7478 basic_istream_wchar
* __thiscall
basic_istream_short_getline_delim(basic_istream_wchar
*this, wchar_t *str
, streamsize count
, wchar_t delim
)
7480 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7481 unsigned short ch
= delim
;
7483 TRACE("(%p %p %Id %s)\n", this, str
, count
, debugstr_wn(&delim
, 1));
7487 if(basic_istream_short_sentry_create(this, TRUE
) && count
>0) {
7488 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7491 ch
= basic_streambuf_wchar_sbumpc(strbuf
);
7493 if(ch
==WEOF
|| ch
==delim
)
7503 else if(ch
!= WEOF
) {
7504 ch
= basic_streambuf_wchar_sgetc(strbuf
);
7507 basic_streambuf_wchar__Gninc(strbuf
);
7512 basic_istream_short_sentry_destroy(this);
7514 basic_ios_short_setstate(base
, (ch
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
) |
7515 (!this->count
|| (ch
!=delim
&& ch
!=WEOF
) ? IOSTATE_failbit
: IOSTATE_goodbit
));
7521 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
7522 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
7523 DEFINE_THISCALL_WRAPPER(basic_istream_short_getline
, 12)
7524 basic_istream_wchar
* __thiscall
basic_istream_short_getline(basic_istream_wchar
*this, wchar_t *str
, streamsize count
)
7526 return basic_istream_short_getline_delim(this, str
, count
, '\n');
7529 /* ?ignore@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@HG@Z */
7530 /* ?ignore@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JG@Z */
7531 DEFINE_THISCALL_WRAPPER(basic_istream_short_ignore
, 12)
7532 basic_istream_wchar
* __thiscall
basic_istream_short_ignore(basic_istream_wchar
*this, streamsize count
, unsigned short delim
)
7534 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7535 unsigned short ch
= delim
;
7538 TRACE("(%p %Id %d)\n", this, count
, delim
);
7542 if(basic_istream_short_sentry_create(this, TRUE
)) {
7543 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7544 state
= IOSTATE_goodbit
;
7547 ch
= basic_streambuf_wchar_sbumpc(strbuf
);
7550 state
= IOSTATE_eofbit
;
7558 if(count
!= INT_MAX
)
7562 state
= IOSTATE_failbit
;
7563 basic_istream_short_sentry_destroy(this);
7565 basic_ios_short_setstate(base
, state
);
7569 /* ?ws@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@1@AAV21@@Z */
7570 /* ?ws@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
7571 basic_istream_wchar
* __cdecl
ws_basic_istream_short(basic_istream_wchar
*istream
)
7573 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(istream
);
7574 unsigned short ch
= '\n';
7576 TRACE("(%p)\n", istream
);
7578 if(basic_istream_short_sentry_create(istream
, TRUE
)) {
7579 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7580 const ctype_wchar
*ctype
= ctype_wchar_use_facet(IOS_LOCALE(strbuf
));
7582 for(ch
= basic_streambuf_wchar_sgetc(strbuf
); ctype_wchar_is_ch(ctype
, _SPACE
, ch
);
7583 ch
= basic_streambuf_wchar_snextc(strbuf
)) {
7588 basic_istream_short_sentry_destroy(istream
);
7591 basic_ios_short_setstate(base
, IOSTATE_eofbit
);
7595 /* ?peek@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEGXZ */
7596 /* ?peek@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAGXZ */
7597 DEFINE_THISCALL_WRAPPER(basic_istream_short_peek
, 4)
7598 unsigned short __thiscall
basic_istream_short_peek(basic_istream_wchar
*this)
7600 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7601 unsigned short ret
= WEOF
;
7603 TRACE("(%p)\n", this);
7607 if(basic_istream_short_sentry_create(this, TRUE
))
7608 ret
= basic_streambuf_wchar_sgetc(basic_ios_short_rdbuf_get(base
));
7609 basic_istream_short_sentry_destroy(this);
7612 basic_ios_short_setstate(base
, IOSTATE_eofbit
);
7617 /* ?read@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
7618 /* ?read@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
7619 DEFINE_THISCALL_WRAPPER(basic_istream_short_read
, 12)
7620 basic_istream_wchar
* __thiscall
basic_istream_short_read(basic_istream_wchar
*this, wchar_t *str
, streamsize count
)
7622 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7623 IOSB_iostate state
= IOSTATE_goodbit
;
7625 TRACE("(%p %p %Id)\n", this, str
, count
);
7627 if(basic_istream_short_sentry_create(this, TRUE
)) {
7628 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7630 this->count
= basic_streambuf_wchar_sgetn(strbuf
, str
, count
);
7631 if(this->count
!= count
)
7632 state
|= IOSTATE_failbit
| IOSTATE_eofbit
;
7636 basic_istream_short_sentry_destroy(this);
7638 basic_ios_short_setstate(base
, state
);
7642 /* ?readsome@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */
7643 /* ?readsome@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */
7644 DEFINE_THISCALL_WRAPPER(basic_istream_short_readsome
, 12)
7645 streamsize __thiscall
basic_istream_short_readsome(basic_istream_wchar
*this, wchar_t *str
, streamsize count
)
7647 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7648 IOSB_iostate state
= IOSTATE_goodbit
;
7650 TRACE("(%p %p %Id)\n", this, str
, count
);
7654 if(basic_istream_short_sentry_create(this, TRUE
)) {
7655 streamsize avail
= basic_streambuf_wchar_in_avail(basic_ios_short_rdbuf_get(base
));
7660 state
|= IOSTATE_eofbit
;
7662 basic_istream_short_read(this, str
, avail
);
7664 state
|= IOSTATE_failbit
;
7666 basic_istream_short_sentry_destroy(this);
7668 basic_ios_short_setstate(base
, state
);
7672 /* ?putback@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@G@Z */
7673 /* ?putback@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@G@Z */
7674 DEFINE_THISCALL_WRAPPER(basic_istream_short_putback
, 8)
7675 basic_istream_wchar
* __thiscall
basic_istream_short_putback(basic_istream_wchar
*this, wchar_t ch
)
7677 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7678 IOSB_iostate state
= IOSTATE_goodbit
;
7680 TRACE("(%p %c)\n", this, ch
);
7684 if(basic_istream_short_sentry_create(this, TRUE
)) {
7685 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7687 if(!ios_base_good(&base
->base
))
7688 state
|= IOSTATE_failbit
;
7689 else if(!strbuf
|| basic_streambuf_wchar_sputbackc(strbuf
, ch
)==WEOF
)
7690 state
|= IOSTATE_badbit
;
7692 basic_istream_short_sentry_destroy(this);
7694 basic_ios_short_setstate(base
, state
);
7698 /* ?unget@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@XZ */
7699 /* ?unget@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@XZ */
7700 DEFINE_THISCALL_WRAPPER(basic_istream_short_unget
, 4)
7701 basic_istream_wchar
* __thiscall
basic_istream_short_unget(basic_istream_wchar
*this)
7703 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7704 IOSB_iostate state
= IOSTATE_goodbit
;
7706 TRACE("(%p)\n", this);
7710 if(basic_istream_short_sentry_create(this, TRUE
)) {
7711 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7713 if(!ios_base_good(&base
->base
))
7714 state
|= IOSTATE_failbit
;
7715 else if(!strbuf
|| basic_streambuf_wchar_sungetc(strbuf
)==WEOF
)
7716 state
|= IOSTATE_badbit
;
7718 basic_istream_short_sentry_destroy(this);
7720 basic_ios_short_setstate(base
, state
);
7724 /* ?sync@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHXZ */
7725 /* ?sync@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAHXZ */
7726 DEFINE_THISCALL_WRAPPER(basic_istream_short_sync
, 4)
7727 int __thiscall
basic_istream_short_sync(basic_istream_wchar
*this)
7729 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7730 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7732 TRACE("(%p)\n", this);
7737 if(basic_istream_short_sentry_create(this, TRUE
)) {
7738 if(basic_streambuf_wchar_pubsync(strbuf
) != -1) {
7739 basic_istream_short_sentry_destroy(this);
7743 basic_istream_short_sentry_destroy(this);
7745 basic_ios_short_setstate(base
, IOSTATE_badbit
);
7749 /* ?tellg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@XZ */
7750 /* ?tellg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
7751 DEFINE_THISCALL_WRAPPER(basic_istream_short_tellg
, 8)
7752 fpos_int
* __thiscall
basic_istream_short_tellg(basic_istream_wchar
*this, fpos_int
*ret
)
7754 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7756 TRACE("(%p %p)\n", this, ret
);
7758 if(ios_base_fail(&base
->base
)) {
7765 basic_streambuf_wchar_pubseekoff(basic_ios_short_rdbuf_get(base
),
7766 ret
, 0, SEEKDIR_cur
, OPENMODE_in
);
7771 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@JW4seekdir@ios_base@2@@Z */
7772 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JW4seekdir@ios_base@2@@Z */
7773 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@JH@Z */
7774 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JH@Z */
7775 DEFINE_THISCALL_WRAPPER(basic_istream_short_seekg
, 12)
7776 basic_istream_wchar
* __thiscall
basic_istream_short_seekg(basic_istream_wchar
*this, streamoff off
, int dir
)
7778 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7780 TRACE("(%p %Id %d)\n", this, off
, dir
);
7782 if(!ios_base_fail(&base
->base
)) {
7783 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7786 basic_streambuf_wchar_pubseekoff(strbuf
, &ret
, off
, dir
, OPENMODE_in
);
7792 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
7793 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
7794 DEFINE_THISCALL_WRAPPER(basic_istream_short_seekg_fpos
, 28)
7795 basic_istream_wchar
* __thiscall
basic_istream_short_seekg_fpos(basic_istream_wchar
*this, fpos_int pos
)
7797 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7799 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos
));
7801 if(!ios_base_fail(&base
->base
)) {
7802 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7805 basic_streambuf_wchar_pubseekpos(strbuf
, &ret
, pos
, OPENMODE_in
);
7811 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAF@Z */
7812 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAF@Z */
7813 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_short
, 8)
7814 basic_istream_wchar
* __thiscall
basic_istream_short_read_short(basic_istream_wchar
*this, short *v
)
7816 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7817 const num_get
*numget
= num_get_short_use_facet(IOS_LOCALE(base
->strbuf
));
7818 int state
= IOSTATE_goodbit
;
7820 TRACE("(%p %p)\n", this, v
);
7822 if(basic_istream_short_sentry_create(this, FALSE
)) {
7823 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7824 istreambuf_iterator_wchar first
={0}, last
={0};
7827 first
.strbuf
= strbuf
;
7828 num_get_wchar_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, &tmp
);
7830 if(!(state
&IOSTATE_failbit
) && tmp
==(LONG
)((short)tmp
))
7833 state
|= IOSTATE_failbit
;
7835 basic_istream_short_sentry_destroy(this);
7837 basic_ios_short_setstate(base
, state
);
7841 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAH@Z */
7842 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAH@Z */
7843 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int
, 8)
7844 basic_istream_wchar
* __thiscall
basic_istream_short_read_int(basic_istream_wchar
*this, int *v
)
7846 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7847 const num_get
*numget
= num_get_short_use_facet(IOS_LOCALE(base
->strbuf
));
7848 int state
= IOSTATE_goodbit
;
7850 TRACE("(%p %p)\n", this, v
);
7852 if(basic_istream_short_sentry_create(this, FALSE
)) {
7853 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7854 istreambuf_iterator_wchar first
={0}, last
={0};
7856 first
.strbuf
= strbuf
;
7857 num_get_wchar_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, (LONG
*)v
);
7859 basic_istream_short_sentry_destroy(this);
7861 basic_ios_short_setstate(base
, state
);
7865 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAI@Z */
7866 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAI@Z */
7867 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint
, 8)
7868 basic_istream_wchar
* __thiscall
basic_istream_short_read_uint(basic_istream_wchar
*this, unsigned int *v
)
7870 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7871 const num_get
*numget
= num_get_short_use_facet(IOS_LOCALE(base
->strbuf
));
7872 int state
= IOSTATE_goodbit
;
7874 TRACE("(%p %p)\n", this, v
);
7876 if(basic_istream_short_sentry_create(this, FALSE
)) {
7877 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7878 istreambuf_iterator_wchar first
={0}, last
={0};
7880 first
.strbuf
= strbuf
;
7881 num_get_wchar_get_uint(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7883 basic_istream_short_sentry_destroy(this);
7885 basic_ios_short_setstate(base
, state
);
7889 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAJ@Z */
7890 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAJ@Z */
7891 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_long
, 8)
7892 basic_istream_wchar
* __thiscall
basic_istream_short_read_long(basic_istream_wchar
*this, LONG
*v
)
7894 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7895 const num_get
*numget
= num_get_short_use_facet(IOS_LOCALE(base
->strbuf
));
7896 int state
= IOSTATE_goodbit
;
7898 TRACE("(%p %p)\n", this, v
);
7900 if(basic_istream_short_sentry_create(this, FALSE
)) {
7901 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7902 istreambuf_iterator_wchar first
={0}, last
={0};
7904 first
.strbuf
= strbuf
;
7905 num_get_wchar_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7907 basic_istream_short_sentry_destroy(this);
7909 basic_ios_short_setstate(base
, state
);
7913 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAK@Z */
7914 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAK@Z */
7915 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ulong
, 8)
7916 basic_istream_wchar
* __thiscall
basic_istream_short_read_ulong(basic_istream_wchar
*this, ULONG
*v
)
7918 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7919 const num_get
*numget
= num_get_short_use_facet(IOS_LOCALE(base
->strbuf
));
7920 int state
= IOSTATE_goodbit
;
7922 TRACE("(%p %p)\n", this, v
);
7924 if(basic_istream_short_sentry_create(this, FALSE
)) {
7925 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7926 istreambuf_iterator_wchar first
={0}, last
={0};
7928 first
.strbuf
= strbuf
;
7929 num_get_wchar_get_ulong(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7931 basic_istream_short_sentry_destroy(this);
7933 basic_ios_short_setstate(base
, state
);
7937 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAM@Z */
7938 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAM@Z */
7939 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_float
, 8)
7940 basic_istream_wchar
* __thiscall
basic_istream_short_read_float(basic_istream_wchar
*this, float *v
)
7942 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7943 const num_get
*numget
= num_get_short_use_facet(IOS_LOCALE(base
->strbuf
));
7944 int state
= IOSTATE_goodbit
;
7946 TRACE("(%p %p)\n", this, v
);
7948 if(basic_istream_short_sentry_create(this, FALSE
)) {
7949 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7950 istreambuf_iterator_wchar first
={0}, last
={0};
7952 first
.strbuf
= strbuf
;
7953 num_get_wchar_get_float(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7955 basic_istream_short_sentry_destroy(this);
7957 basic_ios_short_setstate(base
, state
);
7961 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAN@Z */
7962 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAN@Z */
7963 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_double
, 8)
7964 basic_istream_wchar
* __thiscall
basic_istream_short_read_double(basic_istream_wchar
*this, double *v
)
7966 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7967 const num_get
*numget
= num_get_short_use_facet(IOS_LOCALE(base
->strbuf
));
7968 int state
= IOSTATE_goodbit
;
7970 TRACE("(%p %p)\n", this, v
);
7972 if(basic_istream_short_sentry_create(this, FALSE
)) {
7973 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7974 istreambuf_iterator_wchar first
={0}, last
={0};
7976 first
.strbuf
= strbuf
;
7977 num_get_wchar_get_double(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7979 basic_istream_short_sentry_destroy(this);
7981 basic_ios_short_setstate(base
, state
);
7985 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAO@Z */
7986 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAO@Z */
7987 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ldouble
, 8)
7988 basic_istream_wchar
* __thiscall
basic_istream_short_read_ldouble(basic_istream_wchar
*this, double *v
)
7990 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
7991 const num_get
*numget
= num_get_short_use_facet(IOS_LOCALE(base
->strbuf
));
7992 int state
= IOSTATE_goodbit
;
7994 TRACE("(%p %p)\n", this, v
);
7996 if(basic_istream_short_sentry_create(this, FALSE
)) {
7997 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
7998 istreambuf_iterator_wchar first
={0}, last
={0};
8000 first
.strbuf
= strbuf
;
8001 num_get_wchar_get_ldouble(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
8003 basic_istream_short_sentry_destroy(this);
8005 basic_ios_short_setstate(base
, state
);
8009 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAPAX@Z */
8010 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
8011 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ptr
, 8)
8012 basic_istream_wchar
* __thiscall
basic_istream_short_read_ptr(basic_istream_wchar
*this, void **v
)
8014 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
8015 const num_get
*numget
= num_get_short_use_facet(IOS_LOCALE(base
->strbuf
));
8016 int state
= IOSTATE_goodbit
;
8018 TRACE("(%p %p)\n", this, v
);
8020 if(basic_istream_short_sentry_create(this, FALSE
)) {
8021 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
8022 istreambuf_iterator_wchar first
={0}, last
={0};
8024 first
.strbuf
= strbuf
;
8025 num_get_wchar_get_void(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
8027 basic_istream_short_sentry_destroy(this);
8029 basic_ios_short_setstate(base
, state
);
8033 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_J@Z */
8034 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_J@Z */
8035 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int64
, 8)
8036 basic_istream_wchar
* __thiscall
basic_istream_short_read_int64(basic_istream_wchar
*this, __int64
*v
)
8038 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
8039 const num_get
*numget
= num_get_short_use_facet(IOS_LOCALE(base
->strbuf
));
8040 int state
= IOSTATE_goodbit
;
8042 TRACE("(%p %p)\n", this, v
);
8044 if(basic_istream_short_sentry_create(this, FALSE
)) {
8045 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
8046 istreambuf_iterator_wchar first
={0}, last
={0};
8048 first
.strbuf
= strbuf
;
8049 num_get_wchar_get_int64(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
8051 basic_istream_short_sentry_destroy(this);
8053 basic_ios_short_setstate(base
, state
);
8057 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_K@Z */
8058 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_K@Z */
8059 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint64
, 8)
8060 basic_istream_wchar
* __thiscall
basic_istream_short_read_uint64(basic_istream_wchar
*this, unsigned __int64
*v
)
8062 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
8063 const num_get
*numget
= num_get_short_use_facet(IOS_LOCALE(base
->strbuf
));
8064 int state
= IOSTATE_goodbit
;
8066 TRACE("(%p %p)\n", this, v
);
8068 if(basic_istream_short_sentry_create(this, FALSE
)) {
8069 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
8070 istreambuf_iterator_wchar first
={0}, last
={0};
8072 first
.strbuf
= strbuf
;
8073 num_get_wchar_get_uint64(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
8075 basic_istream_short_sentry_destroy(this);
8077 basic_ios_short_setstate(base
, state
);
8081 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_N@Z */
8082 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_N@Z */
8083 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_bool
, 8)
8084 basic_istream_wchar
* __thiscall
basic_istream_short_read_bool(basic_istream_wchar
*this, bool *v
)
8086 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
8087 const num_get
*numget
= num_get_short_use_facet(IOS_LOCALE(base
->strbuf
));
8088 int state
= IOSTATE_goodbit
;
8090 TRACE("(%p %p)\n", this, v
);
8092 if(basic_istream_short_sentry_create(this, FALSE
)) {
8093 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
8094 istreambuf_iterator_wchar first
={0}, last
={0};
8096 first
.strbuf
= strbuf
;
8097 num_get_wchar_get_bool(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
8099 basic_istream_short_sentry_destroy(this);
8101 basic_ios_short_setstate(base
, state
);
8105 /* ??$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 */
8106 /* ??$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 */
8107 basic_istream_wchar
* __cdecl
basic_istream_short_getline_bstr_delim(
8108 basic_istream_wchar
*istream
, basic_string_wchar
*str
, wchar_t delim
)
8110 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(istream
);
8111 IOSB_iostate state
= IOSTATE_goodbit
;
8114 TRACE("(%p %p %s)\n", istream
, str
, debugstr_wn(&delim
, 1));
8116 MSVCP_basic_string_wchar_clear(str
);
8117 if(basic_istream_short_sentry_create(istream
, TRUE
)) {
8118 basic_streambuf_wchar
*strbuf
= basic_ios_short_rdbuf_get(base
);
8120 c
= basic_streambuf_wchar_sgetc(strbuf
);
8121 for(; c
!=delim
&& c
!=WEOF
; c
= basic_streambuf_wchar_snextc(strbuf
))
8122 MSVCP_basic_string_wchar_append_ch(str
, c
);
8123 if(c
==delim
) basic_streambuf_wchar_sbumpc(strbuf
);
8124 else if(c
==WEOF
) state
|= IOSTATE_eofbit
;
8126 if(!MSVCP_basic_string_wchar_length(str
) && c
!=delim
) state
|= IOSTATE_failbit
;
8128 basic_istream_short_sentry_destroy(istream
);
8130 basic_ios_short_setstate(basic_istream_short_get_basic_ios(istream
), state
);
8134 /* ??$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 */
8135 /* ??$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 */
8136 basic_istream_wchar
* __cdecl
basic_istream_short_getline_bstr(
8137 basic_istream_wchar
*istream
, basic_string_wchar
*str
)
8139 return basic_istream_short_getline_bstr_delim(istream
, str
, '\n');
8142 /* ??$?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 */
8143 /* ??$?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 */
8144 basic_istream_wchar
* __cdecl
basic_istream_short_read_bstr(
8145 basic_istream_wchar
*istream
, basic_string_wchar
*str
)
8147 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(istream
);
8148 const ctype_wchar
*ctype
= ctype_short_use_facet(IOS_LOCALE(base
->strbuf
));
8149 IOSB_iostate state
= IOSTATE_failbit
;
8152 TRACE("(%p %p)\n", istream
, str
);
8154 if(basic_istream_short_sentry_create(istream
, FALSE
)) {
8155 size_t count
= ios_base_width_get(&base
->base
);
8160 MSVCP_basic_string_wchar_clear(str
);
8162 for(c
= basic_streambuf_wchar_sgetc(basic_ios_short_rdbuf_get(base
));
8163 c
!=WEOF
&& !ctype_wchar_is_ch(ctype
, _SPACE
|_BLANK
, c
) && count
>0;
8164 c
= basic_streambuf_wchar_snextc(basic_ios_short_rdbuf_get(base
)), count
--) {
8165 state
= IOSTATE_goodbit
;
8166 MSVCP_basic_string_wchar_append_ch(str
, c
);
8169 basic_istream_short_sentry_destroy(istream
);
8171 ios_base_width_set(&base
->base
, 0);
8172 basic_ios_short_setstate(base
, state
| (c
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
8176 /* ??$?5GU?$char_traits@G@std@@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@PAG@Z */
8177 /* ??$?5GU?$char_traits@G@std@@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@PEAG@Z */
8178 basic_istream_wchar
* __cdecl
basic_istream_short_read_str(basic_istream_wchar
*istream
, wchar_t *str
)
8180 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(istream
);
8181 const ctype_wchar
*ctype
= ctype_short_use_facet(IOS_LOCALE(base
->strbuf
));
8182 IOSB_iostate state
= IOSTATE_failbit
;
8183 unsigned short c
= '\n';
8185 TRACE("(%p %p)\n", istream
, str
);
8187 if(basic_istream_short_sentry_create(istream
, FALSE
)) {
8188 size_t count
= ios_base_width_get(&base
->base
)-1;
8190 for(c
= basic_streambuf_wchar_sgetc(basic_ios_short_rdbuf_get(base
));
8191 c
!=WEOF
&& !ctype_wchar_is_ch(ctype
, _SPACE
|_BLANK
, c
) && count
>0;
8192 c
= basic_streambuf_wchar_snextc(basic_ios_short_rdbuf_get(base
)), count
--) {
8193 state
= IOSTATE_goodbit
;
8197 basic_istream_short_sentry_destroy(istream
);
8200 ios_base_width_set(&base
->base
, 0);
8201 basic_ios_short_setstate(base
, state
| (c
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
8205 /* ??$?5GU?$char_traits@G@std@@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@AAG@Z */
8206 /* ??$?5GU?$char_traits@G@std@@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@AEAG@Z */
8207 basic_istream_wchar
* __cdecl
basic_istream_short_read_ch(basic_istream_wchar
*istream
, wchar_t *ch
)
8209 IOSB_iostate state
= IOSTATE_failbit
;
8210 unsigned short c
= 0;
8212 TRACE("(%p %p)\n", istream
, ch
);
8214 if(basic_istream_short_sentry_create(istream
, FALSE
)) {
8215 c
= basic_streambuf_wchar_sbumpc(basic_ios_short_rdbuf_get(
8216 basic_istream_short_get_basic_ios(istream
)));
8218 state
= IOSTATE_goodbit
;
8222 basic_istream_short_sentry_destroy(istream
);
8224 basic_ios_short_setstate(basic_istream_short_get_basic_ios(istream
),
8225 state
| (c
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
8229 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
8230 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
8231 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_streambuf
, 8)
8232 basic_istream_wchar
* __thiscall
basic_istream_short_read_streambuf(
8233 basic_istream_wchar
*this, basic_streambuf_wchar
*streambuf
)
8235 basic_ios_wchar
*base
= basic_istream_short_get_basic_ios(this);
8236 IOSB_iostate state
= IOSTATE_failbit
;
8237 unsigned short c
= '\n';
8239 TRACE("(%p %p)\n", this, streambuf
);
8241 if(basic_istream_short_sentry_create(this, FALSE
)) {
8242 for(c
= basic_streambuf_wchar_sgetc(basic_ios_short_rdbuf_get(base
)); c
!=WEOF
;
8243 c
= basic_streambuf_wchar_snextc(basic_ios_short_rdbuf_get(base
))) {
8244 state
= IOSTATE_goodbit
;
8245 if(basic_streambuf_wchar_sputc(streambuf
, c
) == WEOF
)
8249 basic_istream_short_sentry_destroy(this);
8251 basic_ios_short_setstate(base
, state
| (c
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
8255 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
8256 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
8257 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_func
, 8)
8258 basic_istream_wchar
* __thiscall
basic_istream_short_read_func(basic_istream_wchar
*this,
8259 basic_istream_wchar
* (__cdecl
*pfunc
)(basic_istream_wchar
*))
8261 TRACE("(%p %p)\n", this, pfunc
);
8266 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@GU?$char_traits@G@std@@@1@AAV21@@Z@Z */
8267 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@GU?$char_traits@G@std@@@1@AEAV21@@Z@Z */
8268 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_func_basic_ios
, 8)
8269 basic_istream_wchar
* __thiscall
basic_istream_short_read_func_basic_ios(basic_istream_wchar
*this,
8270 basic_ios_wchar
* (__cdecl
*pfunc
)(basic_ios_wchar
*))
8272 TRACE("(%p %p)\n", this, pfunc
);
8273 pfunc(basic_istream_short_get_basic_ios(this));
8277 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
8278 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
8279 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_func_ios_base
, 8)
8280 basic_istream_wchar
* __thiscall
basic_istream_short_read_func_ios_base(
8281 basic_istream_wchar
*this, ios_base
* (__cdecl
*pfunc
)(ios_base
*))
8283 TRACE("(%p %p)\n", this, pfunc
);
8284 pfunc(&basic_istream_short_get_basic_ios(this)->base
);
8288 static inline basic_ios_char
* basic_iostream_char_to_basic_ios(basic_iostream_char
*ptr
)
8290 return (basic_ios_char
*)((char*)ptr
+basic_iostream_char_vbtable1
[1]);
8293 static inline basic_iostream_char
* basic_iostream_char_from_basic_ios(basic_ios_char
*ptr
)
8295 return (basic_iostream_char
*)((char*)ptr
-basic_iostream_char_vbtable1
[1]);
8298 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
8299 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
8300 DEFINE_THISCALL_WRAPPER(basic_iostream_char_ctor
, 12)
8301 basic_iostream_char
* __thiscall
basic_iostream_char_ctor(basic_iostream_char
*this, basic_streambuf_char
*strbuf
, bool virt_init
)
8303 basic_ios_char
*basic_ios
;
8305 TRACE("(%p %p %d)\n", this, strbuf
, virt_init
);
8308 this->base1
.vbtable
= basic_iostream_char_vbtable1
;
8309 this->base2
.vbtable
= basic_iostream_char_vbtable2
;
8310 basic_ios
= basic_istream_char_get_basic_ios(&this->base1
);
8311 basic_ios_char_ctor(basic_ios
);
8313 basic_ios
= basic_istream_char_get_basic_ios(&this->base1
);
8316 basic_ios
->base
.vtable
= &basic_iostream_char_vtable
;
8318 basic_istream_char_ctor(&this->base1
, strbuf
, FALSE
, FALSE
);
8319 basic_ostream_char_ctor(&this->base2
, NULL
, FALSE
, FALSE
, FALSE
);
8323 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
8324 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
8325 DEFINE_THISCALL_WRAPPER(basic_iostream_char_dtor
, 4)
8326 void __thiscall
basic_iostream_char_dtor(basic_ios_char
*base
)
8328 basic_iostream_char
*this = basic_iostream_char_from_basic_ios(base
);
8330 TRACE("(%p)\n", this);
8331 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base2
));
8332 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base1
));
8335 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
8336 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
8337 DEFINE_THISCALL_WRAPPER(basic_iostream_char_vbase_dtor
, 4)
8338 void __thiscall
basic_iostream_char_vbase_dtor(basic_iostream_char
*this)
8340 TRACE("(%p)\n", this);
8341 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(this));
8342 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base1
));
8345 DEFINE_THISCALL_WRAPPER(basic_iostream_char_vector_dtor
, 8)
8346 basic_iostream_char
* __thiscall
basic_iostream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
8348 basic_iostream_char
*this = basic_iostream_char_from_basic_ios(base
);
8350 TRACE("(%p %x)\n", this, flags
);
8353 /* we have an array, with the number of elements stored before the first object */
8354 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
8356 for(i
=*ptr
-1; i
>=0; i
--)
8357 basic_iostream_char_vbase_dtor(this+i
);
8358 operator_delete(ptr
);
8360 basic_iostream_char_vbase_dtor(this);
8362 operator_delete(this);
8368 static inline basic_ios_wchar
* basic_iostream_short_to_basic_ios(basic_iostream_wchar
*ptr
)
8370 return (basic_ios_wchar
*)((char*)ptr
+basic_iostream_short_vbtable1
[1]);
8373 static inline basic_iostream_wchar
* basic_iostream_short_from_basic_ios(basic_ios_wchar
*ptr
)
8375 return (basic_iostream_wchar
*)((char*)ptr
-basic_iostream_short_vbtable1
[1]);
8378 /* ??0?$basic_iostream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
8379 /* ??0?$basic_iostream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
8380 DEFINE_THISCALL_WRAPPER(basic_iostream_short_ctor
, 12)
8381 basic_iostream_wchar
* __thiscall
basic_iostream_short_ctor(basic_iostream_wchar
*this,
8382 basic_streambuf_wchar
*strbuf
, bool virt_init
)
8384 basic_ios_wchar
*basic_ios
;
8386 TRACE("(%p %p %d)\n", this, strbuf
, virt_init
);
8389 this->base1
.vbtable
= basic_iostream_short_vbtable1
;
8390 this->base2
.vbtable
= basic_iostream_short_vbtable2
;
8391 basic_ios
= basic_istream_short_get_basic_ios(&this->base1
);
8392 basic_ios_short_ctor(basic_ios
);
8394 basic_ios
= basic_istream_short_get_basic_ios(&this->base1
);
8397 basic_istream_short_ctor(&this->base1
, strbuf
, FALSE
, FALSE
);
8398 basic_ostream_short_ctor(&this->base2
, NULL
, FALSE
, FALSE
, FALSE
);
8400 basic_ios
->base
.vtable
= &basic_iostream_short_vtable
;
8404 /* ??1?$basic_iostream@GU?$char_traits@G@std@@@std@@UAE@XZ */
8405 /* ??1?$basic_iostream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
8406 DEFINE_THISCALL_WRAPPER(basic_iostream_short_dtor
, 4)
8407 void __thiscall
basic_iostream_short_dtor(basic_ios_wchar
*base
)
8409 basic_iostream_wchar
*this = basic_iostream_short_from_basic_ios(base
);
8411 TRACE("(%p)\n", this);
8412 basic_ostream_short_dtor(basic_ostream_short_to_basic_ios(&this->base2
));
8413 basic_istream_short_dtor(basic_istream_short_to_basic_ios(&this->base1
));
8416 /* ??_D?$basic_iostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
8417 /* ??_D?$basic_iostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
8418 DEFINE_THISCALL_WRAPPER(basic_iostream_short_vbase_dtor
, 4)
8419 void __thiscall
basic_iostream_short_vbase_dtor(basic_iostream_wchar
*this)
8421 TRACE("(%p)\n", this);
8422 basic_iostream_short_dtor(basic_iostream_short_to_basic_ios(this));
8423 basic_ios_short_dtor(basic_istream_short_get_basic_ios(&this->base1
));
8426 DEFINE_THISCALL_WRAPPER(basic_iostream_short_vector_dtor
, 8)
8427 basic_iostream_wchar
* __thiscall
basic_iostream_short_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
8429 basic_iostream_wchar
*this = basic_iostream_short_from_basic_ios(base
);
8431 TRACE("(%p %x)\n", this, flags
);
8434 /* we have an array, with the number of elements stored before the first object */
8435 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
8437 for(i
=*ptr
-1; i
>=0; i
--)
8438 basic_iostream_short_vbase_dtor(this+i
);
8439 operator_delete(ptr
);
8441 basic_iostream_short_vbase_dtor(this);
8443 operator_delete(this);
8449 static inline basic_ios_char
* basic_ofstream_char_to_basic_ios(basic_ofstream_char
*ptr
)
8451 return (basic_ios_char
*)((char*)ptr
+basic_ofstream_char_vbtable
[1]);
8454 static inline basic_ofstream_char
* basic_ofstream_char_from_basic_ios(basic_ios_char
*ptr
)
8456 return (basic_ofstream_char
*)((char*)ptr
-basic_ofstream_char_vbtable
[1]);
8459 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
8460 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
8461 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor
, 8)
8462 basic_ofstream_char
* __thiscall
basic_ofstream_char_ctor(basic_ofstream_char
*this, bool virt_init
)
8464 basic_ios_char
*basic_ios
;
8466 TRACE("(%p %d)\n", this, virt_init
);
8469 this->base
.vbtable
= basic_ofstream_char_vbtable
;
8470 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8471 basic_ios_char_ctor(basic_ios
);
8473 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8476 basic_filebuf_char_ctor(&this->filebuf
);
8477 basic_ostream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
, TRUE
, FALSE
);
8478 basic_ios
->base
.vtable
= &basic_ofstream_char_vtable
;
8482 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@ABV01@@Z */
8483 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@AEBV01@@Z */
8484 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_copy_ctor
, 12)
8485 basic_ofstream_char
* __thiscall
basic_ofstream_char_copy_ctor(basic_ofstream_char
*this,
8486 basic_ofstream_char
*copy
, bool virt_init
)
8488 basic_ios_char
*basic_ios
;
8490 TRACE("(%p %p %d)\n", this, copy
, virt_init
);
8493 this->base
.vbtable
= basic_ofstream_char_vbtable
;
8494 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8495 basic_ios_char_ctor(basic_ios
);
8497 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8500 basic_filebuf_char_ctor_file(&this->filebuf
, copy
->filebuf
.file
);
8501 basic_ostream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
, TRUE
, FALSE
);
8502 basic_ios
->base
.vtable
= &basic_ofstream_char_vtable
;
8506 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PBDH@Z */
8507 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDH@Z */
8508 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_name
, 16)
8509 basic_ofstream_char
* __thiscall
basic_ofstream_char_ctor_name(basic_ofstream_char
*this,
8510 const char *name
, int mode
, bool virt_init
)
8512 TRACE("(%p %s %d %d)\n", this, name
, mode
, virt_init
);
8514 basic_ofstream_char_ctor(this, virt_init
);
8516 if(!basic_filebuf_char_open_mode(&this->filebuf
, name
, mode
|OPENMODE_out
)) {
8517 basic_ios_char
*basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8518 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8523 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
8524 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
8525 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_dtor
, 4)
8526 void __thiscall
basic_ofstream_char_dtor(basic_ios_char
*base
)
8528 basic_ofstream_char
*this = basic_ofstream_char_from_basic_ios(base
);
8530 TRACE("(%p)\n", this);
8532 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base
));
8533 basic_filebuf_char_dtor(&this->filebuf
);
8536 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
8537 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
8538 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_vbase_dtor
, 4)
8539 void __thiscall
basic_ofstream_char_vbase_dtor(basic_ofstream_char
*this)
8541 TRACE("(%p)\n", this);
8543 basic_ofstream_char_dtor(basic_ofstream_char_to_basic_ios(this));
8544 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base
));
8547 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_vector_dtor
, 8)
8548 basic_ofstream_char
* __thiscall
basic_ofstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
8550 basic_ofstream_char
*this = basic_ofstream_char_from_basic_ios(base
);
8552 TRACE("(%p %x)\n", this, flags
);
8555 /* we have an array, with the number of elements stored before the first object */
8556 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
8558 for(i
=*ptr
-1; i
>=0; i
--)
8559 basic_ofstream_char_vbase_dtor(this+i
);
8560 operator_delete(ptr
);
8562 basic_ofstream_char_vbase_dtor(this);
8564 operator_delete(this);
8570 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
8571 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
8572 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_close
, 4)
8573 void __thiscall
basic_ofstream_char_close(basic_ofstream_char
*this)
8575 TRACE("(%p)\n", this);
8577 if(!basic_filebuf_char_close(&this->filebuf
)) {
8578 basic_ios_char
*basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8579 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8583 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
8584 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
8585 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_is_open
, 4)
8586 bool __thiscall
basic_ofstream_char_is_open(const basic_ofstream_char
*this)
8588 TRACE("(%p)\n", this);
8589 return basic_filebuf_char_is_open(&this->filebuf
);
8592 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDH@Z */
8593 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDH@Z */
8594 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open
, 12)
8595 void __thiscall
basic_ofstream_char_open(basic_ofstream_char
*this,
8596 const char *name
, int mode
)
8598 TRACE("(%p %s %d)\n", this, name
, mode
);
8600 if(!basic_filebuf_char_open_mode(&this->filebuf
, name
, mode
|OPENMODE_out
)) {
8601 basic_ios_char
*basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8602 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8606 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDF@Z */
8607 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDF@Z */
8608 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_old
, 12)
8609 void __thiscall
basic_ofstream_char_open_old(basic_ofstream_char
*this,
8610 const char *name
, short mode
)
8612 basic_ofstream_char_open(this, name
, mode
);
8615 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
8616 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
8617 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_rdbuf
, 4)
8618 basic_filebuf_char
* __thiscall
basic_ofstream_char_rdbuf(const basic_ofstream_char
*this)
8620 TRACE("(%p)\n", this);
8621 return (basic_filebuf_char
*)&this->filebuf
;
8624 static inline basic_ios_wchar
* basic_ofstream_short_to_basic_ios(basic_ofstream_wchar
*ptr
)
8626 return (basic_ios_wchar
*)((char*)ptr
+basic_ofstream_short_vbtable
[1]);
8629 static inline basic_ofstream_wchar
* basic_ofstream_short_from_basic_ios(basic_ios_wchar
*ptr
)
8631 return (basic_ofstream_wchar
*)((char*)ptr
-basic_ofstream_short_vbtable
[1]);
8634 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
8635 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
8636 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_ctor
, 8)
8637 basic_ofstream_wchar
* __thiscall
basic_ofstream_short_ctor(basic_ofstream_wchar
*this, bool virt_init
)
8639 basic_ios_wchar
*basic_ios
;
8641 TRACE("(%p %d)\n", this, virt_init
);
8644 this->base
.vbtable
= basic_ofstream_short_vbtable
;
8645 basic_ios
= basic_ostream_short_get_basic_ios(&this->base
);
8646 basic_ios_short_ctor(basic_ios
);
8648 basic_ios
= basic_ostream_short_get_basic_ios(&this->base
);
8651 basic_filebuf_short_ctor(&this->filebuf
);
8652 basic_ostream_short_ctor(&this->base
, &this->filebuf
.base
, FALSE
, TRUE
, FALSE
);
8653 basic_ios
->base
.vtable
= &basic_ofstream_short_vtable
;
8657 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@ABV01@@Z */
8658 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@AEBV01@@Z */
8659 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_copy_ctor
, 12)
8660 basic_ofstream_wchar
* __thiscall
basic_ofstream_short_copy_ctor(basic_ofstream_wchar
*this,
8661 basic_ofstream_wchar
*copy
, bool virt_init
)
8663 basic_ios_wchar
*basic_ios
;
8665 TRACE("(%p %p %d)\n", this, copy
, virt_init
);
8668 this->base
.vbtable
= basic_ofstream_short_vbtable
;
8669 basic_ios
= basic_ostream_short_get_basic_ios(&this->base
);
8670 basic_ios_short_ctor(basic_ios
);
8672 basic_ios
= basic_ostream_short_get_basic_ios(&this->base
);
8675 basic_filebuf_short_ctor_file(&this->filebuf
, copy
->filebuf
.file
);
8676 basic_ostream_short_ctor(&this->base
, &this->filebuf
.base
, FALSE
, TRUE
, FALSE
);
8677 basic_ios
->base
.vtable
= &basic_ofstream_short_vtable
;
8681 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@PBDH@Z */
8682 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@PEBDH@Z */
8683 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_ctor_name
, 16)
8684 basic_ofstream_wchar
* __thiscall
basic_ofstream_short_ctor_name(basic_ofstream_wchar
*this,
8685 const char *name
, int mode
, bool virt_init
)
8687 TRACE("(%p %s %d %d)\n", this, name
, mode
, virt_init
);
8689 basic_ofstream_short_ctor(this, virt_init
);
8691 if(!basic_filebuf_short_open_mode(&this->filebuf
, name
, mode
|OPENMODE_out
)) {
8692 basic_ios_wchar
*basic_ios
= basic_ostream_short_get_basic_ios(&this->base
);
8693 basic_ios_short_setstate(basic_ios
, IOSTATE_failbit
);
8698 /* ??1?$basic_ofstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
8699 /* ??1?$basic_ofstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
8700 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_dtor
, 4)
8701 void __thiscall
basic_ofstream_short_dtor(basic_ios_wchar
*base
)
8703 basic_ofstream_wchar
*this = basic_ofstream_short_from_basic_ios(base
);
8705 TRACE("(%p)\n", this);
8707 basic_ostream_short_dtor(basic_ostream_short_to_basic_ios(&this->base
));
8708 basic_filebuf_short_dtor(&this->filebuf
);
8711 /* ??_D?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
8712 /* ??_D?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
8713 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_vbase_dtor
, 4)
8714 void __thiscall
basic_ofstream_short_vbase_dtor(basic_ofstream_wchar
*this)
8716 TRACE("(%p)\n", this);
8718 basic_ofstream_short_dtor(basic_ofstream_short_to_basic_ios(this));
8719 basic_ios_short_dtor(basic_ostream_short_get_basic_ios(&this->base
));
8722 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_vector_dtor
, 8)
8723 basic_ofstream_wchar
* __thiscall
basic_ofstream_short_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
8725 basic_ofstream_wchar
*this = basic_ofstream_short_from_basic_ios(base
);
8727 TRACE("(%p %x)\n", this, flags
);
8730 /* we have an array, with the number of elements stored before the first object */
8731 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
8733 for(i
=*ptr
-1; i
>=0; i
--)
8734 basic_ofstream_short_vbase_dtor(this+i
);
8735 operator_delete(ptr
);
8737 basic_ofstream_short_vbase_dtor(this);
8739 operator_delete(this);
8745 /* ?close@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
8746 /* ?close@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
8747 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_close
, 4)
8748 void __thiscall
basic_ofstream_short_close(basic_ofstream_wchar
*this)
8750 TRACE("(%p)\n", this);
8752 if(!basic_filebuf_short_close(&this->filebuf
)) {
8753 basic_ios_wchar
*basic_ios
= basic_ostream_short_get_basic_ios(&this->base
);
8754 basic_ios_short_setstate(basic_ios
, IOSTATE_failbit
);
8758 /* ?is_open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
8759 /* ?is_open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
8760 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_is_open
, 4)
8761 bool __thiscall
basic_ofstream_short_is_open(const basic_ofstream_wchar
*this)
8763 TRACE("(%p)\n", this);
8764 return basic_filebuf_short_is_open(&this->filebuf
);
8767 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPBDH@Z */
8768 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDH@Z */
8769 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_open
, 12)
8770 void __thiscall
basic_ofstream_short_open(basic_ofstream_wchar
*this,
8771 const char *name
, int mode
)
8773 TRACE("(%p %s %d)\n", this, name
, mode
);
8775 if(!basic_filebuf_short_open_mode(&this->filebuf
, name
, mode
|OPENMODE_out
)) {
8776 basic_ios_wchar
*basic_ios
= basic_ostream_short_get_basic_ios(&this->base
);
8777 basic_ios_short_setstate(basic_ios
, IOSTATE_failbit
);
8781 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPBDF@Z */
8782 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDF@Z */
8783 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_open_old
, 12)
8784 void __thiscall
basic_ofstream_short_open_old(basic_ofstream_wchar
*this,
8785 const char *name
, int mode
)
8787 basic_ofstream_short_open(this, name
, mode
);
8790 /* ?rdbuf@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
8791 /* ?rdbuf@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
8792 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_rdbuf
, 4)
8793 basic_filebuf_wchar
* __thiscall
basic_ofstream_short_rdbuf(const basic_ofstream_wchar
*this)
8795 TRACE("(%p)\n", this);
8796 return (basic_filebuf_wchar
*)&this->filebuf
;
8799 static inline basic_ios_char
* basic_ifstream_char_to_basic_ios(basic_ifstream_char
*ptr
)
8801 return (basic_ios_char
*)((char*)ptr
+basic_ifstream_char_vbtable
[1]);
8804 static inline basic_ifstream_char
* basic_ifstream_char_from_basic_ios(basic_ios_char
*ptr
)
8806 return (basic_ifstream_char
*)((char*)ptr
-basic_ifstream_char_vbtable
[1]);
8809 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
8810 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
8811 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor
, 8)
8812 basic_ifstream_char
* __thiscall
basic_ifstream_char_ctor(basic_ifstream_char
*this, bool virt_init
)
8814 basic_ios_char
*basic_ios
;
8816 TRACE("(%p %d)\n", this, virt_init
);
8819 this->base
.vbtable
= basic_ifstream_char_vbtable
;
8820 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8821 basic_ios_char_ctor(basic_ios
);
8823 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8826 basic_filebuf_char_ctor(&this->filebuf
);
8827 basic_istream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
, FALSE
);
8828 basic_ios
->base
.vtable
= &basic_ifstream_char_vtable
;
8832 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@ABV01@@Z */
8833 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@AEBV01@@Z */
8834 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_copy_ctor
, 12)
8835 basic_ifstream_char
* __thiscall
basic_ifstream_char_copy_ctor(basic_ifstream_char
*this,
8836 const basic_ifstream_char
*copy
, bool virt_init
)
8838 basic_ios_char
*basic_ios
;
8840 TRACE("(%p %p %d)\n", this, copy
, virt_init
);
8843 this->base
.vbtable
= basic_ifstream_char_vbtable
;
8844 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8845 basic_ios_char_ctor(basic_ios
);
8847 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8850 basic_filebuf_char_ctor_file(&this->filebuf
, copy
->filebuf
.file
);
8851 basic_istream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
, FALSE
);
8852 basic_ios
->base
.vtable
= &basic_ifstream_char_vtable
;
8856 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PBDH@Z */
8857 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDH@Z */
8858 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_name
, 16)
8859 basic_ifstream_char
* __thiscall
basic_ifstream_char_ctor_name(basic_ifstream_char
*this,
8860 const char *name
, int mode
, bool virt_init
)
8862 TRACE("(%p %s %d %d)\n", this, name
, mode
, virt_init
);
8864 basic_ifstream_char_ctor(this, virt_init
);
8866 if(!basic_filebuf_char_open_mode(&this->filebuf
, name
, mode
|OPENMODE_in
)) {
8867 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8868 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8873 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
8874 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
8875 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_dtor
, 4)
8876 void __thiscall
basic_ifstream_char_dtor(basic_ios_char
*base
)
8878 basic_ifstream_char
*this = basic_ifstream_char_from_basic_ios(base
);
8880 TRACE("(%p)\n", this);
8882 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base
));
8883 basic_filebuf_char_dtor(&this->filebuf
);
8886 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
8887 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
8888 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_vbase_dtor
, 4)
8889 void __thiscall
basic_ifstream_char_vbase_dtor(basic_ifstream_char
*this)
8891 TRACE("(%p)\n", this);
8893 basic_ifstream_char_dtor(basic_ifstream_char_to_basic_ios(this));
8894 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base
));
8897 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_vector_dtor
, 8)
8898 basic_ifstream_char
* __thiscall
basic_ifstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
8900 basic_ifstream_char
*this = basic_ifstream_char_from_basic_ios(base
);
8902 TRACE("(%p %x)\n", this, flags
);
8905 /* we have an array, with the number of elements stored before the first object */
8906 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
8908 for(i
=*ptr
-1; i
>=0; i
--)
8909 basic_ifstream_char_vbase_dtor(this+i
);
8910 operator_delete(ptr
);
8912 basic_ifstream_char_vbase_dtor(this);
8914 operator_delete(this);
8920 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
8921 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
8922 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_close
, 4)
8923 void __thiscall
basic_ifstream_char_close(basic_ifstream_char
*this)
8925 TRACE("(%p)\n", this);
8927 if(!basic_filebuf_char_close(&this->filebuf
)) {
8928 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8929 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8933 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
8934 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
8935 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_is_open
, 4)
8936 bool __thiscall
basic_ifstream_char_is_open(const basic_ifstream_char
*this)
8938 TRACE("(%p)\n", this);
8939 return basic_filebuf_char_is_open(&this->filebuf
);
8942 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDH@Z */
8943 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDH@Z */
8944 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open
, 12)
8945 void __thiscall
basic_ifstream_char_open(basic_ifstream_char
*this,
8946 const char *name
, int mode
)
8948 TRACE("(%p %s %d)\n", this, name
, mode
);
8950 if(!basic_filebuf_char_open_mode(&this->filebuf
, name
, mode
|OPENMODE_in
)) {
8951 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8952 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8956 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDF@Z */
8957 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDF@Z */
8958 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_old
, 12)
8959 void __thiscall
basic_ifstream_char_open_old(basic_ifstream_char
*this,
8960 const char *name
, short mode
)
8962 basic_ifstream_char_open(this, name
, mode
);
8965 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
8966 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
8967 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_rdbuf
, 4)
8968 basic_filebuf_char
* __thiscall
basic_ifstream_char_rdbuf(const basic_ifstream_char
*this)
8970 TRACE("(%p)\n", this);
8971 return (basic_filebuf_char
*)&this->filebuf
;
8974 static inline basic_ios_wchar
* basic_ifstream_short_to_basic_ios(basic_ifstream_wchar
*ptr
)
8976 return (basic_ios_wchar
*)((char*)ptr
+basic_ifstream_short_vbtable
[1]);
8979 static inline basic_ifstream_wchar
* basic_ifstream_short_from_basic_ios(basic_ios_wchar
*ptr
)
8981 return (basic_ifstream_wchar
*)((char*)ptr
-basic_ifstream_short_vbtable
[1]);
8984 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
8985 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
8986 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_ctor
, 8)
8987 basic_ifstream_wchar
* __thiscall
basic_ifstream_short_ctor(basic_ifstream_wchar
*this, bool virt_init
)
8989 basic_ios_wchar
*basic_ios
;
8991 TRACE("(%p %d)\n", this, virt_init
);
8994 this->base
.vbtable
= basic_ifstream_short_vbtable
;
8995 basic_ios
= basic_istream_short_get_basic_ios(&this->base
);
8996 basic_ios_short_ctor(basic_ios
);
8998 basic_ios
= basic_istream_short_get_basic_ios(&this->base
);
9001 basic_filebuf_short_ctor(&this->filebuf
);
9002 basic_istream_short_ctor(&this->base
, &this->filebuf
.base
, FALSE
, FALSE
);
9003 basic_ios
->base
.vtable
= &basic_ifstream_short_vtable
;
9007 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@ABV01@@Z */
9008 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@AEBV01@@Z */
9009 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_copy_ctor
, 12)
9010 basic_ifstream_wchar
* __thiscall
basic_ifstream_short_copy_ctor(basic_ifstream_wchar
*this,
9011 basic_ifstream_wchar
*copy
, bool virt_init
)
9013 basic_ios_wchar
*basic_ios
;
9015 TRACE("(%p %p %d)\n", this, copy
, virt_init
);
9018 this->base
.vbtable
= basic_ifstream_short_vbtable
;
9019 basic_ios
= basic_istream_short_get_basic_ios(&this->base
);
9020 basic_ios_short_ctor(basic_ios
);
9022 basic_ios
= basic_istream_short_get_basic_ios(&this->base
);
9025 basic_filebuf_short_ctor_file(&this->filebuf
, copy
->filebuf
.file
);
9026 basic_istream_short_ctor(&this->base
, &this->filebuf
.base
, FALSE
, FALSE
);
9027 basic_ios
->base
.vtable
= &basic_ifstream_short_vtable
;
9031 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@PBDH@Z */
9032 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@PEBDH@Z */
9033 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_ctor_name
, 16)
9034 basic_ifstream_wchar
* __thiscall
basic_ifstream_short_ctor_name(basic_ifstream_wchar
*this,
9035 const char *name
, int mode
, bool virt_init
)
9037 TRACE("(%p %s %d %d)\n", this, name
, mode
, virt_init
);
9039 basic_ifstream_short_ctor(this, virt_init
);
9041 if(!basic_filebuf_short_open_mode(&this->filebuf
, name
, mode
|OPENMODE_in
)) {
9042 basic_ios_wchar
*basic_ios
= basic_istream_short_get_basic_ios(&this->base
);
9043 basic_ios_short_setstate(basic_ios
, IOSTATE_failbit
);
9048 /* ??1?$basic_ifstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
9049 /* ??1?$basic_ifstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
9050 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_dtor
, 4)
9051 void __thiscall
basic_ifstream_short_dtor(basic_ios_wchar
*base
)
9053 basic_ifstream_wchar
*this = basic_ifstream_short_from_basic_ios(base
);
9055 TRACE("(%p)\n", this);
9057 basic_istream_short_dtor(basic_istream_short_to_basic_ios(&this->base
));
9058 basic_filebuf_short_dtor(&this->filebuf
);
9061 /* ??_D?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9062 /* ??_D?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9063 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_vbase_dtor
, 4)
9064 void __thiscall
basic_ifstream_short_vbase_dtor(basic_ifstream_wchar
*this)
9066 TRACE("(%p)\n", this);
9068 basic_ifstream_short_dtor(basic_ifstream_short_to_basic_ios(this));
9069 basic_ios_short_dtor(basic_istream_short_get_basic_ios(&this->base
));
9072 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_vector_dtor
, 8)
9073 basic_ifstream_wchar
* __thiscall
basic_ifstream_short_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
9075 basic_ifstream_wchar
*this = basic_ifstream_short_from_basic_ios(base
);
9077 TRACE("(%p %x)\n", this, flags
);
9080 /* we have an array, with the number of elements stored before the first object */
9081 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
9083 for(i
=*ptr
-1; i
>=0; i
--)
9084 basic_ifstream_short_vbase_dtor(this+i
);
9085 operator_delete(ptr
);
9087 basic_ifstream_short_vbase_dtor(this);
9089 operator_delete(this);
9095 /* ?close@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9096 /* ?close@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9097 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_close
, 4)
9098 void __thiscall
basic_ifstream_short_close(basic_ifstream_wchar
*this)
9100 TRACE("(%p)\n", this);
9102 if(!basic_filebuf_short_close(&this->filebuf
)) {
9103 basic_ios_wchar
*basic_ios
= basic_istream_short_get_basic_ios(&this->base
);
9104 basic_ios_short_setstate(basic_ios
, IOSTATE_failbit
);
9108 /* ?is_open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
9109 /* ?is_open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
9110 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_is_open
, 4)
9111 bool __thiscall
basic_ifstream_short_is_open(const basic_ifstream_wchar
*this)
9113 TRACE("(%p)\n", this);
9114 return basic_filebuf_short_is_open(&this->filebuf
);
9117 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPBDH@Z */
9118 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDH@Z */
9119 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_open
, 12)
9120 void __thiscall
basic_ifstream_short_open(basic_ifstream_wchar
*this,
9121 const char *name
, int mode
)
9123 TRACE("(%p %s %d)\n", this, name
, mode
);
9125 if(!basic_filebuf_short_open_mode(&this->filebuf
, name
, mode
|OPENMODE_in
)) {
9126 basic_ios_wchar
*basic_ios
= basic_istream_short_get_basic_ios(&this->base
);
9127 basic_ios_short_setstate(basic_ios
, IOSTATE_failbit
);
9131 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPBDF@Z */
9132 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDF@Z */
9133 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_open_old
, 12)
9134 void __thiscall
basic_ifstream_short_open_old(basic_ifstream_wchar
*this,
9135 const char *name
, short mode
)
9137 basic_ifstream_short_open(this, name
, mode
);
9140 /* ?rdbuf@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
9141 /* ?rdbuf@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
9142 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_rdbuf
, 4)
9143 basic_filebuf_wchar
* __thiscall
basic_ifstream_short_rdbuf(const basic_ifstream_wchar
*this)
9145 TRACE("(%p)\n", this);
9146 return (basic_filebuf_wchar
*)&this->filebuf
;
9149 static inline basic_ios_char
* basic_fstream_char_to_basic_ios(basic_fstream_char
*ptr
)
9151 return (basic_ios_char
*)((char*)ptr
+basic_fstream_char_vbtable1
[1]);
9154 static inline basic_fstream_char
* basic_fstream_char_from_basic_ios(basic_ios_char
*ptr
)
9156 return (basic_fstream_char
*)((char*)ptr
-basic_fstream_char_vbtable1
[1]);
9159 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
9160 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
9161 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor
, 8)
9162 basic_fstream_char
* __thiscall
basic_fstream_char_ctor(basic_fstream_char
*this, bool virt_init
)
9164 basic_ios_char
*basic_ios
;
9166 TRACE("(%p %d)\n", this, virt_init
);
9169 this->base
.base1
.vbtable
= basic_fstream_char_vbtable1
;
9170 this->base
.base2
.vbtable
= basic_fstream_char_vbtable2
;
9171 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
9172 basic_ios_char_ctor(basic_ios
);
9174 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
9177 basic_filebuf_char_ctor(&this->filebuf
);
9178 basic_iostream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
);
9179 basic_ios
->base
.vtable
= &basic_fstream_char_vtable
;
9183 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@ABV01@@Z */
9184 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@AEBV01@@Z */
9185 DEFINE_THISCALL_WRAPPER(basic_fstream_char_copy_ctor
, 12)
9186 basic_fstream_char
* __thiscall
basic_fstream_char_copy_ctor(basic_fstream_char
*this,
9187 basic_fstream_char
*copy
, bool virt_init
)
9189 basic_ios_char
*basic_ios
;
9191 TRACE("(%p %p %d)\n", this, copy
, virt_init
);
9194 this->base
.base1
.vbtable
= basic_fstream_char_vbtable1
;
9195 this->base
.base2
.vbtable
= basic_fstream_char_vbtable2
;
9196 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
9197 basic_ios_char_ctor(basic_ios
);
9199 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
9202 basic_filebuf_char_ctor_file(&this->filebuf
, copy
->filebuf
.file
);
9203 basic_iostream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
);
9204 basic_ios
->base
.vtable
= &basic_fstream_char_vtable
;
9208 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PBDH@Z */
9209 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDH@Z */
9210 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_name
, 16)
9211 basic_fstream_char
* __thiscall
basic_fstream_char_ctor_name(basic_fstream_char
*this,
9212 const char *name
, int mode
, bool virt_init
)
9214 TRACE("(%p %s %d %d)\n", this, name
, mode
, virt_init
);
9216 basic_fstream_char_ctor(this, virt_init
);
9218 if(!basic_filebuf_char_open_mode(&this->filebuf
, name
, mode
)) {
9219 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
9220 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
9225 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
9226 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
9227 DEFINE_THISCALL_WRAPPER(basic_fstream_char_dtor
, 4)
9228 void __thiscall
basic_fstream_char_dtor(basic_ios_char
*base
)
9230 basic_fstream_char
*this = basic_fstream_char_from_basic_ios(base
);
9232 TRACE("(%p)\n", this);
9234 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base
));
9235 basic_filebuf_char_dtor(&this->filebuf
);
9238 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9239 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9240 DEFINE_THISCALL_WRAPPER(basic_fstream_char_vbase_dtor
, 4)
9241 void __thiscall
basic_fstream_char_vbase_dtor(basic_fstream_char
*this)
9243 TRACE("(%p)\n", this);
9245 basic_fstream_char_dtor(basic_fstream_char_to_basic_ios(this));
9246 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base
.base1
));
9249 DEFINE_THISCALL_WRAPPER(basic_fstream_char_vector_dtor
, 8)
9250 basic_fstream_char
* __thiscall
basic_fstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
9252 basic_fstream_char
*this = basic_fstream_char_from_basic_ios(base
);
9254 TRACE("(%p %x)\n", this, flags
);
9257 /* we have an array, with the number of elements stored before the first object */
9258 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
9260 for(i
=*ptr
-1; i
>=0; i
--)
9261 basic_fstream_char_vbase_dtor(this+i
);
9262 operator_delete(ptr
);
9264 basic_fstream_char_vbase_dtor(this);
9266 operator_delete(this);
9272 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9273 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9274 DEFINE_THISCALL_WRAPPER(basic_fstream_char_close
, 4)
9275 void __thiscall
basic_fstream_char_close(basic_fstream_char
*this)
9277 TRACE("(%p)\n", this);
9279 if(!basic_filebuf_char_close(&this->filebuf
)) {
9280 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
9281 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
9285 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
9286 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
9287 DEFINE_THISCALL_WRAPPER(basic_fstream_char_is_open
, 4)
9288 bool __thiscall
basic_fstream_char_is_open(const basic_fstream_char
*this)
9290 TRACE("(%p)\n", this);
9291 return basic_filebuf_char_is_open(&this->filebuf
);
9294 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDH@Z */
9295 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDH@Z */
9296 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open
, 12)
9297 void __thiscall
basic_fstream_char_open(basic_fstream_char
*this,
9298 const char *name
, int mode
)
9300 TRACE("(%p %s %d)\n", this, name
, mode
);
9302 if(!basic_filebuf_char_open_mode(&this->filebuf
, name
, mode
)) {
9303 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
9304 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
9308 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDF@Z */
9309 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDF@Z */
9310 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_old
, 12)
9311 void __thiscall
basic_fstream_char_open_old(basic_fstream_char
*this,
9312 const char *name
, int mode
)
9314 basic_fstream_char_open(this, name
, mode
);
9317 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
9318 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
9319 DEFINE_THISCALL_WRAPPER(basic_fstream_char_rdbuf
, 4)
9320 basic_filebuf_char
* __thiscall
basic_fstream_char_rdbuf(const basic_fstream_char
*this)
9322 TRACE("(%p)\n", this);
9323 return (basic_filebuf_char
*)&this->filebuf
;
9326 static inline basic_ios_wchar
* basic_fstream_short_to_basic_ios(basic_fstream_wchar
*ptr
)
9328 return (basic_ios_wchar
*)((char*)ptr
+basic_fstream_short_vbtable1
[1]);
9331 static inline basic_fstream_wchar
* basic_fstream_short_from_basic_ios(basic_ios_wchar
*ptr
)
9333 return (basic_fstream_wchar
*)((char*)ptr
-basic_fstream_short_vbtable1
[1]);
9336 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
9337 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
9338 DEFINE_THISCALL_WRAPPER(basic_fstream_short_ctor
, 8)
9339 basic_fstream_wchar
* __thiscall
basic_fstream_short_ctor(basic_fstream_wchar
*this, bool virt_init
)
9341 basic_ios_wchar
*basic_ios
;
9343 TRACE("(%p %d)\n", this, virt_init
);
9346 this->base
.base1
.vbtable
= basic_fstream_short_vbtable1
;
9347 this->base
.base2
.vbtable
= basic_fstream_short_vbtable2
;
9348 basic_ios
= basic_istream_short_get_basic_ios(&this->base
.base1
);
9349 basic_ios_short_ctor(basic_ios
);
9351 basic_ios
= basic_istream_short_get_basic_ios(&this->base
.base1
);
9354 basic_filebuf_short_ctor(&this->filebuf
);
9355 basic_iostream_short_ctor(&this->base
, &this->filebuf
.base
, FALSE
);
9356 basic_ios
->base
.vtable
= &basic_fstream_short_vtable
;
9360 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@ABV01@@Z */
9361 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@AEBV01@@Z */
9362 DEFINE_THISCALL_WRAPPER(basic_fstream_short_copy_ctor
, 12)
9363 basic_fstream_wchar
* __thiscall
basic_fstream_short_copy_ctor(basic_fstream_wchar
*this,
9364 basic_fstream_wchar
*copy
, bool virt_init
)
9366 basic_ios_wchar
*basic_ios
;
9368 TRACE("(%p %p %d)\n", this, copy
, virt_init
);
9371 this->base
.base1
.vbtable
= basic_fstream_short_vbtable1
;
9372 this->base
.base2
.vbtable
= basic_fstream_short_vbtable2
;
9373 basic_ios
= basic_istream_short_get_basic_ios(&this->base
.base1
);
9374 basic_ios_short_ctor(basic_ios
);
9376 basic_ios
= basic_istream_short_get_basic_ios(&this->base
.base1
);
9379 basic_filebuf_short_ctor_file(&this->filebuf
, copy
->filebuf
.file
);
9380 basic_iostream_short_ctor(&this->base
, &this->filebuf
.base
, FALSE
);
9381 basic_ios
->base
.vtable
= &basic_fstream_short_vtable
;
9385 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@PBGHH@Z */
9386 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@PEBGHH@Z */
9387 DEFINE_THISCALL_WRAPPER(basic_fstream_short_ctor_name
, 16)
9388 basic_fstream_wchar
* __thiscall
basic_fstream_short_ctor_name(basic_fstream_wchar
*this,
9389 const char *name
, int mode
, bool virt_init
)
9391 TRACE("(%p %s %d %d)\n", this, name
, mode
, virt_init
);
9393 basic_fstream_short_ctor(this, virt_init
);
9395 if(!basic_filebuf_short_open_mode(&this->filebuf
, name
, mode
)) {
9396 basic_ios_wchar
*basic_ios
= basic_istream_short_get_basic_ios(&this->base
.base1
);
9397 basic_ios_short_setstate(basic_ios
, IOSTATE_failbit
);
9402 /* ??1?$basic_fstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
9403 /* ??1?$basic_fstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
9404 DEFINE_THISCALL_WRAPPER(basic_fstream_short_dtor
, 4)
9405 void __thiscall
basic_fstream_short_dtor(basic_ios_wchar
*base
)
9407 basic_fstream_wchar
*this = basic_fstream_short_from_basic_ios(base
);
9409 TRACE("(%p)\n", this);
9411 basic_iostream_short_dtor(basic_iostream_short_to_basic_ios(&this->base
));
9412 basic_filebuf_short_dtor(&this->filebuf
);
9415 /* ??_D?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9416 /* ??_D?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9417 DEFINE_THISCALL_WRAPPER(basic_fstream_short_vbase_dtor
, 4)
9418 void __thiscall
basic_fstream_short_vbase_dtor(basic_fstream_wchar
*this)
9420 TRACE("(%p)\n", this);
9422 basic_fstream_short_dtor(basic_fstream_short_to_basic_ios(this));
9423 basic_ios_short_dtor(basic_istream_short_get_basic_ios(&this->base
.base1
));
9426 DEFINE_THISCALL_WRAPPER(basic_fstream_short_vector_dtor
, 8)
9427 basic_fstream_wchar
* __thiscall
basic_fstream_short_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
9429 basic_fstream_wchar
*this = basic_fstream_short_from_basic_ios(base
);
9431 TRACE("(%p %x)\n", this, flags
);
9434 /* we have an array, with the number of elements stored before the first object */
9435 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
9437 for(i
=*ptr
-1; i
>=0; i
--)
9438 basic_fstream_short_vbase_dtor(this+i
);
9439 operator_delete(ptr
);
9441 basic_fstream_short_vbase_dtor(this);
9443 operator_delete(this);
9449 /* ?close@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9450 /* ?close@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9451 DEFINE_THISCALL_WRAPPER(basic_fstream_short_close
, 4)
9452 void __thiscall
basic_fstream_short_close(basic_fstream_wchar
*this)
9454 TRACE("(%p)\n", this);
9456 if(!basic_filebuf_short_close(&this->filebuf
)) {
9457 basic_ios_wchar
*basic_ios
= basic_istream_short_get_basic_ios(&this->base
.base1
);
9458 basic_ios_short_setstate(basic_ios
, IOSTATE_failbit
);
9462 /* ?is_open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
9463 /* ?is_open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
9464 DEFINE_THISCALL_WRAPPER(basic_fstream_short_is_open
, 4)
9465 bool __thiscall
basic_fstream_short_is_open(const basic_fstream_wchar
*this)
9467 TRACE("(%p)\n", this);
9468 return basic_filebuf_short_is_open(&this->filebuf
);
9471 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXPBDH@Z */
9472 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDH@Z */
9473 DEFINE_THISCALL_WRAPPER(basic_fstream_short_open
, 12)
9474 void __thiscall
basic_fstream_short_open(basic_fstream_wchar
*this,
9475 const char *name
, int mode
)
9477 TRACE("(%p %s %d)\n", this, name
, mode
);
9479 if(!basic_filebuf_short_open_mode(&this->filebuf
, name
, mode
)) {
9480 basic_ios_wchar
*basic_ios
= basic_istream_short_get_basic_ios(&this->base
.base1
);
9481 basic_ios_short_setstate(basic_ios
, IOSTATE_failbit
);
9485 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDF@Z */
9486 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDF@Z */
9487 DEFINE_THISCALL_WRAPPER(basic_fstream_short_open_old
, 12)
9488 void __thiscall
basic_fstream_short_open_old(basic_fstream_wchar
*this,
9489 const char *name
, int mode
)
9491 basic_fstream_short_open(this, name
, mode
);
9494 /* ?rdbuf@?$basic_fstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
9495 /* ?rdbuf@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
9496 DEFINE_THISCALL_WRAPPER(basic_fstream_short_rdbuf
, 4)
9497 basic_filebuf_wchar
* __thiscall
basic_fstream_short_rdbuf(const basic_fstream_wchar
*this)
9499 TRACE("(%p)\n", this);
9500 return (basic_filebuf_wchar
*)&this->filebuf
;
9503 static inline basic_ios_char
* basic_ostringstream_char_to_basic_ios(basic_ostringstream_char
*ptr
)
9505 return (basic_ios_char
*)((char*)ptr
+basic_ostringstream_char_vbtable
[1]);
9508 static inline basic_ostringstream_char
* basic_ostringstream_char_from_basic_ios(basic_ios_char
*ptr
)
9510 return (basic_ostringstream_char
*)((char*)ptr
-basic_ostringstream_char_vbtable
[1]);
9513 /* ??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 */
9514 /* ??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 */
9515 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor_str
, 16)
9516 basic_ostringstream_char
* __thiscall
basic_ostringstream_char_ctor_str(basic_ostringstream_char
*this,
9517 const basic_string_char
*str
, int mode
, bool virt_init
)
9519 basic_ios_char
*basic_ios
;
9521 TRACE("(%p %p %d %d)\n", this, str
, mode
, virt_init
);
9524 this->base
.vbtable
= basic_ostringstream_char_vbtable
;
9525 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
9526 basic_ios_char_ctor(basic_ios
);
9528 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
9531 basic_stringbuf_char_ctor_str(&this->strbuf
, str
, mode
|OPENMODE_out
);
9532 basic_ostream_char_ctor(&this->base
, &this->strbuf
.base
, FALSE
, TRUE
, FALSE
);
9533 basic_ios
->base
.vtable
= &basic_ostringstream_char_vtable
;
9537 /* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
9538 /* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
9539 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor_mode
, 12)
9540 basic_ostringstream_char
* __thiscall
basic_ostringstream_char_ctor_mode(
9541 basic_ostringstream_char
*this, int mode
, bool virt_init
)
9543 basic_ios_char
*basic_ios
;
9545 TRACE("(%p %d %d)\n", this, mode
, virt_init
);
9548 this->base
.vbtable
= basic_ostringstream_char_vbtable
;
9549 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
9550 basic_ios_char_ctor(basic_ios
);
9552 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
9555 basic_stringbuf_char_ctor_mode(&this->strbuf
, mode
|OPENMODE_out
);
9556 basic_ostream_char_ctor(&this->base
, &this->strbuf
.base
, FALSE
, TRUE
, FALSE
);
9557 basic_ios
->base
.vtable
= &basic_ostringstream_char_vtable
;
9561 /* ??_F?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
9562 /* ??_F?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
9563 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor
, 4)
9564 basic_ostringstream_char
* __thiscall
basic_ostringstream_char_ctor(
9565 basic_ostringstream_char
*this)
9567 return basic_ostringstream_char_ctor_mode(this, 0, TRUE
);
9570 /* ??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
9571 /* ??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
9572 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_dtor
, 4)
9573 void __thiscall
basic_ostringstream_char_dtor(basic_ios_char
*base
)
9575 basic_ostringstream_char
*this = basic_ostringstream_char_from_basic_ios(base
);
9577 TRACE("(%p)\n", this);
9579 basic_stringbuf_char_dtor(&this->strbuf
);
9580 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base
));
9583 /* ??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
9584 /* ??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
9585 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_vbase_dtor
, 4)
9586 void __thiscall
basic_ostringstream_char_vbase_dtor(basic_ostringstream_char
*this)
9588 TRACE("(%p)\n", this);
9590 basic_ostringstream_char_dtor(basic_ostringstream_char_to_basic_ios(this));
9591 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base
));
9594 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_vector_dtor
, 8)
9595 basic_ostringstream_char
* __thiscall
basic_ostringstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
9597 basic_ostringstream_char
*this = basic_ostringstream_char_from_basic_ios(base
);
9599 TRACE("(%p %x)\n", this, flags
);
9602 /* we have an array, with the number of elements stored before the first object */
9603 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
9605 for(i
=*ptr
-1; i
>=0; i
--)
9606 basic_ostringstream_char_vbase_dtor(this+i
);
9607 operator_delete(ptr
);
9609 basic_ostringstream_char_vbase_dtor(this);
9611 operator_delete(this);
9617 /* ?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 */
9618 /* ?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 */
9619 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_rdbuf
, 4)
9620 basic_stringbuf_char
* __thiscall
basic_ostringstream_char_rdbuf(const basic_ostringstream_char
*this)
9622 TRACE("(%p)\n", this);
9623 return (basic_stringbuf_char
*)&this->strbuf
;
9626 /* ?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 */
9627 /* ?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 */
9628 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_str_set
, 8)
9629 void __thiscall
basic_ostringstream_char_str_set(basic_ostringstream_char
*this, const basic_string_char
*str
)
9631 TRACE("(%p %p)\n", this, str
);
9632 basic_stringbuf_char_str_set(&this->strbuf
, str
);
9635 /* ?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 */
9636 /* ?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 */
9637 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_str_get
, 8)
9638 basic_string_char
* __thiscall
basic_ostringstream_char_str_get(const basic_ostringstream_char
*this, basic_string_char
*ret
)
9640 TRACE("(%p %p)\n", this, ret
);
9641 return basic_stringbuf_char_str_get(&this->strbuf
, ret
);
9644 static inline basic_ios_wchar
* basic_ostringstream_short_to_basic_ios(basic_ostringstream_wchar
*ptr
)
9646 return (basic_ios_wchar
*)((char*)ptr
+basic_ostringstream_short_vbtable
[1]);
9649 static inline basic_ostringstream_wchar
* basic_ostringstream_short_from_basic_ios(basic_ios_wchar
*ptr
)
9651 return (basic_ostringstream_wchar
*)((char*)ptr
-basic_ostringstream_short_vbtable
[1]);
9654 /* ??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 */
9655 /* ??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 */
9656 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor_str
, 16)
9657 basic_ostringstream_wchar
* __thiscall
basic_ostringstream_short_ctor_str(basic_ostringstream_wchar
*this,
9658 const basic_string_wchar
*str
, int mode
, bool virt_init
)
9660 basic_ios_wchar
*basic_ios
;
9662 TRACE("(%p %p %d %d)\n", this, str
, mode
, virt_init
);
9665 this->base
.vbtable
= basic_ostringstream_short_vbtable
;
9666 basic_ios
= basic_ostream_short_get_basic_ios(&this->base
);
9667 basic_ios_short_ctor(basic_ios
);
9669 basic_ios
= basic_ostream_short_get_basic_ios(&this->base
);
9672 basic_stringbuf_short_ctor_str(&this->strbuf
, str
, mode
|OPENMODE_out
);
9673 basic_ostream_short_ctor(&this->base
, &this->strbuf
.base
, FALSE
, TRUE
, FALSE
);
9674 basic_ios
->base
.vtable
= &basic_ostringstream_short_vtable
;
9678 /* ??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
9679 /* ??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
9680 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor_mode
, 12)
9681 basic_ostringstream_wchar
* __thiscall
basic_ostringstream_short_ctor_mode(
9682 basic_ostringstream_wchar
*this, int mode
, bool virt_init
)
9684 basic_ios_wchar
*basic_ios
;
9686 TRACE("(%p %d %d)\n", this, mode
, virt_init
);
9689 this->base
.vbtable
= basic_ostringstream_short_vbtable
;
9690 basic_ios
= basic_ostream_short_get_basic_ios(&this->base
);
9691 basic_ios_short_ctor(basic_ios
);
9693 basic_ios
= basic_ostream_short_get_basic_ios(&this->base
);
9696 basic_stringbuf_short_ctor_mode(&this->strbuf
, mode
|OPENMODE_out
);
9697 basic_ostream_short_ctor(&this->base
, &this->strbuf
.base
, FALSE
, TRUE
, FALSE
);
9698 basic_ios
->base
.vtable
= &basic_ostringstream_short_vtable
;
9702 /* ??_F?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
9703 /* ??_F?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
9704 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor
, 4)
9705 basic_ostringstream_wchar
* __thiscall
basic_ostringstream_short_ctor(
9706 basic_ostringstream_wchar
*this)
9708 return basic_ostringstream_short_ctor_mode(this, 0, TRUE
);
9711 /* ??1?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
9712 /* ??1?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
9713 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_dtor
, 4)
9714 void __thiscall
basic_ostringstream_short_dtor(basic_ios_wchar
*base
)
9716 basic_ostringstream_wchar
*this = basic_ostringstream_short_from_basic_ios(base
);
9718 TRACE("(%p)\n", this);
9720 basic_stringbuf_short_dtor(&this->strbuf
);
9721 basic_ostream_short_dtor(basic_ostream_short_to_basic_ios(&this->base
));
9724 /* ??_D?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
9725 /* ??_D?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
9726 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_vbase_dtor
, 4)
9727 void __thiscall
basic_ostringstream_short_vbase_dtor(basic_ostringstream_wchar
*this)
9729 TRACE("(%p)\n", this);
9731 basic_ostringstream_short_dtor(basic_ostringstream_short_to_basic_ios(this));
9732 basic_ios_short_dtor(basic_ostream_short_get_basic_ios(&this->base
));
9735 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_vector_dtor
, 8)
9736 basic_ostringstream_wchar
* __thiscall
basic_ostringstream_short_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
9738 basic_ostringstream_wchar
*this = basic_ostringstream_short_from_basic_ios(base
);
9740 TRACE("(%p %x)\n", this, flags
);
9743 /* we have an array, with the number of elements stored before the first object */
9744 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
9746 for(i
=*ptr
-1; i
>=0; i
--)
9747 basic_ostringstream_short_vbase_dtor(this+i
);
9748 operator_delete(ptr
);
9750 basic_ostringstream_short_vbase_dtor(this);
9752 operator_delete(this);
9758 /* ?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 */
9759 /* ?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 */
9760 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_rdbuf
, 4)
9761 basic_stringbuf_wchar
* __thiscall
basic_ostringstream_short_rdbuf(const basic_ostringstream_wchar
*this)
9763 TRACE("(%p)\n", this);
9764 return (basic_stringbuf_wchar
*)&this->strbuf
;
9767 /* ?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 */
9768 /* ?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 */
9769 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_str_set
, 8)
9770 void __thiscall
basic_ostringstream_short_str_set(basic_ostringstream_wchar
*this, const basic_string_wchar
*str
)
9772 TRACE("(%p %p)\n", this, str
);
9773 basic_stringbuf_short_str_set(&this->strbuf
, str
);
9776 /* ?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 */
9777 /* ?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 */
9778 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_str_get
, 8)
9779 basic_string_wchar
* __thiscall
basic_ostringstream_short_str_get(const basic_ostringstream_wchar
*this, basic_string_wchar
*ret
)
9781 TRACE("(%p %p)\n", this, ret
);
9782 return basic_stringbuf_short_str_get(&this->strbuf
, ret
);
9785 static inline basic_ios_char
* basic_istringstream_char_to_basic_ios(basic_istringstream_char
*ptr
)
9787 return (basic_ios_char
*)((char*)ptr
+basic_istringstream_char_vbtable
[1]);
9790 static inline basic_istringstream_char
* basic_istringstream_char_from_basic_ios(basic_ios_char
*ptr
)
9792 return (basic_istringstream_char
*)((char*)ptr
-basic_istringstream_char_vbtable
[1]);
9795 /* ??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 */
9796 /* ??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 */
9797 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor_str
, 16)
9798 basic_istringstream_char
* __thiscall
basic_istringstream_char_ctor_str(basic_istringstream_char
*this,
9799 const basic_string_char
*str
, int mode
, bool virt_init
)
9801 basic_ios_char
*basic_ios
;
9803 TRACE("(%p %p %d %d)\n", this, str
, mode
, virt_init
);
9806 this->base
.vbtable
= basic_istringstream_char_vbtable
;
9807 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
9808 basic_ios_char_ctor(basic_ios
);
9810 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
9813 basic_stringbuf_char_ctor_str(&this->strbuf
, str
, mode
|OPENMODE_in
);
9814 basic_istream_char_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
9815 basic_ios
->base
.vtable
= &basic_istringstream_char_vtable
;
9819 /* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
9820 /* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
9821 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor_mode
, 12)
9822 basic_istringstream_char
* __thiscall
basic_istringstream_char_ctor_mode(
9823 basic_istringstream_char
*this, int mode
, bool virt_init
)
9825 basic_ios_char
*basic_ios
;
9827 TRACE("(%p %d %d)\n", this, mode
, virt_init
);
9830 this->base
.vbtable
= basic_istringstream_char_vbtable
;
9831 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
9832 basic_ios_char_ctor(basic_ios
);
9834 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
9837 basic_stringbuf_char_ctor_mode(&this->strbuf
, mode
|OPENMODE_in
);
9838 basic_istream_char_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
9839 basic_ios
->base
.vtable
= &basic_istringstream_char_vtable
;
9843 /* ??_F?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
9844 /* ??_F?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
9845 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor
, 4)
9846 basic_istringstream_char
* __thiscall
basic_istringstream_char_ctor(
9847 basic_istringstream_char
*this)
9849 return basic_istringstream_char_ctor_mode(this, 0, TRUE
);
9852 /* ??1?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
9853 /* ??1?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
9854 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_dtor
, 4)
9855 void __thiscall
basic_istringstream_char_dtor(basic_ios_char
*base
)
9857 basic_istringstream_char
*this = basic_istringstream_char_from_basic_ios(base
);
9859 TRACE("(%p)\n", this);
9861 basic_stringbuf_char_dtor(&this->strbuf
);
9862 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base
));
9865 /* ??_D?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
9866 /* ??_D?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
9867 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_vbase_dtor
, 4)
9868 void __thiscall
basic_istringstream_char_vbase_dtor(basic_istringstream_char
*this)
9870 TRACE("(%p)\n", this);
9872 basic_istringstream_char_dtor(basic_istringstream_char_to_basic_ios(this));
9873 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base
));
9876 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_vector_dtor
, 8)
9877 basic_istringstream_char
* __thiscall
basic_istringstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
9879 basic_istringstream_char
*this = basic_istringstream_char_from_basic_ios(base
);
9881 TRACE("(%p %x)\n", this, flags
);
9884 /* we have an array, with the number of elements stored before the first object */
9885 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
9887 for(i
=*ptr
-1; i
>=0; i
--)
9888 basic_istringstream_char_vbase_dtor(this+i
);
9889 operator_delete(ptr
);
9891 basic_istringstream_char_vbase_dtor(this);
9893 operator_delete(this);
9899 /* ?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 */
9900 /* ?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 */
9901 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_rdbuf
, 4)
9902 basic_stringbuf_char
* __thiscall
basic_istringstream_char_rdbuf(const basic_istringstream_char
*this)
9904 TRACE("(%p)\n", this);
9905 return (basic_stringbuf_char
*)&this->strbuf
;
9908 /* ?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 */
9909 /* ?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 */
9910 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_str_set
, 8)
9911 void __thiscall
basic_istringstream_char_str_set(basic_istringstream_char
*this, const basic_string_char
*str
)
9913 TRACE("(%p %p)\n", this, str
);
9914 basic_stringbuf_char_str_set(&this->strbuf
, str
);
9917 /* ?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 */
9918 /* ?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 */
9919 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_str_get
, 8)
9920 basic_string_char
* __thiscall
basic_istringstream_char_str_get(const basic_istringstream_char
*this, basic_string_char
*ret
)
9922 TRACE("(%p %p)\n", this, ret
);
9923 return basic_stringbuf_char_str_get(&this->strbuf
, ret
);
9926 static inline basic_ios_wchar
* basic_istringstream_short_to_basic_ios(basic_istringstream_wchar
*ptr
)
9928 return (basic_ios_wchar
*)((char*)ptr
+basic_istringstream_short_vbtable
[1]);
9931 static inline basic_istringstream_wchar
* basic_istringstream_short_from_basic_ios(basic_ios_wchar
*ptr
)
9933 return (basic_istringstream_wchar
*)((char*)ptr
-basic_istringstream_short_vbtable
[1]);
9936 /* ??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 */
9937 /* ??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 */
9938 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor_str
, 16)
9939 basic_istringstream_wchar
* __thiscall
basic_istringstream_short_ctor_str(basic_istringstream_wchar
*this,
9940 const basic_string_wchar
*str
, int mode
, bool virt_init
)
9942 basic_ios_wchar
*basic_ios
;
9944 TRACE("(%p %p %d %d)\n", this, str
, mode
, virt_init
);
9947 this->base
.vbtable
= basic_istringstream_short_vbtable
;
9948 basic_ios
= basic_istream_short_get_basic_ios(&this->base
);
9949 basic_ios_short_ctor(basic_ios
);
9951 basic_ios
= basic_istream_short_get_basic_ios(&this->base
);
9954 basic_stringbuf_short_ctor_str(&this->strbuf
, str
, mode
|OPENMODE_in
);
9955 basic_istream_short_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
9956 basic_ios
->base
.vtable
= &basic_istringstream_short_vtable
;
9960 /* ??0?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
9961 /* ??0?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
9962 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor_mode
, 12)
9963 basic_istringstream_wchar
* __thiscall
basic_istringstream_short_ctor_mode(
9964 basic_istringstream_wchar
*this, int mode
, bool virt_init
)
9966 basic_ios_wchar
*basic_ios
;
9968 TRACE("(%p %d %d)\n", this, mode
, virt_init
);
9971 this->base
.vbtable
= basic_istringstream_short_vbtable
;
9972 basic_ios
= basic_istream_short_get_basic_ios(&this->base
);
9973 basic_ios_short_ctor(basic_ios
);
9975 basic_ios
= basic_istream_short_get_basic_ios(&this->base
);
9978 basic_stringbuf_short_ctor_mode(&this->strbuf
, mode
|OPENMODE_in
);
9979 basic_istream_short_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
9980 basic_ios
->base
.vtable
= &basic_istringstream_short_vtable
;
9984 /* ??_F?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
9985 /* ??_F?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
9986 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor
, 4)
9987 basic_istringstream_wchar
* __thiscall
basic_istringstream_short_ctor(
9988 basic_istringstream_wchar
*this)
9990 return basic_istringstream_short_ctor_mode(this, 0, TRUE
);
9993 /* ??1?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
9994 /* ??1?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
9995 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_dtor
, 4)
9996 void __thiscall
basic_istringstream_short_dtor(basic_ios_wchar
*base
)
9998 basic_istringstream_wchar
*this = basic_istringstream_short_from_basic_ios(base
);
10000 TRACE("(%p)\n", this);
10002 basic_stringbuf_short_dtor(&this->strbuf
);
10003 basic_istream_short_dtor(basic_istream_short_to_basic_ios(&this->base
));
10006 /* ??_D?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
10007 /* ??_D?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
10008 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_vbase_dtor
, 4)
10009 void __thiscall
basic_istringstream_short_vbase_dtor(basic_istringstream_wchar
*this)
10011 TRACE("(%p)\n", this);
10013 basic_istringstream_short_dtor(basic_istringstream_short_to_basic_ios(this));
10014 basic_ios_short_dtor(basic_istream_short_get_basic_ios(&this->base
));
10017 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_vector_dtor
, 8)
10018 basic_istringstream_wchar
* __thiscall
basic_istringstream_short_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
10020 basic_istringstream_wchar
*this = basic_istringstream_short_from_basic_ios(base
);
10022 TRACE("(%p %x)\n", this, flags
);
10025 /* we have an array, with the number of elements stored before the first object */
10026 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
10028 for(i
=*ptr
-1; i
>=0; i
--)
10029 basic_istringstream_short_vbase_dtor(this+i
);
10030 operator_delete(ptr
);
10032 basic_istringstream_short_vbase_dtor(this);
10034 operator_delete(this);
10040 /* ?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 */
10041 /* ?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 */
10042 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_rdbuf
, 4)
10043 basic_stringbuf_wchar
* __thiscall
basic_istringstream_short_rdbuf(const basic_istringstream_wchar
*this)
10045 TRACE("(%p)\n", this);
10046 return (basic_stringbuf_wchar
*)&this->strbuf
;
10049 /* ?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 */
10050 /* ?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 */
10051 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_str_set
, 8)
10052 void __thiscall
basic_istringstream_short_str_set(basic_istringstream_wchar
*this, const basic_string_wchar
*str
)
10054 TRACE("(%p %p)\n", this, str
);
10055 basic_stringbuf_short_str_set(&this->strbuf
, str
);
10058 /* ?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 */
10059 /* ?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 */
10060 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_str_get
, 8)
10061 basic_string_wchar
* __thiscall
basic_istringstream_short_str_get(const basic_istringstream_wchar
*this, basic_string_wchar
*ret
)
10063 TRACE("(%p %p)\n", this, ret
);
10064 return basic_stringbuf_short_str_get(&this->strbuf
, ret
);
10067 static inline basic_ios_char
* basic_stringstream_char_to_basic_ios(basic_stringstream_char
*ptr
)
10069 return (basic_ios_char
*)((char*)ptr
+basic_stringstream_char_vbtable1
[1]);
10072 static inline basic_stringstream_char
* basic_stringstream_char_from_basic_ios(basic_ios_char
*ptr
)
10074 return (basic_stringstream_char
*)((char*)ptr
-basic_stringstream_char_vbtable1
[1]);
10077 /* ??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 */
10078 /* ??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 */
10079 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor_str
, 16)
10080 basic_stringstream_char
* __thiscall
basic_stringstream_char_ctor_str(basic_stringstream_char
*this,
10081 const basic_string_char
*str
, int mode
, bool virt_init
)
10083 basic_ios_char
*basic_ios
;
10085 TRACE("(%p %p %d %d)\n", this, str
, mode
, virt_init
);
10088 this->base
.base1
.vbtable
= basic_stringstream_char_vbtable1
;
10089 this->base
.base2
.vbtable
= basic_stringstream_char_vbtable2
;
10090 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
10091 basic_ios_char_ctor(basic_ios
);
10093 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
10096 basic_stringbuf_char_ctor_str(&this->strbuf
, str
, mode
);
10097 basic_iostream_char_ctor(&this->base
, &this->strbuf
.base
, FALSE
);
10098 basic_ios
->base
.vtable
= &basic_stringstream_char_vtable
;
10102 /* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
10103 /* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
10104 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor_mode
, 12)
10105 basic_stringstream_char
* __thiscall
basic_stringstream_char_ctor_mode(
10106 basic_stringstream_char
*this, int mode
, bool virt_init
)
10108 basic_ios_char
*basic_ios
;
10110 TRACE("(%p %d %d)\n", this, mode
, virt_init
);
10113 this->base
.base1
.vbtable
= basic_stringstream_char_vbtable1
;
10114 this->base
.base2
.vbtable
= basic_stringstream_char_vbtable2
;
10115 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
10116 basic_ios_char_ctor(basic_ios
);
10118 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
10121 basic_stringbuf_char_ctor_mode(&this->strbuf
, mode
);
10122 basic_iostream_char_ctor(&this->base
, &this->strbuf
.base
, FALSE
);
10123 basic_ios
->base
.vtable
= &basic_stringstream_char_vtable
;
10127 /* ??_F?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
10128 /* ??_F?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
10129 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor
, 4)
10130 basic_stringstream_char
* __thiscall
basic_stringstream_char_ctor(
10131 basic_stringstream_char
*this)
10133 return basic_stringstream_char_ctor_mode(
10134 this, OPENMODE_out
|OPENMODE_in
, TRUE
);
10137 /* ??1?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
10138 /* ??1?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
10139 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_dtor
, 4)
10140 void __thiscall
basic_stringstream_char_dtor(basic_ios_char
*base
)
10142 basic_stringstream_char
*this = basic_stringstream_char_from_basic_ios(base
);
10144 TRACE("(%p)\n", this);
10146 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base
));
10147 basic_stringbuf_char_dtor(&this->strbuf
);
10150 /* ??_D?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
10151 /* ??_D?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
10152 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_vbase_dtor
, 4)
10153 void __thiscall
basic_stringstream_char_vbase_dtor(basic_stringstream_char
*this)
10155 TRACE("(%p)\n", this);
10157 basic_stringstream_char_dtor(basic_stringstream_char_to_basic_ios(this));
10158 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base
.base1
));
10161 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_vector_dtor
, 8)
10162 basic_stringstream_char
* __thiscall
basic_stringstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
10164 basic_stringstream_char
*this = basic_stringstream_char_from_basic_ios(base
);
10166 TRACE("(%p %x)\n", this, flags
);
10169 /* we have an array, with the number of elements stored before the first object */
10170 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
10172 for(i
=*ptr
-1; i
>=0; i
--)
10173 basic_stringstream_char_vbase_dtor(this+i
);
10174 operator_delete(ptr
);
10176 basic_stringstream_char_vbase_dtor(this);
10178 operator_delete(this);
10184 /* ?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 */
10185 /* ?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 */
10186 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_rdbuf
, 4)
10187 basic_stringbuf_char
* __thiscall
basic_stringstream_char_rdbuf(const basic_stringstream_char
*this)
10189 TRACE("(%p)\n", this);
10190 return (basic_stringbuf_char
*)&this->strbuf
;
10193 /* ?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 */
10194 /* ?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 */
10195 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_str_set
, 8)
10196 void __thiscall
basic_stringstream_char_str_set(basic_stringstream_char
*this, const basic_string_char
*str
)
10198 TRACE("(%p %p)\n", this, str
);
10199 basic_stringbuf_char_str_set(&this->strbuf
, str
);
10202 /* ?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 */
10203 /* ?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 */
10204 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_str_get
, 8)
10205 basic_string_char
* __thiscall
basic_stringstream_char_str_get(const basic_stringstream_char
*this, basic_string_char
*ret
)
10207 TRACE("(%p %p)\n", this, ret
);
10208 return basic_stringbuf_char_str_get(&this->strbuf
, ret
);
10211 static inline basic_ios_wchar
* basic_stringstream_short_to_basic_ios(basic_stringstream_wchar
*ptr
)
10213 return (basic_ios_wchar
*)((char*)ptr
+basic_stringstream_short_vbtable1
[1]);
10216 static inline basic_stringstream_wchar
* basic_stringstream_short_from_basic_ios(basic_ios_wchar
*ptr
)
10218 return (basic_stringstream_wchar
*)((char*)ptr
-basic_stringstream_short_vbtable1
[1]);
10221 /* ??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 */
10222 /* ??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 */
10223 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor_str
, 16)
10224 basic_stringstream_wchar
* __thiscall
basic_stringstream_short_ctor_str(basic_stringstream_wchar
*this,
10225 const basic_string_wchar
*str
, int mode
, bool virt_init
)
10227 basic_ios_wchar
*basic_ios
;
10229 TRACE("(%p %p %d %d)\n", this, str
, mode
, virt_init
);
10232 this->base
.base1
.vbtable
= basic_stringstream_short_vbtable1
;
10233 this->base
.base2
.vbtable
= basic_stringstream_short_vbtable2
;
10234 basic_ios
= basic_istream_short_get_basic_ios(&this->base
.base1
);
10235 basic_ios_short_ctor(basic_ios
);
10237 basic_ios
= basic_istream_short_get_basic_ios(&this->base
.base1
);
10240 basic_stringbuf_short_ctor_str(&this->strbuf
, str
, mode
);
10241 basic_iostream_short_ctor(&this->base
, &this->strbuf
.base
, FALSE
);
10242 basic_ios
->base
.vtable
= &basic_stringstream_short_vtable
;
10246 /* ??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
10247 /* ??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
10248 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor_mode
, 12)
10249 basic_stringstream_wchar
* __thiscall
basic_stringstream_short_ctor_mode(
10250 basic_stringstream_wchar
*this, int mode
, bool virt_init
)
10252 basic_ios_wchar
*basic_ios
;
10254 TRACE("(%p %d %d)\n", this, mode
, virt_init
);
10257 this->base
.base1
.vbtable
= basic_stringstream_short_vbtable1
;
10258 this->base
.base2
.vbtable
= basic_stringstream_short_vbtable2
;
10259 basic_ios
= basic_istream_short_get_basic_ios(&this->base
.base1
);
10260 basic_ios_short_ctor(basic_ios
);
10262 basic_ios
= basic_istream_short_get_basic_ios(&this->base
.base1
);
10265 basic_stringbuf_short_ctor_mode(&this->strbuf
, mode
);
10266 basic_iostream_short_ctor(&this->base
, &this->strbuf
.base
, FALSE
);
10267 basic_ios
->base
.vtable
= &basic_stringstream_short_vtable
;
10271 /* ??_F?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
10272 /* ??_F?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
10273 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor
, 4)
10274 basic_stringstream_wchar
* __thiscall
basic_stringstream_short_ctor(
10275 basic_stringstream_wchar
*this)
10277 return basic_stringstream_short_ctor_mode(
10278 this, OPENMODE_out
|OPENMODE_in
, TRUE
);
10281 /* ??1?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
10282 /* ??1?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
10283 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_dtor
, 4)
10284 void __thiscall
basic_stringstream_short_dtor(basic_ios_wchar
*base
)
10286 basic_stringstream_wchar
*this = basic_stringstream_short_from_basic_ios(base
);
10288 TRACE("(%p)\n", this);
10290 basic_iostream_short_dtor(basic_iostream_short_to_basic_ios(&this->base
));
10291 basic_stringbuf_short_dtor(&this->strbuf
);
10294 /* ??_D?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
10295 /* ??_D?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
10296 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_vbase_dtor
, 4)
10297 void __thiscall
basic_stringstream_short_vbase_dtor(basic_stringstream_wchar
*this)
10299 TRACE("(%p)\n", this);
10301 basic_stringstream_short_dtor(basic_stringstream_short_to_basic_ios(this));
10302 basic_ios_short_dtor(basic_istream_short_get_basic_ios(&this->base
.base1
));
10305 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_vector_dtor
, 8)
10306 basic_stringstream_wchar
* __thiscall
basic_stringstream_short_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
10308 basic_stringstream_wchar
*this = basic_stringstream_short_from_basic_ios(base
);
10310 TRACE("(%p %x)\n", this, flags
);
10313 /* we have an array, with the number of elements stored before the first object */
10314 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
10316 for(i
=*ptr
-1; i
>=0; i
--)
10317 basic_stringstream_short_vbase_dtor(this+i
);
10318 operator_delete(ptr
);
10320 basic_stringstream_short_vbase_dtor(this);
10322 operator_delete(this);
10328 /* ?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 */
10329 /* ?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 */
10330 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_rdbuf
, 4)
10331 basic_stringbuf_wchar
* __thiscall
basic_stringstream_short_rdbuf(const basic_stringstream_wchar
*this)
10333 TRACE("(%p)\n", this);
10334 return (basic_stringbuf_wchar
*)&this->strbuf
;
10337 /* ?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 */
10338 /* ?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 */
10339 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_str_set
, 8)
10340 void __thiscall
basic_stringstream_short_str_set(basic_stringstream_wchar
*this, const basic_string_wchar
*str
)
10342 TRACE("(%p %p)\n", this, str
);
10343 basic_stringbuf_short_str_set(&this->strbuf
, str
);
10346 /* ?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 */
10347 /* ?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 */
10348 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_str_get
, 8)
10349 basic_string_wchar
* __thiscall
basic_stringstream_short_str_get(const basic_stringstream_wchar
*this, basic_string_wchar
*ret
)
10351 TRACE("(%p %p)\n", this, ret
);
10352 return basic_stringbuf_short_str_get(&this->strbuf
, ret
);
10355 /* ?_Init@strstreambuf@std@@IAEXHPAD0H@Z */
10356 /* ?_Init@strstreambuf@std@@IEAAX_JPEAD1H@Z */
10357 DEFINE_THISCALL_WRAPPER(strstreambuf__Init
, 20)
10358 void __thiscall
strstreambuf__Init(strstreambuf
*this, streamsize len
, char *g
, char *p
, int mode
)
10360 TRACE("(%p %Id %p %p %d)\n", this, len
, g
, p
, mode
);
10362 this->minsize
= 32;
10363 this->endsave
= NULL
;
10364 this->strmode
= mode
;
10365 this->palloc
= NULL
;
10366 this->pfree
= NULL
;
10369 this->strmode
|= STRSTATE_Dynamic
;
10370 if(len
> this->minsize
)
10371 this->minsize
= len
;
10372 this->seekhigh
= NULL
;
10381 this->seekhigh
= g
+len
;
10382 basic_streambuf_char_setg(&this->base
, g
, g
, p
? p
: this->seekhigh
);
10384 basic_streambuf_char_setp(&this->base
, p
, this->seekhigh
);
10387 static strstreambuf
* strstreambuf_ctor_get_put(strstreambuf
*this, char *g
, streamsize len
, char *p
)
10389 TRACE("(%p %p %Id %p)\n", this, g
, len
, p
);
10391 basic_streambuf_char_ctor(&this->base
);
10392 this->base
.vtable
= &strstreambuf_vtable
;
10394 strstreambuf__Init(this, len
, g
, p
, 0);
10398 /* ?_Tidy@strstreambuf@std@@IAEXXZ */
10399 /* ?_Tidy@strstreambuf@std@@IEAAXXZ */
10400 DEFINE_THISCALL_WRAPPER(strstreambuf__Tidy
, 4)
10401 void __thiscall
strstreambuf__Tidy(strstreambuf
*this)
10403 TRACE("(%p)\n", this);
10405 if((this->strmode
& STRSTATE_Allocated
) && !(this->strmode
& STRSTATE_Frozen
)) {
10407 this->pfree(basic_streambuf_char_eback(&this->base
));
10409 operator_delete(basic_streambuf_char_eback(&this->base
));
10412 this->endsave
= NULL
;
10413 this->seekhigh
= NULL
;
10414 this->strmode
&= ~(STRSTATE_Allocated
| STRSTATE_Frozen
);
10415 basic_streambuf_char_setg(&this->base
, NULL
, NULL
, NULL
);
10416 basic_streambuf_char_setp(&this->base
, NULL
, NULL
);
10419 /* ??1strstreambuf@std@@UAE@XZ */
10420 /* ??1strstreambuf@std@@UEAA@XZ */
10421 DEFINE_THISCALL_WRAPPER(strstreambuf_dtor
, 4)
10422 void __thiscall
strstreambuf_dtor(strstreambuf
*this)
10424 TRACE("(%p)\n", this);
10426 strstreambuf__Tidy(this);
10427 basic_streambuf_char_dtor(&this->base
);
10430 DEFINE_THISCALL_WRAPPER(strstreambuf_vector_dtor
, 8)
10431 strstreambuf
* __thiscall
strstreambuf_vector_dtor(strstreambuf
*this, unsigned int flags
)
10433 TRACE("(%p %x)\n", this, flags
);
10435 /* we have an array, with the number of elements stored before the first object */
10436 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
10438 for(i
=*ptr
-1; i
>=0; i
--)
10439 strstreambuf_dtor(this+i
);
10440 operator_delete(ptr
);
10442 strstreambuf_dtor(this);
10444 operator_delete(this);
10450 /* ?freeze@strstreambuf@std@@QAEX_N@Z */
10451 /* ?freeze@strstreambuf@std@@QEAAX_N@Z */
10452 DEFINE_THISCALL_WRAPPER(strstreambuf_freeze
, 8)
10453 void __thiscall
strstreambuf_freeze(strstreambuf
*this, bool freeze
)
10455 TRACE("(%p %d)\n", this, freeze
);
10457 if(!freeze
== !(this->strmode
& STRSTATE_Frozen
))
10461 this->strmode
|= STRSTATE_Frozen
;
10462 this->endsave
= basic_streambuf_char_epptr(&this->base
);
10463 basic_streambuf_char_setp_next(&this->base
, basic_streambuf_char_pbase(&this->base
),
10464 basic_streambuf_char_pptr(&this->base
), basic_streambuf_char_eback(&this->base
));
10466 this->strmode
&= ~STRSTATE_Frozen
;
10467 basic_streambuf_char_setp_next(&this->base
, basic_streambuf_char_pbase(&this->base
),
10468 basic_streambuf_char_pptr(&this->base
), this->endsave
);
10472 /* ?overflow@strstreambuf@std@@MAEHH@Z */
10473 /* ?overflow@strstreambuf@std@@MEAAHH@Z */
10474 DEFINE_THISCALL_WRAPPER(strstreambuf_overflow
, 8)
10475 int __thiscall
strstreambuf_overflow(strstreambuf
*this, int c
)
10477 size_t old_size
, size
;
10480 TRACE("(%p %d)\n", this, c
);
10485 if(this->strmode
& STRSTATE_Frozen
)
10488 ptr
= basic_streambuf_char_pptr(&this->base
);
10489 if(ptr
&& ptr
<basic_streambuf_char_epptr(&this->base
))
10490 return (unsigned char)(*basic_streambuf_char__Pninc(&this->base
) = c
);
10492 if(!(this->strmode
& STRSTATE_Dynamic
) || (this->strmode
& STRSTATE_Constant
))
10495 ptr
= basic_streambuf_char_eback(&this->base
);
10496 old_size
= ptr
? basic_streambuf_char_epptr(&this->base
) - ptr
: 0;
10498 size
= old_size
+ old_size
/2;
10499 if(size
< this->minsize
)
10500 size
= this->minsize
;
10503 buf
= this->palloc(size
);
10505 buf
= operator_new(size
);
10509 memcpy(buf
, ptr
, old_size
);
10510 if(this->strmode
& STRSTATE_Allocated
) {
10514 operator_delete(ptr
);
10517 this->strmode
|= STRSTATE_Allocated
;
10519 this->seekhigh
= buf
;
10520 basic_streambuf_char_setp(&this->base
, buf
, buf
+size
);
10521 basic_streambuf_char_setg(&this->base
, buf
, buf
, buf
);
10523 this->seekhigh
= this->seekhigh
-ptr
+buf
;
10524 basic_streambuf_char_setp_next(&this->base
, basic_streambuf_char_pbase(&this->base
)-ptr
+buf
,
10525 basic_streambuf_char_pptr(&this->base
)-ptr
+buf
, buf
+size
);
10526 basic_streambuf_char_setg(&this->base
, buf
, basic_streambuf_char_gptr(&this->base
)-ptr
+buf
,
10527 basic_streambuf_char_pptr(&this->base
));
10530 return (unsigned char)(*basic_streambuf_char__Pninc(&this->base
) = c
);
10533 /* ?pbackfail@strstreambuf@std@@MAEHH@Z */
10534 /* ?pbackfail@strstreambuf@std@@MEAAHH@Z */
10535 DEFINE_THISCALL_WRAPPER(strstreambuf_pbackfail
, 8)
10536 int __thiscall
strstreambuf_pbackfail(strstreambuf
*this, int c
)
10538 char *ptr
= basic_streambuf_char_gptr(&this->base
);
10540 TRACE("(%p %d)\n", this, c
);
10542 if(ptr
<=basic_streambuf_char_eback(&this->base
)
10543 || ((this->strmode
& STRSTATE_Constant
) && c
!=ptr
[-1]))
10546 basic_streambuf_char_gbump(&this->base
, -1);
10549 if(this->strmode
& STRSTATE_Constant
)
10550 return (unsigned char)c
;
10552 return (unsigned char)(ptr
[0] = c
);
10555 /* ?seekoff@strstreambuf@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
10556 /* ?seekoff@strstreambuf@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
10557 /* ?seekoff@strstreambuf@std@@MAE?AV?$fpos@H@2@JHH@Z */
10558 /* ?seekoff@strstreambuf@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
10559 DEFINE_THISCALL_WRAPPER(strstreambuf_seekoff
, 20)
10560 fpos_int
* __thiscall
strstreambuf_seekoff(strstreambuf
*this, fpos_int
*ret
, streamoff off
, int way
, int mode
)
10562 char *eback
= basic_streambuf_char_eback(&this->base
);
10563 char *pptr
= basic_streambuf_char_pptr(&this->base
);
10564 char *gptr
= basic_streambuf_char_gptr(&this->base
);
10566 TRACE("(%p %p %Id %d %d)\n", this, ret
, off
, way
, mode
);
10571 if(pptr
> this->seekhigh
)
10572 this->seekhigh
= pptr
;
10574 if((mode
& OPENMODE_in
) && gptr
) {
10575 if(way
==SEEKDIR_cur
&& !(mode
& OPENMODE_out
))
10577 else if(way
== SEEKDIR_end
)
10578 off
+= this->seekhigh
-eback
;
10579 else if(way
!= SEEKDIR_beg
)
10582 if(off
<0 || off
>this->seekhigh
-eback
) {
10585 basic_streambuf_char_gbump(&this->base
, eback
-gptr
+off
);
10586 if((mode
& OPENMODE_out
) && pptr
) {
10587 basic_streambuf_char_setp_next(&this->base
, eback
,
10588 gptr
, basic_streambuf_char_epptr(&this->base
));
10591 }else if((mode
& OPENMODE_out
) && pptr
) {
10592 if(way
== SEEKDIR_cur
)
10594 else if(way
== SEEKDIR_end
)
10595 off
+= this->seekhigh
-eback
;
10596 else if(way
!= SEEKDIR_beg
)
10599 if(off
<0 || off
>this->seekhigh
-eback
)
10602 basic_streambuf_char_pbump(&this->base
, eback
-pptr
+off
);
10611 /* ?seekpos@strstreambuf@std@@MAE?AV?$fpos@H@2@V32@H@Z */
10612 /* ?seekpos@strstreambuf@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
10613 DEFINE_THISCALL_WRAPPER(strstreambuf_seekpos
, 36)
10614 fpos_int
* __thiscall
strstreambuf_seekpos(strstreambuf
*this, fpos_int
*ret
, fpos_int pos
, int mode
)
10616 TRACE("(%p %p %s %d)\n", this, ret
, debugstr_fpos_int(&pos
), mode
);
10618 if(pos
.off
==-1 && pos
.pos
==0 && pos
.state
==0) {
10623 return strstreambuf_seekoff(this, ret
, pos
.pos
+pos
.off
, SEEKDIR_beg
, mode
);
10626 /* ?underflow@strstreambuf@std@@MAEHXZ */
10627 /* ?underflow@strstreambuf@std@@MEAAHXZ */
10628 DEFINE_THISCALL_WRAPPER(strstreambuf_underflow
, 4)
10629 int __thiscall
strstreambuf_underflow(strstreambuf
*this)
10631 char *gptr
= basic_streambuf_char_gptr(&this->base
);
10634 TRACE("(%p)\n", this);
10639 if(gptr
< basic_streambuf_char_egptr(&this->base
))
10640 return (unsigned char)(*gptr
);
10642 pptr
= basic_streambuf_char_gptr(&this->base
);
10643 if(pptr
> this->seekhigh
)
10644 this->seekhigh
= pptr
;
10646 if(this->seekhigh
<= gptr
)
10649 basic_streambuf_char_setg(&this->base
, basic_streambuf_char_eback(&this->base
),
10650 gptr
, this->seekhigh
);
10651 return (unsigned char)(*gptr
);
10654 static inline basic_ios_char
* ostrstream_to_basic_ios(ostrstream
*ptr
)
10656 return (basic_ios_char
*)((char*)ptr
+ostrstream_vbtable
[1]);
10659 static inline ostrstream
* ostrstream_from_basic_ios(basic_ios_char
*ptr
)
10661 return (ostrstream
*)((char*)ptr
-ostrstream_vbtable
[1]);
10664 /* ??0ostrstream@std@@QAE@PADHH@Z */
10665 DEFINE_THISCALL_WRAPPER(ostrstream_ctor
, 20)
10666 ostrstream
* __thiscall
ostrstream_ctor(ostrstream
*this, char *buf
, streamsize size
, int mode
, bool virt_init
)
10668 basic_ios_char
*basic_ios
;
10670 TRACE("(%p %p %Id %d %d)\n", this, buf
, size
, mode
, virt_init
);
10673 this->base
.vbtable
= ostrstream_vbtable
;
10674 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
10675 basic_ios_char_ctor(basic_ios
);
10677 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
10680 strstreambuf_ctor_get_put(&this->buf
, buf
, size
,
10681 buf
&& (mode
& OPENMODE_app
) ? buf
+strlen(buf
) : buf
);
10682 basic_ostream_char_ctor(&this->base
, &this->buf
.base
, FALSE
, TRUE
, FALSE
);
10683 basic_ios
->base
.vtable
= &ostrstream_vtable
;
10687 /* ??1ostrstream@std@@UAE@XZ */
10688 /* ??1ostrstream@std@@UEAA@XZ */
10689 DEFINE_THISCALL_WRAPPER(ostrstream_dtor
, 4)
10690 void __thiscall
ostrstream_dtor(basic_ios_char
*base
)
10692 ostrstream
*this = ostrstream_from_basic_ios(base
);
10694 TRACE("(%p)\n", this);
10696 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base
));
10697 strstreambuf_dtor(&this->buf
);
10700 static void ostrstream_vbase_dtor(ostrstream
*this)
10702 TRACE("(%p)\n", this);
10704 ostrstream_dtor(ostrstream_to_basic_ios(this));
10705 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base
));
10708 DEFINE_THISCALL_WRAPPER(ostrstream_vector_dtor
, 8)
10709 ostrstream
* __thiscall
ostrstream_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
10711 ostrstream
*this = ostrstream_from_basic_ios(base
);
10713 TRACE("(%p %x)\n", this, flags
);
10716 /* we have an array, with the number of elements stored before the first object */
10717 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
10719 for(i
=*ptr
-1; i
>=0; i
--)
10720 ostrstream_vbase_dtor(this+i
);
10721 operator_delete(ptr
);
10723 ostrstream_vbase_dtor(this);
10725 operator_delete(this);
10731 static inline istrstream
* istrstream_from_basic_ios(basic_ios_char
*ptr
)
10733 return (istrstream
*)((char*)ptr
-istrstream_vbtable
[1]);
10736 /* ??1istrstream@std@@UAE@XZ */
10737 /* ??1istrstream@std@@UEAA@XZ */
10738 DEFINE_THISCALL_WRAPPER(istrstream_dtor
, 4)
10739 void __thiscall
istrstream_dtor(basic_ios_char
*base
)
10741 istrstream
*this = istrstream_from_basic_ios(base
);
10743 TRACE("(%p)\n", this);
10745 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base
));
10746 strstreambuf_dtor(&this->buf
);
10749 static inline basic_ios_char
* strstream_to_basic_ios(strstream
*ptr
)
10751 return (basic_ios_char
*)((char*)ptr
+strstream_vbtable1
[1]);
10754 static inline strstream
* strstream_from_basic_ios(basic_ios_char
*ptr
)
10756 return (strstream
*)((char*)ptr
-strstream_vbtable1
[1]);
10759 /* ??$?6MDU?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@ABV?$complex@M@0@@Z */
10760 /* ??$?6MDU?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@AEBV?$complex@M@0@@Z */
10761 basic_ostream_char
* __cdecl
basic_ostream_char_print_complex_float(basic_ostream_char
*ostr
, const complex_float
*val
)
10764 basic_ostringstream_char obj
;
10765 basic_ios_char vbase
;
10767 ios_base
*ostringstream_ios_base
, *ostream_ios_base
;
10769 basic_string_char str
;
10770 basic_ostringstream_char_ctor(&oss
.obj
);
10771 ostringstream_ios_base
= &oss
.vbase
.base
;
10772 ostream_ios_base
= &basic_ostream_char_get_basic_ios(ostr
)->base
;
10773 TRACE("(%p %p)\n", ostr
, val
);
10775 ios_base_imbue(ostringstream_ios_base
, &loc
, IOS_LOCALE(ostream_ios_base
));
10777 ios_base_precision_set(ostringstream_ios_base
, ios_base_precision_get(ostream_ios_base
));
10778 ios_base_flags_set(ostringstream_ios_base
, ios_base_flags_get(ostream_ios_base
));
10780 basic_ostream_char_print_ch(&oss
.obj
.base
, '(');
10781 basic_ostream_char_print_float(&oss
.obj
.base
, val
->real
);
10782 basic_ostream_char_print_ch(&oss
.obj
.base
, ',');
10783 basic_ostream_char_print_float(&oss
.obj
.base
, val
->imag
);
10784 basic_ostream_char_print_ch(&oss
.obj
.base
, ')');
10786 basic_ostringstream_char_str_get(&oss
.obj
, &str
);
10787 basic_ostringstream_char_dtor(&oss
.vbase
);
10788 basic_ostream_char_print_bstr(ostr
, &str
);
10789 MSVCP_basic_string_char_dtor(&str
);
10793 /* ??$?6NDU?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@ABV?$complex@N@0@@Z */
10794 /* ??$?6NDU?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@AEBV?$complex@N@0@@Z */
10795 basic_ostream_char
* __cdecl
basic_ostream_char_print_complex_double(basic_ostream_char
*ostr
, const complex_double
*val
)
10798 basic_ostringstream_char obj
;
10799 basic_ios_char vbase
;
10801 ios_base
*ostringstream_ios_base
, *ostream_ios_base
;
10803 basic_string_char str
;
10804 basic_ostringstream_char_ctor(&oss
.obj
);
10805 ostringstream_ios_base
= &oss
.vbase
.base
;
10806 ostream_ios_base
= &basic_ostream_char_get_basic_ios(ostr
)->base
;
10807 TRACE("(%p %p)\n", ostr
, val
);
10809 ios_base_imbue(ostringstream_ios_base
, &loc
, IOS_LOCALE(ostream_ios_base
));
10811 ios_base_precision_set(ostringstream_ios_base
, ios_base_precision_get(ostream_ios_base
));
10812 ios_base_flags_set(ostringstream_ios_base
, ios_base_flags_get(ostream_ios_base
));
10814 basic_ostream_char_print_ch(&oss
.obj
.base
, '(');
10815 basic_ostream_char_print_double(&oss
.obj
.base
, val
->real
);
10816 basic_ostream_char_print_ch(&oss
.obj
.base
, ',');
10817 basic_ostream_char_print_double(&oss
.obj
.base
, val
->imag
);
10818 basic_ostream_char_print_ch(&oss
.obj
.base
, ')');
10820 basic_ostringstream_char_str_get(&oss
.obj
, &str
);
10821 basic_ostringstream_char_dtor(&oss
.vbase
);
10822 basic_ostream_char_print_bstr(ostr
, &str
);
10823 MSVCP_basic_string_char_dtor(&str
);
10827 /* ??$?6odu?$char_traits@d@std@@@std@@yaaav?$basic_ostream@du?$char_traits@d@std@@@0@aav10@abv?$complex@o@0@@Z */
10828 /* ??$?6ODU?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@AEBV?$complex@O@0@@Z */
10829 basic_ostream_char
* __cdecl
basic_ostream_char_print_complex_ldouble(basic_ostream_char
*ostr
, const complex_double
*val
)
10832 basic_ostringstream_char obj
;
10833 basic_ios_char vbase
;
10835 ios_base
*ostringstream_ios_base
, *ostream_ios_base
;
10837 basic_string_char str
;
10838 basic_ostringstream_char_ctor(&oss
.obj
);
10839 ostringstream_ios_base
= &oss
.vbase
.base
;
10840 ostream_ios_base
= &basic_ostream_char_get_basic_ios(ostr
)->base
;
10841 TRACE("(%p %p)\n", ostr
, val
);
10843 ios_base_imbue(ostringstream_ios_base
, &loc
, IOS_LOCALE(ostream_ios_base
));
10845 ios_base_precision_set(ostringstream_ios_base
, ios_base_precision_get(ostream_ios_base
));
10846 ios_base_flags_set(ostringstream_ios_base
, ios_base_flags_get(ostream_ios_base
));
10848 basic_ostream_char_print_ch(&oss
.obj
.base
, '(');
10849 basic_ostream_char_print_ldouble(&oss
.obj
.base
, val
->real
);
10850 basic_ostream_char_print_ch(&oss
.obj
.base
, ',');
10851 basic_ostream_char_print_ldouble(&oss
.obj
.base
, val
->imag
);
10852 basic_ostream_char_print_ch(&oss
.obj
.base
, ')');
10854 basic_ostringstream_char_str_get(&oss
.obj
, &str
);
10855 basic_ostringstream_char_dtor(&oss
.vbase
);
10856 basic_ostream_char_print_bstr(ostr
, &str
);
10857 MSVCP_basic_string_char_dtor(&str
);
10861 /* ??0strstream@std@@QAE@PADHH@Z */
10862 /* ??0strstream@std@@QEAA@PEAD_JH@Z */
10863 DEFINE_THISCALL_WRAPPER(strstream_ctor
, 20)
10864 strstream
* __thiscall
strstream_ctor(strstream
*this, char *buf
, streamsize size
, int mode
, bool virt_init
)
10866 basic_ios_char
*basic_ios
;
10868 TRACE("(%p %p %Id %d %d)\n", this, buf
, size
, mode
, virt_init
);
10871 this->base
.base1
.vbtable
= strstream_vbtable1
;
10872 this->base
.base2
.vbtable
= strstream_vbtable2
;
10873 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
10874 basic_ios_char_ctor(basic_ios
);
10876 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
10879 strstreambuf_ctor_get_put(&this->buf
, buf
, size
,
10880 buf
&& (mode
& OPENMODE_app
) ? buf
+strlen(buf
) : buf
);
10881 basic_iostream_char_ctor(&this->base
, &this->buf
.base
, FALSE
);
10882 basic_ios
->base
.vtable
= &strstream_vtable
;
10886 /* ??1strstream@std@@UAE@XZ */
10887 /* ??1strstream@std@@UEAA@XZ */
10888 DEFINE_THISCALL_WRAPPER(strstream_dtor
, 4)
10889 void __thiscall
strstream_dtor(basic_ios_char
*base
)
10891 strstream
*this = strstream_from_basic_ios(base
);
10893 TRACE("(%p)\n", this);
10895 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base
));
10896 strstreambuf_dtor(&this->buf
);
10899 static void strstream_vbase_dtor(strstream
*this)
10901 TRACE("(%p)\n", this);
10903 strstream_dtor(strstream_to_basic_ios(this));
10904 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base
.base1
));
10907 DEFINE_THISCALL_WRAPPER(strstream_vector_dtor
, 8)
10908 strstream
* __thiscall
strstream_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
10910 strstream
*this = strstream_from_basic_ios(base
);
10912 TRACE("(%p %x)\n", this, flags
);
10915 /* we have an array, with the number of elements stored before the first object */
10916 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
10918 for(i
=*ptr
-1; i
>=0; i
--)
10919 strstream_vbase_dtor(this+i
);
10920 operator_delete(ptr
);
10922 strstream_vbase_dtor(this);
10924 operator_delete(this);
10930 static void __cdecl
setprecision_func(ios_base
*base
, streamsize prec
)
10932 ios_base_precision_set(base
, prec
);
10935 /* ?setprecision@std@@YA?AU?$_Smanip@H@1@H@Z */
10936 /* ?setprecision@std@@YA?AU?$_Smanip@_J@1@_J@Z */
10937 manip_streamsize
* __cdecl
setprecision(manip_streamsize
*ret
, streamsize prec
)
10939 TRACE("(%p %Id)\n", ret
, prec
);
10941 ret
->pfunc
= setprecision_func
;
10946 static void __cdecl
setw_func(ios_base
*base
, streamsize width
)
10948 ios_base_width_set(base
, width
);
10951 /* ?setw@std@@YA?AU?$_Smanip@H@1@H@Z */
10952 /* ?setw@std@@YA?AU?$_Smanip@_J@1@_J@Z */
10953 manip_streamsize
* __cdecl
setw(manip_streamsize
*ret
, streamsize width
)
10955 TRACE("(%p %Id)\n", ret
, width
);
10957 ret
->pfunc
= setw_func
;
10962 static void __cdecl
resetioflags_func(ios_base
*base
, int mask
)
10964 ios_base_setf_mask(base
, 0, mask
);
10967 /* ?resetiosflags@std@@YA?AU?$_Smanip@H@1@H@Z */
10968 manip_int
* __cdecl
resetiosflags(manip_int
*ret
, int mask
)
10970 TRACE("(%p %d)\n", ret
, mask
);
10972 ret
->pfunc
= resetioflags_func
;
10977 static void __cdecl
setiosflags_func(ios_base
*base
, int mask
)
10979 ios_base_setf_mask(base
, FMTFLAG_mask
, mask
);
10982 /* ?setiosflags@std@@YA?AU?$_Smanip@H@1@H@Z */
10983 manip_int
* __cdecl
setiosflags(manip_int
*ret
, int mask
)
10985 TRACE("(%p %d)\n", ret
, mask
);
10987 ret
->pfunc
= setiosflags_func
;
10992 static void __cdecl
setbase_func(ios_base
*base
, int set_base
)
10995 set_base
= FMTFLAG_dec
;
10996 else if(set_base
== 8)
10997 set_base
= FMTFLAG_oct
;
10998 else if(set_base
== 16)
10999 set_base
= FMTFLAG_hex
;
11003 ios_base_setf_mask(base
, set_base
, FMTFLAG_basefield
);
11006 /* ?setbase@std@@YA?AU?$_Smanip@H@1@H@Z */
11007 manip_int
* __cdecl
setbase(manip_int
*ret
, int base
)
11009 TRACE("(%p %d)\n", ret
, base
);
11011 ret
->pfunc
= setbase_func
;
11016 static basic_filebuf_char filebuf_char_stdin
;
11017 /* ?cin@std@@3V?$basic_istream@DU?$char_traits@D@std@@@1@A */
11019 basic_istream_char obj
;
11020 basic_ios_char vbase
;
11023 static basic_filebuf_wchar filebuf_short_stdin
;
11024 /* ?wcin@std@@3V?$basic_istream@GU?$char_traits@G@std@@@1@A */
11026 basic_istream_wchar obj
;
11027 basic_ios_wchar vbase
;
11028 } ucin
= { { 0 } };
11030 static basic_filebuf_char filebuf_char_stdout
;
11031 /* ?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
11033 basic_ostream_char obj
;
11034 basic_ios_char vbase
;
11035 } cout
= { { 0 } };
11037 static basic_filebuf_wchar filebuf_short_stdout
;
11038 /* ?wcout@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
11040 basic_ostream_wchar obj
;
11041 basic_ios_wchar vbase
;
11042 } ucout
= { { 0 } };
11044 static basic_filebuf_char filebuf_char_stderr
;
11045 /* ?cerr@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
11047 basic_ostream_char obj
;
11048 basic_ios_char vbase
;
11049 } cerr
= { { 0 } };
11051 static basic_filebuf_wchar filebuf_short_stderr
;
11052 /* ?wcerr@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
11054 basic_ostream_wchar obj
;
11055 basic_ios_wchar vbase
;
11056 } ucerr
= { { 0 } };
11058 static basic_filebuf_char filebuf_char_log
;
11059 /* ?clog@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
11061 basic_ostream_char obj
;
11062 basic_ios_char vbase
;
11063 } MSVCP_clog
= { { 0 } };
11065 static basic_filebuf_wchar filebuf_short_log
;
11066 /* ?wclog@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
11068 basic_ostream_wchar obj
;
11069 basic_ios_wchar vbase
;
11070 } uclog
= { { 0 } };
11072 /* ?_Init_cnt@Init@ios_base@std@@0HA */
11073 int ios_base_Init__Init_cnt
= -1;
11075 /* ??0Init@ios_base@std@@QAE@XZ */
11076 /* ??0Init@ios_base@std@@QEAA@XZ */
11077 DEFINE_THISCALL_WRAPPER(ios_base_Init_ctor
, 4)
11078 void* __thiscall
ios_base_Init_ctor(void *this)
11080 TRACE("(%p)\n", this);
11082 if(ios_base_Init__Init_cnt
< 0)
11083 ios_base_Init__Init_cnt
= 1;
11085 ios_base_Init__Init_cnt
++;
11089 /* ??1Init@ios_base@std@@QAE@XZ */
11090 /* ??1Init@ios_base@std@@QEAA@XZ */
11091 DEFINE_THISCALL_WRAPPER(ios_base_Init_dtor
, 4)
11092 void __thiscall
ios_base_Init_dtor(void *this)
11094 TRACE("(%p)\n", this);
11096 ios_base_Init__Init_cnt
--;
11097 if(!ios_base_Init__Init_cnt
) {
11098 basic_ostream_char_flush(&cout
.obj
);
11099 basic_ostream_char_flush(&cerr
.obj
);
11100 basic_ostream_char_flush(&MSVCP_clog
.obj
);
11104 /* ??4Init@ios_base@std@@QAEAAV012@ABV012@@Z */
11105 /* ??4Init@ios_base@std@@QEAAAEAV012@AEBV012@@Z */
11106 DEFINE_THISCALL_WRAPPER(ios_base_Init_op_assign
, 8)
11107 void* __thiscall
ios_base_Init_op_assign(void *this, void *rhs
)
11109 TRACE("(%p %p)\n", this, rhs
);
11113 /* ?_Init_cnt@_Winit@std@@0HA */
11114 int _Winit__Init_cnt
= -1;
11116 /* ??0_Winit@std@@QAE@XZ */
11117 /* ??0_Winit@std@@QEAA@XZ */
11118 DEFINE_THISCALL_WRAPPER(_Winit_ctor
, 4)
11119 void* __thiscall
_Winit_ctor(void *this)
11121 TRACE("(%p)\n", this);
11123 if(_Winit__Init_cnt
< 0)
11124 _Winit__Init_cnt
= 1;
11126 _Winit__Init_cnt
++;
11131 /* ??1_Winit@std@@QAE@XZ */
11132 /* ??1_Winit@std@@QAE@XZ */
11133 DEFINE_THISCALL_WRAPPER(_Winit_dtor
, 4)
11134 void __thiscall
_Winit_dtor(void *this)
11136 TRACE("(%p)\n", this);
11138 _Winit__Init_cnt
--;
11139 if(!_Winit__Init_cnt
) {
11140 basic_ostream_short_flush(&ucout
.obj
);
11141 basic_ostream_short_flush(&ucerr
.obj
);
11142 basic_ostream_short_flush(&uclog
.obj
);
11146 /* ??4_Winit@std@@QAEAAV01@ABV01@@Z */
11147 /* ??4_Winit@std@@QEAAAEAV01@AEBV01@@Z */
11148 DEFINE_THISCALL_WRAPPER(_Winit_op_assign
, 8)
11149 void* __thiscall
_Winit_op_assign(void *this, void *rhs
)
11151 TRACE("(%p %p)\n", this, rhs
);
11155 void init_io(void *base
)
11158 init_iosb_rtti(base
);
11159 init_ios_base_rtti(base
);
11160 init_basic_ios_char_rtti(base
);
11161 init_basic_ios_short_rtti(base
);
11162 init_basic_streambuf_char_rtti(base
);
11163 init_basic_streambuf_short_rtti(base
);
11164 init_basic_filebuf_char_rtti(base
);
11165 init_basic_filebuf_short_rtti(base
);
11166 init_basic_stringbuf_char_rtti(base
);
11167 init_basic_stringbuf_short_rtti(base
);
11168 init_basic_ostream_char_rtti(base
);
11169 init_basic_ostream_short_rtti(base
);
11170 init_basic_istream_char_rtti(base
);
11171 init_basic_istream_short_rtti(base
);
11172 init_basic_iostream_char_rtti(base
);
11173 init_basic_iostream_short_rtti(base
);
11174 init_basic_ofstream_char_rtti(base
);
11175 init_basic_ofstream_short_rtti(base
);
11176 init_basic_ifstream_char_rtti(base
);
11177 init_basic_ifstream_short_rtti(base
);
11178 init_basic_fstream_char_rtti(base
);
11179 init_basic_fstream_short_rtti(base
);
11180 init_basic_ostringstream_char_rtti(base
);
11181 init_basic_ostringstream_short_rtti(base
);
11182 init_basic_istringstream_char_rtti(base
);
11183 init_basic_istringstream_short_rtti(base
);
11184 init_basic_stringstream_char_rtti(base
);
11185 init_basic_stringstream_short_rtti(base
);
11186 init_strstreambuf_rtti(base
);
11187 init_strstream_rtti(base
);
11188 init_ostrstream_rtti(base
);
11191 basic_filebuf_char_ctor_file(&filebuf_char_stdin
, stdin
);
11192 basic_istream_char_ctor(&cin
.obj
, &filebuf_char_stdin
.base
, FALSE
/*FIXME*/, TRUE
);
11194 basic_filebuf_short_ctor_file(&filebuf_short_stdin
, stdin
);
11195 basic_istream_short_ctor(&ucin
.obj
, &filebuf_short_stdin
.base
, FALSE
/*FIXME*/, TRUE
);
11197 basic_filebuf_char_ctor_file(&filebuf_char_stdout
, stdout
);
11198 basic_ostream_char_ctor(&cout
.obj
, &filebuf_char_stdout
.base
, FALSE
/*FIXME*/, TRUE
, TRUE
);
11200 basic_filebuf_short_ctor_file(&filebuf_short_stdout
, stdout
);
11201 basic_ostream_short_ctor(&ucout
.obj
, &filebuf_short_stdout
.base
, FALSE
/*FIXME*/, TRUE
, TRUE
);
11203 basic_filebuf_char_ctor_file(&filebuf_char_stderr
, stderr
);
11204 basic_ostream_char_ctor(&cerr
.obj
, &filebuf_char_stderr
.base
, FALSE
/*FIXME*/, TRUE
, TRUE
);
11206 basic_filebuf_short_ctor_file(&filebuf_short_stderr
, stderr
);
11207 basic_ostream_short_ctor(&ucerr
.obj
, &filebuf_short_stderr
.base
, FALSE
/*FIXME*/, TRUE
, TRUE
);
11209 basic_filebuf_char_ctor_file(&filebuf_char_log
, stderr
);
11210 basic_ostream_char_ctor(&MSVCP_clog
.obj
, &filebuf_char_log
.base
, FALSE
/*FIXME*/, TRUE
, TRUE
);
11212 basic_filebuf_short_ctor_file(&filebuf_short_log
, stderr
);
11213 basic_ostream_short_ctor(&uclog
.obj
, &filebuf_short_log
.base
, FALSE
/*FIXME*/, TRUE
, TRUE
);
11218 basic_istream_char_vbase_dtor(&cin
.obj
);
11219 basic_filebuf_char_dtor(&filebuf_char_stdin
);
11221 basic_istream_short_vbase_dtor(&ucin
.obj
);
11222 basic_filebuf_short_dtor(&filebuf_short_stdin
);
11224 basic_ostream_char_vbase_dtor(&cout
.obj
);
11225 basic_filebuf_char_dtor(&filebuf_char_stdout
);
11227 basic_ostream_short_vbase_dtor(&ucout
.obj
);
11228 basic_filebuf_short_dtor(&filebuf_short_stdout
);
11230 basic_ostream_char_vbase_dtor(&cerr
.obj
);
11231 basic_filebuf_char_dtor(&filebuf_char_stderr
);
11233 basic_ostream_short_vbase_dtor(&ucerr
.obj
);
11234 basic_filebuf_short_dtor(&filebuf_short_stderr
);
11236 basic_ostream_char_vbase_dtor(&MSVCP_clog
.obj
);
11237 basic_filebuf_char_dtor(&filebuf_char_log
);
11239 basic_ostream_short_vbase_dtor(&uclog
.obj
);
11240 basic_filebuf_short_dtor(&filebuf_short_log
);