2 * Copyright 2011 Piotr Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
29 #include "wine/debug.h"
30 WINE_DEFAULT_DEBUG_CHANNEL(msvcp);
32 /* ?_Index@ios_base@std@@0HA */
33 int ios_base_Index = 0;
34 /* ?_Sync@ios_base@std@@0_NA */
35 MSVCP_bool ios_base_Sync = FALSE;
39 __int64 DECLSPEC_ALIGN(8) pos;
43 static inline const char* debugstr_fpos_int(fpos_int *fpos)
45 return wine_dbg_sprintf("fpos(%ld %s %d)", fpos->off, wine_dbgstr_longlong(fpos->pos), fpos->state);
49 void (__cdecl *pfunc)(ios_base*, streamsize);
54 void (__cdecl *pfunc)(ios_base*, int);
62 } basic_filebuf__Initfl;
65 basic_streambuf_char base;
75 basic_streambuf_wchar base;
82 } basic_filebuf_wchar;
85 STRINGBUF_allocated = 1,
86 STRINGBUF_no_write = 2,
87 STRINGBUF_no_read = 4,
90 } basic_stringbuf_state;
93 basic_streambuf_char base;
96 char allocator; /* empty struct */
97 } basic_stringbuf_char;
100 basic_streambuf_wchar base;
103 char allocator; /* empty struct */
104 } basic_stringbuf_wchar;
108 basic_streambuf_char *strbuf;
109 struct _basic_ostream_char *stream;
115 basic_streambuf_wchar *strbuf;
116 struct _basic_ostream_wchar *stream;
120 typedef struct _basic_ostream_char {
122 /* virtual inheritance
123 * basic_ios_char basic_ios;
125 } basic_ostream_char;
127 typedef struct _basic_ostream_wchar {
129 /* virtual inheritance
130 * basic_ios_wchar basic_ios;
132 } basic_ostream_wchar;
137 /* virtual inheritance
138 * basic_ios_char basic_ios;
140 } basic_istream_char;
145 /* virtual inheritance
146 * basic_ios_wchar basic_ios;
148 } basic_istream_wchar;
151 basic_istream_char base1;
152 basic_ostream_char base2;
153 /* virtual inheritance
154 * basic_ios_char basic_ios;
156 } basic_iostream_char;
159 basic_istream_wchar base1;
160 basic_ostream_wchar base2;
161 /* virtual inheritance
162 * basic_ios_wchar basic_ios;
164 } basic_iostream_wchar;
167 basic_ostream_char base;
168 basic_filebuf_char filebuf;
169 /* virtual inheritance
170 * basic_ios_char basic_ios;
172 } basic_ofstream_char;
175 basic_ostream_wchar base;
176 basic_filebuf_wchar filebuf;
177 /* virtual inheritance
178 * basic_ios_wchar basic_ios;
180 } basic_ofstream_wchar;
183 basic_istream_char base;
184 basic_filebuf_char filebuf;
185 /* virtual inheritance
186 * basic_ios_char basic_ios;
188 } basic_ifstream_char;
191 basic_istream_wchar base;
192 basic_filebuf_wchar filebuf;
193 /* virtual inheritance
194 * basic_ios_wchar basic_ios;
196 } basic_ifstream_wchar;
199 basic_iostream_char base;
200 basic_filebuf_char filebuf;
201 /* virtual inheritance
202 * basic_ios_char basic_ios;
204 } basic_fstream_char;
207 basic_iostream_wchar base;
208 basic_filebuf_wchar filebuf;
209 /* virtual inheritance
210 * basic_ios_char basic_ios;
212 } basic_fstream_wchar;
215 basic_ostream_char base;
216 basic_stringbuf_char strbuf;
217 /* virtual inheritance
218 * basic_ios_char basic_ios;
220 } basic_ostringstream_char;
223 basic_ostream_wchar base;
224 basic_stringbuf_wchar strbuf;
225 /* virtual inheritance
226 * basic_ios_wchar basic_ios;
228 } basic_ostringstream_wchar;
231 basic_istream_char base;
232 basic_stringbuf_char strbuf;
233 /* virtual inheritance
234 * basic_ios_char basic_ios;
236 } basic_istringstream_char;
239 basic_istream_wchar base;
240 basic_stringbuf_wchar strbuf;
241 /* virtual inheritance
242 * basic_ios_wchar basic_ios;
244 } basic_istringstream_wchar;
247 basic_iostream_char base;
248 basic_stringbuf_char strbuf;
249 /* virtual inheritance
250 * basic_ios_char basic_ios;
252 } basic_stringstream_char;
255 basic_iostream_wchar base;
256 basic_stringbuf_wchar strbuf;
257 /* virtual inheritance
258 * basic_ios_wchar basic_ios;
260 } basic_stringstream_wchar;
263 STRSTATE_Allocated = 1,
264 STRSTATE_Constant = 2,
265 STRSTATE_Dynamic = 4,
267 } strstreambuf__Strstate;
270 basic_streambuf_char base;
275 void* (__cdecl *palloc)(MSVCP_size_t);
276 void (__cdecl *pfree)(void*);
280 basic_ostream_char base;
282 /* virtual inheritance
283 * basic_ios_char basic_ios;
288 basic_istream_char base;
290 /* virtual inheritance
291 * basic_ios_char basic_ios;
296 basic_iostream_char base;
298 /* virtual inheritance
299 * basic_ios_char basic_ios;
303 extern const vtable_ptr MSVCP_iosb_vtable;
305 /* ??_7ios_base@std@@6B@ */
306 extern const vtable_ptr MSVCP_ios_base_vtable;
308 /* ??_7?$basic_ios@DU?$char_traits@D@std@@@std@@6B@ */
309 extern const vtable_ptr MSVCP_basic_ios_char_vtable;
311 /* ??_7?$basic_ios@_WU?$char_traits@_W@std@@@std@@6B@ */
312 extern const vtable_ptr MSVCP_basic_ios_wchar_vtable;
314 /* ??_7?$basic_ios@GU?$char_traits@G@std@@@std@@6B@ */
315 extern const vtable_ptr MSVCP_basic_ios_short_vtable;
317 /* ??_7?$basic_streambuf@DU?$char_traits@D@std@@@std@@6B@ */
318 extern const vtable_ptr MSVCP_basic_streambuf_char_vtable;
320 /* ??_7?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@6B@ */
321 extern const vtable_ptr MSVCP_basic_streambuf_wchar_vtable;
323 /* ??_7?$basic_streambuf@GU?$char_traits@G@std@@@std@@6B@ */
324 extern const vtable_ptr MSVCP_basic_streambuf_short_vtable;
326 /* ??_7?$basic_filebuf@DU?$char_traits@D@std@@@std@@6B@ */
327 extern const vtable_ptr MSVCP_basic_filebuf_char_vtable;
329 /* ??_7?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@6B@ */
330 extern const vtable_ptr MSVCP_basic_filebuf_wchar_vtable;
332 /* ??_7?$basic_filebuf@GU?$char_traits@G@std@@@std@@6B@ */
333 extern const vtable_ptr MSVCP_basic_filebuf_short_vtable;
335 /* ??_7?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
336 extern const vtable_ptr MSVCP_basic_stringbuf_char_vtable;
338 /* ??_7?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
339 extern const vtable_ptr MSVCP_basic_stringbuf_wchar_vtable;
341 /* ??_7?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
342 extern const vtable_ptr MSVCP_basic_stringbuf_short_vtable;
344 /* ??_8?$basic_ostream@DU?$char_traits@D@std@@@std@@7B@ */
345 const int basic_ostream_char_vbtable[] = {0, sizeof(basic_ostream_char)};
346 /* ??_7?$basic_ostream@DU?$char_traits@D@std@@@std@@6B@ */
347 extern const vtable_ptr MSVCP_basic_ostream_char_vtable;
349 /* ??_8?$basic_ostream@_WU?$char_traits@_W@std@@@std@@7B@ */
350 const int basic_ostream_wchar_vbtable[] = {0, sizeof(basic_ostream_wchar)};
351 /* ??_7?$basic_ostream@_WU?$char_traits@_W@std@@@std@@6B@ */
352 extern const vtable_ptr MSVCP_basic_ostream_wchar_vtable;
354 /* ??_8?$basic_ostream@GU?$char_traits@G@std@@@std@@7B@ */
355 const int basic_ostream_short_vbtable[] = {0, sizeof(basic_ostream_wchar)};
356 /* ??_7?$basic_ostream@GU?$char_traits@G@std@@@std@@6B@ */
357 extern const vtable_ptr MSVCP_basic_ostream_short_vtable;
359 /* ??_8?$basic_istream@DU?$char_traits@D@std@@@std@@7B@ */
360 const int basic_istream_char_vbtable[] = {0, sizeof(basic_istream_char)};
361 /* ??_7?$basic_istream@DU?$char_traits@D@std@@@std@@6B@ */
362 extern const vtable_ptr MSVCP_basic_istream_char_vtable;
364 /* ??_8?$basic_istream@_WU?$char_traits@_W@std@@@std@@7B@ */
365 const int basic_istream_wchar_vbtable[] = {0, sizeof(basic_istream_wchar)};
366 /* ??_7?$basic_istream@_WU?$char_traits@_W@std@@@std@@6B@ */
367 extern const vtable_ptr MSVCP_basic_istream_wchar_vtable;
369 /* ??_8?$basic_istream@GU?$char_traits@G@std@@@std@@7B@ */
370 const int basic_istream_short_vbtable[] = {0, sizeof(basic_istream_wchar)};
371 /* ??_7?$basic_istream@GU?$char_traits@G@std@@@std@@6B@ */
372 extern const vtable_ptr MSVCP_basic_istream_short_vtable;
374 /* ??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
375 const int basic_iostream_char_vbtable1[] = {0, sizeof(basic_iostream_char)};
376 /* ??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
377 const int basic_iostream_char_vbtable2[] = {0, sizeof(basic_iostream_char)-FIELD_OFFSET(basic_iostream_char, base2)};
378 /* ??_7?$basic_iostream@DU?$char_traits@D@std@@@std@@6B@ */
379 extern const vtable_ptr MSVCP_basic_iostream_char_vtable;
381 /* ??_8?$basic_iostream@_WU?$char_traits@_W@std@@@std@@7B?$basic_istream@_WU?$char_traits@_W@std@@@1@@ */
382 /* ??_8?$basic_iostream@GU?$char_traits@G@std@@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@ */
383 const int basic_iostream_wchar_vbtable1[] = {0, sizeof(basic_iostream_wchar)};
384 /* ??_8?$basic_iostream@_WU?$char_traits@_W@std@@@std@@7B?$basic_ostream@_WU?$char_traits@_W@std@@@1@@ */
385 /* ??_8?$basic_iostream@GU?$char_traits@G@std@@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@ */
386 const int basic_iostream_wchar_vbtable2[] = {0, sizeof(basic_iostream_wchar)-FIELD_OFFSET(basic_iostream_wchar, base2)};
387 /* ??_7?$basic_iostream@_WU?$char_traits@_W@std@@@std@@6B@ */
388 extern const vtable_ptr MSVCP_basic_iostream_wchar_vtable;
389 /* ??_7?$basic_iostream@GU?$char_traits@G@std@@@std@@6B@ */
390 extern const vtable_ptr MSVCP_basic_iostream_short_vtable;
392 /* ??_8?$basic_ofstream@DU?$char_traits@D@std@@@std@@7B@ */
393 const int basic_ofstream_char_vbtable[] = {0, sizeof(basic_ofstream_char)};
394 /* ??_7?$basic_ofstream@DU?$char_traits@D@std@@@std@@6B@ */
395 extern const vtable_ptr MSVCP_basic_ofstream_char_vtable;
397 /* ??_8?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@7B@ */
398 const int basic_ofstream_wchar_vbtable[] = {0, sizeof(basic_ofstream_wchar)};
399 /* ??_7?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@6B@ */
400 extern const vtable_ptr MSVCP_basic_ofstream_wchar_vtable;
402 /* ??_8?$basic_ofstream@GU?$char_traits@G@std@@@std@@7B@ */
403 const int basic_ofstream_short_vbtable[] = {0, sizeof(basic_ofstream_wchar)};
404 /* ??_7?$basic_ofstream@GU?$char_traits@G@std@@@std@@6B@ */
405 extern const vtable_ptr MSVCP_basic_ofstream_short_vtable;
407 /* ??_8?$basic_ifstream@DU?$char_traits@D@std@@@std@@7B@ */
408 const int basic_ifstream_char_vbtable[] = {0, sizeof(basic_ifstream_char)};
409 /* ??_7?$basic_ifstream@DU?$char_traits@D@std@@@std@@6B@ */
410 extern const vtable_ptr MSVCP_basic_ifstream_char_vtable;
412 /* ??_8?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@7B@ */
413 const int basic_ifstream_wchar_vbtable[] = {0, sizeof(basic_ifstream_wchar)};
414 /* ??_7?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@6B@ */
415 extern const vtable_ptr MSVCP_basic_ifstream_wchar_vtable;
417 /* ??_8?$basic_ifstream@GU?$char_traits@G@std@@@std@@7B@ */
418 const int basic_ifstream_short_vbtable[] = {0, sizeof(basic_ifstream_wchar)};
419 /* ??_7?$basic_ifstream@GU?$char_traits@G@std@@@std@@6B@ */
420 extern const vtable_ptr MSVCP_basic_ifstream_short_vtable;
422 /* ??_8?$basic_fstream@DU?$char_traits@D@std@@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
423 const int basic_fstream_char_vbtable1[] = {0, sizeof(basic_fstream_char)};
424 /* ??_8?$basic_fstream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
425 const int basic_fstream_char_vbtable2[] = {0, sizeof(basic_fstream_char)-FIELD_OFFSET(basic_fstream_char, base.base2)};
426 /* ??_7?$basic_fstream@DU?$char_traits@D@std@@@std@@6B@ */
427 extern const vtable_ptr MSVCP_basic_fstream_char_vtable;
429 /* ??_8?$basic_fstream@_WU?$char_traits@_W@std@@@std@@7B?$basic_istream@_WU?$char_traits@_W@std@@@1@@ */
430 /* ??_8?$basic_fstream@GU?$char_traits@G@std@@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@ */
431 const int basic_fstream_wchar_vbtable1[] = {0, sizeof(basic_fstream_wchar)};
432 /* ??_8?$basic_fstream@_WU?$char_traits@_W@std@@@std@@7B?$basic_ostream@_WU?$char_traits@_W@std@@@1@@ */
433 /* ??_8?$basic_fstream@GU?$char_traits@G@std@@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@ */
434 const int basic_fstream_wchar_vbtable2[] = {0, sizeof(basic_fstream_wchar)-FIELD_OFFSET(basic_fstream_wchar, base.base2)};
435 /* ??_7?$basic_fstream@_WU?$char_traits@_W@std@@@std@@6B@ */
436 extern const vtable_ptr MSVCP_basic_fstream_wchar_vtable;
437 /* ??_7?$basic_fstream@GU?$char_traits@G@std@@@std@@6B@ */
438 extern const vtable_ptr MSVCP_basic_fstream_short_vtable;
440 /* ??_8?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B@ */
441 const int basic_ostringstream_char_vbtable[] = {0, sizeof(basic_ostringstream_char)};
442 /* ??_7?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
443 extern const vtable_ptr MSVCP_basic_ostringstream_char_vtable;
445 /* ??_8?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B@ */
446 const int basic_ostringstream_wchar_vbtable[] = {0, sizeof(basic_ostringstream_wchar)};
447 /* ??_7?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
448 extern const vtable_ptr MSVCP_basic_ostringstream_wchar_vtable;
450 /* ??_8?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B@ */
451 const int basic_ostringstream_short_vbtable[] = {0, sizeof(basic_ostringstream_wchar)};
452 /* ??_7?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
453 extern const vtable_ptr MSVCP_basic_ostringstream_short_vtable;
455 /* ??_8?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B@ */
456 const int basic_istringstream_char_vbtable[] = {0, sizeof(basic_istringstream_char)};
457 /* ??_7?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
458 extern const vtable_ptr MSVCP_basic_istringstream_char_vtable;
460 /* ??_8?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B@ */
461 const int basic_istringstream_wchar_vbtable[] = {0, sizeof(basic_istringstream_wchar)};
462 /* ??_7?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
463 extern const vtable_ptr MSVCP_basic_istringstream_wchar_vtable;
465 /* ??_8?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B@ */
466 const int basic_istringstream_short_vbtable[] = {0, sizeof(basic_istringstream_wchar)};
467 /* ??_7?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
468 extern const vtable_ptr MSVCP_basic_istringstream_short_vtable;
470 /* ??_8?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
471 const int basic_stringstream_char_vbtable1[] = {0, sizeof(basic_stringstream_char)};
472 /* ??_8?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
473 const int basic_stringstream_char_vbtable2[] = {0, sizeof(basic_stringstream_char)-FIELD_OFFSET(basic_stringstream_char, base.base2)};
474 /* ??_7?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
475 extern const vtable_ptr MSVCP_basic_stringstream_char_vtable;
477 /* ??_8?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B?$basic_istream@_WU?$char_traits@_W@std@@@1@@ */
478 const int basic_stringstream_wchar_vbtable1[] = {0, sizeof(basic_stringstream_wchar)};
479 /* ??_8?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B?$basic_ostream@_WU?$char_traits@_W@std@@@1@@ */
480 const int basic_stringstream_wchar_vbtable2[] = {0, sizeof(basic_stringstream_wchar)-FIELD_OFFSET(basic_stringstream_wchar, base.base2)};
481 /* ??_7?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
482 extern const vtable_ptr MSVCP_basic_stringstream_wchar_vtable;
484 /* ??_8?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@ */
485 const int basic_stringstream_short_vbtable1[] = {0, sizeof(basic_stringstream_wchar)};
486 /* ??_8?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@ */
487 const int basic_stringstream_short_vbtable2[] = {0, sizeof(basic_stringstream_wchar)-FIELD_OFFSET(basic_stringstream_wchar, base.base2)};
488 /* ??_7?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
489 extern const vtable_ptr MSVCP_basic_stringstream_short_vtable;
491 /* ??_7strstreambuf@std@@6B */
492 extern const vtable_ptr MSVCP_strstreambuf_vtable;
494 static const int ostrstream_vbtable[] = {0, sizeof(ostrstream)};
495 extern const vtable_ptr MSVCP_ostrstream_vtable;
497 static const int istrstream_vbtable[] = {0, sizeof(istrstream)};
499 static const int strstream_vbtable1[] = {0, sizeof(strstream)};
500 static const int strstream_vbtable2[] = {0, sizeof(strstream)-FIELD_OFFSET(strstream, base.base2)};
501 extern const vtable_ptr MSVCP_strstream_vtable;
503 DEFINE_RTTI_DATA0(iosb, 0, ".?AV?$_Iosb@H@std@@")
504 DEFINE_RTTI_DATA1(ios_base, 0, &iosb_rtti_base_descriptor, ".?AV?$_Iosb@H@std@@")
505 DEFINE_RTTI_DATA2(basic_ios_char, 0, &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
506 ".?AV?$basic_ios@DU?$char_traits@D@std@@@std@@")
507 DEFINE_RTTI_DATA2(basic_ios_wchar, 0, &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
508 ".?AV?$basic_ios@_WU?$char_traits@_W@std@@@std@@")
509 DEFINE_RTTI_DATA2(basic_ios_short, 0, &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
510 ".?AV?$basic_ios@GU?$char_traits@G@std@@@std@@")
511 DEFINE_RTTI_DATA0(basic_streambuf_char, 0,
512 ".?AV?$basic_streambuf@DU?$char_traits@D@std@@@std@@")
513 DEFINE_RTTI_DATA0(basic_streambuf_wchar, 0,
514 ".?AV?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@")
515 DEFINE_RTTI_DATA0(basic_streambuf_short, 0,
516 ".?AV?$basic_streambuf@GU?$char_traits@G@std@@@std@@")
517 DEFINE_RTTI_DATA1(basic_filebuf_char, 0, &basic_streambuf_char_rtti_base_descriptor,
518 ".?AV?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@")
519 DEFINE_RTTI_DATA1(basic_filebuf_wchar, 0, &basic_streambuf_wchar_rtti_base_descriptor,
520 ".?AV?$basic_filebuf@GU?$char_traits@G@std@@@std@@")
521 DEFINE_RTTI_DATA1(basic_filebuf_short, 0, &basic_streambuf_short_rtti_base_descriptor,
522 ".?AV?$basic_filebuf@DU?$char_traits@D@std@@@std@@")
523 DEFINE_RTTI_DATA1(basic_stringbuf_char, 0, &basic_streambuf_char_rtti_base_descriptor,
524 ".?AV?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@")
525 DEFINE_RTTI_DATA1(basic_stringbuf_wchar, 0, &basic_streambuf_wchar_rtti_base_descriptor,
526 ".?AV?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@")
527 DEFINE_RTTI_DATA1(basic_stringbuf_short, 0, &basic_streambuf_short_rtti_base_descriptor,
528 ".?AV?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@")
529 DEFINE_RTTI_DATA3(basic_ostream_char, sizeof(basic_ostream_char), &basic_ios_char_rtti_base_descriptor,
530 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
531 ".?AV?$basic_ostream@DU?$char_traits@D@std@@@std@@")
532 DEFINE_RTTI_DATA3(basic_ostream_wchar, sizeof(basic_ostream_wchar), &basic_ios_wchar_rtti_base_descriptor,
533 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
534 ".?AV?$basic_ostream@_WU?$char_traits@_W@std@@@std@@")
535 DEFINE_RTTI_DATA3(basic_ostream_short, sizeof(basic_ostream_wchar), &basic_ios_short_rtti_base_descriptor,
536 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
537 ".?AV?$basic_ostream@GU?$char_traits@G@std@@@std@@")
538 DEFINE_RTTI_DATA3(basic_istream_char, sizeof(basic_istream_char), &basic_ios_char_rtti_base_descriptor,
539 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
540 ".?AV?$basic_istream@DU?$char_traits@D@std@@@std@@")
541 DEFINE_RTTI_DATA3(basic_istream_wchar, sizeof(basic_istream_wchar), &basic_ios_wchar_rtti_base_descriptor,
542 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
543 ".?AV?$basic_istream@_WU?$char_traits@_W@std@@@std@@")
544 DEFINE_RTTI_DATA3(basic_istream_short, sizeof(basic_istream_wchar), &basic_ios_short_rtti_base_descriptor,
545 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
546 ".?AV?$basic_istream@GU?$char_traits@G@std@@@std@@")
547 DEFINE_RTTI_DATA8(basic_iostream_char, sizeof(basic_iostream_char),
548 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
549 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
550 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
551 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
552 ".?AV?$basic_iostream@DU?$char_traits@D@std@@@std@@")
553 DEFINE_RTTI_DATA8(basic_iostream_wchar, sizeof(basic_iostream_wchar),
554 &basic_istream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
555 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
556 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
557 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
558 ".?AV?$basic_iostream@_WU?$char_traits@_W@std@@@std@@")
559 DEFINE_RTTI_DATA8(basic_iostream_short, sizeof(basic_iostream_wchar),
560 &basic_istream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
561 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
562 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
563 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
564 ".?AV?$basic_iostream@GU?$char_traits@G@std@@@std@@")
565 DEFINE_RTTI_DATA4(basic_ofstream_char, sizeof(basic_ofstream_char),
566 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
567 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
568 ".?AV?$basic_ofstream@DU?$char_traits@D@std@@@std@@")
569 DEFINE_RTTI_DATA4(basic_ofstream_wchar, sizeof(basic_ofstream_wchar),
570 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
571 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
572 ".?AV?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@")
573 DEFINE_RTTI_DATA4(basic_ofstream_short, sizeof(basic_ofstream_wchar),
574 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
575 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
576 ".?AV?$basic_ofstream@GU?$char_traits@G@std@@@std@@")
577 DEFINE_RTTI_DATA4(basic_ifstream_char, sizeof(basic_ifstream_char),
578 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
579 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
580 ".?AV?$basic_ifstream@DU?$char_traits@D@std@@@std@@")
581 DEFINE_RTTI_DATA4(basic_ifstream_wchar, sizeof(basic_ifstream_wchar),
582 &basic_istream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
583 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
584 ".?AV?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@")
585 DEFINE_RTTI_DATA4(basic_ifstream_short, sizeof(basic_ifstream_wchar),
586 &basic_istream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
587 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
588 ".?AV?$basic_ifstream@GU?$char_traits@G@std@@@std@@")
589 DEFINE_RTTI_DATA8(basic_fstream_char, sizeof(basic_fstream_char),
590 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
591 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
592 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
593 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
594 ".?AV?$basic_fstream@DU?$char_traits@D@std@@@std@@")
595 DEFINE_RTTI_DATA8(basic_fstream_wchar, sizeof(basic_fstream_wchar),
596 &basic_istream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
597 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
598 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
599 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
600 ".?AV?$basic_fstream@_WU?$char_traits@_W@std@@@std@@")
601 DEFINE_RTTI_DATA8(basic_fstream_short, sizeof(basic_fstream_wchar),
602 &basic_istream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
603 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
604 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
605 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
606 ".?AV?$basic_fstream@GU?$char_traits@G@std@@@std@@")
607 DEFINE_RTTI_DATA4(basic_ostringstream_char, sizeof(basic_ostringstream_char),
608 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
609 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
610 ".?AV?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@")
611 DEFINE_RTTI_DATA4(basic_ostringstream_wchar, sizeof(basic_ostringstream_wchar),
612 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
613 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
614 ".?AV?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@")
615 DEFINE_RTTI_DATA4(basic_ostringstream_short, sizeof(basic_ostringstream_wchar),
616 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
617 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
618 ".?AV?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@")
619 DEFINE_RTTI_DATA4(basic_istringstream_char, sizeof(basic_istringstream_char),
620 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
621 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
622 ".?AV?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@")
623 DEFINE_RTTI_DATA4(basic_istringstream_wchar, sizeof(basic_istringstream_wchar),
624 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
625 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
626 ".?AV?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@")
627 DEFINE_RTTI_DATA4(basic_istringstream_short, sizeof(basic_istringstream_wchar),
628 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
629 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
630 ".?AV?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@")
631 DEFINE_RTTI_DATA8(basic_stringstream_char, sizeof(basic_stringstream_char),
632 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
633 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
634 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
635 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
636 ".?AV?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@")
637 DEFINE_RTTI_DATA8(basic_stringstream_wchar, sizeof(basic_stringstream_wchar),
638 &basic_istream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
639 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
640 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
641 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
642 ".?AV?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@")
643 DEFINE_RTTI_DATA8(basic_stringstream_short, sizeof(basic_stringstream_wchar),
644 &basic_istream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
645 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
646 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
647 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
648 ".?AV?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@")
649 DEFINE_RTTI_DATA1(strstreambuf, sizeof(strstreambuf),
650 &basic_streambuf_char_rtti_base_descriptor, ".?AVstrstreambuf@std@@")
651 DEFINE_RTTI_DATA4(ostrstream, sizeof(ostrstream),
652 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
653 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
654 "?AVostrstream@std@@")
655 DEFINE_RTTI_DATA8(strstream, sizeof(strstream),
656 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
657 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
658 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
659 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
660 "?AVstrstream@std@@")
663 void __asm_dummy_vtables(void) {
666 VTABLE_ADD_FUNC(iosb_vector_dtor));
667 __ASM_VTABLE(ios_base,
668 VTABLE_ADD_FUNC(ios_base_vector_dtor));
669 __ASM_VTABLE(basic_ios_char,
670 VTABLE_ADD_FUNC(basic_ios_char_vector_dtor));
671 __ASM_VTABLE(basic_ios_wchar,
672 VTABLE_ADD_FUNC(basic_ios_wchar_vector_dtor));
673 __ASM_VTABLE(basic_ios_short,
674 VTABLE_ADD_FUNC(basic_ios_wchar_vector_dtor));
675 __ASM_VTABLE(basic_streambuf_char,
676 VTABLE_ADD_FUNC(basic_streambuf_char_vector_dtor)
677 VTABLE_ADD_FUNC(basic_streambuf_char_overflow)
678 VTABLE_ADD_FUNC(basic_streambuf_char_pbackfail)
679 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc)
680 VTABLE_ADD_FUNC(basic_streambuf_char_underflow)
681 VTABLE_ADD_FUNC(basic_streambuf_char_uflow)
682 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn)
683 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn)
684 VTABLE_ADD_FUNC(basic_streambuf_char_seekoff)
685 VTABLE_ADD_FUNC(basic_streambuf_char_seekpos)
686 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf)
687 VTABLE_ADD_FUNC(basic_streambuf_char_sync)
688 VTABLE_ADD_FUNC(basic_streambuf_char_imbue));
689 __ASM_VTABLE(basic_streambuf_wchar,
690 VTABLE_ADD_FUNC(basic_streambuf_wchar_vector_dtor)
691 VTABLE_ADD_FUNC(basic_streambuf_wchar_overflow)
692 VTABLE_ADD_FUNC(basic_streambuf_wchar_pbackfail)
693 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
694 VTABLE_ADD_FUNC(basic_streambuf_wchar_underflow)
695 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow)
696 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
697 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
698 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekoff)
699 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekpos)
700 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf)
701 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync)
702 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
703 __ASM_VTABLE(basic_streambuf_short,
704 VTABLE_ADD_FUNC(basic_streambuf_wchar_vector_dtor)
705 VTABLE_ADD_FUNC(basic_streambuf_wchar_overflow)
706 VTABLE_ADD_FUNC(basic_streambuf_wchar_pbackfail)
707 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
708 VTABLE_ADD_FUNC(basic_streambuf_wchar_underflow)
709 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow)
710 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
711 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
712 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekoff)
713 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekpos)
714 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf)
715 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync)
716 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
717 __ASM_VTABLE(basic_filebuf_char,
718 VTABLE_ADD_FUNC(basic_filebuf_char_vector_dtor)
719 VTABLE_ADD_FUNC(basic_filebuf_char_overflow)
720 VTABLE_ADD_FUNC(basic_filebuf_char_pbackfail)
721 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc)
722 VTABLE_ADD_FUNC(basic_filebuf_char_underflow)
723 VTABLE_ADD_FUNC(basic_filebuf_char_uflow)
724 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn)
725 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn)
726 VTABLE_ADD_FUNC(basic_filebuf_char_seekoff)
727 VTABLE_ADD_FUNC(basic_filebuf_char_seekpos)
728 VTABLE_ADD_FUNC(basic_filebuf_char_setbuf)
729 VTABLE_ADD_FUNC(basic_filebuf_char_sync)
730 VTABLE_ADD_FUNC(basic_filebuf_char_imbue));
731 __ASM_VTABLE(basic_filebuf_wchar,
732 VTABLE_ADD_FUNC(basic_filebuf_wchar_vector_dtor)
733 VTABLE_ADD_FUNC(basic_filebuf_wchar_overflow)
734 VTABLE_ADD_FUNC(basic_filebuf_wchar_pbackfail)
735 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
736 VTABLE_ADD_FUNC(basic_filebuf_wchar_underflow)
737 VTABLE_ADD_FUNC(basic_filebuf_wchar_uflow)
738 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
739 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
740 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekoff)
741 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekpos)
742 VTABLE_ADD_FUNC(basic_filebuf_wchar_setbuf)
743 VTABLE_ADD_FUNC(basic_filebuf_wchar_sync)
744 VTABLE_ADD_FUNC(basic_filebuf_wchar_imbue));
745 __ASM_VTABLE(basic_filebuf_short,
746 VTABLE_ADD_FUNC(basic_filebuf_wchar_vector_dtor)
747 VTABLE_ADD_FUNC(basic_filebuf_wchar_overflow)
748 VTABLE_ADD_FUNC(basic_filebuf_wchar_pbackfail)
749 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
750 VTABLE_ADD_FUNC(basic_filebuf_wchar_underflow)
751 VTABLE_ADD_FUNC(basic_filebuf_wchar_uflow)
752 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
753 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
754 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekoff)
755 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekpos)
756 VTABLE_ADD_FUNC(basic_filebuf_short_setbuf)
757 VTABLE_ADD_FUNC(basic_filebuf_wchar_sync)
758 VTABLE_ADD_FUNC(basic_filebuf_short_imbue));
759 __ASM_VTABLE(basic_stringbuf_char,
760 VTABLE_ADD_FUNC(basic_stringbuf_char_vector_dtor)
761 VTABLE_ADD_FUNC(basic_stringbuf_char_overflow)
762 VTABLE_ADD_FUNC(basic_stringbuf_char_pbackfail)
763 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc)
764 VTABLE_ADD_FUNC(basic_stringbuf_char_underflow)
765 VTABLE_ADD_FUNC(basic_streambuf_char_uflow)
766 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn)
767 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn)
768 VTABLE_ADD_FUNC(basic_stringbuf_char_seekoff)
769 VTABLE_ADD_FUNC(basic_stringbuf_char_seekpos)
770 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf)
771 VTABLE_ADD_FUNC(basic_streambuf_char_sync)
772 VTABLE_ADD_FUNC(basic_streambuf_char_imbue));
773 __ASM_VTABLE(basic_stringbuf_wchar,
774 VTABLE_ADD_FUNC(basic_stringbuf_wchar_vector_dtor)
775 VTABLE_ADD_FUNC(basic_stringbuf_wchar_overflow)
776 VTABLE_ADD_FUNC(basic_stringbuf_wchar_pbackfail)
777 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
778 VTABLE_ADD_FUNC(basic_stringbuf_wchar_underflow)
779 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow)
780 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
781 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
782 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekoff)
783 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekpos)
784 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf)
785 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync)
786 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
787 __ASM_VTABLE(basic_stringbuf_short,
788 VTABLE_ADD_FUNC(basic_stringbuf_wchar_vector_dtor)
789 VTABLE_ADD_FUNC(basic_stringbuf_wchar_overflow)
790 VTABLE_ADD_FUNC(basic_stringbuf_wchar_pbackfail)
791 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
792 VTABLE_ADD_FUNC(basic_stringbuf_wchar_underflow)
793 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow)
794 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
795 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
796 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekoff)
797 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekpos)
798 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf)
799 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync)
800 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
801 __ASM_VTABLE(basic_ostream_char,
802 VTABLE_ADD_FUNC(basic_ostream_char_vector_dtor));
803 __ASM_VTABLE(basic_ostream_wchar,
804 VTABLE_ADD_FUNC(basic_ostream_wchar_vector_dtor));
805 __ASM_VTABLE(basic_ostream_short,
806 VTABLE_ADD_FUNC(basic_ostream_wchar_vector_dtor));
807 __ASM_VTABLE(basic_istream_char,
808 VTABLE_ADD_FUNC(basic_istream_char_vector_dtor));
809 __ASM_VTABLE(basic_istream_wchar,
810 VTABLE_ADD_FUNC(basic_istream_wchar_vector_dtor));
811 __ASM_VTABLE(basic_istream_short,
812 VTABLE_ADD_FUNC(basic_istream_wchar_vector_dtor));
813 __ASM_VTABLE(basic_iostream_char,
814 VTABLE_ADD_FUNC(basic_iostream_char_vector_dtor));
815 __ASM_VTABLE(basic_iostream_wchar,
816 VTABLE_ADD_FUNC(basic_iostream_wchar_vector_dtor));
817 __ASM_VTABLE(basic_iostream_short,
818 VTABLE_ADD_FUNC(basic_iostream_wchar_vector_dtor));
819 __ASM_VTABLE(basic_ofstream_char,
820 VTABLE_ADD_FUNC(basic_ofstream_char_vector_dtor));
821 __ASM_VTABLE(basic_ofstream_wchar,
822 VTABLE_ADD_FUNC(basic_ofstream_wchar_vector_dtor));
823 __ASM_VTABLE(basic_ofstream_short,
824 VTABLE_ADD_FUNC(basic_ofstream_wchar_vector_dtor));
825 __ASM_VTABLE(basic_ifstream_char,
826 VTABLE_ADD_FUNC(basic_ifstream_char_vector_dtor));
827 __ASM_VTABLE(basic_ifstream_wchar,
828 VTABLE_ADD_FUNC(basic_ifstream_wchar_vector_dtor));
829 __ASM_VTABLE(basic_ifstream_short,
830 VTABLE_ADD_FUNC(basic_ifstream_wchar_vector_dtor));
831 __ASM_VTABLE(basic_fstream_char,
832 VTABLE_ADD_FUNC(basic_fstream_char_vector_dtor));
833 __ASM_VTABLE(basic_fstream_wchar,
834 VTABLE_ADD_FUNC(basic_fstream_wchar_vector_dtor));
835 __ASM_VTABLE(basic_fstream_short,
836 VTABLE_ADD_FUNC(basic_fstream_wchar_vector_dtor));
837 __ASM_VTABLE(basic_ostringstream_char,
838 VTABLE_ADD_FUNC(basic_ostringstream_char_vector_dtor));
839 __ASM_VTABLE(basic_ostringstream_wchar,
840 VTABLE_ADD_FUNC(basic_ostringstream_wchar_vector_dtor));
841 __ASM_VTABLE(basic_ostringstream_short,
842 VTABLE_ADD_FUNC(basic_ostringstream_wchar_vector_dtor));
843 __ASM_VTABLE(basic_istringstream_char,
844 VTABLE_ADD_FUNC(basic_istringstream_char_vector_dtor));
845 __ASM_VTABLE(basic_istringstream_wchar,
846 VTABLE_ADD_FUNC(basic_istringstream_wchar_vector_dtor));
847 __ASM_VTABLE(basic_istringstream_short,
848 VTABLE_ADD_FUNC(basic_istringstream_wchar_vector_dtor));
849 __ASM_VTABLE(basic_stringstream_char,
850 VTABLE_ADD_FUNC(basic_stringstream_char_vector_dtor));
851 __ASM_VTABLE(basic_stringstream_wchar,
852 VTABLE_ADD_FUNC(basic_stringstream_wchar_vector_dtor));
853 __ASM_VTABLE(basic_stringstream_short,
854 VTABLE_ADD_FUNC(basic_stringstream_wchar_vector_dtor));
855 __ASM_VTABLE(strstreambuf,
856 VTABLE_ADD_FUNC(strstreambuf_vector_dtor)
857 VTABLE_ADD_FUNC(strstreambuf_overflow)
858 VTABLE_ADD_FUNC(strstreambuf_pbackfail)
859 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc)
860 VTABLE_ADD_FUNC(strstreambuf_underflow)
861 VTABLE_ADD_FUNC(basic_streambuf_char_uflow)
862 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn)
863 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn)
864 VTABLE_ADD_FUNC(strstreambuf_seekoff)
865 VTABLE_ADD_FUNC(strstreambuf_seekpos)
866 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf)
867 VTABLE_ADD_FUNC(basic_streambuf_char_sync)
868 VTABLE_ADD_FUNC(basic_streambuf_char_imbue));
869 __ASM_VTABLE(ostrstream,
870 VTABLE_ADD_FUNC(ostrstream_vector_dtor));
871 __ASM_VTABLE(strstream,
872 VTABLE_ADD_FUNC(strstream_vector_dtor));
877 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
878 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
879 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp_next, 16)
880 void __thiscall basic_streambuf_char_setp_next(basic_streambuf_char *this, char *first, char *next, char *last)
882 TRACE("(%p %p %p %p)\n", this, first, next, last);
886 this->wsize = last-next;
889 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD0@Z */
890 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD0@Z */
891 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp, 12)
892 void __thiscall basic_streambuf_char_setp(basic_streambuf_char *this, char *first, char *last)
894 basic_streambuf_char_setp_next(this, first, first, last);
897 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
898 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
899 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setg, 16)
900 void __thiscall basic_streambuf_char_setg(basic_streambuf_char *this, char *first, char *next, char *last)
902 TRACE("(%p %p %p %p)\n", this, first, next, last);
906 this->rsize = last-next;
909 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXXZ */
910 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXXZ */
911 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init_empty, 4)
912 void __thiscall basic_streambuf_char__Init_empty(basic_streambuf_char *this)
914 TRACE("(%p)\n", this);
916 this->prbuf = &this->rbuf;
917 this->pwbuf = &this->wbuf;
918 this->prpos = &this->rpos;
919 this->pwpos = &this->wpos;
920 this->prsize = &this->rsize;
921 this->pwsize = &this->wsize;
923 basic_streambuf_char_setp(this, NULL, NULL);
924 basic_streambuf_char_setg(this, NULL, NULL, NULL);
927 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@W4_Uninitialized@1@@Z */
928 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
929 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor_uninitialized, 8)
930 basic_streambuf_char* __thiscall basic_streambuf_char_ctor_uninitialized(basic_streambuf_char *this, int uninitialized)
932 TRACE("(%p %d)\n", this, uninitialized);
933 this->vtable = &MSVCP_basic_streambuf_char_vtable;
934 mutex_ctor(&this->lock);
938 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@XZ */
939 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@XZ */
940 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor, 4)
941 basic_streambuf_char* __thiscall basic_streambuf_char_ctor(basic_streambuf_char *this)
943 TRACE("(%p)\n", this);
945 this->vtable = &MSVCP_basic_streambuf_char_vtable;
946 mutex_ctor(&this->lock);
947 this->loc = MSVCRT_operator_new(sizeof(locale));
948 locale_ctor(this->loc);
949 basic_streambuf_char__Init_empty(this);
954 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
955 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
956 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_dtor, 4)
957 void __thiscall basic_streambuf_char_dtor(basic_streambuf_char *this)
959 TRACE("(%p)\n", this);
961 mutex_dtor(&this->lock);
962 locale_dtor(this->loc);
963 MSVCRT_operator_delete(this->loc);
966 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_vector_dtor, 8)
967 basic_streambuf_char* __thiscall basic_streambuf_char_vector_dtor(basic_streambuf_char *this, unsigned int flags)
969 TRACE("(%p %x)\n", this, flags);
971 /* we have an array, with the number of elements stored before the first object */
972 INT_PTR i, *ptr = (INT_PTR *)this-1;
974 for(i=*ptr-1; i>=0; i--)
975 basic_streambuf_char_dtor(this+i);
976 MSVCRT_operator_delete(ptr);
978 basic_streambuf_char_dtor(this);
980 MSVCRT_operator_delete(this);
986 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
987 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
988 static streamsize basic_streambuf_char__Gnavail(const basic_streambuf_char *this)
990 TRACE("(%p)\n", this);
991 return *this->prpos ? *this->prsize : 0;
994 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
995 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
996 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gndec, 4)
997 char* __thiscall basic_streambuf_char__Gndec(basic_streambuf_char *this)
999 TRACE("(%p)\n", this);
1002 return *this->prpos;
1005 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
1006 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
1007 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gninc, 4)
1008 char* __thiscall basic_streambuf_char__Gninc(basic_streambuf_char *this)
1010 TRACE("(%p)\n", this);
1012 return (*this->prpos)++;
1015 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
1016 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
1017 static char* basic_streambuf_char__Gnpreinc(basic_streambuf_char *this)
1019 TRACE("(%p)\n", this);
1022 return *this->prpos;
1025 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAPAD0PAH001@Z */
1026 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAPEAD0PEAH001@Z */
1027 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init, 28)
1028 void __thiscall basic_streambuf_char__Init(basic_streambuf_char *this, char **gf, char **gn, int *gc, char **pf, char **pn, int *pc)
1030 TRACE("(%p %p %p %p %p %p %p)\n", this, gf, gn, gc, pf, pn, pc);
1040 /* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1041 /* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1042 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Lock, 4)
1043 void __thiscall basic_streambuf_char__Lock(basic_streambuf_char *this)
1045 TRACE("(%p)\n", this);
1046 mutex_lock(&this->lock);
1049 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
1050 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
1051 static streamsize basic_streambuf_char__Pnavail(const basic_streambuf_char *this)
1053 TRACE("(%p)\n", this);
1054 return *this->pwpos ? *this->pwsize : 0;
1057 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
1058 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
1059 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Pninc, 4)
1060 char* __thiscall basic_streambuf_char__Pninc(basic_streambuf_char *this)
1062 TRACE("(%p)\n", this);
1064 return (*this->pwpos)++;
1067 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1068 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
1069 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_underflow, 4)
1070 #define call_basic_streambuf_char_underflow(this) CALL_VTBL_FUNC(this, 16, \
1071 int, (basic_streambuf_char*), (this))
1072 int __thiscall basic_streambuf_char_underflow(basic_streambuf_char *this)
1074 TRACE("(%p)\n", this);
1078 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1079 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
1080 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_uflow, 4)
1081 #define call_basic_streambuf_char_uflow(this) CALL_VTBL_FUNC(this, 20, \
1082 int, (basic_streambuf_char*), (this))
1083 int __thiscall basic_streambuf_char_uflow(basic_streambuf_char *this)
1087 TRACE("(%p)\n", this);
1089 if(call_basic_streambuf_char_underflow(this)==EOF)
1092 ret = (unsigned char)**this->prpos;
1098 /* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADIH@Z */
1099 /* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_K_J@Z */
1100 static streamsize basic_streambuf_char__Xsgetn_s(basic_streambuf_char *this, char *ptr, MSVCP_size_t size, streamsize count)
1102 streamsize copied, chunk;
1105 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
1107 for(copied=0; copied<count && size;) {
1108 chunk = basic_streambuf_char__Gnavail(this);
1109 if(chunk > count-copied)
1110 chunk = count-copied;
1113 memcpy_s(ptr+copied, size, *this->prpos, chunk);
1114 *this->prpos += chunk;
1115 *this->prsize -= chunk;
1118 }else if((c = call_basic_streambuf_char_uflow(this)) != EOF) {
1130 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
1131 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
1132 static streamsize basic_streambuf_char__Sgetn_s(basic_streambuf_char *this, char *ptr, MSVCP_size_t size, streamsize count)
1134 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
1135 return basic_streambuf_char__Xsgetn_s(this, ptr, size, count);
1138 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1139 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1140 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Unlock, 4)
1141 void __thiscall basic_streambuf_char__Unlock(basic_streambuf_char *this)
1143 TRACE("(%p)\n", this);
1144 mutex_unlock(&this->lock);
1147 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1148 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1149 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_eback, 4)
1150 char* __thiscall basic_streambuf_char_eback(const basic_streambuf_char *this)
1152 TRACE("(%p)\n", this);
1153 return *this->prbuf;
1156 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1157 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1158 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gptr, 4)
1159 char* __thiscall basic_streambuf_char_gptr(const basic_streambuf_char *this)
1161 TRACE("(%p)\n", this);
1162 return *this->prpos;
1165 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1166 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1167 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_egptr, 4)
1168 char* __thiscall basic_streambuf_char_egptr(const basic_streambuf_char *this)
1170 TRACE("(%p)\n", this);
1171 return *this->prpos+*this->prsize;
1174 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1175 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1176 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_epptr, 4)
1177 char* __thiscall basic_streambuf_char_epptr(const basic_streambuf_char *this)
1179 TRACE("(%p)\n", this);
1180 return *this->pwpos+*this->pwsize;
1183 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
1184 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
1185 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gbump, 8)
1186 void __thiscall basic_streambuf_char_gbump(basic_streambuf_char *this, int off)
1188 TRACE("(%p %d)\n", this, off);
1189 *this->prpos += off;
1190 *this->prsize -= off;
1193 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QBE?AVlocale@2@XZ */
1194 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEBA?AVlocale@2@XZ */
1195 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_getloc, 8)
1196 locale* __thiscall basic_streambuf_char_getloc(const basic_streambuf_char *this, locale *ret)
1198 TRACE("(%p)\n", this);
1199 return locale_copy_ctor(ret, this->loc);
1202 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
1203 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */
1204 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_imbue, 8)
1205 #define call_basic_streambuf_char_imbue(this, loc) CALL_VTBL_FUNC(this, 48, \
1206 void, (basic_streambuf_char*, const locale*), (this, loc))
1207 void __thiscall basic_streambuf_char_imbue(basic_streambuf_char *this, const locale *loc)
1209 TRACE("(%p %p)\n", this, loc);
1212 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
1213 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
1214 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_overflow, 8)
1215 #define call_basic_streambuf_char_overflow(this, ch) CALL_VTBL_FUNC(this, 4, \
1216 int, (basic_streambuf_char*, int), (this, ch))
1217 int __thiscall basic_streambuf_char_overflow(basic_streambuf_char *this, int ch)
1219 TRACE("(%p %d)\n", this, ch);
1223 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
1224 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
1225 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbackfail, 8)
1226 #define call_basic_streambuf_char_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, \
1227 int, (basic_streambuf_char*, int), (this, ch))
1228 int __thiscall basic_streambuf_char_pbackfail(basic_streambuf_char *this, int ch)
1230 TRACE("(%p %d)\n", this, ch);
1234 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1235 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1236 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbase, 4)
1237 char* __thiscall basic_streambuf_char_pbase(const basic_streambuf_char *this)
1239 TRACE("(%p)\n", this);
1240 return *this->pwbuf;
1243 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
1244 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
1245 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbump, 8)
1246 void __thiscall basic_streambuf_char_pbump(basic_streambuf_char *this, int off)
1248 TRACE("(%p %d)\n", this, off);
1249 *this->pwpos += off;
1250 *this->pwsize -= off;
1253 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1254 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1255 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pptr, 4)
1256 char* __thiscall basic_streambuf_char_pptr(const basic_streambuf_char *this)
1258 TRACE("(%p)\n", this);
1259 return *this->pwpos;
1262 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1263 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1264 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubimbue, 12)
1265 locale* __thiscall basic_streambuf_char_pubimbue(basic_streambuf_char *this, locale *ret, const locale *loc)
1267 TRACE("(%p %p)\n", this, loc);
1268 memcpy(ret, this->loc, sizeof(locale));
1269 call_basic_streambuf_char_imbue(this, loc);
1270 locale_copy_ctor(this->loc, loc);
1274 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1275 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1276 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekoff, 20)
1277 #define call_basic_streambuf_char_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 32, \
1278 fpos_int*, (basic_streambuf_char*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
1279 fpos_int* __thiscall basic_streambuf_char_seekoff(basic_streambuf_char *this,
1280 fpos_int *ret, streamoff off, int way, int mode)
1282 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
1289 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
1290 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
1291 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekoff, 20)
1292 fpos_int* __thiscall basic_streambuf_char_pubseekoff(basic_streambuf_char *this,
1293 fpos_int *ret, streamoff off, int way, int mode)
1295 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
1296 return call_basic_streambuf_char_seekoff(this, ret, off, way, mode);
1299 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */
1300 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */
1301 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekoff_old, 20)
1302 fpos_int* __thiscall basic_streambuf_char_pubseekoff_old(basic_streambuf_char *this,
1303 fpos_int *ret, streamoff off, unsigned int way, unsigned int mode)
1305 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
1306 return basic_streambuf_char_pubseekoff(this, ret, off, way, mode);
1309 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
1310 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
1311 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekpos, 36)
1312 #define call_basic_streambuf_char_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 36, \
1313 fpos_int*, (basic_streambuf_char*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
1314 fpos_int* __thiscall basic_streambuf_char_seekpos(basic_streambuf_char *this,
1315 fpos_int *ret, fpos_int pos, int mode)
1317 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
1324 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
1325 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
1326 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekpos, 36)
1327 fpos_int* __thiscall basic_streambuf_char_pubseekpos(basic_streambuf_char *this,
1328 fpos_int *ret, fpos_int pos, int mode)
1330 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
1331 return call_basic_streambuf_char_seekpos(this, ret, pos, mode);
1334 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
1335 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
1336 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekpos_old, 36)
1337 fpos_int* __thiscall basic_streambuf_char_pubseekpos_old(basic_streambuf_char *this,
1338 fpos_int *ret, fpos_int pos, unsigned int mode)
1340 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
1341 return basic_streambuf_char_pubseekpos(this, ret, pos, mode);
1344 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEPAV12@PADH@Z */
1345 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAPEAV12@PEAD_J@Z */
1346 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setbuf, 12)
1347 #define call_basic_streambuf_char_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 40, \
1348 basic_streambuf_char*, (basic_streambuf_char*, char*, streamsize), (this, buf, count))
1349 basic_streambuf_char* __thiscall basic_streambuf_char_setbuf(basic_streambuf_char *this, char *buf, streamsize count)
1351 TRACE("(%p %p %ld)\n", this, buf, count);
1355 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PADH@Z */
1356 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEAD_J@Z */
1357 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsetbuf, 12)
1358 basic_streambuf_char* __thiscall basic_streambuf_char_pubsetbuf(basic_streambuf_char *this, char *buf, streamsize count)
1360 TRACE("(%p %p %ld)\n", this, buf, count);
1361 return call_basic_streambuf_char_setbuf(this, buf, count);
1364 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1365 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
1366 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sync, 4)
1367 #define call_basic_streambuf_char_sync(this) CALL_VTBL_FUNC(this, 44, \
1368 int, (basic_streambuf_char*), (this))
1369 int __thiscall basic_streambuf_char_sync(basic_streambuf_char *this)
1371 TRACE("(%p)\n", this);
1375 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1376 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1377 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsync, 4)
1378 int __thiscall basic_streambuf_char_pubsync(basic_streambuf_char *this)
1380 TRACE("(%p)\n", this);
1381 return call_basic_streambuf_char_sync(this);
1384 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADH@Z */
1385 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_J@Z */
1386 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsgetn, 12)
1387 #define call_basic_streambuf_char_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, \
1388 streamsize, (basic_streambuf_char*, char*, streamsize), (this, ptr, count))
1389 streamsize __thiscall basic_streambuf_char_xsgetn(basic_streambuf_char *this, char *ptr, streamsize count)
1391 TRACE("(%p %p %ld)\n", this, ptr, count);
1392 return basic_streambuf_char__Xsgetn_s(this, ptr, -1, count);
1395 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
1396 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
1397 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetn, 12)
1398 streamsize __thiscall basic_streambuf_char_sgetn(basic_streambuf_char *this, char *ptr, streamsize count)
1400 TRACE("(%p %p %ld)\n", this, ptr, count);
1401 return call_basic_streambuf_char_xsgetn(this, ptr, count);
1404 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1405 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JXZ */
1406 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_showmanyc, 4)
1407 #define call_basic_streambuf_char_showmanyc(this) CALL_VTBL_FUNC(this, 12, \
1408 streamsize, (basic_streambuf_char*), (this))
1409 streamsize __thiscall basic_streambuf_char_showmanyc(basic_streambuf_char *this)
1411 TRACE("(%p)\n", this);
1415 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1416 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JXZ */
1417 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_in_avail, 4)
1418 streamsize __thiscall basic_streambuf_char_in_avail(basic_streambuf_char *this)
1422 TRACE("(%p)\n", this);
1424 ret = basic_streambuf_char__Gnavail(this);
1425 return ret ? ret : call_basic_streambuf_char_showmanyc(this);
1428 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
1429 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
1430 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputbackc, 8)
1431 int __thiscall basic_streambuf_char_sputbackc(basic_streambuf_char *this, char ch)
1433 TRACE("(%p %d)\n", this, ch);
1434 if(*this->prpos && *this->prpos>*this->prbuf && (*this->prpos)[-1]==ch) {
1437 return (unsigned char)ch;
1440 return call_basic_streambuf_char_pbackfail(this, (unsigned char)ch);
1443 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
1444 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
1445 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputc, 8)
1446 int __thiscall basic_streambuf_char_sputc(basic_streambuf_char *this, char ch)
1448 TRACE("(%p %d)\n", this, ch);
1449 return basic_streambuf_char__Pnavail(this) ?
1450 (*basic_streambuf_char__Pninc(this) = ch) :
1451 call_basic_streambuf_char_overflow(this, (unsigned char)ch);
1454 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1455 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1456 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sungetc, 4)
1457 int __thiscall basic_streambuf_char_sungetc(basic_streambuf_char *this)
1459 TRACE("(%p)\n", this);
1460 if(*this->prpos && *this->prpos>*this->prbuf) {
1463 return (unsigned char)**this->prpos;
1466 return call_basic_streambuf_char_pbackfail(this, EOF);
1469 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1470 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1471 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_stossc, 4)
1472 void __thiscall basic_streambuf_char_stossc(basic_streambuf_char *this)
1474 TRACE("(%p)\n", this);
1475 if(basic_streambuf_char__Gnavail(this))
1476 basic_streambuf_char__Gninc(this);
1478 call_basic_streambuf_char_uflow(this);
1481 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1482 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1483 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sbumpc, 4)
1484 int __thiscall basic_streambuf_char_sbumpc(basic_streambuf_char *this)
1486 TRACE("(%p)\n", this);
1487 return basic_streambuf_char__Gnavail(this) ?
1488 (int)(unsigned char)*basic_streambuf_char__Gninc(this) : call_basic_streambuf_char_uflow(this);
1491 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1492 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1493 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetc, 4)
1494 int __thiscall basic_streambuf_char_sgetc(basic_streambuf_char *this)
1496 TRACE("(%p)\n", this);
1497 return basic_streambuf_char__Gnavail(this) ?
1498 (int)(unsigned char)*basic_streambuf_char_gptr(this) : call_basic_streambuf_char_underflow(this);
1501 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1502 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1503 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_snextc, 4)
1504 int __thiscall basic_streambuf_char_snextc(basic_streambuf_char *this)
1506 TRACE("(%p)\n", this);
1508 if(basic_streambuf_char__Gnavail(this) > 1)
1509 return (unsigned char)*basic_streambuf_char__Gnpreinc(this);
1510 return basic_streambuf_char_sbumpc(this)==EOF ?
1511 EOF : basic_streambuf_char_sgetc(this);
1514 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPBDH@Z */
1515 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEBD_J@Z */
1516 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsputn, 12)
1517 #define call_basic_streambuf_char_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 28, \
1518 streamsize, (basic_streambuf_char*, const char*, streamsize), (this, ptr, count))
1519 streamsize __thiscall basic_streambuf_char_xsputn(basic_streambuf_char *this, const char *ptr, streamsize count)
1521 streamsize copied, chunk;
1523 TRACE("(%p %p %ld)\n", this, ptr, count);
1525 for(copied=0; copied<count;) {
1526 chunk = basic_streambuf_char__Pnavail(this);
1527 if(chunk > count-copied)
1528 chunk = count-copied;
1531 memcpy(*this->pwpos, ptr+copied, chunk);
1532 *this->pwpos += chunk;
1533 *this->pwsize -= chunk;
1535 }else if(call_basic_streambuf_char_overflow(this, (unsigned char)ptr[copied]) != EOF) {
1545 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z */
1546 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEBD_J@Z */
1547 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputn, 12)
1548 streamsize __thiscall basic_streambuf_char_sputn(basic_streambuf_char *this, const char *ptr, streamsize count)
1550 TRACE("(%p %p %ld)\n", this, ptr, count);
1551 return call_basic_streambuf_char_xsputn(this, ptr, count);
1554 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */
1555 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */
1556 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
1557 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1558 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp_next, 16)
1559 void __thiscall basic_streambuf_wchar_setp_next(basic_streambuf_wchar *this, wchar_t *first, wchar_t *next, wchar_t *last)
1561 TRACE("(%p %p %p %p)\n", this, first, next, last);
1565 this->wsize = last-next;
1568 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W0@Z */
1569 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W0@Z */
1570 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG0@Z */
1571 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG0@Z */
1572 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp, 12)
1573 void __thiscall basic_streambuf_wchar_setp(basic_streambuf_wchar *this, wchar_t *first, wchar_t *last)
1575 basic_streambuf_wchar_setp_next(this, first, first, last);
1578 /* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */
1579 /* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */
1580 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
1581 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1582 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setg, 16)
1583 void __thiscall basic_streambuf_wchar_setg(basic_streambuf_wchar *this, wchar_t *first, wchar_t *next, wchar_t *last)
1585 TRACE("(%p %p %p %p)\n", this, first, next, last);
1589 this->rsize = last-next;
1592 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXXZ */
1593 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXXZ */
1594 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXXZ */
1595 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXXZ */
1596 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init_empty, 4)
1597 void __thiscall basic_streambuf_wchar__Init_empty(basic_streambuf_wchar *this)
1599 TRACE("(%p)\n", this);
1601 this->prbuf = &this->rbuf;
1602 this->pwbuf = &this->wbuf;
1603 this->prpos = &this->rpos;
1604 this->pwpos = &this->wpos;
1605 this->prsize = &this->rsize;
1606 this->pwsize = &this->wsize;
1608 basic_streambuf_wchar_setp(this, NULL, NULL);
1609 basic_streambuf_wchar_setg(this, NULL, NULL, NULL);
1612 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@W4_Uninitialized@1@@Z */
1613 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
1614 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_ctor_uninitialized, 8)
1615 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_ctor_uninitialized(basic_streambuf_wchar *this, int uninitialized)
1617 TRACE("(%p %d)\n", this, uninitialized);
1618 this->vtable = &MSVCP_basic_streambuf_wchar_vtable;
1619 mutex_ctor(&this->lock);
1623 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@W4_Uninitialized@1@@Z */
1624 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
1625 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor_uninitialized, 8)
1626 basic_streambuf_wchar* __thiscall basic_streambuf_short_ctor_uninitialized(basic_streambuf_wchar *this, int uninitialized)
1628 TRACE("(%p %d)\n", this, uninitialized);
1629 basic_streambuf_wchar_ctor_uninitialized(this, uninitialized);
1630 this->vtable = &MSVCP_basic_streambuf_short_vtable;
1634 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@XZ */
1635 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */
1636 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_ctor, 4)
1637 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_ctor(basic_streambuf_wchar *this)
1639 TRACE("(%p)\n", this);
1641 this->vtable = &MSVCP_basic_streambuf_wchar_vtable;
1642 mutex_ctor(&this->lock);
1643 this->loc = MSVCRT_operator_new(sizeof(locale));
1644 locale_ctor(this->loc);
1645 basic_streambuf_wchar__Init_empty(this);
1650 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@XZ */
1651 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@XZ */
1652 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor, 4)
1653 basic_streambuf_wchar* __thiscall basic_streambuf_short_ctor(basic_streambuf_wchar *this)
1655 TRACE("(%p)\n", this);
1656 basic_streambuf_wchar_ctor(this);
1657 this->vtable = &MSVCP_basic_streambuf_short_vtable;
1661 /* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
1662 /* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
1663 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UAE@XZ */
1664 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */
1665 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_dtor, 4)
1666 void __thiscall basic_streambuf_wchar_dtor(basic_streambuf_wchar *this)
1668 TRACE("(%p)\n", this);
1670 mutex_dtor(&this->lock);
1671 locale_dtor(this->loc);
1672 MSVCRT_operator_delete(this->loc);
1675 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_vector_dtor, 8)
1676 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_vector_dtor(basic_streambuf_wchar *this, unsigned int flags)
1678 TRACE("(%p %x)\n", this, flags);
1680 /* we have an array, with the number of elements stored before the first object */
1681 INT_PTR i, *ptr = (INT_PTR *)this-1;
1683 for(i=*ptr-1; i>=0; i--)
1684 basic_streambuf_wchar_dtor(this+i);
1685 MSVCRT_operator_delete(ptr);
1687 basic_streambuf_wchar_dtor(this);
1689 MSVCRT_operator_delete(this);
1695 /* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */
1696 /* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */
1697 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1698 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1699 static streamsize basic_streambuf_wchar__Gnavail(const basic_streambuf_wchar *this)
1701 TRACE("(%p)\n", this);
1702 return *this->prpos ? *this->prsize : 0;
1705 /* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1706 /* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1707 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1708 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1709 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gndec, 4)
1710 wchar_t* __thiscall basic_streambuf_wchar__Gndec(basic_streambuf_wchar *this)
1712 TRACE("(%p)\n", this);
1715 return *this->prpos;
1718 /* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1719 /* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1720 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1721 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1722 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gninc, 4)
1723 wchar_t* __thiscall basic_streambuf_wchar__Gninc(basic_streambuf_wchar *this)
1725 TRACE("(%p)\n", this);
1727 return (*this->prpos)++;
1730 /* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1731 /* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1732 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1733 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1734 static wchar_t* basic_streambuf_wchar__Gnpreinc(basic_streambuf_wchar *this)
1736 TRACE("(%p)\n", this);
1739 return *this->prpos;
1742 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPAPA_W0PAH001@Z */
1743 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAPEA_W0PEAH001@Z */
1744 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAPAG0PAH001@Z */
1745 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAPEAG0PEAH001@Z */
1746 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init, 28)
1747 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)
1749 TRACE("(%p %p %p %p %p %p %p)\n", this, gf, gn, gc, pf, pn, pc);
1759 /* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1760 /* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1761 /* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1762 /* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1763 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Lock, 4)
1764 void __thiscall basic_streambuf_wchar__Lock(basic_streambuf_wchar *this)
1766 TRACE("(%p)\n", this);
1767 mutex_lock(&this->lock);
1770 /* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */
1771 /* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */
1772 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1773 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1774 static streamsize basic_streambuf_wchar__Pnavail(const basic_streambuf_wchar *this)
1776 TRACE("(%p)\n", this);
1777 return *this->pwpos ? *this->pwsize : 0;
1780 /* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1781 /* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1782 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1783 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1784 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Pninc, 4)
1785 wchar_t* __thiscall basic_streambuf_wchar__Pninc(basic_streambuf_wchar *this)
1787 TRACE("(%p)\n", this);
1789 return (*this->pwpos)++;
1792 /* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
1793 /* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
1794 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1795 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1796 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_underflow, 4)
1797 #define call_basic_streambuf_wchar_underflow(this) CALL_VTBL_FUNC(this, 16, \
1798 unsigned short, (basic_streambuf_wchar*), (this))
1799 unsigned short __thiscall basic_streambuf_wchar_underflow(basic_streambuf_wchar *this)
1801 TRACE("(%p)\n", this);
1805 /* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
1806 /* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
1807 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1808 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1809 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_uflow, 4)
1810 #define call_basic_streambuf_wchar_uflow(this) CALL_VTBL_FUNC(this, 20, \
1811 unsigned short, (basic_streambuf_wchar*), (this))
1812 unsigned short __thiscall basic_streambuf_wchar_uflow(basic_streambuf_wchar *this)
1816 TRACE("(%p)\n", this);
1818 if(call_basic_streambuf_wchar_underflow(this)==WEOF)
1821 ret = **this->prpos;
1827 /* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WIH@Z */
1828 /* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_K_J@Z */
1829 /* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGIH@Z */
1830 /* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_K_J@Z */
1831 static streamsize basic_streambuf_wchar__Xsgetn_s(basic_streambuf_wchar *this, wchar_t *ptr, MSVCP_size_t size, streamsize count)
1833 streamsize copied, chunk;
1836 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
1838 for(copied=0; copied<count && size;) {
1839 chunk = basic_streambuf_wchar__Gnavail(this);
1840 if(chunk > count-copied)
1841 chunk = count-copied;
1844 memcpy_s(ptr+copied, size, *this->prpos, chunk*sizeof(wchar_t));
1845 *this->prpos += chunk;
1846 *this->prsize -= chunk;
1848 size -= chunk*sizeof(wchar_t);
1849 }else if((c = call_basic_streambuf_wchar_uflow(this)) != WEOF) {
1861 /* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WIH@Z */
1862 /* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_K_J@Z */
1863 /* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGIH@Z */
1864 /* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_K_J@Z */
1865 static streamsize basic_streambuf_wchar__Sgetn_s(basic_streambuf_wchar *this, wchar_t *ptr, MSVCP_size_t size, streamsize count)
1867 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
1868 return basic_streambuf_wchar__Xsgetn_s(this, ptr, size, count);
1871 /* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1872 /* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1873 /* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1874 /* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1875 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Unlock, 4)
1876 void __thiscall basic_streambuf_wchar__Unlock(basic_streambuf_wchar *this)
1878 TRACE("(%p)\n", this);
1879 mutex_unlock(&this->lock);
1882 /* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1883 /* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1884 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1885 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1886 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_eback, 4)
1887 wchar_t* __thiscall basic_streambuf_wchar_eback(const basic_streambuf_wchar *this)
1889 TRACE("(%p)\n", this);
1890 return *this->prbuf;
1893 /* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1894 /* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1895 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1896 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1897 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gptr, 4)
1898 wchar_t* __thiscall basic_streambuf_wchar_gptr(const basic_streambuf_wchar *this)
1900 TRACE("(%p)\n", this);
1901 return *this->prpos;
1904 /* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1905 /* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1906 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1907 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1908 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_egptr, 4)
1909 wchar_t* __thiscall basic_streambuf_wchar_egptr(const basic_streambuf_wchar *this)
1911 TRACE("(%p)\n", this);
1912 return *this->prpos+*this->prsize;
1915 /* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1916 /* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1917 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1918 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1919 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_epptr, 4)
1920 wchar_t* __thiscall basic_streambuf_wchar_epptr(const basic_streambuf_wchar *this)
1922 TRACE("(%p)\n", this);
1923 return *this->pwpos+*this->pwsize;
1926 /* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */
1927 /* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */
1928 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
1929 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
1930 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gbump, 8)
1931 void __thiscall basic_streambuf_wchar_gbump(basic_streambuf_wchar *this, int off)
1933 TRACE("(%p %d)\n", this, off);
1934 *this->prpos += off;
1935 *this->prsize -= off;
1938 /* ?getloc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QBE?AVlocale@2@XZ */
1939 /* ?getloc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEBA?AVlocale@2@XZ */
1940 /* ?getloc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QBE?AVlocale@2@XZ */
1941 /* ?getloc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEBA?AVlocale@2@XZ */
1942 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_getloc, 8)
1943 locale* __thiscall basic_streambuf_wchar_getloc(const basic_streambuf_wchar *this, locale *ret)
1945 TRACE("(%p)\n", this);
1946 return locale_copy_ctor(ret, this->loc);
1949 /* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEXABVlocale@2@@Z */
1950 /* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAXAEBVlocale@2@@Z */
1951 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEXABVlocale@2@@Z */
1952 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAXAEBVlocale@2@@Z */
1953 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_imbue, 8)
1954 #define call_basic_streambuf_wchar_imbue(this, loc) CALL_VTBL_FUNC(this, 48, \
1955 void, (basic_streambuf_wchar*, const locale*), (this, loc))
1956 void __thiscall basic_streambuf_wchar_imbue(basic_streambuf_wchar *this, const locale *loc)
1958 TRACE("(%p %p)\n", this, loc);
1961 /* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
1962 /* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
1963 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1964 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1965 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_overflow, 8)
1966 #define call_basic_streambuf_wchar_overflow(this, ch) CALL_VTBL_FUNC(this, 4, \
1967 unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1968 unsigned short __thiscall basic_streambuf_wchar_overflow(basic_streambuf_wchar *this, unsigned short ch)
1970 TRACE("(%p %d)\n", this, ch);
1974 /* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
1975 /* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
1976 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1977 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1978 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbackfail, 8)
1979 #define call_basic_streambuf_wchar_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, \
1980 unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1981 unsigned short __thiscall basic_streambuf_wchar_pbackfail(basic_streambuf_wchar *this, unsigned short ch)
1983 TRACE("(%p %d)\n", this, ch);
1987 /* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1988 /* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1989 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1990 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1991 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbase, 4)
1992 wchar_t* __thiscall basic_streambuf_wchar_pbase(const basic_streambuf_wchar *this)
1994 TRACE("(%p)\n", this);
1995 return *this->pwbuf;
1998 /* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */
1999 /* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */
2000 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
2001 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
2002 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbump, 8)
2003 void __thiscall basic_streambuf_wchar_pbump(basic_streambuf_wchar *this, int off)
2005 TRACE("(%p %d)\n", this, off);
2006 *this->pwpos += off;
2007 *this->pwsize -= off;
2010 /* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
2011 /* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
2012 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
2013 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
2014 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pptr, 4)
2015 wchar_t* __thiscall basic_streambuf_wchar_pptr(const basic_streambuf_wchar *this)
2017 TRACE("(%p)\n", this);
2018 return *this->pwpos;
2021 /* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
2022 /* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
2023 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
2024 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
2025 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubimbue, 12)
2026 locale* __thiscall basic_streambuf_wchar_pubimbue(basic_streambuf_wchar *this, locale *ret, const locale *loc)
2028 TRACE("(%p %p)\n", this, loc);
2029 memcpy(ret, this->loc, sizeof(locale));
2030 call_basic_streambuf_wchar_imbue(this, loc);
2031 locale_copy_ctor(this->loc, loc);
2035 /* ?seekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
2036 /* ?seekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
2037 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
2038 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
2039 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekoff, 20)
2040 #define call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 32, \
2041 fpos_int*, (basic_streambuf_wchar*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
2042 fpos_int* __thiscall basic_streambuf_wchar_seekoff(basic_streambuf_wchar *this,
2043 fpos_int *ret, streamoff off, int way, int mode)
2045 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
2052 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
2053 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
2054 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
2055 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
2056 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekoff, 20)
2057 fpos_int* __thiscall basic_streambuf_wchar_pubseekoff(basic_streambuf_wchar *this,
2058 fpos_int *ret, streamoff off, int way, int mode)
2060 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
2061 return call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode);
2064 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */
2065 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */
2066 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */
2067 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */
2068 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekoff_old, 20)
2069 fpos_int* __thiscall basic_streambuf_wchar_pubseekoff_old(basic_streambuf_wchar *this,
2070 fpos_int *ret, streamoff off, unsigned int way, unsigned int mode)
2072 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
2073 return basic_streambuf_wchar_pubseekoff(this, ret, off, way, mode);
2076 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2077 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2078 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2079 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2080 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekpos, 36)
2081 #define call_basic_streambuf_wchar_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 36, \
2082 fpos_int*, (basic_streambuf_wchar*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
2083 fpos_int* __thiscall basic_streambuf_wchar_seekpos(basic_streambuf_wchar *this,
2084 fpos_int *ret, fpos_int pos, int mode)
2086 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
2093 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
2094 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
2095 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
2096 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
2097 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos, 36)
2098 fpos_int* __thiscall basic_streambuf_wchar_pubseekpos(basic_streambuf_wchar *this,
2099 fpos_int *ret, fpos_int pos, int mode)
2101 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
2102 return call_basic_streambuf_wchar_seekpos(this, ret, pos, mode);
2105 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
2106 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
2107 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
2108 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
2109 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos_old, 36)
2110 fpos_int* __thiscall basic_streambuf_wchar_pubseekpos_old(basic_streambuf_wchar *this,
2111 fpos_int *ret, fpos_int pos, unsigned int mode)
2113 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
2114 return basic_streambuf_wchar_pubseekpos(this, ret, pos, mode);
2117 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEPAV12@PA_WH@Z */
2118 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAPEAV12@PEA_W_J@Z */
2119 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEPAV12@PAGH@Z */
2120 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAPEAV12@PEAG_J@Z */
2121 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setbuf, 12)
2122 #define call_basic_streambuf_wchar_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 40, \
2123 basic_streambuf_wchar*, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, buf, count))
2124 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_setbuf(basic_streambuf_wchar *this, wchar_t *buf, streamsize count)
2126 TRACE("(%p %p %ld)\n", this, buf, count);
2130 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PA_WH@Z */
2131 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEA_W_J@Z */
2132 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PAGH@Z */
2133 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEAG_J@Z */
2134 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsetbuf, 12)
2135 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_pubsetbuf(basic_streambuf_wchar *this, wchar_t *buf, streamsize count)
2137 TRACE("(%p %p %ld)\n", this, buf, count);
2138 return call_basic_streambuf_wchar_setbuf(this, buf, count);
2141 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
2142 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAHXZ */
2143 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
2144 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */
2145 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sync, 4)
2146 #define call_basic_streambuf_wchar_sync(this) CALL_VTBL_FUNC(this, 44, \
2147 int, (basic_streambuf_wchar*), (this))
2148 int __thiscall basic_streambuf_wchar_sync(basic_streambuf_wchar *this)
2150 TRACE("(%p)\n", this);
2154 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
2155 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAHXZ */
2156 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
2157 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHXZ */
2158 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsync, 4)
2159 int __thiscall basic_streambuf_wchar_pubsync(basic_streambuf_wchar *this)
2161 TRACE("(%p)\n", this);
2162 return call_basic_streambuf_wchar_sync(this);
2165 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WH@Z */
2166 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_J@Z */
2167 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGH@Z */
2168 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_J@Z */
2169 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsgetn, 12)
2170 #define call_basic_streambuf_wchar_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, \
2171 streamsize, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, ptr, count))
2172 streamsize __thiscall basic_streambuf_wchar_xsgetn(basic_streambuf_wchar *this, wchar_t *ptr, streamsize count)
2174 TRACE("(%p %p %ld)\n", this, ptr, count);
2175 return call_basic_streambuf_wchar_xsgetn(this, ptr, count);
2178 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WH@Z */
2179 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_J@Z */
2180 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */
2181 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */
2182 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetn, 12)
2183 streamsize __thiscall basic_streambuf_wchar_sgetn(basic_streambuf_wchar *this, wchar_t *ptr, streamsize count)
2185 TRACE("(%p %p %ld)\n", this, ptr, count);
2186 return call_basic_streambuf_wchar_xsgetn(this, ptr, count);
2189 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
2190 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JXZ */
2191 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
2192 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JXZ */
2193 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_showmanyc, 4)
2194 #define call_basic_streambuf_wchar_showmanyc(this) CALL_VTBL_FUNC(this, 12, \
2195 streamsize, (basic_streambuf_wchar*), (this))
2196 streamsize __thiscall basic_streambuf_wchar_showmanyc(basic_streambuf_wchar *this)
2198 TRACE("(%p)\n", this);
2202 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
2203 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JXZ */
2204 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
2205 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JXZ */
2206 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_in_avail, 4)
2207 streamsize __thiscall basic_streambuf_wchar_in_avail(basic_streambuf_wchar *this)
2211 TRACE("(%p)\n", this);
2213 ret = basic_streambuf_wchar__Gnavail(this);
2214 return ret ? ret : call_basic_streambuf_wchar_showmanyc(this);
2217 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
2218 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
2219 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
2220 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
2221 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputbackc, 8)
2222 unsigned short __thiscall basic_streambuf_wchar_sputbackc(basic_streambuf_wchar *this, wchar_t ch)
2224 TRACE("(%p %d)\n", this, ch);
2225 if(*this->prpos && *this->prpos>*this->prbuf && (*this->prpos)[-1]==ch) {
2231 return call_basic_streambuf_wchar_pbackfail(this, ch);
2234 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
2235 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
2236 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
2237 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHG@Z */
2238 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputc, 8)
2239 unsigned short __thiscall basic_streambuf_wchar_sputc(basic_streambuf_wchar *this, wchar_t ch)
2241 TRACE("(%p %d)\n", this, ch);
2242 return basic_streambuf_wchar__Pnavail(this) ?
2243 (*basic_streambuf_wchar__Pninc(this) = ch) :
2244 call_basic_streambuf_wchar_overflow(this, ch);
2247 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2248 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2249 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2250 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2251 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sungetc, 4)
2252 unsigned short __thiscall basic_streambuf_wchar_sungetc(basic_streambuf_wchar *this)
2254 TRACE("(%p)\n", this);
2255 if(*this->prpos && *this->prpos>*this->prbuf) {
2258 return **this->prpos;
2261 return call_basic_streambuf_wchar_pbackfail(this, WEOF);
2264 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
2265 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
2266 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
2267 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
2268 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_stossc, 4)
2269 void __thiscall basic_streambuf_wchar_stossc(basic_streambuf_wchar *this)
2271 TRACE("(%p)\n", this);
2272 if(basic_streambuf_wchar__Gnavail(this))
2273 basic_streambuf_wchar__Gninc(this);
2275 call_basic_streambuf_wchar_uflow(this);
2278 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2279 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2280 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2281 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2282 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sbumpc, 4)
2283 unsigned short __thiscall basic_streambuf_wchar_sbumpc(basic_streambuf_wchar *this)
2285 TRACE("(%p)\n", this);
2286 return basic_streambuf_wchar__Gnavail(this) ?
2287 *basic_streambuf_wchar__Gninc(this) : call_basic_streambuf_wchar_uflow(this);
2290 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2291 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2292 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2293 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2294 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetc, 4)
2295 unsigned short __thiscall basic_streambuf_wchar_sgetc(basic_streambuf_wchar *this)
2297 TRACE("(%p)\n", this);
2298 return basic_streambuf_wchar__Gnavail(this) ?
2299 *basic_streambuf_wchar_gptr(this) : call_basic_streambuf_wchar_underflow(this);
2302 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2303 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2304 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2305 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2306 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_snextc, 4)
2307 unsigned short __thiscall basic_streambuf_wchar_snextc(basic_streambuf_wchar *this)
2309 TRACE("(%p)\n", this);
2311 if(basic_streambuf_wchar__Gnavail(this) > 1)
2312 return *basic_streambuf_wchar__Gnpreinc(this);
2313 return basic_streambuf_wchar_sbumpc(this)==WEOF ?
2314 WEOF : basic_streambuf_wchar_sgetc(this);
2317 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPB_WH@Z */
2318 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEB_W_J@Z */
2319 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPBGH@Z */
2320 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEBG_J@Z */
2321 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsputn, 12)
2322 #define call_basic_streambuf_wchar_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 28, \
2323 streamsize, (basic_streambuf_wchar*, const wchar_t*, streamsize), (this, ptr, count))
2324 streamsize __thiscall basic_streambuf_wchar_xsputn(basic_streambuf_wchar *this, const wchar_t *ptr, streamsize count)
2326 streamsize copied, chunk;
2328 TRACE("(%p %p %ld)\n", this, ptr, count);
2330 for(copied=0; copied<count;) {
2331 chunk = basic_streambuf_wchar__Pnavail(this);
2332 if(chunk > count-copied)
2333 chunk = count-copied;
2336 memcpy(*this->pwpos, ptr+copied, chunk*sizeof(wchar_t));
2337 *this->pwpos += chunk;
2338 *this->pwsize -= chunk;
2340 }else if(call_basic_streambuf_wchar_overflow(this, ptr[copied]) != WEOF) {
2350 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPB_WH@Z */
2351 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEB_W_J@Z */
2352 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPBGH@Z */
2353 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEBG_J@Z */
2354 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputn, 12)
2355 streamsize __thiscall basic_streambuf_wchar_sputn(basic_streambuf_wchar *this, const wchar_t *ptr, streamsize count)
2357 TRACE("(%p %p %ld)\n", this, ptr, count);
2358 return call_basic_streambuf_wchar_xsputn(this, ptr, count);
2361 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
2362 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
2363 int basic_filebuf_char__Init__Stinit = 0;
2365 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2366 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2367 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Init, 12)
2368 void __thiscall basic_filebuf_char__Init(basic_filebuf_char *this, FILE *file, basic_filebuf__Initfl which)
2370 TRACE("(%p %p %d)\n", this, file, which);
2373 this->wrotesome = FALSE;
2374 this->state = basic_filebuf_char__Init__Stinit;
2375 this->close = (which == INITFL_open);
2378 basic_streambuf_char__Init_empty(&this->base);
2380 basic_streambuf_char__Init(&this->base, &file->_base, &file->_ptr,
2381 &file->_cnt, &file->_base, &file->_ptr, &file->_cnt);
2384 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAV?$codecvt@DDH@2@@Z */
2385 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$codecvt@DDH@2@@Z */
2386 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Initcvt, 8)
2387 void __thiscall basic_filebuf_char__Initcvt(basic_filebuf_char *this, codecvt_char *cvt)
2389 TRACE("(%p %p)\n", this, cvt);
2391 if(codecvt_base_always_noconv(&cvt->base)) {
2394 basic_streambuf_char__Init_empty(&this->base);
2399 /* ?_Endwrite@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAE_NXZ */
2400 /* ?_Endwrite@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAA_NXZ */
2401 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Endwrite, 4)
2402 MSVCP_bool __thiscall basic_filebuf_char__Endwrite(basic_filebuf_char *this)
2404 TRACE("(%p)\n", this);
2406 if(!this->wrotesome || !this->cvt)
2410 if(call_basic_streambuf_char_overflow(&this->base, EOF) == EOF)
2414 /* TODO: check if we need a dynamic buffer here */
2419 ret = codecvt_char_unshift(this->cvt, &this->state, buf, buf+sizeof(buf), &next);
2422 this->wrotesome = FALSE;
2424 case CODECVT_partial:
2425 if(!fwrite(buf, next-buf, 1, this->file))
2430 case CODECVT_noconv:
2431 if(call_basic_streambuf_char_overflow(&this->base, EOF) == EOF)
2440 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@XZ */
2441 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@XZ */
2442 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_close, 4)
2443 basic_filebuf_char* __thiscall basic_filebuf_char_close(basic_filebuf_char *this)
2445 basic_filebuf_char *ret = this;
2447 TRACE("(%p)\n", this);
2452 /* TODO: handle exceptions */
2453 if(!basic_filebuf_char__Endwrite(this))
2455 if(fclose(this->file))
2458 basic_filebuf_char__Init(this, NULL, INITFL_close);
2462 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
2463 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
2464 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_file, 8)
2465 basic_filebuf_char* __thiscall basic_filebuf_char_ctor_file(basic_filebuf_char *this, FILE *file)
2467 TRACE("(%p %p)\n", this, file);
2469 basic_streambuf_char_ctor(&this->base);
2470 this->base.vtable = &MSVCP_basic_filebuf_char_vtable;
2472 basic_filebuf_char__Init(this, file, INITFL_new);
2476 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
2477 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
2478 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor, 4)
2479 basic_filebuf_char* __thiscall basic_filebuf_char_ctor(basic_filebuf_char *this)
2481 return basic_filebuf_char_ctor_file(this, NULL);
2484 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
2485 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
2486 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_uninitialized, 8)
2487 basic_filebuf_char* __thiscall basic_filebuf_char_ctor_uninitialized(basic_filebuf_char *this, int uninitialized)
2489 TRACE("(%p %d)\n", this, uninitialized);
2491 basic_streambuf_char_ctor(&this->base);
2492 this->base.vtable = &MSVCP_basic_filebuf_char_vtable;
2496 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
2497 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
2498 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_dtor, 4)
2499 void __thiscall basic_filebuf_char_dtor(basic_filebuf_char *this)
2501 TRACE("(%p)\n", this);
2504 basic_filebuf_char_close(this);
2505 basic_streambuf_char_dtor(&this->base);
2508 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_vector_dtor, 8)
2509 basic_filebuf_char* __thiscall basic_filebuf_char_vector_dtor(basic_filebuf_char *this, unsigned int flags)
2511 TRACE("(%p %x)\n", this, flags);
2513 /* we have an array, with the number of elements stored before the first object */
2514 INT_PTR i, *ptr = (INT_PTR *)this-1;
2516 for(i=*ptr-1; i>=0; i--)
2517 basic_filebuf_char_dtor(this+i);
2518 MSVCRT_operator_delete(ptr);
2520 basic_filebuf_char_dtor(this);
2522 MSVCRT_operator_delete(this);
2528 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QBE_NXZ */
2529 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
2530 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_is_open, 4)
2531 MSVCP_bool __thiscall basic_filebuf_char_is_open(const basic_filebuf_char *this)
2533 TRACE("(%p)\n", this);
2534 return this->file != NULL;
2537 /* ?_Fiopen@std@@YAPAU_iobuf@@PB_WHH@Z */
2538 /* ?_Fiopen@std@@YAPEAU_iobuf@@PEB_WHH@Z */
2539 static FILE* _Fiopen_wchar(const wchar_t *name, int mode, int prot)
2541 static const wchar_t rW[] = {'r',0};
2542 static const struct {
2544 const wchar_t str[4];
2545 const wchar_t str_bin[4];
2547 {OPENMODE_out, {'w',0}, {'w','b',0}},
2548 {OPENMODE_out|OPENMODE_app, {'a',0}, {'a','b',0}},
2549 {OPENMODE_app, {'a',0}, {'a','b',0}},
2550 {OPENMODE_out|OPENMODE_trunc, {'w',0}, {'w','b',0}},
2551 {OPENMODE_in, {'r',0}, {'r','b',0}},
2552 {OPENMODE_in|OPENMODE_out, {'r','+',0}, {'r','+','b',0}},
2553 {OPENMODE_in|OPENMODE_out|OPENMODE_trunc, {'w','+',0}, {'w','+','b',0}},
2554 {OPENMODE_in|OPENMODE_out|OPENMODE_app, {'a','+',0}, {'a','+','b',0}},
2555 {OPENMODE_in|OPENMODE_app, {'a','+',0}, {'a','+','b',0}}
2558 int real_mode = mode & ~(OPENMODE_ate|OPENMODE__Nocreate|OPENMODE__Noreplace|OPENMODE_binary);
2562 TRACE("(%s %d %d)\n", debugstr_w(name), mode, prot);
2564 for(mode_idx=0; mode_idx<sizeof(str_mode)/sizeof(str_mode[0]); mode_idx++)
2565 if(str_mode[mode_idx].mode == real_mode)
2567 if(mode_idx == sizeof(str_mode)/sizeof(str_mode[0]))
2570 if((mode & OPENMODE__Nocreate) && !(f = _wfopen(name, rW)))
2575 if((mode & OPENMODE__Noreplace) && (mode & (OPENMODE_out|OPENMODE_app))
2576 && (f = _wfopen(name, rW))) {
2581 /* msvcp60 - msvcp71 are ignoring prot argument */
2582 f = _wfsopen(name, (mode & OPENMODE_binary) ? str_mode[mode_idx].str_bin
2583 : str_mode[mode_idx].str, SH_DENYNO);
2587 if((mode & OPENMODE_ate) && fseek(f, 0, SEEK_END)) {
2595 /* ?_Fiopen@std@@YAPAU_iobuf@@PBDHH@Z */
2596 /* ?_Fiopen@std@@YAPEAU_iobuf@@PEBDHH@Z */
2597 FILE* __cdecl _Fiopen(const char *name, int mode, int prot)
2599 wchar_t nameW[FILENAME_MAX];
2601 TRACE("(%s %d %d)\n", name, mode, prot);
2603 if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0)
2605 return _Fiopen_wchar(nameW, mode, prot);
2608 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PB_WHH@Z */
2609 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEB_WHH@Z */
2610 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBGHH@Z */
2611 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBGHH@Z */
2612 static basic_filebuf_char* basic_filebuf_char_open_wchar(basic_filebuf_char *this, const wchar_t *name, int mode, int prot)
2616 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
2618 if(basic_filebuf_char_is_open(this))
2621 if(!(f = _Fiopen_wchar(name, mode, prot)))
2624 basic_filebuf_char__Init(this, f, INITFL_open);
2625 basic_filebuf_char__Initcvt(this, codecvt_char_use_facet(this->base.loc));
2629 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDHH@Z */
2630 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDHH@Z */
2631 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open, 16)
2632 basic_filebuf_char* __thiscall basic_filebuf_char_open(basic_filebuf_char *this, const char *name, int mode, int prot)
2634 wchar_t nameW[FILENAME_MAX];
2636 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
2638 if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0)
2640 return basic_filebuf_char_open_wchar(this, nameW, mode, prot);
2643 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDI@Z */
2644 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDI@Z */
2645 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_mode, 12)
2646 basic_filebuf_char* __thiscall basic_filebuf_char_open_mode(basic_filebuf_char *this, const char *name, unsigned int mode)
2648 return basic_filebuf_char_open(this, name, mode, SH_DENYNO);
2651 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2652 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2653 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_overflow, 8)
2654 int __thiscall basic_filebuf_char_overflow(basic_filebuf_char *this, int c)
2656 char buf[8], *dyn_buf;
2657 char ch = c, *to_next;
2658 const char *from_next;
2662 TRACE("(%p %d)\n", this, c);
2664 if(!basic_filebuf_char_is_open(this))
2670 return fwrite(&ch, sizeof(char), 1, this->file) ? c : EOF;
2674 ret = codecvt_char_out(this->cvt, &this->state, from_next, &ch+1,
2675 &from_next, buf, buf+sizeof(buf), &to_next);
2678 case CODECVT_partial:
2683 if(!fwrite(buf, to_next-buf, 1, this->file))
2685 if(ret == CODECVT_partial)
2688 case CODECVT_noconv:
2689 return fwrite(&ch, sizeof(char), 1, this->file) ? c : EOF;
2697 max_size = codecvt_base_max_length(&this->cvt->base);
2698 dyn_buf = malloc(max_size);
2702 ret = codecvt_char_out(this->cvt, &this->state, from_next, &ch+1,
2703 &from_next, dyn_buf, dyn_buf+max_size, &to_next);
2707 ret = fwrite(dyn_buf, to_next-dyn_buf, 1, this->file);
2709 return ret ? c : EOF;
2710 case CODECVT_partial:
2711 ERR("buffer should be big enough to store all output\n");
2719 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2720 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2721 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_pbackfail, 8)
2722 int __thiscall basic_filebuf_char_pbackfail(basic_filebuf_char *this, int c)
2724 TRACE("(%p %d)\n", this, c);
2726 if(!basic_filebuf_char_is_open(this))
2729 if(basic_streambuf_char_gptr(&this->base)>basic_streambuf_char_eback(&this->base)
2730 && (c==EOF || (int)(unsigned char)basic_streambuf_char_gptr(&this->base)[-1]==c)) {
2731 basic_streambuf_char__Gndec(&this->base);
2732 return c==EOF ? !c : c;
2733 }else if(c!=EOF && !this->cvt) {
2734 return ungetc(c, this->file);
2740 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2741 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2742 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_uflow, 4)
2743 int __thiscall basic_filebuf_char_uflow(basic_filebuf_char *this)
2745 char ch, buf[128], *to_next;
2746 const char *buf_next;
2749 TRACE("(%p)\n", this);
2751 if(!basic_filebuf_char_is_open(this))
2754 if(basic_streambuf_char_gptr(&this->base) < basic_streambuf_char_egptr(&this->base))
2755 return (unsigned char)*basic_streambuf_char__Gninc(&this->base);
2757 c = fgetc(this->file);
2758 if(!this->cvt || c==EOF)
2762 for(i=0; i < sizeof(buf)/sizeof(buf[0]); i++) {
2765 switch(codecvt_char_in(this->cvt, &this->state, buf_next,
2766 buf+i+1, &buf_next, &ch, &ch+1, &to_next)) {
2767 case CODECVT_partial:
2769 if(to_next == &ch) {
2770 c = fgetc(this->file);
2776 for(i--; i>=buf_next-buf; i--)
2777 ungetc(buf[i], this->file);
2779 case CODECVT_noconv:
2780 return (unsigned char)buf[0];
2786 FIXME("buffer is too small\n");
2790 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2791 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2792 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_underflow, 4)
2793 int __thiscall basic_filebuf_char_underflow(basic_filebuf_char *this)
2797 TRACE("(%p)\n", this);
2799 if(basic_streambuf_char_gptr(&this->base) < basic_streambuf_char_egptr(&this->base))
2800 return (unsigned char)*basic_streambuf_char_gptr(&this->base);
2802 ret = call_basic_streambuf_char_uflow(&this->base);
2804 ret = call_basic_streambuf_char_pbackfail(&this->base, ret);
2808 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
2809 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
2810 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekoff, 20)
2811 fpos_int* __thiscall basic_filebuf_char_seekoff(basic_filebuf_char *this,
2812 fpos_int *ret, streamoff off, int way, int mode)
2816 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
2818 if(!basic_filebuf_char_is_open(this) || !basic_filebuf_char__Endwrite(this)
2819 || fseek(this->file, off, way)) {
2826 fgetpos(this->file, &pos);
2829 ret->state = this->state;
2833 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2834 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2835 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekpos, 36)
2836 fpos_int* __thiscall basic_filebuf_char_seekpos(basic_filebuf_char *this,
2837 fpos_int *ret, fpos_int pos, int mode)
2841 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
2843 if(!basic_filebuf_char_is_open(this) || !basic_filebuf_char__Endwrite(this)
2844 || fseek(this->file, (LONG)pos.pos, SEEK_SET)
2845 || (pos.off && fseek(this->file, pos.off, SEEK_CUR))) {
2852 fgetpos(this->file, &fpos);
2855 ret->state = this->state;
2859 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PADH@Z */
2860 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAD_J@Z */
2861 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_setbuf, 12)
2862 basic_streambuf_char* __thiscall basic_filebuf_char_setbuf(basic_filebuf_char *this, char *buf, streamsize count)
2864 TRACE("(%p %p %ld)\n", this, buf, count);
2866 if(!basic_filebuf_char_is_open(this))
2869 if(setvbuf(this->file, buf, (buf==NULL && count==0) ? _IONBF : _IOFBF, count))
2872 basic_filebuf_char__Init(this, this->file, INITFL_open);
2876 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2877 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2878 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_sync, 4)
2879 int __thiscall basic_filebuf_char_sync(basic_filebuf_char *this)
2881 TRACE("(%p)\n", this);
2883 if(!basic_filebuf_char_is_open(this))
2886 if(call_basic_streambuf_char_overflow(&this->base, EOF) == EOF)
2888 return fflush(this->file);
2891 /* ?imbue@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
2892 /* ?imbue@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */
2893 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_imbue, 8)
2894 void __thiscall basic_filebuf_char_imbue(basic_filebuf_char *this, const locale *loc)
2896 TRACE("(%p %p)\n", this, loc);
2897 basic_filebuf_char__Initcvt(this, codecvt_char_use_facet(loc));
2900 /* ?_Stinit@?1??_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
2901 /* ?_Stinit@?1??_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
2902 int basic_filebuf_wchar__Init__Stinit = 0;
2904 /* ?_Stinit@?1??_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
2905 /* ?_Stinit@?1??_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
2906 int basic_filebuf_short__Init__Stinit = 0;
2908 /* ?_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2909 /* ?_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2910 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar__Init, 12)
2911 void __thiscall basic_filebuf_wchar__Init(basic_filebuf_wchar *this, FILE *file, basic_filebuf__Initfl which)
2913 TRACE("(%p %p %d)\n", this, file, which);
2916 this->wrotesome = FALSE;
2917 this->state = basic_filebuf_wchar__Init__Stinit;
2918 this->close = (which == INITFL_open);
2921 basic_streambuf_wchar__Init_empty(&this->base);
2924 /* ?_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2925 /* ?_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2926 DEFINE_THISCALL_WRAPPER(basic_filebuf_short__Init, 12)
2927 void __thiscall basic_filebuf_short__Init(basic_filebuf_wchar *this, FILE *file, basic_filebuf__Initfl which)
2929 TRACE("(%p %p %d)\n", this, file, which);
2932 this->wrotesome = FALSE;
2933 this->state = basic_filebuf_short__Init__Stinit;
2934 this->close = (which == INITFL_open);
2937 basic_streambuf_wchar__Init_empty(&this->base);
2940 /* ?_Initcvt@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAEXPAV?$codecvt@_WDH@2@@Z */
2941 /* ?_Initcvt@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAV?$codecvt@_WDH@2@@Z */
2942 /* ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAV?$codecvt@GDH@2@@Z */
2943 /* ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAV?$codecvt@GDH@2@@Z */
2944 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar__Initcvt, 8)
2945 void __thiscall basic_filebuf_wchar__Initcvt(basic_filebuf_wchar *this, codecvt_wchar *cvt)
2947 TRACE("(%p %p)\n", this, cvt);
2949 if(codecvt_base_always_noconv(&cvt->base)) {
2952 basic_streambuf_wchar__Init_empty(&this->base);
2957 /* ?_Endwrite@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAE_NXZ */
2958 /* ?_Endwrite@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAA_NXZ */
2959 /* ?_Endwrite@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAE_NXZ */
2960 /* ?_Endwrite@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAA_NXZ */
2961 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar__Endwrite, 4)
2962 MSVCP_bool __thiscall basic_filebuf_wchar__Endwrite(basic_filebuf_wchar *this)
2964 TRACE("(%p)\n", this);
2966 if(!this->wrotesome || !this->cvt)
2969 if(call_basic_streambuf_wchar_overflow(&this->base, WEOF) == WEOF)
2973 /* TODO: check if we need a dynamic buffer here */
2978 ret = codecvt_wchar_unshift(this->cvt, &this->state, buf, buf+sizeof(buf), &next);
2981 this->wrotesome = FALSE;
2983 case CODECVT_partial:
2984 if(!fwrite(buf, next-buf, 1, this->file))
2989 case CODECVT_noconv:
2990 if(call_basic_streambuf_wchar_overflow(&this->base, WEOF) == WEOF)
2999 /* ?close@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@XZ */
3000 /* ?close@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@XZ */
3001 /* ?close@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@XZ */
3002 /* ?close@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@XZ */
3003 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_close, 4)
3004 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_close(basic_filebuf_wchar *this)
3006 basic_filebuf_wchar *ret = this;
3008 TRACE("(%p)\n", this);
3013 /* TODO: handle exceptions */
3014 if(!basic_filebuf_wchar__Endwrite(this))
3016 if(fclose(this->file))
3019 basic_filebuf_wchar__Init(this, NULL, INITFL_close);
3023 /* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
3024 /* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
3025 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_ctor_file, 8)
3026 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_ctor_file(basic_filebuf_wchar *this, FILE *file)
3028 TRACE("(%p %p)\n", this, file);
3030 basic_streambuf_wchar_ctor(&this->base);
3031 this->base.vtable = &MSVCP_basic_filebuf_wchar_vtable;
3033 basic_filebuf_wchar__Init(this, file, INITFL_new);
3037 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
3038 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
3039 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor_file, 8)
3040 basic_filebuf_wchar* __thiscall basic_filebuf_short_ctor_file(basic_filebuf_wchar *this, FILE *file)
3042 TRACE("(%p %p)\n", this, file);
3044 basic_streambuf_short_ctor(&this->base);
3045 this->base.vtable = &MSVCP_basic_filebuf_short_vtable;
3047 basic_filebuf_short__Init(this, file, INITFL_new);
3051 /* ??_F?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
3052 /* ??_F?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
3053 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_ctor, 4)
3054 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_ctor(basic_filebuf_wchar *this)
3056 return basic_filebuf_wchar_ctor_file(this, NULL);
3059 /* ??_F?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
3060 /* ??_F?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
3061 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor, 4)
3062 basic_filebuf_wchar* __thiscall basic_filebuf_short_ctor(basic_filebuf_wchar *this)
3064 return basic_filebuf_short_ctor_file(this, NULL);
3067 /* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAE@W4_Uninitialized@1@@Z */
3068 /* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
3069 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_ctor_uninitialized, 8)
3070 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_ctor_uninitialized(basic_filebuf_wchar *this, int uninitialized)
3072 TRACE("(%p %d)\n", this, uninitialized);
3074 basic_streambuf_wchar_ctor(&this->base);
3075 this->base.vtable = &MSVCP_basic_filebuf_wchar_vtable;
3079 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z */
3080 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
3081 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor_uninitialized, 8)
3082 basic_filebuf_wchar* __thiscall basic_filebuf_short_ctor_uninitialized(basic_filebuf_wchar *this, int uninitialized)
3084 TRACE("(%p %d)\n", this, uninitialized);
3086 basic_streambuf_short_ctor(&this->base);
3087 this->base.vtable = &MSVCP_basic_filebuf_short_vtable;
3091 /* ??1?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
3092 /* ??1?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
3093 /* ??1?$basic_filebuf@GU?$char_traits@G@std@@@std@@UAE@XZ */
3094 /* ??1?$basic_filebuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */
3095 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_dtor, 4)
3096 void __thiscall basic_filebuf_wchar_dtor(basic_filebuf_wchar *this)
3098 TRACE("(%p)\n", this);
3101 basic_filebuf_wchar_close(this);
3102 basic_streambuf_wchar_dtor(&this->base);
3105 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_vector_dtor, 8)
3106 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_vector_dtor(basic_filebuf_wchar *this, unsigned int flags)
3108 TRACE("(%p %x)\n", this, flags);
3110 /* we have an array, with the number of elements stored before the first object */
3111 INT_PTR i, *ptr = (INT_PTR *)this-1;
3113 for(i=*ptr-1; i>=0; i--)
3114 basic_filebuf_wchar_dtor(this+i);
3115 MSVCRT_operator_delete(ptr);
3117 basic_filebuf_wchar_dtor(this);
3119 MSVCRT_operator_delete(this);
3125 /* ?is_open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
3126 /* ?is_open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
3127 /* ?is_open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QBE_NXZ */
3128 /* ?is_open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
3129 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_is_open, 4)
3130 MSVCP_bool __thiscall basic_filebuf_wchar_is_open(const basic_filebuf_wchar *this)
3132 TRACE("(%p)\n", this);
3133 return this->file != NULL;
3136 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PB_WHH@Z */
3137 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEB_WHH@Z */
3138 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PBGHH@Z */
3139 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEBGHH@Z */
3140 static basic_filebuf_wchar* basic_filebuf_wchar_open_wchar(basic_filebuf_wchar *this, const wchar_t *name, int mode, int prot)
3144 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
3146 if(basic_filebuf_wchar_is_open(this))
3149 if(!(f = _Fiopen_wchar(name, mode, prot)))
3152 basic_filebuf_wchar__Init(this, f, INITFL_open);
3153 basic_filebuf_wchar__Initcvt(this, codecvt_wchar_use_facet(this->base.loc));
3157 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PB_WHH@Z */
3158 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEB_WHH@Z */
3159 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBGHH@Z */
3160 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBGHH@Z */
3161 static basic_filebuf_wchar* basic_filebuf_short_open_wchar(basic_filebuf_wchar *this, const wchar_t *name, int mode, int prot)
3165 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
3167 if(basic_filebuf_wchar_is_open(this))
3170 if(!(f = _Fiopen_wchar(name, mode, prot)))
3173 basic_filebuf_short__Init(this, f, INITFL_open);
3174 basic_filebuf_wchar__Initcvt(this, codecvt_short_use_facet(this->base.loc));
3178 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PBDHH@Z */
3179 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEBDHH@Z */
3180 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_open, 16)
3181 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_open(basic_filebuf_wchar *this, const char *name, int mode, int prot)
3183 wchar_t nameW[FILENAME_MAX];
3185 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
3187 if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0)
3189 return basic_filebuf_wchar_open_wchar(this, nameW, mode, prot);
3192 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDHH@Z */
3193 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDHH@Z */
3194 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_open, 16)
3195 basic_filebuf_wchar* __thiscall basic_filebuf_short_open(basic_filebuf_wchar *this, const char *name, int mode, int prot)
3197 wchar_t nameW[FILENAME_MAX];
3199 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
3201 if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0)
3203 return basic_filebuf_short_open_wchar(this, nameW, mode, prot);
3206 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PBDI@Z */
3207 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEBDI@Z */
3208 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_open_mode, 12)
3209 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_open_mode(basic_filebuf_wchar *this, const char *name, unsigned int mode)
3211 return basic_filebuf_wchar_open(this, name, mode, SH_DENYNO);
3214 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDI@Z */
3215 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDI@Z */
3216 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_open_mode, 12)
3217 basic_filebuf_wchar* __thiscall basic_filebuf_short_open_mode(basic_filebuf_wchar *this, const char *name, unsigned int mode)
3219 return basic_filebuf_short_open(this, name, mode, SH_DENYNO);
3222 /* ?overflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
3223 /* ?overflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
3224 /* ?overflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
3225 /* ?overflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
3226 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_overflow, 8)
3227 unsigned short __thiscall basic_filebuf_wchar_overflow(basic_filebuf_wchar *this, unsigned short c)
3229 char buf[8], *dyn_buf, *to_next;
3231 const wchar_t *from_next;
3236 TRACE("(%p %d)\n", this, c);
3238 if(!basic_filebuf_wchar_is_open(this))
3244 return fwrite(&ch, sizeof(wchar_t), 1, this->file) ? c : WEOF;
3248 ret = codecvt_wchar_out(this->cvt, &this->state, from_next, &ch+1,
3249 &from_next, buf, buf+sizeof(buf), &to_next);
3252 case CODECVT_partial:
3257 if(!fwrite(buf, to_next-buf, 1, this->file))
3259 if(ret == CODECVT_partial)
3262 case CODECVT_noconv:
3263 return fwrite(&ch, sizeof(wchar_t), 1, this->file) ? c : WEOF;
3271 max_size = codecvt_base_max_length(&this->cvt->base);
3272 dyn_buf = malloc(max_size);
3276 ret = codecvt_wchar_out(this->cvt, &this->state, from_next, &ch+1,
3277 &from_next, dyn_buf, dyn_buf+max_size, &to_next);
3281 ret = fwrite(dyn_buf, to_next-dyn_buf, 1, this->file);
3283 return ret ? c : WEOF;
3284 case CODECVT_partial:
3285 ERR("buffer should be big enough to store all output\n");
3293 /* ?pbackfail@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
3294 /* ?pbackfail@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
3295 /* ?pbackfail@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
3296 /* ?pbackfail@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
3297 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_pbackfail, 8)
3298 unsigned short __thiscall basic_filebuf_wchar_pbackfail(basic_filebuf_wchar *this, unsigned short c)
3300 TRACE("(%p %d)\n", this, c);
3302 if(!basic_filebuf_wchar_is_open(this))
3305 if(basic_streambuf_wchar_gptr(&this->base)>basic_streambuf_wchar_eback(&this->base)
3306 && (c==WEOF || basic_streambuf_wchar_gptr(&this->base)[-1]==c)) {
3307 basic_streambuf_wchar__Gndec(&this->base);
3308 return c==WEOF ? !c : c;
3309 }else if(c!=WEOF && !this->cvt) {
3310 return ungetwc(c, this->file);
3311 }else if(c!=WEOF && basic_streambuf_wchar_gptr(&this->base)!=&this->putback) {
3313 basic_streambuf_wchar_setg(&this->base, &this->putback, &this->putback, &this->putback+1);
3320 /* ?uflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
3321 /* ?uflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
3322 /* ?uflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
3323 /* ?uflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
3324 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_uflow, 4)
3325 unsigned short __thiscall basic_filebuf_wchar_uflow(basic_filebuf_wchar *this)
3327 wchar_t ch, *to_next;
3329 const char *buf_next;
3332 TRACE("(%p)\n", this);
3334 if(!basic_filebuf_wchar_is_open(this))
3337 if(basic_streambuf_wchar_gptr(&this->base) < basic_streambuf_wchar_egptr(&this->base))
3338 return *basic_streambuf_wchar__Gninc(&this->base);
3341 return fgetwc(this->file);
3344 for(i=0; i < sizeof(buf)/sizeof(buf[0]); i++) {
3345 if((c = fgetc(this->file)) == EOF)
3349 switch(codecvt_wchar_in(this->cvt, &this->state, buf_next,
3350 buf+i+1, &buf_next, &ch, &ch+1, &to_next)) {
3351 case CODECVT_partial:
3356 for(i--; i>=buf_next-buf; i--)
3357 ungetc(buf[i], this->file);
3359 case CODECVT_noconv:
3360 if(i+1 < sizeof(wchar_t))
3363 memcpy(&ch, buf, sizeof(wchar_t));
3370 FIXME("buffer is too small\n");
3374 /* ?underflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
3375 /* ?underflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
3376 /* ?underflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
3377 /* ?underflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
3378 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_underflow, 4)
3379 unsigned short __thiscall basic_filebuf_wchar_underflow(basic_filebuf_wchar *this)
3383 TRACE("(%p)\n", this);
3385 if(basic_streambuf_wchar_gptr(&this->base) < basic_streambuf_wchar_egptr(&this->base))
3386 return *basic_streambuf_wchar_gptr(&this->base);
3388 ret = call_basic_streambuf_wchar_uflow(&this->base);
3390 ret = call_basic_streambuf_wchar_pbackfail(&this->base, ret);
3394 /* ?seekoff@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
3395 /* ?seekoff@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
3396 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
3397 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
3398 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_seekoff, 20)
3399 fpos_int* __thiscall basic_filebuf_wchar_seekoff(basic_filebuf_wchar *this,
3400 fpos_int *ret, streamoff off, int way, int mode)
3404 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
3406 if(basic_streambuf_wchar_gptr(&this->base) == &this->putback) {
3407 if(way == SEEKDIR_cur)
3408 off -= sizeof(wchar_t);
3410 basic_streambuf_wchar_setg(&this->base, &this->putback, &this->putback+1, &this->putback+1);
3413 if(!basic_filebuf_wchar_is_open(this) || !basic_filebuf_wchar__Endwrite(this)
3414 || fseek(this->file, off, way)) {
3421 fgetpos(this->file, &pos);
3424 ret->state = this->state;
3428 /* ?seekpos@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3429 /* ?seekpos@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3430 /* ?seekpos@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3431 /* ?seekpos@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3432 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_seekpos, 36)
3433 fpos_int* __thiscall basic_filebuf_wchar_seekpos(basic_filebuf_wchar *this,
3434 fpos_int *ret, fpos_int pos, int mode)
3438 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
3440 if(!basic_filebuf_wchar_is_open(this) || !basic_filebuf_wchar__Endwrite(this)
3441 || fseek(this->file, (LONG)pos.pos, SEEK_SET)
3442 || (pos.off && fseek(this->file, pos.off, SEEK_CUR))) {
3449 if(basic_streambuf_wchar_gptr(&this->base) == &this->putback)
3450 basic_streambuf_wchar_setg(&this->base, &this->putback, &this->putback+1, &this->putback+1);
3452 fgetpos(this->file, &fpos);
3455 ret->state = this->state;
3459 /* ?setbuf@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PA_WH@Z */
3460 /* ?setbuf@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PEA_W_J@Z */
3461 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_setbuf, 12)
3462 basic_streambuf_wchar* __thiscall basic_filebuf_wchar_setbuf(basic_filebuf_wchar *this, wchar_t *buf, streamsize count)
3464 TRACE("(%p %p %ld)\n", this, buf, count);
3466 if(!basic_filebuf_wchar_is_open(this))
3469 if(setvbuf(this->file, (char*)buf, (buf==NULL && count==0) ? _IONBF : _IOFBF, count*sizeof(wchar_t)))
3472 basic_filebuf_wchar__Init(this, this->file, INITFL_open);
3476 /* ?setbuf@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAGH@Z */
3477 /* ?setbuf@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAG_J@Z */
3478 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_setbuf, 12)
3479 basic_streambuf_wchar* __thiscall basic_filebuf_short_setbuf(basic_filebuf_wchar *this, wchar_t *buf, streamsize count)
3481 TRACE("(%p %p %ld)\n", this, buf, count);
3483 if(!basic_filebuf_wchar_is_open(this))
3486 if(setvbuf(this->file, (char*)buf, (buf==NULL && count==0) ? _IONBF : _IOFBF, count*sizeof(wchar_t)))
3489 basic_filebuf_short__Init(this, this->file, INITFL_open);
3493 /* ?sync@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
3494 /* ?sync@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAHXZ */
3495 /* ?sync@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
3496 /* ?sync@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */
3497 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_sync, 4)
3498 int __thiscall basic_filebuf_wchar_sync(basic_filebuf_wchar *this)
3500 TRACE("(%p)\n", this);
3502 if(!basic_filebuf_wchar_is_open(this))
3505 if(call_basic_streambuf_wchar_overflow(&this->base, WEOF) == WEOF)
3507 return fflush(this->file);
3510 /* ?imbue@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEXABVlocale@2@@Z */
3511 /* ?imbue@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAXAEBVlocale@2@@Z */
3512 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_imbue, 8)
3513 void __thiscall basic_filebuf_wchar_imbue(basic_filebuf_wchar *this, const locale *loc)
3515 TRACE("(%p %p)\n", this, loc);
3516 basic_filebuf_wchar__Initcvt(this, codecvt_wchar_use_facet(loc));
3519 /* ?imbue@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEXABVlocale@2@@Z */
3520 /* ?imbue@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAXAEBVlocale@2@@Z */
3521 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_imbue, 8)
3522 void __thiscall basic_filebuf_short_imbue(basic_filebuf_wchar *this, const locale *loc)
3524 TRACE("(%p %p)\n", this, loc);
3525 basic_filebuf_wchar__Initcvt(this, codecvt_short_use_facet(loc));
3528 /* ?_Getstate@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEHH@Z */
3529 /* ?_Getstate@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAHH@Z */
3530 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Getstate, 8)
3531 int __thiscall basic_stringbuf_char__Getstate(basic_stringbuf_char *this, IOSB_openmode mode)
3535 if(!(mode & OPENMODE_in))
3536 state |= STRINGBUF_no_read;
3538 if(!(mode & OPENMODE_out))
3539 state |= STRINGBUF_no_write;
3541 if(mode & OPENMODE_ate)
3542 state |= STRINGBUF_at_end;
3544 if(mode & OPENMODE_app)
3545 state |= STRINGBUF_append;
3550 /* ?_Init@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXPBDIH@Z */
3551 /* ?_Init@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAXPEBD_KH@Z */
3552 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Init, 16)
3553 void __thiscall basic_stringbuf_char__Init(basic_stringbuf_char *this, const char *str, MSVCP_size_t count, int state)
3555 TRACE("(%p, %p, %ld, %d)\n", this, str, count, state);
3557 basic_streambuf_char__Init_empty(&this->base);
3559 this->state = state;
3560 this->seekhigh = NULL;
3563 char *buf = MSVCRT_operator_new(count);
3565 ERR("Out of memory\n");
3566 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3569 memcpy(buf, str, count);
3570 this->seekhigh = buf + count;
3572 this->state |= STRINGBUF_allocated;
3574 if(!(state & STRINGBUF_no_read))
3575 basic_streambuf_char_setg(&this->base, buf, buf, buf + count);
3577 if(!(state & STRINGBUF_no_write)) {
3578 basic_streambuf_char_setp_next(&this->base, buf, (state & STRINGBUF_at_end) ? buf + count : buf, buf + count);
3580 if(!basic_streambuf_char_gptr(&this->base))
3581 basic_streambuf_char_setg(&this->base, buf, 0, buf);
3586 /* ??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 */
3587 /* ??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 */
3588 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor_str, 12)
3589 basic_stringbuf_char* __thiscall basic_stringbuf_char_ctor_str(basic_stringbuf_char *this,
3590 const basic_string_char *str, IOSB_openmode mode)
3592 TRACE("(%p %p %d)\n", this, str, mode);
3594 basic_streambuf_char_ctor(&this->base);
3595 this->base.vtable = &MSVCP_basic_stringbuf_char_vtable;
3597 basic_stringbuf_char__Init(this, MSVCP_basic_string_char_c_str(str),
3598 str->size, basic_stringbuf_char__Getstate(this, mode));
3602 /* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
3603 /* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
3604 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor_mode, 8)
3605 basic_stringbuf_char* __thiscall basic_stringbuf_char_ctor_mode(
3606 basic_stringbuf_char *this, IOSB_openmode mode)
3608 TRACE("(%p %d)\n", this, mode);
3610 basic_streambuf_char_ctor(&this->base);
3611 this->base.vtable = &MSVCP_basic_stringbuf_char_vtable;
3613 basic_stringbuf_char__Init(this, NULL, 0, basic_stringbuf_char__Getstate(this, mode));
3617 /* ??_F?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
3618 /* ??_F?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
3619 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor, 4)
3620 basic_stringbuf_char* __thiscall basic_stringbuf_char_ctor(basic_stringbuf_char *this)
3622 return basic_stringbuf_char_ctor_mode(this, OPENMODE_in|OPENMODE_out);
3625 /* ?_Tidy@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXXZ */
3626 /* ?_Tidy@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAXXZ */
3627 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Tidy, 4)
3628 void __thiscall basic_stringbuf_char__Tidy(basic_stringbuf_char *this)
3630 TRACE("(%p)\n", this);
3632 if(this->state & STRINGBUF_allocated) {
3633 MSVCRT_operator_delete(basic_streambuf_char_eback(&this->base));
3634 this->seekhigh = NULL;
3635 this->state &= ~STRINGBUF_allocated;
3638 basic_streambuf_char__Init_empty(&this->base);
3641 /* ??1?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
3642 /* ??1?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
3643 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_dtor, 4)
3644 void __thiscall basic_stringbuf_char_dtor(basic_stringbuf_char *this)
3646 TRACE("(%p)\n", this);
3648 basic_stringbuf_char__Tidy(this);
3649 basic_streambuf_char_dtor(&this->base);
3652 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_vector_dtor, 8)
3653 basic_stringbuf_char* __thiscall basic_stringbuf_char_vector_dtor(basic_stringbuf_char *this, unsigned int flags)
3655 TRACE("(%p %x)\n", this, flags);
3658 /* we have an array, with the number of elements stored before the first object */
3659 INT_PTR i, *ptr = (INT_PTR *) this - 1;
3661 for (i = *ptr - 1; i >= 0; i--)
3662 basic_stringbuf_char_dtor(this+i);
3664 MSVCRT_operator_delete(ptr);
3666 basic_stringbuf_char_dtor(this);
3669 MSVCRT_operator_delete(this);
3675 /* ?overflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHH@Z */
3676 /* ?overflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHH@Z */
3677 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_overflow, 8)
3678 int __thiscall basic_stringbuf_char_overflow(basic_stringbuf_char *this, int meta)
3680 MSVCP_size_t oldsize, size;
3683 TRACE("(%p %x)\n", this, meta);
3687 if(this->state & STRINGBUF_no_write)
3690 ptr = basic_streambuf_char_pptr(&this->base);
3691 if((this->state&STRINGBUF_append) && ptr<this->seekhigh)
3692 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base),
3693 this->seekhigh, basic_streambuf_char_epptr(&this->base));
3695 if(ptr && ptr<basic_streambuf_char_epptr(&this->base))
3696 return (*basic_streambuf_char__Pninc(&this->base) = meta);
3698 oldsize = (ptr ? basic_streambuf_char_epptr(&this->base)-basic_streambuf_char_eback(&this->base): 0);
3701 buf = MSVCRT_operator_new(size);
3703 ERR("Out of memory\n");
3704 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3708 this->seekhigh = buf;
3709 basic_streambuf_char_setp(&this->base, buf, buf+size);
3710 if(this->state & STRINGBUF_no_read)
3711 basic_streambuf_char_setg(&this->base, buf, NULL, buf);
3713 basic_streambuf_char_setg(&this->base, buf, buf, buf+1);
3715 this->state |= STRINGBUF_allocated;
3717 ptr = basic_streambuf_char_eback(&this->base);
3718 memcpy(buf, ptr, oldsize);
3720 this->seekhigh = buf+(this->seekhigh-ptr);
3721 basic_streambuf_char_setp_next(&this->base, buf,
3722 buf+(basic_streambuf_char_pptr(&this->base)-ptr), buf+size);
3723 if(this->state & STRINGBUF_no_read)
3724 basic_streambuf_char_setg(&this->base, buf, NULL, buf);
3726 basic_streambuf_char_setg(&this->base, buf,
3727 buf+(basic_streambuf_char_gptr(&this->base)-ptr),
3728 basic_streambuf_char_pptr(&this->base)+1);
3730 MSVCRT_operator_delete(ptr);
3733 return (*basic_streambuf_char__Pninc(&this->base) = meta);
3736 /* ?pbackfail@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHH@Z */
3737 /* ?pbackfail@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHH@Z */
3738 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_pbackfail, 8)
3739 int __thiscall basic_stringbuf_char_pbackfail(basic_stringbuf_char *this, int c)
3743 TRACE("(%p %x)\n", this, c);
3745 cur = basic_streambuf_char_gptr(&this->base);
3746 if(!cur || cur==basic_streambuf_char_eback(&this->base)
3747 || (c!=EOF && c!=cur[-1] && this->state&STRINGBUF_no_write))
3752 basic_streambuf_char_gbump(&this->base, -1);
3753 return c==EOF ? !EOF : c;
3756 /* ?underflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHXZ */
3757 /* ?underflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHXZ */
3758 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_underflow, 4)
3759 int __thiscall basic_stringbuf_char_underflow(basic_stringbuf_char *this)
3763 TRACE("(%p)\n", this);
3765 cur = basic_streambuf_char_gptr(&this->base);
3766 if(!cur || this->state&STRINGBUF_no_read)
3769 ptr = basic_streambuf_char_pptr(&this->base);
3770 if(this->seekhigh < ptr)
3771 this->seekhigh = ptr;
3773 ptr = basic_streambuf_char_egptr(&this->base);
3774 if(this->seekhigh > ptr)
3775 basic_streambuf_char_setg(&this->base, basic_streambuf_char_eback(&this->base), cur, this->seekhigh);
3777 if(cur < this->seekhigh)
3778 return (unsigned char)*cur;
3782 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */
3783 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
3784 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekoff, 20)
3785 fpos_int* __thiscall basic_stringbuf_char_seekoff(basic_stringbuf_char *this,
3786 fpos_int *ret, streamoff off, int way, int mode)
3788 char *beg, *cur_r, *cur_w;
3790 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
3792 cur_w = basic_streambuf_char_pptr(&this->base);
3793 if(cur_w > this->seekhigh)
3794 this->seekhigh = cur_w;
3800 beg = basic_streambuf_char_eback(&this->base);
3801 cur_r = basic_streambuf_char_gptr(&this->base);
3802 if((mode & OPENMODE_in) && cur_r) {
3803 if(way==SEEKDIR_cur && !(mode & OPENMODE_out))
3805 else if(way == SEEKDIR_end)
3806 off += this->seekhigh-beg;
3807 else if(way != SEEKDIR_beg)
3810 if(off<0 || off>this->seekhigh-beg) {
3813 basic_streambuf_char_gbump(&this->base, beg-cur_r+off);
3814 if((mode & OPENMODE_out) && cur_w) {
3815 basic_streambuf_char_setp_next(&this->base, beg,
3816 basic_streambuf_char_gptr(&this->base),
3817 basic_streambuf_char_epptr(&this->base));
3820 }else if((mode & OPENMODE_out) && cur_w) {
3821 if(way == SEEKDIR_cur)
3823 else if(way == SEEKDIR_end)
3824 off += this->seekhigh-beg;
3825 else if(way != SEEKDIR_beg)
3828 if(off<0 || off>this->seekhigh-beg)
3831 basic_streambuf_char_pbump(&this->base, beg-cur_w+off);
3840 /* ?seekpos@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3841 /* ?seekpos@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3842 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekpos, 36)
3843 fpos_int* __thiscall basic_stringbuf_char_seekpos(basic_stringbuf_char *this,
3844 fpos_int *ret, fpos_int pos, int mode)
3846 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
3848 if(pos.off==-1 && pos.pos==0 && pos.state==0) {
3853 return basic_stringbuf_char_seekoff(this, ret, pos.off, SEEKDIR_beg, mode);
3856 /* ?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 */
3857 /* ?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 */
3858 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_str_set, 8)
3859 void __thiscall basic_stringbuf_char_str_set(basic_stringbuf_char *this, const basic_string_char *str)
3861 TRACE("(%p %p)\n", this, str);
3863 basic_stringbuf_char__Tidy(this);
3864 basic_stringbuf_char__Init(this, MSVCP_basic_string_char_c_str(str), str->size, this->state);
3867 /* ?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 */
3868 /* ?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 */
3869 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_str_get, 8)
3870 basic_string_char* __thiscall basic_stringbuf_char_str_get(const basic_stringbuf_char *this, basic_string_char *ret)
3874 TRACE("(%p)\n", this);
3876 if(!(this->state & STRINGBUF_no_write) && basic_streambuf_char_pptr(&this->base)) {
3879 ptr = basic_streambuf_char_pbase(&this->base);
3880 pptr = basic_streambuf_char_pptr(&this->base);
3882 return MSVCP_basic_string_char_ctor_cstr_len(ret, ptr, (this->seekhigh < pptr ? pptr : this->seekhigh) - ptr);
3885 if(!(this->state & STRINGBUF_no_read) && basic_streambuf_char_gptr(&this->base)) {
3886 ptr = basic_streambuf_char_eback(&this->base);
3887 return MSVCP_basic_string_char_ctor_cstr_len(ret, ptr, basic_streambuf_char_egptr(&this->base) - ptr);
3890 return MSVCP_basic_string_char_ctor(ret);
3893 /* ?_Getstate@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AAEHH@Z */
3894 /* ?_Getstate@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AEAAHH@Z */
3895 /* ?_Getstate@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEHH@Z */
3896 /* ?_Getstate@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAHH@Z */
3897 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Getstate, 8)
3898 int __thiscall basic_stringbuf_wchar__Getstate(basic_stringbuf_wchar *this, IOSB_openmode mode)
3902 if(!(mode & OPENMODE_in))
3903 state |= STRINGBUF_no_read;
3905 if(!(mode & OPENMODE_out))
3906 state |= STRINGBUF_no_write;
3908 if(mode & OPENMODE_ate)
3909 state |= STRINGBUF_at_end;
3911 if(mode & OPENMODE_app)
3912 state |= STRINGBUF_append;
3917 /* ?_Init@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXPB_WIH@Z */
3918 /* ?_Init@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAXPEB_W_KH@Z */
3919 /* ?_Init@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEXPBGIH@Z */
3920 /* ?_Init@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAXPEBG_KH@Z */
3921 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Init, 16)
3922 void __thiscall basic_stringbuf_wchar__Init(basic_stringbuf_wchar *this, const wchar_t *str, MSVCP_size_t count, int state)
3924 TRACE("(%p, %p, %lu, %d)\n", this, str, count, state);
3926 basic_streambuf_wchar__Init_empty(&this->base);
3928 this->state = state;
3929 this->seekhigh = NULL;
3932 wchar_t *buf = MSVCRT_operator_new(count*sizeof(wchar_t));
3934 ERR("Out of memory\n");
3935 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3938 memcpy(buf, str, count*sizeof(wchar_t));
3939 this->seekhigh = buf + count;
3941 this->state |= STRINGBUF_allocated;
3943 if(!(state & STRINGBUF_no_read))
3944 basic_streambuf_wchar_setg(&this->base, buf, buf, buf + count);
3946 if(!(state & STRINGBUF_no_write)) {
3947 basic_streambuf_wchar_setp_next(&this->base, buf, (state & STRINGBUF_at_end) ? buf + count : buf, buf + count);
3949 if(!basic_streambuf_wchar_gptr(&this->base))
3950 basic_streambuf_wchar_setg(&this->base, buf, 0, buf);
3955 /* ??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 */
3956 /* ??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 */
3957 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_ctor_str, 12)
3958 basic_stringbuf_wchar* __thiscall basic_stringbuf_wchar_ctor_str(basic_stringbuf_wchar *this,
3959 const basic_string_wchar *str, IOSB_openmode mode)
3961 TRACE("(%p %p %d)\n", this, str, mode);
3963 basic_streambuf_wchar_ctor(&this->base);
3964 this->base.vtable = &MSVCP_basic_stringbuf_wchar_vtable;
3966 basic_stringbuf_wchar__Init(this, MSVCP_basic_string_wchar_c_str(str),
3967 str->size, basic_stringbuf_wchar__Getstate(this, mode));
3971 /* ??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 */
3972 /* ??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 */
3973 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor_str, 12)
3974 basic_stringbuf_wchar* __thiscall basic_stringbuf_short_ctor_str(basic_stringbuf_wchar *this,
3975 const basic_string_wchar *str, IOSB_openmode mode)
3977 basic_stringbuf_wchar_ctor_str(this, str, mode);
3978 this->base.vtable = &MSVCP_basic_stringbuf_short_vtable;
3982 /* ??0?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
3983 /* ??0?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
3984 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_ctor_mode, 8)
3985 basic_stringbuf_wchar* __thiscall basic_stringbuf_wchar_ctor_mode(
3986 basic_stringbuf_wchar *this, IOSB_openmode mode)
3988 TRACE("(%p %d)\n", this, mode);
3990 basic_streambuf_wchar_ctor(&this->base);
3991 this->base.vtable = &MSVCP_basic_stringbuf_wchar_vtable;
3993 basic_stringbuf_wchar__Init(this, NULL, 0, basic_stringbuf_wchar__Getstate(this, mode));
3997 /* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
3998 /* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
3999 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor_mode, 8)
4000 basic_stringbuf_wchar* __thiscall basic_stringbuf_short_ctor_mode(
4001 basic_stringbuf_wchar *this, IOSB_openmode mode)
4003 basic_stringbuf_wchar_ctor_mode(this, mode);
4004 this->base.vtable = &MSVCP_basic_stringbuf_short_vtable;
4008 /* ??_F?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
4009 /* ??_F?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
4010 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_ctor, 4)
4011 basic_stringbuf_wchar* __thiscall basic_stringbuf_wchar_ctor(basic_stringbuf_wchar *this)
4013 return basic_stringbuf_wchar_ctor_mode(this, OPENMODE_in|OPENMODE_out);
4016 /* ??_F?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
4017 /* ??_F?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
4018 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor, 4)
4019 basic_stringbuf_wchar* __thiscall basic_stringbuf_short_ctor(basic_stringbuf_wchar *this)
4021 return basic_stringbuf_short_ctor_mode(this, OPENMODE_in|OPENMODE_out);
4024 /* ?_Tidy@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXXZ */
4025 /* ?_Tidy@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAXXZ */
4026 /* ?_Tidy@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEXXZ */
4027 /* ?_Tidy@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAXXZ */
4028 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Tidy, 4)
4029 void __thiscall basic_stringbuf_wchar__Tidy(basic_stringbuf_wchar *this)
4031 TRACE("(%p)\n", this);
4033 if(this->state & STRINGBUF_allocated) {
4034 MSVCRT_operator_delete(basic_streambuf_wchar_eback(&this->base));
4035 this->seekhigh = NULL;
4036 this->state &= ~STRINGBUF_allocated;
4039 basic_streambuf_wchar__Init_empty(&this->base);
4042 /* ??1?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
4043 /* ??1?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
4044 /* ??1?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
4045 /* ??1?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
4046 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_dtor, 4)
4047 void __thiscall basic_stringbuf_wchar_dtor(basic_stringbuf_wchar *this)
4049 TRACE("(%p)\n", this);
4051 basic_stringbuf_wchar__Tidy(this);
4052 basic_streambuf_wchar_dtor(&this->base);
4055 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_vector_dtor, 8)
4056 basic_stringbuf_wchar* __thiscall basic_stringbuf_wchar_vector_dtor(basic_stringbuf_wchar *this, unsigned int flags)
4058 TRACE("(%p %x)\n", this, flags);
4061 /* we have an array, with the number of elements stored before the first object */
4062 INT_PTR i, *ptr = (INT_PTR *) this - 1;
4064 for (i = *ptr - 1; i >= 0; i--)
4065 basic_stringbuf_wchar_dtor(this+i);
4067 MSVCRT_operator_delete(ptr);
4069 basic_stringbuf_wchar_dtor(this);
4072 MSVCRT_operator_delete(this);
4078 /* ?overflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGG@Z */
4079 /* ?overflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGG@Z */
4080 /* ?overflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGG@Z */
4081 /* ?overflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGG@Z */
4082 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_overflow, 8)
4083 unsigned short __thiscall basic_stringbuf_wchar_overflow(basic_stringbuf_wchar *this, unsigned short meta)
4085 MSVCP_size_t oldsize, size;
4088 TRACE("(%p %x)\n", this, meta);
4092 if(this->state & STRINGBUF_no_write)
4095 ptr = basic_streambuf_wchar_pptr(&this->base);
4096 if((this->state&STRINGBUF_append) && ptr<this->seekhigh)
4097 basic_streambuf_wchar_setp_next(&this->base, basic_streambuf_wchar_pbase(&this->base),
4098 this->seekhigh, basic_streambuf_wchar_epptr(&this->base));
4100 if(ptr && ptr<basic_streambuf_wchar_epptr(&this->base))
4101 return (*basic_streambuf_wchar__Pninc(&this->base) = meta);
4103 oldsize = (ptr ? basic_streambuf_wchar_epptr(&this->base)-basic_streambuf_wchar_eback(&this->base): 0);
4106 buf = MSVCRT_operator_new(size*sizeof(wchar_t));
4108 ERR("Out of memory\n");
4109 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
4113 this->seekhigh = buf;
4114 basic_streambuf_wchar_setp(&this->base, buf, buf+size);
4115 if(this->state & STRINGBUF_no_read)
4116 basic_streambuf_wchar_setg(&this->base, buf, NULL, buf);
4118 basic_streambuf_wchar_setg(&this->base, buf, buf, buf+1);
4120 this->state |= STRINGBUF_allocated;
4122 ptr = basic_streambuf_wchar_eback(&this->base);
4123 memcpy(buf, ptr, oldsize*sizeof(wchar_t));
4125 this->seekhigh = buf+(this->seekhigh-ptr);
4126 basic_streambuf_wchar_setp_next(&this->base, buf,
4127 buf+(basic_streambuf_wchar_pptr(&this->base)-ptr), buf+size);
4128 if(this->state & STRINGBUF_no_read)
4129 basic_streambuf_wchar_setg(&this->base, buf, NULL, buf);
4131 basic_streambuf_wchar_setg(&this->base, buf,
4132 buf+(basic_streambuf_wchar_gptr(&this->base)-ptr),
4133 basic_streambuf_wchar_pptr(&this->base)+1);
4135 MSVCRT_operator_delete(ptr);
4138 return (*basic_streambuf_wchar__Pninc(&this->base) = meta);
4141 /* ?pbackfail@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGG@Z */
4142 /* ?pbackfail@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGG@Z */
4143 /* ?pbackfail@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGG@Z */
4144 /* ?pbackfail@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGG@Z */
4145 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_pbackfail, 8)
4146 unsigned short __thiscall basic_stringbuf_wchar_pbackfail(basic_stringbuf_wchar *this, unsigned short c)
4150 TRACE("(%p %x)\n", this, c);
4152 cur = basic_streambuf_wchar_gptr(&this->base);
4153 if(!cur || cur==basic_streambuf_wchar_eback(&this->base)
4154 || (c!=WEOF && c!=cur[-1] && this->state&STRINGBUF_no_write))
4159 basic_streambuf_wchar_gbump(&this->base, -1);
4160 return c==WEOF ? !WEOF : c;
4163 /* ?underflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGXZ */
4164 /* ?underflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGXZ */
4165 /* ?underflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGXZ */
4166 /* ?underflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGXZ */
4167 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_underflow, 4)
4168 unsigned short __thiscall basic_stringbuf_wchar_underflow(basic_stringbuf_wchar *this)
4172 TRACE("(%p)\n", this);
4174 cur = basic_streambuf_wchar_gptr(&this->base);
4175 if(!cur || this->state&STRINGBUF_no_read)
4178 ptr = basic_streambuf_wchar_pptr(&this->base);
4179 if(this->seekhigh < ptr)
4180 this->seekhigh = ptr;
4182 ptr = basic_streambuf_wchar_egptr(&this->base);
4183 if(this->seekhigh > ptr)
4184 basic_streambuf_wchar_setg(&this->base, basic_streambuf_wchar_eback(&this->base), cur, this->seekhigh);
4186 if(cur < this->seekhigh)
4191 /* ?seekoff@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */
4192 /* ?seekoff@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
4193 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */
4194 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
4195 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_seekoff, 20)
4196 fpos_int* __thiscall basic_stringbuf_wchar_seekoff(basic_stringbuf_wchar *this,
4197 fpos_int *ret, streamoff off, int way, int mode)
4199 wchar_t *beg, *cur_r, *cur_w;
4201 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
4203 cur_w = basic_streambuf_wchar_pptr(&this->base);
4204 if(cur_w > this->seekhigh)
4205 this->seekhigh = cur_w;
4211 beg = basic_streambuf_wchar_eback(&this->base);
4212 cur_r = basic_streambuf_wchar_gptr(&this->base);
4213 if((mode & OPENMODE_in) && cur_r) {
4214 if(way==SEEKDIR_cur && !(mode & OPENMODE_out))
4216 else if(way == SEEKDIR_end)
4217 off += this->seekhigh-beg;
4218 else if(way != SEEKDIR_beg)
4221 if(off<0 || off>this->seekhigh-beg) {
4224 basic_streambuf_wchar_gbump(&this->base, beg-cur_r+off);
4225 if((mode & OPENMODE_out) && cur_w) {
4226 basic_streambuf_wchar_setp_next(&this->base, beg,
4227 basic_streambuf_wchar_gptr(&this->base),
4228 basic_streambuf_wchar_epptr(&this->base));
4231 }else if((mode & OPENMODE_out) && cur_w) {
4232 if(way == SEEKDIR_cur)
4234 else if(way == SEEKDIR_end)
4235 off += this->seekhigh-beg;
4236 else if(way != SEEKDIR_beg)
4239 if(off<0 || off>this->seekhigh-beg)
4242 basic_streambuf_wchar_pbump(&this->base, beg-cur_w+off);
4251 /* ?seekpos@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
4252 /* ?seekpos@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
4253 /* ?seekpos@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
4254 /* ?seekpos@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
4255 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_seekpos, 36)
4256 fpos_int* __thiscall basic_stringbuf_wchar_seekpos(basic_stringbuf_wchar *this,
4257 fpos_int *ret, fpos_int pos, int mode)
4259 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
4261 if(pos.off==-1 && pos.pos==0 && pos.state==0) {
4266 return basic_stringbuf_wchar_seekoff(this, ret, pos.off, SEEKDIR_beg, mode);
4269 /* ?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 */
4270 /* ?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 */
4271 /* ?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 */
4272 /* ?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 */
4273 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_str_set, 8)
4274 void __thiscall basic_stringbuf_wchar_str_set(basic_stringbuf_wchar *this, const basic_string_wchar *str)
4276 TRACE("(%p %p)\n", this, str);
4278 basic_stringbuf_wchar__Tidy(this);
4279 basic_stringbuf_wchar__Init(this, MSVCP_basic_string_wchar_c_str(str), str->size, this->state);
4282 /* ?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 */
4283 /* ?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 */
4284 /* ?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 */
4285 /* ?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 */
4286 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_str_get, 8)
4287 basic_string_wchar* __thiscall basic_stringbuf_wchar_str_get(const basic_stringbuf_wchar *this, basic_string_wchar *ret)
4291 TRACE("(%p)\n", this);
4293 if(!(this->state & STRINGBUF_no_write) && basic_streambuf_wchar_pptr(&this->base)) {
4296 ptr = basic_streambuf_wchar_pbase(&this->base);
4297 pptr = basic_streambuf_wchar_pptr(&this->base);
4299 return MSVCP_basic_string_wchar_ctor_cstr_len(ret, ptr, (this->seekhigh < pptr ? pptr : this->seekhigh) - ptr);
4302 if(!(this->state & STRINGBUF_no_read) && basic_streambuf_wchar_gptr(&this->base)) {
4303 ptr = basic_streambuf_wchar_eback(&this->base);
4304 return MSVCP_basic_string_wchar_ctor_cstr_len(ret, ptr, basic_streambuf_wchar_egptr(&this->base) - ptr);
4307 return MSVCP_basic_string_wchar_ctor(ret);
4310 /* ??0ios_base@std@@IAE@XZ */
4311 /* ??0ios_base@std@@IEAA@XZ */
4312 DEFINE_THISCALL_WRAPPER(ios_base_ctor, 4)
4313 ios_base* __thiscall ios_base_ctor(ios_base *this)
4315 TRACE("(%p)\n", this);
4316 this->vtable = &MSVCP_ios_base_vtable;
4320 /* ??0ios_base@std@@QAE@ABV01@@Z */
4321 /* ??0ios_base@std@@QEAA@AEBV01@@Z */
4322 DEFINE_THISCALL_WRAPPER(ios_base_copy_ctor, 8)
4323 ios_base* __thiscall ios_base_copy_ctor(ios_base *this, const ios_base *copy)
4325 TRACE("(%p %p)\n", this, copy);
4327 this->vtable = &MSVCP_ios_base_vtable;
4331 /* ?_Callfns@ios_base@std@@AAEXW4event@12@@Z */
4332 /* ?_Callfns@ios_base@std@@AEAAXW4event@12@@Z */
4333 DEFINE_THISCALL_WRAPPER(ios_base_Callfns, 8)
4334 void __thiscall ios_base_Callfns(ios_base *this, IOS_BASE_event event)
4336 IOS_BASE_fnarray *cur;
4338 TRACE("(%p %x)\n", this, event);
4340 for(cur=this->calls; cur; cur=cur->next)
4341 cur->event_handler(event, this, cur->index);
4344 /* ?_Tidy@ios_base@std@@AAAXXZ */
4345 /* ?_Tidy@ios_base@std@@AEAAXXZ */
4346 void CDECL ios_base_Tidy(ios_base *this)
4348 IOS_BASE_iosarray *arr_cur, *arr_next;
4349 IOS_BASE_fnarray *event_cur, *event_next;
4351 TRACE("(%p)\n", this);
4353 ios_base_Callfns(this, EVENT_erase_event);
4355 for(arr_cur=this->arr; arr_cur; arr_cur=arr_next) {
4356 arr_next = arr_cur->next;
4357 MSVCRT_operator_delete(arr_cur);
4361 for(event_cur=this->calls; event_cur; event_cur=event_next) {
4362 event_next = event_cur->next;
4363 MSVCRT_operator_delete(event_cur);
4368 /* ?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z */
4369 /* ?_Ios_base_dtor@ios_base@std@@CAXPEAV12@@Z */
4370 static void ios_base_Ios_base_dtor(ios_base *obj)
4372 TRACE("(%p)\n", obj);
4374 locale_dtor(obj->loc);
4375 MSVCRT_operator_delete(obj->loc);
4380 /* ??1ios_base@std@@UAE@XZ */
4381 /* ??1ios_base@std@@UEAA@XZ */
4382 DEFINE_THISCALL_WRAPPER(ios_base_dtor, 4)
4383 void __thiscall ios_base_dtor(ios_base *this)
4385 ios_base_Ios_base_dtor(this);
4388 DEFINE_THISCALL_WRAPPER(ios_base_vector_dtor, 8)
4389 ios_base* __thiscall ios_base_vector_dtor(ios_base *this, unsigned int flags)
4391 TRACE("(%p %x)\n", this, flags);
4393 /* we have an array, with the number of elements stored before the first object */
4394 INT_PTR i, *ptr = (INT_PTR *)this-1;
4396 for(i=*ptr-1; i>=0; i--)
4397 ios_base_dtor(this+i);
4398 MSVCRT_operator_delete(ptr);
4400 ios_base_dtor(this);
4402 MSVCRT_operator_delete(this);
4408 DEFINE_THISCALL_WRAPPER(iosb_vector_dtor, 8)
4409 void* __thiscall iosb_vector_dtor(void *this, unsigned int flags)
4411 TRACE("(%p %x)\n", this, flags);
4413 INT_PTR *ptr = (INT_PTR *)this-1;
4414 MSVCRT_operator_delete(ptr);
4417 MSVCRT_operator_delete(this);
4423 /* ?_Findarr@ios_base@std@@AAEAAU_Iosarray@12@H@Z */
4424 /* ?_Findarr@ios_base@std@@AEAAAEAU_Iosarray@12@H@Z */
4425 DEFINE_THISCALL_WRAPPER(ios_base_Findarr, 8)
4426 IOS_BASE_iosarray* __thiscall ios_base_Findarr(ios_base *this, int index)
4428 IOS_BASE_iosarray *p;
4430 TRACE("(%p %d)\n", this, index);
4432 for(p=this->arr; p; p=p->next) {
4433 if(p->index == index)
4437 for(p=this->arr; p; p=p->next) {
4438 if(!p->long_val && !p->ptr_val) {
4444 p = MSVCRT_operator_new(sizeof(IOS_BASE_iosarray));
4445 p->next = this->arr;
4453 /* ?iword@ios_base@std@@QAEAAJH@Z */
4454 /* ?iword@ios_base@std@@QEAAAEAJH@Z */
4455 DEFINE_THISCALL_WRAPPER(ios_base_iword, 8)
4456 LONG* __thiscall ios_base_iword(ios_base *this, int index)
4458 TRACE("(%p %d)\n", this, index);
4459 return &ios_base_Findarr(this, index)->long_val;
4462 /* ?pword@ios_base@std@@QAEAAPAXH@Z */
4463 /* ?pword@ios_base@std@@QEAAAEAPEAXH@Z */
4464 DEFINE_THISCALL_WRAPPER(ios_base_pword, 8)
4465 void** __thiscall ios_base_pword(ios_base *this, int index)
4467 TRACE("(%p %d)\n", this, index);
4468 return &ios_base_Findarr(this, index)->ptr_val;
4471 /* ?register_callback@ios_base@std@@QAEXP6AXW4event@12@AAV12@H@ZH@Z */
4472 /* ?register_callback@ios_base@std@@QEAAXP6AXW4event@12@AEAV12@H@ZH@Z */
4473 DEFINE_THISCALL_WRAPPER(ios_base_register_callback, 12)
4474 void __thiscall ios_base_register_callback(ios_base *this, IOS_BASE_event_callback callback, int index)
4476 IOS_BASE_fnarray *event;
4478 TRACE("(%p %p %d)\n", this, callback, index);
4480 event = MSVCRT_operator_new(sizeof(IOS_BASE_fnarray));
4481 event->next = this->calls;
4482 event->index = index;
4483 event->event_handler = callback;
4484 this->calls = event;
4487 /* ?clear@ios_base@std@@QAEXH_N@Z */
4488 /* ?clear@ios_base@std@@QEAAXH_N@Z */
4489 DEFINE_THISCALL_WRAPPER(ios_base_clear_reraise, 12)
4490 void __thiscall ios_base_clear_reraise(ios_base *this, IOSB_iostate state, MSVCP_bool reraise)
4492 TRACE("(%p %x %x)\n", this, state, reraise);
4494 this->state = state & IOSTATE_mask;
4495 if(!(this->state & this->except))
4499 throw_exception(EXCEPTION_RERAISE, NULL);
4500 else if(this->state & this->except & IOSTATE_eofbit)
4501 throw_exception(EXCEPTION_FAILURE, "eofbit is set");
4502 else if(this->state & this->except & IOSTATE_failbit)
4503 throw_exception(EXCEPTION_FAILURE, "failbit is set");
4504 else if(this->state & this->except & IOSTATE_badbit)
4505 throw_exception(EXCEPTION_FAILURE, "badbit is set");
4506 else if(this->state & this->except & IOSTATE__Hardfail)
4507 throw_exception(EXCEPTION_FAILURE, "_Hardfail is set");
4510 /* ?clear@ios_base@std@@QAEXH@Z */
4511 /* ?clear@ios_base@std@@QEAAXH@Z */
4512 DEFINE_THISCALL_WRAPPER(ios_base_clear, 8)
4513 void __thiscall ios_base_clear(ios_base *this, IOSB_iostate state)
4515 ios_base_clear_reraise(this, state, FALSE);
4518 /* ?clear@ios_base@std@@QAEXI@Z */
4519 /* ?clear@ios_base@std@@QEAAXI@Z */
4520 DEFINE_THISCALL_WRAPPER(ios_base_clear_unsigned, 8)
4521 void __thiscall ios_base_clear_unsigned(ios_base *this, unsigned int state)
4523 ios_base_clear_reraise(this, (IOSB_iostate)state, FALSE);
4526 /* ?exceptions@ios_base@std@@QAEXH@Z */
4527 /* ?exceptions@ios_base@std@@QEAAXH@Z */
4528 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_set, 8)
4529 void __thiscall ios_base_exceptions_set(ios_base *this, IOSB_iostate state)
4531 TRACE("(%p %x)\n", this, state);
4532 this->except = state & IOSTATE_mask;
4533 ios_base_clear(this, this->state);
4536 /* ?exceptions@ios_base@std@@QAEXI@Z */
4537 /* ?exceptions@ios_base@std@@QEAAXI@Z */
4538 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_set_unsigned, 8)
4539 void __thiscall ios_base_exceptions_set_unsigned(ios_base *this, unsigned int state)
4541 TRACE("(%p %x)\n", this, state);
4542 ios_base_exceptions_set(this, state);
4545 /* ?exceptions@ios_base@std@@QBEHXZ */
4546 /* ?exceptions@ios_base@std@@QEBAHXZ */
4547 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_get, 4)
4548 IOSB_iostate __thiscall ios_base_exceptions_get(ios_base *this)
4550 TRACE("(%p)\n", this);
4551 return this->except;
4554 /* ?copyfmt@ios_base@std@@QAEAAV12@ABV12@@Z */
4555 /* ?copyfmt@ios_base@std@@QEAAAEAV12@AEBV12@@Z */
4556 DEFINE_THISCALL_WRAPPER(ios_base_copyfmt, 8)
4557 ios_base* __thiscall ios_base_copyfmt(ios_base *this, const ios_base *rhs)
4559 TRACE("(%p %p)\n", this, rhs);
4562 IOS_BASE_iosarray *arr_cur;
4563 IOS_BASE_fnarray *event_cur;
4565 ios_base_Tidy(this);
4567 for(arr_cur=rhs->arr; arr_cur; arr_cur=arr_cur->next) {
4568 if(arr_cur->long_val)
4569 *ios_base_iword(this, arr_cur->index) = arr_cur->long_val;
4570 if(arr_cur->ptr_val)
4571 *ios_base_pword(this, arr_cur->index) = arr_cur->ptr_val;
4573 this->stdstr = rhs->stdstr;
4574 this->fmtfl = rhs->fmtfl;
4575 this->prec = rhs->prec;
4576 this->wide = rhs->wide;
4577 locale_operator_assign(this->loc, rhs->loc);
4579 for(event_cur=rhs->calls; event_cur; event_cur=event_cur->next)
4580 ios_base_register_callback(this, event_cur->event_handler, event_cur->index);
4582 ios_base_Callfns(this, EVENT_copyfmt_event);
4583 ios_base_exceptions_set(this, rhs->except);
4589 /* ??4ios_base@std@@QAEAAV01@ABV01@@Z */
4590 /* ??4ios_base@std@@QEAAAEAV01@AEBV01@@Z */
4591 DEFINE_THISCALL_WRAPPER(ios_base_assign, 8)
4592 ios_base* __thiscall ios_base_assign(ios_base *this, const ios_base *right)
4594 TRACE("(%p %p)\n", this, right);
4597 this->state = right->state;
4598 ios_base_copyfmt(this, right);
4604 /* ?fail@ios_base@std@@QBE_NXZ */
4605 /* ?fail@ios_base@std@@QEBA_NXZ */
4606 DEFINE_THISCALL_WRAPPER(ios_base_fail, 4)
4607 MSVCP_bool __thiscall ios_base_fail(const ios_base *this)
4609 TRACE("(%p)\n", this);
4610 return (this->state & (IOSTATE_failbit|IOSTATE_badbit)) != 0;
4613 /* ??7ios_base@std@@QBE_NXZ */
4614 /* ??7ios_base@std@@QEBA_NXZ */
4615 DEFINE_THISCALL_WRAPPER(ios_base_op_succ, 4)
4616 MSVCP_bool __thiscall ios_base_op_succ(const ios_base *this)
4618 TRACE("(%p)\n", this);
4619 return ios_base_fail(this);
4622 /* ??Bios_base@std@@QBEPAXXZ */
4623 /* ??Bios_base@std@@QEBAPEAXXZ */
4624 DEFINE_THISCALL_WRAPPER(ios_base_op_fail, 4)
4625 void* __thiscall ios_base_op_fail(const ios_base *this)
4627 TRACE("(%p)\n", this);
4628 return ios_base_fail(this) ? NULL : (void*)this;
4631 /* ?_Addstd@ios_base@std@@SAXPAV12@@Z */
4632 /* ?_Addstd@ios_base@std@@SAXPEAV12@@Z */
4633 static void ios_base_Addstd(ios_base *add)
4635 FIXME("(%p) stub\n", add);
4638 /* ?_Init@ios_base@std@@IAEXXZ */
4639 /* ?_Init@ios_base@std@@IEAAXXZ */
4640 DEFINE_THISCALL_WRAPPER(ios_base__Init, 4)
4641 void __thiscall ios_base__Init(ios_base *this)
4643 TRACE("(%p)\n", this);
4646 this->state = this->except = IOSTATE_goodbit;
4647 this->fmtfl = FMTFLAG_skipws | FMTFLAG_dec;
4652 this->loc = MSVCRT_operator_new(sizeof(locale));
4653 locale_ctor(this->loc);
4656 /* ?bad@ios_base@std@@QBE_NXZ */
4657 /* ?bad@ios_base@std@@QEBA_NXZ */
4658 DEFINE_THISCALL_WRAPPER(ios_base_bad, 4)
4659 MSVCP_bool __thiscall ios_base_bad(const ios_base *this)
4661 TRACE("(%p)\n", this);
4662 return (this->state & IOSTATE_badbit) != 0;
4665 /* ?eof@ios_base@std@@QBE_NXZ */
4666 /* ?eof@ios_base@std@@QEBA_NXZ */
4667 DEFINE_THISCALL_WRAPPER(ios_base_eof, 4)
4668 MSVCP_bool __thiscall ios_base_eof(const ios_base *this)
4670 TRACE("(%p)\n", this);
4671 return (this->state & IOSTATE_eofbit) != 0;
4674 /* ?flags@ios_base@std@@QAEHH@Z */
4675 /* ?flags@ios_base@std@@QEAAHH@Z */
4676 DEFINE_THISCALL_WRAPPER(ios_base_flags_set, 8)
4677 IOSB_fmtflags __thiscall ios_base_flags_set(ios_base *this, IOSB_fmtflags flags)
4679 IOSB_fmtflags ret = this->fmtfl;
4681 TRACE("(%p %x)\n", this, flags);
4683 this->fmtfl = flags & FMTFLAG_mask;
4687 /* ?flags@ios_base@std@@QBEHXZ */
4688 /* ?flags@ios_base@std@@QEBAHXZ */
4689 DEFINE_THISCALL_WRAPPER(ios_base_flags_get, 4)
4690 IOSB_fmtflags __thiscall ios_base_flags_get(const ios_base *this)
4692 TRACE("(%p)\n", this);
4696 /* ?getloc@ios_base@std@@QBE?AVlocale@2@XZ */
4697 /* ?getloc@ios_base@std@@QEBA?AVlocale@2@XZ */
4698 DEFINE_THISCALL_WRAPPER(ios_base_getloc, 8)
4699 locale* __thiscall ios_base_getloc(const ios_base *this, locale *ret)
4701 TRACE("(%p)\n", this);
4702 return locale_copy_ctor(ret, this->loc);
4705 /* ?good@ios_base@std@@QBE_NXZ */
4706 /* ?good@ios_base@std@@QEBA_NXZ */
4707 DEFINE_THISCALL_WRAPPER(ios_base_good, 4)
4708 MSVCP_bool __thiscall ios_base_good(const ios_base *this)
4710 TRACE("(%p)\n", this);
4711 return this->state == IOSTATE_goodbit;
4714 /* ?imbue@ios_base@std@@QAE?AVlocale@2@ABV32@@Z */
4715 /* ?imbue@ios_base@std@@QEAA?AVlocale@2@AEBV32@@Z */
4716 DEFINE_THISCALL_WRAPPER(ios_base_imbue, 12)
4717 locale* __thiscall ios_base_imbue(ios_base *this, locale *ret, const locale *loc)
4719 TRACE("(%p %p)\n", this, loc);
4721 locale_copy_ctor(this->loc, loc);
4725 /* ?precision@ios_base@std@@QAEHH@Z */
4726 /* ?precision@ios_base@std@@QEAA_J_J@Z */
4727 DEFINE_THISCALL_WRAPPER(ios_base_precision_set, 8)
4728 streamsize __thiscall ios_base_precision_set(ios_base *this, streamsize precision)
4730 streamsize ret = this->prec;
4732 TRACE("(%p %ld)\n", this, precision);
4734 this->prec = precision;
4738 /* ?precision@ios_base@std@@QBEHXZ */
4739 /* ?precision@ios_base@std@@QEBA_JXZ */
4740 DEFINE_THISCALL_WRAPPER(ios_base_precision_get, 4)
4741 streamsize __thiscall ios_base_precision_get(const ios_base *this)
4743 TRACE("(%p)\n", this);
4747 /* ?rdstate@ios_base@std@@QBEHXZ */
4748 /* ?rdstate@ios_base@std@@QEBAHXZ */
4749 DEFINE_THISCALL_WRAPPER(ios_base_rdstate, 4)
4750 IOSB_iostate __thiscall ios_base_rdstate(const ios_base *this)
4752 TRACE("(%p)\n", this);
4756 /* ?setf@ios_base@std@@QAEHHH@Z */
4757 /* ?setf@ios_base@std@@QEAAHHH@Z */
4758 DEFINE_THISCALL_WRAPPER(ios_base_setf_mask, 12)
4759 IOSB_fmtflags __thiscall ios_base_setf_mask(ios_base *this, IOSB_fmtflags flags, IOSB_fmtflags mask)
4761 IOSB_fmtflags ret = this->fmtfl;
4763 TRACE("(%p %x %x)\n", this, flags, mask);
4765 this->fmtfl = (this->fmtfl & (~mask)) | (flags & mask & FMTFLAG_mask);
4769 /* ?setf@ios_base@std@@QAEHH@Z */
4770 /* ?setf@ios_base@std@@QEAAHH@Z */
4771 DEFINE_THISCALL_WRAPPER(ios_base_setf, 8)
4772 IOSB_fmtflags __thiscall ios_base_setf(ios_base *this, IOSB_fmtflags flags)
4774 return ios_base_setf_mask(this, flags, ~0);
4777 /* ?setstate@ios_base@std@@QAEXH_N@Z */
4778 /* ?setstate@ios_base@std@@QEAAXH_N@Z */
4779 DEFINE_THISCALL_WRAPPER(ios_base_setstate_reraise, 12)
4780 void __thiscall ios_base_setstate_reraise(ios_base *this, IOSB_iostate state, MSVCP_bool reraise)
4782 TRACE("(%p %x %x)\n", this, state, reraise);
4784 if(state != IOSTATE_goodbit)
4785 ios_base_clear_reraise(this, this->state | state, reraise);
4788 /* ?setstate@ios_base@std@@QAEXH@Z */
4789 /* ?setstate@ios_base@std@@QEAAXH@Z */
4790 DEFINE_THISCALL_WRAPPER(ios_base_setstate, 8)
4791 void __thiscall ios_base_setstate(ios_base *this, IOSB_iostate state)
4793 ios_base_setstate_reraise(this, state, FALSE);
4796 /* ?setstate@ios_base@std@@QAEXI@Z */
4797 /* ?setstate@ios_base@std@@QEAAXI@Z */
4798 DEFINE_THISCALL_WRAPPER(ios_base_setstate_unsigned, 8)
4799 void __thiscall ios_base_setstate_unsigned(ios_base *this, unsigned int state)
4801 ios_base_setstate_reraise(this, (IOSB_iostate)state, FALSE);
4804 /* ?sync_with_stdio@ios_base@std@@SA_N_N@Z */
4805 MSVCP_bool CDECL ios_base_sync_with_stdio(MSVCP_bool sync)
4810 TRACE("(%x)\n", sync);
4812 _Lockit_ctor_locktype(&lock, _LOCK_STREAM);
4813 ret = ios_base_Sync;
4814 ios_base_Sync = sync;
4815 _Lockit_dtor(&lock);
4819 /* ?unsetf@ios_base@std@@QAEXH@Z */
4820 /* ?unsetf@ios_base@std@@QEAAXH@Z */
4821 DEFINE_THISCALL_WRAPPER(ios_base_unsetf, 8)
4822 void __thiscall ios_base_unsetf(ios_base *this, IOSB_fmtflags flags)
4824 TRACE("(%p %x)\n", this, flags);
4825 this->fmtfl &= ~flags;
4828 /* ?width@ios_base@std@@QAEHH@Z */
4829 /* ?width@ios_base@std@@QEAA_J_J@Z */
4830 DEFINE_THISCALL_WRAPPER(ios_base_width_set, 8)
4831 streamsize __thiscall ios_base_width_set(ios_base *this, streamsize width)
4833 streamsize ret = this->wide;
4835 TRACE("(%p %ld)\n", this, width);
4841 /* ?width@ios_base@std@@QBEHXZ */
4842 /* ?width@ios_base@std@@QEBA_JXZ */
4843 DEFINE_THISCALL_WRAPPER(ios_base_width_get, 4)
4844 streamsize __thiscall ios_base_width_get(ios_base *this)
4846 TRACE("(%p)\n", this);
4850 /* ?xalloc@ios_base@std@@SAHXZ */
4851 int CDECL ios_base_xalloc(void)
4858 _Lockit_ctor_locktype(&lock, _LOCK_STREAM);
4859 ret = ios_base_Index++;
4860 _Lockit_dtor(&lock);
4864 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IAE@XZ */
4865 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IEAA@XZ */
4866 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor, 4)
4867 basic_ios_char* __thiscall basic_ios_char_ctor(basic_ios_char *this)
4869 TRACE("(%p)\n", this);
4871 ios_base_ctor(&this->base);
4872 this->base.vtable = &MSVCP_basic_ios_char_vtable;
4876 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IAEXPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
4877 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
4878 DEFINE_THISCALL_WRAPPER(basic_ios_char_init, 12)
4879 void __thiscall basic_ios_char_init(basic_ios_char *this, basic_streambuf_char *streambuf, MSVCP_bool isstd)
4881 TRACE("(%p %p %x)\n", this, streambuf, isstd);
4882 ios_base__Init(&this->base);
4883 this->strbuf = streambuf;
4884 this->stream = NULL;
4888 ios_base_setstate(&this->base, IOSTATE_badbit);
4891 FIXME("standard streams not handled yet\n");
4894 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4895 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4896 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor_streambuf, 8)
4897 basic_ios_char* __thiscall basic_ios_char_ctor_streambuf(basic_ios_char *this, basic_streambuf_char *strbuf)
4899 TRACE("(%p %p)\n", this, strbuf);
4901 basic_ios_char_ctor(this);
4902 basic_ios_char_init(this, strbuf, FALSE);
4906 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UAE@XZ */
4907 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UEAA@XZ */
4908 DEFINE_THISCALL_WRAPPER(basic_ios_char_dtor, 4)
4909 void __thiscall basic_ios_char_dtor(basic_ios_char *this)
4911 TRACE("(%p)\n", this);
4912 ios_base_dtor(&this->base);
4915 DEFINE_THISCALL_WRAPPER(basic_ios_char_vector_dtor, 8)
4916 basic_ios_char* __thiscall basic_ios_char_vector_dtor(basic_ios_char *this, unsigned int flags)
4918 TRACE("(%p %x)\n", this, flags);
4920 /* we have an array, with the number of elements stored before the first object */
4921 INT_PTR i, *ptr = (INT_PTR *)this-1;
4923 for(i=*ptr-1; i>=0; i--)
4924 basic_ios_char_dtor(this+i);
4925 MSVCRT_operator_delete(ptr);
4927 basic_ios_char_dtor(this);
4929 MSVCRT_operator_delete(this);
4935 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
4936 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
4937 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear_reraise, 12)
4938 void __thiscall basic_ios_char_clear_reraise(basic_ios_char *this, IOSB_iostate state, MSVCP_bool reraise)
4940 TRACE("(%p %x %x)\n", this, state, reraise);
4941 ios_base_clear_reraise(&this->base, state | (this->strbuf ? IOSTATE_goodbit : IOSTATE_badbit), reraise);
4944 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
4945 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
4946 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear, 8)
4947 void __thiscall basic_ios_char_clear(basic_ios_char *this, unsigned int state)
4949 basic_ios_char_clear_reraise(this, (IOSB_iostate)state, FALSE);
4952 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEAAV12@ABV12@@Z */
4953 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEBV12@@Z */
4954 DEFINE_THISCALL_WRAPPER(basic_ios_char_copyfmt, 8)
4955 basic_ios_char* __thiscall basic_ios_char_copyfmt(basic_ios_char *this, basic_ios_char *copy)
4957 TRACE("(%p %p)\n", this, copy);
4961 this->stream = copy->stream;
4962 this->fillch = copy->fillch;
4963 ios_base_copyfmt(&this->base, ©->base);
4967 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEDD@Z */
4968 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAADD@Z */
4969 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_set, 8)
4970 char __thiscall basic_ios_char_fill_set(basic_ios_char *this, char fill)
4972 char ret = this->fillch;
4974 TRACE("(%p %c)\n", this, fill);
4976 this->fillch = fill;
4980 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDXZ */
4981 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADXZ */
4982 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_get, 4)
4983 char __thiscall basic_ios_char_fill_get(basic_ios_char *this)
4985 TRACE("(%p)\n", this);
4986 return this->fillch;
4989 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
4990 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
4991 DEFINE_THISCALL_WRAPPER(basic_ios_char_imbue, 12)
4992 locale *__thiscall basic_ios_char_imbue(basic_ios_char *this, locale *ret, const locale *loc)
4994 TRACE("(%p %p %p)\n", this, ret, loc);
4997 basic_streambuf_char_pubimbue(this->strbuf, ret, loc);
5001 return ios_base_imbue(&this->base, ret, loc);
5004 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDDD@Z */
5005 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADDD@Z */
5006 DEFINE_THISCALL_WRAPPER(basic_ios_char_narrow, 12)
5007 char __thiscall basic_ios_char_narrow(basic_ios_char *this, char ch, char def)
5009 TRACE("(%p %c %c)\n", this, ch, def);
5010 return ctype_char_narrow_ch(ctype_char_use_facet(this->strbuf->loc), ch, def);
5013 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PAV32@@Z */
5014 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAV32@@Z */
5015 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_set, 8)
5016 basic_streambuf_char* __thiscall basic_ios_char_rdbuf_set(basic_ios_char *this, basic_streambuf_char *streambuf)
5018 basic_streambuf_char *ret = this->strbuf;
5020 TRACE("(%p %p)\n", this, streambuf);
5022 this->strbuf = streambuf;
5023 basic_ios_char_clear(this, IOSTATE_goodbit);
5027 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
5028 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
5029 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_get, 4)
5030 basic_streambuf_char* __thiscall basic_ios_char_rdbuf_get(const basic_ios_char *this)
5032 TRACE("(%p)\n", this);
5033 return this->strbuf;
5036 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
5037 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
5038 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate_reraise, 12)
5039 void __thiscall basic_ios_char_setstate_reraise(basic_ios_char *this, IOSB_iostate state, MSVCP_bool reraise)
5041 TRACE("(%p %x %x)\n", this, state, reraise);
5043 if(state != IOSTATE_goodbit)
5044 basic_ios_char_clear_reraise(this, this->base.state | state, reraise);
5047 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
5048 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
5049 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate, 8)
5050 void __thiscall basic_ios_char_setstate(basic_ios_char *this, unsigned int state)
5052 basic_ios_char_setstate_reraise(this, (IOSB_iostate)state, FALSE);
5055 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@PAV32@@Z */
5056 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@PEAV32@@Z */
5057 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_set, 8)
5058 basic_ostream_char* __thiscall basic_ios_char_tie_set(basic_ios_char *this, basic_ostream_char *ostream)
5060 basic_ostream_char *ret = this->stream;
5062 TRACE("(%p %p)\n", this, ostream);
5064 this->stream = ostream;
5068 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
5069 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
5070 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_get, 4)
5071 basic_ostream_char* __thiscall basic_ios_char_tie_get(const basic_ios_char *this)
5073 TRACE("(%p)\n", this);
5074 return this->stream;
5077 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDD@Z */
5078 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADD@Z */
5079 DEFINE_THISCALL_WRAPPER(basic_ios_char_widen, 8)
5080 char __thiscall basic_ios_char_widen(basic_ios_char *this, char ch)
5082 TRACE("(%p %c)\n", this, ch);
5083 return ctype_char_widen_ch(ctype_char_use_facet(this->strbuf->loc), ch);
5087 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAE@XZ */
5088 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */
5089 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_ctor, 4)
5090 basic_ios_wchar* __thiscall basic_ios_wchar_ctor(basic_ios_wchar *this)
5092 TRACE("(%p)\n", this);
5094 ios_base_ctor(&this->base);
5095 this->base.vtable = &MSVCP_basic_ios_wchar_vtable;
5099 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IAE@XZ */
5100 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IEAA@XZ */
5101 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor, 4)
5102 basic_ios_wchar* __thiscall basic_ios_short_ctor(basic_ios_wchar *this)
5104 basic_ios_wchar_ctor(this);
5105 this->base.vtable = &MSVCP_basic_ios_short_vtable;
5109 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAEXPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
5110 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAAXPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
5111 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IAEXPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
5112 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IEAAXPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
5113 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_init, 12)
5114 void __thiscall basic_ios_wchar_init(basic_ios_wchar *this, basic_streambuf_wchar *streambuf, MSVCP_bool isstd)
5116 TRACE("(%p %p %x)\n", this, streambuf, isstd);
5117 ios_base__Init(&this->base);
5118 this->strbuf = streambuf;
5119 this->stream = NULL;
5123 ios_base_setstate(&this->base, IOSTATE_badbit);
5126 FIXME("standard streams not handled yet\n");
5129 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
5130 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
5131 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_ctor_streambuf, 8)
5132 basic_ios_wchar* __thiscall basic_ios_wchar_ctor_streambuf(basic_ios_wchar *this, basic_streambuf_wchar *strbuf)
5134 TRACE("(%p %p)\n", this, strbuf);
5136 basic_ios_wchar_ctor(this);
5137 basic_ios_wchar_init(this, strbuf, FALSE);
5141 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
5142 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
5143 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor_streambuf, 8)
5144 basic_ios_wchar* __thiscall basic_ios_short_ctor_streambuf(basic_ios_wchar *this, basic_streambuf_wchar *strbuf)
5146 basic_ios_wchar_ctor_streambuf(this, strbuf);
5147 this->base.vtable = &MSVCP_basic_ios_short_vtable;
5151 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
5152 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
5153 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UAE@XZ */
5154 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UEAA@XZ */
5155 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_dtor, 4)
5156 void __thiscall basic_ios_wchar_dtor(basic_ios_wchar *this)
5158 TRACE("(%p)\n", this);
5159 ios_base_dtor(&this->base);
5162 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_vector_dtor, 8)
5163 basic_ios_wchar* __thiscall basic_ios_wchar_vector_dtor(basic_ios_wchar *this, unsigned int flags)
5165 TRACE("(%p %x)\n", this, flags);
5167 /* we have an array, with the number of elements stored before the first object */
5168 INT_PTR i, *ptr = (INT_PTR *)this-1;
5170 for(i=*ptr-1; i>=0; i--)
5171 basic_ios_wchar_dtor(this+i);
5172 MSVCRT_operator_delete(ptr);
5174 basic_ios_wchar_dtor(this);
5176 MSVCRT_operator_delete(this);
5182 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
5183 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
5184 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
5185 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
5186 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_clear_reraise, 12)
5187 void __thiscall basic_ios_wchar_clear_reraise(basic_ios_wchar *this, IOSB_iostate state, MSVCP_bool reraise)
5189 TRACE("(%p %x %x)\n", this, state, reraise);
5190 ios_base_clear_reraise(&this->base, state | (this->strbuf ? IOSTATE_goodbit : IOSTATE_badbit), reraise);
5193 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
5194 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
5195 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
5196 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
5197 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_clear, 8)
5198 void __thiscall basic_ios_wchar_clear(basic_ios_wchar *this, unsigned int state)
5200 basic_ios_wchar_clear_reraise(this, (IOSB_iostate)state, FALSE);
5203 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEAAV12@ABV12@@Z */
5204 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEBV12@@Z */
5205 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEAAV12@ABV12@@Z */
5206 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEBV12@@Z */
5207 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_copyfmt, 8)
5208 basic_ios_wchar* __thiscall basic_ios_wchar_copyfmt(basic_ios_wchar *this, basic_ios_wchar *copy)
5210 TRACE("(%p %p)\n", this, copy);
5214 this->stream = copy->stream;
5215 this->fillch = copy->fillch;
5216 ios_base_copyfmt(&this->base, ©->base);
5220 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE_W_W@Z */
5221 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA_W_W@Z */
5222 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEGG@Z */
5223 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
5224 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_set, 8)
5225 wchar_t __thiscall basic_ios_wchar_fill_set(basic_ios_wchar *this, wchar_t fill)
5227 wchar_t ret = this->fillch;
5229 TRACE("(%p %c)\n", this, fill);
5231 this->fillch = fill;
5235 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WXZ */
5236 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WXZ */
5237 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGXZ */
5238 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGXZ */
5239 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_get, 4)
5240 wchar_t __thiscall basic_ios_wchar_fill_get(basic_ios_wchar *this)
5242 TRACE("(%p)\n", this);
5243 return this->fillch;
5246 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
5247 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
5248 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
5249 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
5250 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_imbue, 12)
5251 locale *__thiscall basic_ios_wchar_imbue(basic_ios_wchar *this, locale *ret, const locale *loc)
5253 TRACE("(%p %p %p)\n", this, ret, loc);
5256 basic_streambuf_wchar_pubimbue(this->strbuf, ret, loc);
5260 return ios_base_imbue(&this->base, ret, loc);
5263 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBED_WD@Z */
5264 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAD_WD@Z */
5265 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEDGD@Z */
5266 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBADGD@Z */
5267 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_narrow, 12)
5268 char __thiscall basic_ios_wchar_narrow(basic_ios_wchar *this, wchar_t ch, char def)
5270 TRACE("(%p %c %c)\n", this, ch, def);
5271 return ctype_wchar_narrow_ch(ctype_wchar_use_facet(this->strbuf->loc), ch, def);
5274 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
5275 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
5276 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAV32@@Z */
5277 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAV32@@Z */
5278 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_set, 8)
5279 basic_streambuf_wchar* __thiscall basic_ios_wchar_rdbuf_set(basic_ios_wchar *this, basic_streambuf_wchar *streambuf)
5281 basic_streambuf_wchar *ret = this->strbuf;
5283 TRACE("(%p %p)\n", this, streambuf);
5285 this->strbuf = streambuf;
5286 basic_ios_wchar_clear(this, IOSTATE_goodbit);
5290 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
5291 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
5292 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
5293 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
5294 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_get, 4)
5295 basic_streambuf_wchar* __thiscall basic_ios_wchar_rdbuf_get(const basic_ios_wchar *this)
5297 TRACE("(%p)\n", this);
5298 return this->strbuf;
5301 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
5302 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
5303 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
5304 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
5305 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_setstate_reraise, 12)
5306 void __thiscall basic_ios_wchar_setstate_reraise(basic_ios_wchar *this, IOSB_iostate state, MSVCP_bool reraise)
5308 TRACE("(%p %x %x)\n", this, state, reraise);
5310 if(state != IOSTATE_goodbit)
5311 basic_ios_wchar_clear_reraise(this, this->base.state | state, reraise);
5314 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
5315 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
5316 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
5317 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
5318 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_setstate, 8)
5319 void __thiscall basic_ios_wchar_setstate(basic_ios_wchar *this, IOSB_iostate state)
5321 basic_ios_wchar_setstate_reraise(this, state, FALSE);
5324 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
5325 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
5326 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@PAV32@@Z */
5327 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@PEAV32@@Z */
5328 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_set, 8)
5329 basic_ostream_wchar* __thiscall basic_ios_wchar_tie_set(basic_ios_wchar *this, basic_ostream_wchar *ostream)
5331 basic_ostream_wchar *ret = this->stream;
5333 TRACE("(%p %p)\n", this, ostream);
5335 this->stream = ostream;
5339 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
5340 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
5341 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
5342 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
5343 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_get, 4)
5344 basic_ostream_wchar* __thiscall basic_ios_wchar_tie_get(const basic_ios_wchar *this)
5346 TRACE("(%p)\n", this);
5347 return this->stream;
5350 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WD@Z */
5351 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WD@Z */
5352 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGD@Z */
5353 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGD@Z */
5354 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_widen, 8)
5355 wchar_t __thiscall basic_ios_wchar_widen(basic_ios_wchar *this, char ch)
5357 TRACE("(%p %c)\n", this, ch);
5358 return ctype_wchar_widen_ch(ctype_wchar_use_facet(this->strbuf->loc), ch);
5361 /* Caution: basic_ostream uses virtual inheritance.
5362 * All constructors have additional parameter that says if base class should be initialized.
5363 * Base class needs to be accessed using vbtable.
5365 static inline basic_ios_char* basic_ostream_char_get_basic_ios(basic_ostream_char *this)
5367 return (basic_ios_char*)((char*)this+this->vbtable[1]);
5370 static inline basic_ios_char* basic_ostream_char_to_basic_ios(basic_ostream_char *ptr)
5372 return (basic_ios_char*)((char*)ptr+basic_ostream_char_vbtable[1]);
5375 static inline basic_ostream_char* basic_ostream_char_from_basic_ios(basic_ios_char *ptr)
5377 return (basic_ostream_char*)((char*)ptr-basic_ostream_char_vbtable[1]);
5380 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
5381 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
5382 DEFINE_THISCALL_WRAPPER(basic_ostream_char_ctor, 16)
5383 basic_ostream_char* __thiscall basic_ostream_char_ctor(basic_ostream_char *this,
5384 basic_streambuf_char *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
5386 basic_ios_char *base;
5388 TRACE("(%p %p %d %d)\n", this, strbuf, isstd, virt_init);
5391 this->vbtable = basic_ostream_char_vbtable;
5392 base = basic_ostream_char_get_basic_ios(this);
5393 basic_ios_char_ctor(base);
5395 base = basic_ostream_char_get_basic_ios(this);
5398 base->base.vtable = &MSVCP_basic_ostream_char_vtable;
5399 basic_ios_char_init(base, strbuf, isstd);
5403 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */
5404 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */
5405 static basic_ostream_char* basic_ostream_char_ctor_uninitialized(basic_ostream_char *this,
5406 int uninitialized, MSVCP_bool addstd, MSVCP_bool virt_init)
5408 basic_ios_char *base;
5410 TRACE("(%p %d %x)\n", this, uninitialized, addstd);
5413 this->vbtable = basic_ostream_char_vbtable;
5414 base = basic_ostream_char_get_basic_ios(this);
5415 basic_ios_char_ctor(base);
5417 base = basic_ostream_char_get_basic_ios(this);
5420 base->base.vtable = &MSVCP_basic_ostream_char_vtable;
5422 ios_base_Addstd(&base->base);
5426 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
5427 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
5428 DEFINE_THISCALL_WRAPPER(basic_ostream_char_dtor, 4)
5429 void __thiscall basic_ostream_char_dtor(basic_ios_char *base)
5431 basic_ostream_char *this = basic_ostream_char_from_basic_ios(base);
5433 /* don't destroy virtual base here */
5434 TRACE("(%p)\n", this);
5437 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5438 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5439 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vbase_dtor, 4)
5440 void __thiscall basic_ostream_char_vbase_dtor(basic_ostream_char *this)
5442 TRACE("(%p)\n", this);
5443 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(this));
5444 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(this));
5447 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vector_dtor, 8)
5448 basic_ostream_char* __thiscall basic_ostream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
5450 basic_ostream_char *this = basic_ostream_char_from_basic_ios(base);
5452 TRACE("(%p %x)\n", this, flags);
5455 /* we have an array, with the number of elements stored before the first object */
5456 INT_PTR i, *ptr = (INT_PTR *)this-1;
5458 for(i=*ptr-1; i>=0; i--)
5459 basic_ostream_char_vbase_dtor(this+i);
5460 MSVCRT_operator_delete(ptr);
5462 basic_ostream_char_vbase_dtor(this);
5464 MSVCRT_operator_delete(this);
5470 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
5471 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
5472 DEFINE_THISCALL_WRAPPER(basic_ostream_char_flush, 4)
5473 basic_ostream_char* __thiscall basic_ostream_char_flush(basic_ostream_char *this)
5475 /* this function is not matching C++ specification */
5476 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5478 TRACE("(%p)\n", this);
5480 if(basic_ios_char_rdbuf_get(base) && ios_base_good(&base->base)
5481 && basic_streambuf_char_pubsync(basic_ios_char_rdbuf_get(base))==-1)
5482 basic_ios_char_setstate(base, IOSTATE_badbit);
5486 /* ?flush@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
5487 /* ?flush@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
5488 basic_ostream_char* __cdecl flush_ostream_char(basic_ostream_char *ostream)
5490 return basic_ostream_char_flush(ostream);
5493 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5494 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5495 DEFINE_THISCALL_WRAPPER(basic_ostream_char__Osfx, 4)
5496 void __thiscall basic_ostream_char__Osfx(basic_ostream_char *this)
5498 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5500 TRACE("(%p)\n", this);
5502 if(base->base.fmtfl & FMTFLAG_unitbuf)
5503 basic_ostream_char_flush(this);
5506 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5507 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5508 DEFINE_THISCALL_WRAPPER(basic_ostream_char_osfx, 4)
5509 void __thiscall basic_ostream_char_osfx(basic_ostream_char *this)
5511 TRACE("(%p)\n", this);
5512 basic_ostream_char__Osfx(this);
5515 static BOOL basic_ostream_char_sentry_create(basic_ostream_char *ostr)
5517 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5519 if(basic_ios_char_rdbuf_get(base))
5520 basic_streambuf_char__Lock(base->strbuf);
5522 if(ios_base_good(&base->base) && base->stream)
5523 basic_ostream_char_flush(base->stream);
5525 return ios_base_good(&base->base);
5528 static void basic_ostream_char_sentry_destroy(basic_ostream_char *ostr)
5530 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5532 if(ios_base_good(&base->base) && !__uncaught_exception())
5533 basic_ostream_char_osfx(ostr);
5535 if(basic_ios_char_rdbuf_get(base))
5536 basic_streambuf_char__Unlock(base->strbuf);
5539 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE_NXZ */
5540 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA_NXZ */
5541 DEFINE_THISCALL_WRAPPER(basic_ostream_char_opfx, 4)
5542 MSVCP_bool __thiscall basic_ostream_char_opfx(basic_ostream_char *this)
5544 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5546 TRACE("(%p)\n", this);
5548 if(ios_base_good(&base->base) && base->stream)
5549 basic_ostream_char_flush(base->stream);
5550 return ios_base_good(&base->base);
5553 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
5554 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
5555 DEFINE_THISCALL_WRAPPER(basic_ostream_char_put, 8)
5556 basic_ostream_char* __thiscall basic_ostream_char_put(basic_ostream_char *this, char ch)
5558 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5560 TRACE("(%p %c)\n", this, ch);
5562 if(!basic_ostream_char_sentry_create(this)
5563 || basic_streambuf_char_sputc(base->strbuf, ch)==EOF) {
5564 basic_ostream_char_sentry_destroy(this);
5565 basic_ios_char_setstate(base, IOSTATE_badbit);
5569 basic_ostream_char_sentry_destroy(this);
5573 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@JH@Z */
5574 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
5575 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp, 12)
5576 basic_ostream_char* __thiscall basic_ostream_char_seekp(basic_ostream_char *this, streamoff off, int way)
5578 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5580 TRACE("(%p %ld %d)\n", this, off, way);
5582 if(!ios_base_fail(&base->base)) {
5585 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base),
5586 &seek, off, way, OPENMODE_out);
5587 if(seek.off==-1 && seek.pos==0 && seek.state==0)
5588 basic_ios_char_setstate(base, IOSTATE_failbit);
5593 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
5594 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
5595 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp_fpos, 28)
5596 basic_ostream_char* __thiscall basic_ostream_char_seekp_fpos(basic_ostream_char *this, fpos_int pos)
5598 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5600 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
5602 if(!ios_base_fail(&base->base)) {
5605 basic_streambuf_char_pubseekpos(basic_ios_char_rdbuf_get(base),
5606 &seek, pos, OPENMODE_out);
5607 if(seek.off==-1 && seek.pos==0 && seek.state==0)
5608 basic_ios_char_setstate(base, IOSTATE_failbit);
5613 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
5614 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
5615 DEFINE_THISCALL_WRAPPER(basic_ostream_char_tellp, 8)
5616 fpos_int* __thiscall basic_ostream_char_tellp(basic_ostream_char *this, fpos_int *ret)
5618 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5620 TRACE("(%p)\n", this);
5622 if(!ios_base_fail(&base->base)) {
5623 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base),
5624 ret, 0, SEEKDIR_cur, OPENMODE_out);
5633 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@PBDH@Z */
5634 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEBD_J@Z */
5635 DEFINE_THISCALL_WRAPPER(basic_ostream_char_write, 12)
5636 basic_ostream_char* __thiscall basic_ostream_char_write(basic_ostream_char *this, const char *str, streamsize count)
5638 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5640 TRACE("(%p %s %ld)\n", this, debugstr_a(str), count);
5642 if(!basic_ostream_char_sentry_create(this)
5643 || basic_streambuf_char_sputn(base->strbuf, str, count)!=count) {
5644 basic_ostream_char_sentry_destroy(this);
5645 basic_ios_char_setstate(base, IOSTATE_badbit);
5649 basic_ostream_char_sentry_destroy(this);
5653 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@F@Z */
5654 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@F@Z */
5655 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_short, 8)
5656 basic_ostream_char* __thiscall basic_ostream_char_print_short(basic_ostream_char *this, short val)
5658 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5659 int state = IOSTATE_goodbit;
5661 TRACE("(%p %d)\n", this, val);
5663 if(basic_ostream_char_sentry_create(this)) {
5664 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5665 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5666 ostreambuf_iterator_char dest = {0, strbuf};
5668 num_put_char_put_long(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base),
5669 (ios_base_flags_get(&base->base) & FMTFLAG_basefield & (FMTFLAG_oct | FMTFLAG_hex))
5670 ? (LONG)((unsigned short)val) : (LONG)val);
5672 basic_ostream_char_sentry_destroy(this);
5674 basic_ios_char_setstate(base, state);
5678 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@G@Z */
5679 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@G@Z */
5680 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ushort, 8)
5681 basic_ostream_char* __thiscall basic_ostream_char_print_ushort(basic_ostream_char *this, unsigned short val)
5683 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5684 int state = IOSTATE_goodbit;
5686 TRACE("(%p %u)\n", this, val);
5688 if(basic_ostream_char_sentry_create(this)) {
5689 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5690 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5691 ostreambuf_iterator_char dest = {0, strbuf};
5693 num_put_char_put_ulong(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5695 basic_ostream_char_sentry_destroy(this);
5697 basic_ios_char_setstate(base, state);
5701 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z */
5702 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@H@Z */
5703 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z */
5704 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@J@Z */
5705 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int, 8)
5706 basic_ostream_char* __thiscall basic_ostream_char_print_int(basic_ostream_char *this, int val)
5708 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5709 int state = IOSTATE_goodbit;
5711 TRACE("(%p %d)\n", this, val);
5713 if(basic_ostream_char_sentry_create(this)) {
5714 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5715 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5716 ostreambuf_iterator_char dest = {0, strbuf};
5718 num_put_char_put_long(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5720 basic_ostream_char_sentry_destroy(this);
5722 basic_ios_char_setstate(base, state);
5726 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@I@Z */
5727 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@I@Z */
5728 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z */
5729 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@K@Z */
5730 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint, 8)
5731 basic_ostream_char* __thiscall basic_ostream_char_print_uint(basic_ostream_char *this, unsigned int val)
5733 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5734 int state = IOSTATE_goodbit;
5736 TRACE("(%p %u)\n", this, val);
5738 if(basic_ostream_char_sentry_create(this)) {
5739 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5740 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5741 ostreambuf_iterator_char dest = {0, strbuf};
5743 num_put_char_put_ulong(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5745 basic_ostream_char_sentry_destroy(this);
5747 basic_ios_char_setstate(base, state);
5751 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@M@Z */
5752 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@M@Z */
5753 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_float, 8)
5754 basic_ostream_char* __thiscall basic_ostream_char_print_float(basic_ostream_char *this, float val)
5756 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5757 int state = IOSTATE_goodbit;
5759 TRACE("(%p %f)\n", this, val);
5761 if(basic_ostream_char_sentry_create(this)) {
5762 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5763 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5764 ostreambuf_iterator_char dest = {0, strbuf};
5766 num_put_char_put_double(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5768 basic_ostream_char_sentry_destroy(this);
5770 basic_ios_char_setstate(base, state);
5774 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@N@Z */
5775 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@N@Z */
5776 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_double, 12)
5777 basic_ostream_char* __thiscall basic_ostream_char_print_double(basic_ostream_char *this, double val)
5779 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5780 int state = IOSTATE_goodbit;
5782 TRACE("(%p %lf)\n", this, val);
5784 if(basic_ostream_char_sentry_create(this)) {
5785 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5786 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5787 ostreambuf_iterator_char dest = {0, strbuf};
5789 num_put_char_put_double(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5791 basic_ostream_char_sentry_destroy(this);
5793 basic_ios_char_setstate(base, state);
5797 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@O@Z */
5798 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@O@Z */
5799 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ldouble, 12)
5800 basic_ostream_char* __thiscall basic_ostream_char_print_ldouble(basic_ostream_char *this, double val)
5802 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5803 int state = IOSTATE_goodbit;
5805 TRACE("(%p %lf)\n", this, val);
5807 if(basic_ostream_char_sentry_create(this)) {
5808 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5809 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5810 ostreambuf_iterator_char dest = {0, strbuf};
5812 num_put_char_put_ldouble(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5814 basic_ostream_char_sentry_destroy(this);
5816 basic_ios_char_setstate(base, state);
5820 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
5821 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
5822 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_streambuf, 8)
5823 basic_ostream_char* __thiscall basic_ostream_char_print_streambuf(basic_ostream_char *this, basic_streambuf_char *val)
5825 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5826 IOSB_iostate state = IOSTATE_badbit;
5829 TRACE("(%p %p)\n", this, val);
5831 if(basic_ostream_char_sentry_create(this)) {
5832 for(c = basic_streambuf_char_sgetc(val); c!=EOF;
5833 c = basic_streambuf_char_snextc(val)) {
5834 state = IOSTATE_goodbit;
5836 if(basic_streambuf_char_sputc(base->strbuf, c) == EOF) {
5837 state = IOSTATE_badbit;
5842 state = IOSTATE_badbit;
5844 basic_ostream_char_sentry_destroy(this);
5846 ios_base_width_set(&base->base, 0);
5847 basic_ios_char_setstate(base, state);
5851 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PBX@Z */
5852 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEBX@Z */
5853 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ptr, 8)
5854 basic_ostream_char* __thiscall basic_ostream_char_print_ptr(basic_ostream_char *this, const void *val)
5856 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5857 int state = IOSTATE_goodbit;
5859 TRACE("(%p %p)\n", this, val);
5861 if(basic_ostream_char_sentry_create(this)) {
5862 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5863 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5864 ostreambuf_iterator_char dest = {0, strbuf};
5866 num_put_char_put_ptr(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5868 basic_ostream_char_sentry_destroy(this);
5870 basic_ios_char_setstate(base, state);
5874 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_J@Z */
5875 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_J@Z */
5876 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int64, 12)
5877 basic_ostream_char* __thiscall basic_ostream_char_print_int64(basic_ostream_char *this, __int64 val)
5879 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5880 int state = IOSTATE_goodbit;
5882 TRACE("(%p)\n", this);
5884 if(basic_ostream_char_sentry_create(this)) {
5885 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5886 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5887 ostreambuf_iterator_char dest = {0, strbuf};
5889 num_put_char_put_int64(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5891 basic_ostream_char_sentry_destroy(this);
5893 basic_ios_char_setstate(base, state);
5897 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_K@Z */
5898 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_K@Z */
5899 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint64, 12)
5900 basic_ostream_char* __thiscall basic_ostream_char_print_uint64(basic_ostream_char *this, unsigned __int64 val)
5902 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5903 int state = IOSTATE_goodbit;
5905 TRACE("(%p)\n", this);
5907 if(basic_ostream_char_sentry_create(this)) {
5908 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5909 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5910 ostreambuf_iterator_char dest = {0, strbuf};
5912 num_put_char_put_uint64(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5914 basic_ostream_char_sentry_destroy(this);
5916 basic_ios_char_setstate(base, state);
5920 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_N@Z */
5921 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_N@Z */
5922 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_bool, 8)
5923 basic_ostream_char* __thiscall basic_ostream_char_print_bool(basic_ostream_char *this, MSVCP_bool val)
5925 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5926 int state = IOSTATE_goodbit;
5928 TRACE("(%p %x)\n", this, val);
5930 if(basic_ostream_char_sentry_create(this)) {
5931 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5932 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5933 ostreambuf_iterator_char dest = {0, strbuf};
5935 num_put_char_put_bool(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5937 basic_ostream_char_sentry_destroy(this);
5939 basic_ios_char_setstate(base, state);
5943 /* ?ends@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
5944 /* ?ends@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
5945 basic_ostream_char* __cdecl basic_ostream_char_ends(basic_ostream_char *ostr)
5947 TRACE("(%p)\n", ostr);
5949 basic_ostream_char_put(ostr, 0);
5953 /* ?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
5954 /* ?endl@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
5955 basic_ostream_char* __cdecl basic_ostream_char_endl(basic_ostream_char *ostr)
5957 TRACE("(%p)\n", ostr);
5959 basic_ostream_char_put(ostr, '\n');
5960 basic_ostream_char_flush(ostr);
5964 /* $?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 */
5965 /* ??$?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 */
5966 basic_ostream_char* __cdecl basic_ostream_char_print_bstr(basic_ostream_char *ostr, const basic_string_char *str)
5968 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5969 IOSB_iostate state = IOSTATE_goodbit;
5971 TRACE("(%p %p)\n", ostr, str);
5973 if(basic_ostream_char_sentry_create(ostr)) {
5974 MSVCP_size_t len = MSVCP_basic_string_char_length(str);
5975 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
5977 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
5978 for(; pad!=0; pad--) {
5979 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5980 state = IOSTATE_badbit;
5986 if(state == IOSTATE_goodbit) {
5987 if(basic_streambuf_char_sputn(base->strbuf, MSVCP_basic_string_char_c_str(str), len) != len)
5988 state = IOSTATE_badbit;
5991 if(state == IOSTATE_goodbit) {
5992 for(; pad!=0; pad--) {
5993 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5994 state = IOSTATE_badbit;
6000 base->base.wide = 0;
6002 state = IOSTATE_badbit;
6004 basic_ostream_char_sentry_destroy(ostr);
6006 basic_ios_char_setstate(base, state);
6010 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@C@Z */
6011 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@C@Z */
6012 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@D@Z */
6013 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@D@Z */
6014 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@E@Z */
6015 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@E@Z */
6016 basic_ostream_char* __cdecl basic_ostream_char_print_ch(basic_ostream_char *ostr, char ch)
6018 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
6019 IOSB_iostate state = IOSTATE_goodbit;
6021 TRACE("(%p %d)\n", ostr, ch);
6023 if(basic_ostream_char_sentry_create(ostr)) {
6024 streamsize pad = (base->base.wide>1 ? base->base.wide-1 : 0);
6026 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
6027 for(; pad!=0; pad--) {
6028 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
6029 state = IOSTATE_badbit;
6035 if(state == IOSTATE_goodbit) {
6036 if(basic_streambuf_char_sputc(base->strbuf, ch) == EOF)
6037 state = IOSTATE_badbit;
6040 if(state == IOSTATE_goodbit) {
6041 for(; pad!=0; pad--) {
6042 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
6043 state = IOSTATE_badbit;
6049 base->base.wide = 0;
6051 state = IOSTATE_badbit;
6053 basic_ostream_char_sentry_destroy(ostr);
6055 basic_ios_char_setstate(base, state);
6059 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBC@Z */
6060 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBC@Z */
6061 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z */
6062 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBD@Z */
6063 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBE@Z */
6064 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBE@Z */
6065 basic_ostream_char* __cdecl basic_ostream_char_print_str(basic_ostream_char *ostr, const char *str)
6067 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
6068 IOSB_iostate state = IOSTATE_goodbit;
6070 TRACE("(%p %s)\n", ostr, str);
6072 if(basic_ostream_char_sentry_create(ostr)) {
6073 MSVCP_size_t len = strlen(str);
6074 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
6076 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
6077 for(; pad!=0; pad--) {
6078 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
6079 state = IOSTATE_badbit;
6085 if(state == IOSTATE_goodbit) {
6086 if(basic_streambuf_char_sputn(base->strbuf, str, len) != len)
6087 state = IOSTATE_badbit;
6090 if(state == IOSTATE_goodbit) {
6091 for(; pad!=0; pad--) {
6092 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
6093 state = IOSTATE_badbit;
6099 base->base.wide = 0;
6101 state = IOSTATE_badbit;
6103 basic_ostream_char_sentry_destroy(ostr);
6105 basic_ios_char_setstate(base, state);
6109 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
6110 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
6111 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func, 8)
6112 basic_ostream_char* __thiscall basic_ostream_char_print_func(basic_ostream_char *this,
6113 basic_ostream_char* (__cdecl *pfunc)(basic_ostream_char*))
6115 TRACE("(%p %p)\n", this, pfunc);
6120 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
6121 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
6122 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_basic_ios, 8)
6123 basic_ostream_char* __thiscall basic_ostream_char_print_func_basic_ios(basic_ostream_char *this,
6124 basic_ios_char* (__cdecl *pfunc)(basic_ios_char*))
6126 TRACE("(%p %p)\n", this, pfunc);
6127 pfunc(basic_ostream_char_get_basic_ios(this));
6131 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
6132 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
6133 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_ios_base, 8)
6134 basic_ostream_char* __thiscall basic_ostream_char_print_func_ios_base(
6135 basic_ostream_char *this, ios_base* (__cdecl *pfunc)(ios_base*))
6137 TRACE("(%p %p)\n", this, pfunc);
6138 pfunc(&basic_ostream_char_get_basic_ios(this)->base);
6142 /* Caution: basic_ostream uses virtual inheritance. */
6143 static inline basic_ios_wchar* basic_ostream_wchar_get_basic_ios(basic_ostream_wchar *this)
6145 return (basic_ios_wchar*)((char*)this+this->vbtable[1]);
6148 static inline basic_ios_wchar* basic_ostream_wchar_to_basic_ios(basic_ostream_wchar *ptr)
6150 return (basic_ios_wchar*)((char*)ptr+basic_ostream_wchar_vbtable[1]);
6153 static inline basic_ostream_wchar* basic_ostream_wchar_from_basic_ios(basic_ios_wchar *ptr)
6155 return (basic_ostream_wchar*)((char*)ptr-basic_ostream_wchar_vbtable[1]);
6158 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
6159 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
6160 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_ctor, 16)
6161 basic_ostream_wchar* __thiscall basic_ostream_wchar_ctor(basic_ostream_wchar *this,
6162 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
6164 basic_ios_wchar *base;
6166 TRACE("(%p %p %d %d)\n", this, strbuf, isstd, virt_init);
6169 this->vbtable = basic_ostream_wchar_vbtable;
6170 base = basic_ostream_wchar_get_basic_ios(this);
6171 basic_ios_wchar_ctor(base);
6173 base = basic_ostream_wchar_get_basic_ios(this);
6176 base->base.vtable = &MSVCP_basic_ostream_wchar_vtable;
6177 basic_ios_wchar_init(base, strbuf, isstd);
6181 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
6182 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
6183 DEFINE_THISCALL_WRAPPER(basic_ostream_short_ctor, 16)
6184 basic_ostream_wchar* __thiscall basic_ostream_short_ctor(basic_ostream_wchar *this,
6185 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
6187 basic_ostream_wchar_ctor(this, strbuf, isstd, virt_init);
6188 basic_ostream_wchar_get_basic_ios(this)->base.vtable = &MSVCP_basic_ostream_short_vtable;
6192 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */
6193 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */
6194 static basic_ostream_wchar* basic_ostream_wchar_ctor_uninitialized(basic_ostream_wchar *this,
6195 int uninitialized, MSVCP_bool addstd, MSVCP_bool virt_init)
6197 basic_ios_wchar *base;
6199 TRACE("(%p %d %x)\n", this, uninitialized, addstd);
6202 this->vbtable = basic_ostream_wchar_vbtable;
6203 base = basic_ostream_wchar_get_basic_ios(this);
6204 basic_ios_wchar_ctor(base);
6206 base = basic_ostream_wchar_get_basic_ios(this);
6209 base->base.vtable = &MSVCP_basic_ostream_wchar_vtable;
6211 ios_base_Addstd(&base->base);
6215 /* ??1?$basic_ostream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
6216 /* ??1?$basic_ostream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
6217 /* ??1?$basic_ostream@GU?$char_traits@G@std@@@std@@UAE@XZ */
6218 /* ??1?$basic_ostream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
6219 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_dtor, 4)
6220 void __thiscall basic_ostream_wchar_dtor(basic_ios_wchar *base)
6222 basic_ostream_wchar *this = basic_ostream_wchar_from_basic_ios(base);
6224 /* don't destroy virtual base here */
6225 TRACE("(%p)\n", this);
6228 /* ??_D?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
6229 /* ??_D?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
6230 /* ??_D?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
6231 /* ??_D?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
6232 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_vbase_dtor, 4)
6233 void __thiscall basic_ostream_wchar_vbase_dtor(basic_ostream_wchar *this)
6235 TRACE("(%p)\n", this);
6236 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(this));
6237 basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(this));
6240 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_vector_dtor, 8)
6241 basic_ostream_wchar* __thiscall basic_ostream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
6243 basic_ostream_wchar *this = basic_ostream_wchar_from_basic_ios(base);
6245 TRACE("(%p %x)\n", this, flags);
6248 /* we have an array, with the number of elements stored before the first object */
6249 INT_PTR i, *ptr = (INT_PTR *)this-1;
6251 for(i=*ptr-1; i>=0; i--)
6252 basic_ostream_wchar_vbase_dtor(this+i);
6253 MSVCRT_operator_delete(ptr);
6255 basic_ostream_wchar_vbase_dtor(this);
6257 MSVCRT_operator_delete(this);
6263 /* ?flush@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@XZ */
6264 /* ?flush@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@XZ */
6265 /* ?flush@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@XZ */
6266 /* ?flush@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@XZ */
6267 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_flush, 4)
6268 basic_ostream_wchar* __thiscall basic_ostream_wchar_flush(basic_ostream_wchar *this)
6270 /* this function is not matching C++ specification */
6271 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6273 TRACE("(%p)\n", this);
6275 if(basic_ios_wchar_rdbuf_get(base) && ios_base_good(&base->base)
6276 && basic_streambuf_wchar_pubsync(basic_ios_wchar_rdbuf_get(base))==-1)
6277 basic_ios_wchar_setstate(base, IOSTATE_badbit);
6281 /* ?flush@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
6282 /* ?flush@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
6283 /* ?flush@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
6284 /* ?flush@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
6285 basic_ostream_wchar* __cdecl flush_ostream_wchar(basic_ostream_wchar *ostream)
6287 return basic_ostream_wchar_flush(ostream);
6290 /* ?_Osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
6291 /* ?_Osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
6292 /* ?_Osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
6293 /* ?_Osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
6294 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar__Osfx, 4)
6295 void __thiscall basic_ostream_wchar__Osfx(basic_ostream_wchar *this)
6297 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6299 TRACE("(%p)\n", this);
6301 if(base->base.fmtfl & FMTFLAG_unitbuf)
6302 basic_ostream_wchar_flush(this);
6305 /* ?osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
6306 /* ?osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
6307 /* ?osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
6308 /* ?osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
6309 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_osfx, 4)
6310 void __thiscall basic_ostream_wchar_osfx(basic_ostream_wchar *this)
6312 TRACE("(%p)\n", this);
6313 basic_ostream_wchar__Osfx(this);
6316 static BOOL basic_ostream_wchar_sentry_create(basic_ostream_wchar *ostr)
6318 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6320 if(basic_ios_wchar_rdbuf_get(base))
6321 basic_streambuf_wchar__Lock(base->strbuf);
6323 if(ios_base_good(&base->base) && base->stream)
6324 basic_ostream_wchar_flush(base->stream);
6326 return ios_base_good(&base->base);
6329 static void basic_ostream_wchar_sentry_destroy(basic_ostream_wchar *ostr)
6331 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6333 if(ios_base_good(&base->base) && !__uncaught_exception())
6334 basic_ostream_wchar_osfx(ostr);
6336 if(basic_ios_wchar_rdbuf_get(base))
6337 basic_streambuf_wchar__Unlock(base->strbuf);
6340 /* ?opfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE_NXZ */
6341 /* ?opfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA_NXZ */
6342 /* ?opfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE_NXZ */
6343 /* ?opfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA_NXZ */
6344 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_opfx, 4)
6345 MSVCP_bool __thiscall basic_ostream_wchar_opfx(basic_ostream_wchar *this)
6347 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6349 TRACE("(%p)\n", this);
6351 if(ios_base_good(&base->base) && base->stream)
6352 basic_ostream_wchar_flush(base->stream);
6353 return ios_base_good(&base->base);
6356 /* ?put@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@_W@Z */
6357 /* ?put@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_W@Z */
6358 /* ?put@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@G@Z */
6359 /* ?put@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@G@Z */
6360 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_put, 8)
6361 basic_ostream_wchar* __thiscall basic_ostream_wchar_put(basic_ostream_wchar *this, wchar_t ch)
6363 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6365 TRACE("(%p %c)\n", this, ch);
6367 if(!basic_ostream_wchar_sentry_create(this)
6368 || basic_streambuf_wchar_sputc(base->strbuf, ch)==WEOF) {
6369 basic_ostream_wchar_sentry_destroy(this);
6370 basic_ios_wchar_setstate(base, IOSTATE_badbit);
6374 basic_ostream_wchar_sentry_destroy(this);
6378 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@JH@Z */
6379 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_JH@Z */
6380 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@JH@Z */
6381 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JH@Z */
6382 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_seekp, 12)
6383 basic_ostream_wchar* __thiscall basic_ostream_wchar_seekp(basic_ostream_wchar *this, streamoff off, int way)
6385 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6387 TRACE("(%p %ld %d)\n", this, off, way);
6389 if(!ios_base_fail(&base->base)) {
6392 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base),
6393 &seek, off, way, OPENMODE_out);
6394 if(seek.off==-1 && seek.pos==0 && seek.state==0)
6395 basic_ios_wchar_setstate(base, IOSTATE_failbit);
6400 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
6401 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
6402 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
6403 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
6404 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_seekp_fpos, 28)
6405 basic_ostream_wchar* __thiscall basic_ostream_wchar_seekp_fpos(basic_ostream_wchar *this, fpos_int pos)
6407 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6409 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
6411 if(!ios_base_fail(&base->base)) {
6414 basic_streambuf_wchar_pubseekpos(basic_ios_wchar_rdbuf_get(base),
6415 &seek, pos, OPENMODE_out);
6416 if(seek.off==-1 && seek.pos==0 && seek.state==0)
6417 basic_ios_wchar_setstate(base, IOSTATE_failbit);
6422 /* ?tellp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@XZ */
6423 /* ?tellp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
6424 /* ?tellp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@XZ */
6425 /* ?tellp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
6426 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_tellp, 8)
6427 fpos_int* __thiscall basic_ostream_wchar_tellp(basic_ostream_wchar *this, fpos_int *ret)
6429 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6431 TRACE("(%p)\n", this);
6433 if(!ios_base_fail(&base->base)) {
6434 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base),
6435 ret, 0, SEEKDIR_cur, OPENMODE_out);
6444 /* ?write@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PB_WH@Z */
6445 /* ?write@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEB_W_J@Z */
6446 /* ?write@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@PBGH@Z */
6447 /* ?write@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEBG_J@Z */
6448 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_write, 12)
6449 basic_ostream_wchar* __thiscall basic_ostream_wchar_write(basic_ostream_wchar *this, const wchar_t *str, streamsize count)
6451 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6453 TRACE("(%p %s %ld)\n", this, debugstr_w(str), count);
6455 if(!basic_ostream_wchar_sentry_create(this)
6456 || basic_streambuf_wchar_sputn(base->strbuf, str, count)!=count) {
6457 basic_ostream_wchar_sentry_destroy(this);
6458 basic_ios_wchar_setstate(base, IOSTATE_badbit);
6462 basic_ostream_wchar_sentry_destroy(this);
6466 static basic_ostream_wchar* basic_ostream_print_short(basic_ostream_wchar *this, short val, const num_put *numput)
6468 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6469 int state = IOSTATE_goodbit;
6471 TRACE("(%p %d)\n", this, val);
6473 if(basic_ostream_wchar_sentry_create(this)) {
6474 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6475 ostreambuf_iterator_wchar dest = {0, strbuf};
6477 num_put_wchar_put_long(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base),
6478 (ios_base_flags_get(&base->base) & FMTFLAG_basefield & (FMTFLAG_oct | FMTFLAG_hex))
6479 ? (LONG)((unsigned short)val) : (LONG)val);
6481 basic_ostream_wchar_sentry_destroy(this);
6483 basic_ios_wchar_setstate(base, state);
6487 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@F@Z */
6488 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@F@Z */
6489 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_short, 8)
6490 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_short(basic_ostream_wchar *this, short val)
6492 return basic_ostream_print_short(this, val, num_put_wchar_use_facet(
6493 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6496 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@F@Z */
6497 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@F@Z */
6498 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_short, 8)
6499 basic_ostream_wchar* __thiscall basic_ostream_short_print_short(basic_ostream_wchar *this, short val)
6501 return basic_ostream_print_short(this, val, num_put_short_use_facet(
6502 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6505 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@G@Z */
6506 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@G@Z */
6507 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ushort, 8)
6508 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_ushort(basic_ostream_wchar *this, unsigned short val)
6510 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6511 int state = IOSTATE_goodbit;
6513 TRACE("(%p %u)\n", this, val);
6515 if(basic_ostream_wchar_sentry_create(this)) {
6516 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6517 const num_put *numput = num_put_wchar_use_facet(strbuf->loc);
6518 ostreambuf_iterator_wchar dest = {0, strbuf};
6520 num_put_wchar_put_ulong(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6522 basic_ostream_wchar_sentry_destroy(this);
6524 basic_ios_wchar_setstate(base, state);
6528 static basic_ostream_wchar* basic_ostream_print_int(basic_ostream_wchar *this, int val, const num_put *numput)
6530 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6531 int state = IOSTATE_goodbit;
6533 TRACE("(%p %d)\n", this, val);
6535 if(basic_ostream_wchar_sentry_create(this)) {
6536 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6537 ostreambuf_iterator_wchar dest = {0, strbuf};
6539 num_put_wchar_put_long(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6541 basic_ostream_wchar_sentry_destroy(this);
6543 basic_ios_wchar_setstate(base, state);
6547 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@H@Z */
6548 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@H@Z */
6549 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@J@Z */
6550 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@J@Z */
6551 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_int, 8)
6552 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_int(basic_ostream_wchar *this, int val)
6554 return basic_ostream_print_int(this, val, num_put_wchar_use_facet(
6555 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6558 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@H@Z */
6559 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@H@Z */
6560 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@J@Z */
6561 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@J@Z */
6562 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int, 8)
6563 basic_ostream_wchar* __thiscall basic_ostream_short_print_int(basic_ostream_wchar *this, int val)
6565 return basic_ostream_print_int(this, val, num_put_short_use_facet(
6566 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6569 static basic_ostream_wchar* basic_ostream_print_uint(basic_ostream_wchar *this, unsigned int val, const num_put *numput)
6571 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6572 int state = IOSTATE_goodbit;
6574 TRACE("(%p %u)\n", this, val);
6576 if(basic_ostream_wchar_sentry_create(this)) {
6577 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6578 ostreambuf_iterator_wchar dest = {0, strbuf};
6580 num_put_wchar_put_ulong(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6582 basic_ostream_wchar_sentry_destroy(this);
6584 basic_ios_wchar_setstate(base, state);
6588 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@I@Z */
6589 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@I@Z */
6590 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@K@Z */
6591 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@K@Z */
6592 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_uint, 8)
6593 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_uint(basic_ostream_wchar *this, unsigned int val)
6595 return basic_ostream_print_uint(this, val, num_put_wchar_use_facet(
6596 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6599 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@I@Z */
6600 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@I@Z */
6601 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@K@Z */
6602 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@K@Z */
6603 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint, 8)
6604 basic_ostream_wchar* __thiscall basic_ostream_short_print_uint(basic_ostream_wchar *this, unsigned int val)
6606 return basic_ostream_print_uint(this, val, num_put_short_use_facet(
6607 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6610 static basic_ostream_wchar* basic_ostream_print_float(basic_ostream_wchar *this, float val, const num_put *numput)
6612 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6613 int state = IOSTATE_goodbit;
6615 TRACE("(%p %f)\n", this, val);
6617 if(basic_ostream_wchar_sentry_create(this)) {
6618 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6619 ostreambuf_iterator_wchar dest = {0, strbuf};
6621 num_put_wchar_put_double(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6623 basic_ostream_wchar_sentry_destroy(this);
6625 basic_ios_wchar_setstate(base, state);
6629 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@M@Z */
6630 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@M@Z */
6631 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_float, 8)
6632 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_float(basic_ostream_wchar *this, float val)
6634 return basic_ostream_print_float(this, val, num_put_wchar_use_facet(
6635 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6638 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@M@Z */
6639 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@M@Z */
6640 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_float, 8)
6641 basic_ostream_wchar* __thiscall basic_ostream_short_print_float(basic_ostream_wchar *this, float val)
6643 return basic_ostream_print_float(this, val, num_put_short_use_facet(
6644 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6647 static basic_ostream_wchar* basic_ostream_print_double(basic_ostream_wchar *this, double val, const num_put *numput)
6649 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6650 int state = IOSTATE_goodbit;
6652 TRACE("(%p %lf)\n", this, val);
6654 if(basic_ostream_wchar_sentry_create(this)) {
6655 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6656 ostreambuf_iterator_wchar dest = {0, strbuf};
6658 num_put_wchar_put_double(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6660 basic_ostream_wchar_sentry_destroy(this);
6662 basic_ios_wchar_setstate(base, state);
6666 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@N@Z */
6667 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@N@Z */
6668 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_double, 12)
6669 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_double(basic_ostream_wchar *this, double val)
6671 return basic_ostream_print_double(this, val, num_put_wchar_use_facet(
6672 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6675 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@N@Z */
6676 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@N@Z */
6677 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_double, 12)
6678 basic_ostream_wchar* __thiscall basic_ostream_short_print_double(basic_ostream_wchar *this, double val)
6680 return basic_ostream_print_double(this, val, num_put_short_use_facet(
6681 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6684 static basic_ostream_wchar* basic_ostream_print_ldouble(basic_ostream_wchar *this, double val, const num_put *numput)
6686 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6687 int state = IOSTATE_goodbit;
6689 TRACE("(%p %lf)\n", this, val);
6691 if(basic_ostream_wchar_sentry_create(this)) {
6692 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6693 ostreambuf_iterator_wchar dest = {0, strbuf};
6695 num_put_wchar_put_ldouble(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6697 basic_ostream_wchar_sentry_destroy(this);
6699 basic_ios_wchar_setstate(base, state);
6703 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@O@Z */
6704 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@O@Z */
6705 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ldouble, 12)
6706 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_ldouble(basic_ostream_wchar *this, double val)
6708 return basic_ostream_print_ldouble(this, val, num_put_wchar_use_facet(
6709 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6712 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@O@Z */
6713 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@O@Z */
6714 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ldouble, 12)
6715 basic_ostream_wchar* __thiscall basic_ostream_short_print_ldouble(basic_ostream_wchar *this, double val)
6717 return basic_ostream_print_ldouble(this, val, num_put_short_use_facet(
6718 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6721 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
6722 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
6723 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
6724 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
6725 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_streambuf, 8)
6726 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_streambuf(basic_ostream_wchar *this, basic_streambuf_wchar *val)
6728 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6729 IOSB_iostate state = IOSTATE_badbit;
6730 unsigned short c = '\n';
6732 TRACE("(%p %p)\n", this, val);
6734 if(basic_ostream_wchar_sentry_create(this)) {
6735 for(c = basic_streambuf_wchar_sgetc(val); c!=WEOF;
6736 c = basic_streambuf_wchar_snextc(val)) {
6737 state = IOSTATE_goodbit;
6739 if(basic_streambuf_wchar_sputc(base->strbuf, c) == WEOF) {
6740 state = IOSTATE_badbit;
6745 state = IOSTATE_badbit;
6747 basic_ostream_wchar_sentry_destroy(this);
6749 ios_base_width_set(&base->base, 0);
6750 basic_ios_wchar_setstate(base, state);
6754 static basic_ostream_wchar* basic_ostream_print_ptr(basic_ostream_wchar *this, const void *val, const num_put *numput)
6756 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6757 int state = IOSTATE_goodbit;
6759 TRACE("(%p %p)\n", this, val);
6761 if(basic_ostream_wchar_sentry_create(this)) {
6762 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6763 ostreambuf_iterator_wchar dest = {0, strbuf};
6765 num_put_wchar_put_ptr(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6767 basic_ostream_wchar_sentry_destroy(this);
6769 basic_ios_wchar_setstate(base, state);
6773 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PBX@Z */
6774 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEBX@Z */
6775 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ptr, 8)
6776 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_ptr(basic_ostream_wchar *this, const void *val)
6778 return basic_ostream_print_ptr(this, val, num_put_wchar_use_facet(
6779 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6782 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PBX@Z */
6783 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEBX@Z */
6784 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ptr, 8)
6785 basic_ostream_wchar* __thiscall basic_ostream_short_print_ptr(basic_ostream_wchar *this, const void *val)
6787 return basic_ostream_print_ptr(this, val, num_put_short_use_facet(
6788 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6791 static basic_ostream_wchar* basic_ostream_print_int64(basic_ostream_wchar *this, __int64 val, const num_put *numput)
6793 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6794 int state = IOSTATE_goodbit;
6796 TRACE("(%p)\n", this);
6798 if(basic_ostream_wchar_sentry_create(this)) {
6799 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6800 ostreambuf_iterator_wchar dest = {0, strbuf};
6802 num_put_wchar_put_int64(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6804 basic_ostream_wchar_sentry_destroy(this);
6806 basic_ios_wchar_setstate(base, state);
6810 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@_J@Z */
6811 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@_J@Z */
6812 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_int64, 12)
6813 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_int64(basic_ostream_wchar *this, __int64 val)
6815 return basic_ostream_print_int64(this, val, num_put_wchar_use_facet(
6816 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6819 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_J@Z */
6820 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_J@Z */
6821 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int64, 12)
6822 basic_ostream_wchar* __thiscall basic_ostream_short_print_int64(basic_ostream_wchar *this, __int64 val)
6824 return basic_ostream_print_int64(this, val, num_put_short_use_facet(
6825 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6828 static basic_ostream_wchar* basic_ostream_print_uint64(basic_ostream_wchar *this, unsigned __int64 val, const num_put *numput)
6830 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6831 int state = IOSTATE_goodbit;
6833 TRACE("(%p)\n", this);
6835 if(basic_ostream_wchar_sentry_create(this)) {
6836 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6837 ostreambuf_iterator_wchar dest = {0, strbuf};
6839 num_put_wchar_put_uint64(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6841 basic_ostream_wchar_sentry_destroy(this);
6843 basic_ios_wchar_setstate(base, state);
6847 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@_K@Z */
6848 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@_K@Z */
6849 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_uint64, 12)
6850 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_uint64(basic_ostream_wchar *this, unsigned __int64 val)
6852 return basic_ostream_print_uint64(this, val, num_put_wchar_use_facet(
6853 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6856 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_K@Z */
6857 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_K@Z */
6858 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint64, 12)
6859 basic_ostream_wchar* __thiscall basic_ostream_short_print_uint64(basic_ostream_wchar *this, unsigned __int64 val)
6861 return basic_ostream_print_uint64(this, val, num_put_short_use_facet(
6862 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6865 static basic_ostream_wchar* basic_ostream_print_bool(basic_ostream_wchar *this, MSVCP_bool val, const num_put *numput)
6867 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6868 int state = IOSTATE_goodbit;
6870 TRACE("(%p %x)\n", this, val);
6872 if(basic_ostream_wchar_sentry_create(this)) {
6873 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6874 ostreambuf_iterator_wchar dest = {0, strbuf};
6876 num_put_wchar_put_bool(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6878 basic_ostream_wchar_sentry_destroy(this);
6880 basic_ios_wchar_setstate(base, state);
6884 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@_N@Z */
6885 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@_N@Z */
6886 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_bool, 8)
6887 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_bool(basic_ostream_wchar *this, MSVCP_bool val)
6889 return basic_ostream_print_bool(this, val, num_put_wchar_use_facet(
6890 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6893 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_N@Z */
6894 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_N@Z */
6895 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_bool, 8)
6896 basic_ostream_wchar* __thiscall basic_ostream_short_print_bool(basic_ostream_wchar *this, MSVCP_bool val)
6898 return basic_ostream_print_bool(this, val, num_put_short_use_facet(
6899 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6902 /* ?ends@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
6903 /* ?ends@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
6904 /* ?ends@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
6905 /* ?ends@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
6906 basic_ostream_wchar* __cdecl basic_ostream_wchar_ends(basic_ostream_wchar *ostr)
6908 TRACE("(%p)\n", ostr);
6910 basic_ostream_wchar_put(ostr, 0);
6914 /* ?endl@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
6915 /* ?endl@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
6916 /* ?endl@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
6917 /* ?endl@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
6918 basic_ostream_wchar* __cdecl basic_ostream_wchar_endl(basic_ostream_wchar *ostr)
6920 TRACE("(%p)\n", ostr);
6922 basic_ostream_wchar_put(ostr, '\n');
6923 basic_ostream_wchar_flush(ostr);
6927 /* ??$?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 */
6928 /* ??$?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 */
6929 /* ??$?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 */
6930 /* ??$?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 */
6931 basic_ostream_wchar* __cdecl basic_ostream_wchar_print_bstr(basic_ostream_wchar *ostr, const basic_string_wchar *str)
6933 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6934 IOSB_iostate state = IOSTATE_goodbit;
6936 TRACE("(%p %p)\n", ostr, str);
6938 if(basic_ostream_wchar_sentry_create(ostr)) {
6939 MSVCP_size_t len = MSVCP_basic_string_wchar_length(str);
6940 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
6942 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
6943 for(; pad!=0; pad--) {
6944 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6945 state = IOSTATE_badbit;
6951 if(state == IOSTATE_goodbit) {
6952 if(basic_streambuf_wchar_sputn(base->strbuf, MSVCP_basic_string_wchar_c_str(str), len) != len)
6953 state = IOSTATE_badbit;
6956 if(state == IOSTATE_goodbit) {
6957 for(; pad!=0; pad--) {
6958 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6959 state = IOSTATE_badbit;
6965 base->base.wide = 0;
6967 state = IOSTATE_badbit;
6969 basic_ostream_wchar_sentry_destroy(ostr);
6971 basic_ios_wchar_setstate(base, state);
6975 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AAV10@_W@Z */
6976 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AEAV10@_W@Z */
6977 /* ??$?6GU?$char_traits@G@std@@@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@0@AAV10@G@Z */
6978 /* ??$?6GU?$char_traits@G@std@@@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@0@AEAV10@G@Z */
6979 basic_ostream_wchar* __cdecl basic_ostream_wchar_print_ch(basic_ostream_wchar *ostr, wchar_t ch)
6981 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6982 IOSB_iostate state = IOSTATE_goodbit;
6984 TRACE("(%p %d)\n", ostr, ch);
6986 if(basic_ostream_wchar_sentry_create(ostr)) {
6987 streamsize pad = (base->base.wide>1 ? base->base.wide-1 : 0);
6989 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
6990 for(; pad!=0; pad--) {
6991 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6992 state = IOSTATE_badbit;
6998 if(state == IOSTATE_goodbit) {
6999 if(basic_streambuf_wchar_sputc(base->strbuf, ch) == WEOF)
7000 state = IOSTATE_badbit;
7003 if(state == IOSTATE_goodbit) {
7004 for(; pad!=0; pad--) {
7005 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
7006 state = IOSTATE_badbit;
7012 base->base.wide = 0;
7014 state = IOSTATE_badbit;
7016 basic_ostream_wchar_sentry_destroy(ostr);
7018 basic_ios_wchar_setstate(base, state);
7022 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AAV10@PB_W@Z */
7023 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AEAV10@PEB_W@Z */
7024 /* ??$?6GU?$char_traits@G@std@@@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@0@AAV10@PBG@Z */
7025 /* ??$?6GU?$char_traits@G@std@@@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@0@AEAV10@PEBG@Z */
7026 basic_ostream_wchar* __cdecl basic_ostream_wchar_print_str(basic_ostream_wchar *ostr, const wchar_t *str)
7028 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
7029 IOSB_iostate state = IOSTATE_goodbit;
7031 TRACE("(%p %s)\n", ostr, debugstr_w(str));
7033 if(basic_ostream_wchar_sentry_create(ostr)) {
7034 MSVCP_size_t len = wcslen(str);
7035 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
7037 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
7038 for(; pad!=0; pad--) {
7039 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
7040 state = IOSTATE_badbit;
7046 if(state == IOSTATE_goodbit) {
7047 if(basic_streambuf_wchar_sputn(base->strbuf, str, len) != len)
7048 state = IOSTATE_badbit;
7051 if(state == IOSTATE_goodbit) {
7052 for(; pad!=0; pad--) {
7053 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
7054 state = IOSTATE_badbit;
7060 base->base.wide = 0;
7062 state = IOSTATE_badbit;
7064 basic_ostream_wchar_sentry_destroy(ostr);
7066 basic_ios_wchar_setstate(base, state);
7070 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
7071 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
7072 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
7073 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
7074 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func, 8)
7075 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_func(basic_ostream_wchar *this,
7076 basic_ostream_wchar* (__cdecl *pfunc)(basic_ostream_wchar*))
7078 TRACE("(%p %p)\n", this, pfunc);
7083 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AAV21@@Z@Z */
7084 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AEAV21@@Z@Z */
7085 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@GU?$char_traits@G@std@@@1@AAV21@@Z@Z */
7086 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@GU?$char_traits@G@std@@@1@AEAV21@@Z@Z */
7087 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func_basic_ios, 8)
7088 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_func_basic_ios(basic_ostream_wchar *this,
7089 basic_ios_wchar* (__cdecl *pfunc)(basic_ios_wchar*))
7091 TRACE("(%p %p)\n", this, pfunc);
7092 pfunc(basic_ostream_wchar_get_basic_ios(this));
7096 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
7097 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
7098 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
7099 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
7100 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func_ios_base, 8)
7101 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_func_ios_base(
7102 basic_ostream_wchar *this, ios_base* (__cdecl *pfunc)(ios_base*))
7104 TRACE("(%p %p)\n", this, pfunc);
7105 pfunc(&basic_ostream_wchar_get_basic_ios(this)->base);
7109 /* Caution: basic_istream uses virtual inheritance. */
7110 static inline basic_ios_char* basic_istream_char_get_basic_ios(basic_istream_char *this)
7112 return (basic_ios_char*)((char*)this+this->vbtable[1]);
7115 static inline basic_ios_char* basic_istream_char_to_basic_ios(basic_istream_char *ptr)
7117 return (basic_ios_char*)((char*)ptr+basic_istream_char_vbtable[1]);
7120 static inline basic_istream_char* basic_istream_char_from_basic_ios(basic_ios_char *ptr)
7122 return (basic_istream_char*)((char*)ptr-basic_istream_char_vbtable[1]);
7125 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
7126 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
7127 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_init, 20)
7128 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)
7130 basic_ios_char *base;
7132 TRACE("(%p %p %d %d %d)\n", this, strbuf, isstd, noinit, virt_init);
7135 this->vbtable = basic_istream_char_vbtable;
7136 base = basic_istream_char_get_basic_ios(this);
7137 basic_ios_char_ctor(base);
7139 base = basic_istream_char_get_basic_ios(this);
7142 base->base.vtable = &MSVCP_basic_istream_char_vtable;
7145 basic_ios_char_init(base, strbuf, isstd);
7149 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
7150 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
7151 static basic_istream_char* basic_istream_char_ctor(basic_istream_char *this, basic_streambuf_char *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
7153 return basic_istream_char_ctor_init(this, strbuf, isstd, FALSE, virt_init);
7156 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
7157 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
7158 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_uninitialized, 12)
7159 basic_istream_char* __thiscall basic_istream_char_ctor_uninitialized(basic_istream_char *this, int uninitialized, MSVCP_bool virt_init)
7161 basic_ios_char *base;
7163 TRACE("(%p %d %d)\n", this, uninitialized, virt_init);
7166 this->vbtable = basic_istream_char_vbtable;
7167 base = basic_istream_char_get_basic_ios(this);
7168 basic_ios_char_ctor(base);
7170 base = basic_istream_char_get_basic_ios(this);
7173 base->base.vtable = &MSVCP_basic_istream_char_vtable;
7174 ios_base_Addstd(&base->base);
7178 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UAE@XZ */
7179 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
7180 DEFINE_THISCALL_WRAPPER(basic_istream_char_dtor, 4)
7181 void __thiscall basic_istream_char_dtor(basic_ios_char *base)
7183 basic_istream_char *this = basic_istream_char_from_basic_ios(base);
7185 /* don't destroy virtual base here */
7186 TRACE("(%p)\n", this);
7189 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
7190 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
7191 DEFINE_THISCALL_WRAPPER(basic_istream_char_vbase_dtor, 4)
7192 void __thiscall basic_istream_char_vbase_dtor(basic_istream_char *this)
7194 TRACE("(%p)\n", this);
7195 basic_istream_char_dtor(basic_istream_char_to_basic_ios(this));
7196 basic_ios_char_dtor(basic_istream_char_get_basic_ios(this));
7199 DEFINE_THISCALL_WRAPPER(basic_istream_char_vector_dtor, 8)
7200 basic_istream_char* __thiscall basic_istream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
7202 basic_istream_char *this = basic_istream_char_from_basic_ios(base);
7204 TRACE("(%p %x)\n", this, flags);
7207 /* we have an array, with the number of elements stored before the first object */
7208 INT_PTR i, *ptr = (INT_PTR *)this-1;
7210 for(i=*ptr-1; i>=0; i--)
7211 basic_istream_char_vbase_dtor(this+i);
7212 MSVCRT_operator_delete(ptr);
7214 basic_istream_char_vbase_dtor(this);
7216 MSVCRT_operator_delete(this);
7222 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
7223 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
7224 DEFINE_THISCALL_WRAPPER(basic_istream_char__Ipfx, 8)
7225 MSVCP_bool __thiscall basic_istream_char__Ipfx(basic_istream_char *this, MSVCP_bool noskip)
7227 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7229 TRACE("(%p %d)\n", this, noskip);
7231 if(ios_base_good(&base->base)) {
7232 if(basic_ios_char_tie_get(base))
7233 basic_ostream_char_flush(basic_ios_char_tie_get(base));
7235 if(!noskip && (ios_base_flags_get(&base->base) & FMTFLAG_skipws)) {
7236 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7237 const ctype_char *ctype = ctype_char_use_facet(base->strbuf->loc);
7240 for(ch = basic_streambuf_char_sgetc(strbuf); ;
7241 ch = basic_streambuf_char_snextc(strbuf)) {
7243 basic_ios_char_setstate(base, IOSTATE_eofbit);
7247 if(!ctype_char_is_ch(ctype, _SPACE|_BLANK, ch))
7253 if(!ios_base_good(&base->base)) {
7254 basic_ios_char_setstate(base, IOSTATE_failbit);
7261 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
7262 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
7263 DEFINE_THISCALL_WRAPPER(basic_istream_char_ipfx, 8)
7264 MSVCP_bool __thiscall basic_istream_char_ipfx(basic_istream_char *this, MSVCP_bool noskip)
7266 return basic_istream_char__Ipfx(this, noskip);
7269 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
7270 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
7271 DEFINE_THISCALL_WRAPPER(basic_istream_char_isfx, 4)
7272 void __thiscall basic_istream_char_isfx(basic_istream_char *this)
7274 TRACE("(%p)\n", this);
7277 static BOOL basic_istream_char_sentry_create(basic_istream_char *istr, MSVCP_bool noskip)
7279 basic_ios_char *base = basic_istream_char_get_basic_ios(istr);
7281 if(basic_ios_char_rdbuf_get(base))
7282 basic_streambuf_char__Lock(base->strbuf);
7284 return basic_istream_char_ipfx(istr, noskip);
7287 static void basic_istream_char_sentry_destroy(basic_istream_char *istr)
7289 basic_ios_char *base = basic_istream_char_get_basic_ios(istr);
7291 if(basic_ios_char_rdbuf_get(base))
7292 basic_streambuf_char__Unlock(base->strbuf);
7295 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QBEHXZ */
7296 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QEBA_JXZ */
7297 DEFINE_THISCALL_WRAPPER(basic_istream_char_gcount, 4)
7298 int __thiscall basic_istream_char_gcount(const basic_istream_char *this)
7300 TRACE("(%p)\n", this);
7304 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
7305 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
7306 DEFINE_THISCALL_WRAPPER(basic_istream_char_get, 4)
7307 int __thiscall basic_istream_char_get(basic_istream_char *this)
7309 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7312 TRACE("(%p)\n", this);
7316 if(!basic_istream_char_sentry_create(this, TRUE)) {
7317 basic_istream_char_sentry_destroy(this);
7321 ret = basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(base));
7322 basic_istream_char_sentry_destroy(this);
7324 basic_ios_char_setstate(base, IOSTATE_eofbit|IOSTATE_failbit);
7331 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAD@Z */
7332 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAD@Z */
7333 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_ch, 8)
7334 basic_istream_char* __thiscall basic_istream_char_get_ch(basic_istream_char *this, char *ch)
7338 TRACE("(%p %p)\n", this, ch);
7340 ret = basic_istream_char_get(this);
7346 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
7347 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
7348 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str_delim, 16)
7349 basic_istream_char* __thiscall basic_istream_char_get_str_delim(basic_istream_char *this, char *str, streamsize count, char delim)
7351 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7354 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
7358 if(basic_istream_char_sentry_create(this, TRUE)) {
7359 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7361 for(ch = basic_streambuf_char_sgetc(strbuf); count>1;
7362 ch = basic_streambuf_char_snextc(strbuf)) {
7363 if(ch==EOF || ch==delim)
7371 basic_istream_char_sentry_destroy(this);
7373 basic_ios_char_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
7374 (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7380 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
7381 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
7382 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str, 12)
7383 basic_istream_char* __thiscall basic_istream_char_get_str(basic_istream_char *this, char *str, streamsize count)
7385 return basic_istream_char_get_str_delim(this, str, count, '\n');
7388 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
7389 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
7390 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf_delim, 12)
7391 basic_istream_char* __thiscall basic_istream_char_get_streambuf_delim(basic_istream_char *this, basic_streambuf_char *strbuf, char delim)
7393 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7396 TRACE("(%p %p %c)\n", this, strbuf, delim);
7400 if(basic_istream_char_sentry_create(this, TRUE)) {
7401 basic_streambuf_char *strbuf_read = basic_ios_char_rdbuf_get(base);
7403 for(ch = basic_streambuf_char_sgetc(strbuf_read); ;
7404 ch = basic_streambuf_char_snextc(strbuf_read)) {
7405 if(ch==EOF || ch==delim)
7408 if(basic_streambuf_char_sputc(strbuf, ch) == EOF)
7413 basic_istream_char_sentry_destroy(this);
7415 basic_ios_char_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
7416 (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7420 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
7421 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
7422 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf, 8)
7423 basic_istream_char* __thiscall basic_istream_char_get_streambuf(basic_istream_char *this, basic_streambuf_char *strbuf)
7425 return basic_istream_char_get_streambuf_delim(this, strbuf, '\n');
7428 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
7429 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
7430 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline_delim, 16)
7431 basic_istream_char* __thiscall basic_istream_char_getline_delim(basic_istream_char *this, char *str, streamsize count, char delim)
7433 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7434 int ch = (unsigned char)delim;
7436 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
7440 if(basic_istream_char_sentry_create(this, TRUE) && count>0) {
7441 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7444 ch = basic_streambuf_char_sbumpc(strbuf);
7446 if(ch==EOF || ch==(unsigned char)delim)
7454 if(ch == (unsigned char)delim)
7456 else if(ch != EOF) {
7457 ch = basic_streambuf_char_sgetc(strbuf);
7459 if(ch == (unsigned char)delim) {
7460 basic_streambuf_char__Gninc(strbuf);
7465 basic_istream_char_sentry_destroy(this);
7467 basic_ios_char_setstate(base, (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit) |
7468 (!this->count || (ch!=(unsigned char)delim && ch!=EOF) ? IOSTATE_failbit : IOSTATE_goodbit));
7474 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
7475 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
7476 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline, 12)
7477 basic_istream_char* __thiscall basic_istream_char_getline(basic_istream_char *this, char *str, streamsize count)
7479 return basic_istream_char_getline_delim(this, str, count, '\n');
7482 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@HH@Z */
7483 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
7484 DEFINE_THISCALL_WRAPPER(basic_istream_char_ignore, 12)
7485 basic_istream_char* __thiscall basic_istream_char_ignore(basic_istream_char *this, streamsize count, int delim)
7487 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7488 int ch = (unsigned char)delim;
7491 TRACE("(%p %ld %d)\n", this, count, delim);
7495 if(basic_istream_char_sentry_create(this, TRUE)) {
7496 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7497 state = IOSTATE_goodbit;
7500 ch = basic_streambuf_char_sbumpc(strbuf);
7503 state = IOSTATE_eofbit;
7507 if(ch==(unsigned char)delim)
7511 if(count != INT_MAX)
7515 state = IOSTATE_failbit;
7516 basic_istream_char_sentry_destroy(this);
7518 basic_ios_char_setstate(base, state);
7522 /* ?ws@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@1@AAV21@@Z */
7523 /* ?ws@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
7524 basic_istream_char* __cdecl ws_basic_istream_char(basic_istream_char *istream)
7526 basic_ios_char *base = basic_istream_char_get_basic_ios(istream);
7529 TRACE("(%p)\n", istream);
7531 if(basic_istream_char_sentry_create(istream, TRUE)) {
7532 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7533 const ctype_char *ctype = ctype_char_use_facet(strbuf->loc);
7535 for(ch = basic_streambuf_char_sgetc(strbuf); ctype_char_is_ch(ctype, _SPACE, ch);
7536 ch = basic_streambuf_char_snextc(strbuf)) {
7541 basic_istream_char_sentry_destroy(istream);
7544 basic_ios_char_setstate(base, IOSTATE_eofbit);
7548 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
7549 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
7550 DEFINE_THISCALL_WRAPPER(basic_istream_char_peek, 4)
7551 int __thiscall basic_istream_char_peek(basic_istream_char *this)
7553 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7556 TRACE("(%p)\n", this);
7560 if(basic_istream_char_sentry_create(this, TRUE))
7561 ret = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
7562 basic_istream_char_sentry_destroy(this);
7565 basic_ios_char_setstate(base, IOSTATE_eofbit);
7570 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADIH@Z */
7571 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_K_J@Z */
7572 static basic_istream_char* basic_istream_char__Read_s(basic_istream_char *this, char *str, MSVCP_size_t size, streamsize count)
7574 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7575 IOSB_iostate state = IOSTATE_goodbit;
7577 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
7579 if(basic_istream_char_sentry_create(this, TRUE)) {
7580 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7582 this->count = basic_streambuf_char__Sgetn_s(strbuf, str, size, count);
7583 if(this->count != count)
7584 state |= IOSTATE_failbit | IOSTATE_eofbit;
7588 basic_istream_char_sentry_destroy(this);
7590 basic_ios_char_setstate(base, state);
7594 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
7595 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
7596 DEFINE_THISCALL_WRAPPER(basic_istream_char_read, 12)
7597 basic_istream_char* __thiscall basic_istream_char_read(basic_istream_char *this, char *str, streamsize count)
7599 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7600 IOSB_iostate state = IOSTATE_goodbit;
7602 TRACE("(%p %p %ld)\n", this, str, count);
7604 if(basic_istream_char_sentry_create(this, TRUE)) {
7605 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7607 this->count = basic_streambuf_char_sgetn(strbuf, str, count);
7608 if(this->count != count)
7609 state |= IOSTATE_failbit | IOSTATE_eofbit;
7613 basic_istream_char_sentry_destroy(this);
7615 basic_ios_char_setstate(base, state);
7619 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
7620 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
7621 static streamsize basic_istream_char__Readsome_s(basic_istream_char *this, char *str, MSVCP_size_t size, streamsize count)
7623 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7624 IOSB_iostate state = IOSTATE_goodbit;
7626 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
7630 if(basic_istream_char_sentry_create(this, TRUE)) {
7631 streamsize avail = basic_streambuf_char_in_avail(basic_ios_char_rdbuf_get(base));
7636 state |= IOSTATE_eofbit;
7638 basic_istream_char__Read_s(this, str, size, avail);
7640 state |= IOSTATE_failbit;
7642 basic_istream_char_sentry_destroy(this);
7644 basic_ios_char_setstate(base, state);
7648 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
7649 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
7650 DEFINE_THISCALL_WRAPPER(basic_istream_char_readsome, 12)
7651 streamsize __thiscall basic_istream_char_readsome(basic_istream_char *this, char *str, streamsize count)
7653 return basic_istream_char__Readsome_s(this, str, count, count);
7656 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
7657 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
7658 DEFINE_THISCALL_WRAPPER(basic_istream_char_putback, 8)
7659 basic_istream_char* __thiscall basic_istream_char_putback(basic_istream_char *this, char ch)
7661 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7662 IOSB_iostate state = IOSTATE_goodbit;
7664 TRACE("(%p %c)\n", this, ch);
7668 if(basic_istream_char_sentry_create(this, TRUE)) {
7669 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7671 if(!ios_base_good(&base->base))
7672 state |= IOSTATE_failbit;
7673 else if(!strbuf || basic_streambuf_char_sputbackc(strbuf, ch)==EOF)
7674 state |= IOSTATE_badbit;
7676 basic_istream_char_sentry_destroy(this);
7678 basic_ios_char_setstate(base, state);
7682 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
7683 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
7684 DEFINE_THISCALL_WRAPPER(basic_istream_char_unget, 4)
7685 basic_istream_char* __thiscall basic_istream_char_unget(basic_istream_char *this)
7687 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7688 IOSB_iostate state = IOSTATE_goodbit;
7690 TRACE("(%p)\n", this);
7694 if(basic_istream_char_sentry_create(this, TRUE)) {
7695 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7697 if(!ios_base_good(&base->base))
7698 state |= IOSTATE_failbit;
7699 else if(!strbuf || basic_streambuf_char_sungetc(strbuf)==EOF)
7700 state |= IOSTATE_badbit;
7702 basic_istream_char_sentry_destroy(this);
7704 basic_ios_char_setstate(base, state);
7708 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
7709 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
7710 DEFINE_THISCALL_WRAPPER(basic_istream_char_sync, 4)
7711 int __thiscall basic_istream_char_sync(basic_istream_char *this)
7713 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7714 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7716 TRACE("(%p)\n", this);
7721 if(basic_istream_char_sentry_create(this, TRUE)) {
7722 if(basic_streambuf_char_pubsync(strbuf) != -1) {
7723 basic_istream_char_sentry_destroy(this);
7727 basic_istream_char_sentry_destroy(this);
7729 basic_ios_char_setstate(base, IOSTATE_badbit);
7733 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
7734 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
7735 DEFINE_THISCALL_WRAPPER(basic_istream_char_tellg, 8)
7736 fpos_int* __thiscall basic_istream_char_tellg(basic_istream_char *this, fpos_int *ret)
7738 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7740 TRACE("(%p %p)\n", this, ret);
7742 if(ios_base_fail(&base->base)) {
7749 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base),
7750 ret, 0, SEEKDIR_cur, OPENMODE_in);
7752 if(ret->off==-1 && ret->pos==0 && ret->state==0)
7753 basic_ios_char_setstate(base, IOSTATE_failbit);
7758 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@JH@Z */
7759 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
7760 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg, 12)
7761 basic_istream_char* __thiscall basic_istream_char_seekg(basic_istream_char *this, streamoff off, int dir)
7763 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7765 TRACE("(%p %ld %d)\n", this, off, dir);
7767 if(!ios_base_fail(&base->base)) {
7768 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7771 basic_streambuf_char_pubseekoff(strbuf, &ret, off, dir, OPENMODE_in);
7773 if(ret.off==-1 && ret.pos==0 && ret.state==0)
7774 basic_ios_char_setstate(base, IOSTATE_failbit);
7776 basic_ios_char_clear(base, IOSTATE_goodbit);
7779 basic_ios_char_clear(base, IOSTATE_goodbit);
7784 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
7785 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
7786 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg_fpos, 28)
7787 basic_istream_char* __thiscall basic_istream_char_seekg_fpos(basic_istream_char *this, fpos_int pos)
7789 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7791 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
7793 if(!ios_base_fail(&base->base)) {
7794 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7797 basic_streambuf_char_pubseekpos(strbuf, &ret, pos, OPENMODE_in);
7799 if(ret.off==-1 && ret.pos==0 && ret.state==0)
7800 basic_ios_char_setstate(base, IOSTATE_failbit);
7802 basic_ios_char_clear(base, IOSTATE_goodbit);
7805 basic_ios_char_clear(base, IOSTATE_goodbit);
7810 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAF@Z */
7811 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAF@Z */
7812 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_short, 8)
7813 basic_istream_char* __thiscall basic_istream_char_read_short(basic_istream_char *this, short *v)
7815 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7816 int state = IOSTATE_goodbit;
7818 TRACE("(%p %p)\n", this, v);
7820 if(basic_istream_char_sentry_create(this, FALSE)) {
7821 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7822 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7823 istreambuf_iterator_char first={0}, last={0};
7826 first.strbuf = strbuf;
7827 num_get_char_get_long(numget, &last, first, last, &base->base, &state, &tmp);
7829 if(!(state&IOSTATE_failbit) && tmp==(LONG)((short)tmp))
7832 state |= IOSTATE_failbit;
7834 basic_istream_char_sentry_destroy(this);
7836 basic_ios_char_setstate(base, state);
7840 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAG@Z */
7841 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAG@Z */
7842 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ushort, 8)
7843 basic_istream_char* __thiscall basic_istream_char_read_ushort(basic_istream_char *this, unsigned short *v)
7845 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7846 int state = IOSTATE_goodbit;
7848 TRACE("(%p %p)\n", this, v);
7850 if(basic_istream_char_sentry_create(this, FALSE)) {
7851 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7852 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7853 istreambuf_iterator_char first={0}, last={0};
7855 first.strbuf = strbuf;
7856 num_get_char_get_ushort(numget, &last, first, last, &base->base, &state, v);
7858 basic_istream_char_sentry_destroy(this);
7860 basic_ios_char_setstate(base, state);
7864 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAH@Z */
7865 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAH@Z */
7866 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int, 8)
7867 basic_istream_char* __thiscall basic_istream_char_read_int(basic_istream_char *this, int *v)
7869 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7870 int state = IOSTATE_goodbit;
7872 TRACE("(%p %p)\n", this, v);
7874 if(basic_istream_char_sentry_create(this, FALSE)) {
7875 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7876 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7877 istreambuf_iterator_char first={0}, last={0};
7879 first.strbuf = strbuf;
7880 num_get_char_get_long(numget, &last, first, last, &base->base, &state, v);
7882 basic_istream_char_sentry_destroy(this);
7884 basic_ios_char_setstate(base, state);
7888 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAI@Z */
7889 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAI@Z */
7890 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint, 8)
7891 basic_istream_char* __thiscall basic_istream_char_read_uint(basic_istream_char *this, unsigned int *v)
7893 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7894 int state = IOSTATE_goodbit;
7896 TRACE("(%p %p)\n", this, v);
7898 if(basic_istream_char_sentry_create(this, FALSE)) {
7899 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7900 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7901 istreambuf_iterator_char first={0}, last={0};
7903 first.strbuf = strbuf;
7904 num_get_char_get_uint(numget, &last, first, last, &base->base, &state, v);
7906 basic_istream_char_sentry_destroy(this);
7908 basic_ios_char_setstate(base, state);
7912 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAJ@Z */
7913 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAJ@Z */
7914 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_long, 8)
7915 basic_istream_char* __thiscall basic_istream_char_read_long(basic_istream_char *this, LONG *v)
7917 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7918 int state = IOSTATE_goodbit;
7920 TRACE("(%p %p)\n", this, v);
7922 if(basic_istream_char_sentry_create(this, FALSE)) {
7923 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7924 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7925 istreambuf_iterator_char first={0}, last={0};
7927 first.strbuf = strbuf;
7928 num_get_char_get_long(numget, &last, first, last, &base->base, &state, v);
7930 basic_istream_char_sentry_destroy(this);
7932 basic_ios_char_setstate(base, state);
7936 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAK@Z */
7937 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAK@Z */
7938 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ulong, 8)
7939 basic_istream_char* __thiscall basic_istream_char_read_ulong(basic_istream_char *this, ULONG *v)
7941 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7942 int state = IOSTATE_goodbit;
7944 TRACE("(%p %p)\n", this, v);
7946 if(basic_istream_char_sentry_create(this, FALSE)) {
7947 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7948 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7949 istreambuf_iterator_char first={0}, last={0};
7951 first.strbuf = strbuf;
7952 num_get_char_get_ulong(numget, &last, first, last, &base->base, &state, v);
7954 basic_istream_char_sentry_destroy(this);
7956 basic_ios_char_setstate(base, state);
7960 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAM@Z */
7961 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAM@Z */
7962 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_float, 8)
7963 basic_istream_char* __thiscall basic_istream_char_read_float(basic_istream_char *this, float *v)
7965 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7966 int state = IOSTATE_goodbit;
7968 TRACE("(%p %p)\n", this, v);
7970 if(basic_istream_char_sentry_create(this, FALSE)) {
7971 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7972 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7973 istreambuf_iterator_char first={0}, last={0};
7975 first.strbuf = strbuf;
7976 num_get_char_get_float(numget, &last, first, last, &base->base, &state, v);
7978 basic_istream_char_sentry_destroy(this);
7980 basic_ios_char_setstate(base, state);
7984 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAN@Z */
7985 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAN@Z */
7986 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_double, 8)
7987 basic_istream_char* __thiscall basic_istream_char_read_double(basic_istream_char *this, double *v)
7989 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7990 int state = IOSTATE_goodbit;
7992 TRACE("(%p %p)\n", this, v);
7994 if(basic_istream_char_sentry_create(this, FALSE)) {
7995 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7996 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7997 istreambuf_iterator_char first={0}, last={0};
7999 first.strbuf = strbuf;
8000 num_get_char_get_double(numget, &last, first, last, &base->base, &state, v);
8002 basic_istream_char_sentry_destroy(this);
8004 basic_ios_char_setstate(base, state);
8008 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAO@Z */
8009 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAO@Z */
8010 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ldouble, 8)
8011 basic_istream_char* __thiscall basic_istream_char_read_ldouble(basic_istream_char *this, double *v)
8013 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
8014 int state = IOSTATE_goodbit;
8016 TRACE("(%p %p)\n", this, v);
8018 if(basic_istream_char_sentry_create(this, FALSE)) {
8019 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
8020 const num_get *numget = num_get_char_use_facet(strbuf->loc);
8021 istreambuf_iterator_char first={0}, last={0};
8023 first.strbuf = strbuf;
8024 num_get_char_get_ldouble(numget, &last, first, last, &base->base, &state, v);
8026 basic_istream_char_sentry_destroy(this);
8028 basic_ios_char_setstate(base, state);
8032 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAPAX@Z */
8033 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
8034 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ptr, 8)
8035 basic_istream_char* __thiscall basic_istream_char_read_ptr(basic_istream_char *this, void **v)
8037 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
8038 int state = IOSTATE_goodbit;
8040 TRACE("(%p %p)\n", this, v);
8042 if(basic_istream_char_sentry_create(this, FALSE)) {
8043 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
8044 const num_get *numget = num_get_char_use_facet(strbuf->loc);
8045 istreambuf_iterator_char first={0}, last={0};
8047 first.strbuf = strbuf;
8048 num_get_char_get_void(numget, &last, first, last, &base->base, &state, v);
8050 basic_istream_char_sentry_destroy(this);
8052 basic_ios_char_setstate(base, state);
8056 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_J@Z */
8057 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_J@Z */
8058 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int64, 8)
8059 basic_istream_char* __thiscall basic_istream_char_read_int64(basic_istream_char *this, __int64 *v)
8061 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
8062 int state = IOSTATE_goodbit;
8064 TRACE("(%p %p)\n", this, v);
8066 if(basic_istream_char_sentry_create(this, FALSE)) {
8067 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
8068 const num_get *numget = num_get_char_use_facet(strbuf->loc);
8069 istreambuf_iterator_char first={0}, last={0};
8071 first.strbuf = strbuf;
8072 num_get_char_get_int64(numget, &last, first, last, &base->base, &state, v);
8074 basic_istream_char_sentry_destroy(this);
8076 basic_ios_char_setstate(base, state);
8080 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_K@Z */
8081 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_K@Z */
8082 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint64, 8)
8083 basic_istream_char* __thiscall basic_istream_char_read_uint64(basic_istream_char *this, unsigned __int64 *v)
8085 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
8086 int state = IOSTATE_goodbit;
8088 TRACE("(%p %p)\n", this, v);
8090 if(basic_istream_char_sentry_create(this, FALSE)) {
8091 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
8092 const num_get *numget = num_get_char_use_facet(strbuf->loc);
8093 istreambuf_iterator_char first={0}, last={0};
8095 first.strbuf = strbuf;
8096 num_get_char_get_uint64(numget, &last, first, last, &base->base, &state, v);
8098 basic_istream_char_sentry_destroy(this);
8100 basic_ios_char_setstate(base, state);
8104 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_N@Z */
8105 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_N@Z */
8106 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_bool, 8)
8107 basic_istream_char* __thiscall basic_istream_char_read_bool(basic_istream_char *this, MSVCP_bool *v)
8109 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
8110 int state = IOSTATE_goodbit;
8112 TRACE("(%p %p)\n", this, v);
8114 if(basic_istream_char_sentry_create(this, FALSE)) {
8115 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
8116 const num_get *numget = num_get_char_use_facet(strbuf->loc);
8117 istreambuf_iterator_char first={0}, last={0};
8119 first.strbuf = strbuf;
8120 num_get_char_get_bool(numget, &last, first, last, &base->base, &state, v);
8122 basic_istream_char_sentry_destroy(this);
8124 basic_ios_char_setstate(base, state);
8128 /* ??$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 */
8129 /* ??$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 */
8130 basic_istream_char* __cdecl basic_istream_char_getline_bstr_delim(
8131 basic_istream_char *istream, basic_string_char *str, char delim)
8133 basic_ios_char *base = basic_istream_char_get_basic_ios(istream);
8134 IOSB_iostate state = IOSTATE_goodbit;
8135 int c = (unsigned char)delim;
8137 TRACE("(%p %p %c)\n", istream, str, delim);
8139 if(basic_istream_char_sentry_create(istream, TRUE)) {
8140 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
8141 MSVCP_basic_string_char_clear(str);
8143 c = basic_streambuf_char_sgetc(strbuf);
8144 for(; c!=(unsigned char)delim && c!=EOF; c = basic_streambuf_char_snextc(strbuf))
8145 MSVCP_basic_string_char_append_ch(str, c);
8146 if(c==EOF) state |= IOSTATE_eofbit;
8147 else if(c==(unsigned char)delim) basic_streambuf_char_sbumpc(strbuf);
8149 if(!MSVCP_basic_string_char_length(str) && c!=(unsigned char)delim) state |= IOSTATE_failbit;
8151 basic_istream_char_sentry_destroy(istream);
8153 basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream), state);
8157 /* ??$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 */
8158 /* ??$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 */
8159 basic_istream_char* __cdecl basic_istream_char_getline_bstr(
8160 basic_istream_char *istream, basic_string_char *str)
8162 return basic_istream_char_getline_bstr_delim(istream, str, '\n');
8165 /* ??$?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 */
8166 /* ??$?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 */
8167 basic_istream_char* __cdecl basic_istream_char_read_bstr(
8168 basic_istream_char *istream, basic_string_char *str)
8170 basic_ios_char *base = basic_istream_char_get_basic_ios(istream);
8171 IOSB_iostate state = IOSTATE_failbit;
8174 TRACE("(%p %p)\n", istream, str);
8176 if(basic_istream_char_sentry_create(istream, FALSE)) {
8177 const ctype_char *ctype = ctype_char_use_facet(base->strbuf->loc);
8178 MSVCP_size_t count = ios_base_width_get(&base->base);
8183 MSVCP_basic_string_char_clear(str);
8185 for(c = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
8186 c!=EOF && !ctype_char_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
8187 c = basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base)), count--) {
8188 state = IOSTATE_goodbit;
8189 MSVCP_basic_string_char_append_ch(str, c);
8192 basic_istream_char_sentry_destroy(istream);
8194 ios_base_width_set(&base->base, 0);
8195 basic_ios_char_setstate(base, state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
8199 /* ??$?5DU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAD@Z */
8200 /* ??$?5DU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAD@Z */
8201 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAC@Z */
8202 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAC@Z */
8203 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAE@Z */
8204 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAE@Z */
8205 basic_istream_char* __cdecl basic_istream_char_read_str(basic_istream_char *istream, char *str)
8207 basic_ios_char *base = basic_istream_char_get_basic_ios(istream);
8208 IOSB_iostate state = IOSTATE_failbit;
8211 TRACE("(%p %p)\n", istream, str);
8213 if(basic_istream_char_sentry_create(istream, FALSE)) {
8214 const ctype_char *ctype = ctype_char_use_facet(base->strbuf->loc);
8215 MSVCP_size_t count = ios_base_width_get(&base->base)-1;
8217 for(c = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
8218 c!=EOF && !ctype_char_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
8219 c = basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base)), count--) {
8220 state = IOSTATE_goodbit;
8224 basic_istream_char_sentry_destroy(istream);
8227 ios_base_width_set(&base->base, 0);
8228 basic_ios_char_setstate(base, state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
8232 /* ??$?5DU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAD@Z */
8233 /* ??$?5DU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAD@Z */
8234 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAC@Z */
8235 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAC@Z */
8236 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAE@Z */
8237 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAE@Z */
8238 basic_istream_char* __cdecl basic_istream_char_read_ch(basic_istream_char *istream, char *ch)
8240 IOSB_iostate state = IOSTATE_failbit;
8243 TRACE("(%p %p)\n", istream, ch);
8245 if(basic_istream_char_sentry_create(istream, FALSE)) {
8246 c = basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(
8247 basic_istream_char_get_basic_ios(istream)));
8249 state = IOSTATE_goodbit;
8253 basic_istream_char_sentry_destroy(istream);
8255 basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream),
8256 state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
8260 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
8261 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
8262 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_streambuf, 8)
8263 basic_istream_char* __thiscall basic_istream_char_read_streambuf(
8264 basic_istream_char *this, basic_streambuf_char *streambuf)
8266 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
8267 IOSB_iostate state = IOSTATE_failbit;
8270 TRACE("(%p %p)\n", this, streambuf);
8272 if(basic_istream_char_sentry_create(this, FALSE)) {
8273 for(c = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base)); c!=EOF;
8274 c = basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base))) {
8275 state = IOSTATE_goodbit;
8276 if(basic_streambuf_char_sputc(streambuf, c) == EOF)
8280 basic_istream_char_sentry_destroy(this);
8282 basic_ios_char_setstate(base, state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
8286 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
8287 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
8288 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func, 8)
8289 basic_istream_char* __thiscall basic_istream_char_read_func(basic_istream_char *this,
8290 basic_istream_char* (__cdecl *pfunc)(basic_istream_char*))
8292 TRACE("(%p %p)\n", this, pfunc);
8297 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
8298 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
8299 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_basic_ios, 8)
8300 basic_istream_char* __thiscall basic_istream_char_read_func_basic_ios(basic_istream_char *this,
8301 basic_ios_char* (__cdecl *pfunc)(basic_ios_char*))
8303 TRACE("(%p %p)\n", this, pfunc);
8304 pfunc(basic_istream_char_get_basic_ios(this));
8308 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
8309 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
8310 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_ios_base, 8)
8311 basic_istream_char* __thiscall basic_istream_char_read_func_ios_base(basic_istream_char *this,
8312 ios_base* (__cdecl *pfunc)(ios_base*))
8314 TRACE("(%p %p)\n", this, pfunc);
8315 pfunc(&basic_istream_char_get_basic_ios(this)->base);
8319 /* Caution: basic_istream uses virtual inheritance. */
8320 static inline basic_ios_wchar* basic_istream_wchar_get_basic_ios(basic_istream_wchar *this)
8322 return (basic_ios_wchar*)((char*)this+this->vbtable[1]);
8325 static inline basic_ios_wchar* basic_istream_wchar_to_basic_ios(basic_istream_wchar *ptr)
8327 return (basic_ios_wchar*)((char*)ptr+basic_istream_wchar_vbtable[1]);
8330 static inline basic_istream_wchar* basic_istream_wchar_from_basic_ios(basic_ios_wchar *ptr)
8332 return (basic_istream_wchar*)((char*)ptr-basic_istream_wchar_vbtable[1]);
8335 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N1@Z */
8336 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N1@Z */
8337 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ctor_init, 20)
8338 basic_istream_wchar* __thiscall basic_istream_wchar_ctor_init(basic_istream_wchar *this,
8339 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool noinit, MSVCP_bool virt_init)
8341 basic_ios_wchar *base;
8343 TRACE("(%p %p %d %d %d)\n", this, strbuf, isstd, noinit, virt_init);
8346 this->vbtable = basic_istream_wchar_vbtable;
8347 base = basic_istream_wchar_get_basic_ios(this);
8348 basic_ios_wchar_ctor(base);
8350 base = basic_istream_wchar_get_basic_ios(this);
8353 base->base.vtable = &MSVCP_basic_istream_wchar_vtable;
8356 basic_ios_wchar_init(base, strbuf, isstd);
8360 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */
8361 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */
8362 DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor_init, 20)
8363 basic_istream_wchar* __thiscall basic_istream_short_ctor_init(basic_istream_wchar *this,
8364 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool noinit, MSVCP_bool virt_init)
8366 basic_istream_wchar_ctor_init(this, strbuf, isstd, noinit, virt_init);
8367 basic_istream_wchar_get_basic_ios(this)->base.vtable = &MSVCP_basic_istream_short_vtable;
8371 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
8372 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
8373 static basic_istream_wchar* basic_istream_wchar_ctor(basic_istream_wchar *this,
8374 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
8376 return basic_istream_wchar_ctor_init(this, strbuf, isstd, FALSE, virt_init);
8379 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
8380 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
8381 static basic_istream_wchar* basic_istream_short_ctor(basic_istream_wchar *this,
8382 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
8384 return basic_istream_short_ctor_init(this, strbuf, isstd, FALSE, virt_init);
8387 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@W4_Uninitialized@1@@Z */
8388 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
8389 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ctor_uninitialized, 12)
8390 basic_istream_wchar* __thiscall basic_istream_wchar_ctor_uninitialized(
8391 basic_istream_wchar *this, int uninitialized, MSVCP_bool virt_init)
8393 basic_ios_wchar *base;
8395 TRACE("(%p %d %d)\n", this, uninitialized, virt_init);
8398 this->vbtable = basic_istream_wchar_vbtable;
8399 base = basic_istream_wchar_get_basic_ios(this);
8400 basic_ios_wchar_ctor(base);
8402 base = basic_istream_wchar_get_basic_ios(this);
8405 base->base.vtable = &MSVCP_basic_istream_wchar_vtable;
8406 ios_base_Addstd(&base->base);
8410 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z */
8411 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
8412 DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor_uninitialized, 12)
8413 basic_istream_wchar* __thiscall basic_istream_short_ctor_uninitialized(
8414 basic_istream_wchar *this, int uninitialized, MSVCP_bool virt_init)
8416 basic_istream_wchar_ctor_uninitialized(this, uninitialized, virt_init);
8417 basic_istream_wchar_get_basic_ios(this)->base.vtable = &MSVCP_basic_istream_short_vtable;
8421 /* ??1?$basic_istream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
8422 /* ??1?$basic_istream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
8423 /* ??1?$basic_istream@GU?$char_traits@G@std@@@std@@UAE@XZ */
8424 /* ??1?$basic_istream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
8425 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_dtor, 4)
8426 void __thiscall basic_istream_wchar_dtor(basic_ios_wchar *base)
8428 basic_istream_wchar *this = basic_istream_wchar_from_basic_ios(base);
8430 /* don't destroy virtual base here */
8431 TRACE("(%p)\n", this);
8434 /* ??_D?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
8435 /* ??_D?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
8436 /* ??_D?$basic_istream@GU?$char_traits@G@std@@@std@@QAEXXZ */
8437 /* ??_D?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
8438 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_vbase_dtor, 4)
8439 void __thiscall basic_istream_wchar_vbase_dtor(basic_istream_wchar *this)
8441 TRACE("(%p)\n", this);
8442 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(this));
8443 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(this));
8446 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_vector_dtor, 8)
8447 basic_istream_wchar* __thiscall basic_istream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
8449 basic_istream_wchar *this = basic_istream_wchar_from_basic_ios(base);
8451 TRACE("(%p %x)\n", this, flags);
8454 /* we have an array, with the number of elements stored before the first object */
8455 INT_PTR i, *ptr = (INT_PTR *)this-1;
8457 for(i=*ptr-1; i>=0; i--)
8458 basic_istream_wchar_vbase_dtor(this+i);
8459 MSVCRT_operator_delete(ptr);
8461 basic_istream_wchar_vbase_dtor(this);
8463 MSVCRT_operator_delete(this);
8469 /* ?_Ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE_N_N@Z */
8470 /* ?_Ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_N_N@Z */
8471 /* ?_Ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE_N_N@Z */
8472 /* ?_Ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_N_N@Z */
8473 DEFINE_THISCALL_WRAPPER(basic_istream_wchar__Ipfx, 8)
8474 MSVCP_bool __thiscall basic_istream_wchar__Ipfx(basic_istream_wchar *this, MSVCP_bool noskip)
8476 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8478 TRACE("(%p %d)\n", this, noskip);
8480 if(ios_base_good(&base->base)) {
8481 if(basic_ios_wchar_tie_get(base))
8482 basic_ostream_wchar_flush(basic_ios_wchar_tie_get(base));
8484 if(!noskip && (ios_base_flags_get(&base->base) & FMTFLAG_skipws)) {
8485 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8486 const ctype_wchar *ctype = ctype_wchar_use_facet(base->strbuf->loc);
8489 for(ch = basic_streambuf_wchar_sgetc(strbuf); ;
8490 ch = basic_streambuf_wchar_snextc(strbuf)) {
8492 basic_ios_wchar_setstate(base, IOSTATE_eofbit);
8496 if(!ctype_wchar_is_ch(ctype, _SPACE|_BLANK, ch))
8502 if(!ios_base_good(&base->base)) {
8503 basic_ios_wchar_setstate(base, IOSTATE_failbit);
8509 /* ?ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE_N_N@Z */
8510 /* ?ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_N_N@Z */
8511 /* ?ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE_N_N@Z */
8512 /* ?ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_N_N@Z */
8513 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ipfx, 8)
8514 MSVCP_bool __thiscall basic_istream_wchar_ipfx(basic_istream_wchar *this, MSVCP_bool noskip)
8516 return basic_istream_wchar__Ipfx(this, noskip);
8519 /* ?isfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
8520 /* ?isfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
8521 /* ?isfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEXXZ */
8522 /* ?isfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
8523 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_isfx, 4)
8524 void __thiscall basic_istream_wchar_isfx(basic_istream_wchar *this)
8526 TRACE("(%p)\n", this);
8529 static BOOL basic_istream_wchar_sentry_create(basic_istream_wchar *istr, MSVCP_bool noskip)
8531 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istr);
8533 if(basic_ios_wchar_rdbuf_get(base))
8534 basic_streambuf_wchar__Lock(base->strbuf);
8536 return basic_istream_wchar_ipfx(istr, noskip);
8539 static void basic_istream_wchar_sentry_destroy(basic_istream_wchar *istr)
8541 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istr);
8543 if(basic_ios_wchar_rdbuf_get(base))
8544 basic_streambuf_wchar__Unlock(base->strbuf);
8547 /* ?gcount@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QBEHXZ */
8548 /* ?gcount@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEBA_JXZ */
8549 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QBEHXZ */
8550 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QEBA_JXZ */
8551 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_gcount, 4)
8552 int __thiscall basic_istream_wchar_gcount(const basic_istream_wchar *this)
8554 TRACE("(%p)\n", this);
8558 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
8559 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
8560 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEGXZ */
8561 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAGXZ */
8562 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get, 4)
8563 unsigned short __thiscall basic_istream_wchar_get(basic_istream_wchar *this)
8565 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8568 TRACE("(%p)\n", this);
8572 if(!basic_istream_wchar_sentry_create(this, TRUE)) {
8573 basic_istream_wchar_sentry_destroy(this);
8577 ret = basic_streambuf_wchar_sbumpc(basic_ios_wchar_rdbuf_get(base));
8578 basic_istream_wchar_sentry_destroy(this);
8580 basic_ios_wchar_setstate(base, IOSTATE_eofbit|IOSTATE_failbit);
8587 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AA_W@Z */
8588 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEA_W@Z */
8589 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAG@Z */
8590 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAG@Z */
8591 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_ch, 8)
8592 basic_istream_wchar* __thiscall basic_istream_wchar_get_ch(basic_istream_wchar *this, wchar_t *ch)
8596 TRACE("(%p %p)\n", this, ch);
8598 ret = basic_istream_wchar_get(this);
8604 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH_W@Z */
8605 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J_W@Z */
8606 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGHG@Z */
8607 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_JG@Z */
8608 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_str_delim, 16)
8609 basic_istream_wchar* __thiscall basic_istream_wchar_get_str_delim(basic_istream_wchar *this, wchar_t *str, streamsize count, wchar_t delim)
8611 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8612 unsigned short ch = delim;
8614 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
8618 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8619 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8621 for(ch = basic_streambuf_wchar_sgetc(strbuf); count>1;
8622 ch = basic_streambuf_wchar_snextc(strbuf)) {
8623 if(ch==WEOF || ch==delim)
8631 basic_istream_wchar_sentry_destroy(this);
8633 basic_ios_wchar_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
8634 (ch==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
8640 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
8641 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
8642 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
8643 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
8644 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_str, 12)
8645 basic_istream_wchar* __thiscall basic_istream_wchar_get_str(basic_istream_wchar *this, wchar_t *str, streamsize count)
8647 return basic_istream_wchar_get_str_delim(this, str, count, '\n');
8650 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_W@Z */
8651 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_W@Z */
8652 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAV?$basic_streambuf@GU?$char_traits@G@std@@@2@G@Z */
8653 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@G@Z */
8654 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_streambuf_delim, 12)
8655 basic_istream_wchar* __thiscall basic_istream_wchar_get_streambuf_delim(basic_istream_wchar *this, basic_streambuf_wchar *strbuf, wchar_t delim)
8657 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8658 unsigned short ch = delim;
8660 TRACE("(%p %p %c)\n", this, strbuf, delim);
8664 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8665 basic_streambuf_wchar *strbuf_read = basic_ios_wchar_rdbuf_get(base);
8667 for(ch = basic_streambuf_wchar_sgetc(strbuf_read); ;
8668 ch = basic_streambuf_wchar_snextc(strbuf_read)) {
8669 if(ch==WEOF || ch==delim)
8672 if(basic_streambuf_wchar_sputc(strbuf, ch) == WEOF)
8677 basic_istream_wchar_sentry_destroy(this);
8679 basic_ios_wchar_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
8680 (ch==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
8684 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@@Z */
8685 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@@Z */
8686 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAV?$basic_streambuf@GU?$char_traits@G@std@@@2@@Z */
8687 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@@Z */
8688 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_streambuf, 8)
8689 basic_istream_wchar* __thiscall basic_istream_wchar_get_streambuf(basic_istream_wchar *this, basic_streambuf_wchar *strbuf)
8691 return basic_istream_wchar_get_streambuf_delim(this, strbuf, '\n');
8694 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH_W@Z */
8695 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J_W@Z */
8696 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGHG@Z */
8697 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_JG@Z */
8698 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_getline_delim, 16)
8699 basic_istream_wchar* __thiscall basic_istream_wchar_getline_delim(basic_istream_wchar *this, wchar_t *str, streamsize count, wchar_t delim)
8701 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8702 unsigned short ch = delim;
8704 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
8708 if(basic_istream_wchar_sentry_create(this, TRUE) && count>0) {
8709 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8712 ch = basic_streambuf_wchar_sbumpc(strbuf);
8714 if(ch==WEOF || ch==delim)
8724 else if(ch != WEOF) {
8725 ch = basic_streambuf_wchar_sgetc(strbuf);
8728 basic_streambuf_wchar__Gninc(strbuf);
8733 basic_istream_wchar_sentry_destroy(this);
8735 basic_ios_wchar_setstate(base, (ch==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit) |
8736 (!this->count || (ch!=delim && ch!=WEOF) ? IOSTATE_failbit : IOSTATE_goodbit));
8742 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
8743 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
8744 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
8745 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
8746 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_getline, 12)
8747 basic_istream_wchar* __thiscall basic_istream_wchar_getline(basic_istream_wchar *this, wchar_t *str, streamsize count)
8749 return basic_istream_wchar_getline_delim(this, str, count, '\n');
8752 /* ?ignore@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@HG@Z */
8753 /* ?ignore@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_JG@Z */
8754 /* ?ignore@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@HG@Z */
8755 /* ?ignore@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JG@Z */
8756 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ignore, 12)
8757 basic_istream_wchar* __thiscall basic_istream_wchar_ignore(basic_istream_wchar *this, streamsize count, unsigned short delim)
8759 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8760 unsigned short ch = delim;
8763 TRACE("(%p %ld %d)\n", this, count, delim);
8767 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8768 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8769 state = IOSTATE_goodbit;
8772 ch = basic_streambuf_wchar_sbumpc(strbuf);
8775 state = IOSTATE_eofbit;
8783 if(count != INT_MAX)
8787 state = IOSTATE_failbit;
8788 basic_istream_wchar_sentry_destroy(this);
8790 basic_ios_wchar_setstate(base, state);
8794 /* ?ws@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
8795 /* ?ws@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
8796 /* ?ws@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@1@AAV21@@Z */
8797 /* ?ws@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
8798 basic_istream_wchar* __cdecl ws_basic_istream_wchar(basic_istream_wchar *istream)
8800 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream);
8801 unsigned short ch = '\n';
8803 TRACE("(%p)\n", istream);
8805 if(basic_istream_wchar_sentry_create(istream, TRUE)) {
8806 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8807 const ctype_wchar *ctype = ctype_wchar_use_facet(strbuf->loc);
8809 for(ch = basic_streambuf_wchar_sgetc(strbuf); ctype_wchar_is_ch(ctype, _SPACE, ch);
8810 ch = basic_streambuf_wchar_snextc(strbuf)) {
8815 basic_istream_wchar_sentry_destroy(istream);
8818 basic_ios_wchar_setstate(base, IOSTATE_eofbit);
8822 /* ?peek@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
8823 /* ?peek@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
8824 /* ?peek@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEGXZ */
8825 /* ?peek@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAGXZ */
8826 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_peek, 4)
8827 unsigned short __thiscall basic_istream_wchar_peek(basic_istream_wchar *this)
8829 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8830 unsigned short ret = WEOF;
8832 TRACE("(%p)\n", this);
8836 if(basic_istream_wchar_sentry_create(this, TRUE))
8837 ret = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base));
8838 basic_istream_wchar_sentry_destroy(this);
8841 basic_ios_wchar_setstate(base, IOSTATE_eofbit);
8846 /* ?_Read_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WIH@Z */
8847 /* ?_Read_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_K_J@Z */
8848 /* ?_Read_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGIH@Z */
8849 /* ?_Read_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_K_J@Z */
8850 static basic_istream_wchar* basic_istream_wchar__Read_s(basic_istream_wchar *this, wchar_t *str, MSVCP_size_t size, streamsize count)
8852 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8853 IOSB_iostate state = IOSTATE_goodbit;
8855 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
8857 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8858 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8860 this->count = basic_streambuf_wchar__Sgetn_s(strbuf, str, size, count);
8861 if(this->count != count)
8862 state |= IOSTATE_failbit | IOSTATE_eofbit;
8866 basic_istream_wchar_sentry_destroy(this);
8868 basic_ios_wchar_setstate(base, state);
8872 /* ?read@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
8873 /* ?read@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
8874 /* ?read@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
8875 /* ?read@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
8876 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read, 12)
8877 basic_istream_wchar* __thiscall basic_istream_wchar_read(basic_istream_wchar *this, wchar_t *str, streamsize count)
8879 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8880 IOSB_iostate state = IOSTATE_goodbit;
8882 TRACE("(%p %p %ld)\n", this, str, count);
8884 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8885 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8887 this->count = basic_streambuf_wchar_sgetn(strbuf, str, count);
8888 if(this->count != count)
8889 state |= IOSTATE_failbit | IOSTATE_eofbit;
8893 basic_istream_wchar_sentry_destroy(this);
8895 basic_ios_wchar_setstate(base, state);
8899 /* ?_Readsome_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHPA_WIH@Z */
8900 /* ?_Readsome_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_K_J@Z */
8901 /* ?_Readsome_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHPAGIH@Z */
8902 /* ?_Readsome_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_K_J@Z */
8903 static streamsize basic_istream_wchar__Readsome_s(basic_istream_wchar *this, wchar_t *str, MSVCP_size_t size, streamsize count)
8905 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8906 IOSB_iostate state = IOSTATE_goodbit;
8908 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
8912 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8913 streamsize avail = basic_streambuf_wchar_in_avail(basic_ios_wchar_rdbuf_get(base));
8918 state |= IOSTATE_eofbit;
8920 basic_istream_wchar__Read_s(this, str, size, avail);
8922 state |= IOSTATE_failbit;
8924 basic_istream_wchar_sentry_destroy(this);
8926 basic_ios_wchar_setstate(base, state);
8930 /* ?readsome@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHPA_WH@Z */
8931 /* ?readsome@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_J@Z */
8932 /* ?readsome@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */
8933 /* ?readsome@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */
8934 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_readsome, 12)
8935 streamsize __thiscall basic_istream_wchar_readsome(basic_istream_wchar *this, wchar_t *str, streamsize count)
8937 return basic_istream_wchar__Readsome_s(this, str, count, count);
8940 /* ?putback@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@_W@Z */
8941 /* ?putback@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_W@Z */
8942 /* ?putback@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@G@Z */
8943 /* ?putback@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@G@Z */
8944 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_putback, 8)
8945 basic_istream_wchar* __thiscall basic_istream_wchar_putback(basic_istream_wchar *this, wchar_t ch)
8947 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8948 IOSB_iostate state = IOSTATE_goodbit;
8950 TRACE("(%p %c)\n", this, ch);
8954 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8955 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8957 if(!ios_base_good(&base->base))
8958 state |= IOSTATE_failbit;
8959 else if(!strbuf || basic_streambuf_wchar_sputbackc(strbuf, ch)==WEOF)
8960 state |= IOSTATE_badbit;
8962 basic_istream_wchar_sentry_destroy(this);
8964 basic_ios_wchar_setstate(base, state);
8968 /* ?unget@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@XZ */
8969 /* ?unget@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@XZ */
8970 /* ?unget@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@XZ */
8971 /* ?unget@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@XZ */
8972 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_unget, 4)
8973 basic_istream_wchar* __thiscall basic_istream_wchar_unget(basic_istream_wchar *this)
8975 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8976 IOSB_iostate state = IOSTATE_goodbit;
8978 TRACE("(%p)\n", this);
8982 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8983 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8985 if(!ios_base_good(&base->base))
8986 state |= IOSTATE_failbit;
8987 else if(!strbuf || basic_streambuf_wchar_sungetc(strbuf)==WEOF)
8988 state |= IOSTATE_badbit;
8990 basic_istream_wchar_sentry_destroy(this);
8992 basic_ios_wchar_setstate(base, state);
8996 /* ?sync@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
8997 /* ?sync@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAHXZ */
8998 /* ?sync@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHXZ */
8999 /* ?sync@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAHXZ */
9000 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_sync, 4)
9001 int __thiscall basic_istream_wchar_sync(basic_istream_wchar *this)
9003 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9004 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9006 TRACE("(%p)\n", this);
9011 if(basic_istream_wchar_sentry_create(this, TRUE)) {
9012 if(basic_streambuf_wchar_pubsync(strbuf) != -1) {
9013 basic_istream_wchar_sentry_destroy(this);
9017 basic_istream_wchar_sentry_destroy(this);
9019 basic_ios_wchar_setstate(base, IOSTATE_badbit);
9023 /* ?tellg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@XZ */
9024 /* ?tellg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
9025 /* ?tellg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@XZ */
9026 /* ?tellg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
9027 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_tellg, 8)
9028 fpos_int* __thiscall basic_istream_wchar_tellg(basic_istream_wchar *this, fpos_int *ret)
9030 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9032 TRACE("(%p %p)\n", this, ret);
9034 if(ios_base_fail(&base->base)) {
9041 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base),
9042 ret, 0, SEEKDIR_cur, OPENMODE_in);
9043 if(ret->off==-1 && ret->pos==0 && ret->state==0)
9044 basic_ios_wchar_setstate(base, IOSTATE_failbit);
9049 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@JH@Z */
9050 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_JH@Z */
9051 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@JH@Z */
9052 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JH@Z */
9053 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_seekg, 12)
9054 basic_istream_wchar* __thiscall basic_istream_wchar_seekg(basic_istream_wchar *this, streamoff off, int dir)
9056 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9058 TRACE("(%p %ld %d)\n", this, off, dir);
9060 if(!ios_base_fail(&base->base)) {
9061 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9064 basic_streambuf_wchar_pubseekoff(strbuf, &ret, off, dir, OPENMODE_in);
9066 if(ret.off==-1 && ret.pos==0 && ret.state==0)
9067 basic_ios_wchar_setstate(base, IOSTATE_failbit);
9069 basic_ios_wchar_clear(base, IOSTATE_goodbit);
9072 basic_ios_wchar_clear(base, IOSTATE_goodbit);
9077 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
9078 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
9079 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
9080 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
9081 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_seekg_fpos, 28)
9082 basic_istream_wchar* __thiscall basic_istream_wchar_seekg_fpos(basic_istream_wchar *this, fpos_int pos)
9084 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9086 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
9088 if(!ios_base_fail(&base->base)) {
9089 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9092 basic_streambuf_wchar_pubseekpos(strbuf, &ret, pos, OPENMODE_in);
9094 if(ret.off==-1 && ret.pos==0 && ret.state==0)
9095 basic_ios_wchar_setstate(base, IOSTATE_failbit);
9097 basic_ios_wchar_clear(base, IOSTATE_goodbit);
9100 basic_ios_wchar_clear(base, IOSTATE_goodbit);
9105 static basic_istream_wchar* basic_istream_read_short(basic_istream_wchar *this, short *v, const num_get *numget)
9107 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9108 int state = IOSTATE_goodbit;
9110 TRACE("(%p %p)\n", this, v);
9112 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9113 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9114 istreambuf_iterator_wchar first={0}, last={0};
9117 first.strbuf = strbuf;
9118 num_get_wchar_get_long(numget, &last, first, last, &base->base, &state, &tmp);
9120 if(!(state&IOSTATE_failbit) && tmp==(LONG)((short)tmp))
9123 state |= IOSTATE_failbit;
9125 basic_istream_wchar_sentry_destroy(this);
9127 basic_ios_wchar_setstate(base, state);
9131 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAF@Z */
9132 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAF@Z */
9133 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_short, 8)
9134 basic_istream_wchar* __thiscall basic_istream_wchar_read_short(basic_istream_wchar *this, short *v)
9136 return basic_istream_read_short(this, v, num_get_wchar_use_facet(
9137 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9140 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAF@Z */
9141 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAF@Z */
9142 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_short, 8)
9143 basic_istream_wchar* __thiscall basic_istream_short_read_short(basic_istream_wchar *this, short *v)
9145 return basic_istream_read_short(this, v, num_get_short_use_facet(
9146 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9149 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAG@Z */
9150 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAG@Z */
9151 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ushort, 8)
9152 basic_istream_wchar* __thiscall basic_istream_wchar_read_ushort(basic_istream_wchar *this, unsigned short *v)
9154 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9155 int state = IOSTATE_goodbit;
9157 TRACE("(%p %p)\n", this, v);
9159 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9160 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9161 const num_get *numget = num_get_wchar_use_facet(strbuf->loc);
9162 istreambuf_iterator_wchar first={0}, last={0};
9164 first.strbuf = strbuf;
9165 num_get_wchar_get_ushort(numget, &last, first, last, &base->base, &state, v);
9167 basic_istream_wchar_sentry_destroy(this);
9169 basic_ios_wchar_setstate(base, state);
9173 static basic_istream_wchar* basic_istream_read_int(basic_istream_wchar *this, int *v, const num_get *numget)
9175 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9176 int state = IOSTATE_goodbit;
9178 TRACE("(%p %p)\n", this, v);
9180 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9181 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9182 istreambuf_iterator_wchar first={0}, last={0};
9184 first.strbuf = strbuf;
9185 num_get_wchar_get_long(numget, &last, first, last, &base->base, &state, v);
9187 basic_istream_wchar_sentry_destroy(this);
9189 basic_ios_wchar_setstate(base, state);
9193 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAH@Z */
9194 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAH@Z */
9195 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_int, 8)
9196 basic_istream_wchar* __thiscall basic_istream_wchar_read_int(basic_istream_wchar *this, int *v)
9198 return basic_istream_read_int(this, v, num_get_wchar_use_facet(
9199 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9202 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAH@Z */
9203 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAH@Z */
9204 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int, 8)
9205 basic_istream_wchar* __thiscall basic_istream_short_read_int(basic_istream_wchar *this, int *v)
9207 return basic_istream_read_int(this, v, num_get_short_use_facet(
9208 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9211 static basic_istream_wchar* basic_istream_read_uint(basic_istream_wchar *this, unsigned int *v, const num_get *numget)
9213 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9214 int state = IOSTATE_goodbit;
9216 TRACE("(%p %p)\n", this, v);
9218 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9219 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9220 istreambuf_iterator_wchar first={0}, last={0};
9222 first.strbuf = strbuf;
9223 num_get_wchar_get_uint(numget, &last, first, last, &base->base, &state, v);
9225 basic_istream_wchar_sentry_destroy(this);
9227 basic_ios_wchar_setstate(base, state);
9231 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAI@Z */
9232 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAI@Z */
9233 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_uint, 8)
9234 basic_istream_wchar* __thiscall basic_istream_wchar_read_uint(basic_istream_wchar *this, unsigned int *v)
9236 return basic_istream_read_uint(this, v, num_get_wchar_use_facet(
9237 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9240 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAI@Z */
9241 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAI@Z */
9242 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint, 8)
9243 basic_istream_wchar* __thiscall basic_istream_short_read_uint(basic_istream_wchar *this, unsigned int *v)
9245 return basic_istream_read_uint(this, v, num_get_short_use_facet(
9246 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9249 static basic_istream_wchar* basic_istream_read_long(basic_istream_wchar *this, LONG *v, const num_get *numget)
9251 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9252 int state = IOSTATE_goodbit;
9254 TRACE("(%p %p)\n", this, v);
9256 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9257 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9258 istreambuf_iterator_wchar first={0}, last={0};
9260 first.strbuf = strbuf;
9261 num_get_wchar_get_long(numget, &last, first, last, &base->base, &state, v);
9263 basic_istream_wchar_sentry_destroy(this);
9265 basic_ios_wchar_setstate(base, state);
9269 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAJ@Z */
9270 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAJ@Z */
9271 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_long, 8)
9272 basic_istream_wchar* __thiscall basic_istream_wchar_read_long(basic_istream_wchar *this, LONG *v)
9274 return basic_istream_read_long(this, v, num_get_wchar_use_facet(
9275 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9278 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAJ@Z */
9279 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAJ@Z */
9280 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_long, 8)
9281 basic_istream_wchar* __thiscall basic_istream_short_read_long(basic_istream_wchar *this, LONG *v)
9283 return basic_istream_read_long(this, v, num_get_short_use_facet(
9284 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9287 static basic_istream_wchar* basic_istream_read_ulong(basic_istream_wchar *this, ULONG *v, const num_get *numget)
9289 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9290 int state = IOSTATE_goodbit;
9292 TRACE("(%p %p)\n", this, v);
9294 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9295 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9296 istreambuf_iterator_wchar first={0}, last={0};
9298 first.strbuf = strbuf;
9299 num_get_wchar_get_ulong(numget, &last, first, last, &base->base, &state, v);
9301 basic_istream_wchar_sentry_destroy(this);
9303 basic_ios_wchar_setstate(base, state);
9307 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAK@Z */
9308 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAK@Z */
9309 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ulong, 8)
9310 basic_istream_wchar* __thiscall basic_istream_wchar_read_ulong(basic_istream_wchar *this, ULONG *v)
9312 return basic_istream_read_ulong(this, v, num_get_wchar_use_facet(
9313 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9316 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAK@Z */
9317 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAK@Z */
9318 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ulong, 8)
9319 basic_istream_wchar* __thiscall basic_istream_short_read_ulong(basic_istream_wchar *this, ULONG *v)
9321 return basic_istream_read_ulong(this, v, num_get_short_use_facet(
9322 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9325 static basic_istream_wchar* basic_istream_read_float(basic_istream_wchar *this, float *v, const num_get *numget)
9327 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9328 int state = IOSTATE_goodbit;
9330 TRACE("(%p %p)\n", this, v);
9332 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9333 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9334 istreambuf_iterator_wchar first={0}, last={0};
9336 first.strbuf = strbuf;
9337 num_get_wchar_get_float(numget, &last, first, last, &base->base, &state, v);
9339 basic_istream_wchar_sentry_destroy(this);
9341 basic_ios_wchar_setstate(base, state);
9345 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAM@Z */
9346 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAM@Z */
9347 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_float, 8)
9348 basic_istream_wchar* __thiscall basic_istream_wchar_read_float(basic_istream_wchar *this, float *v)
9350 return basic_istream_read_float(this, v, num_get_wchar_use_facet(
9351 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9354 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAM@Z */
9355 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAM@Z */
9356 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_float, 8)
9357 basic_istream_wchar* __thiscall basic_istream_short_read_float(basic_istream_wchar *this, float *v)
9359 return basic_istream_read_float(this, v, num_get_short_use_facet(
9360 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9363 static basic_istream_wchar* basic_istream_read_double(basic_istream_wchar *this, double *v, const num_get *numget)
9365 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9366 int state = IOSTATE_goodbit;
9368 TRACE("(%p %p)\n", this, v);
9370 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9371 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9372 istreambuf_iterator_wchar first={0}, last={0};
9374 first.strbuf = strbuf;
9375 num_get_wchar_get_double(numget, &last, first, last, &base->base, &state, v);
9377 basic_istream_wchar_sentry_destroy(this);
9379 basic_ios_wchar_setstate(base, state);
9383 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAN@Z */
9384 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAN@Z */
9385 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_double, 8)
9386 basic_istream_wchar* __thiscall basic_istream_wchar_read_double(basic_istream_wchar *this, double *v)
9388 return basic_istream_read_double(this, v, num_get_wchar_use_facet(
9389 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9392 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAN@Z */
9393 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAN@Z */
9394 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_double, 8)
9395 basic_istream_wchar* __thiscall basic_istream_short_read_double(basic_istream_wchar *this, double *v)
9397 return basic_istream_read_double(this, v, num_get_short_use_facet(
9398 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9401 static basic_istream_wchar* basic_istream_read_ldouble(basic_istream_wchar *this, double *v, const num_get *numget)
9403 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9404 int state = IOSTATE_goodbit;
9406 TRACE("(%p %p)\n", this, v);
9408 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9409 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9410 istreambuf_iterator_wchar first={0}, last={0};
9412 first.strbuf = strbuf;
9413 num_get_wchar_get_ldouble(numget, &last, first, last, &base->base, &state, v);
9415 basic_istream_wchar_sentry_destroy(this);
9417 basic_ios_wchar_setstate(base, state);
9421 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAO@Z */
9422 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAO@Z */
9423 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ldouble, 8)
9424 basic_istream_wchar* __thiscall basic_istream_wchar_read_ldouble(basic_istream_wchar *this, double *v)
9426 return basic_istream_read_ldouble(this, v, num_get_wchar_use_facet(
9427 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9430 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAO@Z */
9431 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAO@Z */
9432 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ldouble, 8)
9433 basic_istream_wchar* __thiscall basic_istream_short_read_ldouble(basic_istream_wchar *this, double *v)
9435 return basic_istream_read_ldouble(this, v, num_get_short_use_facet(
9436 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9439 static basic_istream_wchar* basic_istream_read_ptr(basic_istream_wchar *this, void **v, const num_get *numget)
9441 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9442 int state = IOSTATE_goodbit;
9444 TRACE("(%p %p)\n", this, v);
9446 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9447 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9448 istreambuf_iterator_wchar first={0}, last={0};
9450 first.strbuf = strbuf;
9451 num_get_wchar_get_void(numget, &last, first, last, &base->base, &state, v);
9453 basic_istream_wchar_sentry_destroy(this);
9455 basic_ios_wchar_setstate(base, state);
9459 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAPAX@Z */
9460 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
9461 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ptr, 8)
9462 basic_istream_wchar* __thiscall basic_istream_wchar_read_ptr(basic_istream_wchar *this, void **v)
9464 return basic_istream_read_ptr(this, v, num_get_wchar_use_facet(
9465 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9468 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAPAX@Z */
9469 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
9470 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ptr, 8)
9471 basic_istream_wchar* __thiscall basic_istream_short_read_ptr(basic_istream_wchar *this, void **v)
9473 return basic_istream_read_ptr(this, v, num_get_short_use_facet(
9474 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9477 static basic_istream_wchar* basic_istream_read_int64(basic_istream_wchar *this, __int64 *v, const num_get *numget)
9479 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9480 int state = IOSTATE_goodbit;
9482 TRACE("(%p %p)\n", this, v);
9484 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9485 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9486 istreambuf_iterator_wchar first={0}, last={0};
9488 first.strbuf = strbuf;
9489 num_get_wchar_get_int64(numget, &last, first, last, &base->base, &state, v);
9491 basic_istream_wchar_sentry_destroy(this);
9493 basic_ios_wchar_setstate(base, state);
9497 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AA_J@Z */
9498 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEA_J@Z */
9499 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_int64, 8)
9500 basic_istream_wchar* __thiscall basic_istream_wchar_read_int64(basic_istream_wchar *this, __int64 *v)
9502 return basic_istream_read_int64(this, v, num_get_wchar_use_facet(
9503 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9506 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_J@Z */
9507 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_J@Z */
9508 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int64, 8)
9509 basic_istream_wchar* __thiscall basic_istream_short_read_int64(basic_istream_wchar *this, __int64 *v)
9511 return basic_istream_read_int64(this, v, num_get_short_use_facet(
9512 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9515 static basic_istream_wchar* basic_istream_read_uint64(basic_istream_wchar *this, unsigned __int64 *v, const num_get *numget)
9517 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9518 int state = IOSTATE_goodbit;
9520 TRACE("(%p %p)\n", this, v);
9522 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9523 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9524 istreambuf_iterator_wchar first={0}, last={0};
9526 first.strbuf = strbuf;
9527 num_get_wchar_get_uint64(numget, &last, first, last, &base->base, &state, v);
9529 basic_istream_wchar_sentry_destroy(this);
9531 basic_ios_wchar_setstate(base, state);
9535 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AA_K@Z */
9536 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEA_K@Z */
9537 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_uint64, 8)
9538 basic_istream_wchar* __thiscall basic_istream_wchar_read_uint64(basic_istream_wchar *this, unsigned __int64 *v)
9540 return basic_istream_read_uint64(this, v, num_get_wchar_use_facet(
9541 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9544 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_K@Z */
9545 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_K@Z */
9546 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint64, 8)
9547 basic_istream_wchar* __thiscall basic_istream_short_read_uint64(basic_istream_wchar *this, unsigned __int64 *v)
9549 return basic_istream_read_uint64(this, v, num_get_short_use_facet(
9550 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9553 static basic_istream_wchar* basic_istream_read_bool(basic_istream_wchar *this, MSVCP_bool *v, const num_get *numget)
9555 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9556 int state = IOSTATE_goodbit;
9558 TRACE("(%p %p)\n", this, v);
9560 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9561 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9562 istreambuf_iterator_wchar first={0}, last={0};
9564 first.strbuf = strbuf;
9565 num_get_wchar_get_bool(numget, &last, first, last, &base->base, &state, v);
9567 basic_istream_wchar_sentry_destroy(this);
9569 basic_ios_wchar_setstate(base, state);
9573 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AA_N@Z */
9574 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEA_N@Z */
9575 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_bool, 8)
9576 basic_istream_wchar* __thiscall basic_istream_wchar_read_bool(basic_istream_wchar *this, MSVCP_bool *v)
9578 return basic_istream_read_bool(this, v, num_get_wchar_use_facet(
9579 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9582 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_N@Z */
9583 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_N@Z */
9584 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_bool, 8)
9585 basic_istream_wchar* __thiscall basic_istream_short_read_bool(basic_istream_wchar *this, MSVCP_bool *v)
9587 return basic_istream_read_bool(this, v, num_get_short_use_facet(
9588 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9591 /* ??$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 */
9592 /* ??$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 */
9593 /* ??$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 */
9594 /* ??$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 */
9595 basic_istream_wchar* __cdecl basic_istream_wchar_getline_bstr_delim(
9596 basic_istream_wchar *istream, basic_string_wchar *str, wchar_t delim)
9598 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream);
9599 IOSB_iostate state = IOSTATE_goodbit;
9602 TRACE("(%p %p %c)\n", istream, str, delim);
9604 if(basic_istream_wchar_sentry_create(istream, TRUE)) {
9605 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9606 MSVCP_basic_string_wchar_clear(str);
9608 c = basic_streambuf_wchar_sgetc(strbuf);
9609 for(; c!=delim && c!=WEOF; c = basic_streambuf_wchar_snextc(strbuf))
9610 MSVCP_basic_string_wchar_append_ch(str, c);
9611 if(c==delim) basic_streambuf_wchar_sbumpc(strbuf);
9612 else if(c==WEOF) state |= IOSTATE_eofbit;
9614 if(!MSVCP_basic_string_wchar_length(str) && c!=delim) state |= IOSTATE_failbit;
9616 basic_istream_wchar_sentry_destroy(istream);
9618 basic_ios_wchar_setstate(basic_istream_wchar_get_basic_ios(istream), state);
9622 /* ??$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 */
9623 /* ??$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 */
9624 /* ??$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 */
9625 /* ??$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 */
9626 basic_istream_wchar* __cdecl basic_istream_wchar_getline_bstr(
9627 basic_istream_wchar *istream, basic_string_wchar *str)
9629 return basic_istream_wchar_getline_bstr_delim(istream, str, '\n');
9632 static basic_istream_wchar* basic_istream_read_bstr(basic_istream_wchar *istream,
9633 basic_string_wchar *str, const ctype_wchar *ctype)
9635 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream);
9636 IOSB_iostate state = IOSTATE_failbit;
9639 TRACE("(%p %p)\n", istream, str);
9641 if(basic_istream_wchar_sentry_create(istream, FALSE)) {
9642 MSVCP_size_t count = ios_base_width_get(&base->base);
9647 MSVCP_basic_string_wchar_clear(str);
9649 for(c = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base));
9650 c!=WEOF && !ctype_wchar_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
9651 c = basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base)), count--) {
9652 state = IOSTATE_goodbit;
9653 MSVCP_basic_string_wchar_append_ch(str, c);
9656 basic_istream_wchar_sentry_destroy(istream);
9658 ios_base_width_set(&base->base, 0);
9659 basic_ios_wchar_setstate(base, state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9663 /* ??$?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 */
9664 /* ??$?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 */
9665 basic_istream_wchar* __cdecl basic_istream_wchar_read_bstr(
9666 basic_istream_wchar *istream, basic_string_wchar *str)
9668 return basic_istream_read_bstr(istream, str, ctype_wchar_use_facet(
9669 basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
9672 /* ??$?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 */
9673 /* ??$?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 */
9674 basic_istream_wchar* __cdecl basic_istream_short_read_bstr(
9675 basic_istream_wchar *istream, basic_string_wchar *str)
9677 return basic_istream_read_bstr(istream, str, ctype_short_use_facet(
9678 basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
9681 static basic_istream_wchar* basic_istream_read_str(basic_istream_wchar *istream, wchar_t *str, const ctype_wchar *ctype)
9683 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream);
9684 IOSB_iostate state = IOSTATE_failbit;
9685 unsigned short c = '\n';
9687 TRACE("(%p %p)\n", istream, str);
9689 if(basic_istream_wchar_sentry_create(istream, FALSE)) {
9690 MSVCP_size_t count = ios_base_width_get(&base->base)-1;
9692 for(c = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base));
9693 c!=WEOF && !ctype_wchar_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
9694 c = basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base)), count--) {
9695 state = IOSTATE_goodbit;
9699 basic_istream_wchar_sentry_destroy(istream);
9702 ios_base_width_set(&base->base, 0);
9703 basic_ios_wchar_setstate(base, state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9707 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@PA_W@Z */
9708 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AEAV10@PEA_W@Z */
9709 basic_istream_wchar* __cdecl basic_istream_wchar_read_str(basic_istream_wchar *istream, wchar_t *str)
9711 return basic_istream_read_str(istream, str, ctype_wchar_use_facet(
9712 basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
9715 /* ??$?5GU?$char_traits@G@std@@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@PAG@Z */
9716 /* ??$?5GU?$char_traits@G@std@@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@PEAG@Z */
9717 basic_istream_wchar* __cdecl basic_istream_short_read_str(basic_istream_wchar *istream, wchar_t *str)
9719 return basic_istream_read_str(istream, str, ctype_short_use_facet(
9720 basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
9723 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@AA_W@Z */
9724 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AEAV10@AEA_W@Z */
9725 /* ??$?5GU?$char_traits@G@std@@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@AAG@Z */
9726 /* ??$?5GU?$char_traits@G@std@@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@AEAG@Z */
9727 basic_istream_wchar* __cdecl basic_istream_wchar_read_ch(basic_istream_wchar *istream, wchar_t *ch)
9729 IOSB_iostate state = IOSTATE_failbit;
9730 unsigned short c = 0;
9732 TRACE("(%p %p)\n", istream, ch);
9734 if(basic_istream_wchar_sentry_create(istream, FALSE)) {
9735 c = basic_streambuf_wchar_sbumpc(basic_ios_wchar_rdbuf_get(
9736 basic_istream_wchar_get_basic_ios(istream)));
9738 state = IOSTATE_goodbit;
9742 basic_istream_wchar_sentry_destroy(istream);
9744 basic_ios_wchar_setstate(basic_istream_wchar_get_basic_ios(istream),
9745 state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9749 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9750 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9751 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9752 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9753 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_streambuf, 8)
9754 basic_istream_wchar* __thiscall basic_istream_wchar_read_streambuf(
9755 basic_istream_wchar *this, basic_streambuf_wchar *streambuf)
9757 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9758 IOSB_iostate state = IOSTATE_failbit;
9759 unsigned short c = '\n';
9761 TRACE("(%p %p)\n", this, streambuf);
9763 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9764 for(c = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base)); c!=WEOF;
9765 c = basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base))) {
9766 state = IOSTATE_goodbit;
9767 if(basic_streambuf_wchar_sputc(streambuf, c) == WEOF)
9771 basic_istream_wchar_sentry_destroy(this);
9773 basic_ios_wchar_setstate(base, state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9777 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
9778 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
9779 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
9780 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
9781 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func, 8)
9782 basic_istream_wchar* __thiscall basic_istream_wchar_read_func(basic_istream_wchar *this,
9783 basic_istream_wchar* (__cdecl *pfunc)(basic_istream_wchar*))
9785 TRACE("(%p %p)\n", this, pfunc);
9790 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AAV21@@Z@Z */
9791 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AEAV21@@Z@Z */
9792 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@GU?$char_traits@G@std@@@1@AAV21@@Z@Z */
9793 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@GU?$char_traits@G@std@@@1@AEAV21@@Z@Z */
9794 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func_basic_ios, 8)
9795 basic_istream_wchar* __thiscall basic_istream_wchar_read_func_basic_ios(basic_istream_wchar *this,
9796 basic_ios_wchar* (__cdecl *pfunc)(basic_ios_wchar*))
9798 TRACE("(%p %p)\n", this, pfunc);
9799 pfunc(basic_istream_wchar_get_basic_ios(this));
9803 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
9804 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
9805 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
9806 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
9807 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func_ios_base, 8)
9808 basic_istream_wchar* __thiscall basic_istream_wchar_read_func_ios_base(
9809 basic_istream_wchar *this, ios_base* (__cdecl *pfunc)(ios_base*))
9811 TRACE("(%p %p)\n", this, pfunc);
9812 pfunc(&basic_istream_wchar_get_basic_ios(this)->base);
9816 static inline basic_ios_char* basic_iostream_char_to_basic_ios(basic_iostream_char *ptr)
9818 return (basic_ios_char*)((char*)ptr+basic_iostream_char_vbtable1[1]);
9821 static inline basic_iostream_char* basic_iostream_char_from_basic_ios(basic_ios_char *ptr)
9823 return (basic_iostream_char*)((char*)ptr-basic_iostream_char_vbtable1[1]);
9826 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
9827 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
9828 DEFINE_THISCALL_WRAPPER(basic_iostream_char_ctor, 12)
9829 basic_iostream_char* __thiscall basic_iostream_char_ctor(basic_iostream_char *this, basic_streambuf_char *strbuf, MSVCP_bool virt_init)
9831 basic_ios_char *basic_ios;
9833 TRACE("(%p %p %d)\n", this, strbuf, virt_init);
9836 this->base1.vbtable = basic_iostream_char_vbtable1;
9837 this->base2.vbtable = basic_iostream_char_vbtable2;
9838 basic_ios = basic_istream_char_get_basic_ios(&this->base1);
9839 basic_ios_char_ctor(basic_ios);
9841 basic_ios = basic_istream_char_get_basic_ios(&this->base1);
9844 basic_ios->base.vtable = &MSVCP_basic_iostream_char_vtable;
9846 basic_istream_char_ctor(&this->base1, strbuf, FALSE, FALSE);
9847 basic_ostream_char_ctor_uninitialized(&this->base2, 0, FALSE, FALSE);
9851 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
9852 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
9853 DEFINE_THISCALL_WRAPPER(basic_iostream_char_dtor, 4)
9854 void __thiscall basic_iostream_char_dtor(basic_ios_char *base)
9856 basic_iostream_char *this = basic_iostream_char_from_basic_ios(base);
9858 TRACE("(%p)\n", this);
9859 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base2));
9860 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base1));
9863 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9864 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9865 DEFINE_THISCALL_WRAPPER(basic_iostream_char_vbase_dtor, 4)
9866 void __thiscall basic_iostream_char_vbase_dtor(basic_iostream_char *this)
9868 TRACE("(%p)\n", this);
9869 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(this));
9870 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base1));
9873 DEFINE_THISCALL_WRAPPER(basic_iostream_char_vector_dtor, 8)
9874 basic_iostream_char* __thiscall basic_iostream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
9876 basic_iostream_char *this = basic_iostream_char_from_basic_ios(base);
9878 TRACE("(%p %x)\n", this, flags);
9881 /* we have an array, with the number of elements stored before the first object */
9882 INT_PTR i, *ptr = (INT_PTR *)this-1;
9884 for(i=*ptr-1; i>=0; i--)
9885 basic_iostream_char_vbase_dtor(this+i);
9886 MSVCRT_operator_delete(ptr);
9888 basic_iostream_char_vbase_dtor(this);
9890 MSVCRT_operator_delete(this);
9896 static inline basic_ios_wchar* basic_iostream_wchar_to_basic_ios(basic_iostream_wchar *ptr)
9898 return (basic_ios_wchar*)((char*)ptr+basic_iostream_wchar_vbtable1[1]);
9901 static inline basic_iostream_wchar* basic_iostream_wchar_from_basic_ios(basic_ios_wchar *ptr)
9903 return (basic_iostream_wchar*)((char*)ptr-basic_iostream_wchar_vbtable1[1]);
9906 /* ??0?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9907 /* ??0?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9908 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_ctor, 12)
9909 basic_iostream_wchar* __thiscall basic_iostream_wchar_ctor(basic_iostream_wchar *this,
9910 basic_streambuf_wchar *strbuf, MSVCP_bool virt_init)
9912 basic_ios_wchar *basic_ios;
9914 TRACE("(%p %p %d)\n", this, strbuf, virt_init);
9917 this->base1.vbtable = basic_iostream_wchar_vbtable1;
9918 this->base2.vbtable = basic_iostream_wchar_vbtable2;
9919 basic_ios = basic_istream_wchar_get_basic_ios(&this->base1);
9920 basic_ios_wchar_ctor(basic_ios);
9922 basic_ios = basic_istream_wchar_get_basic_ios(&this->base1);
9925 basic_istream_wchar_ctor(&this->base1, strbuf, FALSE, FALSE);
9926 basic_ostream_wchar_ctor_uninitialized(&this->base2, 0, FALSE, FALSE);
9928 basic_ios->base.vtable = &MSVCP_basic_iostream_wchar_vtable;
9932 /* ??0?$basic_iostream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9933 /* ??0?$basic_iostream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9934 DEFINE_THISCALL_WRAPPER(basic_iostream_short_ctor, 12)
9935 basic_iostream_wchar* __thiscall basic_iostream_short_ctor(basic_iostream_wchar *this,
9936 basic_streambuf_wchar *strbuf, MSVCP_bool virt_init)
9938 basic_iostream_wchar_ctor(this, strbuf, virt_init);
9939 basic_istream_wchar_get_basic_ios(&this->base1)->base.vtable = &MSVCP_basic_iostream_short_vtable;
9943 /* ??1?$basic_iostream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
9944 /* ??1?$basic_iostream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
9945 /* ??1?$basic_iostream@GU?$char_traits@G@std@@@std@@UAE@XZ */
9946 /* ??1?$basic_iostream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
9947 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_dtor, 4)
9948 void __thiscall basic_iostream_wchar_dtor(basic_ios_wchar *base)
9950 basic_iostream_wchar *this = basic_iostream_wchar_from_basic_ios(base);
9952 TRACE("(%p)\n", this);
9953 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base2));
9954 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base1));
9957 /* ??_D?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
9958 /* ??_D?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
9959 /* ??_D?$basic_iostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9960 /* ??_D?$basic_iostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9961 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_vbase_dtor, 4)
9962 void __thiscall basic_iostream_wchar_vbase_dtor(basic_iostream_wchar *this)
9964 TRACE("(%p)\n", this);
9965 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(this));
9966 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base1));
9969 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_vector_dtor, 8)
9970 basic_iostream_wchar* __thiscall basic_iostream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
9972 basic_iostream_wchar *this = basic_iostream_wchar_from_basic_ios(base);
9974 TRACE("(%p %x)\n", this, flags);
9977 /* we have an array, with the number of elements stored before the first object */
9978 INT_PTR i, *ptr = (INT_PTR *)this-1;
9980 for(i=*ptr-1; i>=0; i--)
9981 basic_iostream_wchar_vbase_dtor(this+i);
9982 MSVCRT_operator_delete(ptr);
9984 basic_iostream_wchar_vbase_dtor(this);
9986 MSVCRT_operator_delete(this);
9992 static inline basic_ios_char* basic_ofstream_char_to_basic_ios(basic_ofstream_char *ptr)
9994 return (basic_ios_char*)((char*)ptr+basic_ofstream_char_vbtable[1]);
9997 static inline basic_ofstream_char* basic_ofstream_char_from_basic_ios(basic_ios_char *ptr)
9999 return (basic_ofstream_char*)((char*)ptr-basic_ofstream_char_vbtable[1]);
10002 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
10003 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
10004 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor, 8)
10005 basic_ofstream_char* __thiscall basic_ofstream_char_ctor(basic_ofstream_char *this, MSVCP_bool virt_init)
10007 basic_ios_char *basic_ios;
10009 TRACE("(%p %d)\n", this, virt_init);
10012 this->base.vbtable = basic_ofstream_char_vbtable;
10013 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10014 basic_ios_char_ctor(basic_ios);
10016 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10019 basic_filebuf_char_ctor(&this->filebuf);
10020 basic_ostream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
10021 basic_ios->base.vtable = &MSVCP_basic_ofstream_char_vtable;
10025 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
10026 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10027 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_file, 12)
10028 basic_ofstream_char* __thiscall basic_ofstream_char_ctor_file(
10029 basic_ofstream_char *this, FILE *file, MSVCP_bool virt_init)
10031 basic_ios_char *basic_ios;
10033 TRACE("(%p %p %d)\n", this, file, virt_init);
10036 this->base.vbtable = basic_ofstream_char_vbtable;
10037 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10038 basic_ios_char_ctor(basic_ios);
10040 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10043 basic_filebuf_char_ctor_file(&this->filebuf, file);
10044 basic_ostream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
10045 basic_ios->base.vtable = &MSVCP_basic_ofstream_char_vtable;
10049 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PBDHH@Z */
10050 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDHH@Z */
10051 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_name, 20)
10052 basic_ofstream_char* __thiscall basic_ofstream_char_ctor_name(basic_ofstream_char *this,
10053 const char *name, int mode, int prot, MSVCP_bool virt_init)
10055 TRACE("(%p %s %d %d %d)\n", this, name, mode, prot, virt_init);
10057 basic_ofstream_char_ctor(this, virt_init);
10059 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_out, prot)) {
10060 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10061 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10066 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
10067 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
10068 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_dtor, 4)
10069 void __thiscall basic_ofstream_char_dtor(basic_ios_char *base)
10071 basic_ofstream_char *this = basic_ofstream_char_from_basic_ios(base);
10073 TRACE("(%p)\n", this);
10075 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base));
10076 basic_filebuf_char_dtor(&this->filebuf);
10079 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
10080 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
10081 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_vbase_dtor, 4)
10082 void __thiscall basic_ofstream_char_vbase_dtor(basic_ofstream_char *this)
10084 TRACE("(%p)\n", this);
10086 basic_ofstream_char_dtor(basic_ofstream_char_to_basic_ios(this));
10087 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base));
10090 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_vector_dtor, 8)
10091 basic_ofstream_char* __thiscall basic_ofstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
10093 basic_ofstream_char *this = basic_ofstream_char_from_basic_ios(base);
10095 TRACE("(%p %x)\n", this, flags);
10098 /* we have an array, with the number of elements stored before the first object */
10099 INT_PTR i, *ptr = (INT_PTR *)this-1;
10101 for(i=*ptr-1; i>=0; i--)
10102 basic_ofstream_char_vbase_dtor(this+i);
10103 MSVCRT_operator_delete(ptr);
10105 basic_ofstream_char_vbase_dtor(this);
10107 MSVCRT_operator_delete(this);
10113 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
10114 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
10115 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_close, 4)
10116 void __thiscall basic_ofstream_char_close(basic_ofstream_char *this)
10118 TRACE("(%p)\n", this);
10120 if(!basic_filebuf_char_close(&this->filebuf)) {
10121 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10122 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10126 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
10127 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
10128 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_is_open, 4)
10129 MSVCP_bool __thiscall basic_ofstream_char_is_open(const basic_ofstream_char *this)
10131 TRACE("(%p)\n", this);
10132 return basic_filebuf_char_is_open(&this->filebuf);
10135 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDHH@Z */
10136 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDHH@Z */
10137 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open, 16)
10138 void __thiscall basic_ofstream_char_open(basic_ofstream_char *this,
10139 const char *name, int mode, int prot)
10141 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
10143 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_out, prot)) {
10144 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10145 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10149 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDI@Z */
10150 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDI@Z */
10151 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_old, 12)
10152 void __thiscall basic_ofstream_char_open_old(basic_ofstream_char *this,
10153 const char *name, unsigned int mode)
10155 basic_ofstream_char_open(this, name, mode, _SH_DENYNO);
10158 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
10159 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
10160 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_rdbuf, 4)
10161 basic_filebuf_char* __thiscall basic_ofstream_char_rdbuf(const basic_ofstream_char *this)
10163 TRACE("(%p)\n", this);
10164 return (basic_filebuf_char*)&this->filebuf;
10167 static inline basic_ios_wchar* basic_ofstream_wchar_to_basic_ios(basic_ofstream_wchar *ptr)
10169 return (basic_ios_wchar*)((char*)ptr+basic_ofstream_wchar_vbtable[1]);
10172 static inline basic_ofstream_wchar* basic_ofstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
10174 return (basic_ofstream_wchar*)((char*)ptr-basic_ofstream_wchar_vbtable[1]);
10177 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAE@XZ */
10178 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAA@XZ */
10179 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_ctor, 8)
10180 basic_ofstream_wchar* __thiscall basic_ofstream_wchar_ctor(basic_ofstream_wchar *this, MSVCP_bool virt_init)
10182 basic_ios_wchar *basic_ios;
10184 TRACE("(%p %d)\n", this, virt_init);
10187 this->base.vbtable = basic_ofstream_wchar_vbtable;
10188 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10189 basic_ios_wchar_ctor(basic_ios);
10191 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10194 basic_filebuf_wchar_ctor(&this->filebuf);
10195 basic_ostream_wchar_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
10196 basic_ios->base.vtable = &MSVCP_basic_ofstream_wchar_vtable;
10200 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
10201 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
10202 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_ctor, 8)
10203 basic_ofstream_wchar* __thiscall basic_ofstream_short_ctor(basic_ofstream_wchar *this, MSVCP_bool virt_init)
10205 basic_ofstream_wchar_ctor(this, virt_init);
10206 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ofstream_short_vtable;
10210 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
10211 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10212 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_ctor_file, 12)
10213 basic_ofstream_wchar* __thiscall basic_ofstream_wchar_ctor_file(
10214 basic_ofstream_wchar *this, FILE *file, MSVCP_bool virt_init)
10216 basic_ios_wchar *basic_ios;
10218 TRACE("(%p %p %d)\n", this, file, virt_init);
10221 this->base.vbtable = basic_ofstream_wchar_vbtable;
10222 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10223 basic_ios_wchar_ctor(basic_ios);
10225 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10228 basic_filebuf_wchar_ctor_file(&this->filebuf, file);
10229 basic_ostream_wchar_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
10230 basic_ios->base.vtable = &MSVCP_basic_ofstream_wchar_vtable;
10234 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
10235 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10236 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_ctor_file, 12)
10237 basic_ofstream_wchar* __thiscall basic_ofstream_short_ctor_file(
10238 basic_ofstream_wchar *this, FILE *file, MSVCP_bool virt_init)
10240 basic_ofstream_wchar_ctor_file(this, file, virt_init);
10241 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ofstream_short_vtable;
10245 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAE@PBDHH@Z */
10246 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEBDHH@Z */
10247 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_ctor_name, 20)
10248 basic_ofstream_wchar* __thiscall basic_ofstream_wchar_ctor_name(basic_ofstream_wchar *this,
10249 const char *name, int mode, int prot, MSVCP_bool virt_init)
10251 TRACE("(%p %s %d %d %d)\n", this, name, mode, prot, virt_init);
10253 basic_ofstream_wchar_ctor(this, virt_init);
10255 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_out, prot)) {
10256 basic_ios_wchar *basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10257 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10262 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@PBDHH@Z */
10263 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@PEBDHH@Z */
10264 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_ctor_name, 20)
10265 basic_ofstream_wchar* __thiscall basic_ofstream_short_ctor_name(basic_ofstream_wchar *this,
10266 const char *name, int mode, int prot, MSVCP_bool virt_init)
10268 basic_ofstream_wchar_ctor_name(this, name, mode, prot, virt_init);
10269 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ofstream_short_vtable;
10273 /* ??1?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
10274 /* ??1?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
10275 /* ??1?$basic_ofstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
10276 /* ??1?$basic_ofstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
10277 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_dtor, 4)
10278 void __thiscall basic_ofstream_wchar_dtor(basic_ios_wchar *base)
10280 basic_ofstream_wchar *this = basic_ofstream_wchar_from_basic_ios(base);
10282 TRACE("(%p)\n", this);
10284 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base));
10285 basic_filebuf_wchar_dtor(&this->filebuf);
10288 /* ??_D?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
10289 /* ??_D?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
10290 /* ??_D?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
10291 /* ??_D?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
10292 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_vbase_dtor, 4)
10293 void __thiscall basic_ofstream_wchar_vbase_dtor(basic_ofstream_wchar *this)
10295 TRACE("(%p)\n", this);
10297 basic_ofstream_wchar_dtor(basic_ofstream_wchar_to_basic_ios(this));
10298 basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(&this->base));
10301 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_vector_dtor, 8)
10302 basic_ofstream_wchar* __thiscall basic_ofstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
10304 basic_ofstream_wchar *this = basic_ofstream_wchar_from_basic_ios(base);
10306 TRACE("(%p %x)\n", this, flags);
10309 /* we have an array, with the number of elements stored before the first object */
10310 INT_PTR i, *ptr = (INT_PTR *)this-1;
10312 for(i=*ptr-1; i>=0; i--)
10313 basic_ofstream_wchar_vbase_dtor(this+i);
10314 MSVCRT_operator_delete(ptr);
10316 basic_ofstream_wchar_vbase_dtor(this);
10318 MSVCRT_operator_delete(this);
10324 /* ?close@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
10325 /* ?close@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
10326 /* ?close@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
10327 /* ?close@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
10328 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_close, 4)
10329 void __thiscall basic_ofstream_wchar_close(basic_ofstream_wchar *this)
10331 TRACE("(%p)\n", this);
10333 if(!basic_filebuf_wchar_close(&this->filebuf)) {
10334 basic_ios_wchar *basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10335 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10339 /* ?is_open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
10340 /* ?is_open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
10341 /* ?is_open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
10342 /* ?is_open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
10343 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_is_open, 4)
10344 MSVCP_bool __thiscall basic_ofstream_wchar_is_open(const basic_ofstream_wchar *this)
10346 TRACE("(%p)\n", this);
10347 return basic_filebuf_wchar_is_open(&this->filebuf);
10350 /* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXPBDHH@Z */
10351 /* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBDHH@Z */
10352 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPBDHH@Z */
10353 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDHH@Z */
10354 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_open, 16)
10355 void __thiscall basic_ofstream_wchar_open(basic_ofstream_wchar *this,
10356 const char *name, int mode, int prot)
10358 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
10360 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_out, prot)) {
10361 basic_ios_wchar *basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10362 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10366 /* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXPBDI@Z */
10367 /* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBDI@Z */
10368 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPBDI@Z */
10369 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDI@Z */
10370 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_open_old, 12)
10371 void __thiscall basic_ofstream_wchar_open_old(basic_ofstream_wchar *this,
10372 const char *name, unsigned int mode)
10374 basic_ofstream_wchar_open(this, name, mode, _SH_DENYNO);
10377 /* ?rdbuf@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
10378 /* ?rdbuf@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
10379 /* ?rdbuf@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
10380 /* ?rdbuf@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
10381 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_rdbuf, 4)
10382 basic_filebuf_wchar* __thiscall basic_ofstream_wchar_rdbuf(const basic_ofstream_wchar *this)
10384 TRACE("(%p)\n", this);
10385 return (basic_filebuf_wchar*)&this->filebuf;
10388 static inline basic_ios_char* basic_ifstream_char_to_basic_ios(basic_ifstream_char *ptr)
10390 return (basic_ios_char*)((char*)ptr+basic_ifstream_char_vbtable[1]);
10393 static inline basic_ifstream_char* basic_ifstream_char_from_basic_ios(basic_ios_char *ptr)
10395 return (basic_ifstream_char*)((char*)ptr-basic_ifstream_char_vbtable[1]);
10398 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
10399 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
10400 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor, 8)
10401 basic_ifstream_char* __thiscall basic_ifstream_char_ctor(basic_ifstream_char *this, MSVCP_bool virt_init)
10403 basic_ios_char *basic_ios;
10405 TRACE("(%p %d)\n", this, virt_init);
10408 this->base.vbtable = basic_ifstream_char_vbtable;
10409 basic_ios = basic_istream_char_get_basic_ios(&this->base);
10410 basic_ios_char_ctor(basic_ios);
10412 basic_ios = basic_istream_char_get_basic_ios(&this->base);
10415 basic_filebuf_char_ctor(&this->filebuf);
10416 basic_istream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
10417 basic_ios->base.vtable = &MSVCP_basic_ifstream_char_vtable;
10421 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
10422 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10423 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_file, 12)
10424 basic_ifstream_char* __thiscall basic_ifstream_char_ctor_file(
10425 basic_ifstream_char *this, FILE *file, MSVCP_bool virt_init)
10427 basic_ios_char *basic_ios;
10429 TRACE("(%p %p %d)\n", this, file, virt_init);
10432 this->base.vbtable = basic_ifstream_char_vbtable;
10433 basic_ios = basic_istream_char_get_basic_ios(&this->base);
10434 basic_ios_char_ctor(basic_ios);
10436 basic_ios = basic_istream_char_get_basic_ios(&this->base);
10439 basic_filebuf_char_ctor_file(&this->filebuf, file);
10440 basic_istream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
10441 basic_ios->base.vtable = &MSVCP_basic_ifstream_char_vtable;
10445 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PBDHH@Z */
10446 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDHH@Z */
10447 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_name, 20)
10448 basic_ifstream_char* __thiscall basic_ifstream_char_ctor_name(basic_ifstream_char *this,
10449 const char *name, int mode, int prot, MSVCP_bool virt_init)
10451 TRACE("(%p %s %d %d %d)\n", this, name, mode, prot, virt_init);
10453 basic_ifstream_char_ctor(this, virt_init);
10455 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_in, prot)) {
10456 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
10457 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10462 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
10463 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
10464 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_dtor, 4)
10465 void __thiscall basic_ifstream_char_dtor(basic_ios_char *base)
10467 basic_ifstream_char *this = basic_ifstream_char_from_basic_ios(base);
10469 TRACE("(%p)\n", this);
10471 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base));
10472 basic_filebuf_char_dtor(&this->filebuf);
10475 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
10476 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
10477 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_vbase_dtor, 4)
10478 void __thiscall basic_ifstream_char_vbase_dtor(basic_ifstream_char *this)
10480 TRACE("(%p)\n", this);
10482 basic_ifstream_char_dtor(basic_ifstream_char_to_basic_ios(this));
10483 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base));
10486 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_vector_dtor, 8)
10487 basic_ifstream_char* __thiscall basic_ifstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
10489 basic_ifstream_char *this = basic_ifstream_char_from_basic_ios(base);
10491 TRACE("(%p %x)\n", this, flags);
10494 /* we have an array, with the number of elements stored before the first object */
10495 INT_PTR i, *ptr = (INT_PTR *)this-1;
10497 for(i=*ptr-1; i>=0; i--)
10498 basic_ifstream_char_vbase_dtor(this+i);
10499 MSVCRT_operator_delete(ptr);
10501 basic_ifstream_char_vbase_dtor(this);
10503 MSVCRT_operator_delete(this);
10509 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
10510 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
10511 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_close, 4)
10512 void __thiscall basic_ifstream_char_close(basic_ifstream_char *this)
10514 TRACE("(%p)\n", this);
10516 if(!basic_filebuf_char_close(&this->filebuf)) {
10517 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
10518 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10522 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
10523 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
10524 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_is_open, 4)
10525 MSVCP_bool __thiscall basic_ifstream_char_is_open(const basic_ifstream_char *this)
10527 TRACE("(%p)\n", this);
10528 return basic_filebuf_char_is_open(&this->filebuf);
10531 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDHH@Z */
10532 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDHH@Z */
10533 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open, 16)
10534 void __thiscall basic_ifstream_char_open(basic_ifstream_char *this,
10535 const char *name, int mode, int prot)
10537 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
10539 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_in, prot)) {
10540 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
10541 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10545 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDI@Z */
10546 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDI@Z */
10547 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_old, 12)
10548 void __thiscall basic_ifstream_char_open_old(basic_ifstream_char *this,
10549 const char *name, unsigned int mode)
10551 basic_ifstream_char_open(this, name, mode, _SH_DENYNO);
10554 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
10555 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
10556 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_rdbuf, 4)
10557 basic_filebuf_char* __thiscall basic_ifstream_char_rdbuf(const basic_ifstream_char *this)
10559 TRACE("(%p)\n", this);
10560 return (basic_filebuf_char*)&this->filebuf;
10563 static inline basic_ios_wchar* basic_ifstream_wchar_to_basic_ios(basic_ifstream_wchar *ptr)
10565 return (basic_ios_wchar*)((char*)ptr+basic_ifstream_wchar_vbtable[1]);
10568 static inline basic_ifstream_wchar* basic_ifstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
10570 return (basic_ifstream_wchar*)((char*)ptr-basic_ifstream_wchar_vbtable[1]);
10573 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAE@XZ */
10574 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAA@XZ */
10575 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_ctor, 8)
10576 basic_ifstream_wchar* __thiscall basic_ifstream_wchar_ctor(basic_ifstream_wchar *this, MSVCP_bool virt_init)
10578 basic_ios_wchar *basic_ios;
10580 TRACE("(%p %d)\n", this, virt_init);
10583 this->base.vbtable = basic_ifstream_wchar_vbtable;
10584 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10585 basic_ios_wchar_ctor(basic_ios);
10587 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10590 basic_filebuf_wchar_ctor(&this->filebuf);
10591 basic_istream_wchar_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
10592 basic_ios->base.vtable = &MSVCP_basic_ifstream_wchar_vtable;
10596 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
10597 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
10598 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_ctor, 8)
10599 basic_ifstream_wchar* __thiscall basic_ifstream_short_ctor(basic_ifstream_wchar *this, MSVCP_bool virt_init)
10601 basic_ifstream_wchar_ctor(this, virt_init);
10602 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ifstream_short_vtable;
10606 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
10607 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10608 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_ctor_file, 12)
10609 basic_ifstream_wchar* __thiscall basic_ifstream_wchar_ctor_file(
10610 basic_ifstream_wchar *this, FILE *file, MSVCP_bool virt_init)
10612 basic_ios_wchar *basic_ios;
10614 TRACE("(%p %p %d)\n", this, file, virt_init);
10617 this->base.vbtable = basic_ifstream_wchar_vbtable;
10618 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10619 basic_ios_wchar_ctor(basic_ios);
10621 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10624 basic_filebuf_wchar_ctor_file(&this->filebuf, file);
10625 basic_istream_wchar_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
10626 basic_ios->base.vtable = &MSVCP_basic_ifstream_wchar_vtable;
10630 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
10631 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10632 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_ctor_file, 12)
10633 basic_ifstream_wchar* __thiscall basic_ifstream_short_ctor_file(
10634 basic_ifstream_wchar *this, FILE *file, MSVCP_bool virt_init)
10636 basic_ifstream_wchar_ctor_file(this, file, virt_init);
10637 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ifstream_short_vtable;
10641 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAE@PBDHH@Z */
10642 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEBDHH@Z */
10643 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_ctor_name, 20)
10644 basic_ifstream_wchar* __thiscall basic_ifstream_wchar_ctor_name(basic_ifstream_wchar *this,
10645 const char *name, int mode, int prot, MSVCP_bool virt_init)
10647 TRACE("(%p %s %d %d %d)\n", this, name, mode, prot, virt_init);
10649 basic_ifstream_wchar_ctor(this, virt_init);
10651 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_in, prot)) {
10652 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10653 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10658 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@PBDHH@Z */
10659 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@PEBDHH@Z */
10660 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_ctor_name, 20)
10661 basic_ifstream_wchar* __thiscall basic_ifstream_short_ctor_name(basic_ifstream_wchar *this,
10662 const char *name, int mode, int prot, MSVCP_bool virt_init)
10664 basic_ifstream_wchar_ctor_name(this, name, mode, prot, virt_init);
10665 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ifstream_short_vtable;
10669 /* ??1?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
10670 /* ??1?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
10671 /* ??1?$basic_ifstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
10672 /* ??1?$basic_ifstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
10673 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_dtor, 4)
10674 void __thiscall basic_ifstream_wchar_dtor(basic_ios_wchar *base)
10676 basic_ifstream_wchar *this = basic_ifstream_wchar_from_basic_ios(base);
10678 TRACE("(%p)\n", this);
10680 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base));
10681 basic_filebuf_wchar_dtor(&this->filebuf);
10684 /* ??_D?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
10685 /* ??_D?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
10686 /* ??_D?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
10687 /* ??_D?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
10688 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_vbase_dtor, 4)
10689 void __thiscall basic_ifstream_wchar_vbase_dtor(basic_ifstream_wchar *this)
10691 TRACE("(%p)\n", this);
10693 basic_ifstream_wchar_dtor(basic_ifstream_wchar_to_basic_ios(this));
10694 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base));
10697 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_vector_dtor, 8)
10698 basic_ifstream_wchar* __thiscall basic_ifstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
10700 basic_ifstream_wchar *this = basic_ifstream_wchar_from_basic_ios(base);
10702 TRACE("(%p %x)\n", this, flags);
10705 /* we have an array, with the number of elements stored before the first object */
10706 INT_PTR i, *ptr = (INT_PTR *)this-1;
10708 for(i=*ptr-1; i>=0; i--)
10709 basic_ifstream_wchar_vbase_dtor(this+i);
10710 MSVCRT_operator_delete(ptr);
10712 basic_ifstream_wchar_vbase_dtor(this);
10714 MSVCRT_operator_delete(this);
10720 /* ?close@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
10721 /* ?close@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
10722 /* ?close@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
10723 /* ?close@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
10724 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_close, 4)
10725 void __thiscall basic_ifstream_wchar_close(basic_ifstream_wchar *this)
10727 TRACE("(%p)\n", this);
10729 if(!basic_filebuf_wchar_close(&this->filebuf)) {
10730 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10731 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10735 /* ?is_open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
10736 /* ?is_open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
10737 /* ?is_open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
10738 /* ?is_open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
10739 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_is_open, 4)
10740 MSVCP_bool __thiscall basic_ifstream_wchar_is_open(const basic_ifstream_wchar *this)
10742 TRACE("(%p)\n", this);
10743 return basic_filebuf_wchar_is_open(&this->filebuf);
10746 /* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXPBDHH@Z */
10747 /* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBDHH@Z */
10748 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPBDHH@Z */
10749 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDHH@Z */
10750 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_open, 16)
10751 void __thiscall basic_ifstream_wchar_open(basic_ifstream_wchar *this,
10752 const char *name, int mode, int prot)
10754 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
10756 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_in, prot)) {
10757 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10758 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10762 /* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXPBDI@Z */
10763 /* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBDI@Z */
10764 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPBDI@Z */
10765 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDI@Z */
10766 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_open_old, 12)
10767 void __thiscall basic_ifstream_wchar_open_old(basic_ifstream_wchar *this,
10768 const char *name, unsigned int mode)
10770 basic_ifstream_wchar_open(this, name, mode, _SH_DENYNO);
10773 /* ?rdbuf@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
10774 /* ?rdbuf@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
10775 /* ?rdbuf@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
10776 /* ?rdbuf@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
10777 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_rdbuf, 4)
10778 basic_filebuf_wchar* __thiscall basic_ifstream_wchar_rdbuf(const basic_ifstream_wchar *this)
10780 TRACE("(%p)\n", this);
10781 return (basic_filebuf_wchar*)&this->filebuf;
10784 static inline basic_ios_char* basic_fstream_char_to_basic_ios(basic_fstream_char *ptr)
10786 return (basic_ios_char*)((char*)ptr+basic_fstream_char_vbtable1[1]);
10789 static inline basic_fstream_char* basic_fstream_char_from_basic_ios(basic_ios_char *ptr)
10791 return (basic_fstream_char*)((char*)ptr-basic_fstream_char_vbtable1[1]);
10794 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
10795 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
10796 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor, 8)
10797 basic_fstream_char* __thiscall basic_fstream_char_ctor(basic_fstream_char *this, MSVCP_bool virt_init)
10799 basic_ios_char *basic_ios;
10801 TRACE("(%p %d)\n", this, virt_init);
10804 this->base.base1.vbtable = basic_fstream_char_vbtable1;
10805 this->base.base2.vbtable = basic_fstream_char_vbtable2;
10806 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10807 basic_ios_char_ctor(basic_ios);
10809 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10812 basic_filebuf_char_ctor(&this->filebuf);
10813 basic_iostream_char_ctor(&this->base, &this->filebuf.base, FALSE);
10814 basic_ios->base.vtable = &MSVCP_basic_fstream_char_vtable;
10818 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
10819 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10820 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_file, 12)
10821 basic_fstream_char* __thiscall basic_fstream_char_ctor_file(basic_fstream_char *this,
10822 FILE *file, MSVCP_bool virt_init)
10824 basic_ios_char *basic_ios;
10826 TRACE("(%p %p %d)\n", this, file, virt_init);
10829 this->base.base1.vbtable = basic_fstream_char_vbtable1;
10830 this->base.base2.vbtable = basic_fstream_char_vbtable2;
10831 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10832 basic_ios_char_ctor(basic_ios);
10834 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10837 basic_filebuf_char_ctor_file(&this->filebuf, file);
10838 basic_iostream_char_ctor(&this->base, &this->filebuf.base, FALSE);
10839 basic_ios->base.vtable = &MSVCP_basic_fstream_char_vtable;
10843 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PBDHH@Z */
10844 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDHH@Z */
10845 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_name, 20)
10846 basic_fstream_char* __thiscall basic_fstream_char_ctor_name(basic_fstream_char *this,
10847 const char *name, int mode, int prot, MSVCP_bool virt_init)
10849 TRACE("(%p %s %d %d %d)\n", this, name, mode, prot, virt_init);
10851 basic_fstream_char_ctor(this, virt_init);
10853 if(!basic_filebuf_char_open(&this->filebuf, name, mode, prot)) {
10854 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10855 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10860 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
10861 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
10862 DEFINE_THISCALL_WRAPPER(basic_fstream_char_dtor, 4)
10863 void __thiscall basic_fstream_char_dtor(basic_ios_char *base)
10865 basic_fstream_char *this = basic_fstream_char_from_basic_ios(base);
10867 TRACE("(%p)\n", this);
10869 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base));
10870 basic_filebuf_char_dtor(&this->filebuf);
10873 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
10874 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
10875 DEFINE_THISCALL_WRAPPER(basic_fstream_char_vbase_dtor, 4)
10876 void __thiscall basic_fstream_char_vbase_dtor(basic_fstream_char *this)
10878 TRACE("(%p)\n", this);
10880 basic_fstream_char_dtor(basic_fstream_char_to_basic_ios(this));
10881 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base.base1));
10884 DEFINE_THISCALL_WRAPPER(basic_fstream_char_vector_dtor, 8)
10885 basic_fstream_char* __thiscall basic_fstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
10887 basic_fstream_char *this = basic_fstream_char_from_basic_ios(base);
10889 TRACE("(%p %x)\n", this, flags);
10892 /* we have an array, with the number of elements stored before the first object */
10893 INT_PTR i, *ptr = (INT_PTR *)this-1;
10895 for(i=*ptr-1; i>=0; i--)
10896 basic_fstream_char_vbase_dtor(this+i);
10897 MSVCRT_operator_delete(ptr);
10899 basic_fstream_char_vbase_dtor(this);
10901 MSVCRT_operator_delete(this);
10907 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
10908 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
10909 DEFINE_THISCALL_WRAPPER(basic_fstream_char_close, 4)
10910 void __thiscall basic_fstream_char_close(basic_fstream_char *this)
10912 TRACE("(%p)\n", this);
10914 if(!basic_filebuf_char_close(&this->filebuf)) {
10915 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10916 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10920 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
10921 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
10922 DEFINE_THISCALL_WRAPPER(basic_fstream_char_is_open, 4)
10923 MSVCP_bool __thiscall basic_fstream_char_is_open(const basic_fstream_char *this)
10925 TRACE("(%p)\n", this);
10926 return basic_filebuf_char_is_open(&this->filebuf);
10929 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDHH@Z */
10930 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDHH@Z */
10931 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open, 16)
10932 void __thiscall basic_fstream_char_open(basic_fstream_char *this,
10933 const char *name, int mode, int prot)
10935 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
10937 if(!basic_filebuf_char_open(&this->filebuf, name, mode, prot)) {
10938 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10939 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10943 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDI@Z */
10944 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDI@Z */
10945 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_old, 12)
10946 void __thiscall basic_fstream_char_open_old(basic_fstream_char *this,
10947 const char *name, unsigned int mode)
10949 basic_fstream_char_open(this, name, mode, _SH_DENYNO);
10952 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
10953 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
10954 DEFINE_THISCALL_WRAPPER(basic_fstream_char_rdbuf, 4)
10955 basic_filebuf_char* __thiscall basic_fstream_char_rdbuf(const basic_fstream_char *this)
10957 TRACE("(%p)\n", this);
10958 return (basic_filebuf_char*)&this->filebuf;
10961 static inline basic_ios_wchar* basic_fstream_wchar_to_basic_ios(basic_fstream_wchar *ptr)
10963 return (basic_ios_wchar*)((char*)ptr+basic_fstream_wchar_vbtable1[1]);
10966 static inline basic_fstream_wchar* basic_fstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
10968 return (basic_fstream_wchar*)((char*)ptr-basic_fstream_wchar_vbtable1[1]);
10971 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@XZ */
10972 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@XZ */
10973 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_ctor, 8)
10974 basic_fstream_wchar* __thiscall basic_fstream_wchar_ctor(basic_fstream_wchar *this, MSVCP_bool virt_init)
10976 basic_ios_wchar *basic_ios;
10978 TRACE("(%p %d)\n", this, virt_init);
10981 this->base.base1.vbtable = basic_fstream_wchar_vbtable1;
10982 this->base.base2.vbtable = basic_fstream_wchar_vbtable2;
10983 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10984 basic_ios_wchar_ctor(basic_ios);
10986 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10989 basic_filebuf_wchar_ctor(&this->filebuf);
10990 basic_iostream_wchar_ctor(&this->base, &this->filebuf.base, FALSE);
10991 basic_ios->base.vtable = &MSVCP_basic_fstream_wchar_vtable;
10995 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
10996 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
10997 DEFINE_THISCALL_WRAPPER(basic_fstream_short_ctor, 8)
10998 basic_fstream_wchar* __thiscall basic_fstream_short_ctor(basic_fstream_wchar *this, MSVCP_bool virt_init)
11000 basic_fstream_wchar_ctor(this, virt_init);
11001 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_fstream_short_vtable;
11005 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
11006 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
11007 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_ctor_file, 12)
11008 basic_fstream_wchar* __thiscall basic_fstream_wchar_ctor_file(basic_fstream_wchar *this,
11009 FILE *file, MSVCP_bool virt_init)
11011 basic_ios_wchar *basic_ios;
11013 TRACE("(%p %p %d)\n", this, file, virt_init);
11016 this->base.base1.vbtable = basic_fstream_wchar_vbtable1;
11017 this->base.base2.vbtable = basic_fstream_wchar_vbtable2;
11018 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11019 basic_ios_wchar_ctor(basic_ios);
11021 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11024 basic_filebuf_wchar_ctor_file(&this->filebuf, file);
11025 basic_iostream_wchar_ctor(&this->base, &this->filebuf.base, FALSE);
11026 basic_ios->base.vtable = &MSVCP_basic_fstream_wchar_vtable;
11030 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
11031 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
11032 DEFINE_THISCALL_WRAPPER(basic_fstream_short_ctor_file, 12)
11033 basic_fstream_wchar* __thiscall basic_fstream_short_ctor_file(basic_fstream_wchar *this,
11034 FILE *file, MSVCP_bool virt_init)
11036 basic_fstream_wchar_ctor_file(this, file, virt_init);
11037 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_fstream_short_vtable;
11041 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@PB_WHH@Z */
11042 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEB_WHH@Z */
11043 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_ctor_name, 20)
11044 basic_fstream_wchar* __thiscall basic_fstream_wchar_ctor_name(basic_fstream_wchar *this,
11045 const char *name, int mode, int prot, MSVCP_bool virt_init)
11047 TRACE("(%p %s %d %d %d)\n", this, name, mode, prot, virt_init);
11049 basic_fstream_wchar_ctor(this, virt_init);
11051 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode, prot)) {
11052 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11053 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
11058 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@PBGHH@Z */
11059 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@PEBGHH@Z */
11060 DEFINE_THISCALL_WRAPPER(basic_fstream_short_ctor_name, 20)
11061 basic_fstream_wchar* __thiscall basic_fstream_short_ctor_name(basic_fstream_wchar *this,
11062 const char *name, int mode, int prot, MSVCP_bool virt_init)
11064 basic_fstream_wchar_ctor_name(this, name, mode, prot, virt_init);
11065 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_fstream_short_vtable;
11069 /* ??1?$basic_fstream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
11070 /* ??1?$basic_fstream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
11071 /* ??1?$basic_fstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
11072 /* ??1?$basic_fstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
11073 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_dtor, 4)
11074 void __thiscall basic_fstream_wchar_dtor(basic_ios_wchar *base)
11076 basic_fstream_wchar *this = basic_fstream_wchar_from_basic_ios(base);
11078 TRACE("(%p)\n", this);
11080 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(&this->base));
11081 basic_filebuf_wchar_dtor(&this->filebuf);
11084 /* ??_D?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
11085 /* ??_D?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
11086 /* ??_D?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
11087 /* ??_D?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
11088 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_vbase_dtor, 4)
11089 void __thiscall basic_fstream_wchar_vbase_dtor(basic_fstream_wchar *this)
11091 TRACE("(%p)\n", this);
11093 basic_fstream_wchar_dtor(basic_fstream_wchar_to_basic_ios(this));
11094 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base.base1));
11097 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_vector_dtor, 8)
11098 basic_fstream_wchar* __thiscall basic_fstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
11100 basic_fstream_wchar *this = basic_fstream_wchar_from_basic_ios(base);
11102 TRACE("(%p %x)\n", this, flags);
11105 /* we have an array, with the number of elements stored before the first object */
11106 INT_PTR i, *ptr = (INT_PTR *)this-1;
11108 for(i=*ptr-1; i>=0; i--)
11109 basic_fstream_wchar_vbase_dtor(this+i);
11110 MSVCRT_operator_delete(ptr);
11112 basic_fstream_wchar_vbase_dtor(this);
11114 MSVCRT_operator_delete(this);
11120 /* ?close@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
11121 /* ?close@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
11122 /* ?close@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
11123 /* ?close@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
11124 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_close, 4)
11125 void __thiscall basic_fstream_wchar_close(basic_fstream_wchar *this)
11127 TRACE("(%p)\n", this);
11129 if(!basic_filebuf_wchar_close(&this->filebuf)) {
11130 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11131 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
11135 /* ?is_open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
11136 /* ?is_open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
11137 /* ?is_open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
11138 /* ?is_open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
11139 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_is_open, 4)
11140 MSVCP_bool __thiscall basic_fstream_wchar_is_open(const basic_fstream_wchar *this)
11142 TRACE("(%p)\n", this);
11143 return basic_filebuf_wchar_is_open(&this->filebuf);
11146 /* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXPBDHH@Z */
11147 /* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBDHH@Z */
11148 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXPBDHH@Z */
11149 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDHH@Z */
11150 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_open, 16)
11151 void __thiscall basic_fstream_wchar_open(basic_fstream_wchar *this,
11152 const char *name, int mode, int prot)
11154 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
11156 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode, prot)) {
11157 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11158 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
11162 /* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXPBDI@Z */
11163 /* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBDI@Z */
11164 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXPBDI@Z */
11165 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDI@Z */
11166 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_open_old, 12)
11167 void __thiscall basic_fstream_wchar_open_old(basic_fstream_wchar *this,
11168 const char *name, unsigned int mode)
11170 basic_fstream_wchar_open(this, name, mode, _SH_DENYNO);
11173 /* ?rdbuf@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
11174 /* ?rdbuf@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
11175 /* ?rdbuf@?$basic_fstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
11176 /* ?rdbuf@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
11177 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_rdbuf, 4)
11178 basic_filebuf_wchar* __thiscall basic_fstream_wchar_rdbuf(const basic_fstream_wchar *this)
11180 TRACE("(%p)\n", this);
11181 return (basic_filebuf_wchar*)&this->filebuf;
11184 static inline basic_ios_char* basic_ostringstream_char_to_basic_ios(basic_ostringstream_char *ptr)
11186 return (basic_ios_char*)((char*)ptr+basic_ostringstream_char_vbtable[1]);
11189 static inline basic_ostringstream_char* basic_ostringstream_char_from_basic_ios(basic_ios_char *ptr)
11191 return (basic_ostringstream_char*)((char*)ptr-basic_ostringstream_char_vbtable[1]);
11194 /* ??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 */
11195 /* ??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 */
11196 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor_str, 16)
11197 basic_ostringstream_char* __thiscall basic_ostringstream_char_ctor_str(basic_ostringstream_char *this,
11198 const basic_string_char *str, int mode, MSVCP_bool virt_init)
11200 basic_ios_char *basic_ios;
11202 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
11205 this->base.vbtable = basic_ostringstream_char_vbtable;
11206 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
11207 basic_ios_char_ctor(basic_ios);
11209 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
11212 basic_stringbuf_char_ctor_str(&this->strbuf, str, mode|OPENMODE_out);
11213 basic_ostream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
11214 basic_ios->base.vtable = &MSVCP_basic_ostringstream_char_vtable;
11218 /* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
11219 /* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
11220 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor_mode, 12)
11221 basic_ostringstream_char* __thiscall basic_ostringstream_char_ctor_mode(
11222 basic_ostringstream_char *this, int mode, MSVCP_bool virt_init)
11224 basic_ios_char *basic_ios;
11226 TRACE("(%p %d %d)\n", this, mode, virt_init);
11229 this->base.vbtable = basic_ostringstream_char_vbtable;
11230 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
11231 basic_ios_char_ctor(basic_ios);
11233 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
11236 basic_stringbuf_char_ctor_mode(&this->strbuf, mode|OPENMODE_out);
11237 basic_ostream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
11238 basic_ios->base.vtable = &MSVCP_basic_ostringstream_char_vtable;
11242 /* ??_F?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
11243 /* ??_F?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
11244 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor, 8)
11245 basic_ostringstream_char* __thiscall basic_ostringstream_char_ctor(
11246 basic_ostringstream_char *this, MSVCP_bool virt_init)
11248 return basic_ostringstream_char_ctor_mode(this, 0, virt_init);
11251 /* ??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
11252 /* ??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
11253 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_dtor, 4)
11254 void __thiscall basic_ostringstream_char_dtor(basic_ios_char *base)
11256 basic_ostringstream_char *this = basic_ostringstream_char_from_basic_ios(base);
11258 TRACE("(%p)\n", this);
11260 basic_stringbuf_char_dtor(&this->strbuf);
11261 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base));
11264 /* ??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
11265 /* ??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
11266 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_vbase_dtor, 4)
11267 void __thiscall basic_ostringstream_char_vbase_dtor(basic_ostringstream_char *this)
11269 TRACE("(%p)\n", this);
11271 basic_ostringstream_char_dtor(basic_ostringstream_char_to_basic_ios(this));
11272 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base));
11275 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_vector_dtor, 8)
11276 basic_ostringstream_char* __thiscall basic_ostringstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
11278 basic_ostringstream_char *this = basic_ostringstream_char_from_basic_ios(base);
11280 TRACE("(%p %x)\n", this, flags);
11283 /* we have an array, with the number of elements stored before the first object */
11284 INT_PTR i, *ptr = (INT_PTR *)this-1;
11286 for(i=*ptr-1; i>=0; i--)
11287 basic_ostringstream_char_vbase_dtor(this+i);
11288 MSVCRT_operator_delete(ptr);
11290 basic_ostringstream_char_vbase_dtor(this);
11292 MSVCRT_operator_delete(this);
11298 /* ?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 */
11299 /* ?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 */
11300 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_rdbuf, 4)
11301 basic_stringbuf_char* __thiscall basic_ostringstream_char_rdbuf(const basic_ostringstream_char *this)
11303 TRACE("(%p)\n", this);
11304 return (basic_stringbuf_char*)&this->strbuf;
11307 /* ?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 */
11308 /* ?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 */
11309 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_str_set, 8)
11310 void __thiscall basic_ostringstream_char_str_set(basic_ostringstream_char *this, const basic_string_char *str)
11312 TRACE("(%p %p)\n", this, str);
11313 basic_stringbuf_char_str_set(&this->strbuf, str);
11316 /* ?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 */
11317 /* ?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 */
11318 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_str_get, 8)
11319 basic_string_char* __thiscall basic_ostringstream_char_str_get(const basic_ostringstream_char *this, basic_string_char *ret)
11321 TRACE("(%p %p)\n", this, ret);
11322 return basic_stringbuf_char_str_get(&this->strbuf, ret);
11325 static inline basic_ios_wchar* basic_ostringstream_wchar_to_basic_ios(basic_ostringstream_wchar *ptr)
11327 return (basic_ios_wchar*)((char*)ptr+basic_ostringstream_wchar_vbtable[1]);
11330 static inline basic_ostringstream_wchar* basic_ostringstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
11332 return (basic_ostringstream_wchar*)((char*)ptr-basic_ostringstream_wchar_vbtable[1]);
11335 /* ??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 */
11336 /* ??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 */
11337 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_ctor_str, 16)
11338 basic_ostringstream_wchar* __thiscall basic_ostringstream_wchar_ctor_str(basic_ostringstream_wchar *this,
11339 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
11341 basic_ios_wchar *basic_ios;
11343 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
11346 this->base.vbtable = basic_ostringstream_wchar_vbtable;
11347 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
11348 basic_ios_wchar_ctor(basic_ios);
11350 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
11353 basic_stringbuf_wchar_ctor_str(&this->strbuf, str, mode|OPENMODE_out);
11354 basic_ostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
11355 basic_ios->base.vtable = &MSVCP_basic_ostringstream_wchar_vtable;
11359 /* ??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 */
11360 /* ??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 */
11361 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor_str, 16)
11362 basic_ostringstream_wchar* __thiscall basic_ostringstream_short_ctor_str(basic_ostringstream_wchar *this,
11363 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
11365 basic_ostringstream_wchar_ctor_str(this, str, mode, virt_init);
11366 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ostringstream_short_vtable;
11370 /* ??0?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
11371 /* ??0?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
11372 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_ctor_mode, 12)
11373 basic_ostringstream_wchar* __thiscall basic_ostringstream_wchar_ctor_mode(
11374 basic_ostringstream_wchar *this, int mode, MSVCP_bool virt_init)
11376 basic_ios_wchar *basic_ios;
11378 TRACE("(%p %d %d)\n", this, mode, virt_init);
11381 this->base.vbtable = basic_ostringstream_wchar_vbtable;
11382 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
11383 basic_ios_wchar_ctor(basic_ios);
11385 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
11388 basic_stringbuf_wchar_ctor_mode(&this->strbuf, mode|OPENMODE_out);
11389 basic_ostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
11390 basic_ios->base.vtable = &MSVCP_basic_ostringstream_wchar_vtable;
11394 /* ??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
11395 /* ??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
11396 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor_mode, 12)
11397 basic_ostringstream_wchar* __thiscall basic_ostringstream_short_ctor_mode(
11398 basic_ostringstream_wchar *this, int mode, MSVCP_bool virt_init)
11400 basic_ostringstream_wchar_ctor_mode(this, mode, virt_init);
11401 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ostringstream_short_vtable;
11405 /* ??_F?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
11406 /* ??_F?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
11407 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_ctor, 8)
11408 basic_ostringstream_wchar* __thiscall basic_ostringstream_wchar_ctor(
11409 basic_ostringstream_wchar *this, MSVCP_bool virt_init)
11411 return basic_ostringstream_wchar_ctor_mode(this, 0, virt_init);
11414 /* ??_F?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
11415 /* ??_F?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
11416 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor, 8)
11417 basic_ostringstream_wchar* __thiscall basic_ostringstream_short_ctor(
11418 basic_ostringstream_wchar *this, MSVCP_bool virt_init)
11420 return basic_ostringstream_short_ctor_mode(this, 0, virt_init);
11423 /* ??1?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
11424 /* ??1?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
11425 /* ??1?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
11426 /* ??1?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
11427 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_dtor, 4)
11428 void __thiscall basic_ostringstream_wchar_dtor(basic_ios_wchar *base)
11430 basic_ostringstream_wchar *this = basic_ostringstream_wchar_from_basic_ios(base);
11432 TRACE("(%p)\n", this);
11434 basic_stringbuf_wchar_dtor(&this->strbuf);
11435 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base));
11438 /* ??_D?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
11439 /* ??_D?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
11440 /* ??_D?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
11441 /* ??_D?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
11442 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_vbase_dtor, 4)
11443 void __thiscall basic_ostringstream_wchar_vbase_dtor(basic_ostringstream_wchar *this)
11445 TRACE("(%p)\n", this);
11447 basic_ostringstream_wchar_dtor(basic_ostringstream_wchar_to_basic_ios(this));
11448 basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(&this->base));
11451 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_vector_dtor, 8)
11452 basic_ostringstream_wchar* __thiscall basic_ostringstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
11454 basic_ostringstream_wchar *this = basic_ostringstream_wchar_from_basic_ios(base);
11456 TRACE("(%p %x)\n", this, flags);
11459 /* we have an array, with the number of elements stored before the first object */
11460 INT_PTR i, *ptr = (INT_PTR *)this-1;
11462 for(i=*ptr-1; i>=0; i--)
11463 basic_ostringstream_wchar_vbase_dtor(this+i);
11464 MSVCRT_operator_delete(ptr);
11466 basic_ostringstream_wchar_vbase_dtor(this);
11468 MSVCRT_operator_delete(this);
11474 /* ?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 */
11475 /* ?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 */
11476 /* ?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 */
11477 /* ?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 */
11478 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_rdbuf, 4)
11479 basic_stringbuf_wchar* __thiscall basic_ostringstream_wchar_rdbuf(const basic_ostringstream_wchar *this)
11481 TRACE("(%p)\n", this);
11482 return (basic_stringbuf_wchar*)&this->strbuf;
11485 /* ?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 */
11486 /* ?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 */
11487 /* ?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 */
11488 /* ?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 */
11489 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_str_set, 8)
11490 void __thiscall basic_ostringstream_wchar_str_set(basic_ostringstream_wchar *this, const basic_string_wchar *str)
11492 TRACE("(%p %p)\n", this, str);
11493 basic_stringbuf_wchar_str_set(&this->strbuf, str);
11496 /* ?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 */
11497 /* ?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 */
11498 /* ?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 */
11499 /* ?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 */
11500 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_str_get, 8)
11501 basic_string_wchar* __thiscall basic_ostringstream_wchar_str_get(const basic_ostringstream_wchar *this, basic_string_wchar *ret)
11503 TRACE("(%p %p)\n", this, ret);
11504 return basic_stringbuf_wchar_str_get(&this->strbuf, ret);
11507 static inline basic_ios_char* basic_istringstream_char_to_basic_ios(basic_istringstream_char *ptr)
11509 return (basic_ios_char*)((char*)ptr+basic_istringstream_char_vbtable[1]);
11512 static inline basic_istringstream_char* basic_istringstream_char_from_basic_ios(basic_ios_char *ptr)
11514 return (basic_istringstream_char*)((char*)ptr-basic_istringstream_char_vbtable[1]);
11517 /* ??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 */
11518 /* ??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 */
11519 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor_str, 16)
11520 basic_istringstream_char* __thiscall basic_istringstream_char_ctor_str(basic_istringstream_char *this,
11521 const basic_string_char *str, int mode, MSVCP_bool virt_init)
11523 basic_ios_char *basic_ios;
11525 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
11528 this->base.vbtable = basic_istringstream_char_vbtable;
11529 basic_ios = basic_istream_char_get_basic_ios(&this->base);
11530 basic_ios_char_ctor(basic_ios);
11532 basic_ios = basic_istream_char_get_basic_ios(&this->base);
11535 basic_stringbuf_char_ctor_str(&this->strbuf, str, mode|OPENMODE_in);
11536 basic_istream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
11537 basic_ios->base.vtable = &MSVCP_basic_istringstream_char_vtable;
11541 /* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
11542 /* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
11543 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor_mode, 12)
11544 basic_istringstream_char* __thiscall basic_istringstream_char_ctor_mode(
11545 basic_istringstream_char *this, int mode, MSVCP_bool virt_init)
11547 basic_ios_char *basic_ios;
11549 TRACE("(%p %d %d)\n", this, mode, virt_init);
11552 this->base.vbtable = basic_istringstream_char_vbtable;
11553 basic_ios = basic_istream_char_get_basic_ios(&this->base);
11554 basic_ios_char_ctor(basic_ios);
11556 basic_ios = basic_istream_char_get_basic_ios(&this->base);
11559 basic_stringbuf_char_ctor_mode(&this->strbuf, mode|OPENMODE_in);
11560 basic_istream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
11561 basic_ios->base.vtable = &MSVCP_basic_istringstream_char_vtable;
11565 /* ??_F?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
11566 /* ??_F?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
11567 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor, 8)
11568 basic_istringstream_char* __thiscall basic_istringstream_char_ctor(
11569 basic_istringstream_char *this, MSVCP_bool virt_init)
11571 return basic_istringstream_char_ctor_mode(this, 0, virt_init);
11574 /* ??1?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
11575 /* ??1?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
11576 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_dtor, 4)
11577 void __thiscall basic_istringstream_char_dtor(basic_ios_char *base)
11579 basic_istringstream_char *this = basic_istringstream_char_from_basic_ios(base);
11581 TRACE("(%p)\n", this);
11583 basic_stringbuf_char_dtor(&this->strbuf);
11584 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base));
11587 /* ??_D?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
11588 /* ??_D?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
11589 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_vbase_dtor, 4)
11590 void __thiscall basic_istringstream_char_vbase_dtor(basic_istringstream_char *this)
11592 TRACE("(%p)\n", this);
11594 basic_istringstream_char_dtor(basic_istringstream_char_to_basic_ios(this));
11595 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base));
11598 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_vector_dtor, 8)
11599 basic_istringstream_char* __thiscall basic_istringstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
11601 basic_istringstream_char *this = basic_istringstream_char_from_basic_ios(base);
11603 TRACE("(%p %x)\n", this, flags);
11606 /* we have an array, with the number of elements stored before the first object */
11607 INT_PTR i, *ptr = (INT_PTR *)this-1;
11609 for(i=*ptr-1; i>=0; i--)
11610 basic_istringstream_char_vbase_dtor(this+i);
11611 MSVCRT_operator_delete(ptr);
11613 basic_istringstream_char_vbase_dtor(this);
11615 MSVCRT_operator_delete(this);
11621 /* ?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 */
11622 /* ?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 */
11623 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_rdbuf, 4)
11624 basic_stringbuf_char* __thiscall basic_istringstream_char_rdbuf(const basic_istringstream_char *this)
11626 TRACE("(%p)\n", this);
11627 return (basic_stringbuf_char*)&this->strbuf;
11630 /* ?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 */
11631 /* ?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 */
11632 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_str_set, 8)
11633 void __thiscall basic_istringstream_char_str_set(basic_istringstream_char *this, const basic_string_char *str)
11635 TRACE("(%p %p)\n", this, str);
11636 basic_stringbuf_char_str_set(&this->strbuf, str);
11639 /* ?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 */
11640 /* ?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 */
11641 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_str_get, 8)
11642 basic_string_char* __thiscall basic_istringstream_char_str_get(const basic_istringstream_char *this, basic_string_char *ret)
11644 TRACE("(%p %p)\n", this, ret);
11645 return basic_stringbuf_char_str_get(&this->strbuf, ret);
11648 static inline basic_ios_wchar* basic_istringstream_wchar_to_basic_ios(basic_istringstream_wchar *ptr)
11650 return (basic_ios_wchar*)((char*)ptr+basic_istringstream_wchar_vbtable[1]);
11653 static inline basic_istringstream_wchar* basic_istringstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
11655 return (basic_istringstream_wchar*)((char*)ptr-basic_istringstream_wchar_vbtable[1]);
11658 /* ??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 */
11659 /* ??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 */
11660 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_ctor_str, 16)
11661 basic_istringstream_wchar* __thiscall basic_istringstream_wchar_ctor_str(basic_istringstream_wchar *this,
11662 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
11664 basic_ios_wchar *basic_ios;
11666 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
11669 this->base.vbtable = basic_istringstream_wchar_vbtable;
11670 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
11671 basic_ios_wchar_ctor(basic_ios);
11673 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
11676 basic_stringbuf_wchar_ctor_str(&this->strbuf, str, mode|OPENMODE_in);
11677 basic_istream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
11678 basic_ios->base.vtable = &MSVCP_basic_istringstream_wchar_vtable;
11682 /* ??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 */
11683 /* ??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 */
11684 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor_str, 16)
11685 basic_istringstream_wchar* __thiscall basic_istringstream_short_ctor_str(basic_istringstream_wchar *this,
11686 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
11688 basic_istringstream_wchar_ctor_str(this, str, mode, virt_init);
11689 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_istringstream_short_vtable;
11693 /* ??0?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
11694 /* ??0?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
11695 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_ctor_mode, 12)
11696 basic_istringstream_wchar* __thiscall basic_istringstream_wchar_ctor_mode(
11697 basic_istringstream_wchar *this, int mode, MSVCP_bool virt_init)
11699 basic_ios_wchar *basic_ios;
11701 TRACE("(%p %d %d)\n", this, mode, virt_init);
11704 this->base.vbtable = basic_istringstream_wchar_vbtable;
11705 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
11706 basic_ios_wchar_ctor(basic_ios);
11708 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
11711 basic_stringbuf_wchar_ctor_mode(&this->strbuf, mode|OPENMODE_in);
11712 basic_istream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
11713 basic_ios->base.vtable = &MSVCP_basic_istringstream_wchar_vtable;
11717 /* ??0?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
11718 /* ??0?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
11719 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor_mode, 12)
11720 basic_istringstream_wchar* __thiscall basic_istringstream_short_ctor_mode(
11721 basic_istringstream_wchar *this, int mode, MSVCP_bool virt_init)
11723 basic_istringstream_wchar_ctor_mode(this, mode, virt_init);
11724 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_istringstream_short_vtable;
11728 /* ??_F?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
11729 /* ??_F?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
11730 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_ctor, 8)
11731 basic_istringstream_wchar* __thiscall basic_istringstream_wchar_ctor(
11732 basic_istringstream_wchar *this, MSVCP_bool virt_init)
11734 return basic_istringstream_wchar_ctor_mode(this, 0, virt_init);
11737 /* ??_F?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
11738 /* ??_F?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
11739 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor, 8)
11740 basic_istringstream_wchar* __thiscall basic_istringstream_short_ctor(
11741 basic_istringstream_wchar *this, MSVCP_bool virt_init)
11743 return basic_istringstream_short_ctor_mode(this, 0, virt_init);
11746 /* ??1?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
11747 /* ??1?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
11748 /* ??1?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
11749 /* ??1?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
11750 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_dtor, 4)
11751 void __thiscall basic_istringstream_wchar_dtor(basic_ios_wchar *base)
11753 basic_istringstream_wchar *this = basic_istringstream_wchar_from_basic_ios(base);
11755 TRACE("(%p)\n", this);
11757 basic_stringbuf_wchar_dtor(&this->strbuf);
11758 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base));
11761 /* ??_D?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
11762 /* ??_D?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
11763 /* ??_D?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
11764 /* ??_D?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
11765 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_vbase_dtor, 4)
11766 void __thiscall basic_istringstream_wchar_vbase_dtor(basic_istringstream_wchar *this)
11768 TRACE("(%p)\n", this);
11770 basic_istringstream_wchar_dtor(basic_istringstream_wchar_to_basic_ios(this));
11771 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base));
11774 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_vector_dtor, 8)
11775 basic_istringstream_wchar* __thiscall basic_istringstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
11777 basic_istringstream_wchar *this = basic_istringstream_wchar_from_basic_ios(base);
11779 TRACE("(%p %x)\n", this, flags);
11782 /* we have an array, with the number of elements stored before the first object */
11783 INT_PTR i, *ptr = (INT_PTR *)this-1;
11785 for(i=*ptr-1; i>=0; i--)
11786 basic_istringstream_wchar_vbase_dtor(this+i);
11787 MSVCRT_operator_delete(ptr);
11789 basic_istringstream_wchar_vbase_dtor(this);
11791 MSVCRT_operator_delete(this);
11797 /* ?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 */
11798 /* ?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 */
11799 /* ?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 */
11800 /* ?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 */
11801 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_rdbuf, 4)
11802 basic_stringbuf_wchar* __thiscall basic_istringstream_wchar_rdbuf(const basic_istringstream_wchar *this)
11804 TRACE("(%p)\n", this);
11805 return (basic_stringbuf_wchar*)&this->strbuf;
11808 /* ?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 */
11809 /* ?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 */
11810 /* ?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 */
11811 /* ?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 */
11812 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_str_set, 8)
11813 void __thiscall basic_istringstream_wchar_str_set(basic_istringstream_wchar *this, const basic_string_wchar *str)
11815 TRACE("(%p %p)\n", this, str);
11816 basic_stringbuf_wchar_str_set(&this->strbuf, str);
11819 /* ?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 */
11820 /* ?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 */
11821 /* ?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 */
11822 /* ?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 */
11823 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_str_get, 8)
11824 basic_string_wchar* __thiscall basic_istringstream_wchar_str_get(const basic_istringstream_wchar *this, basic_string_wchar *ret)
11826 TRACE("(%p %p)\n", this, ret);
11827 return basic_stringbuf_wchar_str_get(&this->strbuf, ret);
11830 static inline basic_ios_char* basic_stringstream_char_to_basic_ios(basic_stringstream_char *ptr)
11832 return (basic_ios_char*)((char*)ptr+basic_stringstream_char_vbtable1[1]);
11835 static inline basic_stringstream_char* basic_stringstream_char_from_basic_ios(basic_ios_char *ptr)
11837 return (basic_stringstream_char*)((char*)ptr-basic_stringstream_char_vbtable1[1]);
11840 /* ??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 */
11841 /* ??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 */
11842 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor_str, 16)
11843 basic_stringstream_char* __thiscall basic_stringstream_char_ctor_str(basic_stringstream_char *this,
11844 const basic_string_char *str, int mode, MSVCP_bool virt_init)
11846 basic_ios_char *basic_ios;
11848 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
11851 this->base.base1.vbtable = basic_stringstream_char_vbtable1;
11852 this->base.base2.vbtable = basic_stringstream_char_vbtable2;
11853 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11854 basic_ios_char_ctor(basic_ios);
11856 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11859 basic_stringbuf_char_ctor_str(&this->strbuf, str, mode);
11860 basic_iostream_char_ctor(&this->base, &this->strbuf.base, FALSE);
11861 basic_ios->base.vtable = &MSVCP_basic_stringstream_char_vtable;
11865 /* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
11866 /* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
11867 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor_mode, 12)
11868 basic_stringstream_char* __thiscall basic_stringstream_char_ctor_mode(
11869 basic_stringstream_char *this, int mode, MSVCP_bool virt_init)
11871 basic_ios_char *basic_ios;
11873 TRACE("(%p %d %d)\n", this, mode, virt_init);
11876 this->base.base1.vbtable = basic_stringstream_char_vbtable1;
11877 this->base.base2.vbtable = basic_stringstream_char_vbtable2;
11878 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11879 basic_ios_char_ctor(basic_ios);
11881 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11884 basic_stringbuf_char_ctor_mode(&this->strbuf, mode);
11885 basic_iostream_char_ctor(&this->base, &this->strbuf.base, FALSE);
11886 basic_ios->base.vtable = &MSVCP_basic_stringstream_char_vtable;
11890 /* ??_F?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
11891 /* ??_F?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
11892 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor, 8)
11893 basic_stringstream_char* __thiscall basic_stringstream_char_ctor(
11894 basic_stringstream_char *this, MSVCP_bool virt_init)
11896 return basic_stringstream_char_ctor_mode(
11897 this, OPENMODE_out|OPENMODE_in, virt_init);
11900 /* ??1?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
11901 /* ??1?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
11902 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_dtor, 4)
11903 void __thiscall basic_stringstream_char_dtor(basic_ios_char *base)
11905 basic_stringstream_char *this = basic_stringstream_char_from_basic_ios(base);
11907 TRACE("(%p)\n", this);
11909 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base));
11910 basic_stringbuf_char_dtor(&this->strbuf);
11913 /* ??_D?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
11914 /* ??_D?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
11915 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_vbase_dtor, 4)
11916 void __thiscall basic_stringstream_char_vbase_dtor(basic_stringstream_char *this)
11918 TRACE("(%p)\n", this);
11920 basic_stringstream_char_dtor(basic_stringstream_char_to_basic_ios(this));
11921 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base.base1));
11924 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_vector_dtor, 8)
11925 basic_stringstream_char* __thiscall basic_stringstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
11927 basic_stringstream_char *this = basic_stringstream_char_from_basic_ios(base);
11929 TRACE("(%p %x)\n", this, flags);
11932 /* we have an array, with the number of elements stored before the first object */
11933 INT_PTR i, *ptr = (INT_PTR *)this-1;
11935 for(i=*ptr-1; i>=0; i--)
11936 basic_stringstream_char_vbase_dtor(this+i);
11937 MSVCRT_operator_delete(ptr);
11939 basic_stringstream_char_vbase_dtor(this);
11941 MSVCRT_operator_delete(this);
11947 /* ?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 */
11948 /* ?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 */
11949 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_rdbuf, 4)
11950 basic_stringbuf_char* __thiscall basic_stringstream_char_rdbuf(const basic_stringstream_char *this)
11952 TRACE("(%p)\n", this);
11953 return (basic_stringbuf_char*)&this->strbuf;
11956 /* ?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 */
11957 /* ?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 */
11958 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_str_set, 8)
11959 void __thiscall basic_stringstream_char_str_set(basic_stringstream_char *this, const basic_string_char *str)
11961 TRACE("(%p %p)\n", this, str);
11962 basic_stringbuf_char_str_set(&this->strbuf, str);
11965 /* ?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 */
11966 /* ?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 */
11967 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_str_get, 8)
11968 basic_string_char* __thiscall basic_stringstream_char_str_get(const basic_stringstream_char *this, basic_string_char *ret)
11970 TRACE("(%p %p)\n", this, ret);
11971 return basic_stringbuf_char_str_get(&this->strbuf, ret);
11974 static inline basic_ios_wchar* basic_stringstream_wchar_to_basic_ios(basic_stringstream_wchar *ptr)
11976 return (basic_ios_wchar*)((char*)ptr+basic_stringstream_wchar_vbtable1[1]);
11979 static inline basic_stringstream_wchar* basic_stringstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
11981 return (basic_stringstream_wchar*)((char*)ptr-basic_stringstream_wchar_vbtable1[1]);
11984 /* ??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 */
11985 /* ??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 */
11986 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_ctor_str, 16)
11987 basic_stringstream_wchar* __thiscall basic_stringstream_wchar_ctor_str(basic_stringstream_wchar *this,
11988 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
11990 basic_ios_wchar *basic_ios;
11992 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
11995 this->base.base1.vbtable = basic_stringstream_wchar_vbtable1;
11996 this->base.base2.vbtable = basic_stringstream_wchar_vbtable2;
11997 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11998 basic_ios_wchar_ctor(basic_ios);
12000 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
12003 basic_stringbuf_wchar_ctor_str(&this->strbuf, str, mode);
12004 basic_iostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE);
12005 basic_ios->base.vtable = &MSVCP_basic_stringstream_wchar_vtable;
12009 /* ??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 */
12010 /* ??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 */
12011 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor_str, 16)
12012 basic_stringstream_wchar* __thiscall basic_stringstream_short_ctor_str(basic_stringstream_wchar *this,
12013 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
12015 basic_stringstream_wchar_ctor_str(this, str, mode, virt_init);
12016 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_stringstream_short_vtable;
12020 /* ??0?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
12021 /* ??0?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
12022 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_ctor_mode, 12)
12023 basic_stringstream_wchar* __thiscall basic_stringstream_wchar_ctor_mode(
12024 basic_stringstream_wchar *this, int mode, MSVCP_bool virt_init)
12026 basic_ios_wchar *basic_ios;
12028 TRACE("(%p %d %d)\n", this, mode, virt_init);
12031 this->base.base1.vbtable = basic_stringstream_wchar_vbtable1;
12032 this->base.base2.vbtable = basic_stringstream_wchar_vbtable2;
12033 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
12034 basic_ios_wchar_ctor(basic_ios);
12036 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
12039 basic_stringbuf_wchar_ctor_mode(&this->strbuf, mode);
12040 basic_iostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE);
12041 basic_ios->base.vtable = &MSVCP_basic_stringstream_wchar_vtable;
12045 /* ??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
12046 /* ??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
12047 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor_mode, 12)
12048 basic_stringstream_wchar* __thiscall basic_stringstream_short_ctor_mode(
12049 basic_stringstream_wchar *this, int mode, MSVCP_bool virt_init)
12051 basic_stringstream_wchar_ctor_mode(this, mode, virt_init);
12052 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_stringstream_short_vtable;
12056 /* ??_F?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
12057 /* ??_F?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
12058 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_ctor, 8)
12059 basic_stringstream_wchar* __thiscall basic_stringstream_wchar_ctor(
12060 basic_stringstream_wchar *this, MSVCP_bool virt_init)
12062 return basic_stringstream_wchar_ctor_mode(
12063 this, OPENMODE_out|OPENMODE_in, virt_init);
12066 /* ??_F?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
12067 /* ??_F?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
12068 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor, 8)
12069 basic_stringstream_wchar* __thiscall basic_stringstream_short_ctor(
12070 basic_stringstream_wchar *this, MSVCP_bool virt_init)
12072 return basic_stringstream_short_ctor_mode(
12073 this, OPENMODE_out|OPENMODE_in, virt_init);
12076 /* ??1?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
12077 /* ??1?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
12078 /* ??1?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
12079 /* ??1?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
12080 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_dtor, 4)
12081 void __thiscall basic_stringstream_wchar_dtor(basic_ios_wchar *base)
12083 basic_stringstream_wchar *this = basic_stringstream_wchar_from_basic_ios(base);
12085 TRACE("(%p)\n", this);
12087 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(&this->base));
12088 basic_stringbuf_wchar_dtor(&this->strbuf);
12091 /* ??_D?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
12092 /* ??_D?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
12093 /* ??_D?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
12094 /* ??_D?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
12095 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_vbase_dtor, 4)
12096 void __thiscall basic_stringstream_wchar_vbase_dtor(basic_stringstream_wchar *this)
12098 TRACE("(%p)\n", this);
12100 basic_stringstream_wchar_dtor(basic_stringstream_wchar_to_basic_ios(this));
12101 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base.base1));
12104 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_vector_dtor, 8)
12105 basic_stringstream_wchar* __thiscall basic_stringstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
12107 basic_stringstream_wchar *this = basic_stringstream_wchar_from_basic_ios(base);
12109 TRACE("(%p %x)\n", this, flags);
12112 /* we have an array, with the number of elements stored before the first object */
12113 INT_PTR i, *ptr = (INT_PTR *)this-1;
12115 for(i=*ptr-1; i>=0; i--)
12116 basic_stringstream_wchar_vbase_dtor(this+i);
12117 MSVCRT_operator_delete(ptr);
12119 basic_stringstream_wchar_vbase_dtor(this);
12121 MSVCRT_operator_delete(this);
12127 /* ?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 */
12128 /* ?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 */
12129 /* ?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 */
12130 /* ?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 */
12131 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_rdbuf, 4)
12132 basic_stringbuf_wchar* __thiscall basic_stringstream_wchar_rdbuf(const basic_stringstream_wchar *this)
12134 TRACE("(%p)\n", this);
12135 return (basic_stringbuf_wchar*)&this->strbuf;
12138 /* ?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 */
12139 /* ?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 */
12140 /* ?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 */
12141 /* ?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 */
12142 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_str_set, 8)
12143 void __thiscall basic_stringstream_wchar_str_set(basic_stringstream_wchar *this, const basic_string_wchar *str)
12145 TRACE("(%p %p)\n", this, str);
12146 basic_stringbuf_wchar_str_set(&this->strbuf, str);
12149 /* ?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 */
12150 /* ?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 */
12151 /* ?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 */
12152 /* ?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 */
12153 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_str_get, 8)
12154 basic_string_wchar* __thiscall basic_stringstream_wchar_str_get(const basic_stringstream_wchar *this, basic_string_wchar *ret)
12156 TRACE("(%p %p)\n", this, ret);
12157 return basic_stringbuf_wchar_str_get(&this->strbuf, ret);
12160 /* ?_Init@strstreambuf@std@@IAEXHPAD0H@Z */
12161 /* ?_Init@strstreambuf@std@@IEAAX_JPEAD1H@Z */
12162 DEFINE_THISCALL_WRAPPER(strstreambuf__Init, 20)
12163 void __thiscall strstreambuf__Init(strstreambuf *this, streamsize len, char *g, char *p, int mode)
12165 TRACE("(%p %ld %p %p %d)\n", this, len, g, p, mode);
12167 this->minsize = 32;
12168 this->endsave = NULL;
12169 this->strmode = mode;
12170 this->palloc = NULL;
12171 this->pfree = NULL;
12174 this->strmode |= STRSTATE_Dynamic;
12175 if(len > this->minsize)
12176 this->minsize = len;
12177 this->seekhigh = NULL;
12186 this->seekhigh = g+len;
12187 basic_streambuf_char_setg(&this->base, g, g, p ? p : this->seekhigh);
12189 basic_streambuf_char_setp(&this->base, p, this->seekhigh);
12192 /* ??0strstreambuf@std@@QAE@PACH0@Z */
12193 /* ??0strstreambuf@std@@QEAA@PEAC_J0@Z */
12194 /* ??0strstreambuf@std@@QAE@PADH0@Z */
12195 /* ??0strstreambuf@std@@QEAA@PEAD_J0@Z */
12196 /* ??0strstreambuf@std@@QAE@PAEH0@Z */
12197 /* ??0strstreambuf@std@@QEAA@PEAE_J0@Z */
12198 static strstreambuf* strstreambuf_ctor_get_put(strstreambuf *this, char *g, streamsize len, char *p)
12200 TRACE("(%p %p %ld %p)\n", this, g, len, p);
12202 basic_streambuf_char_ctor(&this->base);
12203 this->base.vtable = &MSVCP_strstreambuf_vtable;
12205 strstreambuf__Init(this, len, g, p, 0);
12209 /* ?_Tidy@strstreambuf@std@@IAEXXZ */
12210 /* ?_Tidy@strstreambuf@std@@IEAAXXZ */
12211 DEFINE_THISCALL_WRAPPER(strstreambuf__Tidy, 4)
12212 void __thiscall strstreambuf__Tidy(strstreambuf *this)
12214 TRACE("(%p)\n", this);
12216 if((this->strmode & STRSTATE_Allocated) && !(this->strmode & STRSTATE_Frozen)) {
12218 this->pfree(basic_streambuf_char_eback(&this->base));
12220 MSVCRT_operator_delete(basic_streambuf_char_eback(&this->base));
12223 this->endsave = NULL;
12224 this->seekhigh = NULL;
12225 this->strmode &= ~(STRSTATE_Allocated | STRSTATE_Frozen);
12226 basic_streambuf_char_setg(&this->base, NULL, NULL, NULL);
12227 basic_streambuf_char_setp(&this->base, NULL, NULL);
12230 /* ??1strstreambuf@std@@UAE@XZ */
12231 /* ??1strstreambuf@std@@UEAA@XZ */
12232 DEFINE_THISCALL_WRAPPER(strstreambuf_dtor, 4)
12233 void __thiscall strstreambuf_dtor(strstreambuf *this)
12235 TRACE("(%p)\n", this);
12237 strstreambuf__Tidy(this);
12238 basic_streambuf_char_dtor(&this->base);
12241 DEFINE_THISCALL_WRAPPER(strstreambuf_vector_dtor, 8)
12242 strstreambuf* __thiscall strstreambuf_vector_dtor(strstreambuf *this, unsigned int flags)
12244 TRACE("(%p %x)\n", this, flags);
12246 /* we have an array, with the number of elements stored before the first object */
12247 INT_PTR i, *ptr = (INT_PTR *)this-1;
12249 for(i=*ptr-1; i>=0; i--)
12250 strstreambuf_dtor(this+i);
12251 MSVCRT_operator_delete(ptr);
12253 strstreambuf_dtor(this);
12255 MSVCRT_operator_delete(this);
12261 /* ?freeze@strstreambuf@std@@QAEX_N@Z */
12262 /* ?freeze@strstreambuf@std@@QEAAX_N@Z */
12263 DEFINE_THISCALL_WRAPPER(strstreambuf_freeze, 8)
12264 void __thiscall strstreambuf_freeze(strstreambuf *this, MSVCP_bool freeze)
12266 TRACE("(%p %d)\n", this, freeze);
12268 if(!freeze == !(this->strmode *STRSTATE_Frozen))
12272 this->strmode |= STRSTATE_Frozen;
12273 this->endsave = basic_streambuf_char_epptr(&this->base);
12274 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base),
12275 basic_streambuf_char_pptr(&this->base), basic_streambuf_char_eback(&this->base));
12277 this->strmode &= ~STRSTATE_Frozen;
12278 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base),
12279 basic_streambuf_char_pptr(&this->base), this->endsave);
12283 /* ?overflow@strstreambuf@std@@MAEHH@Z */
12284 /* ?overflow@strstreambuf@std@@MEAAHH@Z */
12285 DEFINE_THISCALL_WRAPPER(strstreambuf_overflow, 8)
12286 int __thiscall strstreambuf_overflow(strstreambuf *this, int c)
12288 MSVCP_size_t old_size, size;
12291 TRACE("(%p %d)\n", this, c);
12296 if(this->strmode & STRSTATE_Frozen)
12299 ptr = basic_streambuf_char_pptr(&this->base);
12300 if(ptr && ptr<basic_streambuf_char_epptr(&this->base))
12301 return (unsigned char)(*basic_streambuf_char__Pninc(&this->base) = c);
12303 if(!(this->strmode & STRSTATE_Dynamic) || (this->strmode & STRSTATE_Constant))
12306 ptr = basic_streambuf_char_eback(&this->base);
12307 old_size = ptr ? basic_streambuf_char_epptr(&this->base) - ptr : 0;
12309 size = old_size + old_size/2;
12310 if(size < this->minsize)
12311 size = this->minsize;
12314 buf = this->palloc(size);
12316 buf = MSVCRT_operator_new(size);
12320 memcpy(buf, ptr, old_size);
12321 if(this->strmode & STRSTATE_Allocated) {
12325 MSVCRT_operator_delete(ptr);
12328 this->strmode |= STRSTATE_Allocated;
12330 this->seekhigh = buf;
12331 basic_streambuf_char_setp(&this->base, buf, buf+size);
12332 basic_streambuf_char_setg(&this->base, buf, buf, buf);
12334 this->seekhigh = this->seekhigh-ptr+buf;
12335 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base)-ptr+buf,
12336 basic_streambuf_char_pptr(&this->base)-ptr+buf, buf+size);
12337 basic_streambuf_char_setg(&this->base, buf, basic_streambuf_char_gptr(&this->base)-ptr+buf,
12338 basic_streambuf_char_pptr(&this->base));
12341 return (unsigned char)(*basic_streambuf_char__Pninc(&this->base) = c);
12344 /* ?pbackfail@strstreambuf@std@@MAEHH@Z */
12345 /* ?pbackfail@strstreambuf@std@@MEAAHH@Z */
12346 DEFINE_THISCALL_WRAPPER(strstreambuf_pbackfail, 8)
12347 int __thiscall strstreambuf_pbackfail(strstreambuf *this, int c)
12349 char *ptr = basic_streambuf_char_gptr(&this->base);
12351 TRACE("(%p %d)\n", this, c);
12353 if(ptr<=basic_streambuf_char_eback(&this->base)
12354 || ((this->strmode & STRSTATE_Constant) && c!=ptr[-1]))
12357 basic_streambuf_char_gbump(&this->base, -1);
12360 if(this->strmode & STRSTATE_Constant)
12361 return (unsigned char)c;
12363 return (unsigned char)(ptr[0] = c);
12366 /* ?seekoff@strstreambuf@std@@MAE?AV?$fpos@H@2@JHH@Z */
12367 /* ?seekoff@strstreambuf@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
12368 DEFINE_THISCALL_WRAPPER(strstreambuf_seekoff, 20)
12369 fpos_int* __thiscall strstreambuf_seekoff(strstreambuf *this, fpos_int *ret, streamoff off, int way, int mode)
12371 char *eback = basic_streambuf_char_eback(&this->base);
12372 char *pptr = basic_streambuf_char_pptr(&this->base);
12373 char *gptr = basic_streambuf_char_gptr(&this->base);
12375 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
12380 if(pptr > this->seekhigh)
12381 this->seekhigh = pptr;
12383 if((mode & OPENMODE_in) && gptr) {
12384 if(way==SEEKDIR_cur && !(mode & OPENMODE_out))
12386 else if(way == SEEKDIR_end)
12387 off += this->seekhigh-eback;
12388 else if(way != SEEKDIR_beg)
12391 if(off<0 || off>this->seekhigh-eback) {
12394 basic_streambuf_char_gbump(&this->base, eback-gptr+off);
12395 if((mode & OPENMODE_out) && pptr) {
12396 basic_streambuf_char_setp_next(&this->base, eback,
12397 gptr, basic_streambuf_char_epptr(&this->base));
12400 }else if((mode & OPENMODE_out) && pptr) {
12401 if(way == SEEKDIR_cur)
12403 else if(way == SEEKDIR_end)
12404 off += this->seekhigh-eback;
12405 else if(way != SEEKDIR_beg)
12408 if(off<0 || off>this->seekhigh-eback)
12411 basic_streambuf_char_pbump(&this->base, eback-pptr+off);
12420 /* ?seekpos@strstreambuf@std@@MAE?AV?$fpos@H@2@V32@H@Z */
12421 /* ?seekpos@strstreambuf@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
12422 DEFINE_THISCALL_WRAPPER(strstreambuf_seekpos, 36)
12423 fpos_int* __thiscall strstreambuf_seekpos(strstreambuf *this, fpos_int *ret, fpos_int pos, int mode)
12425 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
12427 if(pos.off==-1 && pos.pos==0 && pos.state==0) {
12432 return strstreambuf_seekoff(this, ret, pos.off, SEEKDIR_beg, mode);
12435 /* ?underflow@strstreambuf@std@@MAEHXZ */
12436 /* ?underflow@strstreambuf@std@@MEAAHXZ */
12437 DEFINE_THISCALL_WRAPPER(strstreambuf_underflow, 4)
12438 int __thiscall strstreambuf_underflow(strstreambuf *this)
12440 char *gptr = basic_streambuf_char_gptr(&this->base);
12443 TRACE("(%p)\n", this);
12448 if(gptr < basic_streambuf_char_egptr(&this->base))
12449 return (unsigned char)(*gptr);
12451 pptr = basic_streambuf_char_gptr(&this->base);
12452 if(pptr > this->seekhigh)
12453 this->seekhigh = pptr;
12455 if(this->seekhigh <= gptr)
12458 basic_streambuf_char_setg(&this->base, basic_streambuf_char_eback(&this->base),
12459 gptr, this->seekhigh);
12460 return (unsigned char)(*gptr);
12463 static inline basic_ios_char* ostrstream_to_basic_ios(ostrstream *ptr)
12465 return (basic_ios_char*)((char*)ptr+ostrstream_vbtable[1]);
12468 static inline ostrstream* ostrstream_from_basic_ios(basic_ios_char *ptr)
12470 return (ostrstream*)((char*)ptr-ostrstream_vbtable[1]);
12473 /* ??0ostrstream@std@@QAE@PADHH@Z */
12474 DEFINE_THISCALL_WRAPPER(ostrstream_ctor, 20)
12475 ostrstream* __thiscall ostrstream_ctor(ostrstream *this, char *buf, streamsize size, int mode, MSVCP_bool virt_init)
12477 basic_ios_char *basic_ios;
12479 TRACE("(%p %p %ld %d %d)\n", this, buf, size, mode, virt_init);
12482 this->base.vbtable = ostrstream_vbtable;
12483 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
12484 basic_ios_char_ctor(basic_ios);
12486 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
12489 strstreambuf_ctor_get_put(&this->buf, buf, size,
12490 buf && (mode & OPENMODE_app) ? buf+strlen(buf) : buf);
12491 basic_ostream_char_ctor(&this->base, &this->buf.base, FALSE, FALSE);
12492 basic_ios->base.vtable = &MSVCP_ostrstream_vtable;
12496 /* ??1ostrstream@std@@UAE@XZ */
12497 /* ??1ostrstream@std@@UEAA@XZ */
12498 DEFINE_THISCALL_WRAPPER(ostrstream_dtor, 4)
12499 void __thiscall ostrstream_dtor(basic_ios_char *base)
12501 ostrstream *this = ostrstream_from_basic_ios(base);
12503 TRACE("(%p)\n", this);
12505 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base));
12506 strstreambuf_dtor(&this->buf);
12509 static void ostrstream_vbase_dtor(ostrstream *this)
12511 TRACE("(%p)\n", this);
12513 ostrstream_dtor(ostrstream_to_basic_ios(this));
12514 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base));
12517 DEFINE_THISCALL_WRAPPER(ostrstream_vector_dtor, 8)
12518 ostrstream* __thiscall ostrstream_vector_dtor(basic_ios_char *base, unsigned int flags)
12520 ostrstream *this = ostrstream_from_basic_ios(base);
12522 TRACE("(%p %x)\n", this, flags);
12525 /* we have an array, with the number of elements stored before the first object */
12526 INT_PTR i, *ptr = (INT_PTR *)this-1;
12528 for(i=*ptr-1; i>=0; i--)
12529 ostrstream_vbase_dtor(this+i);
12530 MSVCRT_operator_delete(ptr);
12532 ostrstream_vbase_dtor(this);
12534 MSVCRT_operator_delete(this);
12540 static inline istrstream* istrstream_from_basic_ios(basic_ios_char *ptr)
12542 return (istrstream*)((char*)ptr-istrstream_vbtable[1]);
12545 /* ??1istrstream@std@@UAE@XZ */
12546 /* ??1istrstream@std@@UEAA@XZ */
12547 DEFINE_THISCALL_WRAPPER(istrstream_dtor, 4)
12548 void __thiscall istrstream_dtor(basic_ios_char *base)
12550 istrstream *this = istrstream_from_basic_ios(base);
12552 TRACE("(%p)\n", this);
12554 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base));
12555 strstreambuf_dtor(&this->buf);
12558 static inline basic_ios_char* strstream_to_basic_ios(strstream *ptr)
12560 return (basic_ios_char*)((char*)ptr+strstream_vbtable1[1]);
12563 static inline strstream* strstream_from_basic_ios(basic_ios_char *ptr)
12565 return (strstream*)((char*)ptr-strstream_vbtable1[1]);
12568 /* ??0strstream@std@@QAE@PADHH@Z */
12569 /* ??0strstream@std@@QEAA@PEAD_JH@Z */
12570 DEFINE_THISCALL_WRAPPER(strstream_ctor, 20)
12571 strstream* __thiscall strstream_ctor(strstream *this, char *buf, streamsize size, int mode, MSVCP_bool virt_init)
12573 basic_ios_char *basic_ios;
12575 TRACE("(%p %p %ld %d %d)\n", this, buf, size, mode, virt_init);
12578 this->base.base1.vbtable = strstream_vbtable1;
12579 this->base.base2.vbtable = strstream_vbtable2;
12580 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
12581 basic_ios_char_ctor(basic_ios);
12583 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
12586 strstreambuf_ctor_get_put(&this->buf, buf, size,
12587 buf && (mode & OPENMODE_app) ? buf+strlen(buf) : buf);
12588 basic_iostream_char_ctor(&this->base, &this->buf.base, FALSE);
12589 basic_ios->base.vtable = &MSVCP_strstream_vtable;
12593 /* ??1strstream@std@@UAE@XZ */
12594 /* ??1strstream@std@@UEAA@XZ */
12595 DEFINE_THISCALL_WRAPPER(strstream_dtor, 4)
12596 void __thiscall strstream_dtor(basic_ios_char *base)
12598 strstream *this = strstream_from_basic_ios(base);
12600 TRACE("(%p)\n", this);
12602 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base));
12603 strstreambuf_dtor(&this->buf);
12606 static void strstream_vbase_dtor(strstream *this)
12608 TRACE("(%p)\n", this);
12610 strstream_dtor(strstream_to_basic_ios(this));
12611 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base.base1));
12614 DEFINE_THISCALL_WRAPPER(strstream_vector_dtor, 8)
12615 strstream* __thiscall strstream_vector_dtor(basic_ios_char *base, unsigned int flags)
12617 strstream *this = strstream_from_basic_ios(base);
12619 TRACE("(%p %x)\n", this, flags);
12622 /* we have an array, with the number of elements stored before the first object */
12623 INT_PTR i, *ptr = (INT_PTR *)this-1;
12625 for(i=*ptr-1; i>=0; i--)
12626 strstream_vbase_dtor(this+i);
12627 MSVCRT_operator_delete(ptr);
12629 strstream_vbase_dtor(this);
12631 MSVCRT_operator_delete(this);
12637 static void __cdecl setprecision_func(ios_base *base, streamsize prec)
12639 ios_base_precision_set(base, prec);
12642 /* ?setprecision@std@@YA?AU?$_Smanip@H@1@H@Z */
12643 /* ?setprecision@std@@YA?AU?$_Smanip@_J@1@_J@Z */
12644 manip_streamsize* __cdecl setprecision(manip_streamsize *ret, streamsize prec)
12646 TRACE("(%p %ld)\n", ret, prec);
12648 ret->pfunc = setprecision_func;
12653 static void __cdecl setw_func(ios_base *base, streamsize width)
12655 ios_base_width_set(base, width);
12658 /* ?setw@std@@YA?AU?$_Smanip@H@1@H@Z */
12659 /* ?setw@std@@YA?AU?$_Smanip@_J@1@_J@Z */
12660 manip_streamsize* __cdecl setw(manip_streamsize *ret, streamsize width)
12662 TRACE("(%p %ld)\n", ret, width);
12664 ret->pfunc = setw_func;
12669 static void __cdecl resetioflags_func(ios_base *base, int mask)
12671 ios_base_setf_mask(base, 0, mask);
12674 /* ?resetiosflags@std@@YA?AU?$_Smanip@H@1@H@Z */
12675 manip_int* __cdecl resetiosflags(manip_int *ret, int mask)
12677 TRACE("(%p %d)\n", ret, mask);
12679 ret->pfunc = resetioflags_func;
12684 static void __cdecl setiosflags_func(ios_base *base, int mask)
12686 ios_base_setf_mask(base, FMTFLAG_mask, mask);
12689 /* ?setiosflags@std@@YA?AU?$_Smanip@H@1@H@Z */
12690 manip_int* __cdecl setiosflags(manip_int *ret, int mask)
12692 TRACE("(%p %d)\n", ret, mask);
12694 ret->pfunc = setiosflags_func;
12699 static void __cdecl setbase_func(ios_base *base, int set_base)
12702 set_base = FMTFLAG_dec;
12703 else if(set_base == 8)
12704 set_base = FMTFLAG_oct;
12705 else if(set_base == 16)
12706 set_base = FMTFLAG_hex;
12710 ios_base_setf_mask(base, set_base, FMTFLAG_basefield);
12713 /* ?setbase@std@@YA?AU?$_Smanip@H@1@H@Z */
12714 manip_int* __cdecl setbase(manip_int *ret, int base)
12716 TRACE("(%p %d)\n", ret, base);
12718 ret->pfunc = setbase_func;
12723 static basic_filebuf_char filebuf_char_stdin;
12724 /* ?cin@std@@3V?$basic_istream@DU?$char_traits@D@std@@@1@A */
12726 basic_istream_char obj;
12727 basic_ios_char vbase;
12729 /* ?_Ptr_cin@std@@3PAV?$basic_istream@DU?$char_traits@D@std@@@1@A */
12730 /* ?_Ptr_cin@std@@3PEAV?$basic_istream@DU?$char_traits@D@std@@@1@EA */
12731 basic_istream_char *_Ptr_cin = &cin.obj;
12733 static basic_filebuf_wchar filebuf_short_stdin;
12734 /* ?wcin@std@@3V?$basic_istream@GU?$char_traits@G@std@@@1@A */
12736 basic_istream_wchar obj;
12737 basic_ios_wchar vbase;
12738 } ucin = { { 0 } };
12739 /* ?_Ptr_wcin@std@@3PAV?$basic_istream@GU?$char_traits@G@std@@@1@A */
12740 /* ?_Ptr_wcin@std@@3PEAV?$basic_istream@GU?$char_traits@G@std@@@1@EA */
12741 basic_istream_wchar *_Ptr_ucin = &ucin.obj;
12743 static basic_filebuf_wchar filebuf_wchar_stdin;
12744 /* ?wcin@std@@3V?$basic_istream@_WU?$char_traits@_W@std@@@1@A */
12746 basic_istream_wchar obj;
12747 basic_ios_wchar vbase;
12748 } wcin = { { 0 } };
12749 /* ?_Ptr_wcin@std@@3PAV?$basic_istream@_WU?$char_traits@_W@std@@@1@A */
12750 /* ?_Ptr_wcin@std@@3PEAV?$basic_istream@_WU?$char_traits@_W@std@@@1@EA */
12751 basic_istream_wchar *_Ptr_wcin = &wcin.obj;
12753 static basic_filebuf_char filebuf_char_stdout;
12754 /* ?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12756 basic_ostream_char obj;
12757 basic_ios_char vbase;
12758 } cout = { { 0 } };
12759 /* ?_Ptr_cout@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12760 /* ?_Ptr_cout@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
12761 basic_ostream_char *_Ptr_cout = &cout.obj;
12763 static basic_filebuf_wchar filebuf_short_stdout;
12764 /* ?wcout@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12766 basic_ostream_wchar obj;
12767 basic_ios_wchar vbase;
12768 } ucout = { { 0 } };
12769 /* ?_Ptr_wcout@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12770 /* ?_Ptr_wcout@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
12771 basic_ostream_wchar *_Ptr_ucout = &ucout.obj;
12773 static basic_filebuf_wchar filebuf_wchar_stdout;
12774 /* ?wcout@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12776 basic_ostream_wchar obj;
12777 basic_ios_wchar vbase;
12778 } wcout = { { 0 } };
12779 /* ?_Ptr_wcout@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12780 /* ?_Ptr_wcout@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
12781 basic_ostream_wchar *_Ptr_wcout = &wcout.obj;
12783 static basic_filebuf_char filebuf_char_stderr;
12784 /* ?cerr@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12786 basic_ostream_char obj;
12787 basic_ios_char vbase;
12788 } cerr = { { 0 } };
12789 /* ?_Ptr_cerr@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12790 /* ?_Ptr_cerr@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
12791 basic_ostream_char *_Ptr_cerr = &cerr.obj;
12793 static basic_filebuf_wchar filebuf_short_stderr;
12794 /* ?wcerr@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12796 basic_ostream_wchar obj;
12797 basic_ios_wchar vbase;
12798 } ucerr = { { 0 } };
12799 /* ?_Ptr_wcerr@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12800 /* ?_Ptr_wcerr@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
12801 basic_ostream_wchar *_Ptr_ucerr = &ucerr.obj;
12803 static basic_filebuf_wchar filebuf_wchar_stderr;
12804 /* ?wcerr@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12806 basic_ostream_wchar obj;
12807 basic_ios_wchar vbase;
12808 } wcerr = { { 0 } };
12809 /* ?_Ptr_wcerr@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12810 /* ?_Ptr_wcerr@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
12811 basic_ostream_wchar *_Ptr_wcerr = &wcerr.obj;
12813 static basic_filebuf_char filebuf_char_log;
12814 /* ?clog@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12816 basic_ostream_char obj;
12817 basic_ios_char vbase;
12818 } clog = { { 0 } };
12819 /* ?_Ptr_clog@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12820 /* ?_Ptr_clog@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
12821 basic_ostream_char *_Ptr_clog = &clog.obj;
12823 static basic_filebuf_wchar filebuf_short_log;
12824 /* ?wclog@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12826 basic_ostream_wchar obj;
12827 basic_ios_wchar vbase;
12828 } uclog = { { 0 } };
12829 /* ?_Ptr_wclog@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12830 /* ?_Ptr_wclog@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
12831 basic_ostream_wchar *_Ptr_uclog = &uclog.obj;
12833 static basic_filebuf_wchar filebuf_wchar_log;
12834 /* ?wclog@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12836 basic_ostream_wchar obj;
12837 basic_ios_wchar vbase;
12838 } wclog = { { 0 } };
12839 /* ?_Ptr_wclog@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12840 /* ?_Ptr_wclog@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
12841 basic_ostream_wchar *_Ptr_wclog = &wclog.obj;
12843 /* ?_Init_cnt@Init@ios_base@std@@0HA */
12844 int ios_base_Init__Init_cnt = -1;
12846 /* ?_Init_ctor@Init@ios_base@std@@CAXPAV123@@Z */
12847 /* ?_Init_ctor@Init@ios_base@std@@CAXPEAV123@@Z */
12848 static void ios_base_Init__Init_ctor(void *this)
12850 TRACE("(%p)\n", this);
12852 if(ios_base_Init__Init_cnt < 0)
12853 ios_base_Init__Init_cnt = 1;
12855 ios_base_Init__Init_cnt++;
12858 /* ??0Init@ios_base@std@@QAE@XZ */
12859 /* ??0Init@ios_base@std@@QEAA@XZ */
12860 DEFINE_THISCALL_WRAPPER(ios_base_Init_ctor, 4)
12861 void* __thiscall ios_base_Init_ctor(void *this)
12863 ios_base_Init__Init_ctor(this);
12867 /* ?_Init_dtor@Init@ios_base@std@@CAXPAV123@@Z */
12868 /* ?_Init_dtor@Init@ios_base@std@@CAXPEAV123@@Z */
12869 static void ios_base_Init__Init_dtor(void *this)
12871 TRACE("(%p)\n", this);
12873 ios_base_Init__Init_cnt--;
12874 if(!ios_base_Init__Init_cnt) {
12875 basic_ostream_char_flush(&cout.obj);
12876 basic_ostream_char_flush(&cerr.obj);
12877 basic_ostream_char_flush(&clog.obj);
12881 /* ??1Init@ios_base@std@@QAE@XZ */
12882 /* ??1Init@ios_base@std@@QEAA@XZ */
12883 DEFINE_THISCALL_WRAPPER(ios_base_Init_dtor, 4)
12884 void __thiscall ios_base_Init_dtor(void *this)
12886 ios_base_Init__Init_dtor(this);
12889 /* ??4Init@ios_base@std@@QAEAAV012@ABV012@@Z */
12890 /* ??4Init@ios_base@std@@QEAAAEAV012@AEBV012@@Z */
12891 DEFINE_THISCALL_WRAPPER(ios_base_Init_op_assign, 8)
12892 void* __thiscall ios_base_Init_op_assign(void *this, void *rhs)
12894 TRACE("(%p %p)\n", this, rhs);
12898 /* ?_Init_cnt@_Winit@std@@0HA */
12899 int _Winit__Init_cnt = -1;
12901 /* ??0_Winit@std@@QAE@XZ */
12902 /* ??0_Winit@std@@QEAA@XZ */
12903 DEFINE_THISCALL_WRAPPER(_Winit_ctor, 4)
12904 void* __thiscall _Winit_ctor(void *this)
12906 TRACE("(%p)\n", this);
12908 if(_Winit__Init_cnt < 0)
12909 _Winit__Init_cnt = 1;
12911 _Winit__Init_cnt++;
12916 /* ??1_Winit@std@@QAE@XZ */
12917 /* ??1_Winit@std@@QAE@XZ */
12918 DEFINE_THISCALL_WRAPPER(_Winit_dtor, 4)
12919 void __thiscall _Winit_dtor(void *this)
12921 TRACE("(%p)\n", this);
12923 _Winit__Init_cnt--;
12924 if(!_Winit__Init_cnt) {
12925 basic_ostream_wchar_flush(&wcout.obj);
12926 basic_ostream_wchar_flush(&wcerr.obj);
12927 basic_ostream_wchar_flush(&wclog.obj);
12931 /* ??4_Winit@std@@QAEAAV01@ABV01@@Z */
12932 /* ??4_Winit@std@@QEAAAEAV01@AEBV01@@Z */
12933 DEFINE_THISCALL_WRAPPER(_Winit_op_assign, 8)
12934 void* __thiscall _Winit_op_assign(void *this, void *rhs)
12936 TRACE("(%p %p)\n", this, rhs);
12940 void init_io(void *base)
12943 init_iosb_rtti(base);
12944 init_ios_base_rtti(base);
12945 init_basic_ios_char_rtti(base);
12946 init_basic_ios_wchar_rtti(base);
12947 init_basic_ios_short_rtti(base);
12948 init_basic_streambuf_char_rtti(base);
12949 init_basic_streambuf_wchar_rtti(base);
12950 init_basic_streambuf_short_rtti(base);
12951 init_basic_filebuf_char_rtti(base);
12952 init_basic_filebuf_wchar_rtti(base);
12953 init_basic_filebuf_short_rtti(base);
12954 init_basic_stringbuf_char_rtti(base);
12955 init_basic_stringbuf_wchar_rtti(base);
12956 init_basic_stringbuf_short_rtti(base);
12957 init_basic_ostream_char_rtti(base);
12958 init_basic_ostream_wchar_rtti(base);
12959 init_basic_ostream_short_rtti(base);
12960 init_basic_istream_char_rtti(base);
12961 init_basic_istream_wchar_rtti(base);
12962 init_basic_istream_short_rtti(base);
12963 init_basic_iostream_char_rtti(base);
12964 init_basic_iostream_wchar_rtti(base);
12965 init_basic_iostream_short_rtti(base);
12966 init_basic_ofstream_char_rtti(base);
12967 init_basic_ofstream_wchar_rtti(base);
12968 init_basic_ofstream_short_rtti(base);
12969 init_basic_ifstream_char_rtti(base);
12970 init_basic_ifstream_wchar_rtti(base);
12971 init_basic_ifstream_short_rtti(base);
12972 init_basic_fstream_char_rtti(base);
12973 init_basic_fstream_wchar_rtti(base);
12974 init_basic_fstream_short_rtti(base);
12975 init_basic_ostringstream_char_rtti(base);
12976 init_basic_ostringstream_wchar_rtti(base);
12977 init_basic_ostringstream_short_rtti(base);
12978 init_basic_istringstream_char_rtti(base);
12979 init_basic_istringstream_wchar_rtti(base);
12980 init_basic_istringstream_short_rtti(base);
12981 init_basic_stringstream_char_rtti(base);
12982 init_basic_stringstream_wchar_rtti(base);
12983 init_basic_stringstream_short_rtti(base);
12984 init_strstreambuf_rtti(base);
12985 init_strstream_rtti(base);
12986 init_ostrstream_rtti(base);
12989 basic_filebuf_char_ctor_file(&filebuf_char_stdin, stdin);
12990 basic_istream_char_ctor(&cin.obj, &filebuf_char_stdin.base, FALSE/*FIXME*/, TRUE);
12992 basic_filebuf_short_ctor_file(&filebuf_short_stdin, stdin);
12993 basic_istream_short_ctor(&ucin.obj, &filebuf_short_stdin.base, FALSE/*FIXME*/, TRUE);
12995 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stdin, stdin);
12996 basic_istream_wchar_ctor(&wcin.obj, &filebuf_wchar_stdin.base, FALSE/*FIXME*/, TRUE);
12998 basic_filebuf_char_ctor_file(&filebuf_char_stdout, stdout);
12999 basic_ostream_char_ctor(&cout.obj, &filebuf_char_stdout.base, FALSE/*FIXME*/, TRUE);
13001 basic_filebuf_short_ctor_file(&filebuf_short_stdout, stdout);
13002 basic_ostream_short_ctor(&ucout.obj, &filebuf_short_stdout.base, FALSE/*FIXME*/, TRUE);
13004 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stdout, stdout);
13005 basic_ostream_wchar_ctor(&wcout.obj, &filebuf_wchar_stdout.base, FALSE/*FIXME*/, TRUE);
13007 basic_filebuf_char_ctor_file(&filebuf_char_stderr, stderr);
13008 basic_ostream_char_ctor(&cerr.obj, &filebuf_char_stderr.base, FALSE/*FIXME*/, TRUE);
13010 basic_filebuf_short_ctor_file(&filebuf_short_stderr, stderr);
13011 basic_ostream_short_ctor(&ucerr.obj, &filebuf_short_stderr.base, FALSE/*FIXME*/, TRUE);
13013 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stderr, stderr);
13014 basic_ostream_wchar_ctor(&wcerr.obj, &filebuf_wchar_stderr.base, FALSE/*FIXME*/, TRUE);
13016 basic_filebuf_char_ctor_file(&filebuf_char_log, stderr);
13017 basic_ostream_char_ctor(&clog.obj, &filebuf_char_log.base, FALSE/*FIXME*/, TRUE);
13019 basic_filebuf_short_ctor_file(&filebuf_short_log, stderr);
13020 basic_ostream_short_ctor(&uclog.obj, &filebuf_short_log.base, FALSE/*FIXME*/, TRUE);
13022 basic_filebuf_wchar_ctor_file(&filebuf_wchar_log, stderr);
13023 basic_ostream_wchar_ctor(&wclog.obj, &filebuf_wchar_log.base, FALSE/*FIXME*/, TRUE);
13028 basic_istream_char_vbase_dtor(&cin.obj);
13029 basic_filebuf_char_dtor(&filebuf_char_stdin);
13031 basic_istream_wchar_vbase_dtor(&ucin.obj);
13032 basic_filebuf_wchar_dtor(&filebuf_short_stdin);
13034 basic_istream_wchar_vbase_dtor(&wcin.obj);
13035 basic_filebuf_wchar_dtor(&filebuf_wchar_stdin);
13037 basic_ostream_char_vbase_dtor(&cout.obj);
13038 basic_filebuf_char_dtor(&filebuf_char_stdout);
13040 basic_ostream_wchar_vbase_dtor(&ucout.obj);
13041 basic_filebuf_wchar_dtor(&filebuf_short_stdout);
13043 basic_ostream_wchar_vbase_dtor(&wcout.obj);
13044 basic_filebuf_wchar_dtor(&filebuf_wchar_stdout);
13046 basic_ostream_char_vbase_dtor(&cerr.obj);
13047 basic_filebuf_char_dtor(&filebuf_char_stderr);
13049 basic_ostream_wchar_vbase_dtor(&ucerr.obj);
13050 basic_filebuf_wchar_dtor(&filebuf_short_stderr);
13052 basic_ostream_wchar_vbase_dtor(&wcerr.obj);
13053 basic_filebuf_wchar_dtor(&filebuf_wchar_stderr);
13055 basic_ostream_char_vbase_dtor(&clog.obj);
13056 basic_filebuf_char_dtor(&filebuf_char_log);
13058 basic_ostream_wchar_vbase_dtor(&uclog.obj);
13059 basic_filebuf_wchar_dtor(&filebuf_short_log);
13061 basic_ostream_wchar_vbase_dtor(&wclog.obj);
13062 basic_filebuf_wchar_dtor(&filebuf_wchar_log);