2 * Copyright 2011 Piotr Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
29 #include "wine/debug.h"
30 WINE_DEFAULT_DEBUG_CHANNEL(msvcp
);
32 #define SECSPERDAY 86400
33 /* 1601 to 1970 is 369 years plus 89 leap days */
34 #define SECS_1601_TO_1970 ((369 * 365 + 89) * (ULONGLONG)SECSPERDAY)
35 #define TICKSPERSEC 10000000
36 #define TICKS_1601_TO_1970 (SECS_1601_TO_1970 * TICKSPERSEC)
39 FILE* __cdecl
__acrt_iob_func(unsigned);
43 #define stdin __acrt_iob_func(STDIN_FILENO)
44 #define stdout __acrt_iob_func(STDOUT_FILENO)
45 #define stderr __acrt_iob_func(STDERR_FILENO)
48 /* ?_Index@ios_base@std@@0HA */
49 int ios_base_Index
= 0;
50 /* ?_Sync@ios_base@std@@0_NA */
51 MSVCP_bool ios_base_Sync
= FALSE
;
55 __int64
DECLSPEC_ALIGN(8) pos
;
59 static inline const char* debugstr_fpos_mbstatet(fpos_mbstatet
*fpos
)
61 return wine_dbg_sprintf("fpos(%s %s %d)", wine_dbgstr_longlong(fpos
->off
),
62 wine_dbgstr_longlong(fpos
->pos
), MBSTATET_TO_INT(&fpos
->state
));
66 void (__cdecl
*pfunc
)(ios_base
*, streamsize
);
71 void (__cdecl
*pfunc
)(ios_base
*, int);
79 } basic_filebuf__Initfl
;
82 basic_streambuf_char base
;
87 basic_string_char
*conv
;
101 basic_streambuf_wchar base
;
106 basic_string_char
*conv
;
110 MSVCP_bool wrotesome
;
117 } basic_filebuf_wchar
;
120 STRINGBUF_allocated
= 1,
121 STRINGBUF_no_write
= 2,
122 STRINGBUF_no_read
= 4,
123 STRINGBUF_append
= 8,
124 STRINGBUF_at_end
= 16
125 } basic_stringbuf_state
;
128 basic_streambuf_char base
;
131 char allocator
; /* empty struct */
132 } basic_stringbuf_char
;
135 basic_streambuf_wchar base
;
138 char allocator
; /* empty struct */
139 } basic_stringbuf_wchar
;
143 basic_streambuf_char
*strbuf
;
144 struct _basic_ostream_char
*stream
;
150 basic_streambuf_wchar
*strbuf
;
151 struct _basic_ostream_wchar
*stream
;
155 typedef struct _basic_ostream_char
{
157 /* virtual inheritance
158 * basic_ios_char basic_ios;
160 } basic_ostream_char
;
162 typedef struct _basic_ostream_wchar
{
164 /* virtual inheritance
165 * basic_ios_wchar basic_ios;
167 } basic_ostream_wchar
;
172 /* virtual inheritance
173 * basic_ios_char basic_ios;
175 } basic_istream_char
;
180 /* virtual inheritance
181 * basic_ios_wchar basic_ios;
183 } basic_istream_wchar
;
186 basic_istream_char base1
;
187 basic_ostream_char base2
;
188 /* virtual inheritance
189 * basic_ios_char basic_ios;
191 } basic_iostream_char
;
194 basic_istream_wchar base1
;
195 basic_ostream_wchar base2
;
196 /* virtual inheritance
197 * basic_ios_wchar basic_ios;
199 } basic_iostream_wchar
;
202 basic_ostream_char base
;
203 basic_filebuf_char filebuf
;
204 /* virtual inheritance
205 * basic_ios_char basic_ios;
207 } basic_ofstream_char
;
210 basic_ostream_wchar base
;
211 basic_filebuf_wchar filebuf
;
212 /* virtual inheritance
213 * basic_ios_wchar basic_ios;
215 } basic_ofstream_wchar
;
218 basic_istream_char base
;
219 basic_filebuf_char filebuf
;
220 /* virtual inheritance
221 * basic_ios_char basic_ios;
223 } basic_ifstream_char
;
226 basic_istream_wchar base
;
227 basic_filebuf_wchar filebuf
;
228 /* virtual inheritance
229 * basic_ios_wchar basic_ios;
231 } basic_ifstream_wchar
;
234 basic_iostream_char base
;
235 basic_filebuf_char filebuf
;
236 /* virtual inheritance
237 * basic_ios_char basic_ios;
239 } basic_fstream_char
;
242 basic_iostream_wchar base
;
243 basic_filebuf_wchar filebuf
;
244 /* virtual inheritance
245 * basic_ios_char basic_ios;
247 } basic_fstream_wchar
;
250 basic_ostream_char base
;
251 basic_stringbuf_char strbuf
;
252 /* virtual inheritance
253 * basic_ios_char basic_ios;
255 } basic_ostringstream_char
;
258 basic_ostream_wchar base
;
259 basic_stringbuf_wchar strbuf
;
260 /* virtual inheritance
261 * basic_ios_wchar basic_ios;
263 } basic_ostringstream_wchar
;
266 basic_istream_char base
;
267 basic_stringbuf_char strbuf
;
268 /* virtual inheritance
269 * basic_ios_char basic_ios;
271 } basic_istringstream_char
;
274 basic_istream_wchar base
;
275 basic_stringbuf_wchar strbuf
;
276 /* virtual inheritance
277 * basic_ios_wchar basic_ios;
279 } basic_istringstream_wchar
;
282 basic_iostream_char base
;
283 basic_stringbuf_char strbuf
;
284 /* virtual inheritance
285 * basic_ios_char basic_ios;
287 } basic_stringstream_char
;
290 basic_iostream_wchar base
;
291 basic_stringbuf_wchar strbuf
;
292 /* virtual inheritance
293 * basic_ios_wchar basic_ios;
295 } basic_stringstream_wchar
;
298 STRSTATE_Allocated
= 1,
299 STRSTATE_Constant
= 2,
300 STRSTATE_Dynamic
= 4,
302 } strstreambuf__Strstate
;
305 basic_streambuf_char base
;
310 void* (__cdecl
*palloc
)(MSVCP_size_t
);
311 void (__cdecl
*pfree
)(void*);
315 basic_ostream_char base
;
317 /* virtual inheritance
318 * basic_ios_char basic_ios;
323 basic_istream_char base
;
325 /* virtual inheritance
326 * basic_ios_char basic_ios;
331 basic_iostream_char base
;
333 /* virtual inheritance
334 * basic_ios_char basic_ios;
345 status_unknown
, file_not_found
, regular_file
, directory_file
,
346 symlink_file
, block_file
, character_file
, fifo_file
, socket_file
,
350 #if _MSVCP_VER >= 110
351 #define BASIC_IOS_VTORDISP 1
352 #define INIT_BASIC_IOS_VTORDISP(basic_ios) ((int*)basic_ios)[-1] = 0
354 #define BASIC_IOS_VTORDISP 0
355 #define INIT_BASIC_IOS_VTORDISP(basic_ios)
358 #define VBTABLE_ENTRY(class, offset, vbase, vtordisp) ALIGNED_SIZE(sizeof(class)+vtordisp*sizeof(int), TYPE_ALIGNMENT(vbase))-offset
359 #define VBTABLE_BASIC_IOS_ENTRY(class, offset) VBTABLE_ENTRY(class, offset, basic_ios_char, BASIC_IOS_VTORDISP)
361 extern const vtable_ptr MSVCP_iosb_vtable
;
363 /* ??_7ios_base@std@@6B@ */
364 extern const vtable_ptr MSVCP_ios_base_vtable
;
366 /* ??_7?$basic_ios@DU?$char_traits@D@std@@@std@@6B@ */
367 extern const vtable_ptr MSVCP_basic_ios_char_vtable
;
369 /* ??_7?$basic_ios@_WU?$char_traits@_W@std@@@std@@6B@ */
370 extern const vtable_ptr MSVCP_basic_ios_wchar_vtable
;
372 /* ??_7?$basic_ios@GU?$char_traits@G@std@@@std@@6B@ */
373 extern const vtable_ptr MSVCP_basic_ios_short_vtable
;
375 /* ??_7?$basic_streambuf@DU?$char_traits@D@std@@@std@@6B@ */
376 extern const vtable_ptr MSVCP_basic_streambuf_char_vtable
;
378 /* ??_7?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@6B@ */
379 extern const vtable_ptr MSVCP_basic_streambuf_wchar_vtable
;
381 /* ??_7?$basic_streambuf@GU?$char_traits@G@std@@@std@@6B@ */
382 extern const vtable_ptr MSVCP_basic_streambuf_short_vtable
;
384 /* ??_7?$basic_filebuf@DU?$char_traits@D@std@@@std@@6B@ */
385 extern const vtable_ptr MSVCP_basic_filebuf_char_vtable
;
387 /* ??_7?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@6B@ */
388 extern const vtable_ptr MSVCP_basic_filebuf_wchar_vtable
;
390 /* ??_7?$basic_filebuf@GU?$char_traits@G@std@@@std@@6B@ */
391 extern const vtable_ptr MSVCP_basic_filebuf_short_vtable
;
393 /* ??_7?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
394 extern const vtable_ptr MSVCP_basic_stringbuf_char_vtable
;
396 /* ??_7?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
397 extern const vtable_ptr MSVCP_basic_stringbuf_wchar_vtable
;
399 /* ??_7?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
400 extern const vtable_ptr MSVCP_basic_stringbuf_short_vtable
;
402 /* ??_8?$basic_ostream@DU?$char_traits@D@std@@@std@@7B@ */
403 const int basic_ostream_char_vbtable
[] = {0,
404 VBTABLE_BASIC_IOS_ENTRY(basic_ostream_char
, 0)};
405 /* ??_7?$basic_ostream@DU?$char_traits@D@std@@@std@@6B@ */
406 extern const vtable_ptr MSVCP_basic_ostream_char_vtable
;
408 /* ??_8?$basic_ostream@_WU?$char_traits@_W@std@@@std@@7B@ */
409 const int basic_ostream_wchar_vbtable
[] = {0,
410 VBTABLE_BASIC_IOS_ENTRY(basic_ostream_wchar
, 0)};
411 /* ??_7?$basic_ostream@_WU?$char_traits@_W@std@@@std@@6B@ */
412 extern const vtable_ptr MSVCP_basic_ostream_wchar_vtable
;
414 /* ??_8?$basic_ostream@GU?$char_traits@G@std@@@std@@7B@ */
415 const int basic_ostream_short_vbtable
[] = {0,
416 VBTABLE_BASIC_IOS_ENTRY(basic_ostream_wchar
, 0)};
417 /* ??_7?$basic_ostream@GU?$char_traits@G@std@@@std@@6B@ */
418 extern const vtable_ptr MSVCP_basic_ostream_short_vtable
;
420 /* ??_8?$basic_istream@DU?$char_traits@D@std@@@std@@7B@ */
421 const int basic_istream_char_vbtable
[] = {0,
422 VBTABLE_BASIC_IOS_ENTRY(basic_istream_char
, 0)};
423 /* ??_7?$basic_istream@DU?$char_traits@D@std@@@std@@6B@ */
424 extern const vtable_ptr MSVCP_basic_istream_char_vtable
;
426 /* ??_8?$basic_istream@_WU?$char_traits@_W@std@@@std@@7B@ */
427 const int basic_istream_wchar_vbtable
[] = {0,
428 VBTABLE_BASIC_IOS_ENTRY(basic_istream_wchar
, 0)};
429 /* ??_7?$basic_istream@_WU?$char_traits@_W@std@@@std@@6B@ */
430 extern const vtable_ptr MSVCP_basic_istream_wchar_vtable
;
432 /* ??_8?$basic_istream@GU?$char_traits@G@std@@@std@@7B@ */
433 const int basic_istream_short_vbtable
[] = {0,
434 VBTABLE_BASIC_IOS_ENTRY(basic_istream_wchar
, 0)};
435 /* ??_7?$basic_istream@GU?$char_traits@G@std@@@std@@6B@ */
436 extern const vtable_ptr MSVCP_basic_istream_short_vtable
;
438 /* ??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
439 const int basic_iostream_char_vbtable1
[] = {0,
440 VBTABLE_BASIC_IOS_ENTRY(basic_iostream_char
, 0)};
441 /* ??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
442 const int basic_iostream_char_vbtable2
[] = {0,
443 VBTABLE_BASIC_IOS_ENTRY(basic_iostream_char
, FIELD_OFFSET(basic_iostream_char
, base2
))};
444 /* ??_7?$basic_iostream@DU?$char_traits@D@std@@@std@@6B@ */
445 extern const vtable_ptr MSVCP_basic_iostream_char_vtable
;
447 /* ??_8?$basic_iostream@_WU?$char_traits@_W@std@@@std@@7B?$basic_istream@_WU?$char_traits@_W@std@@@1@@ */
448 /* ??_8?$basic_iostream@GU?$char_traits@G@std@@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@ */
449 const int basic_iostream_wchar_vbtable1
[] = {0,
450 VBTABLE_BASIC_IOS_ENTRY(basic_iostream_wchar
, 0)};
451 /* ??_8?$basic_iostream@_WU?$char_traits@_W@std@@@std@@7B?$basic_ostream@_WU?$char_traits@_W@std@@@1@@ */
452 /* ??_8?$basic_iostream@GU?$char_traits@G@std@@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@ */
453 const int basic_iostream_wchar_vbtable2
[] = {0,
454 VBTABLE_BASIC_IOS_ENTRY(basic_iostream_wchar
, FIELD_OFFSET(basic_iostream_wchar
, base2
))};
455 /* ??_7?$basic_iostream@_WU?$char_traits@_W@std@@@std@@6B@ */
456 extern const vtable_ptr MSVCP_basic_iostream_wchar_vtable
;
457 /* ??_7?$basic_iostream@GU?$char_traits@G@std@@@std@@6B@ */
458 extern const vtable_ptr MSVCP_basic_iostream_short_vtable
;
460 /* ??_8?$basic_ofstream@DU?$char_traits@D@std@@@std@@7B@ */
461 const int basic_ofstream_char_vbtable
[] = {0,
462 VBTABLE_BASIC_IOS_ENTRY(basic_ofstream_char
, 0)};
463 /* ??_7?$basic_ofstream@DU?$char_traits@D@std@@@std@@6B@ */
464 extern const vtable_ptr MSVCP_basic_ofstream_char_vtable
;
466 /* ??_8?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@7B@ */
467 const int basic_ofstream_wchar_vbtable
[] = {0,
468 VBTABLE_BASIC_IOS_ENTRY(basic_ofstream_wchar
, 0)};
469 /* ??_7?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@6B@ */
470 extern const vtable_ptr MSVCP_basic_ofstream_wchar_vtable
;
472 /* ??_8?$basic_ofstream@GU?$char_traits@G@std@@@std@@7B@ */
473 const int basic_ofstream_short_vbtable
[] = {0,
474 VBTABLE_BASIC_IOS_ENTRY(basic_ofstream_wchar
, 0)};
475 /* ??_7?$basic_ofstream@GU?$char_traits@G@std@@@std@@6B@ */
476 extern const vtable_ptr MSVCP_basic_ofstream_short_vtable
;
478 /* ??_8?$basic_ifstream@DU?$char_traits@D@std@@@std@@7B@ */
479 const int basic_ifstream_char_vbtable
[] = {0,
480 VBTABLE_BASIC_IOS_ENTRY(basic_ifstream_char
, 0)};
481 /* ??_7?$basic_ifstream@DU?$char_traits@D@std@@@std@@6B@ */
482 extern const vtable_ptr MSVCP_basic_ifstream_char_vtable
;
484 /* ??_8?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@7B@ */
485 const int basic_ifstream_wchar_vbtable
[] = {0,
486 VBTABLE_BASIC_IOS_ENTRY(basic_ifstream_wchar
, 0)};
487 /* ??_7?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@6B@ */
488 extern const vtable_ptr MSVCP_basic_ifstream_wchar_vtable
;
490 /* ??_8?$basic_ifstream@GU?$char_traits@G@std@@@std@@7B@ */
491 const int basic_ifstream_short_vbtable
[] = {0,
492 VBTABLE_BASIC_IOS_ENTRY(basic_ifstream_wchar
, 0)};
493 /* ??_7?$basic_ifstream@GU?$char_traits@G@std@@@std@@6B@ */
494 extern const vtable_ptr MSVCP_basic_ifstream_short_vtable
;
496 /* ??_8?$basic_fstream@DU?$char_traits@D@std@@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
497 const int basic_fstream_char_vbtable1
[] = {0,
498 VBTABLE_BASIC_IOS_ENTRY(basic_fstream_char
, 0)};
499 /* ??_8?$basic_fstream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
500 const int basic_fstream_char_vbtable2
[] = {0,
501 VBTABLE_BASIC_IOS_ENTRY(basic_fstream_char
, FIELD_OFFSET(basic_fstream_char
, base
.base2
))};
502 /* ??_7?$basic_fstream@DU?$char_traits@D@std@@@std@@6B@ */
503 extern const vtable_ptr MSVCP_basic_fstream_char_vtable
;
505 /* ??_8?$basic_fstream@_WU?$char_traits@_W@std@@@std@@7B?$basic_istream@_WU?$char_traits@_W@std@@@1@@ */
506 /* ??_8?$basic_fstream@GU?$char_traits@G@std@@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@ */
507 const int basic_fstream_wchar_vbtable1
[] = {0,
508 VBTABLE_BASIC_IOS_ENTRY(basic_fstream_wchar
, 0)};
509 /* ??_8?$basic_fstream@_WU?$char_traits@_W@std@@@std@@7B?$basic_ostream@_WU?$char_traits@_W@std@@@1@@ */
510 /* ??_8?$basic_fstream@GU?$char_traits@G@std@@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@ */
511 const int basic_fstream_wchar_vbtable2
[] = {0,
512 VBTABLE_BASIC_IOS_ENTRY(basic_fstream_wchar
, FIELD_OFFSET(basic_fstream_wchar
, base
.base2
))};
513 /* ??_7?$basic_fstream@_WU?$char_traits@_W@std@@@std@@6B@ */
514 extern const vtable_ptr MSVCP_basic_fstream_wchar_vtable
;
515 /* ??_7?$basic_fstream@GU?$char_traits@G@std@@@std@@6B@ */
516 extern const vtable_ptr MSVCP_basic_fstream_short_vtable
;
518 /* ??_8?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B@ */
519 const int basic_ostringstream_char_vbtable
[] = {0,
520 VBTABLE_BASIC_IOS_ENTRY(basic_ostringstream_char
, 0)};
521 /* ??_7?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
522 extern const vtable_ptr MSVCP_basic_ostringstream_char_vtable
;
524 /* ??_8?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B@ */
525 const int basic_ostringstream_wchar_vbtable
[] = {0,
526 VBTABLE_BASIC_IOS_ENTRY(basic_ostringstream_wchar
, 0)};
527 /* ??_7?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
528 extern const vtable_ptr MSVCP_basic_ostringstream_wchar_vtable
;
530 /* ??_8?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B@ */
531 const int basic_ostringstream_short_vbtable
[] = {0,
532 VBTABLE_BASIC_IOS_ENTRY(basic_ostringstream_wchar
, 0)};
533 /* ??_7?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
534 extern const vtable_ptr MSVCP_basic_ostringstream_short_vtable
;
536 /* ??_8?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B@ */
537 const int basic_istringstream_char_vbtable
[] = {0,
538 VBTABLE_BASIC_IOS_ENTRY(basic_istringstream_char
, 0)};
539 /* ??_7?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
540 extern const vtable_ptr MSVCP_basic_istringstream_char_vtable
;
542 /* ??_8?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B@ */
543 const int basic_istringstream_wchar_vbtable
[] = {0,
544 VBTABLE_BASIC_IOS_ENTRY(basic_istringstream_wchar
, 0)};
545 /* ??_7?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
546 extern const vtable_ptr MSVCP_basic_istringstream_wchar_vtable
;
548 /* ??_8?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B@ */
549 const int basic_istringstream_short_vbtable
[] = {0,
550 VBTABLE_BASIC_IOS_ENTRY(basic_istringstream_wchar
, 0)};
551 /* ??_7?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
552 extern const vtable_ptr MSVCP_basic_istringstream_short_vtable
;
554 /* ??_8?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
555 const int basic_stringstream_char_vbtable1
[] = {0,
556 VBTABLE_BASIC_IOS_ENTRY(basic_stringstream_char
, 0)};
557 /* ??_8?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
558 const int basic_stringstream_char_vbtable2
[] = {0,
559 VBTABLE_BASIC_IOS_ENTRY(basic_stringstream_char
, FIELD_OFFSET(basic_stringstream_char
, base
.base2
))};
560 /* ??_7?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
561 extern const vtable_ptr MSVCP_basic_stringstream_char_vtable
;
563 /* ??_8?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B?$basic_istream@_WU?$char_traits@_W@std@@@1@@ */
564 const int basic_stringstream_wchar_vbtable1
[] = {0,
565 VBTABLE_BASIC_IOS_ENTRY(basic_stringstream_wchar
, 0)};
566 /* ??_8?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B?$basic_ostream@_WU?$char_traits@_W@std@@@1@@ */
567 const int basic_stringstream_wchar_vbtable2
[] = {0,
568 VBTABLE_BASIC_IOS_ENTRY(basic_stringstream_wchar
, FIELD_OFFSET(basic_stringstream_wchar
, base
.base2
))};
569 /* ??_7?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
570 extern const vtable_ptr MSVCP_basic_stringstream_wchar_vtable
;
572 /* ??_8?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@ */
573 const int basic_stringstream_short_vbtable1
[] = {0,
574 VBTABLE_BASIC_IOS_ENTRY(basic_stringstream_wchar
, 0)};
575 /* ??_8?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@ */
576 const int basic_stringstream_short_vbtable2
[] = {0,
577 VBTABLE_BASIC_IOS_ENTRY(basic_stringstream_wchar
, FIELD_OFFSET(basic_stringstream_wchar
, base
.base2
))};
578 /* ??_7?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
579 extern const vtable_ptr MSVCP_basic_stringstream_short_vtable
;
581 /* ??_7strstreambuf@std@@6B */
582 extern const vtable_ptr MSVCP_strstreambuf_vtable
;
584 static const int ostrstream_vbtable
[] = {0, VBTABLE_BASIC_IOS_ENTRY(ostrstream
, 0)};
585 extern const vtable_ptr MSVCP_ostrstream_vtable
;
587 static const int istrstream_vbtable
[] = {0, VBTABLE_BASIC_IOS_ENTRY(istrstream
, 0)};
589 static const int strstream_vbtable1
[] = {0, VBTABLE_BASIC_IOS_ENTRY(strstream
, 0)};
590 static const int strstream_vbtable2
[] = {0,
591 VBTABLE_BASIC_IOS_ENTRY(strstream
, FIELD_OFFSET(strstream
, base
.base2
))};
592 extern const vtable_ptr MSVCP_strstream_vtable
;
594 DEFINE_RTTI_DATA0(iosb
, 0, ".?AV?$_Iosb@H@std@@")
595 DEFINE_RTTI_DATA1(ios_base
, 0, &iosb_rtti_base_descriptor
, ".?AV?$_Iosb@H@std@@")
596 DEFINE_RTTI_DATA2(basic_ios_char
, 0, &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
597 ".?AV?$basic_ios@DU?$char_traits@D@std@@@std@@")
598 DEFINE_RTTI_DATA2(basic_ios_wchar
, 0, &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
599 ".?AV?$basic_ios@_WU?$char_traits@_W@std@@@std@@")
600 DEFINE_RTTI_DATA2(basic_ios_short
, 0, &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
601 ".?AV?$basic_ios@GU?$char_traits@G@std@@@std@@")
602 DEFINE_RTTI_DATA0(basic_streambuf_char
, 0,
603 ".?AV?$basic_streambuf@DU?$char_traits@D@std@@@std@@")
604 DEFINE_RTTI_DATA0(basic_streambuf_wchar
, 0,
605 ".?AV?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@")
606 DEFINE_RTTI_DATA0(basic_streambuf_short
, 0,
607 ".?AV?$basic_streambuf@GU?$char_traits@G@std@@@std@@")
608 DEFINE_RTTI_DATA1(basic_filebuf_char
, 0, &basic_streambuf_char_rtti_base_descriptor
,
609 ".?AV?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@")
610 DEFINE_RTTI_DATA1(basic_filebuf_wchar
, 0, &basic_streambuf_wchar_rtti_base_descriptor
,
611 ".?AV?$basic_filebuf@GU?$char_traits@G@std@@@std@@")
612 DEFINE_RTTI_DATA1(basic_filebuf_short
, 0, &basic_streambuf_short_rtti_base_descriptor
,
613 ".?AV?$basic_filebuf@DU?$char_traits@D@std@@@std@@")
614 DEFINE_RTTI_DATA1(basic_stringbuf_char
, 0, &basic_streambuf_char_rtti_base_descriptor
,
615 ".?AV?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@")
616 DEFINE_RTTI_DATA1(basic_stringbuf_wchar
, 0, &basic_streambuf_wchar_rtti_base_descriptor
,
617 ".?AV?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@")
618 DEFINE_RTTI_DATA1(basic_stringbuf_short
, 0, &basic_streambuf_short_rtti_base_descriptor
,
619 ".?AV?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@")
620 DEFINE_RTTI_DATA3(basic_ostream_char
, sizeof(basic_ostream_char
), &basic_ios_char_rtti_base_descriptor
,
621 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
622 ".?AV?$basic_ostream@DU?$char_traits@D@std@@@std@@")
623 DEFINE_RTTI_DATA3(basic_ostream_wchar
, sizeof(basic_ostream_wchar
), &basic_ios_wchar_rtti_base_descriptor
,
624 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
625 ".?AV?$basic_ostream@_WU?$char_traits@_W@std@@@std@@")
626 DEFINE_RTTI_DATA3(basic_ostream_short
, sizeof(basic_ostream_wchar
), &basic_ios_short_rtti_base_descriptor
,
627 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
628 ".?AV?$basic_ostream@GU?$char_traits@G@std@@@std@@")
629 DEFINE_RTTI_DATA3(basic_istream_char
, sizeof(basic_istream_char
), &basic_ios_char_rtti_base_descriptor
,
630 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
631 ".?AV?$basic_istream@DU?$char_traits@D@std@@@std@@")
632 DEFINE_RTTI_DATA3(basic_istream_wchar
, sizeof(basic_istream_wchar
), &basic_ios_wchar_rtti_base_descriptor
,
633 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
634 ".?AV?$basic_istream@_WU?$char_traits@_W@std@@@std@@")
635 DEFINE_RTTI_DATA3(basic_istream_short
, sizeof(basic_istream_wchar
), &basic_ios_short_rtti_base_descriptor
,
636 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
637 ".?AV?$basic_istream@GU?$char_traits@G@std@@@std@@")
638 DEFINE_RTTI_DATA8(basic_iostream_char
, sizeof(basic_iostream_char
),
639 &basic_istream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
640 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
641 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
642 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
643 ".?AV?$basic_iostream@DU?$char_traits@D@std@@@std@@")
644 DEFINE_RTTI_DATA8(basic_iostream_wchar
, sizeof(basic_iostream_wchar
),
645 &basic_istream_wchar_rtti_base_descriptor
, &basic_ios_wchar_rtti_base_descriptor
,
646 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
647 &basic_ostream_wchar_rtti_base_descriptor
, &basic_ios_wchar_rtti_base_descriptor
,
648 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
649 ".?AV?$basic_iostream@_WU?$char_traits@_W@std@@@std@@")
650 DEFINE_RTTI_DATA8(basic_iostream_short
, sizeof(basic_iostream_wchar
),
651 &basic_istream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
652 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
653 &basic_ostream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
654 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
655 ".?AV?$basic_iostream@GU?$char_traits@G@std@@@std@@")
656 DEFINE_RTTI_DATA4(basic_ofstream_char
, sizeof(basic_ofstream_char
),
657 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
658 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
659 ".?AV?$basic_ofstream@DU?$char_traits@D@std@@@std@@")
660 DEFINE_RTTI_DATA4(basic_ofstream_wchar
, sizeof(basic_ofstream_wchar
),
661 &basic_ostream_wchar_rtti_base_descriptor
, &basic_ios_wchar_rtti_base_descriptor
,
662 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
663 ".?AV?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@")
664 DEFINE_RTTI_DATA4(basic_ofstream_short
, sizeof(basic_ofstream_wchar
),
665 &basic_ostream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
666 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
667 ".?AV?$basic_ofstream@GU?$char_traits@G@std@@@std@@")
668 DEFINE_RTTI_DATA4(basic_ifstream_char
, sizeof(basic_ifstream_char
),
669 &basic_istream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
670 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
671 ".?AV?$basic_ifstream@DU?$char_traits@D@std@@@std@@")
672 DEFINE_RTTI_DATA4(basic_ifstream_wchar
, sizeof(basic_ifstream_wchar
),
673 &basic_istream_wchar_rtti_base_descriptor
, &basic_ios_wchar_rtti_base_descriptor
,
674 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
675 ".?AV?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@")
676 DEFINE_RTTI_DATA4(basic_ifstream_short
, sizeof(basic_ifstream_wchar
),
677 &basic_istream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
678 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
679 ".?AV?$basic_ifstream@GU?$char_traits@G@std@@@std@@")
680 DEFINE_RTTI_DATA8(basic_fstream_char
, sizeof(basic_fstream_char
),
681 &basic_istream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
682 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
683 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
684 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
685 ".?AV?$basic_fstream@DU?$char_traits@D@std@@@std@@")
686 DEFINE_RTTI_DATA8(basic_fstream_wchar
, sizeof(basic_fstream_wchar
),
687 &basic_istream_wchar_rtti_base_descriptor
, &basic_ios_wchar_rtti_base_descriptor
,
688 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
689 &basic_ostream_wchar_rtti_base_descriptor
, &basic_ios_wchar_rtti_base_descriptor
,
690 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
691 ".?AV?$basic_fstream@_WU?$char_traits@_W@std@@@std@@")
692 DEFINE_RTTI_DATA8(basic_fstream_short
, sizeof(basic_fstream_wchar
),
693 &basic_istream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
694 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
695 &basic_ostream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
696 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
697 ".?AV?$basic_fstream@GU?$char_traits@G@std@@@std@@")
698 DEFINE_RTTI_DATA4(basic_ostringstream_char
, sizeof(basic_ostringstream_char
),
699 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
700 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
701 ".?AV?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@")
702 DEFINE_RTTI_DATA4(basic_ostringstream_wchar
, sizeof(basic_ostringstream_wchar
),
703 &basic_ostream_wchar_rtti_base_descriptor
, &basic_ios_wchar_rtti_base_descriptor
,
704 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
705 ".?AV?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@")
706 DEFINE_RTTI_DATA4(basic_ostringstream_short
, sizeof(basic_ostringstream_wchar
),
707 &basic_ostream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
708 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
709 ".?AV?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@")
710 DEFINE_RTTI_DATA4(basic_istringstream_char
, sizeof(basic_istringstream_char
),
711 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
712 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
713 ".?AV?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@")
714 DEFINE_RTTI_DATA4(basic_istringstream_wchar
, sizeof(basic_istringstream_wchar
),
715 &basic_ostream_wchar_rtti_base_descriptor
, &basic_ios_wchar_rtti_base_descriptor
,
716 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
717 ".?AV?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@")
718 DEFINE_RTTI_DATA4(basic_istringstream_short
, sizeof(basic_istringstream_wchar
),
719 &basic_ostream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
720 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
721 ".?AV?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@")
722 DEFINE_RTTI_DATA8(basic_stringstream_char
, sizeof(basic_stringstream_char
),
723 &basic_istream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
724 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
725 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
726 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
727 ".?AV?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@")
728 DEFINE_RTTI_DATA8(basic_stringstream_wchar
, sizeof(basic_stringstream_wchar
),
729 &basic_istream_wchar_rtti_base_descriptor
, &basic_ios_wchar_rtti_base_descriptor
,
730 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
731 &basic_ostream_wchar_rtti_base_descriptor
, &basic_ios_wchar_rtti_base_descriptor
,
732 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
733 ".?AV?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@")
734 DEFINE_RTTI_DATA8(basic_stringstream_short
, sizeof(basic_stringstream_wchar
),
735 &basic_istream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
736 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
737 &basic_ostream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
738 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
739 ".?AV?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@")
740 DEFINE_RTTI_DATA1(strstreambuf
, sizeof(strstreambuf
),
741 &basic_streambuf_char_rtti_base_descriptor
, ".?AVstrstreambuf@std@@")
742 DEFINE_RTTI_DATA4(ostrstream
, sizeof(ostrstream
),
743 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
744 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
745 "?AVostrstream@std@@")
746 DEFINE_RTTI_DATA8(strstream
, sizeof(strstream
),
747 &basic_istream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
748 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
749 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
750 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
751 "?AVstrstream@std@@")
754 void __asm_dummy_vtables(void) {
757 VTABLE_ADD_FUNC(iosb_vector_dtor
));
758 __ASM_VTABLE(ios_base
,
759 VTABLE_ADD_FUNC(ios_base_vector_dtor
));
760 __ASM_VTABLE(basic_ios_char
,
761 VTABLE_ADD_FUNC(basic_ios_char_vector_dtor
)
762 #if _MSVCP_VER == 110
763 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
764 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
767 __ASM_VTABLE(basic_ios_wchar
,
768 VTABLE_ADD_FUNC(basic_ios_wchar_vector_dtor
)
769 #if _MSVCP_VER == 110
770 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
771 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
774 __ASM_VTABLE(basic_ios_short
,
775 VTABLE_ADD_FUNC(basic_ios_wchar_vector_dtor
)
776 #if _MSVCP_VER == 110
777 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
778 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
781 __ASM_VTABLE(basic_streambuf_char
,
782 VTABLE_ADD_FUNC(basic_streambuf_char_vector_dtor
)
783 #if _MSVCP_VER >= 100
784 VTABLE_ADD_FUNC(basic_streambuf_char__Lock
)
785 VTABLE_ADD_FUNC(basic_streambuf_char__Unlock
)
787 VTABLE_ADD_FUNC(basic_streambuf_char_overflow
)
788 VTABLE_ADD_FUNC(basic_streambuf_char_pbackfail
)
789 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc
)
790 VTABLE_ADD_FUNC(basic_streambuf_char_underflow
)
791 VTABLE_ADD_FUNC(basic_streambuf_char_uflow
)
792 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn
)
793 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
794 VTABLE_ADD_FUNC(basic_streambuf_char__Xsgetn_s
)
796 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn
)
797 VTABLE_ADD_FUNC(basic_streambuf_char_seekoff
)
798 VTABLE_ADD_FUNC(basic_streambuf_char_seekpos
)
799 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf
)
800 VTABLE_ADD_FUNC(basic_streambuf_char_sync
)
801 VTABLE_ADD_FUNC(basic_streambuf_char_imbue
));
802 __ASM_VTABLE(basic_streambuf_wchar
,
803 VTABLE_ADD_FUNC(basic_streambuf_wchar_vector_dtor
)
804 #if _MSVCP_VER >= 100
805 VTABLE_ADD_FUNC(basic_streambuf_wchar__Lock
)
806 VTABLE_ADD_FUNC(basic_streambuf_wchar__Unlock
)
808 VTABLE_ADD_FUNC(basic_streambuf_wchar_overflow
)
809 VTABLE_ADD_FUNC(basic_streambuf_wchar_pbackfail
)
810 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc
)
811 VTABLE_ADD_FUNC(basic_streambuf_wchar_underflow
)
812 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow
)
813 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn
)
814 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
815 VTABLE_ADD_FUNC(basic_streambuf_wchar__Xsgetn_s
)
817 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn
)
818 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekoff
)
819 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekpos
)
820 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf
)
821 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync
)
822 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue
));
823 __ASM_VTABLE(basic_streambuf_short
,
824 VTABLE_ADD_FUNC(basic_streambuf_wchar_vector_dtor
)
825 #if _MSVCP_VER >= 100
826 VTABLE_ADD_FUNC(basic_streambuf_wchar__Lock
)
827 VTABLE_ADD_FUNC(basic_streambuf_wchar__Unlock
)
829 VTABLE_ADD_FUNC(basic_streambuf_wchar_overflow
)
830 VTABLE_ADD_FUNC(basic_streambuf_wchar_pbackfail
)
831 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc
)
832 VTABLE_ADD_FUNC(basic_streambuf_wchar_underflow
)
833 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow
)
834 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn
)
835 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
836 VTABLE_ADD_FUNC(basic_streambuf_wchar__Xsgetn_s
)
838 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn
)
839 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekoff
)
840 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekpos
)
841 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf
)
842 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync
)
843 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue
));
844 __ASM_VTABLE(basic_filebuf_char
,
845 VTABLE_ADD_FUNC(basic_filebuf_char_vector_dtor
)
846 #if _MSVCP_VER >= 100
847 VTABLE_ADD_FUNC(basic_streambuf_char__Lock
)
848 VTABLE_ADD_FUNC(basic_streambuf_char__Unlock
)
850 VTABLE_ADD_FUNC(basic_filebuf_char_overflow
)
851 VTABLE_ADD_FUNC(basic_filebuf_char_pbackfail
)
852 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc
)
853 VTABLE_ADD_FUNC(basic_filebuf_char_underflow
)
854 VTABLE_ADD_FUNC(basic_filebuf_char_uflow
)
855 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn
)
856 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
857 VTABLE_ADD_FUNC(basic_streambuf_char__Xsgetn_s
)
859 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn
)
860 VTABLE_ADD_FUNC(basic_filebuf_char_seekoff
)
861 VTABLE_ADD_FUNC(basic_filebuf_char_seekpos
)
862 VTABLE_ADD_FUNC(basic_filebuf_char_setbuf
)
863 VTABLE_ADD_FUNC(basic_filebuf_char_sync
)
864 VTABLE_ADD_FUNC(basic_filebuf_char_imbue
));
865 __ASM_VTABLE(basic_filebuf_wchar
,
866 VTABLE_ADD_FUNC(basic_filebuf_wchar_vector_dtor
)
867 #if _MSVCP_VER >= 100
868 VTABLE_ADD_FUNC(basic_streambuf_wchar__Lock
)
869 VTABLE_ADD_FUNC(basic_streambuf_wchar__Unlock
)
871 VTABLE_ADD_FUNC(basic_filebuf_wchar_overflow
)
872 VTABLE_ADD_FUNC(basic_filebuf_wchar_pbackfail
)
873 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc
)
874 VTABLE_ADD_FUNC(basic_filebuf_wchar_underflow
)
875 VTABLE_ADD_FUNC(basic_filebuf_wchar_uflow
)
876 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn
)
877 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
878 VTABLE_ADD_FUNC(basic_streambuf_wchar__Xsgetn_s
)
880 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn
)
881 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekoff
)
882 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekpos
)
883 VTABLE_ADD_FUNC(basic_filebuf_wchar_setbuf
)
884 VTABLE_ADD_FUNC(basic_filebuf_wchar_sync
)
885 VTABLE_ADD_FUNC(basic_filebuf_wchar_imbue
));
886 __ASM_VTABLE(basic_filebuf_short
,
887 VTABLE_ADD_FUNC(basic_filebuf_wchar_vector_dtor
)
888 #if _MSVCP_VER >= 100
889 VTABLE_ADD_FUNC(basic_streambuf_wchar__Lock
)
890 VTABLE_ADD_FUNC(basic_streambuf_wchar__Unlock
)
892 VTABLE_ADD_FUNC(basic_filebuf_wchar_overflow
)
893 VTABLE_ADD_FUNC(basic_filebuf_wchar_pbackfail
)
894 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc
)
895 VTABLE_ADD_FUNC(basic_filebuf_wchar_underflow
)
896 VTABLE_ADD_FUNC(basic_filebuf_wchar_uflow
)
897 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn
)
898 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
899 VTABLE_ADD_FUNC(basic_streambuf_wchar__Xsgetn_s
)
901 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn
)
902 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekoff
)
903 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekpos
)
904 VTABLE_ADD_FUNC(basic_filebuf_short_setbuf
)
905 VTABLE_ADD_FUNC(basic_filebuf_wchar_sync
)
906 VTABLE_ADD_FUNC(basic_filebuf_short_imbue
));
907 __ASM_VTABLE(basic_stringbuf_char
,
908 VTABLE_ADD_FUNC(basic_stringbuf_char_vector_dtor
)
909 VTABLE_ADD_FUNC(basic_stringbuf_char_overflow
)
910 VTABLE_ADD_FUNC(basic_stringbuf_char_pbackfail
)
911 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc
)
912 VTABLE_ADD_FUNC(basic_stringbuf_char_underflow
)
913 VTABLE_ADD_FUNC(basic_streambuf_char_uflow
)
914 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn
)
915 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
916 VTABLE_ADD_FUNC(basic_streambuf_char__Xsgetn_s
)
918 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn
)
919 VTABLE_ADD_FUNC(basic_stringbuf_char_seekoff
)
920 VTABLE_ADD_FUNC(basic_stringbuf_char_seekpos
)
921 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf
)
922 VTABLE_ADD_FUNC(basic_streambuf_char_sync
)
923 VTABLE_ADD_FUNC(basic_streambuf_char_imbue
));
924 __ASM_VTABLE(basic_stringbuf_wchar
,
925 VTABLE_ADD_FUNC(basic_stringbuf_wchar_vector_dtor
)
926 VTABLE_ADD_FUNC(basic_stringbuf_wchar_overflow
)
927 VTABLE_ADD_FUNC(basic_stringbuf_wchar_pbackfail
)
928 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc
)
929 VTABLE_ADD_FUNC(basic_stringbuf_wchar_underflow
)
930 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow
)
931 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn
)
932 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
933 VTABLE_ADD_FUNC(basic_streambuf_wchar__Xsgetn_s
)
935 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn
)
936 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekoff
)
937 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekpos
)
938 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf
)
939 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync
)
940 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue
));
941 __ASM_VTABLE(basic_stringbuf_short
,
942 VTABLE_ADD_FUNC(basic_stringbuf_wchar_vector_dtor
)
943 VTABLE_ADD_FUNC(basic_stringbuf_wchar_overflow
)
944 VTABLE_ADD_FUNC(basic_stringbuf_wchar_pbackfail
)
945 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc
)
946 VTABLE_ADD_FUNC(basic_stringbuf_wchar_underflow
)
947 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow
)
948 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn
)
949 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
950 VTABLE_ADD_FUNC(basic_streambuf_wchar__Xsgetn_s
)
952 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn
)
953 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekoff
)
954 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekpos
)
955 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf
)
956 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync
)
957 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue
));
958 __ASM_VTABLE(basic_ostream_char
,
959 VTABLE_ADD_FUNC(basic_ostream_char_vector_dtor
)
960 #if _MSVCP_VER == 110
961 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
962 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
965 __ASM_VTABLE(basic_ostream_wchar
,
966 VTABLE_ADD_FUNC(basic_ostream_wchar_vector_dtor
)
967 #if _MSVCP_VER == 110
968 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
969 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
972 __ASM_VTABLE(basic_ostream_short
,
973 VTABLE_ADD_FUNC(basic_ostream_wchar_vector_dtor
)
974 #if _MSVCP_VER == 110
975 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
976 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
979 __ASM_VTABLE(basic_istream_char
,
980 VTABLE_ADD_FUNC(basic_istream_char_vector_dtor
)
981 #if _MSVCP_VER == 110
982 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
983 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
986 __ASM_VTABLE(basic_istream_wchar
,
987 VTABLE_ADD_FUNC(basic_istream_wchar_vector_dtor
)
988 #if _MSVCP_VER == 110
989 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
990 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
993 __ASM_VTABLE(basic_istream_short
,
994 VTABLE_ADD_FUNC(basic_istream_wchar_vector_dtor
)
995 #if _MSVCP_VER == 110
996 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
997 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
1000 __ASM_VTABLE(basic_iostream_char
,
1001 VTABLE_ADD_FUNC(basic_iostream_char_vector_dtor
)
1002 #if _MSVCP_VER == 110
1003 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
1004 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
1007 __ASM_VTABLE(basic_iostream_wchar
,
1008 VTABLE_ADD_FUNC(basic_iostream_wchar_vector_dtor
)
1009 #if _MSVCP_VER == 110
1010 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
1011 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
1014 __ASM_VTABLE(basic_iostream_short
,
1015 VTABLE_ADD_FUNC(basic_iostream_wchar_vector_dtor
)
1016 #if _MSVCP_VER == 110
1017 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
1018 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
1021 __ASM_VTABLE(basic_ofstream_char
,
1022 VTABLE_ADD_FUNC(basic_ofstream_char_vector_dtor
)
1023 #if _MSVCP_VER == 110
1024 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
1025 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
1028 __ASM_VTABLE(basic_ofstream_wchar
,
1029 VTABLE_ADD_FUNC(basic_ofstream_wchar_vector_dtor
)
1030 #if _MSVCP_VER == 110
1031 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
1032 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
1035 __ASM_VTABLE(basic_ofstream_short
,
1036 VTABLE_ADD_FUNC(basic_ofstream_wchar_vector_dtor
)
1037 #if _MSVCP_VER == 110
1038 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
1039 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
1042 __ASM_VTABLE(basic_ifstream_char
,
1043 VTABLE_ADD_FUNC(basic_ifstream_char_vector_dtor
)
1044 #if _MSVCP_VER == 110
1045 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
1046 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
1049 __ASM_VTABLE(basic_ifstream_wchar
,
1050 VTABLE_ADD_FUNC(basic_ifstream_wchar_vector_dtor
)
1051 #if _MSVCP_VER == 110
1052 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
1053 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
1056 __ASM_VTABLE(basic_ifstream_short
,
1057 VTABLE_ADD_FUNC(basic_ifstream_wchar_vector_dtor
)
1058 #if _MSVCP_VER == 110
1059 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
1060 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
1063 __ASM_VTABLE(basic_fstream_char
,
1064 VTABLE_ADD_FUNC(basic_fstream_char_vector_dtor
)
1065 #if _MSVCP_VER == 110
1066 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
1067 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
1070 __ASM_VTABLE(basic_fstream_wchar
,
1071 VTABLE_ADD_FUNC(basic_fstream_wchar_vector_dtor
)
1072 #if _MSVCP_VER == 110
1073 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
1074 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
1077 __ASM_VTABLE(basic_fstream_short
,
1078 VTABLE_ADD_FUNC(basic_fstream_wchar_vector_dtor
)
1079 #if _MSVCP_VER == 110
1080 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
1081 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
1084 __ASM_VTABLE(basic_ostringstream_char
,
1085 VTABLE_ADD_FUNC(basic_ostringstream_char_vector_dtor
)
1086 #if _MSVCP_VER == 110
1087 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
1088 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
1091 __ASM_VTABLE(basic_ostringstream_wchar
,
1092 VTABLE_ADD_FUNC(basic_ostringstream_wchar_vector_dtor
)
1093 #if _MSVCP_VER == 110
1094 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
1095 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
1098 __ASM_VTABLE(basic_ostringstream_short
,
1099 VTABLE_ADD_FUNC(basic_ostringstream_wchar_vector_dtor
)
1100 #if _MSVCP_VER == 110
1101 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
1102 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
1105 __ASM_VTABLE(basic_istringstream_char
,
1106 VTABLE_ADD_FUNC(basic_istringstream_char_vector_dtor
)
1107 #if _MSVCP_VER == 110
1108 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
1109 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
1112 __ASM_VTABLE(basic_istringstream_wchar
,
1113 VTABLE_ADD_FUNC(basic_istringstream_wchar_vector_dtor
)
1114 #if _MSVCP_VER == 110
1115 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
1116 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
1119 __ASM_VTABLE(basic_istringstream_short
,
1120 VTABLE_ADD_FUNC(basic_istringstream_wchar_vector_dtor
)
1121 #if _MSVCP_VER == 110
1122 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
1123 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
1126 __ASM_VTABLE(basic_stringstream_char
,
1127 VTABLE_ADD_FUNC(basic_stringstream_char_vector_dtor
)
1128 #if _MSVCP_VER == 110
1129 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
1130 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
1133 __ASM_VTABLE(basic_stringstream_wchar
,
1134 VTABLE_ADD_FUNC(basic_stringstream_wchar_vector_dtor
)
1135 #if _MSVCP_VER == 110
1136 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
1137 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
1140 __ASM_VTABLE(basic_stringstream_short
,
1141 VTABLE_ADD_FUNC(basic_stringstream_wchar_vector_dtor
)
1142 #if _MSVCP_VER == 110
1143 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
1144 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
1147 __ASM_VTABLE(strstreambuf
,
1148 VTABLE_ADD_FUNC(strstreambuf_vector_dtor
)
1149 VTABLE_ADD_FUNC(strstreambuf_overflow
)
1150 VTABLE_ADD_FUNC(strstreambuf_pbackfail
)
1151 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc
)
1152 VTABLE_ADD_FUNC(strstreambuf_underflow
)
1153 VTABLE_ADD_FUNC(basic_streambuf_char_uflow
)
1154 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn
)
1155 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
1156 VTABLE_ADD_FUNC(basic_streambuf_char__Xsgetn_s
)
1158 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn
)
1159 VTABLE_ADD_FUNC(strstreambuf_seekoff
)
1160 VTABLE_ADD_FUNC(strstreambuf_seekpos
)
1161 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf
)
1162 VTABLE_ADD_FUNC(basic_streambuf_char_sync
)
1163 VTABLE_ADD_FUNC(basic_streambuf_char_imbue
));
1164 __ASM_VTABLE(ostrstream
,
1165 VTABLE_ADD_FUNC(ostrstream_vector_dtor
)
1166 #if _MSVCP_VER == 110
1167 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
1168 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
1171 __ASM_VTABLE(strstream
,
1172 VTABLE_ADD_FUNC(strstream_vector_dtor
)
1173 #if _MSVCP_VER == 110
1174 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp1
)
1175 VTABLE_ADD_FUNC(basic_ios__Add_vtordisp2
)
1182 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
1183 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
1184 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp_next
, 16)
1185 void __thiscall
basic_streambuf_char_setp_next(basic_streambuf_char
*this, char *first
, char *next
, char *last
)
1187 TRACE("(%p %p %p %p)\n", this, first
, next
, last
);
1191 this->wsize
= last
-next
;
1194 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD0@Z */
1195 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD0@Z */
1196 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp
, 12)
1197 void __thiscall
basic_streambuf_char_setp(basic_streambuf_char
*this, char *first
, char *last
)
1199 basic_streambuf_char_setp_next(this, first
, first
, last
);
1202 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
1203 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
1204 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setg
, 16)
1205 void __thiscall
basic_streambuf_char_setg(basic_streambuf_char
*this, char *first
, char *next
, char *last
)
1207 TRACE("(%p %p %p %p)\n", this, first
, next
, last
);
1211 this->rsize
= last
-next
;
1214 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXXZ */
1215 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXXZ */
1216 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init_empty
, 4)
1217 void __thiscall
basic_streambuf_char__Init_empty(basic_streambuf_char
*this)
1219 TRACE("(%p)\n", this);
1221 this->prbuf
= &this->rbuf
;
1222 this->pwbuf
= &this->wbuf
;
1223 this->prpos
= &this->rpos
;
1224 this->pwpos
= &this->wpos
;
1225 this->prsize
= &this->rsize
;
1226 this->pwsize
= &this->wsize
;
1228 basic_streambuf_char_setp(this, NULL
, NULL
);
1229 basic_streambuf_char_setg(this, NULL
, NULL
, NULL
);
1232 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@W4_Uninitialized@1@@Z */
1233 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
1234 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor_uninitialized
, 8)
1235 basic_streambuf_char
* __thiscall
basic_streambuf_char_ctor_uninitialized(basic_streambuf_char
*this, int uninitialized
)
1237 TRACE("(%p %d)\n", this, uninitialized
);
1238 this->vtable
= &MSVCP_basic_streambuf_char_vtable
;
1239 #if _MSVCP_VER >= 70 && _MSVCP_VER <= 100
1240 mutex_ctor(&this->lock
);
1245 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@XZ */
1246 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@XZ */
1247 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor
, 4)
1248 basic_streambuf_char
* __thiscall
basic_streambuf_char_ctor(basic_streambuf_char
*this)
1250 TRACE("(%p)\n", this);
1252 this->vtable
= &MSVCP_basic_streambuf_char_vtable
;
1253 #if _MSVCP_VER >= 70 && _MSVCP_VER <= 100
1254 mutex_ctor(&this->lock
);
1256 #if _MSVCP_VER >= 70
1257 this->loc
= MSVCRT_operator_new(sizeof(locale
));
1259 locale_ctor(IOS_LOCALE(this));
1260 basic_streambuf_char__Init_empty(this);
1265 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
1266 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
1267 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_dtor
, 4)
1268 void __thiscall
basic_streambuf_char_dtor(basic_streambuf_char
*this)
1270 TRACE("(%p)\n", this);
1272 #if _MSVCP_VER >= 70 && _MSVCP_VER <= 100
1273 mutex_dtor(&this->lock
);
1275 locale_dtor(IOS_LOCALE(this));
1276 #if _MSVCP_VER >= 70
1277 MSVCRT_operator_delete(this->loc
);
1281 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_vector_dtor
, 8)
1282 basic_streambuf_char
* __thiscall
basic_streambuf_char_vector_dtor(basic_streambuf_char
*this, unsigned int flags
)
1284 TRACE("(%p %x)\n", this, flags
);
1286 /* we have an array, with the number of elements stored before the first object */
1287 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1289 for(i
=*ptr
-1; i
>=0; i
--)
1290 basic_streambuf_char_dtor(this+i
);
1291 MSVCRT_operator_delete(ptr
);
1293 basic_streambuf_char_dtor(this);
1295 MSVCRT_operator_delete(this);
1301 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
1302 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
1303 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gnavail
, 4)
1304 streamsize __thiscall
basic_streambuf_char__Gnavail(const basic_streambuf_char
*this)
1306 TRACE("(%p)\n", this);
1307 return *this->prpos
? *this->prsize
: 0;
1310 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
1311 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
1312 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gndec
, 4)
1313 char* __thiscall
basic_streambuf_char__Gndec(basic_streambuf_char
*this)
1315 TRACE("(%p)\n", this);
1318 return *this->prpos
;
1321 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
1322 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
1323 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gninc
, 4)
1324 char* __thiscall
basic_streambuf_char__Gninc(basic_streambuf_char
*this)
1326 TRACE("(%p)\n", this);
1328 return (*this->prpos
)++;
1331 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
1332 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
1333 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gnpreinc
, 4)
1334 char* __thiscall
basic_streambuf_char__Gnpreinc(basic_streambuf_char
*this)
1336 TRACE("(%p)\n", this);
1339 return *this->prpos
;
1342 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAPAD0PAH001@Z */
1343 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAPEAD0PEAH001@Z */
1344 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init
, 28)
1345 void __thiscall
basic_streambuf_char__Init(basic_streambuf_char
*this, char **gf
, char **gn
, int *gc
, char **pf
, char **pn
, int *pc
)
1347 TRACE("(%p %p %p %p %p %p %p)\n", this, gf
, gn
, gc
, pf
, pn
, pc
);
1357 /* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1358 /* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1359 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Lock
, 4)
1360 #if _MSVCP_VER >= 100
1361 #define call_basic_streambuf_char__Lock(this) CALL_VTBL_FUNC(this, 4, void, (basic_streambuf_char*), (this))
1363 #define call_basic_streambuf_char__Lock(this) basic_streambuf_char__Lock(this)
1365 void __thiscall
basic_streambuf_char__Lock(basic_streambuf_char
*this)
1367 TRACE("(%p)\n", this);
1368 #if _MSVCP_VER >= 70 && _MSVCP_VER <= 100
1369 mutex_lock(&this->lock
);
1373 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
1374 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
1375 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Pnavail
, 4)
1376 streamsize __thiscall
basic_streambuf_char__Pnavail(const basic_streambuf_char
*this)
1378 TRACE("(%p)\n", this);
1379 return *this->pwpos
? *this->pwsize
: 0;
1382 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
1383 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
1384 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Pninc
, 4)
1385 char* __thiscall
basic_streambuf_char__Pninc(basic_streambuf_char
*this)
1387 TRACE("(%p)\n", this);
1389 return (*this->pwpos
)++;
1392 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1393 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
1394 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_underflow
, 4)
1395 #if _MSVCP_VER >= 100
1396 #define call_basic_streambuf_char_underflow(this) CALL_VTBL_FUNC(this, 24, int, (basic_streambuf_char*), (this))
1398 #define call_basic_streambuf_char_underflow(this) CALL_VTBL_FUNC(this, 16, int, (basic_streambuf_char*), (this))
1400 int __thiscall
basic_streambuf_char_underflow(basic_streambuf_char
*this)
1402 TRACE("(%p)\n", this);
1406 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1407 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
1408 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_uflow
, 4)
1409 #if _MSVCP_VER >= 100
1410 #define call_basic_streambuf_char_uflow(this) CALL_VTBL_FUNC(this, 28, int, (basic_streambuf_char*), (this))
1412 #define call_basic_streambuf_char_uflow(this) CALL_VTBL_FUNC(this, 20, int, (basic_streambuf_char*), (this))
1414 int __thiscall
basic_streambuf_char_uflow(basic_streambuf_char
*this)
1418 TRACE("(%p)\n", this);
1420 if(call_basic_streambuf_char_underflow(this)==EOF
)
1423 ret
= (unsigned char)**this->prpos
;
1429 /* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADIH@Z */
1430 /* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_K_J@Z */
1431 #if STREAMSIZE_BITS == 64
1432 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Xsgetn_s
, 20)
1434 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Xsgetn_s
, 16)
1436 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
1437 #define call_basic_streambuf_char__Xsgetn_s(this, ptr, size, count) CALL_VTBL_FUNC(this, 28, \
1438 streamsize, (basic_streambuf_char*, char*, MSVCP_size_t, streamsize), (this, ptr, size, count))
1440 #define call_basic_streambuf_char__Xsgetn_s(this, ptr, size, count) basic_streambuf_char__Xsgetn_s(this, ptr, size, count)
1442 streamsize __thiscall
basic_streambuf_char__Xsgetn_s(basic_streambuf_char
*this, char *ptr
, MSVCP_size_t size
, streamsize count
)
1444 streamsize copied
, chunk
;
1447 TRACE("(%p %p %lu %s)\n", this, ptr
, size
, wine_dbgstr_longlong(count
));
1449 for(copied
=0; copied
<count
&& size
;) {
1450 chunk
= basic_streambuf_char__Gnavail(this);
1451 if(chunk
> count
-copied
)
1452 chunk
= count
-copied
;
1455 memcpy_s(ptr
+copied
, size
, *this->prpos
, chunk
);
1456 *this->prpos
+= chunk
;
1457 *this->prsize
-= chunk
;
1460 }else if((c
= call_basic_streambuf_char_uflow(this)) != EOF
) {
1472 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
1473 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
1474 #if STREAMSIZE_BITS == 64
1475 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Sgetn_s
, 20)
1477 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Sgetn_s
, 16)
1479 streamsize __thiscall
basic_streambuf_char__Sgetn_s(basic_streambuf_char
*this, char *ptr
, MSVCP_size_t size
, streamsize count
)
1481 TRACE("(%p %p %lu %s)\n", this, ptr
, size
, wine_dbgstr_longlong(count
));
1482 return call_basic_streambuf_char__Xsgetn_s(this, ptr
, size
, count
);
1485 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1486 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1487 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Unlock
, 4)
1488 #if _MSVCP_VER >= 100
1489 #define call_basic_streambuf_char__Unlock(this) CALL_VTBL_FUNC(this, 8, void, (basic_streambuf_char*), (this))
1491 #define call_basic_streambuf_char__Unlock(this) basic_streambuf_char__Unlock(this)
1493 void __thiscall
basic_streambuf_char__Unlock(basic_streambuf_char
*this)
1495 TRACE("(%p)\n", this);
1496 #if _MSVCP_VER >= 70 && _MSVCP_VER <= 100
1497 mutex_unlock(&this->lock
);
1501 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1502 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1503 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_eback
, 4)
1504 char* __thiscall
basic_streambuf_char_eback(const basic_streambuf_char
*this)
1506 TRACE("(%p)\n", this);
1507 return *this->prbuf
;
1510 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1511 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1512 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gptr
, 4)
1513 char* __thiscall
basic_streambuf_char_gptr(const basic_streambuf_char
*this)
1515 TRACE("(%p)\n", this);
1516 return *this->prpos
;
1519 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1520 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1521 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_egptr
, 4)
1522 char* __thiscall
basic_streambuf_char_egptr(const basic_streambuf_char
*this)
1524 TRACE("(%p)\n", this);
1525 return *this->prpos
+*this->prsize
;
1528 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1529 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1530 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_epptr
, 4)
1531 char* __thiscall
basic_streambuf_char_epptr(const basic_streambuf_char
*this)
1533 TRACE("(%p)\n", this);
1534 return *this->pwpos
+*this->pwsize
;
1537 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
1538 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
1539 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gbump
, 8)
1540 void __thiscall
basic_streambuf_char_gbump(basic_streambuf_char
*this, int off
)
1542 TRACE("(%p %d)\n", this, off
);
1543 *this->prpos
+= off
;
1544 *this->prsize
-= off
;
1547 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@XZ */
1548 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QBE?AVlocale@2@XZ */
1549 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@XZ */
1550 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEBA?AVlocale@2@XZ */
1551 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_getloc
, 8)
1552 locale
* __thiscall
basic_streambuf_char_getloc(const basic_streambuf_char
*this, locale
*ret
)
1554 TRACE("(%p)\n", this);
1555 return locale_copy_ctor(ret
, IOS_LOCALE(this));
1558 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
1559 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */
1560 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_imbue
, 8)
1561 #if _MSVCP_VER >= 100
1562 #define call_basic_streambuf_char_imbue(this, loc) CALL_VTBL_FUNC(this, 56, void, (basic_streambuf_char*, const locale*), (this, loc))
1563 #elif _MSVCP_VER >= 80
1564 #define call_basic_streambuf_char_imbue(this, loc) CALL_VTBL_FUNC(this, 52, void, (basic_streambuf_char*, const locale*), (this, loc))
1566 #define call_basic_streambuf_char_imbue(this, loc) CALL_VTBL_FUNC(this, 48, void, (basic_streambuf_char*, const locale*), (this, loc))
1568 void __thiscall
basic_streambuf_char_imbue(basic_streambuf_char
*this, const locale
*loc
)
1570 TRACE("(%p %p)\n", this, loc
);
1573 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
1574 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
1575 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_overflow
, 8)
1576 #if _MSVCP_VER >= 100
1577 #define call_basic_streambuf_char_overflow(this, ch) CALL_VTBL_FUNC(this, 12, int, (basic_streambuf_char*, int), (this, ch))
1579 #define call_basic_streambuf_char_overflow(this, ch) CALL_VTBL_FUNC(this, 4, int, (basic_streambuf_char*, int), (this, ch))
1581 int __thiscall
basic_streambuf_char_overflow(basic_streambuf_char
*this, int ch
)
1583 TRACE("(%p %d)\n", this, ch
);
1587 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
1588 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
1589 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbackfail
, 8)
1590 #if _MSVCP_VER >= 100
1591 #define call_basic_streambuf_char_pbackfail(this, ch) CALL_VTBL_FUNC(this, 16, int, (basic_streambuf_char*, int), (this, ch))
1593 #define call_basic_streambuf_char_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, int, (basic_streambuf_char*, int), (this, ch))
1595 int __thiscall
basic_streambuf_char_pbackfail(basic_streambuf_char
*this, int ch
)
1597 TRACE("(%p %d)\n", this, ch
);
1601 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1602 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1603 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbase
, 4)
1604 char* __thiscall
basic_streambuf_char_pbase(const basic_streambuf_char
*this)
1606 TRACE("(%p)\n", this);
1607 return *this->pwbuf
;
1610 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
1611 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
1612 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbump
, 8)
1613 void __thiscall
basic_streambuf_char_pbump(basic_streambuf_char
*this, int off
)
1615 TRACE("(%p %d)\n", this, off
);
1616 *this->pwpos
+= off
;
1617 *this->pwsize
-= off
;
1620 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1621 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1622 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pptr
, 4)
1623 char* __thiscall
basic_streambuf_char_pptr(const basic_streambuf_char
*this)
1625 TRACE("(%p)\n", this);
1626 return *this->pwpos
;
1629 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1630 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1631 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubimbue
, 12)
1632 locale
* __thiscall
basic_streambuf_char_pubimbue(basic_streambuf_char
*this, locale
*ret
, const locale
*loc
)
1634 TRACE("(%p %p)\n", this, loc
);
1635 memcpy(ret
, IOS_LOCALE(this), sizeof(locale
));
1636 call_basic_streambuf_char_imbue(this, loc
);
1637 locale_copy_ctor(IOS_LOCALE(this), loc
);
1641 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
1642 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
1643 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1644 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1645 #if STREAMOFF_BITS == 64
1646 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekoff
, 24)
1648 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekoff
, 20)
1650 #if _MSVCP_VER >= 100
1651 #define call_basic_streambuf_char_seekoff(this, ret, off, way, mode) \
1652 CALL_VTBL_FUNC(this, 40, fpos_mbstatet*, (basic_streambuf_char*, fpos_mbstatet*, streamoff, int, int), (this, ret, off, way, mode))
1653 #elif _MSVCP_VER >= 80
1654 #define call_basic_streambuf_char_seekoff(this, ret, off, way, mode) \
1655 CALL_VTBL_FUNC(this, 36, fpos_mbstatet*, (basic_streambuf_char*, fpos_mbstatet*, streamoff, int, int), (this, ret, off, way, mode))
1657 #define call_basic_streambuf_char_seekoff(this, ret, off, way, mode) \
1658 CALL_VTBL_FUNC(this, 32, fpos_mbstatet*, (basic_streambuf_char*, fpos_mbstatet*, streamoff, int, int), (this, ret, off, way, mode))
1660 fpos_mbstatet
* __thiscall
basic_streambuf_char_seekoff(basic_streambuf_char
*this,
1661 fpos_mbstatet
*ret
, streamoff off
, int way
, int mode
)
1663 TRACE("(%p %s %d %d)\n", this, wine_dbgstr_longlong(off
), way
, mode
);
1666 memset(&ret
->state
, 0, sizeof(ret
->state
));
1670 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
1671 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
1672 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JFF@Z */
1673 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JFF@Z */
1674 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
1675 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
1676 #if STREAMOFF_BITS == 64
1677 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekoff
, 24)
1679 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekoff
, 20)
1681 fpos_mbstatet
* __thiscall
basic_streambuf_char_pubseekoff(basic_streambuf_char
*this,
1682 fpos_mbstatet
*ret
, streamoff off
, int way
, int mode
)
1684 TRACE("(%p %s %d %d)\n", this, wine_dbgstr_longlong(off
), way
, mode
);
1685 return call_basic_streambuf_char_seekoff(this, ret
, off
, way
, mode
);
1688 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */
1689 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */
1690 #if STREAMOFF_BITS == 64
1691 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekoff_old
, 24)
1693 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekoff_old
, 20)
1695 fpos_mbstatet
* __thiscall
basic_streambuf_char_pubseekoff_old(basic_streambuf_char
*this,
1696 fpos_mbstatet
*ret
, streamoff off
, unsigned int way
, unsigned int mode
)
1698 TRACE("(%p %s %d %d)\n", this, wine_dbgstr_longlong(off
), way
, mode
);
1699 return basic_streambuf_char_pubseekoff(this, ret
, off
, way
, mode
);
1702 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
1703 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
1704 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekpos
, 36)
1705 #if _MSVCP_VER >= 100
1706 #define call_basic_streambuf_char_seekpos(this, ret, pos, mode) \
1707 CALL_VTBL_FUNC(this, 44, fpos_mbstatet*, (basic_streambuf_char*, fpos_mbstatet*, fpos_mbstatet, int), (this, ret, pos, mode))
1708 #elif _MSVCP_VER >= 80
1709 #define call_basic_streambuf_char_seekpos(this, ret, pos, mode) \
1710 CALL_VTBL_FUNC(this, 40, fpos_mbstatet*, (basic_streambuf_char*, fpos_mbstatet*, fpos_mbstatet, int), (this, ret, pos, mode))
1712 #define call_basic_streambuf_char_seekpos(this, ret, pos, mode) \
1713 CALL_VTBL_FUNC(this, 36, fpos_mbstatet*, (basic_streambuf_char*, fpos_mbstatet*, fpos_mbstatet, int), (this, ret, pos, mode))
1715 fpos_mbstatet
* __thiscall
basic_streambuf_char_seekpos(basic_streambuf_char
*this,
1716 fpos_mbstatet
*ret
, fpos_mbstatet pos
, int mode
)
1718 TRACE("(%p %s %d)\n", this, debugstr_fpos_mbstatet(&pos
), mode
);
1721 memset(&ret
->state
, 0, sizeof(ret
->state
));
1725 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
1726 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
1727 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekpos
, 36)
1728 fpos_mbstatet
* __thiscall
basic_streambuf_char_pubseekpos(basic_streambuf_char
*this,
1729 fpos_mbstatet
*ret
, fpos_mbstatet pos
, int mode
)
1731 TRACE("(%p %s %d)\n", this, debugstr_fpos_mbstatet(&pos
), mode
);
1732 return call_basic_streambuf_char_seekpos(this, ret
, pos
, mode
);
1735 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
1736 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
1737 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekpos_old
, 36)
1738 fpos_mbstatet
* __thiscall
basic_streambuf_char_pubseekpos_old(basic_streambuf_char
*this,
1739 fpos_mbstatet
*ret
, fpos_mbstatet pos
, unsigned int mode
)
1741 TRACE("(%p %s %d)\n", this, debugstr_fpos_mbstatet(&pos
), mode
);
1742 return basic_streambuf_char_pubseekpos(this, ret
, pos
, mode
);
1745 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEPAV12@PADH@Z */
1746 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAPEAV12@PEAD_J@Z */
1747 #if STREAMSIZE_BITS == 64
1748 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setbuf
, 16)
1750 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setbuf
, 12)
1752 #if _MSVCP_VER >= 100
1753 #define call_basic_streambuf_char_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 48, basic_streambuf_char*, (basic_streambuf_char*, char*, streamsize), (this, buf, count))
1754 #elif _MSVCP_VER >= 80
1755 #define call_basic_streambuf_char_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 44, basic_streambuf_char*, (basic_streambuf_char*, char*, streamsize), (this, buf, count))
1757 #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))
1759 basic_streambuf_char
* __thiscall
basic_streambuf_char_setbuf(basic_streambuf_char
*this, char *buf
, streamsize count
)
1761 TRACE("(%p %p %s)\n", this, buf
, wine_dbgstr_longlong(count
));
1765 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PADH@Z */
1766 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEAD_J@Z */
1767 #if STREAMSIZE_BITS == 64
1768 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsetbuf
, 16)
1770 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsetbuf
, 12)
1772 basic_streambuf_char
* __thiscall
basic_streambuf_char_pubsetbuf(basic_streambuf_char
*this, char *buf
, streamsize count
)
1774 TRACE("(%p %p %s)\n", this, buf
, wine_dbgstr_longlong(count
));
1775 return call_basic_streambuf_char_setbuf(this, buf
, count
);
1778 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1779 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
1780 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sync
, 4)
1781 #if _MSVCP_VER >= 100
1782 #define call_basic_streambuf_char_sync(this) CALL_VTBL_FUNC(this, 52, int, (basic_streambuf_char*), (this))
1783 #elif _MSVCP_VER >= 80
1784 #define call_basic_streambuf_char_sync(this) CALL_VTBL_FUNC(this, 48, int, (basic_streambuf_char*), (this))
1786 #define call_basic_streambuf_char_sync(this) CALL_VTBL_FUNC(this, 44, int, (basic_streambuf_char*), (this))
1788 int __thiscall
basic_streambuf_char_sync(basic_streambuf_char
*this)
1790 TRACE("(%p)\n", this);
1794 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1795 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1796 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsync
, 4)
1797 int __thiscall
basic_streambuf_char_pubsync(basic_streambuf_char
*this)
1799 TRACE("(%p)\n", this);
1800 return call_basic_streambuf_char_sync(this);
1803 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
1804 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
1805 #if STREAMSIZE_BITS == 64
1806 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetn
, 16)
1808 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetn
, 12)
1810 streamsize __thiscall
basic_streambuf_char_sgetn(basic_streambuf_char
*this, char *ptr
, streamsize count
)
1812 TRACE("(%p %p %s)\n", this, ptr
, wine_dbgstr_longlong(count
));
1813 return call_basic_streambuf_char__Xsgetn_s(this, ptr
, -1, count
);
1816 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1817 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JXZ */
1818 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_showmanyc
, 4)
1819 #if _MSVCP_VER >= 100
1820 #define call_basic_streambuf_char_showmanyc(this) CALL_VTBL_FUNC(this, 20, streamsize, (basic_streambuf_char*), (this))
1822 #define call_basic_streambuf_char_showmanyc(this) CALL_VTBL_FUNC(this, 12, streamsize, (basic_streambuf_char*), (this))
1824 streamsize __thiscall
basic_streambuf_char_showmanyc(basic_streambuf_char
*this)
1826 TRACE("(%p)\n", this);
1830 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1831 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JXZ */
1832 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_in_avail
, 4)
1833 streamsize __thiscall
basic_streambuf_char_in_avail(basic_streambuf_char
*this)
1837 TRACE("(%p)\n", this);
1839 ret
= basic_streambuf_char__Gnavail(this);
1840 return ret
? ret
: call_basic_streambuf_char_showmanyc(this);
1843 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
1844 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
1845 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputbackc
, 8)
1846 int __thiscall
basic_streambuf_char_sputbackc(basic_streambuf_char
*this, char ch
)
1848 TRACE("(%p %d)\n", this, ch
);
1849 if(*this->prpos
&& *this->prpos
>*this->prbuf
&& (*this->prpos
)[-1]==ch
) {
1852 return (unsigned char)ch
;
1855 return call_basic_streambuf_char_pbackfail(this, (unsigned char)ch
);
1858 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
1859 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
1860 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputc
, 8)
1861 int __thiscall
basic_streambuf_char_sputc(basic_streambuf_char
*this, char ch
)
1863 TRACE("(%p %d)\n", this, ch
);
1864 return basic_streambuf_char__Pnavail(this) ?
1865 (unsigned char)(*basic_streambuf_char__Pninc(this) = ch
) :
1866 call_basic_streambuf_char_overflow(this, (unsigned char)ch
);
1869 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1870 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1871 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sungetc
, 4)
1872 int __thiscall
basic_streambuf_char_sungetc(basic_streambuf_char
*this)
1874 TRACE("(%p)\n", this);
1875 if(*this->prpos
&& *this->prpos
>*this->prbuf
) {
1878 return (unsigned char)**this->prpos
;
1881 return call_basic_streambuf_char_pbackfail(this, EOF
);
1884 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1885 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1886 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_stossc
, 4)
1887 void __thiscall
basic_streambuf_char_stossc(basic_streambuf_char
*this)
1889 TRACE("(%p)\n", this);
1890 if(basic_streambuf_char__Gnavail(this))
1891 basic_streambuf_char__Gninc(this);
1893 call_basic_streambuf_char_uflow(this);
1896 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1897 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1898 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sbumpc
, 4)
1899 int __thiscall
basic_streambuf_char_sbumpc(basic_streambuf_char
*this)
1901 TRACE("(%p)\n", this);
1902 return basic_streambuf_char__Gnavail(this) ?
1903 (int)(unsigned char)*basic_streambuf_char__Gninc(this) : call_basic_streambuf_char_uflow(this);
1906 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1907 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1908 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetc
, 4)
1909 int __thiscall
basic_streambuf_char_sgetc(basic_streambuf_char
*this)
1911 TRACE("(%p)\n", this);
1912 return basic_streambuf_char__Gnavail(this) ?
1913 (int)(unsigned char)*basic_streambuf_char_gptr(this) : call_basic_streambuf_char_underflow(this);
1916 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1917 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1918 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_snextc
, 4)
1919 int __thiscall
basic_streambuf_char_snextc(basic_streambuf_char
*this)
1921 TRACE("(%p)\n", this);
1923 if(basic_streambuf_char__Gnavail(this) > 1)
1924 return (unsigned char)*basic_streambuf_char__Gnpreinc(this);
1925 return basic_streambuf_char_sbumpc(this)==EOF
?
1926 EOF
: basic_streambuf_char_sgetc(this);
1929 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADH@Z */
1930 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_J@Z */
1931 #if STREAMSIZE_BITS == 64
1932 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsgetn
, 16)
1934 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsgetn
, 12)
1936 #if _MSVCP_VER >= 100
1937 #define call_basic_streambuf_char_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 32, streamsize, (basic_streambuf_char*, char*, streamsize), (this, ptr, count))
1939 #define call_basic_streambuf_char_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, streamsize, (basic_streambuf_char*, char*, streamsize), (this, ptr, count))
1941 streamsize __thiscall
basic_streambuf_char_xsgetn(basic_streambuf_char
*this, char *ptr
, streamsize count
)
1943 TRACE("(%p %p %s)\n", this, ptr
, wine_dbgstr_longlong(count
));
1944 return call_basic_streambuf_char__Xsgetn_s(this, ptr
, -1, count
);
1947 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPBDH@Z */
1948 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEBD_J@Z */
1949 #if STREAMSIZE_BITS == 64
1950 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsputn
, 16)
1952 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsputn
, 12)
1954 #if _MSVCP_VER >= 100
1955 #define call_basic_streambuf_char_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 36, streamsize, (basic_streambuf_char*, const char*, streamsize), (this, ptr, count))
1956 #elif _MSVCP_VER >= 80
1957 #define call_basic_streambuf_char_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 32, streamsize, (basic_streambuf_char*, const char*, streamsize), (this, ptr, count))
1959 #define call_basic_streambuf_char_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 28, streamsize, (basic_streambuf_char*, const char*, streamsize), (this, ptr, count))
1961 streamsize __thiscall
basic_streambuf_char_xsputn(basic_streambuf_char
*this, const char *ptr
, streamsize count
)
1963 streamsize copied
, chunk
;
1965 TRACE("(%p %p %s)\n", this, ptr
, wine_dbgstr_longlong(count
));
1967 for(copied
=0; copied
<count
;) {
1968 chunk
= basic_streambuf_char__Pnavail(this);
1969 if(chunk
> count
-copied
)
1970 chunk
= count
-copied
;
1973 memcpy(*this->pwpos
, ptr
+copied
, chunk
);
1974 *this->pwpos
+= chunk
;
1975 *this->pwsize
-= chunk
;
1977 }else if(call_basic_streambuf_char_overflow(this, (unsigned char)ptr
[copied
]) != EOF
) {
1987 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z */
1988 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEBD_J@Z */
1989 #if STREAMSIZE_BITS == 64
1990 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputn
, 16)
1992 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputn
, 12)
1994 streamsize __thiscall
basic_streambuf_char_sputn(basic_streambuf_char
*this, const char *ptr
, streamsize count
)
1996 TRACE("(%p %p %s)\n", this, ptr
, wine_dbgstr_longlong(count
));
1997 return call_basic_streambuf_char_xsputn(this, ptr
, count
);
2000 /* ?swap@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXAAV12@@Z */
2001 /* ?swap@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXAEAV12@@Z */
2002 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_swap
, 8)
2003 void __thiscall
basic_streambuf_char_swap(basic_streambuf_char
*this, basic_streambuf_char
*r
)
2005 basic_streambuf_char tmp
;
2007 TRACE("(%p %p)\n", this, r
);
2014 this->vtable
= tmp
.vtable
;
2015 tmp
.vtable
= r
->vtable
;
2019 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */
2020 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */
2021 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
2022 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
2023 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp_next
, 16)
2024 void __thiscall
basic_streambuf_wchar_setp_next(basic_streambuf_wchar
*this, wchar_t *first
, wchar_t *next
, wchar_t *last
)
2026 TRACE("(%p %p %p %p)\n", this, first
, next
, last
);
2030 this->wsize
= last
-next
;
2033 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W0@Z */
2034 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W0@Z */
2035 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG0@Z */
2036 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG0@Z */
2037 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp
, 12)
2038 void __thiscall
basic_streambuf_wchar_setp(basic_streambuf_wchar
*this, wchar_t *first
, wchar_t *last
)
2040 basic_streambuf_wchar_setp_next(this, first
, first
, last
);
2043 /* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */
2044 /* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */
2045 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
2046 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
2047 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setg
, 16)
2048 void __thiscall
basic_streambuf_wchar_setg(basic_streambuf_wchar
*this, wchar_t *first
, wchar_t *next
, wchar_t *last
)
2050 TRACE("(%p %p %p %p)\n", this, first
, next
, last
);
2054 this->rsize
= last
-next
;
2057 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXXZ */
2058 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXXZ */
2059 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXXZ */
2060 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXXZ */
2061 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init_empty
, 4)
2062 void __thiscall
basic_streambuf_wchar__Init_empty(basic_streambuf_wchar
*this)
2064 TRACE("(%p)\n", this);
2066 this->prbuf
= &this->rbuf
;
2067 this->pwbuf
= &this->wbuf
;
2068 this->prpos
= &this->rpos
;
2069 this->pwpos
= &this->wpos
;
2070 this->prsize
= &this->rsize
;
2071 this->pwsize
= &this->wsize
;
2073 basic_streambuf_wchar_setp(this, NULL
, NULL
);
2074 basic_streambuf_wchar_setg(this, NULL
, NULL
, NULL
);
2077 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@W4_Uninitialized@1@@Z */
2078 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
2079 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_ctor_uninitialized
, 8)
2080 basic_streambuf_wchar
* __thiscall
basic_streambuf_wchar_ctor_uninitialized(basic_streambuf_wchar
*this, int uninitialized
)
2082 TRACE("(%p %d)\n", this, uninitialized
);
2083 this->vtable
= &MSVCP_basic_streambuf_wchar_vtable
;
2084 #if _MSVCP_VER >= 70 && _MSVCP_VER <= 100
2085 mutex_ctor(&this->lock
);
2090 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@W4_Uninitialized@1@@Z */
2091 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
2092 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor_uninitialized
, 8)
2093 basic_streambuf_wchar
* __thiscall
basic_streambuf_short_ctor_uninitialized(basic_streambuf_wchar
*this, int uninitialized
)
2095 TRACE("(%p %d)\n", this, uninitialized
);
2096 basic_streambuf_wchar_ctor_uninitialized(this, uninitialized
);
2097 this->vtable
= &MSVCP_basic_streambuf_short_vtable
;
2101 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@XZ */
2102 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */
2103 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_ctor
, 4)
2104 basic_streambuf_wchar
* __thiscall
basic_streambuf_wchar_ctor(basic_streambuf_wchar
*this)
2106 TRACE("(%p)\n", this);
2108 this->vtable
= &MSVCP_basic_streambuf_wchar_vtable
;
2109 #if _MSVCP_VER >= 70 && _MSVCP_VER <= 100
2110 mutex_ctor(&this->lock
);
2112 #if _MSVCP_VER >= 70
2113 this->loc
= MSVCRT_operator_new(sizeof(locale
));
2115 locale_ctor(IOS_LOCALE(this));
2116 basic_streambuf_wchar__Init_empty(this);
2121 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@XZ */
2122 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@XZ */
2123 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor
, 4)
2124 basic_streambuf_wchar
* __thiscall
basic_streambuf_short_ctor(basic_streambuf_wchar
*this)
2126 TRACE("(%p)\n", this);
2127 basic_streambuf_wchar_ctor(this);
2128 this->vtable
= &MSVCP_basic_streambuf_short_vtable
;
2132 /* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
2133 /* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
2134 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UAE@XZ */
2135 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */
2136 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_dtor
, 4)
2137 void __thiscall
basic_streambuf_wchar_dtor(basic_streambuf_wchar
*this)
2139 TRACE("(%p)\n", this);
2141 #if _MSVCP_VER >= 70 && _MSVCP_VER <= 100
2142 mutex_dtor(&this->lock
);
2144 locale_dtor(IOS_LOCALE(this));
2145 #if _MSVCP_VER >= 70
2146 MSVCRT_operator_delete(this->loc
);
2150 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_vector_dtor
, 8)
2151 basic_streambuf_wchar
* __thiscall
basic_streambuf_wchar_vector_dtor(basic_streambuf_wchar
*this, unsigned int flags
)
2153 TRACE("(%p %x)\n", this, flags
);
2155 /* we have an array, with the number of elements stored before the first object */
2156 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
2158 for(i
=*ptr
-1; i
>=0; i
--)
2159 basic_streambuf_wchar_dtor(this+i
);
2160 MSVCRT_operator_delete(ptr
);
2162 basic_streambuf_wchar_dtor(this);
2164 MSVCRT_operator_delete(this);
2170 /* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */
2171 /* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */
2172 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
2173 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
2174 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gnavail
, 4)
2175 streamsize __thiscall
basic_streambuf_wchar__Gnavail(const basic_streambuf_wchar
*this)
2177 TRACE("(%p)\n", this);
2178 return *this->prpos
? *this->prsize
: 0;
2181 /* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
2182 /* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
2183 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
2184 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
2185 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gndec
, 4)
2186 wchar_t* __thiscall
basic_streambuf_wchar__Gndec(basic_streambuf_wchar
*this)
2188 TRACE("(%p)\n", this);
2191 return *this->prpos
;
2194 /* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
2195 /* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
2196 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
2197 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
2198 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gninc
, 4)
2199 wchar_t* __thiscall
basic_streambuf_wchar__Gninc(basic_streambuf_wchar
*this)
2201 TRACE("(%p)\n", this);
2203 return (*this->prpos
)++;
2206 /* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
2207 /* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
2208 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
2209 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
2210 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gnpreinc
, 4)
2211 wchar_t* __thiscall
basic_streambuf_wchar__Gnpreinc(basic_streambuf_wchar
*this)
2213 TRACE("(%p)\n", this);
2216 return *this->prpos
;
2219 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPAPA_W0PAH001@Z */
2220 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAPEA_W0PEAH001@Z */
2221 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAPAG0PAH001@Z */
2222 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAPEAG0PEAH001@Z */
2223 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init
, 28)
2224 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
)
2226 TRACE("(%p %p %p %p %p %p %p)\n", this, gf
, gn
, gc
, pf
, pn
, pc
);
2236 /* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
2237 /* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
2238 /* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
2239 /* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
2240 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Lock
, 4)
2241 void __thiscall
basic_streambuf_wchar__Lock(basic_streambuf_wchar
*this)
2243 TRACE("(%p)\n", this);
2244 #if _MSVCP_VER >= 70 && _MSVCP_VER <= 100
2245 mutex_lock(&this->lock
);
2249 /* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */
2250 /* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */
2251 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
2252 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
2253 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Pnavail
, 4)
2254 streamsize __thiscall
basic_streambuf_wchar__Pnavail(const basic_streambuf_wchar
*this)
2256 TRACE("(%p)\n", this);
2257 return *this->pwpos
? *this->pwsize
: 0;
2260 /* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
2261 /* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
2262 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
2263 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
2264 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Pninc
, 4)
2265 wchar_t* __thiscall
basic_streambuf_wchar__Pninc(basic_streambuf_wchar
*this)
2267 TRACE("(%p)\n", this);
2269 return (*this->pwpos
)++;
2272 /* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
2273 /* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
2274 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
2275 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
2276 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_underflow
, 4)
2277 #if _MSVCP_VER >= 100
2278 #define call_basic_streambuf_wchar_underflow(this) CALL_VTBL_FUNC(this, 24, unsigned short, (basic_streambuf_wchar*), (this))
2280 #define call_basic_streambuf_wchar_underflow(this) CALL_VTBL_FUNC(this, 16, unsigned short, (basic_streambuf_wchar*), (this))
2282 unsigned short __thiscall
basic_streambuf_wchar_underflow(basic_streambuf_wchar
*this)
2284 TRACE("(%p)\n", this);
2288 /* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
2289 /* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
2290 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
2291 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
2292 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_uflow
, 4)
2293 #if _MSVCP_VER >= 100
2294 #define call_basic_streambuf_wchar_uflow(this) CALL_VTBL_FUNC(this, 28, unsigned short, (basic_streambuf_wchar*), (this))
2296 #define call_basic_streambuf_wchar_uflow(this) CALL_VTBL_FUNC(this, 20, unsigned short, (basic_streambuf_wchar*), (this))
2298 unsigned short __thiscall
basic_streambuf_wchar_uflow(basic_streambuf_wchar
*this)
2302 TRACE("(%p)\n", this);
2304 if(call_basic_streambuf_wchar_underflow(this)==WEOF
)
2307 ret
= **this->prpos
;
2313 /* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WIH@Z */
2314 /* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_K_J@Z */
2315 /* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGIH@Z */
2316 /* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_K_J@Z */
2317 #if STREAMSIZE_BITS == 64
2318 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Xsgetn_s
, 20)
2320 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Xsgetn_s
, 16)
2322 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
2323 #define call_basic_streambuf_wchar__Xsgetn_s(this, ptr, size, count) CALL_VTBL_FUNC(this, 28, \
2324 streamsize, (basic_streambuf_wchar*, wchar_t*, MSVCP_size_t, streamsize), (this, ptr, size, count))
2326 #define call_basic_streambuf_wchar__Xsgetn_s(this, ptr, size, count) basic_streambuf_wchar__Xsgetn_s(this, ptr, size, count)
2328 streamsize __thiscall
basic_streambuf_wchar__Xsgetn_s(basic_streambuf_wchar
*this, wchar_t *ptr
, MSVCP_size_t size
, streamsize count
)
2330 streamsize copied
, chunk
;
2333 TRACE("(%p %p %lu %s)\n", this, ptr
, size
, wine_dbgstr_longlong(count
));
2335 for(copied
=0; copied
<count
&& size
;) {
2336 chunk
= basic_streambuf_wchar__Gnavail(this);
2337 if(chunk
> count
-copied
)
2338 chunk
= count
-copied
;
2341 memcpy_s(ptr
+copied
, size
, *this->prpos
, chunk
*sizeof(wchar_t));
2342 *this->prpos
+= chunk
;
2343 *this->prsize
-= chunk
;
2345 size
-= chunk
*sizeof(wchar_t);
2346 }else if((c
= call_basic_streambuf_wchar_uflow(this)) != WEOF
) {
2358 /* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WIH@Z */
2359 /* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_K_J@Z */
2360 /* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGIH@Z */
2361 /* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_K_J@Z */
2362 #if STREAMSIZE_BITS == 64
2363 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Sgetn_s
, 20)
2365 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Sgetn_s
, 16)
2367 streamsize __thiscall
basic_streambuf_wchar__Sgetn_s(basic_streambuf_wchar
*this, wchar_t *ptr
, MSVCP_size_t size
, streamsize count
)
2369 TRACE("(%p %p %lu %s)\n", this, ptr
, size
, wine_dbgstr_longlong(count
));
2370 return call_basic_streambuf_wchar__Xsgetn_s(this, ptr
, size
, count
);
2373 /* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
2374 /* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
2375 /* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
2376 /* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
2377 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Unlock
, 4)
2378 void __thiscall
basic_streambuf_wchar__Unlock(basic_streambuf_wchar
*this)
2380 TRACE("(%p)\n", this);
2381 #if _MSVCP_VER >= 70 && _MSVCP_VER <= 100
2382 mutex_unlock(&this->lock
);
2386 /* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
2387 /* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
2388 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
2389 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
2390 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_eback
, 4)
2391 wchar_t* __thiscall
basic_streambuf_wchar_eback(const basic_streambuf_wchar
*this)
2393 TRACE("(%p)\n", this);
2394 return *this->prbuf
;
2397 /* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
2398 /* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
2399 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
2400 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
2401 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gptr
, 4)
2402 wchar_t* __thiscall
basic_streambuf_wchar_gptr(const basic_streambuf_wchar
*this)
2404 TRACE("(%p)\n", this);
2405 return *this->prpos
;
2408 /* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
2409 /* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
2410 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
2411 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
2412 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_egptr
, 4)
2413 wchar_t* __thiscall
basic_streambuf_wchar_egptr(const basic_streambuf_wchar
*this)
2415 TRACE("(%p)\n", this);
2416 return *this->prpos
+*this->prsize
;
2419 /* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
2420 /* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
2421 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
2422 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
2423 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_epptr
, 4)
2424 wchar_t* __thiscall
basic_streambuf_wchar_epptr(const basic_streambuf_wchar
*this)
2426 TRACE("(%p)\n", this);
2427 return *this->pwpos
+*this->pwsize
;
2430 /* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */
2431 /* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */
2432 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
2433 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
2434 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gbump
, 8)
2435 void __thiscall
basic_streambuf_wchar_gbump(basic_streambuf_wchar
*this, int off
)
2437 TRACE("(%p %d)\n", this, off
);
2438 *this->prpos
+= off
;
2439 *this->prsize
-= off
;
2442 /* ?getloc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QBE?AVlocale@2@XZ */
2443 /* ?getloc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEBA?AVlocale@2@XZ */
2444 /* ?getloc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QBE?AVlocale@2@XZ */
2445 /* ?getloc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEBA?AVlocale@2@XZ */
2446 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_getloc
, 8)
2447 locale
* __thiscall
basic_streambuf_wchar_getloc(const basic_streambuf_wchar
*this, locale
*ret
)
2449 TRACE("(%p)\n", this);
2450 return locale_copy_ctor(ret
, IOS_LOCALE(this));
2453 /* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEXABVlocale@2@@Z */
2454 /* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAXAEBVlocale@2@@Z */
2455 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEXABVlocale@2@@Z */
2456 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAXAEBVlocale@2@@Z */
2457 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_imbue
, 8)
2458 #if _MSVCP_VER >= 100
2459 #define call_basic_streambuf_wchar_imbue(this, loc) CALL_VTBL_FUNC(this, 56, void, (basic_streambuf_wchar*, const locale*), (this, loc))
2460 #elif _MSVCP_VER >= 80
2461 #define call_basic_streambuf_wchar_imbue(this, loc) CALL_VTBL_FUNC(this, 52, void, (basic_streambuf_wchar*, const locale*), (this, loc))
2463 #define call_basic_streambuf_wchar_imbue(this, loc) CALL_VTBL_FUNC(this, 48, void, (basic_streambuf_wchar*, const locale*), (this, loc))
2465 void __thiscall
basic_streambuf_wchar_imbue(basic_streambuf_wchar
*this, const locale
*loc
)
2467 TRACE("(%p %p)\n", this, loc
);
2470 /* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
2471 /* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
2472 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
2473 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
2474 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_overflow
, 8)
2475 #if _MSVCP_VER >= 100
2476 #define call_basic_streambuf_wchar_overflow(this, ch) CALL_VTBL_FUNC(this, 12, unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
2478 #define call_basic_streambuf_wchar_overflow(this, ch) CALL_VTBL_FUNC(this, 4, unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
2480 unsigned short __thiscall
basic_streambuf_wchar_overflow(basic_streambuf_wchar
*this, unsigned short ch
)
2482 TRACE("(%p %d)\n", this, ch
);
2486 /* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
2487 /* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
2488 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
2489 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
2490 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbackfail
, 8)
2491 #if _MSVCP_VER >= 100
2492 #define call_basic_streambuf_wchar_pbackfail(this, ch) CALL_VTBL_FUNC(this, 16, unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
2494 #define call_basic_streambuf_wchar_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
2496 unsigned short __thiscall
basic_streambuf_wchar_pbackfail(basic_streambuf_wchar
*this, unsigned short ch
)
2498 TRACE("(%p %d)\n", this, ch
);
2502 /* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
2503 /* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
2504 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
2505 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
2506 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbase
, 4)
2507 wchar_t* __thiscall
basic_streambuf_wchar_pbase(const basic_streambuf_wchar
*this)
2509 TRACE("(%p)\n", this);
2510 return *this->pwbuf
;
2513 /* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */
2514 /* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */
2515 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
2516 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
2517 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbump
, 8)
2518 void __thiscall
basic_streambuf_wchar_pbump(basic_streambuf_wchar
*this, int off
)
2520 TRACE("(%p %d)\n", this, off
);
2521 *this->pwpos
+= off
;
2522 *this->pwsize
-= off
;
2525 /* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
2526 /* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
2527 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
2528 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
2529 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pptr
, 4)
2530 wchar_t* __thiscall
basic_streambuf_wchar_pptr(const basic_streambuf_wchar
*this)
2532 TRACE("(%p)\n", this);
2533 return *this->pwpos
;
2536 /* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
2537 /* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
2538 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
2539 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
2540 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubimbue
, 12)
2541 locale
* __thiscall
basic_streambuf_wchar_pubimbue(basic_streambuf_wchar
*this, locale
*ret
, const locale
*loc
)
2543 TRACE("(%p %p)\n", this, loc
);
2544 memcpy(ret
, IOS_LOCALE(this), sizeof(locale
));
2545 call_basic_streambuf_wchar_imbue(this, loc
);
2546 locale_copy_ctor(IOS_LOCALE(this), loc
);
2550 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
2551 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
2552 /* ?seekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
2553 /* ?seekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
2554 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
2555 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
2556 #if STREAMOFF_BITS == 64
2557 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekoff
, 24)
2559 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekoff
, 20)
2561 #if _MSVCP_VER >= 100
2562 #define call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode) \
2563 CALL_VTBL_FUNC(this, 40, fpos_mbstatet*, (basic_streambuf_wchar*, fpos_mbstatet*, streamoff, int, int), (this, ret, off, way, mode))
2564 #elif _MSVCP_VER >= 80
2565 #define call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode) \
2566 CALL_VTBL_FUNC(this, 36, fpos_mbstatet*, (basic_streambuf_wchar*, fpos_mbstatet*, streamoff, int, int), (this, ret, off, way, mode))
2568 #define call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode) \
2569 CALL_VTBL_FUNC(this, 32, fpos_mbstatet*, (basic_streambuf_wchar*, fpos_mbstatet*, streamoff, int, int), (this, ret, off, way, mode))
2571 fpos_mbstatet
* __thiscall
basic_streambuf_wchar_seekoff(basic_streambuf_wchar
*this,
2572 fpos_mbstatet
*ret
, streamoff off
, int way
, int mode
)
2574 TRACE("(%p %s %d %d)\n", this, wine_dbgstr_longlong(off
), way
, mode
);
2577 memset(&ret
->state
, 0, sizeof(ret
->state
));
2581 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
2582 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
2583 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
2584 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
2585 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JFF@Z */
2586 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JFF@Z */
2587 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
2588 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JW4seekdir@ioos_base@2@H@Z */
2589 #if STREAMOFF_BITS == 64
2590 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekoff
, 24)
2592 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekoff
, 20)
2594 fpos_mbstatet
* __thiscall
basic_streambuf_wchar_pubseekoff(basic_streambuf_wchar
*this,
2595 fpos_mbstatet
*ret
, streamoff off
, int way
, int mode
)
2597 TRACE("(%p %s %d %d)\n", this, wine_dbgstr_longlong(off
), way
, mode
);
2598 return call_basic_streambuf_wchar_seekoff(this, ret
, off
, way
, mode
);
2601 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */
2602 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */
2603 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */
2604 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */
2605 #if STREAMOFF_BITS == 64
2606 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekoff_old
, 24)
2608 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekoff_old
, 20)
2610 fpos_mbstatet
* __thiscall
basic_streambuf_wchar_pubseekoff_old(basic_streambuf_wchar
*this,
2611 fpos_mbstatet
*ret
, streamoff off
, unsigned int way
, unsigned int mode
)
2613 TRACE("(%p %s %d %d)\n", this, wine_dbgstr_longlong(off
), way
, mode
);
2614 return basic_streambuf_wchar_pubseekoff(this, ret
, off
, way
, mode
);
2617 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2618 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2619 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2620 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2621 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekpos
, 36)
2622 #if _MSVCP_VER >= 100
2623 #define call_basic_streambuf_wchar_seekpos(this, ret, pos, mode) \
2624 CALL_VTBL_FUNC(this, 44, fpos_mbstatet*, (basic_streambuf_wchar*, fpos_mbstatet*, fpos_mbstatet, int), (this, ret, pos, mode))
2625 #elif _MSVCP_VER >= 80
2626 #define call_basic_streambuf_wchar_seekpos(this, ret, pos, mode) \
2627 CALL_VTBL_FUNC(this, 40, fpos_mbstatet*, (basic_streambuf_wchar*, fpos_mbstatet*, fpos_mbstatet, int), (this, ret, pos, mode))
2629 #define call_basic_streambuf_wchar_seekpos(this, ret, pos, mode) \
2630 CALL_VTBL_FUNC(this, 36, fpos_mbstatet*, (basic_streambuf_wchar*, fpos_mbstatet*, fpos_mbstatet, int), (this, ret, pos, mode))
2632 fpos_mbstatet
* __thiscall
basic_streambuf_wchar_seekpos(basic_streambuf_wchar
*this,
2633 fpos_mbstatet
*ret
, fpos_mbstatet pos
, int mode
)
2635 TRACE("(%p %s %d)\n", this, debugstr_fpos_mbstatet(&pos
), mode
);
2638 memset(&ret
->state
, 0, sizeof(ret
->state
));
2642 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
2643 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
2644 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
2645 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
2646 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos
, 36)
2647 fpos_mbstatet
* __thiscall
basic_streambuf_wchar_pubseekpos(basic_streambuf_wchar
*this,
2648 fpos_mbstatet
*ret
, fpos_mbstatet pos
, int mode
)
2650 TRACE("(%p %s %d)\n", this, debugstr_fpos_mbstatet(&pos
), mode
);
2651 return call_basic_streambuf_wchar_seekpos(this, ret
, pos
, mode
);
2654 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
2655 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
2656 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
2657 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
2658 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos_old
, 36)
2659 fpos_mbstatet
* __thiscall
basic_streambuf_wchar_pubseekpos_old(basic_streambuf_wchar
*this,
2660 fpos_mbstatet
*ret
, fpos_mbstatet pos
, unsigned int mode
)
2662 TRACE("(%p %s %d)\n", this, debugstr_fpos_mbstatet(&pos
), mode
);
2663 return basic_streambuf_wchar_pubseekpos(this, ret
, pos
, mode
);
2666 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEPAV12@PA_WH@Z */
2667 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAPEAV12@PEA_W_J@Z */
2668 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEPAV12@PAGH@Z */
2669 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAPEAV12@PEAG_J@Z */
2670 #if STREAMSIZE_BITS == 64
2671 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setbuf
, 16)
2673 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setbuf
, 12)
2675 #if _MSVCP_VER >= 100
2676 #define call_basic_streambuf_wchar_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 48, basic_streambuf_wchar*, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, buf, count))
2677 #elif _MSVCP_VER >= 80
2678 #define call_basic_streambuf_wchar_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 44, basic_streambuf_wchar*, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, buf, count))
2680 #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))
2682 basic_streambuf_wchar
* __thiscall
basic_streambuf_wchar_setbuf(basic_streambuf_wchar
*this, wchar_t *buf
, streamsize count
)
2684 TRACE("(%p %p %s)\n", this, buf
, wine_dbgstr_longlong(count
));
2688 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PA_WH@Z */
2689 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEA_W_J@Z */
2690 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PAGH@Z */
2691 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEAG_J@Z */
2692 #if STREAMSIZE_BITS == 64
2693 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsetbuf
, 16)
2695 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsetbuf
, 12)
2697 basic_streambuf_wchar
* __thiscall
basic_streambuf_wchar_pubsetbuf(basic_streambuf_wchar
*this, wchar_t *buf
, streamsize count
)
2699 TRACE("(%p %p %s)\n", this, buf
, wine_dbgstr_longlong(count
));
2700 return call_basic_streambuf_wchar_setbuf(this, buf
, count
);
2703 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
2704 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAHXZ */
2705 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
2706 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */
2707 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sync
, 4)
2708 #if _MSVCP_VER >= 100
2709 #define call_basic_streambuf_wchar_sync(this) CALL_VTBL_FUNC(this, 52, int, (basic_streambuf_wchar*), (this))
2710 #elif _MSVCP_VER >= 80
2711 #define call_basic_streambuf_wchar_sync(this) CALL_VTBL_FUNC(this, 48, int, (basic_streambuf_wchar*), (this))
2713 #define call_basic_streambuf_wchar_sync(this) CALL_VTBL_FUNC(this, 44, int, (basic_streambuf_wchar*), (this))
2715 int __thiscall
basic_streambuf_wchar_sync(basic_streambuf_wchar
*this)
2717 TRACE("(%p)\n", this);
2721 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
2722 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAHXZ */
2723 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
2724 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHXZ */
2725 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsync
, 4)
2726 int __thiscall
basic_streambuf_wchar_pubsync(basic_streambuf_wchar
*this)
2728 TRACE("(%p)\n", this);
2729 return call_basic_streambuf_wchar_sync(this);
2732 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WH@Z */
2733 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_J@Z */
2734 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGH@Z */
2735 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_J@Z */
2736 #if STREAMSIZE_BITS == 64
2737 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsgetn
, 16)
2739 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsgetn
, 12)
2741 #if _MSVCP_VER >= 100
2742 #define call_basic_streambuf_wchar_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 32, streamsize, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, ptr, count))
2744 #define call_basic_streambuf_wchar_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, streamsize, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, ptr, count))
2746 streamsize __thiscall
basic_streambuf_wchar_xsgetn(basic_streambuf_wchar
*this, wchar_t *ptr
, streamsize count
)
2748 TRACE("(%p %p %s)\n", this, ptr
, wine_dbgstr_longlong(count
));
2749 return call_basic_streambuf_wchar__Xsgetn_s(this, ptr
, -1, count
);
2752 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WH@Z */
2753 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_J@Z */
2754 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */
2755 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */
2756 #if STREAMSIZE_BITS == 64
2757 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetn
, 16)
2759 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetn
, 12)
2761 streamsize __thiscall
basic_streambuf_wchar_sgetn(basic_streambuf_wchar
*this, wchar_t *ptr
, streamsize count
)
2763 TRACE("(%p %p %s)\n", this, ptr
, wine_dbgstr_longlong(count
));
2764 return call_basic_streambuf_wchar_xsgetn(this, ptr
, count
);
2767 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
2768 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JXZ */
2769 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
2770 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JXZ */
2771 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_showmanyc
, 4)
2772 #if _MSVCP_VER >= 100
2773 #define call_basic_streambuf_wchar_showmanyc(this) CALL_VTBL_FUNC(this, 20, streamsize, (basic_streambuf_wchar*), (this))
2775 #define call_basic_streambuf_wchar_showmanyc(this) CALL_VTBL_FUNC(this, 12, streamsize, (basic_streambuf_wchar*), (this))
2777 streamsize __thiscall
basic_streambuf_wchar_showmanyc(basic_streambuf_wchar
*this)
2779 TRACE("(%p)\n", this);
2783 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
2784 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JXZ */
2785 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
2786 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JXZ */
2787 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_in_avail
, 4)
2788 streamsize __thiscall
basic_streambuf_wchar_in_avail(basic_streambuf_wchar
*this)
2792 TRACE("(%p)\n", this);
2794 ret
= basic_streambuf_wchar__Gnavail(this);
2795 return ret
? ret
: call_basic_streambuf_wchar_showmanyc(this);
2798 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
2799 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
2800 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
2801 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
2802 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputbackc
, 8)
2803 unsigned short __thiscall
basic_streambuf_wchar_sputbackc(basic_streambuf_wchar
*this, wchar_t ch
)
2805 TRACE("(%p %d)\n", this, ch
);
2806 if(*this->prpos
&& *this->prpos
>*this->prbuf
&& (*this->prpos
)[-1]==ch
) {
2812 return call_basic_streambuf_wchar_pbackfail(this, ch
);
2815 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
2816 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
2817 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
2818 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHG@Z */
2819 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputc
, 8)
2820 unsigned short __thiscall
basic_streambuf_wchar_sputc(basic_streambuf_wchar
*this, wchar_t ch
)
2822 TRACE("(%p %d)\n", this, ch
);
2823 return basic_streambuf_wchar__Pnavail(this) ?
2824 (*basic_streambuf_wchar__Pninc(this) = ch
) :
2825 call_basic_streambuf_wchar_overflow(this, ch
);
2828 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2829 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2830 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2831 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2832 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sungetc
, 4)
2833 unsigned short __thiscall
basic_streambuf_wchar_sungetc(basic_streambuf_wchar
*this)
2835 TRACE("(%p)\n", this);
2836 if(*this->prpos
&& *this->prpos
>*this->prbuf
) {
2839 return **this->prpos
;
2842 return call_basic_streambuf_wchar_pbackfail(this, WEOF
);
2845 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
2846 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
2847 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
2848 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
2849 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_stossc
, 4)
2850 void __thiscall
basic_streambuf_wchar_stossc(basic_streambuf_wchar
*this)
2852 TRACE("(%p)\n", this);
2853 if(basic_streambuf_wchar__Gnavail(this))
2854 basic_streambuf_wchar__Gninc(this);
2856 call_basic_streambuf_wchar_uflow(this);
2859 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2860 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2861 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2862 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2863 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sbumpc
, 4)
2864 unsigned short __thiscall
basic_streambuf_wchar_sbumpc(basic_streambuf_wchar
*this)
2866 TRACE("(%p)\n", this);
2867 return basic_streambuf_wchar__Gnavail(this) ?
2868 *basic_streambuf_wchar__Gninc(this) : call_basic_streambuf_wchar_uflow(this);
2871 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2872 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2873 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2874 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2875 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetc
, 4)
2876 unsigned short __thiscall
basic_streambuf_wchar_sgetc(basic_streambuf_wchar
*this)
2878 TRACE("(%p)\n", this);
2879 return basic_streambuf_wchar__Gnavail(this) ?
2880 *basic_streambuf_wchar_gptr(this) : call_basic_streambuf_wchar_underflow(this);
2883 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2884 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2885 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2886 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2887 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_snextc
, 4)
2888 unsigned short __thiscall
basic_streambuf_wchar_snextc(basic_streambuf_wchar
*this)
2890 TRACE("(%p)\n", this);
2892 if(basic_streambuf_wchar__Gnavail(this) > 1)
2893 return *basic_streambuf_wchar__Gnpreinc(this);
2894 return basic_streambuf_wchar_sbumpc(this)==WEOF
?
2895 WEOF
: basic_streambuf_wchar_sgetc(this);
2898 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPB_WH@Z */
2899 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEB_W_J@Z */
2900 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPBGH@Z */
2901 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEBG_J@Z */
2902 #if STREAMSIZE_BITS == 64
2903 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsputn
, 16)
2905 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsputn
, 12)
2907 #if _MSVCP_VER >= 100
2908 #define call_basic_streambuf_wchar_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 36, streamsize, (basic_streambuf_wchar*, const wchar_t*, streamsize), (this, ptr, count))
2909 #elif _MSVCP_VER >= 80
2910 #define call_basic_streambuf_wchar_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 32, streamsize, (basic_streambuf_wchar*, const wchar_t*, streamsize), (this, ptr, count))
2912 #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))
2914 streamsize __thiscall
basic_streambuf_wchar_xsputn(basic_streambuf_wchar
*this, const wchar_t *ptr
, streamsize count
)
2916 streamsize copied
, chunk
;
2918 TRACE("(%p %p %s)\n", this, ptr
, wine_dbgstr_longlong(count
));
2920 for(copied
=0; copied
<count
;) {
2921 chunk
= basic_streambuf_wchar__Pnavail(this);
2922 if(chunk
> count
-copied
)
2923 chunk
= count
-copied
;
2926 memcpy(*this->pwpos
, ptr
+copied
, chunk
*sizeof(wchar_t));
2927 *this->pwpos
+= chunk
;
2928 *this->pwsize
-= chunk
;
2930 }else if(call_basic_streambuf_wchar_overflow(this, ptr
[copied
]) != WEOF
) {
2940 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPB_WH@Z */
2941 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEB_W_J@Z */
2942 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPBGH@Z */
2943 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEBG_J@Z */
2944 #if STREAMSIZE_BITS == 64
2945 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputn
, 16)
2947 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputn
, 12)
2949 streamsize __thiscall
basic_streambuf_wchar_sputn(basic_streambuf_wchar
*this, const wchar_t *ptr
, streamsize count
)
2951 TRACE("(%p %p %s)\n", this, ptr
, wine_dbgstr_longlong(count
));
2952 return call_basic_streambuf_wchar_xsputn(this, ptr
, count
);
2955 /* ?swap@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXAAV12@@Z */
2956 /* ?swap@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXAEAV12@@Z */
2957 /* ?swap@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXAAV12@@Z */
2958 /* ?swap@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXAAV12@@Z */
2959 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_swap
, 8)
2960 void __thiscall
basic_streambuf_wchar_swap(basic_streambuf_wchar
*this, basic_streambuf_wchar
*r
)
2962 basic_streambuf_wchar tmp
;
2964 TRACE("(%p %p)\n", this, r
);
2971 this->vtable
= tmp
.vtable
;
2972 tmp
.vtable
= r
->vtable
;
2976 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
2977 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
2978 #if _MSVCP_VER >= 140
2979 _Mbstatet basic_filebuf_char__Init__Stinit
= {0};
2981 _Mbstatet basic_filebuf_char__Init__Stinit
= 0;
2984 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2985 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2986 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Init
, 12)
2987 void __thiscall
basic_filebuf_char__Init(basic_filebuf_char
*this, FILE *file
, basic_filebuf__Initfl which
)
2989 TRACE("(%p %p %d)\n", this, file
, which
);
2992 this->wrotesome
= FALSE
;
2993 this->state
= basic_filebuf_char__Init__Stinit
;
2994 this->close
= (which
== INITFL_open
);
2997 basic_streambuf_char__Init_empty(&this->base
);
2999 basic_streambuf_char__Init(&this->base
, &file
->_base
, &file
->_ptr
,
3000 &file
->_cnt
, &file
->_base
, &file
->_ptr
, &file
->_cnt
);
3003 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAV?$codecvt@DDH@2@@Z */
3004 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$codecvt@DDH@2@@Z */
3005 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Initcvt_cvt
, 8)
3006 void __thiscall
basic_filebuf_char__Initcvt_cvt(basic_filebuf_char
*this, codecvt_char
*cvt
)
3008 TRACE("(%p %p)\n", this, cvt
);
3010 if(codecvt_base_always_noconv(&cvt
->base
)) {
3013 basic_streambuf_char__Init_empty(&this->base
);
3018 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXXZ */
3019 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXXZ */
3020 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Initcvt
, 4)
3021 void __thiscall
basic_filebuf_char__Initcvt(basic_filebuf_char
*this)
3023 codecvt_char
*cvt
= codecvt_char_use_facet(IOS_LOCALE(&this->base
));
3024 basic_filebuf_char__Initcvt_cvt( this, cvt
);
3027 /* ?_Endwrite@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAE_NXZ */
3028 /* ?_Endwrite@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAA_NXZ */
3029 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Endwrite
, 4)
3030 MSVCP_bool __thiscall
basic_filebuf_char__Endwrite(basic_filebuf_char
*this)
3032 TRACE("(%p)\n", this);
3034 if(!this->wrotesome
|| !this->cvt
)
3038 if(call_basic_streambuf_char_overflow(&this->base
, EOF
) == EOF
)
3042 /* TODO: check if we need a dynamic buffer here */
3047 ret
= codecvt_char_unshift(this->cvt
, &this->state
, buf
, buf
+sizeof(buf
), &next
);
3050 this->wrotesome
= FALSE
;
3052 case CODECVT_partial
:
3053 if(!fwrite(buf
, next
-buf
, 1, this->file
))
3058 case CODECVT_noconv
:
3059 if(call_basic_streambuf_char_overflow(&this->base
, EOF
) == EOF
)
3068 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@XZ */
3069 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@XZ */
3070 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_close
, 4)
3071 basic_filebuf_char
* __thiscall
basic_filebuf_char_close(basic_filebuf_char
*this)
3073 basic_filebuf_char
*ret
= this;
3075 TRACE("(%p)\n", this);
3080 /* TODO: handle exceptions */
3081 if(!basic_filebuf_char__Endwrite(this))
3083 if(fclose(this->file
))
3086 basic_filebuf_char__Init(this, NULL
, INITFL_close
);
3090 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
3091 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
3092 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_file
, 8)
3093 basic_filebuf_char
* __thiscall
basic_filebuf_char_ctor_file(basic_filebuf_char
*this, FILE *file
)
3095 TRACE("(%p %p)\n", this, file
);
3097 basic_streambuf_char_ctor(&this->base
);
3098 this->base
.vtable
= &MSVCP_basic_filebuf_char_vtable
;
3100 basic_filebuf_char__Init(this, file
, INITFL_new
);
3104 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
3105 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
3106 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor
, 4)
3107 basic_filebuf_char
* __thiscall
basic_filebuf_char_ctor(basic_filebuf_char
*this)
3109 return basic_filebuf_char_ctor_file(this, NULL
);
3112 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
3113 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
3114 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_uninitialized
, 8)
3115 basic_filebuf_char
* __thiscall
basic_filebuf_char_ctor_uninitialized(basic_filebuf_char
*this, int uninitialized
)
3117 TRACE("(%p %d)\n", this, uninitialized
);
3119 basic_streambuf_char_ctor(&this->base
);
3120 this->base
.vtable
= &MSVCP_basic_filebuf_char_vtable
;
3124 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
3125 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
3126 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_dtor
, 4)
3127 void __thiscall
basic_filebuf_char_dtor(basic_filebuf_char
*this)
3129 TRACE("(%p)\n", this);
3132 basic_filebuf_char_close(this);
3133 basic_streambuf_char_dtor(&this->base
);
3136 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_vector_dtor
, 8)
3137 basic_filebuf_char
* __thiscall
basic_filebuf_char_vector_dtor(basic_filebuf_char
*this, unsigned int flags
)
3139 TRACE("(%p %x)\n", this, flags
);
3141 /* we have an array, with the number of elements stored before the first object */
3142 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3144 for(i
=*ptr
-1; i
>=0; i
--)
3145 basic_filebuf_char_dtor(this+i
);
3146 MSVCRT_operator_delete(ptr
);
3148 basic_filebuf_char_dtor(this);
3150 MSVCRT_operator_delete(this);
3156 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QBE_NXZ */
3157 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
3158 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_is_open
, 4)
3159 MSVCP_bool __thiscall
basic_filebuf_char_is_open(const basic_filebuf_char
*this)
3161 TRACE("(%p)\n", this);
3162 return this->file
!= NULL
;
3165 /* ?_Fiopen@std@@YAPAU_iobuf@@PB_WHH@Z */
3166 /* ?_Fiopen@std@@YAPEAU_iobuf@@PEB_WHH@Z */
3167 FILE* __cdecl
_Fiopen_wchar(const wchar_t *name
, int mode
, int prot
)
3169 static const wchar_t rW
[] = {'r',0};
3170 static const struct {
3172 const wchar_t str
[4];
3173 const wchar_t str_bin
[4];
3175 {OPENMODE_out
, {'w',0}, {'w','b',0}},
3176 {OPENMODE_out
|OPENMODE_app
, {'a',0}, {'a','b',0}},
3177 {OPENMODE_app
, {'a',0}, {'a','b',0}},
3178 {OPENMODE_out
|OPENMODE_trunc
, {'w',0}, {'w','b',0}},
3179 {OPENMODE_in
, {'r',0}, {'r','b',0}},
3180 {OPENMODE_in
|OPENMODE_out
, {'r','+',0}, {'r','+','b',0}},
3181 {OPENMODE_in
|OPENMODE_out
|OPENMODE_trunc
, {'w','+',0}, {'w','+','b',0}},
3182 {OPENMODE_in
|OPENMODE_out
|OPENMODE_app
, {'a','+',0}, {'a','+','b',0}},
3183 {OPENMODE_in
|OPENMODE_app
, {'a','+',0}, {'a','+','b',0}}
3186 int real_mode
= mode
& ~(OPENMODE_ate
|OPENMODE__Nocreate
|OPENMODE__Noreplace
|OPENMODE_binary
);
3190 TRACE("(%s %d %d)\n", debugstr_w(name
), mode
, prot
);
3192 for(mode_idx
=0; mode_idx
<sizeof(str_mode
)/sizeof(str_mode
[0]); mode_idx
++)
3193 if(str_mode
[mode_idx
].mode
== real_mode
)
3195 if(mode_idx
== sizeof(str_mode
)/sizeof(str_mode
[0]))
3198 if((mode
& OPENMODE__Nocreate
) && !(f
= _wfopen(name
, rW
)))
3203 if((mode
& OPENMODE__Noreplace
) && (mode
& (OPENMODE_out
|OPENMODE_app
))
3204 && (f
= _wfopen(name
, rW
))) {
3209 #if _MSVCP_VER < 80 /* msvcp60 - msvcp71 are ignoring prot argument */
3213 f
= _wfsopen(name
, (mode
& OPENMODE_binary
) ? str_mode
[mode_idx
].str_bin
3214 : str_mode
[mode_idx
].str
, prot
);
3218 if((mode
& OPENMODE_ate
) && fseek(f
, 0, SEEK_END
)) {
3226 /* ?_Fiopen@std@@YAPAU_iobuf@@PBDHH@Z */
3227 /* ?_Fiopen@std@@YAPEAU_iobuf@@PEBDHH@Z */
3228 FILE* __cdecl
_Fiopen(const char *name
, int mode
, int prot
)
3230 wchar_t nameW
[FILENAME_MAX
];
3232 TRACE("(%s %d %d)\n", name
, mode
, prot
);
3234 if(mbstowcs_s(NULL
, nameW
, FILENAME_MAX
, name
, FILENAME_MAX
-1) != 0)
3236 return _Fiopen_wchar(nameW
, mode
, prot
);
3239 /* ?__Fiopen@std@@YAPAU_iobuf@@PBDH@Z */
3240 /* ?__Fiopen@std@@YAPEAU_iobuf@@PEBDH@Z */
3241 FILE* __cdecl
___Fiopen(const char *name
, int mode
)
3243 TRACE("(%p %d)\n", name
, mode
);
3244 return _Fiopen(name
, mode
, _SH_DENYNO
);
3247 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PB_WHH@Z */
3248 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEB_WHH@Z */
3249 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBGHH@Z */
3250 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBGHH@Z */
3251 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_wchar
, 16)
3252 basic_filebuf_char
* __thiscall
basic_filebuf_char_open_wchar(basic_filebuf_char
*this, const wchar_t *name
, int mode
, int prot
)
3256 TRACE("(%p %s %d %d)\n", this, debugstr_w(name
), mode
, prot
);
3258 if(basic_filebuf_char_is_open(this))
3261 if(!(f
= _Fiopen_wchar(name
, mode
, prot
)))
3264 basic_filebuf_char__Init(this, f
, INITFL_open
);
3265 basic_filebuf_char__Initcvt_cvt(this, codecvt_char_use_facet(IOS_LOCALE(&this->base
)));
3269 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PB_WI@Z */
3270 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEB_WI@Z */
3271 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBGI@Z */
3272 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBGI@Z */
3273 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_wchar_mode
, 12)
3274 basic_filebuf_char
* __thiscall
basic_filebuf_char_open_wchar_mode(basic_filebuf_char
*this, const wchar_t *name
, unsigned int mode
)
3276 return basic_filebuf_char_open_wchar(this, name
, mode
, SH_DENYNO
);
3279 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDHH@Z */
3280 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDHH@Z */
3281 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open
, 16)
3282 basic_filebuf_char
* __thiscall
basic_filebuf_char_open(basic_filebuf_char
*this, const char *name
, int mode
, int prot
)
3284 wchar_t nameW
[FILENAME_MAX
];
3286 TRACE("(%p %s %d %d)\n", this, name
, mode
, prot
);
3288 if(mbstowcs_s(NULL
, nameW
, FILENAME_MAX
, name
, FILENAME_MAX
-1) != 0)
3290 return basic_filebuf_char_open_wchar(this, nameW
, mode
, prot
);
3293 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDF@Z */
3294 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDF@Z */
3295 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_mode_old
, 12)
3296 basic_filebuf_char
* __thiscall
basic_filebuf_char_open_mode_old(basic_filebuf_char
*this, const char *name
, short mode
)
3298 TRACE("(%p %p %d)\n", this, name
, mode
);
3299 return basic_filebuf_char_open(this, name
, mode
, SH_DENYNO
);
3302 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDH@Z */
3303 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDH@Z */
3304 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDI@Z */
3305 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDI@Z */
3306 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_mode
, 12)
3307 basic_filebuf_char
* __thiscall
basic_filebuf_char_open_mode(basic_filebuf_char
*this, const char *name
, unsigned int mode
)
3309 return basic_filebuf_char_open(this, name
, mode
, SH_DENYNO
);
3312 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
3313 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
3314 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_overflow
, 8)
3315 int __thiscall
basic_filebuf_char_overflow(basic_filebuf_char
*this, int c
)
3317 char buf
[8], *dyn_buf
;
3318 char ch
= c
, *to_next
;
3319 const char *from_next
;
3323 TRACE("(%p %d)\n", this, c
);
3325 if(!basic_filebuf_char_is_open(this))
3331 return fwrite(&ch
, sizeof(char), 1, this->file
) ? c
: EOF
;
3335 ret
= codecvt_char_out(this->cvt
, &this->state
, from_next
, &ch
+1,
3336 &from_next
, buf
, buf
+sizeof(buf
), &to_next
);
3339 case CODECVT_partial
:
3344 if(!fwrite(buf
, to_next
-buf
, 1, this->file
))
3346 if(ret
== CODECVT_partial
)
3349 case CODECVT_noconv
:
3350 return fwrite(&ch
, sizeof(char), 1, this->file
) ? c
: EOF
;
3358 max_size
= codecvt_base_max_length(&this->cvt
->base
);
3359 dyn_buf
= malloc(max_size
);
3363 ret
= codecvt_char_out(this->cvt
, &this->state
, from_next
, &ch
+1,
3364 &from_next
, dyn_buf
, dyn_buf
+max_size
, &to_next
);
3368 ret
= fwrite(dyn_buf
, to_next
-dyn_buf
, 1, this->file
);
3370 return ret
? c
: EOF
;
3371 case CODECVT_partial
:
3372 ERR("buffer should be big enough to store all output\n");
3380 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
3381 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
3382 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_pbackfail
, 8)
3383 int __thiscall
basic_filebuf_char_pbackfail(basic_filebuf_char
*this, int c
)
3385 TRACE("(%p %d)\n", this, c
);
3387 if(!basic_filebuf_char_is_open(this))
3390 if(basic_streambuf_char_gptr(&this->base
)>basic_streambuf_char_eback(&this->base
)
3391 && (c
==EOF
|| (int)(unsigned char)basic_streambuf_char_gptr(&this->base
)[-1]==c
)) {
3392 basic_streambuf_char__Gndec(&this->base
);
3393 return c
==EOF
? !c
: c
;
3394 }else if(c
!=EOF
&& !this->cvt
) {
3395 return ungetc(c
, this->file
);
3401 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
3402 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
3403 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_uflow
, 4)
3404 int __thiscall
basic_filebuf_char_uflow(basic_filebuf_char
*this)
3406 char ch
, buf
[128], *to_next
;
3407 const char *buf_next
;
3411 TRACE("(%p)\n", this);
3413 if(!basic_filebuf_char_is_open(this))
3416 if(basic_streambuf_char_gptr(&this->base
) < basic_streambuf_char_egptr(&this->base
))
3417 return (unsigned char)*basic_streambuf_char__Gninc(&this->base
);
3419 c
= fgetc(this->file
);
3420 if(!this->cvt
|| c
==EOF
)
3424 for(i
=0; i
< sizeof(buf
)/sizeof(buf
[0]); i
++) {
3427 switch(codecvt_char_in(this->cvt
, &this->state
, buf_next
,
3428 buf
+i
+1, &buf_next
, &ch
, &ch
+1, &to_next
)) {
3429 case CODECVT_partial
:
3431 if(to_next
== &ch
) {
3432 c
= fgetc(this->file
);
3438 for(j
= --i
; j
>= buf_next
-buf
; j
--)
3439 ungetc(buf
[j
], this->file
);
3441 case CODECVT_noconv
:
3442 return (unsigned char)buf
[0];
3448 FIXME("buffer is too small\n");
3452 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
3453 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
3454 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_underflow
, 4)
3455 int __thiscall
basic_filebuf_char_underflow(basic_filebuf_char
*this)
3459 TRACE("(%p)\n", this);
3461 if(basic_streambuf_char_gptr(&this->base
) < basic_streambuf_char_egptr(&this->base
))
3462 return (unsigned char)*basic_streambuf_char_gptr(&this->base
);
3464 ret
= call_basic_streambuf_char_uflow(&this->base
);
3466 ret
= call_basic_streambuf_char_pbackfail(&this->base
, ret
);
3470 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
3471 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
3472 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
3473 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
3474 #if STREAMOFF_BITS == 64
3475 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekoff
, 24)
3477 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekoff
, 20)
3479 fpos_mbstatet
* __thiscall
basic_filebuf_char_seekoff(basic_filebuf_char
*this,
3480 fpos_mbstatet
*ret
, streamoff off
, int way
, int mode
)
3484 TRACE("(%p %p %s %d %d)\n", this, ret
, wine_dbgstr_longlong(off
), way
, mode
);
3486 if(!basic_filebuf_char_is_open(this) || !basic_filebuf_char__Endwrite(this)
3487 || fseek(this->file
, off
, way
)) {
3490 memset(&ret
->state
, 0, sizeof(ret
->state
));
3494 fgetpos(this->file
, &pos
);
3497 ret
->state
= this->state
;
3501 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3502 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3503 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekpos
, 36)
3504 fpos_mbstatet
* __thiscall
basic_filebuf_char_seekpos(basic_filebuf_char
*this,
3505 fpos_mbstatet
*ret
, fpos_mbstatet pos
, int mode
)
3509 TRACE("(%p %p %s %d)\n", this, ret
, debugstr_fpos_mbstatet(&pos
), mode
);
3511 if(!basic_filebuf_char_is_open(this) || !basic_filebuf_char__Endwrite(this)
3512 || fseek(this->file
, (LONG
)pos
.pos
, SEEK_SET
)
3513 || (pos
.off
&& fseek(this->file
, pos
.off
, SEEK_CUR
))) {
3516 memset(&ret
->state
, 0, sizeof(ret
->state
));
3520 fgetpos(this->file
, &fpos
);
3523 ret
->state
= this->state
;
3527 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PADH@Z */
3528 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAD_J@Z */
3529 #if STREAMSIZE_BITS == 64
3530 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_setbuf
, 16)
3532 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_setbuf
, 12)
3534 basic_streambuf_char
* __thiscall
basic_filebuf_char_setbuf(basic_filebuf_char
*this, char *buf
, streamsize count
)
3536 TRACE("(%p %p %s)\n", this, buf
, wine_dbgstr_longlong(count
));
3538 if(!basic_filebuf_char_is_open(this))
3541 if(setvbuf(this->file
, buf
, (buf
==NULL
&& count
==0) ? _IONBF
: _IOFBF
, count
))
3544 basic_filebuf_char__Init(this, this->file
, INITFL_open
);
3548 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
3549 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
3550 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_sync
, 4)
3551 int __thiscall
basic_filebuf_char_sync(basic_filebuf_char
*this)
3553 TRACE("(%p)\n", this);
3555 if(!basic_filebuf_char_is_open(this))
3558 if(call_basic_streambuf_char_overflow(&this->base
, EOF
) == EOF
)
3560 return fflush(this->file
);
3563 /* ?imbue@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
3564 /* ?imbue@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */
3565 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_imbue
, 8)
3566 void __thiscall
basic_filebuf_char_imbue(basic_filebuf_char
*this, const locale
*loc
)
3568 TRACE("(%p %p)\n", this, loc
);
3569 basic_filebuf_char__Initcvt_cvt(this, codecvt_char_use_facet(loc
));
3572 /* ?_Stinit@?1??_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
3573 /* ?_Stinit@?1??_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
3574 #if _MSVCP_VER >= 140
3575 _Mbstatet basic_filebuf_wchar__Init__Stinit
= {0};
3577 _Mbstatet basic_filebuf_wchar__Init__Stinit
= 0;
3580 /* ?_Stinit@?1??_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
3581 /* ?_Stinit@?1??_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
3582 #if _MSVCP_VER >= 140
3583 _Mbstatet basic_filebuf_short__Init__Stinit
= {0};
3585 _Mbstatet basic_filebuf_short__Init__Stinit
= 0;
3588 /* ?_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
3589 /* ?_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
3590 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar__Init
, 12)
3591 void __thiscall
basic_filebuf_wchar__Init(basic_filebuf_wchar
*this, FILE *file
, basic_filebuf__Initfl which
)
3593 TRACE("(%p %p %d)\n", this, file
, which
);
3596 this->wrotesome
= FALSE
;
3597 this->state
= basic_filebuf_wchar__Init__Stinit
;
3598 this->close
= (which
== INITFL_open
);
3601 basic_streambuf_wchar__Init_empty(&this->base
);
3604 /* ?_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
3605 /* ?_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
3606 DEFINE_THISCALL_WRAPPER(basic_filebuf_short__Init
, 12)
3607 void __thiscall
basic_filebuf_short__Init(basic_filebuf_wchar
*this, FILE *file
, basic_filebuf__Initfl which
)
3609 TRACE("(%p %p %d)\n", this, file
, which
);
3612 this->wrotesome
= FALSE
;
3613 this->state
= basic_filebuf_short__Init__Stinit
;
3614 this->close
= (which
== INITFL_open
);
3617 basic_streambuf_wchar__Init_empty(&this->base
);
3620 /* ?_Initcvt@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAEXPAV?$codecvt@_WDH@2@@Z */
3621 /* ?_Initcvt@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAV?$codecvt@_WDH@2@@Z */
3622 /* ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAV?$codecvt@GDH@2@@Z */
3623 /* ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAV?$codecvt@GDH@2@@Z */
3624 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar__Initcvt_cvt
, 8)
3625 void __thiscall
basic_filebuf_wchar__Initcvt_cvt(basic_filebuf_wchar
*this, codecvt_wchar
*cvt
)
3627 TRACE("(%p %p)\n", this, cvt
);
3629 if(codecvt_base_always_noconv(&cvt
->base
)) {
3632 basic_streambuf_wchar__Init_empty(&this->base
);
3637 /* ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXXZ */
3638 /* ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXXZ */
3639 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar__Initcvt
, 4)
3640 void __thiscall
basic_filebuf_wchar__Initcvt(basic_filebuf_wchar
*this)
3642 codecvt_wchar
*cvt
= codecvt_wchar_use_facet(IOS_LOCALE(&this->base
));
3643 basic_filebuf_wchar__Initcvt_cvt( this, cvt
);
3646 /* ?_Endwrite@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAE_NXZ */
3647 /* ?_Endwrite@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAA_NXZ */
3648 /* ?_Endwrite@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAE_NXZ */
3649 /* ?_Endwrite@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAA_NXZ */
3650 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar__Endwrite
, 4)
3651 MSVCP_bool __thiscall
basic_filebuf_wchar__Endwrite(basic_filebuf_wchar
*this)
3653 TRACE("(%p)\n", this);
3655 if(!this->wrotesome
|| !this->cvt
)
3658 if(call_basic_streambuf_wchar_overflow(&this->base
, WEOF
) == WEOF
)
3662 /* TODO: check if we need a dynamic buffer here */
3667 ret
= codecvt_wchar_unshift(this->cvt
, &this->state
, buf
, buf
+sizeof(buf
), &next
);
3670 this->wrotesome
= FALSE
;
3672 case CODECVT_partial
:
3673 if(!fwrite(buf
, next
-buf
, 1, this->file
))
3678 case CODECVT_noconv
:
3679 if(call_basic_streambuf_wchar_overflow(&this->base
, WEOF
) == WEOF
)
3688 /* ?close@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@XZ */
3689 /* ?close@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@XZ */
3690 /* ?close@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@XZ */
3691 /* ?close@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@XZ */
3692 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_close
, 4)
3693 basic_filebuf_wchar
* __thiscall
basic_filebuf_wchar_close(basic_filebuf_wchar
*this)
3695 basic_filebuf_wchar
*ret
= this;
3697 TRACE("(%p)\n", this);
3702 /* TODO: handle exceptions */
3703 if(!basic_filebuf_wchar__Endwrite(this))
3705 if(fclose(this->file
))
3708 basic_filebuf_wchar__Init(this, NULL
, INITFL_close
);
3712 /* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
3713 /* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
3714 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_ctor_file
, 8)
3715 basic_filebuf_wchar
* __thiscall
basic_filebuf_wchar_ctor_file(basic_filebuf_wchar
*this, FILE *file
)
3717 TRACE("(%p %p)\n", this, file
);
3719 basic_streambuf_wchar_ctor(&this->base
);
3720 this->base
.vtable
= &MSVCP_basic_filebuf_wchar_vtable
;
3722 basic_filebuf_wchar__Init(this, file
, INITFL_new
);
3726 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
3727 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
3728 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor_file
, 8)
3729 basic_filebuf_wchar
* __thiscall
basic_filebuf_short_ctor_file(basic_filebuf_wchar
*this, FILE *file
)
3731 TRACE("(%p %p)\n", this, file
);
3733 basic_streambuf_short_ctor(&this->base
);
3734 this->base
.vtable
= &MSVCP_basic_filebuf_short_vtable
;
3736 basic_filebuf_short__Init(this, file
, INITFL_new
);
3740 /* ??_F?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
3741 /* ??_F?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
3742 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_ctor
, 4)
3743 basic_filebuf_wchar
* __thiscall
basic_filebuf_wchar_ctor(basic_filebuf_wchar
*this)
3745 return basic_filebuf_wchar_ctor_file(this, NULL
);
3748 /* ??_F?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
3749 /* ??_F?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
3750 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor
, 4)
3751 basic_filebuf_wchar
* __thiscall
basic_filebuf_short_ctor(basic_filebuf_wchar
*this)
3753 return basic_filebuf_short_ctor_file(this, NULL
);
3756 /* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAE@W4_Uninitialized@1@@Z */
3757 /* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
3758 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_ctor_uninitialized
, 8)
3759 basic_filebuf_wchar
* __thiscall
basic_filebuf_wchar_ctor_uninitialized(basic_filebuf_wchar
*this, int uninitialized
)
3761 TRACE("(%p %d)\n", this, uninitialized
);
3763 basic_streambuf_wchar_ctor(&this->base
);
3764 this->base
.vtable
= &MSVCP_basic_filebuf_wchar_vtable
;
3768 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z */
3769 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
3770 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor_uninitialized
, 8)
3771 basic_filebuf_wchar
* __thiscall
basic_filebuf_short_ctor_uninitialized(basic_filebuf_wchar
*this, int uninitialized
)
3773 TRACE("(%p %d)\n", this, uninitialized
);
3775 basic_streambuf_short_ctor(&this->base
);
3776 this->base
.vtable
= &MSVCP_basic_filebuf_short_vtable
;
3780 /* ??1?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
3781 /* ??1?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
3782 /* ??1?$basic_filebuf@GU?$char_traits@G@std@@@std@@UAE@XZ */
3783 /* ??1?$basic_filebuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */
3784 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_dtor
, 4)
3785 void __thiscall
basic_filebuf_wchar_dtor(basic_filebuf_wchar
*this)
3787 TRACE("(%p)\n", this);
3790 basic_filebuf_wchar_close(this);
3791 basic_streambuf_wchar_dtor(&this->base
);
3794 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_vector_dtor
, 8)
3795 basic_filebuf_wchar
* __thiscall
basic_filebuf_wchar_vector_dtor(basic_filebuf_wchar
*this, unsigned int flags
)
3797 TRACE("(%p %x)\n", this, flags
);
3799 /* we have an array, with the number of elements stored before the first object */
3800 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3802 for(i
=*ptr
-1; i
>=0; i
--)
3803 basic_filebuf_wchar_dtor(this+i
);
3804 MSVCRT_operator_delete(ptr
);
3806 basic_filebuf_wchar_dtor(this);
3808 MSVCRT_operator_delete(this);
3814 /* ?is_open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
3815 /* ?is_open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
3816 /* ?is_open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QBE_NXZ */
3817 /* ?is_open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
3818 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_is_open
, 4)
3819 MSVCP_bool __thiscall
basic_filebuf_wchar_is_open(const basic_filebuf_wchar
*this)
3821 TRACE("(%p)\n", this);
3822 return this->file
!= NULL
;
3825 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PB_WHH@Z */
3826 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEB_WHH@Z */
3827 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PBGHH@Z */
3828 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEBGHH@Z */
3829 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_open_wchar
, 16)
3830 basic_filebuf_wchar
* __thiscall
basic_filebuf_wchar_open_wchar(basic_filebuf_wchar
*this, const wchar_t *name
, int mode
, int prot
)
3834 TRACE("(%p %s %d %d)\n", this, debugstr_w(name
), mode
, prot
);
3836 if(basic_filebuf_wchar_is_open(this))
3839 if(!(f
= _Fiopen_wchar(name
, mode
, prot
)))
3842 basic_filebuf_wchar__Init(this, f
, INITFL_open
);
3843 basic_filebuf_wchar__Initcvt_cvt(this, codecvt_wchar_use_facet(IOS_LOCALE(&this->base
)));
3847 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PB_WHH@Z */
3848 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEB_WHH@Z */
3849 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBGHH@Z */
3850 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBGHH@Z */
3851 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_open_wchar
, 16)
3852 basic_filebuf_wchar
* __thiscall
basic_filebuf_short_open_wchar(basic_filebuf_wchar
*this, const wchar_t *name
, int mode
, int prot
)
3856 TRACE("(%p %s %d %d)\n", this, debugstr_w(name
), mode
, prot
);
3858 if(basic_filebuf_wchar_is_open(this))
3861 if(!(f
= _Fiopen_wchar(name
, mode
, prot
)))
3864 basic_filebuf_short__Init(this, f
, INITFL_open
);
3865 basic_filebuf_wchar__Initcvt_cvt(this, codecvt_short_use_facet(IOS_LOCALE(&this->base
)));
3869 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PB_WI@Z */
3870 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEB_WI@Z */
3871 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PBGI@Z */
3872 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEBGI@Z */
3873 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_open_wchar_mode
, 12)
3874 basic_filebuf_wchar
* __thiscall
basic_filebuf_wchar_open_wchar_mode(basic_filebuf_wchar
*this, const wchar_t *name
, unsigned int mode
)
3876 return basic_filebuf_wchar_open_wchar(this, name
, mode
, SH_DENYNO
);
3879 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PB_WI@Z */
3880 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEB_WI@Z */
3881 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBGI@Z */
3882 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBGI@Z */
3883 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_open_wchar_mode
, 12)
3884 basic_filebuf_wchar
* __thiscall
basic_filebuf_short_open_wchar_mode(basic_filebuf_wchar
*this, const wchar_t *name
, unsigned int mode
)
3886 return basic_filebuf_short_open_wchar(this, name
, mode
, SH_DENYNO
);
3889 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PBDHH@Z */
3890 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEBDHH@Z */
3891 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_open
, 16)
3892 basic_filebuf_wchar
* __thiscall
basic_filebuf_wchar_open(basic_filebuf_wchar
*this, const char *name
, int mode
, int prot
)
3894 wchar_t nameW
[FILENAME_MAX
];
3896 TRACE("(%p %s %d %d)\n", this, name
, mode
, prot
);
3898 if(mbstowcs_s(NULL
, nameW
, FILENAME_MAX
, name
, FILENAME_MAX
-1) != 0)
3900 return basic_filebuf_wchar_open_wchar(this, nameW
, mode
, prot
);
3903 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDHH@Z */
3904 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDHH@Z */
3905 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_open
, 16)
3906 basic_filebuf_wchar
* __thiscall
basic_filebuf_short_open(basic_filebuf_wchar
*this, const char *name
, int mode
, int prot
)
3908 wchar_t nameW
[FILENAME_MAX
];
3910 TRACE("(%p %s %d %d)\n", this, name
, mode
, prot
);
3912 if(mbstowcs_s(NULL
, nameW
, FILENAME_MAX
, name
, FILENAME_MAX
-1) != 0)
3914 return basic_filebuf_short_open_wchar(this, nameW
, mode
, prot
);
3917 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDF@Z */
3918 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDF@Z */
3919 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_open_mode_old
, 12)
3920 basic_filebuf_wchar
* __thiscall
basic_filebuf_wchar_open_mode_old(basic_filebuf_wchar
*this, const char *name
, short mode
)
3922 TRACE("(%p %p %d)\n", this, name
, mode
);
3923 return basic_filebuf_wchar_open(this, name
, mode
, SH_DENYNO
);
3926 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDH@Z */
3927 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDH@Z */
3928 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PBDI@Z */
3929 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEBDI@Z */
3930 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_open_mode
, 12)
3931 basic_filebuf_wchar
* __thiscall
basic_filebuf_wchar_open_mode(basic_filebuf_wchar
*this, const char *name
, unsigned int mode
)
3933 return basic_filebuf_wchar_open(this, name
, mode
, SH_DENYNO
);
3936 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDI@Z */
3937 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDI@Z */
3938 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_open_mode
, 12)
3939 basic_filebuf_wchar
* __thiscall
basic_filebuf_short_open_mode(basic_filebuf_wchar
*this, const char *name
, unsigned int mode
)
3941 return basic_filebuf_short_open(this, name
, mode
, SH_DENYNO
);
3944 /* ?overflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
3945 /* ?overflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
3946 /* ?overflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
3947 /* ?overflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
3948 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_overflow
, 8)
3949 unsigned short __thiscall
basic_filebuf_wchar_overflow(basic_filebuf_wchar
*this, unsigned short c
)
3951 char buf
[8], *dyn_buf
, *to_next
;
3953 const wchar_t *from_next
;
3958 TRACE("(%p %d)\n", this, c
);
3960 if(!basic_filebuf_wchar_is_open(this))
3966 return fwrite(&ch
, sizeof(wchar_t), 1, this->file
) ? c
: WEOF
;
3970 ret
= codecvt_wchar_out(this->cvt
, &this->state
, from_next
, &ch
+1,
3971 &from_next
, buf
, buf
+sizeof(buf
), &to_next
);
3974 case CODECVT_partial
:
3979 if(!fwrite(buf
, to_next
-buf
, 1, this->file
))
3981 if(ret
== CODECVT_partial
)
3984 case CODECVT_noconv
:
3985 return fwrite(&ch
, sizeof(wchar_t), 1, this->file
) ? c
: WEOF
;
3993 max_size
= codecvt_base_max_length(&this->cvt
->base
);
3994 dyn_buf
= malloc(max_size
);
3998 ret
= codecvt_wchar_out(this->cvt
, &this->state
, from_next
, &ch
+1,
3999 &from_next
, dyn_buf
, dyn_buf
+max_size
, &to_next
);
4003 ret
= fwrite(dyn_buf
, to_next
-dyn_buf
, 1, this->file
);
4005 return ret
? c
: WEOF
;
4006 case CODECVT_partial
:
4007 ERR("buffer should be big enough to store all output\n");
4015 /* ?pbackfail@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
4016 /* ?pbackfail@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
4017 /* ?pbackfail@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
4018 /* ?pbackfail@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
4019 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_pbackfail
, 8)
4020 unsigned short __thiscall
basic_filebuf_wchar_pbackfail(basic_filebuf_wchar
*this, unsigned short c
)
4022 TRACE("(%p %d)\n", this, c
);
4024 if(!basic_filebuf_wchar_is_open(this))
4027 if(basic_streambuf_wchar_gptr(&this->base
)>basic_streambuf_wchar_eback(&this->base
)
4028 && (c
==WEOF
|| basic_streambuf_wchar_gptr(&this->base
)[-1]==c
)) {
4029 basic_streambuf_wchar__Gndec(&this->base
);
4030 return c
==WEOF
? !c
: c
;
4031 }else if(c
!=WEOF
&& !this->cvt
) {
4032 return ungetwc(c
, this->file
);
4033 }else if(c
!=WEOF
&& basic_streambuf_wchar_gptr(&this->base
)!=&this->putback
) {
4035 basic_streambuf_wchar_setg(&this->base
, &this->putback
, &this->putback
, &this->putback
+1);
4042 /* ?uflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
4043 /* ?uflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
4044 /* ?uflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
4045 /* ?uflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
4046 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_uflow
, 4)
4047 unsigned short __thiscall
basic_filebuf_wchar_uflow(basic_filebuf_wchar
*this)
4049 wchar_t ch
, *to_next
;
4051 const char *buf_next
;
4055 TRACE("(%p)\n", this);
4057 if(!basic_filebuf_wchar_is_open(this))
4060 if(basic_streambuf_wchar_gptr(&this->base
) < basic_streambuf_wchar_egptr(&this->base
))
4061 return *basic_streambuf_wchar__Gninc(&this->base
);
4064 return fgetwc(this->file
);
4067 for(i
=0; i
< sizeof(buf
)/sizeof(buf
[0]); i
++) {
4068 if((c
= fgetc(this->file
)) == EOF
)
4072 switch(codecvt_wchar_in(this->cvt
, &this->state
, buf_next
,
4073 buf
+i
+1, &buf_next
, &ch
, &ch
+1, &to_next
)) {
4074 case CODECVT_partial
:
4079 for(j
= --i
; j
>= buf_next
-buf
; j
--)
4080 ungetc(buf
[j
], this->file
);
4082 case CODECVT_noconv
:
4083 if(i
+1 < sizeof(wchar_t))
4086 memcpy(&ch
, buf
, sizeof(wchar_t));
4093 FIXME("buffer is too small\n");
4097 /* ?underflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
4098 /* ?underflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
4099 /* ?underflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
4100 /* ?underflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
4101 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_underflow
, 4)
4102 unsigned short __thiscall
basic_filebuf_wchar_underflow(basic_filebuf_wchar
*this)
4106 TRACE("(%p)\n", this);
4108 if(basic_streambuf_wchar_gptr(&this->base
) < basic_streambuf_wchar_egptr(&this->base
))
4109 return *basic_streambuf_wchar_gptr(&this->base
);
4111 ret
= call_basic_streambuf_wchar_uflow(&this->base
);
4113 ret
= call_basic_streambuf_wchar_pbackfail(&this->base
, ret
);
4117 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
4118 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
4119 /* ?seekoff@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
4120 /* ?seekoff@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
4121 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
4122 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
4123 #if STREAMOFF_BITS == 64
4124 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_seekoff
, 24)
4126 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_seekoff
, 20)
4128 fpos_mbstatet
* __thiscall
basic_filebuf_wchar_seekoff(basic_filebuf_wchar
*this,
4129 fpos_mbstatet
*ret
, streamoff off
, int way
, int mode
)
4133 TRACE("(%p %p %s %d %d)\n", this, ret
, wine_dbgstr_longlong(off
), way
, mode
);
4135 if(basic_streambuf_wchar_gptr(&this->base
) == &this->putback
) {
4136 if(way
== SEEKDIR_cur
)
4137 off
-= sizeof(wchar_t);
4139 basic_streambuf_wchar_setg(&this->base
, &this->putback
, &this->putback
+1, &this->putback
+1);
4142 if(!basic_filebuf_wchar_is_open(this) || !basic_filebuf_wchar__Endwrite(this)
4143 || fseek(this->file
, off
, way
)) {
4146 memset(&ret
->state
, 0, sizeof(ret
->state
));
4150 fgetpos(this->file
, &pos
);
4153 ret
->state
= this->state
;
4157 /* ?seekpos@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
4158 /* ?seekpos@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
4159 /* ?seekpos@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
4160 /* ?seekpos@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
4161 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_seekpos
, 36)
4162 fpos_mbstatet
* __thiscall
basic_filebuf_wchar_seekpos(basic_filebuf_wchar
*this,
4163 fpos_mbstatet
*ret
, fpos_mbstatet pos
, int mode
)
4167 TRACE("(%p %p %s %d)\n", this, ret
, debugstr_fpos_mbstatet(&pos
), mode
);
4169 if(!basic_filebuf_wchar_is_open(this) || !basic_filebuf_wchar__Endwrite(this)
4170 || fseek(this->file
, (LONG
)pos
.pos
, SEEK_SET
)
4171 || (pos
.off
&& fseek(this->file
, pos
.off
, SEEK_CUR
))) {
4174 memset(&ret
->state
, 0, sizeof(ret
->state
));
4178 if(basic_streambuf_wchar_gptr(&this->base
) == &this->putback
)
4179 basic_streambuf_wchar_setg(&this->base
, &this->putback
, &this->putback
+1, &this->putback
+1);
4181 fgetpos(this->file
, &fpos
);
4184 ret
->state
= this->state
;
4188 /* ?setbuf@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PA_WH@Z */
4189 /* ?setbuf@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PEA_W_J@Z */
4190 #if STREAMSIZE_BITS == 64
4191 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_setbuf
, 16)
4193 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_setbuf
, 12)
4195 basic_streambuf_wchar
* __thiscall
basic_filebuf_wchar_setbuf(basic_filebuf_wchar
*this, wchar_t *buf
, streamsize count
)
4197 TRACE("(%p %p %s)\n", this, buf
, wine_dbgstr_longlong(count
));
4199 if(!basic_filebuf_wchar_is_open(this))
4202 if(setvbuf(this->file
, (char*)buf
, (buf
==NULL
&& count
==0) ? _IONBF
: _IOFBF
, count
*sizeof(wchar_t)))
4205 basic_filebuf_wchar__Init(this, this->file
, INITFL_open
);
4209 /* ?setbuf@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAGH@Z */
4210 /* ?setbuf@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAG_J@Z */
4211 #if STREAMSIZE_BITS == 64
4212 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_setbuf
, 16)
4214 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_setbuf
, 12)
4216 basic_streambuf_wchar
* __thiscall
basic_filebuf_short_setbuf(basic_filebuf_wchar
*this, wchar_t *buf
, streamsize count
)
4218 TRACE("(%p %p %s)\n", this, buf
, wine_dbgstr_longlong(count
));
4220 if(!basic_filebuf_wchar_is_open(this))
4223 if(setvbuf(this->file
, (char*)buf
, (buf
==NULL
&& count
==0) ? _IONBF
: _IOFBF
, count
*sizeof(wchar_t)))
4226 basic_filebuf_short__Init(this, this->file
, INITFL_open
);
4230 /* ?sync@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
4231 /* ?sync@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAHXZ */
4232 /* ?sync@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
4233 /* ?sync@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */
4234 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_sync
, 4)
4235 int __thiscall
basic_filebuf_wchar_sync(basic_filebuf_wchar
*this)
4237 TRACE("(%p)\n", this);
4239 if(!basic_filebuf_wchar_is_open(this))
4242 if(call_basic_streambuf_wchar_overflow(&this->base
, WEOF
) == WEOF
)
4244 return fflush(this->file
);
4247 /* ?imbue@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEXABVlocale@2@@Z */
4248 /* ?imbue@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAXAEBVlocale@2@@Z */
4249 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_imbue
, 8)
4250 void __thiscall
basic_filebuf_wchar_imbue(basic_filebuf_wchar
*this, const locale
*loc
)
4252 TRACE("(%p %p)\n", this, loc
);
4253 basic_filebuf_wchar__Initcvt_cvt(this, codecvt_wchar_use_facet(loc
));
4256 /* ?imbue@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEXABVlocale@2@@Z */
4257 /* ?imbue@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAXAEBVlocale@2@@Z */
4258 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_imbue
, 8)
4259 void __thiscall
basic_filebuf_short_imbue(basic_filebuf_wchar
*this, const locale
*loc
)
4261 TRACE("(%p %p)\n", this, loc
);
4262 basic_filebuf_wchar__Initcvt_cvt(this, codecvt_short_use_facet(loc
));
4265 /* ?_Getstate@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEHH@Z */
4266 /* ?_Getstate@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAHH@Z */
4267 /* ?_Mode@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEHH@Z */
4268 /* ?_Mode@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAHH@Z */
4269 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Getstate
, 8)
4270 int __thiscall
basic_stringbuf_char__Getstate(basic_stringbuf_char
*this, IOSB_openmode mode
)
4274 if(!(mode
& OPENMODE_in
))
4275 state
|= STRINGBUF_no_read
;
4277 if(!(mode
& OPENMODE_out
))
4278 state
|= STRINGBUF_no_write
;
4280 if(mode
& OPENMODE_ate
)
4281 state
|= STRINGBUF_at_end
;
4283 if(mode
& OPENMODE_app
)
4284 state
|= STRINGBUF_append
;
4289 /* ?_Init@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXPBDIH@Z */
4290 /* ?_Init@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAXPEBD_KH@Z */
4291 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Init
, 16)
4292 void __thiscall
basic_stringbuf_char__Init(basic_stringbuf_char
*this, const char *str
, MSVCP_size_t count
, int state
)
4294 TRACE("(%p, %p, %ld, %d)\n", this, str
, count
, state
);
4296 basic_streambuf_char__Init_empty(&this->base
);
4298 this->state
= state
;
4299 this->seekhigh
= NULL
;
4302 char *buf
= MSVCRT_operator_new(count
);
4304 ERR("Out of memory\n");
4305 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4308 memcpy(buf
, str
, count
);
4309 this->seekhigh
= buf
+ count
;
4311 this->state
|= STRINGBUF_allocated
;
4313 if(!(state
& STRINGBUF_no_read
))
4314 basic_streambuf_char_setg(&this->base
, buf
, buf
, buf
+ count
);
4316 if(!(state
& STRINGBUF_no_write
)) {
4317 basic_streambuf_char_setp_next(&this->base
, buf
, (state
& STRINGBUF_at_end
) ? buf
+ count
: buf
, buf
+ count
);
4319 if(!basic_streambuf_char_gptr(&this->base
))
4320 basic_streambuf_char_setg(&this->base
, buf
, 0, buf
);
4325 /* ??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 */
4326 /* ??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 */
4327 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor_str
, 12)
4328 basic_stringbuf_char
* __thiscall
basic_stringbuf_char_ctor_str(basic_stringbuf_char
*this,
4329 const basic_string_char
*str
, IOSB_openmode mode
)
4331 TRACE("(%p %p %d)\n", this, str
, mode
);
4333 basic_streambuf_char_ctor(&this->base
);
4334 this->base
.vtable
= &MSVCP_basic_stringbuf_char_vtable
;
4336 basic_stringbuf_char__Init(this, MSVCP_basic_string_char_c_str(str
),
4337 str
->size
, basic_stringbuf_char__Getstate(this, mode
));
4341 /* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
4342 /* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
4343 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor_mode
, 8)
4344 basic_stringbuf_char
* __thiscall
basic_stringbuf_char_ctor_mode(
4345 basic_stringbuf_char
*this, IOSB_openmode mode
)
4347 TRACE("(%p %d)\n", this, mode
);
4349 basic_streambuf_char_ctor(&this->base
);
4350 this->base
.vtable
= &MSVCP_basic_stringbuf_char_vtable
;
4352 basic_stringbuf_char__Init(this, NULL
, 0, basic_stringbuf_char__Getstate(this, mode
));
4356 /* ??_F?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
4357 /* ??_F?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
4358 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor
, 4)
4359 basic_stringbuf_char
* __thiscall
basic_stringbuf_char_ctor(basic_stringbuf_char
*this)
4361 return basic_stringbuf_char_ctor_mode(this, OPENMODE_in
|OPENMODE_out
);
4364 /* ?_Tidy@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXXZ */
4365 /* ?_Tidy@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAXXZ */
4366 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Tidy
, 4)
4367 void __thiscall
basic_stringbuf_char__Tidy(basic_stringbuf_char
*this)
4369 TRACE("(%p)\n", this);
4371 if(this->state
& STRINGBUF_allocated
) {
4372 MSVCRT_operator_delete(basic_streambuf_char_eback(&this->base
));
4373 this->seekhigh
= NULL
;
4374 this->state
&= ~STRINGBUF_allocated
;
4377 basic_streambuf_char__Init_empty(&this->base
);
4380 /* ??1?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
4381 /* ??1?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
4382 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_dtor
, 4)
4383 void __thiscall
basic_stringbuf_char_dtor(basic_stringbuf_char
*this)
4385 TRACE("(%p)\n", this);
4387 basic_stringbuf_char__Tidy(this);
4388 basic_streambuf_char_dtor(&this->base
);
4391 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_vector_dtor
, 8)
4392 basic_stringbuf_char
* __thiscall
basic_stringbuf_char_vector_dtor(basic_stringbuf_char
*this, unsigned int flags
)
4394 TRACE("(%p %x)\n", this, flags
);
4397 /* we have an array, with the number of elements stored before the first object */
4398 INT_PTR i
, *ptr
= (INT_PTR
*) this - 1;
4400 for (i
= *ptr
- 1; i
>= 0; i
--)
4401 basic_stringbuf_char_dtor(this+i
);
4403 MSVCRT_operator_delete(ptr
);
4405 basic_stringbuf_char_dtor(this);
4408 MSVCRT_operator_delete(this);
4414 /* ?overflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHH@Z */
4415 /* ?overflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHH@Z */
4416 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_overflow
, 8)
4417 int __thiscall
basic_stringbuf_char_overflow(basic_stringbuf_char
*this, int meta
)
4419 MSVCP_size_t oldsize
, size
;
4422 TRACE("(%p %x)\n", this, meta
);
4426 if(this->state
& STRINGBUF_no_write
)
4429 ptr
= basic_streambuf_char_pptr(&this->base
);
4430 if((this->state
&STRINGBUF_append
) && ptr
<this->seekhigh
)
4431 basic_streambuf_char_setp_next(&this->base
, basic_streambuf_char_pbase(&this->base
),
4432 this->seekhigh
, basic_streambuf_char_epptr(&this->base
));
4434 if(ptr
&& ptr
<basic_streambuf_char_epptr(&this->base
))
4435 return (unsigned char)(*basic_streambuf_char__Pninc(&this->base
) = meta
);
4437 oldsize
= (ptr
? basic_streambuf_char_epptr(&this->base
)-basic_streambuf_char_eback(&this->base
): 0);
4440 buf
= MSVCRT_operator_new(size
);
4442 ERR("Out of memory\n");
4443 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4447 this->seekhigh
= buf
;
4448 basic_streambuf_char_setp(&this->base
, buf
, buf
+size
);
4449 if(this->state
& STRINGBUF_no_read
)
4450 basic_streambuf_char_setg(&this->base
, buf
, NULL
, buf
);
4452 basic_streambuf_char_setg(&this->base
, buf
, buf
, buf
+1);
4454 this->state
|= STRINGBUF_allocated
;
4456 ptr
= basic_streambuf_char_eback(&this->base
);
4457 memcpy(buf
, ptr
, oldsize
);
4459 this->seekhigh
= buf
+(this->seekhigh
-ptr
);
4460 basic_streambuf_char_setp_next(&this->base
, buf
,
4461 buf
+(basic_streambuf_char_pptr(&this->base
)-ptr
), buf
+size
);
4462 if(this->state
& STRINGBUF_no_read
)
4463 basic_streambuf_char_setg(&this->base
, buf
, NULL
, buf
);
4465 basic_streambuf_char_setg(&this->base
, buf
,
4466 buf
+(basic_streambuf_char_gptr(&this->base
)-ptr
),
4467 basic_streambuf_char_pptr(&this->base
)+1);
4469 MSVCRT_operator_delete(ptr
);
4472 return (unsigned char)(*basic_streambuf_char__Pninc(&this->base
) = meta
);
4475 /* ?pbackfail@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHH@Z */
4476 /* ?pbackfail@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHH@Z */
4477 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_pbackfail
, 8)
4478 int __thiscall
basic_stringbuf_char_pbackfail(basic_stringbuf_char
*this, int c
)
4482 TRACE("(%p %x)\n", this, c
);
4484 cur
= basic_streambuf_char_gptr(&this->base
);
4485 if(!cur
|| cur
==basic_streambuf_char_eback(&this->base
)
4486 || (c
!=EOF
&& c
!=cur
[-1] && this->state
&STRINGBUF_no_write
))
4491 basic_streambuf_char_gbump(&this->base
, -1);
4492 return c
==EOF
? !EOF
: c
;
4495 /* ?underflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHXZ */
4496 /* ?underflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHXZ */
4497 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_underflow
, 4)
4498 int __thiscall
basic_stringbuf_char_underflow(basic_stringbuf_char
*this)
4502 TRACE("(%p)\n", this);
4504 cur
= basic_streambuf_char_gptr(&this->base
);
4505 if(!cur
|| this->state
&STRINGBUF_no_read
)
4508 ptr
= basic_streambuf_char_pptr(&this->base
);
4509 if(this->seekhigh
< ptr
)
4510 this->seekhigh
= ptr
;
4512 ptr
= basic_streambuf_char_egptr(&this->base
);
4513 if(this->seekhigh
> ptr
)
4514 basic_streambuf_char_setg(&this->base
, basic_streambuf_char_eback(&this->base
), cur
, this->seekhigh
);
4516 if(cur
< this->seekhigh
)
4517 return (unsigned char)*cur
;
4521 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
4522 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
4523 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */
4524 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
4525 #if STREAMOFF_BITS == 64
4526 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekoff
, 24)
4528 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekoff
, 20)
4530 fpos_mbstatet
* __thiscall
basic_stringbuf_char_seekoff(basic_stringbuf_char
*this,
4531 fpos_mbstatet
*ret
, streamoff off
, int way
, int mode
)
4533 char *beg
, *cur_r
, *cur_w
;
4535 TRACE("(%p %p %s %d %d)\n", this, ret
, wine_dbgstr_longlong(off
), way
, mode
);
4537 cur_w
= basic_streambuf_char_pptr(&this->base
);
4538 if(cur_w
> this->seekhigh
)
4539 this->seekhigh
= cur_w
;
4543 memset(&ret
->state
, 0, sizeof(ret
->state
));
4545 beg
= basic_streambuf_char_eback(&this->base
);
4546 cur_r
= basic_streambuf_char_gptr(&this->base
);
4547 if((mode
& OPENMODE_in
) && cur_r
) {
4548 if(way
==SEEKDIR_cur
&& !(mode
& OPENMODE_out
))
4550 else if(way
== SEEKDIR_end
)
4551 off
+= this->seekhigh
-beg
;
4552 else if(way
!= SEEKDIR_beg
)
4555 if(off
<0 || off
>this->seekhigh
-beg
) {
4558 basic_streambuf_char_gbump(&this->base
, beg
-cur_r
+off
);
4559 if((mode
& OPENMODE_out
) && cur_w
) {
4560 basic_streambuf_char_setp_next(&this->base
, beg
,
4561 basic_streambuf_char_gptr(&this->base
),
4562 basic_streambuf_char_epptr(&this->base
));
4565 }else if((mode
& OPENMODE_out
) && cur_w
) {
4566 if(way
== SEEKDIR_cur
)
4568 else if(way
== SEEKDIR_end
)
4569 off
+= this->seekhigh
-beg
;
4570 else if(way
!= SEEKDIR_beg
)
4573 if(off
<0 || off
>this->seekhigh
-beg
)
4576 basic_streambuf_char_pbump(&this->base
, beg
-cur_w
+off
);
4585 /* ?seekpos@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
4586 /* ?seekpos@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
4587 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekpos
, 36)
4588 fpos_mbstatet
* __thiscall
basic_stringbuf_char_seekpos(basic_stringbuf_char
*this,
4589 fpos_mbstatet
*ret
, fpos_mbstatet pos
, int mode
)
4591 TRACE("(%p %p %s %d)\n", this, ret
, debugstr_fpos_mbstatet(&pos
), mode
);
4593 if(pos
.off
==-1 && pos
.pos
==0 && MBSTATET_TO_INT(&pos
.state
)==0) {
4598 return basic_stringbuf_char_seekoff(this, ret
, pos
.pos
+pos
.off
, SEEKDIR_beg
, mode
);
4601 /* ?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 */
4602 /* ?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 */
4603 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_str_set
, 8)
4604 void __thiscall
basic_stringbuf_char_str_set(basic_stringbuf_char
*this, const basic_string_char
*str
)
4606 TRACE("(%p %p)\n", this, str
);
4608 basic_stringbuf_char__Tidy(this);
4609 basic_stringbuf_char__Init(this, MSVCP_basic_string_char_c_str(str
), str
->size
, this->state
);
4612 /* ?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 */
4613 /* ?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 */
4614 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_str_get
, 8)
4615 basic_string_char
* __thiscall
basic_stringbuf_char_str_get(const basic_stringbuf_char
*this, basic_string_char
*ret
)
4619 TRACE("(%p)\n", this);
4621 if(!(this->state
& STRINGBUF_no_write
) && basic_streambuf_char_pptr(&this->base
)) {
4624 ptr
= basic_streambuf_char_pbase(&this->base
);
4625 pptr
= basic_streambuf_char_pptr(&this->base
);
4627 return MSVCP_basic_string_char_ctor_cstr_len(ret
, ptr
, (this->seekhigh
< pptr
? pptr
: this->seekhigh
) - ptr
);
4630 if(!(this->state
& STRINGBUF_no_read
) && basic_streambuf_char_gptr(&this->base
)) {
4631 ptr
= basic_streambuf_char_eback(&this->base
);
4632 return MSVCP_basic_string_char_ctor_cstr_len(ret
, ptr
, basic_streambuf_char_egptr(&this->base
) - ptr
);
4635 return MSVCP_basic_string_char_ctor(ret
);
4638 /* ?_Getstate@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AAEHH@Z */
4639 /* ?_Getstate@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AEAAHH@Z */
4640 /* ?_Getstate@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEHH@Z */
4641 /* ?_Getstate@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAHH@Z */
4642 /* ?_Mode@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEHH@Z */
4643 /* ?_Mode@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAHH@Z */
4644 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Getstate
, 8)
4645 int __thiscall
basic_stringbuf_wchar__Getstate(basic_stringbuf_wchar
*this, IOSB_openmode mode
)
4649 if(!(mode
& OPENMODE_in
))
4650 state
|= STRINGBUF_no_read
;
4652 if(!(mode
& OPENMODE_out
))
4653 state
|= STRINGBUF_no_write
;
4655 if(mode
& OPENMODE_ate
)
4656 state
|= STRINGBUF_at_end
;
4658 if(mode
& OPENMODE_app
)
4659 state
|= STRINGBUF_append
;
4664 /* ?_Init@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXPB_WIH@Z */
4665 /* ?_Init@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAXPEB_W_KH@Z */
4666 /* ?_Init@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEXPBGIH@Z */
4667 /* ?_Init@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAXPEBG_KH@Z */
4668 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Init
, 16)
4669 void __thiscall
basic_stringbuf_wchar__Init(basic_stringbuf_wchar
*this, const wchar_t *str
, MSVCP_size_t count
, int state
)
4671 TRACE("(%p, %p, %lu, %d)\n", this, str
, count
, state
);
4673 basic_streambuf_wchar__Init_empty(&this->base
);
4675 this->state
= state
;
4676 this->seekhigh
= NULL
;
4679 wchar_t *buf
= MSVCRT_operator_new(count
*sizeof(wchar_t));
4681 ERR("Out of memory\n");
4682 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4685 memcpy(buf
, str
, count
*sizeof(wchar_t));
4686 this->seekhigh
= buf
+ count
;
4688 this->state
|= STRINGBUF_allocated
;
4690 if(!(state
& STRINGBUF_no_read
))
4691 basic_streambuf_wchar_setg(&this->base
, buf
, buf
, buf
+ count
);
4693 if(!(state
& STRINGBUF_no_write
)) {
4694 basic_streambuf_wchar_setp_next(&this->base
, buf
, (state
& STRINGBUF_at_end
) ? buf
+ count
: buf
, buf
+ count
);
4696 if(!basic_streambuf_wchar_gptr(&this->base
))
4697 basic_streambuf_wchar_setg(&this->base
, buf
, 0, buf
);
4702 /* ??0?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@1@H@Z */
4703 /* ??0?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@1@H@Z */
4704 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_ctor_str
, 12)
4705 basic_stringbuf_wchar
* __thiscall
basic_stringbuf_wchar_ctor_str(basic_stringbuf_wchar
*this,
4706 const basic_string_wchar
*str
, IOSB_openmode mode
)
4708 TRACE("(%p %p %d)\n", this, str
, mode
);
4710 basic_streambuf_wchar_ctor(&this->base
);
4711 this->base
.vtable
= &MSVCP_basic_stringbuf_wchar_vtable
;
4713 basic_stringbuf_wchar__Init(this, MSVCP_basic_string_wchar_c_str(str
),
4714 str
->size
, basic_stringbuf_wchar__Getstate(this, mode
));
4718 /* ??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 */
4719 /* ??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 */
4720 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor_str
, 12)
4721 basic_stringbuf_wchar
* __thiscall
basic_stringbuf_short_ctor_str(basic_stringbuf_wchar
*this,
4722 const basic_string_wchar
*str
, IOSB_openmode mode
)
4724 basic_stringbuf_wchar_ctor_str(this, str
, mode
);
4725 this->base
.vtable
= &MSVCP_basic_stringbuf_short_vtable
;
4729 /* ??0?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
4730 /* ??0?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
4731 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_ctor_mode
, 8)
4732 basic_stringbuf_wchar
* __thiscall
basic_stringbuf_wchar_ctor_mode(
4733 basic_stringbuf_wchar
*this, IOSB_openmode mode
)
4735 TRACE("(%p %d)\n", this, mode
);
4737 basic_streambuf_wchar_ctor(&this->base
);
4738 this->base
.vtable
= &MSVCP_basic_stringbuf_wchar_vtable
;
4740 basic_stringbuf_wchar__Init(this, NULL
, 0, basic_stringbuf_wchar__Getstate(this, mode
));
4744 /* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
4745 /* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
4746 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor_mode
, 8)
4747 basic_stringbuf_wchar
* __thiscall
basic_stringbuf_short_ctor_mode(
4748 basic_stringbuf_wchar
*this, IOSB_openmode mode
)
4750 basic_stringbuf_wchar_ctor_mode(this, mode
);
4751 this->base
.vtable
= &MSVCP_basic_stringbuf_short_vtable
;
4755 /* ??_F?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
4756 /* ??_F?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
4757 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_ctor
, 4)
4758 basic_stringbuf_wchar
* __thiscall
basic_stringbuf_wchar_ctor(basic_stringbuf_wchar
*this)
4760 return basic_stringbuf_wchar_ctor_mode(this, OPENMODE_in
|OPENMODE_out
);
4763 /* ??_F?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
4764 /* ??_F?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
4765 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor
, 4)
4766 basic_stringbuf_wchar
* __thiscall
basic_stringbuf_short_ctor(basic_stringbuf_wchar
*this)
4768 return basic_stringbuf_short_ctor_mode(this, OPENMODE_in
|OPENMODE_out
);
4771 /* ?_Tidy@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXXZ */
4772 /* ?_Tidy@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAXXZ */
4773 /* ?_Tidy@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEXXZ */
4774 /* ?_Tidy@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAXXZ */
4775 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Tidy
, 4)
4776 void __thiscall
basic_stringbuf_wchar__Tidy(basic_stringbuf_wchar
*this)
4778 TRACE("(%p)\n", this);
4780 if(this->state
& STRINGBUF_allocated
) {
4781 MSVCRT_operator_delete(basic_streambuf_wchar_eback(&this->base
));
4782 this->seekhigh
= NULL
;
4783 this->state
&= ~STRINGBUF_allocated
;
4786 basic_streambuf_wchar__Init_empty(&this->base
);
4789 /* ??1?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
4790 /* ??1?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
4791 /* ??1?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
4792 /* ??1?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
4793 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_dtor
, 4)
4794 void __thiscall
basic_stringbuf_wchar_dtor(basic_stringbuf_wchar
*this)
4796 TRACE("(%p)\n", this);
4798 basic_stringbuf_wchar__Tidy(this);
4799 basic_streambuf_wchar_dtor(&this->base
);
4802 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_vector_dtor
, 8)
4803 basic_stringbuf_wchar
* __thiscall
basic_stringbuf_wchar_vector_dtor(basic_stringbuf_wchar
*this, unsigned int flags
)
4805 TRACE("(%p %x)\n", this, flags
);
4808 /* we have an array, with the number of elements stored before the first object */
4809 INT_PTR i
, *ptr
= (INT_PTR
*) this - 1;
4811 for (i
= *ptr
- 1; i
>= 0; i
--)
4812 basic_stringbuf_wchar_dtor(this+i
);
4814 MSVCRT_operator_delete(ptr
);
4816 basic_stringbuf_wchar_dtor(this);
4819 MSVCRT_operator_delete(this);
4825 /* ?overflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGG@Z */
4826 /* ?overflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGG@Z */
4827 /* ?overflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGG@Z */
4828 /* ?overflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGG@Z */
4829 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_overflow
, 8)
4830 unsigned short __thiscall
basic_stringbuf_wchar_overflow(basic_stringbuf_wchar
*this, unsigned short meta
)
4832 MSVCP_size_t oldsize
, size
;
4835 TRACE("(%p %x)\n", this, meta
);
4839 if(this->state
& STRINGBUF_no_write
)
4842 ptr
= basic_streambuf_wchar_pptr(&this->base
);
4843 if((this->state
&STRINGBUF_append
) && ptr
<this->seekhigh
)
4844 basic_streambuf_wchar_setp_next(&this->base
, basic_streambuf_wchar_pbase(&this->base
),
4845 this->seekhigh
, basic_streambuf_wchar_epptr(&this->base
));
4847 if(ptr
&& ptr
<basic_streambuf_wchar_epptr(&this->base
))
4848 return (*basic_streambuf_wchar__Pninc(&this->base
) = meta
);
4850 oldsize
= (ptr
? basic_streambuf_wchar_epptr(&this->base
)-basic_streambuf_wchar_eback(&this->base
): 0);
4853 buf
= MSVCRT_operator_new(size
*sizeof(wchar_t));
4855 ERR("Out of memory\n");
4856 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4860 this->seekhigh
= buf
;
4861 basic_streambuf_wchar_setp(&this->base
, buf
, buf
+size
);
4862 if(this->state
& STRINGBUF_no_read
)
4863 basic_streambuf_wchar_setg(&this->base
, buf
, NULL
, buf
);
4865 basic_streambuf_wchar_setg(&this->base
, buf
, buf
, buf
+1);
4867 this->state
|= STRINGBUF_allocated
;
4869 ptr
= basic_streambuf_wchar_eback(&this->base
);
4870 memcpy(buf
, ptr
, oldsize
*sizeof(wchar_t));
4872 this->seekhigh
= buf
+(this->seekhigh
-ptr
);
4873 basic_streambuf_wchar_setp_next(&this->base
, buf
,
4874 buf
+(basic_streambuf_wchar_pptr(&this->base
)-ptr
), buf
+size
);
4875 if(this->state
& STRINGBUF_no_read
)
4876 basic_streambuf_wchar_setg(&this->base
, buf
, NULL
, buf
);
4878 basic_streambuf_wchar_setg(&this->base
, buf
,
4879 buf
+(basic_streambuf_wchar_gptr(&this->base
)-ptr
),
4880 basic_streambuf_wchar_pptr(&this->base
)+1);
4882 MSVCRT_operator_delete(ptr
);
4885 return (*basic_streambuf_wchar__Pninc(&this->base
) = meta
);
4888 /* ?pbackfail@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGG@Z */
4889 /* ?pbackfail@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGG@Z */
4890 /* ?pbackfail@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGG@Z */
4891 /* ?pbackfail@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGG@Z */
4892 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_pbackfail
, 8)
4893 unsigned short __thiscall
basic_stringbuf_wchar_pbackfail(basic_stringbuf_wchar
*this, unsigned short c
)
4897 TRACE("(%p %x)\n", this, c
);
4899 cur
= basic_streambuf_wchar_gptr(&this->base
);
4900 if(!cur
|| cur
==basic_streambuf_wchar_eback(&this->base
)
4901 || (c
!=WEOF
&& c
!=cur
[-1] && this->state
&STRINGBUF_no_write
))
4906 basic_streambuf_wchar_gbump(&this->base
, -1);
4907 return c
==WEOF
? !WEOF
: c
;
4910 /* ?underflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGXZ */
4911 /* ?underflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGXZ */
4912 /* ?underflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGXZ */
4913 /* ?underflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGXZ */
4914 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_underflow
, 4)
4915 unsigned short __thiscall
basic_stringbuf_wchar_underflow(basic_stringbuf_wchar
*this)
4919 TRACE("(%p)\n", this);
4921 cur
= basic_streambuf_wchar_gptr(&this->base
);
4922 if(!cur
|| this->state
&STRINGBUF_no_read
)
4925 ptr
= basic_streambuf_wchar_pptr(&this->base
);
4926 if(this->seekhigh
< ptr
)
4927 this->seekhigh
= ptr
;
4929 ptr
= basic_streambuf_wchar_egptr(&this->base
);
4930 if(this->seekhigh
> ptr
)
4931 basic_streambuf_wchar_setg(&this->base
, basic_streambuf_wchar_eback(&this->base
), cur
, this->seekhigh
);
4933 if(cur
< this->seekhigh
)
4938 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
4939 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
4940 /* ?seekoff@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */
4941 /* ?seekoff@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
4942 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */
4943 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
4944 #if STREAMOFF_BITS == 64
4945 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_seekoff
, 24)
4947 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_seekoff
, 20)
4949 fpos_mbstatet
* __thiscall
basic_stringbuf_wchar_seekoff(basic_stringbuf_wchar
*this,
4950 fpos_mbstatet
*ret
, streamoff off
, int way
, int mode
)
4952 wchar_t *beg
, *cur_r
, *cur_w
;
4954 TRACE("(%p %p %s %d %d)\n", this, ret
, wine_dbgstr_longlong(off
), way
, mode
);
4956 cur_w
= basic_streambuf_wchar_pptr(&this->base
);
4957 if(cur_w
> this->seekhigh
)
4958 this->seekhigh
= cur_w
;
4962 memset(&ret
->state
, 0, sizeof(ret
->state
));
4964 beg
= basic_streambuf_wchar_eback(&this->base
);
4965 cur_r
= basic_streambuf_wchar_gptr(&this->base
);
4966 if((mode
& OPENMODE_in
) && cur_r
) {
4967 if(way
==SEEKDIR_cur
&& !(mode
& OPENMODE_out
))
4969 else if(way
== SEEKDIR_end
)
4970 off
+= this->seekhigh
-beg
;
4971 else if(way
!= SEEKDIR_beg
)
4974 if(off
<0 || off
>this->seekhigh
-beg
) {
4977 basic_streambuf_wchar_gbump(&this->base
, beg
-cur_r
+off
);
4978 if((mode
& OPENMODE_out
) && cur_w
) {
4979 basic_streambuf_wchar_setp_next(&this->base
, beg
,
4980 basic_streambuf_wchar_gptr(&this->base
),
4981 basic_streambuf_wchar_epptr(&this->base
));
4984 }else if((mode
& OPENMODE_out
) && cur_w
) {
4985 if(way
== SEEKDIR_cur
)
4987 else if(way
== SEEKDIR_end
)
4988 off
+= this->seekhigh
-beg
;
4989 else if(way
!= SEEKDIR_beg
)
4992 if(off
<0 || off
>this->seekhigh
-beg
)
4995 basic_streambuf_wchar_pbump(&this->base
, beg
-cur_w
+off
);
5004 /* ?seekpos@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
5005 /* ?seekpos@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
5006 /* ?seekpos@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
5007 /* ?seekpos@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
5008 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_seekpos
, 36)
5009 fpos_mbstatet
* __thiscall
basic_stringbuf_wchar_seekpos(basic_stringbuf_wchar
*this,
5010 fpos_mbstatet
*ret
, fpos_mbstatet pos
, int mode
)
5012 TRACE("(%p %p %s %d)\n", this, ret
, debugstr_fpos_mbstatet(&pos
), mode
);
5014 if(pos
.off
==-1 && pos
.pos
==0 && MBSTATET_TO_INT(&pos
.state
)==0) {
5019 return basic_stringbuf_wchar_seekoff(this, ret
, pos
.pos
+pos
.off
, SEEKDIR_beg
, mode
);
5022 /* ?str@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z */
5023 /* ?str@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z */
5024 /* ?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 */
5025 /* ?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 */
5026 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_str_set
, 8)
5027 void __thiscall
basic_stringbuf_wchar_str_set(basic_stringbuf_wchar
*this, const basic_string_wchar
*str
)
5029 TRACE("(%p %p)\n", this, str
);
5031 basic_stringbuf_wchar__Tidy(this);
5032 basic_stringbuf_wchar__Init(this, MSVCP_basic_string_wchar_c_str(str
), str
->size
, this->state
);
5035 /* ?str@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
5036 /* ?str@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
5037 /* ?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 */
5038 /* ?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 */
5039 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_str_get
, 8)
5040 basic_string_wchar
* __thiscall
basic_stringbuf_wchar_str_get(const basic_stringbuf_wchar
*this, basic_string_wchar
*ret
)
5044 TRACE("(%p)\n", this);
5046 if(!(this->state
& STRINGBUF_no_write
) && basic_streambuf_wchar_pptr(&this->base
)) {
5049 ptr
= basic_streambuf_wchar_pbase(&this->base
);
5050 pptr
= basic_streambuf_wchar_pptr(&this->base
);
5052 return MSVCP_basic_string_wchar_ctor_cstr_len(ret
, ptr
, (this->seekhigh
< pptr
? pptr
: this->seekhigh
) - ptr
);
5055 if(!(this->state
& STRINGBUF_no_read
) && basic_streambuf_wchar_gptr(&this->base
)) {
5056 ptr
= basic_streambuf_wchar_eback(&this->base
);
5057 return MSVCP_basic_string_wchar_ctor_cstr_len(ret
, ptr
, basic_streambuf_wchar_egptr(&this->base
) - ptr
);
5060 return MSVCP_basic_string_wchar_ctor(ret
);
5063 /* ??0ios_base@std@@IAE@XZ */
5064 /* ??0ios_base@std@@IEAA@XZ */
5065 DEFINE_THISCALL_WRAPPER(ios_base_ctor
, 4)
5066 ios_base
* __thiscall
ios_base_ctor(ios_base
*this)
5068 TRACE("(%p)\n", this);
5069 this->vtable
= &MSVCP_ios_base_vtable
;
5073 /* ??0ios_base@std@@QAE@ABV01@@Z */
5074 /* ??0ios_base@std@@QEAA@AEBV01@@Z */
5075 DEFINE_THISCALL_WRAPPER(ios_base_copy_ctor
, 8)
5076 ios_base
* __thiscall
ios_base_copy_ctor(ios_base
*this, const ios_base
*copy
)
5078 TRACE("(%p %p)\n", this, copy
);
5080 this->vtable
= &MSVCP_ios_base_vtable
;
5084 /* ?_Callfns@ios_base@std@@AAEXW4event@12@@Z */
5085 /* ?_Callfns@ios_base@std@@AEAAXW4event@12@@Z */
5086 DEFINE_THISCALL_WRAPPER(ios_base_Callfns
, 8)
5087 void __thiscall
ios_base_Callfns(ios_base
*this, IOS_BASE_event event
)
5089 IOS_BASE_fnarray
*cur
;
5091 TRACE("(%p %x)\n", this, event
);
5093 for(cur
=this->calls
; cur
; cur
=cur
->next
)
5094 cur
->event_handler(event
, this, cur
->index
);
5097 /* ?_Tidy@ios_base@std@@AAAXXZ */
5098 /* ?_Tidy@ios_base@std@@AEAAXXZ */
5099 void __cdecl
ios_base_Tidy(ios_base
*this)
5101 IOS_BASE_iosarray
*arr_cur
, *arr_next
;
5102 IOS_BASE_fnarray
*event_cur
, *event_next
;
5104 TRACE("(%p)\n", this);
5106 ios_base_Callfns(this, EVENT_erase_event
);
5108 for(arr_cur
=this->arr
; arr_cur
; arr_cur
=arr_next
) {
5109 arr_next
= arr_cur
->next
;
5110 MSVCRT_operator_delete(arr_cur
);
5114 for(event_cur
=this->calls
; event_cur
; event_cur
=event_next
) {
5115 event_next
= event_cur
->next
;
5116 MSVCRT_operator_delete(event_cur
);
5121 /* ?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z */
5122 /* ?_Ios_base_dtor@ios_base@std@@CAXPEAV12@@Z */
5123 void __cdecl
ios_base_Ios_base_dtor(ios_base
*obj
)
5125 TRACE("(%p)\n", obj
);
5126 locale_dtor(IOS_LOCALE(obj
));
5127 #if _MSVCP_VER >= 70
5128 MSVCRT_operator_delete(obj
->loc
);
5133 /* ??1ios_base@std@@UAE@XZ */
5134 /* ??1ios_base@std@@UEAA@XZ */
5135 DEFINE_THISCALL_WRAPPER(ios_base_dtor
, 4)
5136 void __thiscall
ios_base_dtor(ios_base
*this)
5138 ios_base_Ios_base_dtor(this);
5141 DEFINE_THISCALL_WRAPPER(ios_base_vector_dtor
, 8)
5142 ios_base
* __thiscall
ios_base_vector_dtor(ios_base
*this, unsigned int flags
)
5144 TRACE("(%p %x)\n", this, flags
);
5146 /* we have an array, with the number of elements stored before the first object */
5147 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
5149 for(i
=*ptr
-1; i
>=0; i
--)
5150 ios_base_dtor(this+i
);
5151 MSVCRT_operator_delete(ptr
);
5153 ios_base_dtor(this);
5155 MSVCRT_operator_delete(this);
5161 DEFINE_THISCALL_WRAPPER(iosb_vector_dtor
, 8)
5162 void* __thiscall
iosb_vector_dtor(void *this, unsigned int flags
)
5164 TRACE("(%p %x)\n", this, flags
);
5166 INT_PTR
*ptr
= (INT_PTR
*)this-1;
5167 MSVCRT_operator_delete(ptr
);
5170 MSVCRT_operator_delete(this);
5176 /* ?_Findarr@ios_base@std@@AAEAAU_Iosarray@12@H@Z */
5177 /* ?_Findarr@ios_base@std@@AEAAAEAU_Iosarray@12@H@Z */
5178 DEFINE_THISCALL_WRAPPER(ios_base_Findarr
, 8)
5179 IOS_BASE_iosarray
* __thiscall
ios_base_Findarr(ios_base
*this, int index
)
5181 IOS_BASE_iosarray
*p
;
5183 TRACE("(%p %d)\n", this, index
);
5185 for(p
=this->arr
; p
; p
=p
->next
) {
5186 if(p
->index
== index
)
5190 for(p
=this->arr
; p
; p
=p
->next
) {
5191 if(!p
->long_val
&& !p
->ptr_val
) {
5197 p
= MSVCRT_operator_new(sizeof(IOS_BASE_iosarray
));
5198 p
->next
= this->arr
;
5206 /* ?iword@ios_base@std@@QAEAAJH@Z */
5207 /* ?iword@ios_base@std@@QEAAAEAJH@Z */
5208 DEFINE_THISCALL_WRAPPER(ios_base_iword
, 8)
5209 LONG
* __thiscall
ios_base_iword(ios_base
*this, int index
)
5211 TRACE("(%p %d)\n", this, index
);
5212 return &ios_base_Findarr(this, index
)->long_val
;
5215 /* ?pword@ios_base@std@@QAEAAPAXH@Z */
5216 /* ?pword@ios_base@std@@QEAAAEAPEAXH@Z */
5217 DEFINE_THISCALL_WRAPPER(ios_base_pword
, 8)
5218 void** __thiscall
ios_base_pword(ios_base
*this, int index
)
5220 TRACE("(%p %d)\n", this, index
);
5221 return &ios_base_Findarr(this, index
)->ptr_val
;
5224 /* ?register_callback@ios_base@std@@QAEXP6AXW4event@12@AAV12@H@ZH@Z */
5225 /* ?register_callback@ios_base@std@@QEAAXP6AXW4event@12@AEAV12@H@ZH@Z */
5226 DEFINE_THISCALL_WRAPPER(ios_base_register_callback
, 12)
5227 void __thiscall
ios_base_register_callback(ios_base
*this, IOS_BASE_event_callback callback
, int index
)
5229 IOS_BASE_fnarray
*event
;
5231 TRACE("(%p %p %d)\n", this, callback
, index
);
5233 event
= MSVCRT_operator_new(sizeof(IOS_BASE_fnarray
));
5234 event
->next
= this->calls
;
5235 event
->index
= index
;
5236 event
->event_handler
= callback
;
5237 this->calls
= event
;
5240 /* ?clear@ios_base@std@@QAEXH_N@Z */
5241 /* ?clear@ios_base@std@@QEAAXH_N@Z */
5242 DEFINE_THISCALL_WRAPPER(ios_base_clear_reraise
, 12)
5243 void __thiscall
ios_base_clear_reraise(ios_base
*this, IOSB_iostate state
, MSVCP_bool reraise
)
5245 TRACE("(%p %x %x)\n", this, state
, reraise
);
5247 this->state
= state
& IOSTATE_mask
;
5248 if(!(this->state
& this->except
))
5252 throw_exception(EXCEPTION_RERAISE
, NULL
);
5253 else if(this->state
& this->except
& IOSTATE_eofbit
)
5254 throw_exception(EXCEPTION_FAILURE
, "eofbit is set");
5255 else if(this->state
& this->except
& IOSTATE_failbit
)
5256 throw_exception(EXCEPTION_FAILURE
, "failbit is set");
5257 else if(this->state
& this->except
& IOSTATE_badbit
)
5258 throw_exception(EXCEPTION_FAILURE
, "badbit is set");
5259 else if(this->state
& this->except
& IOSTATE__Hardfail
)
5260 throw_exception(EXCEPTION_FAILURE
, "_Hardfail is set");
5263 /* ?clear@ios_base@std@@QAEXH@Z */
5264 /* ?clear@ios_base@std@@QEAAXH@Z */
5265 DEFINE_THISCALL_WRAPPER(ios_base_clear
, 8)
5266 void __thiscall
ios_base_clear(ios_base
*this, IOSB_iostate state
)
5268 ios_base_clear_reraise(this, state
, FALSE
);
5271 /* ?clear@ios_base@std@@QAEXI@Z */
5272 /* ?clear@ios_base@std@@QEAAXI@Z */
5273 DEFINE_THISCALL_WRAPPER(ios_base_clear_unsigned
, 8)
5274 void __thiscall
ios_base_clear_unsigned(ios_base
*this, unsigned int state
)
5276 ios_base_clear_reraise(this, (IOSB_iostate
)state
, FALSE
);
5279 /* ?exceptions@ios_base@std@@QAEXH@Z */
5280 /* ?exceptions@ios_base@std@@QEAAXH@Z */
5281 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_set
, 8)
5282 void __thiscall
ios_base_exceptions_set(ios_base
*this, IOSB_iostate state
)
5284 TRACE("(%p %x)\n", this, state
);
5285 this->except
= state
& IOSTATE_mask
;
5286 ios_base_clear(this, this->state
);
5289 /* ?exceptions@ios_base@std@@QAEXI@Z */
5290 /* ?exceptions@ios_base@std@@QEAAXI@Z */
5291 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_set_unsigned
, 8)
5292 void __thiscall
ios_base_exceptions_set_unsigned(ios_base
*this, unsigned int state
)
5294 TRACE("(%p %x)\n", this, state
);
5295 ios_base_exceptions_set(this, state
);
5298 /* ?exceptions@ios_base@std@@QBEHXZ */
5299 /* ?exceptions@ios_base@std@@QEBAHXZ */
5300 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_get
, 4)
5301 IOSB_iostate __thiscall
ios_base_exceptions_get(ios_base
*this)
5303 TRACE("(%p)\n", this);
5304 return this->except
;
5307 /* ?copyfmt@ios_base@std@@QAEAAV12@ABV12@@Z */
5308 /* ?copyfmt@ios_base@std@@QEAAAEAV12@AEBV12@@Z */
5309 DEFINE_THISCALL_WRAPPER(ios_base_copyfmt
, 8)
5310 ios_base
* __thiscall
ios_base_copyfmt(ios_base
*this, const ios_base
*rhs
)
5312 TRACE("(%p %p)\n", this, rhs
);
5315 IOS_BASE_iosarray
*arr_cur
;
5316 IOS_BASE_fnarray
*event_cur
;
5318 ios_base_Tidy(this);
5320 for(arr_cur
=rhs
->arr
; arr_cur
; arr_cur
=arr_cur
->next
) {
5321 if(arr_cur
->long_val
)
5322 *ios_base_iword(this, arr_cur
->index
) = arr_cur
->long_val
;
5323 if(arr_cur
->ptr_val
)
5324 *ios_base_pword(this, arr_cur
->index
) = arr_cur
->ptr_val
;
5326 this->stdstr
= rhs
->stdstr
;
5327 this->fmtfl
= rhs
->fmtfl
;
5328 this->prec
= rhs
->prec
;
5329 this->wide
= rhs
->wide
;
5330 locale_operator_assign(IOS_LOCALE(this), IOS_LOCALE(rhs
));
5332 for(event_cur
=rhs
->calls
; event_cur
; event_cur
=event_cur
->next
)
5333 ios_base_register_callback(this, event_cur
->event_handler
, event_cur
->index
);
5335 ios_base_Callfns(this, EVENT_copyfmt_event
);
5336 ios_base_exceptions_set(this, rhs
->except
);
5342 /* ??4ios_base@std@@QAEAAV01@ABV01@@Z */
5343 /* ??4ios_base@std@@QEAAAEAV01@AEBV01@@Z */
5344 DEFINE_THISCALL_WRAPPER(ios_base_assign
, 8)
5345 ios_base
* __thiscall
ios_base_assign(ios_base
*this, const ios_base
*right
)
5347 TRACE("(%p %p)\n", this, right
);
5350 this->state
= right
->state
;
5351 ios_base_copyfmt(this, right
);
5357 /* ?fail@ios_base@std@@QBE_NXZ */
5358 /* ?fail@ios_base@std@@QEBA_NXZ */
5359 DEFINE_THISCALL_WRAPPER(ios_base_fail
, 4)
5360 MSVCP_bool __thiscall
ios_base_fail(const ios_base
*this)
5362 TRACE("(%p)\n", this);
5363 return (this->state
& (IOSTATE_failbit
|IOSTATE_badbit
)) != 0;
5366 /* ??7ios_base@std@@QBE_NXZ */
5367 /* ??7ios_base@std@@QEBA_NXZ */
5368 DEFINE_THISCALL_WRAPPER(ios_base_op_succ
, 4)
5369 MSVCP_bool __thiscall
ios_base_op_succ(const ios_base
*this)
5371 TRACE("(%p)\n", this);
5372 return ios_base_fail(this);
5375 /* ??Bios_base@std@@QBEPAXXZ */
5376 /* ??Bios_base@std@@QEBAPEAXXZ */
5377 DEFINE_THISCALL_WRAPPER(ios_base_op_fail
, 4)
5378 void* __thiscall
ios_base_op_fail(const ios_base
*this)
5380 TRACE("(%p)\n", this);
5381 return ios_base_fail(this) ? NULL
: (void*)this;
5384 /* ??Bios_base@std@@QBA_NXZ */
5385 /* ??Bios_base@std@@QBE_NXZ */
5386 /* ??Bios_base@std@@QEBA_NXZ */
5387 DEFINE_THISCALL_WRAPPER(ios_base_operator_bool
, 4)
5388 MSVCP_bool __thiscall
ios_base_operator_bool(const ios_base
*this)
5390 TRACE("(%p)\n", this);
5391 return (this->state
& (IOSTATE_failbit
|IOSTATE_badbit
)) == 0;
5394 /* ?_Addstd@ios_base@std@@SAXPAV12@@Z */
5395 /* ?_Addstd@ios_base@std@@SAXPEAV12@@Z */
5396 void __cdecl
ios_base_Addstd(ios_base
*add
)
5398 FIXME("(%p) stub\n", add
);
5401 /* ?_Index_func@ios_base@std@@CAAAHXZ */
5402 /* ?_Index_func@ios_base@std@@CAAEAHXZ */
5403 int* __cdecl
ios_base_Index_func(void)
5406 return &ios_base_Index
;
5409 /* ?_Init@ios_base@std@@IAEXXZ */
5410 /* ?_Init@ios_base@std@@IEAAXXZ */
5411 DEFINE_THISCALL_WRAPPER(ios_base__Init
, 4)
5412 void __thiscall
ios_base__Init(ios_base
*this)
5414 TRACE("(%p)\n", this);
5417 this->state
= this->except
= IOSTATE_goodbit
;
5418 this->fmtfl
= FMTFLAG_skipws
| FMTFLAG_dec
;
5423 #if _MSVCP_VER >= 70
5424 this->loc
= MSVCRT_operator_new(sizeof(locale
));
5426 locale_ctor(IOS_LOCALE(this));
5429 /* ?_Sync_func@ios_base@std@@CAAA_NXZ */
5430 /* ?_Sync_func@ios_base@std@@CAAEA_NXZ */
5431 MSVCP_bool
* __cdecl
ios_base_Sync_func(void)
5434 return &ios_base_Sync
;
5437 /* ?bad@ios_base@std@@QBE_NXZ */
5438 /* ?bad@ios_base@std@@QEBA_NXZ */
5439 DEFINE_THISCALL_WRAPPER(ios_base_bad
, 4)
5440 MSVCP_bool __thiscall
ios_base_bad(const ios_base
*this)
5442 TRACE("(%p)\n", this);
5443 return (this->state
& IOSTATE_badbit
) != 0;
5446 /* ?eof@ios_base@std@@QBE_NXZ */
5447 /* ?eof@ios_base@std@@QEBA_NXZ */
5448 DEFINE_THISCALL_WRAPPER(ios_base_eof
, 4)
5449 MSVCP_bool __thiscall
ios_base_eof(const ios_base
*this)
5451 TRACE("(%p)\n", this);
5452 return (this->state
& IOSTATE_eofbit
) != 0;
5455 /* ?flags@ios_base@std@@QAEHH@Z */
5456 /* ?flags@ios_base@std@@QEAAHH@Z */
5457 DEFINE_THISCALL_WRAPPER(ios_base_flags_set
, 8)
5458 IOSB_fmtflags __thiscall
ios_base_flags_set(ios_base
*this, IOSB_fmtflags flags
)
5460 IOSB_fmtflags ret
= this->fmtfl
;
5462 TRACE("(%p %x)\n", this, flags
);
5464 this->fmtfl
= flags
& FMTFLAG_mask
;
5468 /* ?flags@ios_base@std@@QBEHXZ */
5469 /* ?flags@ios_base@std@@QEBAHXZ */
5470 DEFINE_THISCALL_WRAPPER(ios_base_flags_get
, 4)
5471 IOSB_fmtflags __thiscall
ios_base_flags_get(const ios_base
*this)
5473 TRACE("(%p)\n", this);
5477 /* ?getloc@ios_base@std@@QBE?AVlocale@2@XZ */
5478 /* ?getloc@ios_base@std@@QEBA?AVlocale@2@XZ */
5479 DEFINE_THISCALL_WRAPPER(ios_base_getloc
, 8)
5480 locale
* __thiscall
ios_base_getloc(const ios_base
*this, locale
*ret
)
5482 TRACE("(%p)\n", this);
5483 return locale_copy_ctor(ret
, IOS_LOCALE(this));
5486 /* ?good@ios_base@std@@QBE_NXZ */
5487 /* ?good@ios_base@std@@QEBA_NXZ */
5488 DEFINE_THISCALL_WRAPPER(ios_base_good
, 4)
5489 MSVCP_bool __thiscall
ios_base_good(const ios_base
*this)
5491 TRACE("(%p)\n", this);
5492 return this->state
== IOSTATE_goodbit
;
5495 /* ?imbue@ios_base@std@@QAE?AVlocale@2@ABV32@@Z */
5496 /* ?imbue@ios_base@std@@QEAA?AVlocale@2@AEBV32@@Z */
5497 DEFINE_THISCALL_WRAPPER(ios_base_imbue
, 12)
5498 locale
* __thiscall
ios_base_imbue(ios_base
*this, locale
*ret
, const locale
*loc
)
5500 TRACE("(%p %p)\n", this, loc
);
5501 *ret
= *IOS_LOCALE(this);
5502 locale_copy_ctor(IOS_LOCALE(this), loc
);
5506 /* ?precision@ios_base@std@@QAEHH@Z */
5507 /* ?precision@ios_base@std@@QEAA_J_J@Z */
5508 #if STREAMSIZE_BITS == 64
5509 DEFINE_THISCALL_WRAPPER(ios_base_precision_set
, 12)
5511 DEFINE_THISCALL_WRAPPER(ios_base_precision_set
, 8)
5513 streamsize __thiscall
ios_base_precision_set(ios_base
*this, streamsize precision
)
5515 streamsize ret
= this->prec
;
5517 TRACE("(%p %s)\n", this, wine_dbgstr_longlong(precision
));
5519 this->prec
= precision
;
5523 /* ?precision@ios_base@std@@QBEHXZ */
5524 /* ?precision@ios_base@std@@QEBA_JXZ */
5525 DEFINE_THISCALL_WRAPPER(ios_base_precision_get
, 4)
5526 streamsize __thiscall
ios_base_precision_get(const ios_base
*this)
5528 TRACE("(%p)\n", this);
5532 /* ?rdstate@ios_base@std@@QBEHXZ */
5533 /* ?rdstate@ios_base@std@@QEBAHXZ */
5534 DEFINE_THISCALL_WRAPPER(ios_base_rdstate
, 4)
5535 IOSB_iostate __thiscall
ios_base_rdstate(const ios_base
*this)
5537 TRACE("(%p)\n", this);
5541 /* ?setf@ios_base@std@@QAEHHH@Z */
5542 /* ?setf@ios_base@std@@QEAAHHH@Z */
5543 DEFINE_THISCALL_WRAPPER(ios_base_setf_mask
, 12)
5544 IOSB_fmtflags __thiscall
ios_base_setf_mask(ios_base
*this, IOSB_fmtflags flags
, IOSB_fmtflags mask
)
5546 IOSB_fmtflags ret
= this->fmtfl
;
5548 TRACE("(%p %x %x)\n", this, flags
, mask
);
5550 this->fmtfl
= (this->fmtfl
& (~mask
)) | (flags
& mask
& FMTFLAG_mask
);
5554 /* ?setf@ios_base@std@@QAEHH@Z */
5555 /* ?setf@ios_base@std@@QEAAHH@Z */
5556 DEFINE_THISCALL_WRAPPER(ios_base_setf
, 8)
5557 IOSB_fmtflags __thiscall
ios_base_setf(ios_base
*this, IOSB_fmtflags flags
)
5559 IOSB_fmtflags ret
= this->fmtfl
;
5561 TRACE("(%p %x)\n", this, flags
);
5563 this->fmtfl
|= flags
& FMTFLAG_mask
;
5567 /* ?setstate@ios_base@std@@QAEXH_N@Z */
5568 /* ?setstate@ios_base@std@@QEAAXH_N@Z */
5569 DEFINE_THISCALL_WRAPPER(ios_base_setstate_reraise
, 12)
5570 void __thiscall
ios_base_setstate_reraise(ios_base
*this, IOSB_iostate state
, MSVCP_bool reraise
)
5572 TRACE("(%p %x %x)\n", this, state
, reraise
);
5574 if(state
!= IOSTATE_goodbit
)
5575 ios_base_clear_reraise(this, this->state
| state
, reraise
);
5578 /* ?setstate@ios_base@std@@QAEXH@Z */
5579 /* ?setstate@ios_base@std@@QEAAXH@Z */
5580 DEFINE_THISCALL_WRAPPER(ios_base_setstate
, 8)
5581 void __thiscall
ios_base_setstate(ios_base
*this, IOSB_iostate state
)
5583 ios_base_setstate_reraise(this, state
, FALSE
);
5586 /* ?setstate@ios_base@std@@QAEXI@Z */
5587 /* ?setstate@ios_base@std@@QEAAXI@Z */
5588 DEFINE_THISCALL_WRAPPER(ios_base_setstate_unsigned
, 8)
5589 void __thiscall
ios_base_setstate_unsigned(ios_base
*this, unsigned int state
)
5591 ios_base_setstate_reraise(this, (IOSB_iostate
)state
, FALSE
);
5594 /* ?sync_with_stdio@ios_base@std@@SA_N_N@Z */
5595 MSVCP_bool __cdecl
ios_base_sync_with_stdio(MSVCP_bool sync
)
5600 TRACE("(%x)\n", sync
);
5602 _Lockit_ctor_locktype(&lock
, _LOCK_STREAM
);
5603 ret
= ios_base_Sync
;
5604 ios_base_Sync
= sync
;
5605 _Lockit_dtor(&lock
);
5609 /* ?unsetf@ios_base@std@@QAEXH@Z */
5610 /* ?unsetf@ios_base@std@@QEAAXH@Z */
5611 DEFINE_THISCALL_WRAPPER(ios_base_unsetf
, 8)
5612 void __thiscall
ios_base_unsetf(ios_base
*this, IOSB_fmtflags flags
)
5614 TRACE("(%p %x)\n", this, flags
);
5615 this->fmtfl
&= ~flags
;
5618 /* ?width@ios_base@std@@QAEHH@Z */
5619 /* ?width@ios_base@std@@QEAA_J_J@Z */
5620 #if STREAMSIZE_BITS == 64
5621 DEFINE_THISCALL_WRAPPER(ios_base_width_set
, 12)
5623 DEFINE_THISCALL_WRAPPER(ios_base_width_set
, 8)
5625 streamsize __thiscall
ios_base_width_set(ios_base
*this, streamsize width
)
5627 streamsize ret
= this->wide
;
5629 TRACE("(%p %s)\n", this, wine_dbgstr_longlong(width
));
5635 /* ?width@ios_base@std@@QBEHXZ */
5636 /* ?width@ios_base@std@@QEBA_JXZ */
5637 DEFINE_THISCALL_WRAPPER(ios_base_width_get
, 4)
5638 streamsize __thiscall
ios_base_width_get(ios_base
*this)
5640 TRACE("(%p)\n", this);
5644 /* ?xalloc@ios_base@std@@SAHXZ */
5645 int __cdecl
ios_base_xalloc(void)
5652 _Lockit_ctor_locktype(&lock
, _LOCK_STREAM
);
5653 ret
= ios_base_Index
++;
5654 _Lockit_dtor(&lock
);
5658 /* ?swap@ios_base@std@@QAEXAAV12@@Z */
5659 /* ?swap@ios_base@std@@QEAAXAEAV12@@Z */
5660 DEFINE_THISCALL_WRAPPER(ios_base_swap
, 8)
5661 void __thiscall
ios_base_swap(ios_base
*this, ios_base
*r
)
5665 TRACE("(%p %p)\n", this, r
);
5672 this->vtable
= tmp
.vtable
;
5673 tmp
.vtable
= r
->vtable
;
5677 DEFINE_THISCALL_WRAPPER(basic_ios__Add_vtordisp1
, 4)
5678 void __thiscall
basic_ios__Add_vtordisp1(void *this)
5680 WARN("should not be called (%p)\n", this);
5683 DEFINE_THISCALL_WRAPPER(basic_ios__Add_vtordisp2
, 4)
5684 void __thiscall
basic_ios__Add_vtordisp2(void *this)
5686 WARN("should not be called (%p)\n", this);
5689 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IAE@XZ */
5690 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IEAA@XZ */
5691 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor
, 4)
5692 basic_ios_char
* __thiscall
basic_ios_char_ctor(basic_ios_char
*this)
5694 TRACE("(%p)\n", this);
5696 ios_base_ctor(&this->base
);
5697 this->base
.vtable
= &MSVCP_basic_ios_char_vtable
;
5701 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IAEXPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
5702 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
5703 DEFINE_THISCALL_WRAPPER(basic_ios_char_init
, 12)
5704 void __thiscall
basic_ios_char_init(basic_ios_char
*this, basic_streambuf_char
*streambuf
, MSVCP_bool isstd
)
5706 TRACE("(%p %p %x)\n", this, streambuf
, isstd
);
5707 ios_base__Init(&this->base
);
5708 this->strbuf
= streambuf
;
5709 this->stream
= NULL
;
5713 ios_base_setstate(&this->base
, IOSTATE_badbit
);
5716 FIXME("standard streams not handled yet\n");
5719 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
5720 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
5721 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor_streambuf
, 8)
5722 basic_ios_char
* __thiscall
basic_ios_char_ctor_streambuf(basic_ios_char
*this, basic_streambuf_char
*strbuf
)
5724 TRACE("(%p %p)\n", this, strbuf
);
5726 basic_ios_char_ctor(this);
5727 basic_ios_char_init(this, strbuf
, FALSE
);
5731 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UAE@XZ */
5732 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UEAA@XZ */
5733 DEFINE_THISCALL_WRAPPER(basic_ios_char_dtor
, 4)
5734 void __thiscall
basic_ios_char_dtor(basic_ios_char
*this)
5736 TRACE("(%p)\n", this);
5737 ios_base_dtor(&this->base
);
5740 DEFINE_THISCALL_WRAPPER(basic_ios_char_vector_dtor
, 8)
5741 basic_ios_char
* __thiscall
basic_ios_char_vector_dtor(basic_ios_char
*this, unsigned int flags
)
5743 TRACE("(%p %x)\n", this, flags
);
5745 /* we have an array, with the number of elements stored before the first object */
5746 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
5748 for(i
=*ptr
-1; i
>=0; i
--)
5749 basic_ios_char_dtor(this+i
);
5750 MSVCRT_operator_delete(ptr
);
5752 basic_ios_char_dtor(this);
5754 MSVCRT_operator_delete(this);
5760 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
5761 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
5762 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear_reraise
, 12)
5763 void __thiscall
basic_ios_char_clear_reraise(basic_ios_char
*this, IOSB_iostate state
, MSVCP_bool reraise
)
5765 TRACE("(%p %x %x)\n", this, state
, reraise
);
5766 ios_base_clear_reraise(&this->base
, state
| (this->strbuf
? IOSTATE_goodbit
: IOSTATE_badbit
), reraise
);
5769 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
5770 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
5771 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear
, 8)
5772 void __thiscall
basic_ios_char_clear(basic_ios_char
*this, unsigned int state
)
5774 basic_ios_char_clear_reraise(this, (IOSB_iostate
)state
, FALSE
);
5777 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEAAV12@ABV12@@Z */
5778 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEBV12@@Z */
5779 DEFINE_THISCALL_WRAPPER(basic_ios_char_copyfmt
, 8)
5780 basic_ios_char
* __thiscall
basic_ios_char_copyfmt(basic_ios_char
*this, basic_ios_char
*copy
)
5782 TRACE("(%p %p)\n", this, copy
);
5786 this->stream
= copy
->stream
;
5787 this->fillch
= copy
->fillch
;
5788 ios_base_copyfmt(&this->base
, ©
->base
);
5792 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEDD@Z */
5793 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAADD@Z */
5794 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_set
, 8)
5795 char __thiscall
basic_ios_char_fill_set(basic_ios_char
*this, char fill
)
5797 char ret
= this->fillch
;
5799 TRACE("(%p %c)\n", this, fill
);
5801 this->fillch
= fill
;
5805 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDXZ */
5806 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADXZ */
5807 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_get
, 4)
5808 char __thiscall
basic_ios_char_fill_get(basic_ios_char
*this)
5810 TRACE("(%p)\n", this);
5811 return this->fillch
;
5814 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
5815 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
5816 DEFINE_THISCALL_WRAPPER(basic_ios_char_imbue
, 12)
5817 locale
*__thiscall
basic_ios_char_imbue(basic_ios_char
*this, locale
*ret
, const locale
*loc
)
5819 TRACE("(%p %p %p)\n", this, ret
, loc
);
5822 basic_streambuf_char_pubimbue(this->strbuf
, ret
, loc
);
5826 return ios_base_imbue(&this->base
, ret
, loc
);
5829 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDDD@Z */
5830 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADDD@Z */
5831 DEFINE_THISCALL_WRAPPER(basic_ios_char_narrow
, 12)
5832 char __thiscall
basic_ios_char_narrow(basic_ios_char
*this, char ch
, char def
)
5834 TRACE("(%p %c %c)\n", this, ch
, def
);
5835 return ctype_char_narrow_ch(ctype_char_use_facet(IOS_LOCALE(this->strbuf
)), ch
, def
);
5838 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PAV32@@Z */
5839 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAV32@@Z */
5840 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_set
, 8)
5841 basic_streambuf_char
* __thiscall
basic_ios_char_rdbuf_set(basic_ios_char
*this, basic_streambuf_char
*streambuf
)
5843 basic_streambuf_char
*ret
= this->strbuf
;
5845 TRACE("(%p %p)\n", this, streambuf
);
5847 this->strbuf
= streambuf
;
5848 basic_ios_char_clear(this, IOSTATE_goodbit
);
5852 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
5853 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
5854 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_get
, 4)
5855 basic_streambuf_char
* __thiscall
basic_ios_char_rdbuf_get(const basic_ios_char
*this)
5857 TRACE("(%p)\n", this);
5858 return this->strbuf
;
5861 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
5862 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
5863 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate_reraise
, 12)
5864 void __thiscall
basic_ios_char_setstate_reraise(basic_ios_char
*this, IOSB_iostate state
, MSVCP_bool reraise
)
5866 TRACE("(%p %x %x)\n", this, state
, reraise
);
5868 if(state
!= IOSTATE_goodbit
)
5869 basic_ios_char_clear_reraise(this, this->base
.state
| state
, reraise
);
5872 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
5873 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
5874 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate
, 8)
5875 void __thiscall
basic_ios_char_setstate(basic_ios_char
*this, unsigned int state
)
5877 basic_ios_char_setstate_reraise(this, (IOSB_iostate
)state
, FALSE
);
5880 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@PAV32@@Z */
5881 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@PEAV32@@Z */
5882 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_set
, 8)
5883 basic_ostream_char
* __thiscall
basic_ios_char_tie_set(basic_ios_char
*this, basic_ostream_char
*ostream
)
5885 basic_ostream_char
*ret
= this->stream
;
5887 TRACE("(%p %p)\n", this, ostream
);
5889 this->stream
= ostream
;
5893 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
5894 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
5895 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_get
, 4)
5896 basic_ostream_char
* __thiscall
basic_ios_char_tie_get(const basic_ios_char
*this)
5898 TRACE("(%p)\n", this);
5899 return this->stream
;
5902 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDD@Z */
5903 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADD@Z */
5904 DEFINE_THISCALL_WRAPPER(basic_ios_char_widen
, 8)
5905 char __thiscall
basic_ios_char_widen(basic_ios_char
*this, char ch
)
5907 TRACE("(%p %c)\n", this, ch
);
5908 return ctype_char_widen_ch(ctype_char_use_facet(IOS_LOCALE(this->strbuf
)), ch
);
5911 /* ?swap@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXAAV12@@Z */
5912 /* ?swap@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXAEAV12@@Z */
5913 DEFINE_THISCALL_WRAPPER(basic_ios_char_swap
, 8)
5914 void __thiscall
basic_ios_char_swap(basic_ios_char
*this, basic_ios_char
*r
)
5918 TRACE("(%p %p)\n", this, r
);
5923 ios_base_swap(&this->base
, &r
->base
);
5924 swap_ptr
= this->stream
;
5925 this->stream
= r
->stream
;
5926 r
->stream
= swap_ptr
;
5927 this->fillch
^= r
->fillch
;
5928 r
->fillch
^= this->fillch
;
5929 this->fillch
^= r
->fillch
;
5932 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAE@XZ */
5933 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */
5934 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_ctor
, 4)
5935 basic_ios_wchar
* __thiscall
basic_ios_wchar_ctor(basic_ios_wchar
*this)
5937 TRACE("(%p)\n", this);
5939 ios_base_ctor(&this->base
);
5940 this->base
.vtable
= &MSVCP_basic_ios_wchar_vtable
;
5944 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IAE@XZ */
5945 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IEAA@XZ */
5946 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor
, 4)
5947 basic_ios_wchar
* __thiscall
basic_ios_short_ctor(basic_ios_wchar
*this)
5949 basic_ios_wchar_ctor(this);
5950 this->base
.vtable
= &MSVCP_basic_ios_short_vtable
;
5954 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAEXPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
5955 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAAXPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
5956 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IAEXPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
5957 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IEAAXPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
5958 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_init
, 12)
5959 void __thiscall
basic_ios_wchar_init(basic_ios_wchar
*this, basic_streambuf_wchar
*streambuf
, MSVCP_bool isstd
)
5961 TRACE("(%p %p %x)\n", this, streambuf
, isstd
);
5962 ios_base__Init(&this->base
);
5963 this->strbuf
= streambuf
;
5964 this->stream
= NULL
;
5968 ios_base_setstate(&this->base
, IOSTATE_badbit
);
5971 FIXME("standard streams not handled yet\n");
5974 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
5975 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
5976 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_ctor_streambuf
, 8)
5977 basic_ios_wchar
* __thiscall
basic_ios_wchar_ctor_streambuf(basic_ios_wchar
*this, basic_streambuf_wchar
*strbuf
)
5979 TRACE("(%p %p)\n", this, strbuf
);
5981 basic_ios_wchar_ctor(this);
5982 basic_ios_wchar_init(this, strbuf
, FALSE
);
5986 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
5987 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
5988 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor_streambuf
, 8)
5989 basic_ios_wchar
* __thiscall
basic_ios_short_ctor_streambuf(basic_ios_wchar
*this, basic_streambuf_wchar
*strbuf
)
5991 basic_ios_wchar_ctor_streambuf(this, strbuf
);
5992 this->base
.vtable
= &MSVCP_basic_ios_short_vtable
;
5996 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
5997 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
5998 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UAE@XZ */
5999 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UEAA@XZ */
6000 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_dtor
, 4)
6001 void __thiscall
basic_ios_wchar_dtor(basic_ios_wchar
*this)
6003 TRACE("(%p)\n", this);
6004 ios_base_dtor(&this->base
);
6007 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_vector_dtor
, 8)
6008 basic_ios_wchar
* __thiscall
basic_ios_wchar_vector_dtor(basic_ios_wchar
*this, unsigned int flags
)
6010 TRACE("(%p %x)\n", this, flags
);
6012 /* we have an array, with the number of elements stored before the first object */
6013 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
6015 for(i
=*ptr
-1; i
>=0; i
--)
6016 basic_ios_wchar_dtor(this+i
);
6017 MSVCRT_operator_delete(ptr
);
6019 basic_ios_wchar_dtor(this);
6021 MSVCRT_operator_delete(this);
6027 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
6028 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
6029 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
6030 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
6031 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_clear_reraise
, 12)
6032 void __thiscall
basic_ios_wchar_clear_reraise(basic_ios_wchar
*this, IOSB_iostate state
, MSVCP_bool reraise
)
6034 TRACE("(%p %x %x)\n", this, state
, reraise
);
6035 ios_base_clear_reraise(&this->base
, state
| (this->strbuf
? IOSTATE_goodbit
: IOSTATE_badbit
), reraise
);
6038 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
6039 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
6040 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
6041 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
6042 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_clear
, 8)
6043 void __thiscall
basic_ios_wchar_clear(basic_ios_wchar
*this, unsigned int state
)
6045 basic_ios_wchar_clear_reraise(this, (IOSB_iostate
)state
, FALSE
);
6048 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEAAV12@ABV12@@Z */
6049 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEBV12@@Z */
6050 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEAAV12@ABV12@@Z */
6051 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEBV12@@Z */
6052 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_copyfmt
, 8)
6053 basic_ios_wchar
* __thiscall
basic_ios_wchar_copyfmt(basic_ios_wchar
*this, basic_ios_wchar
*copy
)
6055 TRACE("(%p %p)\n", this, copy
);
6059 this->stream
= copy
->stream
;
6060 this->fillch
= copy
->fillch
;
6061 ios_base_copyfmt(&this->base
, ©
->base
);
6065 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE_W_W@Z */
6066 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA_W_W@Z */
6067 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEGG@Z */
6068 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
6069 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_set
, 8)
6070 wchar_t __thiscall
basic_ios_wchar_fill_set(basic_ios_wchar
*this, wchar_t fill
)
6072 wchar_t ret
= this->fillch
;
6074 TRACE("(%p %c)\n", this, fill
);
6076 this->fillch
= fill
;
6080 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WXZ */
6081 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WXZ */
6082 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGXZ */
6083 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGXZ */
6084 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_get
, 4)
6085 wchar_t __thiscall
basic_ios_wchar_fill_get(basic_ios_wchar
*this)
6087 TRACE("(%p)\n", this);
6088 return this->fillch
;
6091 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
6092 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
6093 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
6094 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
6095 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_imbue
, 12)
6096 locale
*__thiscall
basic_ios_wchar_imbue(basic_ios_wchar
*this, locale
*ret
, const locale
*loc
)
6098 TRACE("(%p %p %p)\n", this, ret
, loc
);
6101 basic_streambuf_wchar_pubimbue(this->strbuf
, ret
, loc
);
6105 return ios_base_imbue(&this->base
, ret
, loc
);
6108 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBED_WD@Z */
6109 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAD_WD@Z */
6110 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEDGD@Z */
6111 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBADGD@Z */
6112 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_narrow
, 12)
6113 char __thiscall
basic_ios_wchar_narrow(basic_ios_wchar
*this, wchar_t ch
, char def
)
6115 TRACE("(%p %c %c)\n", this, ch
, def
);
6116 return ctype_wchar_narrow_ch(ctype_wchar_use_facet(IOS_LOCALE(this->strbuf
)), ch
, def
);
6119 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
6120 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
6121 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAV32@@Z */
6122 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAV32@@Z */
6123 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_set
, 8)
6124 basic_streambuf_wchar
* __thiscall
basic_ios_wchar_rdbuf_set(basic_ios_wchar
*this, basic_streambuf_wchar
*streambuf
)
6126 basic_streambuf_wchar
*ret
= this->strbuf
;
6128 TRACE("(%p %p)\n", this, streambuf
);
6130 this->strbuf
= streambuf
;
6131 basic_ios_wchar_clear(this, IOSTATE_goodbit
);
6135 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
6136 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
6137 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
6138 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
6139 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_get
, 4)
6140 basic_streambuf_wchar
* __thiscall
basic_ios_wchar_rdbuf_get(const basic_ios_wchar
*this)
6142 TRACE("(%p)\n", this);
6143 return this->strbuf
;
6146 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
6147 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
6148 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
6149 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
6150 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_setstate_reraise
, 12)
6151 void __thiscall
basic_ios_wchar_setstate_reraise(basic_ios_wchar
*this, IOSB_iostate state
, MSVCP_bool reraise
)
6153 TRACE("(%p %x %x)\n", this, state
, reraise
);
6155 if(state
!= IOSTATE_goodbit
)
6156 basic_ios_wchar_clear_reraise(this, this->base
.state
| state
, reraise
);
6159 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
6160 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
6161 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
6162 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
6163 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_setstate
, 8)
6164 void __thiscall
basic_ios_wchar_setstate(basic_ios_wchar
*this, IOSB_iostate state
)
6166 basic_ios_wchar_setstate_reraise(this, state
, FALSE
);
6169 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
6170 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
6171 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@PAV32@@Z */
6172 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@PEAV32@@Z */
6173 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_set
, 8)
6174 basic_ostream_wchar
* __thiscall
basic_ios_wchar_tie_set(basic_ios_wchar
*this, basic_ostream_wchar
*ostream
)
6176 basic_ostream_wchar
*ret
= this->stream
;
6178 TRACE("(%p %p)\n", this, ostream
);
6180 this->stream
= ostream
;
6184 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
6185 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
6186 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
6187 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
6188 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_get
, 4)
6189 basic_ostream_wchar
* __thiscall
basic_ios_wchar_tie_get(const basic_ios_wchar
*this)
6191 TRACE("(%p)\n", this);
6192 return this->stream
;
6195 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WD@Z */
6196 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WD@Z */
6197 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGD@Z */
6198 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGD@Z */
6199 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_widen
, 8)
6200 wchar_t __thiscall
basic_ios_wchar_widen(basic_ios_wchar
*this, char ch
)
6202 TRACE("(%p %c)\n", this, ch
);
6203 return ctype_wchar_widen_ch(ctype_wchar_use_facet(IOS_LOCALE(this->strbuf
)), ch
);
6206 /* ?swap@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXAAV12@@Z */
6207 /* ?swap@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXAEAV12@@Z */
6208 /* ?swap@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXAAV12@@Z */
6209 /* ?swap@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXAEAV12@@Z */
6210 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_swap
, 8)
6211 void __thiscall
basic_ios_wchar_swap(basic_ios_wchar
*this, basic_ios_wchar
*r
)
6215 TRACE("(%p %p)\n", this, r
);
6220 ios_base_swap(&this->base
, &r
->base
);
6221 swap_ptr
= this->stream
;
6222 this->stream
= r
->stream
;
6223 r
->stream
= swap_ptr
;
6224 this->fillch
^= r
->fillch
;
6225 r
->fillch
^= this->fillch
;
6226 this->fillch
^= r
->fillch
;
6229 /* Caution: basic_ostream uses virtual inheritance.
6230 * All constructors have additional parameter that says if base class should be initialized.
6231 * Base class needs to be accessed using vbtable.
6233 static inline basic_ios_char
* basic_ostream_char_get_basic_ios(basic_ostream_char
*this)
6235 return (basic_ios_char
*)((char*)this+this->vbtable
[1]);
6238 static inline basic_ios_char
* basic_ostream_char_to_basic_ios(basic_ostream_char
*ptr
)
6240 return (basic_ios_char
*)((char*)ptr
+basic_ostream_char_vbtable
[1]);
6243 static inline basic_ostream_char
* basic_ostream_char_from_basic_ios(basic_ios_char
*ptr
)
6245 return (basic_ostream_char
*)((char*)ptr
-basic_ostream_char_vbtable
[1]);
6248 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
6249 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
6250 DEFINE_THISCALL_WRAPPER(basic_ostream_char_ctor
, 16)
6251 basic_ostream_char
* __thiscall
basic_ostream_char_ctor(basic_ostream_char
*this,
6252 basic_streambuf_char
*strbuf
, MSVCP_bool isstd
, MSVCP_bool virt_init
)
6254 basic_ios_char
*base
;
6256 TRACE("(%p %p %d %d)\n", this, strbuf
, isstd
, virt_init
);
6259 this->vbtable
= basic_ostream_char_vbtable
;
6260 base
= basic_ostream_char_get_basic_ios(this);
6261 INIT_BASIC_IOS_VTORDISP(base
);
6262 basic_ios_char_ctor(base
);
6264 base
= basic_ostream_char_get_basic_ios(this);
6267 base
->base
.vtable
= &MSVCP_basic_ostream_char_vtable
;
6268 basic_ios_char_init(base
, strbuf
, isstd
);
6272 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */
6273 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */
6274 DEFINE_THISCALL_WRAPPER(basic_ostream_char_ctor_uninitialized
, 16)
6275 basic_ostream_char
* __thiscall
basic_ostream_char_ctor_uninitialized(basic_ostream_char
*this,
6276 int uninitialized
, MSVCP_bool addstd
, MSVCP_bool virt_init
)
6278 basic_ios_char
*base
;
6280 TRACE("(%p %d %x)\n", this, uninitialized
, addstd
);
6283 this->vbtable
= basic_ostream_char_vbtable
;
6284 base
= basic_ostream_char_get_basic_ios(this);
6285 INIT_BASIC_IOS_VTORDISP(base
);
6286 basic_ios_char_ctor(base
);
6288 base
= basic_ostream_char_get_basic_ios(this);
6291 base
->base
.vtable
= &MSVCP_basic_ostream_char_vtable
;
6293 ios_base_Addstd(&base
->base
);
6297 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
6298 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
6299 DEFINE_THISCALL_WRAPPER(basic_ostream_char_dtor
, 4)
6300 void __thiscall
basic_ostream_char_dtor(basic_ios_char
*base
)
6302 basic_ostream_char
*this = basic_ostream_char_from_basic_ios(base
);
6304 /* don't destroy virtual base here */
6305 TRACE("(%p)\n", this);
6308 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
6309 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
6310 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vbase_dtor
, 4)
6311 void __thiscall
basic_ostream_char_vbase_dtor(basic_ostream_char
*this)
6313 basic_ios_char
*base
= basic_ostream_char_to_basic_ios(this);
6315 TRACE("(%p)\n", this);
6317 basic_ostream_char_dtor(base
);
6318 basic_ios_char_dtor(base
);
6321 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vector_dtor
, 8)
6322 basic_ostream_char
* __thiscall
basic_ostream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
6324 basic_ostream_char
*this = basic_ostream_char_from_basic_ios(base
);
6326 TRACE("(%p %x)\n", this, flags
);
6329 /* we have an array, with the number of elements stored before the first object */
6330 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
6332 for(i
=*ptr
-1; i
>=0; i
--)
6333 basic_ostream_char_vbase_dtor(this+i
);
6334 MSVCRT_operator_delete(ptr
);
6336 basic_ostream_char_vbase_dtor(this);
6338 MSVCRT_operator_delete(this);
6344 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
6345 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
6346 DEFINE_THISCALL_WRAPPER(basic_ostream_char_flush
, 4)
6347 basic_ostream_char
* __thiscall
basic_ostream_char_flush(basic_ostream_char
*this)
6349 /* this function is not matching C++ specification */
6350 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
6352 TRACE("(%p)\n", this);
6354 if(basic_ios_char_rdbuf_get(base
) && ios_base_good(&base
->base
)
6355 && basic_streambuf_char_pubsync(basic_ios_char_rdbuf_get(base
))==-1)
6356 basic_ios_char_setstate(base
, IOSTATE_badbit
);
6360 /* ?flush@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
6361 /* ?flush@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
6362 basic_ostream_char
* __cdecl
flush_ostream_char(basic_ostream_char
*ostream
)
6364 return basic_ostream_char_flush(ostream
);
6367 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
6368 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
6369 DEFINE_THISCALL_WRAPPER(basic_ostream_char__Osfx
, 4)
6370 void __thiscall
basic_ostream_char__Osfx(basic_ostream_char
*this)
6372 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
6374 TRACE("(%p)\n", this);
6376 if(base
->base
.fmtfl
& FMTFLAG_unitbuf
)
6377 basic_ostream_char_flush(this);
6380 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
6381 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
6382 DEFINE_THISCALL_WRAPPER(basic_ostream_char_osfx
, 4)
6383 void __thiscall
basic_ostream_char_osfx(basic_ostream_char
*this)
6385 TRACE("(%p)\n", this);
6386 basic_ostream_char__Osfx(this);
6389 static BOOL
basic_ostream_char_sentry_create(basic_ostream_char
*ostr
)
6391 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
6393 if(basic_ios_char_rdbuf_get(base
))
6394 call_basic_streambuf_char__Lock(base
->strbuf
);
6396 if(ios_base_good(&base
->base
) && base
->stream
)
6397 basic_ostream_char_flush(base
->stream
);
6399 return ios_base_good(&base
->base
);
6402 static void basic_ostream_char_sentry_destroy(basic_ostream_char
*ostr
)
6404 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
6406 if(ios_base_good(&base
->base
) && !__uncaught_exception())
6407 basic_ostream_char_osfx(ostr
);
6409 if(basic_ios_char_rdbuf_get(base
))
6410 call_basic_streambuf_char__Unlock(base
->strbuf
);
6413 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE_NXZ */
6414 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA_NXZ */
6415 DEFINE_THISCALL_WRAPPER(basic_ostream_char_opfx
, 4)
6416 MSVCP_bool __thiscall
basic_ostream_char_opfx(basic_ostream_char
*this)
6418 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
6420 TRACE("(%p)\n", this);
6422 if(ios_base_good(&base
->base
) && base
->stream
)
6423 basic_ostream_char_flush(base
->stream
);
6424 return ios_base_good(&base
->base
);
6427 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
6428 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
6429 DEFINE_THISCALL_WRAPPER(basic_ostream_char_put
, 8)
6430 basic_ostream_char
* __thiscall
basic_ostream_char_put(basic_ostream_char
*this, char ch
)
6432 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
6434 TRACE("(%p %c)\n", this, ch
);
6436 if(!basic_ostream_char_sentry_create(this)
6437 || basic_streambuf_char_sputc(base
->strbuf
, ch
)==EOF
) {
6438 basic_ostream_char_sentry_destroy(this);
6439 basic_ios_char_setstate(base
, IOSTATE_badbit
);
6443 basic_ostream_char_sentry_destroy(this);
6447 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@JH@Z */
6448 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
6449 #if STREAMOFF_BITS == 64
6450 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp
, 16)
6452 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp
, 12)
6454 basic_ostream_char
* __thiscall
basic_ostream_char_seekp(basic_ostream_char
*this, streamoff off
, int way
)
6456 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
6458 TRACE("(%p %s %d)\n", this, wine_dbgstr_longlong(off
), way
);
6460 if(!ios_base_fail(&base
->base
)) {
6463 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base
),
6464 &seek
, off
, way
, OPENMODE_out
);
6465 if(seek
.off
==-1 && seek
.pos
==0 && MBSTATET_TO_INT(&seek
.state
)==0)
6466 basic_ios_char_setstate(base
, IOSTATE_failbit
);
6471 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
6472 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
6473 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp_fpos
, 28)
6474 basic_ostream_char
* __thiscall
basic_ostream_char_seekp_fpos(basic_ostream_char
*this, fpos_mbstatet pos
)
6476 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
6478 TRACE("(%p %s)\n", this, debugstr_fpos_mbstatet(&pos
));
6480 if(!ios_base_fail(&base
->base
)) {
6483 basic_streambuf_char_pubseekpos(basic_ios_char_rdbuf_get(base
),
6484 &seek
, pos
, OPENMODE_out
);
6485 if(seek
.off
==-1 && seek
.pos
==0 && MBSTATET_TO_INT(&seek
.state
)==0)
6486 basic_ios_char_setstate(base
, IOSTATE_failbit
);
6491 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
6492 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
6493 DEFINE_THISCALL_WRAPPER(basic_ostream_char_tellp
, 8)
6494 fpos_mbstatet
* __thiscall
basic_ostream_char_tellp(basic_ostream_char
*this, fpos_mbstatet
*ret
)
6496 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
6498 TRACE("(%p)\n", this);
6500 if(!ios_base_fail(&base
->base
)) {
6501 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base
),
6502 ret
, 0, SEEKDIR_cur
, OPENMODE_out
);
6506 memset(&ret
->state
, 0, sizeof(ret
->state
));
6511 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@PBDH@Z */
6512 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEBD_J@Z */
6513 #if STREAMSIZE_BITS == 64
6514 DEFINE_THISCALL_WRAPPER(basic_ostream_char_write
, 16)
6516 DEFINE_THISCALL_WRAPPER(basic_ostream_char_write
, 12)
6518 basic_ostream_char
* __thiscall
basic_ostream_char_write(basic_ostream_char
*this, const char *str
, streamsize count
)
6520 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
6522 TRACE("(%p %s %s)\n", this, debugstr_a(str
), wine_dbgstr_longlong(count
));
6524 if(!basic_ostream_char_sentry_create(this)
6525 || basic_streambuf_char_sputn(base
->strbuf
, str
, count
)!=count
) {
6526 basic_ostream_char_sentry_destroy(this);
6527 basic_ios_char_setstate(base
, IOSTATE_badbit
);
6531 basic_ostream_char_sentry_destroy(this);
6535 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@F@Z */
6536 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@F@Z */
6537 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_short
, 8)
6538 basic_ostream_char
* __thiscall
basic_ostream_char_print_short(basic_ostream_char
*this, short val
)
6540 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
6541 int state
= IOSTATE_goodbit
;
6543 TRACE("(%p %d)\n", this, val
);
6545 if(basic_ostream_char_sentry_create(this)) {
6546 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6547 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
6548 ostreambuf_iterator_char dest
;
6550 memset(&dest
, 0, sizeof(dest
));
6551 dest
.strbuf
= strbuf
;
6552 num_put_char_put_long(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
),
6553 (ios_base_flags_get(&base
->base
) & FMTFLAG_basefield
& (FMTFLAG_oct
| FMTFLAG_hex
))
6554 ? (LONG
)((unsigned short)val
) : (LONG
)val
);
6556 basic_ostream_char_sentry_destroy(this);
6558 basic_ios_char_setstate(base
, state
);
6562 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@G@Z */
6563 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@G@Z */
6564 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ushort
, 8)
6565 basic_ostream_char
* __thiscall
basic_ostream_char_print_ushort(basic_ostream_char
*this, unsigned short val
)
6567 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
6568 int state
= IOSTATE_goodbit
;
6570 TRACE("(%p %u)\n", this, val
);
6572 if(basic_ostream_char_sentry_create(this)) {
6573 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6574 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
6575 ostreambuf_iterator_char dest
;
6577 memset(&dest
, 0, sizeof(dest
));
6578 dest
.strbuf
= strbuf
;
6579 num_put_char_put_ulong(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
6581 basic_ostream_char_sentry_destroy(this);
6583 basic_ios_char_setstate(base
, state
);
6587 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z */
6588 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@H@Z */
6589 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z */
6590 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@J@Z */
6591 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int
, 8)
6592 basic_ostream_char
* __thiscall
basic_ostream_char_print_int(basic_ostream_char
*this, int val
)
6594 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
6595 int state
= IOSTATE_goodbit
;
6597 TRACE("(%p %d)\n", this, val
);
6599 if(basic_ostream_char_sentry_create(this)) {
6600 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6601 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
6602 ostreambuf_iterator_char dest
;
6604 memset(&dest
, 0, sizeof(dest
));
6605 dest
.strbuf
= strbuf
;
6606 num_put_char_put_long(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
6608 basic_ostream_char_sentry_destroy(this);
6610 basic_ios_char_setstate(base
, state
);
6614 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@I@Z */
6615 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@I@Z */
6616 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z */
6617 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@K@Z */
6618 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint
, 8)
6619 basic_ostream_char
* __thiscall
basic_ostream_char_print_uint(basic_ostream_char
*this, unsigned int val
)
6621 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
6622 int state
= IOSTATE_goodbit
;
6624 TRACE("(%p %u)\n", this, val
);
6626 if(basic_ostream_char_sentry_create(this)) {
6627 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6628 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
6629 ostreambuf_iterator_char dest
;
6631 memset(&dest
, 0, sizeof(dest
));
6632 dest
.strbuf
= strbuf
;
6633 num_put_char_put_ulong(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
6635 basic_ostream_char_sentry_destroy(this);
6637 basic_ios_char_setstate(base
, state
);
6641 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@M@Z */
6642 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@M@Z */
6643 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_float
, 8)
6644 basic_ostream_char
* __thiscall
basic_ostream_char_print_float(basic_ostream_char
*this, float val
)
6646 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
6647 int state
= IOSTATE_goodbit
;
6649 TRACE("(%p %f)\n", this, val
);
6651 if(basic_ostream_char_sentry_create(this)) {
6652 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6653 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
6654 ostreambuf_iterator_char dest
;
6656 memset(&dest
, 0, sizeof(dest
));
6657 dest
.strbuf
= strbuf
;
6658 num_put_char_put_double(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
6660 basic_ostream_char_sentry_destroy(this);
6662 basic_ios_char_setstate(base
, state
);
6666 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@N@Z */
6667 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@N@Z */
6668 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_double
, 12)
6669 basic_ostream_char
* __thiscall
basic_ostream_char_print_double(basic_ostream_char
*this, double val
)
6671 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
6672 int state
= IOSTATE_goodbit
;
6674 TRACE("(%p %lf)\n", this, val
);
6676 if(basic_ostream_char_sentry_create(this)) {
6677 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6678 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
6679 ostreambuf_iterator_char dest
;
6681 memset(&dest
, 0, sizeof(dest
));
6682 dest
.strbuf
= strbuf
;
6683 num_put_char_put_double(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
6685 basic_ostream_char_sentry_destroy(this);
6687 basic_ios_char_setstate(base
, state
);
6691 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@O@Z */
6692 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@O@Z */
6693 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ldouble
, 12)
6694 basic_ostream_char
* __thiscall
basic_ostream_char_print_ldouble(basic_ostream_char
*this, double val
)
6696 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
6697 int state
= IOSTATE_goodbit
;
6699 TRACE("(%p %lf)\n", this, val
);
6701 if(basic_ostream_char_sentry_create(this)) {
6702 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6703 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
6704 ostreambuf_iterator_char dest
;
6706 memset(&dest
, 0, sizeof(dest
));
6707 dest
.strbuf
= strbuf
;
6708 num_put_char_put_ldouble(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
6710 basic_ostream_char_sentry_destroy(this);
6712 basic_ios_char_setstate(base
, state
);
6716 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
6717 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
6718 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_streambuf
, 8)
6719 basic_ostream_char
* __thiscall
basic_ostream_char_print_streambuf(basic_ostream_char
*this, basic_streambuf_char
*val
)
6721 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
6722 IOSB_iostate state
= IOSTATE_badbit
;
6725 TRACE("(%p %p)\n", this, val
);
6727 if(basic_ostream_char_sentry_create(this)) {
6728 for(c
= basic_streambuf_char_sgetc(val
); c
!=EOF
;
6729 c
= basic_streambuf_char_snextc(val
)) {
6730 state
= IOSTATE_goodbit
;
6732 if(basic_streambuf_char_sputc(base
->strbuf
, c
) == EOF
) {
6733 state
= IOSTATE_badbit
;
6738 state
= IOSTATE_badbit
;
6740 basic_ostream_char_sentry_destroy(this);
6742 ios_base_width_set(&base
->base
, 0);
6743 basic_ios_char_setstate(base
, state
);
6747 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PBX@Z */
6748 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEBX@Z */
6749 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ptr
, 8)
6750 basic_ostream_char
* __thiscall
basic_ostream_char_print_ptr(basic_ostream_char
*this, const void *val
)
6752 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
6753 int state
= IOSTATE_goodbit
;
6755 TRACE("(%p %p)\n", this, val
);
6757 if(basic_ostream_char_sentry_create(this)) {
6758 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6759 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
6760 ostreambuf_iterator_char dest
;
6762 memset(&dest
, 0, sizeof(dest
));
6763 dest
.strbuf
= strbuf
;
6764 num_put_char_put_ptr(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
6766 basic_ostream_char_sentry_destroy(this);
6768 basic_ios_char_setstate(base
, state
);
6772 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_J@Z */
6773 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_J@Z */
6774 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int64
, 12)
6775 basic_ostream_char
* __thiscall
basic_ostream_char_print_int64(basic_ostream_char
*this, __int64 val
)
6777 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
6778 int state
= IOSTATE_goodbit
;
6780 TRACE("(%p)\n", this);
6782 if(basic_ostream_char_sentry_create(this)) {
6783 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6784 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
6785 ostreambuf_iterator_char dest
;
6787 memset(&dest
, 0, sizeof(dest
));
6788 dest
.strbuf
= strbuf
;
6789 num_put_char_put_int64(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
6791 basic_ostream_char_sentry_destroy(this);
6793 basic_ios_char_setstate(base
, state
);
6797 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_K@Z */
6798 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_K@Z */
6799 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint64
, 12)
6800 basic_ostream_char
* __thiscall
basic_ostream_char_print_uint64(basic_ostream_char
*this, unsigned __int64 val
)
6802 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
6803 int state
= IOSTATE_goodbit
;
6805 TRACE("(%p)\n", this);
6807 if(basic_ostream_char_sentry_create(this)) {
6808 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6809 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
6810 ostreambuf_iterator_char dest
;
6812 memset(&dest
, 0, sizeof(dest
));
6813 dest
.strbuf
= strbuf
;
6814 num_put_char_put_uint64(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
6816 basic_ostream_char_sentry_destroy(this);
6818 basic_ios_char_setstate(base
, state
);
6822 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_N@Z */
6823 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_N@Z */
6824 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_bool
, 8)
6825 basic_ostream_char
* __thiscall
basic_ostream_char_print_bool(basic_ostream_char
*this, MSVCP_bool val
)
6827 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
6828 int state
= IOSTATE_goodbit
;
6830 TRACE("(%p %x)\n", this, val
);
6832 if(basic_ostream_char_sentry_create(this)) {
6833 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6834 const num_put
*numput
= num_put_char_use_facet(IOS_LOCALE(strbuf
));
6835 ostreambuf_iterator_char dest
;
6837 memset(&dest
, 0, sizeof(dest
));
6838 dest
.strbuf
= strbuf
;
6839 num_put_char_put_bool(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
6841 basic_ostream_char_sentry_destroy(this);
6843 basic_ios_char_setstate(base
, state
);
6847 /* ?ends@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
6848 /* ?ends@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
6849 basic_ostream_char
* __cdecl
basic_ostream_char_ends(basic_ostream_char
*ostr
)
6851 TRACE("(%p)\n", ostr
);
6853 basic_ostream_char_put(ostr
, 0);
6857 /* ?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
6858 /* ?endl@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
6859 basic_ostream_char
* __cdecl
basic_ostream_char_endl(basic_ostream_char
*ostr
)
6861 TRACE("(%p)\n", ostr
);
6863 basic_ostream_char_put(ostr
, '\n');
6864 basic_ostream_char_flush(ostr
);
6868 /* ??$?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 */
6869 /* ??$?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 */
6870 basic_ostream_char
* __cdecl
basic_ostream_char_print_bstr(basic_ostream_char
*ostr
, const basic_string_char
*str
)
6872 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
6873 IOSB_iostate state
= IOSTATE_goodbit
;
6875 TRACE("(%p %p)\n", ostr
, str
);
6877 if(basic_ostream_char_sentry_create(ostr
)) {
6878 MSVCP_size_t len
= MSVCP_basic_string_char_length(str
);
6879 streamsize pad
= (base
->base
.wide
>len
? base
->base
.wide
-len
: 0);
6881 if((base
->base
.fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
6882 for(; pad
!=0; pad
--) {
6883 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
6884 state
= IOSTATE_badbit
;
6890 if(state
== IOSTATE_goodbit
) {
6891 if(basic_streambuf_char_sputn(base
->strbuf
, MSVCP_basic_string_char_c_str(str
), len
) != len
)
6892 state
= IOSTATE_badbit
;
6895 if(state
== IOSTATE_goodbit
) {
6896 for(; pad
!=0; pad
--) {
6897 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
6898 state
= IOSTATE_badbit
;
6904 base
->base
.wide
= 0;
6906 state
= IOSTATE_badbit
;
6908 basic_ostream_char_sentry_destroy(ostr
);
6910 basic_ios_char_setstate(base
, state
);
6914 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@C@Z */
6915 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@C@Z */
6916 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@D@Z */
6917 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@D@Z */
6918 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@E@Z */
6919 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@E@Z */
6920 basic_ostream_char
* __cdecl
basic_ostream_char_print_ch(basic_ostream_char
*ostr
, char ch
)
6922 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
6923 IOSB_iostate state
= IOSTATE_goodbit
;
6925 TRACE("(%p %d)\n", ostr
, ch
);
6927 if(basic_ostream_char_sentry_create(ostr
)) {
6928 streamsize pad
= (base
->base
.wide
>1 ? base
->base
.wide
-1 : 0);
6930 if((base
->base
.fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
6931 for(; pad
!=0; pad
--) {
6932 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
6933 state
= IOSTATE_badbit
;
6939 if(state
== IOSTATE_goodbit
) {
6940 if(basic_streambuf_char_sputc(base
->strbuf
, ch
) == EOF
)
6941 state
= IOSTATE_badbit
;
6944 if(state
== IOSTATE_goodbit
) {
6945 for(; pad
!=0; pad
--) {
6946 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
6947 state
= IOSTATE_badbit
;
6953 base
->base
.wide
= 0;
6955 state
= IOSTATE_badbit
;
6957 basic_ostream_char_sentry_destroy(ostr
);
6959 basic_ios_char_setstate(base
, state
);
6963 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBC@Z */
6964 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBC@Z */
6965 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z */
6966 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBD@Z */
6967 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBE@Z */
6968 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBE@Z */
6969 basic_ostream_char
* __cdecl
basic_ostream_char_print_str(basic_ostream_char
*ostr
, const char *str
)
6971 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
6972 IOSB_iostate state
= IOSTATE_goodbit
;
6974 TRACE("(%p %s)\n", ostr
, str
);
6976 if(basic_ostream_char_sentry_create(ostr
)) {
6977 MSVCP_size_t len
= strlen(str
);
6978 streamsize pad
= (base
->base
.wide
>len
? base
->base
.wide
-len
: 0);
6980 if((base
->base
.fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
6981 for(; pad
!=0; pad
--) {
6982 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
6983 state
= IOSTATE_badbit
;
6989 if(state
== IOSTATE_goodbit
) {
6990 if(basic_streambuf_char_sputn(base
->strbuf
, str
, len
) != len
)
6991 state
= IOSTATE_badbit
;
6994 if(state
== IOSTATE_goodbit
) {
6995 for(; pad
!=0; pad
--) {
6996 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
6997 state
= IOSTATE_badbit
;
7003 base
->base
.wide
= 0;
7005 state
= IOSTATE_badbit
;
7007 basic_ostream_char_sentry_destroy(ostr
);
7009 basic_ios_char_setstate(base
, state
);
7013 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
7014 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
7015 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func
, 8)
7016 basic_ostream_char
* __thiscall
basic_ostream_char_print_func(basic_ostream_char
*this,
7017 basic_ostream_char
* (__cdecl
*pfunc
)(basic_ostream_char
*))
7019 TRACE("(%p %p)\n", this, pfunc
);
7024 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
7025 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
7026 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_basic_ios
, 8)
7027 basic_ostream_char
* __thiscall
basic_ostream_char_print_func_basic_ios(basic_ostream_char
*this,
7028 basic_ios_char
* (__cdecl
*pfunc
)(basic_ios_char
*))
7030 TRACE("(%p %p)\n", this, pfunc
);
7031 pfunc(basic_ostream_char_get_basic_ios(this));
7035 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
7036 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
7037 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_ios_base
, 8)
7038 basic_ostream_char
* __thiscall
basic_ostream_char_print_func_ios_base(
7039 basic_ostream_char
*this, ios_base
* (__cdecl
*pfunc
)(ios_base
*))
7041 TRACE("(%p %p)\n", this, pfunc
);
7042 pfunc(&basic_ostream_char_get_basic_ios(this)->base
);
7046 /* ?swap@?$basic_ostream@DU?$char_traits@D@std@@@std@@IAEXAAV12@@Z */
7047 /* ?swap@?$basic_ostream@DU?$char_traits@D@std@@@std@@IEAAXAEAV12@@Z */
7048 DEFINE_THISCALL_WRAPPER(basic_ostream_char_swap
, 8)
7049 void __thiscall
basic_ostream_char_swap(basic_ostream_char
*this, basic_ostream_char
*r
)
7051 TRACE("(%p %p)\n", this, r
);
7056 basic_ios_char_swap(basic_ostream_char_get_basic_ios(this),
7057 basic_ostream_char_get_basic_ios(r
));
7060 /* Caution: basic_ostream uses virtual inheritance. */
7061 static inline basic_ios_wchar
* basic_ostream_wchar_get_basic_ios(basic_ostream_wchar
*this)
7063 return (basic_ios_wchar
*)((char*)this+this->vbtable
[1]);
7066 static inline basic_ios_wchar
* basic_ostream_wchar_to_basic_ios(basic_ostream_wchar
*ptr
)
7068 return (basic_ios_wchar
*)((char*)ptr
+basic_ostream_wchar_vbtable
[1]);
7071 static inline basic_ostream_wchar
* basic_ostream_wchar_from_basic_ios(basic_ios_wchar
*ptr
)
7073 return (basic_ostream_wchar
*)((char*)ptr
-basic_ostream_wchar_vbtable
[1]);
7076 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
7077 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
7078 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_ctor
, 16)
7079 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_ctor(basic_ostream_wchar
*this,
7080 basic_streambuf_wchar
*strbuf
, MSVCP_bool isstd
, MSVCP_bool virt_init
)
7082 basic_ios_wchar
*base
;
7084 TRACE("(%p %p %d %d)\n", this, strbuf
, isstd
, virt_init
);
7087 this->vbtable
= basic_ostream_wchar_vbtable
;
7088 base
= basic_ostream_wchar_get_basic_ios(this);
7089 INIT_BASIC_IOS_VTORDISP(base
);
7090 basic_ios_wchar_ctor(base
);
7092 base
= basic_ostream_wchar_get_basic_ios(this);
7095 base
->base
.vtable
= &MSVCP_basic_ostream_wchar_vtable
;
7096 basic_ios_wchar_init(base
, strbuf
, isstd
);
7100 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
7101 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
7102 DEFINE_THISCALL_WRAPPER(basic_ostream_short_ctor
, 16)
7103 basic_ostream_wchar
* __thiscall
basic_ostream_short_ctor(basic_ostream_wchar
*this,
7104 basic_streambuf_wchar
*strbuf
, MSVCP_bool isstd
, MSVCP_bool virt_init
)
7106 basic_ostream_wchar_ctor(this, strbuf
, isstd
, virt_init
);
7107 basic_ostream_wchar_get_basic_ios(this)->base
.vtable
= &MSVCP_basic_ostream_short_vtable
;
7111 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */
7112 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */
7113 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_ctor_uninitialized
, 16)
7114 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_ctor_uninitialized(basic_ostream_wchar
*this,
7115 int uninitialized
, MSVCP_bool addstd
, MSVCP_bool virt_init
)
7117 basic_ios_wchar
*base
;
7119 TRACE("(%p %d %x)\n", this, uninitialized
, addstd
);
7122 this->vbtable
= basic_ostream_wchar_vbtable
;
7123 base
= basic_ostream_wchar_get_basic_ios(this);
7124 INIT_BASIC_IOS_VTORDISP(base
);
7125 basic_ios_wchar_ctor(base
);
7127 base
= basic_ostream_wchar_get_basic_ios(this);
7130 base
->base
.vtable
= &MSVCP_basic_ostream_wchar_vtable
;
7132 ios_base_Addstd(&base
->base
);
7136 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */
7137 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */
7138 DEFINE_THISCALL_WRAPPER(basic_ostream_short_ctor_uninitialized
, 16)
7139 basic_ostream_wchar
* __thiscall
basic_ostream_short_ctor_uninitialized(basic_ostream_wchar
*this,
7140 int uninitialized
, MSVCP_bool addstd
, MSVCP_bool virt_init
)
7142 basic_ostream_wchar_ctor_uninitialized(this, uninitialized
, addstd
, virt_init
);
7143 basic_ostream_wchar_get_basic_ios(this)->base
.vtable
= &MSVCP_basic_ostream_short_vtable
;
7147 /* ??1?$basic_ostream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
7148 /* ??1?$basic_ostream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
7149 /* ??1?$basic_ostream@GU?$char_traits@G@std@@@std@@UAE@XZ */
7150 /* ??1?$basic_ostream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
7151 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_dtor
, 4)
7152 void __thiscall
basic_ostream_wchar_dtor(basic_ios_wchar
*base
)
7154 basic_ostream_wchar
*this = basic_ostream_wchar_from_basic_ios(base
);
7156 /* don't destroy virtual base here */
7157 TRACE("(%p)\n", this);
7160 /* ??_D?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
7161 /* ??_D?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
7162 /* ??_D?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
7163 /* ??_D?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
7164 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_vbase_dtor
, 4)
7165 void __thiscall
basic_ostream_wchar_vbase_dtor(basic_ostream_wchar
*this)
7167 basic_ios_wchar
*base
= basic_ostream_wchar_to_basic_ios(this);
7169 TRACE("(%p)\n", this);
7171 basic_ostream_wchar_dtor(base
);
7172 basic_ios_wchar_dtor(base
);
7175 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_vector_dtor
, 8)
7176 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
7178 basic_ostream_wchar
*this = basic_ostream_wchar_from_basic_ios(base
);
7180 TRACE("(%p %x)\n", this, flags
);
7183 /* we have an array, with the number of elements stored before the first object */
7184 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
7186 for(i
=*ptr
-1; i
>=0; i
--)
7187 basic_ostream_wchar_vbase_dtor(this+i
);
7188 MSVCRT_operator_delete(ptr
);
7190 basic_ostream_wchar_vbase_dtor(this);
7192 MSVCRT_operator_delete(this);
7198 /* ?flush@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@XZ */
7199 /* ?flush@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@XZ */
7200 /* ?flush@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@XZ */
7201 /* ?flush@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@XZ */
7202 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_flush
, 4)
7203 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_flush(basic_ostream_wchar
*this)
7205 /* this function is not matching C++ specification */
7206 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
7208 TRACE("(%p)\n", this);
7210 if(basic_ios_wchar_rdbuf_get(base
) && ios_base_good(&base
->base
)
7211 && basic_streambuf_wchar_pubsync(basic_ios_wchar_rdbuf_get(base
))==-1)
7212 basic_ios_wchar_setstate(base
, IOSTATE_badbit
);
7216 /* ?flush@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
7217 /* ?flush@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
7218 /* ?flush@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
7219 /* ?flush@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
7220 basic_ostream_wchar
* __cdecl
flush_ostream_wchar(basic_ostream_wchar
*ostream
)
7222 return basic_ostream_wchar_flush(ostream
);
7225 /* ?_Osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
7226 /* ?_Osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
7227 /* ?_Osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
7228 /* ?_Osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
7229 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar__Osfx
, 4)
7230 void __thiscall
basic_ostream_wchar__Osfx(basic_ostream_wchar
*this)
7232 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
7234 TRACE("(%p)\n", this);
7236 if(base
->base
.fmtfl
& FMTFLAG_unitbuf
)
7237 basic_ostream_wchar_flush(this);
7240 /* ?osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
7241 /* ?osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
7242 /* ?osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
7243 /* ?osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
7244 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_osfx
, 4)
7245 void __thiscall
basic_ostream_wchar_osfx(basic_ostream_wchar
*this)
7247 TRACE("(%p)\n", this);
7248 basic_ostream_wchar__Osfx(this);
7251 static BOOL
basic_ostream_wchar_sentry_create(basic_ostream_wchar
*ostr
)
7253 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(ostr
);
7255 if(basic_ios_wchar_rdbuf_get(base
))
7256 basic_streambuf_wchar__Lock(base
->strbuf
);
7258 if(ios_base_good(&base
->base
) && base
->stream
)
7259 basic_ostream_wchar_flush(base
->stream
);
7261 return ios_base_good(&base
->base
);
7264 static void basic_ostream_wchar_sentry_destroy(basic_ostream_wchar
*ostr
)
7266 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(ostr
);
7268 if(ios_base_good(&base
->base
) && !__uncaught_exception())
7269 basic_ostream_wchar_osfx(ostr
);
7271 if(basic_ios_wchar_rdbuf_get(base
))
7272 basic_streambuf_wchar__Unlock(base
->strbuf
);
7275 /* ?opfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE_NXZ */
7276 /* ?opfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA_NXZ */
7277 /* ?opfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE_NXZ */
7278 /* ?opfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA_NXZ */
7279 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_opfx
, 4)
7280 MSVCP_bool __thiscall
basic_ostream_wchar_opfx(basic_ostream_wchar
*this)
7282 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
7284 TRACE("(%p)\n", this);
7286 if(ios_base_good(&base
->base
) && base
->stream
)
7287 basic_ostream_wchar_flush(base
->stream
);
7288 return ios_base_good(&base
->base
);
7291 /* ?put@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@_W@Z */
7292 /* ?put@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_W@Z */
7293 /* ?put@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@G@Z */
7294 /* ?put@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@G@Z */
7295 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_put
, 8)
7296 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_put(basic_ostream_wchar
*this, wchar_t ch
)
7298 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
7300 TRACE("(%p %c)\n", this, ch
);
7302 if(!basic_ostream_wchar_sentry_create(this)
7303 || basic_streambuf_wchar_sputc(base
->strbuf
, ch
)==WEOF
) {
7304 basic_ostream_wchar_sentry_destroy(this);
7305 basic_ios_wchar_setstate(base
, IOSTATE_badbit
);
7309 basic_ostream_wchar_sentry_destroy(this);
7313 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@JH@Z */
7314 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_JH@Z */
7315 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@JH@Z */
7316 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JH@Z */
7317 #if STREAMOFF_BITS == 64
7318 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_seekp
, 16)
7320 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_seekp
, 12)
7322 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_seekp(basic_ostream_wchar
*this, streamoff off
, int way
)
7324 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
7326 TRACE("(%p %s %d)\n", this, wine_dbgstr_longlong(off
), way
);
7328 if(!ios_base_fail(&base
->base
)) {
7331 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base
),
7332 &seek
, off
, way
, OPENMODE_out
);
7333 if(seek
.off
==-1 && seek
.pos
==0 && MBSTATET_TO_INT(&seek
.state
)==0)
7334 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
7339 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
7340 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
7341 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
7342 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
7343 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_seekp_fpos
, 28)
7344 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_seekp_fpos(basic_ostream_wchar
*this, fpos_mbstatet pos
)
7346 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
7348 TRACE("(%p %s)\n", this, debugstr_fpos_mbstatet(&pos
));
7350 if(!ios_base_fail(&base
->base
)) {
7353 basic_streambuf_wchar_pubseekpos(basic_ios_wchar_rdbuf_get(base
),
7354 &seek
, pos
, OPENMODE_out
);
7355 if(seek
.off
==-1 && seek
.pos
==0 && MBSTATET_TO_INT(&seek
.state
)==0)
7356 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
7361 /* ?tellp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@XZ */
7362 /* ?tellp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
7363 /* ?tellp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@XZ */
7364 /* ?tellp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
7365 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_tellp
, 8)
7366 fpos_mbstatet
* __thiscall
basic_ostream_wchar_tellp(basic_ostream_wchar
*this, fpos_mbstatet
*ret
)
7368 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
7370 TRACE("(%p)\n", this);
7372 if(!ios_base_fail(&base
->base
)) {
7373 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base
),
7374 ret
, 0, SEEKDIR_cur
, OPENMODE_out
);
7378 memset(&ret
->state
, 0, sizeof(ret
->state
));
7383 /* ?write@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PB_WH@Z */
7384 /* ?write@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEB_W_J@Z */
7385 /* ?write@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@PBGH@Z */
7386 /* ?write@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEBG_J@Z */
7387 #if STREAMSIZE_BITS == 64
7388 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_write
, 16)
7390 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_write
, 12)
7392 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_write(basic_ostream_wchar
*this, const wchar_t *str
, streamsize count
)
7394 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
7396 TRACE("(%p %s %s)\n", this, debugstr_w(str
), wine_dbgstr_longlong(count
));
7398 if(!basic_ostream_wchar_sentry_create(this)
7399 || basic_streambuf_wchar_sputn(base
->strbuf
, str
, count
)!=count
) {
7400 basic_ostream_wchar_sentry_destroy(this);
7401 basic_ios_wchar_setstate(base
, IOSTATE_badbit
);
7405 basic_ostream_wchar_sentry_destroy(this);
7409 static basic_ostream_wchar
* basic_ostream_print_short(basic_ostream_wchar
*this, short val
, const num_put
*numput
)
7411 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
7412 int state
= IOSTATE_goodbit
;
7414 TRACE("(%p %d)\n", this, val
);
7416 if(basic_ostream_wchar_sentry_create(this)) {
7417 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7418 ostreambuf_iterator_wchar dest
;
7420 memset(&dest
, 0, sizeof(dest
));
7421 dest
.strbuf
= strbuf
;
7422 num_put_wchar_put_long(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
),
7423 (ios_base_flags_get(&base
->base
) & FMTFLAG_basefield
& (FMTFLAG_oct
| FMTFLAG_hex
))
7424 ? (LONG
)((unsigned short)val
) : (LONG
)val
);
7426 basic_ostream_wchar_sentry_destroy(this);
7428 basic_ios_wchar_setstate(base
, state
);
7432 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@F@Z */
7433 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@F@Z */
7434 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_short
, 8)
7435 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_short(basic_ostream_wchar
*this, short val
)
7437 return basic_ostream_print_short(this, val
, num_put_wchar_use_facet(
7438 IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
7441 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@F@Z */
7442 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@F@Z */
7443 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_short
, 8)
7444 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_short(basic_ostream_wchar
*this, short val
)
7446 return basic_ostream_print_short(this, val
, num_put_short_use_facet(
7447 IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
7450 static basic_ostream_wchar
* basic_ostream_print_ushort(basic_ostream_wchar
*this, unsigned short val
, const num_put
*numput
)
7452 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
7453 int state
= IOSTATE_goodbit
;
7455 TRACE("(%p %d)\n", this, val
);
7457 if(basic_ostream_wchar_sentry_create(this)) {
7458 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7459 ostreambuf_iterator_wchar dest
;
7461 memset(&dest
, 0, sizeof(dest
));
7462 dest
.strbuf
= strbuf
;
7463 num_put_wchar_put_ulong(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
7465 basic_ostream_wchar_sentry_destroy(this);
7467 basic_ios_wchar_setstate(base
, state
);
7471 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@G@Z */
7472 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@G@Z */
7473 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ushort
, 8)
7474 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_ushort(basic_ostream_wchar
*this, unsigned short val
)
7476 return basic_ostream_print_ushort(this, val
, num_put_wchar_use_facet(
7477 IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
7480 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@G@Z */
7481 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@G@Z */
7482 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ushort
, 8)
7483 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_ushort(basic_ostream_wchar
*this, unsigned short val
)
7485 return basic_ostream_print_ushort(this, val
, num_put_short_use_facet(
7486 IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
7489 /* ??6std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@0@AAV10@G@Z */
7490 /* ??6std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@0@AEAV10@G@Z */
7491 basic_ostream_wchar
* __cdecl
basic_ostream_short_print_ushort_global(basic_ostream_wchar
*ostr
, unsigned short val
)
7493 return basic_ostream_print_ushort(ostr
, val
, num_put_short_use_facet(
7494 IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(ostr
)))));
7497 static basic_ostream_wchar
* basic_ostream_print_int(basic_ostream_wchar
*this, int val
, const num_put
*numput
)
7499 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
7500 int state
= IOSTATE_goodbit
;
7502 TRACE("(%p %d)\n", this, val
);
7504 if(basic_ostream_wchar_sentry_create(this)) {
7505 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7506 ostreambuf_iterator_wchar dest
;
7508 memset(&dest
, 0, sizeof(dest
));
7509 dest
.strbuf
= strbuf
;
7510 num_put_wchar_put_long(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
7512 basic_ostream_wchar_sentry_destroy(this);
7514 basic_ios_wchar_setstate(base
, state
);
7518 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@H@Z */
7519 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@H@Z */
7520 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@J@Z */
7521 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@J@Z */
7522 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_int
, 8)
7523 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_int(basic_ostream_wchar
*this, int val
)
7525 return basic_ostream_print_int(this, val
, num_put_wchar_use_facet(
7526 IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
7529 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@H@Z */
7530 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@H@Z */
7531 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@J@Z */
7532 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@J@Z */
7533 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int
, 8)
7534 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_int(basic_ostream_wchar
*this, int val
)
7536 return basic_ostream_print_int(this, val
, num_put_short_use_facet(
7537 IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
7540 static basic_ostream_wchar
* basic_ostream_print_uint(basic_ostream_wchar
*this, unsigned int val
, const num_put
*numput
)
7542 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
7543 int state
= IOSTATE_goodbit
;
7545 TRACE("(%p %u)\n", this, val
);
7547 if(basic_ostream_wchar_sentry_create(this)) {
7548 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7549 ostreambuf_iterator_wchar dest
;
7551 memset(&dest
, 0, sizeof(dest
));
7552 dest
.strbuf
= strbuf
;
7553 num_put_wchar_put_ulong(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
7555 basic_ostream_wchar_sentry_destroy(this);
7557 basic_ios_wchar_setstate(base
, state
);
7561 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@I@Z */
7562 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@I@Z */
7563 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@K@Z */
7564 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@K@Z */
7565 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_uint
, 8)
7566 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_uint(basic_ostream_wchar
*this, unsigned int val
)
7568 return basic_ostream_print_uint(this, val
, num_put_wchar_use_facet(
7569 IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
7572 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@I@Z */
7573 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@I@Z */
7574 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@K@Z */
7575 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@K@Z */
7576 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint
, 8)
7577 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_uint(basic_ostream_wchar
*this, unsigned int val
)
7579 return basic_ostream_print_uint(this, val
, num_put_short_use_facet(
7580 IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
7583 static basic_ostream_wchar
* basic_ostream_print_float(basic_ostream_wchar
*this, float val
, const num_put
*numput
)
7585 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
7586 int state
= IOSTATE_goodbit
;
7588 TRACE("(%p %f)\n", this, val
);
7590 if(basic_ostream_wchar_sentry_create(this)) {
7591 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7592 ostreambuf_iterator_wchar dest
;
7594 memset(&dest
, 0, sizeof(dest
));
7595 dest
.strbuf
= strbuf
;
7596 num_put_wchar_put_double(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
7598 basic_ostream_wchar_sentry_destroy(this);
7600 basic_ios_wchar_setstate(base
, state
);
7604 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@M@Z */
7605 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@M@Z */
7606 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_float
, 8)
7607 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_float(basic_ostream_wchar
*this, float val
)
7609 return basic_ostream_print_float(this, val
, num_put_wchar_use_facet(
7610 IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
7613 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@M@Z */
7614 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@M@Z */
7615 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_float
, 8)
7616 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_float(basic_ostream_wchar
*this, float val
)
7618 return basic_ostream_print_float(this, val
, num_put_short_use_facet(
7619 IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
7622 static basic_ostream_wchar
* basic_ostream_print_double(basic_ostream_wchar
*this, double val
, const num_put
*numput
)
7624 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
7625 int state
= IOSTATE_goodbit
;
7627 TRACE("(%p %lf)\n", this, val
);
7629 if(basic_ostream_wchar_sentry_create(this)) {
7630 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7631 ostreambuf_iterator_wchar dest
;
7633 memset(&dest
, 0, sizeof(dest
));
7634 dest
.strbuf
= strbuf
;
7635 num_put_wchar_put_double(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
7637 basic_ostream_wchar_sentry_destroy(this);
7639 basic_ios_wchar_setstate(base
, state
);
7643 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@N@Z */
7644 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@N@Z */
7645 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_double
, 12)
7646 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_double(basic_ostream_wchar
*this, double val
)
7648 return basic_ostream_print_double(this, val
, num_put_wchar_use_facet(
7649 IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
7652 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@N@Z */
7653 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@N@Z */
7654 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_double
, 12)
7655 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_double(basic_ostream_wchar
*this, double val
)
7657 return basic_ostream_print_double(this, val
, num_put_short_use_facet(
7658 IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
7661 static basic_ostream_wchar
* basic_ostream_print_ldouble(basic_ostream_wchar
*this, double val
, const num_put
*numput
)
7663 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
7664 int state
= IOSTATE_goodbit
;
7666 TRACE("(%p %lf)\n", this, val
);
7668 if(basic_ostream_wchar_sentry_create(this)) {
7669 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7670 ostreambuf_iterator_wchar dest
;
7672 memset(&dest
, 0, sizeof(dest
));
7673 dest
.strbuf
= strbuf
;
7674 num_put_wchar_put_ldouble(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
7676 basic_ostream_wchar_sentry_destroy(this);
7678 basic_ios_wchar_setstate(base
, state
);
7682 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@O@Z */
7683 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@O@Z */
7684 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ldouble
, 12)
7685 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_ldouble(basic_ostream_wchar
*this, double val
)
7687 return basic_ostream_print_ldouble(this, val
, num_put_wchar_use_facet(
7688 IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
7691 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@O@Z */
7692 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@O@Z */
7693 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ldouble
, 12)
7694 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_ldouble(basic_ostream_wchar
*this, double val
)
7696 return basic_ostream_print_ldouble(this, val
, num_put_short_use_facet(
7697 IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
7700 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
7701 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
7702 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
7703 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
7704 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_streambuf
, 8)
7705 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_streambuf(basic_ostream_wchar
*this, basic_streambuf_wchar
*val
)
7707 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
7708 IOSB_iostate state
= IOSTATE_badbit
;
7709 unsigned short c
= '\n';
7711 TRACE("(%p %p)\n", this, val
);
7713 if(basic_ostream_wchar_sentry_create(this)) {
7714 for(c
= basic_streambuf_wchar_sgetc(val
); c
!=WEOF
;
7715 c
= basic_streambuf_wchar_snextc(val
)) {
7716 state
= IOSTATE_goodbit
;
7718 if(basic_streambuf_wchar_sputc(base
->strbuf
, c
) == WEOF
) {
7719 state
= IOSTATE_badbit
;
7724 state
= IOSTATE_badbit
;
7726 basic_ostream_wchar_sentry_destroy(this);
7728 ios_base_width_set(&base
->base
, 0);
7729 basic_ios_wchar_setstate(base
, state
);
7733 static basic_ostream_wchar
* basic_ostream_print_ptr(basic_ostream_wchar
*this, const void *val
, const num_put
*numput
)
7735 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
7736 int state
= IOSTATE_goodbit
;
7738 TRACE("(%p %p)\n", this, val
);
7740 if(basic_ostream_wchar_sentry_create(this)) {
7741 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7742 ostreambuf_iterator_wchar dest
;
7744 memset(&dest
, 0, sizeof(dest
));
7745 dest
.strbuf
= strbuf
;
7746 num_put_wchar_put_ptr(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
7748 basic_ostream_wchar_sentry_destroy(this);
7750 basic_ios_wchar_setstate(base
, state
);
7754 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PBX@Z */
7755 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEBX@Z */
7756 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ptr
, 8)
7757 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_ptr(basic_ostream_wchar
*this, const void *val
)
7759 return basic_ostream_print_ptr(this, val
, num_put_wchar_use_facet(
7760 IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
7763 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PBX@Z */
7764 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEBX@Z */
7765 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ptr
, 8)
7766 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_ptr(basic_ostream_wchar
*this, const void *val
)
7768 return basic_ostream_print_ptr(this, val
, num_put_short_use_facet(
7769 IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
7772 static basic_ostream_wchar
* basic_ostream_print_int64(basic_ostream_wchar
*this, __int64 val
, const num_put
*numput
)
7774 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
7775 int state
= IOSTATE_goodbit
;
7777 TRACE("(%p)\n", this);
7779 if(basic_ostream_wchar_sentry_create(this)) {
7780 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7781 ostreambuf_iterator_wchar dest
;
7783 memset(&dest
, 0, sizeof(dest
));
7784 dest
.strbuf
= strbuf
;
7785 num_put_wchar_put_int64(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
7787 basic_ostream_wchar_sentry_destroy(this);
7789 basic_ios_wchar_setstate(base
, state
);
7793 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@_J@Z */
7794 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@_J@Z */
7795 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_int64
, 12)
7796 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_int64(basic_ostream_wchar
*this, __int64 val
)
7798 return basic_ostream_print_int64(this, val
, num_put_wchar_use_facet(
7799 IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
7802 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_J@Z */
7803 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_J@Z */
7804 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int64
, 12)
7805 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_int64(basic_ostream_wchar
*this, __int64 val
)
7807 return basic_ostream_print_int64(this, val
, num_put_short_use_facet(
7808 IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
7811 static basic_ostream_wchar
* basic_ostream_print_uint64(basic_ostream_wchar
*this, unsigned __int64 val
, const num_put
*numput
)
7813 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
7814 int state
= IOSTATE_goodbit
;
7816 TRACE("(%p)\n", this);
7818 if(basic_ostream_wchar_sentry_create(this)) {
7819 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7820 ostreambuf_iterator_wchar dest
;
7822 memset(&dest
, 0, sizeof(dest
));
7823 dest
.strbuf
= strbuf
;
7824 num_put_wchar_put_uint64(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
7826 basic_ostream_wchar_sentry_destroy(this);
7828 basic_ios_wchar_setstate(base
, state
);
7832 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@_K@Z */
7833 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@_K@Z */
7834 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_uint64
, 12)
7835 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_uint64(basic_ostream_wchar
*this, unsigned __int64 val
)
7837 return basic_ostream_print_uint64(this, val
, num_put_wchar_use_facet(
7838 IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
7841 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_K@Z */
7842 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_K@Z */
7843 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint64
, 12)
7844 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_uint64(basic_ostream_wchar
*this, unsigned __int64 val
)
7846 return basic_ostream_print_uint64(this, val
, num_put_short_use_facet(
7847 IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
7850 static basic_ostream_wchar
* basic_ostream_print_bool(basic_ostream_wchar
*this, MSVCP_bool val
, const num_put
*numput
)
7852 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
7853 int state
= IOSTATE_goodbit
;
7855 TRACE("(%p %x)\n", this, val
);
7857 if(basic_ostream_wchar_sentry_create(this)) {
7858 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7859 ostreambuf_iterator_wchar dest
;
7861 memset(&dest
, 0, sizeof(dest
));
7862 dest
.strbuf
= strbuf
;
7863 num_put_wchar_put_bool(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
7865 basic_ostream_wchar_sentry_destroy(this);
7867 basic_ios_wchar_setstate(base
, state
);
7871 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@_N@Z */
7872 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@_N@Z */
7873 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_bool
, 8)
7874 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_bool(basic_ostream_wchar
*this, MSVCP_bool val
)
7876 return basic_ostream_print_bool(this, val
, num_put_wchar_use_facet(
7877 IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
7880 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_N@Z */
7881 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_N@Z */
7882 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_bool
, 8)
7883 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_bool(basic_ostream_wchar
*this, MSVCP_bool val
)
7885 return basic_ostream_print_bool(this, val
, num_put_short_use_facet(
7886 IOS_LOCALE(basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this)))));
7889 /* ?ends@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
7890 /* ?ends@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
7891 /* ?ends@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
7892 /* ?ends@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
7893 basic_ostream_wchar
* __cdecl
basic_ostream_wchar_ends(basic_ostream_wchar
*ostr
)
7895 TRACE("(%p)\n", ostr
);
7897 basic_ostream_wchar_put(ostr
, 0);
7901 /* ?endl@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
7902 /* ?endl@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
7903 /* ?endl@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
7904 /* ?endl@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
7905 basic_ostream_wchar
* __cdecl
basic_ostream_wchar_endl(basic_ostream_wchar
*ostr
)
7907 TRACE("(%p)\n", ostr
);
7909 basic_ostream_wchar_put(ostr
, '\n');
7910 basic_ostream_wchar_flush(ostr
);
7914 /* ??$?6_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AAV10@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */
7915 /* ??$?6_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AEAV10@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */
7916 /* ??$?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 */
7917 /* ??$?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 */
7918 basic_ostream_wchar
* __cdecl
basic_ostream_wchar_print_bstr(basic_ostream_wchar
*ostr
, const basic_string_wchar
*str
)
7920 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(ostr
);
7921 IOSB_iostate state
= IOSTATE_goodbit
;
7923 TRACE("(%p %p)\n", ostr
, str
);
7925 if(basic_ostream_wchar_sentry_create(ostr
)) {
7926 MSVCP_size_t len
= MSVCP_basic_string_wchar_length(str
);
7927 streamsize pad
= (base
->base
.wide
>len
? base
->base
.wide
-len
: 0);
7929 if((base
->base
.fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
7930 for(; pad
!=0; pad
--) {
7931 if(basic_streambuf_wchar_sputc(base
->strbuf
, base
->fillch
) == WEOF
) {
7932 state
= IOSTATE_badbit
;
7938 if(state
== IOSTATE_goodbit
) {
7939 if(basic_streambuf_wchar_sputn(base
->strbuf
, MSVCP_basic_string_wchar_c_str(str
), len
) != len
)
7940 state
= IOSTATE_badbit
;
7943 if(state
== IOSTATE_goodbit
) {
7944 for(; pad
!=0; pad
--) {
7945 if(basic_streambuf_wchar_sputc(base
->strbuf
, base
->fillch
) == WEOF
) {
7946 state
= IOSTATE_badbit
;
7952 base
->base
.wide
= 0;
7954 state
= IOSTATE_badbit
;
7956 basic_ostream_wchar_sentry_destroy(ostr
);
7958 basic_ios_wchar_setstate(base
, state
);
7962 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AAV10@_W@Z */
7963 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AEAV10@_W@Z */
7964 /* ??$?6GU?$char_traits@G@std@@@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@0@AAV10@G@Z */
7965 /* ??$?6GU?$char_traits@G@std@@@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@0@AEAV10@G@Z */
7966 basic_ostream_wchar
* __cdecl
basic_ostream_wchar_print_ch(basic_ostream_wchar
*ostr
, wchar_t ch
)
7968 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(ostr
);
7969 IOSB_iostate state
= IOSTATE_goodbit
;
7971 TRACE("(%p %d)\n", ostr
, ch
);
7973 if(basic_ostream_wchar_sentry_create(ostr
)) {
7974 streamsize pad
= (base
->base
.wide
>1 ? base
->base
.wide
-1 : 0);
7976 if((base
->base
.fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
7977 for(; pad
!=0; pad
--) {
7978 if(basic_streambuf_wchar_sputc(base
->strbuf
, base
->fillch
) == WEOF
) {
7979 state
= IOSTATE_badbit
;
7985 if(state
== IOSTATE_goodbit
) {
7986 if(basic_streambuf_wchar_sputc(base
->strbuf
, ch
) == WEOF
)
7987 state
= IOSTATE_badbit
;
7990 if(state
== IOSTATE_goodbit
) {
7991 for(; pad
!=0; pad
--) {
7992 if(basic_streambuf_wchar_sputc(base
->strbuf
, base
->fillch
) == WEOF
) {
7993 state
= IOSTATE_badbit
;
7999 base
->base
.wide
= 0;
8001 state
= IOSTATE_badbit
;
8003 basic_ostream_wchar_sentry_destroy(ostr
);
8005 basic_ios_wchar_setstate(base
, state
);
8009 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AAV10@PB_W@Z */
8010 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AEAV10@PEB_W@Z */
8011 /* ??$?6GU?$char_traits@G@std@@@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@0@AAV10@PBG@Z */
8012 /* ??$?6GU?$char_traits@G@std@@@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@0@AEAV10@PEBG@Z */
8013 basic_ostream_wchar
* __cdecl
basic_ostream_wchar_print_str(basic_ostream_wchar
*ostr
, const wchar_t *str
)
8015 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(ostr
);
8016 IOSB_iostate state
= IOSTATE_goodbit
;
8018 TRACE("(%p %s)\n", ostr
, debugstr_w(str
));
8020 if(basic_ostream_wchar_sentry_create(ostr
)) {
8021 MSVCP_size_t len
= wcslen(str
);
8022 streamsize pad
= (base
->base
.wide
>len
? base
->base
.wide
-len
: 0);
8024 if((base
->base
.fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
8025 for(; pad
!=0; pad
--) {
8026 if(basic_streambuf_wchar_sputc(base
->strbuf
, base
->fillch
) == WEOF
) {
8027 state
= IOSTATE_badbit
;
8033 if(state
== IOSTATE_goodbit
) {
8034 if(basic_streambuf_wchar_sputn(base
->strbuf
, str
, len
) != len
)
8035 state
= IOSTATE_badbit
;
8038 if(state
== IOSTATE_goodbit
) {
8039 for(; pad
!=0; pad
--) {
8040 if(basic_streambuf_wchar_sputc(base
->strbuf
, base
->fillch
) == WEOF
) {
8041 state
= IOSTATE_badbit
;
8047 base
->base
.wide
= 0;
8049 state
= IOSTATE_badbit
;
8051 basic_ostream_wchar_sentry_destroy(ostr
);
8053 basic_ios_wchar_setstate(base
, state
);
8057 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
8058 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
8059 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
8060 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
8061 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func
, 8)
8062 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_func(basic_ostream_wchar
*this,
8063 basic_ostream_wchar
* (__cdecl
*pfunc
)(basic_ostream_wchar
*))
8065 TRACE("(%p %p)\n", this, pfunc
);
8070 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AAV21@@Z@Z */
8071 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AEAV21@@Z@Z */
8072 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@GU?$char_traits@G@std@@@1@AAV21@@Z@Z */
8073 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@GU?$char_traits@G@std@@@1@AEAV21@@Z@Z */
8074 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func_basic_ios
, 8)
8075 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_func_basic_ios(basic_ostream_wchar
*this,
8076 basic_ios_wchar
* (__cdecl
*pfunc
)(basic_ios_wchar
*))
8078 TRACE("(%p %p)\n", this, pfunc
);
8079 pfunc(basic_ostream_wchar_get_basic_ios(this));
8083 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
8084 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
8085 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
8086 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
8087 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func_ios_base
, 8)
8088 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_func_ios_base(
8089 basic_ostream_wchar
*this, ios_base
* (__cdecl
*pfunc
)(ios_base
*))
8091 TRACE("(%p %p)\n", this, pfunc
);
8092 pfunc(&basic_ostream_wchar_get_basic_ios(this)->base
);
8096 /* ?swap@?$basic_ostream@GU?$char_traits@G@std@@@std@@IAEXAAV12@@Z */
8097 /* ?swap@?$basic_ostream@GU?$char_traits@G@std@@@std@@IEAAXAEAV12@@Z */
8098 /* ?swap@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@IAEXAAV12@@Z */
8099 /* ?swap@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@IEAAXAEAV12@@Z */
8100 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_swap
, 8)
8101 void __thiscall
basic_ostream_wchar_swap(basic_ostream_wchar
*this, basic_ostream_wchar
*r
)
8103 TRACE("(%p %p)\n", this, r
);
8108 basic_ios_wchar_swap(basic_ostream_wchar_get_basic_ios(this),
8109 basic_ostream_wchar_get_basic_ios(r
));
8112 /* Caution: basic_istream uses virtual inheritance. */
8113 static inline basic_ios_char
* basic_istream_char_get_basic_ios(basic_istream_char
*this)
8115 return (basic_ios_char
*)((char*)this+this->vbtable
[1]);
8118 static inline basic_ios_char
* basic_istream_char_to_basic_ios(basic_istream_char
*ptr
)
8120 return (basic_ios_char
*)((char*)ptr
+basic_istream_char_vbtable
[1]);
8123 static inline basic_istream_char
* basic_istream_char_from_basic_ios(basic_ios_char
*ptr
)
8125 return (basic_istream_char
*)((char*)ptr
-basic_istream_char_vbtable
[1]);
8128 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
8129 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
8130 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_init
, 20)
8131 basic_istream_char
* __thiscall
basic_istream_char_ctor_init(basic_istream_char
*this, basic_streambuf_char
*strbuf
, MSVCP_bool isstd
, MSVCP_bool noinit
, MSVCP_bool virt_init
)
8133 basic_ios_char
*base
;
8135 TRACE("(%p %p %d %d %d)\n", this, strbuf
, isstd
, noinit
, virt_init
);
8138 this->vbtable
= basic_istream_char_vbtable
;
8139 base
= basic_istream_char_get_basic_ios(this);
8140 INIT_BASIC_IOS_VTORDISP(base
);
8141 basic_ios_char_ctor(base
);
8143 base
= basic_istream_char_get_basic_ios(this);
8146 base
->base
.vtable
= &MSVCP_basic_istream_char_vtable
;
8149 basic_ios_char_init(base
, strbuf
, isstd
);
8153 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
8154 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
8155 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor
, 16)
8156 basic_istream_char
* __thiscall
basic_istream_char_ctor(basic_istream_char
*this, basic_streambuf_char
*strbuf
, MSVCP_bool isstd
, MSVCP_bool virt_init
)
8158 return basic_istream_char_ctor_init(this, strbuf
, isstd
, FALSE
, virt_init
);
8161 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
8162 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
8163 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_uninitialized
, 12)
8164 basic_istream_char
* __thiscall
basic_istream_char_ctor_uninitialized(basic_istream_char
*this, int uninitialized
, MSVCP_bool virt_init
)
8166 basic_ios_char
*base
;
8168 TRACE("(%p %d %d)\n", this, uninitialized
, virt_init
);
8171 this->vbtable
= basic_istream_char_vbtable
;
8172 base
= basic_istream_char_get_basic_ios(this);
8173 INIT_BASIC_IOS_VTORDISP(base
);
8174 basic_ios_char_ctor(base
);
8176 base
= basic_istream_char_get_basic_ios(this);
8179 base
->base
.vtable
= &MSVCP_basic_istream_char_vtable
;
8180 ios_base_Addstd(&base
->base
);
8184 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UAE@XZ */
8185 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
8186 DEFINE_THISCALL_WRAPPER(basic_istream_char_dtor
, 4)
8187 void __thiscall
basic_istream_char_dtor(basic_ios_char
*base
)
8189 basic_istream_char
*this = basic_istream_char_from_basic_ios(base
);
8191 /* don't destroy virtual base here */
8192 TRACE("(%p)\n", this);
8195 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
8196 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
8197 DEFINE_THISCALL_WRAPPER(basic_istream_char_vbase_dtor
, 4)
8198 void __thiscall
basic_istream_char_vbase_dtor(basic_istream_char
*this)
8200 basic_ios_char
*base
= basic_istream_char_to_basic_ios(this);
8202 TRACE("(%p)\n", this);
8204 basic_istream_char_dtor(base
);
8205 basic_ios_char_dtor(base
);
8208 DEFINE_THISCALL_WRAPPER(basic_istream_char_vector_dtor
, 8)
8209 basic_istream_char
* __thiscall
basic_istream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
8211 basic_istream_char
*this = basic_istream_char_from_basic_ios(base
);
8213 TRACE("(%p %x)\n", this, flags
);
8216 /* we have an array, with the number of elements stored before the first object */
8217 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
8219 for(i
=*ptr
-1; i
>=0; i
--)
8220 basic_istream_char_vbase_dtor(this+i
);
8221 MSVCRT_operator_delete(ptr
);
8223 basic_istream_char_vbase_dtor(this);
8225 MSVCRT_operator_delete(this);
8231 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
8232 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
8233 DEFINE_THISCALL_WRAPPER(basic_istream_char__Ipfx
, 8)
8234 MSVCP_bool __thiscall
basic_istream_char__Ipfx(basic_istream_char
*this, MSVCP_bool noskip
)
8236 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
8238 TRACE("(%p %d)\n", this, noskip
);
8240 if(ios_base_good(&base
->base
)) {
8241 if(basic_ios_char_tie_get(base
))
8242 basic_ostream_char_flush(basic_ios_char_tie_get(base
));
8244 if(!noskip
&& (ios_base_flags_get(&base
->base
) & FMTFLAG_skipws
)) {
8245 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
8246 const ctype_char
*ctype
= ctype_char_use_facet(IOS_LOCALE(base
->strbuf
));
8249 for(ch
= basic_streambuf_char_sgetc(strbuf
); ;
8250 ch
= basic_streambuf_char_snextc(strbuf
)) {
8252 basic_ios_char_setstate(base
, IOSTATE_eofbit
);
8256 if(!ctype_char_is_ch(ctype
, _SPACE
|_BLANK
, ch
))
8262 if(!ios_base_good(&base
->base
)) {
8263 basic_ios_char_setstate(base
, IOSTATE_failbit
);
8270 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
8271 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
8272 DEFINE_THISCALL_WRAPPER(basic_istream_char_ipfx
, 8)
8273 MSVCP_bool __thiscall
basic_istream_char_ipfx(basic_istream_char
*this, MSVCP_bool noskip
)
8275 return basic_istream_char__Ipfx(this, noskip
);
8278 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
8279 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
8280 DEFINE_THISCALL_WRAPPER(basic_istream_char_isfx
, 4)
8281 void __thiscall
basic_istream_char_isfx(basic_istream_char
*this)
8283 TRACE("(%p)\n", this);
8286 static BOOL
basic_istream_char_sentry_create(basic_istream_char
*istr
, MSVCP_bool noskip
)
8288 basic_ios_char
*base
= basic_istream_char_get_basic_ios(istr
);
8290 if(basic_ios_char_rdbuf_get(base
))
8291 call_basic_streambuf_char__Lock(base
->strbuf
);
8293 return basic_istream_char_ipfx(istr
, noskip
);
8296 static void basic_istream_char_sentry_destroy(basic_istream_char
*istr
)
8298 basic_ios_char
*base
= basic_istream_char_get_basic_ios(istr
);
8300 if(basic_ios_char_rdbuf_get(base
))
8301 call_basic_streambuf_char__Unlock(base
->strbuf
);
8304 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QBEHXZ */
8305 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QEBA_JXZ */
8306 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QBA_JXZ */
8307 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QBE_JXZ */
8308 DEFINE_THISCALL_WRAPPER(basic_istream_char_gcount
, 4)
8309 streamsize __thiscall
basic_istream_char_gcount(const basic_istream_char
*this)
8311 TRACE("(%p)\n", this);
8315 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
8316 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
8317 DEFINE_THISCALL_WRAPPER(basic_istream_char_get
, 4)
8318 int __thiscall
basic_istream_char_get(basic_istream_char
*this)
8320 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
8323 TRACE("(%p)\n", this);
8327 if(!basic_istream_char_sentry_create(this, TRUE
)) {
8328 basic_istream_char_sentry_destroy(this);
8332 ret
= basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(base
));
8333 basic_istream_char_sentry_destroy(this);
8335 basic_ios_char_setstate(base
, IOSTATE_eofbit
|IOSTATE_failbit
);
8342 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAD@Z */
8343 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAD@Z */
8344 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_ch
, 8)
8345 basic_istream_char
* __thiscall
basic_istream_char_get_ch(basic_istream_char
*this, char *ch
)
8349 TRACE("(%p %p)\n", this, ch
);
8351 ret
= basic_istream_char_get(this);
8357 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
8358 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
8359 #if STREAMSIZE_BITS == 64
8360 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str_delim
, 20)
8362 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str_delim
, 16)
8364 basic_istream_char
* __thiscall
basic_istream_char_get_str_delim(basic_istream_char
*this, char *str
, streamsize count
, char delim
)
8366 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
8369 TRACE("(%p %p %s %c)\n", this, str
, wine_dbgstr_longlong(count
), delim
);
8373 if(basic_istream_char_sentry_create(this, TRUE
)) {
8374 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
8376 for(ch
= basic_streambuf_char_sgetc(strbuf
); count
>1;
8377 ch
= basic_streambuf_char_snextc(strbuf
)) {
8378 if(ch
==EOF
|| ch
==delim
)
8386 basic_istream_char_sentry_destroy(this);
8388 basic_ios_char_setstate(base
, (!this->count
? IOSTATE_failbit
: IOSTATE_goodbit
) |
8389 (ch
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
8395 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
8396 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
8397 #if STREAMSIZE_BITS == 64
8398 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str
, 16)
8400 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str
, 12)
8402 basic_istream_char
* __thiscall
basic_istream_char_get_str(basic_istream_char
*this, char *str
, streamsize count
)
8404 return basic_istream_char_get_str_delim(this, str
, count
, '\n');
8407 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
8408 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
8409 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf_delim
, 12)
8410 basic_istream_char
* __thiscall
basic_istream_char_get_streambuf_delim(basic_istream_char
*this, basic_streambuf_char
*strbuf
, char delim
)
8412 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
8415 TRACE("(%p %p %c)\n", this, strbuf
, delim
);
8419 if(basic_istream_char_sentry_create(this, TRUE
)) {
8420 basic_streambuf_char
*strbuf_read
= basic_ios_char_rdbuf_get(base
);
8422 for(ch
= basic_streambuf_char_sgetc(strbuf_read
); ;
8423 ch
= basic_streambuf_char_snextc(strbuf_read
)) {
8424 if(ch
==EOF
|| ch
==delim
)
8427 if(basic_streambuf_char_sputc(strbuf
, ch
) == EOF
)
8432 basic_istream_char_sentry_destroy(this);
8434 basic_ios_char_setstate(base
, (!this->count
? IOSTATE_failbit
: IOSTATE_goodbit
) |
8435 (ch
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
8439 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
8440 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
8441 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf
, 8)
8442 basic_istream_char
* __thiscall
basic_istream_char_get_streambuf(basic_istream_char
*this, basic_streambuf_char
*strbuf
)
8444 return basic_istream_char_get_streambuf_delim(this, strbuf
, '\n');
8447 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
8448 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
8449 #if STREAMSIZE_BITS == 64
8450 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline_delim
, 20)
8452 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline_delim
, 16)
8454 basic_istream_char
* __thiscall
basic_istream_char_getline_delim(basic_istream_char
*this, char *str
, streamsize count
, char delim
)
8456 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
8457 int ch
= (unsigned char)delim
;
8459 TRACE("(%p %p %s %c)\n", this, str
, wine_dbgstr_longlong(count
), delim
);
8463 if(basic_istream_char_sentry_create(this, TRUE
) && count
>0) {
8464 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
8467 ch
= basic_streambuf_char_sbumpc(strbuf
);
8469 if(ch
==EOF
|| ch
==(unsigned char)delim
)
8477 if(ch
== (unsigned char)delim
)
8479 else if(ch
!= EOF
) {
8480 ch
= basic_streambuf_char_sgetc(strbuf
);
8482 if(ch
== (unsigned char)delim
) {
8483 basic_streambuf_char__Gninc(strbuf
);
8488 basic_istream_char_sentry_destroy(this);
8490 basic_ios_char_setstate(base
, (ch
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
) |
8491 (!this->count
|| (ch
!=(unsigned char)delim
&& ch
!=EOF
) ? IOSTATE_failbit
: IOSTATE_goodbit
));
8497 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
8498 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
8499 #if STREAMSIZE_BITS == 64
8500 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline
, 16)
8502 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline
, 12)
8504 basic_istream_char
* __thiscall
basic_istream_char_getline(basic_istream_char
*this, char *str
, streamsize count
)
8506 return basic_istream_char_getline_delim(this, str
, count
, '\n');
8509 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@HH@Z */
8510 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
8511 #if STREAMSIZE_BITS == 64
8512 DEFINE_THISCALL_WRAPPER(basic_istream_char_ignore
, 16)
8514 DEFINE_THISCALL_WRAPPER(basic_istream_char_ignore
, 12)
8516 basic_istream_char
* __thiscall
basic_istream_char_ignore(basic_istream_char
*this, streamsize count
, int delim
)
8518 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
8519 int ch
= (unsigned char)delim
;
8522 TRACE("(%p %s %d)\n", this, wine_dbgstr_longlong(count
), delim
);
8526 if(basic_istream_char_sentry_create(this, TRUE
)) {
8527 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
8528 state
= IOSTATE_goodbit
;
8531 ch
= basic_streambuf_char_sbumpc(strbuf
);
8534 state
= IOSTATE_eofbit
;
8538 if(ch
==(unsigned char)delim
)
8542 if(count
!= INT_MAX
)
8546 state
= IOSTATE_failbit
;
8547 basic_istream_char_sentry_destroy(this);
8549 basic_ios_char_setstate(base
, state
);
8553 /* ?ws@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@1@AAV21@@Z */
8554 /* ?ws@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
8555 basic_istream_char
* __cdecl
ws_basic_istream_char(basic_istream_char
*istream
)
8557 basic_ios_char
*base
= basic_istream_char_get_basic_ios(istream
);
8560 TRACE("(%p)\n", istream
);
8562 if(basic_istream_char_sentry_create(istream
, TRUE
)) {
8563 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
8564 const ctype_char
*ctype
= ctype_char_use_facet(IOS_LOCALE(strbuf
));
8566 for(ch
= basic_streambuf_char_sgetc(strbuf
); ctype_char_is_ch(ctype
, _SPACE
, ch
);
8567 ch
= basic_streambuf_char_snextc(strbuf
)) {
8572 basic_istream_char_sentry_destroy(istream
);
8575 basic_ios_char_setstate(base
, IOSTATE_eofbit
);
8579 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
8580 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
8581 DEFINE_THISCALL_WRAPPER(basic_istream_char_peek
, 4)
8582 int __thiscall
basic_istream_char_peek(basic_istream_char
*this)
8584 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
8587 TRACE("(%p)\n", this);
8591 if(basic_istream_char_sentry_create(this, TRUE
))
8592 ret
= basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base
));
8593 basic_istream_char_sentry_destroy(this);
8596 basic_ios_char_setstate(base
, IOSTATE_eofbit
);
8601 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADIH@Z */
8602 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_K_J@Z */
8603 #if STREAMSIZE_BITS == 64
8604 DEFINE_THISCALL_WRAPPER(basic_istream_char__Read_s
, 20)
8606 DEFINE_THISCALL_WRAPPER(basic_istream_char__Read_s
, 16)
8608 basic_istream_char
* __thiscall
basic_istream_char__Read_s(basic_istream_char
*this, char *str
, MSVCP_size_t size
, streamsize count
)
8610 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
8611 IOSB_iostate state
= IOSTATE_goodbit
;
8613 TRACE("(%p %p %lu %s)\n", this, str
, size
, wine_dbgstr_longlong(count
));
8615 if(basic_istream_char_sentry_create(this, TRUE
)) {
8616 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
8618 this->count
= basic_streambuf_char__Sgetn_s(strbuf
, str
, size
, count
);
8619 if(this->count
!= count
)
8620 state
|= IOSTATE_failbit
| IOSTATE_eofbit
;
8624 basic_istream_char_sentry_destroy(this);
8626 basic_ios_char_setstate(base
, state
);
8630 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
8631 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
8632 #if STREAMSIZE_BITS == 64
8633 DEFINE_THISCALL_WRAPPER(basic_istream_char_read
, 16)
8635 DEFINE_THISCALL_WRAPPER(basic_istream_char_read
, 12)
8637 basic_istream_char
* __thiscall
basic_istream_char_read(basic_istream_char
*this, char *str
, streamsize count
)
8639 return basic_istream_char__Read_s(this, str
, -1, count
);
8642 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
8643 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
8644 #if STREAMSIZE_BITS == 64
8645 DEFINE_THISCALL_WRAPPER(basic_istream_char__Readsome_s
, 20)
8647 DEFINE_THISCALL_WRAPPER(basic_istream_char__Readsome_s
, 16)
8649 streamsize __thiscall
basic_istream_char__Readsome_s(basic_istream_char
*this, char *str
, MSVCP_size_t size
, streamsize count
)
8651 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
8652 IOSB_iostate state
= IOSTATE_goodbit
;
8654 TRACE("(%p %p %lu %s)\n", this, str
, size
, wine_dbgstr_longlong(count
));
8658 if(basic_istream_char_sentry_create(this, TRUE
)) {
8659 streamsize avail
= basic_streambuf_char_in_avail(basic_ios_char_rdbuf_get(base
));
8664 state
|= IOSTATE_eofbit
;
8666 basic_istream_char__Read_s(this, str
, size
, avail
);
8668 state
|= IOSTATE_failbit
;
8670 basic_istream_char_sentry_destroy(this);
8672 basic_ios_char_setstate(base
, state
);
8676 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
8677 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
8678 #if STREAMSIZE_BITS == 64
8679 DEFINE_THISCALL_WRAPPER(basic_istream_char_readsome
, 16)
8681 DEFINE_THISCALL_WRAPPER(basic_istream_char_readsome
, 12)
8683 streamsize __thiscall
basic_istream_char_readsome(basic_istream_char
*this, char *str
, streamsize count
)
8685 return basic_istream_char__Readsome_s(this, str
, count
, count
);
8688 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
8689 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
8690 DEFINE_THISCALL_WRAPPER(basic_istream_char_putback
, 8)
8691 basic_istream_char
* __thiscall
basic_istream_char_putback(basic_istream_char
*this, char ch
)
8693 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
8694 IOSB_iostate state
= IOSTATE_goodbit
;
8696 TRACE("(%p %c)\n", this, ch
);
8700 if(basic_istream_char_sentry_create(this, TRUE
)) {
8701 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
8703 if(!ios_base_good(&base
->base
))
8704 state
|= IOSTATE_failbit
;
8705 else if(!strbuf
|| basic_streambuf_char_sputbackc(strbuf
, ch
)==EOF
)
8706 state
|= IOSTATE_badbit
;
8708 basic_istream_char_sentry_destroy(this);
8710 basic_ios_char_setstate(base
, state
);
8714 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
8715 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
8716 DEFINE_THISCALL_WRAPPER(basic_istream_char_unget
, 4)
8717 basic_istream_char
* __thiscall
basic_istream_char_unget(basic_istream_char
*this)
8719 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
8720 IOSB_iostate state
= IOSTATE_goodbit
;
8722 TRACE("(%p)\n", this);
8726 if(basic_istream_char_sentry_create(this, TRUE
)) {
8727 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
8729 if(!ios_base_good(&base
->base
))
8730 state
|= IOSTATE_failbit
;
8731 else if(!strbuf
|| basic_streambuf_char_sungetc(strbuf
)==EOF
)
8732 state
|= IOSTATE_badbit
;
8734 basic_istream_char_sentry_destroy(this);
8736 basic_ios_char_setstate(base
, state
);
8740 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
8741 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
8742 DEFINE_THISCALL_WRAPPER(basic_istream_char_sync
, 4)
8743 int __thiscall
basic_istream_char_sync(basic_istream_char
*this)
8745 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
8746 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
8748 TRACE("(%p)\n", this);
8753 if(basic_istream_char_sentry_create(this, TRUE
)) {
8754 if(basic_streambuf_char_pubsync(strbuf
) != -1) {
8755 basic_istream_char_sentry_destroy(this);
8759 basic_istream_char_sentry_destroy(this);
8761 basic_ios_char_setstate(base
, IOSTATE_badbit
);
8765 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
8766 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
8767 DEFINE_THISCALL_WRAPPER(basic_istream_char_tellg
, 8)
8768 fpos_mbstatet
* __thiscall
basic_istream_char_tellg(basic_istream_char
*this, fpos_mbstatet
*ret
)
8770 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
8772 TRACE("(%p %p)\n", this, ret
);
8774 #if _MSVCP_VER >= 110
8775 if(basic_istream_char_sentry_create(this, TRUE
)) {
8776 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base
),
8777 ret
, 0, SEEKDIR_cur
, OPENMODE_in
);
8779 if(ret
->off
==-1 && ret
->pos
==0 && MBSTATET_TO_INT(&ret
->state
)==0)
8780 basic_ios_char_setstate(base
, IOSTATE_failbit
);
8784 memset(&ret
->state
, 0, sizeof(ret
->state
));
8786 basic_istream_char_sentry_destroy(this);
8788 if(ios_base_fail(&base
->base
)) {
8791 memset(&ret
->state
, 0, sizeof(ret
->state
));
8795 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base
),
8796 ret
, 0, SEEKDIR_cur
, OPENMODE_in
);
8798 if(ret
->off
==-1 && ret
->pos
==0 && MBSTATET_TO_INT(&ret
->state
)==0)
8799 basic_ios_char_setstate(base
, IOSTATE_failbit
);
8805 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@JW4seekdir@ios_base@2@@Z */
8806 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JW4seekdir@ios_base@2@@Z */
8807 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@JH@Z */
8808 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
8809 #if STREAMOFF_BITS == 64
8810 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg
, 16)
8812 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg
, 12)
8814 basic_istream_char
* __thiscall
basic_istream_char_seekg(basic_istream_char
*this, streamoff off
, int dir
)
8816 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
8817 #if _MSVCP_VER >= 110
8820 TRACE("(%p %s %d)\n", this, wine_dbgstr_longlong(off
), dir
);
8822 state
= ios_base_rdstate(&base
->base
);
8823 ios_base_clear(&base
->base
, state
& ~IOSTATE_eofbit
);
8825 if(basic_istream_char_sentry_create(this, TRUE
)) {
8826 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
8829 basic_streambuf_char_pubseekoff(strbuf
, &ret
, off
, dir
, OPENMODE_in
);
8831 if(ret
.off
==-1 && ret
.pos
==0 && MBSTATET_TO_INT(&ret
.state
)==0)
8832 basic_ios_char_setstate(base
, IOSTATE_failbit
);
8834 basic_istream_char_sentry_destroy(this);
8836 TRACE("(%p %s %d)\n", this, wine_dbgstr_longlong(off
), dir
);
8838 if(!ios_base_fail(&base
->base
)) {
8839 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
8842 basic_streambuf_char_pubseekoff(strbuf
, &ret
, off
, dir
, OPENMODE_in
);
8844 if(ret
.off
==-1 && ret
.pos
==0 && MBSTATET_TO_INT(&ret
.state
)==0)
8845 basic_ios_char_setstate(base
, IOSTATE_failbit
);
8847 basic_ios_char_clear(base
, IOSTATE_goodbit
);
8850 basic_ios_char_clear(base
, IOSTATE_goodbit
);
8855 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
8856 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
8857 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg_fpos
, 28)
8858 basic_istream_char
* __thiscall
basic_istream_char_seekg_fpos(basic_istream_char
*this, fpos_mbstatet pos
)
8860 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
8861 #if _MSVCP_VER >= 110
8864 TRACE("(%p %s)\n", this, debugstr_fpos_mbstatet(&pos
));
8866 state
= ios_base_rdstate(&base
->base
);
8867 ios_base_clear(&base
->base
, state
& ~IOSTATE_eofbit
);
8869 if(basic_istream_char_sentry_create(this, TRUE
)) {
8870 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
8873 basic_streambuf_char_pubseekpos(strbuf
, &ret
, pos
, OPENMODE_in
);
8875 if(ret
.off
==-1 && ret
.pos
==0 && MBSTATET_TO_INT(&ret
.state
)==0)
8876 basic_ios_char_setstate(base
, IOSTATE_failbit
);
8878 basic_istream_char_sentry_destroy(this);
8880 TRACE("(%p %s)\n", this, debugstr_fpos_mbstatet(&pos
));
8882 if(!ios_base_fail(&base
->base
)) {
8883 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
8886 basic_streambuf_char_pubseekpos(strbuf
, &ret
, pos
, OPENMODE_in
);
8888 if(ret
.off
==-1 && ret
.pos
==0 && MBSTATET_TO_INT(&ret
.state
)==0)
8889 basic_ios_char_setstate(base
, IOSTATE_failbit
);
8891 basic_ios_char_clear(base
, IOSTATE_goodbit
);
8894 basic_ios_char_clear(base
, IOSTATE_goodbit
);
8899 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAF@Z */
8900 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAF@Z */
8901 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_short
, 8)
8902 basic_istream_char
* __thiscall
basic_istream_char_read_short(basic_istream_char
*this, short *v
)
8904 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
8905 int state
= IOSTATE_goodbit
;
8907 TRACE("(%p %p)\n", this, v
);
8909 if(basic_istream_char_sentry_create(this, FALSE
)) {
8910 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
8911 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
8912 istreambuf_iterator_char first
={0}, last
={0};
8915 first
.strbuf
= strbuf
;
8916 num_get_char_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, &tmp
);
8918 if(!(state
&IOSTATE_failbit
) && tmp
==(LONG
)((short)tmp
))
8921 state
|= IOSTATE_failbit
;
8923 basic_istream_char_sentry_destroy(this);
8925 basic_ios_char_setstate(base
, state
);
8929 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAG@Z */
8930 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAG@Z */
8931 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ushort
, 8)
8932 basic_istream_char
* __thiscall
basic_istream_char_read_ushort(basic_istream_char
*this, unsigned short *v
)
8934 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
8935 int state
= IOSTATE_goodbit
;
8937 TRACE("(%p %p)\n", this, v
);
8939 if(basic_istream_char_sentry_create(this, FALSE
)) {
8940 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
8941 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
8942 istreambuf_iterator_char first
={0}, last
={0};
8944 first
.strbuf
= strbuf
;
8945 num_get_char_get_ushort(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
8947 basic_istream_char_sentry_destroy(this);
8949 basic_ios_char_setstate(base
, state
);
8953 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAH@Z */
8954 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAH@Z */
8955 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int
, 8)
8956 basic_istream_char
* __thiscall
basic_istream_char_read_int(basic_istream_char
*this, int *v
)
8958 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
8959 int state
= IOSTATE_goodbit
;
8961 TRACE("(%p %p)\n", this, v
);
8963 if(basic_istream_char_sentry_create(this, FALSE
)) {
8964 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
8965 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
8966 istreambuf_iterator_char first
={0}, last
={0};
8968 first
.strbuf
= strbuf
;
8969 num_get_char_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
8971 basic_istream_char_sentry_destroy(this);
8973 basic_ios_char_setstate(base
, state
);
8977 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAI@Z */
8978 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAI@Z */
8979 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint
, 8)
8980 basic_istream_char
* __thiscall
basic_istream_char_read_uint(basic_istream_char
*this, unsigned int *v
)
8982 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
8983 int state
= IOSTATE_goodbit
;
8985 TRACE("(%p %p)\n", this, v
);
8987 if(basic_istream_char_sentry_create(this, FALSE
)) {
8988 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
8989 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
8990 istreambuf_iterator_char first
={0}, last
={0};
8992 first
.strbuf
= strbuf
;
8993 num_get_char_get_uint(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
8995 basic_istream_char_sentry_destroy(this);
8997 basic_ios_char_setstate(base
, state
);
9001 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAJ@Z */
9002 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAJ@Z */
9003 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_long
, 8)
9004 basic_istream_char
* __thiscall
basic_istream_char_read_long(basic_istream_char
*this, LONG
*v
)
9006 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
9007 int state
= IOSTATE_goodbit
;
9009 TRACE("(%p %p)\n", this, v
);
9011 if(basic_istream_char_sentry_create(this, FALSE
)) {
9012 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
9013 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
9014 istreambuf_iterator_char first
={0}, last
={0};
9016 first
.strbuf
= strbuf
;
9017 num_get_char_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
9019 basic_istream_char_sentry_destroy(this);
9021 basic_ios_char_setstate(base
, state
);
9025 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAK@Z */
9026 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAK@Z */
9027 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ulong
, 8)
9028 basic_istream_char
* __thiscall
basic_istream_char_read_ulong(basic_istream_char
*this, ULONG
*v
)
9030 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
9031 int state
= IOSTATE_goodbit
;
9033 TRACE("(%p %p)\n", this, v
);
9035 if(basic_istream_char_sentry_create(this, FALSE
)) {
9036 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
9037 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
9038 istreambuf_iterator_char first
={0}, last
={0};
9040 first
.strbuf
= strbuf
;
9041 num_get_char_get_ulong(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
9043 basic_istream_char_sentry_destroy(this);
9045 basic_ios_char_setstate(base
, state
);
9049 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAM@Z */
9050 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAM@Z */
9051 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_float
, 8)
9052 basic_istream_char
* __thiscall
basic_istream_char_read_float(basic_istream_char
*this, float *v
)
9054 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
9055 int state
= IOSTATE_goodbit
;
9057 TRACE("(%p %p)\n", this, v
);
9059 if(basic_istream_char_sentry_create(this, FALSE
)) {
9060 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
9061 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
9062 istreambuf_iterator_char first
={0}, last
={0};
9064 first
.strbuf
= strbuf
;
9065 num_get_char_get_float(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
9067 basic_istream_char_sentry_destroy(this);
9069 basic_ios_char_setstate(base
, state
);
9073 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAN@Z */
9074 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAN@Z */
9075 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_double
, 8)
9076 basic_istream_char
* __thiscall
basic_istream_char_read_double(basic_istream_char
*this, double *v
)
9078 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
9079 int state
= IOSTATE_goodbit
;
9081 TRACE("(%p %p)\n", this, v
);
9083 if(basic_istream_char_sentry_create(this, FALSE
)) {
9084 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
9085 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
9086 istreambuf_iterator_char first
={0}, last
={0};
9088 first
.strbuf
= strbuf
;
9089 num_get_char_get_double(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
9091 basic_istream_char_sentry_destroy(this);
9093 basic_ios_char_setstate(base
, state
);
9097 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAO@Z */
9098 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAO@Z */
9099 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ldouble
, 8)
9100 basic_istream_char
* __thiscall
basic_istream_char_read_ldouble(basic_istream_char
*this, double *v
)
9102 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
9103 int state
= IOSTATE_goodbit
;
9105 TRACE("(%p %p)\n", this, v
);
9107 if(basic_istream_char_sentry_create(this, FALSE
)) {
9108 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
9109 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
9110 istreambuf_iterator_char first
={0}, last
={0};
9112 first
.strbuf
= strbuf
;
9113 num_get_char_get_ldouble(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
9115 basic_istream_char_sentry_destroy(this);
9117 basic_ios_char_setstate(base
, state
);
9121 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAPAX@Z */
9122 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
9123 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ptr
, 8)
9124 basic_istream_char
* __thiscall
basic_istream_char_read_ptr(basic_istream_char
*this, void **v
)
9126 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
9127 int state
= IOSTATE_goodbit
;
9129 TRACE("(%p %p)\n", this, v
);
9131 if(basic_istream_char_sentry_create(this, FALSE
)) {
9132 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
9133 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
9134 istreambuf_iterator_char first
={0}, last
={0};
9136 first
.strbuf
= strbuf
;
9137 num_get_char_get_void(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
9139 basic_istream_char_sentry_destroy(this);
9141 basic_ios_char_setstate(base
, state
);
9145 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_J@Z */
9146 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_J@Z */
9147 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int64
, 8)
9148 basic_istream_char
* __thiscall
basic_istream_char_read_int64(basic_istream_char
*this, __int64
*v
)
9150 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
9151 int state
= IOSTATE_goodbit
;
9153 TRACE("(%p %p)\n", this, v
);
9155 if(basic_istream_char_sentry_create(this, FALSE
)) {
9156 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
9157 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
9158 istreambuf_iterator_char first
={0}, last
={0};
9160 first
.strbuf
= strbuf
;
9161 num_get_char_get_int64(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
9163 basic_istream_char_sentry_destroy(this);
9165 basic_ios_char_setstate(base
, state
);
9169 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_K@Z */
9170 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_K@Z */
9171 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint64
, 8)
9172 basic_istream_char
* __thiscall
basic_istream_char_read_uint64(basic_istream_char
*this, unsigned __int64
*v
)
9174 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
9175 int state
= IOSTATE_goodbit
;
9177 TRACE("(%p %p)\n", this, v
);
9179 if(basic_istream_char_sentry_create(this, FALSE
)) {
9180 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
9181 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
9182 istreambuf_iterator_char first
={0}, last
={0};
9184 first
.strbuf
= strbuf
;
9185 num_get_char_get_uint64(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
9187 basic_istream_char_sentry_destroy(this);
9189 basic_ios_char_setstate(base
, state
);
9193 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_N@Z */
9194 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_N@Z */
9195 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_bool
, 8)
9196 basic_istream_char
* __thiscall
basic_istream_char_read_bool(basic_istream_char
*this, MSVCP_bool
*v
)
9198 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
9199 int state
= IOSTATE_goodbit
;
9201 TRACE("(%p %p)\n", this, v
);
9203 if(basic_istream_char_sentry_create(this, FALSE
)) {
9204 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
9205 const num_get
*numget
= num_get_char_use_facet(IOS_LOCALE(strbuf
));
9206 istreambuf_iterator_char first
={0}, last
={0};
9208 first
.strbuf
= strbuf
;
9209 num_get_char_get_bool(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
9211 basic_istream_char_sentry_destroy(this);
9213 basic_ios_char_setstate(base
, state
);
9217 /* ??$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 */
9218 /* ??$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 */
9219 basic_istream_char
* __cdecl
basic_istream_char_getline_bstr_delim(
9220 basic_istream_char
*istream
, basic_string_char
*str
, char delim
)
9222 basic_ios_char
*base
= basic_istream_char_get_basic_ios(istream
);
9223 IOSB_iostate state
= IOSTATE_goodbit
;
9224 int c
= (unsigned char)delim
;
9226 TRACE("(%p %p %c)\n", istream
, str
, delim
);
9228 if(basic_istream_char_sentry_create(istream
, TRUE
)) {
9229 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
9230 MSVCP_basic_string_char_clear(str
);
9232 c
= basic_streambuf_char_sgetc(strbuf
);
9233 for(; c
!=(unsigned char)delim
&& c
!=EOF
; c
= basic_streambuf_char_snextc(strbuf
))
9234 MSVCP_basic_string_char_append_ch(str
, c
);
9235 if(c
==EOF
) state
|= IOSTATE_eofbit
;
9236 else if(c
==(unsigned char)delim
) basic_streambuf_char_sbumpc(strbuf
);
9238 if(!MSVCP_basic_string_char_length(str
) && c
!=(unsigned char)delim
) state
|= IOSTATE_failbit
;
9240 basic_istream_char_sentry_destroy(istream
);
9242 basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream
), state
);
9246 /* ??$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 */
9247 /* ??$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 */
9248 basic_istream_char
* __cdecl
basic_istream_char_getline_bstr(
9249 basic_istream_char
*istream
, basic_string_char
*str
)
9251 return basic_istream_char_getline_bstr_delim(istream
, str
, '\n');
9254 /* ??$?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 */
9255 /* ??$?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 */
9256 basic_istream_char
* __cdecl
basic_istream_char_read_bstr(
9257 basic_istream_char
*istream
, basic_string_char
*str
)
9259 basic_ios_char
*base
= basic_istream_char_get_basic_ios(istream
);
9260 IOSB_iostate state
= IOSTATE_failbit
;
9263 TRACE("(%p %p)\n", istream
, str
);
9265 if(basic_istream_char_sentry_create(istream
, FALSE
)) {
9266 const ctype_char
*ctype
= ctype_char_use_facet(IOS_LOCALE(base
->strbuf
));
9267 MSVCP_size_t count
= ios_base_width_get(&base
->base
);
9272 MSVCP_basic_string_char_clear(str
);
9274 for(c
= basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base
));
9275 c
!=EOF
&& !ctype_char_is_ch(ctype
, _SPACE
|_BLANK
, c
) && count
>0;
9276 c
= basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base
)), count
--) {
9277 state
= IOSTATE_goodbit
;
9278 MSVCP_basic_string_char_append_ch(str
, c
);
9281 basic_istream_char_sentry_destroy(istream
);
9283 ios_base_width_set(&base
->base
, 0);
9284 basic_ios_char_setstate(base
, state
| (c
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
9288 /* ??$?5DU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAD@Z */
9289 /* ??$?5DU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAD@Z */
9290 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAC@Z */
9291 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAC@Z */
9292 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAE@Z */
9293 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAE@Z */
9294 basic_istream_char
* __cdecl
basic_istream_char_read_str(basic_istream_char
*istream
, char *str
)
9296 basic_ios_char
*base
= basic_istream_char_get_basic_ios(istream
);
9297 IOSB_iostate state
= IOSTATE_failbit
;
9300 TRACE("(%p %p)\n", istream
, str
);
9302 if(basic_istream_char_sentry_create(istream
, FALSE
)) {
9303 const ctype_char
*ctype
= ctype_char_use_facet(IOS_LOCALE(base
->strbuf
));
9304 MSVCP_size_t count
= ios_base_width_get(&base
->base
)-1;
9306 for(c
= basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base
));
9307 c
!=EOF
&& !ctype_char_is_ch(ctype
, _SPACE
|_BLANK
, c
) && count
>0;
9308 c
= basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base
)), count
--) {
9309 state
= IOSTATE_goodbit
;
9313 basic_istream_char_sentry_destroy(istream
);
9316 ios_base_width_set(&base
->base
, 0);
9317 basic_ios_char_setstate(base
, state
| (c
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
9321 /* ??$?5DU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAD@Z */
9322 /* ??$?5DU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAD@Z */
9323 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAC@Z */
9324 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAC@Z */
9325 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAE@Z */
9326 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAE@Z */
9327 basic_istream_char
* __cdecl
basic_istream_char_read_ch(basic_istream_char
*istream
, char *ch
)
9329 IOSB_iostate state
= IOSTATE_failbit
;
9332 TRACE("(%p %p)\n", istream
, ch
);
9334 if(basic_istream_char_sentry_create(istream
, FALSE
)) {
9335 c
= basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(
9336 basic_istream_char_get_basic_ios(istream
)));
9338 state
= IOSTATE_goodbit
;
9342 basic_istream_char_sentry_destroy(istream
);
9344 basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream
),
9345 state
| (c
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
9349 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
9350 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
9351 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_streambuf
, 8)
9352 basic_istream_char
* __thiscall
basic_istream_char_read_streambuf(
9353 basic_istream_char
*this, basic_streambuf_char
*streambuf
)
9355 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
9356 IOSB_iostate state
= IOSTATE_failbit
;
9359 TRACE("(%p %p)\n", this, streambuf
);
9361 if(basic_istream_char_sentry_create(this, FALSE
)) {
9362 for(c
= basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base
)); c
!=EOF
;
9363 c
= basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base
))) {
9364 state
= IOSTATE_goodbit
;
9365 if(basic_streambuf_char_sputc(streambuf
, c
) == EOF
)
9369 basic_istream_char_sentry_destroy(this);
9371 basic_ios_char_setstate(base
, state
| (c
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
9375 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
9376 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
9377 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func
, 8)
9378 basic_istream_char
* __thiscall
basic_istream_char_read_func(basic_istream_char
*this,
9379 basic_istream_char
* (__cdecl
*pfunc
)(basic_istream_char
*))
9381 TRACE("(%p %p)\n", this, pfunc
);
9386 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
9387 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
9388 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_basic_ios
, 8)
9389 basic_istream_char
* __thiscall
basic_istream_char_read_func_basic_ios(basic_istream_char
*this,
9390 basic_ios_char
* (__cdecl
*pfunc
)(basic_ios_char
*))
9392 TRACE("(%p %p)\n", this, pfunc
);
9393 pfunc(basic_istream_char_get_basic_ios(this));
9397 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
9398 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
9399 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_ios_base
, 8)
9400 basic_istream_char
* __thiscall
basic_istream_char_read_func_ios_base(basic_istream_char
*this,
9401 ios_base
* (__cdecl
*pfunc
)(ios_base
*))
9403 TRACE("(%p %p)\n", this, pfunc
);
9404 pfunc(&basic_istream_char_get_basic_ios(this)->base
);
9408 /* ??$?5MDU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAV?$complex@M@0@@Z */
9409 /* ??$?5MDU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAV?$complex@M@0@@Z */
9410 basic_istream_char
* __cdecl
basic_istream_char_read_complex_float(basic_istream_char
*this, complex_float
*v
)
9413 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
9415 TRACE("(%p %p)\n", this, v
);
9417 ws_basic_istream_char(this);
9418 if(basic_istream_char_peek(this) == '(') {
9420 basic_istream_char_get(this);
9421 basic_istream_char_read_float(this, &r
);
9423 if(ios_base_fail(&base
->base
))
9426 ws_basic_istream_char(this);
9427 c
= basic_istream_char_peek(this);
9430 basic_istream_char_get(this);
9431 basic_istream_char_read_float(this, &i
);
9433 if(ios_base_fail(&base
->base
))
9436 ws_basic_istream_char(this);
9437 c
= basic_istream_char_peek(this);
9438 if(c
== ')') { /* supported format: (real, imag) */
9439 basic_istream_char_get(this);
9443 basic_ios_char_setstate(base
, IOSTATE_failbit
);
9446 }else if(c
== ')') { /* supported format: (real) */
9447 basic_istream_char_get(this);
9451 basic_ios_char_setstate(base
, IOSTATE_failbit
);
9454 }else { /* supported format: real */
9455 basic_istream_char_read_float(this, &r
);
9457 if(ios_base_fail(&base
->base
))
9467 /* ??$?5NDU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAV?$complex@N@0@@Z */
9468 /* ??$?5DU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAV?$complex@N@0@@Z */
9469 basic_istream_char
* __cdecl
basic_istream_char_read_complex_double(basic_istream_char
*this, complex_double
*v
)
9472 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
9474 TRACE("(%p %p)\n", this, v
);
9476 ws_basic_istream_char(this);
9477 if(basic_istream_char_peek(this) == '(') {
9479 basic_istream_char_get(this);
9480 basic_istream_char_read_double(this, &r
);
9482 if(ios_base_fail(&base
->base
))
9485 ws_basic_istream_char(this);
9486 c
= basic_istream_char_peek(this);
9489 basic_istream_char_get(this);
9490 basic_istream_char_read_double(this, &i
);
9492 if(ios_base_fail(&base
->base
))
9495 ws_basic_istream_char(this);
9496 c
= basic_istream_char_peek(this);
9497 if(c
== ')') { /* supported format: (real, imag) */
9498 basic_istream_char_get(this);
9502 basic_ios_char_setstate(base
, IOSTATE_failbit
);
9505 }else if(c
== ')') { /* supported format: (real) */
9506 basic_istream_char_get(this);
9510 basic_ios_char_setstate(base
, IOSTATE_failbit
);
9513 }else { /* supported format: real */
9514 basic_istream_char_read_double(this, &r
);
9516 if(ios_base_fail(&base
->base
))
9526 /* ??$?5ODU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAV?$complex@O@0@@Z */
9527 /* ??$?5ODU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAV?$complex@O@0@@Z */
9528 basic_istream_char
* __cdecl
basic_istream_char_read_complex_ldouble(basic_istream_char
*this, complex_double
*v
)
9531 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
9533 TRACE("(%p %p)\n", this, v
);
9535 ws_basic_istream_char(this);
9536 if(basic_istream_char_peek(this) == '(') {
9538 basic_istream_char_get(this);
9539 basic_istream_char_read_ldouble(this, &r
);
9541 if(ios_base_fail(&base
->base
))
9544 ws_basic_istream_char(this);
9545 c
= basic_istream_char_peek(this);
9548 basic_istream_char_get(this);
9549 basic_istream_char_read_ldouble(this, &i
);
9551 if(ios_base_fail(&base
->base
))
9554 ws_basic_istream_char(this);
9555 c
= basic_istream_char_peek(this);
9556 if(c
== ')') { /* supported format: (real, imag) */
9557 basic_istream_char_get(this);
9561 basic_ios_char_setstate(base
, IOSTATE_failbit
);
9564 }else if(c
== ')') { /* supported format: (real) */
9565 basic_istream_char_get(this);
9569 basic_ios_char_setstate(base
, IOSTATE_failbit
);
9572 }else { /* supported format: real */
9573 basic_istream_char_read_ldouble(this, &r
);
9575 if(ios_base_fail(&base
->base
))
9585 /* ?swap@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXAAV12@@Z */
9586 /* ?swap@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXAEAV12@@Z */
9587 DEFINE_THISCALL_WRAPPER(basic_istream_char_swap
, 8)
9588 void __thiscall
basic_istream_char_swap(basic_istream_char
*this, basic_istream_char
*r
)
9590 TRACE("(%p %p)\n", this, r
);
9595 basic_ios_char_swap(basic_istream_char_get_basic_ios(this),
9596 basic_istream_char_get_basic_ios(r
));
9597 this->count
^= r
->count
;
9598 r
->count
^= this->count
;
9599 this->count
^= r
->count
;
9602 /* Caution: basic_istream uses virtual inheritance. */
9603 static inline basic_ios_wchar
* basic_istream_wchar_get_basic_ios(basic_istream_wchar
*this)
9605 return (basic_ios_wchar
*)((char*)this+this->vbtable
[1]);
9608 static inline basic_ios_wchar
* basic_istream_wchar_to_basic_ios(basic_istream_wchar
*ptr
)
9610 return (basic_ios_wchar
*)((char*)ptr
+basic_istream_wchar_vbtable
[1]);
9613 static inline basic_istream_wchar
* basic_istream_wchar_from_basic_ios(basic_ios_wchar
*ptr
)
9615 return (basic_istream_wchar
*)((char*)ptr
-basic_istream_wchar_vbtable
[1]);
9618 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N1@Z */
9619 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N1@Z */
9620 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ctor_init
, 20)
9621 basic_istream_wchar
* __thiscall
basic_istream_wchar_ctor_init(basic_istream_wchar
*this,
9622 basic_streambuf_wchar
*strbuf
, MSVCP_bool isstd
, MSVCP_bool noinit
, MSVCP_bool virt_init
)
9624 basic_ios_wchar
*base
;
9626 TRACE("(%p %p %d %d %d)\n", this, strbuf
, isstd
, noinit
, virt_init
);
9629 this->vbtable
= basic_istream_wchar_vbtable
;
9630 base
= basic_istream_wchar_get_basic_ios(this);
9631 INIT_BASIC_IOS_VTORDISP(base
);
9632 basic_ios_wchar_ctor(base
);
9634 base
= basic_istream_wchar_get_basic_ios(this);
9637 base
->base
.vtable
= &MSVCP_basic_istream_wchar_vtable
;
9640 basic_ios_wchar_init(base
, strbuf
, isstd
);
9644 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */
9645 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */
9646 DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor_init
, 20)
9647 basic_istream_wchar
* __thiscall
basic_istream_short_ctor_init(basic_istream_wchar
*this,
9648 basic_streambuf_wchar
*strbuf
, MSVCP_bool isstd
, MSVCP_bool noinit
, MSVCP_bool virt_init
)
9650 basic_istream_wchar_ctor_init(this, strbuf
, isstd
, noinit
, virt_init
);
9651 basic_istream_wchar_get_basic_ios(this)->base
.vtable
= &MSVCP_basic_istream_short_vtable
;
9655 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
9656 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
9657 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ctor
, 16)
9658 basic_istream_wchar
* __thiscall
basic_istream_wchar_ctor(basic_istream_wchar
*this,
9659 basic_streambuf_wchar
*strbuf
, MSVCP_bool isstd
, MSVCP_bool virt_init
)
9661 return basic_istream_wchar_ctor_init(this, strbuf
, isstd
, FALSE
, virt_init
);
9664 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
9665 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
9666 DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor
, 16)
9667 basic_istream_wchar
* __thiscall
basic_istream_short_ctor(basic_istream_wchar
*this,
9668 basic_streambuf_wchar
*strbuf
, MSVCP_bool isstd
, MSVCP_bool virt_init
)
9670 return basic_istream_short_ctor_init(this, strbuf
, isstd
, FALSE
, virt_init
);
9673 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@W4_Uninitialized@1@@Z */
9674 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
9675 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ctor_uninitialized
, 12)
9676 basic_istream_wchar
* __thiscall
basic_istream_wchar_ctor_uninitialized(
9677 basic_istream_wchar
*this, int uninitialized
, MSVCP_bool virt_init
)
9679 basic_ios_wchar
*base
;
9681 TRACE("(%p %d %d)\n", this, uninitialized
, virt_init
);
9684 this->vbtable
= basic_istream_wchar_vbtable
;
9685 base
= basic_istream_wchar_get_basic_ios(this);
9686 INIT_BASIC_IOS_VTORDISP(base
);
9687 basic_ios_wchar_ctor(base
);
9689 base
= basic_istream_wchar_get_basic_ios(this);
9692 base
->base
.vtable
= &MSVCP_basic_istream_wchar_vtable
;
9693 ios_base_Addstd(&base
->base
);
9697 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z */
9698 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
9699 DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor_uninitialized
, 12)
9700 basic_istream_wchar
* __thiscall
basic_istream_short_ctor_uninitialized(
9701 basic_istream_wchar
*this, int uninitialized
, MSVCP_bool virt_init
)
9703 basic_istream_wchar_ctor_uninitialized(this, uninitialized
, virt_init
);
9704 basic_istream_wchar_get_basic_ios(this)->base
.vtable
= &MSVCP_basic_istream_short_vtable
;
9708 /* ??1?$basic_istream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
9709 /* ??1?$basic_istream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
9710 /* ??1?$basic_istream@GU?$char_traits@G@std@@@std@@UAE@XZ */
9711 /* ??1?$basic_istream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
9712 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_dtor
, 4)
9713 void __thiscall
basic_istream_wchar_dtor(basic_ios_wchar
*base
)
9715 basic_istream_wchar
*this = basic_istream_wchar_from_basic_ios(base
);
9717 /* don't destroy virtual base here */
9718 TRACE("(%p)\n", this);
9721 /* ??_D?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
9722 /* ??_D?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
9723 /* ??_D?$basic_istream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9724 /* ??_D?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9725 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_vbase_dtor
, 4)
9726 void __thiscall
basic_istream_wchar_vbase_dtor(basic_istream_wchar
*this)
9728 basic_ios_wchar
*base
= basic_istream_wchar_to_basic_ios(this);
9730 TRACE("(%p)\n", this);
9732 basic_istream_wchar_dtor(base
);
9733 basic_ios_wchar_dtor(base
);
9736 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_vector_dtor
, 8)
9737 basic_istream_wchar
* __thiscall
basic_istream_wchar_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
9739 basic_istream_wchar
*this = basic_istream_wchar_from_basic_ios(base
);
9741 TRACE("(%p %x)\n", this, flags
);
9744 /* we have an array, with the number of elements stored before the first object */
9745 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
9747 for(i
=*ptr
-1; i
>=0; i
--)
9748 basic_istream_wchar_vbase_dtor(this+i
);
9749 MSVCRT_operator_delete(ptr
);
9751 basic_istream_wchar_vbase_dtor(this);
9753 MSVCRT_operator_delete(this);
9759 /* ?_Ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE_N_N@Z */
9760 /* ?_Ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_N_N@Z */
9761 /* ?_Ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE_N_N@Z */
9762 /* ?_Ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_N_N@Z */
9763 DEFINE_THISCALL_WRAPPER(basic_istream_wchar__Ipfx
, 8)
9764 MSVCP_bool __thiscall
basic_istream_wchar__Ipfx(basic_istream_wchar
*this, MSVCP_bool noskip
)
9766 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
9768 TRACE("(%p %d)\n", this, noskip
);
9770 if(ios_base_good(&base
->base
)) {
9771 if(basic_ios_wchar_tie_get(base
))
9772 basic_ostream_wchar_flush(basic_ios_wchar_tie_get(base
));
9774 if(!noskip
&& (ios_base_flags_get(&base
->base
) & FMTFLAG_skipws
)) {
9775 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
9776 const ctype_wchar
*ctype
= ctype_wchar_use_facet(IOS_LOCALE(base
->strbuf
));
9779 for(ch
= basic_streambuf_wchar_sgetc(strbuf
); ;
9780 ch
= basic_streambuf_wchar_snextc(strbuf
)) {
9782 basic_ios_wchar_setstate(base
, IOSTATE_eofbit
);
9786 if(!ctype_wchar_is_ch(ctype
, _SPACE
|_BLANK
, ch
))
9792 if(!ios_base_good(&base
->base
)) {
9793 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
9799 /* ?ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE_N_N@Z */
9800 /* ?ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_N_N@Z */
9801 /* ?ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE_N_N@Z */
9802 /* ?ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_N_N@Z */
9803 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ipfx
, 8)
9804 MSVCP_bool __thiscall
basic_istream_wchar_ipfx(basic_istream_wchar
*this, MSVCP_bool noskip
)
9806 return basic_istream_wchar__Ipfx(this, noskip
);
9809 /* ?isfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
9810 /* ?isfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
9811 /* ?isfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9812 /* ?isfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9813 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_isfx
, 4)
9814 void __thiscall
basic_istream_wchar_isfx(basic_istream_wchar
*this)
9816 TRACE("(%p)\n", this);
9819 static BOOL
basic_istream_wchar_sentry_create(basic_istream_wchar
*istr
, MSVCP_bool noskip
)
9821 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(istr
);
9823 if(basic_ios_wchar_rdbuf_get(base
))
9824 basic_streambuf_wchar__Lock(base
->strbuf
);
9826 return basic_istream_wchar_ipfx(istr
, noskip
);
9829 static void basic_istream_wchar_sentry_destroy(basic_istream_wchar
*istr
)
9831 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(istr
);
9833 if(basic_ios_wchar_rdbuf_get(base
))
9834 basic_streambuf_wchar__Unlock(base
->strbuf
);
9837 /* ?gcount@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QBEHXZ */
9838 /* ?gcount@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEBA_JXZ */
9839 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QBEHXZ */
9840 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QEBA_JXZ */
9841 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QBA_JXZ */
9842 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QBE_JXZ */
9843 /* ?gcount@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QBA_JXZ */
9844 /* ?gcount@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QBE_JXZ */
9845 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_gcount
, 4)
9846 streamsize __thiscall
basic_istream_wchar_gcount(const basic_istream_wchar
*this)
9848 TRACE("(%p)\n", this);
9852 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
9853 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
9854 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEGXZ */
9855 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAGXZ */
9856 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get
, 4)
9857 unsigned short __thiscall
basic_istream_wchar_get(basic_istream_wchar
*this)
9859 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
9862 TRACE("(%p)\n", this);
9866 if(!basic_istream_wchar_sentry_create(this, TRUE
)) {
9867 basic_istream_wchar_sentry_destroy(this);
9871 ret
= basic_streambuf_wchar_sbumpc(basic_ios_wchar_rdbuf_get(base
));
9872 basic_istream_wchar_sentry_destroy(this);
9874 basic_ios_wchar_setstate(base
, IOSTATE_eofbit
|IOSTATE_failbit
);
9881 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AA_W@Z */
9882 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEA_W@Z */
9883 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAG@Z */
9884 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAG@Z */
9885 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_ch
, 8)
9886 basic_istream_wchar
* __thiscall
basic_istream_wchar_get_ch(basic_istream_wchar
*this, wchar_t *ch
)
9890 TRACE("(%p %p)\n", this, ch
);
9892 ret
= basic_istream_wchar_get(this);
9898 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH_W@Z */
9899 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J_W@Z */
9900 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGHG@Z */
9901 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_JG@Z */
9902 #if STREAMSIZE_BITS == 64
9903 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_str_delim
, 20)
9905 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_str_delim
, 16)
9907 basic_istream_wchar
* __thiscall
basic_istream_wchar_get_str_delim(basic_istream_wchar
*this, wchar_t *str
, streamsize count
, wchar_t delim
)
9909 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
9910 unsigned short ch
= delim
;
9912 TRACE("(%p %p %s %c)\n", this, str
, wine_dbgstr_longlong(count
), delim
);
9916 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
9917 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
9919 for(ch
= basic_streambuf_wchar_sgetc(strbuf
); count
>1;
9920 ch
= basic_streambuf_wchar_snextc(strbuf
)) {
9921 if(ch
==WEOF
|| ch
==delim
)
9929 basic_istream_wchar_sentry_destroy(this);
9931 basic_ios_wchar_setstate(base
, (!this->count
? IOSTATE_failbit
: IOSTATE_goodbit
) |
9932 (ch
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
9938 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
9939 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
9940 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
9941 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
9942 #if STREAMSIZE_BITS == 64
9943 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_str
, 16)
9945 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_str
, 12)
9947 basic_istream_wchar
* __thiscall
basic_istream_wchar_get_str(basic_istream_wchar
*this, wchar_t *str
, streamsize count
)
9949 return basic_istream_wchar_get_str_delim(this, str
, count
, '\n');
9952 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_W@Z */
9953 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_W@Z */
9954 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAV?$basic_streambuf@GU?$char_traits@G@std@@@2@G@Z */
9955 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@G@Z */
9956 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_streambuf_delim
, 12)
9957 basic_istream_wchar
* __thiscall
basic_istream_wchar_get_streambuf_delim(basic_istream_wchar
*this, basic_streambuf_wchar
*strbuf
, wchar_t delim
)
9959 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
9960 unsigned short ch
= delim
;
9962 TRACE("(%p %p %c)\n", this, strbuf
, delim
);
9966 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
9967 basic_streambuf_wchar
*strbuf_read
= basic_ios_wchar_rdbuf_get(base
);
9969 for(ch
= basic_streambuf_wchar_sgetc(strbuf_read
); ;
9970 ch
= basic_streambuf_wchar_snextc(strbuf_read
)) {
9971 if(ch
==WEOF
|| ch
==delim
)
9974 if(basic_streambuf_wchar_sputc(strbuf
, ch
) == WEOF
)
9979 basic_istream_wchar_sentry_destroy(this);
9981 basic_ios_wchar_setstate(base
, (!this->count
? IOSTATE_failbit
: IOSTATE_goodbit
) |
9982 (ch
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
9986 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@@Z */
9987 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@@Z */
9988 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAV?$basic_streambuf@GU?$char_traits@G@std@@@2@@Z */
9989 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@@Z */
9990 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_streambuf
, 8)
9991 basic_istream_wchar
* __thiscall
basic_istream_wchar_get_streambuf(basic_istream_wchar
*this, basic_streambuf_wchar
*strbuf
)
9993 return basic_istream_wchar_get_streambuf_delim(this, strbuf
, '\n');
9996 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH_W@Z */
9997 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J_W@Z */
9998 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGHG@Z */
9999 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_JG@Z */
10000 #if STREAMSIZE_BITS == 64
10001 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_getline_delim
, 20)
10003 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_getline_delim
, 16)
10005 basic_istream_wchar
* __thiscall
basic_istream_wchar_getline_delim(basic_istream_wchar
*this, wchar_t *str
, streamsize count
, wchar_t delim
)
10007 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
10008 unsigned short ch
= delim
;
10010 TRACE("(%p %p %s %c)\n", this, str
, wine_dbgstr_longlong(count
), delim
);
10014 if(basic_istream_wchar_sentry_create(this, TRUE
) && count
>0) {
10015 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
10018 ch
= basic_streambuf_wchar_sbumpc(strbuf
);
10020 if(ch
==WEOF
|| ch
==delim
)
10030 else if(ch
!= WEOF
) {
10031 ch
= basic_streambuf_wchar_sgetc(strbuf
);
10034 basic_streambuf_wchar__Gninc(strbuf
);
10039 basic_istream_wchar_sentry_destroy(this);
10041 basic_ios_wchar_setstate(base
, (ch
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
) |
10042 (!this->count
|| (ch
!=delim
&& ch
!=WEOF
) ? IOSTATE_failbit
: IOSTATE_goodbit
));
10048 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
10049 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
10050 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
10051 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
10052 #if STREAMSIZE_BITS == 64
10053 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_getline
, 16)
10055 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_getline
, 12)
10057 basic_istream_wchar
* __thiscall
basic_istream_wchar_getline(basic_istream_wchar
*this, wchar_t *str
, streamsize count
)
10059 return basic_istream_wchar_getline_delim(this, str
, count
, '\n');
10062 /* ?ignore@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@HG@Z */
10063 /* ?ignore@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_JG@Z */
10064 /* ?ignore@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@HG@Z */
10065 /* ?ignore@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JG@Z */
10066 #if STREAMSIZE_BITS == 64
10067 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ignore
, 16)
10069 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ignore
, 12)
10071 basic_istream_wchar
* __thiscall
basic_istream_wchar_ignore(basic_istream_wchar
*this, streamsize count
, unsigned short delim
)
10073 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
10074 unsigned short ch
= delim
;
10075 unsigned int state
;
10077 TRACE("(%p %s %d)\n", this, wine_dbgstr_longlong(count
), delim
);
10081 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
10082 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
10083 state
= IOSTATE_goodbit
;
10086 ch
= basic_streambuf_wchar_sbumpc(strbuf
);
10089 state
= IOSTATE_eofbit
;
10097 if(count
!= INT_MAX
)
10101 state
= IOSTATE_failbit
;
10102 basic_istream_wchar_sentry_destroy(this);
10104 basic_ios_wchar_setstate(base
, state
);
10108 /* ?ws@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
10109 /* ?ws@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
10110 /* ?ws@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@1@AAV21@@Z */
10111 /* ?ws@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
10112 basic_istream_wchar
* __cdecl
ws_basic_istream_wchar(basic_istream_wchar
*istream
)
10114 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(istream
);
10115 unsigned short ch
= '\n';
10117 TRACE("(%p)\n", istream
);
10119 if(basic_istream_wchar_sentry_create(istream
, TRUE
)) {
10120 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
10121 const ctype_wchar
*ctype
= ctype_wchar_use_facet(IOS_LOCALE(strbuf
));
10123 for(ch
= basic_streambuf_wchar_sgetc(strbuf
); ctype_wchar_is_ch(ctype
, _SPACE
, ch
);
10124 ch
= basic_streambuf_wchar_snextc(strbuf
)) {
10129 basic_istream_wchar_sentry_destroy(istream
);
10132 basic_ios_wchar_setstate(base
, IOSTATE_eofbit
);
10136 /* ?peek@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
10137 /* ?peek@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
10138 /* ?peek@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEGXZ */
10139 /* ?peek@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAGXZ */
10140 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_peek
, 4)
10141 unsigned short __thiscall
basic_istream_wchar_peek(basic_istream_wchar
*this)
10143 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
10144 unsigned short ret
= WEOF
;
10146 TRACE("(%p)\n", this);
10150 if(basic_istream_wchar_sentry_create(this, TRUE
))
10151 ret
= basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base
));
10152 basic_istream_wchar_sentry_destroy(this);
10155 basic_ios_wchar_setstate(base
, IOSTATE_eofbit
);
10160 /* ?_Read_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WIH@Z */
10161 /* ?_Read_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_K_J@Z */
10162 /* ?_Read_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGIH@Z */
10163 /* ?_Read_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_K_J@Z */
10164 #if STREAMSIZE_BITS == 64
10165 DEFINE_THISCALL_WRAPPER(basic_istream_wchar__Read_s
, 20)
10167 DEFINE_THISCALL_WRAPPER(basic_istream_wchar__Read_s
, 16)
10169 basic_istream_wchar
* __thiscall
basic_istream_wchar__Read_s(basic_istream_wchar
*this, wchar_t *str
, MSVCP_size_t size
, streamsize count
)
10171 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
10172 IOSB_iostate state
= IOSTATE_goodbit
;
10174 TRACE("(%p %p %lu %s)\n", this, str
, size
, wine_dbgstr_longlong(count
));
10176 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
10177 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
10179 this->count
= basic_streambuf_wchar__Sgetn_s(strbuf
, str
, size
, count
);
10180 if(this->count
!= count
)
10181 state
|= IOSTATE_failbit
| IOSTATE_eofbit
;
10185 basic_istream_wchar_sentry_destroy(this);
10187 basic_ios_wchar_setstate(base
, state
);
10191 /* ?read@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
10192 /* ?read@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
10193 /* ?read@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
10194 /* ?read@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
10195 #if STREAMSIZE_BITS == 64
10196 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read
, 16)
10198 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read
, 12)
10200 basic_istream_wchar
* __thiscall
basic_istream_wchar_read(basic_istream_wchar
*this, wchar_t *str
, streamsize count
)
10202 return basic_istream_wchar__Read_s(this, str
, -1, count
);
10205 /* ?_Readsome_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHPA_WIH@Z */
10206 /* ?_Readsome_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_K_J@Z */
10207 /* ?_Readsome_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHPAGIH@Z */
10208 /* ?_Readsome_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_K_J@Z */
10209 #if STREAMSIZE_BITS == 64
10210 DEFINE_THISCALL_WRAPPER(basic_istream_wchar__Readsome_s
, 20)
10212 DEFINE_THISCALL_WRAPPER(basic_istream_wchar__Readsome_s
, 16)
10214 streamsize __thiscall
basic_istream_wchar__Readsome_s(basic_istream_wchar
*this, wchar_t *str
, MSVCP_size_t size
, streamsize count
)
10216 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
10217 IOSB_iostate state
= IOSTATE_goodbit
;
10219 TRACE("(%p %p %lu %s)\n", this, str
, size
, wine_dbgstr_longlong(count
));
10223 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
10224 streamsize avail
= basic_streambuf_wchar_in_avail(basic_ios_wchar_rdbuf_get(base
));
10229 state
|= IOSTATE_eofbit
;
10231 basic_istream_wchar__Read_s(this, str
, size
, avail
);
10233 state
|= IOSTATE_failbit
;
10235 basic_istream_wchar_sentry_destroy(this);
10237 basic_ios_wchar_setstate(base
, state
);
10238 return this->count
;
10241 /* ?readsome@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHPA_WH@Z */
10242 /* ?readsome@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_J@Z */
10243 /* ?readsome@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */
10244 /* ?readsome@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */
10245 #if STREAMSIZE_BITS == 64
10246 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_readsome
, 16)
10248 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_readsome
, 12)
10250 streamsize __thiscall
basic_istream_wchar_readsome(basic_istream_wchar
*this, wchar_t *str
, streamsize count
)
10252 return basic_istream_wchar__Readsome_s(this, str
, count
, count
);
10255 /* ?putback@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@_W@Z */
10256 /* ?putback@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_W@Z */
10257 /* ?putback@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@G@Z */
10258 /* ?putback@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@G@Z */
10259 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_putback
, 8)
10260 basic_istream_wchar
* __thiscall
basic_istream_wchar_putback(basic_istream_wchar
*this, wchar_t ch
)
10262 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
10263 IOSB_iostate state
= IOSTATE_goodbit
;
10265 TRACE("(%p %c)\n", this, ch
);
10269 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
10270 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
10272 if(!ios_base_good(&base
->base
))
10273 state
|= IOSTATE_failbit
;
10274 else if(!strbuf
|| basic_streambuf_wchar_sputbackc(strbuf
, ch
)==WEOF
)
10275 state
|= IOSTATE_badbit
;
10277 basic_istream_wchar_sentry_destroy(this);
10279 basic_ios_wchar_setstate(base
, state
);
10283 /* ?unget@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@XZ */
10284 /* ?unget@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@XZ */
10285 /* ?unget@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@XZ */
10286 /* ?unget@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@XZ */
10287 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_unget
, 4)
10288 basic_istream_wchar
* __thiscall
basic_istream_wchar_unget(basic_istream_wchar
*this)
10290 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
10291 IOSB_iostate state
= IOSTATE_goodbit
;
10293 TRACE("(%p)\n", this);
10297 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
10298 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
10300 if(!ios_base_good(&base
->base
))
10301 state
|= IOSTATE_failbit
;
10302 else if(!strbuf
|| basic_streambuf_wchar_sungetc(strbuf
)==WEOF
)
10303 state
|= IOSTATE_badbit
;
10305 basic_istream_wchar_sentry_destroy(this);
10307 basic_ios_wchar_setstate(base
, state
);
10311 /* ?sync@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
10312 /* ?sync@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAHXZ */
10313 /* ?sync@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHXZ */
10314 /* ?sync@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAHXZ */
10315 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_sync
, 4)
10316 int __thiscall
basic_istream_wchar_sync(basic_istream_wchar
*this)
10318 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
10319 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
10321 TRACE("(%p)\n", this);
10326 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
10327 if(basic_streambuf_wchar_pubsync(strbuf
) != -1) {
10328 basic_istream_wchar_sentry_destroy(this);
10332 basic_istream_wchar_sentry_destroy(this);
10334 basic_ios_wchar_setstate(base
, IOSTATE_badbit
);
10338 /* ?tellg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@XZ */
10339 /* ?tellg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
10340 /* ?tellg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@XZ */
10341 /* ?tellg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
10342 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_tellg
, 8)
10343 fpos_mbstatet
* __thiscall
basic_istream_wchar_tellg(basic_istream_wchar
*this, fpos_mbstatet
*ret
)
10345 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
10347 TRACE("(%p %p)\n", this, ret
);
10349 #if _MSVCP_VER >= 110
10350 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
10351 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base
),
10352 ret
, 0, SEEKDIR_cur
, OPENMODE_in
);
10354 if(ret
->off
==-1 && ret
->pos
==0 && MBSTATET_TO_INT(&ret
->state
)==0)
10355 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
10359 memset(&ret
->state
, 0, sizeof(ret
->state
));
10361 basic_istream_wchar_sentry_destroy(this);
10363 if(ios_base_fail(&base
->base
)) {
10366 memset(&ret
->state
, 0, sizeof(ret
->state
));
10370 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base
),
10371 ret
, 0, SEEKDIR_cur
, OPENMODE_in
);
10372 if(ret
->off
==-1 && ret
->pos
==0 && MBSTATET_TO_INT(&ret
->state
)==0)
10373 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
10378 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@JW4seekdir@ios_base@2@@Z */
10379 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JW4seekdir@ios_base@2@@Z */
10380 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@JH@Z */
10381 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_JH@Z */
10382 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@JH@Z */
10383 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JH@Z */
10384 #if STREAMOFF_BITS == 64
10385 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_seekg
, 16)
10387 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_seekg
, 12)
10389 basic_istream_wchar
* __thiscall
basic_istream_wchar_seekg(basic_istream_wchar
*this, streamoff off
, int dir
)
10391 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
10392 #if _MSVCP_VER >= 110
10393 IOSB_iostate state
;
10395 TRACE("(%p %s %d)\n", this, wine_dbgstr_longlong(off
), dir
);
10397 state
= ios_base_rdstate(&base
->base
);
10398 ios_base_clear(&base
->base
, state
& ~IOSTATE_eofbit
);
10400 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
10401 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
10404 basic_streambuf_wchar_pubseekoff(strbuf
, &ret
, off
, dir
, OPENMODE_in
);
10406 if(ret
.off
==-1 && ret
.pos
==0 && MBSTATET_TO_INT(&ret
.state
)==0)
10407 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
10409 basic_istream_wchar_sentry_destroy(this);
10411 TRACE("(%p %s %d)\n", this, wine_dbgstr_longlong(off
), dir
);
10413 if(!ios_base_fail(&base
->base
)) {
10414 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
10417 basic_streambuf_wchar_pubseekoff(strbuf
, &ret
, off
, dir
, OPENMODE_in
);
10419 if(ret
.off
==-1 && ret
.pos
==0 && MBSTATET_TO_INT(&ret
.state
)==0)
10420 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
10422 basic_ios_wchar_clear(base
, IOSTATE_goodbit
);
10425 basic_ios_wchar_clear(base
, IOSTATE_goodbit
);
10430 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
10431 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
10432 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
10433 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
10434 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_seekg_fpos
, 28)
10435 basic_istream_wchar
* __thiscall
basic_istream_wchar_seekg_fpos(basic_istream_wchar
*this, fpos_mbstatet pos
)
10437 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
10438 #if _MSVCP_VER >= 110
10439 IOSB_iostate state
;
10441 TRACE("(%p %s)\n", this, debugstr_fpos_mbstatet(&pos
));
10443 state
= ios_base_rdstate(&base
->base
);
10444 ios_base_clear(&base
->base
, state
& ~IOSTATE_eofbit
);
10446 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
10447 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
10450 basic_streambuf_wchar_pubseekpos(strbuf
, &ret
, pos
, OPENMODE_in
);
10452 if(ret
.off
==-1 && ret
.pos
==0 && MBSTATET_TO_INT(&ret
.state
)==0)
10453 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
10455 basic_istream_wchar_sentry_destroy(this);
10457 TRACE("(%p %s)\n", this, debugstr_fpos_mbstatet(&pos
));
10459 if(!ios_base_fail(&base
->base
)) {
10460 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
10463 basic_streambuf_wchar_pubseekpos(strbuf
, &ret
, pos
, OPENMODE_in
);
10465 if(ret
.off
==-1 && ret
.pos
==0 && MBSTATET_TO_INT(&ret
.state
)==0)
10466 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
10468 basic_ios_wchar_clear(base
, IOSTATE_goodbit
);
10471 basic_ios_wchar_clear(base
, IOSTATE_goodbit
);
10476 static basic_istream_wchar
* basic_istream_read_short(basic_istream_wchar
*this, short *v
, const num_get
*numget
)
10478 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
10479 int state
= IOSTATE_goodbit
;
10481 TRACE("(%p %p)\n", this, v
);
10483 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
10484 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
10485 istreambuf_iterator_wchar first
={0}, last
={0};
10488 first
.strbuf
= strbuf
;
10489 num_get_wchar_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, &tmp
);
10491 if(!(state
&IOSTATE_failbit
) && tmp
==(LONG
)((short)tmp
))
10494 state
|= IOSTATE_failbit
;
10496 basic_istream_wchar_sentry_destroy(this);
10498 basic_ios_wchar_setstate(base
, state
);
10502 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAF@Z */
10503 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAF@Z */
10504 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_short
, 8)
10505 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_short(basic_istream_wchar
*this, short *v
)
10507 return basic_istream_read_short(this, v
, num_get_wchar_use_facet(
10508 IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf
)));
10511 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAF@Z */
10512 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAF@Z */
10513 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_short
, 8)
10514 basic_istream_wchar
* __thiscall
basic_istream_short_read_short(basic_istream_wchar
*this, short *v
)
10516 return basic_istream_read_short(this, v
, num_get_short_use_facet(
10517 IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf
)));
10520 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAG@Z */
10521 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAG@Z */
10522 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ushort
, 8)
10523 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_ushort(basic_istream_wchar
*this, unsigned short *v
)
10525 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
10526 int state
= IOSTATE_goodbit
;
10528 TRACE("(%p %p)\n", this, v
);
10530 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
10531 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
10532 const num_get
*numget
= num_get_wchar_use_facet(IOS_LOCALE(strbuf
));
10533 istreambuf_iterator_wchar first
={0}, last
={0};
10535 first
.strbuf
= strbuf
;
10536 num_get_wchar_get_ushort(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
10538 basic_istream_wchar_sentry_destroy(this);
10540 basic_ios_wchar_setstate(base
, state
);
10544 static basic_istream_wchar
* basic_istream_read_int(basic_istream_wchar
*this, int *v
, const num_get
*numget
)
10546 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
10547 int state
= IOSTATE_goodbit
;
10549 TRACE("(%p %p)\n", this, v
);
10551 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
10552 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
10553 istreambuf_iterator_wchar first
={0}, last
={0};
10555 first
.strbuf
= strbuf
;
10556 num_get_wchar_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
10558 basic_istream_wchar_sentry_destroy(this);
10560 basic_ios_wchar_setstate(base
, state
);
10564 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAH@Z */
10565 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAH@Z */
10566 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_int
, 8)
10567 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_int(basic_istream_wchar
*this, int *v
)
10569 return basic_istream_read_int(this, v
, num_get_wchar_use_facet(
10570 IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf
)));
10573 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAH@Z */
10574 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAH@Z */
10575 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int
, 8)
10576 basic_istream_wchar
* __thiscall
basic_istream_short_read_int(basic_istream_wchar
*this, int *v
)
10578 return basic_istream_read_int(this, v
, num_get_short_use_facet(
10579 IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf
)));
10582 static basic_istream_wchar
* basic_istream_read_uint(basic_istream_wchar
*this, unsigned int *v
, const num_get
*numget
)
10584 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
10585 int state
= IOSTATE_goodbit
;
10587 TRACE("(%p %p)\n", this, v
);
10589 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
10590 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
10591 istreambuf_iterator_wchar first
={0}, last
={0};
10593 first
.strbuf
= strbuf
;
10594 num_get_wchar_get_uint(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
10596 basic_istream_wchar_sentry_destroy(this);
10598 basic_ios_wchar_setstate(base
, state
);
10602 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAI@Z */
10603 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAI@Z */
10604 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_uint
, 8)
10605 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_uint(basic_istream_wchar
*this, unsigned int *v
)
10607 return basic_istream_read_uint(this, v
, num_get_wchar_use_facet(
10608 IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf
)));
10611 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAI@Z */
10612 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAI@Z */
10613 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint
, 8)
10614 basic_istream_wchar
* __thiscall
basic_istream_short_read_uint(basic_istream_wchar
*this, unsigned int *v
)
10616 return basic_istream_read_uint(this, v
, num_get_short_use_facet(
10617 IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf
)));
10620 static basic_istream_wchar
* basic_istream_read_long(basic_istream_wchar
*this, LONG
*v
, const num_get
*numget
)
10622 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
10623 int state
= IOSTATE_goodbit
;
10625 TRACE("(%p %p)\n", this, v
);
10627 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
10628 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
10629 istreambuf_iterator_wchar first
={0}, last
={0};
10631 first
.strbuf
= strbuf
;
10632 num_get_wchar_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
10634 basic_istream_wchar_sentry_destroy(this);
10636 basic_ios_wchar_setstate(base
, state
);
10640 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAJ@Z */
10641 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAJ@Z */
10642 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_long
, 8)
10643 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_long(basic_istream_wchar
*this, LONG
*v
)
10645 return basic_istream_read_long(this, v
, num_get_wchar_use_facet(
10646 IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf
)));
10649 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAJ@Z */
10650 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAJ@Z */
10651 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_long
, 8)
10652 basic_istream_wchar
* __thiscall
basic_istream_short_read_long(basic_istream_wchar
*this, LONG
*v
)
10654 return basic_istream_read_long(this, v
, num_get_short_use_facet(
10655 IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf
)));
10658 static basic_istream_wchar
* basic_istream_read_ulong(basic_istream_wchar
*this, ULONG
*v
, const num_get
*numget
)
10660 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
10661 int state
= IOSTATE_goodbit
;
10663 TRACE("(%p %p)\n", this, v
);
10665 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
10666 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
10667 istreambuf_iterator_wchar first
={0}, last
={0};
10669 first
.strbuf
= strbuf
;
10670 num_get_wchar_get_ulong(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
10672 basic_istream_wchar_sentry_destroy(this);
10674 basic_ios_wchar_setstate(base
, state
);
10678 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAK@Z */
10679 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAK@Z */
10680 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ulong
, 8)
10681 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_ulong(basic_istream_wchar
*this, ULONG
*v
)
10683 return basic_istream_read_ulong(this, v
, num_get_wchar_use_facet(
10684 IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf
)));
10687 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAK@Z */
10688 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAK@Z */
10689 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ulong
, 8)
10690 basic_istream_wchar
* __thiscall
basic_istream_short_read_ulong(basic_istream_wchar
*this, ULONG
*v
)
10692 return basic_istream_read_ulong(this, v
, num_get_short_use_facet(
10693 IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf
)));
10696 static basic_istream_wchar
* basic_istream_read_float(basic_istream_wchar
*this, float *v
, const num_get
*numget
)
10698 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
10699 int state
= IOSTATE_goodbit
;
10701 TRACE("(%p %p)\n", this, v
);
10703 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
10704 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
10705 istreambuf_iterator_wchar first
={0}, last
={0};
10707 first
.strbuf
= strbuf
;
10708 num_get_wchar_get_float(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
10710 basic_istream_wchar_sentry_destroy(this);
10712 basic_ios_wchar_setstate(base
, state
);
10716 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAM@Z */
10717 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAM@Z */
10718 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_float
, 8)
10719 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_float(basic_istream_wchar
*this, float *v
)
10721 return basic_istream_read_float(this, v
, num_get_wchar_use_facet(
10722 IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf
)));
10725 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAM@Z */
10726 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAM@Z */
10727 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_float
, 8)
10728 basic_istream_wchar
* __thiscall
basic_istream_short_read_float(basic_istream_wchar
*this, float *v
)
10730 return basic_istream_read_float(this, v
, num_get_short_use_facet(
10731 IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf
)));
10734 static basic_istream_wchar
* basic_istream_read_double(basic_istream_wchar
*this, double *v
, const num_get
*numget
)
10736 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
10737 int state
= IOSTATE_goodbit
;
10739 TRACE("(%p %p)\n", this, v
);
10741 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
10742 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
10743 istreambuf_iterator_wchar first
={0}, last
={0};
10745 first
.strbuf
= strbuf
;
10746 num_get_wchar_get_double(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
10748 basic_istream_wchar_sentry_destroy(this);
10750 basic_ios_wchar_setstate(base
, state
);
10754 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAN@Z */
10755 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAN@Z */
10756 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_double
, 8)
10757 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_double(basic_istream_wchar
*this, double *v
)
10759 return basic_istream_read_double(this, v
, num_get_wchar_use_facet(
10760 IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf
)));
10763 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAN@Z */
10764 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAN@Z */
10765 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_double
, 8)
10766 basic_istream_wchar
* __thiscall
basic_istream_short_read_double(basic_istream_wchar
*this, double *v
)
10768 return basic_istream_read_double(this, v
, num_get_short_use_facet(
10769 IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf
)));
10772 static basic_istream_wchar
* basic_istream_read_ldouble(basic_istream_wchar
*this, double *v
, const num_get
*numget
)
10774 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
10775 int state
= IOSTATE_goodbit
;
10777 TRACE("(%p %p)\n", this, v
);
10779 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
10780 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
10781 istreambuf_iterator_wchar first
={0}, last
={0};
10783 first
.strbuf
= strbuf
;
10784 num_get_wchar_get_ldouble(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
10786 basic_istream_wchar_sentry_destroy(this);
10788 basic_ios_wchar_setstate(base
, state
);
10792 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAO@Z */
10793 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAO@Z */
10794 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ldouble
, 8)
10795 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_ldouble(basic_istream_wchar
*this, double *v
)
10797 return basic_istream_read_ldouble(this, v
, num_get_wchar_use_facet(
10798 IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf
)));
10801 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAO@Z */
10802 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAO@Z */
10803 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ldouble
, 8)
10804 basic_istream_wchar
* __thiscall
basic_istream_short_read_ldouble(basic_istream_wchar
*this, double *v
)
10806 return basic_istream_read_ldouble(this, v
, num_get_short_use_facet(
10807 IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf
)));
10810 static basic_istream_wchar
* basic_istream_read_ptr(basic_istream_wchar
*this, void **v
, const num_get
*numget
)
10812 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
10813 int state
= IOSTATE_goodbit
;
10815 TRACE("(%p %p)\n", this, v
);
10817 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
10818 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
10819 istreambuf_iterator_wchar first
={0}, last
={0};
10821 first
.strbuf
= strbuf
;
10822 num_get_wchar_get_void(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
10824 basic_istream_wchar_sentry_destroy(this);
10826 basic_ios_wchar_setstate(base
, state
);
10830 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAPAX@Z */
10831 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
10832 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ptr
, 8)
10833 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_ptr(basic_istream_wchar
*this, void **v
)
10835 return basic_istream_read_ptr(this, v
, num_get_wchar_use_facet(
10836 IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf
)));
10839 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAPAX@Z */
10840 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
10841 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ptr
, 8)
10842 basic_istream_wchar
* __thiscall
basic_istream_short_read_ptr(basic_istream_wchar
*this, void **v
)
10844 return basic_istream_read_ptr(this, v
, num_get_short_use_facet(
10845 IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf
)));
10848 static basic_istream_wchar
* basic_istream_read_int64(basic_istream_wchar
*this, __int64
*v
, const num_get
*numget
)
10850 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
10851 int state
= IOSTATE_goodbit
;
10853 TRACE("(%p %p)\n", this, v
);
10855 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
10856 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
10857 istreambuf_iterator_wchar first
={0}, last
={0};
10859 first
.strbuf
= strbuf
;
10860 num_get_wchar_get_int64(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
10862 basic_istream_wchar_sentry_destroy(this);
10864 basic_ios_wchar_setstate(base
, state
);
10868 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AA_J@Z */
10869 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEA_J@Z */
10870 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_int64
, 8)
10871 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_int64(basic_istream_wchar
*this, __int64
*v
)
10873 return basic_istream_read_int64(this, v
, num_get_wchar_use_facet(
10874 IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf
)));
10877 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_J@Z */
10878 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_J@Z */
10879 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int64
, 8)
10880 basic_istream_wchar
* __thiscall
basic_istream_short_read_int64(basic_istream_wchar
*this, __int64
*v
)
10882 return basic_istream_read_int64(this, v
, num_get_short_use_facet(
10883 IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf
)));
10886 static basic_istream_wchar
* basic_istream_read_uint64(basic_istream_wchar
*this, unsigned __int64
*v
, const num_get
*numget
)
10888 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
10889 int state
= IOSTATE_goodbit
;
10891 TRACE("(%p %p)\n", this, v
);
10893 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
10894 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
10895 istreambuf_iterator_wchar first
={0}, last
={0};
10897 first
.strbuf
= strbuf
;
10898 num_get_wchar_get_uint64(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
10900 basic_istream_wchar_sentry_destroy(this);
10902 basic_ios_wchar_setstate(base
, state
);
10906 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AA_K@Z */
10907 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEA_K@Z */
10908 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_uint64
, 8)
10909 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_uint64(basic_istream_wchar
*this, unsigned __int64
*v
)
10911 return basic_istream_read_uint64(this, v
, num_get_wchar_use_facet(
10912 IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf
)));
10915 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_K@Z */
10916 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_K@Z */
10917 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint64
, 8)
10918 basic_istream_wchar
* __thiscall
basic_istream_short_read_uint64(basic_istream_wchar
*this, unsigned __int64
*v
)
10920 return basic_istream_read_uint64(this, v
, num_get_short_use_facet(
10921 IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf
)));
10924 static basic_istream_wchar
* basic_istream_read_bool(basic_istream_wchar
*this, MSVCP_bool
*v
, const num_get
*numget
)
10926 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
10927 int state
= IOSTATE_goodbit
;
10929 TRACE("(%p %p)\n", this, v
);
10931 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
10932 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
10933 istreambuf_iterator_wchar first
={0}, last
={0};
10935 first
.strbuf
= strbuf
;
10936 num_get_wchar_get_bool(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
10938 basic_istream_wchar_sentry_destroy(this);
10940 basic_ios_wchar_setstate(base
, state
);
10944 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AA_N@Z */
10945 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEA_N@Z */
10946 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_bool
, 8)
10947 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_bool(basic_istream_wchar
*this, MSVCP_bool
*v
)
10949 return basic_istream_read_bool(this, v
, num_get_wchar_use_facet(
10950 IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf
)));
10953 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_N@Z */
10954 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_N@Z */
10955 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_bool
, 8)
10956 basic_istream_wchar
* __thiscall
basic_istream_short_read_bool(basic_istream_wchar
*this, MSVCP_bool
*v
)
10958 return basic_istream_read_bool(this, v
, num_get_short_use_facet(
10959 IOS_LOCALE(basic_istream_wchar_get_basic_ios(this)->strbuf
)));
10962 /* ??$getline@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@AAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@_W@Z */
10963 /* ??$getline@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AEAV10@AEAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@_W@Z */
10964 /* ??$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 */
10965 /* ??$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 */
10966 basic_istream_wchar
* __cdecl
basic_istream_wchar_getline_bstr_delim(
10967 basic_istream_wchar
*istream
, basic_string_wchar
*str
, wchar_t delim
)
10969 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(istream
);
10970 IOSB_iostate state
= IOSTATE_goodbit
;
10973 TRACE("(%p %p %c)\n", istream
, str
, delim
);
10975 if(basic_istream_wchar_sentry_create(istream
, TRUE
)) {
10976 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
10977 MSVCP_basic_string_wchar_clear(str
);
10979 c
= basic_streambuf_wchar_sgetc(strbuf
);
10980 for(; c
!=delim
&& c
!=WEOF
; c
= basic_streambuf_wchar_snextc(strbuf
))
10981 MSVCP_basic_string_wchar_append_ch(str
, c
);
10982 if(c
==delim
) basic_streambuf_wchar_sbumpc(strbuf
);
10983 else if(c
==WEOF
) state
|= IOSTATE_eofbit
;
10985 if(!MSVCP_basic_string_wchar_length(str
) && c
!=delim
) state
|= IOSTATE_failbit
;
10987 basic_istream_wchar_sentry_destroy(istream
);
10989 basic_ios_wchar_setstate(basic_istream_wchar_get_basic_ios(istream
), state
);
10993 /* ??$getline@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@AAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */
10994 /* ??$getline@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AEAV10@AEAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */
10995 /* ??$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 */
10996 /* ??$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 */
10997 basic_istream_wchar
* __cdecl
basic_istream_wchar_getline_bstr(
10998 basic_istream_wchar
*istream
, basic_string_wchar
*str
)
11000 return basic_istream_wchar_getline_bstr_delim(istream
, str
, '\n');
11003 static basic_istream_wchar
* basic_istream_read_bstr(basic_istream_wchar
*istream
,
11004 basic_string_wchar
*str
, const ctype_wchar
*ctype
)
11006 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(istream
);
11007 IOSB_iostate state
= IOSTATE_failbit
;
11010 TRACE("(%p %p)\n", istream
, str
);
11012 if(basic_istream_wchar_sentry_create(istream
, FALSE
)) {
11013 MSVCP_size_t count
= ios_base_width_get(&base
->base
);
11018 MSVCP_basic_string_wchar_clear(str
);
11020 for(c
= basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base
));
11021 c
!=WEOF
&& !ctype_wchar_is_ch(ctype
, _SPACE
|_BLANK
, c
) && count
>0;
11022 c
= basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base
)), count
--) {
11023 state
= IOSTATE_goodbit
;
11024 MSVCP_basic_string_wchar_append_ch(str
, c
);
11027 basic_istream_wchar_sentry_destroy(istream
);
11029 ios_base_width_set(&base
->base
, 0);
11030 basic_ios_wchar_setstate(base
, state
| (c
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
11034 /* ??$?5_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@AAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */
11035 /* ??$?5_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AEAV10@AEAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */
11036 basic_istream_wchar
* __cdecl
basic_istream_wchar_read_bstr(
11037 basic_istream_wchar
*istream
, basic_string_wchar
*str
)
11039 return basic_istream_read_bstr(istream
, str
, ctype_wchar_use_facet(
11040 IOS_LOCALE(basic_istream_wchar_get_basic_ios(istream
)->strbuf
)));
11043 /* ??$?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 */
11044 /* ??$?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 */
11045 basic_istream_wchar
* __cdecl
basic_istream_short_read_bstr(
11046 basic_istream_wchar
*istream
, basic_string_wchar
*str
)
11048 return basic_istream_read_bstr(istream
, str
, ctype_short_use_facet(
11049 IOS_LOCALE(basic_istream_wchar_get_basic_ios(istream
)->strbuf
)));
11052 static basic_istream_wchar
* basic_istream_read_str(basic_istream_wchar
*istream
, wchar_t *str
, const ctype_wchar
*ctype
)
11054 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(istream
);
11055 IOSB_iostate state
= IOSTATE_failbit
;
11056 unsigned short c
= '\n';
11058 TRACE("(%p %p)\n", istream
, str
);
11060 if(basic_istream_wchar_sentry_create(istream
, FALSE
)) {
11061 MSVCP_size_t count
= ios_base_width_get(&base
->base
)-1;
11063 for(c
= basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base
));
11064 c
!=WEOF
&& !ctype_wchar_is_ch(ctype
, _SPACE
|_BLANK
, c
) && count
>0;
11065 c
= basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base
)), count
--) {
11066 state
= IOSTATE_goodbit
;
11070 basic_istream_wchar_sentry_destroy(istream
);
11073 ios_base_width_set(&base
->base
, 0);
11074 basic_ios_wchar_setstate(base
, state
| (c
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
11078 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@PA_W@Z */
11079 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AEAV10@PEA_W@Z */
11080 basic_istream_wchar
* __cdecl
basic_istream_wchar_read_str(basic_istream_wchar
*istream
, wchar_t *str
)
11082 return basic_istream_read_str(istream
, str
, ctype_wchar_use_facet(
11083 IOS_LOCALE(basic_istream_wchar_get_basic_ios(istream
)->strbuf
)));
11086 /* ??$?5GU?$char_traits@G@std@@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@PAG@Z */
11087 /* ??$?5GU?$char_traits@G@std@@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@PEAG@Z */
11088 basic_istream_wchar
* __cdecl
basic_istream_short_read_str(basic_istream_wchar
*istream
, wchar_t *str
)
11090 return basic_istream_read_str(istream
, str
, ctype_short_use_facet(
11091 IOS_LOCALE(basic_istream_wchar_get_basic_ios(istream
)->strbuf
)));
11094 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@AA_W@Z */
11095 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AEAV10@AEA_W@Z */
11096 /* ??$?5GU?$char_traits@G@std@@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@AAG@Z */
11097 /* ??$?5GU?$char_traits@G@std@@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@AEAG@Z */
11098 basic_istream_wchar
* __cdecl
basic_istream_wchar_read_ch(basic_istream_wchar
*istream
, wchar_t *ch
)
11100 IOSB_iostate state
= IOSTATE_failbit
;
11101 unsigned short c
= 0;
11103 TRACE("(%p %p)\n", istream
, ch
);
11105 if(basic_istream_wchar_sentry_create(istream
, FALSE
)) {
11106 c
= basic_streambuf_wchar_sbumpc(basic_ios_wchar_rdbuf_get(
11107 basic_istream_wchar_get_basic_ios(istream
)));
11109 state
= IOSTATE_goodbit
;
11113 basic_istream_wchar_sentry_destroy(istream
);
11115 basic_ios_wchar_setstate(basic_istream_wchar_get_basic_ios(istream
),
11116 state
| (c
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
11120 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
11121 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
11122 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
11123 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
11124 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_streambuf
, 8)
11125 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_streambuf(
11126 basic_istream_wchar
*this, basic_streambuf_wchar
*streambuf
)
11128 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
11129 IOSB_iostate state
= IOSTATE_failbit
;
11130 unsigned short c
= '\n';
11132 TRACE("(%p %p)\n", this, streambuf
);
11134 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
11135 for(c
= basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base
)); c
!=WEOF
;
11136 c
= basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base
))) {
11137 state
= IOSTATE_goodbit
;
11138 if(basic_streambuf_wchar_sputc(streambuf
, c
) == WEOF
)
11142 basic_istream_wchar_sentry_destroy(this);
11144 basic_ios_wchar_setstate(base
, state
| (c
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
11148 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
11149 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
11150 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
11151 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
11152 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func
, 8)
11153 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_func(basic_istream_wchar
*this,
11154 basic_istream_wchar
* (__cdecl
*pfunc
)(basic_istream_wchar
*))
11156 TRACE("(%p %p)\n", this, pfunc
);
11161 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AAV21@@Z@Z */
11162 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AEAV21@@Z@Z */
11163 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@GU?$char_traits@G@std@@@1@AAV21@@Z@Z */
11164 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@GU?$char_traits@G@std@@@1@AEAV21@@Z@Z */
11165 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func_basic_ios
, 8)
11166 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_func_basic_ios(basic_istream_wchar
*this,
11167 basic_ios_wchar
* (__cdecl
*pfunc
)(basic_ios_wchar
*))
11169 TRACE("(%p %p)\n", this, pfunc
);
11170 pfunc(basic_istream_wchar_get_basic_ios(this));
11174 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
11175 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
11176 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
11177 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
11178 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func_ios_base
, 8)
11179 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_func_ios_base(
11180 basic_istream_wchar
*this, ios_base
* (__cdecl
*pfunc
)(ios_base
*))
11182 TRACE("(%p %p)\n", this, pfunc
);
11183 pfunc(&basic_istream_wchar_get_basic_ios(this)->base
);
11187 /* ?swap@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEXAAV12@@Z */
11188 /* ?swap@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAXAEAV12@@Z */
11189 /* ?swap@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEXAAV12@@Z */
11190 /* ?swap@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAXAEAV12@@Z */
11191 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_swap
, 8)
11192 void __thiscall
basic_istream_wchar_swap(basic_istream_wchar
*this, basic_istream_wchar
*r
)
11194 TRACE("(%p %p)\n", this, r
);
11199 basic_ios_wchar_swap(basic_istream_wchar_get_basic_ios(this),
11200 basic_istream_wchar_get_basic_ios(r
));
11201 this->count
^= r
->count
;
11202 r
->count
^= this->count
;
11203 this->count
^= r
->count
;
11206 static inline basic_ios_char
* basic_iostream_char_to_basic_ios(basic_iostream_char
*ptr
)
11208 return (basic_ios_char
*)((char*)ptr
+basic_iostream_char_vbtable1
[1]);
11211 static inline basic_iostream_char
* basic_iostream_char_from_basic_ios(basic_ios_char
*ptr
)
11213 return (basic_iostream_char
*)((char*)ptr
-basic_iostream_char_vbtable1
[1]);
11216 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
11217 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
11218 DEFINE_THISCALL_WRAPPER(basic_iostream_char_ctor
, 12)
11219 basic_iostream_char
* __thiscall
basic_iostream_char_ctor(basic_iostream_char
*this, basic_streambuf_char
*strbuf
, MSVCP_bool virt_init
)
11221 basic_ios_char
*basic_ios
;
11223 TRACE("(%p %p %d)\n", this, strbuf
, virt_init
);
11226 this->base1
.vbtable
= basic_iostream_char_vbtable1
;
11227 this->base2
.vbtable
= basic_iostream_char_vbtable2
;
11228 basic_ios
= basic_istream_char_get_basic_ios(&this->base1
);
11229 INIT_BASIC_IOS_VTORDISP(basic_ios
);
11230 basic_ios_char_ctor(basic_ios
);
11232 basic_ios
= basic_istream_char_get_basic_ios(&this->base1
);
11235 basic_istream_char_ctor(&this->base1
, strbuf
, FALSE
, FALSE
);
11236 basic_ostream_char_ctor_uninitialized(&this->base2
, 0, FALSE
, FALSE
);
11237 basic_ios
->base
.vtable
= &MSVCP_basic_iostream_char_vtable
;
11241 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
11242 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
11243 DEFINE_THISCALL_WRAPPER(basic_iostream_char_dtor
, 4)
11244 void __thiscall
basic_iostream_char_dtor(basic_ios_char
*base
)
11246 basic_iostream_char
*this = basic_iostream_char_from_basic_ios(base
);
11248 TRACE("(%p)\n", this);
11249 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base2
));
11250 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base1
));
11253 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
11254 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
11255 DEFINE_THISCALL_WRAPPER(basic_iostream_char_vbase_dtor
, 4)
11256 void __thiscall
basic_iostream_char_vbase_dtor(basic_iostream_char
*this)
11258 basic_ios_char
*base
= basic_iostream_char_to_basic_ios(this);
11260 TRACE("(%p)\n", this);
11262 basic_iostream_char_dtor(base
);
11263 basic_ios_char_dtor(base
);
11266 DEFINE_THISCALL_WRAPPER(basic_iostream_char_vector_dtor
, 8)
11267 basic_iostream_char
* __thiscall
basic_iostream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
11269 basic_iostream_char
*this = basic_iostream_char_from_basic_ios(base
);
11271 TRACE("(%p %x)\n", this, flags
);
11274 /* we have an array, with the number of elements stored before the first object */
11275 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
11277 for(i
=*ptr
-1; i
>=0; i
--)
11278 basic_iostream_char_vbase_dtor(this+i
);
11279 MSVCRT_operator_delete(ptr
);
11281 basic_iostream_char_vbase_dtor(this);
11283 MSVCRT_operator_delete(this);
11289 /* ?swap@?$basic_iostream@DU?$char_traits@D@std@@@std@@QAEXAAV12@@Z */
11290 /* ?swap@?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAAXAEAV12@@Z */
11291 DEFINE_THISCALL_WRAPPER(basic_iostream_char_swap
, 8)
11292 void __thiscall
basic_iostream_char_swap(basic_iostream_char
*this, basic_iostream_char
*r
)
11294 TRACE("(%p %p)\n", this, r
);
11299 basic_ios_char_swap(basic_istream_char_get_basic_ios(&this->base1
),
11300 basic_istream_char_get_basic_ios(&r
->base1
));
11303 static inline basic_ios_wchar
* basic_iostream_wchar_to_basic_ios(basic_iostream_wchar
*ptr
)
11305 return (basic_ios_wchar
*)((char*)ptr
+basic_iostream_wchar_vbtable1
[1]);
11308 static inline basic_iostream_wchar
* basic_iostream_wchar_from_basic_ios(basic_ios_wchar
*ptr
)
11310 return (basic_iostream_wchar
*)((char*)ptr
-basic_iostream_wchar_vbtable1
[1]);
11313 /* ??0?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
11314 /* ??0?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
11315 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_ctor
, 12)
11316 basic_iostream_wchar
* __thiscall
basic_iostream_wchar_ctor(basic_iostream_wchar
*this,
11317 basic_streambuf_wchar
*strbuf
, MSVCP_bool virt_init
)
11319 basic_ios_wchar
*basic_ios
;
11321 TRACE("(%p %p %d)\n", this, strbuf
, virt_init
);
11324 this->base1
.vbtable
= basic_iostream_wchar_vbtable1
;
11325 this->base2
.vbtable
= basic_iostream_wchar_vbtable2
;
11326 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base1
);
11327 INIT_BASIC_IOS_VTORDISP(basic_ios
);
11328 basic_ios_wchar_ctor(basic_ios
);
11330 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base1
);
11333 basic_istream_wchar_ctor(&this->base1
, strbuf
, FALSE
, FALSE
);
11334 basic_ostream_wchar_ctor_uninitialized(&this->base2
, 0, FALSE
, FALSE
);
11336 basic_ios
->base
.vtable
= &MSVCP_basic_iostream_wchar_vtable
;
11340 /* ??0?$basic_iostream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
11341 /* ??0?$basic_iostream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
11342 DEFINE_THISCALL_WRAPPER(basic_iostream_short_ctor
, 12)
11343 basic_iostream_wchar
* __thiscall
basic_iostream_short_ctor(basic_iostream_wchar
*this,
11344 basic_streambuf_wchar
*strbuf
, MSVCP_bool virt_init
)
11346 basic_iostream_wchar_ctor(this, strbuf
, virt_init
);
11347 basic_istream_wchar_get_basic_ios(&this->base1
)->base
.vtable
= &MSVCP_basic_iostream_short_vtable
;
11351 /* ??1?$basic_iostream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
11352 /* ??1?$basic_iostream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
11353 /* ??1?$basic_iostream@GU?$char_traits@G@std@@@std@@UAE@XZ */
11354 /* ??1?$basic_iostream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
11355 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_dtor
, 4)
11356 void __thiscall
basic_iostream_wchar_dtor(basic_ios_wchar
*base
)
11358 basic_iostream_wchar
*this = basic_iostream_wchar_from_basic_ios(base
);
11360 TRACE("(%p)\n", this);
11361 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base2
));
11362 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base1
));
11365 /* ??_D?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
11366 /* ??_D?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
11367 /* ??_D?$basic_iostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
11368 /* ??_D?$basic_iostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
11369 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_vbase_dtor
, 4)
11370 void __thiscall
basic_iostream_wchar_vbase_dtor(basic_iostream_wchar
*this)
11372 basic_ios_wchar
*base
= basic_iostream_wchar_to_basic_ios(this);
11374 TRACE("(%p)\n", this);
11376 basic_iostream_wchar_dtor(base
);
11377 basic_ios_wchar_dtor(base
);
11380 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_vector_dtor
, 8)
11381 basic_iostream_wchar
* __thiscall
basic_iostream_wchar_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
11383 basic_iostream_wchar
*this = basic_iostream_wchar_from_basic_ios(base
);
11385 TRACE("(%p %x)\n", this, flags
);
11388 /* we have an array, with the number of elements stored before the first object */
11389 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
11391 for(i
=*ptr
-1; i
>=0; i
--)
11392 basic_iostream_wchar_vbase_dtor(this+i
);
11393 MSVCRT_operator_delete(ptr
);
11395 basic_iostream_wchar_vbase_dtor(this);
11397 MSVCRT_operator_delete(this);
11403 /* ?swap@?$basic_iostream@GU?$char_traits@G@std@@@std@@QAEXAAV12@@Z */
11404 /* ?swap@?$basic_iostream@GU?$char_traits@G@std@@@std@@QEAAXAEAV12@@Z */
11405 /* ?swap@?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QAEXAAV12@@Z */
11406 /* ?swap@?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QEAAXAEAV12@@Z */
11407 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_swap
, 8)
11408 void __thiscall
basic_iostream_wchar_swap(basic_iostream_wchar
*this, basic_iostream_wchar
*r
)
11410 TRACE("(%p %p)\n", this, r
);
11415 basic_ios_wchar_swap(basic_istream_wchar_get_basic_ios(&this->base1
),
11416 basic_istream_wchar_get_basic_ios(&r
->base1
));
11419 static inline basic_ios_char
* basic_ofstream_char_to_basic_ios(basic_ofstream_char
*ptr
)
11421 return (basic_ios_char
*)((char*)ptr
+basic_ofstream_char_vbtable
[1]);
11424 static inline basic_ofstream_char
* basic_ofstream_char_from_basic_ios(basic_ios_char
*ptr
)
11426 return (basic_ofstream_char
*)((char*)ptr
-basic_ofstream_char_vbtable
[1]);
11429 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
11430 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
11431 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor
, 8)
11432 basic_ofstream_char
* __thiscall
basic_ofstream_char_ctor(basic_ofstream_char
*this, MSVCP_bool virt_init
)
11434 basic_ios_char
*basic_ios
;
11436 TRACE("(%p %d)\n", this, virt_init
);
11439 this->base
.vbtable
= basic_ofstream_char_vbtable
;
11440 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
11441 INIT_BASIC_IOS_VTORDISP(basic_ios
);
11442 basic_ios_char_ctor(basic_ios
);
11444 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
11447 basic_filebuf_char_ctor(&this->filebuf
);
11448 basic_ostream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
, FALSE
);
11449 basic_ios
->base
.vtable
= &MSVCP_basic_ofstream_char_vtable
;
11453 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
11454 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
11455 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_file
, 12)
11456 basic_ofstream_char
* __thiscall
basic_ofstream_char_ctor_file(
11457 basic_ofstream_char
*this, FILE *file
, MSVCP_bool virt_init
)
11459 basic_ios_char
*basic_ios
;
11461 TRACE("(%p %p %d)\n", this, file
, virt_init
);
11464 this->base
.vbtable
= basic_ofstream_char_vbtable
;
11465 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
11466 INIT_BASIC_IOS_VTORDISP(basic_ios
);
11467 basic_ios_char_ctor(basic_ios
);
11469 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
11472 basic_filebuf_char_ctor_file(&this->filebuf
, file
);
11473 basic_ostream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
, FALSE
);
11474 basic_ios
->base
.vtable
= &MSVCP_basic_ofstream_char_vtable
;
11478 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PBDHH@Z */
11479 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDHH@Z */
11480 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_name
, 20)
11481 basic_ofstream_char
* __thiscall
basic_ofstream_char_ctor_name(basic_ofstream_char
*this,
11482 const char *name
, int mode
, int prot
, MSVCP_bool virt_init
)
11484 TRACE("(%p %s %d %d %d)\n", this, name
, mode
, prot
, virt_init
);
11486 basic_ofstream_char_ctor(this, virt_init
);
11488 if(!basic_filebuf_char_open(&this->filebuf
, name
, mode
|OPENMODE_out
, prot
)) {
11489 basic_ios_char
*basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
11490 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
11495 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PBGHH@Z */
11496 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEBGHH@Z */
11497 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PB_WHH@Z */
11498 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEB_WHH@Z */
11499 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_name_wchar
, 20)
11500 basic_ofstream_char
* __thiscall
basic_ofstream_char_ctor_name_wchar(basic_ofstream_char
*this,
11501 const wchar_t *name
, int mode
, int prot
, MSVCP_bool virt_init
)
11503 TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name
), mode
, prot
, virt_init
);
11505 basic_ofstream_char_ctor(this, virt_init
);
11507 if(!basic_filebuf_char_open_wchar(&this->filebuf
, name
, mode
|OPENMODE_out
, prot
)) {
11508 basic_ios_char
*basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
11509 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
11514 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
11515 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
11516 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_dtor
, 4)
11517 void __thiscall
basic_ofstream_char_dtor(basic_ios_char
*base
)
11519 basic_ofstream_char
*this = basic_ofstream_char_from_basic_ios(base
);
11521 TRACE("(%p)\n", this);
11523 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base
));
11524 basic_filebuf_char_dtor(&this->filebuf
);
11527 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
11528 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
11529 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_vbase_dtor
, 4)
11530 void __thiscall
basic_ofstream_char_vbase_dtor(basic_ofstream_char
*this)
11532 basic_ios_char
*base
= basic_ofstream_char_to_basic_ios(this);
11534 TRACE("(%p)\n", this);
11536 basic_ofstream_char_dtor(base
);
11537 basic_ios_char_dtor(base
);
11540 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_vector_dtor
, 8)
11541 basic_ofstream_char
* __thiscall
basic_ofstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
11543 basic_ofstream_char
*this = basic_ofstream_char_from_basic_ios(base
);
11545 TRACE("(%p %x)\n", this, flags
);
11548 /* we have an array, with the number of elements stored before the first object */
11549 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
11551 for(i
=*ptr
-1; i
>=0; i
--)
11552 basic_ofstream_char_vbase_dtor(this+i
);
11553 MSVCRT_operator_delete(ptr
);
11555 basic_ofstream_char_vbase_dtor(this);
11557 MSVCRT_operator_delete(this);
11563 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
11564 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
11565 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_close
, 4)
11566 void __thiscall
basic_ofstream_char_close(basic_ofstream_char
*this)
11568 TRACE("(%p)\n", this);
11570 if(!basic_filebuf_char_close(&this->filebuf
)) {
11571 basic_ios_char
*basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
11572 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
11576 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
11577 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
11578 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_is_open
, 4)
11579 MSVCP_bool __thiscall
basic_ofstream_char_is_open(const basic_ofstream_char
*this)
11581 TRACE("(%p)\n", this);
11582 return basic_filebuf_char_is_open(&this->filebuf
);
11585 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDHH@Z */
11586 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDHH@Z */
11587 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open
, 16)
11588 void __thiscall
basic_ofstream_char_open(basic_ofstream_char
*this,
11589 const char *name
, int mode
, int prot
)
11591 TRACE("(%p %s %d %d)\n", this, name
, mode
, prot
);
11593 if(!basic_filebuf_char_open(&this->filebuf
, name
, mode
|OPENMODE_out
, prot
)) {
11594 basic_ios_char
*basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
11595 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
11599 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDI@Z */
11600 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDI@Z */
11601 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_old
, 12)
11602 void __thiscall
basic_ofstream_char_open_old(basic_ofstream_char
*this,
11603 const char *name
, unsigned int mode
)
11605 basic_ofstream_char_open(this, name
, mode
, _SH_DENYNO
);
11608 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBGHH@Z */
11609 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGHH@Z */
11610 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPB_WHH@Z */
11611 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WHH@Z */
11612 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_wchar
, 16)
11613 void __thiscall
basic_ofstream_char_open_wchar(basic_ofstream_char
*this,
11614 const wchar_t *name
, int mode
, int prot
)
11616 TRACE("(%p %s %d %d)\n", this, debugstr_w(name
), mode
, prot
);
11618 if(!basic_filebuf_char_open_wchar(&this->filebuf
, name
, mode
|OPENMODE_out
, prot
)) {
11619 basic_ios_char
*basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
11620 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
11624 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBGI@Z */
11625 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGI@Z */
11626 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPB_WI@Z */
11627 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WI@Z */
11628 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_wchar_old
, 12)
11629 void __thiscall
basic_ofstream_char_open_wchar_old(basic_ofstream_char
*this,
11630 const wchar_t *name
, unsigned int mode
)
11632 basic_ofstream_char_open_wchar(this, name
, mode
, _SH_DENYNO
);
11635 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
11636 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
11637 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_rdbuf
, 4)
11638 basic_filebuf_char
* __thiscall
basic_ofstream_char_rdbuf(const basic_ofstream_char
*this)
11640 TRACE("(%p)\n", this);
11641 return (basic_filebuf_char
*)&this->filebuf
;
11644 static inline basic_ios_wchar
* basic_ofstream_wchar_to_basic_ios(basic_ofstream_wchar
*ptr
)
11646 return (basic_ios_wchar
*)((char*)ptr
+basic_ofstream_wchar_vbtable
[1]);
11649 static inline basic_ofstream_wchar
* basic_ofstream_wchar_from_basic_ios(basic_ios_wchar
*ptr
)
11651 return (basic_ofstream_wchar
*)((char*)ptr
-basic_ofstream_wchar_vbtable
[1]);
11654 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAE@XZ */
11655 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAA@XZ */
11656 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_ctor
, 8)
11657 basic_ofstream_wchar
* __thiscall
basic_ofstream_wchar_ctor(basic_ofstream_wchar
*this, MSVCP_bool virt_init
)
11659 basic_ios_wchar
*basic_ios
;
11661 TRACE("(%p %d)\n", this, virt_init
);
11664 this->base
.vbtable
= basic_ofstream_wchar_vbtable
;
11665 basic_ios
= basic_ostream_wchar_get_basic_ios(&this->base
);
11666 INIT_BASIC_IOS_VTORDISP(basic_ios
);
11667 basic_ios_wchar_ctor(basic_ios
);
11669 basic_ios
= basic_ostream_wchar_get_basic_ios(&this->base
);
11672 basic_filebuf_wchar_ctor(&this->filebuf
);
11673 basic_ostream_wchar_ctor(&this->base
, &this->filebuf
.base
, FALSE
, FALSE
);
11674 basic_ios
->base
.vtable
= &MSVCP_basic_ofstream_wchar_vtable
;
11678 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
11679 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
11680 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_ctor
, 8)
11681 basic_ofstream_wchar
* __thiscall
basic_ofstream_short_ctor(basic_ofstream_wchar
*this, MSVCP_bool virt_init
)
11683 basic_ofstream_wchar_ctor(this, virt_init
);
11684 basic_ostream_wchar_get_basic_ios(&this->base
)->base
.vtable
= &MSVCP_basic_ofstream_short_vtable
;
11688 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
11689 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
11690 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_ctor_file
, 12)
11691 basic_ofstream_wchar
* __thiscall
basic_ofstream_wchar_ctor_file(
11692 basic_ofstream_wchar
*this, FILE *file
, MSVCP_bool virt_init
)
11694 basic_ios_wchar
*basic_ios
;
11696 TRACE("(%p %p %d)\n", this, file
, virt_init
);
11699 this->base
.vbtable
= basic_ofstream_wchar_vbtable
;
11700 basic_ios
= basic_ostream_wchar_get_basic_ios(&this->base
);
11701 INIT_BASIC_IOS_VTORDISP(basic_ios
);
11702 basic_ios_wchar_ctor(basic_ios
);
11704 basic_ios
= basic_ostream_wchar_get_basic_ios(&this->base
);
11707 basic_filebuf_wchar_ctor_file(&this->filebuf
, file
);
11708 basic_ostream_wchar_ctor(&this->base
, &this->filebuf
.base
, FALSE
, FALSE
);
11709 basic_ios
->base
.vtable
= &MSVCP_basic_ofstream_wchar_vtable
;
11713 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
11714 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
11715 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_ctor_file
, 12)
11716 basic_ofstream_wchar
* __thiscall
basic_ofstream_short_ctor_file(
11717 basic_ofstream_wchar
*this, FILE *file
, MSVCP_bool virt_init
)
11719 basic_ofstream_wchar_ctor_file(this, file
, virt_init
);
11720 basic_ostream_wchar_get_basic_ios(&this->base
)->base
.vtable
= &MSVCP_basic_ofstream_short_vtable
;
11724 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAE@PBDHH@Z */
11725 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEBDHH@Z */
11726 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_ctor_name
, 20)
11727 basic_ofstream_wchar
* __thiscall
basic_ofstream_wchar_ctor_name(basic_ofstream_wchar
*this,
11728 const char *name
, int mode
, int prot
, MSVCP_bool virt_init
)
11730 TRACE("(%p %s %d %d %d)\n", this, name
, mode
, prot
, virt_init
);
11732 basic_ofstream_wchar_ctor(this, virt_init
);
11734 if(!basic_filebuf_wchar_open(&this->filebuf
, name
, mode
|OPENMODE_out
, prot
)) {
11735 basic_ios_wchar
*basic_ios
= basic_ostream_wchar_get_basic_ios(&this->base
);
11736 basic_ios_wchar_setstate(basic_ios
, IOSTATE_failbit
);
11741 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@PBDHH@Z */
11742 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@PEBDHH@Z */
11743 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_ctor_name
, 20)
11744 basic_ofstream_wchar
* __thiscall
basic_ofstream_short_ctor_name(basic_ofstream_wchar
*this,
11745 const char *name
, int mode
, int prot
, MSVCP_bool virt_init
)
11747 basic_ofstream_wchar_ctor_name(this, name
, mode
, prot
, virt_init
);
11748 basic_ostream_wchar_get_basic_ios(&this->base
)->base
.vtable
= &MSVCP_basic_ofstream_short_vtable
;
11752 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAE@PBGHH@Z */
11753 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEBGHH@Z */
11754 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAE@PB_WHH@Z */
11755 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEB_WHH@Z */
11756 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_ctor_name_wchar
, 20)
11757 basic_ofstream_wchar
* __thiscall
basic_ofstream_wchar_ctor_name_wchar(basic_ofstream_wchar
*this,
11758 const wchar_t *name
, int mode
, int prot
, MSVCP_bool virt_init
)
11760 TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name
), mode
, prot
, virt_init
);
11762 basic_ofstream_wchar_ctor(this, virt_init
);
11764 if(!basic_filebuf_wchar_open_wchar(&this->filebuf
, name
, mode
|OPENMODE_out
, prot
)) {
11765 basic_ios_wchar
*basic_ios
= basic_ostream_wchar_get_basic_ios(&this->base
);
11766 basic_ios_wchar_setstate(basic_ios
, IOSTATE_failbit
);
11771 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@PBGHH@Z */
11772 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@PEBGHH@Z */
11773 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@PB_WHH@Z */
11774 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@PEB_WHH@Z */
11775 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_ctor_name_wchar
, 20)
11776 basic_ofstream_wchar
* __thiscall
basic_ofstream_short_ctor_name_wchar(basic_ofstream_wchar
*this,
11777 const wchar_t *name
, int mode
, int prot
, MSVCP_bool virt_init
)
11779 basic_ofstream_wchar_ctor_name_wchar(this, name
, mode
, prot
, virt_init
);
11780 basic_ostream_wchar_get_basic_ios(&this->base
)->base
.vtable
= &MSVCP_basic_ofstream_short_vtable
;
11784 /* ??1?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
11785 /* ??1?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
11786 /* ??1?$basic_ofstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
11787 /* ??1?$basic_ofstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
11788 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_dtor
, 4)
11789 void __thiscall
basic_ofstream_wchar_dtor(basic_ios_wchar
*base
)
11791 basic_ofstream_wchar
*this = basic_ofstream_wchar_from_basic_ios(base
);
11793 TRACE("(%p)\n", this);
11795 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base
));
11796 basic_filebuf_wchar_dtor(&this->filebuf
);
11799 /* ??_D?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
11800 /* ??_D?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
11801 /* ??_D?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
11802 /* ??_D?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
11803 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_vbase_dtor
, 4)
11804 void __thiscall
basic_ofstream_wchar_vbase_dtor(basic_ofstream_wchar
*this)
11806 basic_ios_wchar
*base
= basic_ofstream_wchar_to_basic_ios(this);
11808 TRACE("(%p)\n", this);
11810 basic_ofstream_wchar_dtor(base
);
11811 basic_ios_wchar_dtor(base
);
11814 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_vector_dtor
, 8)
11815 basic_ofstream_wchar
* __thiscall
basic_ofstream_wchar_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
11817 basic_ofstream_wchar
*this = basic_ofstream_wchar_from_basic_ios(base
);
11819 TRACE("(%p %x)\n", this, flags
);
11822 /* we have an array, with the number of elements stored before the first object */
11823 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
11825 for(i
=*ptr
-1; i
>=0; i
--)
11826 basic_ofstream_wchar_vbase_dtor(this+i
);
11827 MSVCRT_operator_delete(ptr
);
11829 basic_ofstream_wchar_vbase_dtor(this);
11831 MSVCRT_operator_delete(this);
11837 /* ?close@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
11838 /* ?close@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
11839 /* ?close@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
11840 /* ?close@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
11841 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_close
, 4)
11842 void __thiscall
basic_ofstream_wchar_close(basic_ofstream_wchar
*this)
11844 TRACE("(%p)\n", this);
11846 if(!basic_filebuf_wchar_close(&this->filebuf
)) {
11847 basic_ios_wchar
*basic_ios
= basic_ostream_wchar_get_basic_ios(&this->base
);
11848 basic_ios_wchar_setstate(basic_ios
, IOSTATE_failbit
);
11852 /* ?is_open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
11853 /* ?is_open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
11854 /* ?is_open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
11855 /* ?is_open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
11856 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_is_open
, 4)
11857 MSVCP_bool __thiscall
basic_ofstream_wchar_is_open(const basic_ofstream_wchar
*this)
11859 TRACE("(%p)\n", this);
11860 return basic_filebuf_wchar_is_open(&this->filebuf
);
11863 /* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXPBDHH@Z */
11864 /* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBDHH@Z */
11865 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPBDHH@Z */
11866 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDHH@Z */
11867 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_open
, 16)
11868 void __thiscall
basic_ofstream_wchar_open(basic_ofstream_wchar
*this,
11869 const char *name
, int mode
, int prot
)
11871 TRACE("(%p %s %d %d)\n", this, name
, mode
, prot
);
11873 if(!basic_filebuf_wchar_open(&this->filebuf
, name
, mode
|OPENMODE_out
, prot
)) {
11874 basic_ios_wchar
*basic_ios
= basic_ostream_wchar_get_basic_ios(&this->base
);
11875 basic_ios_wchar_setstate(basic_ios
, IOSTATE_failbit
);
11879 /* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXPBDI@Z */
11880 /* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBDI@Z */
11881 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPBDI@Z */
11882 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDI@Z */
11883 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_open_old
, 12)
11884 void __thiscall
basic_ofstream_wchar_open_old(basic_ofstream_wchar
*this,
11885 const char *name
, unsigned int mode
)
11887 basic_ofstream_wchar_open(this, name
, mode
, _SH_DENYNO
);
11890 /* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXPBGHH@Z */
11891 /* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBGHH@Z */
11892 /* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXPB_WHH@Z */
11893 /* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEB_WHH@Z */
11894 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPBGHH@Z */
11895 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEBGHH@Z */
11896 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPB_WHH@Z */
11897 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEB_WHH@Z */
11898 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_open_wchar
, 16)
11899 void __thiscall
basic_ofstream_wchar_open_wchar(basic_ofstream_wchar
*this,
11900 const wchar_t *name
, int mode
, int prot
)
11902 TRACE("(%p %s %d %d)\n", this, debugstr_w(name
), mode
, prot
);
11904 if(!basic_filebuf_wchar_open_wchar(&this->filebuf
, name
, mode
|OPENMODE_out
, prot
)) {
11905 basic_ios_wchar
*basic_ios
= basic_ostream_wchar_get_basic_ios(&this->base
);
11906 basic_ios_wchar_setstate(basic_ios
, IOSTATE_failbit
);
11910 /* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXPBGI@Z */
11911 /* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBGI@Z */
11912 /* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXPB_WI@Z */
11913 /* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEB_WI@Z */
11914 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPBGI@Z */
11915 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEBGI@Z */
11916 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPB_WI@Z */
11917 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEB_WI@Z */
11918 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_open_wchar_old
, 12)
11919 void __thiscall
basic_ofstream_wchar_open_wchar_old(basic_ofstream_wchar
*this,
11920 const wchar_t *name
, unsigned int mode
)
11922 basic_ofstream_wchar_open_wchar(this, name
, mode
, _SH_DENYNO
);
11925 /* ?rdbuf@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
11926 /* ?rdbuf@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
11927 /* ?rdbuf@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
11928 /* ?rdbuf@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
11929 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_rdbuf
, 4)
11930 basic_filebuf_wchar
* __thiscall
basic_ofstream_wchar_rdbuf(const basic_ofstream_wchar
*this)
11932 TRACE("(%p)\n", this);
11933 return (basic_filebuf_wchar
*)&this->filebuf
;
11936 static inline basic_ios_char
* basic_ifstream_char_to_basic_ios(basic_ifstream_char
*ptr
)
11938 return (basic_ios_char
*)((char*)ptr
+basic_ifstream_char_vbtable
[1]);
11941 static inline basic_ifstream_char
* basic_ifstream_char_from_basic_ios(basic_ios_char
*ptr
)
11943 return (basic_ifstream_char
*)((char*)ptr
-basic_ifstream_char_vbtable
[1]);
11946 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
11947 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
11948 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor
, 8)
11949 basic_ifstream_char
* __thiscall
basic_ifstream_char_ctor(basic_ifstream_char
*this, MSVCP_bool virt_init
)
11951 basic_ios_char
*basic_ios
;
11953 TRACE("(%p %d)\n", this, virt_init
);
11956 this->base
.vbtable
= basic_ifstream_char_vbtable
;
11957 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
11958 INIT_BASIC_IOS_VTORDISP(basic_ios
);
11959 basic_ios_char_ctor(basic_ios
);
11961 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
11964 basic_filebuf_char_ctor(&this->filebuf
);
11965 basic_istream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
, FALSE
);
11966 basic_ios
->base
.vtable
= &MSVCP_basic_ifstream_char_vtable
;
11970 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
11971 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
11972 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_file
, 12)
11973 basic_ifstream_char
* __thiscall
basic_ifstream_char_ctor_file(
11974 basic_ifstream_char
*this, FILE *file
, MSVCP_bool virt_init
)
11976 basic_ios_char
*basic_ios
;
11978 TRACE("(%p %p %d)\n", this, file
, virt_init
);
11981 this->base
.vbtable
= basic_ifstream_char_vbtable
;
11982 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
11983 INIT_BASIC_IOS_VTORDISP(basic_ios
);
11984 basic_ios_char_ctor(basic_ios
);
11986 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
11989 basic_filebuf_char_ctor_file(&this->filebuf
, file
);
11990 basic_istream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
, FALSE
);
11991 basic_ios
->base
.vtable
= &MSVCP_basic_ifstream_char_vtable
;
11995 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PBDHH@Z */
11996 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDHH@Z */
11997 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_name
, 20)
11998 basic_ifstream_char
* __thiscall
basic_ifstream_char_ctor_name(basic_ifstream_char
*this,
11999 const char *name
, int mode
, int prot
, MSVCP_bool virt_init
)
12001 TRACE("(%p %s %d %d %d)\n", this, name
, mode
, prot
, virt_init
);
12003 basic_ifstream_char_ctor(this, virt_init
);
12005 if(!basic_filebuf_char_open(&this->filebuf
, name
, mode
|OPENMODE_in
, prot
)) {
12006 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
12007 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
12012 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PBDH@Z */
12013 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDH@Z */
12014 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_name_old
, 16)
12015 basic_ifstream_char
* __thiscall
basic_ifstream_char_ctor_name_old(basic_ifstream_char
*this,
12016 const char *name
, int mode
, MSVCP_bool virt_init
)
12018 return basic_ifstream_char_ctor_name(this, name
, mode
, _SH_DENYNO
, virt_init
);
12021 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PBGHH@Z */
12022 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEBGHH@Z */
12023 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PB_WHH@Z */
12024 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEB_WHH@Z */
12025 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_name_wchar
, 20)
12026 basic_ifstream_char
* __thiscall
basic_ifstream_char_ctor_name_wchar(basic_ifstream_char
*this,
12027 const wchar_t *name
, int mode
, int prot
, MSVCP_bool virt_init
)
12029 TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name
), mode
, prot
, virt_init
);
12031 basic_ifstream_char_ctor(this, virt_init
);
12033 if(!basic_filebuf_char_open_wchar(&this->filebuf
, name
, mode
|OPENMODE_in
, prot
)) {
12034 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
12035 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
12040 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
12041 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
12042 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_dtor
, 4)
12043 void __thiscall
basic_ifstream_char_dtor(basic_ios_char
*base
)
12045 basic_ifstream_char
*this = basic_ifstream_char_from_basic_ios(base
);
12047 TRACE("(%p)\n", this);
12049 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base
));
12050 basic_filebuf_char_dtor(&this->filebuf
);
12053 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
12054 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
12055 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_vbase_dtor
, 4)
12056 void __thiscall
basic_ifstream_char_vbase_dtor(basic_ifstream_char
*this)
12058 basic_ios_char
*base
= basic_ifstream_char_to_basic_ios(this);
12060 TRACE("(%p)\n", this);
12062 basic_ifstream_char_dtor(base
);
12063 basic_ios_char_dtor(base
);
12066 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_vector_dtor
, 8)
12067 basic_ifstream_char
* __thiscall
basic_ifstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
12069 basic_ifstream_char
*this = basic_ifstream_char_from_basic_ios(base
);
12071 TRACE("(%p %x)\n", this, flags
);
12074 /* we have an array, with the number of elements stored before the first object */
12075 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
12077 for(i
=*ptr
-1; i
>=0; i
--)
12078 basic_ifstream_char_vbase_dtor(this+i
);
12079 MSVCRT_operator_delete(ptr
);
12081 basic_ifstream_char_vbase_dtor(this);
12083 MSVCRT_operator_delete(this);
12089 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
12090 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
12091 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_close
, 4)
12092 void __thiscall
basic_ifstream_char_close(basic_ifstream_char
*this)
12094 TRACE("(%p)\n", this);
12096 if(!basic_filebuf_char_close(&this->filebuf
)) {
12097 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
12098 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
12102 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
12103 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
12104 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_is_open
, 4)
12105 MSVCP_bool __thiscall
basic_ifstream_char_is_open(const basic_ifstream_char
*this)
12107 TRACE("(%p)\n", this);
12108 return basic_filebuf_char_is_open(&this->filebuf
);
12111 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDHH@Z */
12112 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDHH@Z */
12113 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open
, 16)
12114 void __thiscall
basic_ifstream_char_open(basic_ifstream_char
*this,
12115 const char *name
, int mode
, int prot
)
12117 TRACE("(%p %s %d %d)\n", this, name
, mode
, prot
);
12119 if(!basic_filebuf_char_open(&this->filebuf
, name
, mode
|OPENMODE_in
, prot
)) {
12120 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
12121 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
12125 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDI@Z */
12126 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDI@Z */
12127 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_old
, 12)
12128 void __thiscall
basic_ifstream_char_open_old(basic_ifstream_char
*this,
12129 const char *name
, unsigned int mode
)
12131 basic_ifstream_char_open(this, name
, mode
, _SH_DENYNO
);
12134 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBGHH@Z */
12135 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGHH@Z */
12136 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPB_WHH@Z */
12137 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WHH@Z */
12138 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_wchar
, 16)
12139 void __thiscall
basic_ifstream_char_open_wchar(basic_ifstream_char
*this,
12140 const wchar_t *name
, int mode
, int prot
)
12142 TRACE("(%p %s %d %d)\n", this, debugstr_w(name
), mode
, prot
);
12144 if(!basic_filebuf_char_open_wchar(&this->filebuf
, name
, mode
|OPENMODE_in
, prot
)) {
12145 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
12146 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
12150 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBGI@Z */
12151 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGI@Z */
12152 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPB_WI@Z */
12153 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WI@Z */
12154 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_wchar_old
, 12)
12155 void __thiscall
basic_ifstream_char_open_wchar_old(basic_ifstream_char
*this,
12156 const wchar_t *name
, unsigned int mode
)
12158 basic_ifstream_char_open_wchar(this, name
, mode
, _SH_DENYNO
);
12161 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
12162 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
12163 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_rdbuf
, 4)
12164 basic_filebuf_char
* __thiscall
basic_ifstream_char_rdbuf(const basic_ifstream_char
*this)
12166 TRACE("(%p)\n", this);
12167 return (basic_filebuf_char
*)&this->filebuf
;
12170 static inline basic_ios_wchar
* basic_ifstream_wchar_to_basic_ios(basic_ifstream_wchar
*ptr
)
12172 return (basic_ios_wchar
*)((char*)ptr
+basic_ifstream_wchar_vbtable
[1]);
12175 static inline basic_ifstream_wchar
* basic_ifstream_wchar_from_basic_ios(basic_ios_wchar
*ptr
)
12177 return (basic_ifstream_wchar
*)((char*)ptr
-basic_ifstream_wchar_vbtable
[1]);
12180 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAE@XZ */
12181 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAA@XZ */
12182 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_ctor
, 8)
12183 basic_ifstream_wchar
* __thiscall
basic_ifstream_wchar_ctor(basic_ifstream_wchar
*this, MSVCP_bool virt_init
)
12185 basic_ios_wchar
*basic_ios
;
12187 TRACE("(%p %d)\n", this, virt_init
);
12190 this->base
.vbtable
= basic_ifstream_wchar_vbtable
;
12191 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
);
12192 INIT_BASIC_IOS_VTORDISP(basic_ios
);
12193 basic_ios_wchar_ctor(basic_ios
);
12195 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
);
12198 basic_filebuf_wchar_ctor(&this->filebuf
);
12199 basic_istream_wchar_ctor(&this->base
, &this->filebuf
.base
, FALSE
, FALSE
);
12200 basic_ios
->base
.vtable
= &MSVCP_basic_ifstream_wchar_vtable
;
12204 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
12205 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
12206 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_ctor
, 8)
12207 basic_ifstream_wchar
* __thiscall
basic_ifstream_short_ctor(basic_ifstream_wchar
*this, MSVCP_bool virt_init
)
12209 basic_ifstream_wchar_ctor(this, virt_init
);
12210 basic_istream_wchar_get_basic_ios(&this->base
)->base
.vtable
= &MSVCP_basic_ifstream_short_vtable
;
12214 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
12215 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
12216 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_ctor_file
, 12)
12217 basic_ifstream_wchar
* __thiscall
basic_ifstream_wchar_ctor_file(
12218 basic_ifstream_wchar
*this, FILE *file
, MSVCP_bool virt_init
)
12220 basic_ios_wchar
*basic_ios
;
12222 TRACE("(%p %p %d)\n", this, file
, virt_init
);
12225 this->base
.vbtable
= basic_ifstream_wchar_vbtable
;
12226 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
);
12227 INIT_BASIC_IOS_VTORDISP(basic_ios
);
12228 basic_ios_wchar_ctor(basic_ios
);
12230 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
);
12233 basic_filebuf_wchar_ctor_file(&this->filebuf
, file
);
12234 basic_istream_wchar_ctor(&this->base
, &this->filebuf
.base
, FALSE
, FALSE
);
12235 basic_ios
->base
.vtable
= &MSVCP_basic_ifstream_wchar_vtable
;
12239 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
12240 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
12241 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_ctor_file
, 12)
12242 basic_ifstream_wchar
* __thiscall
basic_ifstream_short_ctor_file(
12243 basic_ifstream_wchar
*this, FILE *file
, MSVCP_bool virt_init
)
12245 basic_ifstream_wchar_ctor_file(this, file
, virt_init
);
12246 basic_istream_wchar_get_basic_ios(&this->base
)->base
.vtable
= &MSVCP_basic_ifstream_short_vtable
;
12250 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAE@PBDHH@Z */
12251 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEBDHH@Z */
12252 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_ctor_name
, 20)
12253 basic_ifstream_wchar
* __thiscall
basic_ifstream_wchar_ctor_name(basic_ifstream_wchar
*this,
12254 const char *name
, int mode
, int prot
, MSVCP_bool virt_init
)
12256 TRACE("(%p %s %d %d %d)\n", this, name
, mode
, prot
, virt_init
);
12258 basic_ifstream_wchar_ctor(this, virt_init
);
12260 if(!basic_filebuf_wchar_open(&this->filebuf
, name
, mode
|OPENMODE_in
, prot
)) {
12261 basic_ios_wchar
*basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
);
12262 basic_ios_wchar_setstate(basic_ios
, IOSTATE_failbit
);
12267 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@PBDHH@Z */
12268 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@PEBDHH@Z */
12269 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_ctor_name
, 20)
12270 basic_ifstream_wchar
* __thiscall
basic_ifstream_short_ctor_name(basic_ifstream_wchar
*this,
12271 const char *name
, int mode
, int prot
, MSVCP_bool virt_init
)
12273 basic_ifstream_wchar_ctor_name(this, name
, mode
, prot
, virt_init
);
12274 basic_istream_wchar_get_basic_ios(&this->base
)->base
.vtable
= &MSVCP_basic_ifstream_short_vtable
;
12278 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAE@PBDH@Z */
12279 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEBDH@Z */
12280 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_ctor_name_old
, 16)
12281 basic_ifstream_wchar
* __thiscall
basic_ifstream_wchar_ctor_name_old(basic_ifstream_wchar
*this,
12282 const char *name
, int mode
, MSVCP_bool virt_init
)
12284 return basic_ifstream_wchar_ctor_name(this, name
, mode
, _SH_DENYNO
, virt_init
);
12287 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@PBDH@Z */
12288 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@PEBDH@Z */
12289 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_ctor_name_old
, 16)
12290 basic_ifstream_wchar
* __thiscall
basic_ifstream_short_ctor_name_old(basic_ifstream_wchar
*this,
12291 const char *name
, int mode
, MSVCP_bool virt_init
)
12293 return basic_ifstream_short_ctor_name(this, name
, mode
, _SH_DENYNO
, virt_init
);
12296 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAE@PBGHH@Z */
12297 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEBGHH@Z */
12298 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAE@PB_WHH@Z */
12299 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEB_WHH@Z */
12300 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_ctor_name_wchar
, 20)
12301 basic_ifstream_wchar
* __thiscall
basic_ifstream_wchar_ctor_name_wchar(basic_ifstream_wchar
*this,
12302 const wchar_t *name
, int mode
, int prot
, MSVCP_bool virt_init
)
12304 TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name
), mode
, prot
, virt_init
);
12306 basic_ifstream_wchar_ctor(this, virt_init
);
12308 if(!basic_filebuf_wchar_open_wchar(&this->filebuf
, name
, mode
|OPENMODE_in
, prot
)) {
12309 basic_ios_wchar
*basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
);
12310 basic_ios_wchar_setstate(basic_ios
, IOSTATE_failbit
);
12315 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@PBGHH@Z */
12316 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@PEBGHH@Z */
12317 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@PB_WHH@Z */
12318 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@PEB_WHH@Z */
12319 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_ctor_name_wchar
, 20)
12320 basic_ifstream_wchar
* __thiscall
basic_ifstream_short_ctor_name_wchar(basic_ifstream_wchar
*this,
12321 const wchar_t *name
, int mode
, int prot
, MSVCP_bool virt_init
)
12323 basic_ifstream_wchar_ctor_name_wchar(this, name
, mode
, prot
, virt_init
);
12324 basic_istream_wchar_get_basic_ios(&this->base
)->base
.vtable
= &MSVCP_basic_ifstream_short_vtable
;
12328 /* ??1?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
12329 /* ??1?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
12330 /* ??1?$basic_ifstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
12331 /* ??1?$basic_ifstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
12332 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_dtor
, 4)
12333 void __thiscall
basic_ifstream_wchar_dtor(basic_ios_wchar
*base
)
12335 basic_ifstream_wchar
*this = basic_ifstream_wchar_from_basic_ios(base
);
12337 TRACE("(%p)\n", this);
12339 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base
));
12340 basic_filebuf_wchar_dtor(&this->filebuf
);
12343 /* ??_D?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
12344 /* ??_D?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
12345 /* ??_D?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
12346 /* ??_D?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
12347 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_vbase_dtor
, 4)
12348 void __thiscall
basic_ifstream_wchar_vbase_dtor(basic_ifstream_wchar
*this)
12350 basic_ios_wchar
*base
= basic_ifstream_wchar_to_basic_ios(this);
12352 TRACE("(%p)\n", this);
12354 basic_ifstream_wchar_dtor(base
);
12355 basic_ios_wchar_dtor(base
);
12358 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_vector_dtor
, 8)
12359 basic_ifstream_wchar
* __thiscall
basic_ifstream_wchar_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
12361 basic_ifstream_wchar
*this = basic_ifstream_wchar_from_basic_ios(base
);
12363 TRACE("(%p %x)\n", this, flags
);
12366 /* we have an array, with the number of elements stored before the first object */
12367 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
12369 for(i
=*ptr
-1; i
>=0; i
--)
12370 basic_ifstream_wchar_vbase_dtor(this+i
);
12371 MSVCRT_operator_delete(ptr
);
12373 basic_ifstream_wchar_vbase_dtor(this);
12375 MSVCRT_operator_delete(this);
12381 /* ?close@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
12382 /* ?close@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
12383 /* ?close@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
12384 /* ?close@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
12385 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_close
, 4)
12386 void __thiscall
basic_ifstream_wchar_close(basic_ifstream_wchar
*this)
12388 TRACE("(%p)\n", this);
12390 if(!basic_filebuf_wchar_close(&this->filebuf
)) {
12391 basic_ios_wchar
*basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
);
12392 basic_ios_wchar_setstate(basic_ios
, IOSTATE_failbit
);
12396 /* ?is_open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
12397 /* ?is_open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
12398 /* ?is_open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
12399 /* ?is_open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
12400 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_is_open
, 4)
12401 MSVCP_bool __thiscall
basic_ifstream_wchar_is_open(const basic_ifstream_wchar
*this)
12403 TRACE("(%p)\n", this);
12404 return basic_filebuf_wchar_is_open(&this->filebuf
);
12407 /* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXPBDHH@Z */
12408 /* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBDHH@Z */
12409 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPBDHH@Z */
12410 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDHH@Z */
12411 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_open
, 16)
12412 void __thiscall
basic_ifstream_wchar_open(basic_ifstream_wchar
*this,
12413 const char *name
, int mode
, int prot
)
12415 TRACE("(%p %s %d %d)\n", this, name
, mode
, prot
);
12417 if(!basic_filebuf_wchar_open(&this->filebuf
, name
, mode
|OPENMODE_in
, prot
)) {
12418 basic_ios_wchar
*basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
);
12419 basic_ios_wchar_setstate(basic_ios
, IOSTATE_failbit
);
12423 /* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXPBDI@Z */
12424 /* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBDI@Z */
12425 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPBDI@Z */
12426 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDI@Z */
12427 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_open_old
, 12)
12428 void __thiscall
basic_ifstream_wchar_open_old(basic_ifstream_wchar
*this,
12429 const char *name
, unsigned int mode
)
12431 basic_ifstream_wchar_open(this, name
, mode
, _SH_DENYNO
);
12434 /* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXPBGHH@Z */
12435 /* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBGHH@Z */
12436 /* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXPB_WHH@Z */
12437 /* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEB_WHH@Z */
12438 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPBGHH@Z */
12439 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEBGHH@Z */
12440 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPB_WHH@Z */
12441 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEB_WHH@Z */
12442 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_open_wchar
, 16)
12443 void __thiscall
basic_ifstream_wchar_open_wchar(basic_ifstream_wchar
*this,
12444 const wchar_t *name
, int mode
, int prot
)
12446 TRACE("(%p %s %d %d)\n", this, debugstr_w(name
), mode
, prot
);
12448 if(!basic_filebuf_wchar_open_wchar(&this->filebuf
, name
, mode
|OPENMODE_in
, prot
)) {
12449 basic_ios_wchar
*basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
);
12450 basic_ios_wchar_setstate(basic_ios
, IOSTATE_failbit
);
12454 /* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXPBGI@Z */
12455 /* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBGI@Z */
12456 /* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXPB_WI@Z */
12457 /* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEB_WI@Z */
12458 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPBGI@Z */
12459 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEBGI@Z */
12460 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPB_WI@Z */
12461 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEB_WI@Z */
12462 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_open_wchar_old
, 12)
12463 void __thiscall
basic_ifstream_wchar_open_wchar_old(basic_ifstream_wchar
*this,
12464 const wchar_t *name
, unsigned int mode
)
12466 basic_ifstream_wchar_open_wchar(this, name
, mode
, _SH_DENYNO
);
12469 /* ?rdbuf@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
12470 /* ?rdbuf@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
12471 /* ?rdbuf@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
12472 /* ?rdbuf@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
12473 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_rdbuf
, 4)
12474 basic_filebuf_wchar
* __thiscall
basic_ifstream_wchar_rdbuf(const basic_ifstream_wchar
*this)
12476 TRACE("(%p)\n", this);
12477 return (basic_filebuf_wchar
*)&this->filebuf
;
12480 static inline basic_ios_char
* basic_fstream_char_to_basic_ios(basic_fstream_char
*ptr
)
12482 return (basic_ios_char
*)((char*)ptr
+basic_fstream_char_vbtable1
[1]);
12485 static inline basic_fstream_char
* basic_fstream_char_from_basic_ios(basic_ios_char
*ptr
)
12487 return (basic_fstream_char
*)((char*)ptr
-basic_fstream_char_vbtable1
[1]);
12490 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
12491 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
12492 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor
, 8)
12493 basic_fstream_char
* __thiscall
basic_fstream_char_ctor(basic_fstream_char
*this, MSVCP_bool virt_init
)
12495 basic_ios_char
*basic_ios
;
12497 TRACE("(%p %d)\n", this, virt_init
);
12500 this->base
.base1
.vbtable
= basic_fstream_char_vbtable1
;
12501 this->base
.base2
.vbtable
= basic_fstream_char_vbtable2
;
12502 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
12503 INIT_BASIC_IOS_VTORDISP(basic_ios
);
12504 basic_ios_char_ctor(basic_ios
);
12506 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
12509 basic_filebuf_char_ctor(&this->filebuf
);
12510 basic_iostream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
);
12511 basic_ios
->base
.vtable
= &MSVCP_basic_fstream_char_vtable
;
12515 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
12516 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
12517 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_file
, 12)
12518 basic_fstream_char
* __thiscall
basic_fstream_char_ctor_file(basic_fstream_char
*this,
12519 FILE *file
, MSVCP_bool virt_init
)
12521 basic_ios_char
*basic_ios
;
12523 TRACE("(%p %p %d)\n", this, file
, virt_init
);
12526 this->base
.base1
.vbtable
= basic_fstream_char_vbtable1
;
12527 this->base
.base2
.vbtable
= basic_fstream_char_vbtable2
;
12528 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
12529 INIT_BASIC_IOS_VTORDISP(basic_ios
);
12530 basic_ios_char_ctor(basic_ios
);
12532 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
12535 basic_filebuf_char_ctor_file(&this->filebuf
, file
);
12536 basic_iostream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
);
12537 basic_ios
->base
.vtable
= &MSVCP_basic_fstream_char_vtable
;
12541 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PBDHH@Z */
12542 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDHH@Z */
12543 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_name
, 20)
12544 basic_fstream_char
* __thiscall
basic_fstream_char_ctor_name(basic_fstream_char
*this,
12545 const char *name
, int mode
, int prot
, MSVCP_bool virt_init
)
12547 TRACE("(%p %s %d %d %d)\n", this, name
, mode
, prot
, virt_init
);
12549 basic_fstream_char_ctor(this, virt_init
);
12551 if(!basic_filebuf_char_open(&this->filebuf
, name
, mode
, prot
)) {
12552 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
12553 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
12558 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PBDH@Z */
12559 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDH@Z */
12560 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_name_noprot
, 16)
12561 basic_fstream_char
* __thiscall
basic_fstream_char_ctor_name_noprot(basic_fstream_char
*this,
12562 const char *name
, int mode
, MSVCP_bool virt_init
)
12564 return basic_fstream_char_ctor_name(this, name
, mode
, _SH_DENYNO
, virt_init
);
12567 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PBGHH@Z */
12568 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEBGHH@Z */
12569 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PB_WHH@Z */
12570 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEB_WHH@Z */
12571 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_name_wchar
, 20)
12572 basic_fstream_char
* __thiscall
basic_fstream_char_ctor_name_wchar(basic_fstream_char
*this,
12573 const wchar_t *name
, int mode
, int prot
, MSVCP_bool virt_init
)
12575 TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name
), mode
, prot
, virt_init
);
12577 basic_fstream_char_ctor(this, virt_init
);
12579 if(!basic_filebuf_char_open_wchar(&this->filebuf
, name
, mode
, prot
)) {
12580 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
12581 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
12586 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
12587 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
12588 DEFINE_THISCALL_WRAPPER(basic_fstream_char_dtor
, 4)
12589 void __thiscall
basic_fstream_char_dtor(basic_ios_char
*base
)
12591 basic_fstream_char
*this = basic_fstream_char_from_basic_ios(base
);
12593 TRACE("(%p)\n", this);
12595 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base
));
12596 basic_filebuf_char_dtor(&this->filebuf
);
12599 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
12600 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
12601 DEFINE_THISCALL_WRAPPER(basic_fstream_char_vbase_dtor
, 4)
12602 void __thiscall
basic_fstream_char_vbase_dtor(basic_fstream_char
*this)
12604 basic_ios_char
*base
= basic_fstream_char_to_basic_ios(this);
12606 TRACE("(%p)\n", this);
12608 basic_fstream_char_dtor(base
);
12609 basic_ios_char_dtor(base
);
12612 DEFINE_THISCALL_WRAPPER(basic_fstream_char_vector_dtor
, 8)
12613 basic_fstream_char
* __thiscall
basic_fstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
12615 basic_fstream_char
*this = basic_fstream_char_from_basic_ios(base
);
12617 TRACE("(%p %x)\n", this, flags
);
12620 /* we have an array, with the number of elements stored before the first object */
12621 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
12623 for(i
=*ptr
-1; i
>=0; i
--)
12624 basic_fstream_char_vbase_dtor(this+i
);
12625 MSVCRT_operator_delete(ptr
);
12627 basic_fstream_char_vbase_dtor(this);
12629 MSVCRT_operator_delete(this);
12635 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
12636 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
12637 DEFINE_THISCALL_WRAPPER(basic_fstream_char_close
, 4)
12638 void __thiscall
basic_fstream_char_close(basic_fstream_char
*this)
12640 TRACE("(%p)\n", this);
12642 if(!basic_filebuf_char_close(&this->filebuf
)) {
12643 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
12644 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
12648 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
12649 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
12650 DEFINE_THISCALL_WRAPPER(basic_fstream_char_is_open
, 4)
12651 MSVCP_bool __thiscall
basic_fstream_char_is_open(const basic_fstream_char
*this)
12653 TRACE("(%p)\n", this);
12654 return basic_filebuf_char_is_open(&this->filebuf
);
12657 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDHH@Z */
12658 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDHH@Z */
12659 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open
, 16)
12660 void __thiscall
basic_fstream_char_open(basic_fstream_char
*this,
12661 const char *name
, int mode
, int prot
)
12663 TRACE("(%p %s %d %d)\n", this, name
, mode
, prot
);
12665 if(!basic_filebuf_char_open(&this->filebuf
, name
, mode
, prot
)) {
12666 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
12667 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
12671 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDI@Z */
12672 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDI@Z */
12673 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_old
, 12)
12674 void __thiscall
basic_fstream_char_open_old(basic_fstream_char
*this,
12675 const char *name
, unsigned int mode
)
12677 basic_fstream_char_open(this, name
, mode
, _SH_DENYNO
);
12680 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBGHH@Z */
12681 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGHH@Z */
12682 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPB_WHH@Z */
12683 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WHH@Z */
12684 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_wchar
, 16)
12685 void __thiscall
basic_fstream_char_open_wchar(basic_fstream_char
*this,
12686 const wchar_t *name
, int mode
, int prot
)
12688 TRACE("(%p %s %d %d)\n", this, debugstr_w(name
), mode
, prot
);
12690 if(!basic_filebuf_char_open_wchar(&this->filebuf
, name
, mode
, prot
)) {
12691 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
12692 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
12696 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBGI@Z */
12697 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGI@Z */
12698 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPB_WI@Z */
12699 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WI@Z */
12700 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_wchar_old
, 12)
12701 void __thiscall
basic_fstream_char_open_wchar_old(basic_fstream_char
*this,
12702 const wchar_t *name
, unsigned int mode
)
12704 basic_fstream_char_open_wchar(this, name
, mode
, _SH_DENYNO
);
12707 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
12708 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
12709 DEFINE_THISCALL_WRAPPER(basic_fstream_char_rdbuf
, 4)
12710 basic_filebuf_char
* __thiscall
basic_fstream_char_rdbuf(const basic_fstream_char
*this)
12712 TRACE("(%p)\n", this);
12713 return (basic_filebuf_char
*)&this->filebuf
;
12716 static inline basic_ios_wchar
* basic_fstream_wchar_to_basic_ios(basic_fstream_wchar
*ptr
)
12718 return (basic_ios_wchar
*)((char*)ptr
+basic_fstream_wchar_vbtable1
[1]);
12721 static inline basic_fstream_wchar
* basic_fstream_wchar_from_basic_ios(basic_ios_wchar
*ptr
)
12723 return (basic_fstream_wchar
*)((char*)ptr
-basic_fstream_wchar_vbtable1
[1]);
12726 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@XZ */
12727 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@XZ */
12728 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_ctor
, 8)
12729 basic_fstream_wchar
* __thiscall
basic_fstream_wchar_ctor(basic_fstream_wchar
*this, MSVCP_bool virt_init
)
12731 basic_ios_wchar
*basic_ios
;
12733 TRACE("(%p %d)\n", this, virt_init
);
12736 this->base
.base1
.vbtable
= basic_fstream_wchar_vbtable1
;
12737 this->base
.base2
.vbtable
= basic_fstream_wchar_vbtable2
;
12738 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
.base1
);
12739 INIT_BASIC_IOS_VTORDISP(basic_ios
);
12740 basic_ios_wchar_ctor(basic_ios
);
12742 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
.base1
);
12745 basic_filebuf_wchar_ctor(&this->filebuf
);
12746 basic_iostream_wchar_ctor(&this->base
, &this->filebuf
.base
, FALSE
);
12747 basic_ios
->base
.vtable
= &MSVCP_basic_fstream_wchar_vtable
;
12751 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
12752 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
12753 DEFINE_THISCALL_WRAPPER(basic_fstream_short_ctor
, 8)
12754 basic_fstream_wchar
* __thiscall
basic_fstream_short_ctor(basic_fstream_wchar
*this, MSVCP_bool virt_init
)
12756 basic_fstream_wchar_ctor(this, virt_init
);
12757 basic_istream_wchar_get_basic_ios(&this->base
.base1
)->base
.vtable
= &MSVCP_basic_fstream_short_vtable
;
12761 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
12762 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
12763 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_ctor_file
, 12)
12764 basic_fstream_wchar
* __thiscall
basic_fstream_wchar_ctor_file(basic_fstream_wchar
*this,
12765 FILE *file
, MSVCP_bool virt_init
)
12767 basic_ios_wchar
*basic_ios
;
12769 TRACE("(%p %p %d)\n", this, file
, virt_init
);
12772 this->base
.base1
.vbtable
= basic_fstream_wchar_vbtable1
;
12773 this->base
.base2
.vbtable
= basic_fstream_wchar_vbtable2
;
12774 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
.base1
);
12775 INIT_BASIC_IOS_VTORDISP(basic_ios
);
12776 basic_ios_wchar_ctor(basic_ios
);
12778 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
.base1
);
12781 basic_filebuf_wchar_ctor_file(&this->filebuf
, file
);
12782 basic_iostream_wchar_ctor(&this->base
, &this->filebuf
.base
, FALSE
);
12783 basic_ios
->base
.vtable
= &MSVCP_basic_fstream_wchar_vtable
;
12787 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
12788 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
12789 DEFINE_THISCALL_WRAPPER(basic_fstream_short_ctor_file
, 12)
12790 basic_fstream_wchar
* __thiscall
basic_fstream_short_ctor_file(basic_fstream_wchar
*this,
12791 FILE *file
, MSVCP_bool virt_init
)
12793 basic_fstream_wchar_ctor_file(this, file
, virt_init
);
12794 basic_istream_wchar_get_basic_ios(&this->base
.base1
)->base
.vtable
= &MSVCP_basic_fstream_short_vtable
;
12798 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@PB_WHH@Z */
12799 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEB_WHH@Z */
12800 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_ctor_name
, 20)
12801 basic_fstream_wchar
* __thiscall
basic_fstream_wchar_ctor_name(basic_fstream_wchar
*this,
12802 const char *name
, int mode
, int prot
, MSVCP_bool virt_init
)
12804 TRACE("(%p %s %d %d %d)\n", this, name
, mode
, prot
, virt_init
);
12806 basic_fstream_wchar_ctor(this, virt_init
);
12808 if(!basic_filebuf_wchar_open(&this->filebuf
, name
, mode
, prot
)) {
12809 basic_ios_wchar
*basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
.base1
);
12810 basic_ios_wchar_setstate(basic_ios
, IOSTATE_failbit
);
12815 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@PBGHH@Z */
12816 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@PEBGHH@Z */
12817 DEFINE_THISCALL_WRAPPER(basic_fstream_short_ctor_name
, 20)
12818 basic_fstream_wchar
* __thiscall
basic_fstream_short_ctor_name(basic_fstream_wchar
*this,
12819 const char *name
, int mode
, int prot
, MSVCP_bool virt_init
)
12821 basic_fstream_wchar_ctor_name(this, name
, mode
, prot
, virt_init
);
12822 basic_istream_wchar_get_basic_ios(&this->base
.base1
)->base
.vtable
= &MSVCP_basic_fstream_short_vtable
;
12826 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@PBDH@Z */
12827 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_ctor_name_noprot
, 16)
12828 basic_fstream_wchar
* __thiscall
basic_fstream_wchar_ctor_name_noprot(basic_fstream_wchar
*this,
12829 const char *name
, int mode
, MSVCP_bool virt_init
)
12831 return basic_fstream_wchar_ctor_name(this, name
, mode
, _SH_DENYNO
, virt_init
);
12834 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@PBDH@Z */
12835 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@PEBDH@Z */
12836 DEFINE_THISCALL_WRAPPER(basic_fstream_short_ctor_name_noprot
, 16)
12837 basic_fstream_wchar
* __thiscall
basic_fstream_short_ctor_name_noprot(basic_fstream_wchar
*this,
12838 const char *name
, int mode
, MSVCP_bool virt_init
)
12840 return basic_fstream_short_ctor_name(this, name
, mode
, _SH_DENYNO
, virt_init
);
12843 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@PBGHH@Z */
12844 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEBGHH@Z */
12845 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@PB_WHH@Z */
12846 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEB_WHH@Z */
12847 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_ctor_name_wchar
, 20)
12848 basic_fstream_wchar
* __thiscall
basic_fstream_wchar_ctor_name_wchar(basic_fstream_wchar
*this,
12849 const wchar_t *name
, int mode
, int prot
, MSVCP_bool virt_init
)
12851 TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name
), mode
, prot
, virt_init
);
12853 basic_fstream_wchar_ctor(this, virt_init
);
12855 if(!basic_filebuf_wchar_open_wchar(&this->filebuf
, name
, mode
, prot
)) {
12856 basic_ios_wchar
*basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
.base1
);
12857 basic_ios_wchar_setstate(basic_ios
, IOSTATE_failbit
);
12862 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@PBGHH@Z */
12863 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@PEBGHH@Z */
12864 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@PB_WHH@Z */
12865 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@PEB_WHH@Z */
12866 DEFINE_THISCALL_WRAPPER(basic_fstream_short_ctor_name_wchar
, 20)
12867 basic_fstream_wchar
* __thiscall
basic_fstream_short_ctor_name_wchar(basic_fstream_wchar
*this,
12868 const wchar_t *name
, int mode
, int prot
, MSVCP_bool virt_init
)
12870 basic_fstream_wchar_ctor_name_wchar(this, name
, mode
, prot
, virt_init
);
12871 basic_istream_wchar_get_basic_ios(&this->base
.base1
)->base
.vtable
= &MSVCP_basic_fstream_short_vtable
;
12875 /* ??1?$basic_fstream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
12876 /* ??1?$basic_fstream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
12877 /* ??1?$basic_fstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
12878 /* ??1?$basic_fstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
12879 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_dtor
, 4)
12880 void __thiscall
basic_fstream_wchar_dtor(basic_ios_wchar
*base
)
12882 basic_fstream_wchar
*this = basic_fstream_wchar_from_basic_ios(base
);
12884 TRACE("(%p)\n", this);
12886 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(&this->base
));
12887 basic_filebuf_wchar_dtor(&this->filebuf
);
12890 /* ??_D?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
12891 /* ??_D?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
12892 /* ??_D?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
12893 /* ??_D?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
12894 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_vbase_dtor
, 4)
12895 void __thiscall
basic_fstream_wchar_vbase_dtor(basic_fstream_wchar
*this)
12897 basic_ios_wchar
*base
= basic_fstream_wchar_to_basic_ios(this);
12899 TRACE("(%p)\n", this);
12901 basic_fstream_wchar_dtor(base
);
12902 basic_ios_wchar_dtor(base
);
12905 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_vector_dtor
, 8)
12906 basic_fstream_wchar
* __thiscall
basic_fstream_wchar_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
12908 basic_fstream_wchar
*this = basic_fstream_wchar_from_basic_ios(base
);
12910 TRACE("(%p %x)\n", this, flags
);
12913 /* we have an array, with the number of elements stored before the first object */
12914 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
12916 for(i
=*ptr
-1; i
>=0; i
--)
12917 basic_fstream_wchar_vbase_dtor(this+i
);
12918 MSVCRT_operator_delete(ptr
);
12920 basic_fstream_wchar_vbase_dtor(this);
12922 MSVCRT_operator_delete(this);
12928 /* ?close@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
12929 /* ?close@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
12930 /* ?close@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
12931 /* ?close@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
12932 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_close
, 4)
12933 void __thiscall
basic_fstream_wchar_close(basic_fstream_wchar
*this)
12935 TRACE("(%p)\n", this);
12937 if(!basic_filebuf_wchar_close(&this->filebuf
)) {
12938 basic_ios_wchar
*basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
.base1
);
12939 basic_ios_wchar_setstate(basic_ios
, IOSTATE_failbit
);
12943 /* ?is_open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
12944 /* ?is_open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
12945 /* ?is_open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
12946 /* ?is_open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
12947 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_is_open
, 4)
12948 MSVCP_bool __thiscall
basic_fstream_wchar_is_open(const basic_fstream_wchar
*this)
12950 TRACE("(%p)\n", this);
12951 return basic_filebuf_wchar_is_open(&this->filebuf
);
12954 /* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXPBDHH@Z */
12955 /* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBDHH@Z */
12956 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXPBDHH@Z */
12957 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDHH@Z */
12958 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_open
, 16)
12959 void __thiscall
basic_fstream_wchar_open(basic_fstream_wchar
*this,
12960 const char *name
, int mode
, int prot
)
12962 TRACE("(%p %s %d %d)\n", this, name
, mode
, prot
);
12964 if(!basic_filebuf_wchar_open(&this->filebuf
, name
, mode
, prot
)) {
12965 basic_ios_wchar
*basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
.base1
);
12966 basic_ios_wchar_setstate(basic_ios
, IOSTATE_failbit
);
12970 /* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXPBDI@Z */
12971 /* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBDI@Z */
12972 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXPBDI@Z */
12973 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDI@Z */
12974 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_open_old
, 12)
12975 void __thiscall
basic_fstream_wchar_open_old(basic_fstream_wchar
*this,
12976 const char *name
, unsigned int mode
)
12978 basic_fstream_wchar_open(this, name
, mode
, _SH_DENYNO
);
12981 /* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXPBGHH@Z */
12982 /* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBGHH@Z */
12983 /* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXPB_WHH@Z */
12984 /* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEB_WHH@Z */
12985 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXPBGHH@Z */
12986 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXPEBGHH@Z */
12987 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXPB_WHH@Z */
12988 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXPEB_WHH@Z */
12989 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_open_wchar
, 16)
12990 void __thiscall
basic_fstream_wchar_open_wchar(basic_fstream_wchar
*this,
12991 const wchar_t *name
, int mode
, int prot
)
12993 TRACE("(%p %s %d %d)\n", this, debugstr_w(name
), mode
, prot
);
12995 if(!basic_filebuf_wchar_open_wchar(&this->filebuf
, name
, mode
, prot
)) {
12996 basic_ios_wchar
*basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
.base1
);
12997 basic_ios_wchar_setstate(basic_ios
, IOSTATE_failbit
);
13001 /* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXPBGI@Z */
13002 /* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBGI@Z */
13003 /* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXPB_WI@Z */
13004 /* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEB_WI@Z */
13005 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXPBGI@Z */
13006 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXPEBGI@Z */
13007 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXPB_WI@Z */
13008 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXPEB_WI@Z */
13009 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_open_wchar_old
, 12)
13010 void __thiscall
basic_fstream_wchar_open_wchar_old(basic_fstream_wchar
*this,
13011 const wchar_t *name
, unsigned int mode
)
13013 basic_fstream_wchar_open_wchar(this, name
, mode
, _SH_DENYNO
);
13016 /* ?rdbuf@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
13017 /* ?rdbuf@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
13018 /* ?rdbuf@?$basic_fstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
13019 /* ?rdbuf@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
13020 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_rdbuf
, 4)
13021 basic_filebuf_wchar
* __thiscall
basic_fstream_wchar_rdbuf(const basic_fstream_wchar
*this)
13023 TRACE("(%p)\n", this);
13024 return (basic_filebuf_wchar
*)&this->filebuf
;
13027 static inline basic_ios_char
* basic_ostringstream_char_to_basic_ios(basic_ostringstream_char
*ptr
)
13029 return (basic_ios_char
*)((char*)ptr
+basic_ostringstream_char_vbtable
[1]);
13032 static inline basic_ostringstream_char
* basic_ostringstream_char_from_basic_ios(basic_ios_char
*ptr
)
13034 return (basic_ostringstream_char
*)((char*)ptr
-basic_ostringstream_char_vbtable
[1]);
13037 /* ??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 */
13038 /* ??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 */
13039 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor_str
, 16)
13040 basic_ostringstream_char
* __thiscall
basic_ostringstream_char_ctor_str(basic_ostringstream_char
*this,
13041 const basic_string_char
*str
, int mode
, MSVCP_bool virt_init
)
13043 basic_ios_char
*basic_ios
;
13045 TRACE("(%p %p %d %d)\n", this, str
, mode
, virt_init
);
13048 this->base
.vbtable
= basic_ostringstream_char_vbtable
;
13049 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
13050 INIT_BASIC_IOS_VTORDISP(basic_ios
);
13051 basic_ios_char_ctor(basic_ios
);
13053 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
13056 basic_stringbuf_char_ctor_str(&this->strbuf
, str
, mode
|OPENMODE_out
);
13057 basic_ostream_char_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
13058 basic_ios
->base
.vtable
= &MSVCP_basic_ostringstream_char_vtable
;
13062 /* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
13063 /* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
13064 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor_mode
, 12)
13065 basic_ostringstream_char
* __thiscall
basic_ostringstream_char_ctor_mode(
13066 basic_ostringstream_char
*this, int mode
, MSVCP_bool virt_init
)
13068 basic_ios_char
*basic_ios
;
13070 TRACE("(%p %d %d)\n", this, mode
, virt_init
);
13073 this->base
.vbtable
= basic_ostringstream_char_vbtable
;
13074 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
13075 INIT_BASIC_IOS_VTORDISP(basic_ios
);
13076 basic_ios_char_ctor(basic_ios
);
13078 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
13081 basic_stringbuf_char_ctor_mode(&this->strbuf
, mode
|OPENMODE_out
);
13082 basic_ostream_char_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
13083 basic_ios
->base
.vtable
= &MSVCP_basic_ostringstream_char_vtable
;
13087 /* ??_F?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
13088 /* ??_F?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
13089 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor
, 4)
13090 basic_ostringstream_char
* __thiscall
basic_ostringstream_char_ctor(
13091 basic_ostringstream_char
*this)
13093 return basic_ostringstream_char_ctor_mode(this, 0, TRUE
);
13096 /* ??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
13097 /* ??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
13098 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_dtor
, 4)
13099 void __thiscall
basic_ostringstream_char_dtor(basic_ios_char
*base
)
13101 basic_ostringstream_char
*this = basic_ostringstream_char_from_basic_ios(base
);
13103 TRACE("(%p)\n", this);
13105 basic_stringbuf_char_dtor(&this->strbuf
);
13106 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base
));
13109 /* ??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
13110 /* ??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
13111 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_vbase_dtor
, 4)
13112 void __thiscall
basic_ostringstream_char_vbase_dtor(basic_ostringstream_char
*this)
13114 basic_ios_char
*base
= basic_ostringstream_char_to_basic_ios(this);
13116 TRACE("(%p)\n", this);
13118 basic_ostringstream_char_dtor(base
);
13119 basic_ios_char_dtor(base
);
13122 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_vector_dtor
, 8)
13123 basic_ostringstream_char
* __thiscall
basic_ostringstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
13125 basic_ostringstream_char
*this = basic_ostringstream_char_from_basic_ios(base
);
13127 TRACE("(%p %x)\n", this, flags
);
13130 /* we have an array, with the number of elements stored before the first object */
13131 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
13133 for(i
=*ptr
-1; i
>=0; i
--)
13134 basic_ostringstream_char_vbase_dtor(this+i
);
13135 MSVCRT_operator_delete(ptr
);
13137 basic_ostringstream_char_vbase_dtor(this);
13139 MSVCRT_operator_delete(this);
13145 /* ?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 */
13146 /* ?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 */
13147 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_rdbuf
, 4)
13148 basic_stringbuf_char
* __thiscall
basic_ostringstream_char_rdbuf(const basic_ostringstream_char
*this)
13150 TRACE("(%p)\n", this);
13151 return (basic_stringbuf_char
*)&this->strbuf
;
13154 /* ?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 */
13155 /* ?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 */
13156 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_str_set
, 8)
13157 void __thiscall
basic_ostringstream_char_str_set(basic_ostringstream_char
*this, const basic_string_char
*str
)
13159 TRACE("(%p %p)\n", this, str
);
13160 basic_stringbuf_char_str_set(&this->strbuf
, str
);
13163 /* ?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 */
13164 /* ?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 */
13165 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_str_get
, 8)
13166 basic_string_char
* __thiscall
basic_ostringstream_char_str_get(const basic_ostringstream_char
*this, basic_string_char
*ret
)
13168 TRACE("(%p %p)\n", this, ret
);
13169 return basic_stringbuf_char_str_get(&this->strbuf
, ret
);
13172 static inline basic_ios_wchar
* basic_ostringstream_wchar_to_basic_ios(basic_ostringstream_wchar
*ptr
)
13174 return (basic_ios_wchar
*)((char*)ptr
+basic_ostringstream_wchar_vbtable
[1]);
13177 static inline basic_ostringstream_wchar
* basic_ostringstream_wchar_from_basic_ios(basic_ios_wchar
*ptr
)
13179 return (basic_ostringstream_wchar
*)((char*)ptr
-basic_ostringstream_wchar_vbtable
[1]);
13182 /* ??0?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@1@H@Z */
13183 /* ??0?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@1@H@Z */
13184 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_ctor_str
, 16)
13185 basic_ostringstream_wchar
* __thiscall
basic_ostringstream_wchar_ctor_str(basic_ostringstream_wchar
*this,
13186 const basic_string_wchar
*str
, int mode
, MSVCP_bool virt_init
)
13188 basic_ios_wchar
*basic_ios
;
13190 TRACE("(%p %p %d %d)\n", this, str
, mode
, virt_init
);
13193 this->base
.vbtable
= basic_ostringstream_wchar_vbtable
;
13194 basic_ios
= basic_ostream_wchar_get_basic_ios(&this->base
);
13195 INIT_BASIC_IOS_VTORDISP(basic_ios
);
13196 basic_ios_wchar_ctor(basic_ios
);
13198 basic_ios
= basic_ostream_wchar_get_basic_ios(&this->base
);
13201 basic_stringbuf_wchar_ctor_str(&this->strbuf
, str
, mode
|OPENMODE_out
);
13202 basic_ostream_wchar_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
13203 basic_ios
->base
.vtable
= &MSVCP_basic_ostringstream_wchar_vtable
;
13207 /* ??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 */
13208 /* ??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 */
13209 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor_str
, 16)
13210 basic_ostringstream_wchar
* __thiscall
basic_ostringstream_short_ctor_str(basic_ostringstream_wchar
*this,
13211 const basic_string_wchar
*str
, int mode
, MSVCP_bool virt_init
)
13213 basic_ostringstream_wchar_ctor_str(this, str
, mode
, virt_init
);
13214 basic_ostream_wchar_get_basic_ios(&this->base
)->base
.vtable
= &MSVCP_basic_ostringstream_short_vtable
;
13218 /* ??0?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
13219 /* ??0?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
13220 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_ctor_mode
, 12)
13221 basic_ostringstream_wchar
* __thiscall
basic_ostringstream_wchar_ctor_mode(
13222 basic_ostringstream_wchar
*this, int mode
, MSVCP_bool virt_init
)
13224 basic_ios_wchar
*basic_ios
;
13226 TRACE("(%p %d %d)\n", this, mode
, virt_init
);
13229 this->base
.vbtable
= basic_ostringstream_wchar_vbtable
;
13230 basic_ios
= basic_ostream_wchar_get_basic_ios(&this->base
);
13231 INIT_BASIC_IOS_VTORDISP(basic_ios
);
13232 basic_ios_wchar_ctor(basic_ios
);
13234 basic_ios
= basic_ostream_wchar_get_basic_ios(&this->base
);
13237 basic_stringbuf_wchar_ctor_mode(&this->strbuf
, mode
|OPENMODE_out
);
13238 basic_ostream_wchar_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
13239 basic_ios
->base
.vtable
= &MSVCP_basic_ostringstream_wchar_vtable
;
13243 /* ??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
13244 /* ??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
13245 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor_mode
, 12)
13246 basic_ostringstream_wchar
* __thiscall
basic_ostringstream_short_ctor_mode(
13247 basic_ostringstream_wchar
*this, int mode
, MSVCP_bool virt_init
)
13249 basic_ostringstream_wchar_ctor_mode(this, mode
, virt_init
);
13250 basic_ostream_wchar_get_basic_ios(&this->base
)->base
.vtable
= &MSVCP_basic_ostringstream_short_vtable
;
13254 /* ??_F?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
13255 /* ??_F?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
13256 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_ctor
, 4)
13257 basic_ostringstream_wchar
* __thiscall
basic_ostringstream_wchar_ctor(
13258 basic_ostringstream_wchar
*this)
13260 return basic_ostringstream_wchar_ctor_mode(this, 0, TRUE
);
13263 /* ??_F?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
13264 /* ??_F?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
13265 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor
, 4)
13266 basic_ostringstream_wchar
* __thiscall
basic_ostringstream_short_ctor(
13267 basic_ostringstream_wchar
*this)
13269 return basic_ostringstream_short_ctor_mode(this, 0, TRUE
);
13272 /* ??1?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
13273 /* ??1?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
13274 /* ??1?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
13275 /* ??1?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
13276 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_dtor
, 4)
13277 void __thiscall
basic_ostringstream_wchar_dtor(basic_ios_wchar
*base
)
13279 basic_ostringstream_wchar
*this = basic_ostringstream_wchar_from_basic_ios(base
);
13281 TRACE("(%p)\n", this);
13283 basic_stringbuf_wchar_dtor(&this->strbuf
);
13284 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base
));
13287 /* ??_D?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
13288 /* ??_D?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
13289 /* ??_D?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
13290 /* ??_D?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
13291 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_vbase_dtor
, 4)
13292 void __thiscall
basic_ostringstream_wchar_vbase_dtor(basic_ostringstream_wchar
*this)
13294 basic_ios_wchar
*base
= basic_ostringstream_wchar_to_basic_ios(this);
13296 TRACE("(%p)\n", this);
13298 basic_ostringstream_wchar_dtor(base
);
13299 basic_ios_wchar_dtor(base
);
13302 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_vector_dtor
, 8)
13303 basic_ostringstream_wchar
* __thiscall
basic_ostringstream_wchar_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
13305 basic_ostringstream_wchar
*this = basic_ostringstream_wchar_from_basic_ios(base
);
13307 TRACE("(%p %x)\n", this, flags
);
13310 /* we have an array, with the number of elements stored before the first object */
13311 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
13313 for(i
=*ptr
-1; i
>=0; i
--)
13314 basic_ostringstream_wchar_vbase_dtor(this+i
);
13315 MSVCRT_operator_delete(ptr
);
13317 basic_ostringstream_wchar_vbase_dtor(this);
13319 MSVCRT_operator_delete(this);
13325 /* ?rdbuf@?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEPAV?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
13326 /* ?rdbuf@?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAPEAV?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
13327 /* ?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 */
13328 /* ?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 */
13329 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_rdbuf
, 4)
13330 basic_stringbuf_wchar
* __thiscall
basic_ostringstream_wchar_rdbuf(const basic_ostringstream_wchar
*this)
13332 TRACE("(%p)\n", this);
13333 return (basic_stringbuf_wchar
*)&this->strbuf
;
13336 /* ?str@?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z */
13337 /* ?str@?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z */
13338 /* ?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 */
13339 /* ?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 */
13340 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_str_set
, 8)
13341 void __thiscall
basic_ostringstream_wchar_str_set(basic_ostringstream_wchar
*this, const basic_string_wchar
*str
)
13343 TRACE("(%p %p)\n", this, str
);
13344 basic_stringbuf_wchar_str_set(&this->strbuf
, str
);
13347 /* ?str@?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
13348 /* ?str@?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
13349 /* ?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 */
13350 /* ?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 */
13351 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_str_get
, 8)
13352 basic_string_wchar
* __thiscall
basic_ostringstream_wchar_str_get(const basic_ostringstream_wchar
*this, basic_string_wchar
*ret
)
13354 TRACE("(%p %p)\n", this, ret
);
13355 return basic_stringbuf_wchar_str_get(&this->strbuf
, ret
);
13358 static inline basic_ios_char
* basic_istringstream_char_to_basic_ios(basic_istringstream_char
*ptr
)
13360 return (basic_ios_char
*)((char*)ptr
+basic_istringstream_char_vbtable
[1]);
13363 static inline basic_istringstream_char
* basic_istringstream_char_from_basic_ios(basic_ios_char
*ptr
)
13365 return (basic_istringstream_char
*)((char*)ptr
-basic_istringstream_char_vbtable
[1]);
13368 /* ??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 */
13369 /* ??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 */
13370 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor_str
, 16)
13371 basic_istringstream_char
* __thiscall
basic_istringstream_char_ctor_str(basic_istringstream_char
*this,
13372 const basic_string_char
*str
, int mode
, MSVCP_bool virt_init
)
13374 basic_ios_char
*basic_ios
;
13376 TRACE("(%p %p %d %d)\n", this, str
, mode
, virt_init
);
13379 this->base
.vbtable
= basic_istringstream_char_vbtable
;
13380 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
13381 INIT_BASIC_IOS_VTORDISP(basic_ios
);
13382 basic_ios_char_ctor(basic_ios
);
13384 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
13387 basic_stringbuf_char_ctor_str(&this->strbuf
, str
, mode
|OPENMODE_in
);
13388 basic_istream_char_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
13389 basic_ios
->base
.vtable
= &MSVCP_basic_istringstream_char_vtable
;
13393 /* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
13394 /* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
13395 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor_mode
, 12)
13396 basic_istringstream_char
* __thiscall
basic_istringstream_char_ctor_mode(
13397 basic_istringstream_char
*this, int mode
, MSVCP_bool virt_init
)
13399 basic_ios_char
*basic_ios
;
13401 TRACE("(%p %d %d)\n", this, mode
, virt_init
);
13404 this->base
.vbtable
= basic_istringstream_char_vbtable
;
13405 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
13406 INIT_BASIC_IOS_VTORDISP(basic_ios
);
13407 basic_ios_char_ctor(basic_ios
);
13409 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
13412 basic_stringbuf_char_ctor_mode(&this->strbuf
, mode
|OPENMODE_in
);
13413 basic_istream_char_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
13414 basic_ios
->base
.vtable
= &MSVCP_basic_istringstream_char_vtable
;
13418 /* ??_F?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
13419 /* ??_F?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
13420 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor
, 4)
13421 basic_istringstream_char
* __thiscall
basic_istringstream_char_ctor(
13422 basic_istringstream_char
*this)
13424 return basic_istringstream_char_ctor_mode(this, 0, TRUE
);
13427 /* ??1?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
13428 /* ??1?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
13429 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_dtor
, 4)
13430 void __thiscall
basic_istringstream_char_dtor(basic_ios_char
*base
)
13432 basic_istringstream_char
*this = basic_istringstream_char_from_basic_ios(base
);
13434 TRACE("(%p)\n", this);
13436 basic_stringbuf_char_dtor(&this->strbuf
);
13437 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base
));
13440 /* ??_D?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
13441 /* ??_D?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
13442 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_vbase_dtor
, 4)
13443 void __thiscall
basic_istringstream_char_vbase_dtor(basic_istringstream_char
*this)
13445 basic_ios_char
*base
= basic_istringstream_char_to_basic_ios(this);
13447 TRACE("(%p)\n", this);
13449 basic_istringstream_char_dtor(base
);
13450 basic_ios_char_dtor(base
);
13453 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_vector_dtor
, 8)
13454 basic_istringstream_char
* __thiscall
basic_istringstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
13456 basic_istringstream_char
*this = basic_istringstream_char_from_basic_ios(base
);
13458 TRACE("(%p %x)\n", this, flags
);
13461 /* we have an array, with the number of elements stored before the first object */
13462 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
13464 for(i
=*ptr
-1; i
>=0; i
--)
13465 basic_istringstream_char_vbase_dtor(this+i
);
13466 MSVCRT_operator_delete(ptr
);
13468 basic_istringstream_char_vbase_dtor(this);
13470 MSVCRT_operator_delete(this);
13476 /* ?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 */
13477 /* ?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 */
13478 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_rdbuf
, 4)
13479 basic_stringbuf_char
* __thiscall
basic_istringstream_char_rdbuf(const basic_istringstream_char
*this)
13481 TRACE("(%p)\n", this);
13482 return (basic_stringbuf_char
*)&this->strbuf
;
13485 /* ?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 */
13486 /* ?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 */
13487 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_str_set
, 8)
13488 void __thiscall
basic_istringstream_char_str_set(basic_istringstream_char
*this, const basic_string_char
*str
)
13490 TRACE("(%p %p)\n", this, str
);
13491 basic_stringbuf_char_str_set(&this->strbuf
, str
);
13494 /* ?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 */
13495 /* ?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 */
13496 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_str_get
, 8)
13497 basic_string_char
* __thiscall
basic_istringstream_char_str_get(const basic_istringstream_char
*this, basic_string_char
*ret
)
13499 TRACE("(%p %p)\n", this, ret
);
13500 return basic_stringbuf_char_str_get(&this->strbuf
, ret
);
13503 static inline basic_ios_wchar
* basic_istringstream_wchar_to_basic_ios(basic_istringstream_wchar
*ptr
)
13505 return (basic_ios_wchar
*)((char*)ptr
+basic_istringstream_wchar_vbtable
[1]);
13508 static inline basic_istringstream_wchar
* basic_istringstream_wchar_from_basic_ios(basic_ios_wchar
*ptr
)
13510 return (basic_istringstream_wchar
*)((char*)ptr
-basic_istringstream_wchar_vbtable
[1]);
13513 /* ??0?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@1@H@Z */
13514 /* ??0?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@1@H@Z */
13515 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_ctor_str
, 16)
13516 basic_istringstream_wchar
* __thiscall
basic_istringstream_wchar_ctor_str(basic_istringstream_wchar
*this,
13517 const basic_string_wchar
*str
, int mode
, MSVCP_bool virt_init
)
13519 basic_ios_wchar
*basic_ios
;
13521 TRACE("(%p %p %d %d)\n", this, str
, mode
, virt_init
);
13524 this->base
.vbtable
= basic_istringstream_wchar_vbtable
;
13525 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
);
13526 INIT_BASIC_IOS_VTORDISP(basic_ios
);
13527 basic_ios_wchar_ctor(basic_ios
);
13529 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
);
13532 basic_stringbuf_wchar_ctor_str(&this->strbuf
, str
, mode
|OPENMODE_in
);
13533 basic_istream_wchar_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
13534 basic_ios
->base
.vtable
= &MSVCP_basic_istringstream_wchar_vtable
;
13538 /* ??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 */
13539 /* ??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 */
13540 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor_str
, 16)
13541 basic_istringstream_wchar
* __thiscall
basic_istringstream_short_ctor_str(basic_istringstream_wchar
*this,
13542 const basic_string_wchar
*str
, int mode
, MSVCP_bool virt_init
)
13544 basic_istringstream_wchar_ctor_str(this, str
, mode
, virt_init
);
13545 basic_istream_wchar_get_basic_ios(&this->base
)->base
.vtable
= &MSVCP_basic_istringstream_short_vtable
;
13549 /* ??0?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
13550 /* ??0?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
13551 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_ctor_mode
, 12)
13552 basic_istringstream_wchar
* __thiscall
basic_istringstream_wchar_ctor_mode(
13553 basic_istringstream_wchar
*this, int mode
, MSVCP_bool virt_init
)
13555 basic_ios_wchar
*basic_ios
;
13557 TRACE("(%p %d %d)\n", this, mode
, virt_init
);
13560 this->base
.vbtable
= basic_istringstream_wchar_vbtable
;
13561 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
);
13562 INIT_BASIC_IOS_VTORDISP(basic_ios
);
13563 basic_ios_wchar_ctor(basic_ios
);
13565 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
);
13568 basic_stringbuf_wchar_ctor_mode(&this->strbuf
, mode
|OPENMODE_in
);
13569 basic_istream_wchar_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
13570 basic_ios
->base
.vtable
= &MSVCP_basic_istringstream_wchar_vtable
;
13574 /* ??0?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
13575 /* ??0?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
13576 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor_mode
, 12)
13577 basic_istringstream_wchar
* __thiscall
basic_istringstream_short_ctor_mode(
13578 basic_istringstream_wchar
*this, int mode
, MSVCP_bool virt_init
)
13580 basic_istringstream_wchar_ctor_mode(this, mode
, virt_init
);
13581 basic_istream_wchar_get_basic_ios(&this->base
)->base
.vtable
= &MSVCP_basic_istringstream_short_vtable
;
13585 /* ??_F?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
13586 /* ??_F?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
13587 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_ctor
, 4)
13588 basic_istringstream_wchar
* __thiscall
basic_istringstream_wchar_ctor(
13589 basic_istringstream_wchar
*this)
13591 return basic_istringstream_wchar_ctor_mode(this, 0, TRUE
);
13594 /* ??_F?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
13595 /* ??_F?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
13596 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor
, 4)
13597 basic_istringstream_wchar
* __thiscall
basic_istringstream_short_ctor(
13598 basic_istringstream_wchar
*this)
13600 return basic_istringstream_short_ctor_mode(this, 0, TRUE
);
13603 /* ??1?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
13604 /* ??1?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
13605 /* ??1?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
13606 /* ??1?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
13607 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_dtor
, 4)
13608 void __thiscall
basic_istringstream_wchar_dtor(basic_ios_wchar
*base
)
13610 basic_istringstream_wchar
*this = basic_istringstream_wchar_from_basic_ios(base
);
13612 TRACE("(%p)\n", this);
13614 basic_stringbuf_wchar_dtor(&this->strbuf
);
13615 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base
));
13618 /* ??_D?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
13619 /* ??_D?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
13620 /* ??_D?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
13621 /* ??_D?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
13622 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_vbase_dtor
, 4)
13623 void __thiscall
basic_istringstream_wchar_vbase_dtor(basic_istringstream_wchar
*this)
13625 basic_ios_wchar
*base
= basic_istringstream_wchar_to_basic_ios(this);
13627 TRACE("(%p)\n", this);
13629 basic_istringstream_wchar_dtor(base
);
13630 basic_ios_wchar_dtor(base
);
13633 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_vector_dtor
, 8)
13634 basic_istringstream_wchar
* __thiscall
basic_istringstream_wchar_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
13636 basic_istringstream_wchar
*this = basic_istringstream_wchar_from_basic_ios(base
);
13638 TRACE("(%p %x)\n", this, flags
);
13641 /* we have an array, with the number of elements stored before the first object */
13642 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
13644 for(i
=*ptr
-1; i
>=0; i
--)
13645 basic_istringstream_wchar_vbase_dtor(this+i
);
13646 MSVCRT_operator_delete(ptr
);
13648 basic_istringstream_wchar_vbase_dtor(this);
13650 MSVCRT_operator_delete(this);
13656 /* ?rdbuf@?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEPAV?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
13657 /* ?rdbuf@?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAPEAV?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
13658 /* ?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 */
13659 /* ?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 */
13660 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_rdbuf
, 4)
13661 basic_stringbuf_wchar
* __thiscall
basic_istringstream_wchar_rdbuf(const basic_istringstream_wchar
*this)
13663 TRACE("(%p)\n", this);
13664 return (basic_stringbuf_wchar
*)&this->strbuf
;
13667 /* ?str@?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z */
13668 /* ?str@?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z */
13669 /* ?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 */
13670 /* ?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 */
13671 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_str_set
, 8)
13672 void __thiscall
basic_istringstream_wchar_str_set(basic_istringstream_wchar
*this, const basic_string_wchar
*str
)
13674 TRACE("(%p %p)\n", this, str
);
13675 basic_stringbuf_wchar_str_set(&this->strbuf
, str
);
13678 /* ?str@?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
13679 /* ?str@?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
13680 /* ?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 */
13681 /* ?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 */
13682 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_str_get
, 8)
13683 basic_string_wchar
* __thiscall
basic_istringstream_wchar_str_get(const basic_istringstream_wchar
*this, basic_string_wchar
*ret
)
13685 TRACE("(%p %p)\n", this, ret
);
13686 return basic_stringbuf_wchar_str_get(&this->strbuf
, ret
);
13689 static inline basic_ios_char
* basic_stringstream_char_to_basic_ios(basic_stringstream_char
*ptr
)
13691 return (basic_ios_char
*)((char*)ptr
+basic_stringstream_char_vbtable1
[1]);
13694 static inline basic_stringstream_char
* basic_stringstream_char_from_basic_ios(basic_ios_char
*ptr
)
13696 return (basic_stringstream_char
*)((char*)ptr
-basic_stringstream_char_vbtable1
[1]);
13699 /* ??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 */
13700 /* ??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 */
13701 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor_str
, 16)
13702 basic_stringstream_char
* __thiscall
basic_stringstream_char_ctor_str(basic_stringstream_char
*this,
13703 const basic_string_char
*str
, int mode
, MSVCP_bool virt_init
)
13705 basic_ios_char
*basic_ios
;
13707 TRACE("(%p %p %d %d)\n", this, str
, mode
, virt_init
);
13710 this->base
.base1
.vbtable
= basic_stringstream_char_vbtable1
;
13711 this->base
.base2
.vbtable
= basic_stringstream_char_vbtable2
;
13712 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
13713 INIT_BASIC_IOS_VTORDISP(basic_ios
);
13714 basic_ios_char_ctor(basic_ios
);
13716 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
13719 basic_stringbuf_char_ctor_str(&this->strbuf
, str
, mode
);
13720 basic_iostream_char_ctor(&this->base
, &this->strbuf
.base
, FALSE
);
13721 basic_ios
->base
.vtable
= &MSVCP_basic_stringstream_char_vtable
;
13725 /* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
13726 /* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
13727 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor_mode
, 12)
13728 basic_stringstream_char
* __thiscall
basic_stringstream_char_ctor_mode(
13729 basic_stringstream_char
*this, int mode
, MSVCP_bool virt_init
)
13731 basic_ios_char
*basic_ios
;
13733 TRACE("(%p %d %d)\n", this, mode
, virt_init
);
13736 this->base
.base1
.vbtable
= basic_stringstream_char_vbtable1
;
13737 this->base
.base2
.vbtable
= basic_stringstream_char_vbtable2
;
13738 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
13739 INIT_BASIC_IOS_VTORDISP(basic_ios
);
13740 basic_ios_char_ctor(basic_ios
);
13742 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
13745 basic_stringbuf_char_ctor_mode(&this->strbuf
, mode
);
13746 basic_iostream_char_ctor(&this->base
, &this->strbuf
.base
, FALSE
);
13747 basic_ios
->base
.vtable
= &MSVCP_basic_stringstream_char_vtable
;
13751 /* ??_F?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
13752 /* ??_F?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
13753 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor
, 4)
13754 basic_stringstream_char
* __thiscall
basic_stringstream_char_ctor(
13755 basic_stringstream_char
*this)
13757 return basic_stringstream_char_ctor_mode(
13758 this, OPENMODE_out
|OPENMODE_in
, TRUE
);
13761 /* ??1?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
13762 /* ??1?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
13763 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_dtor
, 4)
13764 void __thiscall
basic_stringstream_char_dtor(basic_ios_char
*base
)
13766 basic_stringstream_char
*this = basic_stringstream_char_from_basic_ios(base
);
13768 TRACE("(%p)\n", this);
13770 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base
));
13771 basic_stringbuf_char_dtor(&this->strbuf
);
13774 /* ??_D?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
13775 /* ??_D?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
13776 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_vbase_dtor
, 4)
13777 void __thiscall
basic_stringstream_char_vbase_dtor(basic_stringstream_char
*this)
13779 basic_ios_char
*base
= basic_stringstream_char_to_basic_ios(this);
13781 TRACE("(%p)\n", this);
13783 basic_stringstream_char_dtor(base
);
13784 basic_ios_char_dtor(base
);
13787 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_vector_dtor
, 8)
13788 basic_stringstream_char
* __thiscall
basic_stringstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
13790 basic_stringstream_char
*this = basic_stringstream_char_from_basic_ios(base
);
13792 TRACE("(%p %x)\n", this, flags
);
13795 /* we have an array, with the number of elements stored before the first object */
13796 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
13798 for(i
=*ptr
-1; i
>=0; i
--)
13799 basic_stringstream_char_vbase_dtor(this+i
);
13800 MSVCRT_operator_delete(ptr
);
13802 basic_stringstream_char_vbase_dtor(this);
13804 MSVCRT_operator_delete(this);
13810 /* ?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 */
13811 /* ?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 */
13812 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_rdbuf
, 4)
13813 basic_stringbuf_char
* __thiscall
basic_stringstream_char_rdbuf(const basic_stringstream_char
*this)
13815 TRACE("(%p)\n", this);
13816 return (basic_stringbuf_char
*)&this->strbuf
;
13819 /* ?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 */
13820 /* ?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 */
13821 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_str_set
, 8)
13822 void __thiscall
basic_stringstream_char_str_set(basic_stringstream_char
*this, const basic_string_char
*str
)
13824 TRACE("(%p %p)\n", this, str
);
13825 basic_stringbuf_char_str_set(&this->strbuf
, str
);
13828 /* ?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 */
13829 /* ?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 */
13830 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_str_get
, 8)
13831 basic_string_char
* __thiscall
basic_stringstream_char_str_get(const basic_stringstream_char
*this, basic_string_char
*ret
)
13833 TRACE("(%p %p)\n", this, ret
);
13834 return basic_stringbuf_char_str_get(&this->strbuf
, ret
);
13837 static inline basic_ios_wchar
* basic_stringstream_wchar_to_basic_ios(basic_stringstream_wchar
*ptr
)
13839 return (basic_ios_wchar
*)((char*)ptr
+basic_stringstream_wchar_vbtable1
[1]);
13842 static inline basic_stringstream_wchar
* basic_stringstream_wchar_from_basic_ios(basic_ios_wchar
*ptr
)
13844 return (basic_stringstream_wchar
*)((char*)ptr
-basic_stringstream_wchar_vbtable1
[1]);
13847 /* ??0?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@1@H@Z */
13848 /* ??0?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@1@H@Z */
13849 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_ctor_str
, 16)
13850 basic_stringstream_wchar
* __thiscall
basic_stringstream_wchar_ctor_str(basic_stringstream_wchar
*this,
13851 const basic_string_wchar
*str
, int mode
, MSVCP_bool virt_init
)
13853 basic_ios_wchar
*basic_ios
;
13855 TRACE("(%p %p %d %d)\n", this, str
, mode
, virt_init
);
13858 this->base
.base1
.vbtable
= basic_stringstream_wchar_vbtable1
;
13859 this->base
.base2
.vbtable
= basic_stringstream_wchar_vbtable2
;
13860 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
.base1
);
13861 INIT_BASIC_IOS_VTORDISP(basic_ios
);
13862 basic_ios_wchar_ctor(basic_ios
);
13864 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
.base1
);
13867 basic_stringbuf_wchar_ctor_str(&this->strbuf
, str
, mode
);
13868 basic_iostream_wchar_ctor(&this->base
, &this->strbuf
.base
, FALSE
);
13869 basic_ios
->base
.vtable
= &MSVCP_basic_stringstream_wchar_vtable
;
13873 /* ??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 */
13874 /* ??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 */
13875 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor_str
, 16)
13876 basic_stringstream_wchar
* __thiscall
basic_stringstream_short_ctor_str(basic_stringstream_wchar
*this,
13877 const basic_string_wchar
*str
, int mode
, MSVCP_bool virt_init
)
13879 basic_stringstream_wchar_ctor_str(this, str
, mode
, virt_init
);
13880 basic_istream_wchar_get_basic_ios(&this->base
.base1
)->base
.vtable
= &MSVCP_basic_stringstream_short_vtable
;
13884 /* ??0?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
13885 /* ??0?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
13886 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_ctor_mode
, 12)
13887 basic_stringstream_wchar
* __thiscall
basic_stringstream_wchar_ctor_mode(
13888 basic_stringstream_wchar
*this, int mode
, MSVCP_bool virt_init
)
13890 basic_ios_wchar
*basic_ios
;
13892 TRACE("(%p %d %d)\n", this, mode
, virt_init
);
13895 this->base
.base1
.vbtable
= basic_stringstream_wchar_vbtable1
;
13896 this->base
.base2
.vbtable
= basic_stringstream_wchar_vbtable2
;
13897 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
.base1
);
13898 INIT_BASIC_IOS_VTORDISP(basic_ios
);
13899 basic_ios_wchar_ctor(basic_ios
);
13901 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
.base1
);
13904 basic_stringbuf_wchar_ctor_mode(&this->strbuf
, mode
);
13905 basic_iostream_wchar_ctor(&this->base
, &this->strbuf
.base
, FALSE
);
13906 basic_ios
->base
.vtable
= &MSVCP_basic_stringstream_wchar_vtable
;
13910 /* ??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
13911 /* ??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
13912 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor_mode
, 12)
13913 basic_stringstream_wchar
* __thiscall
basic_stringstream_short_ctor_mode(
13914 basic_stringstream_wchar
*this, int mode
, MSVCP_bool virt_init
)
13916 basic_stringstream_wchar_ctor_mode(this, mode
, virt_init
);
13917 basic_istream_wchar_get_basic_ios(&this->base
.base1
)->base
.vtable
= &MSVCP_basic_stringstream_short_vtable
;
13921 /* ??_F?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
13922 /* ??_F?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
13923 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_ctor
, 4)
13924 basic_stringstream_wchar
* __thiscall
basic_stringstream_wchar_ctor(
13925 basic_stringstream_wchar
*this)
13927 return basic_stringstream_wchar_ctor_mode(
13928 this, OPENMODE_out
|OPENMODE_in
, TRUE
);
13931 /* ??_F?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
13932 /* ??_F?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
13933 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor
, 4)
13934 basic_stringstream_wchar
* __thiscall
basic_stringstream_short_ctor(
13935 basic_stringstream_wchar
*this)
13937 return basic_stringstream_short_ctor_mode(
13938 this, OPENMODE_out
|OPENMODE_in
, TRUE
);
13941 /* ??1?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
13942 /* ??1?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
13943 /* ??1?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
13944 /* ??1?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
13945 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_dtor
, 4)
13946 void __thiscall
basic_stringstream_wchar_dtor(basic_ios_wchar
*base
)
13948 basic_stringstream_wchar
*this = basic_stringstream_wchar_from_basic_ios(base
);
13950 TRACE("(%p)\n", this);
13952 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(&this->base
));
13953 basic_stringbuf_wchar_dtor(&this->strbuf
);
13956 /* ??_D?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
13957 /* ??_D?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
13958 /* ??_D?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
13959 /* ??_D?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
13960 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_vbase_dtor
, 4)
13961 void __thiscall
basic_stringstream_wchar_vbase_dtor(basic_stringstream_wchar
*this)
13963 basic_ios_wchar
*base
= basic_stringstream_wchar_to_basic_ios(this);
13965 TRACE("(%p)\n", this);
13967 basic_stringstream_wchar_dtor(base
);
13968 basic_ios_wchar_dtor(base
);
13971 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_vector_dtor
, 8)
13972 basic_stringstream_wchar
* __thiscall
basic_stringstream_wchar_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
13974 basic_stringstream_wchar
*this = basic_stringstream_wchar_from_basic_ios(base
);
13976 TRACE("(%p %x)\n", this, flags
);
13979 /* we have an array, with the number of elements stored before the first object */
13980 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
13982 for(i
=*ptr
-1; i
>=0; i
--)
13983 basic_stringstream_wchar_vbase_dtor(this+i
);
13984 MSVCRT_operator_delete(ptr
);
13986 basic_stringstream_wchar_vbase_dtor(this);
13988 MSVCRT_operator_delete(this);
13994 /* ?rdbuf@?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEPAV?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
13995 /* ?rdbuf@?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAPEAV?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
13996 /* ?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 */
13997 /* ?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 */
13998 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_rdbuf
, 4)
13999 basic_stringbuf_wchar
* __thiscall
basic_stringstream_wchar_rdbuf(const basic_stringstream_wchar
*this)
14001 TRACE("(%p)\n", this);
14002 return (basic_stringbuf_wchar
*)&this->strbuf
;
14005 /* ?str@?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z */
14006 /* ?str@?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z */
14007 /* ?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 */
14008 /* ?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 */
14009 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_str_set
, 8)
14010 void __thiscall
basic_stringstream_wchar_str_set(basic_stringstream_wchar
*this, const basic_string_wchar
*str
)
14012 TRACE("(%p %p)\n", this, str
);
14013 basic_stringbuf_wchar_str_set(&this->strbuf
, str
);
14016 /* ?str@?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
14017 /* ?str@?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
14018 /* ?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 */
14019 /* ?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 */
14020 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_str_get
, 8)
14021 basic_string_wchar
* __thiscall
basic_stringstream_wchar_str_get(const basic_stringstream_wchar
*this, basic_string_wchar
*ret
)
14023 TRACE("(%p %p)\n", this, ret
);
14024 return basic_stringbuf_wchar_str_get(&this->strbuf
, ret
);
14027 /* ?_Init@strstreambuf@std@@IAEXHPAD0H@Z */
14028 /* ?_Init@strstreambuf@std@@IEAAX_JPEAD1H@Z */
14029 #if STREAMSIZE_BITS == 64
14030 DEFINE_THISCALL_WRAPPER(strstreambuf__Init
, 24)
14032 DEFINE_THISCALL_WRAPPER(strstreambuf__Init
, 20)
14034 void __thiscall
strstreambuf__Init(strstreambuf
*this, streamsize len
, char *g
, char *p
, int mode
)
14036 TRACE("(%p %s %p %p %d)\n", this, wine_dbgstr_longlong(len
), g
, p
, mode
);
14038 this->minsize
= 32;
14039 this->endsave
= NULL
;
14040 this->strmode
= mode
;
14041 this->palloc
= NULL
;
14042 this->pfree
= NULL
;
14045 this->strmode
|= STRSTATE_Dynamic
;
14046 if(len
> this->minsize
)
14047 this->minsize
= len
;
14048 this->seekhigh
= NULL
;
14057 this->seekhigh
= g
+len
;
14058 basic_streambuf_char_setg(&this->base
, g
, g
, p
? p
: this->seekhigh
);
14060 basic_streambuf_char_setp(&this->base
, p
, this->seekhigh
);
14063 /* ??0strstreambuf@std@@QAE@PACH0@Z */
14064 /* ??0strstreambuf@std@@QEAA@PEAC_J0@Z */
14065 /* ??0strstreambuf@std@@QAE@PADH0@Z */
14066 /* ??0strstreambuf@std@@QEAA@PEAD_J0@Z */
14067 /* ??0strstreambuf@std@@QAE@PAEH0@Z */
14068 /* ??0strstreambuf@std@@QEAA@PEAE_J0@Z */
14069 #if STREAMSIZE_BITS == 64
14070 DEFINE_THISCALL_WRAPPER(strstreambuf_ctor_get_put
, 20)
14072 DEFINE_THISCALL_WRAPPER(strstreambuf_ctor_get_put
, 16)
14074 strstreambuf
* __thiscall
strstreambuf_ctor_get_put(strstreambuf
*this, char *g
, streamsize len
, char *p
)
14076 TRACE("(%p %p %s %p)\n", this, g
, wine_dbgstr_longlong(len
), p
);
14078 basic_streambuf_char_ctor(&this->base
);
14079 this->base
.vtable
= &MSVCP_strstreambuf_vtable
;
14081 strstreambuf__Init(this, len
, g
, p
, 0);
14085 /* ??0strstreambuf@std@@QAE@H@Z */
14086 /* ??0strstreambuf@std@@QEAA@_J@Z */
14087 #if STREAMSIZE_BITS == 64
14088 DEFINE_THISCALL_WRAPPER(strstreambuf_ctor_len
, 12)
14090 DEFINE_THISCALL_WRAPPER(strstreambuf_ctor_len
, 8)
14092 strstreambuf
* __thiscall
strstreambuf_ctor_len(strstreambuf
*this, streamsize len
)
14094 return strstreambuf_ctor_get_put(this, NULL
, len
, NULL
);
14097 /* ??0strstreambuf@std@@QAE@P6APAXI@ZP6AXPAX@Z@Z */
14098 /* ??0strstreambuf@std@@QEAA@P6APEAX_K@ZP6AXPEAX@Z@Z */
14099 DEFINE_THISCALL_WRAPPER(strstreambuf_ctor_alloc
, 12)
14100 strstreambuf
* __thiscall
strstreambuf_ctor_alloc(strstreambuf
*this, void* (__cdecl
*palloc
)(MSVCP_size_t
), void (__cdecl
*pfree
)(void*))
14102 TRACE("(%p %p %p)\n", this, palloc
, pfree
);
14104 strstreambuf_ctor_get_put(this, NULL
, 0, NULL
);
14105 this->palloc
= palloc
;
14106 this->pfree
= pfree
;
14110 /* ??0strstreambuf@std@@QAE@PBCH@Z */
14111 /* ??0strstreambuf@std@@QEAA@PEBC_J@Z */
14112 /* ??0strstreambuf@std@@QAE@PBDH@Z */
14113 /* ??0strstreambuf@std@@QEAA@PEBD_J@Z */
14114 /* ??0strstreambuf@std@@QAE@PBEH@Z */
14115 /* ??0strstreambuf@std@@QEAA@PEBE_J@Z */
14116 #if STREAMSIZE_BITS == 64
14117 DEFINE_THISCALL_WRAPPER(strstreambuf_ctor_get
, 16)
14119 DEFINE_THISCALL_WRAPPER(strstreambuf_ctor_get
, 12)
14121 strstreambuf
* __thiscall
strstreambuf_ctor_get(strstreambuf
*this, const char *g
, streamsize len
)
14123 TRACE("(%p %p %s)\n", this, g
, wine_dbgstr_longlong(len
));
14125 strstreambuf_ctor_get_put(this, (char*)g
, len
, NULL
);
14126 this->strmode
|= STRSTATE_Constant
;
14130 /* ??_Fstrstreambuf@std@@QAEXXZ */
14131 /* ??_Fstrstreambuf@std@@QEAAXXZ */
14132 DEFINE_THISCALL_WRAPPER(strstreambuf_ctor
, 4)
14133 strstreambuf
* __thiscall
strstreambuf_ctor(strstreambuf
*this)
14135 return strstreambuf_ctor_get_put(this, NULL
, 0, NULL
);
14138 /* ?_Tidy@strstreambuf@std@@IAEXXZ */
14139 /* ?_Tidy@strstreambuf@std@@IEAAXXZ */
14140 DEFINE_THISCALL_WRAPPER(strstreambuf__Tidy
, 4)
14141 void __thiscall
strstreambuf__Tidy(strstreambuf
*this)
14143 TRACE("(%p)\n", this);
14145 if((this->strmode
& STRSTATE_Allocated
) && !(this->strmode
& STRSTATE_Frozen
)) {
14147 this->pfree(basic_streambuf_char_eback(&this->base
));
14149 MSVCRT_operator_delete(basic_streambuf_char_eback(&this->base
));
14152 this->endsave
= NULL
;
14153 this->seekhigh
= NULL
;
14154 this->strmode
&= ~(STRSTATE_Allocated
| STRSTATE_Frozen
);
14155 basic_streambuf_char_setg(&this->base
, NULL
, NULL
, NULL
);
14156 basic_streambuf_char_setp(&this->base
, NULL
, NULL
);
14159 /* ??1strstreambuf@std@@UAE@XZ */
14160 /* ??1strstreambuf@std@@UEAA@XZ */
14161 DEFINE_THISCALL_WRAPPER(strstreambuf_dtor
, 4)
14162 void __thiscall
strstreambuf_dtor(strstreambuf
*this)
14164 TRACE("(%p)\n", this);
14166 strstreambuf__Tidy(this);
14167 basic_streambuf_char_dtor(&this->base
);
14170 DEFINE_THISCALL_WRAPPER(strstreambuf_vector_dtor
, 8)
14171 strstreambuf
* __thiscall
strstreambuf_vector_dtor(strstreambuf
*this, unsigned int flags
)
14173 TRACE("(%p %x)\n", this, flags
);
14175 /* we have an array, with the number of elements stored before the first object */
14176 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
14178 for(i
=*ptr
-1; i
>=0; i
--)
14179 strstreambuf_dtor(this+i
);
14180 MSVCRT_operator_delete(ptr
);
14182 strstreambuf_dtor(this);
14184 MSVCRT_operator_delete(this);
14190 /* ?freeze@strstreambuf@std@@QAEX_N@Z */
14191 /* ?freeze@strstreambuf@std@@QEAAX_N@Z */
14192 DEFINE_THISCALL_WRAPPER(strstreambuf_freeze
, 8)
14193 void __thiscall
strstreambuf_freeze(strstreambuf
*this, MSVCP_bool freeze
)
14195 TRACE("(%p %d)\n", this, freeze
);
14197 if(!freeze
== !(this->strmode
& STRSTATE_Frozen
))
14201 this->strmode
|= STRSTATE_Frozen
;
14202 this->endsave
= basic_streambuf_char_epptr(&this->base
);
14203 basic_streambuf_char_setp_next(&this->base
, basic_streambuf_char_pbase(&this->base
),
14204 basic_streambuf_char_pptr(&this->base
), basic_streambuf_char_eback(&this->base
));
14206 this->strmode
&= ~STRSTATE_Frozen
;
14207 basic_streambuf_char_setp_next(&this->base
, basic_streambuf_char_pbase(&this->base
),
14208 basic_streambuf_char_pptr(&this->base
), this->endsave
);
14212 /* ?str@strstreambuf@std@@QAEPADXZ */
14213 /* ?str@strstreambuf@std@@QEAAPEADXZ */
14214 DEFINE_THISCALL_WRAPPER(strstreambuf_str
, 4)
14215 char* __thiscall
strstreambuf_str(strstreambuf
*this)
14217 TRACE("(%p)\n", this);
14219 strstreambuf_freeze(this, TRUE
);
14220 return basic_streambuf_char_gptr(&this->base
);
14223 /* ?pcount@strstreambuf@std@@QBEHXZ */
14224 /* ?pcount@strstreambuf@std@@QEBA_JXZ */
14225 DEFINE_THISCALL_WRAPPER(strstreambuf_pcount
, 4)
14226 streamsize __thiscall
strstreambuf_pcount(const strstreambuf
*this)
14228 char *ppos
= basic_streambuf_char_pptr(&this->base
);
14230 TRACE("(%p)\n", this);
14232 return ppos
? ppos
-basic_streambuf_char_pbase(&this->base
) : 0;
14235 /* ?overflow@strstreambuf@std@@MAEHH@Z */
14236 /* ?overflow@strstreambuf@std@@MEAAHH@Z */
14237 DEFINE_THISCALL_WRAPPER(strstreambuf_overflow
, 8)
14238 int __thiscall
strstreambuf_overflow(strstreambuf
*this, int c
)
14240 MSVCP_size_t old_size
, size
;
14243 TRACE("(%p %d)\n", this, c
);
14248 if(this->strmode
& STRSTATE_Frozen
)
14251 ptr
= basic_streambuf_char_pptr(&this->base
);
14252 if(ptr
&& ptr
<basic_streambuf_char_epptr(&this->base
))
14253 return (unsigned char)(*basic_streambuf_char__Pninc(&this->base
) = c
);
14255 if(!(this->strmode
& STRSTATE_Dynamic
) || (this->strmode
& STRSTATE_Constant
))
14258 ptr
= basic_streambuf_char_eback(&this->base
);
14259 old_size
= ptr
? basic_streambuf_char_epptr(&this->base
) - ptr
: 0;
14261 size
= old_size
+ old_size
/2;
14262 if(size
< this->minsize
)
14263 size
= this->minsize
;
14266 buf
= this->palloc(size
);
14268 buf
= MSVCRT_operator_new(size
);
14272 memcpy(buf
, ptr
, old_size
);
14273 if(this->strmode
& STRSTATE_Allocated
) {
14277 MSVCRT_operator_delete(ptr
);
14280 this->strmode
|= STRSTATE_Allocated
;
14282 this->seekhigh
= buf
;
14283 basic_streambuf_char_setp(&this->base
, buf
, buf
+size
);
14284 basic_streambuf_char_setg(&this->base
, buf
, buf
, buf
);
14286 this->seekhigh
= this->seekhigh
-ptr
+buf
;
14287 basic_streambuf_char_setp_next(&this->base
, basic_streambuf_char_pbase(&this->base
)-ptr
+buf
,
14288 basic_streambuf_char_pptr(&this->base
)-ptr
+buf
, buf
+size
);
14289 basic_streambuf_char_setg(&this->base
, buf
, basic_streambuf_char_gptr(&this->base
)-ptr
+buf
,
14290 basic_streambuf_char_pptr(&this->base
));
14293 return (unsigned char)(*basic_streambuf_char__Pninc(&this->base
) = c
);
14296 /* ?pbackfail@strstreambuf@std@@MAEHH@Z */
14297 /* ?pbackfail@strstreambuf@std@@MEAAHH@Z */
14298 DEFINE_THISCALL_WRAPPER(strstreambuf_pbackfail
, 8)
14299 int __thiscall
strstreambuf_pbackfail(strstreambuf
*this, int c
)
14301 char *ptr
= basic_streambuf_char_gptr(&this->base
);
14303 TRACE("(%p %d)\n", this, c
);
14305 if(ptr
<=basic_streambuf_char_eback(&this->base
)
14306 || ((this->strmode
& STRSTATE_Constant
) && c
!=ptr
[-1]))
14309 basic_streambuf_char_gbump(&this->base
, -1);
14312 if(this->strmode
& STRSTATE_Constant
)
14313 return (unsigned char)c
;
14315 return (unsigned char)(ptr
[0] = c
);
14318 /* ?seekoff@strstreambuf@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
14319 /* ?seekoff@strstreambuf@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
14320 /* ?seekoff@strstreambuf@std@@MAE?AV?$fpos@H@2@JHH@Z */
14321 /* ?seekoff@strstreambuf@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
14322 #if STREAMOFF_BITS == 64
14323 DEFINE_THISCALL_WRAPPER(strstreambuf_seekoff
, 24)
14325 DEFINE_THISCALL_WRAPPER(strstreambuf_seekoff
, 20)
14327 fpos_mbstatet
* __thiscall
strstreambuf_seekoff(strstreambuf
*this, fpos_mbstatet
*ret
, streamoff off
, int way
, int mode
)
14329 char *eback
= basic_streambuf_char_eback(&this->base
);
14330 char *pptr
= basic_streambuf_char_pptr(&this->base
);
14331 char *gptr
= basic_streambuf_char_gptr(&this->base
);
14333 TRACE("(%p %p %s %d %d)\n", this, ret
, wine_dbgstr_longlong(off
), way
, mode
);
14336 memset(&ret
->state
, 0, sizeof(ret
->state
));
14338 if(pptr
> this->seekhigh
)
14339 this->seekhigh
= pptr
;
14341 if((mode
& OPENMODE_in
) && gptr
) {
14342 if(way
==SEEKDIR_cur
&& !(mode
& OPENMODE_out
))
14344 else if(way
== SEEKDIR_end
)
14345 off
+= this->seekhigh
-eback
;
14346 else if(way
!= SEEKDIR_beg
)
14349 if(off
<0 || off
>this->seekhigh
-eback
) {
14352 basic_streambuf_char_gbump(&this->base
, eback
-gptr
+off
);
14353 if((mode
& OPENMODE_out
) && pptr
) {
14354 basic_streambuf_char_setp_next(&this->base
, eback
,
14355 gptr
, basic_streambuf_char_epptr(&this->base
));
14358 }else if((mode
& OPENMODE_out
) && pptr
) {
14359 if(way
== SEEKDIR_cur
)
14361 else if(way
== SEEKDIR_end
)
14362 off
+= this->seekhigh
-eback
;
14363 else if(way
!= SEEKDIR_beg
)
14366 if(off
<0 || off
>this->seekhigh
-eback
)
14369 basic_streambuf_char_pbump(&this->base
, eback
-pptr
+off
);
14378 /* ?seekpos@strstreambuf@std@@MAE?AV?$fpos@H@2@V32@H@Z */
14379 /* ?seekpos@strstreambuf@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
14380 DEFINE_THISCALL_WRAPPER(strstreambuf_seekpos
, 36)
14381 fpos_mbstatet
* __thiscall
strstreambuf_seekpos(strstreambuf
*this, fpos_mbstatet
*ret
, fpos_mbstatet pos
, int mode
)
14383 TRACE("(%p %p %s %d)\n", this, ret
, debugstr_fpos_mbstatet(&pos
), mode
);
14385 if(pos
.off
==-1 && pos
.pos
==0 && MBSTATET_TO_INT(&pos
.state
)==0) {
14390 return strstreambuf_seekoff(this, ret
, pos
.pos
+pos
.off
, SEEKDIR_beg
, mode
);
14393 /* ?underflow@strstreambuf@std@@MAEHXZ */
14394 /* ?underflow@strstreambuf@std@@MEAAHXZ */
14395 DEFINE_THISCALL_WRAPPER(strstreambuf_underflow
, 4)
14396 int __thiscall
strstreambuf_underflow(strstreambuf
*this)
14398 char *gptr
= basic_streambuf_char_gptr(&this->base
);
14401 TRACE("(%p)\n", this);
14406 if(gptr
< basic_streambuf_char_egptr(&this->base
))
14407 return (unsigned char)(*gptr
);
14409 pptr
= basic_streambuf_char_gptr(&this->base
);
14410 if(pptr
> this->seekhigh
)
14411 this->seekhigh
= pptr
;
14413 if(this->seekhigh
<= gptr
)
14416 basic_streambuf_char_setg(&this->base
, basic_streambuf_char_eback(&this->base
),
14417 gptr
, this->seekhigh
);
14418 return (unsigned char)(*gptr
);
14421 static inline basic_ios_char
* ostrstream_to_basic_ios(ostrstream
*ptr
)
14423 return (basic_ios_char
*)((char*)ptr
+ostrstream_vbtable
[1]);
14426 static inline ostrstream
* ostrstream_from_basic_ios(basic_ios_char
*ptr
)
14428 return (ostrstream
*)((char*)ptr
-ostrstream_vbtable
[1]);
14431 /* ??0ostrstream@std@@QAE@PADHH@Z */
14432 #if STREAMSIZE_BITS == 64
14433 DEFINE_THISCALL_WRAPPER(ostrstream_ctor
, 24)
14435 DEFINE_THISCALL_WRAPPER(ostrstream_ctor
, 20)
14437 ostrstream
* __thiscall
ostrstream_ctor(ostrstream
*this, char *buf
, streamsize size
, int mode
, MSVCP_bool virt_init
)
14439 basic_ios_char
*basic_ios
;
14441 TRACE("(%p %p %s %d %d)\n", this, buf
, wine_dbgstr_longlong(size
), mode
, virt_init
);
14444 this->base
.vbtable
= ostrstream_vbtable
;
14445 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
14446 INIT_BASIC_IOS_VTORDISP(basic_ios
);
14447 basic_ios_char_ctor(basic_ios
);
14449 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
14452 strstreambuf_ctor_get_put(&this->buf
, buf
, size
,
14453 buf
&& (mode
& OPENMODE_app
) ? buf
+strlen(buf
) : buf
);
14454 basic_ostream_char_ctor(&this->base
, &this->buf
.base
, FALSE
, FALSE
);
14455 basic_ios
->base
.vtable
= &MSVCP_ostrstream_vtable
;
14459 /* ??1ostrstream@std@@UAE@XZ */
14460 /* ??1ostrstream@std@@UEAA@XZ */
14461 DEFINE_THISCALL_WRAPPER(ostrstream_dtor
, 4)
14462 void __thiscall
ostrstream_dtor(basic_ios_char
*base
)
14464 ostrstream
*this = ostrstream_from_basic_ios(base
);
14466 TRACE("(%p)\n", this);
14468 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base
));
14469 strstreambuf_dtor(&this->buf
);
14472 static void ostrstream_vbase_dtor(ostrstream
*this)
14474 basic_ios_char
*base
= ostrstream_to_basic_ios(this);
14476 TRACE("(%p)\n", this);
14478 ostrstream_dtor(base
);
14479 basic_ios_char_dtor(base
);
14482 DEFINE_THISCALL_WRAPPER(ostrstream_vector_dtor
, 8)
14483 ostrstream
* __thiscall
ostrstream_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
14485 ostrstream
*this = ostrstream_from_basic_ios(base
);
14487 TRACE("(%p %x)\n", this, flags
);
14490 /* we have an array, with the number of elements stored before the first object */
14491 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
14493 for(i
=*ptr
-1; i
>=0; i
--)
14494 ostrstream_vbase_dtor(this+i
);
14495 MSVCRT_operator_delete(ptr
);
14497 ostrstream_vbase_dtor(this);
14499 MSVCRT_operator_delete(this);
14505 static inline istrstream
* istrstream_from_basic_ios(basic_ios_char
*ptr
)
14507 return (istrstream
*)((char*)ptr
-istrstream_vbtable
[1]);
14510 /* ??1istrstream@std@@UAE@XZ */
14511 /* ??1istrstream@std@@UEAA@XZ */
14512 DEFINE_THISCALL_WRAPPER(istrstream_dtor
, 4)
14513 void __thiscall
istrstream_dtor(basic_ios_char
*base
)
14515 istrstream
*this = istrstream_from_basic_ios(base
);
14517 TRACE("(%p)\n", this);
14519 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base
));
14520 strstreambuf_dtor(&this->buf
);
14523 static inline basic_ios_char
* strstream_to_basic_ios(strstream
*ptr
)
14525 return (basic_ios_char
*)((char*)ptr
+strstream_vbtable1
[1]);
14528 static inline strstream
* strstream_from_basic_ios(basic_ios_char
*ptr
)
14530 return (strstream
*)((char*)ptr
-strstream_vbtable1
[1]);
14533 /* ??$?6MDU?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@ABV?$complex@M@0@@Z */
14534 /* ??$?6MDU?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@AEBV?$complex@M@0@@Z */
14535 basic_ostream_char
* __cdecl
basic_ostream_char_print_complex_float(basic_ostream_char
*ostr
, const complex_float
*val
)
14538 basic_ostringstream_char obj
;
14539 basic_ios_char vbase
;
14541 ios_base
*ostringstream_ios_base
, *ostream_ios_base
;
14543 basic_string_char str
;
14544 basic_ostringstream_char_ctor(&oss
.obj
);
14545 ostringstream_ios_base
= &oss
.vbase
.base
;
14546 ostream_ios_base
= &basic_ostream_char_get_basic_ios(ostr
)->base
;
14547 TRACE("(%p %p)\n", ostr
, val
);
14549 ios_base_imbue(ostringstream_ios_base
, &loc
, IOS_LOCALE(ostream_ios_base
));
14551 ios_base_precision_set(ostringstream_ios_base
, ios_base_precision_get(ostream_ios_base
));
14552 ios_base_flags_set(ostringstream_ios_base
, ios_base_flags_get(ostream_ios_base
));
14554 basic_ostream_char_print_ch(&oss
.obj
.base
, '(');
14555 basic_ostream_char_print_float(&oss
.obj
.base
, val
->real
);
14556 basic_ostream_char_print_ch(&oss
.obj
.base
, ',');
14557 basic_ostream_char_print_float(&oss
.obj
.base
, val
->imag
);
14558 basic_ostream_char_print_ch(&oss
.obj
.base
, ')');
14560 basic_ostringstream_char_str_get(&oss
.obj
, &str
);
14561 basic_ostringstream_char_dtor(&oss
.vbase
);
14562 basic_ostream_char_print_bstr(ostr
, &str
);
14563 MSVCP_basic_string_char_dtor(&str
);
14567 /* ??$?6NDU?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@ABV?$complex@N@0@@Z */
14568 /* ??$?6NDU?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@AEBV?$complex@N@0@@Z */
14569 basic_ostream_char
* __cdecl
basic_ostream_char_print_complex_double(basic_ostream_char
*ostr
, const complex_double
*val
)
14572 basic_ostringstream_char obj
;
14573 basic_ios_char vbase
;
14575 ios_base
*ostringstream_ios_base
, *ostream_ios_base
;
14577 basic_string_char str
;
14578 basic_ostringstream_char_ctor(&oss
.obj
);
14579 ostringstream_ios_base
= &oss
.vbase
.base
;
14580 ostream_ios_base
= &basic_ostream_char_get_basic_ios(ostr
)->base
;
14581 TRACE("(%p %p)\n", ostr
, val
);
14583 ios_base_imbue(ostringstream_ios_base
, &loc
, IOS_LOCALE(ostream_ios_base
));
14585 ios_base_precision_set(ostringstream_ios_base
, ios_base_precision_get(ostream_ios_base
));
14586 ios_base_flags_set(ostringstream_ios_base
, ios_base_flags_get(ostream_ios_base
));
14588 basic_ostream_char_print_ch(&oss
.obj
.base
, '(');
14589 basic_ostream_char_print_double(&oss
.obj
.base
, val
->real
);
14590 basic_ostream_char_print_ch(&oss
.obj
.base
, ',');
14591 basic_ostream_char_print_double(&oss
.obj
.base
, val
->imag
);
14592 basic_ostream_char_print_ch(&oss
.obj
.base
, ')');
14594 basic_ostringstream_char_str_get(&oss
.obj
, &str
);
14595 basic_ostringstream_char_dtor(&oss
.vbase
);
14596 basic_ostream_char_print_bstr(ostr
, &str
);
14597 MSVCP_basic_string_char_dtor(&str
);
14601 /* ??$?6odu?$char_traits@d@std@@@std@@yaaav?$basic_ostream@du?$char_traits@d@std@@@0@aav10@abv?$complex@o@0@@Z */
14602 /* ??$?6ODU?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@AEBV?$complex@O@0@@Z */
14603 basic_ostream_char
* __cdecl
basic_ostream_char_print_complex_ldouble(basic_ostream_char
*ostr
, const complex_double
*val
)
14606 basic_ostringstream_char obj
;
14607 basic_ios_char vbase
;
14609 ios_base
*ostringstream_ios_base
, *ostream_ios_base
;
14611 basic_string_char str
;
14612 basic_ostringstream_char_ctor(&oss
.obj
);
14613 ostringstream_ios_base
= &oss
.vbase
.base
;
14614 ostream_ios_base
= &basic_ostream_char_get_basic_ios(ostr
)->base
;
14615 TRACE("(%p %p)\n", ostr
, val
);
14617 ios_base_imbue(ostringstream_ios_base
, &loc
, IOS_LOCALE(ostream_ios_base
));
14619 ios_base_precision_set(ostringstream_ios_base
, ios_base_precision_get(ostream_ios_base
));
14620 ios_base_flags_set(ostringstream_ios_base
, ios_base_flags_get(ostream_ios_base
));
14622 basic_ostream_char_print_ch(&oss
.obj
.base
, '(');
14623 basic_ostream_char_print_ldouble(&oss
.obj
.base
, val
->real
);
14624 basic_ostream_char_print_ch(&oss
.obj
.base
, ',');
14625 basic_ostream_char_print_ldouble(&oss
.obj
.base
, val
->imag
);
14626 basic_ostream_char_print_ch(&oss
.obj
.base
, ')');
14628 basic_ostringstream_char_str_get(&oss
.obj
, &str
);
14629 basic_ostringstream_char_dtor(&oss
.vbase
);
14630 basic_ostream_char_print_bstr(ostr
, &str
);
14631 MSVCP_basic_string_char_dtor(&str
);
14635 /* ?_File_size@sys@tr2@std@@YA_KPBD@Z */
14636 /* ?_File_size@sys@tr2@std@@YA_KPEBD@Z */
14637 ULONGLONG __cdecl
tr2_sys__File_size(char const* path
)
14639 WIN32_FILE_ATTRIBUTE_DATA fad
;
14641 TRACE("(%s)\n", debugstr_a(path
));
14642 if(!GetFileAttributesExA(path
, GetFileExInfoStandard
, &fad
))
14644 if(fad
.dwFileAttributes
& FILE_ATTRIBUTE_DIRECTORY
)
14647 return ((ULONGLONG
)(fad
.nFileSizeHigh
) << 32) + fad
.nFileSizeLow
;
14650 /* ?_Equivalent@sys@tr2@std@@YAHPBD0@Z */
14651 /* ?_Equivalent@sys@tr2@std@@YAHPEBD0@Z */
14652 int __cdecl
tr2_sys__Equivalent(char const* path1
, char const* path2
)
14656 BY_HANDLE_FILE_INFORMATION info1
, info2
;
14657 TRACE("(%s %s)\n", debugstr_a(path1
), debugstr_a(path2
));
14659 h1
= CreateFileA(path1
, 0, FILE_SHARE_DELETE
| FILE_SHARE_READ
| FILE_SHARE_WRITE
,
14660 NULL
, OPEN_EXISTING
, 0, 0);
14661 h2
= CreateFileA(path2
, 0, FILE_SHARE_DELETE
| FILE_SHARE_READ
| FILE_SHARE_WRITE
,
14662 NULL
, OPEN_EXISTING
, 0, 0);
14663 if(h1
== INVALID_HANDLE_VALUE
) {
14664 if(h2
== INVALID_HANDLE_VALUE
) {
14670 }else if(h2
== INVALID_HANDLE_VALUE
) {
14675 ret
= GetFileInformationByHandle(h1
, &info1
) && GetFileInformationByHandle(h2
, &info2
);
14680 return (info1
.dwVolumeSerialNumber
== info2
.dwVolumeSerialNumber
14681 && info1
.nFileIndexHigh
== info2
.nFileIndexHigh
14682 && info1
.nFileIndexLow
== info2
.nFileIndexLow
14686 /* ?_Current_get@sys@tr2@std@@YAPADAAY0BAE@D@Z */
14687 /* ?_Current_get@sys@tr2@std@@YAPEADAEAY0BAE@D@Z */
14688 char* __cdecl
tr2_sys__Current_get(char *current_path
)
14690 TRACE("(%s)\n", debugstr_a(current_path
));
14692 if(!GetCurrentDirectoryA(MAX_PATH
, current_path
))
14694 return current_path
;
14697 /* ?_Current_set@sys@tr2@std@@YA_NPBD@Z */
14698 /* ?_Current_set@sys@tr2@std@@YA_NPEBD@Z */
14699 MSVCP_bool __cdecl
tr2_sys__Current_set(char const* path
)
14701 TRACE("(%s)\n", debugstr_a(path
));
14702 return SetCurrentDirectoryA(path
) != 0;
14705 /* ?_Make_dir@sys@tr2@std@@YAHPBD@Z */
14706 /* ?_Make_dir@sys@tr2@std@@YAHPEBD@Z */
14707 int __cdecl
tr2_sys__Make_dir(char const* path
)
14709 TRACE("(%s)\n", debugstr_a(path
));
14711 if(!CreateDirectoryA(path
, NULL
)) {
14712 if(GetLastError() == ERROR_ALREADY_EXISTS
)
14721 /* ?_Remove_dir@sys@tr2@std@@YA_NPBD@Z */
14722 /* ?_Remove_dir@sys@tr2@std@@YA_NPEBD@Z */
14723 MSVCP_bool __cdecl
tr2_sys__Remove_dir(char const* path
)
14725 TRACE("(%s)\n", debugstr_a(path
));
14726 return RemoveDirectoryA(path
) != 0;
14729 /* ?_Copy_file@sys@tr2@std@@YAHPBD0_N@Z */
14730 /* ?_Copy_file@sys@tr2@std@@YAHPEBD0_N@Z */
14731 int __cdecl
tr2_sys__Copy_file(char const* source
, char const* dest
, MSVCP_bool fail_if_exists
)
14733 TRACE("(%s %s %x)\n", debugstr_a(source
), debugstr_a(dest
), fail_if_exists
);
14735 if(CopyFileA(source
, dest
, fail_if_exists
))
14736 return ERROR_SUCCESS
;
14737 return GetLastError();
14740 /* ?_Rename@sys@tr2@std@@YAHPBD0@Z */
14741 /* ?_Rename@sys@tr2@std@@YAHPEBD0@Z */
14742 int __cdecl
tr2_sys__Rename(char const* old_path
, char const* new_path
)
14744 TRACE("(%s %s)\n", debugstr_a(old_path
), debugstr_a(new_path
));
14746 if(!old_path
|| !new_path
)
14747 return ERROR_INVALID_PARAMETER
;
14749 if(MoveFileExA(old_path
, new_path
, MOVEFILE_COPY_ALLOWED
))
14750 return ERROR_SUCCESS
;
14751 return GetLastError();
14754 /* ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PBD@Z */
14755 /* ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEBD@Z */
14756 struct space_info
* __cdecl
tr2_sys__Statvfs(struct space_info
*ret
, const char* path
)
14758 ULARGE_INTEGER available
, total
, free
;
14760 TRACE("(%s)\n", debugstr_a(path
));
14762 if(!path
|| !GetDiskFreeSpaceExA(path
, &available
, &total
, &free
)) {
14763 ret
->capacity
= ret
->free
= ret
->available
= 0;
14765 ret
->capacity
= total
.QuadPart
;
14766 ret
->free
= free
.QuadPart
;
14767 ret
->available
= available
.QuadPart
;
14772 /* ?_Stat@sys@tr2@std@@YA?AW4file_type@123@PBDAAH@Z */
14773 /* ?_Stat@sys@tr2@std@@YA?AW4file_type@123@PEBDAEAH@Z */
14774 enum file_type __cdecl
tr2_sys__Stat(char const* path
, int* err_code
)
14777 TRACE("(%s %p)\n", debugstr_a(path
), err_code
);
14779 *err_code
= ERROR_INVALID_PARAMETER
;
14780 return status_unknown
;
14783 attr
=GetFileAttributesA(path
);
14784 if(attr
== INVALID_FILE_ATTRIBUTES
) {
14785 enum file_type ret
;
14786 switch(GetLastError()) {
14787 case ERROR_FILE_NOT_FOUND
:
14788 case ERROR_BAD_NETPATH
:
14789 case ERROR_INVALID_NAME
:
14790 case ERROR_BAD_PATHNAME
:
14791 case ERROR_PATH_NOT_FOUND
:
14792 ret
= file_not_found
;
14793 *err_code
= ERROR_SUCCESS
;
14796 ret
= status_unknown
;
14797 *err_code
= GetLastError();
14802 *err_code
= ERROR_SUCCESS
;
14803 return (attr
& FILE_ATTRIBUTE_DIRECTORY
)?directory_file
:regular_file
;
14806 /* ?_Lstat@sys@tr2@std@@YA?AW4file_type@123@PBDAAH@Z */
14807 /* ?_Lstat@sys@tr2@std@@YA?AW4file_type@123@PEBDAEAH@Z */
14808 enum file_type __cdecl
tr2_sys__Lstat(char const* path
, int* err_code
)
14810 return tr2_sys__Stat(path
, err_code
);
14813 /* ?_Last_write_time@sys@tr2@std@@YA_JPBD@Z */
14814 /* ?_Last_write_time@sys@tr2@std@@YA_JPEBD@Z */
14815 __int64 __cdecl
tr2_sys__Last_write_time(char const* path
)
14820 __int64 last_write_time
;
14821 TRACE("(%s)\n", debugstr_a(path
));
14823 handle
= CreateFileA(path
, 0, FILE_SHARE_DELETE
| FILE_SHARE_READ
| FILE_SHARE_WRITE
,
14824 NULL
, OPEN_EXISTING
, FILE_FLAG_BACKUP_SEMANTICS
, 0);
14825 if(handle
== INVALID_HANDLE_VALUE
)
14828 ret
= GetFileTime(handle
, 0, 0, &lwt
);
14829 CloseHandle(handle
);
14833 last_write_time
= (((__int64
)lwt
.dwHighDateTime
)<< 32) + lwt
.dwLowDateTime
;
14834 last_write_time
-= TICKS_1601_TO_1970
;
14835 last_write_time
/= TICKSPERSEC
;
14836 return last_write_time
;
14839 /* ?_Last_write_time@sys@tr2@std@@YAXPBD_J@Z */
14840 /* ?_Last_write_time@sys@tr2@std@@YAXPEBD_J@Z */
14841 void __cdecl
tr2_sys__Last_write_time_set(char const* path
, __int64 newtime
)
14845 TRACE("(%s)\n", debugstr_a(path
));
14847 handle
= CreateFileA(path
, FILE_WRITE_ATTRIBUTES
,
14848 FILE_SHARE_DELETE
| FILE_SHARE_READ
| FILE_SHARE_WRITE
,
14849 NULL
, OPEN_EXISTING
, FILE_FLAG_BACKUP_SEMANTICS
, 0);
14850 if(handle
== INVALID_HANDLE_VALUE
)
14853 /* This is the implementation based on the test of msvcp110.
14854 * According to the test of msvcp120,
14855 * msvcp120's implementation does nothing. Obviously, this is a bug of windows.
14858 newtime
*= TICKSPERSEC
;
14859 newtime
+= TICKS_1601_TO_1970
;
14860 lwt
.dwLowDateTime
= (DWORD
)(newtime
);
14861 lwt
.dwHighDateTime
= (DWORD
)(newtime
>> 32);
14862 SetFileTime(handle
, 0, 0, &lwt
);
14863 CloseHandle(handle
);
14866 /* ?_Open_dir@sys@tr2@std@@YAPAXAAY0BAE@DPBDAAHAAW4file_type@123@@Z */
14867 /* ?_Open_dir@sys@tr2@std@@YAPEAXAEAY0BAE@DPEBDAEAHAEAW4file_type@123@@Z */
14868 void* __cdecl
tr2_sys__Open_dir(char* target
, char const* dest
, int* err_code
, enum file_type
* type
)
14871 WIN32_FIND_DATAA data
;
14872 char temppath
[MAX_PATH
];
14874 TRACE("(%p %s %p %p)\n", target
, debugstr_a(dest
), err_code
, type
);
14875 if(strlen(dest
) > MAX_PATH
- 3) {
14876 *err_code
= ERROR_BAD_PATHNAME
;
14879 strcpy(temppath
, dest
);
14880 strcat(temppath
, "\\*");
14882 handle
= FindFirstFileA(temppath
, &data
);
14883 if(handle
== INVALID_HANDLE_VALUE
) {
14884 *err_code
= GetLastError();
14887 while(!strcmp(data
.cFileName
, ".") || !strcmp(data
.cFileName
, "..")) {
14888 if(!FindNextFileA(handle
, &data
)) {
14889 *err_code
= ERROR_SUCCESS
;
14890 *type
= status_unknown
;
14896 strcpy(target
, data
.cFileName
);
14897 *err_code
= ERROR_SUCCESS
;
14898 if(data
.dwFileAttributes
& FILE_ATTRIBUTE_DIRECTORY
)
14899 *type
= directory_file
;
14901 *type
= regular_file
;
14905 /* ?_Read_dir@sys@tr2@std@@YAPADAAY0BAE@DPAXAAW4file_type@123@@Z */
14906 /* ?_Read_dir@sys@tr2@std@@YAPEADAEAY0BAE@DPEAXAEAW4file_type@123@@Z */
14907 char* __cdecl
tr2_sys__Read_dir(char* target
, void* handle
, enum file_type
* type
)
14909 WIN32_FIND_DATAA data
;
14911 TRACE("(%p %p %p)\n", target
, handle
, type
);
14914 if(!FindNextFileA(handle
, &data
)) {
14915 *type
= status_unknown
;
14919 } while(!strcmp(data
.cFileName
, ".") || !strcmp(data
.cFileName
, ".."));
14921 strcpy(target
, data
.cFileName
);
14922 if(data
.dwFileAttributes
& FILE_ATTRIBUTE_DIRECTORY
)
14923 *type
= directory_file
;
14925 *type
= regular_file
;
14929 /* ?_Close_dir@sys@tr2@std@@YAXPAX@Z */
14930 /* ?_Close_dir@sys@tr2@std@@YAXPEAX@Z */
14931 void __cdecl
tr2_sys__Close_dir(void* handle
)
14933 TRACE("(%p)\n", handle
);
14938 /* ?_Link@sys@tr2@std@@YAHPBD0@Z */
14939 /* ?_Link@sys@tr2@std@@YAHPEBD0@Z */
14940 int __cdecl
tr2_sys__Link(char const* existing_path
, char const* new_path
)
14942 TRACE("(%s %s)\n", debugstr_a(existing_path
), debugstr_a(new_path
));
14943 if(!existing_path
|| !new_path
)
14944 return ERROR_INVALID_PARAMETER
;
14946 if(CreateHardLinkA(new_path
, existing_path
, NULL
))
14947 return ERROR_SUCCESS
;
14948 return GetLastError();
14951 /* ?_Symlink@sys@tr2@std@@YAHPBD0@Z */
14952 /* ?_Symlink@sys@tr2@std@@YAHPEBD0@Z */
14953 int __cdecl
tr2_sys__Symlink(char const* existing_file_name
, char const* file_name
)
14955 TRACE("(%s %s)\n", debugstr_a(existing_file_name
), debugstr_a(file_name
));
14956 if(!existing_file_name
|| !file_name
)
14957 return ERROR_INVALID_PARAMETER
;
14959 if(CreateSymbolicLinkA(file_name
, existing_file_name
, 0))
14960 return ERROR_SUCCESS
;
14961 return GetLastError();
14964 /* ?_Unlink@sys@tr2@std@@YAHPBD@Z */
14965 /* ?_Unlink@sys@tr2@std@@YAHPEBD@Z */
14966 int __cdecl
tr2_sys__Unlink(char const* path
)
14968 TRACE("(%s)\n", debugstr_a(path
));
14970 if(DeleteFileA(path
))
14971 return ERROR_SUCCESS
;
14972 return GetLastError();
14975 /* ??0strstream@std@@QAE@PADHH@Z */
14976 /* ??0strstream@std@@QEAA@PEAD_JH@Z */
14977 #if STREAMSIZE_BITS == 64
14978 DEFINE_THISCALL_WRAPPER(strstream_ctor
, 24)
14980 DEFINE_THISCALL_WRAPPER(strstream_ctor
, 20)
14982 strstream
* __thiscall
strstream_ctor(strstream
*this, char *buf
, streamsize size
, int mode
, MSVCP_bool virt_init
)
14984 basic_ios_char
*basic_ios
;
14986 TRACE("(%p %p %s %d %d)\n", this, buf
, wine_dbgstr_longlong(size
), mode
, virt_init
);
14989 this->base
.base1
.vbtable
= strstream_vbtable1
;
14990 this->base
.base2
.vbtable
= strstream_vbtable2
;
14991 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
14992 INIT_BASIC_IOS_VTORDISP(basic_ios
);
14993 basic_ios_char_ctor(basic_ios
);
14995 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
14998 strstreambuf_ctor_get_put(&this->buf
, buf
, size
,
14999 buf
&& (mode
& OPENMODE_app
) ? buf
+strlen(buf
) : buf
);
15000 basic_iostream_char_ctor(&this->base
, &this->buf
.base
, FALSE
);
15001 basic_ios
->base
.vtable
= &MSVCP_strstream_vtable
;
15005 /* ??1strstream@std@@UAE@XZ */
15006 /* ??1strstream@std@@UEAA@XZ */
15007 DEFINE_THISCALL_WRAPPER(strstream_dtor
, 4)
15008 void __thiscall
strstream_dtor(basic_ios_char
*base
)
15010 strstream
*this = strstream_from_basic_ios(base
);
15012 TRACE("(%p)\n", this);
15014 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base
));
15015 strstreambuf_dtor(&this->buf
);
15018 static void strstream_vbase_dtor(strstream
*this)
15020 basic_ios_char
*base
= strstream_to_basic_ios(this);
15022 TRACE("(%p)\n", this);
15024 strstream_dtor(base
);
15025 basic_ios_char_dtor(base
);
15028 DEFINE_THISCALL_WRAPPER(strstream_vector_dtor
, 8)
15029 strstream
* __thiscall
strstream_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
15031 strstream
*this = strstream_from_basic_ios(base
);
15033 TRACE("(%p %x)\n", this, flags
);
15036 /* we have an array, with the number of elements stored before the first object */
15037 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
15039 for(i
=*ptr
-1; i
>=0; i
--)
15040 strstream_vbase_dtor(this+i
);
15041 MSVCRT_operator_delete(ptr
);
15043 strstream_vbase_dtor(this);
15045 MSVCRT_operator_delete(this);
15051 static void __cdecl
setprecision_func(ios_base
*base
, streamsize prec
)
15053 ios_base_precision_set(base
, prec
);
15056 /* ?setprecision@std@@YA?AU?$_Smanip@H@1@H@Z */
15057 /* ?setprecision@std@@YA?AU?$_Smanip@_J@1@_J@Z */
15058 manip_streamsize
* __cdecl
setprecision(manip_streamsize
*ret
, streamsize prec
)
15060 TRACE("(%p %s)\n", ret
, wine_dbgstr_longlong(prec
));
15062 ret
->pfunc
= setprecision_func
;
15067 static void __cdecl
setw_func(ios_base
*base
, streamsize width
)
15069 ios_base_width_set(base
, width
);
15072 /* ?setw@std@@YA?AU?$_Smanip@H@1@H@Z */
15073 /* ?setw@std@@YA?AU?$_Smanip@_J@1@_J@Z */
15074 manip_streamsize
* __cdecl
setw(manip_streamsize
*ret
, streamsize width
)
15076 TRACE("(%p %s)\n", ret
, wine_dbgstr_longlong(width
));
15078 ret
->pfunc
= setw_func
;
15083 static void __cdecl
resetioflags_func(ios_base
*base
, int mask
)
15085 ios_base_setf_mask(base
, 0, mask
);
15088 /* ?resetiosflags@std@@YA?AU?$_Smanip@H@1@H@Z */
15089 manip_int
* __cdecl
resetiosflags(manip_int
*ret
, int mask
)
15091 TRACE("(%p %d)\n", ret
, mask
);
15093 ret
->pfunc
= resetioflags_func
;
15098 static void __cdecl
setiosflags_func(ios_base
*base
, int mask
)
15100 ios_base_setf_mask(base
, FMTFLAG_mask
, mask
);
15103 /* ?setiosflags@std@@YA?AU?$_Smanip@H@1@H@Z */
15104 manip_int
* __cdecl
setiosflags(manip_int
*ret
, int mask
)
15106 TRACE("(%p %d)\n", ret
, mask
);
15108 ret
->pfunc
= setiosflags_func
;
15113 static void __cdecl
setbase_func(ios_base
*base
, int set_base
)
15116 set_base
= FMTFLAG_dec
;
15117 else if(set_base
== 8)
15118 set_base
= FMTFLAG_oct
;
15119 else if(set_base
== 16)
15120 set_base
= FMTFLAG_hex
;
15124 ios_base_setf_mask(base
, set_base
, FMTFLAG_basefield
);
15127 /* ?setbase@std@@YA?AU?$_Smanip@H@1@H@Z */
15128 manip_int
* __cdecl
setbase(manip_int
*ret
, int base
)
15130 TRACE("(%p %d)\n", ret
, base
);
15132 ret
->pfunc
= setbase_func
;
15137 static basic_filebuf_char filebuf_char_stdin
;
15138 /* ?cin@std@@3V?$basic_istream@DU?$char_traits@D@std@@@1@A */
15140 basic_istream_char obj
;
15141 basic_ios_char vbase
;
15143 /* ?_Ptr_cin@std@@3PAV?$basic_istream@DU?$char_traits@D@std@@@1@A */
15144 /* ?_Ptr_cin@std@@3PEAV?$basic_istream@DU?$char_traits@D@std@@@1@EA */
15145 basic_istream_char
*_Ptr_cin
= &cin
.obj
;
15147 static basic_filebuf_wchar filebuf_short_stdin
;
15148 /* ?wcin@std@@3V?$basic_istream@GU?$char_traits@G@std@@@1@A */
15150 basic_istream_wchar obj
;
15151 basic_ios_wchar vbase
;
15152 } ucin
= { { 0 } };
15153 /* ?_Ptr_wcin@std@@3PAV?$basic_istream@GU?$char_traits@G@std@@@1@A */
15154 /* ?_Ptr_wcin@std@@3PEAV?$basic_istream@GU?$char_traits@G@std@@@1@EA */
15155 basic_istream_wchar
*_Ptr_ucin
= &ucin
.obj
;
15157 static basic_filebuf_wchar filebuf_wchar_stdin
;
15158 /* ?wcin@std@@3V?$basic_istream@_WU?$char_traits@_W@std@@@1@A */
15160 basic_istream_wchar obj
;
15161 basic_ios_wchar vbase
;
15162 } wcin
= { { 0 } };
15163 /* ?_Ptr_wcin@std@@3PAV?$basic_istream@_WU?$char_traits@_W@std@@@1@A */
15164 /* ?_Ptr_wcin@std@@3PEAV?$basic_istream@_WU?$char_traits@_W@std@@@1@EA */
15165 basic_istream_wchar
*_Ptr_wcin
= &wcin
.obj
;
15167 static basic_filebuf_char filebuf_char_stdout
;
15168 /* ?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
15170 basic_ostream_char obj
;
15171 basic_ios_char vbase
;
15172 } cout
= { { 0 } };
15173 /* ?_Ptr_cout@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
15174 /* ?_Ptr_cout@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
15175 basic_ostream_char
*_Ptr_cout
= &cout
.obj
;
15177 static basic_filebuf_wchar filebuf_short_stdout
;
15178 /* ?wcout@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
15180 basic_ostream_wchar obj
;
15181 basic_ios_wchar vbase
;
15182 } ucout
= { { 0 } };
15183 /* ?_Ptr_wcout@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
15184 /* ?_Ptr_wcout@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
15185 basic_ostream_wchar
*_Ptr_ucout
= &ucout
.obj
;
15187 static basic_filebuf_wchar filebuf_wchar_stdout
;
15188 /* ?wcout@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
15190 basic_ostream_wchar obj
;
15191 basic_ios_wchar vbase
;
15192 } wcout
= { { 0 } };
15193 /* ?_Ptr_wcout@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
15194 /* ?_Ptr_wcout@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
15195 basic_ostream_wchar
*_Ptr_wcout
= &wcout
.obj
;
15197 static basic_filebuf_char filebuf_char_stderr
;
15198 /* ?cerr@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
15200 basic_ostream_char obj
;
15201 basic_ios_char vbase
;
15202 } cerr
= { { 0 } };
15203 /* ?_Ptr_cerr@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
15204 /* ?_Ptr_cerr@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
15205 basic_ostream_char
*_Ptr_cerr
= &cerr
.obj
;
15207 static basic_filebuf_wchar filebuf_short_stderr
;
15208 /* ?wcerr@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
15210 basic_ostream_wchar obj
;
15211 basic_ios_wchar vbase
;
15212 } ucerr
= { { 0 } };
15213 /* ?_Ptr_wcerr@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
15214 /* ?_Ptr_wcerr@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
15215 basic_ostream_wchar
*_Ptr_ucerr
= &ucerr
.obj
;
15217 static basic_filebuf_wchar filebuf_wchar_stderr
;
15218 /* ?wcerr@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
15220 basic_ostream_wchar obj
;
15221 basic_ios_wchar vbase
;
15222 } wcerr
= { { 0 } };
15223 /* ?_Ptr_wcerr@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
15224 /* ?_Ptr_wcerr@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
15225 basic_ostream_wchar
*_Ptr_wcerr
= &wcerr
.obj
;
15227 static basic_filebuf_char filebuf_char_log
;
15228 /* ?clog@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
15230 basic_ostream_char obj
;
15231 basic_ios_char vbase
;
15232 } clog
= { { 0 } };
15233 /* ?_Ptr_clog@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
15234 /* ?_Ptr_clog@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
15235 basic_ostream_char
*_Ptr_clog
= &clog
.obj
;
15237 static basic_filebuf_wchar filebuf_short_log
;
15238 /* ?wclog@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
15240 basic_ostream_wchar obj
;
15241 basic_ios_wchar vbase
;
15242 } uclog
= { { 0 } };
15243 /* ?_Ptr_wclog@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
15244 /* ?_Ptr_wclog@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
15245 basic_ostream_wchar
*_Ptr_uclog
= &uclog
.obj
;
15247 static basic_filebuf_wchar filebuf_wchar_log
;
15248 /* ?wclog@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
15250 basic_ostream_wchar obj
;
15251 basic_ios_wchar vbase
;
15252 } wclog
= { { 0 } };
15253 /* ?_Ptr_wclog@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
15254 /* ?_Ptr_wclog@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
15255 basic_ostream_wchar
*_Ptr_wclog
= &wclog
.obj
;
15257 /* ?_Init_cnt@Init@ios_base@std@@0HA */
15258 int ios_base_Init__Init_cnt
= -1;
15260 /* ?_Init_cnt_func@Init@ios_base@std@@CAAAHXZ */
15261 /* ?_Init_cnt_func@Init@ios_base@std@@CAAEAHXZ */
15262 int* __cdecl
ios_base_Init__Init_cnt_func(void)
15264 return &ios_base_Init__Init_cnt
;
15267 /* ?_Init_ctor@Init@ios_base@std@@CAXPAV123@@Z */
15268 /* ?_Init_ctor@Init@ios_base@std@@CAXPEAV123@@Z */
15269 void __cdecl
ios_base_Init__Init_ctor(void *this)
15271 TRACE("(%p)\n", this);
15273 if(ios_base_Init__Init_cnt
< 0)
15274 ios_base_Init__Init_cnt
= 1;
15276 ios_base_Init__Init_cnt
++;
15279 /* ??0Init@ios_base@std@@QAE@XZ */
15280 /* ??0Init@ios_base@std@@QEAA@XZ */
15281 DEFINE_THISCALL_WRAPPER(ios_base_Init_ctor
, 4)
15282 void* __thiscall
ios_base_Init_ctor(void *this)
15284 ios_base_Init__Init_ctor(this);
15288 /* ?_Init_dtor@Init@ios_base@std@@CAXPAV123@@Z */
15289 /* ?_Init_dtor@Init@ios_base@std@@CAXPEAV123@@Z */
15290 void __cdecl
ios_base_Init__Init_dtor(void *this)
15292 TRACE("(%p)\n", this);
15294 ios_base_Init__Init_cnt
--;
15295 if(!ios_base_Init__Init_cnt
) {
15296 basic_ostream_char_flush(&cout
.obj
);
15297 basic_ostream_char_flush(&cerr
.obj
);
15298 basic_ostream_char_flush(&clog
.obj
);
15302 /* ??1Init@ios_base@std@@QAE@XZ */
15303 /* ??1Init@ios_base@std@@QEAA@XZ */
15304 DEFINE_THISCALL_WRAPPER(ios_base_Init_dtor
, 4)
15305 void __thiscall
ios_base_Init_dtor(void *this)
15307 ios_base_Init__Init_dtor(this);
15310 /* ??4Init@ios_base@std@@QAEAAV012@ABV012@@Z */
15311 /* ??4Init@ios_base@std@@QEAAAEAV012@AEBV012@@Z */
15312 DEFINE_THISCALL_WRAPPER(ios_base_Init_op_assign
, 8)
15313 void* __thiscall
ios_base_Init_op_assign(void *this, void *rhs
)
15315 TRACE("(%p %p)\n", this, rhs
);
15319 /* ?_Init_cnt@_Winit@std@@0HA */
15320 int _Winit__Init_cnt
= -1;
15322 /* ??0_Winit@std@@QAE@XZ */
15323 /* ??0_Winit@std@@QEAA@XZ */
15324 DEFINE_THISCALL_WRAPPER(_Winit_ctor
, 4)
15325 void* __thiscall
_Winit_ctor(void *this)
15327 TRACE("(%p)\n", this);
15329 if(_Winit__Init_cnt
< 0)
15330 _Winit__Init_cnt
= 1;
15332 _Winit__Init_cnt
++;
15337 /* ?_File_size@sys@tr2@std@@YA_KPB_W@Z */
15338 /* ?_File_size@sys@tr2@std@@YA_KPEB_W@Z */
15339 ULONGLONG __cdecl
tr2_sys__File_size_wchar(WCHAR
const* path
)
15341 WIN32_FILE_ATTRIBUTE_DATA fad
;
15343 TRACE("(%s)\n", debugstr_w(path
));
15344 if(!GetFileAttributesExW(path
, GetFileExInfoStandard
, &fad
))
15346 if(fad
.dwFileAttributes
& FILE_ATTRIBUTE_DIRECTORY
)
15349 return ((ULONGLONG
)(fad
.nFileSizeHigh
) << 32) + fad
.nFileSizeLow
;
15352 /* ?_Equivalent@sys@tr2@std@@YAHPB_W0@Z */
15353 /* ?_Equivalent@sys@tr2@std@@YAHPEB_W0@Z */
15354 int __cdecl
tr2_sys__Equivalent_wchar(WCHAR
const* path1
, WCHAR
const* path2
)
15358 BY_HANDLE_FILE_INFORMATION info1
, info2
;
15359 TRACE("(%s %s)\n", debugstr_w(path1
), debugstr_w(path2
));
15361 h1
= CreateFileW(path1
, 0, FILE_SHARE_DELETE
| FILE_SHARE_READ
| FILE_SHARE_WRITE
,
15362 NULL
, OPEN_EXISTING
, 0, 0);
15363 h2
= CreateFileW(path2
, 0, FILE_SHARE_DELETE
| FILE_SHARE_READ
| FILE_SHARE_WRITE
,
15364 NULL
, OPEN_EXISTING
, 0, 0);
15365 if(h1
== INVALID_HANDLE_VALUE
) {
15366 if(h2
== INVALID_HANDLE_VALUE
) {
15372 }else if(h2
== INVALID_HANDLE_VALUE
) {
15377 ret
= GetFileInformationByHandle(h1
, &info1
) && GetFileInformationByHandle(h2
, &info2
);
15382 return (info1
.dwVolumeSerialNumber
== info2
.dwVolumeSerialNumber
15383 && info1
.nFileIndexHigh
== info2
.nFileIndexHigh
15384 && info1
.nFileIndexLow
== info2
.nFileIndexLow
15388 /* ?_Current_get@sys@tr2@std@@YAPA_WAAY0BAE@_W@Z */
15389 /* ?_Current_get@sys@tr2@std@@YAPEA_WAEAY0BAE@_W@Z */
15390 WCHAR
* __cdecl
tr2_sys__Current_get_wchar(WCHAR
*current_path
)
15392 TRACE("(%s)\n", debugstr_w(current_path
));
15394 if(!GetCurrentDirectoryW(MAX_PATH
, current_path
))
15396 return current_path
;
15399 /* ?_Current_set@sys@tr2@std@@YA_NPB_W@Z */
15400 /* ?_Current_set@sys@tr2@std@@YA_NPEB_W@Z */
15401 MSVCP_bool __cdecl
tr2_sys__Current_set_wchar(WCHAR
const* path
)
15403 TRACE("(%s)\n", debugstr_w(path
));
15404 return SetCurrentDirectoryW(path
) != 0;
15407 /* ?_Make_dir@sys@tr2@std@@YAHPB_W@Z */
15408 /* ?_Make_dir@sys@tr2@std@@YAHPEB_W@Z */
15409 int __cdecl
tr2_sys__Make_dir_wchar(WCHAR
const* path
)
15411 TRACE("(%s)\n", debugstr_w(path
));
15413 if(!CreateDirectoryW(path
, NULL
)) {
15414 if(GetLastError() == ERROR_ALREADY_EXISTS
)
15423 /* ?_Remove_dir@sys@tr2@std@@YA_NPB_W@Z */
15424 /* ?_Remove_dir@sys@tr2@std@@YA_NPEB_W@Z */
15425 MSVCP_bool __cdecl
tr2_sys__Remove_dir_wchar(WCHAR
const* path
)
15427 TRACE("(%s)\n", debugstr_w(path
));
15428 return RemoveDirectoryW(path
) != 0;
15431 /* ?_Copy_file@sys@tr2@std@@YAHPB_W0_N@Z */
15432 /* ?_Copy_file@sys@tr2@std@@YAHPEB_W0_N@Z */
15433 int __cdecl
tr2_sys__Copy_file_wchar(WCHAR
const* source
, WCHAR
const* dest
, MSVCP_bool fail_if_exists
)
15435 TRACE("(%s %s %x)\n", debugstr_w(source
), debugstr_w(dest
), fail_if_exists
);
15437 if(CopyFileW(source
, dest
, fail_if_exists
))
15438 return ERROR_SUCCESS
;
15439 return GetLastError();
15442 /* ?_Rename@sys@tr2@std@@YAHPB_W0@Z */
15443 /* ?_Rename@sys@tr2@std@@YAHPEB_W0@Z */
15444 int __cdecl
tr2_sys__Rename_wchar(WCHAR
const* old_path
, WCHAR
const* new_path
)
15446 TRACE("(%s %s)\n", debugstr_w(old_path
), debugstr_w(new_path
));
15448 if(!old_path
|| !new_path
)
15449 return ERROR_INVALID_PARAMETER
;
15451 if(MoveFileExW(old_path
, new_path
, MOVEFILE_COPY_ALLOWED
))
15452 return ERROR_SUCCESS
;
15453 return GetLastError();
15456 /* ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PB_W@Z */
15457 /* ?_Statvfs@sys@tr2@std@@YA?AUspace_info@123@PEB_W@Z */
15458 struct space_info
* __cdecl
tr2_sys__Statvfs_wchar(struct space_info
*ret
, const WCHAR
* path
)
15460 ULARGE_INTEGER available
, total
, free
;
15462 TRACE("(%s)\n", debugstr_w(path
));
15464 if(!path
|| !GetDiskFreeSpaceExW(path
, &available
, &total
, &free
)) {
15465 ret
->capacity
= ret
->free
= ret
->available
= 0;
15467 ret
->capacity
= total
.QuadPart
;
15468 ret
->free
= free
.QuadPart
;
15469 ret
->available
= available
.QuadPart
;
15474 /* ?_Stat@sys@tr2@std@@YA?AW4file_type@123@PB_WAAH@Z */
15475 /* ?_Stat@sys@tr2@std@@YA?AW4file_type@123@PEB_WAEAH@Z */
15476 enum file_type __cdecl
tr2_sys__Stat_wchar(WCHAR
const* path
, int* err_code
)
15479 TRACE("(%s %p)\n", debugstr_w(path
), err_code
);
15481 *err_code
= ERROR_INVALID_PARAMETER
;
15482 return status_unknown
;
15485 attr
=GetFileAttributesW(path
);
15486 if(attr
== INVALID_FILE_ATTRIBUTES
) {
15487 enum file_type ret
;
15488 switch(GetLastError()) {
15489 case ERROR_FILE_NOT_FOUND
:
15490 case ERROR_BAD_NETPATH
:
15491 case ERROR_INVALID_NAME
:
15492 case ERROR_BAD_PATHNAME
:
15493 case ERROR_PATH_NOT_FOUND
:
15494 ret
= file_not_found
;
15495 *err_code
= ERROR_SUCCESS
;
15498 ret
= status_unknown
;
15499 *err_code
= GetLastError();
15504 *err_code
= ERROR_SUCCESS
;
15505 return (attr
& FILE_ATTRIBUTE_DIRECTORY
)?directory_file
:regular_file
;
15508 /* ?_Lstat@sys@tr2@std@@YA?AW4file_type@123@PB_WAAH@Z */
15509 /* ?_Lstat@sys@tr2@std@@YA?AW4file_type@123@PEB_WAEAH@Z */
15510 enum file_type __cdecl
tr2_sys__Lstat_wchar(WCHAR
const* path
, int* err_code
)
15512 return tr2_sys__Stat_wchar(path
, err_code
);
15515 /* ??1_Winit@std@@QAE@XZ */
15516 /* ??1_Winit@std@@QAE@XZ */
15517 DEFINE_THISCALL_WRAPPER(_Winit_dtor
, 4)
15518 void __thiscall
_Winit_dtor(void *this)
15520 TRACE("(%p)\n", this);
15522 _Winit__Init_cnt
--;
15523 if(!_Winit__Init_cnt
) {
15524 basic_ostream_wchar_flush(&wcout
.obj
);
15525 basic_ostream_wchar_flush(&wcerr
.obj
);
15526 basic_ostream_wchar_flush(&wclog
.obj
);
15530 /* ??4_Winit@std@@QAEAAV01@ABV01@@Z */
15531 /* ??4_Winit@std@@QEAAAEAV01@AEBV01@@Z */
15532 DEFINE_THISCALL_WRAPPER(_Winit_op_assign
, 8)
15533 void* __thiscall
_Winit_op_assign(void *this, void *rhs
)
15535 TRACE("(%p %p)\n", this, rhs
);
15539 void init_io(void *base
)
15542 init_iosb_rtti(base
);
15543 init_ios_base_rtti(base
);
15544 init_basic_ios_char_rtti(base
);
15545 init_basic_ios_wchar_rtti(base
);
15546 init_basic_ios_short_rtti(base
);
15547 init_basic_streambuf_char_rtti(base
);
15548 init_basic_streambuf_wchar_rtti(base
);
15549 init_basic_streambuf_short_rtti(base
);
15550 init_basic_filebuf_char_rtti(base
);
15551 init_basic_filebuf_wchar_rtti(base
);
15552 init_basic_filebuf_short_rtti(base
);
15553 init_basic_stringbuf_char_rtti(base
);
15554 init_basic_stringbuf_wchar_rtti(base
);
15555 init_basic_stringbuf_short_rtti(base
);
15556 init_basic_ostream_char_rtti(base
);
15557 init_basic_ostream_wchar_rtti(base
);
15558 init_basic_ostream_short_rtti(base
);
15559 init_basic_istream_char_rtti(base
);
15560 init_basic_istream_wchar_rtti(base
);
15561 init_basic_istream_short_rtti(base
);
15562 init_basic_iostream_char_rtti(base
);
15563 init_basic_iostream_wchar_rtti(base
);
15564 init_basic_iostream_short_rtti(base
);
15565 init_basic_ofstream_char_rtti(base
);
15566 init_basic_ofstream_wchar_rtti(base
);
15567 init_basic_ofstream_short_rtti(base
);
15568 init_basic_ifstream_char_rtti(base
);
15569 init_basic_ifstream_wchar_rtti(base
);
15570 init_basic_ifstream_short_rtti(base
);
15571 init_basic_fstream_char_rtti(base
);
15572 init_basic_fstream_wchar_rtti(base
);
15573 init_basic_fstream_short_rtti(base
);
15574 init_basic_ostringstream_char_rtti(base
);
15575 init_basic_ostringstream_wchar_rtti(base
);
15576 init_basic_ostringstream_short_rtti(base
);
15577 init_basic_istringstream_char_rtti(base
);
15578 init_basic_istringstream_wchar_rtti(base
);
15579 init_basic_istringstream_short_rtti(base
);
15580 init_basic_stringstream_char_rtti(base
);
15581 init_basic_stringstream_wchar_rtti(base
);
15582 init_basic_stringstream_short_rtti(base
);
15583 init_strstreambuf_rtti(base
);
15584 init_strstream_rtti(base
);
15585 init_ostrstream_rtti(base
);
15588 basic_filebuf_char_ctor_file(&filebuf_char_stdin
, stdin
);
15589 basic_istream_char_ctor(&cin
.obj
, &filebuf_char_stdin
.base
, FALSE
/*FIXME*/, TRUE
);
15591 basic_filebuf_short_ctor_file(&filebuf_short_stdin
, stdin
);
15592 basic_istream_short_ctor(&ucin
.obj
, &filebuf_short_stdin
.base
, FALSE
/*FIXME*/, TRUE
);
15594 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stdin
, stdin
);
15595 basic_istream_wchar_ctor(&wcin
.obj
, &filebuf_wchar_stdin
.base
, FALSE
/*FIXME*/, TRUE
);
15597 basic_filebuf_char_ctor_file(&filebuf_char_stdout
, stdout
);
15598 basic_ostream_char_ctor(&cout
.obj
, &filebuf_char_stdout
.base
, FALSE
/*FIXME*/, TRUE
);
15600 basic_filebuf_short_ctor_file(&filebuf_short_stdout
, stdout
);
15601 basic_ostream_short_ctor(&ucout
.obj
, &filebuf_short_stdout
.base
, FALSE
/*FIXME*/, TRUE
);
15603 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stdout
, stdout
);
15604 basic_ostream_wchar_ctor(&wcout
.obj
, &filebuf_wchar_stdout
.base
, FALSE
/*FIXME*/, TRUE
);
15606 basic_filebuf_char_ctor_file(&filebuf_char_stderr
, stderr
);
15607 basic_ostream_char_ctor(&cerr
.obj
, &filebuf_char_stderr
.base
, FALSE
/*FIXME*/, TRUE
);
15609 basic_filebuf_short_ctor_file(&filebuf_short_stderr
, stderr
);
15610 basic_ostream_short_ctor(&ucerr
.obj
, &filebuf_short_stderr
.base
, FALSE
/*FIXME*/, TRUE
);
15612 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stderr
, stderr
);
15613 basic_ostream_wchar_ctor(&wcerr
.obj
, &filebuf_wchar_stderr
.base
, FALSE
/*FIXME*/, TRUE
);
15615 basic_filebuf_char_ctor_file(&filebuf_char_log
, stderr
);
15616 basic_ostream_char_ctor(&clog
.obj
, &filebuf_char_log
.base
, FALSE
/*FIXME*/, TRUE
);
15618 basic_filebuf_short_ctor_file(&filebuf_short_log
, stderr
);
15619 basic_ostream_short_ctor(&uclog
.obj
, &filebuf_short_log
.base
, FALSE
/*FIXME*/, TRUE
);
15621 basic_filebuf_wchar_ctor_file(&filebuf_wchar_log
, stderr
);
15622 basic_ostream_wchar_ctor(&wclog
.obj
, &filebuf_wchar_log
.base
, FALSE
/*FIXME*/, TRUE
);
15627 basic_istream_char_vbase_dtor(&cin
.obj
);
15628 basic_filebuf_char_dtor(&filebuf_char_stdin
);
15630 basic_istream_wchar_vbase_dtor(&ucin
.obj
);
15631 basic_filebuf_wchar_dtor(&filebuf_short_stdin
);
15633 basic_istream_wchar_vbase_dtor(&wcin
.obj
);
15634 basic_filebuf_wchar_dtor(&filebuf_wchar_stdin
);
15636 basic_ostream_char_vbase_dtor(&cout
.obj
);
15637 basic_filebuf_char_dtor(&filebuf_char_stdout
);
15639 basic_ostream_wchar_vbase_dtor(&ucout
.obj
);
15640 basic_filebuf_wchar_dtor(&filebuf_short_stdout
);
15642 basic_ostream_wchar_vbase_dtor(&wcout
.obj
);
15643 basic_filebuf_wchar_dtor(&filebuf_wchar_stdout
);
15645 basic_ostream_char_vbase_dtor(&cerr
.obj
);
15646 basic_filebuf_char_dtor(&filebuf_char_stderr
);
15648 basic_ostream_wchar_vbase_dtor(&ucerr
.obj
);
15649 basic_filebuf_wchar_dtor(&filebuf_short_stderr
);
15651 basic_ostream_wchar_vbase_dtor(&wcerr
.obj
);
15652 basic_filebuf_wchar_dtor(&filebuf_wchar_stderr
);
15654 basic_ostream_char_vbase_dtor(&clog
.obj
);
15655 basic_filebuf_char_dtor(&filebuf_char_log
);
15657 basic_ostream_wchar_vbase_dtor(&uclog
.obj
);
15658 basic_filebuf_wchar_dtor(&filebuf_short_log
);
15660 basic_ostream_wchar_vbase_dtor(&wclog
.obj
);
15661 basic_filebuf_wchar_dtor(&filebuf_wchar_log
);